/* THIS IS A GENERATED/BUNDLED FILE BY ESBUILD if you want to view the source, please visit the github repository of this plugin */ var sN=Object.create;var cu=Object.defineProperty;var lN=Object.getOwnPropertyDescriptor;var uN=Object.getOwnPropertyNames;var cN=Object.getPrototypeOf,dN=Object.prototype.hasOwnProperty;var fN=(n,t,e)=>t in n?cu(n,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):n[t]=e;var de=(n,t)=>()=>(n&&(t=n(n=0)),t);var z=(n,t)=>()=>(t||n((t={exports:{}}).exports,t),t.exports),Jv=(n,t)=>{for(var e in t)cu(n,e,{get:t[e],enumerable:!0})},SE=(n,t,e,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of uN(t))!dN.call(n,o)&&o!==e&&cu(n,o,{get:()=>t[o],enumerable:!(r=lN(t,o))||r.enumerable});return n};var B=(n,t,e)=>(e=n!=null?sN(cN(n)):{},SE(t||!n||!n.__esModule?cu(e,"default",{value:n,enumerable:!0}):e,n)),pN=n=>SE(cu({},"__esModule",{value:!0}),n);var N=(n,t,e)=>(fN(n,typeof t!="symbol"?t+"":t,e),e);function _E(n,t="YYYY-MM-DD HH:mm:ss.SSS"){let e=n.getFullYear(),r=qs(n.getMonth()+1),o=qs(n.getDate()),i=qs(n.getHours()),a=qs(n.getMinutes()),s=qs(n.getSeconds()),l=qs(n.getMilliseconds(),3);return t.replace("YYYY",String(e)).replace("MM",r).replace("DD",o).replace("HH",i).replace("mm",a).replace("ss",s).replace("SSS",l)}function EE(n){return _E(new Date,n)}function No(n=new Date){return _E(n,"YYYY-MM-DDTHH:mm:ssZ")}var qs,$s=de(()=>{qs=(n,t=2)=>{let e=String(n);for(;e.length{$s();Zv=require("obsidian"),Bd=(i=>(i[i.DEBUG=0]="DEBUG",i[i.INFO=1]="INFO",i[i.WARN=2]="WARN",i[i.ERROR=3]="ERROR",i[i.NONE=4]="NONE",i))(Bd||{}),em={level:1,showTimestamp:!0,showLevel:!0,console:!0,showNotifications:!0,noticeTimeout:5e3},Ie=class{constructor(t){this.name=t,Ie.initConfig&&!Ie.initialized&&(Ie.updateConfig(Ie.initConfig),Ie.initConfig=null,Ie.initialized=!0)}static initRootLogger(t){Ie.updateConfig(t),Ie.initialized=!0}static updateConfig(t){Ie.config={...Ie.config,...t},Ie.moduleLoggers.forEach(e=>{e.updateConfig(Ie.config)}),Ie.rootInstance&&Ie.rootInstance.updateConfig(Ie.config)}static getRootLogger(){return Ie.rootInstance||(Ie.rootInstance=new Ie("RavenHogwartsToolkit")),Ie.rootInstance}static getLogger(t){return this.moduleLoggers.has(t)||this.moduleLoggers.set(t,new Ie(t)),this.moduleLoggers.get(t)}formatMessage(t,e,r){let o=[];return Ie.config.showTimestamp&&o.push(`[${EE()}]`),Ie.config.showLevel&&o.push(`[${Bd[t]}]`),o.push(`[${this.name}]`),Ie.config.prefix&&o.push(Ie.config.prefix),o.push(e),o.join(" ")}log(t,e,r=[]){if(t>=Ie.config.level){let o=this.formatMessage(t,e,r);if(Ie.config.console)switch(t){case 0:console.debug(o,...r);break;case 1:console.info(o,...r);break;case 2:console.warn(o,...r);break;case 3:console.error(o,...r);break}Ie.config.showNotifications&&t>=2&&new Zv.Notice(o,Ie.config.noticeTimeout)}}debug(t,...e){this.log(0,t,e)}info(t,...e){this.log(1,t,e)}warn(t,...e){this.log(2,t,e)}error(t,...e){this.log(3,t,e)}notice(t,...e){let r=this.formatMessage(1,t,e);new Zv.Notice(r,Ie.config.noticeTimeout)}logError(t,e){return this.error(e||t.message,t),null}throwError(t,e){throw this.error(e||t.message,t),t}updateConfig(t){Ie.config=t}},Hr=Ie;Hr.moduleLoggers=new Map,Hr.initialized=!1,Hr.initConfig=null,Hr.config={...em};Qe=Hr.getRootLogger()});var ME=z(Ce=>{"use strict";var du=Symbol.for("react.element"),hN=Symbol.for("react.portal"),gN=Symbol.for("react.fragment"),vN=Symbol.for("react.strict_mode"),mN=Symbol.for("react.profiler"),yN=Symbol.for("react.provider"),CN=Symbol.for("react.context"),wN=Symbol.for("react.forward_ref"),SN=Symbol.for("react.suspense"),_N=Symbol.for("react.memo"),EN=Symbol.for("react.lazy"),RE=Symbol.iterator;function RN(n){return n===null||typeof n!="object"?null:(n=RE&&n[RE]||n["@@iterator"],typeof n=="function"?n:null)}var PE={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},OE=Object.assign,LE={};function Ks(n,t,e){this.props=n,this.context=t,this.refs=LE,this.updater=e||PE}Ks.prototype.isReactComponent={};Ks.prototype.setState=function(n,t){if(typeof n!="object"&&typeof n!="function"&&n!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,n,t,"setState")};Ks.prototype.forceUpdate=function(n){this.updater.enqueueForceUpdate(this,n,"forceUpdate")};function IE(){}IE.prototype=Ks.prototype;function rm(n,t,e){this.props=n,this.context=t,this.refs=LE,this.updater=e||PE}var nm=rm.prototype=new IE;nm.constructor=rm;OE(nm,Ks.prototype);nm.isPureReactComponent=!0;var TE=Array.isArray,DE=Object.prototype.hasOwnProperty,om={current:null},AE={key:!0,ref:!0,__self:!0,__source:!0};function FE(n,t,e){var r,o={},i=null,a=null;if(t!=null)for(r in t.ref!==void 0&&(a=t.ref),t.key!==void 0&&(i=""+t.key),t)DE.call(t,r)&&!AE.hasOwnProperty(r)&&(o[r]=t[r]);var s=arguments.length-2;if(s===1)o.children=e;else if(1{"use strict";NE.exports=ME()});var qE=z(ze=>{"use strict";function um(n,t){var e=n.length;n.push(t);e:for(;0>>1,o=n[r];if(0>>1;rzd(s,e))lzd(u,s)?(n[r]=u,n[l]=e,r=l):(n[r]=s,n[a]=e,r=a);else if(lzd(u,e))n[r]=u,n[l]=e,r=l;else break e}}return t}function zd(n,t){var e=n.sortIndex-t.sortIndex;return e!==0?e:n.id-t.id}typeof performance=="object"&&typeof performance.now=="function"?(GE=performance,ze.unstable_now=function(){return GE.now()}):(am=Date,kE=am.now(),ze.unstable_now=function(){return am.now()-kE});var GE,am,kE,Go=[],Bi=[],LN=1,An=null,ur=3,Kd=!1,Ya=!1,pu=!1,BE=typeof setTimeout=="function"?setTimeout:null,WE=typeof clearTimeout=="function"?clearTimeout:null,HE=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function cm(n){for(var t=no(Bi);t!==null;){if(t.callback===null)$d(Bi);else if(t.startTime<=n)$d(Bi),t.sortIndex=t.expirationTime,um(Go,t);else break;t=no(Bi)}}function dm(n){if(pu=!1,cm(n),!Ya)if(no(Go)!==null)Ya=!0,pm(fm);else{var t=no(Bi);t!==null&&hm(dm,t.startTime-n)}}function fm(n,t){Ya=!1,pu&&(pu=!1,WE(hu),hu=-1),Kd=!0;var e=ur;try{for(cm(t),An=no(Go);An!==null&&(!(An.expirationTime>t)||n&&!zE());){var r=An.callback;if(typeof r=="function"){An.callback=null,ur=An.priorityLevel;var o=r(An.expirationTime<=t);t=ze.unstable_now(),typeof o=="function"?An.callback=o:An===no(Go)&&$d(Go),cm(t)}else $d(Go);An=no(Go)}if(An!==null)var i=!0;else{var a=no(Bi);a!==null&&hm(dm,a.startTime-t),i=!1}return i}finally{An=null,ur=e,Kd=!1}}var Yd=!1,qd=null,hu=-1,UE=5,jE=-1;function zE(){return!(ze.unstable_now()-jEn||125r?(n.sortIndex=e,um(Bi,n),no(Go)===null&&n===no(Bi)&&(pu?(WE(hu),hu=-1):pu=!0,hm(dm,e-r))):(n.sortIndex=o,um(Go,n),Ya||Kd||(Ya=!0,pm(fm))),n};ze.unstable_shouldYield=zE;ze.unstable_wrapCallback=function(n){var t=ur;return function(){var e=ur;ur=t;try{return n.apply(this,arguments)}finally{ur=e}}}});var KE=z((p8,$E)=>{"use strict";$E.exports=qE()});var Jx=z(dn=>{"use strict";var IN=te(),un=KE();function k(n){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+n,e=1;e"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Gm=Object.prototype.hasOwnProperty,DN=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,YE={},XE={};function AN(n){return Gm.call(XE,n)?!0:Gm.call(YE,n)?!1:DN.test(n)?XE[n]=!0:(YE[n]=!0,!1)}function FN(n,t,e,r){if(e!==null&&e.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:e!==null?!e.acceptsBooleans:(n=n.toLowerCase().slice(0,5),n!=="data-"&&n!=="aria-");default:return!1}}function bN(n,t,e,r){if(t===null||typeof t>"u"||FN(n,t,e,r))return!0;if(r)return!1;if(e!==null)switch(e.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function Tr(n,t,e,r,o,i,a){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=o,this.mustUseProperty=e,this.propertyName=n,this.type=t,this.sanitizeURL=i,this.removeEmptyString=a}var Kt={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(n){Kt[n]=new Tr(n,0,!1,n,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(n){var t=n[0];Kt[t]=new Tr(t,1,!1,n[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(n){Kt[n]=new Tr(n,2,!1,n.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(n){Kt[n]=new Tr(n,2,!1,n,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(n){Kt[n]=new Tr(n,3,!1,n.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(n){Kt[n]=new Tr(n,3,!0,n,null,!1,!1)});["capture","download"].forEach(function(n){Kt[n]=new Tr(n,4,!1,n,null,!1,!1)});["cols","rows","size","span"].forEach(function(n){Kt[n]=new Tr(n,6,!1,n,null,!1,!1)});["rowSpan","start"].forEach(function(n){Kt[n]=new Tr(n,5,!1,n.toLowerCase(),null,!1,!1)});var Ly=/[\-:]([a-z])/g;function Iy(n){return n[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(n){var t=n.replace(Ly,Iy);Kt[t]=new Tr(t,1,!1,n,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(n){var t=n.replace(Ly,Iy);Kt[t]=new Tr(t,1,!1,n,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(n){var t=n.replace(Ly,Iy);Kt[t]=new Tr(t,1,!1,n,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(n){Kt[n]=new Tr(n,1,!1,n.toLowerCase(),null,!1,!1)});Kt.xlinkHref=new Tr("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(n){Kt[n]=new Tr(n,1,!1,n.toLowerCase(),null,!0,!0)});function Dy(n,t,e,r){var o=Kt.hasOwnProperty(t)?Kt[t]:null;(o!==null?o.type!==0:r||!(2s||o[a]!==i[s]){var l=` `+o[a].replace(" at new "," at ");return n.displayName&&l.includes("")&&(l=l.replace("",n.displayName)),l}while(1<=a&&0<=s);break}}}finally{vm=!1,Error.prepareStackTrace=e}return(n=n?n.displayName||n.name:"")?Eu(n):""}function MN(n){switch(n.tag){case 5:return Eu(n.type);case 16:return Eu("Lazy");case 13:return Eu("Suspense");case 19:return Eu("SuspenseList");case 0:case 2:case 15:return n=mm(n.type,!1),n;case 11:return n=mm(n.type.render,!1),n;case 1:return n=mm(n.type,!0),n;default:return""}}function Bm(n){if(n==null)return null;if(typeof n=="function")return n.displayName||n.name||null;if(typeof n=="string")return n;switch(n){case Js:return"Fragment";case Qs:return"Portal";case km:return"Profiler";case Ay:return"StrictMode";case Hm:return"Suspense";case Vm:return"SuspenseList"}if(typeof n=="object")switch(n.$$typeof){case nT:return(n.displayName||"Context")+".Consumer";case rT:return(n._context.displayName||"Context")+".Provider";case Fy:var t=n.render;return n=n.displayName,n||(n=t.displayName||t.name||"",n=n!==""?"ForwardRef("+n+")":"ForwardRef"),n;case by:return t=n.displayName||null,t!==null?t:Bm(n.type)||"Memo";case Ui:t=n._payload,n=n._init;try{return Bm(n(t))}catch{}}return null}function NN(n){var t=n.type;switch(n.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return n=t.render,n=n.displayName||n.name||"",t.displayName||(n!==""?"ForwardRef("+n+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return Bm(t);case 8:return t===Ay?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function na(n){switch(typeof n){case"boolean":case"number":case"string":case"undefined":return n;case"object":return n;default:return""}}function iT(n){var t=n.type;return(n=n.nodeName)&&n.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function GN(n){var t=iT(n)?"checked":"value",e=Object.getOwnPropertyDescriptor(n.constructor.prototype,t),r=""+n[t];if(!n.hasOwnProperty(t)&&typeof e<"u"&&typeof e.get=="function"&&typeof e.set=="function"){var o=e.get,i=e.set;return Object.defineProperty(n,t,{configurable:!0,get:function(){return o.call(this)},set:function(a){r=""+a,i.call(this,a)}}),Object.defineProperty(n,t,{enumerable:e.enumerable}),{getValue:function(){return r},setValue:function(a){r=""+a},stopTracking:function(){n._valueTracker=null,delete n[t]}}}}function Qd(n){n._valueTracker||(n._valueTracker=GN(n))}function aT(n){if(!n)return!1;var t=n._valueTracker;if(!t)return!0;var e=t.getValue(),r="";return n&&(r=iT(n)?n.checked?"true":"false":n.value),n=r,n!==e?(t.setValue(n),!0):!1}function xf(n){if(n=n||(typeof document<"u"?document:void 0),typeof n>"u")return null;try{return n.activeElement||n.body}catch{return n.body}}function Wm(n,t){var e=t.checked;return dt({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:e??n._wrapperState.initialChecked})}function JE(n,t){var e=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;e=na(t.value!=null?t.value:e),n._wrapperState={initialChecked:r,initialValue:e,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function sT(n,t){t=t.checked,t!=null&&Dy(n,"checked",t,!1)}function Um(n,t){sT(n,t);var e=na(t.value),r=t.type;if(e!=null)r==="number"?(e===0&&n.value===""||n.value!=e)&&(n.value=""+e):n.value!==""+e&&(n.value=""+e);else if(r==="submit"||r==="reset"){n.removeAttribute("value");return}t.hasOwnProperty("value")?jm(n,t.type,e):t.hasOwnProperty("defaultValue")&&jm(n,t.type,na(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(n.defaultChecked=!!t.defaultChecked)}function ZE(n,t,e){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+n._wrapperState.initialValue,e||t===n.value||(n.value=t),n.defaultValue=t}e=n.name,e!==""&&(n.name=""),n.defaultChecked=!!n._wrapperState.initialChecked,e!==""&&(n.name=e)}function jm(n,t,e){(t!=="number"||xf(n.ownerDocument)!==n)&&(e==null?n.defaultValue=""+n._wrapperState.initialValue:n.defaultValue!==""+e&&(n.defaultValue=""+e))}var Ru=Array.isArray;function ul(n,t,e,r){if(n=n.options,t){t={};for(var o=0;o"+t.valueOf().toString()+"",t=Jd.firstChild;n.firstChild;)n.removeChild(n.firstChild);for(;t.firstChild;)n.appendChild(t.firstChild)}});function Gu(n,t){if(t){var e=n.firstChild;if(e&&e===n.lastChild&&e.nodeType===3){e.nodeValue=t;return}}n.textContent=t}var Pu={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},kN=["Webkit","ms","Moz","O"];Object.keys(Pu).forEach(function(n){kN.forEach(function(t){t=t+n.charAt(0).toUpperCase()+n.substring(1),Pu[t]=Pu[n]})});function dT(n,t,e){return t==null||typeof t=="boolean"||t===""?"":e||typeof t!="number"||t===0||Pu.hasOwnProperty(n)&&Pu[n]?(""+t).trim():t+"px"}function fT(n,t){n=n.style;for(var e in t)if(t.hasOwnProperty(e)){var r=e.indexOf("--")===0,o=dT(e,t[e],r);e==="float"&&(e="cssFloat"),r?n.setProperty(e,o):n[e]=o}}var HN=dt({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function $m(n,t){if(t){if(HN[n]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(k(137,n));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(k(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(k(61))}if(t.style!=null&&typeof t.style!="object")throw Error(k(62))}}function Km(n,t){if(n.indexOf("-")===-1)return typeof t.is=="string";switch(n){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var Ym=null;function My(n){return n=n.target||n.srcElement||window,n.correspondingUseElement&&(n=n.correspondingUseElement),n.nodeType===3?n.parentNode:n}var Xm=null,cl=null,dl=null;function rR(n){if(n=tc(n)){if(typeof Xm!="function")throw Error(k(280));var t=n.stateNode;t&&(t=ep(t),Xm(n.stateNode,n.type,t))}}function pT(n){cl?dl?dl.push(n):dl=[n]:cl=n}function hT(){if(cl){var n=cl,t=dl;if(dl=cl=null,rR(n),t)for(n=0;n>>=0,n===0?32:31-(XN(n)/QN|0)|0}var Zd=64,ef=4194304;function Tu(n){switch(n&-n){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return n&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return n&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return n}}function If(n,t){var e=n.pendingLanes;if(e===0)return 0;var r=0,o=n.suspendedLanes,i=n.pingedLanes,a=e&268435455;if(a!==0){var s=a&~o;s!==0?r=Tu(s):(i&=a,i!==0&&(r=Tu(i)))}else a=e&~o,a!==0?r=Tu(a):i!==0&&(r=Tu(i));if(r===0)return 0;if(t!==0&&t!==r&&!(t&o)&&(o=r&-r,i=t&-t,o>=i||o===16&&(i&4194240)!==0))return t;if(r&4&&(r|=e&16),t=n.entangledLanes,t!==0)for(n=n.entanglements,t&=r;0e;e++)t.push(n);return t}function Zu(n,t,e){n.pendingLanes|=t,t!==536870912&&(n.suspendedLanes=0,n.pingedLanes=0),n=n.eventTimes,t=31-lo(t),n[t]=e}function tG(n,t){var e=n.pendingLanes&~t;n.pendingLanes=t,n.suspendedLanes=0,n.pingedLanes=0,n.expiredLanes&=t,n.mutableReadLanes&=t,n.entangledLanes&=t,t=n.entanglements;var r=n.eventTimes;for(n=n.expirationTimes;0=Lu),dR=String.fromCharCode(32),fR=!1;function bT(n,t){switch(n){case"keyup":return LG.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function MT(n){return n=n.detail,typeof n=="object"&&"data"in n?n.data:null}var Zs=!1;function DG(n,t){switch(n){case"compositionend":return MT(t);case"keypress":return t.which!==32?null:(fR=!0,dR);case"textInput":return n=t.data,n===dR&&fR?null:n;default:return null}}function AG(n,t){if(Zs)return n==="compositionend"||!Uy&&bT(n,t)?(n=AT(),mf=Vy=$i=null,Zs=!1,n):null;switch(n){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:e,offset:t-n};n=r}e:{for(;e;){if(e.nextSibling){e=e.nextSibling;break e}e=e.parentNode}e=void 0}e=gR(e)}}function HT(n,t){return n&&t?n===t?!0:n&&n.nodeType===3?!1:t&&t.nodeType===3?HT(n,t.parentNode):"contains"in n?n.contains(t):n.compareDocumentPosition?!!(n.compareDocumentPosition(t)&16):!1:!1}function VT(){for(var n=window,t=xf();t instanceof n.HTMLIFrameElement;){try{var e=typeof t.contentWindow.location.href=="string"}catch{e=!1}if(e)n=t.contentWindow;else break;t=xf(n.document)}return t}function jy(n){var t=n&&n.nodeName&&n.nodeName.toLowerCase();return t&&(t==="input"&&(n.type==="text"||n.type==="search"||n.type==="tel"||n.type==="url"||n.type==="password")||t==="textarea"||n.contentEditable==="true")}function BG(n){var t=VT(),e=n.focusedElem,r=n.selectionRange;if(t!==e&&e&&e.ownerDocument&&HT(e.ownerDocument.documentElement,e)){if(r!==null&&jy(e)){if(t=r.start,n=r.end,n===void 0&&(n=t),"selectionStart"in e)e.selectionStart=t,e.selectionEnd=Math.min(n,e.value.length);else if(n=(t=e.ownerDocument||document)&&t.defaultView||window,n.getSelection){n=n.getSelection();var o=e.textContent.length,i=Math.min(r.start,o);r=r.end===void 0?i:Math.min(r.end,o),!n.extend&&i>r&&(o=r,r=i,i=o),o=vR(e,i);var a=vR(e,r);o&&a&&(n.rangeCount!==1||n.anchorNode!==o.node||n.anchorOffset!==o.offset||n.focusNode!==a.node||n.focusOffset!==a.offset)&&(t=t.createRange(),t.setStart(o.node,o.offset),n.removeAllRanges(),i>r?(n.addRange(t),n.extend(a.node,a.offset)):(t.setEnd(a.node,a.offset),n.addRange(t)))}}for(t=[],n=e;n=n.parentNode;)n.nodeType===1&&t.push({element:n,left:n.scrollLeft,top:n.scrollTop});for(typeof e.focus=="function"&&e.focus(),e=0;e=document.documentMode,el=null,ry=null,Du=null,ny=!1;function mR(n,t,e){var r=e.window===e?e.document:e.nodeType===9?e:e.ownerDocument;ny||el==null||el!==xf(r)||(r=el,"selectionStart"in r&&jy(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),Du&&Uu(Du,r)||(Du=r,r=Ff(ry,"onSelect"),0nl||(n.current=uy[nl],uy[nl]=null,nl--)}function qe(n,t){nl++,uy[nl]=n.current,n.current=t}var oa={},pr=aa(oa),Wr=aa(!1),ns=oa;function vl(n,t){var e=n.type.contextTypes;if(!e)return oa;var r=n.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var o={},i;for(i in e)o[i]=t[i];return r&&(n=n.stateNode,n.__reactInternalMemoizedUnmaskedChildContext=t,n.__reactInternalMemoizedMaskedChildContext=o),o}function Ur(n){return n=n.childContextTypes,n!=null}function Mf(){Ze(Wr),Ze(pr)}function xR(n,t,e){if(pr.current!==oa)throw Error(k(168));qe(pr,t),qe(Wr,e)}function YT(n,t,e){var r=n.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return e;r=r.getChildContext();for(var o in r)if(!(o in t))throw Error(k(108,NN(n)||"Unknown",o));return dt({},e,r)}function Nf(n){return n=(n=n.stateNode)&&n.__reactInternalMemoizedMergedChildContext||oa,ns=pr.current,qe(pr,n),qe(Wr,Wr.current),!0}function PR(n,t,e){var r=n.stateNode;if(!r)throw Error(k(169));e?(n=YT(n,t,ns),r.__reactInternalMemoizedMergedChildContext=n,Ze(Wr),Ze(pr),qe(pr,n)):Ze(Wr),qe(Wr,e)}var pi=null,tp=!1,Om=!1;function XT(n){pi===null?pi=[n]:pi.push(n)}function QG(n){tp=!0,XT(n)}function sa(){if(!Om&&pi!==null){Om=!0;var n=0,t=ke;try{var e=pi;for(ke=1;n>=a,o-=a,hi=1<<32-lo(t)+o|e<T?(L=P,P=null):L=P.sibling;var I=f(m,P,S[T],E);if(I===null){P===null&&(P=L);break}n&&P&&I.alternate===null&&t(m,P),y=i(I,y,T),x===null?R=I:x.sibling=I,x=I,P=L}if(T===S.length)return e(m,P),it&&Xa(m,T),R;if(P===null){for(;TT?(L=P,P=null):L=P.sibling;var b=f(m,P,I.value,E);if(b===null){P===null&&(P=L);break}n&&P&&b.alternate===null&&t(m,P),y=i(b,y,T),x===null?R=b:x.sibling=b,x=b,P=L}if(I.done)return e(m,P),it&&Xa(m,T),R;if(P===null){for(;!I.done;T++,I=S.next())I=d(m,I.value,E),I!==null&&(y=i(I,y,T),x===null?R=I:x.sibling=I,x=I);return it&&Xa(m,T),R}for(P=r(m,P);!I.done;T++,I=S.next())I=p(P,m,T,I.value,E),I!==null&&(n&&I.alternate!==null&&P.delete(I.key===null?T:I.key),y=i(I,y,T),x===null?R=I:x.sibling=I,x=I);return n&&P.forEach(function(W){return t(m,W)}),it&&Xa(m,T),R}function C(m,y,S,E){if(typeof S=="object"&&S!==null&&S.type===Js&&S.key===null&&(S=S.props.children),typeof S=="object"&&S!==null){switch(S.$$typeof){case Xd:e:{for(var R=S.key,x=y;x!==null;){if(x.key===R){if(R=S.type,R===Js){if(x.tag===7){e(m,x.sibling),y=o(x,S.props.children),y.return=m,m=y;break e}}else if(x.elementType===R||typeof R=="object"&&R!==null&&R.$$typeof===Ui&&IR(R)===x.type){e(m,x.sibling),y=o(x,S.props),y.ref=Cu(m,x,S),y.return=m,m=y;break e}e(m,x);break}else t(m,x);x=x.sibling}S.type===Js?(y=rs(S.props.children,m.mode,E,S.key),y.return=m,m=y):(E=Tf(S.type,S.key,S.props,null,m.mode,E),E.ref=Cu(m,y,S),E.return=m,m=E)}return a(m);case Qs:e:{for(x=S.key;y!==null;){if(y.key===x)if(y.tag===4&&y.stateNode.containerInfo===S.containerInfo&&y.stateNode.implementation===S.implementation){e(m,y.sibling),y=o(y,S.children||[]),y.return=m,m=y;break e}else{e(m,y);break}else t(m,y);y=y.sibling}y=Nm(S,m.mode,E),y.return=m,m=y}return a(m);case Ui:return x=S._init,C(m,y,x(S._payload),E)}if(Ru(S))return h(m,y,S,E);if(gu(S))return v(m,y,S,E);ff(m,S)}return typeof S=="string"&&S!==""||typeof S=="number"?(S=""+S,y!==null&&y.tag===6?(e(m,y.sibling),y=o(y,S),y.return=m,m=y):(e(m,y),y=Mm(S,m.mode,E),y.return=m,m=y),a(m)):e(m,y)}return C}var yl=ex(!0),tx=ex(!1),Hf=aa(null),Vf=null,al=null,Ky=null;function Yy(){Ky=al=Vf=null}function Xy(n){var t=Hf.current;Ze(Hf),n._currentValue=t}function fy(n,t,e){for(;n!==null;){var r=n.alternate;if((n.childLanes&t)!==t?(n.childLanes|=t,r!==null&&(r.childLanes|=t)):r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t),n===e)break;n=n.return}}function pl(n,t){Vf=n,Ky=al=null,n=n.dependencies,n!==null&&n.firstContext!==null&&(n.lanes&t&&(Br=!0),n.firstContext=null)}function Gn(n){var t=n._currentValue;if(Ky!==n)if(n={context:n,memoizedValue:t,next:null},al===null){if(Vf===null)throw Error(k(308));al=n,Vf.dependencies={lanes:0,firstContext:n}}else al=al.next=n;return t}var Za=null;function Qy(n){Za===null?Za=[n]:Za.push(n)}function rx(n,t,e,r){var o=t.interleaved;return o===null?(e.next=e,Qy(t)):(e.next=o.next,o.next=e),t.interleaved=e,Ci(n,r)}function Ci(n,t){n.lanes|=t;var e=n.alternate;for(e!==null&&(e.lanes|=t),e=n,n=n.return;n!==null;)n.childLanes|=t,e=n.alternate,e!==null&&(e.childLanes|=t),e=n,n=n.return;return e.tag===3?e.stateNode:null}var ji=!1;function Jy(n){n.updateQueue={baseState:n.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function nx(n,t){n=n.updateQueue,t.updateQueue===n&&(t.updateQueue={baseState:n.baseState,firstBaseUpdate:n.firstBaseUpdate,lastBaseUpdate:n.lastBaseUpdate,shared:n.shared,effects:n.effects})}function vi(n,t){return{eventTime:n,lane:t,tag:0,payload:null,callback:null,next:null}}function Zi(n,t,e){var r=n.updateQueue;if(r===null)return null;if(r=r.shared,Pe&2){var o=r.pending;return o===null?t.next=t:(t.next=o.next,o.next=t),r.pending=t,Ci(n,e)}return o=r.interleaved,o===null?(t.next=t,Qy(r)):(t.next=o.next,o.next=t),r.interleaved=t,Ci(n,e)}function Cf(n,t,e){if(t=t.updateQueue,t!==null&&(t=t.shared,(e&4194240)!==0)){var r=t.lanes;r&=n.pendingLanes,e|=r,t.lanes=e,Gy(n,e)}}function DR(n,t){var e=n.updateQueue,r=n.alternate;if(r!==null&&(r=r.updateQueue,e===r)){var o=null,i=null;if(e=e.firstBaseUpdate,e!==null){do{var a={eventTime:e.eventTime,lane:e.lane,tag:e.tag,payload:e.payload,callback:e.callback,next:null};i===null?o=i=a:i=i.next=a,e=e.next}while(e!==null);i===null?o=i=t:i=i.next=t}else o=i=t;e={baseState:r.baseState,firstBaseUpdate:o,lastBaseUpdate:i,shared:r.shared,effects:r.effects},n.updateQueue=e;return}n=e.lastBaseUpdate,n===null?e.firstBaseUpdate=t:n.next=t,e.lastBaseUpdate=t}function Bf(n,t,e,r){var o=n.updateQueue;ji=!1;var i=o.firstBaseUpdate,a=o.lastBaseUpdate,s=o.shared.pending;if(s!==null){o.shared.pending=null;var l=s,u=l.next;l.next=null,a===null?i=u:a.next=u,a=l;var c=n.alternate;c!==null&&(c=c.updateQueue,s=c.lastBaseUpdate,s!==a&&(s===null?c.firstBaseUpdate=u:s.next=u,c.lastBaseUpdate=l))}if(i!==null){var d=o.baseState;a=0,c=u=l=null,s=i;do{var f=s.lane,p=s.eventTime;if((r&f)===f){c!==null&&(c=c.next={eventTime:p,lane:0,tag:s.tag,payload:s.payload,callback:s.callback,next:null});e:{var h=n,v=s;switch(f=t,p=e,v.tag){case 1:if(h=v.payload,typeof h=="function"){d=h.call(p,d,f);break e}d=h;break e;case 3:h.flags=h.flags&-65537|128;case 0:if(h=v.payload,f=typeof h=="function"?h.call(p,d,f):h,f==null)break e;d=dt({},d,f);break e;case 2:ji=!0}}s.callback!==null&&s.lane!==0&&(n.flags|=64,f=o.effects,f===null?o.effects=[s]:f.push(s))}else p={eventTime:p,lane:f,tag:s.tag,payload:s.payload,callback:s.callback,next:null},c===null?(u=c=p,l=d):c=c.next=p,a|=f;if(s=s.next,s===null){if(s=o.shared.pending,s===null)break;f=s,s=f.next,f.next=null,o.lastBaseUpdate=f,o.shared.pending=null}}while(1);if(c===null&&(l=d),o.baseState=l,o.firstBaseUpdate=u,o.lastBaseUpdate=c,t=o.shared.interleaved,t!==null){o=t;do a|=o.lane,o=o.next;while(o!==t)}else i===null&&(o.shared.lanes=0);as|=a,n.lanes=a,n.memoizedState=d}}function AR(n,t,e){if(n=t.effects,t.effects=null,n!==null)for(t=0;te?e:4,n(!0);var r=Im.transition;Im.transition={};try{n(!1),t()}finally{ke=e,Im.transition=r}}function wx(){return kn().memoizedState}function tk(n,t,e){var r=ta(n);if(e={lane:r,action:e,hasEagerState:!1,eagerState:null,next:null},Sx(n))_x(t,e);else if(e=rx(n,t,e,r),e!==null){var o=Rr();uo(e,n,r,o),Ex(e,t,r)}}function rk(n,t,e){var r=ta(n),o={lane:r,action:e,hasEagerState:!1,eagerState:null,next:null};if(Sx(n))_x(t,o);else{var i=n.alternate;if(n.lanes===0&&(i===null||i.lanes===0)&&(i=t.lastRenderedReducer,i!==null))try{var a=t.lastRenderedState,s=i(a,e);if(o.hasEagerState=!0,o.eagerState=s,co(s,a)){var l=t.interleaved;l===null?(o.next=o,Qy(t)):(o.next=l.next,l.next=o),t.interleaved=o;return}}catch{}finally{}e=rx(n,t,o,r),e!==null&&(o=Rr(),uo(e,n,r,o),Ex(e,t,r))}}function Sx(n){var t=n.alternate;return n===ct||t!==null&&t===ct}function _x(n,t){Au=Uf=!0;var e=n.pending;e===null?t.next=t:(t.next=e.next,e.next=t),n.pending=t}function Ex(n,t,e){if(e&4194240){var r=t.lanes;r&=n.pendingLanes,e|=r,t.lanes=e,Gy(n,e)}}var jf={readContext:Gn,useCallback:cr,useContext:cr,useEffect:cr,useImperativeHandle:cr,useInsertionEffect:cr,useLayoutEffect:cr,useMemo:cr,useReducer:cr,useRef:cr,useState:cr,useDebugValue:cr,useDeferredValue:cr,useTransition:cr,useMutableSource:cr,useSyncExternalStore:cr,useId:cr,unstable_isNewReconciler:!1},nk={readContext:Gn,useCallback:function(n,t){return Ho().memoizedState=[n,t===void 0?null:t],n},useContext:Gn,useEffect:bR,useImperativeHandle:function(n,t,e){return e=e!=null?e.concat([n]):null,Sf(4194308,4,gx.bind(null,t,n),e)},useLayoutEffect:function(n,t){return Sf(4194308,4,n,t)},useInsertionEffect:function(n,t){return Sf(4,2,n,t)},useMemo:function(n,t){var e=Ho();return t=t===void 0?null:t,n=n(),e.memoizedState=[n,t],n},useReducer:function(n,t,e){var r=Ho();return t=e!==void 0?e(t):t,r.memoizedState=r.baseState=t,n={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:n,lastRenderedState:t},r.queue=n,n=n.dispatch=tk.bind(null,ct,n),[r.memoizedState,n]},useRef:function(n){var t=Ho();return n={current:n},t.memoizedState=n},useState:FR,useDebugValue:aC,useDeferredValue:function(n){return Ho().memoizedState=n},useTransition:function(){var n=FR(!1),t=n[0];return n=ek.bind(null,n[1]),Ho().memoizedState=n,[t,n]},useMutableSource:function(){},useSyncExternalStore:function(n,t,e){var r=ct,o=Ho();if(it){if(e===void 0)throw Error(k(407));e=e()}else{if(e=t(),Ht===null)throw Error(k(349));is&30||sx(r,t,e)}o.memoizedState=e;var i={value:e,getSnapshot:t};return o.queue=i,bR(ux.bind(null,r,i,n),[n]),r.flags|=2048,Qu(9,lx.bind(null,r,i,e,t),void 0,null),e},useId:function(){var n=Ho(),t=Ht.identifierPrefix;if(it){var e=gi,r=hi;e=(r&~(1<<32-lo(r)-1)).toString(32)+e,t=":"+t+"R"+e,e=Yu++,0<\/script>",n=n.removeChild(n.firstChild)):typeof r.is=="string"?n=a.createElement(e,{is:r.is}):(n=a.createElement(e),e==="select"&&(a=n,r.multiple?a.multiple=!0:r.size&&(a.size=r.size))):n=a.createElementNS(n,e),n[Vo]=t,n[qu]=r,Fx(n,t,!1,!1),t.stateNode=n;e:{switch(a=Km(e,r),e){case"dialog":Je("cancel",n),Je("close",n),o=r;break;case"iframe":case"object":case"embed":Je("load",n),o=r;break;case"video":case"audio":for(o=0;oSl&&(t.flags|=128,r=!0,wu(i,!1),t.lanes=4194304)}else{if(!r)if(n=Wf(a),n!==null){if(t.flags|=128,r=!0,e=n.updateQueue,e!==null&&(t.updateQueue=e,t.flags|=4),wu(i,!0),i.tail===null&&i.tailMode==="hidden"&&!a.alternate&&!it)return dr(t),null}else 2*St()-i.renderingStartTime>Sl&&e!==1073741824&&(t.flags|=128,r=!0,wu(i,!1),t.lanes=4194304);i.isBackwards?(a.sibling=t.child,t.child=a):(e=i.last,e!==null?e.sibling=a:t.child=a,i.last=a)}return i.tail!==null?(t=i.tail,i.rendering=t,i.tail=t.sibling,i.renderingStartTime=St(),t.sibling=null,e=ut.current,qe(ut,r?e&1|2:e&1),t):(dr(t),null);case 22:case 23:return fC(),r=t.memoizedState!==null,n!==null&&n.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?an&1073741824&&(dr(t),t.subtreeFlags&6&&(t.flags|=8192)):dr(t),null;case 24:return null;case 25:return null}throw Error(k(156,t.tag))}function dk(n,t){switch(qy(t),t.tag){case 1:return Ur(t.type)&&Mf(),n=t.flags,n&65536?(t.flags=n&-65537|128,t):null;case 3:return Cl(),Ze(Wr),Ze(pr),tC(),n=t.flags,n&65536&&!(n&128)?(t.flags=n&-65537|128,t):null;case 5:return eC(t),null;case 13:if(Ze(ut),n=t.memoizedState,n!==null&&n.dehydrated!==null){if(t.alternate===null)throw Error(k(340));ml()}return n=t.flags,n&65536?(t.flags=n&-65537|128,t):null;case 19:return Ze(ut),null;case 4:return Cl(),null;case 10:return Xy(t.type._context),null;case 22:case 23:return fC(),null;case 24:return null;default:return null}}var hf=!1,fr=!1,fk=typeof WeakSet=="function"?WeakSet:Set,j=null;function sl(n,t){var e=n.ref;if(e!==null)if(typeof e=="function")try{e(null)}catch(r){ht(n,t,r)}else e.current=null}function Sy(n,t,e){try{e()}catch(r){ht(n,t,r)}}var zR=!1;function pk(n,t){if(oy=Df,n=VT(),jy(n)){if("selectionStart"in n)var e={start:n.selectionStart,end:n.selectionEnd};else e:{e=(e=n.ownerDocument)&&e.defaultView||window;var r=e.getSelection&&e.getSelection();if(r&&r.rangeCount!==0){e=r.anchorNode;var o=r.anchorOffset,i=r.focusNode;r=r.focusOffset;try{e.nodeType,i.nodeType}catch{e=null;break e}var a=0,s=-1,l=-1,u=0,c=0,d=n,f=null;t:for(;;){for(var p;d!==e||o!==0&&d.nodeType!==3||(s=a+o),d!==i||r!==0&&d.nodeType!==3||(l=a+r),d.nodeType===3&&(a+=d.nodeValue.length),(p=d.firstChild)!==null;)f=d,d=p;for(;;){if(d===n)break t;if(f===e&&++u===o&&(s=a),f===i&&++c===r&&(l=a),(p=d.nextSibling)!==null)break;d=f,f=d.parentNode}d=p}e=s===-1||l===-1?null:{start:s,end:l}}else e=null}e=e||{start:0,end:0}}else e=null;for(iy={focusedElem:n,selectionRange:e},Df=!1,j=t;j!==null;)if(t=j,n=t.child,(t.subtreeFlags&1028)!==0&&n!==null)n.return=t,j=n;else for(;j!==null;){t=j;try{var h=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(h!==null){var v=h.memoizedProps,C=h.memoizedState,m=t.stateNode,y=m.getSnapshotBeforeUpdate(t.elementType===t.type?v:io(t.type,v),C);m.__reactInternalSnapshotBeforeUpdate=y}break;case 3:var S=t.stateNode.containerInfo;S.nodeType===1?S.textContent="":S.nodeType===9&&S.documentElement&&S.removeChild(S.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(k(163))}}catch(E){ht(t,t.return,E)}if(n=t.sibling,n!==null){n.return=t.return,j=n;break}j=t.return}return h=zR,zR=!1,h}function Fu(n,t,e){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var o=r=r.next;do{if((o.tag&n)===n){var i=o.destroy;o.destroy=void 0,i!==void 0&&Sy(t,e,i)}o=o.next}while(o!==r)}}function op(n,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var e=t=t.next;do{if((e.tag&n)===n){var r=e.create;e.destroy=r()}e=e.next}while(e!==t)}}function _y(n){var t=n.ref;if(t!==null){var e=n.stateNode;switch(n.tag){case 5:n=e;break;default:n=e}typeof t=="function"?t(n):t.current=n}}function Nx(n){var t=n.alternate;t!==null&&(n.alternate=null,Nx(t)),n.child=null,n.deletions=null,n.sibling=null,n.tag===5&&(t=n.stateNode,t!==null&&(delete t[Vo],delete t[qu],delete t[ly],delete t[YG],delete t[XG])),n.stateNode=null,n.return=null,n.dependencies=null,n.memoizedProps=null,n.memoizedState=null,n.pendingProps=null,n.stateNode=null,n.updateQueue=null}function Gx(n){return n.tag===5||n.tag===3||n.tag===4}function qR(n){e:for(;;){for(;n.sibling===null;){if(n.return===null||Gx(n.return))return null;n=n.return}for(n.sibling.return=n.return,n=n.sibling;n.tag!==5&&n.tag!==6&&n.tag!==18;){if(n.flags&2||n.child===null||n.tag===4)continue e;n.child.return=n,n=n.child}if(!(n.flags&2))return n.stateNode}}function Ey(n,t,e){var r=n.tag;if(r===5||r===6)n=n.stateNode,t?e.nodeType===8?e.parentNode.insertBefore(n,t):e.insertBefore(n,t):(e.nodeType===8?(t=e.parentNode,t.insertBefore(n,e)):(t=e,t.appendChild(n)),e=e._reactRootContainer,e!=null||t.onclick!==null||(t.onclick=bf));else if(r!==4&&(n=n.child,n!==null))for(Ey(n,t,e),n=n.sibling;n!==null;)Ey(n,t,e),n=n.sibling}function Ry(n,t,e){var r=n.tag;if(r===5||r===6)n=n.stateNode,t?e.insertBefore(n,t):e.appendChild(n);else if(r!==4&&(n=n.child,n!==null))for(Ry(n,t,e),n=n.sibling;n!==null;)Ry(n,t,e),n=n.sibling}var qt=null,ao=!1;function Wi(n,t,e){for(e=e.child;e!==null;)kx(n,t,e),e=e.sibling}function kx(n,t,e){if(Bo&&typeof Bo.onCommitFiberUnmount=="function")try{Bo.onCommitFiberUnmount(Xf,e)}catch{}switch(e.tag){case 5:fr||sl(e,t);case 6:var r=qt,o=ao;qt=null,Wi(n,t,e),qt=r,ao=o,qt!==null&&(ao?(n=qt,e=e.stateNode,n.nodeType===8?n.parentNode.removeChild(e):n.removeChild(e)):qt.removeChild(e.stateNode));break;case 18:qt!==null&&(ao?(n=qt,e=e.stateNode,n.nodeType===8?Pm(n.parentNode,e):n.nodeType===1&&Pm(n,e),Bu(n)):Pm(qt,e.stateNode));break;case 4:r=qt,o=ao,qt=e.stateNode.containerInfo,ao=!0,Wi(n,t,e),qt=r,ao=o;break;case 0:case 11:case 14:case 15:if(!fr&&(r=e.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){o=r=r.next;do{var i=o,a=i.destroy;i=i.tag,a!==void 0&&(i&2||i&4)&&Sy(e,t,a),o=o.next}while(o!==r)}Wi(n,t,e);break;case 1:if(!fr&&(sl(e,t),r=e.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=e.memoizedProps,r.state=e.memoizedState,r.componentWillUnmount()}catch(s){ht(e,t,s)}Wi(n,t,e);break;case 21:Wi(n,t,e);break;case 22:e.mode&1?(fr=(r=fr)||e.memoizedState!==null,Wi(n,t,e),fr=r):Wi(n,t,e);break;default:Wi(n,t,e)}}function $R(n){var t=n.updateQueue;if(t!==null){n.updateQueue=null;var e=n.stateNode;e===null&&(e=n.stateNode=new fk),t.forEach(function(r){var o=_k.bind(null,n,r);e.has(r)||(e.add(r),r.then(o,o))})}}function oo(n,t){var e=t.deletions;if(e!==null)for(var r=0;ro&&(o=a),r&=~i}if(r=o,r=St()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*gk(r/1960))-r,10n?16:n,Ki===null)var r=!1;else{if(n=Ki,Ki=null,$f=0,Pe&6)throw Error(k(331));var o=Pe;for(Pe|=4,j=n.current;j!==null;){var i=j,a=i.child;if(j.flags&16){var s=i.deletions;if(s!==null){for(var l=0;lSt()-cC?ts(n,0):uC|=e),jr(n,t)}function qx(n,t){t===0&&(n.mode&1?(t=ef,ef<<=1,!(ef&130023424)&&(ef=4194304)):t=1);var e=Rr();n=Ci(n,t),n!==null&&(Zu(n,t,e),jr(n,e))}function Sk(n){var t=n.memoizedState,e=0;t!==null&&(e=t.retryLane),qx(n,e)}function _k(n,t){var e=0;switch(n.tag){case 13:var r=n.stateNode,o=n.memoizedState;o!==null&&(e=o.retryLane);break;case 19:r=n.stateNode;break;default:throw Error(k(314))}r!==null&&r.delete(t),qx(n,e)}var $x;$x=function(n,t,e){if(n!==null)if(n.memoizedProps!==t.pendingProps||Wr.current)Br=!0;else{if(!(n.lanes&e)&&!(t.flags&128))return Br=!1,uk(n,t,e);Br=!!(n.flags&131072)}else Br=!1,it&&t.flags&1048576&&QT(t,kf,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;_f(n,t),n=t.pendingProps;var o=vl(t,pr.current);pl(t,e),o=nC(null,t,r,n,o,e);var i=oC();return t.flags|=1,typeof o=="object"&&o!==null&&typeof o.render=="function"&&o.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Ur(r)?(i=!0,Nf(t)):i=!1,t.memoizedState=o.state!==null&&o.state!==void 0?o.state:null,Jy(t),o.updater=np,t.stateNode=o,o._reactInternals=t,hy(t,r,n,e),t=my(null,t,r,!0,i,e)):(t.tag=0,it&&i&&zy(t),Er(null,t,o,e),t=t.child),t;case 16:r=t.elementType;e:{switch(_f(n,t),n=t.pendingProps,o=r._init,r=o(r._payload),t.type=r,o=t.tag=Rk(r),n=io(r,n),o){case 0:t=vy(null,t,r,n,e);break e;case 1:t=WR(null,t,r,n,e);break e;case 11:t=VR(null,t,r,n,e);break e;case 14:t=BR(null,t,r,io(r.type,n),e);break e}throw Error(k(306,r,""))}return t;case 0:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:io(r,o),vy(n,t,r,o,e);case 1:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:io(r,o),WR(n,t,r,o,e);case 3:e:{if(Ix(t),n===null)throw Error(k(387));r=t.pendingProps,i=t.memoizedState,o=i.element,nx(n,t),Bf(t,r,null,e);var a=t.memoizedState;if(r=a.element,i.isDehydrated)if(i={element:r,isDehydrated:!1,cache:a.cache,pendingSuspenseBoundaries:a.pendingSuspenseBoundaries,transitions:a.transitions},t.updateQueue.baseState=i,t.memoizedState=i,t.flags&256){o=wl(Error(k(423)),t),t=UR(n,t,r,e,o);break e}else if(r!==o){o=wl(Error(k(424)),t),t=UR(n,t,r,e,o);break e}else for(sn=Ji(t.stateNode.containerInfo.firstChild),ln=t,it=!0,so=null,e=tx(t,null,r,e),t.child=e;e;)e.flags=e.flags&-3|4096,e=e.sibling;else{if(ml(),r===o){t=wi(n,t,e);break e}Er(n,t,r,e)}t=t.child}return t;case 5:return ox(t),n===null&&dy(t),r=t.type,o=t.pendingProps,i=n!==null?n.memoizedProps:null,a=o.children,ay(r,o)?a=null:i!==null&&ay(r,i)&&(t.flags|=32),Lx(n,t),Er(n,t,a,e),t.child;case 6:return n===null&&dy(t),null;case 13:return Dx(n,t,e);case 4:return Zy(t,t.stateNode.containerInfo),r=t.pendingProps,n===null?t.child=yl(t,null,r,e):Er(n,t,r,e),t.child;case 11:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:io(r,o),VR(n,t,r,o,e);case 7:return Er(n,t,t.pendingProps,e),t.child;case 8:return Er(n,t,t.pendingProps.children,e),t.child;case 12:return Er(n,t,t.pendingProps.children,e),t.child;case 10:e:{if(r=t.type._context,o=t.pendingProps,i=t.memoizedProps,a=o.value,qe(Hf,r._currentValue),r._currentValue=a,i!==null)if(co(i.value,a)){if(i.children===o.children&&!Wr.current){t=wi(n,t,e);break e}}else for(i=t.child,i!==null&&(i.return=t);i!==null;){var s=i.dependencies;if(s!==null){a=i.child;for(var l=s.firstContext;l!==null;){if(l.context===r){if(i.tag===1){l=vi(-1,e&-e),l.tag=2;var u=i.updateQueue;if(u!==null){u=u.shared;var c=u.pending;c===null?l.next=l:(l.next=c.next,c.next=l),u.pending=l}}i.lanes|=e,l=i.alternate,l!==null&&(l.lanes|=e),fy(i.return,e,t),s.lanes|=e;break}l=l.next}}else if(i.tag===10)a=i.type===t.type?null:i.child;else if(i.tag===18){if(a=i.return,a===null)throw Error(k(341));a.lanes|=e,s=a.alternate,s!==null&&(s.lanes|=e),fy(a,e,t),a=i.sibling}else a=i.child;if(a!==null)a.return=i;else for(a=i;a!==null;){if(a===t){a=null;break}if(i=a.sibling,i!==null){i.return=a.return,a=i;break}a=a.return}i=a}Er(n,t,o.children,e),t=t.child}return t;case 9:return o=t.type,r=t.pendingProps.children,pl(t,e),o=Gn(o),r=r(o),t.flags|=1,Er(n,t,r,e),t.child;case 14:return r=t.type,o=io(r,t.pendingProps),o=io(r.type,o),BR(n,t,r,o,e);case 15:return Px(n,t,t.type,t.pendingProps,e);case 17:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:io(r,o),_f(n,t),t.tag=1,Ur(r)?(n=!0,Nf(t)):n=!1,pl(t,e),Rx(t,r,o),hy(t,r,o,e),my(null,t,r,!0,n,e);case 19:return Ax(n,t,e);case 22:return Ox(n,t,e)}throw Error(k(156,t.tag))};function Kx(n,t){return ST(n,t)}function Ek(n,t,e,r){this.tag=n,this.key=e,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Mn(n,t,e,r){return new Ek(n,t,e,r)}function hC(n){return n=n.prototype,!(!n||!n.isReactComponent)}function Rk(n){if(typeof n=="function")return hC(n)?1:0;if(n!=null){if(n=n.$$typeof,n===Fy)return 11;if(n===by)return 14}return 2}function ra(n,t){var e=n.alternate;return e===null?(e=Mn(n.tag,t,n.key,n.mode),e.elementType=n.elementType,e.type=n.type,e.stateNode=n.stateNode,e.alternate=n,n.alternate=e):(e.pendingProps=t,e.type=n.type,e.flags=0,e.subtreeFlags=0,e.deletions=null),e.flags=n.flags&14680064,e.childLanes=n.childLanes,e.lanes=n.lanes,e.child=n.child,e.memoizedProps=n.memoizedProps,e.memoizedState=n.memoizedState,e.updateQueue=n.updateQueue,t=n.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},e.sibling=n.sibling,e.index=n.index,e.ref=n.ref,e}function Tf(n,t,e,r,o,i){var a=2;if(r=n,typeof n=="function")hC(n)&&(a=1);else if(typeof n=="string")a=5;else e:switch(n){case Js:return rs(e.children,o,i,t);case Ay:a=8,o|=8;break;case km:return n=Mn(12,e,t,o|2),n.elementType=km,n.lanes=i,n;case Hm:return n=Mn(13,e,t,o),n.elementType=Hm,n.lanes=i,n;case Vm:return n=Mn(19,e,t,o),n.elementType=Vm,n.lanes=i,n;case oT:return ap(e,o,i,t);default:if(typeof n=="object"&&n!==null)switch(n.$$typeof){case rT:a=10;break e;case nT:a=9;break e;case Fy:a=11;break e;case by:a=14;break e;case Ui:a=16,r=null;break e}throw Error(k(130,n==null?n:typeof n,""))}return t=Mn(a,e,t,o),t.elementType=n,t.type=r,t.lanes=i,t}function rs(n,t,e,r){return n=Mn(7,n,r,t),n.lanes=e,n}function ap(n,t,e,r){return n=Mn(22,n,r,t),n.elementType=oT,n.lanes=e,n.stateNode={isHidden:!1},n}function Mm(n,t,e){return n=Mn(6,n,null,t),n.lanes=e,n}function Nm(n,t,e){return t=Mn(4,n.children!==null?n.children:[],n.key,t),t.lanes=e,t.stateNode={containerInfo:n.containerInfo,pendingChildren:null,implementation:n.implementation},t}function Tk(n,t,e,r,o){this.tag=t,this.containerInfo=n,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Cm(0),this.expirationTimes=Cm(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Cm(0),this.identifierPrefix=r,this.onRecoverableError=o,this.mutableSourceEagerHydrationData=null}function gC(n,t,e,r,o,i,a,s,l){return n=new Tk(n,t,e,s,l),t===1?(t=1,i===!0&&(t|=8)):t=0,i=Mn(3,null,null,t),n.current=i,i.stateNode=n,i.memoizedState={element:r,isDehydrated:e,cache:null,transitions:null,pendingSuspenseBoundaries:null},Jy(i),n}function xk(n,t,e){var r=3{"use strict";function Zx(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(Zx)}catch(n){console.error(n)}}Zx(),eP.exports=Jx()});var wC=z(CC=>{"use strict";var tP=Rl();CC.createRoot=tP.createRoot,CC.hydrateRoot=tP.hydrateRoot;var v8});var Dk,rP,nP=de(()=>{Dk={common:{settings:"Settings",overview:{title:"Toolkit Management",description:"Welcome to the toolkit, check out the wiki documentation to learn more about its features",version_hint:"Continue clicking..."},general:{title:"General Settings",menu:{useSubMenu:"Use Submenu"}},toolkit:{title:"Tool Settings",description:"If errors occur after enabling/disabling tools, try restarting Obsidian to resolve them"},developer:{title:"Developer Settings",description:"Developer mode will be turned off when leaving the page, and needs to be re-enabled",logger:{level:"Log Level",showTimestamp:"Show Timestamp in Logs",showLevel:"Show Level in Logs",console:"Output Logs to Console",showNotifications:"Show Notifications",noticeTimeout:"Notification Timeout (ms)"}},back:"Back",toggle_toolkit:"Enable/Disable Toolkit",confirm:"Confirm",cancel:"Cancel"},notice:{update_success:"Plugin updated to version {{latestVersion}}, please restart Obsidian",downloading_file:"Downloading file: {{fileName}}",installing_update:"Installing update...",no_update_needed:"No updates available",checking_update:"Checking for updates...",update_completed:"Update completed",update_error:"Update failed"},toolkit:{tableEnhancements:{title:"Table Enhancements",description:"Better utilize markdown tables",editor_menu:{table_enhancements:"Table Enhancement Editor"},file_menu:{table_enhancements:"Table Enhancement Editor"},command:{table_enhancements:"Table Enhancement Editor"},formula:{output_type:"Output Type",output_value:"Output Value",add_calculation:"Add Formula Calculation",execute_all:"Execute All Formulas in Current Table",cancel:"Cancel",update:"Update",add:"Add",hide_calculator:"Hide Formula Editor",show_calculator:"Show Formula Editor",edit_calculation:"Edit Formula",remove_calculation:"Delete Formula",execute_calculation:"Execute Formula",edit_table:"Edit Table",save_changes:"Save Changes",no_table_data:"No table data"},formula_editor:{math:{COUNT:"Count items in selected column",count_modifier:"Count type",SUM:"Calculate sum of values in selected column",AVERAGE:"Calculate average of values in selected column",MIN:"Find minimum value in selected column",MAX:"Find maximum value in selected column",MEDIAN:"Calculate median of values in selected column",MODE:"Calculate mode of values in selected column",STDDEV:"Calculate standard deviation of values in selected column",VARIANCE:"Calculate variance of values in selected column"},time:{TIME_EARLIEST:"Find earliest date in selected column",TIME_LATEST:"Find latest date in selected column",TIME_SPAN:"Calculate date span in selected column",time_format:"Date format",time_unit:"Time unit"},table_columns:"Table Columns",input_placeholder:"Select a function or start typing...",function_name:"Formula Function",hint_syntax:"Syntax",hint_example:"Example",hint_parameters:"Parameters",parameter_optional:"Optional",parameter_options:"Options",insert_option:"Insert"}},quickPath:{title:"Quick Path",description:"Quickly get the path of specified files/folders",editor_menu:{paste_filePath:"Paste File Path",paste_folderPath:"Paste Folder Path"},file_menu:{copy_filePath:"Copy File Path",copy_folderPath:"Copy Folder Path",copy_filesPath:"Copy File Paths (Multiple Files)"},command:{copy_filePath:"Copy File Path",copy_folderPath:"Copy Folder Path"},status:{copy_success:"Path copied to clipboard",copy_failed:"Copy failed",no_parent_path:"Root directory files have no parent directory"},settings:{addEditorMenu:{title:"Add Editor Menu",description:"Add option to paste current file path in editor menu"},addFileMenu:{title:"Add File List Menu",description:"Add option to copy file/folder path in file list menu"},absolutePath:{title:"Absolute Path",description:"Use absolute path, starting from operating system root directory"},separator:{title:"Separator",description:"Separator for multiple paths",newline:"Newline",comma:"Comma",semicolon:"Semicolon",space:"Space"}}},folderTemplates:{title:"Folder Templates",description:"Automatically apply templates when creating new files in specified folders",settings:{templatesFolderPath:{title:"Templates Folder Path",description:"Path to the folder where template files are stored, defaults to the official template location",placeholder:"Please enable core Templates plugin",enablePlugin:"Please enable core Templates plugin"},ignoredFolders:{title:"Ignored Folders",description:"Files created in these folders will not automatically apply templates. Supports subdirectories.",placeholder:"Add folders to ignore template application"},templateManagement:{title:"Template Configuration",addTemplate:"Add Template",editTemplate:"Edit Template",deleteTemplate:"Delete",saveTemplate:"Save",cancel:"Cancel",emptyState:'No templates configured yet. Click "Add Template" to get started.',enablePluginFirst:"Please enable core Templates plugin first"},templateForm:{title:"Template Configuration",targetFolder:"Target Folder",templateFile:"Template File",fileNameRule:"File Name Rule",fileNameRulePlaceholder:"e.g.: {{date}}-{{title}}",addNewTemplate:"Add New Template",editTemplateConfig:"Edit Template Configuration",noTemplateSelected:"No template selected",optional:"(Optional)",targetFolderPlaceholder:"Select or enter folder path",templateFilePlaceholder:"Select template file"},actions:{edit:"Edit",delete:"Delete",save:"Save",cancel:"Cancel"},emptyState:{title:"No templates configured",description:'Click the "Add Template" button above to get started'}}}}},rP=Dk});var Ak,oP,iP=de(()=>{Ak={common:{settings:"\u8BBE\u7F6E",overview:{title:"\u5DE5\u5177\u5305\u7BA1\u7406",description:"\u8FD9\u662F\u4E00\u4E2A\u529F\u80FD\u4E30\u5BCC\u7684\u5DE5\u5177\u5305\uFF0C\u67E5\u770Bwiki\u6587\u6863\u4E86\u89E3\u66F4\u591A\u529F\u80FD",version_hint:"\u7EE7\u7EED\u70B9\u51FB..."},general:{title:"\u5E38\u89C4\u8BBE\u7F6E",menu:{useSubMenu:"\u4F7F\u7528\u5B50\u83DC\u5355"}},toolkit:{title:"\u5DE5\u5177\u8BBE\u7F6E",description:"\u5DE5\u5177\u542F\u7528/\u7981\u6B62\u540E\u53D1\u751F\u62A5\u9519\uFF0C\u53EF\u4EE5\u5C1D\u8BD5\u91CD\u542Fobsidian\u89E3\u51B3"},developer:{title:"\u5F00\u53D1\u8005\u8BBE\u7F6E",description:"\u79BB\u5F00\u9875\u9762\uFF0C\u5C06\u5173\u95ED\u5F00\u53D1\u8005\u6A21\u5F0F\uFF0C\u9700\u8981\u91CD\u65B0\u542F\u7528",logger:{level:"\u65E5\u5FD7\u7EA7\u522B",showTimestamp:"\u65E5\u5FD7\u663E\u793A\u65F6\u95F4\u6233",showLevel:"\u65E5\u5FD7\u663E\u793A\u7EA7\u522B",console:"\u65E5\u5FD7\u8F93\u51FA\u5230\u63A7\u5236\u53F0",showNotifications:"\u663E\u793A\u901A\u77E5",noticeTimeout:"\u901A\u77E5\u6D88\u5931\u65F6\u95F4(ms)"}},back:"\u8FD4\u56DE",toggle_toolkit:"\u542F\u7528/\u7981\u7528\u5DE5\u5177\u5305",confirm:"\u786E\u8BA4",cancel:"\u53D6\u6D88"},notice:{update_success:"\u63D2\u4EF6\u66F4\u65B0\u5230 {{latestVersion}} \u7248\u672C\uFF0C\u8BF7\u91CD\u542F Obsidian",downloading_file:"\u6B63\u5728\u4E0B\u8F7D\u6587\u4EF6: {{fileName}}",installing_update:"\u6B63\u5728\u5B89\u88C5\u66F4\u65B0...",no_update_needed:"\u65E0\u53EF\u7528\u66F4\u65B0",checking_update:"\u6B63\u5728\u68C0\u67E5\u66F4\u65B0...",update_completed:"\u66F4\u65B0\u5B8C\u6210",update_error:"\u66F4\u65B0\u5931\u8D25"},toolkit:{tableEnhancements:{title:"\u8868\u683C\u589E\u5F3A",description:"\u66F4\u597D\u7684\u5229\u7528markdown\u8868\u683C",editor_menu:{table_enhancements:"\u8868\u683C\u589E\u5F3A\u7F16\u8F91"},file_menu:{table_enhancements:"\u8868\u683C\u589E\u5F3A\u7F16\u8F91"},command:{table_enhancements:"\u8868\u683C\u589E\u5F3A\u7F16\u8F91"},formula:{output_type:"\u8F93\u51FA\u7C7B\u578B",output_value:"\u8F93\u51FA\u503C",add_calculation:"\u6DFB\u52A0\u516C\u5F0F\u8BA1\u7B97",execute_all:"\u6267\u884C\u5F53\u524D\u8868\u683C\u6240\u6709\u516C\u5F0F",cancel:"\u53D6\u6D88",update:"\u66F4\u65B0",add:"\u6DFB\u52A0",hide_calculator:"\u9690\u85CF\u516C\u5F0F\u7F16\u8F91",show_calculator:"\u663E\u793A\u516C\u5F0F\u7F16\u8F91",edit_calculation:"\u7F16\u8F91\u516C\u5F0F",remove_calculation:"\u5220\u9664\u516C\u5F0F",execute_calculation:"\u6267\u884C\u516C\u5F0F",edit_table:"\u7F16\u8F91\u8868\u683C",save_changes:"\u4FDD\u5B58\u66F4\u6539",no_table_data:"\u6CA1\u6709\u8868\u683C\u6570\u636E"},formula_editor:{math:{COUNT:"\u8BA1\u7B97\u9009\u5B9A\u5217\u6570\u91CF",count_modifier:"\u8BA1\u6570\u7C7B\u578B",SUM:"\u8BA1\u7B97\u9009\u5B9A\u5217\u6570\u503C\u603B\u548C",AVERAGE:"\u8BA1\u7B97\u9009\u5B9A\u5217\u6570\u503C\u5E73\u5747\u503C",MIN:"\u8BA1\u7B97\u9009\u5B9A\u5217\u6570\u503C\u6700\u5C0F\u503C",MAX:"\u8BA1\u7B97\u9009\u5B9A\u5217\u6570\u503C\u6700\u5927\u503C",MEDIAN:"\u8BA1\u7B97\u9009\u5B9A\u5217\u6570\u503C\u4E2D\u4F4D\u6570",MODE:"\u8BA1\u7B97\u9009\u5B9A\u5217\u6570\u503C\u4F17\u6570",STDDEV:"\u8BA1\u7B97\u9009\u5B9A\u5217\u6570\u503C\u6807\u51C6\u5DEE",VARIANCE:"\u8BA1\u7B97\u9009\u5B9A\u5217\u6570\u503C\u65B9\u5DEE"},time:{TIME_EARLIEST:"\u8BA1\u7B97\u9009\u5B9A\u5217\u6700\u65E9\u65E5\u671F",TIME_LATEST:"\u8BA1\u7B97\u9009\u5B9A\u5217\u6700\u665A\u65E5\u671F",TIME_SPAN:"\u8BA1\u7B97\u9009\u5B9A\u5217\u65E5\u671F\u8DE8\u5EA6",time_format:"\u65E5\u671F\u683C\u5F0F",time_unit:"\u65F6\u95F4\u5355\u4F4D"},table_columns:"\u8868\u683C\u5217",input_placeholder:"\u9009\u62E9\u4E00\u4E2A\u51FD\u6570\u6216\u5F00\u59CB\u8F93\u5165...",function_name:"\u516C\u5F0F\u51FD\u6570",hint_syntax:"\u8BED\u6CD5",hint_example:"\u793A\u4F8B",hint_parameters:"\u53C2\u6570",parameter_optional:"\u53EF\u9009",parameter_options:"\u9009\u9879",insert_option:"\u63D2\u5165"}},quickPath:{title:"\u5FEB\u901F\u8DEF\u5F84",description:"\u5FEB\u901F\u83B7\u53D6\u6307\u5B9A\u6587\u4EF6/\u6587\u4EF6\u5939\u7684\u8DEF\u5F84",editor_menu:{paste_filePath:"\u7C98\u8D34\u6587\u4EF6\u8DEF\u5F84",paste_folderPath:"\u7C98\u8D34\u6587\u4EF6\u5939\u8DEF\u5F84"},file_menu:{copy_filePath:"\u590D\u5236\u6587\u4EF6\u8DEF\u5F84",copy_folderPath:"\u590D\u5236\u6587\u4EF6\u5939\u8DEF\u5F84",copy_filesPath:"\u590D\u5236\u6587\u4EF6\u8DEF\u5F84(\u591A\u6587\u4EF6)"},command:{copy_filePath:"\u590D\u5236\u6587\u4EF6\u8DEF\u5F84",copy_folderPath:"\u590D\u5236\u6587\u4EF6\u5939\u8DEF\u5F84"},status:{copy_success:"\u8DEF\u5F84\u5DF2\u590D\u5236\u5230\u526A\u8D34\u677F",copy_failed:"\u590D\u5236\u5931\u8D25",no_parent_path:"\u6839\u76EE\u5F55\u6587\u4EF6\u6CA1\u6709\u7236\u76EE\u5F55"},settings:{addEditorMenu:{title:"\u6DFB\u52A0\u7F16\u8F91\u5668\u83DC\u5355",description:"\u5728\u7F16\u8F91\u5668\u83DC\u5355\u4E2D\u6DFB\u52A0\u7C98\u8D34\u5F53\u524D\u6587\u4EF6\u8DEF\u5F84\u7684\u9009\u9879"},addFileMenu:{title:"\u6DFB\u52A0\u6587\u4EF6\u5217\u8868\u83DC\u5355",description:"\u5728\u6587\u4EF6\u5217\u8868\u83DC\u5355\u4E2D\u6DFB\u52A0\u590D\u5236\u6587\u4EF6/\u6587\u4EF6\u5939\u8DEF\u5F84\u7684\u9009\u9879"},absolutePath:{title:"\u7EDD\u5BF9\u8DEF\u5F84",description:"\u4F7F\u7528\u7EDD\u5BF9\u8DEF\u5F84\uFF0C\u5373\u4ECE\u64CD\u4F5C\u7CFB\u7EDF\u6839\u76EE\u5F55\u5F00\u59CB\u7684\u8DEF\u5F84"},separator:{title:"\u5206\u9694\u7B26",description:"\u591A\u4E2A\u8DEF\u5F84\u7684\u5206\u9694\u7B26",newline:"\u6362\u884C",comma:"\u9017\u53F7",semicolon:"\u5206\u53F7",space:"\u7A7A\u683C"}}},folderTemplates:{title:"\u6587\u4EF6\u5939\u6A21\u677F",description:"\u5728\u6307\u5B9A\u6587\u4EF6\u5939\u4E0B\u521B\u5EFA\u65B0\u6587\u4EF6\u65F6\uFF0C\u65E0\u611F\u77E5\u5E94\u7528\u6A21\u677F",settings:{templatesFolderPath:{title:"\u6A21\u677F\u6587\u4EF6\u5939\u8DEF\u5F84",description:"\u5B58\u653E\u6A21\u677F\u6587\u4EF6\u7684\u6587\u4EF6\u5939\u8DEF\u5F84, \u9ED8\u8BA4\u4E0E\u5B98\u65B9\u6A21\u677F\u4F4D\u7F6E\u76F8\u540C",placeholder:"\u8BF7\u542F\u7528\u6838\u5FC3\u6A21\u677F\u63D2\u4EF6",enablePlugin:"\u8BF7\u542F\u7528\u6838\u5FC3\u6A21\u677F\u63D2\u4EF6"},ignoredFolders:{title:"\u5FFD\u7565\u6587\u4EF6\u5939",description:"\u5728\u8FD9\u4E9B\u6587\u4EF6\u5939\u4E2D\u521B\u5EFA\u6587\u4EF6\u65F6\u4E0D\u4F1A\u81EA\u52A8\u5E94\u7528\u6A21\u677F\uFF0C\u652F\u6301\u5B50\u6587\u4EF6\u5939",placeholder:"\u6DFB\u52A0\u8981\u5FFD\u7565\u6A21\u677F\u5E94\u7528\u7684\u6587\u4EF6\u5939"},templateManagement:{title:"\u6A21\u677F\u914D\u7F6E",addTemplate:"\u6DFB\u52A0\u6A21\u677F",editTemplate:"\u7F16\u8F91\u6A21\u677F",deleteTemplate:"\u5220\u9664",saveTemplate:"\u4FDD\u5B58",cancel:"\u53D6\u6D88",emptyState:'\u8FD8\u6CA1\u6709\u914D\u7F6E\u4EFB\u4F55\u6A21\u677F\u3002\u70B9\u51FB"\u6DFB\u52A0\u6A21\u677F"\u5F00\u59CB\u914D\u7F6E\u3002',enablePluginFirst:"\u8BF7\u5148\u542F\u7528\u6838\u5FC3\u6A21\u677F\u63D2\u4EF6"},templateForm:{title:"\u6A21\u677F\u914D\u7F6E",targetFolder:"\u76EE\u6807\u6587\u4EF6\u5939",templateFile:"\u6A21\u677F\u6587\u4EF6",fileNameRule:"\u6587\u4EF6\u540D\u89C4\u5219",fileNameRulePlaceholder:"\u4F8B\u5982: {{date}}-{{title}}",addNewTemplate:"\u6DFB\u52A0\u65B0\u6A21\u677F",editTemplateConfig:"\u7F16\u8F91\u6A21\u677F\u914D\u7F6E",noTemplateSelected:"\u672A\u9009\u62E9\u6A21\u677F",optional:"\uFF08\u53EF\u9009\uFF09",targetFolderPlaceholder:"\u9009\u62E9\u6216\u8F93\u5165\u6587\u4EF6\u5939\u8DEF\u5F84",templateFilePlaceholder:"\u9009\u62E9\u6A21\u677F\u6587\u4EF6"},actions:{edit:"\u7F16\u8F91",delete:"\u5220\u9664",save:"\u4FDD\u5B58",cancel:"\u53D6\u6D88"},emptyState:{title:"\u6682\u65E0\u6A21\u677F\u914D\u7F6E",description:"\u70B9\u51FB\u4E0A\u65B9\u300C\u6DFB\u52A0\u6A21\u677F\u300D\u6309\u94AE\u5F00\u59CB\u914D\u7F6E"}}}}},oP=Ak});var Fk,aP,sP=de(()=>{Fk={common:{settings:"\u8A2D\u7F6E",overview:{title:"\u5DE5\u5177\u5305\u7BA1\u7406",description:"\u9019\u662F\u4E00\u500B\u529F\u80FD\u8C50\u5BCC\u7684\u5DE5\u5177\u5305\uFF0C\u67E5\u770Bwiki\u6587\u6A94\u4E86\u89E3\u66F4\u591A\u529F\u80FD",version_hint:"\u7E7C\u7E8C\u9EDE\u64CA..."},general:{title:"\u5E38\u898F\u8A2D\u7F6E",menu:{useSubMenu:"\u4F7F\u7528\u5B50\u9078\u55AE"}},toolkit:{title:"\u5DE5\u5177\u8A2D\u7F6E",description:"\u5DE5\u5177\u555F\u7528/\u7981\u6B62\u5F8C\u767C\u751F\u5831\u932F\uFF0C\u53EF\u4EE5\u5617\u8A66\u91CD\u555Fobsidian\u89E3\u6C7A"},developer:{title:"\u958B\u767C\u8005\u8A2D\u7F6E",description:"\u96E2\u958B\u9801\u9762\uFF0C\u5C07\u95DC\u9589\u958B\u767C\u8005\u6A21\u5F0F\uFF0C\u9700\u8981\u91CD\u65B0\u555F\u7528",logger:{level:"\u65E5\u8A8C\u7D1A\u5225",showTimestamp:"\u65E5\u8A8C\u986F\u793A\u6642\u9593\u6233",showLevel:"\u65E5\u8A8C\u986F\u793A\u7D1A\u5225",console:"\u65E5\u8A8C\u8F38\u51FA\u5230\u63A7\u5236\u53F0",showNotifications:"\u986F\u793A\u901A\u77E5",noticeTimeout:"\u901A\u77E5\u6D88\u5931\u6642\u9593(ms)"}},back:"\u8FD4\u56DE",toggle_toolkit:"\u555F\u7528/\u7981\u7528\u5DE5\u5177\u5305",confirm:"\u78BA\u8A8D",cancel:"\u53D6\u6D88"},notice:{update_success:"\u63D2\u4EF6\u66F4\u65B0\u5230 {{latestVersion}} \u7248\u672C\uFF0C\u8ACB\u91CD\u555F Obsidian",downloading_file:"\u6B63\u5728\u4E0B\u8F09\u6587\u4EF6: {{fileName}}",installing_update:"\u6B63\u5728\u5B89\u88DD\u66F4\u65B0...",no_update_needed:"\u7121\u53EF\u7528\u66F4\u65B0",checking_update:"\u6B63\u5728\u6AA2\u67E5\u66F4\u65B0...",update_completed:"\u66F4\u65B0\u5B8C\u6210",update_error:"\u66F4\u65B0\u5931\u6557"},toolkit:{tableEnhancements:{title:"\u8868\u683C\u589E\u5F37",description:"\u66F4\u597D\u7684\u5229\u7528markdown\u8868\u683C",editor_menu:{table_enhancements:"\u8868\u683C\u589E\u5F37\u7DE8\u8F2F"},file_menu:{table_enhancements:"\u8868\u683C\u589E\u5F37\u7DE8\u8F2F"},command:{table_enhancements:"\u8868\u683C\u589E\u5F37\u7DE8\u8F2F"},formula:{output_type:"\u8F38\u51FA\u985E\u578B",output_value:"\u8F38\u51FA\u503C",add_calculation:"\u6DFB\u52A0\u516C\u5F0F\u8A08\u7B97",execute_all:"\u57F7\u884C\u7576\u524D\u8868\u683C\u6240\u6709\u516C\u5F0F",cancel:"\u53D6\u6D88",update:"\u66F4\u65B0",add:"\u6DFB\u52A0",hide_calculator:"\u96B1\u85CF\u516C\u5F0F\u7DE8\u8F2F",show_calculator:"\u986F\u793A\u516C\u5F0F\u7DE8\u8F2F",edit_calculation:"\u7DE8\u8F2F\u516C\u5F0F",remove_calculation:"\u522A\u9664\u516C\u5F0F",execute_calculation:"\u57F7\u884C\u516C\u5F0F",edit_table:"\u7DE8\u8F2F\u8868\u683C",save_changes:"\u4FDD\u5B58\u66F4\u6539",no_table_data:"\u6C92\u6709\u8868\u683C\u6578\u64DA"},formula_editor:{math:{COUNT:"\u8A08\u7B97\u9078\u5B9A\u5217\u6578\u91CF",count_modifier:"\u8A08\u6578\u985E\u578B",SUM:"\u8A08\u7B97\u9078\u5B9A\u5217\u6578\u503C\u7E3D\u548C",AVERAGE:"\u8A08\u7B97\u9078\u5B9A\u5217\u6578\u503C\u5E73\u5747\u503C",MIN:"\u8A08\u7B97\u9078\u5B9A\u5217\u6578\u503C\u6700\u5C0F\u503C",MAX:"\u8A08\u7B97\u9078\u5B9A\u5217\u6578\u503C\u6700\u5927\u503C",MEDIAN:"\u8A08\u7B97\u9078\u5B9A\u5217\u6578\u503C\u4E2D\u4F4D\u6578",MODE:"\u8A08\u7B97\u9078\u5B9A\u5217\u6578\u503C\u773E\u6578",STDDEV:"\u8A08\u7B97\u9078\u5B9A\u5217\u6578\u503C\u6A19\u6E96\u5DEE",VARIANCE:"\u8A08\u7B97\u9078\u5B9A\u5217\u6578\u503C\u65B9\u5DEE"},time:{TIME_EARLIEST:"\u8A08\u7B97\u9078\u5B9A\u5217\u6700\u65E9\u65E5\u671F",TIME_LATEST:"\u8A08\u7B97\u9078\u5B9A\u5217\u6700\u665A\u65E5\u671F",TIME_SPAN:"\u8A08\u7B97\u9078\u5B9A\u5217\u65E5\u671F\u8DE8\u5EA6",time_format:"\u65E5\u671F\u683C\u5F0F",time_unit:"\u6642\u9593\u55AE\u4F4D"},table_columns:"\u8868\u683C\u5217",input_placeholder:"\u9078\u64C7\u4E00\u500B\u51FD\u6578\u6216\u958B\u59CB\u8F38\u5165...",function_name:"\u516C\u5F0F\u51FD\u6578",hint_syntax:"\u8A9E\u6CD5",hint_example:"\u793A\u4F8B",hint_parameters:"\u53C3\u6578",parameter_optional:"\u53EF\u9078",parameter_options:"\u9078\u9805",insert_option:"\u63D2\u5165"}},quickPath:{title:"\u5FEB\u901F\u8DEF\u5F91",description:"\u5FEB\u901F\u7372\u53D6\u6307\u5B9A\u6587\u4EF6/\u6587\u4EF6\u593E\u7684\u8DEF\u5F91",editor_menu:{paste_filePath:"\u7C98\u8CBC\u6587\u4EF6\u8DEF\u5F91",paste_folderPath:"\u7C98\u8CBC\u6587\u4EF6\u593E\u8DEF\u5F91"},file_menu:{copy_filePath:"\u8907\u88FD\u6587\u4EF6\u8DEF\u5F91",copy_folderPath:"\u8907\u88FD\u6587\u4EF6\u593E\u8DEF\u5F91",copy_filesPath:"\u8907\u88FD\u6587\u4EF6\u8DEF\u5F91(\u591A\u6587\u4EF6)"},command:{copy_filePath:"\u8907\u88FD\u6587\u4EF6\u8DEF\u5F91",copy_folderPath:"\u8907\u88FD\u6587\u4EF6\u593E\u8DEF\u5F91"},status:{copy_success:"\u8DEF\u5F91\u5DF2\u8907\u88FD\u5230\u526A\u8CBC\u677F",copy_failed:"\u8907\u88FD\u5931\u6557",no_parent_path:"\u6839\u76EE\u9304\u6587\u4EF6\u6C92\u6709\u7236\u76EE\u9304"},settings:{addEditorMenu:{title:"\u6DFB\u52A0\u7DE8\u8F2F\u5668\u83DC\u55AE",description:"\u5728\u7DE8\u8F2F\u5668\u83DC\u55AE\u4E2D\u6DFB\u52A0\u7C98\u8CBC\u7576\u524D\u6587\u4EF6\u8DEF\u5F91\u7684\u9078\u9805"},addFileMenu:{title:"\u6DFB\u52A0\u6587\u4EF6\u5217\u8868\u83DC\u55AE",description:"\u5728\u6587\u4EF6\u5217\u8868\u83DC\u55AE\u4E2D\u6DFB\u52A0\u8907\u88FD\u6587\u4EF6/\u6587\u4EF6\u593E\u8DEF\u5F91\u7684\u9078\u9805"},absolutePath:{title:"\u7D55\u5C0D\u8DEF\u5F91",description:"\u4F7F\u7528\u7D55\u5C0D\u8DEF\u5F91\uFF0C\u5373\u5F9E\u64CD\u4F5C\u7CFB\u7D71\u6839\u76EE\u9304\u958B\u59CB\u7684\u8DEF\u5F91"},separator:{title:"\u5206\u9694\u7B26",description:"\u591A\u500B\u8DEF\u5F91\u7684\u5206\u9694\u7B26",newline:"\u63DB\u884C",comma:"\u9017\u865F",semicolon:"\u5206\u865F",space:"\u7A7A\u683C"}}},folderTemplates:{title:"\u6587\u4EF6\u593E\u6A21\u677F",description:"\u5728\u6307\u5B9A\u6587\u4EF6\u593E\u4E0B\u5275\u5EFA\u65B0\u6587\u4EF6\u6642\uFF0C\u7121\u611F\u77E5\u61C9\u7528\u6A21\u677F",settings:{templatesFolderPath:{title:"\u6A21\u677F\u6587\u4EF6\u593E\u8DEF\u5F91",description:"\u5B58\u653E\u6A21\u677F\u6587\u4EF6\u7684\u6587\u4EF6\u593E\u8DEF\u5F91, \u9ED8\u8A8D\u8207\u5B98\u65B9\u6A21\u677F\u4F4D\u7F6E\u76F8\u540C",placeholder:"\u8ACB\u555F\u7528\u6838\u5FC3\u6A21\u677F\u63D2\u4EF6",enablePlugin:"\u8ACB\u555F\u7528\u6838\u5FC3\u6A21\u677F\u63D2\u4EF6"},ignoredFolders:{title:"\u5FFD\u7565\u6587\u4EF6\u593E",description:"\u5728\u9019\u4E9B\u6587\u4EF6\u593E\u4E2D\u5275\u5EFA\u6587\u4EF6\u6642\u4E0D\u6703\u81EA\u52D5\u61C9\u7528\u6A21\u677F\uFF0C\u652F\u6301\u5B50\u6587\u4EF6\u593E",placeholder:"\u6DFB\u52A0\u8981\u5FFD\u7565\u6A21\u677F\u61C9\u7528\u7684\u6587\u4EF6\u593E"},templateManagement:{title:"\u6A21\u677F\u914D\u7F6E",addTemplate:"\u6DFB\u52A0\u6A21\u677F",editTemplate:"\u7DE8\u8F2F\u6A21\u677F",deleteTemplate:"\u522A\u9664",saveTemplate:"\u4FDD\u5B58",cancel:"\u53D6\u6D88",emptyState:'\u9084\u6C92\u6709\u914D\u7F6E\u4EFB\u4F55\u6A21\u677F\u3002\u9EDE\u64CA"\u6DFB\u52A0\u6A21\u677F"\u958B\u59CB\u914D\u7F6E\u3002',enablePluginFirst:"\u8ACB\u5148\u555F\u7528\u6838\u5FC3\u6A21\u677F\u63D2\u4EF6"},templateForm:{title:"\u6A21\u677F\u914D\u7F6E",targetFolder:"\u76EE\u6A19\u6587\u4EF6\u593E",templateFile:"\u6A21\u677F\u6587\u4EF6",fileNameRule:"\u6587\u4EF6\u540D\u898F\u5247",fileNameRulePlaceholder:"\u4F8B\u5982: {{date}}-{{title}}",addNewTemplate:"\u6DFB\u52A0\u65B0\u6A21\u677F",editTemplateConfig:"\u7DE8\u8F2F\u6A21\u677F\u914D\u7F6E",noTemplateSelected:"\u672A\u9078\u64C7\u6A21\u677F",optional:"\uFF08\u53EF\u9078\uFF09",targetFolderPlaceholder:"\u9078\u64C7\u6216\u8F38\u5165\u6587\u4EF6\u593E\u8DEF\u5F91",templateFilePlaceholder:"\u9078\u64C7\u6A21\u677F\u6587\u4EF6"},actions:{edit:"\u7DE8\u8F2F",delete:"\u522A\u9664",save:"\u4FDD\u5B58",cancel:"\u53D6\u6D88"},emptyState:{title:"\u66AB\u7121\u6A21\u677F\u914D\u7F6E",description:"\u9EDE\u64CA\u4E0A\u65B9\u300C\u6DFB\u52A0\u6A21\u677F\u300D\u6309\u9215\u958B\u59CB\u914D\u7F6E"}}}}},aP=Fk});var lP,uP=de(()=>{nP();iP();sP();lP={en:rP,zh:oP,"zh-TW":aP}});var cP,la,bk,A,fn=de(()=>{di();cP=require("obsidian");uP();la=class{constructor(){this.translations=lP;this.flatTranslations={};let t=(0,cP.getLanguage)();this.currentLocale=this.translations[t]?t:"en",this.flattenTranslations()}static getInstance(){return la.instance||(la.instance=new la),la.instance}flattenTranslations(){for(let[t,e]of Object.entries(this.translations))this.flatTranslations[t]=this.flattenObject(e)}flattenObject(t,e=""){return Object.keys(t).reduce((r,o)=>{let i=e.length?e+".":"";return typeof t[o]=="object"?Object.assign(r,this.flattenObject(t[o],i+o)):r[i+o]=t[o],r},{})}t(t,e){let r=this.flatTranslations[this.currentLocale][t];return r?e?r.replace(/\{\{([^}]+)\}\}/g,(o,i)=>e[i]!==void 0?String(e[i]):o):r:(Qe.warn(`Translation key not found: ${t}`),t)}setLocale(t){this.translations[t]?(this.currentLocale=t,window.localStorage.setItem("language",t)):(Qe.warn(`Locale not found: ${t}, falling back to 'en'`),this.currentLocale="en",window.localStorage.setItem("language","en"))}getLocale(){return this.currentLocale}hasTranslation(t){return!!this.flatTranslations[this.currentLocale][t]}},bk=la.getInstance(),A=(n,t)=>bk.t(n,t)});var fP=z(dp=>{"use strict";var Mk=te(),Nk=Symbol.for("react.element"),Gk=Symbol.for("react.fragment"),kk=Object.prototype.hasOwnProperty,Hk=Mk.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,Vk={key:!0,ref:!0,__self:!0,__source:!0};function dP(n,t,e){var r,o={},i=null,a=null;e!==void 0&&(i=""+e),t.key!==void 0&&(i=""+t.key),t.ref!==void 0&&(a=t.ref);for(r in t)kk.call(t,r)&&!Vk.hasOwnProperty(r)&&(o[r]=t[r]);if(n&&n.defaultProps)for(r in t=n.defaultProps,t)o[r]===void 0&&(o[r]=t[r]);return{$$typeof:Nk,type:n,key:i,ref:a,props:o,_owner:Hk.current}}dp.Fragment=Gk;dp.jsx=dP;dp.jsxs=dP});var le=z((N8,pP)=>{"use strict";pP.exports=fP()});var vP,pp,SC=de(()=>{vP=n=>n.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),pp=(...n)=>n.filter((t,e,r)=>Boolean(t)&&t.trim()!==""&&r.indexOf(t)===e).join(" ").trim()});var mP,yP=de(()=>{mP={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"}});var oc,CP,wP=de(()=>{oc=B(te());yP();SC();CP=(0,oc.forwardRef)(({color:n="currentColor",size:t=24,strokeWidth:e=2,absoluteStrokeWidth:r,className:o="",children:i,iconNode:a,...s},l)=>(0,oc.createElement)("svg",{ref:l,...mP,width:t,height:t,stroke:n,strokeWidth:r?Number(e)*24/Number(t):e,className:pp("lucide",o),...s},[...a.map(([u,c])=>(0,oc.createElement)(u,c)),...Array.isArray(i)?i:[i]]))});var hp,Be,xr=de(()=>{hp=B(te());SC();wP();Be=(n,t)=>{let e=(0,hp.forwardRef)(({className:r,...o},i)=>(0,hp.createElement)(CP,{ref:i,iconNode:t,className:pp(`lucide-${vP(n)}`,r),...o}));return e.displayName=`${n}`,e}});var ic,SP=de(()=>{xr();ic=Be("ArrowLeft",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]])});var ac,_P=de(()=>{xr();ac=Be("ArrowRight",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]])});var cs,EP=de(()=>{xr();cs=Be("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]])});var ds,RP=de(()=>{xr();ds=Be("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]])});var jo,TP=de(()=>{xr();jo=Be("CirclePlay",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polygon",{points:"10 8 16 12 10 16 10 8",key:"1cimsy"}]])});var ua,xP=de(()=>{xr();ua=Be("CircleX",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]])});var sc,PP=de(()=>{xr();sc=Be("Equal",[["line",{x1:"5",x2:"19",y1:"9",y2:"9",key:"1nwqeh"}],["line",{x1:"5",x2:"19",y1:"15",y2:"15",key:"g8yjpy"}]])});var ca,OP=de(()=>{xr();ca=Be("FolderCog",[["circle",{cx:"18",cy:"18",r:"3",key:"1xkwt0"}],["path",{d:"M10.3 20H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H20a2 2 0 0 1 2 2v3.3",key:"1k8050"}],["path",{d:"m21.7 19.4-.9-.3",key:"1qgwi9"}],["path",{d:"m15.2 16.9-.9-.3",key:"1t7mvx"}],["path",{d:"m16.6 21.7.3-.9",key:"1j67ps"}],["path",{d:"m19.1 15.2.3-.9",key:"18r7jp"}],["path",{d:"m19.6 21.7-.4-1",key:"z2vh2"}],["path",{d:"m16.8 15.3-.4-1",key:"1ei7r6"}],["path",{d:"m14.3 19.6 1-.4",key:"11sv9r"}],["path",{d:"m20.7 16.8 1-.4",key:"19m87a"}]])});var lc,LP=de(()=>{xr();lc=Be("Link",[["path",{d:"M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71",key:"1cjeqo"}],["path",{d:"M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71",key:"19qd67"}]])});var uc,IP=de(()=>{xr();uc=Be("PencilLine",[["path",{d:"M12 20h9",key:"t2du7b"}],["path",{d:"M16.376 3.622a1 1 0 0 1 3.002 3.002L7.368 18.635a2 2 0 0 1-.855.506l-2.872.838a.5.5 0 0 1-.62-.62l.838-2.872a2 2 0 0 1 .506-.854z",key:"1ykcvy"}],["path",{d:"m15 5 3 3",key:"1w25hb"}]])});var cc,DP=de(()=>{xr();cc=Be("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]])});var dc,AP=de(()=>{xr();dc=Be("Settings",[["path",{d:"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z",key:"1qme2f"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]])});var fc,FP=de(()=>{xr();fc=Be("Table",[["path",{d:"M12 3v18",key:"108xh3"}],["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M3 9h18",key:"1pudct"}],["path",{d:"M3 15h18",key:"5xshup"}]])});var fs,bP=de(()=>{xr();fs=Be("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]])});var _i=de(()=>{TP();xP();OP();SP();_P();EP();RP();PP();LP();IP();DP();AP();FP();bP();});var TC=z(et=>{"use strict";Object.defineProperty(et,"__esModule",{value:!0});et.Doctype=et.CDATA=et.Tag=et.Style=et.Script=et.Comment=et.Directive=et.Text=et.Root=et.isTag=et.ElementType=void 0;var pn;(function(n){n.Root="root",n.Text="text",n.Directive="directive",n.Comment="comment",n.Script="script",n.Style="style",n.Tag="tag",n.CDATA="cdata",n.Doctype="doctype"})(pn=et.ElementType||(et.ElementType={}));function Wk(n){return n.type===pn.Tag||n.type===pn.Script||n.type===pn.Style}et.isTag=Wk;et.Root=pn.Root;et.Text=pn.Text;et.Directive=pn.Directive;et.Comment=pn.Comment;et.Script=pn.Script;et.Style=pn.Style;et.Tag=pn.Tag;et.CDATA=pn.CDATA;et.Doctype=pn.Doctype});var LC=z(he=>{"use strict";var fa=he&&he.__extends||function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(r[i]=o[i])},n(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");n(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}}(),hc=he&&he.__assign||function(){return hc=Object.assign||function(n){for(var t,e=1,r=arguments.length;e0?this.children[this.children.length-1]:null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"childNodes",{get:function(){return this.children},set:function(e){this.children=e},enumerable:!1,configurable:!0}),t}(PC);he.NodeWithChildren=Sp;var XP=function(n){fa(t,n);function t(){var e=n!==null&&n.apply(this,arguments)||this;return e.type=zr.ElementType.CDATA,e}return Object.defineProperty(t.prototype,"nodeType",{get:function(){return 4},enumerable:!1,configurable:!0}),t}(Sp);he.CDATA=XP;var QP=function(n){fa(t,n);function t(){var e=n!==null&&n.apply(this,arguments)||this;return e.type=zr.ElementType.Root,e}return Object.defineProperty(t.prototype,"nodeType",{get:function(){return 9},enumerable:!1,configurable:!0}),t}(Sp);he.Document=QP;var JP=function(n){fa(t,n);function t(e,r,o,i){o===void 0&&(o=[]),i===void 0&&(i=e==="script"?zr.ElementType.Script:e==="style"?zr.ElementType.Style:zr.ElementType.Tag);var a=n.call(this,o)||this;return a.name=e,a.attribs=r,a.type=i,a}return Object.defineProperty(t.prototype,"nodeType",{get:function(){return 1},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"tagName",{get:function(){return this.name},set:function(e){this.name=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"attributes",{get:function(){var e=this;return Object.keys(this.attribs).map(function(r){var o,i;return{name:r,value:e.attribs[r],namespace:(o=e["x-attribsNamespace"])===null||o===void 0?void 0:o[r],prefix:(i=e["x-attribsPrefix"])===null||i===void 0?void 0:i[r]}})},enumerable:!1,configurable:!0}),t}(Sp);he.Element=JP;function ZP(n){return(0,zr.isTag)(n)}he.isTag=ZP;function eO(n){return n.type===zr.ElementType.CDATA}he.isCDATA=eO;function tO(n){return n.type===zr.ElementType.Text}he.isText=tO;function rO(n){return n.type===zr.ElementType.Comment}he.isComment=rO;function nO(n){return n.type===zr.ElementType.Directive}he.isDirective=nO;function oO(n){return n.type===zr.ElementType.Root}he.isDocument=oO;function Uk(n){return Object.prototype.hasOwnProperty.call(n,"children")}he.hasChildren=Uk;function OC(n,t){t===void 0&&(t=!1);var e;if(tO(n))e=new $P(n.data);else if(rO(n))e=new KP(n.data);else if(ZP(n)){var r=t?xC(n.children):[],o=new JP(n.name,hc({},n.attribs),r);r.forEach(function(l){return l.parent=o}),n.namespace!=null&&(o.namespace=n.namespace),n["x-attribsNamespace"]&&(o["x-attribsNamespace"]=hc({},n["x-attribsNamespace"])),n["x-attribsPrefix"]&&(o["x-attribsPrefix"]=hc({},n["x-attribsPrefix"])),e=o}else if(eO(n)){var r=t?xC(n.children):[],i=new XP(r);r.forEach(function(u){return u.parent=i}),e=i}else if(oO(n)){var r=t?xC(n.children):[],a=new QP(r);r.forEach(function(u){return u.parent=a}),n["x-mode"]&&(a["x-mode"]=n["x-mode"]),e=a}else if(nO(n)){var s=new YP(n.name,n.data);n["x-name"]!=null&&(s["x-name"]=n["x-name"],s["x-publicId"]=n["x-publicId"],s["x-systemId"]=n["x-systemId"]),e=s}else throw new Error("Not implemented yet: ".concat(n.type));return e.startIndex=n.startIndex,e.endIndex=n.endIndex,n.sourceCodeLocation!=null&&(e.sourceCodeLocation=n.sourceCodeLocation),e}he.cloneNode=OC;function xC(n){for(var t=n.map(function(r){return OC(r,!0)}),e=1;e{"use strict";var jk=$o&&$o.__createBinding||(Object.create?function(n,t,e,r){r===void 0&&(r=e);var o=Object.getOwnPropertyDescriptor(t,e);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[e]}}),Object.defineProperty(n,r,o)}:function(n,t,e,r){r===void 0&&(r=e),n[r]=t[e]}),zk=$o&&$o.__exportStar||function(n,t){for(var e in n)e!=="default"&&!Object.prototype.hasOwnProperty.call(t,e)&&jk(t,n,e)};Object.defineProperty($o,"__esModule",{value:!0});$o.DomHandler=void 0;var IC=TC(),pa=LC();zk(LC(),$o);var iO={withStartIndices:!1,withEndIndices:!1,xmlMode:!1},aO=function(){function n(t,e,r){this.dom=[],this.root=new pa.Document(this.dom),this.done=!1,this.tagStack=[this.root],this.lastNode=null,this.parser=null,typeof e=="function"&&(r=e,e=iO),typeof t=="object"&&(e=t,t=void 0),this.callback=t??null,this.options=e??iO,this.elementCB=r??null}return n.prototype.onparserinit=function(t){this.parser=t},n.prototype.onreset=function(){this.dom=[],this.root=new pa.Document(this.dom),this.done=!1,this.tagStack=[this.root],this.lastNode=null,this.parser=null},n.prototype.onend=function(){this.done||(this.done=!0,this.parser=null,this.handleCallback(null))},n.prototype.onerror=function(t){this.handleCallback(t)},n.prototype.onclosetag=function(){this.lastNode=null;var t=this.tagStack.pop();this.options.withEndIndices&&(t.endIndex=this.parser.endIndex),this.elementCB&&this.elementCB(t)},n.prototype.onopentag=function(t,e){var r=this.options.xmlMode?IC.ElementType.Tag:void 0,o=new pa.Element(t,e,void 0,r);this.addNode(o),this.tagStack.push(o)},n.prototype.ontext=function(t){var e=this.lastNode;if(e&&e.type===IC.ElementType.Text)e.data+=t,this.options.withEndIndices&&(e.endIndex=this.parser.endIndex);else{var r=new pa.Text(t);this.addNode(r),this.lastNode=r}},n.prototype.oncomment=function(t){if(this.lastNode&&this.lastNode.type===IC.ElementType.Comment){this.lastNode.data+=t;return}var e=new pa.Comment(t);this.addNode(e),this.lastNode=e},n.prototype.oncommentend=function(){this.lastNode=null},n.prototype.oncdatastart=function(){var t=new pa.Text(""),e=new pa.CDATA([t]);this.addNode(e),t.parent=e,this.lastNode=t},n.prototype.oncdataend=function(){this.lastNode=null},n.prototype.onprocessinginstruction=function(t,e){var r=new pa.ProcessingInstruction(t,e);this.addNode(r)},n.prototype.handleCallback=function(t){if(typeof this.callback=="function")this.callback(t,this.dom);else if(t)throw t},n.prototype.addNode=function(t){var e=this.tagStack[this.tagStack.length-1],r=e.children[e.children.length-1];this.options.withStartIndices&&(t.startIndex=this.parser.startIndex),this.options.withEndIndices&&(t.endIndex=this.parser.endIndex),e.children.push(t),r&&(t.prev=r,r.next=t),t.parent=e,this.lastNode=null},n}();$o.DomHandler=aO;$o.default=aO});var sO=z(Xt=>{"use strict";Object.defineProperty(Xt,"__esModule",{value:!0});Xt.CARRIAGE_RETURN_PLACEHOLDER_REGEX=Xt.CARRIAGE_RETURN_PLACEHOLDER=Xt.CARRIAGE_RETURN_REGEX=Xt.CARRIAGE_RETURN=Xt.CASE_SENSITIVE_TAG_NAMES_MAP=Xt.CASE_SENSITIVE_TAG_NAMES=void 0;Xt.CASE_SENSITIVE_TAG_NAMES=["animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","linearGradient","radialGradient","textPath"];Xt.CASE_SENSITIVE_TAG_NAMES_MAP=Xt.CASE_SENSITIVE_TAG_NAMES.reduce(function(n,t){return n[t.toLowerCase()]=t,n},{});Xt.CARRIAGE_RETURN="\r";Xt.CARRIAGE_RETURN_REGEX=new RegExp(Xt.CARRIAGE_RETURN,"g");Xt.CARRIAGE_RETURN_PLACEHOLDER="__HTML_DOM_PARSER_CARRIAGE_RETURN_PLACEHOLDER_".concat(Date.now(),"__");Xt.CARRIAGE_RETURN_PLACEHOLDER_REGEX=new RegExp(Xt.CARRIAGE_RETURN_PLACEHOLDER,"g")});var AC=z(Ll=>{"use strict";Object.defineProperty(Ll,"__esModule",{value:!0});Ll.formatAttributes=lO;Ll.escapeSpecialCharacters=Kk;Ll.revertEscapedCharacters=uO;Ll.formatDOM=cO;var _p=DC(),gc=sO();function qk(n){return gc.CASE_SENSITIVE_TAG_NAMES_MAP[n]}function lO(n){for(var t={},e=0,r=n.length;e{"use strict";Object.defineProperty(MC,"__esModule",{value:!0});MC.default=Qk;var Yk=AC(),dO="html",fO="head",Ep="body",Xk=/<([a-zA-Z]+[0-9]?)/,pO=//i,hO=//i,Tp=function(n,t){throw new Error("This browser does not support `document.implementation.createHTMLDocument`")},FC=function(n,t){throw new Error("This browser does not support `DOMParser.prototype.parseFromString`")},gO=typeof window=="object"&&window.DOMParser;typeof gO=="function"&&(vO=new gO,mO="text/html",FC=function(n,t){return t&&(n="<".concat(t,">").concat(n,"")),vO.parseFromString(n,mO)},Tp=FC);var vO,mO;typeof document=="object"&&document.implementation&&(vc=document.implementation.createHTMLDocument(),Tp=function(n,t){if(t){var e=vc.documentElement.querySelector(t);return e&&(e.innerHTML=n),vc}return vc.documentElement.innerHTML=n,vc});var vc,Rp=typeof document=="object"&&document.createElement("template"),bC;Rp&&Rp.content&&(bC=function(n){return Rp.innerHTML=n,Rp.content.childNodes});function Qk(n){var t,e;n=(0,Yk.escapeSpecialCharacters)(n);var r=n.match(Xk),o=r&&r[1]?r[1].toLowerCase():"";switch(o){case dO:{var i=FC(n);if(!pO.test(n)){var a=i.querySelector(fO);(t=a?.parentNode)===null||t===void 0||t.removeChild(a)}if(!hO.test(n)){var a=i.querySelector(Ep);(e=a?.parentNode)===null||e===void 0||e.removeChild(a)}return i.querySelectorAll(dO)}case fO:case Ep:{var s=Tp(n).querySelectorAll(o);return hO.test(n)&&pO.test(n)?s[0].parentNode.childNodes:s}default:{if(bC)return bC(n);var a=Tp(n,Ep).querySelector(Ep);return a.childNodes}}}});var CO=z(mc=>{"use strict";var Jk=mc&&mc.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(mc,"__esModule",{value:!0});mc.default=r1;var Zk=Jk(yO()),e1=AC(),t1=/<(![a-zA-Z\s]+)>/;function r1(n){if(typeof n!="string")throw new TypeError("First argument must be a string");if(!n)return[];var t=n.match(t1),e=t?t[1]:void 0;return(0,e1.formatDOM)((0,Zk.default)(n),null,e)}});var wO=z(xp=>{var n1=0;xp.SAME=n1;var o1=1;xp.CAMELCASE=o1;xp.possibleStandardNames={accept:0,acceptCharset:1,"accept-charset":"acceptCharset",accessKey:1,action:0,allowFullScreen:1,alt:0,as:0,async:0,autoCapitalize:1,autoComplete:1,autoCorrect:1,autoFocus:1,autoPlay:1,autoSave:1,capture:0,cellPadding:1,cellSpacing:1,challenge:0,charSet:1,checked:0,children:0,cite:0,class:"className",classID:1,className:1,cols:0,colSpan:1,content:0,contentEditable:1,contextMenu:1,controls:0,controlsList:1,coords:0,crossOrigin:1,dangerouslySetInnerHTML:1,data:0,dateTime:1,default:0,defaultChecked:1,defaultValue:1,defer:0,dir:0,disabled:0,disablePictureInPicture:1,disableRemotePlayback:1,download:0,draggable:0,encType:1,enterKeyHint:1,for:"htmlFor",form:0,formMethod:1,formAction:1,formEncType:1,formNoValidate:1,formTarget:1,frameBorder:1,headers:0,height:0,hidden:0,high:0,href:0,hrefLang:1,htmlFor:1,httpEquiv:1,"http-equiv":"httpEquiv",icon:0,id:0,innerHTML:1,inputMode:1,integrity:0,is:0,itemID:1,itemProp:1,itemRef:1,itemScope:1,itemType:1,keyParams:1,keyType:1,kind:0,label:0,lang:0,list:0,loop:0,low:0,manifest:0,marginWidth:1,marginHeight:1,max:0,maxLength:1,media:0,mediaGroup:1,method:0,min:0,minLength:1,multiple:0,muted:0,name:0,noModule:1,nonce:0,noValidate:1,open:0,optimum:0,pattern:0,placeholder:0,playsInline:1,poster:0,preload:0,profile:0,radioGroup:1,readOnly:1,referrerPolicy:1,rel:0,required:0,reversed:0,role:0,rows:0,rowSpan:1,sandbox:0,scope:0,scoped:0,scrolling:0,seamless:0,selected:0,shape:0,size:0,sizes:0,span:0,spellCheck:1,src:0,srcDoc:1,srcLang:1,srcSet:1,start:0,step:0,style:0,summary:0,tabIndex:1,target:0,title:0,type:0,useMap:1,value:0,width:0,wmode:0,wrap:0,about:0,accentHeight:1,"accent-height":"accentHeight",accumulate:0,additive:0,alignmentBaseline:1,"alignment-baseline":"alignmentBaseline",allowReorder:1,alphabetic:0,amplitude:0,arabicForm:1,"arabic-form":"arabicForm",ascent:0,attributeName:1,attributeType:1,autoReverse:1,azimuth:0,baseFrequency:1,baselineShift:1,"baseline-shift":"baselineShift",baseProfile:1,bbox:0,begin:0,bias:0,by:0,calcMode:1,capHeight:1,"cap-height":"capHeight",clip:0,clipPath:1,"clip-path":"clipPath",clipPathUnits:1,clipRule:1,"clip-rule":"clipRule",color:0,colorInterpolation:1,"color-interpolation":"colorInterpolation",colorInterpolationFilters:1,"color-interpolation-filters":"colorInterpolationFilters",colorProfile:1,"color-profile":"colorProfile",colorRendering:1,"color-rendering":"colorRendering",contentScriptType:1,contentStyleType:1,cursor:0,cx:0,cy:0,d:0,datatype:0,decelerate:0,descent:0,diffuseConstant:1,direction:0,display:0,divisor:0,dominantBaseline:1,"dominant-baseline":"dominantBaseline",dur:0,dx:0,dy:0,edgeMode:1,elevation:0,enableBackground:1,"enable-background":"enableBackground",end:0,exponent:0,externalResourcesRequired:1,fill:0,fillOpacity:1,"fill-opacity":"fillOpacity",fillRule:1,"fill-rule":"fillRule",filter:0,filterRes:1,filterUnits:1,floodOpacity:1,"flood-opacity":"floodOpacity",floodColor:1,"flood-color":"floodColor",focusable:0,fontFamily:1,"font-family":"fontFamily",fontSize:1,"font-size":"fontSize",fontSizeAdjust:1,"font-size-adjust":"fontSizeAdjust",fontStretch:1,"font-stretch":"fontStretch",fontStyle:1,"font-style":"fontStyle",fontVariant:1,"font-variant":"fontVariant",fontWeight:1,"font-weight":"fontWeight",format:0,from:0,fx:0,fy:0,g1:0,g2:0,glyphName:1,"glyph-name":"glyphName",glyphOrientationHorizontal:1,"glyph-orientation-horizontal":"glyphOrientationHorizontal",glyphOrientationVertical:1,"glyph-orientation-vertical":"glyphOrientationVertical",glyphRef:1,gradientTransform:1,gradientUnits:1,hanging:0,horizAdvX:1,"horiz-adv-x":"horizAdvX",horizOriginX:1,"horiz-origin-x":"horizOriginX",ideographic:0,imageRendering:1,"image-rendering":"imageRendering",in2:0,in:0,inlist:0,intercept:0,k1:0,k2:0,k3:0,k4:0,k:0,kernelMatrix:1,kernelUnitLength:1,kerning:0,keyPoints:1,keySplines:1,keyTimes:1,lengthAdjust:1,letterSpacing:1,"letter-spacing":"letterSpacing",lightingColor:1,"lighting-color":"lightingColor",limitingConeAngle:1,local:0,markerEnd:1,"marker-end":"markerEnd",markerHeight:1,markerMid:1,"marker-mid":"markerMid",markerStart:1,"marker-start":"markerStart",markerUnits:1,markerWidth:1,mask:0,maskContentUnits:1,maskUnits:1,mathematical:0,mode:0,numOctaves:1,offset:0,opacity:0,operator:0,order:0,orient:0,orientation:0,origin:0,overflow:0,overlinePosition:1,"overline-position":"overlinePosition",overlineThickness:1,"overline-thickness":"overlineThickness",paintOrder:1,"paint-order":"paintOrder",panose1:0,"panose-1":"panose1",pathLength:1,patternContentUnits:1,patternTransform:1,patternUnits:1,pointerEvents:1,"pointer-events":"pointerEvents",points:0,pointsAtX:1,pointsAtY:1,pointsAtZ:1,prefix:0,preserveAlpha:1,preserveAspectRatio:1,primitiveUnits:1,property:0,r:0,radius:0,refX:1,refY:1,renderingIntent:1,"rendering-intent":"renderingIntent",repeatCount:1,repeatDur:1,requiredExtensions:1,requiredFeatures:1,resource:0,restart:0,result:0,results:0,rotate:0,rx:0,ry:0,scale:0,security:0,seed:0,shapeRendering:1,"shape-rendering":"shapeRendering",slope:0,spacing:0,specularConstant:1,specularExponent:1,speed:0,spreadMethod:1,startOffset:1,stdDeviation:1,stemh:0,stemv:0,stitchTiles:1,stopColor:1,"stop-color":"stopColor",stopOpacity:1,"stop-opacity":"stopOpacity",strikethroughPosition:1,"strikethrough-position":"strikethroughPosition",strikethroughThickness:1,"strikethrough-thickness":"strikethroughThickness",string:0,stroke:0,strokeDasharray:1,"stroke-dasharray":"strokeDasharray",strokeDashoffset:1,"stroke-dashoffset":"strokeDashoffset",strokeLinecap:1,"stroke-linecap":"strokeLinecap",strokeLinejoin:1,"stroke-linejoin":"strokeLinejoin",strokeMiterlimit:1,"stroke-miterlimit":"strokeMiterlimit",strokeWidth:1,"stroke-width":"strokeWidth",strokeOpacity:1,"stroke-opacity":"strokeOpacity",suppressContentEditableWarning:1,suppressHydrationWarning:1,surfaceScale:1,systemLanguage:1,tableValues:1,targetX:1,targetY:1,textAnchor:1,"text-anchor":"textAnchor",textDecoration:1,"text-decoration":"textDecoration",textLength:1,textRendering:1,"text-rendering":"textRendering",to:0,transform:0,typeof:0,u1:0,u2:0,underlinePosition:1,"underline-position":"underlinePosition",underlineThickness:1,"underline-thickness":"underlineThickness",unicode:0,unicodeBidi:1,"unicode-bidi":"unicodeBidi",unicodeRange:1,"unicode-range":"unicodeRange",unitsPerEm:1,"units-per-em":"unitsPerEm",unselectable:0,vAlphabetic:1,"v-alphabetic":"vAlphabetic",values:0,vectorEffect:1,"vector-effect":"vectorEffect",version:0,vertAdvY:1,"vert-adv-y":"vertAdvY",vertOriginX:1,"vert-origin-x":"vertOriginX",vertOriginY:1,"vert-origin-y":"vertOriginY",vHanging:1,"v-hanging":"vHanging",vIdeographic:1,"v-ideographic":"vIdeographic",viewBox:1,viewTarget:1,visibility:0,vMathematical:1,"v-mathematical":"vMathematical",vocab:0,widths:0,wordSpacing:1,"word-spacing":"wordSpacing",writingMode:1,"writing-mode":"writingMode",x1:0,x2:0,x:0,xChannelSelector:1,xHeight:1,"x-height":"xHeight",xlinkActuate:1,"xlink:actuate":"xlinkActuate",xlinkArcrole:1,"xlink:arcrole":"xlinkArcrole",xlinkHref:1,"xlink:href":"xlinkHref",xlinkRole:1,"xlink:role":"xlinkRole",xlinkShow:1,"xlink:show":"xlinkShow",xlinkTitle:1,"xlink:title":"xlinkTitle",xlinkType:1,"xlink:type":"xlinkType",xmlBase:1,"xml:base":"xmlBase",xmlLang:1,"xml:lang":"xmlLang",xmlns:0,"xml:space":"xmlSpace",xmlnsXlink:1,"xmlns:xlink":"xmlnsXlink",xmlSpace:1,y1:0,y2:0,y:0,yChannelSelector:1,z:0,zoomAndPan:1}});var _O=z(ho=>{"use strict";function i1(n){return Qt.hasOwnProperty(n)?Qt[n]:null}function Pr(n,t,e,r,o,i,a){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=o,this.mustUseProperty=e,this.propertyName=n,this.type=t,this.sanitizeURL=i,this.removeEmptyString=a}var Qt={},a1=["children","dangerouslySetInnerHTML","defaultValue","defaultChecked","innerHTML","suppressContentEditableWarning","suppressHydrationWarning","style"];a1.forEach(n=>{Qt[n]=new Pr(n,0,!1,n,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(([n,t])=>{Qt[n]=new Pr(n,1,!1,t,null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(n=>{Qt[n]=new Pr(n,2,!1,n.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(n=>{Qt[n]=new Pr(n,2,!1,n,null,!1,!1)});["allowFullScreen","async","autoFocus","autoPlay","controls","default","defer","disabled","disablePictureInPicture","disableRemotePlayback","formNoValidate","hidden","loop","noModule","noValidate","open","playsInline","readOnly","required","reversed","scoped","seamless","itemScope"].forEach(n=>{Qt[n]=new Pr(n,3,!1,n.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(n=>{Qt[n]=new Pr(n,3,!0,n,null,!1,!1)});["capture","download"].forEach(n=>{Qt[n]=new Pr(n,4,!1,n,null,!1,!1)});["cols","rows","size","span"].forEach(n=>{Qt[n]=new Pr(n,6,!1,n,null,!1,!1)});["rowSpan","start"].forEach(n=>{Qt[n]=new Pr(n,5,!1,n.toLowerCase(),null,!1,!1)});var NC=/[\-\:]([a-z])/g,GC=n=>n[1].toUpperCase();["accent-height","alignment-baseline","arabic-form","baseline-shift","cap-height","clip-path","clip-rule","color-interpolation","color-interpolation-filters","color-profile","color-rendering","dominant-baseline","enable-background","fill-opacity","fill-rule","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","glyph-name","glyph-orientation-horizontal","glyph-orientation-vertical","horiz-adv-x","horiz-origin-x","image-rendering","letter-spacing","lighting-color","marker-end","marker-mid","marker-start","overline-position","overline-thickness","paint-order","panose-1","pointer-events","rendering-intent","shape-rendering","stop-color","stop-opacity","strikethrough-position","strikethrough-thickness","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","text-anchor","text-decoration","text-rendering","underline-position","underline-thickness","unicode-bidi","unicode-range","units-per-em","v-alphabetic","v-hanging","v-ideographic","v-mathematical","vector-effect","vert-adv-y","vert-origin-x","vert-origin-y","word-spacing","writing-mode","xmlns:xlink","x-height"].forEach(n=>{let t=n.replace(NC,GC);Qt[t]=new Pr(t,1,!1,n,null,!1,!1)});["xlink:actuate","xlink:arcrole","xlink:role","xlink:show","xlink:title","xlink:type"].forEach(n=>{let t=n.replace(NC,GC);Qt[t]=new Pr(t,1,!1,n,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(n=>{let t=n.replace(NC,GC);Qt[t]=new Pr(t,1,!1,n,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(n=>{Qt[n]=new Pr(n,1,!1,n.toLowerCase(),null,!1,!1)});var s1="xlinkHref";Qt[s1]=new Pr("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(n=>{Qt[n]=new Pr(n,1,!1,n.toLowerCase(),null,!0,!0)});var{CAMELCASE:l1,SAME:u1,possibleStandardNames:SO}=wO(),c1=":A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD",d1=c1+"\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040",f1=RegExp.prototype.test.bind(new RegExp("^(data|aria)-["+d1+"]*$")),p1=Object.keys(SO).reduce((n,t)=>{let e=SO[t];return e===u1?n[t]=t:e===l1?n[t.toLowerCase()]=t:n[t]=e,n},{});ho.BOOLEAN=3;ho.BOOLEANISH_STRING=2;ho.NUMERIC=5;ho.OVERLOADED_BOOLEAN=4;ho.POSITIVE_NUMERIC=6;ho.RESERVED=0;ho.STRING=1;ho.getPropertyInfo=i1;ho.isCustomAttribute=f1;ho.possibleStandardNames=p1});var OO=z((uX,PO)=>{var EO=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,h1=/\n/g,g1=/^\s*/,v1=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,m1=/^:\s*/,y1=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,C1=/^[;\s]*/,w1=/^\s+|\s+$/g,S1=` `,RO="/",TO="*",ps="",_1="comment",E1="declaration";PO.exports=function(n,t){if(typeof n!="string")throw new TypeError("First argument must be a string");if(!n)return[];t=t||{};var e=1,r=1;function o(v){var C=v.match(h1);C&&(e+=C.length);var m=v.lastIndexOf(S1);r=~m?v.length-m:r+v.length}function i(){var v={line:e,column:r};return function(C){return C.position=new a(v),c(),C}}function a(v){this.start=v,this.end={line:e,column:r},this.source=t.source}a.prototype.content=n;var s=[];function l(v){var C=new Error(t.source+":"+e+":"+r+": "+v);if(C.reason=v,C.filename=t.source,C.line=e,C.column=r,C.source=n,t.silent)s.push(C);else throw C}function u(v){var C=v.exec(n);if(C){var m=C[0];return o(m),n=n.slice(m.length),C}}function c(){u(g1)}function d(v){var C;for(v=v||[];C=f();)C!==!1&&v.push(C);return v}function f(){var v=i();if(!(RO!=n.charAt(0)||TO!=n.charAt(1))){for(var C=2;ps!=n.charAt(C)&&(TO!=n.charAt(C)||RO!=n.charAt(C+1));)++C;if(C+=2,ps===n.charAt(C-1))return l("End of comment missing");var m=n.slice(2,C-2);return r+=2,o(m),n=n.slice(C),r+=2,v({type:_1,comment:m})}}function p(){var v=i(),C=u(v1);if(C){if(f(),!u(m1))return l("property missing ':'");var m=u(y1),y=v({type:E1,property:xO(C[0].replace(EO,ps)),value:m?xO(m[0].replace(EO,ps)):ps});return u(C1),y}}function h(){var v=[];d(v);for(var C;C=p();)C!==!1&&(v.push(C),d(v));return v}return c(),h()};function xO(n){return n?n.replace(w1,ps):ps}});var LO=z(yc=>{"use strict";var R1=yc&&yc.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(yc,"__esModule",{value:!0});yc.default=x1;var T1=R1(OO());function x1(n,t){var e=null;if(!n||typeof n!="string")return e;var r=(0,T1.default)(n),o=typeof t=="function";return r.forEach(function(i){if(i.type==="declaration"){var a=i.property,s=i.value;o?t(a,s,i):s&&(e=e||{},e[a]=s)}}),e}});var DO=z(Pp=>{"use strict";Object.defineProperty(Pp,"__esModule",{value:!0});Pp.camelCase=void 0;var P1=/^--[a-zA-Z0-9_-]+$/,O1=/-([a-z])/g,L1=/^[^-]+$/,I1=/^-(webkit|moz|ms|o|khtml)-/,D1=/^-(ms)-/,A1=function(n){return!n||L1.test(n)||P1.test(n)},F1=function(n,t){return t.toUpperCase()},IO=function(n,t){return"".concat(t,"-")},b1=function(n,t){return t===void 0&&(t={}),A1(n)?n:(n=n.toLowerCase(),t.reactCompat?n=n.replace(D1,IO):n=n.replace(I1,IO),n.replace(O1,F1))};Pp.camelCase=b1});var FO=z((HC,AO)=>{"use strict";var M1=HC&&HC.__importDefault||function(n){return n&&n.__esModule?n:{default:n}},N1=M1(LO()),G1=DO();function kC(n,t){var e={};return!n||typeof n!="string"||(0,N1.default)(n,function(r,o){r&&o&&(e[(0,G1.camelCase)(r,t)]=o)}),e}kC.default=kC;AO.exports=kC});var VC=z(Or=>{"use strict";var k1=Or&&Or.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(Or,"__esModule",{value:!0});Or.returnFirstArg=Or.canTextBeChildOfNode=Or.ELEMENTS_WITH_NO_TEXT_CHILDREN=Or.PRESERVE_CUSTOM_ATTRIBUTES=void 0;Or.isCustomComponent=W1;Or.setStyleProp=j1;var H1=te(),V1=k1(FO()),B1=new Set(["annotation-xml","color-profile","font-face","font-face-src","font-face-uri","font-face-format","font-face-name","missing-glyph"]);function W1(n,t){return n.includes("-")?!B1.has(n):Boolean(t&&typeof t.is=="string")}var U1={reactCompat:!0};function j1(n,t){if(typeof n=="string"){if(!n.trim()){t.style={};return}try{t.style=(0,V1.default)(n,U1)}catch{t.style={}}}}Or.PRESERVE_CUSTOM_ATTRIBUTES=Number(H1.version.split(".")[0])>=16;Or.ELEMENTS_WITH_NO_TEXT_CHILDREN=new Set(["tr","tbody","thead","tfoot","colgroup","table","head","html","frameset"]);var z1=function(n){return!Or.ELEMENTS_WITH_NO_TEXT_CHILDREN.has(n.name)};Or.canTextBeChildOfNode=z1;var q1=function(n){return n};Or.returnFirstArg=q1});var WC=z(BC=>{"use strict";Object.defineProperty(BC,"__esModule",{value:!0});BC.default=X1;var Cc=_O(),bO=VC(),$1=["checked","value"],K1=["input","select","textarea"],Y1={reset:!0,submit:!0};function X1(n,t){n===void 0&&(n={});var e={},r=Boolean(n.type&&Y1[n.type]);for(var o in n){var i=n[o];if((0,Cc.isCustomAttribute)(o)){e[o]=i;continue}var a=o.toLowerCase(),s=MO(a);if(s){var l=(0,Cc.getPropertyInfo)(s);switch($1.includes(s)&&K1.includes(t)&&!r&&(s=MO("default"+a)),e[s]=i,l&&l.type){case Cc.BOOLEAN:e[s]=!0;break;case Cc.OVERLOADED_BOOLEAN:i===""&&(e[s]=!0);break}continue}bO.PRESERVE_CUSTOM_ATTRIBUTES&&(e[o]=i)}return(0,bO.setStyleProp)(n.style,e),e}function MO(n){return Cc.possibleStandardNames[n]}});var GO=z(Sc=>{"use strict";var Q1=Sc&&Sc.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(Sc,"__esModule",{value:!0});Sc.default=NO;var UC=te(),J1=Q1(WC()),wc=VC(),Z1={cloneElement:UC.cloneElement,createElement:UC.createElement,isValidElement:UC.isValidElement};function NO(n,t){t===void 0&&(t={});for(var e=[],r=typeof t.replace=="function",o=t.transform||wc.returnFirstArg,i=t.library||Z1,a=i.cloneElement,s=i.createElement,l=i.isValidElement,u=n.length,c=0;c1&&(f=a(f,{key:f.key||c})),e.push(o(f,d,c));continue}}if(d.type==="text"){var p=!d.data.trim().length;if(p&&d.parent&&!(0,wc.canTextBeChildOfNode)(d.parent)||t.trim&&p)continue;e.push(o(d.data,d,c));continue}var h=d,v={};eH(h)?((0,wc.setStyleProp)(h.attribs.style,h.attribs),v=h.attribs):h.attribs&&(v=(0,J1.default)(h.attribs,h.name));var C=void 0;switch(d.type){case"script":case"style":d.children[0]&&(v.dangerouslySetInnerHTML={__html:d.children[0].data});break;case"tag":d.name==="textarea"&&d.children[0]?v.defaultValue=d.children[0].data:d.children&&d.children.length&&(C=NO(d.children,t));break;default:continue}u>1&&(v.key=c),e.push(o(s(d.name,v,C),d,c))}return e.length===1?e[0]:e}function eH(n){return wc.PRESERVE_CUSTOM_ATTRIBUTES&&n.type==="tag"&&(0,wc.isCustomComponent)(n.name,n.attribs)}});var zC=z(Dt=>{"use strict";var jC=Dt&&Dt.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(Dt,"__esModule",{value:!0});Dt.htmlToDOM=Dt.domToReact=Dt.attributesToProps=Dt.Text=Dt.ProcessingInstruction=Dt.Element=Dt.Comment=void 0;Dt.default=nH;var kO=jC(CO());Dt.htmlToDOM=kO.default;var tH=jC(WC());Dt.attributesToProps=tH.default;var HO=jC(GO());Dt.domToReact=HO.default;var Op=DC();Object.defineProperty(Dt,"Comment",{enumerable:!0,get:function(){return Op.Comment}});Object.defineProperty(Dt,"Element",{enumerable:!0,get:function(){return Op.Element}});Object.defineProperty(Dt,"ProcessingInstruction",{enumerable:!0,get:function(){return Op.ProcessingInstruction}});Object.defineProperty(Dt,"Text",{enumerable:!0,get:function(){return Op.Text}});var rH={lowerCaseAttributeNames:!1};function nH(n,t){if(typeof n!="string")throw new TypeError("First argument must be a string");return n?(0,HO.default)((0,kO.default)(n,t?.htmlparser2||rH),t):[]}});var JO=de(()=>{});var ZO,Ko,eL,Un,tL,oH,gs,bp,Rc=de(()=>{_i();ZO=require("obsidian"),Ko=B(te()),eL=B(wC());JO();Un=B(le()),tL=Ko.createContext(null),oH=()=>(0,Un.jsx)("div",{className:"rht-toolkit-modal-loading",children:(0,Un.jsx)("span",{children:"Loading..."})}),gs=class extends ZO.Modal{constructor(e,r,o,i={},a="modal-size-large"){super(e);this.root=null;this.props={app:e,plugin:r,onClose:()=>this.close(),additionalProps:i,sizeClass:a},this.LazyComponent=Ko.lazy(o)}async onOpen(){let e=this.containerEl;this.root=(0,eL.createRoot)(e),this.root.render((0,Un.jsx)(Ko.StrictMode,{children:(0,Un.jsxs)("div",{className:`rht-toolkit-modal ${this.props.sizeClass}`,children:[(0,Un.jsx)(tL.Provider,{value:{app:this.props.app,plugin:this.props.plugin,additionalProps:this.props.additionalProps},children:(0,Un.jsx)(Ko.Suspense,{fallback:(0,Un.jsx)(oH,{}),children:(0,Un.jsx)(this.LazyComponent,{...this.props})})}),(0,Un.jsx)("div",{className:"rht-toolkit-modal-close",onClick:()=>this.close(),children:(0,Un.jsx)(fs,{})})]})}))}async onClose(){this.root?.unmount(),this.root=null,this.containerEl.empty()}},bp=()=>{let n=Ko.useContext(tL);if(!n)throw new Error("useModal must be used within a ModalContext.Provider");return n}});var Ic,Dc,ys=de(()=>{Ic=(t=>(t.FRONTMATTER="frontmatter",t))(Ic||{}),Dc=(f=>(f.COUNT="Count",f.SUM="Sum",f.AVERAGE="Average",f.MIN="Min",f.MAX="Max",f.MEDIAN="Median",f.MODE="Mode",f.STDDEV="StdDev",f.VARIANCE="Variance",f.TIME_EARLIEST="TimeEarliest",f.TIME_LATEST="TimeLatest",f.TIME_SPAN="TimeSpan",f))(Dc||{})});var kL=de(()=>{});var HL,VL=de(()=>{fn();ys();HL=[{function:"Count",description:A("toolkit.tableEnhancements.formula_editor.math.COUNT"),syntax:"Count([columns], modifier?)",example:"Count([Status], 'unique')",defaultTemplate:"Count([columns], 'values')",parameters:[{name:"modifier",description:A("toolkit.tableEnhancements.formula_editor.math.count_modifier"),options:["values","empty","unique"],optional:!0,default:"values"}]},{function:"Sum",description:A("toolkit.tableEnhancements.formula_editor.math.SUM"),syntax:"Sum([columns])",example:"Sum([Price,Cost])"},{function:"Average",description:A("toolkit.tableEnhancements.formula_editor.math.AVERAGE"),syntax:"Average([columns])",example:"Average([Score])"},{function:"Min",description:A("toolkit.tableEnhancements.formula_editor.math.MIN"),syntax:"Min([columns])",example:"Min([Score])"},{function:"Max",description:A("toolkit.tableEnhancements.formula_editor.math.MAX"),syntax:"Max([columns])",example:"Max([Score])"},{function:"Median",description:A("toolkit.tableEnhancements.formula_editor.math.MEDIAN"),syntax:"Median([columns])",example:"Median([Score])"},{function:"Mode",description:A("toolkit.tableEnhancements.formula_editor.math.MODE"),syntax:"Mode([columns])",example:"Mode([Score])"},{function:"StdDev",description:A("toolkit.tableEnhancements.formula_editor.math.STDDEV"),syntax:"StdDev([columns])",example:"StdDev([Score])"},{function:"Variance",description:A("toolkit.tableEnhancements.formula_editor.math.VARIANCE"),syntax:"Variance([columns])",example:"Variance([Score])"},{function:"TimeEarliest",description:A("toolkit.tableEnhancements.formula_editor.time.TIME_EARLIEST"),syntax:"TimeEarliest([columns], format?)",example:"TimeEarliest([Date], 'yyyy-MM-dd')",defaultTemplate:"TimeEarliest([columns], 'yyyy-MM-dd')",parameters:[{name:"format",description:A("toolkit.tableEnhancements.formula_editor.time.time_format"),options:["yyyy-MM-dd","yyyy-MM-dd HH:mm:ss","HH:mm"],optional:!0,default:"yyyy-MM-dd"}]},{function:"TimeLatest",description:A("toolkit.tableEnhancements.formula_editor.time.TIME_LATEST"),syntax:"TimeLatest([columns], format?)",example:"TimeLatest([Date], 'yyyy-MM-dd')",defaultTemplate:"TimeLatest([columns], 'yyyy-MM-dd')",parameters:[{name:"format",description:A("toolkit.tableEnhancements.formula_editor.time.time_format"),options:["yyyy-MM-dd","yyyy-MM-dd HH:mm:ss","HH:mm"],optional:!0,default:"yyyy-MM-dd"}]},{function:"TimeSpan",description:A("toolkit.tableEnhancements.formula_editor.time.TIME_SPAN"),syntax:"TimeSpan([column], format?:unit?)",example:"TimeSpan([Date], 'yyyy-MM-dd:days')",defaultTemplate:"TimeSpan([columns], 'yyyy-MM-dd:days')",parameters:[{name:"format",description:A("toolkit.tableEnhancements.formula_editor.time.time_format"),options:["yyyy-MM-dd","yyyy-MM-dd HH:mm:ss"],optional:!0,default:"yyyy-MM-dd"},{name:"unit",description:A("toolkit.tableEnhancements.formula_editor.time.time_unit"),options:["days","hours","minutes"],optional:!0,default:"days"}]}]});var BL=de(()=>{});var tw,We,lV,WL,UL=de(()=>{fn();tw=B(te());VL();BL();We=B(le()),lV=({table:n,value:t,onChange:e})=>{let[r,o]=(0,tw.useState)(null),[i,a]=(0,tw.useState)(null),s=i||r,l=f=>{o(f);let p=(f.defaultTemplate||f.syntax).replace("columns","");e(p)},u=f=>{if(!t)return;let p=t.indexOf("[");if(p===-1)return;let h=t.indexOf("]",p);if(h===-1)return;let v=t.slice(p+1,h).split(",").map(E=>E.trim()).filter(E=>E!==""),C=v.indexOf(f);C===-1?v.push(f):v.splice(C,1);let m=t.slice(0,p+1),y=t.slice(h),S=`${m}${v.join(", ")}${y}`;e(S)},c=f=>{if(!t)return!1;let p=t.indexOf("["),h=t.indexOf("]",p);return p===-1||h===-1?!1:t.slice(p+1,h).split(",").map(C=>C.trim()).filter(C=>C!=="").includes(f)},d=(f,p)=>{if(!t||!r)return;let h=r.function,v=t.indexOf("(");if(v===-1)return;let C=t.lastIndexOf(")"),m=C!==-1,y=t.indexOf("[",v);if(y===-1)return;let S=t.indexOf("]",y);if(S===-1)return;let E=t.slice(y,S+1),R=t.slice(S+1,m?C:void 0),x=new Map,P=R.match(/(?:,\s*)?(['"])(.*?)\1/g)||[];if(h==="TimeSpan"&&f.name==="unit"){let I=r.parameters?.find(W=>W.name==="format"),b=x.get("format")||I?.default||"yyyy-MM-dd";x.set("format",`${b}:${p}`)}else if(h==="TimeSpan"&&f.name==="format"){let I=r.parameters?.find(W=>W.name==="unit"),b=x.get("unit")||I?.default||"days";x.set(f.name,`${p}:${b}`)}else r.parameters?.forEach((I,b)=>{if(P[b]){let W=P[b].replace(/^,\s*['"]|['"]$/g,"");x.set(I.name,W)}else I.default&&x.set(I.name,I.default)}),x.set(f.name,p);let T=Array.from(x.values()).filter(Boolean).map(I=>`'${I}'`).join(", "),L=`${h}(${E}${T?", "+T:""})`;e(L)};return(0,We.jsxs)("div",{className:"formula-editor",children:[(0,We.jsxs)("div",{className:"formula-columns",children:[(0,We.jsx)("h3",{children:A("toolkit.tableEnhancements.formula_editor.table_columns")}),(0,We.jsx)("div",{className:"column-list",children:n.headers.map(f=>(0,We.jsxs)("div",{className:`column-item ${c(f.content)?"selected":""}`,onClick:()=>u(f.content),children:[f.field,": ",f.content]},f.field))})]}),(0,We.jsx)("div",{className:"formula-input",children:(0,We.jsx)("textarea",{value:t,onChange:f=>e(f.target.value),placeholder:A("toolkit.tableEnhancements.formula_editor.input_placeholder"),className:"formula-textarea"})}),(0,We.jsxs)("div",{className:"formula-functions",children:[(0,We.jsx)("h3",{children:A("toolkit.tableEnhancements.formula_editor.function_name")}),(0,We.jsxs)("div",{className:"functions-container",children:[(0,We.jsx)("div",{className:"function-list",children:HL.map(f=>(0,We.jsxs)("div",{className:`function-item ${r?.function===f.function?"active":""}`,onClick:()=>{l(f)},onMouseEnter:()=>a(f),children:[(0,We.jsx)("div",{className:"function-name",children:f.function}),(0,We.jsx)("div",{className:"function-desc",children:f.description})]},f.function))}),(0,We.jsx)("div",{className:"function-detail-wrapper",children:s&&(0,We.jsxs)("div",{className:"function-detail",children:[(0,We.jsxs)("div",{className:"hint-syntax",children:[A("toolkit.tableEnhancements.formula_editor.hint_syntax"),": ",s.syntax]}),(0,We.jsxs)("div",{className:"hint-example",children:[A("toolkit.tableEnhancements.formula_editor.hint_example"),": ",s.example]}),s.parameters&&s.parameters.length>0&&(0,We.jsxs)("div",{className:"hint-parameters",children:[(0,We.jsxs)("div",{className:"parameters-title",children:[A("toolkit.tableEnhancements.formula_editor.hint_parameters"),":"]}),s.parameters.map((f,p)=>(0,We.jsxs)("div",{className:"parameter-item",children:[(0,We.jsxs)("div",{className:"parameter-name",children:[f.name,f.optional&&(0,We.jsxs)("span",{className:"parameter-optional",children:["(",A("toolkit.tableEnhancements.formula_editor.parameter_optional"),")"]})]}),(0,We.jsx)("div",{className:"parameter-desc",children:f.description}),f.options&&(0,We.jsxs)("div",{className:"parameter-options",children:[A("toolkit.tableEnhancements.formula_editor.parameter_options"),":"," ",f.options.map(h=>(0,We.jsx)("span",{className:"option-tag",onClick:()=>d(f,h),title:`${A("toolkit.tableEnhancements.formula_editor.insert_option")}: '${h}'`,children:h},h))]})]},p))]})]})})]})]})]})},WL=lV});var jL=de(()=>{});var rw={};Jv(rw,{default:()=>dV});var bh,hr,uV,cV,dV,nw=de(()=>{Rc();fn();bh=B(te());ys();UL();jL();hr=B(le()),uV=Object.values(Ic).map(n=>({value:n,label:n.toUpperCase()})),cV=()=>{let{additionalProps:n}=bp(),{table:t,initialFormula:e="",initialOutput:r="frontmatter",initialOutputValue:o="",isEditing:i,onSubmit:a,onClose:s}=n,[l,u]=(0,bh.useState)(e),[c,d]=(0,bh.useState)(r),[f,p]=(0,bh.useState)(o),h=()=>{a({config:{formula:l,output:{type:c,value:f}}})};return(0,hr.jsxs)("div",{className:"tableEnhancements-formula-modal",children:[(0,hr.jsxs)("div",{className:"tableEnhancements-formula-header",children:[(0,hr.jsxs)("div",{className:"tableEnhancements-form-group",children:[(0,hr.jsx)("label",{children:A("toolkit.tableEnhancements.formula.output_type")}),(0,hr.jsx)("select",{value:c,onChange:v=>d(v.target.value),className:"tableEnhancements-select",children:uV.map(({value:v,label:C})=>(0,hr.jsx)("option",{value:v,children:C},v))})]}),(0,hr.jsxs)("div",{className:"tableEnhancements-form-group",children:[(0,hr.jsx)("label",{children:A("toolkit.tableEnhancements.formula.output_value")}),(0,hr.jsx)("input",{type:"text",value:f,onChange:v=>p(v.target.value),placeholder:"e.g., frontmatter key",className:"tableEnhancements-input"})]})]}),(0,hr.jsx)("div",{className:"tableEnhancements-formula-content",children:(0,hr.jsx)(WL,{table:t,value:l,onChange:u})}),(0,hr.jsxs)("div",{className:"tableEnhancements-formula-footer",children:[(0,hr.jsx)("button",{className:"tableEnhancements-btn",onClick:s,children:A("toolkit.tableEnhancements.formula.cancel")}),(0,hr.jsx)("button",{className:"tableEnhancements-btn primary",onClick:h,disabled:!l,children:i?A("toolkit.tableEnhancements.formula.update"):A("toolkit.tableEnhancements.formula.add")})]})]})},dV=cV});var Ir,Ue,fV,zL,qL=de(()=>{Rc();fn();_i();Ir=B(te());ys();kL();Ue=B(le()),fV=({calc:n,index:t,onEdit:e,onDelete:r,onExecute:o,disabled:i})=>(0,Ue.jsxs)("div",{className:"tableEnhancements-calculation-item",children:[(0,Ue.jsxs)("div",{className:"tableEnhancements-calculation-info",children:[(0,Ue.jsx)("span",{className:"calculation-formula",children:n.config.formula}),(0,Ue.jsx)("span",{className:"calculation-hyphen",children:(0,Ue.jsx)(ac,{})}),(0,Ue.jsx)("span",{className:"calculation-output",children:n.config.output.type}),n.config.output.value&&(0,Ue.jsxs)("span",{className:"calculation-output-value",children:["(",n.config.output.value,")"]}),(0,Ue.jsx)("span",{className:"calculation-hyphen",children:(0,Ue.jsx)(sc,{})}),n.config.result!==void 0&&(0,Ue.jsx)("span",{className:"calculation-result",children:n.config.result})]}),(0,Ue.jsxs)("div",{className:"tableEnhancements-calculation-actions",children:[(0,Ue.jsx)("button",{className:"tableEnhancements-btn icon",onClick:()=>e(t),disabled:i,"aria-label":A("toolkit.tableEnhancements.formula.edit_calculation"),children:(0,Ue.jsx)(uc,{})}),(0,Ue.jsx)("button",{className:"tableEnhancements-btn icon",onClick:()=>r(t),disabled:i,"aria-label":A("toolkit.tableEnhancements.formula.remove_calculation"),children:(0,Ue.jsx)(ua,{})}),(0,Ue.jsx)("button",{className:"tableEnhancements-btn icon",onClick:()=>o(n),disabled:i,"aria-label":A("toolkit.tableEnhancements.formula.execute_calculation"),children:(0,Ue.jsx)(jo,{})})]})]}),zL=({table:n,manager:t,onCalculate:e,logger:r})=>{let[o,i]=(0,Ir.useState)([]),[a,s]=(0,Ir.useState)(!1),[l,u]=(0,Ir.useState)(null),[c,d]=(0,Ir.useState)({formula:"",output:"frontmatter",outputValue:"",editingIndex:null,isAdding:!1}),[f,p]=(0,Ir.useState)(null);(0,Ir.useEffect)(()=>{n.referenceId&&i(t.getSavedCalculations(n.referenceId))},[n.referenceId,t]);let h=(0,Ir.useCallback)(()=>{d({formula:"",output:"frontmatter",outputValue:"",editingIndex:null,isAdding:!1}),u(null)},[]),v=(0,Ir.useCallback)(E=>{let R=o[E],x=new gs(t.getApp(),t.getPlugin(),()=>Promise.resolve().then(()=>(nw(),rw)),{table:n,initialFormula:R.config.formula,initialOutput:R.config.output.type,initialOutputValue:R.config.output.value,isEditing:!0,onSubmit:async P=>{try{s(!0),await t.executeAndSaveCalculation(n,P,E),i(t.getSavedCalculations(n.referenceId)),e(n),x.close()}catch(T){r.error("Error updating calculation:",T)}finally{s(!1)}},onClose:()=>x.close()},"modal-size-medium");x.open(),p(x)},[o,n,t,r,e]),C=(0,Ir.useCallback)(()=>{let E=new gs(t.getApp(),t.getPlugin(),()=>Promise.resolve().then(()=>(nw(),rw)),{table:n,isEditing:!1,onSubmit:async R=>{try{s(!0),await t.executeAndSaveCalculation(n,R),i(t.getSavedCalculations(n.referenceId)),e(n),E.close()}catch(x){r.error("Error adding calculation:",x)}finally{s(!1)}},onClose:()=>E.close()},"modal-size-medium");E.open(),p(E)},[n,t,r,e]),m=(0,Ir.useCallback)(async E=>{if(n.referenceId)try{await t.deleteCalculation(n.referenceId,E),i(t.getSavedCalculations(n.referenceId)),e(n)}catch(R){r.error("Error deleting calculation:",R)}},[n,t,e,r]),y=(0,Ir.useCallback)(async E=>{s(!0);try{await t.executeCalculation(n,E),e(n)}catch(R){r.error("Error executing saved calculation:",R)}finally{s(!1)}},[n,t,e,r]),S=(0,Ir.useCallback)(async()=>{if(!(!n.referenceId||o.length===0)){s(!0);try{for(let E of o)await t.executeCalculation(n,E);e(n)}catch(E){r.error("Error executing all calculations:",E)}finally{s(!1)}}},[n,t,o,e,r]);return(0,Ue.jsxs)("div",{className:"tableEnhancements-calculation",children:[(0,Ue.jsxs)("div",{className:"tableEnhancements-calculation-actions",children:[(0,Ue.jsx)("button",{className:"tableEnhancements-btn icon primary",onClick:C,disabled:a,"aria-label":A("toolkit.tableEnhancements.formula.add_calculation"),children:(0,Ue.jsx)(cc,{})}),o.length>0&&(0,Ue.jsx)("button",{className:"tableEnhancements-btn icon primary",onClick:S,disabled:a,"aria-label":A("toolkit.tableEnhancements.formula.execute_all"),children:(0,Ue.jsx)(jo,{})})]}),(0,Ue.jsx)("div",{className:"tableEnhancements-calculation-list",children:o.map((E,R)=>(0,Ue.jsx)(fV,{calc:E,index:R,onEdit:v,onDelete:m,onExecute:y,disabled:a},R))}),l&&(0,Ue.jsx)("div",{className:"tableEnhancements-error",children:l})]})}});var Pt=z(g=>{"use strict";Object.defineProperty(g,"__esModule",{value:!0});function ri(n){return n==null||n===""?null:n}function D(n,t){return t===void 0&&(t=!1),n!=null&&(n!==""||t)}function Z(n){return!D(n)}function Cn(n){return n==null||n.length===0}function fd(n){return n!=null&&typeof n.toString=="function"?n.toString():null}function Qn(n){if(n!==void 0){if(n===null||n==="")return null;if(typeof n=="number")return isNaN(n)?void 0:n;var t=parseInt(n,10);return isNaN(t)?void 0:t}}function ti(n){if(n!==void 0)return n===null||n===""?!1:typeof n=="boolean"?n:/true/i.test(n)}function pV(n){if(!(n==null||n===""))return n}function hV(n,t){return n==null&&t==null?!0:n==null&&t!=null||n!=null&&t==null?!1:n===t}function gV(n,t){var e=n?JSON.stringify(n):null,r=t?JSON.stringify(t):null;return e===r}function vV(n,t,e){e===void 0&&(e=!1);var r=n==null,o=t==null;if(n&&n.toNumber&&(n=n.toNumber()),t&&t.toNumber&&(t=t.toNumber()),r&&o)return 0;if(r)return-1;if(o)return 1;function i(a,s){return a>s?1:a=n.length&&(n=void 0),{value:n&&n[r++],done:!n}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},CV=function(n,t){var e=typeof Symbol=="function"&&n[Symbol.iterator];if(!e)return n;var r=e.call(n),o,i=[],a;try{for(;(t===void 0||t-- >0)&&!(o=r.next()).done;)i.push(o.value)}catch(s){a={error:s}}finally{try{o&&!o.done&&(e=r.return)&&e.call(r)}finally{if(a)throw a.error}}return i};function st(n,t){var e,r;if(n!=null){if(Array.isArray(n)){for(var o=0;o=0)){var i=e[o],a=gg(i)&&i.constructor===Object;a?r[o]=hg(i):r[o]=i}}),r}}function XI(n,t){return n[t]}function QI(n,t,e){n[t]=e}function SV(n,t){for(var e=[],r=2;r1;)if(o=o[r.shift()],o==null)return e;var i=o[r[0]];return i??e}function RV(n,t,e){if(n!=null){var r=t.split("."),o=n;r.forEach(function(i,a){o[i]||(o[i]={}),a0&&window.setTimeout(function(){return n.forEach(function(e){return e()})},t)}function wo(n,t){var e;return function(){for(var r=[],o=0;oe;(n()||l)&&(t(),a=!0,i!=null&&(window.clearInterval(i),i=null),l&&r&&console.warn(r))};s(),a||(i=window.setInterval(s,10))}function xV(){for(var n=[],t=0;t0)&&!(o=r.next()).done;)i.push(o.value)}catch(s){a={error:s}}finally{try{o&&!o.done&&(e=r.return)&&e.call(r)}finally{if(a)throw a.error}}return i},KL=function(n,t){for(var e=0,r=t.length,o=n.length;e<\/script> For more info see: https://ag-grid.com/javascript-data-grid/getting-started/#getting-started-with-ag-grid-enterprise`;else if(n.moduleBased||n.moduleBased===void 0){var s=(o=Object.entries(g.ModuleNames).find(function(l){var u=Fc(l,2),c=u[0],d=u[1];return d===t}))===null||o===void 0?void 0:o[0];a="AG Grid: unable to use "+e+" as the "+s+" is not registered"+(n.areGridScopedModules?" for gridId: "+r:"")+`. Check if you have registered the module: import { ModuleRegistry } from '@ag-grid-community/core'; import { `+s+" } from '"+t+`'; ModuleRegistry.registerModules([ `+s+` ]); For more info see: https://www.ag-grid.com/javascript-grid/modules/`}else a="AG Grid: unable to use "+e+` as package 'ag-grid-enterprise' has not been imported. Check that you have imported the package: import 'ag-grid-enterprise'; For more info see: https://www.ag-grid.com/javascript-grid/packages/`;return ge(function(){console.warn(a)},i),!1},n.__isRegistered=function(t,e){var r;return!!n.globalModulesMap[t]||!!(!((r=n.gridModulesMap[e])===null||r===void 0)&&r[t])},n.__getRegisteredModules=function(t){return KL(KL([],Fc(Ts(n.globalModulesMap))),Fc(Ts(n.gridModulesMap[t]||{})))},n.__getGridRegisteredModules=function(t){var e;return Ts((e=n.gridModulesMap[t])!==null&&e!==void 0?e:{})||[]},n.__isPackageBased=function(){return!n.moduleBased},n.globalModulesMap={},n.gridModulesMap={},n.areGridScopedModules=!1,n}(),LV=function(n,t){var e=typeof Symbol=="function"&&n[Symbol.iterator];if(!e)return n;var r=e.call(n),o,i=[],a;try{for(;(t===void 0||t-- >0)&&!(o=r.next()).done;)i.push(o.value)}catch(s){a={error:s}}finally{try{o&&!o.done&&(e=r.return)&&e.call(r)}finally{if(a)throw a.error}}return i},IV=function(n,t){for(var e=0,r=t.length,o=n.length;e> creating ag-Application Context"),this.createBeans();var r=this.getBeanInstances();this.wireBeans(r),this.logger.log(">> ag-Application Context ready - component is alive")}}return n.prototype.getBeanInstances=function(){return Ts(this.beanWrappers).map(function(t){return t.beanInstance})},n.prototype.createBean=function(t,e){if(!t)throw Error("Can't wire to bean since it is null");return this.wireBeans([t],e),t},n.prototype.wireBeans=function(t,e){this.autoWireBeans(t),this.methodWireBeans(t),this.callLifeCycleMethods(t,"preConstructMethods"),D(e)&&t.forEach(e),this.callLifeCycleMethods(t,"postConstructMethods")},n.prototype.createBeans=function(){var t=this;this.contextParams.beanClasses.forEach(this.createBeanWrapper.bind(this)),st(this.beanWrappers,function(r,o){var i;o.bean.__agBeanMetaData&&o.bean.__agBeanMetaData.autowireMethods&&o.bean.__agBeanMetaData.autowireMethods.agConstructor&&(i=o.bean.__agBeanMetaData.autowireMethods.agConstructor);var a=t.getBeansForParameters(i,o.bean.name),s=new(o.bean.bind.apply(o.bean,IV([null],LV(a))));o.beanInstance=s});var e=Object.keys(this.beanWrappers).join(", ");this.logger.log("created beans: "+e)},n.prototype.createBeanWrapper=function(t){var e=t.__agBeanMetaData;if(!e){var r=void 0;t.prototype.constructor?r=Mg(t.prototype.constructor):r=""+t,console.error("Context item "+r+" is not a bean");return}var o={bean:t,beanInstance:null,beanName:e.beanName};this.beanWrappers[e.beanName]=o},n.prototype.autoWireBeans=function(t){var e=this;t.forEach(function(r){e.forEachMetaDataInHierarchy(r,function(o,i){var a=o.agClassAttributes;a&&a.forEach(function(s){var l=e.lookupBeanInstance(i,s.beanName,s.optional);r[s.attributeName]=l})})})},n.prototype.methodWireBeans=function(t){var e=this;t.forEach(function(r){e.forEachMetaDataInHierarchy(r,function(o,i){st(o.autowireMethods,function(a,s){if(a!=="agConstructor"){var l=e.getBeansForParameters(s,i);r[a].apply(r,l)}})})})},n.prototype.forEachMetaDataInHierarchy=function(t,e){for(var r=Object.getPrototypeOf(t);r!=null;){var o=r.constructor;if(o.hasOwnProperty("__agBeanMetaData")){var i=o.__agBeanMetaData,a=this.getBeanName(o);e(i,a)}r=Object.getPrototypeOf(r)}},n.prototype.getBeanName=function(t){if(t.__agBeanMetaData&&t.__agBeanMetaData.beanName)return t.__agBeanMetaData.beanName;var e=t.toString(),r=e.substring(9,e.indexOf("("));return r},n.prototype.getBeansForParameters=function(t,e){var r=this,o=[];return t&&st(t,function(i,a){var s=r.lookupBeanInstance(e,a);o[Number(i)]=s}),o},n.prototype.lookupBeanInstance=function(t,e,r){if(r===void 0&&(r=!1),this.destroyed)return this.logger.log("AG Grid: bean reference "+e+" is used after the grid is destroyed!"),null;if(e==="context")return this;if(this.contextParams.providedBeanInstances&&this.contextParams.providedBeanInstances.hasOwnProperty(e))return this.contextParams.providedBeanInstances[e];var o=this.beanWrappers[e];return o?o.beanInstance:(r||console.error("AG Grid: unable to find bean reference "+e+" while initialising "+t),null)},n.prototype.callLifeCycleMethods=function(t,e){var r=this;t.forEach(function(o){return r.callLifeCycleMethodsOnBean(o,e)})},n.prototype.callLifeCycleMethodsOnBean=function(t,e,r){var o={};this.forEachMetaDataInHierarchy(t,function(a){var s=a[e];s&&s.forEach(function(l){l!=r&&(o[l]=!0)})});var i=Object.keys(o);i.forEach(function(a){return t[a]()})},n.prototype.getBean=function(t){return this.lookupBeanInstance("getBean",t,!0)},n.prototype.destroy=function(){if(!this.destroyed){this.destroyed=!0,this.logger.log(">> Shutting down ag-Application Context");var t=this.getBeanInstances();this.destroyBeans(t),this.contextParams.providedBeanInstances=null,J.__unRegisterGridModules(this.contextParams.gridId),this.logger.log(">> ag-Application Context shut down - component is dead")}},n.prototype.destroyBean=function(t){t&&this.destroyBeans([t])},n.prototype.destroyBeans=function(t){var e=this;return t?(t.forEach(function(r){e.callLifeCycleMethodsOnBean(r,"preDestroyMethods","destroy");var o=r;typeof o.destroy=="function"&&o.destroy()}),[]):[]},n.prototype.isDestroyed=function(){return this.destroyed},n.prototype.getGridId=function(){return this.contextParams.gridId},n}();function rS(n,t,e){var r=Ls(n.constructor);r.preConstructMethods||(r.preConstructMethods=[]),r.preConstructMethods.push(t)}function M(n,t,e){var r=Ls(n.constructor);r.postConstructMethods||(r.postConstructMethods=[]),r.postConstructMethods.push(t)}function Mt(n,t,e){var r=Ls(n.constructor);r.preDestroyMethods||(r.preDestroyMethods=[]),r.preDestroyMethods.push(t)}function H(n){return function(t){var e=Ls(t);e.beanName=n}}function w(n){return function(t,e,r){iD(t,n,!1,t,e,null)}}function _e(n){return function(t,e,r){iD(t,n,!0,t,e,null)}}function iD(n,t,e,r,o,i){if(t===null){console.error("AG Grid: Autowired name should not be null");return}if(typeof i=="number"){console.error("AG Grid: Autowired should be on an attribute");return}var a=Ls(n.constructor);a.agClassAttributes||(a.agClassAttributes=[]),a.agClassAttributes.push({attributeName:o,beanName:t,optional:e})}function er(n){return function(t,e,r){var o=typeof t=="function"?t:t.constructor,i;if(typeof r=="number"){var a=void 0;e?(i=Ls(o),a=e):(i=Ls(o),a="agConstructor"),i.autowireMethods||(i.autowireMethods={}),i.autowireMethods[a]||(i.autowireMethods[a]={}),i.autowireMethods[a][r]=n}}}function Ls(n){return n.hasOwnProperty("__agBeanMetaData")||(n.__agBeanMetaData={}),n.__agBeanMetaData}var YL=function(n,t,e,r){var o=arguments.length,i=o<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(n,t,e,r);else for(var s=n.length-1;s>=0;s--)(a=n[s])&&(i=(o<3?a(i):o>3?a(t,e,i):a(t,e))||i);return o>3&&i&&Object.defineProperty(t,e,i),i},bc=function(n,t){return function(e,r){t(e,r,n)}},Li=function(){function n(){this.allSyncListeners=new Map,this.allAsyncListeners=new Map,this.globalSyncListeners=new Set,this.globalAsyncListeners=new Set,this.asyncFunctionsQueue=[],this.scheduled=!1,this.firedEvents={}}return n.prototype.setBeans=function(t,e,r,o,i){if(o===void 0&&(o=null),i===void 0&&(i=null),this.frameworkOverrides=r,this.gridOptionsService=e,o){var a=e.useAsyncEvents();this.addGlobalListener(o,a)}i&&this.addGlobalListener(i,!1)},n.prototype.getListeners=function(t,e,r){var o=e?this.allAsyncListeners:this.allSyncListeners,i=o.get(t);return!i&&r&&(i=new Set,o.set(t,i)),i},n.prototype.noRegisteredListenersExist=function(){return this.allSyncListeners.size===0&&this.allAsyncListeners.size===0&&this.globalSyncListeners.size===0&&this.globalAsyncListeners.size===0},n.prototype.addEventListener=function(t,e,r){r===void 0&&(r=!1),this.getListeners(t,r,!0).add(e)},n.prototype.removeEventListener=function(t,e,r){r===void 0&&(r=!1);var o=this.getListeners(t,r,!1);if(o&&(o.delete(e),o.size===0)){var i=r?this.allAsyncListeners:this.allSyncListeners;i.delete(t)}},n.prototype.addGlobalListener=function(t,e){e===void 0&&(e=!1),(e?this.globalAsyncListeners:this.globalSyncListeners).add(t)},n.prototype.removeGlobalListener=function(t,e){e===void 0&&(e=!1),(e?this.globalAsyncListeners:this.globalSyncListeners).delete(t)},n.prototype.dispatchEvent=function(t){var e=t;if(this.gridOptionsService){var r=this.gridOptionsService,o=r.api,i=r.columnApi,a=r.context;e.api=o,e.columnApi=i,e.context=a}this.dispatchToListeners(e,!0),this.dispatchToListeners(e,!1),this.firedEvents[e.type]=!0},n.prototype.dispatchEventOnce=function(t){this.firedEvents[t.type]||this.dispatchEvent(t)},n.prototype.dispatchToListeners=function(t,e){var r=this,o=t.type;if(e&&"event"in t){var i=t.event;i instanceof Event&&(t.eventPath=i.composedPath())}var a=function(u){return u.forEach(function(c){e?r.dispatchAsync(function(){return c(t)}):c(t)})},s=new Set(this.getListeners(o,e,!1));s.size>0&&a(s);var l=new Set(e?this.globalAsyncListeners:this.globalSyncListeners);l.forEach(function(u){e?r.dispatchAsync(function(){return r.frameworkOverrides.dispatchEvent(o,function(){return u(o,t)},!0)}):r.frameworkOverrides.dispatchEvent(o,function(){return u(o,t)},!0)})},n.prototype.dispatchAsync=function(t){this.asyncFunctionsQueue.push(t),this.scheduled||(window.setTimeout(this.flushAsyncQueue.bind(this),0),this.scheduled=!0)},n.prototype.flushAsyncQueue=function(){this.scheduled=!1;var t=this.asyncFunctionsQueue.slice();this.asyncFunctionsQueue=[],t.forEach(function(e){return e()})},YL([bc(0,er("loggerFactory")),bc(1,er("gridOptionsService")),bc(2,er("frameworkOverrides")),bc(3,er("globalEventListener")),bc(4,er("globalSyncEventListener"))],n.prototype,"setBeans",null),n=YL([H("eventService")],n),n}(),Mh=function(n,t,e,r){var o=arguments.length,i=o<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(n,t,e,r);else for(var s=n.length-1;s>=0;s--)(a=n[s])&&(i=(o<3?a(i):o>3?a(t,e,i):a(t,e))||i);return o>3&&i&&Object.defineProperty(t,e,i),i},XL=function(n,t){var e=typeof Symbol=="function"&&n[Symbol.iterator];if(!e)return n;var r=e.call(n),o,i=[],a;try{for(;(t===void 0||t-- >0)&&!(o=r.next()).done;)i.push(o.value)}catch(s){a={error:s}}finally{try{o&&!o.done&&(e=r.return)&&e.call(r)}finally{if(a)throw a.error}}return i},QL=function(n,t){for(var e=0,r=t.length,o=n.length;e=0&&!t,this.tooltipFieldContainsDots=D(this.colDef.tooltipField)&&this.colDef.tooltipField.indexOf(".")>=0&&!t},n.prototype.initMinAndMaxWidths=function(){var t=this.colDef;this.minWidth=this.columnUtils.calculateColMinWidth(t),this.maxWidth=this.columnUtils.calculateColMaxWidth(t)},n.prototype.initTooltip=function(){this.tooltipEnabled=D(this.colDef.tooltipField)||D(this.colDef.tooltipValueGetter)||D(this.colDef.tooltipComponent)},n.prototype.resetActualWidth=function(t){t===void 0&&(t="api");var e=this.columnUtils.calculateColInitialWidth(this.colDef);this.setActualWidth(e,t,!0)},n.prototype.isEmptyGroup=function(){return!1},n.prototype.isRowGroupDisplayed=function(t){if(Z(this.colDef)||Z(this.colDef.showRowGroup))return!1;var e=this.colDef.showRowGroup===!0,r=this.colDef.showRowGroup===t;return e||r},n.prototype.isPrimary=function(){return this.primary},n.prototype.isFilterAllowed=function(){var t=!!this.colDef.filter;return t},n.prototype.isFieldContainsDots=function(){return this.fieldContainsDots},n.prototype.isTooltipEnabled=function(){return this.tooltipEnabled},n.prototype.isTooltipFieldContainsDots=function(){return this.tooltipFieldContainsDots},n.prototype.validate=function(){var t=this.colDef;function e(u,c,d){ge(function(){d?console.warn(u,d):ge(function(){return console.warn(u)},c)},c)}var r=this.gridOptionsService.isRowModelType("clientSide");if(r&&!J.__isRegistered(g.ModuleNames.RowGroupingModule,this.gridOptionsService.getGridId())){var o=["enableRowGroup","rowGroup","rowGroupIndex","enablePivot","enableValue","pivot","pivotIndex","aggFunc"],i=o.filter(function(u){return D(t[u])});i.length>0&&J.__assertRegistered(g.ModuleNames.RowGroupingModule,i.map(function(u){return"colDef."+u}).join(", "),this.gridOptionsService.getGridId())}if((this.colDef.cellEditor==="agRichSelect"||this.colDef.cellEditor==="agRichSelectCellEditor")&&J.__assertRegistered(g.ModuleNames.RichSelectModule,this.colDef.cellEditor,this.gridOptionsService.getGridId()),this.gridOptionsService.is("treeData")){var a=["rowGroup","rowGroupIndex","pivot","pivotIndex"],i=a.filter(function(c){return D(t[c])});i.length>0&&e("AG Grid: "+i.join()+" is not possible when doing tree data, your column definition should not have "+i.join(),"TreeDataCannotRowGroup")}if(D(t.menuTabs))if(Array.isArray(t.menuTabs)){var s=["filterMenuTab"],l=["columnsMenuTab","generalMenuTab"],i=l.filter(function(c){return t.menuTabs.includes(c)});i.length>0&&J.__assertRegistered(g.ModuleNames.MenuModule,"menuTab(s): "+i.map(function(c){return"'"+c+"'"}).join(),this.gridOptionsService.getGridId()),t.menuTabs.forEach(function(c){!l.includes(c)&&!s.includes(c)&&e("AG Grid: '"+c+"' is not valid for 'colDef.menuTabs'. Valid values are: "+QL(QL([],XL(s)),XL(l)).map(function(d){return"'"+d+"'"}).join()+".","wrongValue_menuTabs_"+c)})}else e("AG Grid: The typeof 'colDef.menuTabs' should be an array not:"+typeof t.menuTabs,"wrongType_menuTabs");D(t.columnsMenuParams)&&J.__assertRegistered(g.ModuleNames.MenuModule,"columnsMenuParams",this.gridOptionsService.getGridId()),D(t.columnsMenuParams)&&J.__assertRegistered(g.ModuleNames.ColumnsToolPanelModule,"columnsMenuParams",this.gridOptionsService.getGridId()),D(this.colDef.width)&&typeof this.colDef.width!="number"&&e("AG Grid: colDef.width should be a number, not "+typeof this.colDef.width,"ColumnCheck"),D(t.columnGroupShow)&&t.columnGroupShow!=="closed"&&t.columnGroupShow!=="open"&&e("AG Grid: '"+t.columnGroupShow+"' is not valid for columnGroupShow. Valid values are 'open', 'closed', undefined, null","columnGroupShow_invalid")},n.prototype.addEventListener=function(t,e){this.eventService.addEventListener(t,e)},n.prototype.removeEventListener=function(t,e){this.eventService.removeEventListener(t,e)},n.prototype.createColumnFunctionCallbackParams=function(t){return{node:t,data:t.data,column:this,colDef:this.colDef,context:this.gridOptionsService.context,api:this.gridOptionsService.api,columnApi:this.gridOptionsService.columnApi}},n.prototype.isSuppressNavigable=function(t){if(typeof this.colDef.suppressNavigable=="boolean")return this.colDef.suppressNavigable;if(typeof this.colDef.suppressNavigable=="function"){var e=this.createColumnFunctionCallbackParams(t),r=this.colDef.suppressNavigable;return r(e)}return!1},n.prototype.isCellEditable=function(t){return t.group&&!this.gridOptionsService.is("enableGroupEdit")?!1:this.isColumnFunc(t,this.colDef.editable)},n.prototype.isSuppressFillHandle=function(){return!!ti(this.colDef.suppressFillHandle)},n.prototype.isAutoHeight=function(){return!!ti(this.colDef.autoHeight)},n.prototype.isAutoHeaderHeight=function(){return!!ti(this.colDef.autoHeaderHeight)},n.prototype.isRowDrag=function(t){return this.isColumnFunc(t,this.colDef.rowDrag)},n.prototype.isDndSource=function(t){return this.isColumnFunc(t,this.colDef.dndSource)},n.prototype.isCellCheckboxSelection=function(t){return this.isColumnFunc(t,this.colDef.checkboxSelection)},n.prototype.isSuppressPaste=function(t){return this.isColumnFunc(t,this.colDef?this.colDef.suppressPaste:null)},n.prototype.isResizable=function(){return!!ti(this.colDef.resizable)},n.prototype.isColumnFunc=function(t,e){if(typeof e=="boolean")return e;if(typeof e=="function"){var r=this.createColumnFunctionCallbackParams(t),o=e;return o(r)}return!1},n.prototype.setMoving=function(t,e){e===void 0&&(e="api"),this.moving=t,this.eventService.dispatchEvent(this.createColumnEvent("movingChanged",e))},n.prototype.createColumnEvent=function(t,e){return{type:t,column:this,columns:[this],source:e,api:this.gridOptionsService.api,columnApi:this.gridOptionsService.columnApi,context:this.gridOptionsService.context}},n.prototype.isMoving=function(){return this.moving},n.prototype.getSort=function(){return this.sort},n.prototype.setSort=function(t,e){e===void 0&&(e="api"),this.sort!==t&&(this.sort=t,this.eventService.dispatchEvent(this.createColumnEvent("sortChanged",e))),this.dispatchStateUpdatedEvent("sort")},n.prototype.setMenuVisible=function(t,e){e===void 0&&(e="api"),this.menuVisible!==t&&(this.menuVisible=t,this.eventService.dispatchEvent(this.createColumnEvent("menuVisibleChanged",e)))},n.prototype.isMenuVisible=function(){return this.menuVisible},n.prototype.isSortAscending=function(){return this.sort==="asc"},n.prototype.isSortDescending=function(){return this.sort==="desc"},n.prototype.isSortNone=function(){return Z(this.sort)},n.prototype.isSorting=function(){return D(this.sort)},n.prototype.getSortIndex=function(){return this.sortIndex},n.prototype.setSortIndex=function(t){this.sortIndex=t,this.dispatchStateUpdatedEvent("sortIndex")},n.prototype.setAggFunc=function(t){this.aggFunc=t,this.dispatchStateUpdatedEvent("aggFunc")},n.prototype.getAggFunc=function(){return this.aggFunc},n.prototype.getLeft=function(){return this.left},n.prototype.getOldLeft=function(){return this.oldLeft},n.prototype.getRight=function(){return this.left+this.actualWidth},n.prototype.setLeft=function(t,e){e===void 0&&(e="api"),this.oldLeft=this.left,this.left!==t&&(this.left=t,this.eventService.dispatchEvent(this.createColumnEvent("leftChanged",e)))},n.prototype.isFilterActive=function(){return this.filterActive},n.prototype.setFilterActive=function(t,e,r){e===void 0&&(e="api"),this.filterActive!==t&&(this.filterActive=t,this.eventService.dispatchEvent(this.createColumnEvent("filterActiveChanged",e)));var o=this.createColumnEvent("filterChanged",e);r&&wn(o,r),this.eventService.dispatchEvent(o)},n.prototype.isHovered=function(){return this.columnHoverService.isHovered(this)},n.prototype.setPinned=function(t){t===!0||t==="left"?this.pinned="left":t==="right"?this.pinned="right":this.pinned=null,this.dispatchStateUpdatedEvent("pinned")},n.prototype.setFirstRightPinned=function(t,e){e===void 0&&(e="api"),this.firstRightPinned!==t&&(this.firstRightPinned=t,this.eventService.dispatchEvent(this.createColumnEvent("firstRightPinnedChanged",e)))},n.prototype.setLastLeftPinned=function(t,e){e===void 0&&(e="api"),this.lastLeftPinned!==t&&(this.lastLeftPinned=t,this.eventService.dispatchEvent(this.createColumnEvent("lastLeftPinnedChanged",e)))},n.prototype.isFirstRightPinned=function(){return this.firstRightPinned},n.prototype.isLastLeftPinned=function(){return this.lastLeftPinned},n.prototype.isPinned=function(){return this.pinned==="left"||this.pinned==="right"},n.prototype.isPinnedLeft=function(){return this.pinned==="left"},n.prototype.isPinnedRight=function(){return this.pinned==="right"},n.prototype.getPinned=function(){return this.pinned},n.prototype.setVisible=function(t,e){e===void 0&&(e="api");var r=t===!0;this.visible!==r&&(this.visible=r,this.eventService.dispatchEvent(this.createColumnEvent("visibleChanged",e))),this.dispatchStateUpdatedEvent("hide")},n.prototype.isVisible=function(){return this.visible},n.prototype.isSpanHeaderHeight=function(){var t=this.getColDef();return!t.suppressSpanHeaderHeight&&!t.autoHeaderHeight},n.prototype.getColDef=function(){return this.colDef},n.prototype.getColumnGroupShow=function(){return this.colDef.columnGroupShow},n.prototype.getColId=function(){return this.colId},n.prototype.getId=function(){return this.colId},n.prototype.getUniqueId=function(){return this.colId},n.prototype.getDefinition=function(){return this.colDef},n.prototype.getActualWidth=function(){return this.actualWidth},n.prototype.getAutoHeaderHeight=function(){return this.autoHeaderHeight},n.prototype.setAutoHeaderHeight=function(t){var e=t!==this.autoHeaderHeight;return this.autoHeaderHeight=t,e},n.prototype.createBaseColDefParams=function(t){var e={node:t,data:t.data,colDef:this.colDef,column:this,api:this.gridOptionsService.api,columnApi:this.gridOptionsService.columnApi,context:this.gridOptionsService.context};return e},n.prototype.getColSpan=function(t){if(Z(this.colDef.colSpan))return 1;var e=this.createBaseColDefParams(t),r=this.colDef.colSpan(e);return Math.max(r,1)},n.prototype.getRowSpan=function(t){if(Z(this.colDef.rowSpan))return 1;var e=this.createBaseColDefParams(t),r=this.colDef.rowSpan(e);return Math.max(r,1)},n.prototype.setActualWidth=function(t,e,r){e===void 0&&(e="api"),r===void 0&&(r=!1),this.minWidth!=null&&(t=Math.max(t,this.minWidth)),this.maxWidth!=null&&(t=Math.min(t,this.maxWidth)),this.actualWidth!==t&&(this.actualWidth=t,this.flex&&e!=="flex"&&e!=="gridInitializing"&&(this.flex=null),r||this.fireColumnWidthChangedEvent(e)),this.dispatchStateUpdatedEvent("width")},n.prototype.fireColumnWidthChangedEvent=function(t){this.eventService.dispatchEvent(this.createColumnEvent("widthChanged",t))},n.prototype.isGreaterThanMax=function(t){return this.maxWidth!=null?t>this.maxWidth:!1},n.prototype.getMinWidth=function(){return this.minWidth},n.prototype.getMaxWidth=function(){return this.maxWidth},n.prototype.getFlex=function(){return this.flex||0},n.prototype.setFlex=function(t){this.flex!==t&&(this.flex=t),this.dispatchStateUpdatedEvent("flex")},n.prototype.setMinimum=function(t){t===void 0&&(t="api"),D(this.minWidth)&&this.setActualWidth(this.minWidth,t)},n.prototype.setRowGroupActive=function(t,e){e===void 0&&(e="api"),this.rowGroupActive!==t&&(this.rowGroupActive=t,this.eventService.dispatchEvent(this.createColumnEvent("columnRowGroupChanged",e))),this.dispatchStateUpdatedEvent("rowGroup")},n.prototype.isRowGroupActive=function(){return this.rowGroupActive},n.prototype.setPivotActive=function(t,e){e===void 0&&(e="api"),this.pivotActive!==t&&(this.pivotActive=t,this.eventService.dispatchEvent(this.createColumnEvent("columnPivotChanged",e))),this.dispatchStateUpdatedEvent("pivot")},n.prototype.isPivotActive=function(){return this.pivotActive},n.prototype.isAnyFunctionActive=function(){return this.isPivotActive()||this.isRowGroupActive()||this.isValueActive()},n.prototype.isAnyFunctionAllowed=function(){return this.isAllowPivot()||this.isAllowRowGroup()||this.isAllowValue()},n.prototype.setValueActive=function(t,e){e===void 0&&(e="api"),this.aggregationActive!==t&&(this.aggregationActive=t,this.eventService.dispatchEvent(this.createColumnEvent("columnValueChanged",e)))},n.prototype.isValueActive=function(){return this.aggregationActive},n.prototype.isAllowPivot=function(){return this.colDef.enablePivot===!0},n.prototype.isAllowValue=function(){return this.colDef.enableValue===!0},n.prototype.isAllowRowGroup=function(){return this.colDef.enableRowGroup===!0},n.prototype.getMenuTabs=function(t){var e=this.getColDef().menuTabs;return e==null&&(e=t),e},n.prototype.dispatchStateUpdatedEvent=function(t){this.eventService.dispatchEvent({type:n.EVENT_STATE_UPDATED,key:t})},n.EVENT_MOVING_CHANGED="movingChanged",n.EVENT_LEFT_CHANGED="leftChanged",n.EVENT_WIDTH_CHANGED="widthChanged",n.EVENT_LAST_LEFT_PINNED_CHANGED="lastLeftPinnedChanged",n.EVENT_FIRST_RIGHT_PINNED_CHANGED="firstRightPinnedChanged",n.EVENT_VISIBLE_CHANGED="visibleChanged",n.EVENT_FILTER_CHANGED="filterChanged",n.EVENT_FILTER_ACTIVE_CHANGED="filterActiveChanged",n.EVENT_SORT_CHANGED="sortChanged",n.EVENT_COL_DEF_CHANGED="colDefChanged",n.EVENT_MENU_VISIBLE_CHANGED="menuVisibleChanged",n.EVENT_ROW_GROUP_CHANGED="columnRowGroupChanged",n.EVENT_PIVOT_CHANGED="columnPivotChanged",n.EVENT_VALUE_CHANGED="columnValueChanged",n.EVENT_STATE_UPDATED="columnStateUpdated",Mh([w("gridOptionsService")],n.prototype,"gridOptionsService",void 0),Mh([w("columnUtils")],n.prototype,"columnUtils",void 0),Mh([w("columnHoverService")],n.prototype,"columnHoverService",void 0),Mh([M],n.prototype,"initialise",null),n}(),AV=function(n,t,e,r){var o=arguments.length,i=o<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(n,t,e,r);else for(var s=n.length-1;s>=0;s--)(a=n[s])&&(i=(o<3?a(i):o>3?a(t,e,i):a(t,e))||i);return o>3&&i&&Object.defineProperty(t,e,i),i},gt=function(){function n(t,e,r,o){this.localEventService=new Li,this.expandable=!1,this.instanceId=aD(),this.expandableListenerRemoveCallback=null,this.colGroupDef=t,this.groupId=e,this.expanded=!!t&&!!t.openByDefault,this.padding=r,this.level=o}return n.prototype.destroy=function(){this.expandableListenerRemoveCallback&&this.reset(null,void 0)},n.prototype.reset=function(t,e){this.colGroupDef=t,this.level=e,this.originalParent=null,this.expandableListenerRemoveCallback&&this.expandableListenerRemoveCallback(),this.children=void 0,this.expandable=void 0},n.prototype.getInstanceId=function(){return this.instanceId},n.prototype.setOriginalParent=function(t){this.originalParent=t},n.prototype.getOriginalParent=function(){return this.originalParent},n.prototype.getLevel=function(){return this.level},n.prototype.isVisible=function(){return this.children?this.children.some(function(t){return t.isVisible()}):!1},n.prototype.isPadding=function(){return this.padding},n.prototype.setExpanded=function(t){this.expanded=t===void 0?!1:t;var e={type:n.EVENT_EXPANDED_CHANGED};this.localEventService.dispatchEvent(e)},n.prototype.isExpandable=function(){return this.expandable},n.prototype.isExpanded=function(){return this.expanded},n.prototype.getGroupId=function(){return this.groupId},n.prototype.getId=function(){return this.getGroupId()},n.prototype.setChildren=function(t){this.children=t},n.prototype.getChildren=function(){return this.children},n.prototype.getColGroupDef=function(){return this.colGroupDef},n.prototype.getLeafColumns=function(){var t=[];return this.addLeafColumns(t),t},n.prototype.addLeafColumns=function(t){this.children&&this.children.forEach(function(e){e instanceof Ne?t.push(e):e instanceof n&&e.addLeafColumns(t)})},n.prototype.getColumnGroupShow=function(){var t=this.colGroupDef;if(t)return t.columnGroupShow},n.prototype.setupExpandable=function(){var t=this;this.setExpandable(),this.expandableListenerRemoveCallback&&this.expandableListenerRemoveCallback();var e=this.onColumnVisibilityChanged.bind(this);this.getLeafColumns().forEach(function(r){return r.addEventListener("visibleChanged",e)}),this.expandableListenerRemoveCallback=function(){t.getLeafColumns().forEach(function(r){return r.removeEventListener("visibleChanged",e)}),t.expandableListenerRemoveCallback=null}},n.prototype.setExpandable=function(){if(!this.isPadding()){for(var t=!1,e=!1,r=!1,o=this.findChildrenRemovingPadding(),i=0,a=o.length;i0}function Ge(n){if(!(!n||!n.length))return n[n.length-1]}function Aa(n,t,e){return n==null&&t==null?!0:n!=null&&t!=null&&n.length===t.length&&n.every(function(r,o){return e?e(r,t[o]):t[o]===r})}function MV(n,t){return Aa(n,t)}function lD(n){return n.sort(function(t,e){return t-e})}function NV(n,t){if(n)for(var e=n.length-2;e>=0;e--){var r=n[e]===t,o=n[e+1]===t;r&&o&&n.splice(e+1,1)}}function RS(n,t){var e=n.indexOf(t);e>=0&&(n[e]=n[n.length-1],n.pop())}function mn(n,t){var e=n.indexOf(t);e>=0&&n.splice(e,1)}function uD(n,t){for(var e=0;e=0;r--){var o=t[r];pd(n,o,e)}}function nS(n,t,e){cD(n,t),t.slice().reverse().forEach(function(r){return pd(n,r,e)})}function Jn(n,t){return n.indexOf(t)>-1}function dD(n){return[].concat.apply([],n)}function oS(n,t){t==null||n==null||t.forEach(function(e){return n.push(e)})}function kV(n){return n.map(fd)}function HV(n,t){if(n!=null)for(var e=n.length-1;e>=0;e--)t(n[e],e)}var VV=Object.freeze({firstExistingValue:sD,existsAndNotEmpty:bV,last:Ge,areEqual:Aa,shallowCompare:MV,sortNumerically:lD,removeRepeatsFromArray:NV,removeFromUnorderedArray:RS,removeFromArray:mn,removeAllFromUnorderedArray:uD,removeAllFromArray:cD,insertIntoArray:pd,insertArrayIntoArray:GV,moveInArray:nS,includes:Jn,flatten:dD,pushAll:oS,toStrings:kV,forEachReverse:HV}),fD="__ag_Grid_Stop_Propagation",BV=["touchstart","touchend","touchmove","touchcancel","scroll"],aw={};function ii(n){n[fD]=!0}function _o(n){return n[fD]===!0}var TS=function(){var n={select:"input",change:"input",submit:"form",reset:"form",error:"img",load:"img",abort:"img"},t=function(e){if(typeof aw[e]=="boolean")return aw[e];var r=document.createElement(n[e]||"div");return e="on"+e,aw[e]=e in r};return t}();function vg(n,t,e){for(var r=t;r;){var o=n.getDomData(r,e);if(o)return o;r=r.parentElement}return null}function mg(n,t){return!t||!n?!1:hD(t).indexOf(n)>=0}function pD(n){for(var t=[],e=n.target;e;)t.push(e),e=e.parentElement;return t}function hD(n){var t=n;return t.path?t.path:t.composedPath?t.composedPath():pD(t)}function gD(n,t,e,r){var o=Jn(BV,e),i=o?{passive:!0}:void 0;n&&n.addEventListener&&n.addEventListener(t,e,r,i)}var WV=Object.freeze({stopPropagationForAgGrid:ii,isStopPropagationForAgGrid:_o,isEventSupported:TS,getCtrlForEventTarget:vg,isElementInEventPath:mg,createEventPath:pD,getEventPath:hD,addSafePassiveEventListener:gD}),Cs=function(n,t,e,r){var o=arguments.length,i=o<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(n,t,e,r);else for(var s=n.length-1;s>=0;s--)(a=n[s])&&(i=(o<3?a(i):o>3?a(t,e,i):a(t,e))||i);return o>3&&i&&Object.defineProperty(t,e,i),i},F=function(){function n(){var t=this;this.destroyFunctions=[],this.destroyed=!1,this.__v_skip=!0,this.lastChangeSetIdLookup={},this.propertyListenerId=0,this.isAlive=function(){return!t.destroyed}}return n.prototype.getFrameworkOverrides=function(){return this.frameworkOverrides},n.prototype.getContext=function(){return this.context},n.prototype.destroy=function(){this.destroyFunctions.forEach(function(t){return t()}),this.destroyFunctions.length=0,this.destroyed=!0,this.dispatchEvent({type:n.EVENT_DESTROYED})},n.prototype.addEventListener=function(t,e){this.localEventService||(this.localEventService=new Li),this.localEventService.addEventListener(t,e)},n.prototype.removeEventListener=function(t,e){this.localEventService&&this.localEventService.removeEventListener(t,e)},n.prototype.dispatchEventAsync=function(t){var e=this;window.setTimeout(function(){return e.dispatchEvent(t)},0)},n.prototype.dispatchEvent=function(t){this.localEventService&&this.localEventService.dispatchEvent(t)},n.prototype.addManagedListener=function(t,e,r){var o=this;if(!this.destroyed){t instanceof HTMLElement?gD(this.getFrameworkOverrides(),t,e,r):t.addEventListener(e,r);var i=function(){return t.removeEventListener(e,r),o.destroyFunctions=o.destroyFunctions.filter(function(a){return a!==i}),null};return this.destroyFunctions.push(i),i}},n.prototype.setupGridOptionListener=function(t,e){var r=this;this.gridOptionsService.addEventListener(t,e);var o=function(){return r.gridOptionsService.removeEventListener(t,e),r.destroyFunctions=r.destroyFunctions.filter(function(i){return i!==o}),null};this.destroyFunctions.push(o)},n.prototype.addManagedPropertyListener=function(t,e){this.destroyed||this.setupGridOptionListener(t,e)},n.prototype.addManagedPropertyListeners=function(t,e){var r=this;if(!this.destroyed){var o=t.join("-")+this.propertyListenerId++,i=function(a){if(a.changeSet){if(a.changeSet&&a.changeSet.id===r.lastChangeSetIdLookup[o])return;r.lastChangeSetIdLookup[o]=a.changeSet.id}var s={type:"gridPropertyChanged",changeSet:a.changeSet};e(s)};t.forEach(function(a){return r.setupGridOptionListener(a,i)})}},n.prototype.addDestroyFunc=function(t){this.isAlive()?this.destroyFunctions.push(t):t()},n.prototype.createManagedBean=function(t,e){var r=this.createBean(t,e);return this.addDestroyFunc(this.destroyBean.bind(this,t,e)),r},n.prototype.createBean=function(t,e,r){return(e||this.getContext()).createBean(t,r)},n.prototype.destroyBean=function(t,e){return(e||this.getContext()).destroyBean(t)},n.prototype.destroyBeans=function(t,e){var r=this;return t&&t.forEach(function(o){return r.destroyBean(o,e)}),[]},n.EVENT_DESTROYED="destroyed",Cs([w("frameworkOverrides")],n.prototype,"frameworkOverrides",void 0),Cs([w("context")],n.prototype,"context",void 0),Cs([w("eventService")],n.prototype,"eventService",void 0),Cs([w("gridOptionsService")],n.prototype,"gridOptionsService",void 0),Cs([w("localeService")],n.prototype,"localeService",void 0),Cs([w("environment")],n.prototype,"environment",void 0),Cs([Mt],n.prototype,"destroy",null),n}(),UV=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(r[i]=o[i])},n(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");n(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}}(),Nh=function(n,t,e,r){var o=arguments.length,i=o<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(n,t,e,r);else for(var s=n.length-1;s>=0;s--)(a=n[s])&&(i=(o<3?a(i):o>3?a(t,e,i):a(t,e))||i);return o>3&&i&&Object.defineProperty(t,e,i),i},jV=function(n,t){return function(e,r){t(e,r,n)}},vD=function(n){UV(t,n);function t(){return n!==null&&n.apply(this,arguments)||this}return t.prototype.setBeans=function(e){this.logger=e.create("ColumnFactory")},t.prototype.createColumnTree=function(e,r,o){var i=new YI,a=this.extractExistingTreeData(o),s=a.existingCols,l=a.existingGroups,u=a.existingColKeys;i.addExistingKeys(u);var c=this.recursivelyCreateColumns(e,0,r,s,i,l),d=this.findMaxDept(c,0);this.logger.log("Number of levels for grouped columns is "+d);var f=this.balanceColumnTree(c,0,d,i),p=function(h,v){h instanceof gt&&h.setupExpandable(),h.setOriginalParent(v)};return this.columnUtils.depthFirstOriginalTreeSearch(null,f,p),{columnTree:f,treeDept:d}},t.prototype.extractExistingTreeData=function(e){var r=[],o=[],i=[];return e&&this.columnUtils.depthFirstOriginalTreeSearch(null,e,function(a){if(a instanceof gt){var s=a;o.push(s)}else{var l=a;i.push(l.getId()),r.push(l)}}),{existingCols:r,existingGroups:o,existingColKeys:i}},t.prototype.createForAutoGroups=function(e,r){var o=this;return e.map(function(i){return o.createAutoGroupTreeItem(r,i)})},t.prototype.createAutoGroupTreeItem=function(e,r){for(var o=this.findDepth(e),i=r,a=o-1;a>=0;a--){var s=new gt(null,"FAKE_PATH_"+r.getId()+"}_"+a,!0,a);this.createBean(s),s.setChildren([i]),i.setOriginalParent(s),i=s}return o===0&&r.setOriginalParent(null),i},t.prototype.findDepth=function(e){for(var r=0,o=e;o&&o[0]&&o[0]instanceof gt;)r++,o=o[0].getChildren();return r},t.prototype.balanceColumnTree=function(e,r,o,i){for(var a=[],s=0;s=r;p--){var h=i.getUniqueKey(null,null),v=this.createMergedColGroupDef(null),C=new gt(v,h,!0,r);this.createBean(C),f&&f.setChildren([C]),f=C,d||(d=f)}if(d&&f){a.push(d);var m=e.some(function(y){return y instanceof gt});if(m){f.setChildren([l]);continue}else{f.setChildren(e);break}}a.push(l)}}return a},t.prototype.findMaxDept=function(e,r){for(var o=r,i=0;i=0;s--)(a=n[s])&&(i=(o<3?a(i):o>3?a(t,e,i):a(t,e))||i);return o>3&&i&&Object.defineProperty(t,e,i),i},Wt=function(){function n(t,e,r,o){this.displayedChildren=[],this.localEventService=new Li,this.groupId=e,this.partId=r,this.providedColumnGroup=t,this.pinned=o}return n.createUniqueId=function(t,e){return t+"_"+e},n.prototype.reset=function(){this.parent=null,this.children=null,this.displayedChildren=null},n.prototype.getParent=function(){return this.parent},n.prototype.setParent=function(t){this.parent=t},n.prototype.getUniqueId=function(){return n.createUniqueId(this.groupId,this.partId)},n.prototype.isEmptyGroup=function(){return this.displayedChildren.length===0},n.prototype.isMoving=function(){var t=this.getProvidedColumnGroup().getLeafColumns();return!t||t.length===0?!1:t.every(function(e){return e.isMoving()})},n.prototype.checkLeft=function(){if(this.displayedChildren.forEach(function(o){o instanceof n&&o.checkLeft()}),this.displayedChildren.length>0)if(this.gridOptionsService.is("enableRtl")){var t=Ge(this.displayedChildren),e=t.getLeft();this.setLeft(e)}else{var r=this.displayedChildren[0].getLeft();this.setLeft(r)}else this.setLeft(null)},n.prototype.getLeft=function(){return this.left},n.prototype.getOldLeft=function(){return this.oldLeft},n.prototype.setLeft=function(t){this.oldLeft=t,this.left!==t&&(this.left=t,this.localEventService.dispatchEvent(this.createAgEvent(n.EVENT_LEFT_CHANGED)))},n.prototype.getPinned=function(){return this.pinned},n.prototype.createAgEvent=function(t){return{type:t}},n.prototype.addEventListener=function(t,e){this.localEventService.addEventListener(t,e)},n.prototype.removeEventListener=function(t,e){this.localEventService.removeEventListener(t,e)},n.prototype.getGroupId=function(){return this.groupId},n.prototype.getPartId=function(){return this.partId},n.prototype.isChildInThisGroupDeepSearch=function(t){var e=!1;return this.children.forEach(function(r){t===r&&(e=!0),r instanceof n&&r.isChildInThisGroupDeepSearch(t)&&(e=!0)}),e},n.prototype.getActualWidth=function(){var t=0;return this.displayedChildren&&this.displayedChildren.forEach(function(e){t+=e.getActualWidth()}),t},n.prototype.isResizable=function(){if(!this.displayedChildren)return!1;var t=!1;return this.displayedChildren.forEach(function(e){e.isResizable()&&(t=!0)}),t},n.prototype.getMinWidth=function(){var t=0;return this.displayedChildren.forEach(function(e){t+=e.getMinWidth()||0}),t},n.prototype.addChild=function(t){this.children||(this.children=[]),this.children.push(t)},n.prototype.getDisplayedChildren=function(){return this.displayedChildren},n.prototype.getLeafColumns=function(){var t=[];return this.addLeafColumns(t),t},n.prototype.getDisplayedLeafColumns=function(){var t=[];return this.addDisplayedLeafColumns(t),t},n.prototype.getDefinition=function(){return this.providedColumnGroup.getColGroupDef()},n.prototype.getColGroupDef=function(){return this.providedColumnGroup.getColGroupDef()},n.prototype.isPadding=function(){return this.providedColumnGroup.isPadding()},n.prototype.isExpandable=function(){return this.providedColumnGroup.isExpandable()},n.prototype.isExpanded=function(){return this.providedColumnGroup.isExpanded()},n.prototype.setExpanded=function(t){this.providedColumnGroup.setExpanded(t)},n.prototype.addDisplayedLeafColumns=function(t){this.displayedChildren.forEach(function(e){e instanceof Ne?t.push(e):e instanceof n&&e.addDisplayedLeafColumns(t)})},n.prototype.addLeafColumns=function(t){this.children.forEach(function(e){e instanceof Ne?t.push(e):e instanceof n&&e.addLeafColumns(t)})},n.prototype.getChildren=function(){return this.children},n.prototype.getColumnGroupShow=function(){return this.providedColumnGroup.getColumnGroupShow()},n.prototype.getProvidedColumnGroup=function(){return this.providedColumnGroup},n.prototype.getPaddingLevel=function(){var t=this.getParent();return!this.isPadding()||!t||!t.isPadding()?0:1+t.getPaddingLevel()},n.prototype.calculateDisplayedColumns=function(){var t=this;this.displayedChildren=[];for(var e=this;e!=null&&e.isPadding();)e=e.getParent();var r=e?e.providedColumnGroup.isExpandable():!1;if(!r){this.displayedChildren=this.children,this.localEventService.dispatchEvent(this.createAgEvent(n.EVENT_DISPLAYED_CHILDREN_CHANGED));return}this.children.forEach(function(o){var i=o instanceof n&&(!o.displayedChildren||!o.displayedChildren.length);if(!i){var a=o.getColumnGroupShow();switch(a){case"open":e.providedColumnGroup.isExpanded()&&t.displayedChildren.push(o);break;case"closed":e.providedColumnGroup.isExpanded()||t.displayedChildren.push(o);break;default:t.displayedChildren.push(o);break}}}),this.localEventService.dispatchEvent(this.createAgEvent(n.EVENT_DISPLAYED_CHILDREN_CHANGED))},n.EVENT_LEFT_CHANGED="leftChanged",n.EVENT_DISPLAYED_CHILDREN_CHANGED="displayedChildrenChanged",zV([w("gridOptionsService")],n.prototype,"gridOptionsService",void 0),n}(),_=function(){function n(){}return n.EVENT_COLUMN_EVERYTHING_CHANGED="columnEverythingChanged",n.EVENT_NEW_COLUMNS_LOADED="newColumnsLoaded",n.EVENT_COLUMN_PIVOT_MODE_CHANGED="columnPivotModeChanged",n.EVENT_COLUMN_ROW_GROUP_CHANGED="columnRowGroupChanged",n.EVENT_EXPAND_COLLAPSE_ALL="expandOrCollapseAll",n.EVENT_COLUMN_PIVOT_CHANGED="columnPivotChanged",n.EVENT_GRID_COLUMNS_CHANGED="gridColumnsChanged",n.EVENT_COLUMN_VALUE_CHANGED="columnValueChanged",n.EVENT_COLUMN_MOVED="columnMoved",n.EVENT_COLUMN_VISIBLE="columnVisible",n.EVENT_COLUMN_PINNED="columnPinned",n.EVENT_COLUMN_GROUP_OPENED="columnGroupOpened",n.EVENT_COLUMN_RESIZED="columnResized",n.EVENT_DISPLAYED_COLUMNS_CHANGED="displayedColumnsChanged",n.EVENT_VIRTUAL_COLUMNS_CHANGED="virtualColumnsChanged",n.EVENT_ASYNC_TRANSACTIONS_FLUSHED="asyncTransactionsFlushed",n.EVENT_ROW_GROUP_OPENED="rowGroupOpened",n.EVENT_ROW_DATA_CHANGED="rowDataChanged",n.EVENT_ROW_DATA_UPDATED="rowDataUpdated",n.EVENT_PINNED_ROW_DATA_CHANGED="pinnedRowDataChanged",n.EVENT_RANGE_SELECTION_CHANGED="rangeSelectionChanged",n.EVENT_CHART_CREATED="chartCreated",n.EVENT_CHART_RANGE_SELECTION_CHANGED="chartRangeSelectionChanged",n.EVENT_CHART_OPTIONS_CHANGED="chartOptionsChanged",n.EVENT_CHART_DESTROYED="chartDestroyed",n.EVENT_TOOL_PANEL_VISIBLE_CHANGED="toolPanelVisibleChanged",n.EVENT_TOOL_PANEL_SIZE_CHANGED="toolPanelSizeChanged",n.EVENT_COLUMN_PANEL_ITEM_DRAG_START="columnPanelItemDragStart",n.EVENT_COLUMN_PANEL_ITEM_DRAG_END="columnPanelItemDragEnd",n.EVENT_MODEL_UPDATED="modelUpdated",n.EVENT_CUT_START="cutStart",n.EVENT_CUT_END="cutEnd",n.EVENT_PASTE_START="pasteStart",n.EVENT_PASTE_END="pasteEnd",n.EVENT_FILL_START="fillStart",n.EVENT_FILL_END="fillEnd",n.EVENT_RANGE_DELETE_START="rangeDeleteStart",n.EVENT_RANGE_DELETE_END="rangeDeleteEnd",n.EVENT_UNDO_STARTED="undoStarted",n.EVENT_UNDO_ENDED="undoEnded",n.EVENT_REDO_STARTED="redoStarted",n.EVENT_REDO_ENDED="redoEnded",n.EVENT_KEY_SHORTCUT_CHANGED_CELL_START="keyShortcutChangedCellStart",n.EVENT_KEY_SHORTCUT_CHANGED_CELL_END="keyShortcutChangedCellEnd",n.EVENT_CELL_CLICKED="cellClicked",n.EVENT_CELL_DOUBLE_CLICKED="cellDoubleClicked",n.EVENT_CELL_MOUSE_DOWN="cellMouseDown",n.EVENT_CELL_CONTEXT_MENU="cellContextMenu",n.EVENT_CELL_VALUE_CHANGED="cellValueChanged",n.EVENT_CELL_EDIT_REQUEST="cellEditRequest",n.EVENT_ROW_VALUE_CHANGED="rowValueChanged",n.EVENT_CELL_FOCUSED="cellFocused",n.EVENT_CELL_FOCUS_CLEARED="cellFocusCleared",n.EVENT_FULL_WIDTH_ROW_FOCUSED="fullWidthRowFocused",n.EVENT_ROW_SELECTED="rowSelected",n.EVENT_SELECTION_CHANGED="selectionChanged",n.EVENT_TOOLTIP_SHOW="tooltipShow",n.EVENT_TOOLTIP_HIDE="tooltipHide",n.EVENT_CELL_KEY_DOWN="cellKeyDown",n.EVENT_CELL_MOUSE_OVER="cellMouseOver",n.EVENT_CELL_MOUSE_OUT="cellMouseOut",n.EVENT_FILTER_CHANGED="filterChanged",n.EVENT_FILTER_MODIFIED="filterModified",n.EVENT_FILTER_OPENED="filterOpened",n.EVENT_ADVANCED_FILTER_BUILDER_VISIBLE_CHANGED="advancedFilterBuilderVisibleChanged",n.EVENT_SORT_CHANGED="sortChanged",n.EVENT_VIRTUAL_ROW_REMOVED="virtualRowRemoved",n.EVENT_ROW_CLICKED="rowClicked",n.EVENT_ROW_DOUBLE_CLICKED="rowDoubleClicked",n.EVENT_GRID_READY="gridReady",n.EVENT_GRID_PRE_DESTROYED="gridPreDestroyed",n.EVENT_GRID_SIZE_CHANGED="gridSizeChanged",n.EVENT_VIEWPORT_CHANGED="viewportChanged",n.EVENT_SCROLLBAR_WIDTH_CHANGED="scrollbarWidthChanged",n.EVENT_FIRST_DATA_RENDERED="firstDataRendered",n.EVENT_DRAG_STARTED="dragStarted",n.EVENT_DRAG_STOPPED="dragStopped",n.EVENT_CHECKBOX_CHANGED="checkboxChanged",n.EVENT_ROW_EDITING_STARTED="rowEditingStarted",n.EVENT_ROW_EDITING_STOPPED="rowEditingStopped",n.EVENT_CELL_EDITING_STARTED="cellEditingStarted",n.EVENT_CELL_EDITING_STOPPED="cellEditingStopped",n.EVENT_BODY_SCROLL="bodyScroll",n.EVENT_BODY_SCROLL_END="bodyScrollEnd",n.EVENT_HEIGHT_SCALE_CHANGED="heightScaleChanged",n.EVENT_PAGINATION_CHANGED="paginationChanged",n.EVENT_COMPONENT_STATE_CHANGED="componentStateChanged",n.EVENT_STORE_REFRESHED="storeRefreshed",n.EVENT_BODY_HEIGHT_CHANGED="bodyHeightChanged",n.EVENT_DISPLAYED_COLUMNS_WIDTH_CHANGED="displayedColumnsWidthChanged",n.EVENT_SCROLL_VISIBILITY_CHANGED="scrollVisibilityChanged",n.EVENT_COLUMN_HOVER_CHANGED="columnHoverChanged",n.EVENT_FLASH_CELLS="flashCells",n.EVENT_PAGINATION_PIXEL_OFFSET_CHANGED="paginationPixelOffsetChanged",n.EVENT_DISPLAYED_ROWS_CHANGED="displayedRowsChanged",n.EVENT_LEFT_PINNED_WIDTH_CHANGED="leftPinnedWidthChanged",n.EVENT_RIGHT_PINNED_WIDTH_CHANGED="rightPinnedWidthChanged",n.EVENT_ROW_CONTAINER_HEIGHT_CHANGED="rowContainerHeightChanged",n.EVENT_HEADER_HEIGHT_CHANGED="headerHeightChanged",n.EVENT_COLUMN_HEADER_HEIGHT_CHANGED="columnHeaderHeightChanged",n.EVENT_ROW_DRAG_ENTER="rowDragEnter",n.EVENT_ROW_DRAG_MOVE="rowDragMove",n.EVENT_ROW_DRAG_LEAVE="rowDragLeave",n.EVENT_ROW_DRAG_END="rowDragEnd",n.EVENT_GRID_STYLES_CHANGED="gridStylesChanged",n.EVENT_POPUP_TO_FRONT="popupToFront",n.EVENT_COLUMN_ROW_GROUP_CHANGE_REQUEST="columnRowGroupChangeRequest",n.EVENT_COLUMN_PIVOT_CHANGE_REQUEST="columnPivotChangeRequest",n.EVENT_COLUMN_VALUE_CHANGE_REQUEST="columnValueChangeRequest",n.EVENT_COLUMN_AGG_FUNC_CHANGE_REQUEST="columnAggFuncChangeRequest",n.EVENT_KEYBOARD_FOCUS="keyboardFocus",n.EVENT_MOUSE_FOCUS="mouseFocus",n.EVENT_STORE_UPDATED="storeUpdated",n.EVENT_FILTER_DESTROYED="filterDestroyed",n.EVENT_ROW_DATA_UPDATE_STARTED="rowDataUpdateStarted",n.EVENT_ADVANCED_FILTER_ENABLED_CHANGED="advancedFilterEnabledChanged",n.EVENT_DATA_TYPES_INFERRED="dataTypesInferred",n.EVENT_FIELD_VALUE_CHANGED="fieldValueChanged",n.EVENT_FIELD_PICKER_VALUE_SELECTED="fieldPickerValueSelected",n}(),xS=function(){function n(){this.existingIds={}}return n.prototype.getInstanceIdForKey=function(t){var e=this.existingIds[t],r;return typeof e!="number"?r=0:r=e+1,this.existingIds[t]=r,r},n}(),qV=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(r[i]=o[i])},n(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");n(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}}(),sw=function(n,t,e,r){var o=arguments.length,i=o<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(n,t,e,r);else for(var s=n.length-1;s>=0;s--)(a=n[s])&&(i=(o<3?a(i):o>3?a(t,e,i):a(t,e))||i);return o>3&&i&&Object.defineProperty(t,e,i),i},Is="ag-Grid-AutoColumn",$V=function(n){qV(t,n);function t(){return n!==null&&n.apply(this,arguments)||this}return t.prototype.createAutoGroupColumns=function(e){var r=this,o=[],i=this.gridOptionsService.is("treeData"),a=this.gridOptionsService.isGroupMultiAutoColumn();return i&&a&&(console.warn('AG Grid: you cannot mix groupDisplayType = "multipleColumns" with treeData, only one column can be used to display groups when doing tree data'),a=!1),a?e.forEach(function(s,l){o.push(r.createOneAutoGroupColumn(s,l))}):o.push(this.createOneAutoGroupColumn()),o},t.prototype.updateAutoGroupColumns=function(e){var r=this;e.forEach(function(o,i){return r.updateOneAutoGroupColumn(o,i)})},t.prototype.createOneAutoGroupColumn=function(e,r){var o;e?o=Is+"-"+e.getId():o=Is;var i=this.createAutoGroupColDef(o,e,r);i.colId=o;var a=new Ne(i,null,o,!0);return this.context.createBean(a),a},t.prototype.updateOneAutoGroupColumn=function(e,r){var o=e.getColDef(),i=typeof o.showRowGroup=="string"?o.showRowGroup:void 0,a=i!=null?this.columnModel.getPrimaryColumn(i):void 0,s=this.createAutoGroupColDef(e.getId(),a??void 0,r);e.setColDef(s,null),this.columnFactory.applyColumnState(e,s)},t.prototype.createAutoGroupColDef=function(e,r,o){var i=this.createBaseColDef(r),a=this.gridOptionsService.get("autoGroupColumnDef");if(wn(i,a),i=this.columnFactory.addColumnDefaultAndTypes(i,e),!this.gridOptionsService.is("treeData")){var s=Z(i.field)&&Z(i.valueGetter)&&Z(i.filterValueGetter)&&i.filter!=="agGroupColumnFilter";s&&(i.filter=!1)}o&&o>0&&(i.headerCheckboxSelection=!1);var l=this.gridOptionsService.isColumnsSortingCoupledToGroup(),u=i.valueGetter||i.field!=null;return l&&!u&&(i.sortIndex=void 0,i.initialSort=void 0),i},t.prototype.createBaseColDef=function(e){var r=this.gridOptionsService.get("autoGroupColumnDef"),o=this.localeService.getLocaleTextFunc(),i={headerName:o("group","Group")},a=r&&(r.cellRenderer||r.cellRendererSelector);if(a||(i.cellRenderer="agGroupCellRenderer"),e){var s=e.getColDef();Object.assign(i,{headerName:this.columnModel.getDisplayNameForColumn(e,"header"),headerValueGetter:s.headerValueGetter}),s.cellRenderer&&Object.assign(i,{cellRendererParams:{innerRenderer:s.cellRenderer,innerRendererParams:s.cellRendererParams}}),i.showRowGroup=e.getColId()}else i.showRowGroup=!0;return i},sw([w("columnModel")],t.prototype,"columnModel",void 0),sw([w("columnFactory")],t.prototype,"columnFactory",void 0),t=sw([H("autoGroupColService")],t),t}(F),KV=/[&<>"']/g,YV={"&":"&","<":"<",">":">",'"':""","'":"'"};function XV(n){var t=String.fromCharCode;function e(d){var f=[];if(!d)return[];for(var p=d.length,h=0,v,C;h=55296&&v<=56319&&h=55296&&d<=57343)throw Error("Lone surrogate U+"+d.toString(16).toUpperCase()+" is not a scalar value")}function o(d,f){return t(d>>f&63|128)}function i(d){if(d>=0&&d<=31&&d!==10){var f=d.toString(16).toUpperCase(),p=f.padStart(4,"0");return"_x"+p+"_"}if(!(d&4294967168))return t(d);var h="";return d&4294965248?d&4294901760?d&4292870144||(h=t(d>>18&7|240),h+=o(d,12),h+=o(d,6)):(r(d),h=t(d>>12&15|224),h+=o(d,6)):h=t(d>>6&31|192),h+=t(d&63|128),h}for(var a=e(n),s=a.length,l=-1,u,c="";++l1?o.substring(1,o.length):"")}).join(" ")}function yD(n){return n.replace(/[A-Z]/g,function(t){return"-"+t.toLocaleLowerCase()})}var JV=Object.freeze({utf8_encode:XV,capitalise:QV,escapeString:xt,camelCaseToHumanText:mD,camelCaseToHyphenated:yD});function Da(n){var t=new Map;return n.forEach(function(e){return t.set(e[0],e[1])}),t}function ZV(n,t){var e=new Map;return n.forEach(function(r){return e.set(t(r),r)}),e}function eB(n){var t=[];return n.forEach(function(e,r){return t.push(r)}),t}var tB=Object.freeze({convertToMap:Da,mapById:ZV,keys:eB}),CD=function(){function n(){}return n.ColDefPropertyMap={headerName:void 0,columnGroupShow: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,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,columnsMenuParams: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,suppressCellFlash: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,suppressMenu: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,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},n.ALL_PROPERTIES=Object.keys(n.ColDefPropertyMap),n}(),va=function(n,t){var e=typeof Symbol=="function"&&n[Symbol.iterator];if(!e)return n;var r=e.call(n),o,i=[],a;try{for(;(t===void 0||t-- >0)&&!(o=r.next()).done;)i.push(o.value)}catch(s){a={error:s}}finally{try{o&&!o.done&&(e=r.return)&&e.call(r)}finally{if(a)throw a.error}}return i},ma=function(n,t){for(var e=0,r=t.length,o=n.length;e0)&&!(o=r.next()).done;)i.push(o.value)}catch(s){a={error:s}}finally{try{o&&!o.done&&(e=r.return)&&e.call(r)}finally{if(a)throw a.error}}return i},Nc=function(n,t){for(var e=0,r=t.length,o=n.length;e=n.length&&(n=void 0),{value:n&&n[r++],done:!n}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};function wD(n,t,e){var r={},o=n.filter(function(i){return!t.some(function(a){return a===i})});return o.length>0&&o.forEach(function(i){return r[i]=Sd(i,e).values}),r}function Sd(n,t,e,r){var o,i,a=t.map(function(h,v){return{value:h,relevance:nB(n.toLowerCase(),h.toLocaleLowerCase()),idx:v}});if(a.sort(function(h,v){return v.relevance-h.relevance}),e&&(a=a.filter(function(h){return h.relevance!==0})),a.length>0&&r&&r>0){var s=a[0].relevance,l=s*r;a=a.filter(function(h){return l-h.relevance<0})}var u=[],c=[];try{for(var d=rB(a),f=d.next();!f.done;f=d.next()){var p=f.value;u.push(p.value),c.push(p.idx)}}catch(h){o={error:h}}finally{try{f&&!f.done&&(i=d.return)&&i.call(d)}finally{if(o)throw o.error}}return{values:u,indices:c}}function nB(n,t){for(var e=n.replace(/\s/g,""),r=t.replace(/\s/g,""),o=0,i=-1,a=0;a=0;s--)(a=n[s])&&(i=(o<3?a(i):o>3?a(t,e,i):a(t,e))||i);return o>3&&i&&Object.defineProperty(t,e,i),i},ya=function(n,t){var e=typeof Symbol=="function"&&n[Symbol.iterator];if(!e)return n;var r=e.call(n),o,i=[],a;try{for(;(t===void 0||t-- >0)&&!(o=r.next()).done;)i.push(o.value)}catch(s){a={error:s}}finally{try{o&&!o.done&&(e=r.return)&&e.call(r)}finally{if(a)throw a.error}}return i},Ca=function(n,t){for(var e=0,r=t.length,o=n.length;e0&&ge(function(){return console.warn("AG Grid: to see all the valid "+o+" properties please check: "+i)},"invalidProperties"+o+i)},n.prototype.checkForDeprecated=function(){var t=this.gridOptions;Object.entries(this.deprecatedProperties).forEach(function(e){var r,o=ya(e,2),i=o[0],a=o[1],s=t[i];s&&(Xn(a.version,i,a.newProp,a.message),a.copyToNewProp&&a.newProp&&t[a.newProp]==null&&(t[a.newProp]=(r=a.newPropValue)!==null&&r!==void 0?r:s))}),t.serverSideStoreType&&(console.warn("AG Grid: since v29.0, `serverSideStoreType` has been replaced by `suppressServerSideInfiniteScroll`. Set to false to use Partial Store, and true to use Full Store."),t.suppressServerSideInfiniteScroll=t.serverSideStoreType!=="partial")},n.prototype.checkForViolations=function(){this.gridOptionsService.is("treeData")&&this.treeDataViolations()},n.prototype.treeDataViolations=function(){this.gridOptionsService.isRowModelType("clientSide")&&(this.gridOptionsService.exists("getDataPath")||console.warn("AG Grid: property usingTreeData=true with rowModel=clientSide, but you did not provide getDataPath function, please provide getDataPath function if using tree data.")),this.gridOptionsService.isRowModelType("serverSide")&&(this.gridOptionsService.exists("isServerSideGroup")||console.warn("AG Grid: property usingTreeData=true with rowModel=serverSide, but you did not provide isServerSideGroup function, please provide isServerSideGroup function if using tree data."),this.gridOptionsService.exists("getServerSideGroupKey")||console.warn("AG Grid: property usingTreeData=true with rowModel=serverSide, but you did not provide getServerSideGroupKey function, please provide getServerSideGroupKey function if using tree data."))},Gh([w("gridOptions")],n.prototype,"gridOptions",void 0),Gh([w("gridOptionsService")],n.prototype,"gridOptionsService",void 0),Gh([M],n.prototype,"init",null),n=Gh([H("gridOptionsValidator")],n),n}();function aS(n,t){var e=["groupRows","multipleColumns","custom","singleColumn"];return e.indexOf(t)<0?(console.warn("AG Grid: '"+t+"' is not a valid groupDisplayType value - possible values are: '"+e.join("', '")+"'"),!1):t===n}function aB(n,t){var e=["auto","custom"];return e.indexOf(t)<0?(console.warn("AG Grid: '"+t+"' is not a valid treeDataDisplayType value - possible values are: '"+e.join("', '")+"'"),!1):t===n}var sB=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(r[i]=o[i])},n(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");n(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}}(),Zt=function(n,t,e,r){var o=arguments.length,i=o<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(n,t,e,r);else for(var s=n.length-1;s>=0;s--)(a=n[s])&&(i=(o<3?a(i):o>3?a(t,e,i):a(t,e))||i);return o>3&&i&&Object.defineProperty(t,e,i),i},lB=function(n,t){return function(e,r){t(e,r,n)}},uB=function(n,t){var e={};for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&t.indexOf(r)<0&&(e[r]=n[r]);if(n!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(n);o0)&&!(o=r.next()).done;)i.push(o.value)}catch(s){a={error:s}}finally{try{o&&!o.done&&(e=r.return)&&e.call(r)}finally{if(a)throw a.error}}return i},mo=function(n,t){for(var e=0,r=t.length,o=n.length;e=n.length&&(n=void 0),{value:n&&n[r++],done:!n}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},SD=function(n){sB(t,n);function t(){var e=n!==null&&n.apply(this,arguments)||this;return e.primaryHeaderRowCount=0,e.secondaryHeaderRowCount=0,e.gridHeaderRowCount=0,e.displayedColumnsLeft=[],e.displayedColumnsRight=[],e.displayedColumnsCenter=[],e.displayedColumns=[],e.displayedColumnsAndGroupsMap={},e.viewportColumns=[],e.viewportColumnsHash="",e.headerViewportColumns=[],e.viewportColumnsCenter=[],e.headerViewportColumnsCenter=[],e.autoHeightActiveAtLeastOnce=!1,e.rowGroupColumns=[],e.valueColumns=[],e.pivotColumns=[],e.ready=!1,e.autoGroupsNeedBuilding=!1,e.forceRecreateAutoGroups=!1,e.pivotMode=!1,e.bodyWidth=0,e.leftWidth=0,e.rightWidth=0,e.bodyWidthDirty=!0,e.shouldQueueResizeOperations=!1,e.resizeOperationQueue=[],e}return t.prototype.init=function(){var e=this;this.suppressColumnVirtualisation=this.gridOptionsService.is("suppressColumnVirtualisation");var r=this.gridOptionsService.is("pivotMode");this.isPivotSettingAllowed(r)&&(this.pivotMode=r),this.addManagedPropertyListeners(["groupDisplayType","treeData"],function(){return e.buildAutoGroupColumns()}),this.addManagedPropertyListener("autoGroupColumnDef",function(){return e.onAutoGroupColumnDefChanged()}),this.addManagedPropertyListener("defaultColDef",function(o){return e.onSharedColDefChanged(o.source)}),this.addManagedPropertyListener("columnTypes",function(o){return e.onSharedColDefChanged(o.source)})},t.prototype.buildAutoGroupColumns=function(){this.columnDefs&&(this.autoGroupsNeedBuilding=!0,this.forceRecreateAutoGroups=!0,this.updateGridColumns(),this.updateDisplayedColumns("gridOptionsChanged"))},t.prototype.onAutoGroupColumnDefChanged=function(){this.groupAutoColumns&&this.autoGroupColService.updateAutoGroupColumns(this.groupAutoColumns)},t.prototype.onSharedColDefChanged=function(e){e===void 0&&(e="api"),this.groupAutoColumns&&this.autoGroupColService.updateAutoGroupColumns(this.groupAutoColumns),this.createColumnsFromColumnDefs(!0,e)},t.prototype.setColumnDefs=function(e,r){r===void 0&&(r="api");var o=!!this.columnDefs;this.columnDefs=e,this.createColumnsFromColumnDefs(o,r)},t.prototype.recreateColumnDefs=function(e){e===void 0&&(e="api"),this.onSharedColDefChanged(e)},t.prototype.destroyOldColumns=function(e,r){var o={};if(e){this.columnUtils.depthFirstOriginalTreeSearch(null,e,function(a){o[a.getInstanceId()]=a}),r&&this.columnUtils.depthFirstOriginalTreeSearch(null,r,function(a){o[a.getInstanceId()]=null});var i=Object.values(o).filter(function(a){return a!=null});this.destroyBeans(i)}},t.prototype.destroyColumns=function(){this.destroyOldColumns(this.primaryColumnTree),this.destroyOldColumns(this.secondaryBalancedTree),this.destroyOldColumns(this.groupAutoColsBalancedTree)},t.prototype.createColumnsFromColumnDefs=function(e,r){var o=this;r===void 0&&(r="api");var i=e?this.compareColumnStatesAndDispatchEvents(r):void 0;this.valueCache.expire(),this.autoGroupsNeedBuilding=!0;var a=this.primaryColumns,s=this.primaryColumnTree,l=this.columnFactory.createColumnTree(this.columnDefs,!0,s);this.destroyOldColumns(this.primaryColumnTree,l.columnTree),this.primaryColumnTree=l.columnTree,this.primaryHeaderRowCount=l.treeDept+1,this.primaryColumns=this.getColumnsFromTree(this.primaryColumnTree),this.primaryColumnsMap={},this.primaryColumns.forEach(function(d){return o.primaryColumnsMap[d.getId()]=d}),this.extractRowGroupColumns(r,a),this.extractPivotColumns(r,a),this.extractValueColumns(r,a),this.ready=!0;var u=this.gridColsArePrimary===void 0,c=this.gridColsArePrimary||u||this.autoGroupsNeedBuilding;c&&(this.updateGridColumns(),e&&this.gridColsArePrimary&&!this.gridOptionsService.is("maintainColumnOrder")&&this.orderGridColumnsLikePrimary(),this.updateDisplayedColumns(r),this.checkViewportColumns()),this.dispatchEverythingChanged(r),i&&i(),this.dispatchNewColumnsLoaded(r)},t.prototype.dispatchNewColumnsLoaded=function(e){var r={type:_.EVENT_NEW_COLUMNS_LOADED,source:e};this.eventService.dispatchEvent(r)},t.prototype.dispatchEverythingChanged=function(e){e===void 0&&(e="api");var r={type:_.EVENT_COLUMN_EVERYTHING_CHANGED,source:e};this.eventService.dispatchEvent(r)},t.prototype.orderGridColumnsLikePrimary=function(){var e=this,r=this.primaryColumns;if(r){var o=r.filter(function(a){return e.gridColumns.indexOf(a)>=0}),i=this.gridColumns.filter(function(a){return o.indexOf(a)<0});this.gridColumns=mo(mo([],vo(i)),vo(o)),this.gridColumns=this.placeLockedColumns(this.gridColumns)}},t.prototype.getAllDisplayedAutoHeightCols=function(){return this.displayedAutoHeightCols},t.prototype.setViewport=function(){this.gridOptionsService.is("enableRtl")?(this.viewportLeft=this.bodyWidth-this.scrollPosition-this.scrollWidth,this.viewportRight=this.bodyWidth-this.scrollPosition):(this.viewportLeft=this.scrollPosition,this.viewportRight=this.scrollWidth+this.scrollPosition)},t.prototype.getDisplayedColumnsStartingAt=function(e){for(var r=e,o=[];r!=null;)o.push(r),r=this.getDisplayedColAfter(r);return o},t.prototype.checkViewportColumns=function(e){if(e===void 0&&(e=!1),this.displayedColumnsCenter!=null){var r=this.extractViewport();if(r){var o={type:_.EVENT_VIRTUAL_COLUMNS_CHANGED,afterScroll:e};this.eventService.dispatchEvent(o)}}},t.prototype.setViewportPosition=function(e,r,o){o===void 0&&(o=!1),(e!==this.scrollWidth||r!==this.scrollPosition||this.bodyWidthDirty)&&(this.scrollWidth=e,this.scrollPosition=r,this.bodyWidthDirty=!0,this.setViewport(),this.ready&&this.checkViewportColumns(o))},t.prototype.isPivotMode=function(){return this.pivotMode},t.prototype.isPivotSettingAllowed=function(e){return e&&this.gridOptionsService.is("treeData")?(console.warn("AG Grid: Pivot mode not available in conjunction Tree Data i.e. 'gridOptions.treeData: true'"),!1):!0},t.prototype.setPivotMode=function(e,r){if(r===void 0&&(r="api"),!(e===this.pivotMode||!this.isPivotSettingAllowed(this.pivotMode))){this.pivotMode=e,this.autoGroupsNeedBuilding=!0,this.updateGridColumns(),this.updateDisplayedColumns(r);var o={type:_.EVENT_COLUMN_PIVOT_MODE_CHANGED};this.eventService.dispatchEvent(o)}},t.prototype.getSecondaryPivotColumn=function(e,r){if(Z(this.secondaryColumns))return null;var o=this.getPrimaryColumn(r),i=null;return this.secondaryColumns.forEach(function(a){var s=a.getColDef().pivotKeys,l=a.getColDef().pivotValueColumn,u=Aa(s,e),c=l===o;u&&c&&(i=a)}),i},t.prototype.setBeans=function(e){this.logger=e.create("columnModel")},t.prototype.setFirstRightAndLastLeftPinned=function(e){var r,o;this.gridOptionsService.is("enableRtl")?(r=this.displayedColumnsLeft?this.displayedColumnsLeft[0]:null,o=this.displayedColumnsRight?Ge(this.displayedColumnsRight):null):(r=this.displayedColumnsLeft?Ge(this.displayedColumnsLeft):null,o=this.displayedColumnsRight?this.displayedColumnsRight[0]:null),this.gridColumns.forEach(function(i){i.setLastLeftPinned(i===r,e),i.setFirstRightPinned(i===o,e)})},t.prototype.autoSizeColumns=function(e){var r=this;if(this.shouldQueueResizeOperations){this.resizeOperationQueue.push(function(){return r.autoSizeColumns(e)});return}var o=e.columns,i=e.skipHeader,a=e.skipHeaderGroups,s=e.stopAtGroup,l=e.source,u=l===void 0?"api":l;this.animationFrameService.flushAllFrames();for(var c=[],d=-1,f=i??this.gridOptionsService.is("skipHeaderOnAutoSize"),p=a??f;d!==0;)d=0,this.actionOnGridColumns(o,function(h){if(c.indexOf(h)>=0)return!1;var v=r.autoWidthCalculator.getPreferredWidthForColumn(h,f);if(v>0){var C=r.normaliseColumnWidth(h,v);h.setActualWidth(C,u),c.push(h),d++}return!0},u);p||this.autoSizeColumnGroupsByColumns(o,u,s),this.dispatchColumnResizedEvent(c,!0,"autosizeColumns")},t.prototype.dispatchColumnResizedEvent=function(e,r,o,i){if(i===void 0&&(i=null),e&&e.length){var a={type:_.EVENT_COLUMN_RESIZED,columns:e,column:e.length===1?e[0]:null,flexColumns:i,finished:r,source:o};this.eventService.dispatchEvent(a)}},t.prototype.dispatchColumnChangedEvent=function(e,r,o){var i={type:e,columns:r,column:r&&r.length==1?r[0]:null,source:o};this.eventService.dispatchEvent(i)},t.prototype.dispatchColumnMovedEvent=function(e){var r=e.movedColumns,o=e.source,i=e.toIndex,a=e.finished,s={type:_.EVENT_COLUMN_MOVED,columns:r,column:r&&r.length===1?r[0]:null,toIndex:i,finished:a,source:o};this.eventService.dispatchEvent(s)},t.prototype.dispatchColumnPinnedEvent=function(e,r){if(e.length){var o=e.length===1?e[0]:null,i=this.getCommonValue(e,function(s){return s.getPinned()}),a={type:_.EVENT_COLUMN_PINNED,pinned:i??null,columns:e,column:o,source:r};this.eventService.dispatchEvent(a)}},t.prototype.dispatchColumnVisibleEvent=function(e,r){if(e.length){var o=e.length===1?e[0]:null,i=this.getCommonValue(e,function(s){return s.isVisible()}),a={type:_.EVENT_COLUMN_VISIBLE,visible:i,columns:e,column:o,source:r};this.eventService.dispatchEvent(a)}},t.prototype.autoSizeColumn=function(e,r,o){o===void 0&&(o="api"),e&&this.autoSizeColumns({columns:[e],skipHeader:r,skipHeaderGroups:!0,source:o})},t.prototype.autoSizeColumnGroupsByColumns=function(e,r,o){var i,a,s,l,u=new Set,c=this.getGridColumns(e);c.forEach(function(S){for(var E=S.getParent();E&&E!=o;)E.isPadding()||u.add(E),E=E.getParent()});var d,f=[];try{for(var p=ZL(u),h=p.next();!h.done;h=p.next()){var v=h.value;try{for(var C=(s=void 0,ZL(this.ctrlsService.getHeaderRowContainerCtrls())),m=C.next();!m.done;m=C.next()){var y=m.value;if(d=y.getHeaderCtrlForColumn(v),d)break}}catch(S){s={error:S}}finally{try{m&&!m.done&&(l=C.return)&&l.call(C)}finally{if(s)throw s.error}}d&&d.resizeLeafColumnsToFit(r)}}catch(S){i={error:S}}finally{try{h&&!h.done&&(a=p.return)&&a.call(p)}finally{if(i)throw i.error}}return f},t.prototype.autoSizeAllColumns=function(e,r){var o=this;if(r===void 0&&(r="api"),this.shouldQueueResizeOperations){this.resizeOperationQueue.push(function(){return o.autoSizeAllColumns(e,r)});return}var i=this.getAllDisplayedColumns();this.autoSizeColumns({columns:i,skipHeader:e,source:r})},t.prototype.getColumnsFromTree=function(e){var r=[],o=function(i){for(var a=0;a=0},t.prototype.getAllDisplayedColumns=function(){return this.displayedColumns},t.prototype.getViewportColumns=function(){return this.viewportColumns},t.prototype.getDisplayedLeftColumnsForRow=function(e){return this.colSpanActive?this.getDisplayedColumnsForRow(e,this.displayedColumnsLeft):this.displayedColumnsLeft},t.prototype.getDisplayedRightColumnsForRow=function(e){return this.colSpanActive?this.getDisplayedColumnsForRow(e,this.displayedColumnsRight):this.displayedColumnsRight},t.prototype.isColSpanActive=function(){return this.colSpanActive},t.prototype.getDisplayedColumnsForRow=function(e,r,o,i){for(var a=[],s=null,l=function(d){var f=r[d],p=r.length-d,h=Math.min(f.getColSpan(e),p),v=[f];if(h>1){for(var C=h-1,m=1;m<=C;m++)v.push(r[d+m]);d+=C}var y;if(o?(y=!1,v.forEach(function(E){o(E)&&(y=!0)})):y=!0,y){if(a.length===0&&s){var S=i?i(f):!1;S&&a.push(s)}a.push(f)}s=f,u=d},u,c=0;cr.viewportLeft},i=this.suppressColumnVirtualisation?null:this.isColumnInRowViewport.bind(this);return this.getDisplayedColumnsForRow(e,this.displayedColumnsCenter,i,o)},t.prototype.getAriaColumnIndex=function(e){return this.getAllGridColumns().indexOf(e)+1},t.prototype.isColumnInHeaderViewport=function(e){return e.isAutoHeaderHeight()?!0:this.isColumnInRowViewport(e)},t.prototype.isColumnInRowViewport=function(e){if(e.isAutoHeight())return!0;var r=e.getLeft()||0,o=r+e.getActualWidth(),i=this.viewportLeft-200,a=this.viewportRight+200,s=ra&&o>a;return!s&&!l},t.prototype.getDisplayedColumnsLeftWidth=function(){return this.getWidthOfColsInList(this.displayedColumnsLeft)},t.prototype.getDisplayedColumnsRightWidth=function(){return this.getWidthOfColsInList(this.displayedColumnsRight)},t.prototype.updatePrimaryColumnList=function(e,r,o,i,a,s){var l=this;if(s===void 0&&(s="api"),!(!e||Cn(e))){var u=!1;if(e.forEach(function(d){var f=l.getPrimaryColumn(d);if(f){if(o){if(r.indexOf(f)>=0)return;r.push(f)}else{if(r.indexOf(f)<0)return;mn(r,f)}i(f),u=!0}}),!!u){this.autoGroupsNeedBuilding&&this.updateGridColumns(),this.updateDisplayedColumns(s);var c={type:a,columns:r,column:r.length===1?r[0]:null,source:s};this.eventService.dispatchEvent(c)}}},t.prototype.setRowGroupColumns=function(e,r){r===void 0&&(r="api"),this.autoGroupsNeedBuilding=!0,this.setPrimaryColumnList(e,this.rowGroupColumns,_.EVENT_COLUMN_ROW_GROUP_CHANGED,!0,this.setRowGroupActive.bind(this),r)},t.prototype.setRowGroupActive=function(e,r,o){e!==r.isRowGroupActive()&&(r.setRowGroupActive(e,o),e&&!this.gridOptionsService.is("suppressRowGroupHidesColumns")&&this.setColumnVisible(r,!1,o),!e&&!this.gridOptionsService.is("suppressMakeColumnVisibleAfterUnGroup")&&this.setColumnVisible(r,!0,o))},t.prototype.addRowGroupColumn=function(e,r){r===void 0&&(r="api"),e&&this.addRowGroupColumns([e],r)},t.prototype.addRowGroupColumns=function(e,r){r===void 0&&(r="api"),this.autoGroupsNeedBuilding=!0,this.updatePrimaryColumnList(e,this.rowGroupColumns,!0,this.setRowGroupActive.bind(this,!0),_.EVENT_COLUMN_ROW_GROUP_CHANGED,r)},t.prototype.removeRowGroupColumns=function(e,r){r===void 0&&(r="api"),this.autoGroupsNeedBuilding=!0,this.updatePrimaryColumnList(e,this.rowGroupColumns,!1,this.setRowGroupActive.bind(this,!1),_.EVENT_COLUMN_ROW_GROUP_CHANGED,r)},t.prototype.removeRowGroupColumn=function(e,r){r===void 0&&(r="api"),e&&this.removeRowGroupColumns([e],r)},t.prototype.addPivotColumns=function(e,r){r===void 0&&(r="api"),this.updatePrimaryColumnList(e,this.pivotColumns,!0,function(o){return o.setPivotActive(!0,r)},_.EVENT_COLUMN_PIVOT_CHANGED,r)},t.prototype.setPivotColumns=function(e,r){r===void 0&&(r="api"),this.setPrimaryColumnList(e,this.pivotColumns,_.EVENT_COLUMN_PIVOT_CHANGED,!0,function(o,i){i.setPivotActive(o,r)},r)},t.prototype.addPivotColumn=function(e,r){r===void 0&&(r="api"),this.addPivotColumns([e],r)},t.prototype.removePivotColumns=function(e,r){r===void 0&&(r="api"),this.updatePrimaryColumnList(e,this.pivotColumns,!1,function(o){return o.setPivotActive(!1,r)},_.EVENT_COLUMN_PIVOT_CHANGED,r)},t.prototype.removePivotColumn=function(e,r){r===void 0&&(r="api"),this.removePivotColumns([e],r)},t.prototype.setPrimaryColumnList=function(e,r,o,i,a,s){var l=this,u=new Map;r.forEach(function(c,d){return u.set(c,d)}),r.length=0,D(e)&&e.forEach(function(c){var d=l.getPrimaryColumn(c);d&&r.push(d)}),r.forEach(function(c,d){var f=u.get(c);if(f===void 0){u.set(c,0);return}i&&f!==d||u.delete(c)}),(this.primaryColumns||[]).forEach(function(c){var d=r.indexOf(c)>=0;a(d,c)}),this.autoGroupsNeedBuilding&&this.updateGridColumns(),this.updateDisplayedColumns(s),this.dispatchColumnChangedEvent(o,mo([],vo(u.keys())),s)},t.prototype.setValueColumns=function(e,r){r===void 0&&(r="api"),this.setPrimaryColumnList(e,this.valueColumns,_.EVENT_COLUMN_VALUE_CHANGED,!1,this.setValueActive.bind(this),r)},t.prototype.setValueActive=function(e,r,o){if(e!==r.isValueActive()&&(r.setValueActive(e,o),e&&!r.getAggFunc())){var i=this.aggFuncService.getDefaultAggFunc(r);r.setAggFunc(i)}},t.prototype.addValueColumns=function(e,r){r===void 0&&(r="api"),this.updatePrimaryColumnList(e,this.valueColumns,!0,this.setValueActive.bind(this,!0),_.EVENT_COLUMN_VALUE_CHANGED,r)},t.prototype.addValueColumn=function(e,r){r===void 0&&(r="api"),e&&this.addValueColumns([e],r)},t.prototype.removeValueColumn=function(e,r){r===void 0&&(r="api"),this.removeValueColumns([e],r)},t.prototype.removeValueColumns=function(e,r){r===void 0&&(r="api"),this.updatePrimaryColumnList(e,this.valueColumns,!1,this.setValueActive.bind(this,!1),_.EVENT_COLUMN_VALUE_CHANGED,r)},t.prototype.normaliseColumnWidth=function(e,r){var o=e.getMinWidth();D(o)&&r0?a+=f:s=!1});var l=o>=i,u=!s||o<=a;return l&&u},t.prototype.resizeColumnSets=function(e){var r=this,o=e.resizeSets,i=e.finished,a=e.source,s=!o||o.every(function(h){return r.checkMinAndMaxWidthsForSet(h)});if(!s){if(i){var l=o&&o.length>0?o[0].columns:null;this.dispatchColumnResizedEvent(l,i,a)}return}var u=[],c=[];o.forEach(function(h){var v=h.width,C=h.columns,m=h.ratios,y={},S={};C.forEach(function(T){return c.push(T)});for(var E=!0,R=0,x=function(){if(R++,R>1e3)return console.error("AG Grid: infinite loop in resizeColumnSets"),"break";E=!1;var T=[],L=0,I=v;C.forEach(function(W,Y){var ue=S[W.getId()];if(ue)I-=y[W.getId()];else{T.push(W);var ee=m[Y];L+=ee}});var b=1/L;T.forEach(function(W,Y){var ue=Y===T.length-1,ee;ue?ee=I:(ee=Math.round(m[Y]*v*b),I-=ee);var oe=W.getMinWidth(),U=W.getMaxWidth();D(oe)&&ee0&&ee>U&&(ee=U,S[W.getId()]=!0,E=!0),y[W.getId()]=ee})};E;){var P=x();if(P==="break")break}C.forEach(function(T){var L=y[T.getId()],I=T.getActualWidth();I!==L&&(T.setActualWidth(L,a),u.push(T))})});var d=u.length>0,f=[];d&&(f=this.refreshFlexedColumns({resizingCols:c,skipSetLeft:!0}),this.setLeftValues(a),this.updateBodyWidths(),this.checkViewportColumns());var p=c.concat(f);(d||i)&&this.dispatchColumnResizedEvent(p,i,a,f)},t.prototype.setColumnAggFunc=function(e,r,o){if(o===void 0&&(o="api"),!!e){var i=this.getPrimaryColumn(e);i&&(i.setAggFunc(r),this.dispatchColumnChangedEvent(_.EVENT_COLUMN_VALUE_CHANGED,[i],o))}},t.prototype.moveRowGroupColumn=function(e,r,o){o===void 0&&(o="api");var i=this.rowGroupColumns[e],a=this.rowGroupColumns.slice(e,r);this.rowGroupColumns.splice(e,1),this.rowGroupColumns.splice(r,0,i);var s={type:_.EVENT_COLUMN_ROW_GROUP_CHANGED,columns:a,column:a.length===1?a[0]:null,source:o};this.eventService.dispatchEvent(s)},t.prototype.moveColumns=function(e,r,o,i){if(o===void 0&&(o="api"),i===void 0&&(i=!0),this.columnAnimationService.start(),r>this.gridColumns.length-e.length){console.warn("AG Grid: tried to insert columns in invalid location, toIndex = "+r),console.warn("AG Grid: remember that you should not count the moving columns when calculating the new index");return}var a=this.getGridColumns(e),s=!this.doesMovePassRules(a,r);s||(nS(this.gridColumns,a,r),this.updateDisplayedColumns(o),this.dispatchColumnMovedEvent({movedColumns:a,source:o,toIndex:r,finished:i}),this.columnAnimationService.finish())},t.prototype.doesMovePassRules=function(e,r){var o=this.getProposedColumnOrder(e,r);return this.doesOrderPassRules(o)},t.prototype.doesOrderPassRules=function(e){return!(!this.doesMovePassMarryChildren(e)||!this.doesMovePassLockedPositions(e))},t.prototype.getProposedColumnOrder=function(e,r){var o=this.gridColumns.slice();return nS(o,e,r),o},t.prototype.sortColumnsLikeGridColumns=function(e){var r=this;if(!(!e||e.length<=1)){var o=e.filter(function(i){return r.gridColumns.indexOf(i)<0}).length>0;o||e.sort(function(i,a){var s=r.gridColumns.indexOf(i),l=r.gridColumns.indexOf(a);return s-l})}},t.prototype.doesMovePassLockedPositions=function(e){var r=0,o=!0,i=function(a){return a?a===!0||a==="left"?0:2:1};return e.forEach(function(a){var s=i(a.getColDef().lockPosition);sf&&(r=!1)}}}),r},t.prototype.moveColumn=function(e,r,o){o===void 0&&(o="api"),this.moveColumns([e],r,o)},t.prototype.moveColumnByIndex=function(e,r,o){o===void 0&&(o="api");var i=this.gridColumns[e];this.moveColumn(i,r,o)},t.prototype.getColumnDefs=function(){var e=this;if(this.primaryColumns){var r=this.primaryColumns.slice();return this.gridColsArePrimary?r.sort(function(o,i){return e.gridColumns.indexOf(o)-e.gridColumns.indexOf(i)}):this.lastPrimaryOrder&&r.sort(function(o,i){return e.lastPrimaryOrder.indexOf(o)-e.lastPrimaryOrder.indexOf(i)}),this.columnDefFactory.buildColumnDefs(r,this.rowGroupColumns,this.pivotColumns)}},t.prototype.getBodyContainerWidth=function(){return this.bodyWidth},t.prototype.getContainerWidth=function(e){switch(e){case"left":return this.leftWidth;case"right":return this.rightWidth;default:return this.bodyWidth}},t.prototype.updateBodyWidths=function(){var e=this.getWidthOfColsInList(this.displayedColumnsCenter),r=this.getWidthOfColsInList(this.displayedColumnsLeft),o=this.getWidthOfColsInList(this.displayedColumnsRight);this.bodyWidthDirty=this.bodyWidth!==e;var i=this.bodyWidth!==e||this.leftWidth!==r||this.rightWidth!==o;if(i){this.bodyWidth=e,this.leftWidth=r,this.rightWidth=o;var a={type:_.EVENT_DISPLAYED_COLUMNS_WIDTH_CHANGED};this.eventService.dispatchEvent(a)}},t.prototype.getValueColumns=function(){return this.valueColumns?this.valueColumns:[]},t.prototype.getPivotColumns=function(){return this.pivotColumns?this.pivotColumns:[]},t.prototype.isPivotActive=function(){return this.pivotColumns&&this.pivotColumns.length>0&&this.pivotMode},t.prototype.getRowGroupColumns=function(){return this.rowGroupColumns?this.rowGroupColumns:[]},t.prototype.getDisplayedCenterColumns=function(){return this.displayedColumnsCenter},t.prototype.getDisplayedLeftColumns=function(){return this.displayedColumnsLeft},t.prototype.getDisplayedRightColumns=function(){return this.displayedColumnsRight},t.prototype.getDisplayedColumns=function(e){switch(e){case"left":return this.getDisplayedLeftColumns();case"right":return this.getDisplayedRightColumns();default:return this.getDisplayedCenterColumns()}},t.prototype.getAllPrimaryColumns=function(){return this.primaryColumns?this.primaryColumns.slice():null},t.prototype.getSecondaryColumns=function(){return this.secondaryColumns?this.secondaryColumns.slice():null},t.prototype.getAllColumnsForQuickFilter=function(){return this.columnsForQuickFilter},t.prototype.getAllGridColumns=function(){return this.gridColumns},t.prototype.isEmpty=function(){return Cn(this.gridColumns)},t.prototype.isRowGroupEmpty=function(){return Cn(this.rowGroupColumns)},t.prototype.setColumnVisible=function(e,r,o){o===void 0&&(o="api"),this.setColumnsVisible([e],r,o)},t.prototype.setColumnsVisible=function(e,r,o){r===void 0&&(r=!1),o===void 0&&(o="api"),this.applyColumnState({state:e.map(function(i){return{colId:typeof i=="string"?i:i.getColId(),hide:!r}})},o)},t.prototype.setColumnPinned=function(e,r,o){o===void 0&&(o="api"),e&&this.setColumnsPinned([e],r,o)},t.prototype.setColumnsPinned=function(e,r,o){if(o===void 0&&(o="api"),this.gridOptionsService.isDomLayout("print")){console.warn("AG Grid: Changing the column pinning status is not allowed with domLayout='print'");return}this.columnAnimationService.start();var i;r===!0||r==="left"?i="left":r==="right"?i="right":i=null,this.actionOnGridColumns(e,function(a){return a.getPinned()!==i?(a.setPinned(i),!0):!1},o,function(){var a={type:_.EVENT_COLUMN_PINNED,pinned:i,column:null,columns:null,source:o};return a}),this.columnAnimationService.finish()},t.prototype.actionOnGridColumns=function(e,r,o,i){var a=this;if(!Cn(e)){var s=[];if(e.forEach(function(u){var c=a.getGridColumn(u);if(c){var d=r(c);d!==!1&&s.push(c)}}),!!s.length&&(this.updateDisplayedColumns(o),D(i)&&i)){var l=i();l.columns=s,l.column=s.length===1?s[0]:null,this.eventService.dispatchEvent(l)}}},t.prototype.getDisplayedColBefore=function(e){var r=this.getAllDisplayedColumns(),o=r.indexOf(e);return o>0?r[o-1]:null},t.prototype.getDisplayedColAfter=function(e){var r=this.getAllDisplayedColumns(),o=r.indexOf(e);return o0},t.prototype.isPinningRight=function(){return this.displayedColumnsRight.length>0},t.prototype.getPrimaryAndSecondaryAndAutoColumns=function(){var e;return(e=[]).concat.apply(e,[this.primaryColumns||[],this.groupAutoColumns||[],this.secondaryColumns||[]])},t.prototype.createStateItemFromColumn=function(e){var r=e.isRowGroupActive()?this.rowGroupColumns.indexOf(e):null,o=e.isPivotActive()?this.pivotColumns.indexOf(e):null,i=e.isValueActive()?e.getAggFunc():null,a=e.getSort()!=null?e.getSort():null,s=e.getSortIndex()!=null?e.getSortIndex():null,l=e.getFlex()!=null&&e.getFlex()>0?e.getFlex():null,u={colId:e.getColId(),width:e.getActualWidth(),hide:!e.isVisible(),pinned:e.getPinned(),sort:a,sortIndex:s,aggFunc:i,rowGroup:e.isRowGroupActive(),rowGroupIndex:r,pivot:e.isPivotActive(),pivotIndex:o,flex:l};return u},t.prototype.getColumnState=function(){if(Z(this.primaryColumns)||!this.isAlive())return[];var e=this.getPrimaryAndSecondaryAndAutoColumns(),r=e.map(this.createStateItemFromColumn.bind(this));return this.orderColumnStateList(r),r},t.prototype.orderColumnStateList=function(e){var r=Da(this.gridColumns.map(function(o,i){return[o.getColId(),i]}));e.sort(function(o,i){var a=r.has(o.colId)?r.get(o.colId):-1,s=r.has(i.colId)?r.get(i.colId):-1;return a-s})},t.prototype.resetColumnState=function(e){var r=this;e===void 0&&(e="api");var o=this.getColumnsFromTree(this.primaryColumnTree),i=[],a=1e3,s=1e3,l=[];this.groupAutoColumns&&(l=l.concat(this.groupAutoColumns)),o&&(l=l.concat(o)),l.forEach(function(u){var c=r.getColumnStateFromColDef(u);Z(c.rowGroupIndex)&&c.rowGroup&&(c.rowGroupIndex=a++),Z(c.pivotIndex)&&c.pivot&&(c.pivotIndex=s++),i.push(c)}),this.applyColumnState({state:i,applyOrder:!0},e)},t.prototype.getColumnStateFromColDef=function(e){var r=function(C,m){return C??m??null},o=e.getColDef(),i=r(o.sort,o.initialSort),a=r(o.sortIndex,o.initialSortIndex),s=r(o.hide,o.initialHide),l=r(o.pinned,o.initialPinned),u=r(o.width,o.initialWidth),c=r(o.flex,o.initialFlex),d=r(o.rowGroupIndex,o.initialRowGroupIndex),f=r(o.rowGroup,o.initialRowGroup);d==null&&(f==null||f==!1)&&(d=null,f=null);var p=r(o.pivotIndex,o.initialPivotIndex),h=r(o.pivot,o.initialPivot);p==null&&(h==null||h==!1)&&(p=null,h=null);var v=r(o.aggFunc,o.initialAggFunc);return{colId:e.getColId(),sort:i,sortIndex:a,hide:s,pinned:l,width:u,flex:c,rowGroup:f,rowGroupIndex:d,pivot:h,pivotIndex:p,aggFunc:v}},t.prototype.applyColumnState=function(e,r){var o=this;if(Cn(this.primaryColumns))return!1;if(e&&e.state&&!e.state.forEach)return console.warn("AG Grid: 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."),!1;var i=function(u,c,d){var f=o.compareColumnStatesAndDispatchEvents(r);o.autoGroupsNeedBuilding=!0;var p=c.slice(),h={},v={},C=[],m=[],y=0,S=o.rowGroupColumns.slice(),E=o.pivotColumns.slice();u.forEach(function(T){var L=T.colId||"",I=L.startsWith(Is);if(I){C.push(T),m.push(T);return}var b=d(L);b?(o.syncColumnWithStateItem(b,T,e.defaultState,h,v,!1,r),mn(p,b)):(m.push(T),y+=1)});var R=function(T){return o.syncColumnWithStateItem(T,null,e.defaultState,h,v,!1,r)};p.forEach(R);var x=function(T,L,I,b){var W=T[I.getId()],Y=T[b.getId()],ue=W!=null,ee=Y!=null;if(ue&&ee)return W-Y;if(ue)return-1;if(ee)return 1;var oe=L.indexOf(I),U=L.indexOf(b),$=oe>=0,ne=U>=0;return $&&ne?oe-U:$?-1:1};o.rowGroupColumns.sort(x.bind(o,h,S)),o.pivotColumns.sort(x.bind(o,v,E)),o.updateGridColumns();var P=o.groupAutoColumns?o.groupAutoColumns.slice():[];return C.forEach(function(T){var L=o.getAutoColumn(T.colId);mn(P,L),o.syncColumnWithStateItem(L,T,e.defaultState,null,null,!0,r)}),P.forEach(R),o.applyOrderAfterApplyState(e),o.updateDisplayedColumns(r),o.dispatchEverythingChanged(r),f(),{unmatchedAndAutoStates:m,unmatchedCount:y}};this.columnAnimationService.start();var a=i(e.state||[],this.primaryColumns||[],function(u){return o.getPrimaryColumn(u)}),s=a.unmatchedAndAutoStates,l=a.unmatchedCount;return(s.length>0||D(e.defaultState))&&(l=i(s,this.secondaryColumns||[],function(u){return o.getSecondaryColumn(u)}).unmatchedCount),this.columnAnimationService.finish(),l===0},t.prototype.applyOrderAfterApplyState=function(e){var r=this;if(!(!e.applyOrder||!e.state)){var o=[],i={};e.state.forEach(function(s){if(!(!s.colId||i[s.colId])){var l=r.gridColumnsMap[s.colId];l&&(o.push(l),i[s.colId]=!0)}});var a=0;if(this.gridColumns.forEach(function(s){var l=s.getColId(),u=i[l]!=null;if(!u){var c=l.startsWith(Is);c?pd(o,s,a++):o.push(s)}}),o=this.placeLockedColumns(o),!this.doesMovePassMarryChildren(o)){console.warn("AG Grid: Applying column order broke a group where columns should be married together. Applying new order has been discarded.");return}this.gridColumns=o}},t.prototype.compareColumnStatesAndDispatchEvents=function(e){var r=this,o={rowGroupColumns:this.rowGroupColumns.slice(),pivotColumns:this.pivotColumns.slice(),valueColumns:this.valueColumns.slice()},i=this.getColumnState(),a={};return i.forEach(function(s){a[s.colId]=s}),function(){var s=r.getPrimaryAndSecondaryAndAutoColumns(),l=function(m,y,S,E){var R=y.map(E),x=S.map(E),P=Aa(R,x);if(!P){var T=new Set(y);S.forEach(function(b){T.delete(b)||T.add(b)});var L=mo([],vo(T)),I={type:m,columns:L,column:L.length===1?L[0]:null,source:e};r.eventService.dispatchEvent(I)}},u=function(m){var y=[];return s.forEach(function(S){var E=a[S.getColId()];E&&m(E,S)&&y.push(S)}),y},c=function(m){return m.getColId()};l(_.EVENT_COLUMN_ROW_GROUP_CHANGED,o.rowGroupColumns,r.rowGroupColumns,c),l(_.EVENT_COLUMN_PIVOT_CHANGED,o.pivotColumns,r.pivotColumns,c);var d=function(m,y){var S=m.aggFunc!=null,E=S!=y.isValueActive(),R=S&&m.aggFunc!=y.getAggFunc();return E||R},f=u(d);f.length>0&&r.dispatchColumnChangedEvent(_.EVENT_COLUMN_VALUE_CHANGED,f,e);var p=function(m,y){return m.width!=y.getActualWidth()};r.dispatchColumnResizedEvent(u(p),!0,e);var h=function(m,y){return m.pinned!=y.getPinned()};r.dispatchColumnPinnedEvent(u(h),e);var v=function(m,y){return m.hide==y.isVisible()};r.dispatchColumnVisibleEvent(u(v),e);var C=function(m,y){return m.sort!=y.getSort()||m.sortIndex!=y.getSortIndex()};u(C).length>0&&r.sortController.dispatchSortChangedEvents(e),r.normaliseColumnMovedEventForColumnState(i,e)}},t.prototype.getCommonValue=function(e,r){if(!(!e||e.length==0)){for(var o=r(e[0]),i=1;i=f&&e.setActualWidth(v,l)}var C=u("sort").value1;C!==void 0&&(C==="desc"||C==="asc"?e.setSort(C,l):e.setSort(void 0,l));var m=u("sortIndex").value1;if(m!==void 0&&e.setSortIndex(m),!(s||!e.isPrimary())){var y=u("aggFunc").value1;y!==void 0&&(typeof y=="string"?(e.setAggFunc(y),e.isValueActive()||(e.setValueActive(!0,l),this.valueColumns.push(e))):(D(y)&&console.warn("AG Grid: 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."),e.isValueActive()&&(e.setValueActive(!1,l),mn(this.valueColumns,e))));var S=u("rowGroup","rowGroupIndex"),E=S.value1,R=S.value2;(E!==void 0||R!==void 0)&&(typeof R=="number"||E?(e.isRowGroupActive()||(e.setRowGroupActive(!0,l),this.rowGroupColumns.push(e)),i&&typeof R=="number"&&(i[e.getId()]=R)):e.isRowGroupActive()&&(e.setRowGroupActive(!1,l),mn(this.rowGroupColumns,e)));var x=u("pivot","pivotIndex"),P=x.value1,T=x.value2;(P!==void 0||T!==void 0)&&(typeof T=="number"||P?(e.isPivotActive()||(e.setPivotActive(!0,l),this.pivotColumns.push(e)),a&&typeof T=="number"&&(a[e.getId()]=T)):e.isPivotActive()&&(e.setPivotActive(!1,l),mn(this.pivotColumns,e)))}}},t.prototype.getGridColumns=function(e){return this.getColumns(e,this.getGridColumn.bind(this))},t.prototype.getColumns=function(e,r){var o=[];return e&&e.forEach(function(i){var a=r(i);a&&o.push(a)}),o},t.prototype.getColumnWithValidation=function(e){if(e==null)return null;var r=this.getGridColumn(e);return r||console.warn("AG Grid: could not find column "+e),r},t.prototype.getPrimaryColumn=function(e){return this.primaryColumns?this.getColumn(e,this.primaryColumns,this.primaryColumnsMap):null},t.prototype.getGridColumn=function(e){return this.getColumn(e,this.gridColumns,this.gridColumnsMap)},t.prototype.lookupGridColumn=function(e){return this.gridColumnsMap[e]},t.prototype.getSecondaryColumn=function(e){return this.secondaryColumns?this.getColumn(e,this.secondaryColumns,this.secondaryColumnsMap):null},t.prototype.getColumn=function(e,r,o){if(!e)return null;if(typeof e=="string"&&o[e])return o[e];for(var i=0;i=0:h?P?E=m:T?E=S!=null&&S>=0:E=!1:E=r.indexOf(p)>=0,E){var L=h?y!=null||S!=null:y!=null;L?u.push(p):c.push(p)}});var d=function(p){var h=i(p.getColDef()),v=a(p.getColDef());return h??v};u.sort(function(p,h){var v=d(p),C=d(h);return v===C?0:v=0&&f.push(p)}),c.forEach(function(p){f.indexOf(p)<0&&f.push(p)}),r.forEach(function(p){f.indexOf(p)<0&&o(p,!1)}),f.forEach(function(p){r.indexOf(p)<0&&o(p,!0)}),f},t.prototype.extractPivotColumns=function(e,r){this.pivotColumns=this.extractColumns(r,this.pivotColumns,function(o,i){return o.setPivotActive(i,e)},function(o){return o.pivotIndex},function(o){return o.initialPivotIndex},function(o){return o.pivot},function(o){return o.initialPivot})},t.prototype.resetColumnGroupState=function(e){e===void 0&&(e="api");var r=[];this.columnUtils.depthFirstOriginalTreeSearch(null,this.primaryColumnTree,function(o){if(o instanceof gt){var i=o.getColGroupDef(),a={groupId:o.getGroupId(),open:i?i.openByDefault:void 0};r.push(a)}}),this.setColumnGroupState(r,e)},t.prototype.getColumnGroupState=function(){var e=[];return this.columnUtils.depthFirstOriginalTreeSearch(null,this.gridBalancedTree,function(r){r instanceof gt&&e.push({groupId:r.getGroupId(),open:r.isExpanded()})}),e},t.prototype.setColumnGroupState=function(e,r){var o=this;r===void 0&&(r="api"),this.columnAnimationService.start();var i=[];e.forEach(function(a){var s=a.groupId,l=a.open,u=o.getProvidedColumnGroup(s);u&&u.isExpanded()!==l&&(o.logger.log("columnGroupOpened("+u.getGroupId()+","+l+")"),u.setExpanded(l),i.push(u))}),this.updateGroupsAndDisplayedColumns(r),this.setFirstRightAndLastLeftPinned(r),i.forEach(function(a){var s={type:_.EVENT_COLUMN_GROUP_OPENED,columnGroup:a};o.eventService.dispatchEvent(s)}),this.columnAnimationService.finish()},t.prototype.setColumnGroupOpened=function(e,r,o){o===void 0&&(o="api");var i;e instanceof gt?i=e.getId():i=e||"",this.setColumnGroupState([{groupId:i,open:r}],o)},t.prototype.getProvidedColumnGroup=function(e){typeof e!="string"&&console.error("AG Grid: group key must be a string");var r=null;return this.columnUtils.depthFirstOriginalTreeSearch(null,this.gridBalancedTree,function(o){o instanceof gt&&o.getId()===e&&(r=o)}),r},t.prototype.calculateColumnsForDisplay=function(){var e=this,r;return this.pivotMode&&Z(this.secondaryColumns)?r=this.gridColumns.filter(function(o){var i=e.groupAutoColumns&&Jn(e.groupAutoColumns,o),a=e.valueColumns&&Jn(e.valueColumns,o);return i||a}):r=this.gridColumns.filter(function(o){var i=e.groupAutoColumns&&Jn(e.groupAutoColumns,o);return i||o.isVisible()}),r},t.prototype.checkColSpanActiveInCols=function(e){var r=!1;return e.forEach(function(o){D(o.getColDef().colSpan)&&(r=!0)}),r},t.prototype.calculateColumnsForGroupDisplay=function(){var e=this;this.groupDisplayColumns=[],this.groupDisplayColumnsMap={};var r=function(o){var i=o.getColDef(),a=i.showRowGroup;i&&D(a)&&(e.groupDisplayColumns.push(o),typeof a=="string"?e.groupDisplayColumnsMap[a]=o:a===!0&&e.getRowGroupColumns().forEach(function(s){e.groupDisplayColumnsMap[s.getId()]=o}))};this.gridColumns.forEach(r)},t.prototype.getGroupDisplayColumns=function(){return this.groupDisplayColumns},t.prototype.getGroupDisplayColumnForGroup=function(e){return this.groupDisplayColumnsMap[e]},t.prototype.updateDisplayedColumns=function(e){var r=this.calculateColumnsForDisplay();this.buildDisplayedTrees(r),this.updateGroupsAndDisplayedColumns(e),this.setFirstRightAndLastLeftPinned(e)},t.prototype.isSecondaryColumnsPresent=function(){return D(this.secondaryColumns)},t.prototype.setSecondaryColumns=function(e,r){var o=this;r===void 0&&(r="api");var i=e&&e.length>0;if(!(!i&&Z(this.secondaryColumns))){if(i){this.processSecondaryColumnDefinitions(e);var a=this.columnFactory.createColumnTree(e,!1,this.secondaryBalancedTree||this.previousSecondaryColumns||void 0);this.destroyOldColumns(this.secondaryBalancedTree,a.columnTree),this.secondaryBalancedTree=a.columnTree,this.secondaryHeaderRowCount=a.treeDept+1,this.secondaryColumns=this.getColumnsFromTree(this.secondaryBalancedTree),this.secondaryColumnsMap={},this.secondaryColumns.forEach(function(s){return o.secondaryColumnsMap[s.getId()]=s}),this.previousSecondaryColumns=null}else this.previousSecondaryColumns=this.secondaryBalancedTree,this.secondaryBalancedTree=null,this.secondaryHeaderRowCount=-1,this.secondaryColumns=null,this.secondaryColumnsMap={};this.updateGridColumns(),this.updateDisplayedColumns(r)}},t.prototype.processSecondaryColumnDefinitions=function(e){var r=this.gridOptionsService.get("processPivotResultColDef")||this.gridOptionsService.get("processSecondaryColDef"),o=this.gridOptionsService.get("processPivotResultColGroupDef")||this.gridOptionsService.get("processSecondaryColGroupDef");if(!(!r&&!o)){var i=function(a){a.forEach(function(s){var l=D(s.children);if(l){var u=s;o&&o(u),i(u.children)}else{var c=s;r&&r(c)}})};e&&i(e)}},t.prototype.updateGridColumns=function(){var e=this,r=this.gridBalancedTree;this.gridColsArePrimary?this.lastPrimaryOrder=this.gridColumns:this.lastSecondaryOrder=this.gridColumns;var o;if(this.secondaryColumns&&this.secondaryBalancedTree){var i=this.secondaryColumns.every(function(u){return e.gridColumnsMap[u.getColId()]!==void 0});this.gridBalancedTree=this.secondaryBalancedTree.slice(),this.gridHeaderRowCount=this.secondaryHeaderRowCount,this.gridColumns=this.secondaryColumns.slice(),this.gridColsArePrimary=!1,i&&(o=this.lastSecondaryOrder)}else this.primaryColumns&&(this.gridBalancedTree=this.primaryColumnTree.slice(),this.gridHeaderRowCount=this.primaryHeaderRowCount,this.gridColumns=this.primaryColumns.slice(),this.gridColsArePrimary=!0,o=this.lastPrimaryOrder);var a=this.createGroupAutoColumnsIfNeeded();if(a&&o){var s=Da(this.groupAutoColumns.map(function(u){return[u,!0]}));o=o.filter(function(u){return!s.has(u)}),o=mo(mo([],vo(this.groupAutoColumns)),vo(o))}if(this.addAutoGroupToGridColumns(),this.orderGridColsLike(o),this.gridColumns=this.placeLockedColumns(this.gridColumns),this.calculateColumnsForGroupDisplay(),this.refreshQuickFilterColumns(),this.clearDisplayedAndViewportColumns(),this.colSpanActive=this.checkColSpanActiveInCols(this.gridColumns),this.gridColumnsMap={},this.gridColumns.forEach(function(u){return e.gridColumnsMap[u.getId()]=u}),this.setAutoHeightActive(),!Aa(r,this.gridBalancedTree)){var l={type:_.EVENT_GRID_COLUMNS_CHANGED};this.eventService.dispatchEvent(l)}},t.prototype.setAutoHeightActive=function(){if(this.autoHeightActive=this.gridColumns.filter(function(o){return o.isAutoHeight()}).length>0,this.autoHeightActive){this.autoHeightActiveAtLeastOnce=!0;var e=this.gridOptionsService.isRowModelType("clientSide")||this.gridOptionsService.isRowModelType("serverSide");if(!e){var r="AG Grid - autoHeight columns only work with Client Side Row Model and Server Side Row Model.";ge(function(){return console.warn(r)},"autoHeightActive.wrongRowModel")}}},t.prototype.orderGridColsLike=function(e){if(!Z(e)){var r=Da(e.map(function(c,d){return[c,d]})),o=!0;if(this.gridColumns.forEach(function(c){r.has(c)&&(o=!1)}),!o){var i=Da(this.gridColumns.map(function(c){return[c,!0]})),a=e.filter(function(c){return i.has(c)}),s=Da(a.map(function(c){return[c,!0]})),l=this.gridColumns.filter(function(c){return!s.has(c)}),u=a.slice();l.forEach(function(c){var d=c.getOriginalParent();if(!d){u.push(c);return}for(var f=[];!f.length&&d;){var p=d.getLeafColumns();p.forEach(function(C){var m=u.indexOf(C)>=0,y=f.indexOf(C)<0;m&&y&&f.push(C)}),d=d.getOriginalParent()}if(!f.length){u.push(c);return}var h=f.map(function(C){return u.indexOf(C)}),v=Math.max.apply(Math,mo([],vo(h)));pd(u,c,v+1)}),this.gridColumns=u}}},t.prototype.isPrimaryColumnGroupsPresent=function(){return this.primaryHeaderRowCount>1},t.prototype.refreshQuickFilterColumns=function(){var e,r=(e=this.isPivotMode()?this.secondaryColumns:this.primaryColumns)!==null&&e!==void 0?e:[];this.groupAutoColumns&&(r=r.concat(this.groupAutoColumns)),this.columnsForQuickFilter=this.gridOptionsService.is("includeHiddenColumnsInQuickFilter")?r:r.filter(function(o){return o.isVisible()||o.isRowGroupActive()})},t.prototype.placeLockedColumns=function(e){var r=[],o=[],i=[];return e.forEach(function(a){var s=a.getColDef().lockPosition;s==="right"?i.push(a):s==="left"||s===!0?r.push(a):o.push(a)}),mo(mo(mo([],vo(r)),vo(o)),vo(i))},t.prototype.addAutoGroupToGridColumns=function(){if(Z(this.groupAutoColumns)){this.destroyOldColumns(this.groupAutoColsBalancedTree),this.groupAutoColsBalancedTree=null;return}this.gridColumns=this.groupAutoColumns?this.groupAutoColumns.concat(this.gridColumns):this.gridColumns;var e=this.columnFactory.createForAutoGroups(this.groupAutoColumns,this.gridBalancedTree);this.destroyOldColumns(this.groupAutoColsBalancedTree,e),this.groupAutoColsBalancedTree=e,this.gridBalancedTree=e.concat(this.gridBalancedTree)},t.prototype.clearDisplayedAndViewportColumns=function(){this.viewportRowLeft={},this.viewportRowRight={},this.viewportRowCenter={},this.displayedColumnsLeft=[],this.displayedColumnsRight=[],this.displayedColumnsCenter=[],this.displayedColumns=[],this.viewportColumns=[],this.headerViewportColumns=[],this.viewportColumnsHash=""},t.prototype.updateGroupsAndDisplayedColumns=function(e){this.updateOpenClosedVisibilityInColumnGroups(),this.deriveDisplayedColumns(e),this.refreshFlexedColumns(),this.extractViewport(),this.updateBodyWidths();var r={type:_.EVENT_DISPLAYED_COLUMNS_CHANGED};this.eventService.dispatchEvent(r)},t.prototype.deriveDisplayedColumns=function(e){this.derivedDisplayedColumnsFromDisplayedTree(this.displayedTreeLeft,this.displayedColumnsLeft),this.derivedDisplayedColumnsFromDisplayedTree(this.displayedTreeCentre,this.displayedColumnsCenter),this.derivedDisplayedColumnsFromDisplayedTree(this.displayedTreeRight,this.displayedColumnsRight),this.joinDisplayedColumns(),this.setLeftValues(e),this.displayedAutoHeightCols=this.displayedColumns.filter(function(r){return r.isAutoHeight()})},t.prototype.isAutoRowHeightActive=function(){return this.autoHeightActive},t.prototype.wasAutoRowHeightEverActive=function(){return this.autoHeightActiveAtLeastOnce},t.prototype.joinDisplayedColumns=function(){this.gridOptionsService.is("enableRtl")?this.displayedColumns=this.displayedColumnsRight.concat(this.displayedColumnsCenter).concat(this.displayedColumnsLeft):this.displayedColumns=this.displayedColumnsLeft.concat(this.displayedColumnsCenter).concat(this.displayedColumnsRight)},t.prototype.setLeftValues=function(e){this.setLeftValuesOfColumns(e),this.setLeftValuesOfGroups()},t.prototype.setLeftValuesOfColumns=function(e){var r=this;if(this.primaryColumns){var o=this.primaryColumns.slice(0),i=this.gridOptionsService.is("enableRtl");[this.displayedColumnsLeft,this.displayedColumnsRight,this.displayedColumnsCenter].forEach(function(a){if(i){var s=r.getWidthOfColsInList(a);a.forEach(function(u){s-=u.getActualWidth(),u.setLeft(s,e)})}else{var l=0;a.forEach(function(u){u.setLeft(l,e),l+=u.getActualWidth()})}uD(o,a)}),o.forEach(function(a){a.setLeft(null,e)})}},t.prototype.setLeftValuesOfGroups=function(){[this.displayedTreeLeft,this.displayedTreeRight,this.displayedTreeCentre].forEach(function(e){e.forEach(function(r){if(r instanceof Wt){var o=r;o.checkLeft()}})})},t.prototype.derivedDisplayedColumnsFromDisplayedTree=function(e,r){r.length=0,this.columnUtils.depthFirstDisplayedColumnTreeSearch(e,function(o){o instanceof Ne&&r.push(o)})},t.prototype.extractViewportColumns=function(){this.suppressColumnVirtualisation?(this.viewportColumnsCenter=this.displayedColumnsCenter,this.headerViewportColumnsCenter=this.displayedColumnsCenter):(this.viewportColumnsCenter=this.displayedColumnsCenter.filter(this.isColumnInRowViewport.bind(this)),this.headerViewportColumnsCenter=this.displayedColumnsCenter.filter(this.isColumnInHeaderViewport.bind(this))),this.viewportColumns=this.viewportColumnsCenter.concat(this.displayedColumnsLeft).concat(this.displayedColumnsRight),this.headerViewportColumns=this.headerViewportColumnsCenter.concat(this.displayedColumnsLeft).concat(this.displayedColumnsRight)},t.prototype.getVirtualHeaderGroupRow=function(e,r){var o;switch(e){case"left":o=this.viewportRowLeft[r];break;case"right":o=this.viewportRowRight[r];break;default:o=this.viewportRowCenter[r];break}return Z(o)&&(o=[]),o},t.prototype.calculateHeaderRows=function(){this.viewportRowLeft={},this.viewportRowRight={},this.viewportRowCenter={};var e={};this.headerViewportColumns.forEach(function(o){return e[o.getId()]=!0});var r=function(o,i,a){for(var s=!1,l=0;l=0;l--)if(a.has(s[l])){i=l;break}}for(var u=0,c=[],d=0,f=0,l=0;li;p?(c.push(this.displayedColumnsCenter[l]),f+=this.displayedColumnsCenter[l].getFlex(),d+=(r=this.displayedColumnsCenter[l].getMinWidth())!==null&&r!==void 0?r:0):u+=this.displayedColumnsCenter[l].getActualWidth()}if(!c.length)return[];var h=[];u+d>this.flexViewportWidth&&(c.forEach(function(T){var L;return T.setActualWidth((L=T.getMinWidth())!==null&&L!==void 0?L:0,o)}),h=c,c=[]);var v=[],C;e:for(;;){C=this.flexViewportWidth-u;for(var m=C/f,l=0;lx&&(E=x),E){y.setActualWidth(E,o),RS(c,y),f-=y.getFlex(),h.push(y),u+=y.getActualWidth();continue e}v[l]=Math.round(S)}break}var P=C;return c.forEach(function(T,L){T.setActualWidth(Math.min(v[L],P),o),h.push(T),P-=v[L]}),e.skipSetLeft||this.setLeftValues(o),e.updateBodyWidths&&this.updateBodyWidths(),e.fireResizedEvent&&this.dispatchColumnResizedEvent(h,!0,o,c),c},t.prototype.sizeColumnsToFit=function(e,r,o,i){var a=this,s,l,u,c,d;if(r===void 0&&(r="sizeColumnsToFit"),this.shouldQueueResizeOperations){this.resizeOperationQueue.push(function(){return a.sizeColumnsToFit(e,r,o,i)});return}var f={};i&&((s=i?.columnLimits)===null||s===void 0||s.forEach(function(U){var $=U.key,ne=uB(U,["key"]);f[typeof $=="string"?$:$.getColId()]=ne}));var p=this.getAllDisplayedColumns(),h=e===this.getWidthOfColsInList(p);if(!(e<=0||!p.length||h)){var v=[],C=[];p.forEach(function(U){U.getColDef().suppressSizeToFit===!0?C.push(U):v.push(U)});var m=v.slice(0),y=!1,S=function(U){mn(v,U),C.push(U)};for(v.forEach(function(U){var $,ne;U.resetActualWidth(r);var Me=f?.[U.getId()],Ve=($=Me?.minWidth)!==null&&$!==void 0?$:i?.defaultMinWidth,De=(ne=Me?.maxWidth)!==null&&ne!==void 0?ne:i?.defaultMaxWidth,mt=U.getActualWidth();typeof Ve=="number"&&mtDe&&U.setActualWidth(De,r,!0)});!y;){y=!0;var E=e-this.getWidthOfColsInList(C);if(E<=0)v.forEach(function(U){var $,ne,Me=(ne=($=f?.[U.getId()])===null||$===void 0?void 0:$.minWidth)!==null&&ne!==void 0?ne:i?.defaultMinWidth;if(typeof Me=="number"){U.setActualWidth(Me,r,!0);return}U.setMinimum(r)});else for(var R=E/this.getWidthOfColsInList(v),x=E,P=v.length-1;P>=0;P--){var T=v[P],L=f?.[T.getId()],I=(l=L?.minWidth)!==null&&l!==void 0?l:i?.defaultMinWidth,b=(u=L?.maxWidth)!==null&&u!==void 0?u:i?.defaultMaxWidth,W=(c=T.getMinWidth())!==null&&c!==void 0?c:0,Y=(d=T.getMaxWidth())!==null&&d!==void 0?d:Number.MAX_VALUE,ue=typeof I=="number"&&I>W?I:T.getMinWidth(),ee=typeof b=="number"&&bee?(oe=ee,S(T),y=!1):P===0&&(oe=x),T.setActualWidth(oe,r,!0),x-=oe}}m.forEach(function(U){U.fireColumnWidthChangedEvent(r)}),this.setLeftValues(r),this.updateBodyWidths(),!o&&this.dispatchColumnResizedEvent(m,!0,r)}},t.prototype.buildDisplayedTrees=function(e){var r=[],o=[],i=[];e.forEach(function(s){switch(s.getPinned()){case"left":r.push(s);break;case"right":o.push(s);break;default:i.push(s);break}});var a=new xS;this.displayedTreeLeft=this.displayedGroupCreator.createDisplayedGroups(r,a,"left",this.displayedTreeLeft),this.displayedTreeRight=this.displayedGroupCreator.createDisplayedGroups(o,a,"right",this.displayedTreeRight),this.displayedTreeCentre=this.displayedGroupCreator.createDisplayedGroups(i,a,null,this.displayedTreeCentre),this.updateDisplayedMap()},t.prototype.updateDisplayedMap=function(){var e=this;this.displayedColumnsAndGroupsMap={};var r=function(o){e.displayedColumnsAndGroupsMap[o.getUniqueId()]=o};this.columnUtils.depthFirstAllColumnTreeSearch(this.displayedTreeCentre,r),this.columnUtils.depthFirstAllColumnTreeSearch(this.displayedTreeLeft,r),this.columnUtils.depthFirstAllColumnTreeSearch(this.displayedTreeRight,r)},t.prototype.isDisplayed=function(e){var r=this.displayedColumnsAndGroupsMap[e.getUniqueId()];return r===e},t.prototype.updateOpenClosedVisibilityInColumnGroups=function(){var e=this.getAllDisplayedTrees();this.columnUtils.depthFirstAllColumnTreeSearch(e,function(r){r instanceof Wt&&r.calculateDisplayedColumns()})},t.prototype.getGroupAutoColumns=function(){return this.groupAutoColumns},t.prototype.createGroupAutoColumnsIfNeeded=function(){var e=this.forceRecreateAutoGroups;if(this.forceRecreateAutoGroups=!1,!this.autoGroupsNeedBuilding)return!1;this.autoGroupsNeedBuilding=!1;var r=this.gridOptionsService.isGroupUseEntireRow(this.pivotMode),o=this.pivotMode?this.gridOptionsService.is("pivotSuppressAutoColumn"):this.isGroupSuppressAutoColumn(),i=this.rowGroupColumns.length>0||this.gridOptionsService.is("treeData"),a=i&&!o&&!r;if(a){var s=this.autoGroupColService.createAutoGroupColumns(this.rowGroupColumns),l=!this.autoColsEqual(s,this.groupAutoColumns);if(l||e)return this.groupAutoColumns=s,!0}else this.groupAutoColumns=null;return!1},t.prototype.isGroupSuppressAutoColumn=function(){var e=this.gridOptionsService.get("groupDisplayType"),r=e?aS("custom",e):!1;if(r)return!0;var o=this.gridOptionsService.get("treeDataDisplayType");return o?aB("custom",o):!1},t.prototype.autoColsEqual=function(e,r){return Aa(e,r,function(o,i){return o.getColId()===i.getColId()})},t.prototype.getWidthOfColsInList=function(e){return e.reduce(function(r,o){return r+o.getActualWidth()},0)},t.prototype.getGridBalancedTree=function(){return this.gridBalancedTree},t.prototype.getFirstDisplayedColumn=function(){var e=this.gridOptionsService.is("enableRtl"),r=["getDisplayedLeftColumns","getDisplayedCenterColumns","getDisplayedRightColumns"];e&&r.reverse();for(var o=0;o=0;s--)(a=n[s])&&(i=(o<3?a(i):o>3?a(t,e,i):a(t,e))||i);return o>3&&i&&Object.defineProperty(t,e,i),i},_D=function(n){cB(t,n);function t(){return n!==null&&n.apply(this,arguments)||this}return t.prototype.calculateColMinWidth=function(e){return e.minWidth!=null?e.minWidth:this.environment.getMinColWidth()},t.prototype.calculateColMaxWidth=function(e){return e.maxWidth!=null?e.maxWidth:Number.MAX_SAFE_INTEGER},t.prototype.calculateColInitialWidth=function(e){var r=this.calculateColMinWidth(e),o=this.calculateColMaxWidth(e),i,a=Qn(e.width),s=Qn(e.initialWidth);return a!=null?i=a:s!=null?i=s:i=200,Math.max(Math.min(i,o),r)},t.prototype.getOriginalPathForColumn=function(e,r){var o=[],i=!1,a=function(s,l){for(var u=0;u=0;s--)(a=n[s])&&(i=(o<3?a(i):o>3?a(t,e,i):a(t,e))||i);return o>3&&i&&Object.defineProperty(t,e,i),i},ED=function(n){fB(t,n);function t(){return n!==null&&n.apply(this,arguments)||this}return t.prototype.createDisplayedGroups=function(e,r,o,i){for(var a=this,s=this.mapOldGroupsById(i),l=[],u=e,c=function(){var d=u;u=[];for(var f=0,p=function(R){var x=f;f=R;var P=d[x],T=P instanceof Wt?P.getProvidedColumnGroup():P,L=T.getOriginalParent();if(L==null){for(var I=x;I=0;s--)(a=n[s])&&(i=(o<3?a(i):o>3?a(t,e,i):a(t,e))||i);return o>3&&i&&Object.defineProperty(t,e,i),i},RD=function(n){hB(t,n);function t(){var e=n!==null&&n.apply(this,arguments)||this;return e.componentsMappedByName={},e}return t.prototype.setupComponents=function(e){var r=this;e&&e.forEach(function(o){return r.addComponent(o)})},t.prototype.addComponent=function(e){var r=e.componentName.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase(),o=r.toUpperCase();this.componentsMappedByName[o]=e.componentClass},t.prototype.getComponentClass=function(e){return this.componentsMappedByName[e]},t=gB([H("agStackComponentsRegistry")],t),t}(F);function Eo(n,t,e){e==null||e==""?PS(n,t):ro(n,t,e)}function ro(n,t,e){n.setAttribute(TD(t),e.toString())}function PS(n,t){n.removeAttribute(TD(t))}function TD(n){return"aria-"+n}function bt(n,t){t?n.setAttribute("role",t):n.removeAttribute("role")}function xD(n){var t;return n==="asc"?t="ascending":n==="desc"?t="descending":n==="mixed"?t="other":t="none",t}function PD(n){return parseInt(n.getAttribute("aria-level"),10)}function OD(n){return parseInt(n.getAttribute("aria-posinset"),10)}function vB(n){return n.getAttribute("aria-describedby")||""}function Ii(n,t){Eo(n,"label",t)}function Gg(n,t){Eo(n,"labelledby",t)}function LD(n,t){Eo(n,"description",t)}function ID(n,t){Eo(n,"describedby",t)}function DD(n,t){Eo(n,"live",t)}function AD(n,t){Eo(n,"level",t)}function OS(n,t){Eo(n,"disabled",t)}function kg(n,t){Eo(n,"hidden",t)}function LS(n,t){Eo(n,"activedescendant",t)}function So(n,t){ro(n,"expanded",t)}function FD(n){PS(n,"expanded")}function IS(n,t){ro(n,"setsize",t)}function DS(n,t){ro(n,"posinset",t)}function bD(n,t){ro(n,"multiselectable",t)}function MD(n,t){ro(n,"rowcount",t)}function AS(n,t){ro(n,"rowindex",t)}function ND(n,t){ro(n,"colcount",t)}function FS(n,t){ro(n,"colindex",t)}function GD(n,t){ro(n,"colspan",t)}function kD(n,t){ro(n,"sort",t)}function HD(n){PS(n,"sort")}function Ds(n,t){Eo(n,"selected",t)}function VD(n,t){ro(n,"checked",t===void 0?"mixed":t)}function BD(n,t){Eo(n,"controls",t.id),Gg(t,n.id)}function Hg(n,t){return t===void 0?n("ariaIndeterminate","indeterminate"):t===!0?n("ariaChecked","checked"):n("ariaUnchecked","unchecked")}var mB=Object.freeze({setAriaRole:bt,getAriaSortState:xD,getAriaLevel:PD,getAriaPosInSet:OD,getAriaDescribedBy:vB,setAriaLabel:Ii,setAriaLabelledBy:Gg,setAriaDescription:LD,setAriaDescribedBy:ID,setAriaLive:DD,setAriaLevel:AD,setAriaDisabled:OS,setAriaHidden:kg,setAriaActiveDescendant:LS,setAriaExpanded:So,removeAriaExpanded:FD,setAriaSetSize:IS,setAriaPosInSet:DS,setAriaMultiSelectable:bD,setAriaRowCount:MD,setAriaRowIndex:AS,setAriaColCount:ND,setAriaColIndex:FS,setAriaColSpan:GD,setAriaSort:kD,removeAriaSort:HD,setAriaSelected:Ds,setAriaChecked:VD,setAriaControls:BD,getAriaCheckboxStateName:Hg}),lw,kh,uw,cw,dw,fw,sS,lS;function to(){return lw===void 0&&(lw=/^((?!chrome|android).)*safari/i.test(navigator.userAgent)),lw}function bS(){if(kh===void 0)if(to()){var n=navigator.userAgent.match(/version\/(\d+)/i);n&&(kh=n[1]!=null?parseFloat(n[1]):0)}else kh=0;return kh}function Vg(){if(uw===void 0){var n=window;uw=!!n.chrome&&(!!n.chrome.webstore||!!n.chrome.runtime)||/Chrome/.test(navigator.userAgent)&&/Google Inc/.test(navigator.vendor)}return uw}function MS(){return cw===void 0&&(cw=/(firefox)/i.test(navigator.userAgent)),cw}function NS(){return dw===void 0&&(dw=/(Mac|iPhone|iPod|iPad)/i.test(navigator.platform)),dw}function Na(){return fw===void 0&&(fw=/iPad|iPhone|iPod/.test(navigator.platform)||navigator.platform==="MacIntel"&&navigator.maxTouchPoints>1),fw}function Bg(){return!to()||bS()>=15}function yg(n){if(!n)return null;var t=n.tabIndex,e=n.getAttribute("tabIndex");return t===-1&&(e===null||e===""&&!MS())?null:t.toString()}function WD(){if(!document.body)return-1;var n=1e6,t=navigator.userAgent.toLowerCase().match(/firefox/)?6e6:1e9,e=document.createElement("div");for(document.body.appendChild(e);;){var r=n*2;if(e.style.height=r+"px",r>t||e.clientHeight!==r)break;n=r}return document.body.removeChild(e),n}function UD(){var n,t,e;return(t=(n=document.body)===null||n===void 0?void 0:n.clientWidth)!==null&&t!==void 0?t:window.innerHeight||((e=document.documentElement)===null||e===void 0?void 0:e.clientWidth)||-1}function jD(){var n,t,e;return(t=(n=document.body)===null||n===void 0?void 0:n.clientHeight)!==null&&t!==void 0?t:window.innerHeight||((e=document.documentElement)===null||e===void 0?void 0:e.clientHeight)||-1}function zD(){return lS==null&&qD(),lS}function qD(){var n=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",n.appendChild(t);var e=t.offsetWidth-t.clientWidth;e===0&&t.clientWidth===0&&(e=null),t.parentNode&&t.parentNode.removeChild(t),e!=null&&(lS=e,sS=e===0)}function hd(){return sS==null&&qD(),sS}var yB=Object.freeze({isBrowserSafari:to,getSafariVersion:bS,isBrowserChrome:Vg,isBrowserFirefox:MS,isMacOsUserAgent:NS,isIOSUserAgent:Na,browserSupportsPreventScroll:Bg,getTabIndex:yg,getMaxDivHeight:WD,getBodyWidth:UD,getBodyHeight:jD,getScrollbarWidth:zD,isInvisibleScrollbar:hd});function Xl(n,t){return n.toString().padStart(t,"0")}function $D(n,t){for(var e=[],r=n;r<=t;r++)e.push(r);return e}function CB(n){return typeof n=="string"&&(n=parseInt(n,10)),typeof n=="number"?Math.floor(n):null}function wB(n,t){for(var e="",r=0;r>>=8;return e}function SB(n,t,e){return typeof n!="number"?"":GS(Math.round(n*100)/100,t,e)}function GS(n,t,e){return typeof n!="number"?"":n.toString().replace(".",e).replace(/(\d)(?=(\d{3})+(?!\d))/g,"$1"+t)}function _B(n){return n==null?null:n.reduce(function(t,e){return t+e},0)}function EB(n,t){return n>=0?n:t}function RB(n,t){var e=parseInt(n,10);return!isNaN(e)&&isFinite(e)&&e>0?e:t}var TB=Object.freeze({padStartWidthZeros:Xl,createArrayOfNumbers:$D,cleanNumber:CB,decToHex:wB,formatNumberTwoDecimalPlacesAndCommas:SB,formatNumberCommas:GS,sum:_B,zeroOrGreater:EB,oneOrGreater:RB}),pw=function(n,t){var e=typeof Symbol=="function"&&n[Symbol.iterator];if(!e)return n;var r=e.call(n),o,i=[],a;try{for(;(t===void 0||t-- >0)&&!(o=r.next()).done;)i.push(o.value)}catch(s){a={error:s}}finally{try{o&&!o.done&&(e=r.return)&&e.call(r)}finally{if(a)throw a.error}}return i};function Zn(n,t,e){if(t===void 0&&(t=!0),e===void 0&&(e="-"),!n)return null;var r=[n.getFullYear(),n.getMonth()+1,n.getDate()].map(function(o){return Xl(o,2)}).join(e);return t&&(r+=" "+[n.getHours(),n.getMinutes(),n.getSeconds()].map(function(o){return Xl(o,2)}).join(":")),r}var hw=function(n){if(n>3&&n<21)return"th";var t=n%10;switch(t){case 1:return"st";case 2:return"nd";case 3:return"rd"}return"th"};function Ql(n,t){t===void 0&&(t="YYYY-MM-DD");var e=Xl(n.getFullYear(),4),r=["January","February","March","April","May","June","July","August","September","October","November","December"],o=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],i={YYYY:function(){return e.slice(e.length-4,e.length)},YY:function(){return e.slice(e.length-2,e.length)},Y:function(){return""+n.getFullYear()},MMMM:function(){return r[n.getMonth()]},MMM:function(){return r[n.getMonth()].slice(0,3)},MM:function(){return Xl(n.getMonth()+1,2)},Mo:function(){return""+(n.getMonth()+1)+hw(n.getMonth()+1)},M:function(){return""+(n.getMonth()+1)},Do:function(){return""+n.getDate()+hw(n.getDate())},DD:function(){return Xl(n.getDate(),2)},D:function(){return""+n.getDate()},dddd:function(){return o[n.getDay()]},ddd:function(){return o[n.getDay()].slice(0,3)},dd:function(){return o[n.getDay()].slice(0,2)},do:function(){return""+n.getDay()+hw(n.getDay())},d:function(){return""+n.getDay()}},a=new RegExp(Object.keys(i).join("|"),"g");return t.replace(a,function(s){return s in i?i[s]():s})}function Jr(n){if(!n)return null;var t=pw(n.split(" "),2),e=t[0],r=t[1];if(!e)return null;var o=e.split("-").map(function(h){return parseInt(h,10)});if(o.filter(function(h){return!isNaN(h)}).length!==3)return null;var i=pw(o,3),a=i[0],s=i[1],l=i[2],u=new Date(a,s-1,l);if(u.getFullYear()!==a||u.getMonth()!==s-1||u.getDate()!==l)return null;if(!r||r==="00:00:00")return u;var c=pw(r.split(":").map(function(h){return parseInt(h,10)}),3),d=c[0],f=c[1],p=c[2];return d>=0&&d<24&&u.setHours(d),f>=0&&f<60&&u.setMinutes(f),p>=0&&p<60&&u.setSeconds(p),u}var xB=Object.freeze({serialiseDate:Zn,dateToFormattedString:Ql,parseDateTimeFromString:Jr}),PB=function(n){var t=typeof Symbol=="function"&&Symbol.iterator,e=t&&n[t],r=0;if(e)return e.call(n);if(n&&typeof n.length=="number")return{next:function(){return n&&r>=n.length&&(n=void 0),{value:n&&n[r++],done:!n}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},OB=function(n,t){var e=typeof Symbol=="function"&&n[Symbol.iterator];if(!e)return n;var r=e.call(n),o,i=[],a;try{for(;(t===void 0||t-- >0)&&!(o=r.next()).done;)i.push(o.value)}catch(s){a={error:s}}finally{try{o&&!o.done&&(e=r.return)&&e.call(r)}finally{if(a)throw a.error}}return i},Hh;function uS(n,t,e){for(var r=n.parentElement,o=r&&r.firstChild;o;)t&&o.classList.toggle(t,o===n),e&&o.classList.toggle(e,o!==n),o=o.nextSibling}var KD="[tabindex], input, select, button, textarea, [href]",kS=".ag-hidden, .ag-hidden *, [disabled], .ag-disabled:not(.ag-button), .ag-disabled *";function HS(n){var t=Element.prototype.matches||Element.prototype.msMatchesSelector,e="input, select, button, textarea",r=t.call(n,e),o=t.call(n,kS),i=ka(n),a=r&&!o&&i;return a}function we(n,t,e){e===void 0&&(e={});var r=e.skipAriaHidden;n.classList.toggle("ag-hidden",!t),r||kg(n,!t)}function YD(n,t,e){e===void 0&&(e={});var r=e.skipAriaHidden;n.classList.toggle("ag-invisible",!t),r||kg(n,!t)}function Jl(n,t){var e="disabled",r=t?function(o){return o.setAttribute(e,"")}:function(o){return o.removeAttribute(e)};r(n),zS(n.querySelectorAll("input"),function(o){return r(o)})}function xs(n,t,e){for(var r=0;n;){if(n.classList.contains(t))return!0;if(n=n.parentElement,typeof e=="number"){if(++r>e)break}else if(n===e)break}return!1}function Ga(n){var t=window.getComputedStyle(n),e=t.height,r=t.width,o=t.borderTopWidth,i=t.borderRightWidth,a=t.borderBottomWidth,s=t.borderLeftWidth,l=t.paddingTop,u=t.paddingRight,c=t.paddingBottom,d=t.paddingLeft,f=t.marginTop,p=t.marginRight,h=t.marginBottom,v=t.marginLeft,C=t.boxSizing;return{height:parseFloat(e),width:parseFloat(r),borderTopWidth:parseFloat(o),borderRightWidth:parseFloat(i),borderBottomWidth:parseFloat(a),borderLeftWidth:parseFloat(s),paddingTop:parseFloat(l),paddingRight:parseFloat(u),paddingBottom:parseFloat(c),paddingLeft:parseFloat(d),marginTop:parseFloat(f),marginRight:parseFloat(p),marginBottom:parseFloat(h),marginLeft:parseFloat(v),boxSizing:C}}function _d(n){var t=Ga(n);return t.boxSizing==="border-box"?t.height-t.paddingTop-t.paddingBottom:t.height}function Wg(n){var t=Ga(n);return t.boxSizing==="border-box"?t.width-t.paddingLeft-t.paddingRight:t.width}function VS(n){var t=Ga(n),e=t.marginBottom+t.marginTop;return Math.ceil(n.offsetHeight+e)}function gd(n){var t=Ga(n),e=t.marginLeft+t.marginRight;return Math.ceil(n.offsetWidth+e)}function BS(n){var t=n.getBoundingClientRect(),e=Ga(n),r=e.borderTopWidth,o=e.borderLeftWidth,i=e.borderRightWidth,a=e.borderBottomWidth;return{top:t.top+(r||0),left:t.left+(o||0),right:t.right+(i||0),bottom:t.bottom+(a||0)}}function vd(){if(typeof Hh=="boolean")return Hh;var n=document.createElement("div");return n.style.direction="rtl",n.style.width="1px",n.style.height="1px",n.style.position="fixed",n.style.top="0px",n.style.overflow="hidden",n.dir="rtl",n.innerHTML=`
`,document.body.appendChild(n),n.scrollLeft=1,Hh=Math.floor(n.scrollLeft)===0,document.body.removeChild(n),Hh}function md(n,t){var e=n.scrollLeft;return t&&(e=Math.abs(e),Vg()&&!vd()&&(e=n.scrollWidth-n.clientWidth-e)),e}function yd(n,t,e){e&&(vd()?t*=-1:(to()||Vg())&&(t=n.scrollWidth-n.clientWidth-t)),n.scrollLeft=t}function vr(n){for(;n&&n.firstChild;)n.removeChild(n.firstChild)}function LB(n,t){Oi(n.querySelector(t))}function Oi(n){n&&n.parentNode&&n.parentNode.removeChild(n)}function ka(n){return n.offsetParent!==null}function tr(n){var t=document.createElement("div");return t.innerHTML=(n||"").trim(),t.firstChild}function IB(n,t){n.lastChild?n.insertAdjacentHTML("afterbegin",t):n.innerHTML=t}function DB(n,t){if(n.attributes&&n.attributes[t]){var e=n.attributes[t];return e.value}return null}function cS(n){return n&&n.clientHeight?n.clientHeight:0}function dS(n){return n&&n.clientWidth?n.clientWidth:0}function WS(n,t,e){if(!(e&&e.nextSibling===t)){var r=document.activeElement,o=t.contains(r);e?e.nextSibling?n.insertBefore(t,e.nextSibling):n.appendChild(t):n.firstChild&&n.firstChild!==t&&n.insertAdjacentElement("afterbegin",t),o&&r&&Bg()&&r.focus({preventScroll:!0})}}function US(n,t){for(var e=0;e-1||typeof o=="object"&&o["ag-icon"])return r}var i=document.createElement("span");return i.appendChild(r),i}function _t(n,t,e,r){var o=null,i=e&&e.getColDef().icons;if(i&&(o=i[n]),t&&!o){var a=t.get("icons");a&&(o=a[n])}if(o){var s=void 0;if(typeof o=="function")s=o();else if(typeof o=="string")s=o;else throw new Error("icon from grid options needs to be a string or a function");if(typeof s=="string")return tr(s);if(Ed(s))return s;console.warn("AG Grid: iconRenderer should return back a string or a dom object")}else{var l=document.createElement("span"),u=t0[n];return u||(r?u=n:(console.warn("AG Grid: Did not find icon "+n),u="")),l.setAttribute("class","ag-icon ag-icon-"+u),l.setAttribute("unselectable","on"),bt(l,"presentation"),l}}var MB=Object.freeze({iconNameClassMap:t0,createIcon:Yn,createIconNoSpan:_t}),O=function(){function n(){}return n.BACKSPACE="Backspace",n.TAB="Tab",n.ENTER="Enter",n.ESCAPE="Escape",n.SPACE=" ",n.LEFT="ArrowLeft",n.UP="ArrowUp",n.RIGHT="ArrowRight",n.DOWN="ArrowDown",n.DELETE="Delete",n.F2="F2",n.PAGE_UP="PageUp",n.PAGE_DOWN="PageDown",n.PAGE_HOME="Home",n.PAGE_END="End",n.A="KeyA",n.C="KeyC",n.D="KeyD",n.V="KeyV",n.X="KeyX",n.Y="KeyY",n.Z="KeyZ",n}(),NB=65,GB=67,kB=86,HB=68,VB=90,BB=89;function jg(n){if(n.altKey||n.ctrlKey||n.metaKey)return!1;var t=n.key.length===1;return t}function Cg(n,t,e,r,o){var i=r?r.getColDef().suppressKeyboardEvent:void 0;if(!i)return!1;var a={event:t,editing:o,column:r,api:n.api,node:e,data:e.data,colDef:r.getColDef(),context:n.context,columnApi:n.columnApi};if(i){var s=i(a);if(s)return!0}return!1}function r0(n,t,e,r){var o=r.getDefinition(),i=o&&o.suppressHeaderKeyboardEvent;if(!D(i))return!1;var a={api:n.api,columnApi:n.columnApi,context:n.context,colDef:o,column:r,headerRowIndex:e,event:t};return!!i(a)}function n0(n){var t=n.keyCode,e;switch(t){case NB:e=O.A;break;case GB:e=O.C;break;case kB:e=O.V;break;case HB:e=O.D;break;case VB:e=O.Z;break;case BB:e=O.Y;break;default:e=n.code}return e}function o0(n,t){return t===void 0&&(t=!1),n===O.DELETE?!0:!t&&n===O.BACKSPACE?NS():!1}var WB=Object.freeze({isEventFromPrintableCharacter:jg,isUserSuppressingKeyboardEvent:Cg,isUserSuppressingHeaderKeyboardEvent:r0,normaliseQwertyAzerty:n0,isDeleteKey:o0});function $S(n,t,e){if(e===0)return!1;var r=Math.abs(n.clientX-t.clientX),o=Math.abs(n.clientY-t.clientY);return Math.max(r,o)<=e}var UB=Object.freeze({areEventsNear:$S});function jB(n,t){if(!n)return!1;for(var e=function(s,l){var u=t[s.id],c=t[l.id],d=u!==void 0,f=c!==void 0,p=d&&f,h=!d&&!f;return p?u-c:h?s.__objectId-l.__objectId:d?1:-1},r,o,i=!1,a=0;a0){i=!0;break}return i?(n.sort(e),!0):!1}function zB(n,t){var e=[];r(n);function r(o){o&&o.forEach(function(i){if(i.group||i.hasChildren()){e.push(i.key);var a=e.join("|");t(i,a),r(i.childrenAfterGroup),e.pop()}})}}var qB=Object.freeze({sortRowNodesByOrder:jB,traverseNodesWithKey:zB});function KS(n){var t=new Set;return n.forEach(function(e){return t.add(e)}),t}var $B=Object.freeze({convertToSet:KS}),Tt=function(){return Tt=Object.assign||function(n){for(var t,e=1,r=arguments.length;e=0;s--)(a=n[s])&&(i=(o<3?a(i):o>3?a(t,e,i):a(t,e))||i);return o>3&&i&&Object.defineProperty(t,e,i),i},Co;(function(n){n[n.NOTHING=0]="NOTHING",n[n.WAITING_TO_SHOW=1]="WAITING_TO_SHOW",n[n.SHOWING=2]="SHOWING"})(Co||(Co={}));var Zo;(function(n){n[n.HOVER=0]="HOVER",n[n.FOCUS=1]="FOCUS"})(Zo||(Zo={}));var zg=function(n){XB(t,n);function t(e,r,o){var i=n.call(this)||this;return i.parentComp=e,i.tooltipShowDelayOverride=r,i.tooltipHideDelayOverride=o,i.DEFAULT_SHOW_TOOLTIP_DELAY=2e3,i.DEFAULT_HIDE_TOOLTIP_DELAY=1e4,i.SHOW_QUICK_TOOLTIP_DIFF=1e3,i.FADE_OUT_TOOLTIP_TIMEOUT=1e3,i.INTERACTIVE_HIDE_DELAY=100,i.interactionEnabled=!1,i.isInteractingWithTooltip=!1,i.state=Co.NOTHING,i.tooltipInstanceCount=0,i.tooltipMouseTrack=!1,i}return t.prototype.postConstruct=function(){this.gridOptionsService.is("tooltipInteraction")&&(this.interactionEnabled=!0),this.tooltipTrigger=this.getTooltipTrigger(),this.tooltipShowDelay=this.getTooltipDelay("show"),this.tooltipHideDelay=this.getTooltipDelay("hide"),this.tooltipMouseTrack=this.gridOptionsService.is("tooltipMouseTrack");var e=this.parentComp.getGui();this.tooltipTrigger===Zo.HOVER&&(this.addManagedListener(e,"mouseenter",this.onMouseEnter.bind(this)),this.addManagedListener(e,"mouseleave",this.onMouseLeave.bind(this))),this.tooltipTrigger===Zo.FOCUS&&(this.addManagedListener(e,"focusin",this.onFocusIn.bind(this)),this.addManagedListener(e,"focusout",this.onFocusOut.bind(this))),this.addManagedListener(e,"mousemove",this.onMouseMove.bind(this)),this.interactionEnabled||(this.addManagedListener(e,"mousedown",this.onMouseDown.bind(this)),this.addManagedListener(e,"keydown",this.onKeyDown.bind(this)))},t.prototype.getGridOptionsTooltipDelay=function(e){var r=this.gridOptionsService.getNum(e);if(D(r))return r<0&&ge(function(){return console.warn("AG Grid: "+e+" should not be lower than 0")},e+"Warn"),Math.max(200,r)},t.prototype.getTooltipDelay=function(e){var r,o,i,a;return e==="show"?(o=(r=this.getGridOptionsTooltipDelay("tooltipShowDelay"))!==null&&r!==void 0?r:this.tooltipShowDelayOverride)!==null&&o!==void 0?o:this.DEFAULT_SHOW_TOOLTIP_DELAY:(a=(i=this.getGridOptionsTooltipDelay("tooltipHideDelay"))!==null&&i!==void 0?i:this.tooltipHideDelayOverride)!==null&&a!==void 0?a:this.DEFAULT_HIDE_TOOLTIP_DELAY},t.prototype.destroy=function(){this.setToDoNothing(),n.prototype.destroy.call(this)},t.prototype.getTooltipTrigger=function(){var e=this.gridOptionsService.get("tooltipTrigger");return!e||e==="hover"?Zo.HOVER:Zo.FOCUS},t.prototype.onMouseEnter=function(e){var r=this;this.interactionEnabled&&this.interactiveTooltipTimeoutId&&(this.unlockService(),this.startHideTimeout()),!Na()&&(t.isLocked?this.showTooltipTimeoutId=window.setTimeout(function(){r.prepareToShowTooltip(e)},this.INTERACTIVE_HIDE_DELAY):this.prepareToShowTooltip(e))},t.prototype.onMouseMove=function(e){this.lastMouseEvent&&(this.lastMouseEvent=e),this.tooltipMouseTrack&&this.state===Co.SHOWING&&this.tooltipComp&&this.positionTooltip()},t.prototype.onMouseDown=function(){this.setToDoNothing()},t.prototype.onMouseLeave=function(){this.interactionEnabled?this.lockService():this.setToDoNothing()},t.prototype.onFocusIn=function(){this.prepareToShowTooltip()},t.prototype.onFocusOut=function(e){var r,o=e.relatedTarget,i=this.parentComp.getGui(),a=(r=this.tooltipComp)===null||r===void 0?void 0:r.getGui();this.isInteractingWithTooltip||i.contains(o)||this.interactionEnabled&&a?.contains(o)||this.setToDoNothing()},t.prototype.onKeyDown=function(){this.setToDoNothing()},t.prototype.prepareToShowTooltip=function(e){if(this.state!=Co.NOTHING||t.isLocked)return!1;var r=0;return e&&(r=this.isLastTooltipHiddenRecently()?200:this.tooltipShowDelay),this.lastMouseEvent=e||null,this.showTooltipTimeoutId=window.setTimeout(this.showTooltip.bind(this),r),this.state=Co.WAITING_TO_SHOW,!0},t.prototype.isLastTooltipHiddenRecently=function(){var e=new Date().getTime(),r=t.lastTooltipHideTime;return e-r1){r.forEach(function(a){return e.addCssClass(a)});return}var o=this.cssClassStates[t]!==!0;if(o&&t.length){var i=this.getGui();i&&i.classList.add(t),this.cssClassStates[t]=!0}},n.prototype.removeCssClass=function(t){var e=this,r=(t||"").split(" ");if(r.length>1){r.forEach(function(a){return e.removeCssClass(a)});return}var o=this.cssClassStates[t]!==!1;if(o&&t.length){var i=this.getGui();i&&i.classList.remove(t),this.cssClassStates[t]=!1}},n.prototype.containsCssClass=function(t){var e=this.getGui();return e?e.classList.contains(t):!1},n.prototype.addOrRemoveCssClass=function(t,e){var r=this;if(t){if(t.indexOf(" ")>=0){var o=(t||"").split(" ");if(o.length>1){o.forEach(function(s){return r.addOrRemoveCssClass(s,e)});return}}var i=this.cssClassStates[t]!==e;if(i&&t.length){var a=this.getGui();a&&a.classList.toggle(t,e),this.cssClassStates[t]=e}}},n}(),QB=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(r[i]=o[i])},n(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");n(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}}(),vw=function(n,t,e,r){var o=arguments.length,i=o<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(n,t,e,r);else for(var s=n.length-1;s>=0;s--)(a=n[s])&&(i=(o<3?a(i):o>3?a(t,e,i):a(t,e))||i);return o>3&&i&&Object.defineProperty(t,e,i),i},JB=new As,se=function(n){QB(t,n);function t(e){var r=n.call(this)||this;return r.displayed=!0,r.visible=!0,r.compId=JB.next(),r.cssClassManager=new i0(function(){return r.eGui}),e&&r.setTemplate(e),r}return t.prototype.preConstructOnComponent=function(){this.usingBrowserTooltips=this.gridOptionsService.is("enableBrowserTooltips")},t.prototype.getCompId=function(){return this.compId},t.prototype.getTooltipParams=function(){return{value:this.tooltipText,location:"UNKNOWN"}},t.prototype.setTooltip=function(e,r,o){var i=this,a=function(){i.usingBrowserTooltips?i.getGui().removeAttribute("title"):i.tooltipFeature=i.destroyBean(i.tooltipFeature)},s=function(){i.usingBrowserTooltips?i.getGui().setAttribute("title",i.tooltipText):i.tooltipFeature=i.createBean(new zg(i,r,o))};this.tooltipText!=e&&(this.tooltipText&&a(),e!=null&&(this.tooltipText=e,this.tooltipText&&s()))},t.prototype.createChildComponentsFromTags=function(e,r){var o=this,i=ZD(e.childNodes);i.forEach(function(a){if(a instanceof HTMLElement){var s=o.createComponentFromElement(a,function(u){var c=u.getGui();c&&o.copyAttributesFromNode(a,u.getGui())},r);if(s){if(s.addItems&&a.children.length){o.createChildComponentsFromTags(a,r);var l=Array.prototype.slice.call(a.children);s.addItems(l)}o.swapComponentForNode(s,e,a)}else a.childNodes&&o.createChildComponentsFromTags(a,r)}})},t.prototype.createComponentFromElement=function(e,r,o){var i=e.nodeName,a=o?o[e.getAttribute("ref")]:void 0,s=this.agStackComponentsRegistry.getComponentClass(i);if(s){t.elementGettingCreated=e;var l=new s(a);return l.setParentComponent(this),this.createBean(l,null,r),l}return null},t.prototype.copyAttributesFromNode=function(e,r){e0(e.attributes,function(o,i){return r.setAttribute(o,i)})},t.prototype.swapComponentForNode=function(e,r,o){var i=e.getGui();r.replaceChild(i,o),r.insertBefore(document.createComment(o.nodeName),i),this.addDestroyFunc(this.destroyBean.bind(this,e)),this.swapInComponentForQuerySelectors(e,o)},t.prototype.swapInComponentForQuerySelectors=function(e,r){var o=this;this.iterateOverQuerySelectors(function(i){o[i.attributeName]===r&&(o[i.attributeName]=e)})},t.prototype.iterateOverQuerySelectors=function(e){for(var r=Object.getPrototypeOf(this);r!=null;){var o=r.__agComponentMetaData,i=Mg(r.constructor);o&&o[i]&&o[i].querySelectors&&o[i].querySelectors.forEach(function(a){return e(a)}),r=Object.getPrototypeOf(r)}},t.prototype.activateTabIndex=function(e){var r=this.gridOptionsService.getNum("tabIndex")||0;e||(e=[]),e.length||e.push(this.getGui()),e.forEach(function(o){return o.setAttribute("tabindex",r.toString())})},t.prototype.setTemplate=function(e,r){var o=tr(e);this.setTemplateFromElement(o,r)},t.prototype.setTemplateFromElement=function(e,r){this.eGui=e,this.eGui.__agComponent=this,this.wireQuerySelectors(),this.getContext()&&this.createChildComponentsFromTags(this.getGui(),r)},t.prototype.createChildComponentsPreConstruct=function(){this.getGui()&&this.createChildComponentsFromTags(this.getGui())},t.prototype.wireQuerySelectors=function(){var e=this;if(this.eGui){var r=this;this.iterateOverQuerySelectors(function(o){var i=function(l){return r[o.attributeName]=l},a=o.refSelector&&e.getAttribute("ref")===o.refSelector;if(a)i(e.eGui);else{var s=e.eGui.querySelector(o.querySelector);s&&i(s.__agComponent||s)}})}},t.prototype.getGui=function(){return this.eGui},t.prototype.getFocusableElement=function(){return this.eGui},t.prototype.getAriaElement=function(){return this.getFocusableElement()},t.prototype.setParentComponent=function(e){this.parentComponent=e},t.prototype.getParentComponent=function(){return this.parentComponent},t.prototype.setGui=function(e){this.eGui=e},t.prototype.queryForHtmlElement=function(e){return this.eGui.querySelector(e)},t.prototype.queryForHtmlInputElement=function(e){return this.eGui.querySelector(e)},t.prototype.appendChild=function(e,r){if(e!=null)if(r||(r=this.eGui),Ed(e))r.appendChild(e);else{var o=e;r.appendChild(o.getGui())}},t.prototype.isDisplayed=function(){return this.displayed},t.prototype.setVisible=function(e,r){if(r===void 0&&(r={}),e!==this.visible){this.visible=e;var o=r.skipAriaHidden;YD(this.eGui,e,{skipAriaHidden:o})}},t.prototype.setDisplayed=function(e,r){if(r===void 0&&(r={}),e!==this.displayed){this.displayed=e;var o=r.skipAriaHidden;we(this.eGui,e,{skipAriaHidden:o});var i={type:t.EVENT_DISPLAYED_CHANGED,visible:this.displayed};this.dispatchEvent(i)}},t.prototype.destroy=function(){this.tooltipFeature&&(this.tooltipFeature=this.destroyBean(this.tooltipFeature)),this.parentComponent&&(this.parentComponent=void 0);var e=this.eGui;e&&e.__agComponent&&(e.__agComponent=void 0),n.prototype.destroy.call(this)},t.prototype.addGuiEventListener=function(e,r,o){var i=this;this.eGui.addEventListener(e,r,o),this.addDestroyFunc(function(){return i.eGui.removeEventListener(e,r)})},t.prototype.addCssClass=function(e){this.cssClassManager.addCssClass(e)},t.prototype.removeCssClass=function(e){this.cssClassManager.removeCssClass(e)},t.prototype.containsCssClass=function(e){return this.cssClassManager.containsCssClass(e)},t.prototype.addOrRemoveCssClass=function(e,r){this.cssClassManager.addOrRemoveCssClass(e,r)},t.prototype.getAttribute=function(e){var r=this.eGui;return r?r.getAttribute(e):null},t.prototype.getRefElement=function(e){return this.queryForHtmlElement('[ref="'+e+'"]')},t.EVENT_DISPLAYED_CHANGED="displayedChanged",vw([w("agStackComponentsRegistry")],t.prototype,"agStackComponentsRegistry",void 0),vw([rS],t.prototype,"preConstructOnComponent",null),vw([rS],t.prototype,"createChildComponentsPreConstruct",null),t}(F);function ZB(n){return a0.bind(this,n,void 0)}function G(n){return a0.bind(this,"[ref="+n+"]",n)}function a0(n,t,e,r,o){if(n===null){console.error("AG Grid: QuerySelector selector should not be null");return}if(typeof o=="number"){console.error("AG Grid: QuerySelector should be on an attribute");return}eW(e,"querySelectors",{attributeName:r,querySelector:n,refSelector:t})}function eW(n,t,e){var r=tW(n,Mg(n.constructor));r[t]||(r[t]=[]),r[t].push(e)}function tW(n,t){return n.__agComponentMetaData||(n.__agComponentMetaData={}),n.__agComponentMetaData[t]||(n.__agComponentMetaData[t]={}),n.__agComponentMetaData[t]}var rW=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(r[i]=o[i])},n(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");n(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}}(),eI=function(n,t,e,r){var o=arguments.length,i=o<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(n,t,e,r);else for(var s=n.length-1;s>=0;s--)(a=n[s])&&(i=(o<3?a(i):o>3?a(t,e,i):a(t,e))||i);return o>3&&i&&Object.defineProperty(t,e,i),i},nW=function(n){rW(t,n);function t(){return n.call(this,` `)||this}return t.prototype.destroy=function(){n.prototype.destroy.call(this)},t.prototype.init=function(e){this.params=e;var r=this.columnModel.getDisplayNameForColumn(e.column,"header",!0),o=this.localeService.getLocaleTextFunc();this.eFloatingFilterText.setDisabled(!0).setInputAriaLabel(r+" "+o("ariaFilterInput","Filter Input"))},t.prototype.onParentModelChanged=function(e){var r=this;if(!e){this.eFloatingFilterText.setValue("");return}this.params.parentFilterInstance(function(o){if(o.getModelAsString){var i=o.getModelAsString(e);r.eFloatingFilterText.setValue(i)}})},t.prototype.onParamsUpdated=function(e){this.init(e)},eI([G("eFloatingFilterText")],t.prototype,"eFloatingFilterText",void 0),eI([w("columnModel")],t.prototype,"columnModel",void 0),t}(se),s0=function(){function n(t,e,r,o){var i=this;this.alive=!0,this.context=t,this.eParent=o;var a=e.getDateCompDetails(r),s=a.newAgStackInstance();s.then(function(l){if(!i.alive){t.destroyBean(l);return}i.dateComp=l,l&&(o.appendChild(l.getGui()),l.afterGuiAttached&&l.afterGuiAttached(),i.tempValue&&l.setDate(i.tempValue),i.disabled!=null&&i.setDateCompDisabled(i.disabled))})}return n.prototype.destroy=function(){this.alive=!1,this.dateComp=this.context.destroyBean(this.dateComp)},n.prototype.getDate=function(){return this.dateComp?this.dateComp.getDate():this.tempValue},n.prototype.setDate=function(t){this.dateComp?this.dateComp.setDate(t):this.tempValue=t},n.prototype.setDisabled=function(t){this.dateComp?this.setDateCompDisabled(t):this.disabled=t},n.prototype.setDisplayed=function(t){we(this.eParent,t)},n.prototype.setInputPlaceholder=function(t){this.dateComp&&this.dateComp.setInputPlaceholder&&this.dateComp.setInputPlaceholder(t)},n.prototype.setInputAriaLabel=function(t){this.dateComp&&this.dateComp.setInputAriaLabel&&this.dateComp.setInputAriaLabel(t)},n.prototype.afterGuiAttached=function(t){this.dateComp&&typeof this.dateComp.afterGuiAttached=="function"&&this.dateComp.afterGuiAttached(t)},n.prototype.updateParams=function(t){var e;!((e=this.dateComp)===null||e===void 0)&&e.onParamsUpdated&&typeof this.dateComp.onParamsUpdated=="function"&&this.dateComp.onParamsUpdated(t)},n.prototype.setDateCompDisabled=function(t){this.dateComp!=null&&this.dateComp.setDisabled!=null&&this.dateComp.setDisabled(t)},n}(),l0=function(){function n(){this.customFilterOptions={}}return n.prototype.init=function(t,e){this.filterOptions=t.filterOptions||e,this.mapCustomOptions(),this.selectDefaultItem(t)},n.prototype.getFilterOptions=function(){return this.filterOptions},n.prototype.mapCustomOptions=function(){var t=this;this.filterOptions&&this.filterOptions.forEach(function(e){if(typeof e!="string"){var r=[["displayKey"],["displayName"],["predicate","test"]],o=function(i){return i.some(function(a){return e[a]!=null})?!0:(console.warn("AG Grid: ignoring FilterOptionDef as it doesn't contain one of '"+i+"'"),!1)};if(!r.every(o)){t.filterOptions=t.filterOptions.filter(function(i){return i===e})||[];return}t.customFilterOptions[e.displayKey]=e}})},n.prototype.selectDefaultItem=function(t){if(t.defaultOption)this.defaultOption=t.defaultOption;else if(this.filterOptions.length>=1){var e=this.filterOptions[0];typeof e=="string"?this.defaultOption=e:e.displayKey?this.defaultOption=e.displayKey:console.warn("AG Grid: invalid FilterOptionDef supplied as it doesn't contain a 'displayKey'")}else console.warn("AG Grid: no filter options for filter")},n.prototype.getDefaultOption=function(){return this.defaultOption},n.prototype.getCustomOption=function(t){return this.customFilterOptions[t]},n}(),u0={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:"Not equal",lessThan:"Less than",greaterThan:"Greater than",inRange:"In range",inRangeStart:"From",inRangeEnd:"To",lessThanOrEqual:"Less than or equals",greaterThanOrEqual:"Greater than or equals",contains:"Contains",notContains:"Not contains",startsWith:"Starts with",endsWith:"Ends with",blank:"Blank",notBlank:"Not blank",andCondition:"AND",orCondition:"OR",dateFormatOoo:"yyyy-mm-dd"},oW=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(r[i]=o[i])},n(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");n(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}}(),fS=function(){return fS=Object.assign||function(n){for(var t,e=1,r=arguments.length;e=0;s--)(a=n[s])&&(i=(o<3?a(i):o>3?a(t,e,i):a(t,e))||i);return o>3&&i&&Object.defineProperty(t,e,i),i},Di=function(n){oW(t,n);function t(e,r){r===void 0&&(r={});var o=n.call(this)||this;return o.eFocusableElement=e,o.callbacks=r,o.callbacks=fS({shouldStopEventPropagation:function(){return!1},onTabKeyDown:function(i){if(!i.defaultPrevented){var a=o.focusService.findNextFocusableElement(o.eFocusableElement,!1,i.shiftKey);a&&(a.focus(),i.preventDefault())}}},r),o}return t.prototype.postConstruct=function(){this.eFocusableElement.classList.add(t.FOCUS_MANAGED_CLASS),this.addKeyDownListeners(this.eFocusableElement),this.callbacks.onFocusIn&&this.addManagedListener(this.eFocusableElement,"focusin",this.callbacks.onFocusIn),this.callbacks.onFocusOut&&this.addManagedListener(this.eFocusableElement,"focusout",this.callbacks.onFocusOut)},t.prototype.addKeyDownListeners=function(e){var r=this;this.addManagedListener(e,"keydown",function(o){if(!(o.defaultPrevented||_o(o))){if(r.callbacks.shouldStopEventPropagation(o)){ii(o);return}o.key===O.TAB?r.callbacks.onTabKeyDown(o):r.callbacks.handleKeyDown&&r.callbacks.handleKeyDown(o)}})},t.FOCUS_MANAGED_CLASS="ag-focus-managed",tI([w("focusService")],t.prototype,"focusService",void 0),tI([M],t.prototype,"postConstruct",null),t}(F),iW=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(r[i]=o[i])},n(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");n(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}}(),mw=function(n,t,e,r){var o=arguments.length,i=o<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(n,t,e,r);else for(var s=n.length-1;s>=0;s--)(a=n[s])&&(i=(o<3?a(i):o>3?a(t,e,i):a(t,e))||i);return o>3&&i&&Object.defineProperty(t,e,i),i},c0="ag-resizer-wrapper",aW='
`,YS=function(n){iW(t,n);function t(e,r){var o=n.call(this)||this;return o.element=e,o.dragStartPosition={x:0,y:0},o.position={x:0,y:0},o.lastSize={width:-1,height:-1},o.positioned=!1,o.resizersAdded=!1,o.resizeListeners=[],o.boundaryEl=null,o.isResizing=!1,o.isMoving=!1,o.resizable={},o.movable=!1,o.currentResizer=null,o.config=Object.assign({},{popup:!1},r),o}return t.prototype.center=function(){var e=this.offsetParent,r=e.clientHeight,o=e.clientWidth,i=o/2-this.getWidth()/2,a=r/2-this.getHeight()/2;this.offsetElement(i,a)},t.prototype.initialisePosition=function(){if(!this.positioned){var e=this.config,r=e.centered,o=e.forcePopupParentAsOffsetParent,i=e.minWidth,a=e.width,s=e.minHeight,l=e.height,u=e.x,c=e.y;this.offsetParent||this.setOffsetParent();var d=0,f=0,p=!!this.element.offsetParent;if(p){var h=this.findBoundaryElement(),v=window.getComputedStyle(h);if(v.minWidth!=null){var C=h.offsetWidth-this.element.offsetWidth;f=parseInt(v.minWidth,10)-C}if(v.minHeight!=null){var m=h.offsetHeight-this.element.offsetHeight;d=parseInt(v.minHeight,10)-m}}if(this.minHeight=s||d,this.minWidth=i||f,a&&this.setWidth(a),l&&this.setHeight(l),(!a||!l)&&this.refreshSize(),r)this.center();else if(u||c)this.offsetElement(u,c);else if(p&&o){var h=this.boundaryEl,y=!0;if(h||(h=this.findBoundaryElement(),y=!1),h){var S=parseFloat(h.style.top),E=parseFloat(h.style.left);y?this.offsetElement(isNaN(E)?0:E,isNaN(S)?0:S):this.setPosition(E,S)}}this.positioned=!!this.offsetParent}},t.prototype.isPositioned=function(){return this.positioned},t.prototype.getPosition=function(){return this.position},t.prototype.setMovable=function(e,r){if(!(!this.config.popup||e===this.movable)){this.movable=e;var o=this.moveElementDragListener||{eElement:r,onDragStart:this.onMoveStart.bind(this),onDragging:this.onMove.bind(this),onDragStop:this.onMoveEnd.bind(this)};e?(this.dragService.addDragSource(o),this.moveElementDragListener=o):(this.dragService.removeDragSource(o),this.moveElementDragListener=void 0)}},t.prototype.setResizable=function(e){var r=this;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(function(o){var i=e,a=!!i[o],s=r.getResizerElement(o),l={dragStartPixels:0,eElement:s,onDragStart:function(u){return r.onResizeStart(u,o)},onDragging:r.onResize.bind(r),onDragStop:function(u){return r.onResizeEnd(u,o)}};(a||!r.isAlive()&&!a)&&(a?(r.dragService.addDragSource(l),r.resizeListeners.push(l),s.style.pointerEvents="all"):s.style.pointerEvents="none",r.resizable[o]=a)})},t.prototype.removeSizeFromEl=function(){this.element.style.removeProperty("height"),this.element.style.removeProperty("width"),this.element.style.removeProperty("flex")},t.prototype.restoreLastSize=function(){this.element.style.flex="0 0 auto";var e=this.lastSize,r=e.height,o=e.width;o!==-1&&(this.element.style.width=o+"px"),r!==-1&&(this.element.style.height=r+"px")},t.prototype.getHeight=function(){return this.element.offsetHeight},t.prototype.setHeight=function(e){var r=this.config.popup,o=this.element,i=!1;if(typeof e=="string"&&e.indexOf("%")!==-1)Ps(o,e),e=VS(o),i=!0;else if(e=Math.max(this.minHeight,e),this.positioned){var a=this.getAvailableHeight();a&&e>a&&(e=a)}this.getHeight()!==e&&(i?(o.style.maxHeight="unset",o.style.minHeight="unset"):r?Ps(o,e):(o.style.height=e+"px",o.style.flex="0 0 auto",this.lastSize.height=typeof e=="number"?e:parseFloat(e)))},t.prototype.getAvailableHeight=function(){var e=this.config,r=e.popup,o=e.forcePopupParentAsOffsetParent;this.positioned||this.initialisePosition();var i=this.offsetParent.clientHeight;if(!i)return null;var a=this.element.getBoundingClientRect(),s=this.offsetParent.getBoundingClientRect(),l=r?this.position.y:a.top,u=r?0:s.top,c=0;if(o){var d=this.element.parentElement;if(d){var f=d.getBoundingClientRect().bottom;c=f-a.bottom}}var p=i+u-l-c;return p},t.prototype.getWidth=function(){return this.element.offsetWidth},t.prototype.setWidth=function(e){var r=this.element,o=this.config.popup,i=!1;if(typeof e=="string"&&e.indexOf("%")!==-1)eo(r,e),e=gd(r),i=!0;else if(this.positioned){e=Math.max(this.minWidth,e);var a=this.offsetParent.clientWidth,s=o?this.position.x:this.element.getBoundingClientRect().left;a&&e+s>a&&(e=a-s)}this.getWidth()!==e&&(i?(r.style.maxWidth="unset",r.style.minWidth="unset"):this.config.popup?eo(r,e):(r.style.width=e+"px",r.style.flex=" unset",this.lastSize.width=typeof e=="number"?e:parseFloat(e)))},t.prototype.offsetElement=function(e,r){e===void 0&&(e=0),r===void 0&&(r=0);var o=this.config.forcePopupParentAsOffsetParent,i=o?this.boundaryEl:this.element;i&&(this.popupService.positionPopup({ePopup:i,keepWithinBounds:!0,skipObserver:this.movable||this.isResizable(),updatePosition:function(){return{x:e,y:r}}}),this.setPosition(parseFloat(i.style.left),parseFloat(i.style.top)))},t.prototype.constrainSizeToAvailableHeight=function(e){var r=this;if(this.config.forcePopupParentAsOffsetParent){var o=function(){var i=r.getAvailableHeight();r.element.style.setProperty("max-height",i+"px")};e?this.resizeObserverSubscriber=this.resizeObserverService.observeResize(this.popupService.getPopupParent(),o):(this.element.style.removeProperty("max-height"),this.resizeObserverSubscriber&&(this.resizeObserverSubscriber(),this.resizeObserverSubscriber=void 0))}},t.prototype.setPosition=function(e,r){this.position.x=e,this.position.y=r},t.prototype.updateDragStartPosition=function(e,r){this.dragStartPosition={x:e,y:r}},t.prototype.calculateMouseMovement=function(e){var r=e.e,o=e.isLeft,i=e.isTop,a=e.anywhereWithin,s=e.topBuffer,l=r.clientX-this.dragStartPosition.x,u=r.clientY-this.dragStartPosition.y,c=this.shouldSkipX(r,!!o,!!a,l)?0:l,d=this.shouldSkipY(r,!!i,s,u)?0:u;return{movementX:c,movementY:d}},t.prototype.shouldSkipX=function(e,r,o,i){var a=this.element.getBoundingClientRect(),s=this.offsetParent.getBoundingClientRect(),l=this.boundaryEl.getBoundingClientRect(),u=this.config.popup?this.position.x:a.left,c=u<=0&&s.left>=e.clientX||s.right<=e.clientX&&s.right<=l.right;return c?!0:(r?c=i<0&&e.clientX>u+s.left||i>0&&e.clientXl.right||i>0&&e.clientXl.right||i>0&&e.clientX=e.clientY||s.bottom<=e.clientY&&s.bottom<=l.bottom;return c?!0:(r?c=i<0&&e.clientY>u+s.top+o||i>0&&e.clientYl.bottom||i>0&&e.clientYthis.element.parentElement.offsetHeight&&(I=!0),I||this.setHeight(L)}this.updateDragStartPosition(e.clientX,e.clientY),((o||i)&&y||S)&&this.offsetElement(C+y,m+S)}},t.prototype.onResizeEnd=function(e,r){this.isResizing=!1,this.currentResizer=null,this.boundaryEl=null;var o={type:"resize",api:this.gridOptionsService.api,columnApi:this.gridOptionsService.columnApi};this.element.classList.remove("ag-resizing"),this.resizerMap[r].element.classList.remove("ag-active"),this.dispatchEvent(o)},t.prototype.refreshSize=function(){var e=this.element;this.config.popup&&(this.config.width||this.setWidth(e.offsetWidth),this.config.height||this.setHeight(e.offsetHeight))},t.prototype.onMoveStart=function(e){this.boundaryEl=this.findBoundaryElement(),this.positioned||this.initialisePosition(),this.isMoving=!0,this.element.classList.add("ag-moving"),this.updateDragStartPosition(e.clientX,e.clientY)},t.prototype.onMove=function(e){if(this.isMoving){var r=this.position,o=r.x,i=r.y,a;this.config.calculateTopBuffer&&(a=this.config.calculateTopBuffer());var s=this.calculateMouseMovement({e,isTop:!0,anywhereWithin:!0,topBuffer:a}),l=s.movementX,u=s.movementY;this.offsetElement(o+l,i+u),this.updateDragStartPosition(e.clientX,e.clientY)}},t.prototype.onMoveEnd=function(){this.isMoving=!1,this.boundaryEl=null,this.element.classList.remove("ag-moving")},t.prototype.setOffsetParent=function(){this.config.forcePopupParentAsOffsetParent?this.offsetParent=this.popupService.getPopupParent():this.offsetParent=this.element.offsetParent},t.prototype.findBoundaryElement=function(){for(var e=this.element;e;){if(window.getComputedStyle(e).position!=="static")return e;e=e.parentElement}return this.element},t.prototype.clearResizeListeners=function(){for(;this.resizeListeners.length;){var e=this.resizeListeners.pop();this.dragService.removeDragSource(e)}},t.prototype.destroy=function(){n.prototype.destroy.call(this),this.moveElementDragListener&&this.dragService.removeDragSource(this.moveElementDragListener),this.constrainSizeToAvailableHeight(!1),this.clearResizeListeners(),this.removeResizers()},mw([w("popupService")],t.prototype,"popupService",void 0),mw([w("resizeObserverService")],t.prototype,"resizeObserverService",void 0),mw([w("dragService")],t.prototype,"dragService",void 0),t}(F),sW=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(r[i]=o[i])},n(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");n(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}}(),yw=function(n,t,e,r){var o=arguments.length,i=o<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(n,t,e,r);else for(var s=n.length-1;s>=0;s--)(a=n[s])&&(i=(o<3?a(i):o>3?a(t,e,i):a(t,e))||i);return o>3&&i&&Object.defineProperty(t,e,i),i},wd=function(n){sW(t,n);function t(e){var r=n.call(this)||this;return r.filterNameKey=e,r.applyActive=!1,r.hidePopup=null,r.debouncePending=!1,r.appliedModel=null,r}return t.prototype.postConstruct=function(){this.resetTemplate(),this.createManagedBean(new Di(this.getFocusableElement(),{handleKeyDown:this.handleKeyDown.bind(this)})),this.positionableFeature=new YS(this.getPositionableElement(),{forcePopupParentAsOffsetParent:!0}),this.createBean(this.positionableFeature)},t.prototype.handleKeyDown=function(e){},t.prototype.getFilterTitle=function(){return this.translate(this.filterNameKey)},t.prototype.isFilterActive=function(){return!!this.appliedModel},t.prototype.resetTemplate=function(e){var r=this.getGui();r&&r.removeEventListener("submit",this.onFormSubmit);var o=`
`+this.createBodyTemplate()+`
`;this.setTemplate(o,e),r=this.getGui(),r&&r.addEventListener("submit",this.onFormSubmit)},t.prototype.isReadOnly=function(){return!!this.providedFilterParams.readOnly},t.prototype.init=function(e){var r=this;this.setParams(e),this.resetUiToDefaults(!0).then(function(){r.updateUiVisibility(),r.setupOnBtApplyDebounce()})},t.prototype.setParams=function(e){this.providedFilterParams=e,this.applyActive=t.isUseApplyButton(e),this.createButtonPanel()},t.prototype.createButtonPanel=function(){var e=this,r=this.providedFilterParams.buttons;if(!(!r||r.length<1||this.isReadOnly())){var o=document.createElement("div");o.classList.add("ag-filter-apply-panel");var i=function(a){var s,l;switch(a){case"apply":s=e.translate("applyFilter"),l=function(d){return e.onBtApply(!1,!1,d)};break;case"clear":s=e.translate("clearFilter"),l=function(){return e.onBtClear()};break;case"reset":s=e.translate("resetFilter"),l=function(){return e.onBtReset()};break;case"cancel":s=e.translate("cancelFilter"),l=function(d){e.onBtCancel(d)};break;default:console.warn("AG Grid: Unknown button type specified");return}var u=a==="apply"?"submit":"button",c=tr(``);o.appendChild(c),e.addManagedListener(c,"click",l)};KS(r).forEach(function(a){return i(a)}),this.getGui().appendChild(o)}},t.prototype.getDefaultDebounceMs=function(){return 0},t.prototype.setupOnBtApplyDebounce=function(){var e=this,r=t.getDebounceMs(this.providedFilterParams,this.getDefaultDebounceMs()),o=wo(this.checkApplyDebounce.bind(this),r);this.onBtApplyDebounce=function(){e.debouncePending=!0,o()}},t.prototype.checkApplyDebounce=function(){this.debouncePending&&(this.debouncePending=!1,this.onBtApply())},t.prototype.getModel=function(){return this.appliedModel?this.appliedModel:null},t.prototype.setModel=function(e){var r=this,o=e!=null?this.setModelIntoUi(e):this.resetUiToDefaults();return o.then(function(){r.updateUiVisibility(),r.applyModel("api")})},t.prototype.onBtCancel=function(e){var r=this;this.resetUiToActiveModel(this.getModel(),function(){r.handleCancelEnd(e)})},t.prototype.handleCancelEnd=function(e){this.providedFilterParams.closeOnApply&&this.close(e)},t.prototype.resetUiToActiveModel=function(e,r){var o=this,i=function(){o.onUiChanged(!1,"prevent"),r?.()};e!=null?this.setModelIntoUi(e).then(i):this.resetUiToDefaults().then(i)},t.prototype.onBtClear=function(){var e=this;this.resetUiToDefaults().then(function(){return e.onUiChanged()})},t.prototype.onBtReset=function(){this.onBtClear(),this.onBtApply()},t.prototype.applyModel=function(e){var r=this.getModelFromUi();if(!this.isModelValid(r))return!1;var o=this.appliedModel;return this.appliedModel=r,!this.areModelsEqual(o,r)},t.prototype.isModelValid=function(e){return!0},t.prototype.onFormSubmit=function(e){e.preventDefault()},t.prototype.onBtApply=function(e,r,o){if(e===void 0&&(e=!1),r===void 0&&(r=!1),o&&o.preventDefault(),this.applyModel(r?"rowDataUpdated":"ui")){var i="columnFilter";this.providedFilterParams.filterChangedCallback({afterFloatingFilter:e,afterDataChange:r,source:i})}var a=this.providedFilterParams.closeOnApply;a&&this.applyActive&&!e&&!r&&this.close(o)},t.prototype.onNewRowsLoaded=function(){},t.prototype.close=function(e){if(this.hidePopup){var r=e,o=r&&r.key,i;(o==="Enter"||o==="Space")&&(i={keyboardEvent:r}),this.hidePopup(i),this.hidePopup=null}},t.prototype.onUiChanged=function(e,r){if(e===void 0&&(e=!1),this.updateUiVisibility(),this.providedFilterParams.filterModifiedCallback(),this.applyActive&&!this.isReadOnly()){var o=this.isModelValid(this.getModelFromUi());Jl(this.getRefElement("applyFilterButton"),!o)}e&&!r||r==="immediately"?this.onBtApply(e):(!this.applyActive&&!r||r==="debounce")&&this.onBtApplyDebounce()},t.prototype.afterGuiAttached=function(e){e&&(this.hidePopup=e.hidePopup),this.refreshFilterResizer(e?.container)},t.prototype.refreshFilterResizer=function(e){if(!(!this.positionableFeature||e==="toolPanel")){var r=e==="floatingFilter",o=this,i=o.positionableFeature,a=o.gridOptionsService;r?(i.restoreLastSize(),i.setResizable(a.is("enableRtl")?{bottom:!0,bottomLeft:!0,left:!0}:{bottom:!0,bottomRight:!0,right:!0})):(this.positionableFeature.removeSizeFromEl(),this.positionableFeature.setResizable(!1)),this.positionableFeature.constrainSizeToAvailableHeight(!0)}},t.prototype.afterGuiDetached=function(){this.checkApplyDebounce(),this.positionableFeature&&this.positionableFeature.constrainSizeToAvailableHeight(!1)},t.getDebounceMs=function(e,r){return t.isUseApplyButton(e)?(e.debounceMs!=null&&console.warn("AG Grid: debounceMs is ignored when apply button is present"),0):e.debounceMs!=null?e.debounceMs:r},t.isUseApplyButton=function(e){return!!e.buttons&&e.buttons.indexOf("apply")>=0},t.prototype.destroy=function(){var e=this.getGui();e&&e.removeEventListener("submit",this.onFormSubmit),this.hidePopup=null,this.positionableFeature&&(this.positionableFeature=this.destroyBean(this.positionableFeature)),n.prototype.destroy.call(this)},t.prototype.translate=function(e){var r=this.localeService.getLocaleTextFunc();return r(e,u0[e])},t.prototype.getCellValue=function(e){var r=this.providedFilterParams,o=r.api,i=r.colDef,a=r.column,s=r.columnApi,l=r.context;return this.providedFilterParams.valueGetter({api:o,colDef:i,column:a,columnApi:s,context:l,data:e.data,getValue:function(u){return e.data[u]},node:e})},t.prototype.getPositionableElement=function(){return this.eFilterBody},yw([w("rowModel")],t.prototype,"rowModel",void 0),yw([G("eFilterBody")],t.prototype,"eFilterBody",void 0),yw([M],t.prototype,"postConstruct",null),t}(se),lW=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(r[i]=o[i])},n(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");n(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}}(),uW=function(n,t,e,r){var o=arguments.length,i=o<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(n,t,e,r);else for(var s=n.length-1;s>=0;s--)(a=n[s])&&(i=(o<3?a(i):o>3?a(t,e,i):a(t,e))||i);return o>3&&i&&Object.defineProperty(t,e,i),i},XS=function(n){lW(t,n);function t(e,r){var o=n.call(this,r)||this;return o.labelSeparator="",o.labelAlignment="left",o.disabled=!1,o.label="",o.config=e||{},o}return t.prototype.postConstruct=function(){this.addCssClass("ag-labeled"),this.eLabel.classList.add("ag-label");var e=this.config,r=e.labelSeparator,o=e.label,i=e.labelWidth,a=e.labelAlignment;r!=null&&this.setLabelSeparator(r),o!=null&&this.setLabel(o),i!=null&&this.setLabelWidth(i),this.setLabelAlignment(a||this.labelAlignment),this.refreshLabel()},t.prototype.refreshLabel=function(){vr(this.eLabel),typeof this.label=="string"?this.eLabel.innerText=this.label+this.labelSeparator:this.label&&this.eLabel.appendChild(this.label),this.label===""?(we(this.eLabel,!1),bt(this.eLabel,"presentation")):(we(this.eLabel,!0),bt(this.eLabel,null))},t.prototype.setLabelSeparator=function(e){return this.labelSeparator===e?this:(this.labelSeparator=e,this.label!=null&&this.refreshLabel(),this)},t.prototype.getLabelId=function(){return this.eLabel.id=this.eLabel.id||"ag-"+this.getCompId()+"-label",this.eLabel.id},t.prototype.getLabel=function(){return this.label},t.prototype.setLabel=function(e){return this.label===e?this:(this.label=e,this.refreshLabel(),this)},t.prototype.setLabelAlignment=function(e){var r=this.getGui(),o=r.classList;return o.toggle("ag-label-align-left",e==="left"),o.toggle("ag-label-align-right",e==="right"),o.toggle("ag-label-align-top",e==="top"),this},t.prototype.setLabelEllipsis=function(e){return this.eLabel.classList.toggle("ag-label-ellipsis",e),this},t.prototype.setLabelWidth=function(e){return this.label==null?this:(Cd(this.eLabel,e),this)},t.prototype.setDisabled=function(e){e=!!e;var r=this.getGui();return Jl(r,e),r.classList.toggle("ag-disabled",e),this.disabled=e,this},t.prototype.isDisabled=function(){return!!this.disabled},uW([M],t.prototype,"postConstruct",null),t}(se),cW=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(r[i]=o[i])},n(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");n(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}}(),QS=function(n){cW(t,n);function t(e,r,o){var i=n.call(this,e,r)||this;return i.className=o,i}return t.prototype.postConstruct=function(){n.prototype.postConstruct.call(this),this.className&&this.addCssClass(this.className)},t.prototype.onValueChange=function(e){var r=this;return this.addManagedListener(this,_.EVENT_FIELD_VALUE_CHANGED,function(){return e(r.getValue())}),this},t.prototype.getWidth=function(){return this.getGui().clientWidth},t.prototype.setWidth=function(e){return eo(this.getGui(),e),this},t.prototype.getPreviousValue=function(){return this.previousValue},t.prototype.getValue=function(){return this.value},t.prototype.setValue=function(e,r){return this.value===e?this:(this.previousValue=this.value,this.value=e,r||this.dispatchEvent({type:_.EVENT_FIELD_VALUE_CHANGED}),this)},t}(XS),dW=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(r[i]=o[i])},n(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");n(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}}(),Gc=function(n,t,e,r){var o=arguments.length,i=o<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(n,t,e,r);else for(var s=n.length-1;s>=0;s--)(a=n[s])&&(i=(o<3?a(i):o>3?a(t,e,i):a(t,e))||i);return o>3&&i&&Object.defineProperty(t,e,i),i},fW=` `,JS=function(n){dW(t,n);function t(e){var r=n.call(this,e,e?.template||fW,e?.className)||this;if(r.isPickerDisplayed=!1,r.skipClick=!1,r.pickerGap=4,r.hideCurrentPicker=null,r.ariaRole=e?.ariaRole,r.onPickerFocusIn=r.onPickerFocusIn.bind(r),r.onPickerFocusOut=r.onPickerFocusOut.bind(r),!e)return r;var o=e.pickerGap,i=e.maxPickerHeight,a=e.variableWidth,s=e.minPickerWidth,l=e.maxPickerWidth;return o!=null&&(r.pickerGap=o),r.variableWidth=!!a,i!=null&&r.setPickerMaxHeight(i),s!=null&&r.setPickerMinWidth(s),l!=null&&r.setPickerMaxWidth(l),r}return t.prototype.postConstruct=function(){n.prototype.postConstruct.call(this),this.setupAria();var e="ag-"+this.getCompId()+"-display";this.eDisplayField.setAttribute("id",e);var r=this.getAriaElement();ID(r,e),this.addManagedListener(r,"keydown",this.onKeyDown.bind(this)),this.addManagedListener(this.eLabel,"mousedown",this.onLabelOrWrapperMouseDown.bind(this)),this.addManagedListener(this.eWrapper,"mousedown",this.onLabelOrWrapperMouseDown.bind(this));var o=this.config.pickerIcon;if(o){var i=_t(o,this.gridOptionsService);i&&this.eIcon.appendChild(i)}},t.prototype.setupAria=function(){var e=this.getAriaElement();e.setAttribute("tabindex",(this.gridOptionsService.getNum("tabIndex")||0).toString()),So(e,!1),this.ariaRole&&bt(e,this.ariaRole)},t.prototype.refreshLabel=function(){var e,r=this.getAriaElement();Gg(r,(e=this.getLabelId())!==null&&e!==void 0?e:""),n.prototype.refreshLabel.call(this)},t.prototype.onLabelOrWrapperMouseDown=function(e){if(e&&(e.preventDefault(),this.getFocusableElement().focus()),this.skipClick){this.skipClick=!1;return}this.isDisabled()||(this.isPickerDisplayed?this.hidePicker():this.showPicker())},t.prototype.onKeyDown=function(e){switch(e.key){case O.UP:case O.DOWN:case O.ENTER:case O.SPACE:e.preventDefault(),this.onLabelOrWrapperMouseDown();break;case O.ESCAPE:this.isPickerDisplayed&&(e.preventDefault(),e.stopPropagation(),this.hideCurrentPicker&&this.hideCurrentPicker());break}},t.prototype.showPicker=function(){this.isPickerDisplayed=!0,this.pickerComponent||(this.pickerComponent=this.createPickerComponent());var e=this.pickerComponent.getGui();e.addEventListener("focusin",this.onPickerFocusIn),e.addEventListener("focusout",this.onPickerFocusOut),this.hideCurrentPicker=this.renderAndPositionPicker(),this.toggleExpandedStyles(!0)},t.prototype.renderAndPositionPicker=function(){var e=this,r=this.gridOptionsService.getDocument(),o=this.pickerComponent.getGui();this.gridOptionsService.is("suppressScrollWhenPopupsAreOpen")||(this.destroyMouseWheelFunc=this.addManagedListener(r.body,"wheel",function(x){o.contains(x.target)||e.hidePicker()}));var i=this.localeService.getLocaleTextFunc(),a=this.config,s=a.pickerType,l=a.pickerAriaLabelKey,u=a.pickerAriaLabelValue,c=a.modalPicker,d=c===void 0?!0:c,f={modal:d,eChild:o,closeOnEsc:!0,closedCallback:function(){var x=r.activeElement===r.body;e.beforeHidePicker(),x&&e.isAlive()&&e.getFocusableElement().focus()},ariaLabel:i(l,u)},p=this.popupService.addPopup(f),h=this,v=h.maxPickerHeight,C=h.minPickerWidth,m=h.maxPickerWidth,y=h.pickerGap,S=h.variableWidth;S?(C&&(o.style.minWidth=C),o.style.width=Ug(gd(this.eWrapper)),m&&(o.style.maxWidth=m)):Cd(o,m??gd(this.eWrapper));var E=v??_d(this.popupService.getPopupParent())+"px";o.style.setProperty("max-height",E),o.style.position="absolute";var R=this.gridOptionsService.is("enableRtl")?"right":"left";return this.popupService.positionPopupByComponent({type:s,eventSource:this.eWrapper,ePopup:o,position:"under",alignSide:R,keepWithinBounds:!0,nudgeY:y}),p.hideFunc},t.prototype.beforeHidePicker=function(){this.destroyMouseWheelFunc&&(this.destroyMouseWheelFunc(),this.destroyMouseWheelFunc=void 0),this.toggleExpandedStyles(!1);var e=this.pickerComponent.getGui();e.removeEventListener("focusin",this.onPickerFocusIn),e.removeEventListener("focusout",this.onPickerFocusOut),this.isPickerDisplayed=!1,this.pickerComponent=void 0,this.hideCurrentPicker=null},t.prototype.toggleExpandedStyles=function(e){if(this.isAlive()){var r=this.getAriaElement();So(r,e),this.eWrapper.classList.toggle("ag-picker-expanded",e),this.eWrapper.classList.toggle("ag-picker-collapsed",!e)}},t.prototype.onPickerFocusIn=function(){this.togglePickerHasFocus(!0)},t.prototype.onPickerFocusOut=function(e){var r;!((r=this.pickerComponent)===null||r===void 0)&&r.getGui().contains(e.relatedTarget)||this.togglePickerHasFocus(!1)},t.prototype.togglePickerHasFocus=function(e){this.pickerComponent&&this.eWrapper.classList.toggle("ag-picker-has-focus",e)},t.prototype.hidePicker=function(){this.hideCurrentPicker&&this.hideCurrentPicker()},t.prototype.setAriaLabel=function(e){return Ii(this.getAriaElement(),e),this},t.prototype.setInputWidth=function(e){return Cd(this.eWrapper,e),this},t.prototype.getFocusableElement=function(){return this.eWrapper},t.prototype.setPickerGap=function(e){return this.pickerGap=e,this},t.prototype.setPickerMinWidth=function(e){return typeof e=="number"&&(e=e+"px"),this.minPickerWidth=e??void 0,this},t.prototype.setPickerMaxWidth=function(e){return typeof e=="number"&&(e=e+"px"),this.maxPickerWidth=e??void 0,this},t.prototype.setPickerMaxHeight=function(e){return typeof e=="number"&&(e=e+"px"),this.maxPickerHeight=e??void 0,this},t.prototype.destroy=function(){this.hidePicker(),n.prototype.destroy.call(this)},Gc([w("popupService")],t.prototype,"popupService",void 0),Gc([G("eLabel")],t.prototype,"eLabel",void 0),Gc([G("eWrapper")],t.prototype,"eWrapper",void 0),Gc([G("eDisplayField")],t.prototype,"eDisplayField",void 0),Gc([G("eIcon")],t.prototype,"eIcon",void 0),t}(QS),pW=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(r[i]=o[i])},n(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");n(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}}(),hW=function(n,t,e,r){var o=arguments.length,i=o<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(n,t,e,r);else for(var s=n.length-1;s>=0;s--)(a=n[s])&&(i=(o<3?a(i):o>3?a(t,e,i):a(t,e))||i);return o>3&&i&&Object.defineProperty(t,e,i),i},rI=function(n){pW(t,n);function t(e){e===void 0&&(e="default");var r=n.call(this,'
')||this;return r.cssIdentifier=e,r.options=[],r.itemEls=[],r}return t.prototype.init=function(){this.addManagedListener(this.getGui(),"keydown",this.handleKeyDown.bind(this))},t.prototype.handleKeyDown=function(e){var r=e.key;switch(r){case O.ENTER:if(!this.highlightedEl)this.setValue(this.getValue());else{var o=this.itemEls.indexOf(this.highlightedEl);this.setValueByIndex(o)}break;case O.DOWN:case O.UP:var i=r===O.DOWN,a=void 0;if(e.preventDefault(),!this.highlightedEl)a=this.itemEls[i?0:this.itemEls.length-1];else{var s=this.itemEls.indexOf(this.highlightedEl),l=s+(i?1:-1);l=Math.min(Math.max(l,0),this.itemEls.length-1),a=this.itemEls[l]}this.highlightItem(a);break}},t.prototype.addOptions=function(e){var r=this;return e.forEach(function(o){return r.addOption(o)}),this},t.prototype.addOption=function(e){var r=e.value,o=e.text,i=xt(o||r);return this.options.push({value:r,text:i}),this.renderOption(r,i),this.updateIndices(),this},t.prototype.updateIndices=function(){var e=this.getGui().querySelectorAll(".ag-list-item");e.forEach(function(r,o){DS(r,o+1),IS(r,e.length)})},t.prototype.renderOption=function(e,r){var o=this,i=document.createElement("div");bt(i,"option"),i.classList.add("ag-list-item","ag-"+this.cssIdentifier+"-list-item"),i.innerHTML=""+r+"",i.tabIndex=-1,this.itemEls.push(i),this.addManagedListener(i,"mouseover",function(){return o.highlightItem(i)}),this.addManagedListener(i,"mouseleave",function(){return o.clearHighlighted()}),this.addManagedListener(i,"click",function(){return o.setValue(e)}),this.getGui().appendChild(i)},t.prototype.setValue=function(e,r){if(this.value===e)return this.fireItemSelected(),this;if(e==null)return this.reset(),this;var o=this.options.findIndex(function(a){return a.value===e});if(o!==-1){var i=this.options[o];this.value=i.value,this.displayValue=i.text!=null?i.text:i.value,this.highlightItem(this.itemEls[o]),r||this.fireChangeEvent()}return this},t.prototype.setValueByIndex=function(e){return this.setValue(this.options[e].value)},t.prototype.getValue=function(){return this.value},t.prototype.getDisplayValue=function(){return this.displayValue},t.prototype.refreshHighlighted=function(){var e=this;this.clearHighlighted();var r=this.options.findIndex(function(o){return o.value===e.value});r!==-1&&this.highlightItem(this.itemEls[r])},t.prototype.reset=function(){this.value=null,this.displayValue=null,this.clearHighlighted(),this.fireChangeEvent()},t.prototype.highlightItem=function(e){e.offsetParent&&(this.clearHighlighted(),this.highlightedEl=e,this.highlightedEl.classList.add(t.ACTIVE_CLASS),Ds(this.highlightedEl,!0),this.highlightedEl.focus())},t.prototype.clearHighlighted=function(){!this.highlightedEl||!this.highlightedEl.offsetParent||(this.highlightedEl.classList.remove(t.ACTIVE_CLASS),Ds(this.highlightedEl,!1),this.highlightedEl=null)},t.prototype.fireChangeEvent=function(){this.dispatchEvent({type:_.EVENT_FIELD_VALUE_CHANGED}),this.fireItemSelected()},t.prototype.fireItemSelected=function(){this.dispatchEvent({type:t.EVENT_ITEM_SELECTED})},t.EVENT_ITEM_SELECTED="selectedItem",t.ACTIVE_CLASS="ag-active-item",hW([M],t.prototype,"init",null),t}(se),gW=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(r[i]=o[i])},n(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");n(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}}(),pS=function(){return pS=Object.assign||function(n){for(var t,e=1,r=arguments.length;e=0;s--)(a=n[s])&&(i=(o<3?a(i):o>3?a(t,e,i):a(t,e))||i);return o>3&&i&&Object.defineProperty(t,e,i),i},Fa=function(n){vW(t,n);function t(e,r,o,i){o===void 0&&(o="text"),i===void 0&&(i="input");var a=n.call(this,e,`
`,r)||this;return a.inputType=o,a.displayFieldTag=i,a}return t.prototype.postConstruct=function(){n.prototype.postConstruct.call(this),this.setInputType(),this.eLabel.classList.add(this.className+"-label"),this.eWrapper.classList.add(this.className+"-input-wrapper"),this.eInput.classList.add(this.className+"-input"),this.addCssClass("ag-input-field"),this.eInput.id=this.eInput.id||"ag-"+this.getCompId()+"-input";var e=this.config,r=e.width,o=e.value;r!=null&&this.setWidth(r),o!=null&&this.setValue(o),this.addInputListeners(),this.activateTabIndex([this.eInput])},t.prototype.refreshLabel=function(){D(this.getLabel())?Gg(this.eInput,this.getLabelId()):this.eInput.removeAttribute("aria-labelledby"),n.prototype.refreshLabel.call(this)},t.prototype.addInputListeners=function(){var e=this;this.addManagedListener(this.eInput,"input",function(r){return e.setValue(r.target.value)})},t.prototype.setInputType=function(){this.displayFieldTag==="input"&&this.eInput.setAttribute("type",this.inputType)},t.prototype.getInputElement=function(){return this.eInput},t.prototype.setInputWidth=function(e){return Cd(this.eWrapper,e),this},t.prototype.setInputName=function(e){return this.getInputElement().setAttribute("name",e),this},t.prototype.getFocusableElement=function(){return this.eInput},t.prototype.setMaxLength=function(e){var r=this.eInput;return r.maxLength=e,this},t.prototype.setInputPlaceholder=function(e){return ni(this.eInput,"placeholder",e),this},t.prototype.setInputAriaLabel=function(e){return Ii(this.eInput,e),this},t.prototype.setDisabled=function(e){return Jl(this.eInput,e),n.prototype.setDisabled.call(this,e)},t.prototype.setAutoComplete=function(e){if(e===!0)ni(this.eInput,"autocomplete",null);else{var r=typeof e=="string"?e:"off";ni(this.eInput,"autocomplete",r)}return this},Cw([G("eLabel")],t.prototype,"eLabel",void 0),Cw([G("eWrapper")],t.prototype,"eWrapper",void 0),Cw([G("eInput")],t.prototype,"eInput",void 0),t}(QS),mW=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(r[i]=o[i])},n(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");n(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}}(),Rd=function(n){mW(t,n);function t(e,r,o){r===void 0&&(r="ag-checkbox"),o===void 0&&(o="checkbox");var i=n.call(this,e,r,o)||this;return i.labelAlignment="right",i.selected=!1,i.readOnly=!1,i.passive=!1,i}return t.prototype.addInputListeners=function(){this.addManagedListener(this.eInput,"click",this.onCheckboxClick.bind(this)),this.addManagedListener(this.eLabel,"click",this.toggle.bind(this))},t.prototype.getNextValue=function(){return this.selected===void 0?!0:!this.selected},t.prototype.setPassive=function(e){this.passive=e},t.prototype.isReadOnly=function(){return this.readOnly},t.prototype.setReadOnly=function(e){this.eWrapper.classList.toggle("ag-disabled",e),this.eInput.disabled=e,this.readOnly=e},t.prototype.setDisabled=function(e){return this.eWrapper.classList.toggle("ag-disabled",e),n.prototype.setDisabled.call(this,e)},t.prototype.toggle=function(){if(!this.eInput.disabled){var e=this.isSelected(),r=this.getNextValue();this.passive?this.dispatchChange(r,e):this.setValue(r)}},t.prototype.getValue=function(){return this.isSelected()},t.prototype.setValue=function(e,r){return this.refreshSelectedClass(e),this.setSelected(e,r),this},t.prototype.setName=function(e){var r=this.getInputElement();return r.name=e,this},t.prototype.isSelected=function(){return this.selected},t.prototype.setSelected=function(e,r){this.isSelected()!==e&&(this.previousValue=this.isSelected(),e=this.selected=typeof e=="boolean"?e:void 0,this.eInput.checked=e,this.eInput.indeterminate=e===void 0,r||this.dispatchChange(this.selected,this.previousValue))},t.prototype.dispatchChange=function(e,r,o){this.dispatchEvent({type:_.EVENT_FIELD_VALUE_CHANGED,selected:e,previousValue:r,event:o});var i=this.getInputElement(),a={type:_.EVENT_CHECKBOX_CHANGED,id:i.id,name:i.name,selected:e,previousValue:r};this.eventService.dispatchEvent(a)},t.prototype.onCheckboxClick=function(e){if(!(this.passive||this.eInput.disabled)){var r=this.isSelected(),o=this.selected=e.target.checked;this.refreshSelectedClass(o),this.dispatchChange(o,r,e)}},t.prototype.refreshSelectedClass=function(e){this.eWrapper.classList.toggle("ag-checked",e===!0),this.eWrapper.classList.toggle("ag-indeterminate",e==null)},t}(Fa),yW=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(r[i]=o[i])},n(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");n(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}}(),ZS=function(n){yW(t,n);function t(e){return n.call(this,e,"ag-radio-button","radio")||this}return t.prototype.isSelected=function(){return this.eInput.checked},t.prototype.toggle=function(){this.eInput.disabled||this.isSelected()||this.setValue(!0)},t.prototype.addInputListeners=function(){n.prototype.addInputListeners.call(this),this.addManagedListener(this.eventService,_.EVENT_CHECKBOX_CHANGED,this.onChange.bind(this))},t.prototype.onChange=function(e){e.selected&&e.name&&this.eInput.name&&this.eInput.name===e.name&&e.id&&this.eInput.id!==e.id&&this.setValue(!1,!0)},t}(Rd),CW=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(r[i]=o[i])},n(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");n(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}}(),wW=function(n,t){var e=typeof Symbol=="function"&&n[Symbol.iterator];if(!e)return n;var r=e.call(n),o,i=[],a;try{for(;(t===void 0||t-- >0)&&!(o=r.next()).done;)i.push(o.value)}catch(s){a={error:s}}finally{try{o&&!o.done&&(e=r.return)&&e.call(r)}finally{if(a)throw a.error}}return i},SW=function(n,t){for(var e=0,r=t.length,o=n.length;e=0?0:e===t.IN_RANGE?2:1},t.prototype.onFloatingFilterChanged=function(e,r){this.setTypeFromFloatingFilter(e),this.setValueFromFloatingFilter(r),this.onUiChanged(!0)},t.prototype.setTypeFromFloatingFilter=function(e){var r=this;this.eTypes.forEach(function(o,i){i===0?o.setValue(e,!0):o.setValue(r.optionsFactory.getDefaultOption(),!0)})},t.prototype.getModelFromUi=function(){var e=this.getUiCompleteConditions();return e.length===0?null:this.maxNumConditions>1&&e.length>1?{filterType:this.getFilterType(),operator:this.getJoinOperator(),condition1:e[0],condition2:e[1],conditions:e}:e[0]},t.prototype.getConditionTypes=function(){return this.eTypes.map(function(e){return e.getValue()})},t.prototype.getConditionType=function(e){return this.eTypes[e].getValue()},t.prototype.getJoinOperator=function(){return this.eJoinOperatorsOr.length===0?this.defaultJoinOperator:this.eJoinOperatorsOr[0].getValue()===!0?"OR":"AND"},t.prototype.areModelsEqual=function(e,r){var o=this;if(!e&&!r)return!0;if(!e&&r||e&&!r)return!1;var i=!e.operator,a=!r.operator,s=!i&&a||i&&!a;if(s)return!1;var l;if(i){var u=e,c=r;l=this.areSimpleModelsEqual(u,c)}else{var d=e,f=r;l=d.operator===f.operator&&Aa(d.conditions,f.conditions,function(p,h){return o.areSimpleModelsEqual(p,h)})}return l},t.prototype.setModelIntoUi=function(e){var r=this,o=e.operator;if(o){var i=e;i.conditions||(i.conditions=[i.condition1,i.condition2]);var a=this.validateAndUpdateConditions(i.conditions),s=this.getNumConditions();if(as)for(var l=s;l1&&this.removeConditionsAndOperators(1),this.eTypes[0].setValue(c.type,!0),this.setConditionIntoUi(c,0)}return this.lastUiCompletePosition=this.getNumConditions()-1,this.createMissingConditionsAndOperators(),this.onUiChanged(),yn.resolve()},t.prototype.validateAndUpdateConditions=function(e){var r=e.length;return r>this.maxNumConditions&&(e.splice(this.maxNumConditions),ge(function(){return console.warn('AG Grid: Filter Model contains more conditions than "filterParams.maxNumConditions". Additional conditions have been ignored.')},"simpleFilterSetModelMaxNumConditions"),r=this.maxNumConditions),r},t.prototype.doesFilterPass=function(e){var r=this,o,i=this.getModel();if(i==null)return!0;var a=i.operator,s=[];if(a){var l=i;s.push.apply(s,SW([],wW((o=l.conditions)!==null&&o!==void 0?o:[])))}else s.push(i);var u=a&&a==="OR"?"some":"every";return s[u](function(c){return r.individualConditionPasses(e,c)})},t.prototype.setParams=function(e){n.prototype.setParams.call(this,e),this.setNumConditions(e),this.defaultJoinOperator=this.getDefaultJoinOperator(e.defaultJoinOperator),this.filterPlaceholder=e.filterPlaceholder,this.optionsFactory=new l0,this.optionsFactory.init(e,this.getDefaultFilterOptions()),this.createFilterListOptions(),this.createOption(),this.createMissingConditionsAndOperators(),this.isReadOnly()&&this.eFilterBody.setAttribute("tabindex","-1")},t.prototype.setNumConditions=function(e){var r,o;e.suppressAndOrCondition!=null&&ge(function(){return console.warn('AG Grid: Since v29.2 "filterParams.suppressAndOrCondition" is deprecated. Use "filterParams.maxNumConditions = 1" instead.')},"simpleFilterSuppressAndOrCondition"),e.alwaysShowBothConditions!=null&&ge(function(){return console.warn('AG Grid: Since v29.2 "filterParams.alwaysShowBothConditions" is deprecated. Use "filterParams.numAlwaysVisibleConditions = 2" instead.')},"simpleFilterAlwaysShowBothConditions"),this.maxNumConditions=(r=e.maxNumConditions)!==null&&r!==void 0?r:e.suppressAndOrCondition?1:2,this.maxNumConditions<1&&(ge(function(){return console.warn('AG Grid: "filterParams.maxNumConditions" must be greater than or equal to zero.')},"simpleFilterMaxNumConditions"),this.maxNumConditions=1),this.numAlwaysVisibleConditions=(o=e.numAlwaysVisibleConditions)!==null&&o!==void 0?o:e.alwaysShowBothConditions?2:1,this.numAlwaysVisibleConditions<1&&(ge(function(){return console.warn('AG Grid: "filterParams.numAlwaysVisibleConditions" must be greater than or equal to zero.')},"simpleFilterNumAlwaysVisibleConditions"),this.numAlwaysVisibleConditions=1),this.numAlwaysVisibleConditions>this.maxNumConditions&&(ge(function(){return console.warn('AG Grid: "filterParams.numAlwaysVisibleConditions" cannot be greater than "filterParams.maxNumConditions".')},"simpleFilterNumAlwaysVisibleGreaterThanMaxNumConditions"),this.numAlwaysVisibleConditions=this.maxNumConditions)},t.prototype.createOption=function(){var e=this,r=this.createManagedBean(new qg);this.eTypes.push(r),r.addCssClass("ag-filter-select"),this.eFilterBody.appendChild(r.getGui());var o=this.createValueElement();this.eConditionBodies.push(o),this.eFilterBody.appendChild(o),this.putOptionsIntoDropdown(r),this.resetType(r);var i=this.getNumConditions()-1;this.forEachPositionInput(i,function(a){return e.resetInput(a)}),this.addChangedListeners(r,i)},t.prototype.createJoinOperatorPanel=function(){var e=document.createElement("div");this.eJoinOperatorPanels.push(e),e.classList.add("ag-filter-condition");var r=this.createJoinOperator(this.eJoinOperatorsAnd,e,"and"),o=this.createJoinOperator(this.eJoinOperatorsOr,e,"or");this.eFilterBody.appendChild(e);var i=this.eJoinOperatorPanels.length-1,a=this.joinOperatorId++;this.resetJoinOperatorAnd(r,i,a),this.resetJoinOperatorOr(o,i,a),this.isReadOnly()||(r.onValueChange(this.listener),o.onValueChange(this.listener))},t.prototype.createJoinOperator=function(e,r,o){var i=this.createManagedBean(new ZS);return e.push(i),i.addCssClass("ag-filter-condition-operator"),i.addCssClass("ag-filter-condition-operator-"+o),r.appendChild(i.getGui()),i},t.prototype.getDefaultJoinOperator=function(e){return e==="AND"||e==="OR"?e:"AND"},t.prototype.createFilterListOptions=function(){var e=this,r=this.optionsFactory.getFilterOptions();this.filterListOptions=r.map(function(o){return typeof o=="string"?e.createBoilerplateListOption(o):e.createCustomListOption(o)})},t.prototype.putOptionsIntoDropdown=function(e){this.filterListOptions.forEach(function(r){e.addOption(r)}),e.setDisabled(this.filterListOptions.length<=1)},t.prototype.createBoilerplateListOption=function(e){return{value:e,text:this.translate(e)}},t.prototype.createCustomListOption=function(e){var r=e.displayKey,o=this.optionsFactory.getCustomOption(e.displayKey);return{value:r,text:o?this.localeService.getLocaleTextFunc()(o.displayKey,o.displayName):this.translate(r)}},t.prototype.isAllowTwoConditions=function(){return this.maxNumConditions>=2},t.prototype.createBodyTemplate=function(){return""},t.prototype.getCssIdentifier=function(){return"simple-filter"},t.prototype.updateUiVisibility=function(){var e=this.getJoinOperator();this.updateNumConditions(),this.updateConditionStatusesAndValues(this.lastUiCompletePosition,e)},t.prototype.updateNumConditions=function(){for(var e,r=-1,o=!0,i=0;i0&&this.removeConditionsAndOperators(s,l),this.createMissingConditionsAndOperators()}}this.lastUiCompletePosition=r},t.prototype.updateConditionStatusesAndValues=function(e,r){var o=this;this.eTypes.forEach(function(a,s){var l=o.isConditionDisabled(s,e);a.setDisabled(l||o.filterListOptions.length<=1),s===1&&(Jl(o.eJoinOperatorPanels[0],l),o.eJoinOperatorsAnd[0].setDisabled(l),o.eJoinOperatorsOr[0].setDisabled(l))}),this.eConditionBodies.forEach(function(a,s){we(a,o.isConditionBodyVisible(s))});var i=(r??this.getJoinOperator())==="OR";this.eJoinOperatorsAnd.forEach(function(a,s){a.setValue(!i,!0)}),this.eJoinOperatorsOr.forEach(function(a,s){a.setValue(i,!0)}),this.forEachInput(function(a,s,l,u){o.setElementDisplayed(a,s=this.getNumConditions())){this.removeComponents(this.eTypes,e,r),this.removeElements(this.eConditionBodies,e,r),this.removeValueElements(e,r);var o=Math.max(e-1,0);this.removeElements(this.eJoinOperatorPanels,o,r),this.removeComponents(this.eJoinOperatorsAnd,o,r),this.removeComponents(this.eJoinOperatorsOr,o,r)}},t.prototype.removeElements=function(e,r,o){var i=this.removeItems(e,r,o);i.forEach(function(a){return Oi(a)})},t.prototype.removeComponents=function(e,r,o){var i=this,a=this.removeItems(e,r,o);a.forEach(function(s){Oi(s.getGui()),i.destroyBean(s)})},t.prototype.removeItems=function(e,r,o){return o==null?e.splice(r):e.splice(r,o)},t.prototype.afterGuiAttached=function(e){if(n.prototype.afterGuiAttached.call(this,e),this.resetPlaceholder(),!e?.suppressFocus)if(this.isReadOnly())this.eFilterBody.focus();else{var r=this.getInputs(0)[0];if(!r)return;r instanceof Fa&&r.getInputElement().focus()}},t.prototype.afterGuiDetached=function(){n.prototype.afterGuiDetached.call(this);var e=this.getModel();(!this.areModelsEqual(e,this.getModelFromUi())||this.hasInvalidInputs())&&this.resetUiToActiveModel(e);for(var r=-1,o=-1,i=!1,a=this.getJoinOperator(),s=this.getNumConditions()-1;s>=0;s--)if(this.isConditionUiComplete(s))r===-1&&(r=s,o=s);else{var l=s>=this.numAlwaysVisibleConditions&&!this.isConditionUiComplete(s-1),u=s1?"inRangeStart":i===0?"filterOoo":"inRangeEnd",u=i===0&&s>1?r("ariaFilterFromValue","Filter from value"):i===0?r("ariaFilterValue","Filter Value"):r("ariaFilterToValue","Filter to Value");o.setInputPlaceholder(e.getPlaceholderText(l,a)),o.setInputAriaLabel(u)}})},t.prototype.setElementValue=function(e,r,o){e instanceof Fa&&e.setValue(r!=null?String(r):null,!0)},t.prototype.setElementDisplayed=function(e,r){e instanceof se&&we(e.getGui(),r)},t.prototype.setElementDisabled=function(e,r){e instanceof se&&Jl(e.getGui(),r)},t.prototype.attachElementOnChange=function(e,r){e instanceof Fa&&e.onValueChange(r)},t.prototype.forEachInput=function(e){var r=this;this.getConditionTypes().forEach(function(o,i){r.forEachPositionTypeInput(i,o,e)})},t.prototype.forEachPositionInput=function(e,r){var o=this.getConditionType(e);this.forEachPositionTypeInput(e,o,r)},t.prototype.forEachPositionTypeInput=function(e,r,o){for(var i=this.getNumberOfInputs(r),a=this.getInputs(e),s=0;sr+1},t.prototype.isConditionBodyVisible=function(e){var r=this.getConditionType(e),o=this.getNumberOfInputs(r);return o>0},t.prototype.isConditionUiComplete=function(e){if(e>=this.getNumConditions())return!1;var r=this.getConditionType(e);return!(r===t.EMPTY||this.getValues(e).some(function(o){return o==null}))},t.prototype.getNumConditions=function(){return this.eTypes.length},t.prototype.getUiCompleteConditions=function(){for(var e=[],r=0;r0)},t.prototype.resetInput=function(e){this.setElementValue(e,null),this.setElementDisabled(e,this.isReadOnly())},t.prototype.setConditionIntoUi=function(e,r){var o=this,i=this.mapValuesFromModel(e);this.forEachInput(function(a,s,l,u){l===r&&o.setElementValue(a,i[s]!=null?i[s]:null)})},t.prototype.setValueFromFloatingFilter=function(e){var r=this;this.forEachInput(function(o,i,a,s){r.setElementValue(o,i===0&&a===0?e:null,!0)})},t.prototype.isDefaultOperator=function(e){return e===this.defaultJoinOperator},t.prototype.addChangedListeners=function(e,r){var o=this;this.isReadOnly()||(e.onValueChange(this.listener),this.forEachPositionInput(r,function(i){o.attachElementOnChange(i,o.listener)}))},t.prototype.individualConditionPasses=function(e,r){var o=this.getCellValue(e.node),i=this.mapValuesFromModel(r),a=this.optionsFactory.getCustomOption(r.type),s=this.evaluateCustomFilter(a,i,o);return s??(o==null?this.evaluateNullValue(r.type):this.evaluateNonNullValue(i,o,r,e))},t.prototype.evaluateCustomFilter=function(e,r,o){if(e!=null){var i=e.predicate;if(i!=null&&!r.some(function(a){return a==null}))return i(r,o)}},t.prototype.isBlank=function(e){return e==null||typeof e=="string"&&e.trim().length===0},t.prototype.hasInvalidInputs=function(){return!1},t.EMPTY="empty",t.BLANK="blank",t.NOT_BLANK="notBlank",t.EQUALS="equals",t.NOT_EQUAL="notEqual",t.LESS_THAN="lessThan",t.LESS_THAN_OR_EQUAL="lessThanOrEqual",t.GREATER_THAN="greaterThan",t.GREATER_THAN_OR_EQUAL="greaterThanOrEqual",t.IN_RANGE="inRange",t.CONTAINS="contains",t.NOT_CONTAINS="notContains",t.STARTS_WITH="startsWith",t.ENDS_WITH="endsWith",t}(wd),_W=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(r[i]=o[i])},n(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");n(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}}(),At=function(n){_W(t,n);function t(){return n!==null&&n.apply(this,arguments)||this}return t.prototype.setParams=function(e){n.prototype.setParams.call(this,e),this.scalarFilterParams=e},t.prototype.evaluateNullValue=function(e){switch(e){case t.EQUALS:case t.NOT_EQUAL:if(this.scalarFilterParams.includeBlanksInEquals)return!0;break;case t.GREATER_THAN:case t.GREATER_THAN_OR_EQUAL:if(this.scalarFilterParams.includeBlanksInGreaterThan)return!0;break;case t.LESS_THAN:case t.LESS_THAN_OR_EQUAL:if(this.scalarFilterParams.includeBlanksInLessThan)return!0;break;case t.IN_RANGE:if(this.scalarFilterParams.includeBlanksInRange)return!0;break;case t.BLANK:return!0;case t.NOT_BLANK:return!1}return!1},t.prototype.evaluateNonNullValue=function(e,r,o){var i=this.comparator(),a=e[0]!=null?i(e[0],r):0;switch(o.type){case t.EQUALS:return a===0;case t.NOT_EQUAL:return a!==0;case t.GREATER_THAN:return a>0;case t.GREATER_THAN_OR_EQUAL:return a>=0;case t.LESS_THAN:return a<0;case t.LESS_THAN_OR_EQUAL:return a<=0;case t.IN_RANGE:{var s=i(e[1],r);return this.scalarFilterParams.inRangeInclusive?a>=0&&s<=0:a>0&&s<0}case t.BLANK:return this.isBlank(r);case t.NOT_BLANK:return!this.isBlank(r);default:return console.warn('AG Grid: Unexpected type of filter "'+o.type+'", it looks like the filter was configured with incorrect Filter Options'),!0}},t}(tt),d0=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(r[i]=o[i])},n(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");n(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}}(),hS=function(){return hS=Object.assign||function(n){for(var t,e=1,r=arguments.length;e=0;s--)(a=n[s])&&(i=(o<3?a(i):o>3?a(t,e,i):a(t,e))||i);return o>3&&i&&Object.defineProperty(t,e,i),i},nI=1e3,oI=1/0,f0=function(n){d0(t,n);function t(e,r,o){var i=n.call(this,r,o)||this;return i.dateFilterParams=e,i}return t.prototype.conditionToString=function(e,r){var o=e.type,i=(r||{}).numberOfInputs,a=o==tt.IN_RANGE||i===2,s=Jr(e.dateFrom),l=Jr(e.dateTo),u=this.dateFilterParams.inRangeFloatingFilterDateFormat;if(a){var c=s!==null?Ql(s,u):"null",d=l!==null?Ql(l,u):"null";return c+"-"+d}return s!=null?Ql(s,u):""+o},t.prototype.updateParams=function(e){n.prototype.updateParams.call(this,e),this.dateFilterParams=e.dateFilterParams},t}(e_),t_=function(n){d0(t,n);function t(){var e=n.call(this,"dateFilter")||this;return e.eConditionPanelsFrom=[],e.eConditionPanelsTo=[],e.dateConditionFromComps=[],e.dateConditionToComps=[],e.minValidYear=nI,e.maxValidYear=oI,e.minValidDate=null,e.maxValidDate=null,e}return t.prototype.afterGuiAttached=function(e){n.prototype.afterGuiAttached.call(this,e),this.dateConditionFromComps[0].afterGuiAttached(e)},t.prototype.mapValuesFromModel=function(e){var r=e||{},o=r.dateFrom,i=r.dateTo,a=r.type;return[o&&Jr(o)||null,i&&Jr(i)||null].slice(0,this.getNumberOfInputs(a))},t.prototype.comparator=function(){return this.dateFilterParams.comparator?this.dateFilterParams.comparator:this.defaultComparator.bind(this)},t.prototype.defaultComparator=function(e,r){var o=r;return r==null||oe?1:0},t.prototype.setParams=function(e){this.dateFilterParams=e,n.prototype.setParams.call(this,e);var r=function(o,i){if(e[o]!=null)if(isNaN(e[o]))console.warn("AG Grid: DateFilter "+o+" is not a number");else return e[o]==null?i:Number(e[o]);return i};this.minValidYear=r("minValidYear",nI),this.maxValidYear=r("maxValidYear",oI),this.minValidYear>this.maxValidYear&&console.warn("AG Grid: DateFilter minValidYear should be <= maxValidYear"),e.minValidDate?this.minValidDate=e.minValidDate instanceof Date?e.minValidDate:Jr(e.minValidDate):this.minValidDate=null,e.maxValidDate?this.maxValidDate=e.maxValidDate instanceof Date?e.maxValidDate:Jr(e.maxValidDate):this.maxValidDate=null,this.minValidDate&&this.maxValidDate&&this.minValidDate>this.maxValidDate&&console.warn("AG Grid: DateFilter minValidDate should be <= maxValidDate"),this.filterModelFormatter=new f0(this.dateFilterParams,this.localeService,this.optionsFactory)},t.prototype.createDateCompWrapper=function(e){var r=this,o=new s0(this.getContext(),this.userComponentFactory,{onDateChanged:function(){return r.onUiChanged()},filterParams:this.dateFilterParams},e);return this.addDestroyFunc(function(){return o.destroy()}),o},t.prototype.setElementValue=function(e,r){e.setDate(r)},t.prototype.setElementDisplayed=function(e,r){e.setDisplayed(r)},t.prototype.setElementDisabled=function(e,r){e.setDisabled(r)},t.prototype.getDefaultFilterOptions=function(){return t.DEFAULT_FILTER_OPTIONS},t.prototype.createValueElement=function(){var e=document.createElement("div");return e.classList.add("ag-filter-body"),this.createFromToElement(e,this.eConditionPanelsFrom,this.dateConditionFromComps,"from"),this.createFromToElement(e,this.eConditionPanelsTo,this.dateConditionToComps,"to"),e},t.prototype.createFromToElement=function(e,r,o,i){var a=document.createElement("div");a.classList.add("ag-filter-"+i),a.classList.add("ag-filter-date-"+i),r.push(a),e.appendChild(a),o.push(this.createDateCompWrapper(a))},t.prototype.removeValueElements=function(e,r){this.removeDateComps(this.dateConditionFromComps,e,r),this.removeDateComps(this.dateConditionToComps,e,r),this.removeItems(this.eConditionPanelsFrom,e,r),this.removeItems(this.eConditionPanelsTo,e,r)},t.prototype.removeDateComps=function(e,r,o){var i=this.removeItems(e,r,o);i.forEach(function(a){return a.destroy()})},t.prototype.isValidDateValue=function(e){if(e===null)return!1;if(this.minValidDate){if(ethis.maxValidDate)return!1}else if(e.getUTCFullYear()>this.maxValidYear)return!1;return!0},t.prototype.isConditionUiComplete=function(e){var r=this;if(!n.prototype.isConditionUiComplete.call(this,e))return!1;var o=!0;return this.forEachInput(function(i,a,s,l){s!==e||!o||a>=l||(o=o&&r.isValidDateValue(i.getDate()))}),o},t.prototype.areSimpleModelsEqual=function(e,r){return e.dateFrom===r.dateFrom&&e.dateTo===r.dateTo&&e.type===r.type},t.prototype.getFilterType=function(){return"date"},t.prototype.createCondition=function(e){var r=this.getConditionType(e),o={},i=this.getValues(e);return i.length>0&&(o.dateFrom=Zn(i[0])),i.length>1&&(o.dateTo=Zn(i[1])),hS({dateFrom:null,dateTo:null,filterType:this.getFilterType(),type:r},o)},t.prototype.resetPlaceholder=function(){var e=this.localeService.getLocaleTextFunc(),r=this.translate("dateFormatOoo"),o=e("ariaFilterValue","Filter Value");this.forEachInput(function(i){i.setInputPlaceholder(r),i.setInputAriaLabel(o)})},t.prototype.getInputs=function(e){return e>=this.dateConditionFromComps.length?[null,null]:[this.dateConditionFromComps[e],this.dateConditionToComps[e]]},t.prototype.getValues=function(e){var r=[];return this.forEachPositionInput(e,function(o,i,a,s){i=0;s--)(a=n[s])&&(i=(o<3?a(i):o>3?a(t,e,i):a(t,e))||i);return o>3&&i&&Object.defineProperty(t,e,i),i},xW=function(n){TW(t,n);function t(){return n.call(this,` `)||this}return t.prototype.getDefaultFilterOptions=function(){return t_.DEFAULT_FILTER_OPTIONS},t.prototype.init=function(e){n.prototype.init.call(this,e),this.params=e,this.filterParams=e.filterParams,this.createDateComponent(),this.filterModelFormatter=new f0(this.filterParams,this.localeService,this.optionsFactory);var r=this.localeService.getLocaleTextFunc();this.eReadOnlyText.setDisabled(!0).setInputAriaLabel(r("ariaDateFilterInput","Date Filter Input"))},t.prototype.onParamsUpdated=function(e){n.prototype.onParamsUpdated.call(this,e),this.params=e,this.filterParams=e.filterParams,this.updateDateComponent(),this.filterModelFormatter.updateParams({optionsFactory:this.optionsFactory,dateFilterParams:this.filterParams})},t.prototype.setEditable=function(e){we(this.eDateWrapper,e),we(this.eReadOnlyText.getGui(),!e)},t.prototype.onParentModelChanged=function(e,r){if(!(this.isEventFromFloatingFilter(r)||this.isEventFromDataChange(r))){n.prototype.setLastTypeFromModel.call(this,e);var o=!this.isReadOnly()&&this.canWeEditAfterModelFromParentFilter(e);if(this.setEditable(o),o){if(e){var i=e;this.dateComp.setDate(Jr(i.dateFrom))}else this.dateComp.setDate(null);this.eReadOnlyText.setValue("")}else this.eReadOnlyText.setValue(this.filterModelFormatter.getModelAsString(e)),this.dateComp.setDate(null)}},t.prototype.onDateChanged=function(){var e=this,r=this.dateComp.getDate(),o=Zn(r);this.params.parentFilterInstance(function(i){if(i){var a=Jr(o);i.onFloatingFilterChanged(e.getLastType()||null,a)}})},t.prototype.getDateComponentParams=function(){var e=wd.getDebounceMs(this.params.filterParams,this.getDefaultDebounceMs());return{onDateChanged:wo(this.onDateChanged.bind(this),e),filterParams:this.params.column.getColDef().filterParams}},t.prototype.createDateComponent=function(){var e=this;this.dateComp=new s0(this.getContext(),this.userComponentFactory,this.getDateComponentParams(),this.eDateWrapper),this.addDestroyFunc(function(){return e.dateComp.destroy()})},t.prototype.updateDateComponent=function(){var e=this.getDateComponentParams(),r=this.gridOptionsService,o=r.api,i=r.columnApi,a=r.context;e.api=o,e.columnApi=i,e.context=a,this.dateComp.updateParams(e)},t.prototype.getFilterModelFormatter=function(){return this.filterModelFormatter},ww([w("userComponentFactory")],t.prototype,"userComponentFactory",void 0),ww([G("eReadOnlyText")],t.prototype,"eReadOnlyText",void 0),ww([G("eDateWrapper")],t.prototype,"eDateWrapper",void 0),t}(p0),PW=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(r[i]=o[i])},n(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");n(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}}(),OW=function(n,t,e,r){var o=arguments.length,i=o<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(n,t,e,r);else for(var s=n.length-1;s>=0;s--)(a=n[s])&&(i=(o<3?a(i):o>3?a(t,e,i):a(t,e))||i);return o>3&&i&&Object.defineProperty(t,e,i),i},LW=function(n,t){var e=typeof Symbol=="function"&&n[Symbol.iterator];if(!e)return n;var r=e.call(n),o,i=[],a;try{for(;(t===void 0||t-- >0)&&!(o=r.next()).done;)i.push(o.value)}catch(s){a={error:s}}finally{try{o&&!o.done&&(e=r.return)&&e.call(r)}finally{if(a)throw a.error}}return i},IW=function(n){PW(t,n);function t(){return n.call(this,`
`)||this}return t.prototype.destroy=function(){n.prototype.destroy.call(this)},t.prototype.init=function(e){var r=this;this.params=e,this.setParams(e);var o=this.gridOptionsService.getDocument(),i=this.eDateInput.getInputElement();this.addManagedListener(i,"mousedown",function(){r.eDateInput.isDisabled()||r.usingSafariDatePicker||i.focus()}),this.addManagedListener(i,"input",function(a){a.target===o.activeElement&&(r.eDateInput.isDisabled()||r.params.onDateChanged())})},t.prototype.setParams=function(e){var r=this.eDateInput.getInputElement(),o=this.shouldUseBrowserDatePicker(e);this.usingSafariDatePicker=o&&to(),r.type=o?"date":"text";var i=e.filterParams||{},a=i.minValidYear,s=i.maxValidYear,l=i.minValidDate,u=i.maxValidDate;if(l&&a&&ge(function(){return console.warn("AG Grid: DateFilter should not have both minValidDate and minValidYear parameters set at the same time! minValidYear will be ignored.")},"DateFilter.minValidDateAndMinValidYearWarning"),u&&s&&ge(function(){return console.warn("AG Grid: DateFilter should not have both maxValidDate and maxValidYear parameters set at the same time! maxValidYear will be ignored.")},"DateFilter.maxValidDateAndMaxValidYearWarning"),l&&u){var c=LW([l,u].map(function(p){return p instanceof Date?p:Jr(p)}),2),d=c[0],f=c[1];d&&f&&d.getTime()>f.getTime()&&ge(function(){return console.warn("AG Grid: DateFilter parameter minValidDate should always be lower than or equal to parameter maxValidDate.")},"DateFilter.minValidDateAndMaxValidDateWarning")}l?l instanceof Date?r.min=Ql(l):r.min=l:a&&(r.min=a+"-01-01"),u?u instanceof Date?r.max=Ql(u):r.max=u:s&&(r.max=s+"-12-31")},t.prototype.onParamsUpdated=function(e){this.params=e,this.setParams(e)},t.prototype.getDate=function(){return Jr(this.eDateInput.getValue())},t.prototype.setDate=function(e){this.eDateInput.setValue(Zn(e,!1))},t.prototype.setInputPlaceholder=function(e){this.eDateInput.setInputPlaceholder(e)},t.prototype.setDisabled=function(e){this.eDateInput.setDisabled(e)},t.prototype.afterGuiAttached=function(e){(!e||!e.suppressFocus)&&this.eDateInput.getInputElement().focus()},t.prototype.shouldUseBrowserDatePicker=function(e){return e.filterParams&&e.filterParams.browserDatePicker!=null?e.filterParams.browserDatePicker:Vg()||MS()||to()&&bS()>=14.1},OW([G("eDateInput")],t.prototype,"eDateInput",void 0),t}(se),DW=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(r[i]=o[i])},n(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");n(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}}(),Ha=function(n){DW(t,n);function t(e,r,o){return r===void 0&&(r="ag-text-field"),o===void 0&&(o="text"),n.call(this,e,r,o)||this}return t.prototype.postConstruct=function(){n.prototype.postConstruct.call(this),this.config.allowedCharPattern&&this.preventDisallowedCharacters()},t.prototype.setValue=function(e,r){return this.eInput.value!==e&&(this.eInput.value=D(e)?e:""),n.prototype.setValue.call(this,e,r)},t.prototype.setStartValue=function(e){this.setValue(e,!0)},t.prototype.preventDisallowedCharacters=function(){var e=new RegExp("["+this.config.allowedCharPattern+"]"),r=function(o){jg(o)&&o.key&&!e.test(o.key)&&o.preventDefault()};this.addManagedListener(this.eInput,"keydown",r),this.addManagedListener(this.eInput,"paste",function(o){var i,a=(i=o.clipboardData)===null||i===void 0?void 0:i.getData("text");a&&a.split("").some(function(s){return!e.test(s)})&&o.preventDefault()})},t}(Fa),AW=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(r[i]=o[i])},n(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");n(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}}(),$g=function(n){AW(t,n);function t(e){return n.call(this,e,"ag-number-field","number")||this}return t.prototype.postConstruct=function(){var e=this;n.prototype.postConstruct.call(this),this.addManagedListener(this.eInput,"blur",function(){var r=parseFloat(e.eInput.value),o=isNaN(r)?"":e.normalizeValue(r.toString());e.value!==o&&e.setValue(o)}),this.addManagedListener(this.eInput,"wheel",this.onWheel.bind(this)),this.eInput.step="any"},t.prototype.onWheel=function(e){document.activeElement===this.eInput&&e.preventDefault()},t.prototype.normalizeValue=function(e){if(e==="")return"";this.precision!=null&&(e=this.adjustPrecision(e));var r=parseFloat(e);return this.min!=null&&rthis.max&&(e=this.max.toString()),e},t.prototype.adjustPrecision=function(e,r){if(this.precision==null)return e;if(r){var o=parseFloat(e).toFixed(this.precision);return parseFloat(o).toString()}var i=String(e).split(".");if(i.length>1){if(i[1].length<=this.precision)return e;if(this.precision>0)return i[0]+"."+i[1].slice(0,this.precision)}return i[0]},t.prototype.setMin=function(e){return this.min===e?this:(this.min=e,ni(this.eInput,"min",e),this)},t.prototype.setMax=function(e){return this.max===e?this:(this.max=e,ni(this.eInput,"max",e),this)},t.prototype.setPrecision=function(e){return this.precision=e,this},t.prototype.setStep=function(e){return this.step===e?this:(this.step=e,ni(this.eInput,"step",e),this)},t.prototype.setValue=function(e,r){var o=this;return this.setValueOrInputValue(function(i){return n.prototype.setValue.call(o,i,r)},function(){return o},e)},t.prototype.setStartValue=function(e){var r=this;return this.setValueOrInputValue(function(o){return n.prototype.setValue.call(r,o,!0)},function(o){r.eInput.value=o},e)},t.prototype.setValueOrInputValue=function(e,r,o){if(D(o)){var i=this.isScientificNotation(o);if(i&&this.eInput.validity.valid)return e(o);if(!i){o=this.adjustPrecision(o);var a=this.normalizeValue(o);i=o!=a}if(i)return r(o)}return e(o)},t.prototype.getValue=function(){if(this.eInput.validity.valid){var e=this.eInput.value;return this.isScientificNotation(e)?this.adjustPrecision(e,!0):n.prototype.getValue.call(this)}},t.prototype.isScientificNotation=function(e){return typeof e=="string"&&e.includes("e")},t}(Ha),h0=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(r[i]=o[i])},n(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");n(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}}(),g0=function(n){h0(t,n);function t(){return n!==null&&n.apply(this,arguments)||this}return t.prototype.conditionToString=function(e,r){var o=(r||{}).numberOfInputs,i=e.type==tt.IN_RANGE||o===2;return i?this.formatValue(e.filter)+"-"+this.formatValue(e.filterTo):e.filter!=null?this.formatValue(e.filter):""+e.type},t}(e_);function gS(n){var t=(n??{}).allowedCharPattern;return t??null}var r_=function(n){h0(t,n);function t(){var e=n.call(this,"numberFilter")||this;return e.eValuesFrom=[],e.eValuesTo=[],e}return t.prototype.mapValuesFromModel=function(e){var r=e||{},o=r.filter,i=r.filterTo,a=r.type;return[this.processValue(o),this.processValue(i)].slice(0,this.getNumberOfInputs(a))},t.prototype.getDefaultDebounceMs=function(){return 500},t.prototype.comparator=function(){return function(e,r){return e===r?0:e0&&(o.filter=i[0]),i.length>1&&(o.filterTo=i[1]),o},t.prototype.getInputs=function(e){return e>=this.eValuesFrom.length?[null,null]:[this.eValuesFrom[e],this.eValuesTo[e]]},t.prototype.getModelAsString=function(e){var r;return(r=this.filterModelFormatter.getModelAsString(e))!==null&&r!==void 0?r:""},t.prototype.hasInvalidInputs=function(){var e=!1;return this.forEachInput(function(r){if(!r.getInputElement().validity.valid){e=!0;return}}),e},t.DEFAULT_FILTER_OPTIONS=[At.EQUALS,At.NOT_EQUAL,At.LESS_THAN,At.LESS_THAN_OR_EQUAL,At.GREATER_THAN,At.GREATER_THAN_OR_EQUAL,At.IN_RANGE,At.BLANK,At.NOT_BLANK],t}(At),v0=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(r[i]=o[i])},n(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");n(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}}(),wg=function(){return wg=Object.assign||function(n){for(var t,e=1,r=arguments.length;e0&&(o.filter=i[0]),i.length>1&&(o.filterTo=i[1]),o},t.prototype.getFilterType=function(){return"text"},t.prototype.areSimpleModelsEqual=function(e,r){return e.filter===r.filter&&e.filterTo===r.filterTo&&e.type===r.type},t.prototype.getInputs=function(e){return e>=this.eValuesFrom.length?[null,null]:[this.eValuesFrom[e],this.eValuesTo[e]]},t.prototype.getValues=function(e){return this.getValuesWithSideEffects(e,!1)},t.prototype.getValuesWithSideEffects=function(e,r){var o=this,i=[];return this.forEachPositionInput(e,function(a,s,l,u){var c;if(s=0:!1},t.prototype.evaluateNonNullValue=function(e,r,o,i){var a=this,s=e.map(function(m){return a.formatter(m)})||[],l=this.formatter(r),u=this.textFilterParams,c=u.api,d=u.colDef,f=u.column,p=u.columnApi,h=u.context,v=u.textFormatter;if(o.type===tt.BLANK)return this.isBlank(r);if(o.type===tt.NOT_BLANK)return!this.isBlank(r);var C={api:c,colDef:d,column:f,columnApi:p,context:h,node:i.node,data:i.data,filterOption:o.type,value:l,textFormatter:v};return s.some(function(m){return a.matcher(wg(wg({},C),{filterText:m}))})},t.prototype.getModelAsString=function(e){var r;return(r=this.filterModelFormatter.getModelAsString(e))!==null&&r!==void 0?r:""},t.DEFAULT_FILTER_OPTIONS=[tt.CONTAINS,tt.NOT_CONTAINS,tt.EQUALS,tt.NOT_EQUAL,tt.STARTS_WITH,tt.ENDS_WITH,tt.BLANK,tt.NOT_BLANK],t.DEFAULT_FORMATTER=function(e){return e},t.DEFAULT_LOWERCASE_FORMATTER=function(e){return e==null?null:e.toString().toLowerCase()},t.DEFAULT_MATCHER=function(e){var r=e.filterOption,o=e.value,i=e.filterText;if(i==null)return!1;switch(r){case t.CONTAINS:return o.indexOf(i)>=0;case t.NOT_CONTAINS:return o.indexOf(i)<0;case t.EQUALS:return o===i;case t.NOT_EQUAL:return o!=i;case t.STARTS_WITH:return o.indexOf(i)===0;case t.ENDS_WITH:var a=o.lastIndexOf(i);return a>=0&&a===o.length-i.length;default:return!1}},t}(tt),y0=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(r[i]=o[i])},n(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");n(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}}(),Sw=function(n,t,e,r){var o=arguments.length,i=o<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(n,t,e,r);else for(var s=n.length-1;s>=0;s--)(a=n[s])&&(i=(o<3?a(i):o>3?a(t,e,i):a(t,e))||i);return o>3&&i&&Object.defineProperty(t,e,i),i},C0=function(n){y0(t,n);function t(e){var r=n.call(this)||this;return r.params=e,r.valueChangedListener=function(){},r}return t.prototype.setupGui=function(e){var r=this,o;this.eFloatingFilterTextInput=this.createManagedBean(new Ha((o=this.params)===null||o===void 0?void 0:o.config));var i=this.eFloatingFilterTextInput.getGui();e.appendChild(i),this.addManagedListener(i,"input",function(a){return r.valueChangedListener(a)}),this.addManagedListener(i,"keydown",function(a){return r.valueChangedListener(a)})},t.prototype.setEditable=function(e){this.eFloatingFilterTextInput.setDisabled(!e)},t.prototype.setAutoComplete=function(e){this.eFloatingFilterTextInput.setAutoComplete(e)},t.prototype.getValue=function(){return this.eFloatingFilterTextInput.getValue()},t.prototype.setValue=function(e,r){this.eFloatingFilterTextInput.setValue(e,r)},t.prototype.setValueChangedListener=function(e){this.valueChangedListener=e},t.prototype.setParams=function(e){this.setAriaLabel(e.ariaLabel),e.autoComplete!==void 0&&this.setAutoComplete(e.autoComplete)},t.prototype.setAriaLabel=function(e){this.eFloatingFilterTextInput.setInputAriaLabel(e)},t}(F),w0=function(n){y0(t,n);function t(){return n!==null&&n.apply(this,arguments)||this}return t.prototype.postConstruct=function(){this.setTemplate(` `)},t.prototype.getDefaultDebounceMs=function(){return 500},t.prototype.onParentModelChanged=function(e,r){this.isEventFromFloatingFilter(r)||this.isEventFromDataChange(r)||(this.setLastTypeFromModel(e),this.setEditable(this.canWeEditAfterModelFromParentFilter(e)),this.floatingFilterInputService.setValue(this.getFilterModelFormatter().getModelAsString(e)))},t.prototype.init=function(e){this.setupFloatingFilterInputService(e),n.prototype.init.call(this,e),this.setTextInputParams(e)},t.prototype.setupFloatingFilterInputService=function(e){this.floatingFilterInputService=this.createFloatingFilterInputService(e),this.floatingFilterInputService.setupGui(this.eFloatingFilterInputContainer)},t.prototype.setTextInputParams=function(e){var r;this.params=e;var o=(r=e.browserAutoComplete)!==null&&r!==void 0?r:!1;if(this.floatingFilterInputService.setParams({ariaLabel:this.getAriaLabel(e),autoComplete:o}),this.applyActive=wd.isUseApplyButton(this.params.filterParams),!this.isReadOnly()){var i=wd.getDebounceMs(this.params.filterParams,this.getDefaultDebounceMs()),a=wo(this.syncUpWithParentFilter.bind(this),i);this.floatingFilterInputService.setValueChangedListener(a)}},t.prototype.onParamsUpdated=function(e){n.prototype.onParamsUpdated.call(this,e),this.setTextInputParams(e)},t.prototype.recreateFloatingFilterInputService=function(e){var r=this.floatingFilterInputService.getValue();vr(this.eFloatingFilterInputContainer),this.destroyBean(this.floatingFilterInputService),this.setupFloatingFilterInputService(e),this.floatingFilterInputService.setValue(r,!0)},t.prototype.getAriaLabel=function(e){var r=this.columnModel.getDisplayNameForColumn(e.column,"header",!0),o=this.localeService.getLocaleTextFunc();return r+" "+o("ariaFilterInput","Filter Input")},t.prototype.syncUpWithParentFilter=function(e){var r=this,o=e.key===O.ENTER;if(!(this.applyActive&&!o)){var i=this.floatingFilterInputService.getValue();this.params.filterParams.trimInput&&(i=Kg.trimInput(i),this.floatingFilterInputService.setValue(i,!0)),this.params.parentFilterInstance(function(a){a&&a.onFloatingFilterChanged(r.getLastType()||null,i||null)})}},t.prototype.setEditable=function(e){this.floatingFilterInputService.setEditable(e)},Sw([w("columnModel")],t.prototype,"columnModel",void 0),Sw([G("eFloatingFilterInputContainer")],t.prototype,"eFloatingFilterInputContainer",void 0),Sw([M],t.prototype,"postConstruct",null),t}(p0),S0=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(r[i]=o[i])},n(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");n(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}}(),FW=function(n){S0(t,n);function t(){var e=n!==null&&n.apply(this,arguments)||this;return e.valueChangedListener=function(){},e.numberInputActive=!0,e}return t.prototype.setupGui=function(e){var r=this;this.eFloatingFilterNumberInput=this.createManagedBean(new $g),this.eFloatingFilterTextInput=this.createManagedBean(new Ha),this.eFloatingFilterTextInput.setDisabled(!0);var o=this.eFloatingFilterNumberInput.getGui(),i=this.eFloatingFilterTextInput.getGui();e.appendChild(o),e.appendChild(i),this.setupListeners(o,function(a){return r.valueChangedListener(a)}),this.setupListeners(i,function(a){return r.valueChangedListener(a)})},t.prototype.setEditable=function(e){this.numberInputActive=e,this.eFloatingFilterNumberInput.setDisplayed(this.numberInputActive),this.eFloatingFilterTextInput.setDisplayed(!this.numberInputActive)},t.prototype.setAutoComplete=function(e){this.eFloatingFilterNumberInput.setAutoComplete(e),this.eFloatingFilterTextInput.setAutoComplete(e)},t.prototype.getValue=function(){return this.getActiveInputElement().getValue()},t.prototype.setValue=function(e,r){this.getActiveInputElement().setValue(e,r)},t.prototype.getActiveInputElement=function(){return this.numberInputActive?this.eFloatingFilterNumberInput:this.eFloatingFilterTextInput},t.prototype.setValueChangedListener=function(e){this.valueChangedListener=e},t.prototype.setupListeners=function(e,r){this.addManagedListener(e,"input",r),this.addManagedListener(e,"keydown",r)},t.prototype.setParams=function(e){this.setAriaLabel(e.ariaLabel),e.autoComplete!==void 0&&this.setAutoComplete(e.autoComplete)},t.prototype.setAriaLabel=function(e){this.eFloatingFilterNumberInput.setInputAriaLabel(e),this.eFloatingFilterTextInput.setInputAriaLabel(e)},t}(F),bW=function(n){S0(t,n);function t(){return n!==null&&n.apply(this,arguments)||this}return t.prototype.init=function(e){var r;n.prototype.init.call(this,e),this.filterModelFormatter=new g0(this.localeService,this.optionsFactory,(r=e.filterParams)===null||r===void 0?void 0:r.numberFormatter)},t.prototype.onParamsUpdated=function(e){var r=gS(e.filterParams);r!==this.allowedCharPattern&&this.recreateFloatingFilterInputService(e),n.prototype.onParamsUpdated.call(this,e),this.filterModelFormatter.updateParams({optionsFactory:this.optionsFactory})},t.prototype.getDefaultFilterOptions=function(){return r_.DEFAULT_FILTER_OPTIONS},t.prototype.getFilterModelFormatter=function(){return this.filterModelFormatter},t.prototype.createFloatingFilterInputService=function(e){return this.allowedCharPattern=gS(e.filterParams),this.allowedCharPattern?this.createManagedBean(new C0({config:{allowedCharPattern:this.allowedCharPattern}})):this.createManagedBean(new FW)},t}(w0),MW=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(r[i]=o[i])},n(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");n(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}}(),_0=function(n){MW(t,n);function t(){return n!==null&&n.apply(this,arguments)||this}return t.prototype.init=function(e){n.prototype.init.call(this,e),this.filterModelFormatter=new m0(this.localeService,this.optionsFactory)},t.prototype.onParamsUpdated=function(e){n.prototype.onParamsUpdated.call(this,e),this.filterModelFormatter.updateParams({optionsFactory:this.optionsFactory})},t.prototype.getDefaultFilterOptions=function(){return Kg.DEFAULT_FILTER_OPTIONS},t.prototype.getFilterModelFormatter=function(){return this.filterModelFormatter},t.prototype.createFloatingFilterInputService=function(){return this.createManagedBean(new C0)},t}(w0),Zr=function(){function n(t,e){var r=this;e===void 0&&(e=!1),this.destroyFuncs=[],this.touching=!1,this.eventService=new Li,this.eElement=t,this.preventMouseClick=e;var o=this.onTouchStart.bind(this),i=this.onTouchMove.bind(this),a=this.onTouchEnd.bind(this);this.eElement.addEventListener("touchstart",o,{passive:!0}),this.eElement.addEventListener("touchmove",i,{passive:!0}),this.eElement.addEventListener("touchend",a,{passive:!1}),this.destroyFuncs.push(function(){r.eElement.removeEventListener("touchstart",o,{passive:!0}),r.eElement.removeEventListener("touchmove",i,{passive:!0}),r.eElement.removeEventListener("touchend",a,{passive:!1})})}return n.prototype.getActiveTouch=function(t){for(var e=0;e0){var e=t-this.lastTapTime;if(e>n.DOUBLE_TAP_MILLIS){var r={type:n.EVENT_DOUBLE_TAP,touchStart:this.touchStart};this.eventService.dispatchEvent(r),this.lastTapTime=null}else this.lastTapTime=t}else this.lastTapTime=t},n.prototype.destroy=function(){this.destroyFuncs.forEach(function(t){return t()})},n.EVENT_TAP="tap",n.EVENT_DOUBLE_TAP="doubleTap",n.EVENT_LONG_TAP="longTap",n.DOUBLE_TAP_MILLIS=500,n}(),NW=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(r[i]=o[i])},n(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");n(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}}(),ws=function(n,t,e,r){var o=arguments.length,i=o<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(n,t,e,r);else for(var s=n.length-1;s>=0;s--)(a=n[s])&&(i=(o<3?a(i):o>3?a(t,e,i):a(t,e))||i);return o>3&&i&&Object.defineProperty(t,e,i),i},Yg=function(n){NW(t,n);function t(e){var r=n.call(this)||this;return e||r.setTemplate(t.TEMPLATE),r}return t.prototype.attachCustomElements=function(e,r,o,i,a){this.eSortOrder=e,this.eSortAsc=r,this.eSortDesc=o,this.eSortMixed=i,this.eSortNone=a},t.prototype.setupSort=function(e,r){var o=this;r===void 0&&(r=!1),this.column=e,this.suppressOrder=r,this.setupMultiSortIndicator();var i=!!this.column.getColDef().sortable;i&&(this.addInIcon("sortAscending",this.eSortAsc,e),this.addInIcon("sortDescending",this.eSortDesc,e),this.addInIcon("sortUnSort",this.eSortNone,e),this.addManagedListener(this.eventService,_.EVENT_SORT_CHANGED,function(){return o.onSortChanged()}),this.addManagedListener(this.eventService,_.EVENT_COLUMN_ROW_GROUP_CHANGED,function(){return o.onSortChanged()}),this.onSortChanged())},t.prototype.addInIcon=function(e,r,o){if(r!=null){var i=_t(e,this.gridOptionsService,o);i&&r.appendChild(i)}},t.prototype.onSortChanged=function(){this.updateIcons(),this.suppressOrder||this.updateSortOrder()},t.prototype.updateIcons=function(){var e=this.sortController.getDisplaySortForColumn(this.column);if(this.eSortAsc){var r=e==="asc";we(this.eSortAsc,r,{skipAriaHidden:!0})}if(this.eSortDesc){var o=e==="desc";we(this.eSortDesc,o,{skipAriaHidden:!0})}if(this.eSortNone){var i=!this.column.getColDef().unSortIcon&&!this.gridOptionsService.is("unSortIcon"),a=e==null;we(this.eSortNone,!i&&a,{skipAriaHidden:!0})}},t.prototype.setupMultiSortIndicator=function(){var e=this;this.addInIcon("sortUnSort",this.eSortMixed,this.column);var r=this.column.getColDef().showRowGroup,o=this.gridOptionsService.isColumnsSortingCoupledToGroup();o&&r&&(this.addManagedListener(this.eventService,_.EVENT_SORT_CHANGED,function(){return e.updateMultiSortIndicator()}),this.addManagedListener(this.eventService,_.EVENT_COLUMN_ROW_GROUP_CHANGED,function(){return e.updateMultiSortIndicator()}),this.updateMultiSortIndicator())},t.prototype.updateMultiSortIndicator=function(){if(this.eSortMixed){var e=this.sortController.getDisplaySortForColumn(this.column)==="mixed";we(this.eSortMixed,e,{skipAriaHidden:!0})}},t.prototype.updateSortOrder=function(){var e=this,r;if(this.eSortOrder){var o=this.sortController.getColumnsWithSortingOrdered(),i=(r=this.sortController.getDisplaySortIndexForColumn(this.column))!==null&&r!==void 0?r:-1,a=o.some(function(l){var u;return(u=e.sortController.getDisplaySortIndexForColumn(l))!==null&&u!==void 0?u:-1>=1}),s=i>=0&&a;we(this.eSortOrder,s,{skipAriaHidden:!0}),i>=0?this.eSortOrder.innerHTML=(i+1).toString():vr(this.eSortOrder)}},t.TEMPLATE=` `,ws([G("eSortOrder")],t.prototype,"eSortOrder",void 0),ws([G("eSortAsc")],t.prototype,"eSortAsc",void 0),ws([G("eSortDesc")],t.prototype,"eSortDesc",void 0),ws([G("eSortMixed")],t.prototype,"eSortMixed",void 0),ws([G("eSortNone")],t.prototype,"eSortNone",void 0),ws([w("columnModel")],t.prototype,"columnModel",void 0),ws([w("sortController")],t.prototype,"sortController",void 0),t}(se),GW=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(r[i]=o[i])},n(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");n(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}}(),hn=function(n,t,e,r){var o=arguments.length,i=o<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(n,t,e,r);else for(var s=n.length-1;s>=0;s--)(a=n[s])&&(i=(o<3?a(i):o>3?a(t,e,i):a(t,e))||i);return o>3&&i&&Object.defineProperty(t,e,i),i},kW=function(n){GW(t,n);function t(){var e=n!==null&&n.apply(this,arguments)||this;return e.lastMovingChanged=0,e}return t.prototype.destroy=function(){n.prototype.destroy.call(this)},t.prototype.refresh=function(e){return this.params=e,this.workOutTemplate()!=this.currentTemplate||this.workOutShowMenu()!=this.currentShowMenu||this.workOutSort()!=this.currentSort?!1:(this.setDisplayName(e),!0)},t.prototype.workOutTemplate=function(){var e=sD(this.params.template,t.TEMPLATE);return e=e&&e.trim?e.trim():e,e},t.prototype.init=function(e){this.params=e,this.currentTemplate=this.workOutTemplate(),this.setTemplate(this.currentTemplate),this.setupTap(),this.setupIcons(e.column),this.setMenu(),this.setupSort(),this.setupFilterIcon(),this.setDisplayName(e)},t.prototype.setDisplayName=function(e){if(this.currentDisplayName!=e.displayName){this.currentDisplayName=e.displayName;var r=xt(this.currentDisplayName);this.eText&&(this.eText.innerHTML=r)}},t.prototype.setupIcons=function(e){this.addInIcon("menu",this.eMenu,e),this.addInIcon("filter",this.eFilter,e)},t.prototype.addInIcon=function(e,r,o){if(r!=null){var i=_t(e,this.gridOptionsService,o);i&&r.appendChild(i)}},t.prototype.setupTap=function(){var e=this,r=this.gridOptionsService;if(!r.is("suppressTouch")){var o=new Zr(this.getGui(),!0),i=r.is("suppressMenuHide"),a=i&&D(this.eMenu),s=a?new Zr(this.eMenu,!0):o;if(this.params.enableMenu){var l=a?"EVENT_TAP":"EVENT_LONG_TAP",u=function(d){r.api.showColumnMenuAfterMouseClick(e.params.column,d.touchStart)};this.addManagedListener(s,Zr[l],u)}if(this.params.enableSorting){var c=function(d){var f=d.touchStart.target;i&&e.eMenu.contains(f)||e.sortController.progressSort(e.params.column,!1,"uiColumnSorted")};this.addManagedListener(o,Zr.EVENT_TAP,c)}this.addDestroyFunc(function(){return o.destroy()}),a&&this.addDestroyFunc(function(){return s.destroy()})}},t.prototype.workOutShowMenu=function(){var e=!this.gridOptionsService.is("suppressMenuHide"),r=Na()&&e,o=this.params.enableMenu&&!r;return o},t.prototype.setMenu=function(){var e=this;if(this.eMenu){if(this.currentShowMenu=this.workOutShowMenu(),!this.currentShowMenu){Oi(this.eMenu);return}var r=this.gridOptionsService.is("suppressMenuHide");this.addManagedListener(this.eMenu,"click",function(){return e.showMenu(e.eMenu)}),this.eMenu.classList.toggle("ag-header-menu-always-show",r)}},t.prototype.showMenu=function(e){e||(e=this.eMenu),this.menuFactory.showMenuAfterButtonClick(this.params.column,e,"columnMenu")},t.prototype.workOutSort=function(){return this.params.enableSorting},t.prototype.setupSort=function(){var e=this;if(this.currentSort=this.params.enableSorting,this.eSortIndicator||(this.eSortIndicator=this.context.createBean(new Yg(!0)),this.eSortIndicator.attachCustomElements(this.eSortOrder,this.eSortAsc,this.eSortDesc,this.eSortMixed,this.eSortNone)),this.eSortIndicator.setupSort(this.params.column),!!this.currentSort){var r=this.gridOptionsService.get("multiSortKey")==="ctrl";this.addManagedListener(this.params.column,Ne.EVENT_MOVING_CHANGED,function(){e.lastMovingChanged=new Date().getTime()}),this.eLabel&&this.addManagedListener(this.eLabel,"click",function(i){var a=e.params.column.isMoving(),s=new Date().getTime(),l=s-e.lastMovingChanged<50,u=a||l;if(!u){var c=r?i.ctrlKey||i.metaKey:i.shiftKey;e.params.progressSort(c)}});var o=function(){if(e.addOrRemoveCssClass("ag-header-cell-sorted-asc",e.params.column.isSortAscending()),e.addOrRemoveCssClass("ag-header-cell-sorted-desc",e.params.column.isSortDescending()),e.addOrRemoveCssClass("ag-header-cell-sorted-none",e.params.column.isSortNone()),e.params.column.getColDef().showRowGroup){var i=e.columnModel.getSourceColumnsForGroupColumn(e.params.column),a=i?.every(function(l){return e.params.column.getSort()==l.getSort()}),s=!a;e.addOrRemoveCssClass("ag-header-cell-sorted-mixed",s)}};this.addManagedListener(this.eventService,_.EVENT_SORT_CHANGED,o),this.addManagedListener(this.eventService,_.EVENT_COLUMN_ROW_GROUP_CHANGED,o)}},t.prototype.setupFilterIcon=function(){this.eFilter&&(this.addManagedListener(this.params.column,Ne.EVENT_FILTER_CHANGED,this.onFilterChanged.bind(this)),this.onFilterChanged())},t.prototype.onFilterChanged=function(){var e=this.params.column.isFilterActive();we(this.eFilter,e,{skipAriaHidden:!0})},t.TEMPLATE=``,hn([w("sortController")],t.prototype,"sortController",void 0),hn([w("menuFactory")],t.prototype,"menuFactory",void 0),hn([w("columnModel")],t.prototype,"columnModel",void 0),hn([G("eFilter")],t.prototype,"eFilter",void 0),hn([G("eSortIndicator")],t.prototype,"eSortIndicator",void 0),hn([G("eMenu")],t.prototype,"eMenu",void 0),hn([G("eLabel")],t.prototype,"eLabel",void 0),hn([G("eText")],t.prototype,"eText",void 0),hn([G("eSortOrder")],t.prototype,"eSortOrder",void 0),hn([G("eSortAsc")],t.prototype,"eSortAsc",void 0),hn([G("eSortDesc")],t.prototype,"eSortDesc",void 0),hn([G("eSortMixed")],t.prototype,"eSortMixed",void 0),hn([G("eSortNone")],t.prototype,"eSortNone",void 0),t}(se),HW=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(r[i]=o[i])},n(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");n(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}}(),_w=function(n,t,e,r){var o=arguments.length,i=o<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(n,t,e,r);else for(var s=n.length-1;s>=0;s--)(a=n[s])&&(i=(o<3?a(i):o>3?a(t,e,i):a(t,e))||i);return o>3&&i&&Object.defineProperty(t,e,i),i},VW=function(n){HW(t,n);function t(){return n.call(this,t.TEMPLATE)||this}return t.prototype.destroy=function(){n.prototype.destroy.call(this)},t.prototype.init=function(e){this.params=e,this.checkWarnings(),this.setupLabel(),this.addGroupExpandIcon(),this.setupExpandIcons()},t.prototype.checkWarnings=function(){var e=this.params;if(e.template){var r="AG Grid: A template was provided for Header Group Comp - templates are only supported for Header Comps (not groups)";ge(function(){return console.warn(r)},"HeaderGroupComp.templateNotSupported")}},t.prototype.setupExpandIcons=function(){var e=this;this.addInIcon("columnGroupOpened","agOpened"),this.addInIcon("columnGroupClosed","agClosed");var r=function(a){if(!_o(a)){var s=!e.params.columnGroup.isExpanded();e.columnModel.setColumnGroupOpened(e.params.columnGroup.getProvidedColumnGroup(),s,"uiColumnExpanded")}};this.addTouchAndClickListeners(this.eCloseIcon,r),this.addTouchAndClickListeners(this.eOpenIcon,r);var o=function(a){ii(a)};this.addManagedListener(this.eCloseIcon,"dblclick",o),this.addManagedListener(this.eOpenIcon,"dblclick",o),this.addManagedListener(this.getGui(),"dblclick",r),this.updateIconVisibility();var i=this.params.columnGroup.getProvidedColumnGroup();this.addManagedListener(i,gt.EVENT_EXPANDED_CHANGED,this.updateIconVisibility.bind(this)),this.addManagedListener(i,gt.EVENT_EXPANDABLE_CHANGED,this.updateIconVisibility.bind(this))},t.prototype.addTouchAndClickListeners=function(e,r){var o=new Zr(e,!0);this.addManagedListener(o,Zr.EVENT_TAP,r),this.addDestroyFunc(function(){return o.destroy()}),this.addManagedListener(e,"click",r)},t.prototype.updateIconVisibility=function(){var e=this.params.columnGroup;if(e.isExpandable()){var r=this.params.columnGroup.isExpanded();we(this.eOpenIcon,r),we(this.eCloseIcon,!r)}else we(this.eOpenIcon,!1),we(this.eCloseIcon,!1)},t.prototype.addInIcon=function(e,r){var o=_t(e,this.gridOptionsService,null);o&&this.getRefElement(r).appendChild(o)},t.prototype.addGroupExpandIcon=function(){if(!this.params.columnGroup.isExpandable()){we(this.eOpenIcon,!1),we(this.eCloseIcon,!1);return}},t.prototype.setupLabel=function(){var e,r=this.params,o=r.displayName,i=r.columnGroup;if(D(o)){var a=xt(o);this.getRefElement("agLabel").innerHTML=a}this.addOrRemoveCssClass("ag-sticky-label",!(!((e=i.getColGroupDef())===null||e===void 0)&&e.suppressStickyLabel))},t.TEMPLATE=``,_w([w("columnModel")],t.prototype,"columnModel",void 0),_w([G("agOpened")],t.prototype,"eOpenIcon",void 0),_w([G("agClosed")],t.prototype,"eCloseIcon",void 0),t}(se),BW=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(r[i]=o[i])},n(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");n(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}}(),Va=function(n){BW(t,n);function t(){return n!==null&&n.apply(this,arguments)||this}return t.prototype.isPopup=function(){return!0},t.prototype.setParentComponent=function(e){e.addCssClass("ag-has-popup"),n.prototype.setParentComponent.call(this,e)},t.prototype.destroy=function(){var e=this.parentComponent,r=e&&e.isAlive();r&&e.getGui().classList.remove("ag-has-popup"),n.prototype.destroy.call(this)},t}(se),WW=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(r[i]=o[i])},n(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");n(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}}(),UW=function(n,t,e,r){var o=arguments.length,i=o<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(n,t,e,r);else for(var s=n.length-1;s>=0;s--)(a=n[s])&&(i=(o<3?a(i):o>3?a(t,e,i):a(t,e))||i);return o>3&&i&&Object.defineProperty(t,e,i),i},E0=function(n){WW(t,n);function t(){return n.call(this,t.TEMPLATE)||this}return t.prototype.init=function(e){this.params=e,this.focusAfterAttached=e.cellStartedEdit,this.eTextArea.setMaxLength(e.maxLength||200).setCols(e.cols||60).setRows(e.rows||10),D(e.value,!0)&&this.eTextArea.setValue(e.value.toString(),!0),this.addGuiEventListener("keydown",this.onKeyDown.bind(this)),this.activateTabIndex()},t.prototype.onKeyDown=function(e){var r=e.key;(r===O.LEFT||r===O.UP||r===O.RIGHT||r===O.DOWN||e.shiftKey&&r===O.ENTER)&&e.stopPropagation()},t.prototype.afterGuiAttached=function(){var e=this.localeService.getLocaleTextFunc();this.eTextArea.setInputAriaLabel(e("ariaInputEditor","Input Editor")),this.focusAfterAttached&&this.eTextArea.getFocusableElement().focus()},t.prototype.getValue=function(){var e=this.eTextArea.getValue();return!D(e)&&!D(this.params.value)?this.params.value:this.params.parseValue(e)},t.TEMPLATE=`
`,UW([G("eTextArea")],t.prototype,"eTextArea",void 0),t}(Va),jW=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(r[i]=o[i])},n(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");n(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}}(),iI=function(n,t,e,r){var o=arguments.length,i=o<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(n,t,e,r);else for(var s=n.length-1;s>=0;s--)(a=n[s])&&(i=(o<3?a(i):o>3?a(t,e,i):a(t,e))||i);return o>3&&i&&Object.defineProperty(t,e,i),i},R0=function(n){jW(t,n);function t(){var e=n.call(this,`
`)||this;return e.startedByEnter=!1,e}return t.prototype.init=function(e){this.focusAfterAttached=e.cellStartedEdit;var r=this,o=r.eSelect,i=r.valueFormatterService,a=r.gridOptionsService,s=e.values,l=e.value,u=e.eventKey;if(Z(s)){console.warn("AG Grid: no values found for select cellEditor");return}this.startedByEnter=u!=null?u===O.ENTER:!1;var c=!1;s.forEach(function(h){var v={value:h},C=i.formatValue(e.column,null,h),m=C!=null;v.text=m?C:h,o.addOption(v),c=c||l===h}),c?o.setValue(e.value,!0):e.values.length&&o.setValue(e.values[0],!0);var d=e.valueListGap,f=e.valueListMaxWidth,p=e.valueListMaxHeight;d!=null&&o.setPickerGap(d),p!=null&&o.setPickerMaxHeight(p),f!=null&&o.setPickerMaxWidth(f),a.get("editType")!=="fullRow"&&this.addManagedListener(this.eSelect,qg.EVENT_ITEM_SELECTED,function(){return e.stopEditing()})},t.prototype.afterGuiAttached=function(){var e=this;this.focusAfterAttached&&this.eSelect.getFocusableElement().focus(),this.startedByEnter&&setTimeout(function(){e.isAlive()&&e.eSelect.showPicker()})},t.prototype.focusIn=function(){this.eSelect.getFocusableElement().focus()},t.prototype.getValue=function(){return this.eSelect.getValue()},t.prototype.isPopup=function(){return!1},iI([w("valueFormatterService")],t.prototype,"valueFormatterService",void 0),iI([G("eSelect")],t.prototype,"eSelect",void 0),t}(Va),zW=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(r[i]=o[i])},n(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");n(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}}(),qW=function(n,t,e,r){var o=arguments.length,i=o<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(n,t,e,r);else for(var s=n.length-1;s>=0;s--)(a=n[s])&&(i=(o<3?a(i):o>3?a(t,e,i):a(t,e))||i);return o>3&&i&&Object.defineProperty(t,e,i),i},Xg=function(n){zW(t,n);function t(e){var r=n.call(this,`
`+e.getTemplate()+`
`)||this;return r.cellEditorInput=e,r}return t.prototype.init=function(e){this.params=e;var r=this.eInput;this.cellEditorInput.init(r,e);var o;if(e.cellStartedEdit){this.focusAfterAttached=!0;var i=e.eventKey;i===O.BACKSPACE||e.eventKey===O.DELETE?o="":i&&i.length===1?o=i:(o=this.cellEditorInput.getStartValue(),i!==O.F2&&(this.highlightAllOnFocus=!0))}else this.focusAfterAttached=!1,o=this.cellEditorInput.getStartValue();o!=null&&r.setStartValue(o),this.addManagedListener(r.getGui(),"keydown",function(a){var s=a.key;(s===O.PAGE_UP||s===O.PAGE_DOWN)&&a.preventDefault()})},t.prototype.afterGuiAttached=function(){var e,r,o=this.localeService.getLocaleTextFunc(),i=this.eInput;if(i.setInputAriaLabel(o("ariaInputEditor","Input Editor")),!!this.focusAfterAttached){to()||i.getFocusableElement().focus();var a=i.getInputElement();this.highlightAllOnFocus?a.select():(r=(e=this.cellEditorInput).setCaret)===null||r===void 0||r.call(e)}},t.prototype.focusIn=function(){var e=this.eInput,r=e.getFocusableElement(),o=e.getInputElement();r.focus(),o.select()},t.prototype.getValue=function(){return this.cellEditorInput.getValue()},t.prototype.isPopup=function(){return!1},qW([G("eInput")],t.prototype,"eInput",void 0),t}(Va),$W=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(r[i]=o[i])},n(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");n(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}}(),KW=function(){function n(){}return n.prototype.getTemplate=function(){return''},n.prototype.init=function(t,e){this.eInput=t,this.params=e,e.maxLength!=null&&t.setMaxLength(e.maxLength)},n.prototype.getValue=function(){var t=this.eInput.getValue();return!D(t)&&!D(this.params.value)?this.params.value:this.params.parseValue(t)},n.prototype.getStartValue=function(){var t=this.params.useFormatter||this.params.column.getColDef().refData;return t?this.params.formatValue(this.params.value):this.params.value},n.prototype.setCaret=function(){var t=this.eInput.getValue(),e=D(t)&&t.length||0;e&&this.eInput.getInputElement().setSelectionRange(e,e)},n}(),vS=function(n){$W(t,n);function t(){return n.call(this,new KW)||this}return t}(Xg),YW=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(r[i]=o[i])},n(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");n(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}}(),XW=function(n,t,e,r){var o=arguments.length,i=o<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(n,t,e,r);else for(var s=n.length-1;s>=0;s--)(a=n[s])&&(i=(o<3?a(i):o>3?a(t,e,i):a(t,e))||i);return o>3&&i&&Object.defineProperty(t,e,i),i},QW="\u2191",JW="\u2193",T0=function(n){YW(t,n);function t(){var e=n.call(this,t.TEMPLATE)||this;return e.refreshCount=0,e}return t.prototype.init=function(e){this.eValue=this.queryForHtmlElement(".ag-value-change-value"),this.eDelta=this.queryForHtmlElement(".ag-value-change-delta"),this.refresh(e)},t.prototype.showDelta=function(e,r){var o=Math.abs(r),i=e.formatValue(o),a=D(i)?i:o,s=r>=0;s?this.eDelta.innerHTML=QW+a:this.eDelta.innerHTML=JW+a,this.eDelta.classList.toggle("ag-value-change-delta-up",s),this.eDelta.classList.toggle("ag-value-change-delta-down",!s)},t.prototype.setTimerToRemoveDelta=function(){var e=this;this.refreshCount++;var r=this.refreshCount;window.setTimeout(function(){r===e.refreshCount&&e.hideDeltaValue()},2e3)},t.prototype.hideDeltaValue=function(){this.eValue.classList.remove("ag-value-change-value-highlight"),vr(this.eDelta)},t.prototype.refresh=function(e){var r=e.value;if(r===this.lastValue||(D(e.valueFormatted)?this.eValue.innerHTML=e.valueFormatted:D(e.value)?this.eValue.innerHTML=r:vr(this.eValue),this.filterManager.isSuppressFlashingCellsBecauseFiltering()))return!1;if(typeof r=="number"&&typeof this.lastValue=="number"){var o=r-this.lastValue;this.showDelta(e,o)}return this.lastValue&&this.eValue.classList.add("ag-value-change-value-highlight"),this.setTimerToRemoveDelta(),this.lastValue=r,!0},t.TEMPLATE='',XW([w("filterManager")],t.prototype,"filterManager",void 0),t}(se),ZW=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(r[i]=o[i])},n(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");n(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}}(),eU=function(n,t,e,r){var o=arguments.length,i=o<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(n,t,e,r);else for(var s=n.length-1;s>=0;s--)(a=n[s])&&(i=(o<3?a(i):o>3?a(t,e,i):a(t,e))||i);return o>3&&i&&Object.defineProperty(t,e,i),i},x0=function(n){ZW(t,n);function t(){var e=n.call(this,t.TEMPLATE)||this;return e.refreshCount=0,e.eCurrent=e.queryForHtmlElement(".ag-value-slide-current"),e}return t.prototype.init=function(e){this.refresh(e)},t.prototype.addSlideAnimation=function(){var e=this;this.refreshCount++;var r=this.refreshCount;this.ePrevious&&this.getGui().removeChild(this.ePrevious),this.ePrevious=tr(''),this.ePrevious.innerHTML=this.eCurrent.innerHTML,this.getGui().insertBefore(this.ePrevious,this.eCurrent),window.setTimeout(function(){r===e.refreshCount&&e.ePrevious.classList.add("ag-value-slide-out-end")},50),window.setTimeout(function(){r===e.refreshCount&&(e.getGui().removeChild(e.ePrevious),e.ePrevious=null)},3e3)},t.prototype.refresh=function(e){var r=e.value;return Z(r)&&(r=""),r===this.lastValue||this.filterManager.isSuppressFlashingCellsBecauseFiltering()?!1:(this.addSlideAnimation(),this.lastValue=r,D(e.valueFormatted)?this.eCurrent.innerHTML=e.valueFormatted:D(e.value)?this.eCurrent.innerHTML=r:vr(this.eCurrent),!0)},t.TEMPLATE=` `,eU([w("filterManager")],t.prototype,"filterManager",void 0),t}(se),$l=function(){return $l=Object.assign||function(n){for(var t,e=1,r=arguments.length;e0?r:void 0,level:this.level}),this.id!==null&&typeof this.id=="string"&&this.id.startsWith(n.ID_PREFIX_ROW_GROUP)&&console.error("AG Grid: Row IDs cannot start with "+n.ID_PREFIX_ROW_GROUP+", this is a reserved prefix for AG Grid's row grouping feature."),this.id!==null&&typeof this.id!="string"&&(this.id=""+this.id)}else this.id=void 0;else this.id=t},n.prototype.getGroupKeys=function(t){t===void 0&&(t=!1);var e=[],r=this;for(t&&(r=r.parent);r&&r.level>=0;)e.push(r.key),r=r.parent;return e.reverse(),e},n.prototype.isPixelInRange=function(t){return!D(this.rowTop)||!D(this.rowHeight)?!1:t>=this.rowTop&&to&&(o=u)}),!e&&((r||o<10)&&(o=this.beans.gridOptionsService.getRowHeightForNode(this).height),o!=this.rowHeight)){this.setRowHeight(o);var s=this.beans.rowModel;s.onRowHeightChangedDebounced&&s.onRowHeightChangedDebounced()}}},n.prototype.setRowIndex=function(t){this.rowIndex!==t&&(this.rowIndex=t,this.eventService&&this.eventService.dispatchEvent(this.createLocalRowEvent(n.EVENT_ROW_INDEX_CHANGED)))},n.prototype.setUiLevel=function(t){this.uiLevel!==t&&(this.uiLevel=t,this.eventService&&this.eventService.dispatchEvent(this.createLocalRowEvent(n.EVENT_UI_LEVEL_CHANGED)))},n.prototype.setExpanded=function(t,e){if(this.expanded!==t){this.expanded=t,this.eventService&&this.eventService.dispatchEvent(this.createLocalRowEvent(n.EVENT_EXPANDED_CHANGED));var r=Object.assign({},this.createGlobalRowEvent(_.EVENT_ROW_GROUP_OPENED),{expanded:t,event:e||null});this.beans.rowNodeEventThrottle.dispatchExpanded(r),this.sibling&&this.beans.rowRenderer.refreshCells({rowNodes:[this]})}},n.prototype.createGlobalRowEvent=function(t){return{type:t,node:this,data:this.data,rowIndex:this.rowIndex,rowPinned:this.rowPinned,context:this.beans.gridOptionsService.context,api:this.beans.gridOptionsService.api,columnApi:this.beans.gridOptionsService.columnApi}},n.prototype.dispatchLocalEvent=function(t){this.eventService&&this.eventService.dispatchEvent(t)},n.prototype.setDataValue=function(t,e,r){var o=this,i=function(){var u;return typeof t!="string"?t:(u=o.beans.columnModel.getGridColumn(t))!==null&&u!==void 0?u:o.beans.columnModel.getPrimaryColumn(t)},a=i(),s=this.getValueFromValueService(a);if(this.beans.gridOptionsService.is("readOnlyEdit"))return this.dispatchEventForSaveValueReadOnly(a,s,e,r),!1;var l=this.beans.valueService.setValue(this,a,e,r);return this.dispatchCellChangedEvent(a,e,s),this.checkRowSelectable(),l},n.prototype.getValueFromValueService=function(t){var e=this.leafGroup&&this.beans.columnModel.isPivotMode(),r=this.group&&this.expanded&&!this.footer&&!e,o=this.beans.gridOptionsService.getGroupIncludeFooter(),i=o({node:this}),a=this.beans.gridOptionsService.is("groupSuppressBlankHeader"),s=r&&i&&!a,l=this.beans.valueService.getValue(t,this,!1,s);return l},n.prototype.dispatchEventForSaveValueReadOnly=function(t,e,r,o){var i={type:_.EVENT_CELL_EDIT_REQUEST,event:null,rowIndex:this.rowIndex,rowPinned:this.rowPinned,column:t,colDef:t.getColDef(),context:this.beans.gridOptionsService.context,api:this.beans.gridOptionsService.api,columnApi:this.beans.gridOptionsService.columnApi,data:this.data,node:this,oldValue:e,newValue:r,value:r,source:o};this.beans.eventService.dispatchEvent(i)},n.prototype.setGroupValue=function(t,e){var r=this.beans.columnModel.getGridColumn(t);Z(this.groupData)&&(this.groupData={});var o=r.getColId(),i=this.groupData[o];i!==e&&(this.groupData[o]=e,this.dispatchCellChangedEvent(r,e,i))},n.prototype.setAggData=function(t){var e=this,r=ZI([this.aggData,t]),o=this.aggData;this.aggData=t,this.eventService&&r.forEach(function(i){var a=e.aggData?e.aggData[i]:void 0,s=o?o[i]:void 0;if(a!==s){var l=e.beans.columnModel.lookupGridColumn(i);l&&e.dispatchCellChangedEvent(l,a,s)}})},n.prototype.updateHasChildren=function(){var t=this.group&&!this.footer||this.childrenAfterGroup&&this.childrenAfterGroup.length>0,e=this.beans.gridOptionsService.isRowModelType("serverSide");if(e){var r=this.beans.gridOptionsService.is("treeData"),o=this.beans.gridOptionsService.get("isServerSideGroup");t=!this.stub&&!this.footer&&(r?!!o&&o(this.data):!!this.group)}t!==this.__hasChildren&&(this.__hasChildren=!!t,this.eventService&&this.eventService.dispatchEvent(this.createLocalRowEvent(n.EVENT_HAS_CHILDREN_CHANGED)))},n.prototype.hasChildren=function(){return this.__hasChildren==null&&this.updateHasChildren(),this.__hasChildren},n.prototype.isEmptyRowGroupNode=function(){return this.group&&Cn(this.childrenAfterGroup)},n.prototype.dispatchCellChangedEvent=function(t,e,r){var o={type:n.EVENT_CELL_CHANGED,node:this,column:t,newValue:e,oldValue:r};this.dispatchLocalEvent(o)},n.prototype.resetQuickFilterAggregateText=function(){this.quickFilterAggregateText=null},n.prototype.isExpandable=function(){return!!(this.hasChildren()&&!this.footer||this.master)},n.prototype.isSelected=function(){return this.footer?this.sibling.isSelected():this.selected},n.prototype.depthFirstSearch=function(t){this.childrenAfterGroup&&this.childrenAfterGroup.forEach(function(e){return e.depthFirstSearch(t)}),t(this)},n.prototype.calculateSelectedFromChildren=function(){var t,e=!1,r=!1,o=!1;if(!(!((t=this.childrenAfterGroup)===null||t===void 0)&&t.length))return this.selectable?this.selected:null;for(var i=0;i=0;s--)(a=n[s])&&(i=(o<3?a(i):o>3?a(t,e,i):a(t,e))||i);return o>3&&i&&Object.defineProperty(t,e,i),i},n_=function(n){tU(t,n);function t(){return n.call(this,` `)||this}return t.prototype.postConstruct=function(){this.eCheckbox.setPassive(!0),DD(this.eCheckbox.getInputElement(),"polite")},t.prototype.getCheckboxId=function(){return this.eCheckbox.getInputElement().id},t.prototype.onDataChanged=function(){this.onSelectionChanged()},t.prototype.onSelectableChanged=function(){this.showOrHideSelect()},t.prototype.onSelectionChanged=function(){var e=this.localeService.getLocaleTextFunc(),r=this.rowNode.isSelected(),o=Hg(e,r),i=e("ariaRowToggleSelection","Press Space to toggle row selection");this.eCheckbox.setValue(r,!0),this.eCheckbox.setInputAriaLabel(i+" ("+o+")")},t.prototype.onClicked=function(e,r,o){return this.rowNode.setSelectedParams({newValue:e,rangeSelect:o.shiftKey,groupSelectsFiltered:r,event:o,source:"checkboxSelected"})},t.prototype.init=function(e){var r=this;this.rowNode=e.rowNode,this.column=e.column,this.overrides=e.overrides,this.onSelectionChanged(),this.addManagedListener(this.eCheckbox.getInputElement(),"dblclick",function(s){ii(s)}),this.addManagedListener(this.eCheckbox.getInputElement(),"click",function(s){ii(s);var l=r.gridOptionsService.is("groupSelectsFiltered"),u=r.eCheckbox.getValue();if(r.shouldHandleIndeterminateState(u,l)){var c=r.onClicked(!0,l,s||{});c===0&&r.onClicked(!1,l,s)}else u?r.onClicked(!1,l,s):r.onClicked(!0,l,s||{})}),this.addManagedListener(this.rowNode,ce.EVENT_ROW_SELECTED,this.onSelectionChanged.bind(this)),this.addManagedListener(this.rowNode,ce.EVENT_DATA_CHANGED,this.onDataChanged.bind(this)),this.addManagedListener(this.rowNode,ce.EVENT_SELECTABLE_CHANGED,this.onSelectableChanged.bind(this));var o=this.gridOptionsService.get("isRowSelectable"),i=o||typeof this.getIsVisible()=="function";if(i){var a=this.showOrHideSelect.bind(this);this.addManagedListener(this.eventService,_.EVENT_DISPLAYED_COLUMNS_CHANGED,a),this.addManagedListener(this.rowNode,ce.EVENT_DATA_CHANGED,a),this.addManagedListener(this.rowNode,ce.EVENT_CELL_CHANGED,a),this.showOrHideSelect()}this.eCheckbox.getInputElement().setAttribute("tabindex","-1")},t.prototype.shouldHandleIndeterminateState=function(e,r){return r&&(this.eCheckbox.getPreviousValue()===void 0||e===void 0)&&this.gridOptionsService.isRowModelType("clientSide")},t.prototype.showOrHideSelect=function(){var e,r,o,i,a=this.rowNode.selectable,s=this.getIsVisible();if(a)if(typeof s=="function"){var l=(e=this.overrides)===null||e===void 0?void 0:e.callbackParams,u=(r=this.column)===null||r===void 0?void 0:r.createColumnFunctionCallbackParams(this.rowNode);a=u?s(Sg(Sg({},l),u)):!1}else a=s??!1;var c=(o=this.column)===null||o===void 0?void 0:o.getColDef().showDisabledCheckboxes;if(c){this.eCheckbox.setDisabled(!a),this.setVisible(!0),this.setDisplayed(!0);return}if(!((i=this.overrides)===null||i===void 0)&&i.removeHidden){this.setDisplayed(a);return}this.setVisible(a)},t.prototype.getIsVisible=function(){var e,r;return this.overrides?this.overrides.isVisible:(r=(e=this.column)===null||e===void 0?void 0:e.getColDef())===null||r===void 0?void 0:r.checkboxSelection},aI([G("eCheckbox")],t.prototype,"eCheckbox",void 0),aI([M],t.prototype,"postConstruct",null),t}(se),rU=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(r[i]=o[i])},n(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");n(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}}(),Ss=function(n,t,e,r){var o=arguments.length,i=o<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(n,t,e,r);else for(var s=n.length-1;s>=0;s--)(a=n[s])&&(i=(o<3?a(i):o>3?a(t,e,i):a(t,e))||i);return o>3&&i&&Object.defineProperty(t,e,i),i},Vh=function(n){var t=typeof Symbol=="function"&&Symbol.iterator,e=t&&n[t],r=0;if(e)return e.call(n);if(n&&typeof n.length=="number")return{next:function(){return n&&r>=n.length&&(n=void 0),{value:n&&n[r++],done:!n}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};(function(n){n[n.ToolPanel=0]="ToolPanel",n[n.HeaderCell=1]="HeaderCell",n[n.RowDrag=2]="RowDrag",n[n.ChartPanel=3]="ChartPanel",n[n.AdvancedFilterBuilder=4]="AdvancedFilterBuilder"})(g.DragSourceType||(g.DragSourceType={}));(function(n){n[n.Up=0]="Up",n[n.Down=1]="Down"})(g.VerticalDirection||(g.VerticalDirection={}));(function(n){n[n.Left=0]="Left",n[n.Right=1]="Right"})(g.HorizontalDirection||(g.HorizontalDirection={}));var Ft=function(n){rU(t,n);function t(){var r=n!==null&&n.apply(this,arguments)||this;return r.dragSourceAndParamsList=[],r.dropTargets=[],r}e=t,t.prototype.init=function(){this.ePinnedIcon=Yn("columnMovePin",this.gridOptionsService,null),this.eHideIcon=Yn("columnMoveHide",this.gridOptionsService,null),this.eMoveIcon=Yn("columnMoveMove",this.gridOptionsService,null),this.eLeftIcon=Yn("columnMoveLeft",this.gridOptionsService,null),this.eRightIcon=Yn("columnMoveRight",this.gridOptionsService,null),this.eGroupIcon=Yn("columnMoveGroup",this.gridOptionsService,null),this.eAggregateIcon=Yn("columnMoveValue",this.gridOptionsService,null),this.ePivotIcon=Yn("columnMovePivot",this.gridOptionsService,null),this.eDropNotAllowedIcon=Yn("dropNotAllowed",this.gridOptionsService,null)},t.prototype.addDragSource=function(r,o){o===void 0&&(o=!1);var i={eElement:r.eElement,dragStartPixels:r.dragStartPixels,onDragStart:this.onDragStart.bind(this,r),onDragStop:this.onDragStop.bind(this),onDragging:this.onDragging.bind(this),includeTouch:o};this.dragSourceAndParamsList.push({params:i,dragSource:r}),this.dragService.addDragSource(i)},t.prototype.removeDragSource=function(r){var o=this.dragSourceAndParamsList.find(function(i){return i.dragSource===r});o&&(this.dragService.removeDragSource(o.params),mn(this.dragSourceAndParamsList,o))},t.prototype.clearDragSourceParamsList=function(){var r=this;this.dragSourceAndParamsList.forEach(function(o){return r.dragService.removeDragSource(o.params)}),this.dragSourceAndParamsList.length=0,this.dropTargets.length=0},t.prototype.nudge=function(){this.dragging&&this.onDragging(this.eventLastTime,!0)},t.prototype.onDragStart=function(r,o){this.dragging=!0,this.dragSource=r,this.eventLastTime=o,this.dragItem=this.dragSource.getDragItem(),this.lastDropTarget=this.dragSource.dragSourceDropTarget,this.dragSource.onDragStarted&&this.dragSource.onDragStarted(),this.createGhost()},t.prototype.onDragStop=function(r){if(this.eventLastTime=null,this.dragging=!1,this.dragSource.onDragStopped&&this.dragSource.onDragStopped(),this.lastDropTarget&&this.lastDropTarget.onDragStop){var o=this.createDropTargetEvent(this.lastDropTarget,r,null,null,!1);this.lastDropTarget.onDragStop(o)}this.lastDropTarget=null,this.dragItem=null,this.removeGhost()},t.prototype.onDragging=function(r,o){var i=this,a,s,l,u,c=this.getHorizontalDirection(r),d=this.getVerticalDirection(r);this.eventLastTime=r,this.positionGhost(r);var f=this.dropTargets.filter(function(v){return i.isMouseOnDropTarget(r,v)}),p=this.findCurrentDropTarget(r,f);if(p!==this.lastDropTarget)this.leaveLastTargetIfExists(r,c,d,o),this.lastDropTarget!==null&&p===null&&((s=(a=this.dragSource).onGridExit)===null||s===void 0||s.call(a,this.dragItem)),this.lastDropTarget===null&&p!==null&&((u=(l=this.dragSource).onGridEnter)===null||u===void 0||u.call(l,this.dragItem)),this.enterDragTargetIfExists(p,r,c,d,o),this.lastDropTarget=p;else if(p&&p.onDragging){var h=this.createDropTargetEvent(p,r,c,d,o);p.onDragging(h)}},t.prototype.getAllContainersFromDropTarget=function(r){var o=r.getSecondaryContainers?r.getSecondaryContainers():null,i=[[r.getContainer()]];return o?i.concat(o):i},t.prototype.allContainersIntersect=function(r,o){var i,a;try{for(var s=Vh(o),l=s.next();!l.done;l=s.next()){var u=l.value,c=u.getBoundingClientRect();if(c.width===0||c.height===0)return!1;var d=r.clientX>=c.left&&r.clientX=c.top&&r.clientYi?g.HorizontalDirection.Left:g.HorizontalDirection.Right},t.prototype.getVerticalDirection=function(r){var o=this.eventLastTime&&this.eventLastTime.clientY,i=r.clientY;return o===i?null:o>i?g.VerticalDirection.Up:g.VerticalDirection.Down},t.prototype.createDropTargetEvent=function(r,o,i,a,s){var l=r.getContainer(),u=l.getBoundingClientRect(),c=this,d=c.gridApi,f=c.columnApi,p=c.dragItem,h=c.dragSource,v=o.clientX-u.left,C=o.clientY-u.top;return{event:o,x:v,y:C,vDirection:a,hDirection:i,dragSource:h,fromNudge:s,dragItem:p,api:d,columnApi:f,dropZoneTarget:l}},t.prototype.positionGhost=function(r){var o=this.eGhost;if(o){var i=o.getBoundingClientRect(),a=i.height,s=UD()-2,l=jD()-2,u=BS(o.offsetParent),c=r.clientY,d=r.clientX,f=c-u.top-a/2,p=d-u.left-10,h=this.gridOptionsService.getDocument(),v=h.defaultView||window,C=v.pageYOffset||h.documentElement.scrollTop,m=v.pageXOffset||h.documentElement.scrollLeft;s>0&&p+o.clientWidth>s+m&&(p=s+m-o.clientWidth),p<0&&(p=0),l>0&&f+o.clientHeight>l+C&&(f=l+C-o.clientHeight),f<0&&(f=0),o.style.left=p+"px",o.style.top=f+"px"}},t.prototype.removeGhost=function(){this.eGhost&&this.eGhostParent&&this.eGhostParent.removeChild(this.eGhost),this.eGhost=null},t.prototype.createGhost=function(){this.eGhost=tr(e.GHOST_TEMPLATE),this.mouseEventService.stampTopLevelGridCompWithGridInstance(this.eGhost);var r=this.environment.getTheme().theme;r&&this.eGhost.classList.add(r),this.eGhostIcon=this.eGhost.querySelector(".ag-dnd-ghost-icon"),this.setGhostIcon(null);var o=this.eGhost.querySelector(".ag-dnd-ghost-label"),i=this.dragSource.dragItemName;Ng(i)&&(i=i()),o.innerHTML=xt(i)||"",this.eGhost.style.height="25px",this.eGhost.style.top="20px",this.eGhost.style.left="20px";var a=this.gridOptionsService.getDocument(),s=null;try{s=a.fullscreenElement}catch{}finally{if(!s){var l=this.gridOptionsService.getRootNode(),u=l.querySelector("body");u?s=u:l instanceof ShadowRoot?s=l:s=l?.documentElement}}this.eGhostParent=s,this.eGhostParent?this.eGhostParent.appendChild(this.eGhost):console.warn("AG Grid: could not find document body, it is needed for dragging columns")},t.prototype.setGhostIcon=function(r,o){o===void 0&&(o=!1),vr(this.eGhostIcon);var i=null;switch(r||(r=this.dragSource.getDefaultIconName?this.dragSource.getDefaultIconName():e.ICON_NOT_ALLOWED),r){case e.ICON_PINNED:i=this.ePinnedIcon;break;case e.ICON_MOVE:i=this.eMoveIcon;break;case e.ICON_LEFT:i=this.eLeftIcon;break;case e.ICON_RIGHT:i=this.eRightIcon;break;case e.ICON_GROUP:i=this.eGroupIcon;break;case e.ICON_AGGREGATE:i=this.eAggregateIcon;break;case e.ICON_PIVOT:i=this.ePivotIcon;break;case e.ICON_NOT_ALLOWED:i=this.eDropNotAllowedIcon;break;case e.ICON_HIDE:i=this.eHideIcon;break}this.eGhostIcon.classList.toggle("ag-shake-left-to-right",o),!(i===this.eHideIcon&&this.gridOptionsService.is("suppressDragLeaveHidesColumns"))&&i&&this.eGhostIcon.appendChild(i)};var e;return t.ICON_PINNED="pinned",t.ICON_MOVE="move",t.ICON_LEFT="left",t.ICON_RIGHT="right",t.ICON_GROUP="group",t.ICON_AGGREGATE="aggregate",t.ICON_PIVOT="pivot",t.ICON_NOT_ALLOWED="notAllowed",t.ICON_HIDE="hide",t.GHOST_TEMPLATE=`
`,Ss([w("dragService")],t.prototype,"dragService",void 0),Ss([w("mouseEventService")],t.prototype,"mouseEventService",void 0),Ss([w("columnApi")],t.prototype,"columnApi",void 0),Ss([w("gridApi")],t.prototype,"gridApi",void 0),Ss([M],t.prototype,"init",null),Ss([Mt],t.prototype,"clearDragSourceParamsList",null),t=e=Ss([H("dragAndDropService")],t),t}(F),Qg=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(r[i]=o[i])},n(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");n(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}}(),cd=function(n,t,e,r){var o=arguments.length,i=o<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(n,t,e,r);else for(var s=n.length-1;s>=0;s--)(a=n[s])&&(i=(o<3?a(i):o>3?a(t,e,i):a(t,e))||i);return o>3&&i&&Object.defineProperty(t,e,i),i},_g=function(n){Qg(t,n);function t(e,r,o,i,a,s){var l=n.call(this)||this;return l.cellValueFn=e,l.rowNode=r,l.column=o,l.customGui=i,l.dragStartPixels=a,l.suppressVisibilityChange=s,l.dragSource=null,l}return t.prototype.isCustomGui=function(){return this.customGui!=null},t.prototype.postConstruct=function(){if(this.customGui?this.setDragElement(this.customGui,this.dragStartPixels):(this.setTemplate(''),this.getGui().appendChild(_t("rowDrag",this.gridOptionsService,null)),this.addDragSource()),this.checkCompatibility(),!this.suppressVisibilityChange){var e=this.gridOptionsService.is("rowDragManaged")?new oU(this,this.beans,this.rowNode,this.column):new nU(this,this.beans,this.rowNode,this.column);this.createManagedBean(e,this.beans.context)}},t.prototype.setDragElement=function(e,r){this.setTemplateFromElement(e),this.addDragSource(r)},t.prototype.getSelectedNodes=function(){var e=this.gridOptionsService.is("rowDragMultiRow");if(!e)return[this.rowNode];var r=this.beans.selectionService.getSelectedNodes();return r.indexOf(this.rowNode)!==-1?r:[this.rowNode]},t.prototype.checkCompatibility=function(){var e=this.gridOptionsService.is("rowDragManaged"),r=this.gridOptionsService.is("treeData");r&&e&&ge(function(){return console.warn("AG Grid: If using row drag with tree data, you cannot have rowDragManaged=true")},"RowDragComp.managedAndTreeData")},t.prototype.getDragItem=function(){return{rowNode:this.rowNode,rowNodes:this.getSelectedNodes(),columns:this.column?[this.column]:void 0,defaultTextValue:this.cellValueFn()}},t.prototype.getRowDragText=function(e){if(e){var r=e.getColDef();if(r.rowDragText)return r.rowDragText}return this.gridOptionsService.get("rowDragText")},t.prototype.addDragSource=function(e){var r=this;e===void 0&&(e=4),this.dragSource&&this.removeDragSource();var o=this.getRowDragText(this.column),i=this.localeService.getLocaleTextFunc();this.dragSource={type:g.DragSourceType.RowDrag,eElement:this.getGui(),dragItemName:function(){var a,s=r.getDragItem(),l=((a=s.rowNodes)===null||a===void 0?void 0:a.length)||1;return o?o(s,l):l===1?r.cellValueFn():l+" "+i("rowDragRows","rows")},getDragItem:function(){return r.getDragItem()},dragStartPixels:e,dragSourceDomDataKey:this.gridOptionsService.getDomDataKey()},this.beans.dragAndDropService.addDragSource(this.dragSource,!0)},t.prototype.removeDragSource=function(){this.dragSource&&this.beans.dragAndDropService.removeDragSource(this.dragSource),this.dragSource=null},cd([w("beans")],t.prototype,"beans",void 0),cd([M],t.prototype,"postConstruct",null),cd([Mt],t.prototype,"removeDragSource",null),t}(se),P0=function(n){Qg(t,n);function t(e,r,o){var i=n.call(this)||this;return i.parent=e,i.rowNode=r,i.column=o,i}return t.prototype.setDisplayedOrVisible=function(e){var r={skipAriaHidden:!0};if(e)this.parent.setDisplayed(!1,r);else{var o=!0,i=!1;this.column&&(o=this.column.isRowDrag(this.rowNode)||this.parent.isCustomGui(),i=Ng(this.column.getColDef().rowDrag)),i?(this.parent.setDisplayed(!0,r),this.parent.setVisible(o,r)):(this.parent.setDisplayed(o,r),this.parent.setVisible(!0,r))}},t}(F),nU=function(n){Qg(t,n);function t(e,r,o,i){var a=n.call(this,e,o,i)||this;return a.beans=r,a}return t.prototype.postConstruct=function(){this.addManagedPropertyListener("suppressRowDrag",this.onSuppressRowDrag.bind(this)),this.addManagedListener(this.rowNode,ce.EVENT_DATA_CHANGED,this.workOutVisibility.bind(this)),this.addManagedListener(this.rowNode,ce.EVENT_CELL_CHANGED,this.workOutVisibility.bind(this)),this.addManagedListener(this.rowNode,ce.EVENT_CELL_CHANGED,this.workOutVisibility.bind(this)),this.addManagedListener(this.beans.eventService,_.EVENT_NEW_COLUMNS_LOADED,this.workOutVisibility.bind(this)),this.workOutVisibility()},t.prototype.onSuppressRowDrag=function(){this.workOutVisibility()},t.prototype.workOutVisibility=function(){var e=this.gridOptionsService.is("suppressRowDrag");this.setDisplayedOrVisible(e)},cd([M],t.prototype,"postConstruct",null),t}(P0),oU=function(n){Qg(t,n);function t(e,r,o,i){var a=n.call(this,e,o,i)||this;return a.beans=r,a}return t.prototype.postConstruct=function(){this.addManagedListener(this.beans.eventService,_.EVENT_SORT_CHANGED,this.workOutVisibility.bind(this)),this.addManagedListener(this.beans.eventService,_.EVENT_FILTER_CHANGED,this.workOutVisibility.bind(this)),this.addManagedListener(this.beans.eventService,_.EVENT_COLUMN_ROW_GROUP_CHANGED,this.workOutVisibility.bind(this)),this.addManagedListener(this.beans.eventService,_.EVENT_NEW_COLUMNS_LOADED,this.workOutVisibility.bind(this)),this.addManagedListener(this.rowNode,ce.EVENT_DATA_CHANGED,this.workOutVisibility.bind(this)),this.addManagedListener(this.rowNode,ce.EVENT_CELL_CHANGED,this.workOutVisibility.bind(this)),this.addManagedPropertyListener("suppressRowDrag",this.onSuppressRowDrag.bind(this)),this.workOutVisibility()},t.prototype.onSuppressRowDrag=function(){this.workOutVisibility()},t.prototype.workOutVisibility=function(){var e=this.beans.ctrlsService.getGridBodyCtrl(),r=e.getRowDragFeature(),o=r&&r.shouldPreventRowMove(),i=this.gridOptionsService.is("suppressRowDrag"),a=this.beans.dragAndDropService.hasExternalDropZones(),s=o&&!a||i;this.setDisplayedOrVisible(s)},cd([M],t.prototype,"postConstruct",null),t}(P0),iU=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(r[i]=o[i])},n(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");n(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}}(),Eg=function(){return Eg=Object.assign||function(n){for(var t,e=1,r=arguments.length;e=0;s--)(a=n[s])&&(i=(o<3?a(i):o>3?a(t,e,i):a(t,e))||i);return o>3&&i&&Object.defineProperty(t,e,i),i},O0=function(n){iU(t,n);function t(){return n!==null&&n.apply(this,arguments)||this}return t.prototype.init=function(e,r,o,i,a,s,l){this.params=l,this.eGui=r,this.eCheckbox=o,this.eExpanded=i,this.eContracted=a,this.comp=e,this.compClass=s;var u=l.node,c=l.value,d=l.colDef,f=this.isTopLevelFooter();if(!f){var p=this.isEmbeddedRowMismatch();if(p)return;var h=d?.showRowGroup===!0,v=c==null&&!u.master;if(!h&&v)return;if(u.footer&&this.gridOptionsService.is("groupHideOpenParents")){var C=d&&d.showRowGroup,m=u.rowGroupColumn&&u.rowGroupColumn.getColId();if(C!==m)return}}this.setupShowingValueForOpenedParent(),this.findDisplayedGroupNode(),this.addFullWidthRowDraggerIfNeeded(),this.addExpandAndContract(),this.addCheckboxIfNeeded(),this.addValueElement(),this.setupIndent(),this.refreshAriaExpanded()},t.prototype.destroy=function(){n.prototype.destroy.call(this),this.expandListener=null},t.prototype.refreshAriaExpanded=function(){var e=this.params,r=e.node,o=e.eParentOfValue;if(this.expandListener&&(this.expandListener=this.expandListener()),!this.isExpandable()){FD(o);return}var i=function(){So(o,!!r.expanded)};this.expandListener=this.addManagedListener(r,ce.EVENT_EXPANDED_CHANGED,i)||null,i()},t.prototype.isTopLevelFooter=function(){if(!this.gridOptionsService.is("groupIncludeTotalFooter")||this.params.value!=null||this.params.node.level!=-1)return!1;var e=this.params.colDef,r=e==null;if(r||e.showRowGroup===!0)return!0;var o=this.columnModel.getRowGroupColumns();if(!o||o.length===0)return!0;var i=o[0];return i.getId()===e.showRowGroup},t.prototype.isEmbeddedRowMismatch=function(){if(!this.params.fullWidth||!this.gridOptionsService.is("embedFullWidthRows"))return!1;var e=this.params.pinned==="left",r=this.params.pinned==="right",o=!e&&!r;return this.gridOptionsService.is("enableRtl")?this.columnModel.isPinningLeft()?!r:!o:this.columnModel.isPinningLeft()?!e:!o},t.prototype.findDisplayedGroupNode=function(){var e=this.params.column,r=this.params.node;if(this.showingValueForOpenedParent)for(var o=r.parent;o!=null;){if(o.rowGroupColumn&&e.isRowGroupDisplayed(o.rowGroupColumn.getId())){this.displayedGroupNode=o;break}o=o.parent}Z(this.displayedGroupNode)&&(this.displayedGroupNode=r)},t.prototype.setupShowingValueForOpenedParent=function(){var e=this.params.node,r=this.params.column;if(!this.gridOptionsService.is("groupHideOpenParents")){this.showingValueForOpenedParent=!1;return}if(!e.groupData){this.showingValueForOpenedParent=!1;return}var o=e.rowGroupColumn!=null;if(o){var i=e.rowGroupColumn.getId(),a=r.isRowGroupDisplayed(i);if(a){this.showingValueForOpenedParent=!1;return}}var s=e.groupData[r.getId()]!=null;this.showingValueForOpenedParent=s},t.prototype.addValueElement=function(){this.displayedGroupNode.footer?this.addFooterValue():(this.addGroupValue(),this.addChildCount())},t.prototype.addGroupValue=function(){var e=this.adjustParamsWithDetailsFromRelatedColumn(),r=this.getInnerCompDetails(e),o=e.valueFormatted,i=e.value,a=o;if(a==null)if(i===""&&this.params.node.group){var s=this.localeService.getLocaleTextFunc();a=s("blanks","(Blanks)")}else a=i??null;this.comp.setInnerRenderer(r,a)},t.prototype.adjustParamsWithDetailsFromRelatedColumn=function(){var e=this.displayedGroupNode.rowGroupColumn,r=this.params.column;if(!e)return this.params;var o=r!=null;if(o){var i=r.isRowGroupDisplayed(e.getId());if(!i)return this.params}var a=this.params,s=this.params,l=s.value,u=s.node,c=this.valueFormatterService.formatValue(e,u,l),d=Eg(Eg({},a),{valueFormatted:c});return d},t.prototype.addFooterValue=function(){var e=this.params.footerValueGetter,r="";if(e){var o=_S(this.params);o.value=this.params.value,typeof e=="function"?r=e(o):typeof e=="string"?r=this.expressionService.evaluate(e,o):console.warn("AG Grid: footerValueGetter should be either a function or a string (expression)")}else r="Total "+(this.params.value!=null?this.params.value:"");var i=this.getInnerCompDetails(this.params);this.comp.setInnerRenderer(i,r)},t.prototype.getInnerCompDetails=function(e){var r=this;if(e.fullWidth)return this.userComponentFactory.getFullWidthGroupRowInnerCellRenderer(this.gridOptionsService.get("groupRowRendererParams"),e);var o=this.userComponentFactory.getInnerRendererDetails(e,e),i=function(c){return c&&c.componentClass==r.compClass};if(o&&!i(o))return o;var a=this.displayedGroupNode.rowGroupColumn,s=a?a.getColDef():void 0;if(s){var l=this.userComponentFactory.getCellRendererDetails(s,e);if(l&&!i(l))return l;if(i(l)&&s.cellRendererParams&&s.cellRendererParams.innerRenderer){var u=this.userComponentFactory.getInnerRendererDetails(s.cellRendererParams,e);return u}}},t.prototype.addChildCount=function(){this.params.suppressCount||(this.addManagedListener(this.displayedGroupNode,ce.EVENT_ALL_CHILDREN_COUNT_CHANGED,this.updateChildCount.bind(this)),this.updateChildCount())},t.prototype.updateChildCount=function(){var e=this.displayedGroupNode.allChildrenCount,r=this.isShowRowGroupForThisRow(),o=r&&e!=null&&e>=0,i=o?"("+e+")":"";this.comp.setChildCount(i)},t.prototype.isShowRowGroupForThisRow=function(){if(this.gridOptionsService.is("treeData"))return!0;var e=this.displayedGroupNode.rowGroupColumn;if(!e)return!1;var r=this.params.column,o=r==null||r.isRowGroupDisplayed(e.getId());return o},t.prototype.addExpandAndContract=function(){var e,r=this.params,o=_t("groupExpanded",this.gridOptionsService,null),i=_t("groupContracted",this.gridOptionsService,null);o&&this.eExpanded.appendChild(o),i&&this.eContracted.appendChild(i);var a=r.eGridCell,s=((e=this.params.column)===null||e===void 0?void 0:e.isCellEditable(r.node))&&this.gridOptionsService.is("enableGroupEdit");!s&&this.isExpandable()&&!r.suppressDoubleClickExpand&&this.addManagedListener(a,"dblclick",this.onCellDblClicked.bind(this)),this.addManagedListener(this.eExpanded,"click",this.onExpandClicked.bind(this)),this.addManagedListener(this.eContracted,"click",this.onExpandClicked.bind(this)),this.addManagedListener(a,"keydown",this.onKeyDown.bind(this)),this.addManagedListener(r.node,ce.EVENT_EXPANDED_CHANGED,this.showExpandAndContractIcons.bind(this)),this.showExpandAndContractIcons();var l=this.onRowNodeIsExpandableChanged.bind(this);this.addManagedListener(this.displayedGroupNode,ce.EVENT_ALL_CHILDREN_COUNT_CHANGED,l),this.addManagedListener(this.displayedGroupNode,ce.EVENT_MASTER_CHANGED,l),this.addManagedListener(this.displayedGroupNode,ce.EVENT_GROUP_CHANGED,l),this.addManagedListener(this.displayedGroupNode,ce.EVENT_HAS_CHILDREN_CHANGED,l)},t.prototype.onExpandClicked=function(e){_o(e)||(ii(e),this.onExpandOrContract(e))},t.prototype.onExpandOrContract=function(e){var r=this.displayedGroupNode,o=!r.expanded;!o&&r.sticky&&this.scrollToStickyNode(r),r.setExpanded(o,e)},t.prototype.scrollToStickyNode=function(e){var r=this.ctrlsService.getGridBodyCtrl(),o=r.getScrollFeature();o.setVerticalScrollPosition(e.rowTop-e.stickyRowTop)},t.prototype.isExpandable=function(){if(this.showingValueForOpenedParent)return!0;var e=this.displayedGroupNode,r=this.columnModel.isPivotMode()&&e.leafGroup,o=e.isExpandable()&&!e.footer&&!r;if(!o)return!1;var i=this.params.column,a=i!=null&&typeof i.getColDef().showRowGroup=="string";if(a){var s=this.isShowRowGroupForThisRow();return s}return!0},t.prototype.showExpandAndContractIcons=function(){var e=this,r=e.params,o=e.displayedGroupNode,i=e.columnModel,a=r.node,s=this.isExpandable();if(s){var l=this.showingValueForOpenedParent?!0:a.expanded;this.comp.setExpandedDisplayed(l),this.comp.setContractedDisplayed(!l)}else this.comp.setExpandedDisplayed(!1),this.comp.setContractedDisplayed(!1);var u=i.isPivotMode(),c=u&&o.leafGroup,d=s&&!c,f=a.footer&&a.level===-1;this.comp.addOrRemoveCssClass("ag-cell-expandable",d),this.comp.addOrRemoveCssClass("ag-row-group",d),u?this.comp.addOrRemoveCssClass("ag-pivot-leaf-group",c):f||this.comp.addOrRemoveCssClass("ag-row-group-leaf-indent",!d)},t.prototype.onRowNodeIsExpandableChanged=function(){this.showExpandAndContractIcons(),this.setIndent(),this.refreshAriaExpanded()},t.prototype.setupIndent=function(){var e=this.params.node,r=this.params.suppressPadding;r||(this.addManagedListener(e,ce.EVENT_UI_LEVEL_CHANGED,this.setIndent.bind(this)),this.setIndent())},t.prototype.setIndent=function(){if(!this.gridOptionsService.is("groupHideOpenParents")){var e=this.params,r=e.node,o=!!e.colDef,i=this.gridOptionsService.is("treeData"),a=!o||i||e.colDef.showRowGroup===!0,s=a?r.uiLevel:0;this.indentClass&&this.comp.addOrRemoveCssClass(this.indentClass,!1),this.indentClass="ag-row-group-indent-"+s,this.comp.addOrRemoveCssClass(this.indentClass,!0)}},t.prototype.addFullWidthRowDraggerIfNeeded=function(){var e=this;if(!(!this.params.fullWidth||!this.params.rowDrag)){var r=new _g(function(){return e.params.value},this.params.node);this.createManagedBean(r,this.context),this.eGui.insertAdjacentElement("afterbegin",r.getGui())}},t.prototype.isUserWantsSelected=function(){var e=this.params.checkbox;return typeof e=="function"||e===!0},t.prototype.addCheckboxIfNeeded=function(){var e=this,r=this.displayedGroupNode,o=this.isUserWantsSelected()&&!r.footer&&!r.rowPinned&&!r.detail;if(o){var i=new n_;this.getContext().createBean(i),i.init({rowNode:this.params.node,column:this.params.column,overrides:{isVisible:this.params.checkbox,callbackParams:this.params,removeHidden:!0}}),this.eCheckbox.appendChild(i.getGui()),this.addDestroyFunc(function(){return e.getContext().destroyBean(i)})}this.comp.setCheckboxVisible(o)},t.prototype.onKeyDown=function(e){var r=e.key===O.ENTER;if(!(!r||this.params.suppressEnterExpand)){var o=this.params.column&&this.params.column.isCellEditable(this.params.node);o||this.onExpandOrContract(e)}},t.prototype.onCellDblClicked=function(e){if(!_o(e)){var r=mg(this.eExpanded,e)||mg(this.eContracted,e);r||this.onExpandOrContract(e)}},kc([w("expressionService")],t.prototype,"expressionService",void 0),kc([w("valueFormatterService")],t.prototype,"valueFormatterService",void 0),kc([w("columnModel")],t.prototype,"columnModel",void 0),kc([w("userComponentFactory")],t.prototype,"userComponentFactory",void 0),kc([w("ctrlsService")],t.prototype,"ctrlsService",void 0),t}(F),aU=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(r[i]=o[i])},n(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");n(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}}(),Hc=function(n,t,e,r){var o=arguments.length,i=o<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(n,t,e,r);else for(var s=n.length-1;s>=0;s--)(a=n[s])&&(i=(o<3?a(i):o>3?a(t,e,i):a(t,e))||i);return o>3&&i&&Object.defineProperty(t,e,i),i},mS=function(n){aU(t,n);function t(){return n.call(this,t.TEMPLATE)||this}return t.prototype.init=function(e){var r=this,o={setInnerRenderer:function(l,u){return r.setRenderDetails(l,u)},setChildCount:function(l){return r.eChildCount.innerHTML=l},addOrRemoveCssClass:function(l,u){return r.addOrRemoveCssClass(l,u)},setContractedDisplayed:function(l){return we(r.eContracted,l)},setExpandedDisplayed:function(l){return we(r.eExpanded,l)},setCheckboxVisible:function(l){return r.eCheckbox.classList.toggle("ag-invisible",!l)}},i=this.createManagedBean(new O0),a=!e.colDef,s=this.getGui();i.init(o,s,this.eCheckbox,this.eExpanded,this.eContracted,this.constructor,e),a&&bt(s,"gridcell")},t.prototype.setRenderDetails=function(e,r){var o=this;if(e){var i=e.newAgStackInstance();if(!i)return;i.then(function(a){if(a){var s=function(){return o.context.destroyBean(a)};o.isAlive()?(o.eValue.appendChild(a.getGui()),o.addDestroyFunc(s)):s()}})}else this.eValue.innerText=r},t.prototype.destroy=function(){this.getContext().destroyBean(this.innerCellRenderer),n.prototype.destroy.call(this)},t.prototype.refresh=function(){return!1},t.TEMPLATE=` `,Hc([G("eExpanded")],t.prototype,"eExpanded",void 0),Hc([G("eContracted")],t.prototype,"eContracted",void 0),Hc([G("eCheckbox")],t.prototype,"eCheckbox",void 0),Hc([G("eValue")],t.prototype,"eValue",void 0),Hc([G("eChildCount")],t.prototype,"eChildCount",void 0),t}(se),sU=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(r[i]=o[i])},n(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");n(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}}(),sI=function(n,t,e,r){var o=arguments.length,i=o<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(n,t,e,r);else for(var s=n.length-1;s>=0;s--)(a=n[s])&&(i=(o<3?a(i):o>3?a(t,e,i):a(t,e))||i);return o>3&&i&&Object.defineProperty(t,e,i),i},lU=function(n){sU(t,n);function t(){return n.call(this,t.TEMPLATE)||this}return t.prototype.init=function(e){e.node.failedLoad?this.setupFailed():this.setupLoading()},t.prototype.setupFailed=function(){var e=this.localeService.getLocaleTextFunc();this.eLoadingText.innerText=e("loadingError","ERR")},t.prototype.setupLoading=function(){var e=_t("groupLoading",this.gridOptionsService,null);e&&this.eLoadingIcon.appendChild(e);var r=this.localeService.getLocaleTextFunc();this.eLoadingText.innerText=r("loadingOoo","Loading")},t.prototype.refresh=function(e){return!1},t.prototype.destroy=function(){n.prototype.destroy.call(this)},t.TEMPLATE=`
`,sI([G("eLoadingIcon")],t.prototype,"eLoadingIcon",void 0),sI([G("eLoadingText")],t.prototype,"eLoadingText",void 0),t}(se),uU=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(r[i]=o[i])},n(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");n(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}}(),cU=function(n){uU(t,n);function t(){return n.call(this)||this}return t.prototype.destroy=function(){n.prototype.destroy.call(this)},t.prototype.init=function(e){var r,o=(r=this.gridOptionsService.get("overlayLoadingTemplate"))!==null&&r!==void 0?r:t.DEFAULT_LOADING_OVERLAY_TEMPLATE,i=this.localeService.getLocaleTextFunc(),a=o.replace("[LOADING...]",i("loadingOoo","Loading..."));this.setTemplate(a)},t.DEFAULT_LOADING_OVERLAY_TEMPLATE='[LOADING...]',t}(se),dU=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(r[i]=o[i])},n(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");n(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}}(),fU=function(n){dU(t,n);function t(){return n.call(this)||this}return t.prototype.destroy=function(){n.prototype.destroy.call(this)},t.prototype.init=function(e){var r,o=(r=this.gridOptionsService.get("overlayNoRowsTemplate"))!==null&&r!==void 0?r:t.DEFAULT_NO_ROWS_TEMPLATE,i=this.localeService.getLocaleTextFunc(),a=o.replace("[NO_ROWS_TO_SHOW]",i("noRowsToShow","No Rows To Show"));this.setTemplate(a)},t.DEFAULT_NO_ROWS_TEMPLATE='[NO_ROWS_TO_SHOW]',t}(se),pU=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(r[i]=o[i])},n(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");n(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}}(),hU=function(n){pU(t,n);function t(){return n.call(this,'
')||this}return t.prototype.init=function(e){var r=e.value;this.getGui().innerHTML=xt(r)},t}(Va),gU=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(r[i]=o[i])},n(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");n(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}}(),vU=function(){function n(){}return n.prototype.getTemplate=function(){return''},n.prototype.init=function(t,e){this.eInput=t,this.params=e,e.max!=null&&t.setMax(e.max),e.min!=null&&t.setMin(e.min),e.precision!=null&&t.setPrecision(e.precision),e.step!=null&&t.setStep(e.step),e.showStepperButtons&&t.getInputElement().classList.add("ag-number-field-input-stepper")},n.prototype.getValue=function(){var t=this.eInput.getValue();if(!D(t)&&!D(this.params.value))return this.params.value;var e=this.params.parseValue(t);if(e==null)return e;if(typeof e=="string"){if(e==="")return null;e=Number(e)}return isNaN(e)?null:e},n.prototype.getStartValue=function(){return this.params.value},n}(),L0=function(n){gU(t,n);function t(){return n.call(this,new vU)||this}return t}(Xg),mU=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(r[i]=o[i])},n(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");n(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}}(),yU=function(){function n(){}return n.prototype.getTemplate=function(){return''},n.prototype.init=function(t,e){this.eInput=t,this.params=e,e.min!=null&&t.setMin(e.min),e.max!=null&&t.setMax(e.max),e.step!=null&&t.setStep(e.step)},n.prototype.getValue=function(){var t=this.eInput.getDate();return!D(t)&&!D(this.params.value)?this.params.value:t??null},n.prototype.getStartValue=function(){var t=this.params.value;if(t instanceof Date)return Zn(t,!1)},n}(),I0=function(n){mU(t,n);function t(){return n.call(this,new yU)||this}return t}(Xg),CU=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(r[i]=o[i])},n(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");n(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}}(),wU=function(n,t,e,r){var o=arguments.length,i=o<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(n,t,e,r);else for(var s=n.length-1;s>=0;s--)(a=n[s])&&(i=(o<3?a(i):o>3?a(t,e,i):a(t,e))||i);return o>3&&i&&Object.defineProperty(t,e,i),i},SU=function(){function n(t){this.getDataTypeService=t}return n.prototype.getTemplate=function(){return''},n.prototype.init=function(t,e){this.eInput=t,this.params=e,e.min!=null&&t.setMin(e.min),e.max!=null&&t.setMax(e.max),e.step!=null&&t.setStep(e.step)},n.prototype.getValue=function(){var t=this.formatDate(this.eInput.getDate());return!D(t)&&!D(this.params.value)?this.params.value:this.params.parseValue(t??"")},n.prototype.getStartValue=function(){var t,e;return Zn((e=this.parseDate((t=this.params.value)!==null&&t!==void 0?t:void 0))!==null&&e!==void 0?e:null,!1)},n.prototype.parseDate=function(t){return this.getDataTypeService().getDateParserFunction()(t)},n.prototype.formatDate=function(t){return this.getDataTypeService().getDateFormatterFunction()(t)},n}(),D0=function(n){CU(t,n);function t(){var e=n.call(this,new SU(function(){return e.dataTypeService}))||this;return e}return wU([w("dataTypeService")],t.prototype,"dataTypeService",void 0),t}(Xg),_U=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(r[i]=o[i])},n(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");n(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}}(),EU=function(n,t,e,r){var o=arguments.length,i=o<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(n,t,e,r);else for(var s=n.length-1;s>=0;s--)(a=n[s])&&(i=(o<3?a(i):o>3?a(t,e,i):a(t,e))||i);return o>3&&i&&Object.defineProperty(t,e,i),i},A0=function(n){_U(t,n);function t(){return n.call(this,t.TEMPLATE)||this}return t.prototype.init=function(e){var r=this;this.params=e,this.updateCheckbox(e),this.eCheckbox.getInputElement().setAttribute("tabindex","-1"),this.addManagedListener(this.eCheckbox.getInputElement(),"click",function(i){if(ii(i),!r.eCheckbox.isDisabled()){var a=r.eCheckbox.getValue();r.onCheckboxChanged(a)}}),this.addManagedListener(this.eCheckbox.getInputElement(),"dblclick",function(i){ii(i)});var o=this.gridOptionsService.getDocument();this.addManagedListener(this.params.eGridCell,"keydown",function(i){if(i.key===O.SPACE&&!r.eCheckbox.isDisabled()){r.params.eGridCell===o.activeElement&&r.eCheckbox.toggle();var a=r.eCheckbox.getValue();r.onCheckboxChanged(a),i.preventDefault()}})},t.prototype.refresh=function(e){return this.params=e,this.updateCheckbox(e),!0},t.prototype.updateCheckbox=function(e){var r,o,i,a,s=!0;if(e.node.group&&e.column){var l=e.column.getColId();l.startsWith(Is)?a=e.value==null||e.value===""?void 0:e.value==="true":e.node.aggData&&e.node.aggData[l]!==void 0?a=(r=e.value)!==null&&r!==void 0?r:void 0:s=!1}else a=(o=e.value)!==null&&o!==void 0?o:void 0;if(!s){this.eCheckbox.setDisplayed(!1);return}this.eCheckbox.setValue(a);var u=e.disabled!=null?e.disabled:!(!((i=e.column)===null||i===void 0)&&i.isCellEditable(e.node));this.eCheckbox.setDisabled(u);var c=this.localeService.getLocaleTextFunc(),d=Hg(c,a),f=u?d:c("ariaToggleCellValue","Press SPACE to toggle cell value")+" ("+d+")";this.eCheckbox.setInputAriaLabel(f)},t.prototype.onCheckboxChanged=function(e){var r=this.params,o=r.column,i=r.node,a=r.rowIndex,s=r.value,l={type:_.EVENT_CELL_EDITING_STARTED,column:o,colDef:o?.getColDef(),data:i.data,node:i,rowIndex:a,rowPinned:i.rowPinned,value:s};this.eventService.dispatchEvent(l);var u=this.params.node.setDataValue(this.params.column,e,"edit"),c={type:_.EVENT_CELL_EDITING_STOPPED,column:o,colDef:o?.getColDef(),data:i.data,node:i,rowIndex:a,rowPinned:i.rowPinned,value:s,oldValue:s,newValue:e,valueChanged:u};this.eventService.dispatchEvent(c)},t.TEMPLATE=` `,EU([G("eCheckbox")],t.prototype,"eCheckbox",void 0),t}(se),RU=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(r[i]=o[i])},n(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");n(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}}(),TU=function(n,t,e,r){var o=arguments.length,i=o<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(n,t,e,r);else for(var s=n.length-1;s>=0;s--)(a=n[s])&&(i=(o<3?a(i):o>3?a(t,e,i):a(t,e))||i);return o>3&&i&&Object.defineProperty(t,e,i),i},F0=function(n){RU(t,n);function t(){return n.call(this,`
`)||this}return t.prototype.init=function(e){var r=this,o;this.params=e;var i=(o=e.value)!==null&&o!==void 0?o:void 0;this.eCheckbox.setValue(i),this.eCheckbox.getInputElement().setAttribute("tabindex","-1"),this.setAriaLabel(i),this.addManagedListener(this.eCheckbox,_.EVENT_FIELD_VALUE_CHANGED,function(a){return r.setAriaLabel(a.selected)})},t.prototype.getValue=function(){return this.eCheckbox.getValue()},t.prototype.focusIn=function(){this.eCheckbox.getFocusableElement().focus()},t.prototype.afterGuiAttached=function(){this.params.cellStartedEdit&&this.focusIn()},t.prototype.isPopup=function(){return!1},t.prototype.setAriaLabel=function(e){var r=this.localeService.getLocaleTextFunc(),o=Hg(r,e),i=r("ariaToggleCellValue","Press SPACE to toggle cell value");this.eCheckbox.setInputAriaLabel(i+" ("+o+")")},TU([G("eCheckbox")],t.prototype,"eCheckbox",void 0),t}(Va),xU=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(r[i]=o[i])},n(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");n(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}}(),Ew=function(n,t,e,r){var o=arguments.length,i=o<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(n,t,e,r);else for(var s=n.length-1;s>=0;s--)(a=n[s])&&(i=(o<3?a(i):o>3?a(t,e,i):a(t,e))||i);return o>3&&i&&Object.defineProperty(t,e,i),i},lI=function(n,t){var e=typeof Symbol=="function"&&n[Symbol.iterator];if(!e)return n;var r=e.call(n),o,i=[],a;try{for(;(t===void 0||t-- >0)&&!(o=r.next()).done;)i.push(o.value)}catch(s){a={error:s}}finally{try{o&&!o.done&&(e=r.return)&&e.call(r)}finally{if(a)throw a.error}}return i},uI=function(n,t){for(var e=0,r=t.length,o=n.length;e0&&console.warn(" Did you mean: ["+i.slice(0,3)+"]?"),console.warn("If using a custom component check it has been registered as described in: https://ag-grid.com/javascript-data-grid/components/")},Ew([w("gridOptions")],t.prototype,"gridOptions",void 0),Ew([M],t.prototype,"init",null),t=Ew([H("userComponentRegistry")],t),t}(F),PU={propertyName:"dateComponent",cellRenderer:!1},OU={propertyName:"headerComponent",cellRenderer:!1},LU={propertyName:"headerGroupComponent",cellRenderer:!1},cI={propertyName:"cellRenderer",cellRenderer:!0},IU={propertyName:"cellEditor",cellRenderer:!1},dI={propertyName:"innerRenderer",cellRenderer:!0},DU={propertyName:"loadingOverlayComponent",cellRenderer:!1},AU={propertyName:"noRowsOverlayComponent",cellRenderer:!1},FU={propertyName:"tooltipComponent",cellRenderer:!1},yS={propertyName:"filter",cellRenderer:!1},bU={propertyName:"floatingFilterComponent",cellRenderer:!1},MU={propertyName:"toolPanel",cellRenderer:!1},NU={propertyName:"statusPanel",cellRenderer:!1},GU={propertyName:"fullWidthCellRenderer",cellRenderer:!0},kU={propertyName:"loadingCellRenderer",cellRenderer:!0},HU={propertyName:"groupRowRenderer",cellRenderer:!0},VU={propertyName:"detailCellRenderer",cellRenderer:!0},M0=function(){function n(){}return n.getFloatingFilterType=function(t){return this.filterToFloatingFilterMapping[t]},n.filterToFloatingFilterMapping={set:"agSetColumnFloatingFilter",agSetColumnFilter:"agSetColumnFloatingFilter",multi:"agMultiColumnFloatingFilter",agMultiColumnFilter:"agMultiColumnFloatingFilter",group:"agGroupColumnFloatingFilter",agGroupColumnFilter:"agGroupColumnFloatingFilter",number:"agNumberColumnFloatingFilter",agNumberColumnFilter:"agNumberColumnFloatingFilter",date:"agDateColumnFloatingFilter",agDateColumnFilter:"agDateColumnFloatingFilter",text:"agTextColumnFloatingFilter",agTextColumnFilter:"agTextColumnFloatingFilter"},n}(),BU=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(r[i]=o[i])},n(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");n(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}}(),Hl=function(n,t,e,r){var o=arguments.length,i=o<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(n,t,e,r);else for(var s=n.length-1;s>=0;s--)(a=n[s])&&(i=(o<3?a(i):o>3?a(t,e,i):a(t,e))||i);return o>3&&i&&Object.defineProperty(t,e,i),i},N0=function(n){BU(t,n);function t(){return n!==null&&n.apply(this,arguments)||this}return t.prototype.getHeaderCompDetails=function(e,r){return this.getCompDetails(e,OU,"agColumnHeader",r)},t.prototype.getHeaderGroupCompDetails=function(e){var r=e.columnGroup.getColGroupDef();return this.getCompDetails(r,LU,"agColumnGroupHeader",e)},t.prototype.getFullWidthCellRendererDetails=function(e){return this.getCompDetails(this.gridOptions,GU,null,e,!0)},t.prototype.getFullWidthLoadingCellRendererDetails=function(e){return this.getCompDetails(this.gridOptions,kU,"agLoadingCellRenderer",e,!0)},t.prototype.getFullWidthGroupCellRendererDetails=function(e){return this.getCompDetails(this.gridOptions,HU,"agGroupRowRenderer",e,!0)},t.prototype.getFullWidthDetailCellRendererDetails=function(e){return this.getCompDetails(this.gridOptions,VU,"agDetailCellRenderer",e,!0)},t.prototype.getInnerRendererDetails=function(e,r){return this.getCompDetails(e,dI,null,r)},t.prototype.getFullWidthGroupRowInnerCellRenderer=function(e,r){return this.getCompDetails(e,dI,null,r)},t.prototype.getCellRendererDetails=function(e,r){return this.getCompDetails(e,cI,null,r)},t.prototype.getCellEditorDetails=function(e,r){return this.getCompDetails(e,IU,"agCellEditor",r,!0)},t.prototype.getFilterDetails=function(e,r,o){return this.getCompDetails(e,yS,o,r,!0)},t.prototype.getDateCompDetails=function(e){return this.getCompDetails(this.gridOptions,PU,"agDateInput",e,!0)},t.prototype.getLoadingOverlayCompDetails=function(e){return this.getCompDetails(this.gridOptions,DU,"agLoadingOverlay",e,!0)},t.prototype.getNoRowsOverlayCompDetails=function(e){return this.getCompDetails(this.gridOptions,AU,"agNoRowsOverlay",e,!0)},t.prototype.getTooltipCompDetails=function(e){return this.getCompDetails(e.colDef,FU,"agTooltipComponent",e,!0)},t.prototype.getSetFilterCellRendererDetails=function(e,r){return this.getCompDetails(e,cI,null,r)},t.prototype.getFloatingFilterCompDetails=function(e,r,o){return this.getCompDetails(e,bU,o,r)},t.prototype.getToolPanelCompDetails=function(e,r){return this.getCompDetails(e,MU,null,r,!0)},t.prototype.getStatusPanelCompDetails=function(e,r){return this.getCompDetails(e,NU,null,r,!0)},t.prototype.getCompDetails=function(e,r,o,i,a){var s=this;a===void 0&&(a=!1);var l=r.propertyName,u=r.cellRenderer,c=this.getCompKeys(e,r,i),d=c.compName,f=c.jsComp,p=c.fwComp,h=c.paramsFromSelector,v=c.popupFromSelector,C=c.popupPositionFromSelector,m=function(R){var x=s.userComponentRegistry.retrieve(l,R);x&&(f=x.componentFromFramework?void 0:x.component,p=x.componentFromFramework?x.component:void 0)};if(d!=null&&m(d),f==null&&p==null&&o!=null&&m(o),f&&u&&!this.agComponentUtils.doesImplementIComponent(f)&&(f=this.agComponentUtils.adaptFunction(l,f)),!f&&!p){a&&console.error("AG Grid: Could not find component "+d+", did you forget to configure this component?");return}var y=this.mergeParamsWithApplicationProvidedParams(e,r,i,h),S=f==null,E=f||p;return{componentFromFramework:S,componentClass:E,params:y,type:r,popupFromSelector:v,popupPositionFromSelector:C,newAgStackInstance:function(){return s.newAgStackInstance(E,S,y,r)}}},t.prototype.getCompKeys=function(e,r,o){var i=this,a=r.propertyName,s,l,u,c,d,f;if(e){var p=e,h=p[a+"Selector"],v=h?h(o):null,C=function(m){if(typeof m=="string")s=m;else if(m!=null&&m!==!0){var y=i.getFrameworkOverrides().isFrameworkComponent(m);y?u=m:l=m}};v?(C(v.component),c=v.params,d=v.popup,f=v.popupPosition):C(p[a])}return{compName:s,jsComp:l,fwComp:u,paramsFromSelector:c,popupFromSelector:d,popupPositionFromSelector:f}},t.prototype.newAgStackInstance=function(e,r,o,i){var a=i.propertyName,s=!r,l;if(s)l=new e;else{var u=this.componentMetadataProvider.retrieve(a);l=this.frameworkComponentWrapper.wrap(e,u.mandatoryMethodList,u.optionalMethodList,i)}var c=this.initComponent(l,o);return c==null?yn.resolve(l):c.then(function(){return l})},t.prototype.mergeParamsWithApplicationProvidedParams=function(e,r,o,i){i===void 0&&(i=null);var a={context:this.gridOptionsService.context,columnApi:this.gridOptionsService.columnApi,api:this.gridOptionsService.api};wn(a,o);var s=e,l=s&&s[r.propertyName+"Params"];if(typeof l=="function"){var u=l(o);wn(a,u)}else typeof l=="object"&&wn(a,l);return wn(a,i),a},t.prototype.initComponent=function(e,r){if(this.context.createBean(e),e.init!=null)return e.init(r)},t.prototype.getDefaultFloatingFilterType=function(e,r){if(e==null)return null;var o=null,i=this.getCompKeys(e,yS),a=i.compName,s=i.jsComp,l=i.fwComp;if(a)o=M0.getFloatingFilterType(a);else{var u=s==null&&l==null&&e.filter===!0;u&&(o=r())}return o},Hl([w("gridOptions")],t.prototype,"gridOptions",void 0),Hl([w("agComponentUtils")],t.prototype,"agComponentUtils",void 0),Hl([w("componentMetadataProvider")],t.prototype,"componentMetadataProvider",void 0),Hl([w("userComponentRegistry")],t.prototype,"userComponentRegistry",void 0),Hl([_e("frameworkComponentWrapper")],t.prototype,"frameworkComponentWrapper",void 0),t=Hl([H("userComponentFactory")],t),t}(F);(function(n){n[n.SINGLE_SHEET=0]="SINGLE_SHEET",n[n.MULTI_SHEET=1]="MULTI_SHEET"})(g.ExcelFactoryMode||(g.ExcelFactoryMode={}));var WU=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(r[i]=o[i])},n(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");n(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}}(),Rw=function(n,t,e,r){var o=arguments.length,i=o<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(n,t,e,r);else for(var s=n.length-1;s>=0;s--)(a=n[s])&&(i=(o<3?a(i):o>3?a(t,e,i):a(t,e))||i);return o>3&&i&&Object.defineProperty(t,e,i),i},G0=function(n){WU(t,n);function t(){var e=n!==null&&n.apply(this,arguments)||this;return e.dragEndFunctions=[],e.dragSources=[],e}return t.prototype.removeAllListeners=function(){this.dragSources.forEach(this.removeListener.bind(this)),this.dragSources.length=0},t.prototype.removeListener=function(e){var r=e.dragSource.eElement,o=e.mouseDownListener;if(r.removeEventListener("mousedown",o),e.touchEnabled){var i=e.touchStartListener;r.removeEventListener("touchstart",i,{passive:!0})}},t.prototype.removeDragSource=function(e){var r=this.dragSources.find(function(o){return o.dragSource===e});r&&(this.removeListener(r),mn(this.dragSources,r))},t.prototype.isDragging=function(){return this.dragging},t.prototype.addDragSource=function(e){var r=this,o=this.onMouseDown.bind(this,e),i=e.eElement,a=e.includeTouch,s=e.stopPropagationForTouch;i.addEventListener("mousedown",o);var l=null,u=this.gridOptionsService.is("suppressTouch");a&&!u&&(l=function(c){HS(c.target)||(c.cancelable&&(c.preventDefault(),s&&c.stopPropagation()),r.onTouchStart(e,c))},i.addEventListener("touchstart",l,{passive:!1})),this.dragSources.push({dragSource:e,mouseDownListener:o,touchStartListener:l,touchEnabled:!!a})},t.prototype.getStartTarget=function(){return this.startTarget},t.prototype.onTouchStart=function(e,r){var o=this;this.currentDragParams=e,this.dragging=!1;var i=r.touches[0];this.touchLastTime=i,this.touchStart=i;var a=function(d){return o.onTouchMove(d,e.eElement)},s=function(d){return o.onTouchUp(d,e.eElement)},l=function(d){d.cancelable&&d.preventDefault()},u=r.target,c=[{target:this.gridOptionsService.getRootNode(),type:"touchmove",listener:l,options:{passive:!1}},{target:u,type:"touchmove",listener:a,options:{passive:!0}},{target:u,type:"touchend",listener:s,options:{passive:!0}},{target:u,type:"touchcancel",listener:s,options:{passive:!0}}];this.addTemporaryEvents(c),e.dragStartPixels===0&&this.onCommonMove(i,this.touchStart,e.eElement)},t.prototype.onMouseDown=function(e,r){var o=this,i=r;if(!(e.skipMouseEvent&&e.skipMouseEvent(r))&&!i._alreadyProcessedByDragService&&(i._alreadyProcessedByDragService=!0,r.button===0)){this.shouldPreventMouseEvent(r)&&r.preventDefault(),this.currentDragParams=e,this.dragging=!1,this.mouseStartEvent=r,this.startTarget=r.target;var a=function(d){return o.onMouseMove(d,e.eElement)},s=function(d){return o.onMouseUp(d,e.eElement)},l=function(d){return d.preventDefault()},u=this.gridOptionsService.getRootNode(),c=[{target:u,type:"mousemove",listener:a},{target:u,type:"mouseup",listener:s},{target:u,type:"contextmenu",listener:l}];this.addTemporaryEvents(c),e.dragStartPixels===0&&this.onMouseMove(r,e.eElement)}},t.prototype.addTemporaryEvents=function(e){e.forEach(function(r){var o=r.target,i=r.type,a=r.listener,s=r.options;o.addEventListener(i,a,s)}),this.dragEndFunctions.push(function(){e.forEach(function(r){var o=r.target,i=r.type,a=r.listener,s=r.options;o.removeEventListener(i,a,s)})})},t.prototype.isEventNearStartEvent=function(e,r){var o=this.currentDragParams.dragStartPixels,i=D(o)?o:4;return $S(e,r,i)},t.prototype.getFirstActiveTouch=function(e){for(var r=0;ro.right-i,this.tickUp=t.clientYo.bottom-i&&!r,this.tickLeft||this.tickRight||this.tickUp||this.tickDown?this.ensureTickingStarted():this.ensureCleared()}},n.prototype.ensureTickingStarted=function(){this.tickingInterval===null&&(this.tickingInterval=window.setInterval(this.doTick.bind(this),100),this.tickCount=0)},n.prototype.doTick=function(){this.tickCount++;var t;if(t=this.tickCount>20?200:this.tickCount>10?80:40,this.scrollVertically){var e=this.getVerticalPosition();this.tickUp&&this.setVerticalPosition(e-t),this.tickDown&&this.setVerticalPosition(e+t)}if(this.scrollHorizontally){var r=this.getHorizontalPosition();this.tickLeft&&this.setHorizontalPosition(r-t),this.tickRight&&this.setHorizontalPosition(r+t)}this.onScrollCallback&&this.onScrollCallback()},n.prototype.ensureCleared=function(){this.tickingInterval&&(window.clearInterval(this.tickingInterval),this.tickingInterval=null)},n}(),UU=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(r[i]=o[i])},n(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");n(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}}(),fI=function(n,t,e,r){var o=arguments.length,i=o<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(n,t,e,r);else for(var s=n.length-1;s>=0;s--)(a=n[s])&&(i=(o<3?a(i):o>3?a(t,e,i):a(t,e))||i);return o>3&&i&&Object.defineProperty(t,e,i),i},Tw="ag-list-item-hovered",jU=function(n){UU(t,n);function t(e,r,o){var i=n.call(this)||this;return i.comp=e,i.virtualList=r,i.params=o,i.currentDragValue=null,i.lastHoveredListItem=null,i}return t.prototype.postConstruct=function(){this.addManagedListener(this.params.eventSource,this.params.listItemDragStartEvent,this.listItemDragStart.bind(this)),this.addManagedListener(this.params.eventSource,this.params.listItemDragEndEvent,this.listItemDragEnd.bind(this)),this.createDropTarget(),this.createAutoScrollService()},t.prototype.listItemDragStart=function(e){this.currentDragValue=this.params.getCurrentDragValue(e),this.moveBlocked=this.params.isMoveBlocked(this.currentDragValue)},t.prototype.listItemDragEnd=function(){var e=this;window.setTimeout(function(){e.currentDragValue=null,e.moveBlocked=!1},10)},t.prototype.createDropTarget=function(){var e=this,r={isInterestedIn:function(o){return o===e.params.dragSourceType},getIconName:function(){return Ft[e.moveBlocked?"ICON_NOT_ALLOWED":"ICON_MOVE"]},getContainer:function(){return e.comp.getGui()},onDragging:function(o){return e.onDragging(o)},onDragStop:function(){return e.onDragStop()},onDragLeave:function(){return e.onDragLeave()}};this.dragAndDropService.addDropTarget(r)},t.prototype.createAutoScrollService=function(){var e=this.virtualList.getGui();this.autoScrollService=new o_({scrollContainer:e,scrollAxis:"y",getVerticalPosition:function(){return e.scrollTop},setVerticalPosition:function(r){return e.scrollTop=r}})},t.prototype.onDragging=function(e){if(!(!this.currentDragValue||this.moveBlocked)){var r=this.getListDragItem(e),o=this.virtualList.getComponentAt(r.rowIndex);if(o){var i=o.getGui().parentElement;this.lastHoveredListItem&&this.lastHoveredListItem.rowIndex===r.rowIndex&&this.lastHoveredListItem.position===r.position||(this.autoScrollService.check(e.event),this.clearHoveredItems(),this.lastHoveredListItem=r,uS(i,Tw),uS(i,"ag-item-highlight-"+r.position))}}},t.prototype.getListDragItem=function(e){var r=this.virtualList.getGui(),o=parseFloat(window.getComputedStyle(r).paddingTop),i=this.virtualList.getRowHeight(),a=this.virtualList.getScrollTop(),s=Math.max(0,(e.y-o+a)/i),l=this.params.getNumRows(this.comp)-1,u=Math.min(l,s)|0;return{rowIndex:u,position:Math.round(s)>s||s>l?"bottom":"top",component:this.virtualList.getComponentAt(u)}},t.prototype.onDragStop=function(){this.moveBlocked||(this.params.moveItem(this.currentDragValue,this.lastHoveredListItem),this.clearHoveredItems(),this.autoScrollService.ensureCleared())},t.prototype.onDragLeave=function(){this.clearHoveredItems(),this.autoScrollService.ensureCleared()},t.prototype.clearHoveredItems=function(){var e=this.virtualList.getGui();e.querySelectorAll("."+Tw).forEach(function(r){[Tw,"ag-item-highlight-top","ag-item-highlight-bottom"].forEach(function(o){r.classList.remove(o)})}),this.lastHoveredListItem=null},fI([w("dragAndDropService")],t.prototype,"dragAndDropService",void 0),fI([M],t.prototype,"postConstruct",null),t}(F);(function(n){n[n.Above=0]="Above",n[n.Below=1]="Below"})(g.RowHighlightPosition||(g.RowHighlightPosition={}));(function(n){n.EVERYTHING="group",n.FILTER="filter",n.SORT="sort",n.MAP="map",n.AGGREGATE="aggregate",n.FILTER_AGGREGATES="filter_aggregates",n.PIVOT="pivot",n.NOTHING="nothing"})(g.ClientSideRowModelSteps||(g.ClientSideRowModelSteps={}));var Te=function(n,t,e,r){var o=arguments.length,i=o<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(n,t,e,r);else for(var s=n.length-1;s>=0;s--)(a=n[s])&&(i=(o<3?a(i):o>3?a(t,e,i):a(t,e))||i);return o>3&&i&&Object.defineProperty(t,e,i),i};function Rs(n){var t=n,e=t!=null&&t.getFrameworkComponentInstance!=null;return e?t.getFrameworkComponentInstance():n}var k0=function(){function n(){this.detailGridInfoMap={},this.destroyCalled=!1}return n.prototype.registerOverlayWrapperComp=function(t){this.overlayWrapperComp=t},n.prototype.registerSideBarComp=function(t){this.sideBarComp=t},n.prototype.init=function(){var t=this;switch(this.rowModel.getType()){case"clientSide":this.clientSideRowModel=this.rowModel;break;case"infinite":this.infiniteRowModel=this.rowModel;break;case"serverSide":this.serverSideRowModel=this.rowModel;break}this.ctrlsService.whenReady(function(){t.gridBodyCtrl=t.ctrlsService.getGridBodyCtrl()})},n.prototype.__getAlignedGridService=function(){return this.alignedGridsService},n.prototype.__getContext=function(){return this.context},n.prototype.getSetterMethod=function(t){return"set"+t.charAt(0).toUpperCase()+t.substring(1)},n.prototype.__setPropertyOnly=function(t,e){return this.gos.__setPropertyOnly(t,e)},n.prototype.__updateProperty=function(t,e,r,o){o===void 0&&(o=void 0),this.gos.set(t,e,r,{},o);var i=this.getSetterMethod(t),a=this;a[i]&&a[i](e)},n.prototype.getGridId=function(){return this.context.getGridId()},n.prototype.addDetailGridInfo=function(t,e){this.detailGridInfoMap[t]=e},n.prototype.removeDetailGridInfo=function(t){this.detailGridInfoMap[t]=void 0},n.prototype.getDetailGridInfo=function(t){return this.detailGridInfoMap[t]},n.prototype.forEachDetailGridInfo=function(t){var e=0;st(this.detailGridInfoMap,function(r,o){D(o)&&(t(o,e),e++)})},n.prototype.getDataAsCsv=function(t){if(J.__assertRegistered(g.ModuleNames.CsvExportModule,"api.getDataAsCsv",this.context.getGridId()))return this.csvCreator.getDataAsCsv(t)},n.prototype.exportDataAsCsv=function(t){J.__assertRegistered(g.ModuleNames.CsvExportModule,"api.exportDataAsCSv",this.context.getGridId())&&this.csvCreator.exportDataAsCsv(t)},n.prototype.getExcelExportMode=function(t){var e=this.gos.get("defaultExcelExportParams"),r=Object.assign({exportMode:"xlsx"},e,t);return r.exportMode},n.prototype.assertNotExcelMultiSheet=function(t,e){if(!J.__assertRegistered(g.ModuleNames.ExcelExportModule,"api."+t,this.context.getGridId()))return!1;var r=this.getExcelExportMode(e);return this.excelCreator.getFactoryMode(r)===g.ExcelFactoryMode.MULTI_SHEET?(console.warn("AG Grid: The Excel Exporter is currently on Multi Sheet mode. End that operation by calling 'api.getMultipleSheetAsExcel()' or 'api.exportMultipleSheetsAsExcel()'"),!1):!0},n.prototype.getDataAsExcel=function(t){if(this.assertNotExcelMultiSheet("getDataAsExcel",t))return this.excelCreator.getDataAsExcel(t)},n.prototype.exportDataAsExcel=function(t){this.assertNotExcelMultiSheet("exportDataAsExcel",t)&&this.excelCreator.exportDataAsExcel(t)},n.prototype.getSheetDataForExcel=function(t){if(J.__assertRegistered(g.ModuleNames.ExcelExportModule,"api.getSheetDataForExcel",this.context.getGridId())){var e=this.getExcelExportMode(t);return this.excelCreator.setFactoryMode(g.ExcelFactoryMode.MULTI_SHEET,e),this.excelCreator.getSheetDataForExcel(t)}},n.prototype.getMultipleSheetsAsExcel=function(t){if(J.__assertRegistered(g.ModuleNames.ExcelExportModule,"api.getMultipleSheetsAsExcel",this.context.getGridId()))return this.excelCreator.getMultipleSheetsAsExcel(t)},n.prototype.exportMultipleSheetsAsExcel=function(t){if(J.__assertRegistered(g.ModuleNames.ExcelExportModule,"api.exportMultipleSheetsAsExcel",this.context.getGridId()))return this.excelCreator.exportMultipleSheetsAsExcel(t)},n.prototype.setTreeData=function(t){this.gos.set("treeData",t)},n.prototype.setGridAriaProperty=function(t,e){if(t){var r=this.ctrlsService.getGridBodyCtrl().getGui(),o="aria-"+t;e===null?r.removeAttribute(o):r.setAttribute(o,e)}},n.prototype.logMissingRowModel=function(t){for(var e=[],r=1;r= 0");return}this.serverSideRowModel?this.serverSideRowModel.applyRowData(t.successParams,o,i):this.logMissingRowModel("setServerSideDatasource","serverSide")},n.prototype.retryServerSideLoads=function(){if(!this.serverSideRowModel){this.logMissingRowModel("retryServerSideLoads","serverSide");return}this.serverSideRowModel.retryLoads()},n.prototype.flushServerSideAsyncTransactions=function(){if(!this.serverSideTransactionManager){this.logMissingRowModel("flushServerSideAsyncTransactions","serverSide");return}return this.serverSideTransactionManager.flushAsyncTransactions()},n.prototype.applyTransaction=function(t){if(!this.clientSideRowModel){this.logMissingRowModel("applyTransaction","clientSide");return}return this.clientSideRowModel.updateRowData(t)},n.prototype.applyTransactionAsync=function(t,e){if(!this.clientSideRowModel){this.logMissingRowModel("applyTransactionAsync","clientSide");return}this.clientSideRowModel.batchUpdateRowData(t,e)},n.prototype.flushAsyncTransactions=function(){if(!this.clientSideRowModel){this.logMissingRowModel("flushAsyncTransactions","clientSide");return}this.clientSideRowModel.flushAsyncTransactions()},n.prototype.setSuppressModelUpdateAfterUpdateTransaction=function(t){this.gos.set("suppressModelUpdateAfterUpdateTransaction",t)},n.prototype.refreshInfiniteCache=function(){this.infiniteRowModel?this.infiniteRowModel.refreshCache():this.logMissingRowModel("refreshInfiniteCache","infinite")},n.prototype.purgeInfiniteCache=function(){this.infiniteRowModel?this.infiniteRowModel.purgeCache():this.logMissingRowModel("purgeInfiniteCache","infinite")},n.prototype.refreshServerSide=function(t){if(!this.serverSideRowModel){this.logMissingRowModel("refreshServerSide","serverSide");return}this.serverSideRowModel.refreshStore(t)},n.prototype.refreshServerSideStore=function(t){return Xn("28.0","refreshServerSideStore","refreshServerSide"),this.refreshServerSide(t)},n.prototype.getServerSideStoreState=function(){return Xn("28.0","getServerSideStoreState","getServerSideGroupLevelState"),this.getServerSideGroupLevelState()},n.prototype.getServerSideGroupLevelState=function(){return this.serverSideRowModel?this.serverSideRowModel.getStoreState():(this.logMissingRowModel("getServerSideGroupLevelState","serverSide"),[])},n.prototype.getInfiniteRowCount=function(){if(this.infiniteRowModel)return this.infiniteRowModel.getRowCount();this.logMissingRowModel("getInfiniteRowCount","infinite")},n.prototype.isLastRowIndexKnown=function(){if(this.infiniteRowModel)return this.infiniteRowModel.isLastRowIndexKnown();this.logMissingRowModel("isLastRowIndexKnown","infinite")},n.prototype.getCacheBlockState=function(){return this.rowNodeBlockLoader.getBlockState()},n.prototype.getFirstDisplayedRow=function(){return this.rowRenderer.getFirstVirtualRenderedRow()},n.prototype.getLastDisplayedRow=function(){return this.rowRenderer.getLastVirtualRenderedRow()},n.prototype.getDisplayedRowAtIndex=function(t){return this.rowModel.getRow(t)},n.prototype.getDisplayedRowCount=function(){return this.rowModel.getRowCount()},n.prototype.setDataTypeDefinitions=function(t){this.gos.set("dataTypeDefinitions",t)},n.prototype.setPagination=function(t){this.gos.set("pagination",t)},n.prototype.paginationIsLastPageFound=function(){return this.paginationProxy.isLastPageFound()},n.prototype.paginationGetPageSize=function(){return this.paginationProxy.getPageSize()},n.prototype.paginationSetPageSize=function(t){this.gos.set("paginationPageSize",t)},n.prototype.paginationGetCurrentPage=function(){return this.paginationProxy.getCurrentPage()},n.prototype.paginationGetTotalPages=function(){return this.paginationProxy.getTotalPages()},n.prototype.paginationGetRowCount=function(){return this.paginationProxy.getMasterRowCount()},n.prototype.paginationGoToNextPage=function(){this.paginationProxy.goToNextPage()},n.prototype.paginationGoToPreviousPage=function(){this.paginationProxy.goToPreviousPage()},n.prototype.paginationGoToFirstPage=function(){this.paginationProxy.goToFirstPage()},n.prototype.paginationGoToLastPage=function(){this.paginationProxy.goToLastPage()},n.prototype.paginationGoToPage=function(t){this.paginationProxy.goToPage(t)},Te([_e("immutableService")],n.prototype,"immutableService",void 0),Te([_e("csvCreator")],n.prototype,"csvCreator",void 0),Te([_e("excelCreator")],n.prototype,"excelCreator",void 0),Te([w("rowRenderer")],n.prototype,"rowRenderer",void 0),Te([w("navigationService")],n.prototype,"navigationService",void 0),Te([w("filterManager")],n.prototype,"filterManager",void 0),Te([w("columnModel")],n.prototype,"columnModel",void 0),Te([w("selectionService")],n.prototype,"selectionService",void 0),Te([w("gridOptionsService")],n.prototype,"gos",void 0),Te([w("valueService")],n.prototype,"valueService",void 0),Te([w("alignedGridsService")],n.prototype,"alignedGridsService",void 0),Te([w("eventService")],n.prototype,"eventService",void 0),Te([w("pinnedRowModel")],n.prototype,"pinnedRowModel",void 0),Te([w("context")],n.prototype,"context",void 0),Te([w("rowModel")],n.prototype,"rowModel",void 0),Te([w("sortController")],n.prototype,"sortController",void 0),Te([w("paginationProxy")],n.prototype,"paginationProxy",void 0),Te([w("focusService")],n.prototype,"focusService",void 0),Te([w("dragAndDropService")],n.prototype,"dragAndDropService",void 0),Te([_e("rangeService")],n.prototype,"rangeService",void 0),Te([_e("clipboardService")],n.prototype,"clipboardService",void 0),Te([_e("aggFuncService")],n.prototype,"aggFuncService",void 0),Te([w("menuFactory")],n.prototype,"menuFactory",void 0),Te([_e("contextMenuFactory")],n.prototype,"contextMenuFactory",void 0),Te([w("valueCache")],n.prototype,"valueCache",void 0),Te([w("animationFrameService")],n.prototype,"animationFrameService",void 0),Te([_e("statusBarService")],n.prototype,"statusBarService",void 0),Te([_e("chartService")],n.prototype,"chartService",void 0),Te([_e("undoRedoService")],n.prototype,"undoRedoService",void 0),Te([_e("rowNodeBlockLoader")],n.prototype,"rowNodeBlockLoader",void 0),Te([_e("ssrmTransactionManager")],n.prototype,"serverSideTransactionManager",void 0),Te([w("ctrlsService")],n.prototype,"ctrlsService",void 0),Te([M],n.prototype,"init",null),Te([Mt],n.prototype,"cleanDownReferencesToAvoidMemoryLeakInCaseApplicationIsKeepingReferenceToDestroyedGrid",null),n=Te([H("gridApi")],n),n}(),zU=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(r[i]=o[i])},n(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");n(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}}(),Vc=function(n,t,e,r){var o=arguments.length,i=o<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(n,t,e,r);else for(var s=n.length-1;s>=0;s--)(a=n[s])&&(i=(o<3?a(i):o>3?a(t,e,i):a(t,e))||i);return o>3&&i&&Object.defineProperty(t,e,i),i},H0=function(n){zU(t,n);function t(){var r=n!==null&&n.apply(this,arguments)||this;return r.quickFilter=null,r.quickFilterParts=null,r}e=t,t.prototype.postConstruct=function(){var r=this;this.addManagedListener(this.eventService,_.EVENT_COLUMN_PIVOT_MODE_CHANGED,function(){return r.resetQuickFilterCache()}),this.addManagedListener(this.eventService,_.EVENT_NEW_COLUMNS_LOADED,function(){return r.resetQuickFilterCache()}),this.addManagedListener(this.eventService,_.EVENT_COLUMN_ROW_GROUP_CHANGED,function(){return r.resetQuickFilterCache()}),this.addManagedListener(this.eventService,_.EVENT_COLUMN_VISIBLE,function(){r.gridOptionsService.is("includeHiddenColumnsInQuickFilter")||r.resetQuickFilterCache()}),this.addManagedPropertyListener("quickFilterText",function(o){return r.setQuickFilter(o.currentValue)}),this.addManagedPropertyListener("includeHiddenColumnsInQuickFilter",function(){return r.onIncludeHiddenColumnsInQuickFilterChanged()}),this.quickFilter=this.parseQuickFilter(this.gridOptionsService.get("quickFilterText")),this.parser=this.gridOptionsService.get("quickFilterParser"),this.matcher=this.gridOptionsService.get("quickFilterMatcher"),this.setQuickFilterParts(),this.addManagedPropertyListeners(["quickFilterMatcher","quickFilterParser"],function(){return r.setQuickFilterParserAndMatcher()})},t.prototype.isQuickFilterPresent=function(){return this.quickFilter!==null},t.prototype.doesRowPassQuickFilter=function(r){var o=this,i=this.gridOptionsService.is("cacheQuickFilter");return this.matcher?this.doesRowPassQuickFilterMatcher(i,r):this.quickFilterParts.every(function(a){return i?o.doesRowPassQuickFilterCache(r,a):o.doesRowPassQuickFilterNoCache(r,a)})},t.prototype.resetQuickFilterCache=function(){this.rowModel.forEachNode(function(r){return r.quickFilterAggregateText=null})},t.prototype.setQuickFilterParts=function(){var r=this,o=r.quickFilter,i=r.parser;o?this.quickFilterParts=i?i(o):o.split(" "):this.quickFilterParts=null},t.prototype.parseQuickFilter=function(r){return D(r)?this.gridOptionsService.isRowModelType("clientSide")?r.toUpperCase():(console.warn("AG Grid - Quick filtering only works with the Client-Side Row Model"),null):null},t.prototype.setQuickFilter=function(r){if(r!=null&&typeof r!="string"){console.warn("AG Grid - setQuickFilter() only supports string inputs, received: "+typeof r);return}var o=this.parseQuickFilter(r);this.quickFilter!==o&&(this.quickFilter=o,this.setQuickFilterParts(),this.dispatchEvent({type:e.EVENT_QUICK_FILTER_CHANGED}))},t.prototype.setQuickFilterParserAndMatcher=function(){var r=this.gridOptionsService.get("quickFilterParser"),o=this.gridOptionsService.get("quickFilterMatcher"),i=r!==this.parser||o!==this.matcher;this.parser=r,this.matcher=o,i&&(this.setQuickFilterParts(),this.dispatchEvent({type:e.EVENT_QUICK_FILTER_CHANGED}))},t.prototype.onIncludeHiddenColumnsInQuickFilterChanged=function(){this.columnModel.refreshQuickFilterColumns(),this.resetQuickFilterCache(),this.isQuickFilterPresent()&&this.dispatchEvent({type:e.EVENT_QUICK_FILTER_CHANGED})},t.prototype.doesRowPassQuickFilterNoCache=function(r,o){var i=this,a=this.columnModel.getAllColumnsForQuickFilter();return a.some(function(s){var l=i.getQuickFilterTextForColumn(s,r);return D(l)&&l.indexOf(o)>=0})},t.prototype.doesRowPassQuickFilterCache=function(r,o){return this.checkGenerateQuickFilterAggregateText(r),r.quickFilterAggregateText.indexOf(o)>=0},t.prototype.doesRowPassQuickFilterMatcher=function(r,o){var i;r?(this.checkGenerateQuickFilterAggregateText(o),i=o.quickFilterAggregateText):i=this.getQuickFilterAggregateText(o);var a=this,s=a.quickFilterParts,l=a.matcher;return l(s,i)},t.prototype.checkGenerateQuickFilterAggregateText=function(r){r.quickFilterAggregateText||(r.quickFilterAggregateText=this.getQuickFilterAggregateText(r))},t.prototype.getQuickFilterTextForColumn=function(r,o){var i=this.valueService.getValue(r,o,!0),a=r.getColDef();if(a.getQuickFilterText){var s={value:i,node:o,data:o.data,column:r,colDef:a,api:this.gridOptionsService.api,columnApi:this.gridOptionsService.columnApi,context:this.gridOptionsService.context};i=a.getQuickFilterText(s)}return D(i)?i.toString().toUpperCase():null},t.prototype.getQuickFilterAggregateText=function(r){var o=this,i=[],a=this.columnModel.getAllColumnsForQuickFilter();return a.forEach(function(s){var l=o.getQuickFilterTextForColumn(s,r);D(l)&&i.push(l)}),i.join(e.QUICK_FILTER_SEPARATOR)};var e;return t.EVENT_QUICK_FILTER_CHANGED="quickFilterChanged",t.QUICK_FILTER_SEPARATOR=` `,Vc([w("valueService")],t.prototype,"valueService",void 0),Vc([w("columnModel")],t.prototype,"columnModel",void 0),Vc([w("rowModel")],t.prototype,"rowModel",void 0),Vc([M],t.prototype,"postConstruct",null),t=e=Vc([H("quickFilterService")],t),t}(F),qU=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(r[i]=o[i])},n(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");n(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}}(),Rg=function(){return Rg=Object.assign||function(n){for(var t,e=1,r=arguments.length;e=0;s--)(a=n[s])&&(i=(o<3?a(i):o>3?a(t,e,i):a(t,e))||i);return o>3&&i&&Object.defineProperty(t,e,i),i},V0=function(n){qU(t,n);function t(){var e=n!==null&&n.apply(this,arguments)||this;return e.allColumnFilters=new Map,e.allColumnListeners=new Map,e.activeAggregateFilters=[],e.activeColumnFilters=[],e.processingFilterChange=!1,e.filterModelUpdateQueue=[],e}return t.prototype.init=function(){var e=this;this.addManagedListener(this.eventService,_.EVENT_GRID_COLUMNS_CHANGED,function(){return e.onColumnsChanged()}),this.addManagedListener(this.eventService,_.EVENT_COLUMN_VALUE_CHANGED,function(){return e.refreshFiltersForAggregations()}),this.addManagedListener(this.eventService,_.EVENT_COLUMN_PIVOT_CHANGED,function(){return e.refreshFiltersForAggregations()}),this.addManagedListener(this.eventService,_.EVENT_COLUMN_PIVOT_MODE_CHANGED,function(){return e.refreshFiltersForAggregations()}),this.addManagedListener(this.eventService,_.EVENT_NEW_COLUMNS_LOADED,function(){return e.updateAdvancedFilterColumns()}),this.addManagedListener(this.eventService,_.EVENT_COLUMN_VISIBLE,function(){return e.updateAdvancedFilterColumns()}),this.allowShowChangeAfterFilter=this.gridOptionsService.is("allowShowChangeAfterFilter"),this.externalFilterPresent=this.isExternalFilterPresentCallback(),this.updateAggFiltering(),this.addManagedPropertyListener("groupAggFiltering",function(){return e.updateAggFiltering()}),this.addManagedPropertyListener("advancedFilterModel",function(r){return e.setAdvancedFilterModel(r.currentValue)}),this.addManagedListener(this.eventService,_.EVENT_ADVANCED_FILTER_ENABLED_CHANGED,function(r){var o=r.enabled;return e.onAdvancedFilterEnabledChanged(o)}),this.addManagedListener(this.eventService,_.EVENT_DATA_TYPES_INFERRED,function(){return e.processFilterModelUpdateQueue()}),this.addManagedListener(this.quickFilterService,H0.EVENT_QUICK_FILTER_CHANGED,function(){return e.onFilterChanged({source:"quickFilter"})})},t.prototype.isExternalFilterPresentCallback=function(){var e=this.gridOptionsService.getCallback("isExternalFilterPresent");return typeof e=="function"?e({}):!1},t.prototype.doesExternalFilterPass=function(e){var r=this.gridOptionsService.get("doesExternalFilterPass");return typeof r=="function"?r(e):!1},t.prototype.setFilterModel=function(e){var r=this;if(this.isAdvancedFilterEnabled()){this.warnAdvancedFilters();return}if(this.dataTypeService.isPendingInference()){this.filterModelUpdateQueue.push(e);return}var o=[],i=this.getFilterModel();if(e){var a=KS(Object.keys(e));this.allColumnFilters.forEach(function(s,l){var u=e[l];o.push(r.setModelOnFilterWrapper(s.filterPromise,u)),a.delete(l)}),a.forEach(function(s){var l=r.columnModel.getPrimaryColumn(s)||r.columnModel.getGridColumn(s);if(!l){console.warn("AG Grid: setFilterModel() - no column found for colId: "+s);return}if(!l.isFilterAllowed()){console.warn("AG Grid: setFilterModel() - unable to fully apply model, filtering disabled for colId: "+s);return}var u=r.getOrCreateFilterWrapper(l,"NO_UI");if(!u){console.warn("AG-Grid: setFilterModel() - unable to fully apply model, unable to create filter for colId: "+s);return}o.push(r.setModelOnFilterWrapper(u.filterPromise,e[s]))})}else this.allColumnFilters.forEach(function(s){o.push(r.setModelOnFilterWrapper(s.filterPromise,null))});yn.all(o).then(function(){var s=r.getFilterModel(),l=[];r.allColumnFilters.forEach(function(u,c){var d=i?i[c]:null,f=s?s[c]:null;Q.jsonEquals(d,f)||l.push(u.column)}),l.length>0&&r.onFilterChanged({columns:l,source:"api"})})},t.prototype.setModelOnFilterWrapper=function(e,r){return new yn(function(o){e.then(function(i){typeof i.setModel!="function"&&(console.warn("AG Grid: filter missing setModel method, which is needed for setFilterModel"),o()),(i.setModel(r)||yn.resolve()).then(function(){return o()})})})},t.prototype.getFilterModel=function(){var e={};return this.allColumnFilters.forEach(function(r,o){var i=r.filterPromise,a=i.resolveNow(null,function(l){return l});if(a==null)return null;if(typeof a.getModel!="function"){console.warn("AG Grid: filter API missing getModel method, which is needed for getFilterModel");return}var s=a.getModel();D(s)&&(e[o]=s)}),e},t.prototype.isColumnFilterPresent=function(){return this.activeColumnFilters.length>0},t.prototype.isAggregateFilterPresent=function(){return!!this.activeAggregateFilters.length},t.prototype.isExternalFilterPresent=function(){return this.externalFilterPresent},t.prototype.isChildFilterPresent=function(){return this.isColumnFilterPresent()||this.isQuickFilterPresent()||this.isExternalFilterPresent()||this.isAdvancedFilterPresent()},t.prototype.isAdvancedFilterPresent=function(){return this.isAdvancedFilterEnabled()&&this.advancedFilterService.isFilterPresent()},t.prototype.onAdvancedFilterEnabledChanged=function(e){var r=this,o;e?this.allColumnFilters.size&&(this.allColumnFilters.forEach(function(i){return r.disposeFilterWrapper(i,"advancedFilterEnabled")}),this.onFilterChanged({source:"advancedFilter"})):!((o=this.advancedFilterService)===null||o===void 0)&&o.isFilterPresent()&&(this.advancedFilterService.setModel(null),this.onFilterChanged({source:"advancedFilter"}))},t.prototype.isAdvancedFilterEnabled=function(){var e;return(e=this.advancedFilterService)===null||e===void 0?void 0:e.isEnabled()},t.prototype.isAdvancedFilterHeaderActive=function(){return this.isAdvancedFilterEnabled()&&this.advancedFilterService.isHeaderActive()},t.prototype.doAggregateFiltersPass=function(e,r){return this.doColumnFiltersPass(e,r,!0)},t.prototype.updateActiveFilters=function(){var e=this;this.activeColumnFilters.length=0,this.activeAggregateFilters.length=0;var r=function(a){return a?a.isFilterActive?a.isFilterActive():(console.warn("AG Grid: Filter is missing isFilterActive() method"),!1):!1},o=!!this.gridOptionsService.getGroupAggFiltering(),i=function(a){var s=!a.isPrimary();if(s)return!0;var l=!e.columnModel.isPivotActive(),u=a.isValueActive();return!u||!l?!1:e.columnModel.isPivotMode()?!0:o};this.allColumnFilters.forEach(function(a){if(a.filterPromise.resolveNow(!1,r)){var s=a.filterPromise.resolveNow(null,function(l){return l});i(a.column)?e.activeAggregateFilters.push(s):e.activeColumnFilters.push(s)}})},t.prototype.updateFilterFlagInColumns=function(e,r){this.allColumnFilters.forEach(function(o){var i=o.filterPromise.resolveNow(!1,function(a){return a.isFilterActive()});o.column.setFilterActive(i,e,r)})},t.prototype.isAnyFilterPresent=function(){return this.isQuickFilterPresent()||this.isColumnFilterPresent()||this.isAggregateFilterPresent()||this.isExternalFilterPresent()},t.prototype.doColumnFiltersPass=function(e,r,o){for(var i=e.data,a=e.aggData,s=o?this.activeAggregateFilters:this.activeColumnFilters,l=o?a:i,u=0;u0?this.onFilterChanged({columns:r,source:"api"}):this.updateDependantFilters()},t.prototype.updateDependantFilters=function(){var e=this,r=this.columnModel.getGroupAutoColumns();r?.forEach(function(o){o.getColDef().filter==="agGroupColumnFilter"&&e.getOrCreateFilterWrapper(o,"NO_UI")})},t.prototype.isFilterAllowed=function(e){var r,o;if(this.isAdvancedFilterEnabled())return!1;var i=e.isFilterAllowed();if(!i)return!1;var a=this.allColumnFilters.get(e.getColId());return(o=(r=a?.filterPromise)===null||r===void 0?void 0:r.resolveNow(!0,function(s){var l,u;return typeof((l=s)===null||l===void 0?void 0:l.isFilterAllowed)=="function"?(u=s)===null||u===void 0?void 0:u.isFilterAllowed():!0}))!==null&&o!==void 0?o:!0},t.prototype.getFloatingFilterCompDetails=function(e,r){var o=this,i=e.getColDef(),a=this.createFilterParams(e,i),s=this.userComponentFactory.mergeParamsWithApplicationProvidedParams(i,yS,a),l=this.userComponentFactory.getDefaultFloatingFilterType(i,function(){return o.getDefaultFloatingFilter(e)});l==null&&(l="agReadOnlyFloatingFilter");var u=function(d){var f=o.getFilterComponent(e,"NO_UI");f?.then(function(p){d(Rs(p))})},c={column:e,filterParams:s,currentParentModel:function(){return o.getCurrentFloatingFilterParentModel(e)},parentFilterInstance:u,showParentFilter:r,suppressFilterButton:!1};return this.userComponentFactory.getFloatingFilterCompDetails(i,c,l)},t.prototype.getCurrentFloatingFilterParentModel=function(e){var r=this.getFilterComponent(e,"NO_UI",!1);return r?r.resolveNow(null,function(o){return o&&o.getModel()}):null},t.prototype.destroyFilter=function(e,r){r===void 0&&(r="api");var o=e.getColId(),i=this.allColumnFilters.get(o);this.disposeColumnListener(o),i&&(this.disposeFilterWrapper(i,r),this.onFilterChanged({columns:[e],source:"api"}))},t.prototype.disposeColumnListener=function(e){var r=this.allColumnListeners.get(e);r&&(this.allColumnListeners.delete(e),r())},t.prototype.disposeFilterWrapper=function(e,r){var o=this;e.filterPromise.then(function(i){(i.setModel(null)||yn.resolve()).then(function(){o.getContext().destroyBean(i),e.column.setFilterActive(!1,"filterDestroyed"),o.allColumnFilters.delete(e.column.getColId());var a={type:_.EVENT_FILTER_DESTROYED,source:r,column:e.column};o.eventService.dispatchEvent(a)})})},t.prototype.checkDestroyFilter=function(e){var r=this.allColumnFilters.get(e);if(r){var o=r.column,i=(o.isFilterAllowed()?this.createFilterInstance(o):{compDetails:null}).compDetails;this.areFilterCompsDifferent(r.compDetails,i)&&this.destroyFilter(o,"columnChanged")}},t.prototype.areFilterCompsDifferent=function(e,r){if(!r||!e)return!0;var o=e.componentClass,i=r.componentClass,a=o===i||o?.render&&i?.render&&o.render===i.render;return!a},t.prototype.getAdvancedFilterModel=function(){return this.isAdvancedFilterEnabled()?this.advancedFilterService.getModel():null},t.prototype.setAdvancedFilterModel=function(e){this.isAdvancedFilterEnabled()&&(this.advancedFilterService.setModel(e??null),this.onFilterChanged({source:"advancedFilter"}))},t.prototype.showAdvancedFilterBuilder=function(e){this.isAdvancedFilterEnabled()&&this.advancedFilterService.getCtrl().toggleFilterBuilder(e,!0)},t.prototype.updateAdvancedFilterColumns=function(){this.isAdvancedFilterEnabled()&&this.advancedFilterService.updateValidity()&&this.onFilterChanged({source:"advancedFilter"})},t.prototype.hasFloatingFilters=function(){if(this.isAdvancedFilterEnabled())return!1;var e=this.columnModel.getAllGridColumns();return e?e.some(function(r){return r.getColDef().floatingFilter}):!1},t.prototype.getFilterInstance=function(e,r){if(this.isAdvancedFilterEnabled()){this.warnAdvancedFilters();return}var o=this.getFilterInstanceImpl(e,function(a){if(r){var s=Rs(a);r(s)}}),i=Rs(o);return i},t.prototype.getFilterInstanceImpl=function(e,r){var o=this.columnModel.getPrimaryColumn(e);if(o){var i=this.getFilterComponent(o,"NO_UI"),a=i&&i.resolveNow(null,function(s){return s});return a?setTimeout(r,0,a):i&&i.then(function(s){r(s)}),a}},t.prototype.warnAdvancedFilters=function(){ge(function(){console.warn("AG Grid: Column Filter API methods have been disabled as Advanced Filters are enabled.")},"advancedFiltersCompatibility")},t.prototype.setupAdvancedFilterHeaderComp=function(e){var r;(r=this.advancedFilterService)===null||r===void 0||r.getCtrl().setupHeaderComp(e)},t.prototype.getHeaderRowCount=function(){return this.isAdvancedFilterHeaderActive()?1:0},t.prototype.getHeaderHeight=function(){return this.isAdvancedFilterHeaderActive()?this.advancedFilterService.getCtrl().getHeaderHeight():0},t.prototype.processFilterModelUpdateQueue=function(){var e=this;this.filterModelUpdateQueue.forEach(function(r){return e.setFilterModel(r)}),this.filterModelUpdateQueue=[]},t.prototype.destroy=function(){var e=this;n.prototype.destroy.call(this),this.allColumnFilters.forEach(function(r){return e.disposeFilterWrapper(r,"gridDestroyed")}),this.allColumnListeners.clear()},Yo([w("valueService")],t.prototype,"valueService",void 0),Yo([w("columnModel")],t.prototype,"columnModel",void 0),Yo([w("rowModel")],t.prototype,"rowModel",void 0),Yo([w("userComponentFactory")],t.prototype,"userComponentFactory",void 0),Yo([w("rowRenderer")],t.prototype,"rowRenderer",void 0),Yo([w("dataTypeService")],t.prototype,"dataTypeService",void 0),Yo([w("quickFilterService")],t.prototype,"quickFilterService",void 0),Yo([_e("advancedFilterService")],t.prototype,"advancedFilterService",void 0),Yo([M],t.prototype,"init",null),t=Yo([H("filterManager")],t),t}(F),$U=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(r[i]=o[i])},n(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");n(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}}(),i_=function(n){$U(t,n);function t(e,r){var o=n.call(this,e)||this;return o.ctrl=r,o}return t.prototype.getCtrl=function(){return this.ctrl},t}(se),KU=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(r[i]=o[i])},n(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");n(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}}(),Bc=function(n,t,e,r){var o=arguments.length,i=o<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(n,t,e,r);else for(var s=n.length-1;s>=0;s--)(a=n[s])&&(i=(o<3?a(i):o>3?a(t,e,i):a(t,e))||i);return o>3&&i&&Object.defineProperty(t,e,i),i},B0=function(n){KU(t,n);function t(e){return n.call(this,t.TEMPLATE,e)||this}return t.prototype.postConstruct=function(){var e=this,r=this.getGui(),o={addOrRemoveCssClass:function(i,a){return e.addOrRemoveCssClass(i,a)},addOrRemoveBodyCssClass:function(i,a){return e.eFloatingFilterBody.classList.toggle(i,a)},setButtonWrapperDisplayed:function(i){return we(e.eButtonWrapper,i)},setCompDetails:function(i){return e.setCompDetails(i)},getFloatingFilterComp:function(){return e.compPromise},setWidth:function(i){return r.style.width=i},setMenuIcon:function(i){return e.eButtonShowMainFilter.appendChild(i)}};this.ctrl.setComp(o,r,this.eButtonShowMainFilter,this.eFloatingFilterBody)},t.prototype.setCompDetails=function(e){var r=this;if(!e){this.destroyFloatingFilterComp(),this.compPromise=null;return}this.compPromise=e.newAgStackInstance(),this.compPromise.then(function(o){return r.afterCompCreated(o)})},t.prototype.destroyFloatingFilterComp=function(){this.floatingFilterComp&&(this.eFloatingFilterBody.removeChild(this.floatingFilterComp.getGui()),this.floatingFilterComp=this.destroyBean(this.floatingFilterComp))},t.prototype.afterCompCreated=function(e){if(e){if(!this.isAlive()){this.destroyBean(e);return}this.destroyFloatingFilterComp(),this.floatingFilterComp=e,this.eFloatingFilterBody.appendChild(e.getGui()),e.afterGuiAttached&&e.afterGuiAttached()}},t.TEMPLATE=`
`,Bc([G("eFloatingFilterBody")],t.prototype,"eFloatingFilterBody",void 0),Bc([G("eButtonWrapper")],t.prototype,"eButtonWrapper",void 0),Bc([G("eButtonShowMainFilter")],t.prototype,"eButtonShowMainFilter",void 0),Bc([M],t.prototype,"postConstruct",null),Bc([Mt],t.prototype,"destroyFloatingFilterComp",null),t}(i_),YU=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(r[i]=o[i])},n(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");n(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}}(),XU=function(n,t,e,r){var o=arguments.length,i=o<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(n,t,e,r);else for(var s=n.length-1;s>=0;s--)(a=n[s])&&(i=(o<3?a(i):o>3?a(t,e,i):a(t,e))||i);return o>3&&i&&Object.defineProperty(t,e,i),i};(function(n){n.AUTO_HEIGHT="ag-layout-auto-height",n.NORMAL="ag-layout-normal",n.PRINT="ag-layout-print"})(g.LayoutCssClasses||(g.LayoutCssClasses={}));var a_=function(n){YU(t,n);function t(e){var r=n.call(this)||this;return r.view=e,r}return t.prototype.postConstruct=function(){this.addManagedPropertyListener("domLayout",this.updateLayoutClasses.bind(this)),this.updateLayoutClasses()},t.prototype.updateLayoutClasses=function(){var e=this.getDomLayout(),r={autoHeight:e==="autoHeight",normal:e==="normal",print:e==="print"},o=r.autoHeight?g.LayoutCssClasses.AUTO_HEIGHT:r.print?g.LayoutCssClasses.PRINT:g.LayoutCssClasses.NORMAL;this.view.updateLayoutClasses(o,r)},t.prototype.getDomLayout=function(){var e,r=(e=this.gridOptionsService.get("domLayout"))!==null&&e!==void 0?e:"normal",o=["normal","print","autoHeight"];return o.indexOf(r)===-1?(ge(function(){return console.warn("AG Grid: "+r+" is not valid for DOM Layout, valid values are 'normal', 'autoHeight', 'print'.")},"warn about dom layout values"),"normal"):r},XU([M],t.prototype,"postConstruct",null),t}(F),QU=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(r[i]=o[i])},n(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");n(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}}(),Tg=function(){return Tg=Object.assign||function(n){for(var t,e=1,r=arguments.length;e=0;s--)(a=n[s])&&(i=(o<3?a(i):o>3?a(t,e,i):a(t,e))||i);return o>3&&i&&Object.defineProperty(t,e,i),i},gr;(function(n){n[n.Vertical=0]="Vertical",n[n.Horizontal=1]="Horizontal"})(gr||(gr={}));var Dr;(function(n){n[n.Container=0]="Container",n[n.FakeContainer=1]="FakeContainer"})(Dr||(Dr={}));var JU=function(n){QU(t,n);function t(e){var r=n.call(this)||this;return r.lastScrollSource=[null,null],r.scrollLeft=-1,r.nextScrollTop=-1,r.scrollTop=-1,r.eBodyViewport=e,r.resetLastHScrollDebounced=wo(function(){return r.lastScrollSource[gr.Horizontal]=null},500),r.resetLastVScrollDebounced=wo(function(){return r.lastScrollSource[gr.Vertical]=null},500),r}return t.prototype.postConstruct=function(){var e=this;this.enableRtl=this.gridOptionsService.is("enableRtl"),this.addManagedListener(this.eventService,_.EVENT_DISPLAYED_COLUMNS_WIDTH_CHANGED,this.onDisplayedColumnsWidthChanged.bind(this)),this.ctrlsService.whenReady(function(r){e.centerRowContainerCtrl=r.centerRowContainerCtrl,e.onDisplayedColumnsWidthChanged(),e.addScrollListener()})},t.prototype.addScrollListener=function(){var e=this.ctrlsService.getFakeHScrollComp(),r=this.ctrlsService.getFakeVScrollComp();this.addManagedListener(this.centerRowContainerCtrl.getViewportElement(),"scroll",this.onHScroll.bind(this)),e.onScrollCallback(this.onFakeHScroll.bind(this));var o=this.gridOptionsService.is("debounceVerticalScrollbar"),i=o?wo(this.onVScroll.bind(this),100):this.onVScroll.bind(this),a=o?wo(this.onFakeVScroll.bind(this),100):this.onFakeVScroll.bind(this);this.addManagedListener(this.eBodyViewport,"scroll",i),r.onScrollCallback(a)},t.prototype.onDisplayedColumnsWidthChanged=function(){this.enableRtl&&this.horizontallyScrollHeaderCenterAndFloatingCenter()},t.prototype.horizontallyScrollHeaderCenterAndFloatingCenter=function(e){var r=this.centerRowContainerCtrl==null;if(!r){e===void 0&&(e=this.centerRowContainerCtrl.getCenterViewportScrollLeft());var o=this.enableRtl?e:-e,i=this.ctrlsService.getTopCenterRowContainerCtrl(),a=this.ctrlsService.getStickyTopCenterRowContainerCtrl(),s=this.ctrlsService.getBottomCenterRowContainerCtrl(),l=this.ctrlsService.getFakeHScrollComp(),u=this.ctrlsService.getHeaderRowContainerCtrl();u.setHorizontalScroll(-o),s.setContainerTranslateX(o),i.setContainerTranslateX(o),a.setContainerTranslateX(o);var c=this.centerRowContainerCtrl.getViewportElement(),d=this.lastScrollSource[gr.Horizontal]===Dr.Container;e=Math.abs(e),d?l.setScrollPosition(e):yd(c,e,this.enableRtl)}},t.prototype.isControllingScroll=function(e,r){return this.lastScrollSource[r]==null?(this.lastScrollSource[r]=e,!0):this.lastScrollSource[r]===e},t.prototype.onFakeHScroll=function(){this.isControllingScroll(Dr.FakeContainer,gr.Horizontal)&&this.onHScrollCommon(Dr.FakeContainer)},t.prototype.onHScroll=function(){this.isControllingScroll(Dr.Container,gr.Horizontal)&&this.onHScrollCommon(Dr.Container)},t.prototype.onHScrollCommon=function(e){var r=this.centerRowContainerCtrl.getViewportElement(),o=r.scrollLeft;if(!this.shouldBlockScrollUpdate(gr.Horizontal,o,!0)){var i;e===Dr.Container?i=md(r,this.enableRtl):i=this.ctrlsService.getFakeHScrollComp().getScrollPosition(),this.doHorizontalScroll(Math.round(i)),this.resetLastHScrollDebounced()}},t.prototype.onFakeVScroll=function(){this.isControllingScroll(Dr.FakeContainer,gr.Vertical)&&this.onVScrollCommon(Dr.FakeContainer)},t.prototype.onVScroll=function(){this.isControllingScroll(Dr.Container,gr.Vertical)&&this.onVScrollCommon(Dr.Container)},t.prototype.onVScrollCommon=function(e){var r;e===Dr.Container?r=this.eBodyViewport.scrollTop:r=this.ctrlsService.getFakeVScrollComp().getScrollPosition(),!this.shouldBlockScrollUpdate(gr.Vertical,r,!0)&&(this.animationFrameService.setScrollTop(r),this.nextScrollTop=r,e===Dr.Container?this.ctrlsService.getFakeVScrollComp().setScrollPosition(r):this.eBodyViewport.scrollTop=r,this.gridOptionsService.is("suppressAnimationFrame")?this.scrollGridIfNeeded():this.animationFrameService.schedule(),this.resetLastVScrollDebounced())},t.prototype.doHorizontalScroll=function(e){var r=this.ctrlsService.getFakeHScrollComp().getScrollPosition();this.scrollLeft===e&&e===r||(this.scrollLeft=e,this.fireScrollEvent(gr.Horizontal),this.horizontallyScrollHeaderCenterAndFloatingCenter(e),this.centerRowContainerCtrl.onHorizontalViewportChanged(!0))},t.prototype.fireScrollEvent=function(e){var r=this,o={type:_.EVENT_BODY_SCROLL,direction:e===gr.Horizontal?"horizontal":"vertical",left:this.scrollLeft,top:this.scrollTop};this.eventService.dispatchEvent(o),window.clearTimeout(this.scrollTimer),this.scrollTimer=void 0,this.scrollTimer=window.setTimeout(function(){var i=Tg(Tg({},o),{type:_.EVENT_BODY_SCROLL_END});r.eventService.dispatchEvent(i)},100)},t.prototype.shouldBlockScrollUpdate=function(e,r,o){return o===void 0&&(o=!1),o&&!Na()?!1:e===gr.Vertical?this.shouldBlockVerticalScroll(r):this.shouldBlockHorizontalScroll(r)},t.prototype.shouldBlockVerticalScroll=function(e){var r=_d(this.eBodyViewport),o=this.eBodyViewport.scrollHeight;return e<0||e+r>o},t.prototype.shouldBlockHorizontalScroll=function(e){var r=this.centerRowContainerCtrl.getCenterWidth(),o=this.centerRowContainerCtrl.getViewportElement().scrollWidth;if(this.enableRtl&&vd()){if(e>0)return!0}else if(e<0)return!0;return Math.abs(e)+r>o},t.prototype.redrawRowsAfterScroll=function(){this.fireScrollEvent(gr.Vertical)},t.prototype.checkScrollLeft=function(){this.scrollLeft!==this.centerRowContainerCtrl.getCenterViewportScrollLeft()&&this.onHScrollCommon(Dr.Container)},t.prototype.scrollGridIfNeeded=function(){var e=this.scrollTop!=this.nextScrollTop;return e&&(this.scrollTop=this.nextScrollTop,this.redrawRowsAfterScroll()),e},t.prototype.setHorizontalScrollPosition=function(e,r){r===void 0&&(r=!1);var o=0,i=this.centerRowContainerCtrl.getViewportElement().scrollWidth-this.centerRowContainerCtrl.getCenterWidth();!r&&this.shouldBlockScrollUpdate(gr.Horizontal,e)&&(this.enableRtl&&vd()?e=e>0?0:i:e=Math.min(Math.max(e,o),i)),yd(this.centerRowContainerCtrl.getViewportElement(),Math.abs(e),this.enableRtl),this.doHorizontalScroll(e)},t.prototype.setVerticalScrollPosition=function(e){this.eBodyViewport.scrollTop=e},t.prototype.getVScrollPosition=function(){var e={top:this.eBodyViewport.scrollTop,bottom:this.eBodyViewport.scrollTop+this.eBodyViewport.offsetHeight};return e},t.prototype.getHScrollPosition=function(){return this.centerRowContainerCtrl.getHScrollPosition()},t.prototype.isHorizontalScrollShowing=function(){return this.centerRowContainerCtrl.isHorizontalScrollShowing()},t.prototype.scrollHorizontally=function(e){var r=this.centerRowContainerCtrl.getViewportElement().scrollLeft;return this.setHorizontalScrollPosition(r+e),this.centerRowContainerCtrl.getViewportElement().scrollLeft-r},t.prototype.scrollToTop=function(){this.eBodyViewport.scrollTop=0},t.prototype.ensureNodeVisible=function(e,r){r===void 0&&(r=null);for(var o=this.rowModel.getRowCount(),i=-1,a=0;a=0&&this.ensureIndexVisible(i,r)},t.prototype.ensureIndexVisible=function(e,r){if(!this.gridOptionsService.isDomLayout("print")){var o=this.paginationProxy.getRowCount();if(typeof e!="number"||e<0||e>=o){console.warn("AG Grid: Invalid row index for ensureIndexVisible: "+e);return}var i=this.gridOptionsService.is("pagination"),a=i&&!this.gridOptionsService.is("suppressPaginationPanel");a||this.paginationProxy.goToPageWithIndex(e);var s=this.ctrlsService.getGridBodyCtrl(),l=s.getStickyTopHeight(),u=this.paginationProxy.getRow(e),c;do{var d=u.rowTop,f=u.rowHeight,p=this.paginationProxy.getPixelOffset(),h=u.rowTop-p,v=h+u.rowHeight,C=this.getVScrollPosition(),m=this.heightScaler.getDivStretchOffset(),y=C.top+m,S=C.bottom+m,E=S-y,R=this.heightScaler.getScrollPositionForPixel(h),x=this.heightScaler.getScrollPositionForPixel(v-E),P=Math.min((R+x)/2,h),T=y+l>h,L=Sl:is;return{columnBeforeStart:c,columnAfterEnd:d}},t.prototype.getColumnBounds=function(e){var r=this.enableRtl,o=this.columnModel.getBodyContainerWidth(),i=e.getActualWidth(),a=e.getLeft(),s=r?-1:1,l=r?o-a:a,u=l+i*s,c=l+i/2*s;return{colLeft:l,colMiddle:c,colRight:u}},t.prototype.getViewportBounds=function(){var e=this.centerRowContainerCtrl.getCenterWidth(),r=this.centerRowContainerCtrl.getCenterViewportScrollLeft(),o=r,i=e+r;return{start:o,end:i,width:e}},wa([w("ctrlsService")],t.prototype,"ctrlsService",void 0),wa([w("animationFrameService")],t.prototype,"animationFrameService",void 0),wa([w("paginationProxy")],t.prototype,"paginationProxy",void 0),wa([w("rowModel")],t.prototype,"rowModel",void 0),wa([w("rowContainerHeightService")],t.prototype,"heightScaler",void 0),wa([w("rowRenderer")],t.prototype,"rowRenderer",void 0),wa([w("columnModel")],t.prototype,"columnModel",void 0),wa([M],t.prototype,"postConstruct",null),t}(F),ZU=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(r[i]=o[i])},n(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");n(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}}(),CS=function(){return CS=Object.assign||function(n){for(var t,e=1,r=arguments.length;e=0;s--)(a=n[s])&&(i=(o<3?a(i):o>3?a(t,e,i):a(t,e))||i);return o>3&&i&&Object.defineProperty(t,e,i),i},ej=function(n,t){var e=typeof Symbol=="function"&&n[Symbol.iterator];if(!e)return n;var r=e.call(n),o,i=[],a;try{for(;(t===void 0||t-- >0)&&!(o=r.next()).done;)i.push(o.value)}catch(s){a={error:s}}finally{try{o&&!o.done&&(e=r.return)&&e.call(r)}finally{if(a)throw a.error}}return i},tj=function(n,t){for(var e=0,r=t.length,o=n.length;ethis.paginationProxy.getCurrentPageHeight(),a=-1,s;i||(a=this.rowModel.getRowIndexAtPixel(o),s=this.rowModel.getRow(a));var l;switch(r.vDirection){case g.VerticalDirection.Down:l="down";break;case g.VerticalDirection.Up:l="up";break;default:l=null;break}var u={type:e,api:this.gridOptionsService.api,columnApi:this.gridOptionsService.columnApi,context:this.gridOptionsService.context,event:r.event,node:r.dragItem.rowNode,nodes:r.dragItem.rowNodes,overIndex:a,overNode:s,y:o,vDirection:l};return u},t.prototype.dispatchGridEvent=function(e,r){var o=this.draggingToRowDragEvent(e,r);this.eventService.dispatchEvent(o)},t.prototype.onDragLeave=function(e){this.dispatchGridEvent(_.EVENT_ROW_DRAG_LEAVE,e),this.stopDragging(e),this.gridOptionsService.is("rowDragManaged")&&this.clearRowHighlight(),this.isFromThisGrid(e)&&(this.isMultiRowDrag=!1)},t.prototype.onDragStop=function(e){this.dispatchGridEvent(_.EVENT_ROW_DRAG_END,e),this.stopDragging(e),this.gridOptionsService.is("rowDragManaged")&&(this.gridOptionsService.is("suppressMoveWhenRowDragging")||!this.isFromThisGrid(e))&&!this.isDropZoneWithinThisGrid(e)&&this.moveRowAndClearHighlight(e)},t.prototype.stopDragging=function(e){this.autoScrollService.ensureCleared(),this.getRowNodes(e).forEach(function(r){r.setDragging(!1)})},$n([w("dragAndDropService")],t.prototype,"dragAndDropService",void 0),$n([w("rowModel")],t.prototype,"rowModel",void 0),$n([w("paginationProxy")],t.prototype,"paginationProxy",void 0),$n([w("columnModel")],t.prototype,"columnModel",void 0),$n([w("focusService")],t.prototype,"focusService",void 0),$n([w("sortController")],t.prototype,"sortController",void 0),$n([w("filterManager")],t.prototype,"filterManager",void 0),$n([w("selectionService")],t.prototype,"selectionService",void 0),$n([w("mouseEventService")],t.prototype,"mouseEventService",void 0),$n([w("ctrlsService")],t.prototype,"ctrlsService",void 0),$n([_e("rangeService")],t.prototype,"rangeService",void 0),$n([M],t.prototype,"postConstruct",null),t}(F),nj=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(r[i]=o[i])},n(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");n(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}}(),$r=function(n,t,e,r){var o=arguments.length,i=o<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(n,t,e,r);else for(var s=n.length-1;s>=0;s--)(a=n[s])&&(i=(o<3?a(i):o>3?a(t,e,i):a(t,e))||i);return o>3&&i&&Object.defineProperty(t,e,i),i};(function(n){n.ANIMATION_ON="ag-row-animation",n.ANIMATION_OFF="ag-row-no-animation"})(g.RowAnimationCssClasses||(g.RowAnimationCssClasses={}));var W0="ag-force-vertical-scroll",oj="ag-selectable",ij="ag-column-moving",U0=function(n){nj(t,n);function t(){var e=n!==null&&n.apply(this,arguments)||this;return e.stickyTopHeight=0,e}return t.prototype.getScrollFeature=function(){return this.bodyScrollFeature},t.prototype.getBodyViewportElement=function(){return this.eBodyViewport},t.prototype.setComp=function(e,r,o,i,a,s){this.comp=e,this.eGridBody=r,this.eBodyViewport=o,this.eTop=i,this.eBottom=a,this.eStickyTop=s,this.setCellTextSelection(this.gridOptionsService.is("enableCellTextSelection")),this.createManagedBean(new a_(this.comp)),this.bodyScrollFeature=this.createManagedBean(new JU(this.eBodyViewport)),this.addRowDragListener(),this.setupRowAnimationCssClass(),this.addEventListeners(),this.addFocusListeners([i,o,a,s]),this.onGridColumnsChanged(),this.addBodyViewportListener(),this.setFloatingHeights(),this.disableBrowserDragging(),this.addStopEditingWhenGridLosesFocus(),this.filterManager.setupAdvancedFilterHeaderComp(i),this.ctrlsService.registerGridBodyCtrl(this)},t.prototype.getComp=function(){return this.comp},t.prototype.addEventListeners=function(){this.addManagedListener(this.eventService,_.EVENT_GRID_COLUMNS_CHANGED,this.onGridColumnsChanged.bind(this)),this.addManagedListener(this.eventService,_.EVENT_SCROLL_VISIBILITY_CHANGED,this.onScrollVisibilityChanged.bind(this)),this.addManagedListener(this.eventService,_.EVENT_PINNED_ROW_DATA_CHANGED,this.onPinnedRowDataChanged.bind(this)),this.addManagedListener(this.eventService,_.EVENT_HEADER_HEIGHT_CHANGED,this.onHeaderHeightChanged.bind(this))},t.prototype.addFocusListeners=function(e){var r=this;e.forEach(function(o){r.addManagedListener(o,"focusin",function(i){var a=i.target,s=xs(a,"ag-root",o);o.classList.toggle("ag-has-focus",!s)}),r.addManagedListener(o,"focusout",function(i){var a=i.target,s=i.relatedTarget,l=o.contains(s),u=xs(s,"ag-root",o),c=xs(a,"ag-root",o);c||(!l||u)&&o.classList.remove("ag-has-focus")})})},t.prototype.setColumnMovingCss=function(e){this.comp.setColumnMovingCss(ij,e)},t.prototype.setCellTextSelection=function(e){e===void 0&&(e=!1),this.comp.setCellSelectableCss(oj,e)},t.prototype.onScrollVisibilityChanged=function(){var e=this,r=this.scrollVisibleService.isVerticalScrollShowing();this.setVerticalScrollPaddingVisible(r),this.setStickyTopWidth(r);var o=r&&this.gridOptionsService.getScrollbarWidth()||0,i=hd()?16:0,a="calc(100% + "+(o+i)+"px)";this.animationFrameService.requestAnimationFrame(function(){return e.comp.setBodyViewportWidth(a)})},t.prototype.onGridColumnsChanged=function(){var e=this.columnModel.getAllGridColumns();this.comp.setColumnCount(e?e.length:0)},t.prototype.disableBrowserDragging=function(){this.addManagedListener(this.eGridBody,"dragstart",function(e){if(e.target instanceof HTMLImageElement)return e.preventDefault(),!1})},t.prototype.addStopEditingWhenGridLosesFocus=function(){var e=this;if(this.gridOptionsService.is("stopEditingWhenCellsLoseFocus")){var r=function(i){var a=i.relatedTarget;if(yg(a)===null){e.rowRenderer.stopEditing();return}var s=o.some(function(u){return u.contains(a)})&&e.mouseEventService.isElementInThisGrid(a);if(!s){var l=e.popupService;s=l.getActivePopups().some(function(u){return u.contains(a)})||l.isElementWithinCustomPopup(a)}s||e.rowRenderer.stopEditing()},o=[this.eBodyViewport,this.eBottom,this.eTop,this.eStickyTop];o.forEach(function(i){return e.addManagedListener(i,"focusout",r)})}},t.prototype.updateRowCount=function(){var e=this.headerNavigationService.getHeaderRowCount()+this.filterManager.getHeaderRowCount(),r=this.rowModel.isLastRowIndexKnown()?this.rowModel.getRowCount():-1,o=r===-1?-1:e+r;this.comp.setRowCount(o)},t.prototype.registerBodyViewportResizeListener=function(e){this.comp.registerBodyViewportResizeListener(e)},t.prototype.setVerticalScrollPaddingVisible=function(e){var r=e?"scroll":"hidden";this.comp.setPinnedTopBottomOverflowY(r)},t.prototype.isVerticalScrollShowing=function(){var e=this.gridOptionsService.is("alwaysShowVerticalScroll"),r=e?W0:null,o=this.gridOptionsService.isDomLayout("normal");return this.comp.setAlwaysVerticalScrollClass(r,e),e||o&&JD(this.eBodyViewport)},t.prototype.setupRowAnimationCssClass=function(){var e=this,r=function(){var o=e.gridOptionsService.isAnimateRows()&&!e.rowContainerHeightService.isStretching(),i=o?g.RowAnimationCssClasses.ANIMATION_ON:g.RowAnimationCssClasses.ANIMATION_OFF;e.comp.setRowAnimationCssOnBodyViewport(i,o)};r(),this.addManagedListener(this.eventService,_.EVENT_HEIGHT_SCALE_CHANGED,r),this.addManagedPropertyListener("animateRows",r)},t.prototype.getGridBodyElement=function(){return this.eGridBody},t.prototype.addBodyViewportListener=function(){var e=this.onBodyViewportContextMenu.bind(this);this.addManagedListener(this.eBodyViewport,"contextmenu",e),this.mockContextMenuForIPad(e),this.addManagedListener(this.eBodyViewport,"wheel",this.onBodyViewportWheel.bind(this)),this.addManagedListener(this.eStickyTop,"wheel",this.onStickyTopWheel.bind(this)),this.addFullWidthContainerWheelListener()},t.prototype.addFullWidthContainerWheelListener=function(){var e=this,r=this.eBodyViewport.querySelector(".ag-full-width-container"),o=this.eBodyViewport.querySelector(".ag-center-cols-viewport");r&&o&&this.addManagedListener(r,"wheel",function(i){return e.onFullWidthContainerWheel(i,o)})},t.prototype.onFullWidthContainerWheel=function(e,r){!e.deltaX||Math.abs(e.deltaY)>Math.abs(e.deltaX)||!this.mouseEventService.isEventFromThisGrid(e)||(e.preventDefault(),r.scrollBy({left:e.deltaX}))},t.prototype.onBodyViewportContextMenu=function(e,r,o){if(!(!e&&!o)){if(this.gridOptionsService.is("preventDefaultOnContextMenu")){var i=e||o;i.preventDefault()}var a=(e||r).target;if(a===this.eBodyViewport||a===this.ctrlsService.getCenterRowContainerCtrl().getViewportElement()){if(!this.contextMenuFactory)return;e?this.contextMenuFactory.onContextMenu(e,null,null,null,null,this.eGridBody):o&&this.contextMenuFactory.onContextMenu(null,o,null,null,null,this.eGridBody)}}},t.prototype.mockContextMenuForIPad=function(e){if(Na()){var r=new Zr(this.eBodyViewport),o=function(i){e(void 0,i.touchStart,i.touchEvent)};this.addManagedListener(r,Zr.EVENT_LONG_TAP,o),this.addDestroyFunc(function(){return r.destroy()})}},t.prototype.onBodyViewportWheel=function(e){this.gridOptionsService.is("suppressScrollWhenPopupsAreOpen")&&this.popupService.hasAnchoredPopup()&&e.preventDefault()},t.prototype.onStickyTopWheel=function(e){e.preventDefault(),e.offsetY&&this.scrollVertically(e.deltaY)},t.prototype.getGui=function(){return this.eGridBody},t.prototype.scrollVertically=function(e){var r=this.eBodyViewport.scrollTop;return this.bodyScrollFeature.setVerticalScrollPosition(r+e),this.eBodyViewport.scrollTop-r},t.prototype.addRowDragListener=function(){this.rowDragFeature=this.createManagedBean(new rj(this.eBodyViewport)),this.dragAndDropService.addDropTarget(this.rowDragFeature)},t.prototype.getRowDragFeature=function(){return this.rowDragFeature},t.prototype.onPinnedRowDataChanged=function(){this.setFloatingHeights()},t.prototype.setFloatingHeights=function(){var e=this.pinnedRowModel,r=e.getPinnedTopTotalHeight();r&&(r+=1);var o=e.getPinnedBottomTotalHeight();o&&(o+=1),this.comp.setTopHeight(r),this.comp.setBottomHeight(o),this.comp.setTopDisplay(r?"inherit":"none"),this.comp.setBottomDisplay(o?"inherit":"none"),this.setStickyTopOffsetTop()},t.prototype.setStickyTopHeight=function(e){e===void 0&&(e=0),this.comp.setStickyTopHeight(e+"px"),this.stickyTopHeight=e},t.prototype.getStickyTopHeight=function(){return this.stickyTopHeight},t.prototype.setStickyTopWidth=function(e){if(!e)this.comp.setStickyTopWidth("100%");else{var r=this.gridOptionsService.getScrollbarWidth();this.comp.setStickyTopWidth("calc(100% - "+r+"px)")}},t.prototype.onHeaderHeightChanged=function(){this.setStickyTopOffsetTop()},t.prototype.setStickyTopOffsetTop=function(){var e=this.ctrlsService.getGridHeaderCtrl(),r=e.getHeaderHeight()+this.filterManager.getHeaderHeight(),o=this.pinnedRowModel.getPinnedTopTotalHeight(),i=0;r>0&&(i+=r+1),o>0&&(i+=o+1),this.comp.setStickyTopTop(i+"px")},t.prototype.sizeColumnsToFit=function(e,r){var o=this,i=this.isVerticalScrollShowing(),a=i?this.gridOptionsService.getScrollbarWidth():0,s=Wg(this.eGridBody),l=s-a;if(l>0){this.columnModel.sizeColumnsToFit(l,"sizeColumnsToFit",!1,e);return}r===void 0?window.setTimeout(function(){o.sizeColumnsToFit(e,100)},0):r===100?window.setTimeout(function(){o.sizeColumnsToFit(e,500)},100):r===500?window.setTimeout(function(){o.sizeColumnsToFit(e,-1)},500):console.warn("AG Grid: tried to call sizeColumnsToFit() but the grid is coming back with zero width, maybe the grid is not visible yet on the screen?")},t.prototype.addScrollEventListener=function(e){this.eBodyViewport.addEventListener("scroll",e,{passive:!0})},t.prototype.removeScrollEventListener=function(e){this.eBodyViewport.removeEventListener("scroll",e)},$r([w("animationFrameService")],t.prototype,"animationFrameService",void 0),$r([w("rowContainerHeightService")],t.prototype,"rowContainerHeightService",void 0),$r([w("ctrlsService")],t.prototype,"ctrlsService",void 0),$r([w("columnModel")],t.prototype,"columnModel",void 0),$r([w("scrollVisibleService")],t.prototype,"scrollVisibleService",void 0),$r([_e("contextMenuFactory")],t.prototype,"contextMenuFactory",void 0),$r([w("headerNavigationService")],t.prototype,"headerNavigationService",void 0),$r([w("dragAndDropService")],t.prototype,"dragAndDropService",void 0),$r([w("pinnedRowModel")],t.prototype,"pinnedRowModel",void 0),$r([w("rowRenderer")],t.prototype,"rowRenderer",void 0),$r([w("popupService")],t.prototype,"popupService",void 0),$r([w("mouseEventService")],t.prototype,"mouseEventService",void 0),$r([w("rowModel")],t.prototype,"rowModel",void 0),$r([w("filterManager")],t.prototype,"filterManager",void 0),t}(F);(function(n){n[n.FILL=0]="FILL",n[n.RANGE=1]="RANGE"})(g.SelectionHandleType||(g.SelectionHandleType={}));(function(n){n[n.VALUE=0]="VALUE",n[n.DIMENSION=1]="DIMENSION"})(g.CellRangeType||(g.CellRangeType={}));var Wc="ag-cell-range-selected",aj="ag-cell-range-chart",sj="ag-cell-range-single-cell",lj="ag-cell-range-chart-category",uj="ag-cell-range-handle",cj="ag-cell-range-top",dj="ag-cell-range-right",fj="ag-cell-range-bottom",pj="ag-cell-range-left",hj=function(){function n(t,e){this.beans=t,this.cellCtrl=e}return n.prototype.setComp=function(t,e){this.cellComp=t,this.eGui=e,this.onRangeSelectionChanged()},n.prototype.onRangeSelectionChanged=function(){this.cellComp&&(this.rangeCount=this.beans.rangeService.getCellRangeCount(this.cellCtrl.getCellPosition()),this.hasChartRange=this.getHasChartRange(),this.cellComp.addOrRemoveCssClass(Wc,this.rangeCount!==0),this.cellComp.addOrRemoveCssClass(Wc+"-1",this.rangeCount===1),this.cellComp.addOrRemoveCssClass(Wc+"-2",this.rangeCount===2),this.cellComp.addOrRemoveCssClass(Wc+"-3",this.rangeCount===3),this.cellComp.addOrRemoveCssClass(Wc+"-4",this.rangeCount>=4),this.cellComp.addOrRemoveCssClass(aj,this.hasChartRange),Ds(this.eGui,this.rangeCount>0?!0:void 0),this.cellComp.addOrRemoveCssClass(sj,this.isSingleCell()),this.updateRangeBorders(),this.refreshHandle())},n.prototype.updateRangeBorders=function(){var t=this.getRangeBorders(),e=this.isSingleCell(),r=!e&&t.top,o=!e&&t.right,i=!e&&t.bottom,a=!e&&t.left;this.cellComp.addOrRemoveCssClass(cj,r),this.cellComp.addOrRemoveCssClass(dj,o),this.cellComp.addOrRemoveCssClass(fj,i),this.cellComp.addOrRemoveCssClass(pj,a)},n.prototype.isSingleCell=function(){var t=this.beans.rangeService;return this.rangeCount===1&&t&&!t.isMoreThanOneCell()},n.prototype.getHasChartRange=function(){var t=this.beans.rangeService;if(!this.rangeCount||!t)return!1;var e=t.getCellRanges();return e.length>0&&e.every(function(r){return Jn([g.CellRangeType.DIMENSION,g.CellRangeType.VALUE],r.type)})},n.prototype.updateRangeBordersIfRangeCount=function(){this.rangeCount>0&&(this.updateRangeBorders(),this.refreshHandle())},n.prototype.getRangeBorders=function(){var t=this,e=this.beans.gridOptionsService.is("enableRtl"),r=!1,o=!1,i=!1,a=!1,s=this.cellCtrl.getCellPosition().column,l=this.beans,u=l.rangeService,c=l.columnModel,d,f;e?(d=c.getDisplayedColAfter(s),f=c.getDisplayedColBefore(s)):(d=c.getDisplayedColBefore(s),f=c.getDisplayedColAfter(s));var p=u.getCellRanges().filter(function(y){return u.isCellInSpecificRange(t.cellCtrl.getCellPosition(),y)});d||(a=!0),f||(o=!0);for(var h=0;h=0;s--)(a=n[s])&&(i=(o<3?a(i):o>3?a(t,e,i):a(t,e))||i);return o>3&&i&&Object.defineProperty(t,e,i),i},s_=function(){function n(){}return n.prototype.postConstruct=function(){this.doingMasterDetail=this.gridOptionsService.is("masterDetail"),this.gridOptionsService.isRowModelType("clientSide")&&(this.clientSideRowModel=this.rowModel),this.gridOptionsService.isRowModelType("serverSide")&&(this.serverSideRowModel=this.rowModel)},ae([w("resizeObserverService")],n.prototype,"resizeObserverService",void 0),ae([w("paginationProxy")],n.prototype,"paginationProxy",void 0),ae([w("context")],n.prototype,"context",void 0),ae([w("columnApi")],n.prototype,"columnApi",void 0),ae([w("gridApi")],n.prototype,"gridApi",void 0),ae([w("gridOptionsService")],n.prototype,"gridOptionsService",void 0),ae([w("expressionService")],n.prototype,"expressionService",void 0),ae([w("environment")],n.prototype,"environment",void 0),ae([w("rowRenderer")],n.prototype,"rowRenderer",void 0),ae([w("templateService")],n.prototype,"templateService",void 0),ae([w("valueService")],n.prototype,"valueService",void 0),ae([w("eventService")],n.prototype,"eventService",void 0),ae([w("columnModel")],n.prototype,"columnModel",void 0),ae([w("headerNavigationService")],n.prototype,"headerNavigationService",void 0),ae([w("navigationService")],n.prototype,"navigationService",void 0),ae([w("columnAnimationService")],n.prototype,"columnAnimationService",void 0),ae([_e("rangeService")],n.prototype,"rangeService",void 0),ae([w("focusService")],n.prototype,"focusService",void 0),ae([_e("contextMenuFactory")],n.prototype,"contextMenuFactory",void 0),ae([w("popupService")],n.prototype,"popupService",void 0),ae([w("valueFormatterService")],n.prototype,"valueFormatterService",void 0),ae([w("stylingService")],n.prototype,"stylingService",void 0),ae([w("columnHoverService")],n.prototype,"columnHoverService",void 0),ae([w("userComponentFactory")],n.prototype,"userComponentFactory",void 0),ae([w("userComponentRegistry")],n.prototype,"userComponentRegistry",void 0),ae([w("animationFrameService")],n.prototype,"animationFrameService",void 0),ae([w("dragService")],n.prototype,"dragService",void 0),ae([w("dragAndDropService")],n.prototype,"dragAndDropService",void 0),ae([w("sortController")],n.prototype,"sortController",void 0),ae([w("filterManager")],n.prototype,"filterManager",void 0),ae([w("rowContainerHeightService")],n.prototype,"rowContainerHeightService",void 0),ae([w("frameworkOverrides")],n.prototype,"frameworkOverrides",void 0),ae([w("cellPositionUtils")],n.prototype,"cellPositionUtils",void 0),ae([w("rowPositionUtils")],n.prototype,"rowPositionUtils",void 0),ae([w("selectionService")],n.prototype,"selectionService",void 0),ae([_e("selectionHandleFactory")],n.prototype,"selectionHandleFactory",void 0),ae([w("rowCssClassCalculator")],n.prototype,"rowCssClassCalculator",void 0),ae([w("rowModel")],n.prototype,"rowModel",void 0),ae([w("ctrlsService")],n.prototype,"ctrlsService",void 0),ae([w("ctrlsFactory")],n.prototype,"ctrlsFactory",void 0),ae([w("agStackComponentsRegistry")],n.prototype,"agStackComponentsRegistry",void 0),ae([w("valueCache")],n.prototype,"valueCache",void 0),ae([w("rowNodeEventThrottle")],n.prototype,"rowNodeEventThrottle",void 0),ae([w("localeService")],n.prototype,"localeService",void 0),ae([w("valueParserService")],n.prototype,"valueParserService",void 0),ae([M],n.prototype,"postConstruct",null),n=ae([H("beans")],n),n}(),wj=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(r[i]=o[i])},n(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");n(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}}(),Sj=function(n){wj(t,n);function t(e,r,o){var i=n.call(this)||this;return i.cellCtrl=e,i.beans=r,i.column=o,i}return t.prototype.onMouseEvent=function(e,r){if(!_o(r))switch(e){case"click":this.onCellClicked(r);break;case"mousedown":case"touchstart":this.onMouseDown(r);break;case"dblclick":this.onCellDoubleClicked(r);break;case"mouseout":this.onMouseOut(r);break;case"mouseover":this.onMouseOver(r);break}},t.prototype.onCellClicked=function(e){if(this.isDoubleClickOnIPad()){this.onCellDoubleClicked(e),e.preventDefault();return}var r=this.beans,o=r.eventService,i=r.rangeService,a=r.gridOptionsService,s=e.ctrlKey||e.metaKey;i&&s&&i.getCellRangeCount(this.cellCtrl.getCellPosition())>1&&i.intersectLastRange(!0);var l=this.cellCtrl.createEvent(e,_.EVENT_CELL_CLICKED);o.dispatchEvent(l);var u=this.column.getColDef();u.onCellClicked&&window.setTimeout(function(){return u.onCellClicked(l)},0);var c=(a.is("singleClickEdit")||u.singleClickEdit)&&!a.is("suppressClickEdit");c&&!(e.shiftKey&&i?.getCellRanges().length!=0)&&this.cellCtrl.startRowOrCellEdit()},t.prototype.isDoubleClickOnIPad=function(){if(!Na()||TS("dblclick"))return!1;var e=new Date().getTime(),r=e-this.lastIPadMouseClickEvent<200;return this.lastIPadMouseClickEvent=e,r},t.prototype.onCellDoubleClicked=function(e){var r=this.column.getColDef(),o=this.cellCtrl.createEvent(e,_.EVENT_CELL_DOUBLE_CLICKED);this.beans.eventService.dispatchEvent(o),typeof r.onCellDoubleClicked=="function"&&window.setTimeout(function(){return r.onCellDoubleClicked(o)},0);var i=!this.beans.gridOptionsService.is("singleClickEdit")&&!this.beans.gridOptionsService.is("suppressClickEdit");i&&this.cellCtrl.startRowOrCellEdit(null,e)},t.prototype.onMouseDown=function(e){var r=e.ctrlKey,o=e.metaKey,i=e.shiftKey,a=e.target,s=this,l=s.cellCtrl,u=s.beans,c=u.eventService,d=u.rangeService,f=u.focusService;if(!this.isRightClickInExistingRange(e)){var p=d&&d.getCellRanges().length!=0;if(!i||!p){var h=to()&&!l.isEditing()&&!HS(a);l.focusCell(h)}if(i&&p&&!f.isCellFocused(l.getCellPosition())){e.preventDefault();var v=f.getFocusedCell();if(v){var C=v.column,m=v.rowIndex,y=v.rowPinned,S=u.rowRenderer.getRowByPosition({rowIndex:m,rowPinned:y}),E=S?.getCellCtrl(C);E?.isEditing()&&E.stopEditing(),f.setFocusedCell({column:C,rowIndex:m,rowPinned:y,forceBrowserFocus:!0,preventScrollOnBrowserFocus:!0})}}if(!this.containsWidget(a)){if(d){var R=this.cellCtrl.getCellPosition();if(i)d.extendLatestRangeToCell(R);else{var x=r||o;d.setRangeToCell(R,x)}}c.dispatchEvent(this.cellCtrl.createEvent(e,_.EVENT_CELL_MOUSE_DOWN))}}},t.prototype.isRightClickInExistingRange=function(e){var r=this.beans.rangeService;if(r){var o=r.isCellInAnyRange(this.cellCtrl.getCellPosition()),i=e.button===2||e.ctrlKey&&this.beans.gridOptionsService.is("allowContextMenuWithControlKey");if(o&&i)return!0}return!1},t.prototype.containsWidget=function(e){return xs(e,"ag-selection-checkbox",3)},t.prototype.onMouseOut=function(e){if(!this.mouseStayingInsideCell(e)){var r=this.cellCtrl.createEvent(e,_.EVENT_CELL_MOUSE_OUT);this.beans.eventService.dispatchEvent(r),this.beans.columnHoverService.clearMouseOver()}},t.prototype.onMouseOver=function(e){if(!this.mouseStayingInsideCell(e)){var r=this.cellCtrl.createEvent(e,_.EVENT_CELL_MOUSE_OVER);this.beans.eventService.dispatchEvent(r),this.beans.columnHoverService.setMouseOver([this.column])}},t.prototype.mouseStayingInsideCell=function(e){if(!e.target||!e.relatedTarget)return!1;var r=this.cellCtrl.getGui(),o=r.contains(e.target),i=r.contains(e.relatedTarget);return o&&i},t.prototype.destroy=function(){},t}(s_),_j=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(r[i]=o[i])},n(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");n(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}}(),Ej=function(n){_j(t,n);function t(e,r,o,i,a){var s=n.call(this)||this;return s.cellCtrl=e,s.beans=r,s.rowNode=i,s.rowCtrl=a,s}return t.prototype.setComp=function(e){this.eGui=e},t.prototype.onKeyDown=function(e){var r=e.key;switch(r){case O.ENTER:this.onEnterKeyDown(e);break;case O.F2:this.onF2KeyDown(e);break;case O.ESCAPE:this.onEscapeKeyDown(e);break;case O.TAB:this.onTabKeyDown(e);break;case O.BACKSPACE:case O.DELETE:this.onBackspaceOrDeleteKeyDown(r,e);break;case O.DOWN:case O.UP:case O.RIGHT:case O.LEFT:this.onNavigationKeyDown(e,r);break}},t.prototype.onNavigationKeyDown=function(e,r){this.cellCtrl.isEditing()||(e.shiftKey&&this.cellCtrl.isRangeSelectionEnabled()?this.onShiftRangeSelect(e):this.beans.navigationService.navigateToNextCell(e,r,this.cellCtrl.getCellPosition(),!0),e.preventDefault())},t.prototype.onShiftRangeSelect=function(e){if(this.beans.rangeService){var r=this.beans.rangeService.extendLatestRangeInDirection(e);r&&this.beans.navigationService.ensureCellVisible(r)}},t.prototype.onTabKeyDown=function(e){this.beans.navigationService.onTabKeyDown(this.cellCtrl,e)},t.prototype.onBackspaceOrDeleteKeyDown=function(e,r){var o=this,i=o.cellCtrl,a=o.beans,s=o.rowNode,l=a.gridOptionsService,u=a.rangeService,c=a.eventService;i.isEditing()||(c.dispatchEvent({type:_.EVENT_KEY_SHORTCUT_CHANGED_CELL_START}),o0(e,l.is("enableCellEditingOnBackspace"))?u&&l.is("enableRangeSelection")?u.clearCellRangeCellValues({dispatchWrapperEvents:!0,wrapperEventSource:"deleteKey"}):i.isCellEditable()&&s.setDataValue(i.getColumn(),null,"cellClear"):i.startRowOrCellEdit(e,r),c.dispatchEvent({type:_.EVENT_KEY_SHORTCUT_CHANGED_CELL_END}))},t.prototype.onEnterKeyDown=function(e){if(this.cellCtrl.isEditing()||this.rowCtrl.isEditing())this.cellCtrl.stopEditingAndFocus(!1,e.shiftKey);else if(this.beans.gridOptionsService.is("enterNavigatesVertically")){var r=e.shiftKey?O.UP:O.DOWN;this.beans.navigationService.navigateToNextCell(null,r,this.cellCtrl.getCellPosition(),!1)}else this.cellCtrl.startRowOrCellEdit(O.ENTER,e),this.cellCtrl.isEditing()&&e.preventDefault()},t.prototype.onF2KeyDown=function(e){this.cellCtrl.isEditing()||this.cellCtrl.startRowOrCellEdit(O.F2,e)},t.prototype.onEscapeKeyDown=function(e){this.cellCtrl.isEditing()&&(this.cellCtrl.stopRowOrCellEdit(!0),this.cellCtrl.focusCell(!0))},t.prototype.processCharacter=function(e){var r=e.target,o=r!==this.eGui;if(!(o||this.cellCtrl.isEditing())){var i=e.key;i===" "?this.onSpaceKeyDown(e):(this.cellCtrl.startRowOrCellEdit(i,e),e.preventDefault())}},t.prototype.onSpaceKeyDown=function(e){var r=this.beans.gridOptionsService;if(!this.cellCtrl.isEditing()&&r.isRowSelection()){var o=this.rowNode.isSelected(),i=!o;if(i||!r.is("suppressRowDeselection")){var a=this.beans.gridOptionsService.is("groupSelectsFiltered"),s=this.rowNode.setSelectedParams({newValue:i,rangeSelect:e.shiftKey,groupSelectsFiltered:a,event:e,source:"spaceKey"});o===void 0&&s===0&&this.rowNode.setSelectedParams({newValue:!1,rangeSelect:e.shiftKey,groupSelectsFiltered:a,event:e,source:"spaceKey"})}}e.preventDefault()},t.prototype.destroy=function(){n.prototype.destroy.call(this)},t}(F),Rj=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(r[i]=o[i])},n(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");n(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}}(),Tj=function(n,t,e,r){var o=arguments.length,i=o<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(n,t,e,r);else for(var s=n.length-1;s>=0;s--)(a=n[s])&&(i=(o<3?a(i):o>3?a(t,e,i):a(t,e))||i);return o>3&&i&&Object.defineProperty(t,e,i),i},xj=function(n){Rj(t,n);function t(e,r,o){var i=n.call(this,'
')||this;return i.rowNode=e,i.column=r,i.eCell=o,i}return t.prototype.postConstruct=function(){var e=this.getGui();e.appendChild(_t("rowDrag",this.gridOptionsService,null)),this.addGuiEventListener("mousedown",function(r){r.stopPropagation()}),this.addDragSource(),this.checkVisibility()},t.prototype.addDragSource=function(){this.addGuiEventListener("dragstart",this.onDragStart.bind(this))},t.prototype.onDragStart=function(e){var r=this,o=this.column.getColDef().dndSourceOnRowDrag;e.dataTransfer.setDragImage(this.eCell,0,0);var i=function(){try{var s=JSON.stringify(r.rowNode.data);e.dataTransfer.setData("application/json",s),e.dataTransfer.setData("text/plain",s)}catch{}};if(o){var a={rowNode:this.rowNode,dragEvent:e,api:this.gridOptionsService.api,columnApi:this.gridOptionsService.columnApi,context:this.gridOptionsService.context};o(a)}else i()},t.prototype.checkVisibility=function(){var e=this.column.isDndSource(this.rowNode);this.setDisplayed(e)},Tj([M],t.prototype,"postConstruct",null),t}(se),Pj=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(r[i]=o[i])},n(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");n(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}}(),xg=function(){return xg=Object.assign||function(n){for(var t,e=1,r=arguments.length;e=n.length&&(n=void 0),{value:n&&n[r++],done:!n}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},xw=function(n,t){var e=typeof Symbol=="function"&&n[Symbol.iterator];if(!e)return n;var r=e.call(n),o,i=[],a;try{for(;(t===void 0||t-- >0)&&!(o=r.next()).done;)i.push(o.value)}catch(s){a={error:s}}finally{try{o&&!o.done&&(e=r.return)&&e.call(r)}finally{if(a)throw a.error}}return i},Pw=function(n,t){for(var e=0,r=t.length,o=n.length;e=0;return f?i:o}return o},t.prototype.getDomOrder=function(){var e=this.gridOptionsService.is("ensureDomOrder");return e||this.gridOptionsService.isDomLayout("print")},t.prototype.listenOnDomOrder=function(e){var r=this,o=function(){e.rowComp.setDomOrder(r.getDomOrder())};this.addManagedPropertyListener("domLayout",o),this.addManagedPropertyListener("ensureDomOrder",o)},t.prototype.setAnimateFlags=function(e){if(!(this.isSticky()||!e)){var r=D(this.rowNode.oldRowTop),o=this.beans.columnModel.isPinningLeft(),i=this.beans.columnModel.isPinningRight();if(r){if(this.isFullWidth()&&!this.gridOptionsService.is("embedFullWidthRows")){this.slideInAnimation.fullWidth=!0;return}this.slideInAnimation.center=!0,this.slideInAnimation.left=o,this.slideInAnimation.right=i}else{if(this.isFullWidth()&&!this.gridOptionsService.is("embedFullWidthRows")){this.fadeInAnimation.fullWidth=!0;return}this.fadeInAnimation.center=!0,this.fadeInAnimation.left=o,this.fadeInAnimation.right=i}}},t.prototype.isEditing=function(){return this.editingRow},t.prototype.stopRowEditing=function(e){this.stopEditing(e)},t.prototype.isFullWidth=function(){return this.rowType!==Xr.Normal},t.prototype.getRowType=function(){return this.rowType},t.prototype.refreshFullWidth=function(){var e=this,r=function(u,c){if(!u)return!0;var d=u.rowComp.getFullWidthCellRenderer();if(!d||!d.refresh)return!1;var f=e.createFullWidthParams(u.element,c),p=d.refresh(f);return p},o=r(this.fullWidthGui,null),i=r(this.centerGui,null),a=r(this.leftGui,"left"),s=r(this.rightGui,"right"),l=o&&i&&a&&s;return l},t.prototype.addListeners=function(){var e=this;this.addManagedListener(this.rowNode,ce.EVENT_HEIGHT_CHANGED,function(){return e.onRowHeightChanged()}),this.addManagedListener(this.rowNode,ce.EVENT_ROW_SELECTED,function(){return e.onRowSelected()}),this.addManagedListener(this.rowNode,ce.EVENT_ROW_INDEX_CHANGED,this.onRowIndexChanged.bind(this)),this.addManagedListener(this.rowNode,ce.EVENT_TOP_CHANGED,this.onTopChanged.bind(this)),this.addManagedListener(this.rowNode,ce.EVENT_EXPANDED_CHANGED,this.updateExpandedCss.bind(this)),this.addManagedListener(this.rowNode,ce.EVENT_HAS_CHILDREN_CHANGED,this.updateExpandedCss.bind(this)),this.rowNode.detail&&this.addManagedListener(this.rowNode.parent,ce.EVENT_DATA_CHANGED,this.onRowNodeDataChanged.bind(this)),this.addManagedListener(this.rowNode,ce.EVENT_DATA_CHANGED,this.onRowNodeDataChanged.bind(this)),this.addManagedListener(this.rowNode,ce.EVENT_CELL_CHANGED,this.onRowNodeCellChanged.bind(this)),this.addManagedListener(this.rowNode,ce.EVENT_HIGHLIGHT_CHANGED,this.onRowNodeHighlightChanged.bind(this)),this.addManagedListener(this.rowNode,ce.EVENT_DRAGGING_CHANGED,this.onRowNodeDraggingChanged.bind(this)),this.addManagedListener(this.rowNode,ce.EVENT_UI_LEVEL_CHANGED,this.onUiLevelChanged.bind(this));var r=this.beans.eventService;this.addManagedListener(r,_.EVENT_PAGINATION_PIXEL_OFFSET_CHANGED,this.onPaginationPixelOffsetChanged.bind(this)),this.addManagedListener(r,_.EVENT_HEIGHT_SCALE_CHANGED,this.onTopChanged.bind(this)),this.addManagedListener(r,_.EVENT_DISPLAYED_COLUMNS_CHANGED,this.onDisplayedColumnsChanged.bind(this)),this.addManagedListener(r,_.EVENT_VIRTUAL_COLUMNS_CHANGED,this.onVirtualColumnsChanged.bind(this)),this.addManagedListener(r,_.EVENT_CELL_FOCUSED,this.onCellFocused.bind(this)),this.addManagedListener(r,_.EVENT_CELL_FOCUS_CLEARED,this.onCellFocusCleared.bind(this)),this.addManagedListener(r,_.EVENT_PAGINATION_CHANGED,this.onPaginationChanged.bind(this)),this.addManagedListener(r,_.EVENT_MODEL_UPDATED,this.onModelUpdated.bind(this)),this.addManagedListener(r,_.EVENT_COLUMN_MOVED,this.onColumnMoved.bind(this)),this.addListenersForCellComps()},t.prototype.onColumnMoved=function(){this.updateColumnLists()},t.prototype.addListenersForCellComps=function(){var e=this;this.addManagedListener(this.rowNode,ce.EVENT_ROW_INDEX_CHANGED,function(){e.getAllCellCtrls().forEach(function(r){return r.onRowIndexChanged()})}),this.addManagedListener(this.rowNode,ce.EVENT_CELL_CHANGED,function(r){e.getAllCellCtrls().forEach(function(o){return o.onCellChanged(r)})})},t.prototype.onRowNodeDataChanged=function(e){var r=this,o=this.isFullWidth()!==!!this.rowNode.isFullWidthCell();if(o){this.beans.rowRenderer.redrawRow(this.rowNode);return}if(this.isFullWidth()){var i=this.refreshFullWidth();i||this.beans.rowRenderer.redrawRow(this.rowNode);return}this.getAllCellCtrls().forEach(function(a){return a.refreshCell({suppressFlash:!e.update,newData:!e.update})}),this.allRowGuis.forEach(function(a){r.setRowCompRowId(a.rowComp),r.updateRowBusinessKey(),r.setRowCompRowBusinessKey(a.rowComp)}),this.onRowSelected(),this.postProcessCss()},t.prototype.onRowNodeCellChanged=function(){this.postProcessCss()},t.prototype.postProcessCss=function(){this.setStylesFromGridOptions(!0),this.postProcessClassesFromGridOptions(),this.postProcessRowClassRules(),this.postProcessRowDragging()},t.prototype.onRowNodeHighlightChanged=function(){var e=this.rowNode.highlighted;this.allRowGuis.forEach(function(r){var o=e===g.RowHighlightPosition.Above,i=e===g.RowHighlightPosition.Below;r.rowComp.addOrRemoveCssClass("ag-row-highlight-above",o),r.rowComp.addOrRemoveCssClass("ag-row-highlight-below",i)})},t.prototype.onRowNodeDraggingChanged=function(){this.postProcessRowDragging()},t.prototype.postProcessRowDragging=function(){var e=this.rowNode.dragging;this.allRowGuis.forEach(function(r){return r.rowComp.addOrRemoveCssClass("ag-row-dragging",e)})},t.prototype.updateExpandedCss=function(){var e=this.rowNode.isExpandable(),r=this.rowNode.expanded==!0;this.allRowGuis.forEach(function(o){o.rowComp.addOrRemoveCssClass("ag-row-group",e),o.rowComp.addOrRemoveCssClass("ag-row-group-expanded",e&&r),o.rowComp.addOrRemoveCssClass("ag-row-group-contracted",e&&!r),So(o.element,e&&r)})},t.prototype.onDisplayedColumnsChanged=function(){this.updateColumnLists(!0),this.beans.columnModel.wasAutoRowHeightEverActive()&&this.rowNode.checkAutoHeights()},t.prototype.onVirtualColumnsChanged=function(){this.updateColumnLists(!1,!0)},t.prototype.getRowPosition=function(){return{rowPinned:ri(this.rowNode.rowPinned),rowIndex:this.rowNode.rowIndex}},t.prototype.onKeyboardNavigate=function(e){var r=this.allRowGuis.find(function(u){return u.element.contains(e.target)}),o=r?r.element:null,i=o===e.target;if(i){var a=this.rowNode,s=this.beans.focusService.getFocusedCell(),l={rowIndex:a.rowIndex,rowPinned:a.rowPinned,column:s&&s.column};this.beans.navigationService.navigateToNextCell(e,e.key,l,!0),e.preventDefault()}},t.prototype.onTabKeyDown=function(e){if(!(e.defaultPrevented||_o(e))){var r=this.allRowGuis.find(function(s){return s.element.contains(e.target)}),o=r?r.element:null,i=o===e.target,a=null;i||(a=this.beans.focusService.findNextFocusableElement(o,!1,e.shiftKey)),(this.isFullWidth()&&i||!a)&&this.beans.navigationService.onTabKeyDown(this,e)}},t.prototype.onFullWidthRowFocused=function(e){var r,o=this.rowNode,i=e?this.isFullWidth()&&e.rowIndex===o.rowIndex&&e.rowPinned==o.rowPinned:!1,a=this.fullWidthGui?this.fullWidthGui.element:(r=this.centerGui)===null||r===void 0?void 0:r.element;a&&(a.classList.toggle("ag-full-width-focus",i),i&&a.focus({preventScroll:!0}))},t.prototype.refreshCell=function(e){this.centerCellCtrls=this.removeCellCtrl(this.centerCellCtrls,e),this.leftCellCtrls=this.removeCellCtrl(this.leftCellCtrls,e),this.rightCellCtrls=this.removeCellCtrl(this.rightCellCtrls,e),this.updateColumnLists()},t.prototype.removeCellCtrl=function(e,r){var o={list:[],map:{}};return e.list.forEach(function(i){i!==r&&(o.list.push(i),o.map[i.getInstanceId()]=i)}),o},t.prototype.onMouseEvent=function(e,r){switch(e){case"dblclick":this.onRowDblClick(r);break;case"click":this.onRowClick(r);break;case"touchstart":case"mousedown":this.onRowMouseDown(r);break}},t.prototype.createRowEvent=function(e,r){return{type:e,node:this.rowNode,data:this.rowNode.data,rowIndex:this.rowNode.rowIndex,rowPinned:this.rowNode.rowPinned,context:this.gridOptionsService.context,api:this.gridOptionsService.api,columnApi:this.gridOptionsService.columnApi,event:r}},t.prototype.createRowEventWithSource=function(e,r){var o=this.createRowEvent(e,r);return o.source=this,o},t.prototype.onRowDblClick=function(e){if(!_o(e)){var r=this.createRowEventWithSource(_.EVENT_ROW_DOUBLE_CLICKED,e);this.beans.eventService.dispatchEvent(r)}},t.prototype.onRowMouseDown=function(e){if(this.lastMouseDownOnDragger=xs(e.target,"ag-row-drag",3),!!this.isFullWidth()){var r=this.rowNode,o=this.beans.columnModel;this.beans.rangeService&&this.beans.rangeService.removeAllCellRanges(),this.beans.focusService.setFocusedCell({rowIndex:r.rowIndex,column:o.getAllDisplayedColumns()[0],rowPinned:r.rowPinned,forceBrowserFocus:!0})}},t.prototype.onRowClick=function(e){var r=_o(e)||this.lastMouseDownOnDragger;if(!r){var o=this.createRowEventWithSource(_.EVENT_ROW_CLICKED,e);this.beans.eventService.dispatchEvent(o);var i=e.ctrlKey||e.metaKey,a=e.shiftKey,s=this.gridOptionsService.is("groupSelectsChildren");if(!(s&&this.rowNode.group||!this.rowNode.selectable||this.rowNode.rowPinned||!this.gridOptionsService.isRowSelection()||this.gridOptionsService.is("suppressRowClickSelection"))){var l=this.gridOptionsService.is("rowMultiSelectWithClick"),u=!this.gridOptionsService.is("suppressRowDeselection"),c="rowClicked";if(this.rowNode.isSelected())l?this.rowNode.setSelectedParams({newValue:!1,event:e,source:c}):i?u&&this.rowNode.setSelectedParams({newValue:!1,event:e,source:c}):this.rowNode.setSelectedParams({newValue:!0,clearSelection:!a,rangeSelect:a,event:e,source:c});else{var d=l?!1:!i;this.rowNode.setSelectedParams({newValue:!0,clearSelection:d,rangeSelect:a,event:e,source:c})}}}},t.prototype.setupDetailRowAutoHeight=function(e){var r=this;if(this.rowType===Xr.FullWidthDetail&&this.gridOptionsService.is("detailRowAutoHeight")){var o=function(){var a=e.clientHeight;if(a!=null&&a>0){var s=function(){r.rowNode.setRowHeight(a),r.beans.clientSideRowModel?r.beans.clientSideRowModel.onRowHeightChanged():r.beans.serverSideRowModel&&r.beans.serverSideRowModel.onRowHeightChanged()};r.beans.frameworkOverrides.setTimeout(s,0)}},i=this.beans.resizeObserverService.observeResize(e,o);this.addDestroyFunc(i),o()}},t.prototype.createFullWidthParams=function(e,r){var o=this,i={fullWidth:!0,data:this.rowNode.data,node:this.rowNode,value:this.rowNode.key,valueFormatted:this.rowNode.key,rowIndex:this.rowNode.rowIndex,api:this.gridOptionsService.api,columnApi:this.gridOptionsService.columnApi,context:this.gridOptionsService.context,eGridCell:e,eParentOfValue:e,pinned:r,addRenderedRowListener:this.addEventListener.bind(this),registerRowDragger:function(a,s,l,u){return o.addFullWidthRowDragging(a,s,l,u)}};return i},t.prototype.addFullWidthRowDragging=function(e,r,o,i){if(o===void 0&&(o=""),!!this.isFullWidth()){var a=new _g(function(){return o},this.rowNode,void 0,e,r,i);this.createManagedBean(a,this.beans.context)}},t.prototype.onUiLevelChanged=function(){var e=this.beans.rowCssClassCalculator.calculateRowLevel(this.rowNode);if(this.rowLevel!=e){var r="ag-row-level-"+e,o="ag-row-level-"+this.rowLevel;this.allRowGuis.forEach(function(i){i.rowComp.addOrRemoveCssClass(r,!0),i.rowComp.addOrRemoveCssClass(o,!1)})}this.rowLevel=e},t.prototype.isFirstRowOnPage=function(){return this.rowNode.rowIndex===this.beans.paginationProxy.getPageFirstRow()},t.prototype.isLastRowOnPage=function(){return this.rowNode.rowIndex===this.beans.paginationProxy.getPageLastRow()},t.prototype.onModelUpdated=function(){this.refreshFirstAndLastRowStyles()},t.prototype.refreshFirstAndLastRowStyles=function(){var e=this.isFirstRowOnPage(),r=this.isLastRowOnPage();this.firstRowOnPage!==e&&(this.firstRowOnPage=e,this.allRowGuis.forEach(function(o){return o.rowComp.addOrRemoveCssClass("ag-row-first",e)})),this.lastRowOnPage!==r&&(this.lastRowOnPage=r,this.allRowGuis.forEach(function(o){return o.rowComp.addOrRemoveCssClass("ag-row-last",r)}))},t.prototype.stopEditing=function(e){var r,o;if(e===void 0&&(e=!1),!this.stoppingRowEdit){var i=this.getAllCellCtrls(),a=this.editingRow;this.stoppingRowEdit=!0;var s=!1;try{for(var l=Hj(i),u=l.next();!u.done;u=l.next()){var c=u.value,d=c.stopEditing(e);a&&!e&&!s&&d&&(s=!0)}}catch(p){r={error:p}}finally{try{u&&!u.done&&(o=l.return)&&o.call(l)}finally{if(r)throw r.error}}if(s){var f=this.createRowEvent(_.EVENT_ROW_VALUE_CHANGED);this.beans.eventService.dispatchEvent(f)}a&&this.setEditingRow(!1),this.stoppingRowEdit=!1}},t.prototype.setInlineEditingCss=function(e){this.allRowGuis.forEach(function(r){r.rowComp.addOrRemoveCssClass("ag-row-inline-editing",e),r.rowComp.addOrRemoveCssClass("ag-row-not-inline-editing",!e)})},t.prototype.setEditingRow=function(e){this.editingRow=e,this.allRowGuis.forEach(function(o){return o.rowComp.addOrRemoveCssClass("ag-row-editing",e)});var r=e?this.createRowEvent(_.EVENT_ROW_EDITING_STARTED):this.createRowEvent(_.EVENT_ROW_EDITING_STOPPED);this.beans.eventService.dispatchEvent(r)},t.prototype.startRowEditing=function(e,r,o){if(e===void 0&&(e=null),r===void 0&&(r=null),o===void 0&&(o=null),!this.editingRow){var i=this.getAllCellCtrls().reduce(function(a,s){var l=s===r;return l?s.startEditing(e,l,o):s.startEditing(null,l,o),a?!0:s.isEditing()},!1);i&&this.setEditingRow(!0)}},t.prototype.getAllCellCtrls=function(){if(this.leftCellCtrls.list.length===0&&this.rightCellCtrls.list.length===0)return this.centerCellCtrls.list;var e=Pw(Pw(Pw([],xw(this.centerCellCtrls.list)),xw(this.leftCellCtrls.list)),xw(this.rightCellCtrls.list));return e},t.prototype.postProcessClassesFromGridOptions=function(){var e=this,r=this.beans.rowCssClassCalculator.processClassesFromGridOptions(this.rowNode);!r||!r.length||r.forEach(function(o){e.allRowGuis.forEach(function(i){return i.rowComp.addOrRemoveCssClass(o,!0)})})},t.prototype.postProcessRowClassRules=function(){var e=this;this.beans.rowCssClassCalculator.processRowClassRules(this.rowNode,function(r){e.allRowGuis.forEach(function(o){return o.rowComp.addOrRemoveCssClass(r,!0)})},function(r){e.allRowGuis.forEach(function(o){return o.rowComp.addOrRemoveCssClass(r,!1)})})},t.prototype.setStylesFromGridOptions=function(e,r){var o=this;e&&(this.rowStyles=this.processStylesFromGridOptions()),this.forEachGui(r,function(i){return i.rowComp.setUserStyles(o.rowStyles)})},t.prototype.getPinnedForContainer=function(e){var r=e===g.RowContainerType.LEFT?"left":e===g.RowContainerType.RIGHT?"right":null;return r},t.prototype.getInitialRowClasses=function(e){var r=this.getPinnedForContainer(e),o={rowNode:this.rowNode,rowFocused:this.rowFocused,fadeRowIn:this.fadeInAnimation[e],rowIsEven:this.rowNode.rowIndex%2===0,rowLevel:this.rowLevel,fullWidthRow:this.isFullWidth(),firstRowOnPage:this.isFirstRowOnPage(),lastRowOnPage:this.isLastRowOnPage(),printLayout:this.printLayout,expandable:this.rowNode.isExpandable(),pinned:r};return this.beans.rowCssClassCalculator.getInitialRowClasses(o)},t.prototype.processStylesFromGridOptions=function(){var e=this.gridOptionsService.get("rowStyle");if(e&&typeof e=="function"){console.warn("AG Grid: rowStyle should be an object of key/value styles, not be a function, use getRowStyle() instead");return}var r=this.gridOptionsService.getCallback("getRowStyle"),o;if(r){var i={data:this.rowNode.data,node:this.rowNode,rowIndex:this.rowNode.rowIndex};o=r(i)}return o||e?Object.assign({},e,o):this.emptyStyle},t.prototype.onRowSelected=function(e){var r=this,o=!!this.rowNode.isSelected();this.forEachGui(e,function(i){i.rowComp.addOrRemoveCssClass("ag-row-selected",o),Ds(i.element,o?!0:void 0);var a=r.createAriaLabel();Ii(i.element,a??"")})},t.prototype.createAriaLabel=function(){var e=this.rowNode.isSelected();if(!(e&&this.gridOptionsService.is("suppressRowDeselection"))){var r=this.beans.localeService.getLocaleTextFunc(),o=r(e?"ariaRowDeselect":"ariaRowSelect","Press SPACE to "+(e?"deselect":"select")+" this row.");return o}},t.prototype.isUseAnimationFrameForCreate=function(){return this.useAnimationFrameForCreate},t.prototype.addHoverFunctionality=function(e){var r=this;this.active&&(this.addManagedListener(e,"mouseenter",function(){return r.rowNode.onMouseEnter()}),this.addManagedListener(e,"mouseleave",function(){return r.rowNode.onMouseLeave()}),this.addManagedListener(this.rowNode,ce.EVENT_MOUSE_ENTER,function(){!r.beans.dragService.isDragging()&&!r.gridOptionsService.is("suppressRowHoverHighlight")&&(e.classList.add("ag-row-hover"),r.rowNode.setHovered(!0))}),this.addManagedListener(this.rowNode,ce.EVENT_MOUSE_LEAVE,function(){e.classList.remove("ag-row-hover"),r.rowNode.setHovered(!1)}))},t.prototype.roundRowTopToBounds=function(e){var r=this.beans.ctrlsService.getGridBodyCtrl(),o=r.getScrollFeature().getVScrollPosition(),i=this.applyPaginationOffset(o.top,!0)-100,a=this.applyPaginationOffset(o.bottom,!0)+100;return Math.min(Math.max(i,e),a)},t.prototype.getFrameworkOverrides=function(){return this.beans.frameworkOverrides},t.prototype.forEachGui=function(e,r){e?r(e):this.allRowGuis.forEach(r)},t.prototype.onRowHeightChanged=function(e){if(this.rowNode.rowHeight!=null){var r=this.rowNode.rowHeight,o=this.beans.environment.getDefaultRowHeight(),i=this.gridOptionsService.isGetRowHeightFunction(),a=i?this.gridOptionsService.getRowHeightForNode(this.rowNode).height:void 0,s=a?Math.min(o,a)-2+"px":void 0;this.forEachGui(e,function(l){l.element.style.height=r+"px",s&&l.element.style.setProperty("--ag-line-height",s)})}},t.prototype.addEventListener=function(e,r){n.prototype.addEventListener.call(this,e,r)},t.prototype.removeEventListener=function(e,r){n.prototype.removeEventListener.call(this,e,r)},t.prototype.destroyFirstPass=function(){this.active=!1,this.gridOptionsService.isAnimateRows()&&this.setupRemoveAnimation(),this.rowNode.setHovered(!1);var e=this.createRowEvent(_.EVENT_VIRTUAL_ROW_REMOVED);this.dispatchEvent(e),this.beans.eventService.dispatchEvent(e),n.prototype.destroy.call(this)},t.prototype.setupRemoveAnimation=function(){if(!this.isSticky()){var e=this.rowNode.rowTop!=null;if(e){var r=this.roundRowTopToBounds(this.rowNode.rowTop);this.setRowTop(r)}else this.allRowGuis.forEach(function(o){return o.rowComp.addOrRemoveCssClass("ag-opacity-zero",!0)})}},t.prototype.destroySecondPass=function(){this.allRowGuis.length=0;var e=function(r){return r.list.forEach(function(o){return o.destroy()}),{list:[],map:{}}};this.centerCellCtrls=e(this.centerCellCtrls),this.leftCellCtrls=e(this.leftCellCtrls),this.rightCellCtrls=e(this.rightCellCtrls)},t.prototype.setFocusedClasses=function(e){var r=this;this.forEachGui(e,function(o){o.rowComp.addOrRemoveCssClass("ag-row-focus",r.rowFocused),o.rowComp.addOrRemoveCssClass("ag-row-no-focus",!r.rowFocused)})},t.prototype.onCellFocused=function(){this.onCellFocusChanged()},t.prototype.onCellFocusCleared=function(){this.onCellFocusChanged()},t.prototype.onCellFocusChanged=function(){var e=this.beans.focusService.isRowFocused(this.rowNode.rowIndex,this.rowNode.rowPinned);e!==this.rowFocused&&(this.rowFocused=e,this.setFocusedClasses()),!e&&this.editingRow&&this.stopEditing(!1)},t.prototype.onPaginationChanged=function(){var e=this.beans.paginationProxy.getCurrentPage();this.paginationPage!==e&&(this.paginationPage=e,this.onTopChanged()),this.refreshFirstAndLastRowStyles()},t.prototype.onTopChanged=function(){this.setRowTop(this.rowNode.rowTop)},t.prototype.onPaginationPixelOffsetChanged=function(){this.onTopChanged()},t.prototype.applyPaginationOffset=function(e,r){if(r===void 0&&(r=!1),this.rowNode.isRowPinned()||this.rowNode.sticky)return e;var o=this.beans.paginationProxy.getPixelOffset(),i=r?1:-1;return e+o*i},t.prototype.setRowTop=function(e){if(!this.printLayout&&D(e)){var r=this.applyPaginationOffset(e),o=this.rowNode.isRowPinned()||this.rowNode.sticky,i=o?r:this.beans.rowContainerHeightService.getRealPixelPosition(r),a=i+"px";this.setRowTopStyle(a)}},t.prototype.getInitialRowTop=function(e){var r=this.gridOptionsService.is("suppressRowTransform");return r?this.getInitialRowTopShared(e):void 0},t.prototype.getInitialTransform=function(e){var r=this.gridOptionsService.is("suppressRowTransform");return r?void 0:"translateY("+this.getInitialRowTopShared(e)+")"},t.prototype.getInitialRowTopShared=function(e){if(this.printLayout)return"";var r;if(this.isSticky())r=this.rowNode.stickyRowTop;else{var o=this.slideInAnimation[e]?this.roundRowTopToBounds(this.rowNode.oldRowTop):this.rowNode.rowTop,i=this.applyPaginationOffset(o);r=this.rowNode.isRowPinned()?i:this.beans.rowContainerHeightService.getRealPixelPosition(i)}return r+"px"},t.prototype.setRowTopStyle=function(e){var r=this.gridOptionsService.is("suppressRowTransform");this.allRowGuis.forEach(function(o){return r?o.rowComp.setTop(e):o.rowComp.setTransform("translateY("+e+")")})},t.prototype.getRowNode=function(){return this.rowNode},t.prototype.getCellCtrl=function(e){var r=null;return this.getAllCellCtrls().forEach(function(o){o.getColumn()==e&&(r=o)}),r!=null||this.getAllCellCtrls().forEach(function(o){o.getColSpanningList().indexOf(e)>=0&&(r=o)}),r},t.prototype.onRowIndexChanged=function(){this.rowNode.rowIndex!=null&&(this.onCellFocusChanged(),this.updateRowIndexes(),this.postProcessCss())},t.prototype.getRowIndex=function(){return this.rowNode.getRowIndexString()},t.prototype.updateRowIndexes=function(e){var r=this.rowNode.getRowIndexString(),o=this.beans.headerNavigationService.getHeaderRowCount()+this.beans.filterManager.getHeaderRowCount(),i=this.rowNode.rowIndex%2===0,a=o+this.rowNode.rowIndex+1;this.forEachGui(e,function(s){s.rowComp.setRowIndex(r),s.rowComp.addOrRemoveCssClass("ag-row-even",i),s.rowComp.addOrRemoveCssClass("ag-row-odd",!i),AS(s.element,a)})},t.prototype.getPinnedLeftRowElement=function(){return this.leftGui?this.leftGui.element:void 0},t.prototype.getPinnedRightRowElement=function(){return this.rightGui?this.rightGui.element:void 0},t.prototype.getBodyRowElement=function(){return this.centerGui?this.centerGui.element:void 0},t.prototype.getFullWidthRowElement=function(){return this.fullWidthGui?this.fullWidthGui.element:void 0},t.DOM_DATA_KEY_ROW_CTRL="renderedRow",t}(F),Bj=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(r[i]=o[i])},n(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");n(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}}(),gn=function(n,t,e,r){var o=arguments.length,i=o<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(n,t,e,r);else for(var s=n.length-1;s>=0;s--)(a=n[s])&&(i=(o<3?a(i):o>3?a(t,e,i):a(t,e))||i);return o>3&&i&&Object.defineProperty(t,e,i),i},Wj=function(n,t){var e=typeof Symbol=="function"&&n[Symbol.iterator];if(!e)return n;var r=e.call(n),o,i=[],a;try{for(;(t===void 0||t-- >0)&&!(o=r.next()).done;)i.push(o.value)}catch(s){a={error:s}}finally{try{o&&!o.done&&(e=r.return)&&e.call(r)}finally{if(a)throw a.error}}return i},Uj=function(n){Bj(t,n);function t(e){var r=n.call(this)||this;return r.element=e,r}return t.prototype.postConstruct=function(){this.addKeyboardListeners(),this.addMouseListeners(),this.mockContextMenuForIPad()},t.prototype.addKeyboardListeners=function(){var e="keydown",r=this.processKeyboardEvent.bind(this,e);this.addManagedListener(this.element,e,r)},t.prototype.addMouseListeners=function(){var e=this,r=TS("touchstart")?"touchstart":"mousedown",o=["dblclick","contextmenu","mouseover","mouseout","click",r];o.forEach(function(i){var a=e.processMouseEvent.bind(e,i);e.addManagedListener(e.element,i,a)})},t.prototype.processMouseEvent=function(e,r){if(!(!this.mouseEventService.isEventFromThisGrid(r)||_o(r))){var o=this.getRowForEvent(r),i=this.mouseEventService.getRenderedCellForEvent(r);e==="contextmenu"?this.handleContextMenuMouseEvent(r,null,o,i):(i&&i.onMouseEvent(e,r),o&&o.onMouseEvent(e,r))}},t.prototype.mockContextMenuForIPad=function(){var e=this;if(Na()){var r=new Zr(this.element),o=function(i){var a=e.getRowForEvent(i.touchEvent),s=e.mouseEventService.getRenderedCellForEvent(i.touchEvent);e.handleContextMenuMouseEvent(null,i.touchEvent,a,s)};this.addManagedListener(r,Zr.EVENT_LONG_TAP,o),this.addDestroyFunc(function(){return r.destroy()})}},t.prototype.getRowForEvent=function(e){for(var r=e.target;r;){var o=this.gridOptionsService.getDomData(r,Ma.DOM_DATA_KEY_ROW_CTRL);if(o)return o;r=r.parentElement}return null},t.prototype.handleContextMenuMouseEvent=function(e,r,o,i){var a=o?o.getRowNode():null,s=i?i.getColumn():null,l=null;if(s){var u=e||r;i.dispatchCellContextMenuEvent(u),l=this.valueService.getValue(s,a)}var c=this.ctrlsService.getGridBodyCtrl(),d=i?i.getGui():c.getGridBodyElement();this.contextMenuFactory&&this.contextMenuFactory.onContextMenu(e,r,a,s,l,d)},t.prototype.getControlsForEventTarget=function(e){return{cellCtrl:vg(this.gridOptionsService,e,ba.DOM_DATA_KEY_CELL_CTRL),rowCtrl:vg(this.gridOptionsService,e,Ma.DOM_DATA_KEY_ROW_CTRL)}},t.prototype.processKeyboardEvent=function(e,r){var o=this.getControlsForEventTarget(r.target),i=o.cellCtrl,a=o.rowCtrl;r.defaultPrevented||(i?this.processCellKeyboardEvent(i,e,r):a&&a.isFullWidth()&&this.processFullWidthRowKeyboardEvent(a,e,r))},t.prototype.processCellKeyboardEvent=function(e,r,o){var i=e.getRowNode(),a=e.getColumn(),s=e.isEditing(),l=!Cg(this.gridOptionsService,o,i,a,s);if(l&&r==="keydown"){var u=!s&&this.navigationService.handlePageScrollingKey(o);u||e.onKeyDown(o),this.doGridOperations(o,e.isEditing()),jg(o)&&e.processCharacter(o)}if(r==="keydown"){var c=e.createEvent(o,_.EVENT_CELL_KEY_DOWN);this.eventService.dispatchEvent(c)}},t.prototype.processFullWidthRowKeyboardEvent=function(e,r,o){var i=e.getRowNode(),a=this.focusService.getFocusedCell(),s=a&&a.column,l=!Cg(this.gridOptionsService,o,i,s,!1);if(l){var u=o.key;if(r==="keydown")switch(u){case O.PAGE_HOME:case O.PAGE_END:case O.PAGE_UP:case O.PAGE_DOWN:this.navigationService.handlePageScrollingKey(o,!0);break;case O.UP:case O.DOWN:e.onKeyboardNavigate(o);break;case O.TAB:e.onTabKeyDown(o);break;default:}}if(r==="keydown"){var c=e.createRowEvent(_.EVENT_CELL_KEY_DOWN,o);this.eventService.dispatchEvent(c)}},t.prototype.doGridOperations=function(e,r){if(!(!e.ctrlKey&&!e.metaKey)&&!r&&this.mouseEventService.isEventFromThisGrid(e)){var o=n0(e);if(o===O.A)return this.onCtrlAndA(e);if(o===O.C)return this.onCtrlAndC(e);if(o===O.D)return this.onCtrlAndD(e);if(o===O.V)return this.onCtrlAndV(e);if(o===O.X)return this.onCtrlAndX(e);if(o===O.Y)return this.onCtrlAndY();if(o===O.Z)return this.onCtrlAndZ(e)}},t.prototype.onCtrlAndA=function(e){var r=this,o=r.pinnedRowModel,i=r.paginationProxy,a=r.rangeService;if(a&&i.isRowsToRender()){var s=Wj([o.isEmpty("top"),o.isEmpty("bottom")],2),l=s[0],u=s[1],c=l?null:"top",d=void 0,f=void 0;u?(d=null,f=this.paginationProxy.getRowCount()-1):(d="bottom",f=o.getPinnedBottomRowData().length-1);var p=this.columnModel.getAllDisplayedColumns();if(Cn(p))return;a.setCellRange({rowStartIndex:0,rowStartPinned:c,rowEndIndex:f,rowEndPinned:d,columnStart:p[0],columnEnd:Ge(p)})}e.preventDefault()},t.prototype.onCtrlAndC=function(e){if(!(!this.clipboardService||this.gridOptionsService.is("enableCellTextSelection"))){var r=this.getControlsForEventTarget(e.target),o=r.cellCtrl,i=r.rowCtrl;o?.isEditing()||i?.isEditing()||(e.preventDefault(),this.clipboardService.copyToClipboard())}},t.prototype.onCtrlAndX=function(e){if(!(!this.clipboardService||this.gridOptionsService.is("enableCellTextSelection")||this.gridOptionsService.is("suppressCutToClipboard"))){var r=this.getControlsForEventTarget(e.target),o=r.cellCtrl,i=r.rowCtrl;o?.isEditing()||i?.isEditing()||(e.preventDefault(),this.clipboardService.cutToClipboard(void 0,"ui"))}},t.prototype.onCtrlAndV=function(e){var r=this.getControlsForEventTarget(e.target),o=r.cellCtrl,i=r.rowCtrl;o?.isEditing()||i?.isEditing()||this.clipboardService&&!this.gridOptionsService.is("suppressClipboardPaste")&&this.clipboardService.pasteFromClipboard()},t.prototype.onCtrlAndD=function(e){this.clipboardService&&!this.gridOptionsService.is("suppressClipboardPaste")&&this.clipboardService.copyRangeDown(),e.preventDefault()},t.prototype.onCtrlAndZ=function(e){this.gridOptionsService.is("undoRedoCellEditing")&&(e.preventDefault(),e.shiftKey?this.undoRedoService.redo("ui"):this.undoRedoService.undo("ui"))},t.prototype.onCtrlAndY=function(){this.undoRedoService.redo("ui")},gn([w("mouseEventService")],t.prototype,"mouseEventService",void 0),gn([w("valueService")],t.prototype,"valueService",void 0),gn([_e("contextMenuFactory")],t.prototype,"contextMenuFactory",void 0),gn([w("ctrlsService")],t.prototype,"ctrlsService",void 0),gn([w("navigationService")],t.prototype,"navigationService",void 0),gn([w("focusService")],t.prototype,"focusService",void 0),gn([w("undoRedoService")],t.prototype,"undoRedoService",void 0),gn([w("columnModel")],t.prototype,"columnModel",void 0),gn([w("paginationProxy")],t.prototype,"paginationProxy",void 0),gn([w("pinnedRowModel")],t.prototype,"pinnedRowModel",void 0),gn([_e("rangeService")],t.prototype,"rangeService",void 0),gn([_e("clipboardService")],t.prototype,"clipboardService",void 0),gn([M],t.prototype,"postConstruct",null),t}(F),jj=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(r[i]=o[i])},n(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");n(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}}(),Bh=function(n,t,e,r){var o=arguments.length,i=o<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(n,t,e,r);else for(var s=n.length-1;s>=0;s--)(a=n[s])&&(i=(o<3?a(i):o>3?a(t,e,i):a(t,e))||i);return o>3&&i&&Object.defineProperty(t,e,i),i},zj=function(n){jj(t,n);function t(e){var r=n.call(this)||this;return r.centerContainerCtrl=e,r}return t.prototype.postConstruct=function(){var e=this;this.ctrlsService.whenReady(function(){e.gridBodyCtrl=e.ctrlsService.getGridBodyCtrl(),e.listenForResize()}),this.addManagedListener(this.eventService,_.EVENT_SCROLLBAR_WIDTH_CHANGED,this.onScrollbarWidthChanged.bind(this))},t.prototype.listenForResize=function(){var e=this,r=function(){return e.onCenterViewportResized()};this.centerContainerCtrl.registerViewportResizeListener(r),this.gridBodyCtrl.registerBodyViewportResizeListener(r)},t.prototype.onScrollbarWidthChanged=function(){this.checkViewportAndScrolls()},t.prototype.onCenterViewportResized=function(){if(this.centerContainerCtrl.isViewportVisible()){this.checkViewportAndScrolls();var e=this.centerContainerCtrl.getCenterWidth();e!==this.centerWidth&&(this.centerWidth=e,this.columnModel.refreshFlexedColumns({viewportWidth:this.centerWidth,updateBodyWidths:!0,fireResizedEvent:!0}))}else this.bodyHeight=0},t.prototype.checkViewportAndScrolls=function(){this.updateScrollVisibleService(),this.checkBodyHeight(),this.onHorizontalViewportChanged(),this.gridBodyCtrl.getScrollFeature().checkScrollLeft()},t.prototype.getBodyHeight=function(){return this.bodyHeight},t.prototype.checkBodyHeight=function(){var e=this.gridBodyCtrl.getBodyViewportElement(),r=_d(e);if(this.bodyHeight!==r){this.bodyHeight=r;var o={type:_.EVENT_BODY_HEIGHT_CHANGED};this.eventService.dispatchEvent(o)}},t.prototype.updateScrollVisibleService=function(){this.updateScrollVisibleServiceImpl(),setTimeout(this.updateScrollVisibleServiceImpl.bind(this),500)},t.prototype.updateScrollVisibleServiceImpl=function(){var e={horizontalScrollShowing:this.isHorizontalScrollShowing(),verticalScrollShowing:this.gridBodyCtrl.isVerticalScrollShowing()};this.scrollVisibleService.setScrollsVisible(e)},t.prototype.isHorizontalScrollShowing=function(){return this.centerContainerCtrl.isHorizontalScrollShowing()},t.prototype.onHorizontalViewportChanged=function(){var e=this.centerContainerCtrl.getCenterWidth(),r=this.centerContainerCtrl.getViewportScrollLeft();this.columnModel.setViewportPosition(e,r)},Bh([w("ctrlsService")],t.prototype,"ctrlsService",void 0),Bh([w("columnModel")],t.prototype,"columnModel",void 0),Bh([w("scrollVisibleService")],t.prototype,"scrollVisibleService",void 0),Bh([M],t.prototype,"postConstruct",null),t}(F),qj=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(r[i]=o[i])},n(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");n(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}}(),pI=function(n,t,e,r){var o=arguments.length,i=o<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(n,t,e,r);else for(var s=n.length-1;s>=0;s--)(a=n[s])&&(i=(o<3?a(i):o>3?a(t,e,i):a(t,e))||i);return o>3&&i&&Object.defineProperty(t,e,i),i},$j=function(n){qj(t,n);function t(e){var r=n.call(this)||this;return r.element=e,r}return t.prototype.postConstruct=function(){this.addManagedListener(this.eventService,_.EVENT_LEFT_PINNED_WIDTH_CHANGED,this.onPinnedLeftWidthChanged.bind(this))},t.prototype.onPinnedLeftWidthChanged=function(){var e=this.pinnedWidthService.getPinnedLeftWidth(),r=e>0;we(this.element,r),eo(this.element,e)},t.prototype.getWidth=function(){return this.pinnedWidthService.getPinnedLeftWidth()},pI([w("pinnedWidthService")],t.prototype,"pinnedWidthService",void 0),pI([M],t.prototype,"postConstruct",null),t}(F),Kj=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(r[i]=o[i])},n(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");n(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}}(),hI=function(n,t,e,r){var o=arguments.length,i=o<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(n,t,e,r);else for(var s=n.length-1;s>=0;s--)(a=n[s])&&(i=(o<3?a(i):o>3?a(t,e,i):a(t,e))||i);return o>3&&i&&Object.defineProperty(t,e,i),i},Yj=function(n){Kj(t,n);function t(e){var r=n.call(this)||this;return r.element=e,r}return t.prototype.postConstruct=function(){this.addManagedListener(this.eventService,_.EVENT_RIGHT_PINNED_WIDTH_CHANGED,this.onPinnedRightWidthChanged.bind(this))},t.prototype.onPinnedRightWidthChanged=function(){var e=this.pinnedWidthService.getPinnedRightWidth(),r=e>0;we(this.element,r),eo(this.element,e)},t.prototype.getWidth=function(){return this.pinnedWidthService.getPinnedRightWidth()},hI([w("pinnedWidthService")],t.prototype,"pinnedWidthService",void 0),hI([M],t.prototype,"postConstruct",null),t}(F),Xj=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(r[i]=o[i])},n(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");n(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}}(),gI=function(n,t,e,r){var o=arguments.length,i=o<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(n,t,e,r);else for(var s=n.length-1;s>=0;s--)(a=n[s])&&(i=(o<3?a(i):o>3?a(t,e,i):a(t,e))||i);return o>3&&i&&Object.defineProperty(t,e,i),i},j0=function(n){Xj(t,n);function t(e,r){var o=n.call(this)||this;return o.eContainer=e,o.eViewport=r,o}return t.prototype.postConstruct=function(){this.addManagedListener(this.eventService,_.EVENT_ROW_CONTAINER_HEIGHT_CHANGED,this.onHeightChanged.bind(this))},t.prototype.onHeightChanged=function(){var e=this.maxDivHeightScaler.getUiContainerHeight(),r=e!=null?e+"px":"";this.eContainer.style.height=r,this.eViewport&&(this.eViewport.style.height=r)},gI([w("rowContainerHeightService")],t.prototype,"maxDivHeightScaler",void 0),gI([M],t.prototype,"postConstruct",null),t}(F),Qj=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(r[i]=o[i])},n(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");n(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}}(),Ow=function(n,t,e,r){var o=arguments.length,i=o<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(n,t,e,r);else for(var s=n.length-1;s>=0;s--)(a=n[s])&&(i=(o<3?a(i):o>3?a(t,e,i):a(t,e))||i);return o>3&&i&&Object.defineProperty(t,e,i),i},Jj=function(n){Qj(t,n);function t(e){var r=n.call(this)||this;return r.eContainer=e,r}return t.prototype.postConstruct=function(){var e=this;if(!(!this.gridOptionsService.is("enableRangeSelection")||Z(this.rangeService))){var r={eElement:this.eContainer,onDragStart:this.rangeService.onDragStart.bind(this.rangeService),onDragStop:this.rangeService.onDragStop.bind(this.rangeService),onDragging:this.rangeService.onDragging.bind(this.rangeService)};this.dragService.addDragSource(r),this.addDestroyFunc(function(){return e.dragService.removeDragSource(r)})}},Ow([_e("rangeService")],t.prototype,"rangeService",void 0),Ow([w("dragService")],t.prototype,"dragService",void 0),Ow([M],t.prototype,"postConstruct",null),t}(F),Zj=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(r[i]=o[i])},n(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");n(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}}(),Lw=function(n,t,e,r){var o=arguments.length,i=o<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(n,t,e,r);else for(var s=n.length-1;s>=0;s--)(a=n[s])&&(i=(o<3?a(i):o>3?a(t,e,i):a(t,e))||i);return o>3&&i&&Object.defineProperty(t,e,i),i},l_=function(n){Zj(t,n);function t(e,r){r===void 0&&(r=!1);var o=n.call(this)||this;return o.callback=e,o.addSpacer=r,o}return t.prototype.postConstruct=function(){var e=this.setWidth.bind(this);this.addManagedPropertyListener("domLayout",e),this.addManagedListener(this.eventService,_.EVENT_DISPLAYED_COLUMNS_CHANGED,e),this.addManagedListener(this.eventService,_.EVENT_DISPLAYED_COLUMNS_WIDTH_CHANGED,e),this.addManagedListener(this.eventService,_.EVENT_LEFT_PINNED_WIDTH_CHANGED,e),this.addSpacer&&(this.addManagedListener(this.eventService,_.EVENT_RIGHT_PINNED_WIDTH_CHANGED,e),this.addManagedListener(this.eventService,_.EVENT_SCROLL_VISIBILITY_CHANGED,e),this.addManagedListener(this.eventService,_.EVENT_SCROLLBAR_WIDTH_CHANGED,e)),this.setWidth()},t.prototype.setWidth=function(){var e=this.columnModel,r=this.gridOptionsService.isDomLayout("print"),o=e.getBodyContainerWidth(),i=e.getDisplayedColumnsLeftWidth(),a=e.getDisplayedColumnsRightWidth(),s;if(r)s=o+i+a;else if(s=o,this.addSpacer){var l=this.gridOptionsService.is("enableRtl")?i:a;l===0&&this.scrollVisibleService.isVerticalScrollShowing()&&(s+=this.gridOptionsService.getScrollbarWidth())}this.callback(s)},Lw([w("columnModel")],t.prototype,"columnModel",void 0),Lw([w("scrollVisibleService")],t.prototype,"scrollVisibleService",void 0),Lw([M],t.prototype,"postConstruct",null),t}(F),e3=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(r[i]=o[i])},n(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");n(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}}(),Sa=function(n,t,e,r){var o=arguments.length,i=o<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(n,t,e,r);else for(var s=n.length-1;s>=0;s--)(a=n[s])&&(i=(o<3?a(i):o>3?a(t,e,i):a(t,e))||i);return o>3&&i&&Object.defineProperty(t,e,i),i},Wh=function(n,t){var e=typeof Symbol=="function"&&n[Symbol.iterator];if(!e)return n;var r=e.call(n),o,i=[],a;try{for(;(t===void 0||t-- >0)&&!(o=r.next()).done;)i.push(o.value)}catch(s){a={error:s}}finally{try{o&&!o.done&&(e=r.return)&&e.call(r)}finally{if(a)throw a.error}}return i},Uh=function(n,t){for(var e=0,r=t.length,o=n.length;e=0&&r()},t.prototype.getContainerElement=function(){return this.eContainer},t.prototype.getViewportSizeFeature=function(){return this.viewportSizeFeature},t.prototype.setComp=function(e,r,o){var i=this;this.comp=e,this.eContainer=r,this.eViewport=o,this.createManagedBean(new Uj(this.eContainer)),this.addPreventScrollWhileDragging(),this.listenOnDomOrder(),this.stopHScrollOnPinnedRows();var a=[g.RowContainerName.TOP_CENTER,g.RowContainerName.TOP_LEFT,g.RowContainerName.TOP_RIGHT],s=[g.RowContainerName.STICKY_TOP_CENTER,g.RowContainerName.STICKY_TOP_LEFT,g.RowContainerName.STICKY_TOP_RIGHT],l=[g.RowContainerName.BOTTOM_CENTER,g.RowContainerName.BOTTOM_LEFT,g.RowContainerName.BOTTOM_RIGHT],u=[g.RowContainerName.CENTER,g.RowContainerName.LEFT,g.RowContainerName.RIGHT],c=Uh(Uh(Uh(Uh([],Wh(a)),Wh(l)),Wh(u)),Wh(s)),d=[g.RowContainerName.CENTER,g.RowContainerName.LEFT,g.RowContainerName.RIGHT,g.RowContainerName.FULL_WIDTH],f=[g.RowContainerName.CENTER,g.RowContainerName.TOP_CENTER,g.RowContainerName.STICKY_TOP_CENTER,g.RowContainerName.BOTTOM_CENTER],p=[g.RowContainerName.LEFT,g.RowContainerName.BOTTOM_LEFT,g.RowContainerName.TOP_LEFT,g.RowContainerName.STICKY_TOP_LEFT],h=[g.RowContainerName.RIGHT,g.RowContainerName.BOTTOM_RIGHT,g.RowContainerName.TOP_RIGHT,g.RowContainerName.STICKY_TOP_RIGHT];this.forContainers(p,function(){i.pinnedWidthFeature=i.createManagedBean(new $j(i.eContainer)),i.addManagedListener(i.eventService,_.EVENT_LEFT_PINNED_WIDTH_CHANGED,function(){return i.onPinnedWidthChanged()})}),this.forContainers(h,function(){i.pinnedWidthFeature=i.createManagedBean(new Yj(i.eContainer)),i.addManagedListener(i.eventService,_.EVENT_RIGHT_PINNED_WIDTH_CHANGED,function(){return i.onPinnedWidthChanged()})}),this.forContainers(d,function(){return i.createManagedBean(new j0(i.eContainer,i.name===g.RowContainerName.CENTER?o:void 0))}),this.forContainers(c,function(){return i.createManagedBean(new Jj(i.eContainer))}),this.forContainers(f,function(){return i.createManagedBean(new l_(function(v){return i.comp.setContainerWidth(v+"px")}))}),hd()&&(this.forContainers([g.RowContainerName.CENTER],function(){var v=i.enableRtl?_.EVENT_LEFT_PINNED_WIDTH_CHANGED:_.EVENT_RIGHT_PINNED_WIDTH_CHANGED;i.addManagedListener(i.eventService,v,function(){return i.refreshPaddingForFakeScrollbar()})}),this.refreshPaddingForFakeScrollbar()),this.addListeners(),this.registerWithCtrlsService()},t.prototype.refreshPaddingForFakeScrollbar=function(){var e=this,r=e.enableRtl,o=e.columnModel,i=e.eContainer,a=r?g.RowContainerName.LEFT:g.RowContainerName.RIGHT;this.forContainers([g.RowContainerName.CENTER,a],function(){var s=o.getContainerWidth(a),l=r?"marginLeft":"marginRight";i.style[l]=s?"16px":"0px"})},t.prototype.addListeners=function(){var e=this;this.addManagedListener(this.eventService,_.EVENT_DISPLAYED_COLUMNS_CHANGED,function(){return e.onDisplayedColumnsChanged()}),this.addManagedListener(this.eventService,_.EVENT_DISPLAYED_COLUMNS_WIDTH_CHANGED,function(){return e.onDisplayedColumnsWidthChanged()}),this.addManagedListener(this.eventService,_.EVENT_DISPLAYED_ROWS_CHANGED,function(r){return e.onDisplayedRowsChanged(r.afterScroll)}),this.onDisplayedColumnsChanged(),this.onDisplayedColumnsWidthChanged(),this.onDisplayedRowsChanged()},t.prototype.listenOnDomOrder=function(){var e=this,r=[g.RowContainerName.STICKY_TOP_CENTER,g.RowContainerName.STICKY_TOP_LEFT,g.RowContainerName.STICKY_TOP_RIGHT,g.RowContainerName.STICKY_TOP_FULL_WIDTH],o=r.indexOf(this.name)>=0;if(o){this.comp.setDomOrder(!0);return}var i=function(){var a=e.gridOptionsService.is("ensureDomOrder"),s=e.gridOptionsService.isDomLayout("print");e.comp.setDomOrder(a||s)};this.addManagedPropertyListener("domLayout",i),i()},t.prototype.stopHScrollOnPinnedRows=function(){var e=this;this.forContainers([g.RowContainerName.TOP_CENTER,g.RowContainerName.STICKY_TOP_CENTER,g.RowContainerName.BOTTOM_CENTER],function(){var r=function(){return e.eViewport.scrollLeft=0};e.addManagedListener(e.eViewport,"scroll",r)})},t.prototype.onDisplayedColumnsChanged=function(){var e=this;this.forContainers([g.RowContainerName.CENTER],function(){return e.onHorizontalViewportChanged()})},t.prototype.onDisplayedColumnsWidthChanged=function(){var e=this;this.forContainers([g.RowContainerName.CENTER],function(){return e.onHorizontalViewportChanged()})},t.prototype.addPreventScrollWhileDragging=function(){var e=this,r=function(o){e.dragService.isDragging()&&o.cancelable&&o.preventDefault()};this.eContainer.addEventListener("touchmove",r,{passive:!1}),this.addDestroyFunc(function(){return e.eContainer.removeEventListener("touchmove",r)})},t.prototype.onHorizontalViewportChanged=function(e){e===void 0&&(e=!1);var r=this.getCenterWidth(),o=this.getCenterViewportScrollLeft();this.columnModel.setViewportPosition(r,o,e)},t.prototype.getCenterWidth=function(){return Wg(this.eViewport)},t.prototype.getCenterViewportScrollLeft=function(){return md(this.eViewport,this.enableRtl)},t.prototype.registerViewportResizeListener=function(e){var r=this.resizeObserverService.observeResize(this.eViewport,e);this.addDestroyFunc(function(){return r()})},t.prototype.isViewportVisible=function(){return ka(this.eViewport)},t.prototype.getViewportScrollLeft=function(){return md(this.eViewport,this.enableRtl)},t.prototype.isHorizontalScrollShowing=function(){var e=this.gridOptionsService.is("alwaysShowHorizontalScroll");return e||QD(this.eViewport)},t.prototype.getViewportElement=function(){return this.eViewport},t.prototype.setContainerTranslateX=function(e){this.eContainer.style.transform="translateX("+e+"px)"},t.prototype.getHScrollPosition=function(){var e={left:this.eViewport.scrollLeft,right:this.eViewport.scrollLeft+this.eViewport.offsetWidth};return e},t.prototype.setCenterViewportScrollLeft=function(e){yd(this.eViewport,e,this.enableRtl)},t.prototype.isContainerVisible=function(){var e=t.getPinned(this.name);return!e||!!this.pinnedWidthFeature&&this.pinnedWidthFeature.getWidth()>0},t.prototype.onPinnedWidthChanged=function(){var e=this.isContainerVisible();this.visible!=e&&(this.visible=e,this.onDisplayedRowsChanged()),hd()&&this.refreshPaddingForFakeScrollbar()},t.prototype.onDisplayedRowsChanged=function(e){var r=this;if(e===void 0&&(e=!1),this.visible){var o=this.gridOptionsService.isDomLayout("print"),i=function(s){var l=s.isFullWidth(),u=r.embedFullWidthRows||o,c=r.isFullWithContainer?!u&&l:u||!l;return c},a=this.getRowCtrls().filter(i);this.comp.setRowCtrls(a,e)}else this.comp.setRowCtrls(this.EMPTY_CTRLS,!1)},t.prototype.getRowCtrls=function(){switch(this.name){case g.RowContainerName.TOP_CENTER:case g.RowContainerName.TOP_LEFT:case g.RowContainerName.TOP_RIGHT:case g.RowContainerName.TOP_FULL_WIDTH:return this.rowRenderer.getTopRowCtrls();case g.RowContainerName.STICKY_TOP_CENTER:case g.RowContainerName.STICKY_TOP_LEFT:case g.RowContainerName.STICKY_TOP_RIGHT:case g.RowContainerName.STICKY_TOP_FULL_WIDTH:return this.rowRenderer.getStickyTopRowCtrls();case g.RowContainerName.BOTTOM_CENTER:case g.RowContainerName.BOTTOM_LEFT:case g.RowContainerName.BOTTOM_RIGHT:case g.RowContainerName.BOTTOM_FULL_WIDTH:return this.rowRenderer.getBottomRowCtrls();default:return this.rowRenderer.getCentreRowCtrls()}},Sa([w("scrollVisibleService")],t.prototype,"scrollVisibleService",void 0),Sa([w("dragService")],t.prototype,"dragService",void 0),Sa([w("ctrlsService")],t.prototype,"ctrlsService",void 0),Sa([w("columnModel")],t.prototype,"columnModel",void 0),Sa([w("resizeObserverService")],t.prototype,"resizeObserverService",void 0),Sa([w("animationFrameService")],t.prototype,"animationFrameService",void 0),Sa([w("rowRenderer")],t.prototype,"rowRenderer",void 0),Sa([M],t.prototype,"postConstruct",null),t}(F),n3=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(r[i]=o[i])},n(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");n(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}}(),xi=function(n,t,e,r){var o=arguments.length,i=o<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(n,t,e,r);else for(var s=n.length-1;s>=0;s--)(a=n[s])&&(i=(o<3?a(i):o>3?a(t,e,i):a(t,e))||i);return o>3&&i&&Object.defineProperty(t,e,i),i},o3=`
`,q0=function(n){n3(t,n);function t(){return n.call(this,o3)||this}return t.prototype.init=function(){var e=this,r=function(i,a){var s=i+"px";a.style.minHeight=s,a.style.height=s},o={setRowAnimationCssOnBodyViewport:function(i,a){return e.setRowAnimationCssOnBodyViewport(i,a)},setColumnCount:function(i){return ND(e.getGui(),i)},setRowCount:function(i){return MD(e.getGui(),i)},setTopHeight:function(i){return r(i,e.eTop)},setBottomHeight:function(i){return r(i,e.eBottom)},setTopDisplay:function(i){return e.eTop.style.display=i},setBottomDisplay:function(i){return e.eBottom.style.display=i},setStickyTopHeight:function(i){return e.eStickyTop.style.height=i},setStickyTopTop:function(i){return e.eStickyTop.style.top=i},setStickyTopWidth:function(i){return e.eStickyTop.style.width=i},setColumnMovingCss:function(i,a){return e.addOrRemoveCssClass(i,a)},updateLayoutClasses:function(i,a){var s=[e.eBodyViewport.classList,e.eBody.classList];s.forEach(function(l){l.toggle(g.LayoutCssClasses.AUTO_HEIGHT,a.autoHeight),l.toggle(g.LayoutCssClasses.NORMAL,a.normal),l.toggle(g.LayoutCssClasses.PRINT,a.print)}),e.addOrRemoveCssClass(g.LayoutCssClasses.AUTO_HEIGHT,a.autoHeight),e.addOrRemoveCssClass(g.LayoutCssClasses.NORMAL,a.normal),e.addOrRemoveCssClass(g.LayoutCssClasses.PRINT,a.print)},setAlwaysVerticalScrollClass:function(i,a){return e.eBodyViewport.classList.toggle(W0,a)},registerBodyViewportResizeListener:function(i){var a=e.resizeObserverService.observeResize(e.eBodyViewport,i);e.addDestroyFunc(function(){return a()})},setPinnedTopBottomOverflowY:function(i){return e.eTop.style.overflowY=e.eBottom.style.overflowY=i},setCellSelectableCss:function(i,a){[e.eTop,e.eBodyViewport,e.eBottom].forEach(function(s){return s.classList.toggle(i,a)})},setBodyViewportWidth:function(i){return e.eBodyViewport.style.width=i}};this.ctrl=this.createManagedBean(new U0),this.ctrl.setComp(o,this.getGui(),this.eBodyViewport,this.eTop,this.eBottom,this.eStickyTop),(this.rangeService||this.gridOptionsService.get("rowSelection")==="multiple")&&bD(this.getGui(),!0)},t.prototype.setRowAnimationCssOnBodyViewport=function(e,r){var o=this.eBodyViewport.classList;o.toggle(g.RowAnimationCssClasses.ANIMATION_ON,r),o.toggle(g.RowAnimationCssClasses.ANIMATION_OFF,!r)},t.prototype.getFloatingTopBottom=function(){return[this.eTop,this.eBottom]},xi([w("resizeObserverService")],t.prototype,"resizeObserverService",void 0),xi([_e("rangeService")],t.prototype,"rangeService",void 0),xi([G("eBodyViewport")],t.prototype,"eBodyViewport",void 0),xi([G("eStickyTop")],t.prototype,"eStickyTop",void 0),xi([G("eTop")],t.prototype,"eTop",void 0),xi([G("eBottom")],t.prototype,"eBottom",void 0),xi([G("gridHeader")],t.prototype,"headerRootComp",void 0),xi([G("eBody")],t.prototype,"eBody",void 0),xi([M],t.prototype,"init",null),t}(se),i3=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(r[i]=o[i])},n(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");n(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}}(),Iw=function(n,t,e,r){var o=arguments.length,i=o<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(n,t,e,r);else for(var s=n.length-1;s>=0;s--)(a=n[s])&&(i=(o<3?a(i):o>3?a(t,e,i):a(t,e))||i);return o>3&&i&&Object.defineProperty(t,e,i),i},$0=function(n){i3(t,n);function t(){return n!==null&&n.apply(this,arguments)||this}return t.prototype.postConstruct=function(){this.addManagedListener(this.eventService,_.EVENT_DISPLAYED_COLUMNS_CHANGED,this.onDisplayedColumnsChanged.bind(this)),this.addManagedListener(this.eventService,_.EVENT_DISPLAYED_COLUMNS_WIDTH_CHANGED,this.onDisplayedColumnsWidthChanged.bind(this))},t.prototype.onDisplayedColumnsChanged=function(){this.update()},t.prototype.onDisplayedColumnsWidthChanged=function(){this.update()},t.prototype.update=function(){this.updateImpl(),setTimeout(this.updateImpl.bind(this),500)},t.prototype.updateImpl=function(){var e=this.ctrlsService.getCenterRowContainerCtrl();if(e){var r={horizontalScrollShowing:e.isHorizontalScrollShowing(),verticalScrollShowing:this.isVerticalScrollShowing()};this.setScrollsVisible(r)}},t.prototype.setScrollsVisible=function(e){var r=this.horizontalScrollShowing!==e.horizontalScrollShowing||this.verticalScrollShowing!==e.verticalScrollShowing;if(r){this.horizontalScrollShowing=e.horizontalScrollShowing,this.verticalScrollShowing=e.verticalScrollShowing;var o={type:_.EVENT_SCROLL_VISIBILITY_CHANGED};this.eventService.dispatchEvent(o)}},t.prototype.isHorizontalScrollShowing=function(){return this.horizontalScrollShowing},t.prototype.isVerticalScrollShowing=function(){return this.verticalScrollShowing},Iw([w("ctrlsService")],t.prototype,"ctrlsService",void 0),Iw([M],t.prototype,"postConstruct",null),t=Iw([H("scrollVisibleService")],t),t}(F),a3=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(r[i]=o[i])},n(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");n(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}}(),vI=function(n,t,e,r){var o=arguments.length,i=o<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(n,t,e,r);else for(var s=n.length-1;s>=0;s--)(a=n[s])&&(i=(o<3?a(i):o>3?a(t,e,i):a(t,e))||i);return o>3&&i&&Object.defineProperty(t,e,i),i},K0=function(n){a3(t,n);function t(){var r=n!==null&&n.apply(this,arguments)||this;return r.gridInstanceId=e.gridInstanceSequence.next(),r}e=t,t.prototype.stampTopLevelGridCompWithGridInstance=function(r){r[e.GRID_DOM_KEY]=this.gridInstanceId},t.prototype.getRenderedCellForEvent=function(r){return vg(this.gridOptionsService,r.target,ba.DOM_DATA_KEY_CELL_CTRL)},t.prototype.isEventFromThisGrid=function(r){var o=this.isElementInThisGrid(r.target);return o},t.prototype.isElementInThisGrid=function(r){for(var o=r;o;){var i=o[e.GRID_DOM_KEY];if(D(i)){var a=i===this.gridInstanceId;return a}o=o.parentElement}return!1},t.prototype.getCellPositionForEvent=function(r){var o=this.getRenderedCellForEvent(r);return o?o.getCellPosition():null},t.prototype.getNormalisedPosition=function(r){var o=this.gridOptionsService.isDomLayout("normal"),i=r,a,s;if(i.clientX!=null||i.clientY!=null?(a=i.clientX,s=i.clientY):(a=i.x,s=i.y),o){var l=this.ctrlsService.getGridBodyCtrl(),u=l.getScrollFeature().getVScrollPosition(),c=l.getScrollFeature().getHScrollPosition();a+=c.left,s+=u.top}return{x:a,y:s}};var e;return t.gridInstanceSequence=new As,t.GRID_DOM_KEY="__ag_grid_instance",vI([w("ctrlsService")],t.prototype,"ctrlsService",void 0),t=e=vI([H("mouseEventService")],t),t}(F),s3=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(r[i]=o[i])},n(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");n(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}}(),Pg=function(){return Pg=Object.assign||function(n){for(var t,e=1,r=arguments.length;e=0;s--)(a=n[s])&&(i=(o<3?a(i):o>3?a(t,e,i):a(t,e))||i);return o>3&&i&&Object.defineProperty(t,e,i),i},Y0=function(n){s3(t,n);function t(){var e=n.call(this)||this;return e.onPageDown=tS(e.onPageDown,100),e.onPageUp=tS(e.onPageUp,100),e}return t.prototype.postConstruct=function(){var e=this;this.ctrlsService.whenReady(function(r){e.gridBodyCon=r.gridBodyCtrl})},t.prototype.handlePageScrollingKey=function(e,r){r===void 0&&(r=!1);var o=e.key,i=e.altKey,a=e.ctrlKey||e.metaKey,s=!!this.rangeService&&e.shiftKey,l=this.mouseEventService.getCellPositionForEvent(e),u=!1;switch(o){case O.PAGE_HOME:case O.PAGE_END:!a&&!i&&(this.onHomeOrEndKey(o),u=!0);break;case O.LEFT:case O.RIGHT:case O.UP:case O.DOWN:if(!l)return!1;a&&!i&&!s&&(this.onCtrlUpDownLeftRight(o,l),u=!0);break;case O.PAGE_DOWN:case O.PAGE_UP:!a&&!i&&(u=this.handlePageUpDown(o,l,r));break}return u&&e.preventDefault(),u},t.prototype.handlePageUpDown=function(e,r,o){return o&&(r=this.focusService.getFocusedCell()),r?(e===O.PAGE_UP?this.onPageUp(r):this.onPageDown(r),!0):!1},t.prototype.navigateTo=function(e){var r=e.scrollIndex,o=e.scrollType,i=e.scrollColumn,a=e.focusIndex,s=e.focusColumn;if(D(i)&&!i.isPinned()&&this.gridBodyCon.getScrollFeature().ensureColumnVisible(i),D(r)&&this.gridBodyCon.getScrollFeature().ensureIndexVisible(r,o),e.isAsync||this.gridBodyCon.getScrollFeature().ensureIndexVisible(a),this.focusService.setFocusedCell({rowIndex:a,column:s,rowPinned:null,forceBrowserFocus:!0}),this.rangeService){var l={rowIndex:a,rowPinned:null,column:s};this.rangeService.setRangeToCell(l)}},t.prototype.onPageDown=function(e){var r=this.ctrlsService.getGridBodyCtrl(),o=r.getScrollFeature().getVScrollPosition(),i=this.getViewportHeight(),a=this.paginationProxy.getPixelOffset(),s=o.top+i,l=this.paginationProxy.getRowIndexAtPixel(s+a);this.columnModel.isAutoRowHeightActive()?this.navigateToNextPageWithAutoHeight(e,l):this.navigateToNextPage(e,l)},t.prototype.onPageUp=function(e){var r=this.ctrlsService.getGridBodyCtrl(),o=r.getScrollFeature().getVScrollPosition(),i=this.paginationProxy.getPixelOffset(),a=o.top,s=this.paginationProxy.getRowIndexAtPixel(a+i);this.columnModel.isAutoRowHeightActive()?this.navigateToNextPageWithAutoHeight(e,s,!0):this.navigateToNextPage(e,s,!0)},t.prototype.navigateToNextPage=function(e,r,o){o===void 0&&(o=!1);var i=this.getViewportHeight(),a=this.paginationProxy.getPageFirstRow(),s=this.paginationProxy.getPageLastRow(),l=this.paginationProxy.getPixelOffset(),u=this.paginationProxy.getRow(e.rowIndex),c=o?u?.rowHeight-i-l:i-l,d=u?.rowTop+c,f=this.paginationProxy.getRowIndexAtPixel(d+l);if(f===e.rowIndex){var p=o?-1:1;r=f=e.rowIndex+p}var h;o?(h="bottom",fs&&(f=s),r>s&&(r=s)),this.isRowTallerThanView(f)&&(r=f,h="top"),this.navigateTo({scrollIndex:r,scrollType:h,scrollColumn:null,focusIndex:f,focusColumn:e.column})},t.prototype.navigateToNextPageWithAutoHeight=function(e,r,o){var i=this;o===void 0&&(o=!1),this.navigateTo({scrollIndex:r,scrollType:o?"bottom":"top",scrollColumn:null,focusIndex:r,focusColumn:e.column}),setTimeout(function(){var a=i.getNextFocusIndexForAutoHeight(e,o);i.navigateTo({scrollIndex:r,scrollType:o?"bottom":"top",scrollColumn:null,focusIndex:a,focusColumn:e.column,isAsync:!0})},50)},t.prototype.getNextFocusIndexForAutoHeight=function(e,r){var o;r===void 0&&(r=!1);for(var i=r?-1:1,a=this.getViewportHeight(),s=this.paginationProxy.getPageLastRow(),l=0,u=e.rowIndex;u>=0&&u<=s;){var c=this.paginationProxy.getRow(u);if(c){var d=(o=c.rowHeight)!==null&&o!==void 0?o:0;if(l+d>a)break;l+=d}u+=i}return Math.max(0,Math.min(u,s))},t.prototype.getViewportHeight=function(){var e=this.ctrlsService.getGridBodyCtrl(),r=e.getScrollFeature().getVScrollPosition(),o=this.gridOptionsService.getScrollbarWidth(),i=r.bottom-r.top;return this.ctrlsService.getCenterRowContainerCtrl().isHorizontalScrollShowing()&&(i-=o),i},t.prototype.isRowTallerThanView=function(e){var r=this.paginationProxy.getRow(e);if(!r)return!1;var o=r.rowHeight;return typeof o!="number"?!1:o>this.getViewportHeight()},t.prototype.onCtrlUpDownLeftRight=function(e,r){var o=this.cellNavigationService.getNextCellToFocus(e,r,!0),i=o.rowIndex,a=o.column;this.navigateTo({scrollIndex:i,scrollType:null,scrollColumn:a,focusIndex:i,focusColumn:a})},t.prototype.onHomeOrEndKey=function(e){var r=e===O.PAGE_HOME,o=this.columnModel.getAllDisplayedColumns(),i=r?o[0]:Ge(o),a=r?this.paginationProxy.getPageFirstRow():this.paginationProxy.getPageLastRow();this.navigateTo({scrollIndex:a,scrollType:null,scrollColumn:i,focusIndex:a,focusColumn:i})},t.prototype.onTabKeyDown=function(e,r){var o=r.shiftKey,i=this.tabToNextCellCommon(e,o,r);if(i){r.preventDefault();return}if(o){var a=e.getRowPosition(),s=a.rowIndex,l=a.rowPinned,u=l?s===0:s===this.paginationProxy.getPageFirstRow();u&&(this.gridOptionsService.getNum("headerHeight")===0?this.focusService.focusNextGridCoreContainer(!0,!0):(r.preventDefault(),this.focusService.focusPreviousFromFirstCell(r)))}else e instanceof ba&&e.focusCell(!0),this.focusService.focusNextGridCoreContainer(o)&&r.preventDefault()},t.prototype.tabToNextCell=function(e,r){var o=this.focusService.getFocusedCell();if(!o)return!1;var i=this.getCellByPosition(o);return!i&&(i=this.rowRenderer.getRowByPosition(o),!i||!i.isFullWidth())?!1:this.tabToNextCellCommon(i,e,r)},t.prototype.tabToNextCellCommon=function(e,r,o){var i=e.isEditing();if(!i&&e instanceof ba){var a=e,s=a.getRowCtrl();s&&(i=s.isEditing())}var l;return i?this.gridOptionsService.get("editType")==="fullRow"?l=this.moveToNextEditingRow(e,r,o):l=this.moveToNextEditingCell(e,r,o):l=this.moveToNextCellNotEditing(e,r),l||!!this.focusService.getFocusedHeader()},t.prototype.moveToNextEditingCell=function(e,r,o){o===void 0&&(o=null);var i=e.getCellPosition();e.getGui().focus(),e.stopEditing();var a=this.findNextCellToFocusOn(i,r,!0);return a==null?!1:(a.startEditing(null,!0,o),a.focusCell(!1),!0)},t.prototype.moveToNextEditingRow=function(e,r,o){o===void 0&&(o=null);var i=e.getCellPosition(),a=this.findNextCellToFocusOn(i,r,!0);if(a==null)return!1;var s=a.getCellPosition(),l=this.isCellEditable(i),u=this.isCellEditable(s),c=s&&i.rowIndex===s.rowIndex&&i.rowPinned===s.rowPinned;if(l&&e.setFocusOutOnEditor(),!c){var d=e.getRowCtrl();d.stopEditing();var f=a.getRowCtrl();f.startRowEditing(void 0,void 0,o)}return u?(a.setFocusInOnEditor(),a.focusCell()):a.focusCell(!0),!0},t.prototype.moveToNextCellNotEditing=function(e,r){var o=this.columnModel.getAllDisplayedColumns(),i;e instanceof Ma?i=Pg(Pg({},e.getRowPosition()),{column:r?o[0]:Ge(o)}):i=e.getCellPosition();var a=this.findNextCellToFocusOn(i,r,!1);if(a instanceof ba)a.focusCell(!0);else if(a)return this.tryToFocusFullWidthRow(a.getRowPosition(),r);return D(a)},t.prototype.findNextCellToFocusOn=function(e,r,o){for(var i=e;;){e!==i&&(e=i),r||(i=this.getLastCellOfColSpan(i)),i=this.cellNavigationService.getNextTabbedCell(i,r);var a=this.gridOptionsService.getCallback("tabToNextCell");if(D(a)){var s={backwards:r,editing:o,previousCellPosition:e,nextCellPosition:i||null},l=a(s);D(l)?(l.floating&&(ge(function(){console.warn("AG Grid: tabToNextCellFunc return type should have attributes: rowIndex, rowPinned, column. However you had 'floating', maybe you meant 'rowPinned'?")},"no floating in userCell"),l.rowPinned=l.floating),i={rowIndex:l.rowIndex,column:l.column,rowPinned:l.rowPinned}):i=null}if(!i)return null;if(i.rowIndex<0){var u=this.headerNavigationService.getHeaderRowCount();return this.focusService.focusHeaderPosition({headerPosition:{headerRowIndex:u+i.rowIndex,column:i.column},fromCell:!0}),null}var c=this.gridOptionsService.get("editType")==="fullRow";if(o&&!c){var d=this.isCellEditable(i);if(!d)continue}this.ensureCellVisible(i);var f=this.getCellByPosition(i);if(!f){var p=this.rowRenderer.getRowByPosition(i);if(!p||!p.isFullWidth()||o)continue;return p}if(!f.isSuppressNavigable())return this.rangeService&&this.rangeService.setRangeToCell(i),f}},t.prototype.isCellEditable=function(e){var r=this.lookupRowNodeForCell(e);return r?e.column.isCellEditable(r):!1},t.prototype.getCellByPosition=function(e){var r=this.rowRenderer.getRowByPosition(e);return r?r.getCellCtrl(e.column):null},t.prototype.lookupRowNodeForCell=function(e){return e.rowPinned==="top"?this.pinnedRowModel.getPinnedTopRow(e.rowIndex):e.rowPinned==="bottom"?this.pinnedRowModel.getPinnedBottomRow(e.rowIndex):this.paginationProxy.getRow(e.rowIndex)},t.prototype.navigateToNextCell=function(e,r,o,i){for(var a=o,s=!1;a&&(a===o||!this.isValidNavigateCell(a));)this.gridOptionsService.is("enableRtl")?r===O.LEFT&&(a=this.getLastCellOfColSpan(a)):r===O.RIGHT&&(a=this.getLastCellOfColSpan(a)),a=this.cellNavigationService.getNextCellToFocus(r,a),s=Z(a);if(s&&e&&e.key===O.UP&&(a={rowIndex:-1,rowPinned:null,column:o.column}),i){var l=this.gridOptionsService.getCallback("navigateToNextCell");if(D(l)){var u={key:r,previousCellPosition:o,nextCellPosition:a||null,event:e},c=l(u);D(c)?(c.floating&&(ge(function(){console.warn("AG Grid: tabToNextCellFunc return type should have attributes: rowIndex, rowPinned, column. However you had 'floating', maybe you meant 'rowPinned'?")},"no floating in userCell"),c.rowPinned=c.floating),a={rowPinned:c.rowPinned,rowIndex:c.rowIndex,column:c.column}):a=null}}if(a){if(a.rowIndex<0){var d=this.headerNavigationService.getHeaderRowCount();this.focusService.focusHeaderPosition({headerPosition:{headerRowIndex:d+a.rowIndex,column:o.column},event:e||void 0,fromCell:!0});return}var f=this.getNormalisedPosition(a);f?this.focusPosition(f):this.tryToFocusFullWidthRow(a)}},t.prototype.getNormalisedPosition=function(e){this.ensureCellVisible(e);var r=this.getCellByPosition(e);return r?(e=r.getCellPosition(),this.ensureCellVisible(e),e):null},t.prototype.tryToFocusFullWidthRow=function(e,r){r===void 0&&(r=!1);var o=this.columnModel.getAllDisplayedColumns(),i=this.rowRenderer.getRowByPosition(e);if(!i||!i.isFullWidth())return!1;var a=this.focusService.getFocusedCell(),s={rowIndex:e.rowIndex,rowPinned:e.rowPinned,column:e.column||(r?Ge(o):o[0])};this.focusPosition(s);var l=a!=null?this.rowPositionUtils.before(s,a):!1,u={type:_.EVENT_FULL_WIDTH_ROW_FOCUSED,rowIndex:s.rowIndex,rowPinned:s.rowPinned,column:s.column,isFullWidthCell:!0,floating:s.rowPinned,fromBelow:l};return this.eventService.dispatchEvent(u),!0},t.prototype.focusPosition=function(e){this.focusService.setFocusedCell({rowIndex:e.rowIndex,column:e.column,rowPinned:e.rowPinned,forceBrowserFocus:!0}),this.rangeService&&this.rangeService.setRangeToCell(e)},t.prototype.isValidNavigateCell=function(e){var r=this.rowPositionUtils.getRowNode(e);return!!r},t.prototype.getLastCellOfColSpan=function(e){var r=this.getCellByPosition(e);if(!r)return e;var o=r.getColSpanningList();return o.length===1?e:{rowIndex:e.rowIndex,column:Ge(o),rowPinned:e.rowPinned}},t.prototype.ensureCellVisible=function(e){var r=this.gridOptionsService.isGroupRowsSticky(),o=this.rowModel.getRow(e.rowIndex),i=r&&o?.sticky;!i&&Z(e.rowPinned)&&this.gridBodyCon.getScrollFeature().ensureIndexVisible(e.rowIndex),e.column.isPinned()||this.gridBodyCon.getScrollFeature().ensureColumnVisible(e.column)},Kr([w("mouseEventService")],t.prototype,"mouseEventService",void 0),Kr([w("paginationProxy")],t.prototype,"paginationProxy",void 0),Kr([w("focusService")],t.prototype,"focusService",void 0),Kr([_e("rangeService")],t.prototype,"rangeService",void 0),Kr([w("columnModel")],t.prototype,"columnModel",void 0),Kr([w("rowModel")],t.prototype,"rowModel",void 0),Kr([w("ctrlsService")],t.prototype,"ctrlsService",void 0),Kr([w("rowRenderer")],t.prototype,"rowRenderer",void 0),Kr([w("headerNavigationService")],t.prototype,"headerNavigationService",void 0),Kr([w("rowPositionUtils")],t.prototype,"rowPositionUtils",void 0),Kr([w("cellNavigationService")],t.prototype,"cellNavigationService",void 0),Kr([w("pinnedRowModel")],t.prototype,"pinnedRowModel",void 0),Kr([M],t.prototype,"postConstruct",null),t=Kr([H("navigationService")],t),t}(F),l3=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(r[i]=o[i])},n(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");n(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}}(),u3=function(n,t,e,r){var o=arguments.length,i=o<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(n,t,e,r);else for(var s=n.length-1;s>=0;s--)(a=n[s])&&(i=(o<3?a(i):o>3?a(t,e,i):a(t,e))||i);return o>3&&i&&Object.defineProperty(t,e,i),i},X0=function(n){l3(t,n);function t(e){var r=n.call(this,'
')||this;return r.params=e,r}return t.prototype.postConstruct=function(){this.gridOptionsService.setDomData(this.getGui(),t.DOM_KEY_POPUP_EDITOR_WRAPPER,!0),this.addKeyDownListener()},t.prototype.addKeyDownListener=function(){var e=this,r=this.getGui(),o=this.params,i=function(a){Cg(e.gridOptionsService,a,o.node,o.column,!0)||o.onKeyDown(a)};this.addManagedListener(r,"keydown",i)},t.DOM_KEY_POPUP_EDITOR_WRAPPER="popupEditorWrapper",u3([M],t.prototype,"postConstruct",null),t}(Va),c3=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(r[i]=o[i])},n(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");n(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}}(),Q0=function(n){c3(t,n);function t(e,r,o,i,a){var s=n.call(this)||this;s.rendererVersion=0,s.editorVersion=0,s.beans=e,s.column=r.getColumn(),s.rowNode=r.getRowNode(),s.rowCtrl=r.getRowCtrl(),s.eRow=i,s.cellCtrl=r,s.setTemplate('
');var l=s.getGui();s.forceWrapper=r.isForceWrapper(),s.refreshWrapper(!1);var u=function(f,p){p!=null&&p!=""?l.setAttribute(f,p):l.removeAttribute(f)};bt(l,"gridcell"),u("col-id",r.getColumnIdSanitised());var c=r.getTabIndex();c!==void 0&&u("tabindex",c.toString());var d={addOrRemoveCssClass:function(f,p){return s.addOrRemoveCssClass(f,p)},setUserStyles:function(f){return jS(l,f)},getFocusableElement:function(){return s.getFocusableElement()},setIncludeSelection:function(f){return s.includeSelection=f},setIncludeRowDrag:function(f){return s.includeRowDrag=f},setIncludeDndSource:function(f){return s.includeDndSource=f},setRenderDetails:function(f,p,h){return s.setRenderDetails(f,p,h)},setEditDetails:function(f,p,h){return s.setEditDetails(f,p,h)},getCellEditor:function(){return s.cellEditor||null},getCellRenderer:function(){return s.cellRenderer||null},getParentOfValue:function(){return s.getParentOfValue()}};return r.setComp(d,s.getGui(),s.eCellWrapper,o,a),s}return t.prototype.getParentOfValue=function(){return this.eCellValue?this.eCellValue:this.eCellWrapper?this.eCellWrapper:this.getGui()},t.prototype.setRenderDetails=function(e,r,o){var i=this.cellEditor&&!this.cellEditorPopupWrapper;if(!i){this.firstRender=this.firstRender==null;var a=this.refreshWrapper(!1);if(this.refreshEditStyles(!1),e){var s=o||a,l=s?!1:this.refreshCellRenderer(e);l||(this.destroyRenderer(),this.createCellRendererInstance(e))}else this.destroyRenderer(),this.insertValueWithoutCellRenderer(r)}},t.prototype.setEditDetails=function(e,r,o){e?this.createCellEditorInstance(e,r,o):this.destroyEditor()},t.prototype.removeControls=function(){this.checkboxSelectionComp=this.beans.context.destroyBean(this.checkboxSelectionComp),this.dndSourceComp=this.beans.context.destroyBean(this.dndSourceComp),this.rowDraggingComp=this.beans.context.destroyBean(this.rowDraggingComp)},t.prototype.refreshWrapper=function(e){var r=this.includeRowDrag||this.includeDndSource||this.includeSelection,o=r||this.forceWrapper,i=o&&this.eCellWrapper==null;i&&(this.eCellWrapper=tr(''),this.getGui().appendChild(this.eCellWrapper));var a=!o&&this.eCellWrapper!=null;a&&(Oi(this.eCellWrapper),this.eCellWrapper=void 0),this.addOrRemoveCssClass("ag-cell-value",!o);var s=!e&&o,l=s&&this.eCellValue==null;l&&(this.eCellValue=tr(''),this.eCellWrapper.appendChild(this.eCellValue));var u=!s&&this.eCellValue!=null;u&&(Oi(this.eCellValue),this.eCellValue=void 0);var c=i||a||l||u;return c&&this.removeControls(),e||r&&this.addControls(),c},t.prototype.addControls=function(){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.eCellWrapper.insertBefore(this.dndSourceComp.getGui(),this.eCellValue)),this.includeSelection&&this.checkboxSelectionComp==null&&(this.checkboxSelectionComp=this.cellCtrl.createSelectionCheckbox(),this.eCellWrapper.insertBefore(this.checkboxSelectionComp.getGui(),this.eCellValue))},t.prototype.createCellEditorInstance=function(e,r,o){var i=this,a=this.editorVersion,s=e.newAgStackInstance();if(s){var l=e.params;s.then(function(c){return i.afterCellEditorCreated(a,c,l,r,o)});var u=Z(this.cellEditor);u&&l.cellStartedEdit&&this.cellCtrl.focusCell(!0)}},t.prototype.insertValueWithoutCellRenderer=function(e){var r=this.getParentOfValue();vr(r);var o=e!=null?xt(e):null;o!=null&&(r.innerHTML=o)},t.prototype.destroyEditorAndRenderer=function(){this.destroyRenderer(),this.destroyEditor()},t.prototype.destroyRenderer=function(){var e=this.beans.context;this.cellRenderer=e.destroyBean(this.cellRenderer),Oi(this.cellRendererGui),this.cellRendererGui=null,this.rendererVersion++},t.prototype.destroyEditor=function(){var e=this.beans.context;this.hideEditorPopup&&this.hideEditorPopup(),this.hideEditorPopup=void 0,this.cellEditor=e.destroyBean(this.cellEditor),this.cellEditorPopupWrapper=e.destroyBean(this.cellEditorPopupWrapper),Oi(this.cellEditorGui),this.cellEditorGui=null,this.editorVersion++},t.prototype.refreshCellRenderer=function(e){if(this.cellRenderer==null||this.cellRenderer.refresh==null||this.cellRendererClass!==e.componentClass)return!1;var r=this.cellRenderer.refresh(e.params);return r===!0||r===void 0},t.prototype.createCellRendererInstance=function(e){var r=this,o=this.beans.gridOptionsService.is("suppressAnimationFrame"),i=!o,a=this.rendererVersion,s=e.componentClass,l=function(){var u=r.rendererVersion!==a||!r.isAlive();if(!u){var c=e.newAgStackInstance(),d=r.afterCellRendererCreated.bind(r,a,s);c&&c.then(d)}};i&&this.firstRender?this.beans.animationFrameService.createTask(l,this.rowNode.rowIndex,"createTasksP2"):l()},t.prototype.getCtrl=function(){return this.cellCtrl},t.prototype.getRowCtrl=function(){return this.rowCtrl},t.prototype.getCellRenderer=function(){return this.cellRenderer},t.prototype.getCellEditor=function(){return this.cellEditor},t.prototype.afterCellRendererCreated=function(e,r,o){var i=!this.isAlive()||e!==this.rendererVersion;if(i){this.beans.context.destroyBean(o);return}if(this.cellRenderer=o,this.cellRendererClass=r,this.cellRendererGui=this.cellRenderer.getGui(),this.cellRendererGui!=null){var a=this.getParentOfValue();vr(a),a.appendChild(this.cellRendererGui)}},t.prototype.afterCellEditorCreated=function(e,r,o,i,a){var s=e!==this.editorVersion;if(s){this.beans.context.destroyBean(r);return}var l=r.isCancelBeforeStart&&r.isCancelBeforeStart();if(l){this.beans.context.destroyBean(r),this.cellCtrl.stopEditing(!0);return}if(!r.getGui){console.warn("AG Grid: cellEditor for column "+this.column.getId()+" is missing getGui() method"),this.beans.context.destroyBean(r);return}this.cellEditor=r,this.cellEditorGui=r.getGui();var u=i||r.isPopup!==void 0&&r.isPopup();u?this.addPopupCellEditor(o,a):this.addInCellEditor(),this.refreshEditStyles(!0,u),r.afterGuiAttached&&r.afterGuiAttached()},t.prototype.refreshEditStyles=function(e,r){var o;this.addOrRemoveCssClass("ag-cell-inline-editing",e&&!r),this.addOrRemoveCssClass("ag-cell-popup-editing",e&&!!r),this.addOrRemoveCssClass("ag-cell-not-inline-editing",!e||!!r),(o=this.rowCtrl)===null||o===void 0||o.setInlineEditingCss(e)},t.prototype.addInCellEditor=function(){var e=this.getGui(),r=this.beans.gridOptionsService.getDocument();if(e.contains(r.activeElement)&&e.focus(),this.destroyRenderer(),this.refreshWrapper(!0),this.clearParentOfValue(),this.cellEditorGui){var o=this.getParentOfValue();o.appendChild(this.cellEditorGui)}},t.prototype.addPopupCellEditor=function(e,r){var o=this;this.beans.gridOptionsService.get("editType")==="fullRow"&&console.warn("AG Grid: popup cellEditor does not work with fullRowEdit - you cannot use them both - either turn off fullRowEdit, or stop using popup editors.");var i=this.cellEditor;this.cellEditorPopupWrapper=this.beans.context.createBean(new X0(e));var a=this.cellEditorPopupWrapper.getGui();this.cellEditorGui&&a.appendChild(this.cellEditorGui);var s=this.beans.popupService,l=this.beans.gridOptionsService.is("stopEditingWhenCellsLoseFocus"),u=r??(i.getPopupPosition?i.getPopupPosition():"over"),c=this.beans.gridOptionsService.is("enableRtl"),d={ePopup:a,column:this.column,rowNode:this.rowNode,type:"popupCellEditor",eventSource:this.getGui(),position:u,alignSide:c?"right":"left",keepWithinBounds:!0},f=s.positionPopupByComponent.bind(s,d),p=this.beans.localeService.getLocaleTextFunc(),h=s.addPopup({modal:l,eChild:a,closeOnEsc:!0,closedCallback:function(){o.cellCtrl.onPopupEditorClosed()},anchorToElement:this.getGui(),positionCallback:f,ariaLabel:p("ariaLabelCellEditor","Cell Editor")});h&&(this.hideEditorPopup=h.hideFunc)},t.prototype.detach=function(){this.eRow.removeChild(this.getGui())},t.prototype.destroy=function(){this.cellCtrl.stopEditing(),this.destroyEditorAndRenderer(),this.removeControls(),n.prototype.destroy.call(this)},t.prototype.clearParentOfValue=function(){var e=this.getGui(),r=this.beans.gridOptionsService.getDocument();e.contains(r.activeElement)&&Bg()&&e.focus({preventScroll:!0}),vr(this.getParentOfValue())},t}(se),d3=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(r[i]=o[i])},n(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");n(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}}(),f3=function(n){d3(t,n);function t(e,r,o){var i=n.call(this)||this;i.cellComps={},i.beans=r,i.rowCtrl=e,i.setTemplate('
');var a=i.getGui(),s=a.style;i.domOrder=i.rowCtrl.getDomOrder(),bt(a,"row");var l=i.rowCtrl.getTabIndex();l!=null&&a.setAttribute("tabindex",l.toString());var u={setDomOrder:function(c){return i.domOrder=c},setCellCtrls:function(c){return i.setCellCtrls(c)},showFullWidth:function(c){return i.showFullWidth(c)},getFullWidthCellRenderer:function(){return i.getFullWidthCellRenderer()},addOrRemoveCssClass:function(c,d){return i.addOrRemoveCssClass(c,d)},setUserStyles:function(c){return jS(a,c)},setTop:function(c){return s.top=c},setTransform:function(c){return s.transform=c},setRowIndex:function(c){return a.setAttribute("row-index",c)},setRowId:function(c){return a.setAttribute("row-id",c)},setRowBusinessKey:function(c){return a.setAttribute("row-business-key",c)}};return e.setComp(u,i.getGui(),o),i.addDestroyFunc(function(){e.unsetComp(o)}),i}return t.prototype.getInitialStyle=function(e){var r=this.rowCtrl.getInitialTransform(e),o=this.rowCtrl.getInitialRowTop(e);return r?"transform: "+r:"top: "+o},t.prototype.showFullWidth=function(e){var r=this,o=function(a){if(r.isAlive()){var s=a.getGui();r.getGui().appendChild(s),r.rowCtrl.setupDetailRowAutoHeight(s),r.setFullWidthRowComp(a)}else r.beans.context.destroyBean(a)},i=e.newAgStackInstance();i&&i.then(o)},t.prototype.setCellCtrls=function(e){var r=this,o=Object.assign({},this.cellComps);e.forEach(function(a){var s=a.getInstanceId(),l=r.cellComps[s];l==null?r.newCellComp(a):o[s]=null});var i=oi(o).filter(function(a){return a!=null});this.destroyCells(i),this.ensureDomOrder(e)},t.prototype.ensureDomOrder=function(e){var r=this;if(this.domOrder){var o=[];e.forEach(function(i){var a=r.cellComps[i.getInstanceId()];a&&o.push(a.getGui())}),US(this.getGui(),o)}},t.prototype.newCellComp=function(e){var r=new Q0(this.beans,e,this.rowCtrl.isPrintLayout(),this.getGui(),this.rowCtrl.isEditing());this.cellComps[e.getInstanceId()]=r,this.getGui().appendChild(r.getGui())},t.prototype.destroy=function(){n.prototype.destroy.call(this),this.destroyAllCells()},t.prototype.destroyAllCells=function(){var e=oi(this.cellComps).filter(function(r){return r!=null});this.destroyCells(e)},t.prototype.setFullWidthRowComp=function(e){var r=this;this.fullWidthCellRenderer&&console.error("AG Grid - should not be setting fullWidthRowComponent twice"),this.fullWidthCellRenderer=e,this.addDestroyFunc(function(){r.fullWidthCellRenderer=r.beans.context.destroyBean(r.fullWidthCellRenderer)})},t.prototype.getFullWidthCellRenderer=function(){return this.fullWidthCellRenderer},t.prototype.destroyCells=function(e){var r=this;e.forEach(function(o){if(o){var i=o.getCtrl().getInstanceId();r.cellComps[i]===o&&(o.detach(),o.destroy(),r.cellComps[i]=null)}})},t}(se),p3=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(r[i]=o[i])},n(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");n(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}}(),wS=function(){return wS=Object.assign||function(n){for(var t,e=1,r=arguments.length;e=0;s--)(a=n[s])&&(i=(o<3?a(i):o>3?a(t,e,i):a(t,e))||i);return o>3&&i&&Object.defineProperty(t,e,i),i};function h3(){var n=se.elementGettingCreated.getAttribute("name"),t=u_.getRowContainerCssClasses(n),e,r=n===g.RowContainerName.CENTER||n===g.RowContainerName.TOP_CENTER||n===g.RowContainerName.STICKY_TOP_CENTER||n===g.RowContainerName.BOTTOM_CENTER;return r?e='`:e='
',e}var J0=function(n){p3(t,n);function t(){var e=n.call(this,h3())||this;return e.rowComps={},e.name=se.elementGettingCreated.getAttribute("name"),e.type=z0(e.name),e}return t.prototype.postConstruct=function(){var e=this,r={setViewportHeight:function(i){return e.eViewport.style.height=i},setRowCtrls:function(i){return e.setRowCtrls(i)},setDomOrder:function(i){e.domOrder=i},setContainerWidth:function(i){return e.eContainer.style.width=i}},o=this.createManagedBean(new u_(this.name));o.setComp(r,this.eContainer,this.eViewport)},t.prototype.preDestroy=function(){this.setRowCtrls([])},t.prototype.setRowCtrls=function(e){var r=this,o=wS({},this.rowComps);this.rowComps={},this.lastPlacedElement=null;var i=function(a){var s=a.getInstanceId(),l=o[s];if(l)r.rowComps[s]=l,delete o[s],r.ensureDomOrder(l.getGui());else{if(!a.getRowNode().displayed)return;var u=new f3(a,r.beans,r.type);r.rowComps[s]=u,r.appendRow(u.getGui())}};e.forEach(i),oi(o).forEach(function(a){r.eContainer.removeChild(a.getGui()),a.destroy()}),bt(this.eContainer,e.length?"rowgroup":"presentation")},t.prototype.appendRow=function(e){this.domOrder?XD(this.eContainer,e,this.lastPlacedElement):this.eContainer.appendChild(e),this.lastPlacedElement=e},t.prototype.ensureDomOrder=function(e){this.domOrder&&(WS(this.eContainer,e,this.lastPlacedElement),this.lastPlacedElement=e)},Uc([w("beans")],t.prototype,"beans",void 0),Uc([G("eViewport")],t.prototype,"eViewport",void 0),Uc([G("eContainer")],t.prototype,"eContainer",void 0),Uc([M],t.prototype,"postConstruct",null),Uc([Mt],t.prototype,"preDestroy",null),t}(se),mI=function(n,t,e,r){var o=arguments.length,i=o<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(n,t,e,r);else for(var s=n.length-1;s>=0;s--)(a=n[s])&&(i=(o<3?a(i):o>3?a(t,e,i):a(t,e))||i);return o>3&&i&&Object.defineProperty(t,e,i),i},Z0=function(){function n(t){this.columnsToAggregate=[],this.columnsToGroup=[],this.columnsToPivot=[],this.pinned=t}return n.prototype.onDragEnter=function(t){var e=this;if(this.clearColumnsList(),!this.gridOptionsService.is("functionsReadOnly")){var r=t.dragItem.columns;r&&r.forEach(function(o){o.isPrimary()&&(o.isAnyFunctionActive()||(o.isAllowValue()?e.columnsToAggregate.push(o):o.isAllowRowGroup()?e.columnsToGroup.push(o):o.isAllowPivot()&&e.columnsToPivot.push(o)))})}},n.prototype.getIconName=function(){var t=this.columnsToAggregate.length+this.columnsToGroup.length+this.columnsToPivot.length;return t>0?this.pinned?Ft.ICON_PINNED:Ft.ICON_MOVE:null},n.prototype.onDragLeave=function(t){this.clearColumnsList()},n.prototype.clearColumnsList=function(){this.columnsToAggregate.length=0,this.columnsToGroup.length=0,this.columnsToPivot.length=0},n.prototype.onDragging=function(t){},n.prototype.onDragStop=function(t){this.columnsToAggregate.length>0&&this.columnModel.addValueColumns(this.columnsToAggregate,"toolPanelDragAndDrop"),this.columnsToGroup.length>0&&this.columnModel.addRowGroupColumns(this.columnsToGroup,"toolPanelDragAndDrop"),this.columnsToPivot.length>0&&this.columnModel.addPivotColumns(this.columnsToPivot,"toolPanelDragAndDrop")},mI([w("columnModel")],n.prototype,"columnModel",void 0),mI([w("gridOptionsService")],n.prototype,"gridOptionsService",void 0),n}(),jc=function(n,t,e,r){var o=arguments.length,i=o<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(n,t,e,r);else for(var s=n.length-1;s>=0;s--)(a=n[s])&&(i=(o<3?a(i):o>3?a(t,e,i):a(t,e))||i);return o>3&&i&&Object.defineProperty(t,e,i),i},g3=function(n,t){var e=typeof Symbol=="function"&&n[Symbol.iterator];if(!e)return n;var r=e.call(n),o,i=[],a;try{for(;(t===void 0||t-- >0)&&!(o=r.next()).done;)i.push(o.value)}catch(s){a={error:s}}finally{try{o&&!o.done&&(e=r.return)&&e.call(r)}finally{if(a)throw a.error}}return i},eA=function(){function n(t,e){this.needToMoveLeft=!1,this.needToMoveRight=!1,this.lastMovedInfo=null,this.pinned=t,this.eContainer=e,this.centerContainer=!D(t)}return n.prototype.init=function(){var t=this;this.ctrlsService.whenReady(function(){t.gridBodyCon=t.ctrlsService.getGridBodyCtrl()})},n.prototype.getIconName=function(){return this.pinned?Ft.ICON_PINNED:Ft.ICON_MOVE},n.prototype.onDragEnter=function(t){var e=t.dragItem.columns,r=t.dragSource.type===g.DragSourceType.ToolPanel;if(r)this.setColumnsVisible(e,!0,"uiColumnDragged");else{var o=t.dragItem.visibleState,i=(e||[]).filter(function(a){return o[a.getId()]});this.setColumnsVisible(i,!0,"uiColumnDragged")}this.setColumnsPinned(e,this.pinned,"uiColumnDragged"),this.onDragging(t,!0,!0)},n.prototype.onDragLeave=function(){this.ensureIntervalCleared(),this.lastMovedInfo=null},n.prototype.setColumnsVisible=function(t,e,r){if(r===void 0&&(r="api"),t){var o=t.filter(function(i){return!i.getColDef().lockVisible});this.columnModel.setColumnsVisible(o,e,r)}},n.prototype.setColumnsPinned=function(t,e,r){if(r===void 0&&(r="api"),t){var o=t.filter(function(i){return!i.getColDef().lockPinned});this.columnModel.setColumnsPinned(o,e,r)}},n.prototype.onDragStop=function(){this.onDragging(this.lastDraggingEvent,!1,!0,!0),this.ensureIntervalCleared(),this.lastMovedInfo=null},n.prototype.normaliseX=function(t){if(this.gridOptionsService.is("enableRtl")){var e=this.eContainer.clientWidth;t=e-t}return this.centerContainer&&(t+=this.ctrlsService.getCenterRowContainerCtrl().getCenterViewportScrollLeft()),t},n.prototype.checkCenterForScrolling=function(t){if(this.centerContainer){var e=this.ctrlsService.getCenterRowContainerCtrl().getCenterViewportScrollLeft(),r=e+this.ctrlsService.getCenterRowContainerCtrl().getCenterWidth();this.gridOptionsService.is("enableRtl")?(this.needToMoveRight=tr-50):(this.needToMoveLeft=tr-50),this.needToMoveLeft||this.needToMoveRight?this.ensureIntervalStarted():this.ensureIntervalCleared()}},n.prototype.onDragging=function(t,e,r,o){var i=this,a;if(t===void 0&&(t=this.lastDraggingEvent),e===void 0&&(e=!1),r===void 0&&(r=!1),o===void 0&&(o=!1),o){if(this.lastMovedInfo){var s=this.lastMovedInfo,l=s.columns,u=s.toIndex;this.moveColumns(l,u,"uiColumnMoved",!0)}return}if(this.lastDraggingEvent=t,!Z(t.hDirection)){var c=this.normaliseX(t.x);e||this.checkCenterForScrolling(c);var d=this.normaliseDirection(t.hDirection),f=t.dragSource.type,p=((a=t.dragSource.getDragItem().columns)===null||a===void 0?void 0:a.filter(function(h){return h.getColDef().lockPinned?h.getPinned()==i.pinned:!0}))||[];this.attemptMoveColumns({dragSourceType:f,allMovingColumns:p,hDirection:d,mouseX:c,fromEnter:e,fakeEvent:r})}},n.prototype.normaliseDirection=function(t){if(this.gridOptionsService.is("enableRtl"))switch(t){case g.HorizontalDirection.Left:return g.HorizontalDirection.Right;case g.HorizontalDirection.Right:return g.HorizontalDirection.Left;default:console.error("AG Grid: Unknown direction "+t)}else return t},n.prototype.attemptMoveColumns=function(t){var e=t.dragSourceType,r=t.hDirection,o=t.mouseX,i=t.fromEnter,a=t.fakeEvent,s=r===g.HorizontalDirection.Left,l=r===g.HorizontalDirection.Right,u=t.allMovingColumns;if(e===g.DragSourceType.HeaderCell){var c=[];u.forEach(function(T){for(var L,I=null,b=T.getParent();b!=null&&b.getDisplayedLeafColumns().length===1;)I=b,b=b.getParent();if(I!=null){var W=!!(!((L=I.getColGroupDef())===null||L===void 0)&&L.marryChildren),Y=W?I.getProvidedColumnGroup().getLeafColumns():I.getLeafColumns();Y.forEach(function(ue){c.includes(ue)||c.push(ue)})}else c.includes(T)||c.push(T)}),u=c}var d=u.slice();this.columnModel.sortColumnsLikeGridColumns(d);var f=this.calculateValidMoves(d,l,o),p=this.calculateOldIndex(d);if(f.length!==0){var h=f[0],v=p!==null&&!i;if(e==g.DragSourceType.HeaderCell&&(v=p!==null),!(v&&!a&&(s&&h>=p||l&&h<=p))){for(var C=this.columnModel.getAllDisplayedColumns(),m=[],y=null,S=0;Su.length?[l,u]:[u,l],2),l=s[0],u=s[1],l.forEach(function(c){u.indexOf(c)===-1&&r++})},i=0;i0){for(var p=0;p0){var C=l[c-1];v=u.indexOf(C)+1}else v=u.indexOf(l[0]),v===-1&&(v=0);var m=[v],y=function(P,T){return P-T};if(e){for(var S=v+1,E=a.length-1;S<=E;)m.push(S),S++;m.sort(y)}else{for(var S=v,E=a.length-1,R=a[S];S<=E&&this.isColumnHidden(i,R);)S++,m.push(S),R=a[S];S=v-1;for(var x=0;S>=x;)m.push(S),S--;m.sort(y).reverse()}return m},n.prototype.isColumnHidden=function(t,e){return t.indexOf(e)<0},n.prototype.ensureIntervalStarted=function(){this.movingIntervalId||(this.intervalCount=0,this.failedMoveAttempts=0,this.movingIntervalId=window.setInterval(this.moveInterval.bind(this),100),this.needToMoveLeft?this.dragAndDropService.setGhostIcon(Ft.ICON_LEFT,!0):this.dragAndDropService.setGhostIcon(Ft.ICON_RIGHT,!0))},n.prototype.ensureIntervalCleared=function(){this.movingIntervalId&&(window.clearInterval(this.movingIntervalId),this.movingIntervalId=null,this.dragAndDropService.setGhostIcon(Ft.ICON_MOVE))},n.prototype.moveInterval=function(){var t;this.intervalCount++,t=10+this.intervalCount*5,t>100&&(t=100);var e=null,r=this.gridBodyCon.getScrollFeature();if(this.needToMoveLeft?e=r.scrollHorizontally(-t):this.needToMoveRight&&(e=r.scrollHorizontally(t)),e!==0)this.onDragging(this.lastDraggingEvent),this.failedMoveAttempts=0;else{this.failedMoveAttempts++;var o=this.lastDraggingEvent.dragItem.columns,i=o.filter(function(s){return!s.getColDef().lockPinned});if(i.length>0&&(this.dragAndDropService.setGhostIcon(Ft.ICON_PINNED),this.failedMoveAttempts>7)){var a=this.needToMoveLeft?"left":"right";this.setColumnsPinned(i,a,"uiColumnDragged"),this.dragAndDropService.nudge()}}},jc([w("columnModel")],n.prototype,"columnModel",void 0),jc([w("dragAndDropService")],n.prototype,"dragAndDropService",void 0),jc([w("gridOptionsService")],n.prototype,"gridOptionsService",void 0),jc([w("ctrlsService")],n.prototype,"ctrlsService",void 0),jc([M],n.prototype,"init",null),n}(),v3=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(r[i]=o[i])},n(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");n(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}}(),zc=function(n,t,e,r){var o=arguments.length,i=o<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(n,t,e,r);else for(var s=n.length-1;s>=0;s--)(a=n[s])&&(i=(o<3?a(i):o>3?a(t,e,i):a(t,e))||i);return o>3&&i&&Object.defineProperty(t,e,i),i},tA=function(n){v3(t,n);function t(e,r){var o=n.call(this)||this;return o.pinned=e,o.eContainer=r,o}return t.prototype.postConstruct=function(){var e=this;this.ctrlsService.whenReady(function(r){switch(e.pinned){case"left":e.eSecondaryContainers=[[r.gridBodyCtrl.getBodyViewportElement(),r.leftRowContainerCtrl.getContainerElement()],[r.bottomLeftRowContainerCtrl.getContainerElement()],[r.topLeftRowContainerCtrl.getContainerElement()]];break;case"right":e.eSecondaryContainers=[[r.gridBodyCtrl.getBodyViewportElement(),r.rightRowContainerCtrl.getContainerElement()],[r.bottomRightRowContainerCtrl.getContainerElement()],[r.topRightRowContainerCtrl.getContainerElement()]];break;default:e.eSecondaryContainers=[[r.gridBodyCtrl.getBodyViewportElement(),r.centerRowContainerCtrl.getViewportElement()],[r.bottomCenterRowContainerCtrl.getViewportElement()],[r.topCenterRowContainerCtrl.getViewportElement()]];break}})},t.prototype.isInterestedIn=function(e){return e===g.DragSourceType.HeaderCell||e===g.DragSourceType.ToolPanel&&this.gridOptionsService.is("allowDragFromColumnsToolPanel")},t.prototype.getSecondaryContainers=function(){return this.eSecondaryContainers},t.prototype.getContainer=function(){return this.eContainer},t.prototype.init=function(){this.moveColumnFeature=this.createManagedBean(new eA(this.pinned,this.eContainer)),this.bodyDropPivotTarget=this.createManagedBean(new Z0(this.pinned)),this.dragAndDropService.addDropTarget(this)},t.prototype.getIconName=function(){return this.currentDropListener.getIconName()},t.prototype.isDropColumnInPivotMode=function(e){return this.columnModel.isPivotMode()&&e.dragSource.type===g.DragSourceType.ToolPanel},t.prototype.onDragEnter=function(e){this.currentDropListener=this.isDropColumnInPivotMode(e)?this.bodyDropPivotTarget:this.moveColumnFeature,this.currentDropListener.onDragEnter(e)},t.prototype.onDragLeave=function(e){this.currentDropListener.onDragLeave(e)},t.prototype.onDragging=function(e){this.currentDropListener.onDragging(e)},t.prototype.onDragStop=function(e){this.currentDropListener.onDragStop(e)},zc([w("dragAndDropService")],t.prototype,"dragAndDropService",void 0),zc([w("columnModel")],t.prototype,"columnModel",void 0),zc([w("ctrlsService")],t.prototype,"ctrlsService",void 0),zc([M],t.prototype,"postConstruct",null),zc([M],t.prototype,"init",null),t}(F),m3=function(n,t){var e=typeof Symbol=="function"&&n[Symbol.iterator];if(!e)return n;var r=e.call(n),o,i=[],a;try{for(;(t===void 0||t-- >0)&&!(o=r.next()).done;)i.push(o.value)}catch(s){a={error:s}}finally{try{o&&!o.done&&(e=r.return)&&e.call(r)}finally{if(a)throw a.error}}return i},y3=function(n,t){for(var e=0,r=t.length,o=n.length;e=0;s--)(a=n[s])&&(i=(o<3?a(i):o>3?a(t,e,i):a(t,e))||i);return o>3&&i&&Object.defineProperty(t,e,i),i},w3=function(n){C3(t,n);function t(e){var r=n.call(this,t.TEMPLATE,e)||this;return r.headerCompVersion=0,r.column=e.getColumnGroupChild(),r.pinned=e.getPinned(),r}return t.prototype.postConstruct=function(){var e=this,r=this.getGui(),o=function(s,l){l!=null&&l!=""?r.setAttribute(s,l):r.removeAttribute(s)};o("col-id",this.column.getColId());var i={setWidth:function(s){return r.style.width=s},addOrRemoveCssClass:function(s,l){return e.addOrRemoveCssClass(s,l)},setAriaDescription:function(s){return LD(r,s)},setAriaSort:function(s){return s?kD(r,s):HD(r)},setUserCompDetails:function(s){return e.setUserCompDetails(s)},getUserCompInstance:function(){return e.headerComp}};this.ctrl.setComp(i,this.getGui(),this.eResize,this.eHeaderCompWrapper);var a=this.ctrl.getSelectAllGui();this.eResize.insertAdjacentElement("afterend",a)},t.prototype.destroyHeaderComp=function(){this.headerComp&&(this.eHeaderCompWrapper.removeChild(this.headerCompGui),this.headerComp=this.destroyBean(this.headerComp),this.headerCompGui=void 0)},t.prototype.setUserCompDetails=function(e){var r=this;this.headerCompVersion++;var o=this.headerCompVersion;e.newAgStackInstance().then(function(i){return r.afterCompCreated(o,i)})},t.prototype.afterCompCreated=function(e,r){if(e!=this.headerCompVersion||!this.isAlive()){this.destroyBean(r);return}this.destroyHeaderComp(),this.headerComp=r,this.headerCompGui=r.getGui(),this.eHeaderCompWrapper.appendChild(this.headerCompGui),this.ctrl.setDragSource(this.getGui())},t.TEMPLATE=`
`,jh([G("eResize")],t.prototype,"eResize",void 0),jh([G("eHeaderCompWrapper")],t.prototype,"eHeaderCompWrapper",void 0),jh([M],t.prototype,"postConstruct",null),jh([Mt],t.prototype,"destroyHeaderComp",null),t}(i_),S3=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(r[i]=o[i])},n(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");n(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}}(),Dw=function(n,t,e,r){var o=arguments.length,i=o<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(n,t,e,r);else for(var s=n.length-1;s>=0;s--)(a=n[s])&&(i=(o<3?a(i):o>3?a(t,e,i):a(t,e))||i);return o>3&&i&&Object.defineProperty(t,e,i),i},_3=function(n){S3(t,n);function t(e){return n.call(this,t.TEMPLATE,e)||this}return t.prototype.postConstruct=function(){var e=this,r=this.getGui(),o=function(a,s){return s!=null?r.setAttribute(a,s):r.removeAttribute(a)};r.setAttribute("col-id",this.ctrl.getColId());var i={addOrRemoveCssClass:function(a,s){return e.addOrRemoveCssClass(a,s)},setResizableDisplayed:function(a){return we(e.eResize,a)},setWidth:function(a){return r.style.width=a},setAriaExpanded:function(a){return o("aria-expanded",a)},setUserCompDetails:function(a){return e.setUserCompDetails(a)}};this.ctrl.setComp(i,r,this.eResize)},t.prototype.setUserCompDetails=function(e){var r=this;e.newAgStackInstance().then(function(o){return r.afterHeaderCompCreated(o)})},t.prototype.afterHeaderCompCreated=function(e){var r=this,o=function(){return r.destroyBean(e)};if(!this.isAlive()){o();return}var i=this.getGui(),a=e.getGui();i.appendChild(a),this.addDestroyFunc(o),this.ctrl.setDragSource(i)},t.TEMPLATE=`
`,Dw([w("userComponentFactory")],t.prototype,"userComponentFactory",void 0),Dw([G("eResize")],t.prototype,"eResize",void 0),Dw([M],t.prototype,"postConstruct",null),t}(i_),E3=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(r[i]=o[i])},n(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");n(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}}(),yI=function(n,t,e,r){var o=arguments.length,i=o<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(n,t,e,r);else for(var s=n.length-1;s>=0;s--)(a=n[s])&&(i=(o<3?a(i):o>3?a(t,e,i):a(t,e))||i);return o>3&&i&&Object.defineProperty(t,e,i),i};(function(n){n.COLUMN_GROUP="group",n.COLUMN="column",n.FLOATING_FILTER="filter"})(g.HeaderRowType||(g.HeaderRowType={}));var rA=function(n){E3(t,n);function t(e){var r=n.call(this)||this;return r.headerComps={},r.ctrl=e,r.setTemplate('
'),r}return t.prototype.init=function(){var e=this;this.getGui().style.transform=this.ctrl.getTransform(),AS(this.getGui(),this.ctrl.getAriaRowIndex());var r={setHeight:function(o){return e.getGui().style.height=o},setTop:function(o){return e.getGui().style.top=o},setHeaderCtrls:function(o,i){return e.setHeaderCtrls(o,i)},setWidth:function(o){return e.getGui().style.width=o}};this.ctrl.setComp(r)},t.prototype.destroyHeaderCtrls=function(){this.setHeaderCtrls([],!1)},t.prototype.setHeaderCtrls=function(e,r){var o=this;if(this.isAlive()){var i=this.headerComps;if(this.headerComps={},e.forEach(function(l){var u=l.getInstanceId(),c=i[u];delete i[u],c==null&&(c=o.createHeaderComp(l),o.getGui().appendChild(c.getGui())),o.headerComps[u]=c}),st(i,function(l,u){o.getGui().removeChild(u.getGui()),o.destroyBean(u)}),r){var a=oi(this.headerComps);a.sort(function(l,u){var c=l.getCtrl().getColumnGroupChild().getLeft(),d=u.getCtrl().getColumnGroupChild().getLeft();return c-d});var s=a.map(function(l){return l.getGui()});US(this.getGui(),s)}}},t.prototype.createHeaderComp=function(e){var r;switch(this.ctrl.getType()){case g.HeaderRowType.COLUMN_GROUP:r=new _3(e);break;case g.HeaderRowType.FLOATING_FILTER:r=new B0(e);break;default:r=new w3(e);break}return this.createBean(r),r.setParentComponent(this),r},yI([M],t.prototype,"init",null),yI([Mt],t.prototype,"destroyHeaderCtrls",null),t}(se),R3=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(r[i]=o[i])},n(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");n(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}}(),Aw=function(n,t,e,r){var o=arguments.length,i=o<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(n,t,e,r);else for(var s=n.length-1;s>=0;s--)(a=n[s])&&(i=(o<3?a(i):o>3?a(t,e,i):a(t,e))||i);return o>3&&i&&Object.defineProperty(t,e,i),i},T3=0,Td=function(n){R3(t,n);function t(e,r){var o=n.call(this)||this;return o.lastFocusEvent=null,o.columnGroupChild=e,o.parentRowCtrl=r,o.instanceId=e.getUniqueId()+"-"+T3++,o}return t.prototype.shouldStopEventPropagation=function(e){var r=this.focusService.getFocusedHeader(),o=r.headerRowIndex,i=r.column;return r0(this.gridOptionsService,e,o,i)},t.prototype.getWrapperHasFocus=function(){var e=this.gridOptionsService.getDocument(),r=e.activeElement;return r===this.eGui},t.prototype.setGui=function(e){this.eGui=e,this.addDomData()},t.prototype.handleKeyDown=function(e){var r=this.getWrapperHasFocus();switch(e.key){case O.PAGE_DOWN:case O.PAGE_UP:case O.PAGE_HOME:case O.PAGE_END:r&&e.preventDefault()}},t.prototype.addDomData=function(){var e=this,r=t.DOM_DATA_KEY_HEADER_CTRL;this.gridOptionsService.setDomData(this.eGui,r,this),this.addDestroyFunc(function(){return e.gridOptionsService.setDomData(e.eGui,r,null)})},t.prototype.getGui=function(){return this.eGui},t.prototype.focus=function(e){return this.eGui?(this.lastFocusEvent=e||null,this.eGui.focus(),!0):!1},t.prototype.getRowIndex=function(){return this.parentRowCtrl.getRowIndex()},t.prototype.getParentRowCtrl=function(){return this.parentRowCtrl},t.prototype.getPinned=function(){return this.parentRowCtrl.getPinned()},t.prototype.getInstanceId=function(){return this.instanceId},t.prototype.getColumnGroupChild=function(){return this.columnGroupChild},t.DOM_DATA_KEY_HEADER_CTRL="headerCtrl",Aw([w("focusService")],t.prototype,"focusService",void 0),Aw([w("beans")],t.prototype,"beans",void 0),Aw([w("userComponentFactory")],t.prototype,"userComponentFactory",void 0),t}(F),x3=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(r[i]=o[i])},n(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");n(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}}(),P3=function(n,t,e,r){var o=arguments.length,i=o<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(n,t,e,r);else for(var s=n.length-1;s>=0;s--)(a=n[s])&&(i=(o<3?a(i):o>3?a(t,e,i):a(t,e))||i);return o>3&&i&&Object.defineProperty(t,e,i),i},Zg=function(n){x3(t,n);function t(e,r,o,i){var a=n.call(this)||this;return a.columnOrGroup=e,a.eCell=r,a.ariaEl=a.eCell.querySelector("[role=columnheader]")||a.eCell,a.colsSpanning=i,a.beans=o,a}return t.prototype.setColsSpanning=function(e){this.colsSpanning=e,this.onLeftChanged()},t.prototype.getColumnOrGroup=function(){return this.beans.gridOptionsService.is("enableRtl")&&this.colsSpanning?Ge(this.colsSpanning):this.columnOrGroup},t.prototype.postConstruct=function(){this.addManagedListener(this.columnOrGroup,Ne.EVENT_LEFT_CHANGED,this.onLeftChanged.bind(this)),this.setLeftFirstTime(),this.addManagedListener(this.eventService,_.EVENT_DISPLAYED_COLUMNS_WIDTH_CHANGED,this.onLeftChanged.bind(this)),this.addManagedPropertyListener("domLayout",this.onLeftChanged.bind(this))},t.prototype.setLeftFirstTime=function(){var e=this.beans.gridOptionsService.is("suppressColumnMoveAnimation"),r=D(this.columnOrGroup.getOldLeft()),o=this.beans.columnAnimationService.isActive()&&r&&!e;o?this.animateInLeft():this.onLeftChanged()},t.prototype.animateInLeft=function(){var e=this,r=this.getColumnOrGroup(),o=r.getLeft(),i=r.getOldLeft(),a=this.modifyLeftForPrintLayout(r,i),s=this.modifyLeftForPrintLayout(r,o);this.setLeft(a),this.actualLeft=s,this.beans.columnAnimationService.executeNextVMTurn(function(){e.actualLeft===s&&e.setLeft(s)})},t.prototype.onLeftChanged=function(){var e=this.getColumnOrGroup(),r=e.getLeft();this.actualLeft=this.modifyLeftForPrintLayout(e,r),this.setLeft(this.actualLeft)},t.prototype.modifyLeftForPrintLayout=function(e,r){var o=this.beans.gridOptionsService.isDomLayout("print");if(!o||e.getPinned()==="left")return r;var i=this.beans.columnModel.getDisplayedColumnsLeftWidth();if(e.getPinned()==="right"){var a=this.beans.columnModel.getBodyContainerWidth();return i+a+r}return i+r},t.prototype.setLeft=function(e){D(e)&&(this.eCell.style.left=e+"px");var r;if(this.columnOrGroup instanceof Ne)r=this.columnOrGroup;else{var o=this.columnOrGroup,i=o.getLeafColumns();if(!i.length)return;i.length>1&&GD(this.ariaEl,i.length),r=i[0]}var a=this.beans.columnModel.getAriaColumnIndex(r);FS(this.ariaEl,a)},P3([M],t.prototype,"postConstruct",null),t}(F),O3=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(r[i]=o[i])},n(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");n(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}}(),CI=function(n,t,e,r){var o=arguments.length,i=o<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(n,t,e,r);else for(var s=n.length-1;s>=0;s--)(a=n[s])&&(i=(o<3?a(i):o>3?a(t,e,i):a(t,e))||i);return o>3&&i&&Object.defineProperty(t,e,i),i},d_=function(n){O3(t,n);function t(e,r){var o=n.call(this)||this;return o.columns=e,o.element=r,o}return t.prototype.postConstruct=function(){this.gridOptionsService.is("columnHoverHighlight")&&this.addMouseHoverListeners()},t.prototype.addMouseHoverListeners=function(){this.addManagedListener(this.element,"mouseout",this.onMouseOut.bind(this)),this.addManagedListener(this.element,"mouseover",this.onMouseOver.bind(this))},t.prototype.onMouseOut=function(){this.columnHoverService.clearMouseOver()},t.prototype.onMouseOver=function(){this.columnHoverService.setMouseOver(this.columns)},CI([w("columnHoverService")],t.prototype,"columnHoverService",void 0),CI([M],t.prototype,"postConstruct",null),t}(F),L3=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(r[i]=o[i])},n(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");n(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}}(),Fw=function(n,t,e,r){var o=arguments.length,i=o<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(n,t,e,r);else for(var s=n.length-1;s>=0;s--)(a=n[s])&&(i=(o<3?a(i):o>3?a(t,e,i):a(t,e))||i);return o>3&&i&&Object.defineProperty(t,e,i),i},nA=function(n){L3(t,n);function t(e,r){var o=n.call(this,e,r)||this;return o.iconCreated=!1,o.column=e,o}return t.prototype.setComp=function(e,r,o,i){n.prototype.setGui.call(this,r),this.comp=e,this.eButtonShowMainFilter=o,this.eFloatingFilterBody=i,this.setupActive(),this.setupWidth(),this.setupLeft(),this.setupHover(),this.setupFocus(),this.setupAria(),this.setupFilterButton(),this.setupUserComp(),this.setupSyncWithFilter(),this.setupUi(),this.addManagedListener(this.eButtonShowMainFilter,"click",this.showParentFilter.bind(this)),this.setupFilterChangedListener(),this.addManagedListener(this.column,Ne.EVENT_COL_DEF_CHANGED,this.onColDefChanged.bind(this))},t.prototype.setupActive=function(){var e=this.column.getColDef(),r=!!e.filter,o=!!e.floatingFilter;this.active=r&&o},t.prototype.setupUi=function(){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)){var e=_t("filter",this.gridOptionsService,this.column);e&&(this.iconCreated=!0,this.eButtonShowMainFilter.appendChild(e))}},t.prototype.setupFocus=function(){this.createManagedBean(new Di(this.eGui,{shouldStopEventPropagation:this.shouldStopEventPropagation.bind(this),onTabKeyDown:this.onTabKeyDown.bind(this),handleKeyDown:this.handleKeyDown.bind(this),onFocusIn:this.onFocusIn.bind(this)}))},t.prototype.setupAria=function(){var e=this.localeService.getLocaleTextFunc();Ii(this.eButtonShowMainFilter,e("ariaFilterMenuOpen","Open Filter Menu"))},t.prototype.onTabKeyDown=function(e){var r=this.gridOptionsService.getDocument(),o=r.activeElement,i=o===this.eGui;if(!i){var a=this.focusService.findNextFocusableElement(this.eGui,null,e.shiftKey);if(a){this.beans.headerNavigationService.scrollToColumn(this.column),e.preventDefault(),a.focus();return}var s=this.findNextColumnWithFloatingFilter(e.shiftKey);s&&this.focusService.focusHeaderPosition({headerPosition:{headerRowIndex:this.getParentRowCtrl().getRowIndex(),column:s},event:e})&&e.preventDefault()}},t.prototype.findNextColumnWithFloatingFilter=function(e){var r=this.beans.columnModel,o=this.column;do if(o=e?r.getDisplayedColBefore(o):r.getDisplayedColAfter(o),!o)break;while(!o.getColDef().filter||!o.getColDef().floatingFilter);return o},t.prototype.handleKeyDown=function(e){n.prototype.handleKeyDown.call(this,e);var r=this.getWrapperHasFocus();switch(e.key){case O.UP:case O.DOWN:r||e.preventDefault();case O.LEFT:case O.RIGHT:if(r)return;e.stopPropagation();case O.ENTER:r&&this.focusService.focusInto(this.eGui)&&e.preventDefault();break;case O.ESCAPE:r||this.eGui.focus()}},t.prototype.onFocusIn=function(e){var r=this.eGui.contains(e.relatedTarget);if(!r){var o=!!e.relatedTarget&&!e.relatedTarget.classList.contains("ag-floating-filter"),i=!!e.relatedTarget&&xs(e.relatedTarget,"ag-floating-filter");if(o&&i&&e.target===this.eGui){var a=this.lastFocusEvent,s=!!(a&&a.key===O.TAB);if(a&&s){var l=a.shiftKey;this.focusService.focusInto(this.eGui,l)}}var u=this.getRowIndex();this.beans.focusService.setFocusedHeader(u,this.column)}},t.prototype.setupHover=function(){var e=this;this.createManagedBean(new d_([this.column],this.eGui));var r=function(){if(e.gridOptionsService.is("columnHoverHighlight")){var o=e.columnHoverService.isHovered(e.column);e.comp.addOrRemoveCssClass("ag-column-hover",o)}};this.addManagedListener(this.eventService,_.EVENT_COLUMN_HOVER_CHANGED,r),r()},t.prototype.setupLeft=function(){var e=new Zg(this.column,this.eGui,this.beans);this.createManagedBean(e)},t.prototype.setupFilterButton=function(){var e=this.column.getColDef();this.suppressFilterButton=e.floatingFilterComponentParams?!!e.floatingFilterComponentParams.suppressFilterButton:!1},t.prototype.setupUserComp=function(){var e=this;if(this.active){var r=this.filterManager.getFloatingFilterCompDetails(this.column,function(){return e.showParentFilter()});r&&this.setCompDetails(r)}},t.prototype.setCompDetails=function(e){this.userCompDetails=e,this.comp.setCompDetails(e)},t.prototype.showParentFilter=function(){var e=this.suppressFilterButton?this.eFloatingFilterBody:this.eButtonShowMainFilter;this.menuFactory.showMenuAfterButtonClick(this.column,e,"floatingFilter","filterMenuTab",["filterMenuTab"])},t.prototype.setupSyncWithFilter=function(){var e=this;if(this.active){var r=function(o){var i=e.comp.getFloatingFilterComp();i&&i.then(function(a){if(a){var s=e.filterManager.getCurrentFloatingFilterParentModel(e.column);a.onParentModelChanged(s,o)}})};this.destroySyncListener=this.addManagedListener(this.column,Ne.EVENT_FILTER_CHANGED,r),this.filterManager.isFilterActive(this.column)&&r(null)}},t.prototype.setupWidth=function(){var e=this,r=function(){var o=e.column.getActualWidth()+"px";e.comp.setWidth(o)};this.addManagedListener(this.column,Ne.EVENT_WIDTH_CHANGED,r),r()},t.prototype.setupFilterChangedListener=function(){this.active&&(this.destroyFilterChangedListener=this.addManagedListener(this.column,Ne.EVENT_FILTER_CHANGED,this.updateFilterButton.bind(this)))},t.prototype.updateFilterButton=function(){!this.suppressFilterButton&&this.comp&&this.comp.setButtonWrapperDisplayed(this.filterManager.isFilterAllowed(this.column))},t.prototype.onColDefChanged=function(){var e=this,r,o,i=this.active;this.setupActive();var a=!i&&this.active;i&&!this.active&&((r=this.destroySyncListener)===null||r===void 0||r.call(this),(o=this.destroyFilterChangedListener)===null||o===void 0||o.call(this));var s=this.active?this.filterManager.getFloatingFilterCompDetails(this.column,function(){return e.showParentFilter()}):null,l=this.comp.getFloatingFilterComp();!l||!s?this.updateCompDetails(s,a):l.then(function(u){var c;!u||e.filterManager.areFilterCompsDifferent((c=e.userCompDetails)!==null&&c!==void 0?c:null,s)?e.updateCompDetails(s,a):e.updateFloatingFilterParams(s)})},t.prototype.updateCompDetails=function(e,r){this.setCompDetails(e),this.setupFilterButton(),this.setupUi(),r&&(this.setupSyncWithFilter(),this.setupFilterChangedListener())},t.prototype.updateFloatingFilterParams=function(e){var r;if(e){var o=e.params;(r=this.comp.getFloatingFilterComp())===null||r===void 0||r.then(function(i){i?.onParamsUpdated&&typeof i.onParamsUpdated=="function"&&i.onParamsUpdated(o)})}},Fw([w("filterManager")],t.prototype,"filterManager",void 0),Fw([w("columnHoverService")],t.prototype,"columnHoverService",void 0),Fw([w("menuFactory")],t.prototype,"menuFactory",void 0),t}(Td),I3=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(r[i]=o[i])},n(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");n(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}}(),bw=function(n,t,e,r){var o=arguments.length,i=o<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(n,t,e,r);else for(var s=n.length-1;s>=0;s--)(a=n[s])&&(i=(o<3?a(i):o>3?a(t,e,i):a(t,e))||i);return o>3&&i&&Object.defineProperty(t,e,i),i},D3=function(n){I3(t,n);function t(e,r,o,i,a){var s=n.call(this)||this;return s.pinned=e,s.column=r,s.eResize=o,s.comp=i,s.ctrl=a,s}return t.prototype.postConstruct=function(){var e=this,r=this.column.getColDef(),o=[],i,a,s=function(){if(we(e.eResize,i),!!i){var c=e.horizontalResizeService.addResizeBar({eResizeBar:e.eResize,onResizeStart:e.onResizeStart.bind(e),onResizing:e.onResizing.bind(e,!1),onResizeEnd:e.onResizing.bind(e,!0)});if(o.push(c),a){var d=e.gridOptionsService.is("skipHeaderOnAutoSize"),f=function(){e.columnModel.autoSizeColumn(e.column,d,"uiColumnResized")};e.eResize.addEventListener("dblclick",f);var p=new Zr(e.eResize);p.addEventListener(Zr.EVENT_DOUBLE_TAP,f),e.addDestroyFunc(function(){e.eResize.removeEventListener("dblclick",f),p.removeEventListener(Zr.EVENT_DOUBLE_TAP,f),p.destroy()})}}},l=function(){o.forEach(function(c){return c()}),o.length=0},u=function(){var c=e.column.isResizable(),d=!e.gridOptionsService.is("suppressAutoSize")&&!r.suppressAutoSize,f=c!==i||d!==a;f&&(i=c,a=d,l(),s())};u(),this.addDestroyFunc(l),this.ctrl.addRefreshFunction(u)},t.prototype.onResizing=function(e,r){var o=this.normaliseResizeAmount(r),i=[{key:this.column,newWidth:this.resizeStartWidth+o}];this.columnModel.setColumnWidths(i,this.resizeWithShiftKey,e,"uiColumnResized"),e&&this.comp.addOrRemoveCssClass("ag-column-resizing",!1)},t.prototype.onResizeStart=function(e){this.resizeStartWidth=this.column.getActualWidth(),this.resizeWithShiftKey=e,this.comp.addOrRemoveCssClass("ag-column-resizing",!0)},t.prototype.normaliseResizeAmount=function(e){var r=e,o=this.pinned!=="left",i=this.pinned==="right";return this.gridOptionsService.is("enableRtl")?o&&(r*=-1):i&&(r*=-1),r},bw([w("horizontalResizeService")],t.prototype,"horizontalResizeService",void 0),bw([w("columnModel")],t.prototype,"columnModel",void 0),bw([M],t.prototype,"postConstruct",null),t}(F),A3=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(r[i]=o[i])},n(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");n(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}}(),zh=function(n,t,e,r){var o=arguments.length,i=o<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(n,t,e,r);else for(var s=n.length-1;s>=0;s--)(a=n[s])&&(i=(o<3?a(i):o>3?a(t,e,i):a(t,e))||i);return o>3&&i&&Object.defineProperty(t,e,i),i},F3=function(n){A3(t,n);function t(e){var r=n.call(this)||this;r.cbSelectAllVisible=!1,r.processingEventFromCheckbox=!1,r.column=e;var o=e.getColDef();return r.filteredOnly=!!o?.headerCheckboxSelectionFilteredOnly,r.currentPageOnly=!!o?.headerCheckboxSelectionCurrentPageOnly,r}return t.prototype.onSpaceKeyDown=function(e){var r=this.cbSelectAll,o=this.gridOptionsService.getDocument();r.isDisplayed()&&!r.getGui().contains(o.activeElement)&&(e.preventDefault(),r.setValue(!r.getValue()))},t.prototype.getCheckboxGui=function(){return this.cbSelectAll.getGui()},t.prototype.setComp=function(e){this.headerCellCtrl=e,this.cbSelectAll=this.createManagedBean(new Rd),this.cbSelectAll.addCssClass("ag-header-select-all"),bt(this.cbSelectAll.getGui(),"presentation"),this.showOrHideSelectAll(),this.addManagedListener(this.eventService,_.EVENT_NEW_COLUMNS_LOADED,this.showOrHideSelectAll.bind(this)),this.addManagedListener(this.eventService,_.EVENT_DISPLAYED_COLUMNS_CHANGED,this.showOrHideSelectAll.bind(this)),this.addManagedListener(this.eventService,_.EVENT_SELECTION_CHANGED,this.onSelectionChanged.bind(this)),this.addManagedListener(this.eventService,_.EVENT_PAGINATION_CHANGED,this.onSelectionChanged.bind(this)),this.addManagedListener(this.eventService,_.EVENT_MODEL_UPDATED,this.onModelChanged.bind(this)),this.addManagedListener(this.cbSelectAll,_.EVENT_FIELD_VALUE_CHANGED,this.onCbSelectAll.bind(this)),kg(this.cbSelectAll.getGui(),!0),this.cbSelectAll.getInputElement().setAttribute("tabindex","-1"),this.refreshSelectAllLabel()},t.prototype.showOrHideSelectAll=function(){this.cbSelectAllVisible=this.isCheckboxSelection(),this.cbSelectAll.setDisplayed(this.cbSelectAllVisible,{skipAriaHidden:!0}),this.cbSelectAllVisible&&(this.checkRightRowModelType("selectAllCheckbox"),this.checkSelectionType("selectAllCheckbox"),this.updateStateOfCheckbox()),this.refreshSelectAllLabel()},t.prototype.onModelChanged=function(){this.cbSelectAllVisible&&this.updateStateOfCheckbox()},t.prototype.onSelectionChanged=function(){this.cbSelectAllVisible&&this.updateStateOfCheckbox()},t.prototype.updateStateOfCheckbox=function(){if(!this.processingEventFromCheckbox){this.processingEventFromCheckbox=!0;var e=this.selectionService.getSelectAllState(this.filteredOnly,this.currentPageOnly);this.cbSelectAll.setValue(e),this.refreshSelectAllLabel(),this.processingEventFromCheckbox=!1}},t.prototype.refreshSelectAllLabel=function(){var e=this.localeService.getLocaleTextFunc(),r=this.cbSelectAll.getValue(),o=r?e("ariaChecked","checked"):e("ariaUnchecked","unchecked"),i=e("ariaRowSelectAll","Press Space to toggle all rows selection");this.cbSelectAllVisible?this.headerCellCtrl.setAriaDescriptionProperty("selectAll",i+" ("+o+")"):this.headerCellCtrl.setAriaDescriptionProperty("selectAll",null),this.cbSelectAll.setInputAriaLabel(i+" ("+o+")"),this.headerCellCtrl.refreshAriaDescription()},t.prototype.checkSelectionType=function(e){var r=this.gridOptionsService.get("rowSelection")==="multiple";return r?!0:(console.warn("AG Grid: "+e+" is only available if using 'multiple' rowSelection."),!1)},t.prototype.checkRightRowModelType=function(e){var r=this.rowModel.getType(),o=r==="clientSide"||r==="serverSide";return o?!0:(console.warn("AG Grid: "+e+" is only available if using 'clientSide' or 'serverSide' rowModelType, you are using "+r+"."),!1)},t.prototype.onCbSelectAll=function(){if(!this.processingEventFromCheckbox&&this.cbSelectAllVisible){var e=this.cbSelectAll.getValue(),r="uiSelectAll";this.currentPageOnly?r="uiSelectAllCurrentPage":this.filteredOnly&&(r="uiSelectAllFiltered");var o={source:r,justFiltered:this.filteredOnly,justCurrentPage:this.currentPageOnly};e?this.selectionService.selectAllRowNodes(o):this.selectionService.deselectAllRowNodes(o)}},t.prototype.isCheckboxSelection=function(){var e=this.column.getColDef().headerCheckboxSelection;if(typeof e=="function"){var r=e,o={column:this.column,colDef:this.column.getColDef(),columnApi:this.columnApi,api:this.gridApi,context:this.gridOptionsService.context};e=r(o)}return e?this.checkRightRowModelType("headerCheckboxSelection")&&this.checkSelectionType("headerCheckboxSelection"):!1},zh([w("gridApi")],t.prototype,"gridApi",void 0),zh([w("columnApi")],t.prototype,"columnApi",void 0),zh([w("rowModel")],t.prototype,"rowModel",void 0),zh([w("selectionService")],t.prototype,"selectionService",void 0),t}(F),b3=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(r[i]=o[i])},n(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");n(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}}(),wI=function(n,t,e,r){var o=arguments.length,i=o<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(n,t,e,r);else for(var s=n.length-1;s>=0;s--)(a=n[s])&&(i=(o<3?a(i):o>3?a(t,e,i):a(t,e))||i);return o>3&&i&&Object.defineProperty(t,e,i),i};(function(n){n.TAB_GUARD="ag-tab-guard",n.TAB_GUARD_TOP="ag-tab-guard-top",n.TAB_GUARD_BOTTOM="ag-tab-guard-bottom"})(g.TabGuardClassNames||(g.TabGuardClassNames={}));var oA=function(n){b3(t,n);function t(e){var r=n.call(this)||this;r.skipTabGuardFocus=!1;var o=e.comp,i=e.eTopGuard,a=e.eBottomGuard,s=e.focusInnerElement,l=e.onFocusIn,u=e.onFocusOut,c=e.shouldStopEventPropagation,d=e.onTabKeyDown,f=e.handleKeyDown,p=e.eFocusableElement;return r.comp=o,r.eTopGuard=i,r.eBottomGuard=a,r.providedFocusInnerElement=s,r.eFocusableElement=p,r.providedFocusIn=l,r.providedFocusOut=u,r.providedShouldStopEventPropagation=c,r.providedOnTabKeyDown=d,r.providedHandleKeyDown=f,r}return t.prototype.postConstruct=function(){var e=this;this.createManagedBean(new Di(this.eFocusableElement,{shouldStopEventPropagation:function(){return e.shouldStopEventPropagation()},onTabKeyDown:function(r){return e.onTabKeyDown(r)},handleKeyDown:function(r){return e.handleKeyDown(r)},onFocusIn:function(r){return e.onFocusIn(r)},onFocusOut:function(r){return e.onFocusOut(r)}})),this.activateTabGuards(),[this.eTopGuard,this.eBottomGuard].forEach(function(r){return e.addManagedListener(r,"focus",e.onFocus.bind(e))})},t.prototype.handleKeyDown=function(e){this.providedHandleKeyDown&&this.providedHandleKeyDown(e)},t.prototype.tabGuardsAreActive=function(){return!!this.eTopGuard&&this.eTopGuard.hasAttribute("tabIndex")},t.prototype.shouldStopEventPropagation=function(){return this.providedShouldStopEventPropagation?this.providedShouldStopEventPropagation():!1},t.prototype.activateTabGuards=function(){var e=this.gridOptionsService.getNum("tabIndex")||0;this.comp.setTabIndex(e.toString())},t.prototype.deactivateTabGuards=function(){this.comp.setTabIndex()},t.prototype.onFocus=function(e){if(this.skipTabGuardFocus){this.skipTabGuardFocus=!1;return}var r=e.target===this.eBottomGuard;this.providedFocusInnerElement?this.providedFocusInnerElement(r):this.focusInnerElement(r)},t.prototype.onFocusIn=function(e){this.providedFocusIn&&this.providedFocusIn(e)||this.deactivateTabGuards()},t.prototype.onFocusOut=function(e){this.providedFocusOut&&this.providedFocusOut(e)||this.eFocusableElement.contains(e.relatedTarget)||this.activateTabGuards()},t.prototype.onTabKeyDown=function(e){var r=this;if(this.providedOnTabKeyDown){this.providedOnTabKeyDown(e);return}if(!e.defaultPrevented){var o=this.tabGuardsAreActive();o&&this.deactivateTabGuards();var i=this.getNextFocusableElement(e.shiftKey);o&&setTimeout(function(){return r.activateTabGuards()},0),i&&(i.focus(),e.preventDefault())}},t.prototype.focusInnerElement=function(e){e===void 0&&(e=!1);var r=this.focusService.findFocusableElements(this.eFocusableElement);this.tabGuardsAreActive()&&(r.splice(0,1),r.splice(r.length-1,1)),r.length&&r[e?r.length-1:0].focus({preventScroll:!0})},t.prototype.getNextFocusableElement=function(e){return this.focusService.findNextFocusableElement(this.eFocusableElement,!1,e)},t.prototype.forceFocusOutOfContainer=function(e){e===void 0&&(e=!1);var r=e?this.eTopGuard:this.eBottomGuard;this.activateTabGuards(),this.skipTabGuardFocus=!0,r.focus()},wI([w("focusService")],t.prototype,"focusService",void 0),wI([M],t.prototype,"postConstruct",null),t}(F),M3=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(r[i]=o[i])},n(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");n(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}}(),dd=function(){return dd=Object.assign||function(n){for(var t,e=1,r=arguments.length;e=0;s--)(a=n[s])&&(i=(o<3?a(i):o>3?a(t,e,i):a(t,e))||i);return o>3&&i&&Object.defineProperty(t,e,i),i},N3=function(n,t){var e=typeof Symbol=="function"&&n[Symbol.iterator];if(!e)return n;var r=e.call(n),o,i=[],a;try{for(;(t===void 0||t-- >0)&&!(o=r.next()).done;)i.push(o.value)}catch(s){a={error:s}}finally{try{o&&!o.done&&(e=r.return)&&e.call(r)}finally{if(a)throw a.error}}return i},G3=function(n,t){for(var e=0,r=t.length,o=n.length;e0?i.indexOf(o)===-1&&i.push(o):(e.instancesMonitored.set(r,[o]),r.addEventListener("keydown",e.toggleKeyboardMode),r.addEventListener("mousedown",e.toggleKeyboardMode))},t.removeKeyboardModeEvents=function(r,o){var i=e.instancesMonitored.get(r),a=[];i&&i.length&&(a=G3([],N3(i)).filter(function(s){return s!==o}),e.instancesMonitored.set(r,a)),a.length===0&&(r.removeEventListener("keydown",e.toggleKeyboardMode),r.removeEventListener("mousedown",e.toggleKeyboardMode))},t.toggleKeyboardMode=function(r){var o=e.keyboardModeActive,i=r.type==="keydown";if(!(i&&(r.ctrlKey||r.metaKey||r.altKey))&&!(o&&i||!o&&!i)){e.keyboardModeActive=i;var a=r.target.ownerDocument;if(a){var s=e.instancesMonitored.get(a);s&&s.forEach(function(l){l.dispatchEvent({type:i?_.EVENT_KEYBOARD_FOCUS:_.EVENT_MOUSE_FOCUS})})}}},t.prototype.init=function(){var r=this,o=this.clearFocusedCell.bind(this);this.addManagedListener(this.eventService,_.EVENT_COLUMN_PIVOT_MODE_CHANGED,o),this.addManagedListener(this.eventService,_.EVENT_NEW_COLUMNS_LOADED,this.onColumnEverythingChanged.bind(this)),this.addManagedListener(this.eventService,_.EVENT_COLUMN_GROUP_OPENED,o),this.addManagedListener(this.eventService,_.EVENT_COLUMN_ROW_GROUP_CHANGED,o),this.ctrlsService.whenReady(function(i){r.gridCtrl=i.gridCtrl;var a=r.gridOptionsService.getDocument();e.addKeyboardModeEvents(a,r.gridCtrl),r.addDestroyFunc(function(){return r.unregisterGridCompController(r.gridCtrl)})})},t.prototype.unregisterGridCompController=function(r){var o=this.gridOptionsService.getDocument();e.removeKeyboardModeEvents(o,r)},t.prototype.onColumnEverythingChanged=function(){if(this.focusedCellPosition){var r=this.focusedCellPosition.column,o=this.columnModel.getGridColumn(r.getId());r!==o&&this.clearFocusedCell()}},t.prototype.isKeyboardMode=function(){return e.keyboardModeActive},t.prototype.getFocusCellToUseAfterRefresh=function(){var r=this.gridOptionsService.getDocument();return this.gridOptionsService.is("suppressFocusAfterRefresh")||!this.focusedCellPosition||this.isDomDataMissingInHierarchy(r.activeElement,Ma.DOM_DATA_KEY_ROW_CTRL)?null:this.focusedCellPosition},t.prototype.getFocusHeaderToUseAfterRefresh=function(){var r=this.gridOptionsService.getDocument();return this.gridOptionsService.is("suppressFocusAfterRefresh")||!this.focusedHeaderPosition||this.isDomDataMissingInHierarchy(r.activeElement,Td.DOM_DATA_KEY_HEADER_CTRL)?null:this.focusedHeaderPosition},t.prototype.isDomDataMissingInHierarchy=function(r,o){for(var i=r;i;){var a=this.gridOptionsService.getDomData(i,o);if(a)return!1;i=i.parentNode}return!0},t.prototype.getFocusedCell=function(){return this.focusedCellPosition},t.prototype.shouldRestoreFocus=function(r){var o=this;return this.isCellRestoreFocused(r)?(setTimeout(function(){o.restoredFocusedCellPosition=null},0),!0):!1},t.prototype.isCellRestoreFocused=function(r){return this.restoredFocusedCellPosition==null?!1:this.cellPositionUtils.equals(r,this.restoredFocusedCellPosition)},t.prototype.setRestoreFocusedCell=function(r){this.getFrameworkOverrides().renderingEngine==="react"&&(this.restoredFocusedCellPosition=r)},t.prototype.getFocusEventParams=function(){var r=this.focusedCellPosition,o=r.rowIndex,i=r.rowPinned,a=r.column,s={rowIndex:o,rowPinned:i,column:a,isFullWidthCell:!1},l=this.rowRenderer.getRowByPosition({rowIndex:o,rowPinned:i});return l&&(s.isFullWidthCell=l.isFullWidth()),s},t.prototype.clearFocusedCell=function(){if(this.restoredFocusedCellPosition=null,this.focusedCellPosition!=null){var r=dd({type:_.EVENT_CELL_FOCUS_CLEARED},this.getFocusEventParams());this.focusedCellPosition=null,this.eventService.dispatchEvent(r)}},t.prototype.setFocusedCell=function(r){var o=r.column,i=r.rowIndex,a=r.rowPinned,s=r.forceBrowserFocus,l=s===void 0?!1:s,u=r.preventScrollOnBrowserFocus,c=u===void 0?!1:u,d=this.columnModel.getGridColumn(o);if(!d){this.focusedCellPosition=null;return}this.focusedCellPosition=d?{rowIndex:i,rowPinned:ri(a),column:d}:null;var f=dd(dd({type:_.EVENT_CELL_FOCUSED},this.getFocusEventParams()),{forceBrowserFocus:l,preventScrollOnBrowserFocus:c,floating:null});this.eventService.dispatchEvent(f)},t.prototype.isCellFocused=function(r){return this.focusedCellPosition==null?!1:this.cellPositionUtils.equals(r,this.focusedCellPosition)},t.prototype.isRowNodeFocused=function(r){return this.isRowFocused(r.rowIndex,r.rowPinned)},t.prototype.isHeaderWrapperFocused=function(r){if(this.focusedHeaderPosition==null)return!1;var o=r.getColumnGroupChild(),i=r.getRowIndex(),a=r.getPinned(),s=this.focusedHeaderPosition,l=s.column,u=s.headerRowIndex;return o===l&&i===u&&a==l.getPinned()},t.prototype.clearFocusedHeader=function(){this.focusedHeaderPosition=null},t.prototype.getFocusedHeader=function(){return this.focusedHeaderPosition},t.prototype.setFocusedHeader=function(r,o){this.focusedHeaderPosition={headerRowIndex:r,column:o}},t.prototype.focusHeaderPosition=function(r){var o=r.direction,i=r.fromTab,a=r.allowUserOverride,s=r.event,l=r.fromCell,u=r.headerPosition;if(l&&this.filterManager.isAdvancedFilterHeaderActive())return this.focusAdvancedFilter(u);if(a){var c=this.getFocusedHeader(),d=this.headerNavigationService.getHeaderRowCount();if(i){var f=this.gridOptionsService.getCallback("tabToNextHeader");if(f){var p={backwards:o==="Before",previousHeaderPosition:c,nextHeaderPosition:u,headerRowCount:d};u=f(p)}}else{var f=this.gridOptionsService.getCallback("navigateToNextHeader");if(f&&s){var h={key:s.key,previousHeaderPosition:c,nextHeaderPosition:u,headerRowCount:d,event:s};u=f(h)}}}if(!u)return!1;if(u.headerRowIndex===-1)return this.filterManager.isAdvancedFilterHeaderActive()?this.focusAdvancedFilter(u):this.focusGridView(u.column);this.headerNavigationService.scrollToColumn(u.column,o);var v=this.ctrlsService.getHeaderRowContainerCtrl(u.column.getPinned()),C=v.focusHeader(u.headerRowIndex,u.column,s);return C},t.prototype.focusFirstHeader=function(){var r=this.columnModel.getAllDisplayedColumns()[0];return r?(r.getParent()&&(r=this.columnModel.getColumnGroupAtLevel(r,0)),this.focusHeaderPosition({headerPosition:{headerRowIndex:0,column:r}})):!1},t.prototype.focusLastHeader=function(r){var o=this.headerNavigationService.getHeaderRowCount()-1,i=Ge(this.columnModel.getAllDisplayedColumns());return this.focusHeaderPosition({headerPosition:{headerRowIndex:o,column:i},event:r})},t.prototype.focusPreviousFromFirstCell=function(r){return this.filterManager.isAdvancedFilterHeaderActive()?this.focusAdvancedFilter(null):this.focusLastHeader(r)},t.prototype.isAnyCellFocused=function(){return!!this.focusedCellPosition},t.prototype.isRowFocused=function(r,o){return this.focusedCellPosition==null?!1:this.focusedCellPosition.rowIndex===r&&this.focusedCellPosition.rowPinned===ri(o)},t.prototype.findFocusableElements=function(r,o,i){i===void 0&&(i=!1);var a=KD,s=kS;o&&(s+=", "+o),i&&(s+=', [tabindex="-1"]');var l=Array.prototype.slice.apply(r.querySelectorAll(a)),u=Array.prototype.slice.apply(r.querySelectorAll(s));if(!u.length)return l;var c=function(d,f){return d.filter(function(p){return f.indexOf(p)===-1})};return c(l,u)},t.prototype.focusInto=function(r,o,i){o===void 0&&(o=!1),i===void 0&&(i=!1);var a=this.findFocusableElements(r,null,i),s=o?Ge(a):a[0];return s?(s.focus({preventScroll:!0}),!0):!1},t.prototype.findFocusableElementBeforeTabGuard=function(r,o){if(!o)return null;var i=this.findFocusableElements(r),a=i.indexOf(o);if(a===-1)return null;for(var s=-1,l=a-1;l>=0;l--)if(i[l].classList.contains(g.TabGuardClassNames.TAB_GUARD_TOP)){s=l;break}return s<=0?null:i[s-1]},t.prototype.findNextFocusableElement=function(r,o,i){r===void 0&&(r=this.eGridDiv);var a=this.findFocusableElements(r,o?':not([tabindex="-1"])':null),s=this.gridOptionsService.getDocument(),l=s.activeElement,u;o?u=a.findIndex(function(d){return d.contains(l)}):u=a.indexOf(l);var c=u+(i?-1:1);return c<0||c>=a.length?null:a[c]},t.prototype.isTargetUnderManagedComponent=function(r,o){if(!o)return!1;var i=r.querySelectorAll("."+Di.FOCUS_MANAGED_CLASS);if(!i.length)return!1;for(var a=0;a=0;s--)(a=n[s])&&(i=(o<3?a(i):o>3?a(t,e,i):a(t,e))||i);return o>3&&i&&Object.defineProperty(t,e,i),i},iA=function(n){k3(t,n);function t(e,r){var o=n.call(this,e,r)||this;return o.refreshFunctions=[],o.userHeaderClasses=new Set,o.ariaDescriptionProperties=new Map,o.column=e,o}return t.prototype.setComp=function(e,r,o,i){var a=this;n.prototype.setGui.call(this,r),this.comp=e,this.updateState(),this.setupWidth(),this.setupMovingCss(),this.setupMenuClass(),this.setupSortableClass(),this.setupWrapTextClass(),this.refreshSpanHeaderHeight(),this.setupAutoHeight(i),this.addColumnHoverListener(),this.setupFilterCss(),this.setupClassesFromColDef(),this.setupTooltip(),this.addActiveHeaderMouseListeners(),this.setupSelectAll(),this.setupUserComp(),this.refreshAria(),this.createManagedBean(new D3(this.getPinned(),this.column,o,e,this)),this.createManagedBean(new d_([this.column],r)),this.createManagedBean(new Zg(this.column,r,this.beans)),this.createManagedBean(new Di(r,{shouldStopEventPropagation:function(s){return a.shouldStopEventPropagation(s)},onTabKeyDown:function(){return null},handleKeyDown:this.handleKeyDown.bind(this),onFocusIn:this.onFocusIn.bind(this),onFocusOut:this.onFocusOut.bind(this)})),this.addMouseDownListenerIfNeeded(r),this.addManagedListener(this.column,Ne.EVENT_COL_DEF_CHANGED,this.onColDefChanged.bind(this)),this.addManagedListener(this.eventService,_.EVENT_COLUMN_VALUE_CHANGED,this.onColumnValueChanged.bind(this)),this.addManagedListener(this.eventService,_.EVENT_COLUMN_ROW_GROUP_CHANGED,this.onColumnRowGroupChanged.bind(this)),this.addManagedListener(this.eventService,_.EVENT_COLUMN_PIVOT_CHANGED,this.onColumnPivotChanged.bind(this)),this.addManagedListener(this.eventService,_.EVENT_HEADER_HEIGHT_CHANGED,this.onHeaderHeightChanged.bind(this)),this.addManagedListener(this.eventService,_.EVENT_DISPLAYED_COLUMNS_CHANGED,this.onHeaderHeightChanged.bind(this))},t.prototype.addMouseDownListenerIfNeeded=function(e){var r=this;if(to()){var o=["mousedown","touchstart"],i=this.gridOptionsService.getDocument();o.forEach(function(a){r.addManagedListener(e,a,function(s){var l=i.activeElement;l!==e&&!e.contains(l)&&(e.focus(),Os.toggleKeyboardMode(s))})})}},t.prototype.setupUserComp=function(){var e=this.lookupUserCompDetails();this.setCompDetails(e)},t.prototype.setCompDetails=function(e){this.userCompDetails=e,this.comp.setUserCompDetails(e)},t.prototype.lookupUserCompDetails=function(){var e=this.createParams(),r=this.column.getColDef();return this.userComponentFactory.getHeaderCompDetails(r,e)},t.prototype.createParams=function(){var e=this,r=this.column.getColDef(),o={column:this.column,displayName:this.displayName,enableSorting:r.sortable,enableMenu:this.menuEnabled,showColumnMenu:function(i){e.gridApi.showColumnMenuAfterButtonClick(e.column,i)},progressSort:function(i){e.sortController.progressSort(e.column,!!i,"uiColumnSorted")},setSort:function(i,a){e.sortController.setSortForColumn(e.column,i,!!a,"uiColumnSorted")},api:this.gridApi,columnApi:this.columnApi,context:this.gridOptionsService.context,eGridHeader:this.getGui()};return o},t.prototype.setupSelectAll=function(){this.selectAllFeature=this.createManagedBean(new F3(this.column)),this.selectAllFeature.setComp(this)},t.prototype.getSelectAllGui=function(){return this.selectAllFeature.getCheckboxGui()},t.prototype.handleKeyDown=function(e){n.prototype.handleKeyDown.call(this,e),e.key===O.SPACE&&this.selectAllFeature.onSpaceKeyDown(e),e.key===O.ENTER&&this.onEnterKeyDown(e)},t.prototype.onEnterKeyDown=function(e){var r=this.comp.getUserCompInstance();if(r){if(e.ctrlKey||e.metaKey)this.menuEnabled&&r.showMenu&&(e.preventDefault(),r.showMenu());else if(this.sortable){var o=e.shiftKey;this.sortController.progressSort(this.column,o,"uiColumnSorted")}}},t.prototype.isMenuEnabled=function(){return this.menuEnabled},t.prototype.onFocusIn=function(e){if(!this.getGui().contains(e.relatedTarget)){var r=this.getRowIndex();this.focusService.setFocusedHeader(r,this.column)}this.setActiveHeader(!0)},t.prototype.onFocusOut=function(e){this.getGui().contains(e.relatedTarget)||this.setActiveHeader(!1)},t.prototype.setupTooltip=function(){var e=this,r={getColumn:function(){return e.column},getColDef:function(){return e.column.getColDef()},getGui:function(){return e.eGui},getLocation:function(){return"header"},getTooltipValue:function(){var i=e.column.getColDef().headerTooltip;return i}},o=this.createManagedBean(new Jg(r,this.beans));o.setComp(this.eGui),this.refreshFunctions.push(function(){return o.refreshToolTip()})},t.prototype.setupClassesFromColDef=function(){var e=this,r=function(){var o=e.column.getColDef(),i=c_.getHeaderClassesFromColDef(o,e.gridOptionsService,e.column,null),a=e.userHeaderClasses;e.userHeaderClasses=new Set(i),i.forEach(function(s){a.has(s)?a.delete(s):e.comp.addOrRemoveCssClass(s,!0)}),a.forEach(function(s){return e.comp.addOrRemoveCssClass(s,!1)})};this.refreshFunctions.push(r),r()},t.prototype.setDragSource=function(e){var r=this;if(this.dragSourceElement=e,this.removeDragSource(),!!e&&this.draggable){var o=!this.gridOptionsService.is("suppressDragLeaveHidesColumns");this.moveDragSource={type:g.DragSourceType.HeaderCell,eElement:e,getDefaultIconName:function(){return o?Ft.ICON_HIDE:Ft.ICON_NOT_ALLOWED},getDragItem:function(){return r.createDragItem()},dragItemName:this.displayName,onDragStarted:function(){o=!r.gridOptionsService.is("suppressDragLeaveHidesColumns"),r.column.setMoving(!0,"uiColumnMoved")},onDragStopped:function(){return r.column.setMoving(!1,"uiColumnMoved")},onGridEnter:function(i){var a;if(o){var s=((a=i?.columns)===null||a===void 0?void 0:a.filter(function(l){return!l.getColDef().lockVisible}))||[];r.columnModel.setColumnsVisible(s,!0,"uiColumnMoved")}},onGridExit:function(i){var a;if(o){var s=((a=i?.columns)===null||a===void 0?void 0:a.filter(function(l){return!l.getColDef().lockVisible}))||[];r.columnModel.setColumnsVisible(s,!1,"uiColumnMoved")}}},this.dragAndDropService.addDragSource(this.moveDragSource,!0)}},t.prototype.createDragItem=function(){var e={};return e[this.column.getId()]=this.column.isVisible(),{columns:[this.column],visibleState:e}},t.prototype.removeDragSource=function(){this.moveDragSource&&(this.dragAndDropService.removeDragSource(this.moveDragSource),this.moveDragSource=void 0)},t.prototype.onColDefChanged=function(){this.refresh()},t.prototype.updateState=function(){var e=this.column.getColDef();this.menuEnabled=this.menuFactory.isMenuEnabled(this.column)&&!e.suppressMenu,this.sortable=e.sortable,this.displayName=this.calculateDisplayName(),this.draggable=this.workOutDraggable()},t.prototype.addRefreshFunction=function(e){this.refreshFunctions.push(e)},t.prototype.refresh=function(){this.updateState(),this.refreshHeaderComp(),this.refreshAria(),this.refreshFunctions.forEach(function(e){return e()})},t.prototype.refreshHeaderComp=function(){var e=this.lookupUserCompDetails(),r=this.comp.getUserCompInstance(),o=r!=null&&this.userCompDetails.componentClass==e.componentClass,i=o?this.attemptHeaderCompRefresh(e.params):!1;i?this.setDragSource(this.dragSourceElement):this.setCompDetails(e)},t.prototype.attemptHeaderCompRefresh=function(e){var r=this.comp.getUserCompInstance();if(!r||!r.refresh)return!1;var o=r.refresh(e);return o},t.prototype.calculateDisplayName=function(){return this.columnModel.getDisplayNameForColumn(this.column,"header",!0)},t.prototype.checkDisplayName=function(){this.displayName!==this.calculateDisplayName()&&this.refresh()},t.prototype.workOutDraggable=function(){var e=this.column.getColDef(),r=this.gridOptionsService.is("suppressMovableColumns"),o=!r&&!e.suppressMovable&&!e.lockPosition;return!!o||!!e.enableRowGroup||!!e.enablePivot},t.prototype.onColumnRowGroupChanged=function(){this.checkDisplayName()},t.prototype.onColumnPivotChanged=function(){this.checkDisplayName()},t.prototype.onColumnValueChanged=function(){this.checkDisplayName()},t.prototype.setupWidth=function(){var e=this,r=function(){var o=e.column.getActualWidth();e.comp.setWidth(o+"px")};this.addManagedListener(this.column,Ne.EVENT_WIDTH_CHANGED,r),r()},t.prototype.setupMovingCss=function(){var e=this,r=function(){e.comp.addOrRemoveCssClass("ag-header-cell-moving",e.column.isMoving())};this.addManagedListener(this.column,Ne.EVENT_MOVING_CHANGED,r),r()},t.prototype.setupMenuClass=function(){var e=this,r=function(){e.comp.addOrRemoveCssClass("ag-column-menu-visible",e.column.isMenuVisible())};this.addManagedListener(this.column,Ne.EVENT_MENU_VISIBLE_CHANGED,r),r()},t.prototype.setupSortableClass=function(){var e=this,r=function(){e.comp.addOrRemoveCssClass("ag-header-cell-sortable",!!e.sortable)};r(),this.addRefreshFunction(r),this.addManagedListener(this.eventService,Ne.EVENT_SORT_CHANGED,this.refreshAriaSort.bind(this))},t.prototype.setupWrapTextClass=function(){var e=this,r=function(){var o=!!e.column.getColDef().wrapHeaderText;e.comp.addOrRemoveCssClass("ag-header-cell-wrap-text",o)};r(),this.addRefreshFunction(r)},t.prototype.onHeaderHeightChanged=function(){this.refreshSpanHeaderHeight()},t.prototype.refreshSpanHeaderHeight=function(){var e=this,r=e.eGui,o=e.column,i=e.comp,a=e.columnModel,s=e.gridOptionsService;if(o.isSpanHeaderHeight()){var l=this.getColumnGroupPaddingInfo(),u=l.numberOfParents,c=l.isSpanningTotal;i.addOrRemoveCssClass("ag-header-span-height",u>0);var d=a.getColumnHeaderRowHeight();if(u===0){i.addOrRemoveCssClass("ag-header-span-total",!1),r.style.setProperty("top","0px"),r.style.setProperty("height",d+"px");return}i.addOrRemoveCssClass("ag-header-span-total",c);var f=s.is("pivotMode"),p=f?a.getPivotGroupHeaderHeight():a.getGroupHeaderHeight(),h=u*p;r.style.setProperty("top",-h+"px"),r.style.setProperty("height",d+h+"px")}},t.prototype.getColumnGroupPaddingInfo=function(){var e=this.column.getParent();if(!e||!e.isPadding())return{numberOfParents:0,isSpanningTotal:!1};for(var r=e.getPaddingLevel()+1,o=!0;e;){if(!e.isPadding()){o=!1;break}e=e.getParent()}return{numberOfParents:r,isSpanningTotal:o}},t.prototype.setupAutoHeight=function(e){var r=this,o=function(c){if(r.isAlive()){var d=Ga(r.getGui()),f=d.paddingTop,p=d.paddingBottom,h=d.borderBottomWidth,v=d.borderTopWidth,C=f+p+h+v,m=e.offsetHeight,y=m+C;if(c<5){var S=r.beans.gridOptionsService.getDocument(),E=!S||!S.contains(e),R=y==0;if(E||R){r.beans.frameworkOverrides.setTimeout(function(){return o(c+1)},0);return}}r.columnModel.setColumnHeaderHeight(r.column,y)}},i=!1,a,s=function(){var c=r.column.isAutoHeaderHeight();c&&!i&&l(),!c&&i&&u()},l=function(){i=!0,o(0),r.comp.addOrRemoveCssClass("ag-header-cell-auto-height",!0),a=r.resizeObserverService.observeResize(e,function(){return o(0)})},u=function(){i=!1,a&&a(),r.comp.addOrRemoveCssClass("ag-header-cell-auto-height",!1),a=void 0};s(),this.addDestroyFunc(function(){return u()}),this.addManagedListener(this.column,Ne.EVENT_WIDTH_CHANGED,function(){return i&&o(0)}),this.addManagedListener(this.eventService,Ne.EVENT_SORT_CHANGED,function(){i&&r.beans.frameworkOverrides.setTimeout(function(){return o(0)})}),this.addRefreshFunction(s)},t.prototype.refreshAriaSort=function(){if(this.sortable){var e=this.localeService.getLocaleTextFunc(),r=this.sortController.getDisplaySortForColumn(this.column)||null;this.comp.setAriaSort(xD(r)),this.setAriaDescriptionProperty("sort",e("ariaSortableColumn","Press ENTER to sort."))}else this.comp.setAriaSort(),this.setAriaDescriptionProperty("sort",null)},t.prototype.refreshAriaMenu=function(){if(this.menuEnabled){var e=this.localeService.getLocaleTextFunc();this.setAriaDescriptionProperty("menu",e("ariaMenuColumn","Press CTRL ENTER to open column menu."))}else this.setAriaDescriptionProperty("menu",null)},t.prototype.setAriaDescriptionProperty=function(e,r){r!=null?this.ariaDescriptionProperties.set(e,r):this.ariaDescriptionProperties.delete(e)},t.prototype.refreshAriaDescription=function(){var e=Array.from(this.ariaDescriptionProperties.values());this.comp.setAriaDescription(e.length?e.join(" "):void 0)},t.prototype.refreshAria=function(){this.refreshAriaSort(),this.refreshAriaMenu(),this.refreshAriaDescription()},t.prototype.addColumnHoverListener=function(){var e=this,r=function(){if(e.gridOptionsService.is("columnHoverHighlight")){var o=e.columnHoverService.isHovered(e.column);e.comp.addOrRemoveCssClass("ag-column-hover",o)}};this.addManagedListener(this.eventService,_.EVENT_COLUMN_HOVER_CHANGED,r),r()},t.prototype.setupFilterCss=function(){var e=this,r=function(){e.comp.addOrRemoveCssClass("ag-header-cell-filtered",e.column.isFilterActive())};this.addManagedListener(this.column,Ne.EVENT_FILTER_ACTIVE_CHANGED,r),r()},t.prototype.getColId=function(){return this.column.getColId()},t.prototype.addActiveHeaderMouseListeners=function(){var e=this,r=function(o){return e.setActiveHeader(o.type==="mouseenter")};this.addManagedListener(this.getGui(),"mouseenter",r),this.addManagedListener(this.getGui(),"mouseleave",r)},t.prototype.setActiveHeader=function(e){this.comp.addOrRemoveCssClass("ag-header-active",e)},Pi([w("columnModel")],t.prototype,"columnModel",void 0),Pi([w("columnHoverService")],t.prototype,"columnHoverService",void 0),Pi([w("sortController")],t.prototype,"sortController",void 0),Pi([w("menuFactory")],t.prototype,"menuFactory",void 0),Pi([w("dragAndDropService")],t.prototype,"dragAndDropService",void 0),Pi([w("resizeObserverService")],t.prototype,"resizeObserverService",void 0),Pi([w("gridApi")],t.prototype,"gridApi",void 0),Pi([w("columnApi")],t.prototype,"columnApi",void 0),Pi([Mt],t.prototype,"removeDragSource",null),t}(Td),H3=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(r[i]=o[i])},n(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");n(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}}(),qh=function(n,t,e,r){var o=arguments.length,i=o<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(n,t,e,r);else for(var s=n.length-1;s>=0;s--)(a=n[s])&&(i=(o<3?a(i):o>3?a(t,e,i):a(t,e))||i);return o>3&&i&&Object.defineProperty(t,e,i),i},V3=function(n){H3(t,n);function t(e,r,o,i){var a=n.call(this)||this;return a.eResize=r,a.comp=e,a.pinned=o,a.columnGroup=i,a}return t.prototype.postConstruct=function(){var e=this;if(!this.columnGroup.isResizable()){this.comp.setResizableDisplayed(!1);return}var r=this.horizontalResizeService.addResizeBar({eResizeBar:this.eResize,onResizeStart:this.onResizeStart.bind(this),onResizing:this.onResizing.bind(this,!1),onResizeEnd:this.onResizing.bind(this,!0)});if(this.addDestroyFunc(r),!this.gridOptionsService.is("suppressAutoSize")){var o=this.gridOptionsService.is("skipHeaderOnAutoSize");this.eResize.addEventListener("dblclick",function(){var i=[],a=e.columnGroup.getDisplayedLeafColumns();a.forEach(function(s){s.getColDef().suppressAutoSize||i.push(s.getColId())}),i.length>0&&e.columnModel.autoSizeColumns({columns:i,skipHeader:o,stopAtGroup:e.columnGroup,source:"uiColumnResized"}),e.resizeLeafColumnsToFit("uiColumnResized")})}},t.prototype.onResizeStart=function(e){var r=this;this.calculateInitialValues();var o=null;if(e&&(o=this.columnModel.getDisplayedGroupAfter(this.columnGroup)),o){var i=o.getDisplayedLeafColumns();this.resizeTakeFromCols=i.filter(function(a){return a.isResizable()}),this.resizeTakeFromStartWidth=0,this.resizeTakeFromCols.forEach(function(a){return r.resizeTakeFromStartWidth+=a.getActualWidth()}),this.resizeTakeFromRatios=[],this.resizeTakeFromCols.forEach(function(a){return r.resizeTakeFromRatios.push(a.getActualWidth()/r.resizeTakeFromStartWidth)})}else this.resizeTakeFromCols=null,this.resizeTakeFromStartWidth=null,this.resizeTakeFromRatios=null;this.comp.addOrRemoveCssClass("ag-column-resizing",!0)},t.prototype.onResizing=function(e,r,o){o===void 0&&(o="uiColumnResized");var i=this.normaliseDragChange(r),a=this.resizeStartWidth+i;this.resizeColumns(a,o,e)},t.prototype.resizeLeafColumnsToFit=function(e){var r=this.autoWidthCalculator.getPreferredWidthForColumnGroup(this.columnGroup);this.calculateInitialValues(),r>this.resizeStartWidth&&this.resizeColumns(r,e,!0)},t.prototype.resizeColumns=function(e,r,o){o===void 0&&(o=!0);var i=[];if(i.push({columns:this.resizeCols,ratios:this.resizeRatios,width:e}),this.resizeTakeFromCols){var a=e-this.resizeStartWidth;i.push({columns:this.resizeTakeFromCols,ratios:this.resizeTakeFromRatios,width:this.resizeTakeFromStartWidth-a})}this.columnModel.resizeColumnSets({resizeSets:i,finished:o,source:r}),o&&this.comp.addOrRemoveCssClass("ag-column-resizing",!1)},t.prototype.calculateInitialValues=function(){var e=this,r=this.columnGroup.getDisplayedLeafColumns();this.resizeCols=r.filter(function(o){return o.isResizable()}),this.resizeStartWidth=0,this.resizeCols.forEach(function(o){return e.resizeStartWidth+=o.getActualWidth()}),this.resizeRatios=[],this.resizeCols.forEach(function(o){return e.resizeRatios.push(o.getActualWidth()/e.resizeStartWidth)})},t.prototype.normaliseDragChange=function(e){var r=e;return this.gridOptionsService.is("enableRtl")?this.pinned!=="left"&&(r*=-1):this.pinned==="right"&&(r*=-1),r},qh([w("horizontalResizeService")],t.prototype,"horizontalResizeService",void 0),qh([w("autoWidthCalculator")],t.prototype,"autoWidthCalculator",void 0),qh([w("columnModel")],t.prototype,"columnModel",void 0),qh([M],t.prototype,"postConstruct",null),t}(F),B3=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(r[i]=o[i])},n(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");n(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}}(),W3=function(n,t,e,r){var o=arguments.length,i=o<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(n,t,e,r);else for(var s=n.length-1;s>=0;s--)(a=n[s])&&(i=(o<3?a(i):o>3?a(t,e,i):a(t,e))||i);return o>3&&i&&Object.defineProperty(t,e,i),i},U3=function(n){B3(t,n);function t(e,r){var o=n.call(this)||this;return o.removeChildListenersFuncs=[],o.columnGroup=r,o.comp=e,o}return t.prototype.postConstruct=function(){this.addListenersToChildrenColumns(),this.addManagedListener(this.columnGroup,Wt.EVENT_DISPLAYED_CHILDREN_CHANGED,this.onDisplayedChildrenChanged.bind(this)),this.onWidthChanged(),this.addDestroyFunc(this.removeListenersOnChildrenColumns.bind(this))},t.prototype.addListenersToChildrenColumns=function(){var e=this;this.removeListenersOnChildrenColumns();var r=this.onWidthChanged.bind(this);this.columnGroup.getLeafColumns().forEach(function(o){o.addEventListener("widthChanged",r),o.addEventListener("visibleChanged",r),e.removeChildListenersFuncs.push(function(){o.removeEventListener("widthChanged",r),o.removeEventListener("visibleChanged",r)})})},t.prototype.removeListenersOnChildrenColumns=function(){this.removeChildListenersFuncs.forEach(function(e){return e()}),this.removeChildListenersFuncs=[]},t.prototype.onDisplayedChildrenChanged=function(){this.addListenersToChildrenColumns(),this.onWidthChanged()},t.prototype.onWidthChanged=function(){var e=this.columnGroup.getActualWidth();this.comp.setWidth(e+"px"),this.comp.addOrRemoveCssClass("ag-hidden",e===0)},W3([M],t.prototype,"postConstruct",null),t}(F),j3=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(r[i]=o[i])},n(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");n(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}}(),$h=function(n,t,e,r){var o=arguments.length,i=o<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(n,t,e,r);else for(var s=n.length-1;s>=0;s--)(a=n[s])&&(i=(o<3?a(i):o>3?a(t,e,i):a(t,e))||i);return o>3&&i&&Object.defineProperty(t,e,i),i},aA=function(n){j3(t,n);function t(e,r){var o=n.call(this,e,r)||this;return o.columnGroup=e,o}return t.prototype.setComp=function(e,r,o){n.prototype.setGui.call(this,r),this.comp=e,this.displayName=this.columnModel.getDisplayNameForColumnGroup(this.columnGroup,"header"),this.addClasses(),this.setupMovingCss(),this.setupExpandable(),this.setupTooltip(),this.setupUserComp();var i=this.getParentRowCtrl().getPinned(),a=this.columnGroup.getProvidedColumnGroup().getLeafColumns();this.createManagedBean(new d_(a,r)),this.createManagedBean(new Zg(this.columnGroup,r,this.beans)),this.createManagedBean(new U3(e,this.columnGroup)),this.groupResizeFeature=this.createManagedBean(new V3(e,o,i,this.columnGroup)),this.createManagedBean(new Di(r,{shouldStopEventPropagation:this.shouldStopEventPropagation.bind(this),onTabKeyDown:function(){},handleKeyDown:this.handleKeyDown.bind(this),onFocusIn:this.onFocusIn.bind(this)}))},t.prototype.resizeLeafColumnsToFit=function(e){this.groupResizeFeature&&this.groupResizeFeature.resizeLeafColumnsToFit(e)},t.prototype.setupUserComp=function(){var e=this,r=this.displayName,o={displayName:this.displayName,columnGroup:this.columnGroup,setExpanded:function(u){e.columnModel.setColumnGroupOpened(e.columnGroup.getProvidedColumnGroup(),u,"gridInitializing")},api:this.gridApi,columnApi:this.columnApi,context:this.gridOptionsService.context};if(!r){for(var i=this.columnGroup,a=i.getLeafColumns();i.getParent()&&i.getParent().getLeafColumns().length===a.length;)i=i.getParent();var s=i.getColGroupDef();s&&(r=s.headerName),r||(r=a?this.columnModel.getDisplayNameForColumn(a[0],"header",!0):"")}var l=this.userComponentFactory.getHeaderGroupCompDetails(o);this.comp.setUserCompDetails(l)},t.prototype.setupTooltip=function(){var e=this,r=this.columnGroup.getColGroupDef(),o={getColumn:function(){return e.columnGroup},getGui:function(){return e.eGui},getLocation:function(){return"headerGroup"},getTooltipValue:function(){return r&&r.headerTooltip}};r&&(o.getColDef=function(){return r});var i=this.createManagedBean(new Jg(o,this.beans));i.setComp(this.eGui)},t.prototype.setupExpandable=function(){var e=this.columnGroup.getProvidedColumnGroup();this.refreshExpanded(),this.addManagedListener(e,gt.EVENT_EXPANDABLE_CHANGED,this.refreshExpanded.bind(this)),this.addManagedListener(e,gt.EVENT_EXPANDED_CHANGED,this.refreshExpanded.bind(this))},t.prototype.refreshExpanded=function(){var e=this.columnGroup;this.expandable=e.isExpandable();var r=e.isExpanded();this.expandable?this.comp.setAriaExpanded(r?"true":"false"):this.comp.setAriaExpanded(void 0)},t.prototype.getColId=function(){return this.columnGroup.getUniqueId()},t.prototype.addClasses=function(){var e=this,r=this.columnGroup.getColGroupDef(),o=c_.getHeaderClassesFromColDef(r,this.gridOptionsService,null,this.columnGroup);if(this.columnGroup.isPadding()){o.push("ag-header-group-cell-no-group");var i=this.columnGroup.getLeafColumns();i.every(function(a){return a.isSpanHeaderHeight()})&&o.push("ag-header-span-height")}else o.push("ag-header-group-cell-with-group");o.forEach(function(a){return e.comp.addOrRemoveCssClass(a,!0)})},t.prototype.setupMovingCss=function(){var e=this,r=this.columnGroup.getProvidedColumnGroup(),o=r.getLeafColumns(),i=function(){return e.comp.addOrRemoveCssClass("ag-header-cell-moving",e.columnGroup.isMoving())};o.forEach(function(a){e.addManagedListener(a,Ne.EVENT_MOVING_CHANGED,i)}),i()},t.prototype.onFocusIn=function(e){if(!this.eGui.contains(e.relatedTarget)){var r=this.getRowIndex();this.beans.focusService.setFocusedHeader(r,this.columnGroup)}},t.prototype.handleKeyDown=function(e){n.prototype.handleKeyDown.call(this,e);var r=this.getWrapperHasFocus();if(!(!this.expandable||!r)&&e.key===O.ENTER){var o=this.columnGroup,i=!o.isExpanded();this.columnModel.setColumnGroupOpened(o.getProvidedColumnGroup(),i,"uiColumnExpanded")}},t.prototype.setDragSource=function(e){var r=this;if(!this.isSuppressMoving()){var o=this.columnGroup.getProvidedColumnGroup().getLeafColumns(),i=!this.gridOptionsService.is("suppressDragLeaveHidesColumns"),a={type:g.DragSourceType.HeaderCell,eElement:e,getDefaultIconName:function(){return i?Ft.ICON_HIDE:Ft.ICON_NOT_ALLOWED},dragItemName:this.displayName,getDragItem:this.getDragItemForGroup.bind(this),onDragStarted:function(){i=!r.gridOptionsService.is("suppressDragLeaveHidesColumns"),o.forEach(function(s){return s.setMoving(!0,"uiColumnDragged")})},onDragStopped:function(){return o.forEach(function(s){return s.setMoving(!1,"uiColumnDragged")})},onGridEnter:function(s){var l;if(i){var u=((l=s?.columns)===null||l===void 0?void 0:l.filter(function(c){return!c.getColDef().lockVisible}))||[];r.columnModel.setColumnsVisible(u,!0,"uiColumnMoved")}},onGridExit:function(s){var l;if(i){var u=((l=s?.columns)===null||l===void 0?void 0:l.filter(function(c){return!c.getColDef().lockVisible}))||[];r.columnModel.setColumnsVisible(u,!1,"uiColumnMoved")}}};this.dragAndDropService.addDragSource(a,!0),this.addDestroyFunc(function(){return r.dragAndDropService.removeDragSource(a)})}},t.prototype.getDragItemForGroup=function(){var e=this.columnGroup.getProvidedColumnGroup().getLeafColumns(),r={};e.forEach(function(i){return r[i.getId()]=i.isVisible()});var o=[];return this.columnModel.getAllDisplayedColumns().forEach(function(i){e.indexOf(i)>=0&&(o.push(i),mn(e,i))}),e.forEach(function(i){return o.push(i)}),{columns:o,visibleState:r}},t.prototype.isSuppressMoving=function(){var e=!1;this.columnGroup.getLeafColumns().forEach(function(o){(o.getColDef().suppressMovable||o.getColDef().lockPosition)&&(e=!0)});var r=e||this.gridOptionsService.is("suppressMovableColumns");return r},$h([w("columnModel")],t.prototype,"columnModel",void 0),$h([w("dragAndDropService")],t.prototype,"dragAndDropService",void 0),$h([w("gridApi")],t.prototype,"gridApi",void 0),$h([w("columnApi")],t.prototype,"columnApi",void 0),t}(Td),z3=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(r[i]=o[i])},n(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");n(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}}(),Kh=function(n,t,e,r){var o=arguments.length,i=o<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(n,t,e,r);else for(var s=n.length-1;s>=0;s--)(a=n[s])&&(i=(o<3?a(i):o>3?a(t,e,i):a(t,e))||i);return o>3&&i&&Object.defineProperty(t,e,i),i},q3=0,fg=function(n){z3(t,n);function t(e,r,o){var i=n.call(this)||this;i.instanceId=q3++,i.headerCellCtrls={},i.rowIndex=e,i.pinned=r,i.type=o;var a=o==g.HeaderRowType.COLUMN_GROUP?"ag-header-row-column-group":o==g.HeaderRowType.FLOATING_FILTER?"ag-header-row-column-filter":"ag-header-row-column";return i.headerRowClass="ag-header-row "+a,i}return t.prototype.postConstruct=function(){this.isPrintLayout=this.gridOptionsService.isDomLayout("print"),this.isEnsureDomOrder=this.gridOptionsService.is("ensureDomOrder")},t.prototype.getInstanceId=function(){return this.instanceId},t.prototype.setComp=function(e,r){r===void 0&&(r=!0),this.comp=e,r&&(this.onRowHeightChanged(),this.onVirtualColumnsChanged()),this.setWidth(),this.addEventListeners()},t.prototype.getHeaderRowClass=function(){return this.headerRowClass},t.prototype.getAriaRowIndex=function(){return this.rowIndex+1},t.prototype.getTransform=function(){if(to())return"translateZ(0)"},t.prototype.addEventListeners=function(){var e=this;this.addManagedListener(this.eventService,_.EVENT_COLUMN_RESIZED,this.onColumnResized.bind(this)),this.addManagedListener(this.eventService,_.EVENT_DISPLAYED_COLUMNS_CHANGED,this.onDisplayedColumnsChanged.bind(this)),this.addManagedListener(this.eventService,_.EVENT_VIRTUAL_COLUMNS_CHANGED,function(r){return e.onVirtualColumnsChanged(r.afterScroll)}),this.addManagedListener(this.eventService,_.EVENT_COLUMN_HEADER_HEIGHT_CHANGED,this.onRowHeightChanged.bind(this)),this.addManagedListener(this.eventService,_.EVENT_GRID_STYLES_CHANGED,this.onRowHeightChanged.bind(this)),this.addManagedListener(this.eventService,_.EVENT_ADVANCED_FILTER_ENABLED_CHANGED,this.onRowHeightChanged.bind(this)),this.addManagedPropertyListener("domLayout",this.onDisplayedColumnsChanged.bind(this)),this.addManagedPropertyListener("ensureDomOrder",function(r){return e.isEnsureDomOrder=r.currentValue}),this.addManagedPropertyListener("headerHeight",this.onRowHeightChanged.bind(this)),this.addManagedPropertyListener("pivotHeaderHeight",this.onRowHeightChanged.bind(this)),this.addManagedPropertyListener("groupHeaderHeight",this.onRowHeightChanged.bind(this)),this.addManagedPropertyListener("pivotGroupHeaderHeight",this.onRowHeightChanged.bind(this)),this.addManagedPropertyListener("floatingFiltersHeight",this.onRowHeightChanged.bind(this))},t.prototype.getHeaderCellCtrl=function(e){return Ts(this.headerCellCtrls).find(function(r){return r.getColumnGroupChild()===e})},t.prototype.onDisplayedColumnsChanged=function(){this.isPrintLayout=this.gridOptionsService.isDomLayout("print"),this.onVirtualColumnsChanged(),this.setWidth(),this.onRowHeightChanged()},t.prototype.getType=function(){return this.type},t.prototype.onColumnResized=function(){this.setWidth()},t.prototype.setWidth=function(){var e=this.getWidthForRow();this.comp.setWidth(e+"px")},t.prototype.getWidthForRow=function(){if(this.isPrintLayout){var e=this.pinned!=null;return e?0:this.columnModel.getContainerWidth("right")+this.columnModel.getContainerWidth("left")+this.columnModel.getContainerWidth(null)}return this.columnModel.getContainerWidth(this.pinned)},t.prototype.onRowHeightChanged=function(){var e=this.getTopAndHeight(),r=e.topOffset,o=e.rowHeight;this.comp.setTop(r+"px"),this.comp.setHeight(o+"px")},t.prototype.getTopAndHeight=function(){var e=this.columnModel.getHeaderRowCount(),r=[],o=0;this.filterManager.hasFloatingFilters()&&(e++,o=1);for(var i=this.columnModel.getColumnGroupHeaderRowHeight(),a=this.columnModel.getColumnHeaderRowHeight(),s=1+o,l=e-s,u=0;u=0;s--)(a=n[s])&&(i=(o<3?a(i):o>3?a(t,e,i):a(t,e))||i);return o>3&&i&&Object.defineProperty(t,e,i),i},K3=function(n,t){var e=typeof Symbol=="function"&&n[Symbol.iterator];if(!e)return n;var r=e.call(n),o,i=[],a;try{for(;(t===void 0||t-- >0)&&!(o=r.next()).done;)i.push(o.value)}catch(s){a={error:s}}finally{try{o&&!o.done&&(e=r.return)&&e.call(r)}finally{if(a)throw a.error}}return i},Y3=function(n,t){for(var e=0,r=t.length,o=n.length;e=0;s--)(a=n[s])&&(i=(o<3?a(i):o>3?a(t,e,i):a(t,e))||i);return o>3&&i&&Object.defineProperty(t,e,i),i},pg=function(n){X3(t,n);function t(e){var r=n.call(this)||this;return r.headerRowComps={},r.rowCompsList=[],r.pinned=e,r}return t.prototype.init=function(){var e=this;this.selectAndSetTemplate();var r={setDisplayed:function(i){return e.setDisplayed(i)},setCtrls:function(i){return e.setCtrls(i)},setCenterWidth:function(i){return e.eCenterContainer.style.width=i},setViewportScrollLeft:function(i){return e.getGui().scrollLeft=i},setPinnedContainerWidth:function(i){var a=e.getGui();a.style.width=i,a.style.maxWidth=i,a.style.minWidth=i}},o=this.createManagedBean(new sA(this.pinned));o.setComp(r,this.getGui())},t.prototype.selectAndSetTemplate=function(){var e=this.pinned=="left",r=this.pinned=="right",o=e?t.PINNED_LEFT_TEMPLATE:r?t.PINNED_RIGHT_TEMPLATE:t.CENTER_TEMPLATE;this.setTemplate(o),this.eRowContainer=this.eCenterContainer?this.eCenterContainer:this.getGui()},t.prototype.destroyRowComps=function(){this.setCtrls([])},t.prototype.destroyRowComp=function(e){this.destroyBean(e),this.eRowContainer.removeChild(e.getGui())},t.prototype.setCtrls=function(e){var r=this,o=this.headerRowComps;this.headerRowComps={},this.rowCompsList=[];var i,a=function(s){var l=s.getGui(),u=l.parentElement!=r.eRowContainer;u&&r.eRowContainer.appendChild(l),i&&WS(r.eRowContainer,l,i),i=l};e.forEach(function(s){var l=s.getInstanceId(),u=o[l];delete o[l];var c=u||r.createBean(new rA(s));r.headerRowComps[l]=c,r.rowCompsList.push(c),a(c)}),oi(o).forEach(function(s){return r.destroyRowComp(s)})},t.PINNED_LEFT_TEMPLATE='',t.PINNED_RIGHT_TEMPLATE='',t.CENTER_TEMPLATE=``,Mw([G("eCenterContainer")],t.prototype,"eCenterContainer",void 0),Mw([M],t.prototype,"init",null),Mw([Mt],t.prototype,"destroyRowComps",null),t}(se),Q3=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(r[i]=o[i])},n(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");n(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}}(),qc=function(n,t,e,r){var o=arguments.length,i=o<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(n,t,e,r);else for(var s=n.length-1;s>=0;s--)(a=n[s])&&(i=(o<3?a(i):o>3?a(t,e,i):a(t,e))||i);return o>3&&i&&Object.defineProperty(t,e,i),i};(function(n){n[n.UP=0]="UP",n[n.DOWN=1]="DOWN",n[n.LEFT=2]="LEFT",n[n.RIGHT=3]="RIGHT"})(g.HeaderNavigationDirection||(g.HeaderNavigationDirection={}));var lA=function(n){Q3(t,n);function t(){return n!==null&&n.apply(this,arguments)||this}return t.prototype.postConstruct=function(){var e=this;this.ctrlsService.whenReady(function(r){e.gridBodyCon=r.gridBodyCtrl})},t.prototype.getHeaderRowCount=function(){var e=this.ctrlsService.getHeaderRowContainerCtrl();return e?e.getRowCount():0},t.prototype.navigateVertically=function(e,r,o){if(r||(r=this.focusService.getFocusedHeader()),!r)return!1;var i=r.headerRowIndex,a=r.column,s=this.getHeaderRowCount(),l=e===g.HeaderNavigationDirection.UP,u=l?this.headerPositionUtils.getColumnVisibleParent(a,i):this.headerPositionUtils.getColumnVisibleChild(a,i),c=u.nextRow,d=u.nextFocusColumn,f=!1;return c<0&&(c=0,d=a,f=!0),c>=s&&(c=-1),!f&&!d?!1:this.focusService.focusHeaderPosition({headerPosition:{headerRowIndex:c,column:d},allowUserOverride:!0,event:o})},t.prototype.navigateHorizontally=function(e,r,o){r===void 0&&(r=!1);var i=this.focusService.getFocusedHeader(),a=e===g.HeaderNavigationDirection.LEFT,s=this.gridOptionsService.is("enableRtl"),l,u;return a!==s?(u="Before",l=this.headerPositionUtils.findHeader(i,u)):(u="After",l=this.headerPositionUtils.findHeader(i,u)),l||!r?this.focusService.focusHeaderPosition({headerPosition:l,direction:u,fromTab:r,allowUserOverride:!0,event:o}):this.focusNextHeaderRow(i,u,o)},t.prototype.focusNextHeaderRow=function(e,r,o){var i=e.headerRowIndex,a=null,s;return r==="Before"?i>0&&(s=i-1,a=this.headerPositionUtils.findColAtEdgeForHeaderRow(s,"end")):(s=i+1,a=this.headerPositionUtils.findColAtEdgeForHeaderRow(s,"start")),this.focusService.focusHeaderPosition({headerPosition:a,direction:r,fromTab:!0,allowUserOverride:!0,event:o})},t.prototype.scrollToColumn=function(e,r){if(r===void 0&&(r="After"),!e.getPinned()){var o;if(e instanceof Wt){var i=e.getDisplayedLeafColumns();o=r==="Before"?Ge(i):i[0]}else o=e;this.gridBodyCon.getScrollFeature().ensureColumnVisible(o)}},qc([w("focusService")],t.prototype,"focusService",void 0),qc([w("headerPositionUtils")],t.prototype,"headerPositionUtils",void 0),qc([w("ctrlsService")],t.prototype,"ctrlsService",void 0),qc([M],t.prototype,"postConstruct",null),t=qc([H("headerNavigationService")],t),t}(F),J3=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(r[i]=o[i])},n(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");n(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}}(),$c=function(n,t,e,r){var o=arguments.length,i=o<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(n,t,e,r);else for(var s=n.length-1;s>=0;s--)(a=n[s])&&(i=(o<3?a(i):o>3?a(t,e,i):a(t,e))||i);return o>3&&i&&Object.defineProperty(t,e,i),i},uA=function(n){J3(t,n);function t(){return n!==null&&n.apply(this,arguments)||this}return t.prototype.setComp=function(e,r,o){this.comp=e,this.eGui=r,this.createManagedBean(new Di(o,{onTabKeyDown:this.onTabKeyDown.bind(this),handleKeyDown:this.handleKeyDown.bind(this),onFocusOut:this.onFocusOut.bind(this)})),this.addManagedListener(this.eventService,_.EVENT_COLUMN_PIVOT_MODE_CHANGED,this.onPivotModeChanged.bind(this)),this.addManagedListener(this.eventService,_.EVENT_DISPLAYED_COLUMNS_CHANGED,this.onDisplayedColumnsChanged.bind(this)),this.onPivotModeChanged(),this.setupHeaderHeight(),this.ctrlsService.registerGridHeaderCtrl(this)},t.prototype.setupHeaderHeight=function(){var e=this.setHeaderHeight.bind(this);e(),this.addManagedPropertyListener("headerHeight",e),this.addManagedPropertyListener("pivotHeaderHeight",e),this.addManagedPropertyListener("groupHeaderHeight",e),this.addManagedPropertyListener("pivotGroupHeaderHeight",e),this.addManagedPropertyListener("floatingFiltersHeight",e),this.addManagedListener(this.eventService,_.EVENT_DISPLAYED_COLUMNS_CHANGED,e),this.addManagedListener(this.eventService,_.EVENT_COLUMN_HEADER_HEIGHT_CHANGED,e),this.addManagedListener(this.eventService,_.EVENT_GRID_STYLES_CHANGED,e),this.addManagedListener(this.eventService,_.EVENT_ADVANCED_FILTER_ENABLED_CHANGED,e)},t.prototype.getHeaderHeight=function(){return this.headerHeight},t.prototype.setHeaderHeight=function(){var e=this.columnModel,r=0,o=e.getHeaderRowCount(),i,a=this.filterManager.hasFloatingFilters();a&&(o++,r=1);var s=this.columnModel.getColumnGroupHeaderRowHeight(),l=this.columnModel.getColumnHeaderRowHeight(),u=1+r,c=o-u;if(i=r*e.getFloatingFiltersHeight(),i+=c*s,i+=l,this.headerHeight!==i){this.headerHeight=i;var d=i+1+"px";this.comp.setHeightAndMinHeight(d),this.eventService.dispatchEvent({type:_.EVENT_HEADER_HEIGHT_CHANGED})}},t.prototype.onPivotModeChanged=function(){var e=this.columnModel.isPivotMode();this.comp.addOrRemoveCssClass("ag-pivot-on",e),this.comp.addOrRemoveCssClass("ag-pivot-off",!e)},t.prototype.onDisplayedColumnsChanged=function(){var e=this.columnModel.getAllDisplayedColumns(),r=e.some(function(o){return o.isSpanHeaderHeight()});this.comp.addOrRemoveCssClass("ag-header-allow-overflow",r)},t.prototype.onTabKeyDown=function(e){var r=this.gridOptionsService.is("enableRtl"),o=e.shiftKey!==r?g.HeaderNavigationDirection.LEFT:g.HeaderNavigationDirection.RIGHT;(this.headerNavigationService.navigateHorizontally(o,!0,e)||this.focusService.focusNextGridCoreContainer(e.shiftKey))&&e.preventDefault()},t.prototype.handleKeyDown=function(e){var r=null;switch(e.key){case O.LEFT:r=g.HeaderNavigationDirection.LEFT;case O.RIGHT:D(r)||(r=g.HeaderNavigationDirection.RIGHT),this.headerNavigationService.navigateHorizontally(r,!1,e);break;case O.UP:r=g.HeaderNavigationDirection.UP;case O.DOWN:D(r)||(r=g.HeaderNavigationDirection.DOWN),this.headerNavigationService.navigateVertically(r,null,e)&&e.preventDefault();break;default:return}},t.prototype.onFocusOut=function(e){var r=this.gridOptionsService.getDocument(),o=e.relatedTarget;!o&&this.eGui.contains(r.activeElement)||this.eGui.contains(o)||this.focusService.clearFocusedHeader()},$c([w("headerNavigationService")],t.prototype,"headerNavigationService",void 0),$c([w("focusService")],t.prototype,"focusService",void 0),$c([w("columnModel")],t.prototype,"columnModel",void 0),$c([w("ctrlsService")],t.prototype,"ctrlsService",void 0),$c([w("filterManager")],t.prototype,"filterManager",void 0),t}(F),Z3=function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(r[i]=o[i])},n(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");n(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}}(),e2=function(n,t,e,r){var o=arguments.length,i=o<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,e):r,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(n,t,e,r);else for(var s=n.length-1;s>=0;s--)(a=n[s])&&(i=(o<3?a(i):o>3?a(t,e,i):a(t,e))||i);return o>3&&i&&Object.defineProperty(t,e,i),i},cA=function(n){Z3(t,n);function t(){return n.call(this,t.TEMPLATE)||this}return t.prototype.postConstruct=function(){var e=this,r={addOrRemoveCssClass:function(a,s){return e.addOrRemoveCssClass(a,s)},setHeightAndMinHeight:function(a){e.getGui().style.height=a,e.getGui().style.minHeight=a}},o=this.createManagedBean(new uA);o.setComp(r,this.getGui(),this.getFocusableElement());var i=function(a){e.createManagedBean(a),e.appendChild(a)};i(new pg("left")),i(new pg(null)),i(new pg("right"))},t.TEMPLATE='