Mike Phares 127634f5ab Delete self contained Thunder Tests
Back to .net8.0
api/v4/InfinityQS
ApiExplorerSettings
Wafer Counter
Color Sorting
2024-03-13 13:15:56 -07:00

13 lines
1.2 MiB

/**
* @ag-grid-community/all-modules - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue * @version v30.2.1
* @link https://www.ag-grid.com/
* @license MIT
*/
function t(t){if(t==null||t===""){return null}return t}function i(t,i){if(i===void 0){i=false}return t!=null&&(t!==""||i)}function n(t){return!i(t)}function r(t){return t==null||t.length===0}function e(t){return t!=null&&typeof t.toString==="function"?t.toString():null}function s(t){if(t===undefined){return}if(t===null||t===""){return null}if(typeof t==="number"){return isNaN(t)?undefined:t}var i=parseInt(t,10);return isNaN(i)?undefined:i}function o(t){if(t===undefined){return}if(t===null||t===""){return false}if(typeof t==="boolean"){return t}return/true/i.test(t)}function u(t){if(t==null||t===""){return}return t}function a(t,i){if(t==null&&i==null){return true}if(t==null&&i!=null){return false}if(t!=null&&i==null){return false}return t===i}function f(t,i){var n=t?JSON.stringify(t):null;var r=i?JSON.stringify(i):null;return n===r}function h(t,i,n){if(n===void 0){n=false}var r=t==null;var e=i==null;if(t&&t.toNumber){t=t.toNumber()}if(i&&i.toNumber){i=i.toNumber()}if(r&&e){return 0}if(r){return-1}if(e){return 1}function s(t,i){return t>i?1:t<i?-1:0}if(typeof t!=="string"){return s(t,i)}if(!n){return s(t,i)}try{return t.localeCompare(i)}catch(n){return s(t,i)}}function c(t){if(t instanceof Set||t instanceof Map){var i=[];t.forEach((function(t){return i.push(t)}));return i}return Object.values(t)}var l=Object.freeze({__proto__:null,makeNull:t,exists:i,missing:n,missingOrEmpty:r,toStringOrNull:e,attrToNumber:s,attrToBoolean:o,attrToString:u,referenceCompare:a,jsonEquals:f,defaultComparator:h,values:c});var v=function(){function t(){this.existingKeys={}}t.prototype.addExistingKeys=function(t){for(var i=0;i<t.length;i++){this.existingKeys[t[i]]=true}};t.prototype.getUniqueKey=function(t,i){t=e(t);var n=0;while(true){var r=void 0;if(t){r=t;if(n!==0){r+="_"+n}}else if(i){r=i;if(n!==0){r+="_"+n}}else{r=n}if(!this.existingKeys[r]){this.existingKeys[r]=true;return String(r)}n++}};return t}();var d=function(t){var i=typeof Symbol==="function"&&Symbol.iterator,n=i&&t[i],r=0;if(n)return n.call(t);if(t&&typeof t.length==="number")return{next:function(){if(t&&r>=t.length)t=void 0;return{value:t&&t[r++],done:!t}}};throw new TypeError(i?"Object is not iterable.":"Symbol.iterator is not defined.")};var p=function(t,i){var n=typeof Symbol==="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),e,s=[],o;try{while((i===void 0||i-- >0)&&!(e=r.next()).done)s.push(e.value)}catch(t){o={error:t}}finally{try{if(e&&!e.done&&(n=r["return"]))n.call(r)}finally{if(o)throw o.error}}return s};function g(t,i){var n,r;if(t==null){return}if(Array.isArray(t)){for(var e=0;e<t.length;e++){i(e.toString(),t[e])}return}try{for(var s=d(Object.entries(t)),o=s.next();!o.done;o=s.next()){var u=p(o.value,2),a=u[0],f=u[1];i(a,f)}}catch(t){n={error:t}}finally{try{if(o&&!o.done&&(r=s.return))r.call(s)}finally{if(n)throw n.error}}}function b(t){var i={};var n=Object.keys(t);for(var r=0;r<n.length;r++){var e=n[r];var s=t[e];i[e]=s}return i}function w(t){return JSON.parse(JSON.stringify(t))}function y(t,i){if(!t){return}var n=t;var r={};Object.keys(n).forEach((function(t){if(i&&i.indexOf(t)>=0){return}var e=n[t];var s=M(e)&&e.constructor===Object;if(s){r[t]=y(e)}else{r[t]=e}}));return r}function m(t,i){return t[i]}function S(t,i,n){t[i]=n}function C(t,i){var n=[];for(var r=2;r<arguments.length;r++){n[r-2]=arguments[r]}n.forEach((function(n){return O(t,i,n)}))}function O(t,i,n,r){var e=m(t,n);if(e!==undefined){S(i,n,r?r(e):e)}}function j(t){var i={};t.filter((function(t){return t!=null})).forEach((function(t){Object.keys(t).forEach((function(t){return i[t]=null}))}));return Object.keys(i)}function R(t){if(!t){return[]}var i=Object;if(typeof i.values==="function"){return i.values(t)}var n=[];for(var r in t){if(t.hasOwnProperty(r)&&t.propertyIsEnumerable(r)){n.push(t[r])}}return n}function x(t,n,r,e){if(r===void 0){r=true}if(e===void 0){e=false}if(!i(n)){return}g(n,(function(i,n){var s=t[i];if(s===n){return}if(e){var o=s==null&&n!=null;if(o){var u=typeof n==="object"&&n.constructor===Object;var a=u;if(a){s={};t[i]=s}}}if(M(n)&&M(s)&&!Array.isArray(s)){x(s,n,r,e)}else if(r||n!==undefined){t[i]=n}}))}function _(t){return n(t)||Object.keys(t).length===0}function A(t,i,n){if(t==null){return n}var r=i.split(".");var e=t;while(r.length>1){e=e[r.shift()];if(e==null){return n}}var s=e[r[0]];return s!=null?s:n}function F(t,i,n){if(t==null){return}var r=i.split(".");var e=t;r.forEach((function(t,i){if(!e[t]){e[t]={}}if(i<r.length-1){e=e[t]}}));e[r[r.length-1]]=n}function k(t,i,n){if(!i||!t){return}if(!n){return t[i]}var r=i.split(".");var e=t;for(var s=0;s<r.length;s++){if(e==null){return undefined}e=e[r[s]]}return e}function T(t,i){Object.keys(t).forEach((function(i){var n=t[i];if(typeof n==="object"){t[i]=undefined}}));var n=Object.getPrototypeOf(t);var r={};Object.keys(n).forEach((function(t){var e=n[t];if(typeof e==="function"){var s=function(){console.warn("AG Grid: "+i+" function "+t+"() cannot be called as the grid has been destroyed.\n Please don't call grid API functions on destroyed grids - as a matter of fact you shouldn't\n be keeping the API reference, your application has a memory leak! Remove the API reference\n when the grid is destroyed.")};r[t]={value:s,writable:true}}}));Object.defineProperties(t,r)}function M(t){return typeof t==="object"&&t!==null}var D=Object.freeze({__proto__:null,iterateObject:g,cloneObject:b,deepCloneObject:w,deepCloneDefinition:y,getProperty:m,setProperty:S,copyPropertiesIfPresent:C,copyPropertyIfPresent:O,getAllKeysInObjects:j,getAllValuesInObject:R,mergeDeep:x,missingOrEmptyObject:_,get:A,set:F,getValueUsingField:k,removeAllReferences:T,isNonNullObject:M});var G={};function P(t,i){if(G[i]){return}t();G[i]=true}function E(t){if(t.name){return t.name}var i=/function\s+([^\(]+)/.exec(t.toString());return i&&i.length===2?i[1].trim():null}function I(t){return!!(t&&t.constructor&&t.call&&t.apply)}function N(t){B(t,400)}var H=[];var L=false;function V(t){H.push(t);if(L){return}L=true;window.setTimeout((function(){var t=H.slice();H.length=0;L=false;t.forEach((function(t){return t()}))}),0)}function B(t,i){if(i===void 0){i=0}if(t.length>0){window.setTimeout((function(){return t.forEach((function(t){return t()}))}),i)}}function z(t,i){var n;return function(){var r=[];for(var e=0;e<arguments.length;e++){r[e]=arguments[e]}var s=this;window.clearTimeout(n);n=window.setTimeout((function(){t.apply(s,r)}),i)}}function W(t,i){var n=0;return function(){var r=[];for(var e=0;e<arguments.length;e++){r[e]=arguments[e]}var s=this;var o=(new Date).getTime();if(o-n<i){return}n=o;t.apply(s,r)}}function U(t,i,n,r){if(n===void 0){n=100}var e=(new Date).getTime();var s=null;var o=false;var u=function(){var u=(new Date).getTime()-e>n;if(t()||u){i();o=true;if(s!=null){window.clearInterval(s);s=null}if(u&&r){console.warn(r)}}};u();if(!o){s=window.setInterval(u,10)}}function K(){var t=[];for(var i=0;i<arguments.length;i++){t[i]=arguments[i]}return function(i){return t.reduce((function(t,i){return i(t)}),i)}}function q(t){if(t){t()}}var Y=function(){return};var Q=Object.freeze({__proto__:null,doOnce:P,getFunctionName:E,isFunction:I,executeInAWhile:N,executeNextVMTurn:V,executeAfter:B,debounce:z,throttle:W,waitUntil:U,compose:K,callIfPresent:q,noop:Y});var J;(function(t){t["CommunityCoreModule"]="@ag-grid-community/core";t["InfiniteRowModelModule"]="@ag-grid-community/infinite-row-model";t["ClientSideRowModelModule"]="@ag-grid-community/client-side-row-model";t["CsvExportModule"]="@ag-grid-community/csv-export";t["EnterpriseCoreModule"]="@ag-grid-enterprise/core";t["RowGroupingModule"]="@ag-grid-enterprise/row-grouping";t["ColumnsToolPanelModule"]="@ag-grid-enterprise/column-tool-panel";t["FiltersToolPanelModule"]="@ag-grid-enterprise/filter-tool-panel";t["MenuModule"]="@ag-grid-enterprise/menu";t["SetFilterModule"]="@ag-grid-enterprise/set-filter";t["MultiFilterModule"]="@ag-grid-enterprise/multi-filter";t["StatusBarModule"]="@ag-grid-enterprise/status-bar";t["SideBarModule"]="@ag-grid-enterprise/side-bar";t["RangeSelectionModule"]="@ag-grid-enterprise/range-selection";t["MasterDetailModule"]="@ag-grid-enterprise/master-detail";t["RichSelectModule"]="@ag-grid-enterprise/rich-select";t["GridChartsModule"]="@ag-grid-enterprise/charts";t["ViewportRowModelModule"]="@ag-grid-enterprise/viewport-row-model";t["ServerSideRowModelModule"]="@ag-grid-enterprise/server-side-row-model";t["ExcelExportModule"]="@ag-grid-enterprise/excel-export";t["ClipboardModule"]="@ag-grid-enterprise/clipboard";t["SparklinesModule"]="@ag-grid-enterprise/sparklines";t["AdvancedFilterModule"]="@ag-grid-enterprise/advanced-filter";t["AngularModule"]="@ag-grid-community/angular";t["ReactModule"]="@ag-grid-community/react";t["VueModule"]="@ag-grid-community/vue"})(J||(J={}));var Z=function(t,i){var n=typeof Symbol==="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),e,s=[],o;try{while((i===void 0||i-- >0)&&!(e=r.next()).done)s.push(e.value)}catch(t){o={error:t}}finally{try{if(e&&!e.done&&(n=r["return"]))n.call(r)}finally{if(o)throw o.error}}return s};var $=function(t,i){for(var n=0,r=i.length,e=t.length;n<r;n++,e++)t[e]=i[n];return t};var X=function(){function t(){}t.register=function(i){t.__register(i,true,undefined)};t.registerModules=function(i){t.__registerModules(i,true,undefined)};t.__register=function(i,n,r){t.runVersionChecks(i);if(r!==undefined){t.areGridScopedModules=true;if(t.gridModulesMap[r]===undefined){t.gridModulesMap[r]={}}t.gridModulesMap[r][i.moduleName]=i}else{t.globalModulesMap[i.moduleName]=i}t.setModuleBased(n)};t.__unRegisterGridModules=function(i){delete t.gridModulesMap[i]};t.__registerModules=function(i,n,r){t.setModuleBased(n);if(!i){return}i.forEach((function(i){return t.__register(i,n,r)}))};t.isValidModuleVersion=function(i){var n=Z(i.version.split(".")||[],2),r=n[0],e=n[1];var s=Z(t.currentModuleVersion.split(".")||[],2),o=s[0],u=s[1];return r===o&&e===u};t.runVersionChecks=function(i){if(!t.currentModuleVersion){t.currentModuleVersion=i.version}if(!i.version){console.error("AG Grid: You are using incompatible versions of AG Grid modules. Major and minor versions should always match across modules. '"+i.moduleName+"' is incompatible. Please update all modules to the same version.")}else if(!t.isValidModuleVersion(i)){console.error("AG Grid: You are using incompatible versions of AG Grid modules. Major and minor versions should always match across modules. '"+i.moduleName+"' is version "+i.version+" but the other modules are version "+this.currentModuleVersion+". Please update all modules to the same version.")}if(i.validate){var n=i.validate();if(!n.isValid){var r=n;console.error("AG Grid: "+r.message)}}};t.setModuleBased=function(i){if(t.moduleBased===undefined){t.moduleBased=i}else{if(t.moduleBased!==i){P((function(){console.warn("AG Grid: You are mixing modules (i.e. @ag-grid-community/core) and packages (ag-grid-community) - you can only use one or the other of these mechanisms.");console.warn("Please see https://www.ag-grid.com/javascript-grid/packages-modules/ for more information.")}),"ModulePackageCheck")}}};t.__setIsBundled=function(){t.isBundled=true};t.__assertRegistered=function(i,n,r){var e;if(this.__isRegistered(i,r)){return true}var s=n+i;var o;if(t.isBundled){{o="AG Grid: unable to use "+n+" as 'ag-grid-enterprise' has not been loaded. Check you are using the Enterprise bundle:\n \n <script src=\"https://cdn.jsdelivr.net/npm/ag-grid-enterprise@AG_GRID_VERSION/dist/ag-grid-enterprise.min.js\"><\/script>\n \nFor more info see: https://ag-grid.com/javascript-data-grid/getting-started/#getting-started-with-ag-grid-enterprise"}}else if(t.moduleBased||t.moduleBased===undefined){var u=(e=Object.entries(J).find((function(t){var n=Z(t,2);var r=n[1];return r===i})))===null||e===void 0?void 0:e[0];o="AG Grid: unable to use "+n+" as the "+u+" is not registered"+(t.areGridScopedModules?" for gridId: "+r:"")+". Check if you have registered the module:\n \n import { ModuleRegistry } from '@ag-grid-community/core';\n import { "+u+" } from '"+i+"';\n \n ModuleRegistry.registerModules([ "+u+" ]);\n\nFor more info see: https://www.ag-grid.com/javascript-grid/modules/"}else{o="AG Grid: unable to use "+n+" as package 'ag-grid-enterprise' has not been imported. Check that you have imported the package:\n \n import 'ag-grid-enterprise';\n \nFor more info see: https://www.ag-grid.com/javascript-grid/packages/"}P((function(){console.warn(o)}),s);return false};t.__isRegistered=function(i,n){var r;return!!t.globalModulesMap[i]||!!((r=t.gridModulesMap[n])===null||r===void 0?void 0:r[i])};t.__getRegisteredModules=function(i){return $($([],Z(c(t.globalModulesMap))),Z(c(t.gridModulesMap[i]||{})))};t.__getGridRegisteredModules=function(i){var n;return c((n=t.gridModulesMap[i])!==null&&n!==void 0?n:{})||[]};t.__isPackageBased=function(){return!t.moduleBased};t.globalModulesMap={};t.gridModulesMap={};t.areGridScopedModules=false;return t}();var tt=function(t,i){var n=typeof Symbol==="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),e,s=[],o;try{while((i===void 0||i-- >0)&&!(e=r.next()).done)s.push(e.value)}catch(t){o={error:t}}finally{try{if(e&&!e.done&&(n=r["return"]))n.call(r)}finally{if(o)throw o.error}}return s};var it=function(t,i){for(var n=0,r=i.length,e=t.length;n<r;n++,e++)t[e]=i[n];return t};var nt=function(){function t(t,i){this.beanWrappers={};this.destroyed=false;if(!t||!t.beanClasses){return}this.contextParams=t;this.logger=i;this.logger.log(">> creating ag-Application Context");this.createBeans();var n=this.getBeanInstances();this.wireBeans(n);this.logger.log(">> ag-Application Context ready - component is alive")}t.prototype.getBeanInstances=function(){return c(this.beanWrappers).map((function(t){return t.beanInstance}))};t.prototype.createBean=function(t,i){if(!t){throw Error("Can't wire to bean since it is null")}this.wireBeans([t],i);return t};t.prototype.wireBeans=function(t,n){this.autoWireBeans(t);this.methodWireBeans(t);this.callLifeCycleMethods(t,"preConstructMethods");if(i(n)){t.forEach(n)}this.callLifeCycleMethods(t,"postConstructMethods")};t.prototype.createBeans=function(){var t=this;this.contextParams.beanClasses.forEach(this.createBeanWrapper.bind(this));g(this.beanWrappers,(function(i,n){var r;if(n.bean.__agBeanMetaData&&n.bean.__agBeanMetaData.autowireMethods&&n.bean.__agBeanMetaData.autowireMethods.agConstructor){r=n.bean.__agBeanMetaData.autowireMethods.agConstructor}var e=t.getBeansForParameters(r,n.bean.name);var s=new(n.bean.bind.apply(n.bean,it([null],tt(e))));n.beanInstance=s}));var i=Object.keys(this.beanWrappers).join(", ");this.logger.log("created beans: "+i)};t.prototype.createBeanWrapper=function(t){var i=t.__agBeanMetaData;if(!i){var n=void 0;if(t.prototype.constructor){n=E(t.prototype.constructor)}else{n=""+t}console.error("Context item "+n+" is not a bean");return}var r={bean:t,beanInstance:null,beanName:i.beanName};this.beanWrappers[i.beanName]=r};t.prototype.autoWireBeans=function(t){var i=this;t.forEach((function(t){i.forEachMetaDataInHierarchy(t,(function(n,r){var e=n.agClassAttributes;if(!e){return}e.forEach((function(n){var e=i.lookupBeanInstance(r,n.beanName,n.optional);t[n.attributeName]=e}))}))}))};t.prototype.methodWireBeans=function(t){var i=this;t.forEach((function(t){i.forEachMetaDataInHierarchy(t,(function(n,r){g(n.autowireMethods,(function(n,e){if(n==="agConstructor"){return}var s=i.getBeansForParameters(e,r);t[n].apply(t,s)}))}))}))};t.prototype.forEachMetaDataInHierarchy=function(t,i){var n=Object.getPrototypeOf(t);while(n!=null){var r=n.constructor;if(r.hasOwnProperty("__agBeanMetaData")){var e=r.__agBeanMetaData;var s=this.getBeanName(r);i(e,s)}n=Object.getPrototypeOf(n)}};t.prototype.getBeanName=function(t){if(t.__agBeanMetaData&&t.__agBeanMetaData.beanName){return t.__agBeanMetaData.beanName}var i=t.toString();var n=i.substring(9,i.indexOf("("));return n};t.prototype.getBeansForParameters=function(t,i){var n=this;var r=[];if(t){g(t,(function(t,e){var s=n.lookupBeanInstance(i,e);r[Number(t)]=s}))}return r};t.prototype.lookupBeanInstance=function(t,i,n){if(n===void 0){n=false}if(this.destroyed){this.logger.log("AG Grid: bean reference "+i+" is used after the grid is destroyed!");return null}if(i==="context"){return this}if(this.contextParams.providedBeanInstances&&this.contextParams.providedBeanInstances.hasOwnProperty(i)){return this.contextParams.providedBeanInstances[i]}var r=this.beanWrappers[i];if(r){return r.beanInstance}if(!n){console.error("AG Grid: unable to find bean reference "+i+" while initialising "+t)}return null};t.prototype.callLifeCycleMethods=function(t,i){var n=this;t.forEach((function(t){return n.callLifeCycleMethodsOnBean(t,i)}))};t.prototype.callLifeCycleMethodsOnBean=function(t,i,n){var r={};this.forEachMetaDataInHierarchy(t,(function(t){var e=t[i];if(e){e.forEach((function(t){if(t!=n){r[t]=true}}))}}));var e=Object.keys(r);e.forEach((function(i){return t[i]()}))};t.prototype.getBean=function(t){return this.lookupBeanInstance("getBean",t,true)};t.prototype.destroy=function(){if(this.destroyed){return}this.destroyed=true;this.logger.log(">> Shutting down ag-Application Context");var t=this.getBeanInstances();this.destroyBeans(t);this.contextParams.providedBeanInstances=null;X.__unRegisterGridModules(this.contextParams.gridId);this.logger.log(">> ag-Application Context shut down - component is dead")};t.prototype.destroyBean=function(t){if(!t){return}this.destroyBeans([t])};t.prototype.destroyBeans=function(t){var i=this;if(!t){return[]}t.forEach((function(t){i.callLifeCycleMethodsOnBean(t,"preDestroyMethods","destroy");var n=t;if(typeof n.destroy==="function"){n.destroy()}}));return[]};t.prototype.isDestroyed=function(){return this.destroyed};t.prototype.getGridId=function(){return this.contextParams.gridId};return t}();function rt(t,i,n){var r=ct(t.constructor);if(!r.preConstructMethods){r.preConstructMethods=[]}r.preConstructMethods.push(i)}function et(t,i,n){var r=ct(t.constructor);if(!r.postConstructMethods){r.postConstructMethods=[]}r.postConstructMethods.push(i)}function st(t,i,n){var r=ct(t.constructor);if(!r.preDestroyMethods){r.preDestroyMethods=[]}r.preDestroyMethods.push(i)}function ot(t){return function(i){var n=ct(i);n.beanName=t}}function ut(t){return function(i,n,r){ft(i,t,false,i,n,null)}}function at(t){return function(i,n,r){ft(i,t,true,i,n,null)}}function ft(t,i,n,r,e,s){if(i===null){console.error("AG Grid: Autowired name should not be null");return}if(typeof s==="number"){console.error("AG Grid: Autowired should be on an attribute");return}var o=ct(t.constructor);if(!o.agClassAttributes){o.agClassAttributes=[]}o.agClassAttributes.push({attributeName:e,beanName:i,optional:n})}function ht(t){return function(i,n,r){var e=typeof i=="function"?i:i.constructor;var s;if(typeof r==="number"){var o=void 0;if(n){s=ct(e);o=n}else{s=ct(e);o="agConstructor"}if(!s.autowireMethods){s.autowireMethods={}}if(!s.autowireMethods[o]){s.autowireMethods[o]={}}s.autowireMethods[o][r]=t}}}function ct(t){if(!t.hasOwnProperty("__agBeanMetaData")){t.__agBeanMetaData={}}return t.__agBeanMetaData}var lt=function(t,i,n,r){var e=arguments.length,s=e<3?i:r===null?r=Object.getOwnPropertyDescriptor(i,n):r,o;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")s=Reflect.decorate(t,i,n,r);else for(var u=t.length-1;u>=0;u--)if(o=t[u])s=(e<3?o(s):e>3?o(i,n,s):o(i,n))||s;return e>3&&s&&Object.defineProperty(i,n,s),s};var vt=function(t,i){return function(n,r){i(n,r,t)}};var dt=function(){function t(){this.allSyncListeners=new Map;this.allAsyncListeners=new Map;this.globalSyncListeners=new Set;this.globalAsyncListeners=new Set;this.asyncFunctionsQueue=[];this.scheduled=false;this.firedEvents={}}t.prototype.setBeans=function(t,i,n,r,e){if(r===void 0){r=null}if(e===void 0){e=null}this.frameworkOverrides=n;this.gridOptionsService=i;if(r){var s=i.useAsyncEvents();this.addGlobalListener(r,s)}if(e){this.addGlobalListener(e,false)}};t.prototype.getListeners=function(t,i,n){var r=i?this.allAsyncListeners:this.allSyncListeners;var e=r.get(t);if(!e&&n){e=new Set;r.set(t,e)}return e};t.prototype.noRegisteredListenersExist=function(){return this.allSyncListeners.size===0&&this.allAsyncListeners.size===0&&this.globalSyncListeners.size===0&&this.globalAsyncListeners.size===0};t.prototype.addEventListener=function(t,i,n){if(n===void 0){n=false}this.getListeners(t,n,true).add(i)};t.prototype.removeEventListener=function(t,i,n){if(n===void 0){n=false}var r=this.getListeners(t,n,false);if(!r){return}r.delete(i);if(r.size===0){var e=n?this.allAsyncListeners:this.allSyncListeners;e.delete(t)}};t.prototype.addGlobalListener=function(t,i){if(i===void 0){i=false}(i?this.globalAsyncListeners:this.globalSyncListeners).add(t)};t.prototype.removeGlobalListener=function(t,i){if(i===void 0){i=false}(i?this.globalAsyncListeners:this.globalSyncListeners).delete(t)};t.prototype.dispatchEvent=function(t){var i=t;if(this.gridOptionsService){var n=this.gridOptionsService,r=n.api,e=n.columnApi,s=n.context;i.api=r;i.columnApi=e;i.context=s}this.dispatchToListeners(i,true);this.dispatchToListeners(i,false);this.firedEvents[i.type]=true};t.prototype.dispatchEventOnce=function(t){if(!this.firedEvents[t.type]){this.dispatchEvent(t)}};t.prototype.dispatchToListeners=function(t,i){var n=this;var r=t.type;if(i&&"event"in t){var e=t.event;if(e instanceof Event){t.eventPath=e.composedPath()}}var s=function(r){return r.forEach((function(r){if(i){n.dispatchAsync((function(){return r(t)}))}else{r(t)}}))};var o=new Set(this.getListeners(r,i,false));if(o.size>0){s(o)}var u=new Set(i?this.globalAsyncListeners:this.globalSyncListeners);u.forEach((function(e){if(i){n.dispatchAsync((function(){return n.frameworkOverrides.dispatchEvent(r,(function(){return e(r,t)}),true)}))}else{n.frameworkOverrides.dispatchEvent(r,(function(){return e(r,t)}),true)}}))};t.prototype.dispatchAsync=function(t){this.asyncFunctionsQueue.push(t);if(!this.scheduled){window.setTimeout(this.flushAsyncQueue.bind(this),0);this.scheduled=true}};t.prototype.flushAsyncQueue=function(){this.scheduled=false;var t=this.asyncFunctionsQueue.slice();this.asyncFunctionsQueue=[];t.forEach((function(t){return t()}))};lt([vt(0,ht("loggerFactory")),vt(1,ht("gridOptionsService")),vt(2,ht("frameworkOverrides")),vt(3,ht("globalEventListener")),vt(4,ht("globalSyncEventListener"))],t.prototype,"setBeans",null);t=lt([ot("eventService")],t);return t}();var pt=function(t,i,n,r){var e=arguments.length,s=e<3?i:r===null?r=Object.getOwnPropertyDescriptor(i,n):r,o;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")s=Reflect.decorate(t,i,n,r);else for(var u=t.length-1;u>=0;u--)if(o=t[u])s=(e<3?o(s):e>3?o(i,n,s):o(i,n))||s;return e>3&&s&&Object.defineProperty(i,n,s),s};var gt=function(t,i){var n=typeof Symbol==="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),e,s=[],o;try{while((i===void 0||i-- >0)&&!(e=r.next()).done)s.push(e.value)}catch(t){o={error:t}}finally{try{if(e&&!e.done&&(n=r["return"]))n.call(r)}finally{if(o)throw o.error}}return s};var bt=function(t,i){for(var n=0,r=i.length,e=t.length;n<r;n++,e++)t[e]=i[n];return t};var wt=0;function yt(){return wt++}var mt=function(){function t(t,i,n,r){this.instanceId=yt();this.autoHeaderHeight=null;this.moving=false;this.menuVisible=false;this.lastLeftPinned=false;this.firstRightPinned=false;this.filterActive=false;this.eventService=new dt;this.tooltipEnabled=false;this.rowGroupActive=false;this.pivotActive=false;this.aggregationActive=false;this.colDef=t;this.userProvidedColDef=i;this.colId=n;this.primary=r;this.setState(t)}t.prototype.getInstanceId=function(){return this.instanceId};t.prototype.setState=function(t){if(t.sort!==undefined){if(t.sort==="asc"||t.sort==="desc"){this.sort=t.sort}}else{if(t.initialSort==="asc"||t.initialSort==="desc"){this.sort=t.initialSort}}var i=s(t.sortIndex);var n=s(t.initialSortIndex);if(i!==undefined){if(i!==null){this.sortIndex=i}}else{if(n!==null){this.sortIndex=n}}var r=o(t.hide);var e=o(t.initialHide);if(r!==undefined){this.visible=!r}else{this.visible=!e}if(t.pinned!==undefined){this.setPinned(t.pinned)}else{this.setPinned(t.initialPinned)}var u=s(t.flex);var a=s(t.initialFlex);if(u!==undefined){this.flex=u}else if(a!==undefined){this.flex=a}};t.prototype.setColDef=function(t,i){this.colDef=t;this.userProvidedColDef=i;this.initMinAndMaxWidths();this.initDotNotation();this.eventService.dispatchEvent(this.createColumnEvent("colDefChanged","api"))};t.prototype.getUserProvidedColDef=function(){return this.userProvidedColDef};t.prototype.setParent=function(t){this.parent=t};t.prototype.getParent=function(){return this.parent};t.prototype.setOriginalParent=function(t){this.originalParent=t};t.prototype.getOriginalParent=function(){return this.originalParent};t.prototype.initialise=function(){this.initMinAndMaxWidths();this.resetActualWidth("gridInitializing");this.initDotNotation();this.initTooltip();this.validate()};t.prototype.initDotNotation=function(){var t=this.gridOptionsService.is("suppressFieldDotNotation");this.fieldContainsDots=i(this.colDef.field)&&this.colDef.field.indexOf(".")>=0&&!t;this.tooltipFieldContainsDots=i(this.colDef.tooltipField)&&this.colDef.tooltipField.indexOf(".")>=0&&!t};t.prototype.initMinAndMaxWidths=function(){var t=this.colDef;this.minWidth=this.columnUtils.calculateColMinWidth(t);this.maxWidth=this.columnUtils.calculateColMaxWidth(t)};t.prototype.initTooltip=function(){this.tooltipEnabled=i(this.colDef.tooltipField)||i(this.colDef.tooltipValueGetter)||i(this.colDef.tooltipComponent)};t.prototype.resetActualWidth=function(t){if(t===void 0){t="api"}var i=this.columnUtils.calculateColInitialWidth(this.colDef);this.setActualWidth(i,t,true)};t.prototype.isEmptyGroup=function(){return false};t.prototype.isRowGroupDisplayed=function(t){if(n(this.colDef)||n(this.colDef.showRowGroup)){return false}var i=this.colDef.showRowGroup===true;var r=this.colDef.showRowGroup===t;return i||r};t.prototype.isPrimary=function(){return this.primary};t.prototype.isFilterAllowed=function(){var t=!!this.colDef.filter;return t};t.prototype.isFieldContainsDots=function(){return this.fieldContainsDots};t.prototype.isTooltipEnabled=function(){return this.tooltipEnabled};t.prototype.isTooltipFieldContainsDots=function(){return this.tooltipFieldContainsDots};t.prototype.validate=function(){var t=this.colDef;function n(t,i,n){P((function(){if(n){console.warn(t,n)}else{P((function(){return console.warn(t)}),i)}}),i)}var r=this.gridOptionsService.isRowModelType("clientSide");if(r&&!X.__isRegistered(J.RowGroupingModule,this.gridOptionsService.getGridId())){var e=["enableRowGroup","rowGroup","rowGroupIndex","enablePivot","enableValue","pivot","pivotIndex","aggFunc"];var s=e.filter((function(n){return i(t[n])}));if(s.length>0){X.__assertRegistered(J.RowGroupingModule,s.map((function(t){return"colDef."+t})).join(", "),this.gridOptionsService.getGridId())}}if(this.colDef.cellEditor==="agRichSelect"||this.colDef.cellEditor==="agRichSelectCellEditor"){X.__assertRegistered(J.RichSelectModule,this.colDef.cellEditor,this.gridOptionsService.getGridId())}if(this.gridOptionsService.is("treeData")){var o=["rowGroup","rowGroupIndex","pivot","pivotIndex"];var s=o.filter((function(n){return i(t[n])}));if(s.length>0){n("AG Grid: "+s.join()+" is not possible when doing tree data, your column definition should not have "+s.join(),"TreeDataCannotRowGroup")}}if(i(t.menuTabs)){if(Array.isArray(t.menuTabs)){var u=["filterMenuTab"];var a=["columnsMenuTab","generalMenuTab"];var s=a.filter((function(i){return t.menuTabs.includes(i)}));if(s.length>0){X.__assertRegistered(J.MenuModule,"menuTab(s): "+s.map((function(t){return"'"+t+"'"})).join(),this.gridOptionsService.getGridId())}t.menuTabs.forEach((function(t){if(!a.includes(t)&&!u.includes(t)){n("AG Grid: '"+t+"' is not valid for 'colDef.menuTabs'. Valid values are: "+bt(bt([],gt(u)),gt(a)).map((function(t){return"'"+t+"'"})).join()+".","wrongValue_menuTabs_"+t)}}))}else{n("AG Grid: The typeof 'colDef.menuTabs' should be an array not:"+typeof t.menuTabs,"wrongType_menuTabs")}}if(i(t.columnsMenuParams)){X.__assertRegistered(J.MenuModule,"columnsMenuParams",this.gridOptionsService.getGridId())}if(i(t.columnsMenuParams)){X.__assertRegistered(J.ColumnsToolPanelModule,"columnsMenuParams",this.gridOptionsService.getGridId())}if(i(this.colDef.width)&&typeof this.colDef.width!=="number"){n("AG Grid: colDef.width should be a number, not "+typeof this.colDef.width,"ColumnCheck")}if(i(t.columnGroupShow)&&t.columnGroupShow!=="closed"&&t.columnGroupShow!=="open"){n("AG Grid: '"+t.columnGroupShow+"' is not valid for columnGroupShow. Valid values are 'open', 'closed', undefined, null","columnGroupShow_invalid")}};t.prototype.addEventListener=function(t,i){this.eventService.addEventListener(t,i)};t.prototype.removeEventListener=function(t,i){this.eventService.removeEventListener(t,i)};t.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}};t.prototype.isSuppressNavigable=function(t){if(typeof this.colDef.suppressNavigable==="boolean"){return this.colDef.suppressNavigable}if(typeof this.colDef.suppressNavigable==="function"){var i=this.createColumnFunctionCallbackParams(t);var n=this.colDef.suppressNavigable;return n(i)}return false};t.prototype.isCellEditable=function(t){if(t.group&&!this.gridOptionsService.is("enableGroupEdit")){return false}return this.isColumnFunc(t,this.colDef.editable)};t.prototype.isSuppressFillHandle=function(){return!!o(this.colDef.suppressFillHandle)};t.prototype.isAutoHeight=function(){return!!o(this.colDef.autoHeight)};t.prototype.isAutoHeaderHeight=function(){return!!o(this.colDef.autoHeaderHeight)};t.prototype.isRowDrag=function(t){return this.isColumnFunc(t,this.colDef.rowDrag)};t.prototype.isDndSource=function(t){return this.isColumnFunc(t,this.colDef.dndSource)};t.prototype.isCellCheckboxSelection=function(t){return this.isColumnFunc(t,this.colDef.checkboxSelection)};t.prototype.isSuppressPaste=function(t){return this.isColumnFunc(t,this.colDef?this.colDef.suppressPaste:null)};t.prototype.isResizable=function(){return!!o(this.colDef.resizable)};t.prototype.isColumnFunc=function(t,i){if(typeof i==="boolean"){return i}if(typeof i==="function"){var n=this.createColumnFunctionCallbackParams(t);var r=i;return r(n)}return false};t.prototype.setMoving=function(t,i){if(i===void 0){i="api"}this.moving=t;this.eventService.dispatchEvent(this.createColumnEvent("movingChanged",i))};t.prototype.createColumnEvent=function(t,i){return{type:t,column:this,columns:[this],source:i,api:this.gridOptionsService.api,columnApi:this.gridOptionsService.columnApi,context:this.gridOptionsService.context}};t.prototype.isMoving=function(){return this.moving};t.prototype.getSort=function(){return this.sort};t.prototype.setSort=function(t,i){if(i===void 0){i="api"}if(this.sort!==t){this.sort=t;this.eventService.dispatchEvent(this.createColumnEvent("sortChanged",i))}this.dispatchStateUpdatedEvent("sort")};t.prototype.setMenuVisible=function(t,i){if(i===void 0){i="api"}if(this.menuVisible!==t){this.menuVisible=t;this.eventService.dispatchEvent(this.createColumnEvent("menuVisibleChanged",i))}};t.prototype.isMenuVisible=function(){return this.menuVisible};t.prototype.isSortAscending=function(){return this.sort==="asc"};t.prototype.isSortDescending=function(){return this.sort==="desc"};t.prototype.isSortNone=function(){return n(this.sort)};t.prototype.isSorting=function(){return i(this.sort)};t.prototype.getSortIndex=function(){return this.sortIndex};t.prototype.setSortIndex=function(t){this.sortIndex=t;this.dispatchStateUpdatedEvent("sortIndex")};t.prototype.setAggFunc=function(t){this.aggFunc=t;this.dispatchStateUpdatedEvent("aggFunc")};t.prototype.getAggFunc=function(){return this.aggFunc};t.prototype.getLeft=function(){return this.left};t.prototype.getOldLeft=function(){return this.oldLeft};t.prototype.getRight=function(){return this.left+this.actualWidth};t.prototype.setLeft=function(t,i){if(i===void 0){i="api"}this.oldLeft=this.left;if(this.left!==t){this.left=t;this.eventService.dispatchEvent(this.createColumnEvent("leftChanged",i))}};t.prototype.isFilterActive=function(){return this.filterActive};t.prototype.setFilterActive=function(t,i,n){if(i===void 0){i="api"}if(this.filterActive!==t){this.filterActive=t;this.eventService.dispatchEvent(this.createColumnEvent("filterActiveChanged",i))}var r=this.createColumnEvent("filterChanged",i);if(n){x(r,n)}this.eventService.dispatchEvent(r)};t.prototype.isHovered=function(){return this.columnHoverService.isHovered(this)};t.prototype.setPinned=function(t){if(t===true||t==="left"){this.pinned="left"}else if(t==="right"){this.pinned="right"}else{this.pinned=null}this.dispatchStateUpdatedEvent("pinned")};t.prototype.setFirstRightPinned=function(t,i){if(i===void 0){i="api"}if(this.firstRightPinned!==t){this.firstRightPinned=t;this.eventService.dispatchEvent(this.createColumnEvent("firstRightPinnedChanged",i))}};t.prototype.setLastLeftPinned=function(t,i){if(i===void 0){i="api"}if(this.lastLeftPinned!==t){this.lastLeftPinned=t;this.eventService.dispatchEvent(this.createColumnEvent("lastLeftPinnedChanged",i))}};t.prototype.isFirstRightPinned=function(){return this.firstRightPinned};t.prototype.isLastLeftPinned=function(){return this.lastLeftPinned};t.prototype.isPinned=function(){return this.pinned==="left"||this.pinned==="right"};t.prototype.isPinnedLeft=function(){return this.pinned==="left"};t.prototype.isPinnedRight=function(){return this.pinned==="right"};t.prototype.getPinned=function(){return this.pinned};t.prototype.setVisible=function(t,i){if(i===void 0){i="api"}var n=t===true;if(this.visible!==n){this.visible=n;this.eventService.dispatchEvent(this.createColumnEvent("visibleChanged",i))}this.dispatchStateUpdatedEvent("hide")};t.prototype.isVisible=function(){return this.visible};t.prototype.isSpanHeaderHeight=function(){var t=this.getColDef();return!t.suppressSpanHeaderHeight&&!t.autoHeaderHeight};t.prototype.getColDef=function(){return this.colDef};t.prototype.getColumnGroupShow=function(){return this.colDef.columnGroupShow};t.prototype.getColId=function(){return this.colId};t.prototype.getId=function(){return this.colId};t.prototype.getUniqueId=function(){return this.colId};t.prototype.getDefinition=function(){return this.colDef};t.prototype.getActualWidth=function(){return this.actualWidth};t.prototype.getAutoHeaderHeight=function(){return this.autoHeaderHeight};t.prototype.setAutoHeaderHeight=function(t){var i=t!==this.autoHeaderHeight;this.autoHeaderHeight=t;return i};t.prototype.createBaseColDefParams=function(t){var i={node:t,data:t.data,colDef:this.colDef,column:this,api:this.gridOptionsService.api,columnApi:this.gridOptionsService.columnApi,context:this.gridOptionsService.context};return i};t.prototype.getColSpan=function(t){if(n(this.colDef.colSpan)){return 1}var i=this.createBaseColDefParams(t);var r=this.colDef.colSpan(i);return Math.max(r,1)};t.prototype.getRowSpan=function(t){if(n(this.colDef.rowSpan)){return 1}var i=this.createBaseColDefParams(t);var r=this.colDef.rowSpan(i);return Math.max(r,1)};t.prototype.setActualWidth=function(t,i,n){if(i===void 0){i="api"}if(n===void 0){n=false}if(this.minWidth!=null){t=Math.max(t,this.minWidth)}if(this.maxWidth!=null){t=Math.min(t,this.maxWidth)}if(this.actualWidth!==t){this.actualWidth=t;if(this.flex&&i!=="flex"&&i!=="gridInitializing"){this.flex=null}if(!n){this.fireColumnWidthChangedEvent(i)}}this.dispatchStateUpdatedEvent("width")};t.prototype.fireColumnWidthChangedEvent=function(t){this.eventService.dispatchEvent(this.createColumnEvent("widthChanged",t))};t.prototype.isGreaterThanMax=function(t){if(this.maxWidth!=null){return t>this.maxWidth}return false};t.prototype.getMinWidth=function(){return this.minWidth};t.prototype.getMaxWidth=function(){return this.maxWidth};t.prototype.getFlex=function(){return this.flex||0};t.prototype.setFlex=function(t){if(this.flex!==t){this.flex=t}this.dispatchStateUpdatedEvent("flex")};t.prototype.setMinimum=function(t){if(t===void 0){t="api"}if(i(this.minWidth)){this.setActualWidth(this.minWidth,t)}};t.prototype.setRowGroupActive=function(t,i){if(i===void 0){i="api"}if(this.rowGroupActive!==t){this.rowGroupActive=t;this.eventService.dispatchEvent(this.createColumnEvent("columnRowGroupChanged",i))}this.dispatchStateUpdatedEvent("rowGroup")};t.prototype.isRowGroupActive=function(){return this.rowGroupActive};t.prototype.setPivotActive=function(t,i){if(i===void 0){i="api"}if(this.pivotActive!==t){this.pivotActive=t;this.eventService.dispatchEvent(this.createColumnEvent("columnPivotChanged",i))}this.dispatchStateUpdatedEvent("pivot")};t.prototype.isPivotActive=function(){return this.pivotActive};t.prototype.isAnyFunctionActive=function(){return this.isPivotActive()||this.isRowGroupActive()||this.isValueActive()};t.prototype.isAnyFunctionAllowed=function(){return this.isAllowPivot()||this.isAllowRowGroup()||this.isAllowValue()};t.prototype.setValueActive=function(t,i){if(i===void 0){i="api"}if(this.aggregationActive!==t){this.aggregationActive=t;this.eventService.dispatchEvent(this.createColumnEvent("columnValueChanged",i))}};t.prototype.isValueActive=function(){return this.aggregationActive};t.prototype.isAllowPivot=function(){return this.colDef.enablePivot===true};t.prototype.isAllowValue=function(){return this.colDef.enableValue===true};t.prototype.isAllowRowGroup=function(){return this.colDef.enableRowGroup===true};t.prototype.getMenuTabs=function(t){var i=this.getColDef().menuTabs;if(i==null){i=t}return i};t.prototype.dispatchStateUpdatedEvent=function(i){this.eventService.dispatchEvent({type:t.EVENT_STATE_UPDATED,key:i})};t.EVENT_MOVING_CHANGED="movingChanged";t.EVENT_LEFT_CHANGED="leftChanged";t.EVENT_WIDTH_CHANGED="widthChanged";t.EVENT_LAST_LEFT_PINNED_CHANGED="lastLeftPinnedChanged";t.EVENT_FIRST_RIGHT_PINNED_CHANGED="firstRightPinnedChanged";t.EVENT_VISIBLE_CHANGED="visibleChanged";t.EVENT_FILTER_CHANGED="filterChanged";t.EVENT_FILTER_ACTIVE_CHANGED="filterActiveChanged";t.EVENT_SORT_CHANGED="sortChanged";t.EVENT_COL_DEF_CHANGED="colDefChanged";t.EVENT_MENU_VISIBLE_CHANGED="menuVisibleChanged";t.EVENT_ROW_GROUP_CHANGED="columnRowGroupChanged";t.EVENT_PIVOT_CHANGED="columnPivotChanged";t.EVENT_VALUE_CHANGED="columnValueChanged";t.EVENT_STATE_UPDATED="columnStateUpdated";pt([ut("gridOptionsService")],t.prototype,"gridOptionsService",void 0);pt([ut("columnUtils")],t.prototype,"columnUtils",void 0);pt([ut("columnHoverService")],t.prototype,"columnHoverService",void 0);pt([et],t.prototype,"initialise",null);return t}();var St=function(t,i,n,r){var e=arguments.length,s=e<3?i:r===null?r=Object.getOwnPropertyDescriptor(i,n):r,o;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")s=Reflect.decorate(t,i,n,r);else for(var u=t.length-1;u>=0;u--)if(o=t[u])s=(e<3?o(s):e>3?o(i,n,s):o(i,n))||s;return e>3&&s&&Object.defineProperty(i,n,s),s};var Ct=function(){function t(t,i,n,r){this.localEventService=new dt;this.expandable=false;this.instanceId=yt();this.expandableListenerRemoveCallback=null;this.colGroupDef=t;this.groupId=i;this.expanded=!!t&&!!t.openByDefault;this.padding=n;this.level=r}t.prototype.destroy=function(){if(this.expandableListenerRemoveCallback){this.reset(null,undefined)}};t.prototype.reset=function(t,i){this.colGroupDef=t;this.level=i;this.originalParent=null;if(this.expandableListenerRemoveCallback){this.expandableListenerRemoveCallback()}this.children=undefined;this.expandable=undefined};t.prototype.getInstanceId=function(){return this.instanceId};t.prototype.setOriginalParent=function(t){this.originalParent=t};t.prototype.getOriginalParent=function(){return this.originalParent};t.prototype.getLevel=function(){return this.level};t.prototype.isVisible=function(){if(this.children){return this.children.some((function(t){return t.isVisible()}))}return false};t.prototype.isPadding=function(){return this.padding};t.prototype.setExpanded=function(i){this.expanded=i===undefined?false:i;var n={type:t.EVENT_EXPANDED_CHANGED};this.localEventService.dispatchEvent(n)};t.prototype.isExpandable=function(){return this.expandable};t.prototype.isExpanded=function(){return this.expanded};t.prototype.getGroupId=function(){return this.groupId};t.prototype.getId=function(){return this.getGroupId()};t.prototype.setChildren=function(t){this.children=t};t.prototype.getChildren=function(){return this.children};t.prototype.getColGroupDef=function(){return this.colGroupDef};t.prototype.getLeafColumns=function(){var t=[];this.addLeafColumns(t);return t};t.prototype.addLeafColumns=function(i){if(!this.children){return}this.children.forEach((function(n){if(n instanceof mt){i.push(n)}else if(n instanceof t){n.addLeafColumns(i)}}))};t.prototype.getColumnGroupShow=function(){var t=this.colGroupDef;if(!t){return}return t.columnGroupShow};t.prototype.setupExpandable=function(){var t=this;this.setExpandable();if(this.expandableListenerRemoveCallback){this.expandableListenerRemoveCallback()}var i=this.onColumnVisibilityChanged.bind(this);this.getLeafColumns().forEach((function(t){return t.addEventListener("visibleChanged",i)}));this.expandableListenerRemoveCallback=function(){t.getLeafColumns().forEach((function(t){return t.removeEventListener("visibleChanged",i)}));t.expandableListenerRemoveCallback=null}};t.prototype.setExpandable=function(){if(this.isPadding()){return}var i=false;var n=false;var r=false;var e=this.findChildrenRemovingPadding();for(var s=0,o=e.length;s<o;s++){var u=e[s];if(!u.isVisible()){continue}var a=u.getColumnGroupShow();if(a==="open"){i=true;r=true}else if(a==="closed"){n=true;r=true}else{i=true;n=true}}var f=i&&n&&r;if(this.expandable!==f){this.expandable=f;var h={type:t.EVENT_EXPANDABLE_CHANGED};this.localEventService.dispatchEvent(h)}};t.prototype.findChildrenRemovingPadding=function(){var i=[];var n=function(r){r.forEach((function(r){var e=r instanceof t&&r.isPadding();if(e){n(r.children)}else{i.push(r)}}))};n(this.children);return i};t.prototype.onColumnVisibilityChanged=function(){this.setExpandable()};t.prototype.addEventListener=function(t,i){this.localEventService.addEventListener(t,i)};t.prototype.removeEventListener=function(t,i){this.localEventService.removeEventListener(t,i)};t.EVENT_EXPANDED_CHANGED="expandedChanged";t.EVENT_EXPANDABLE_CHANGED="expandableChanged";St([st],t.prototype,"destroy",null);return t}();var Ot={numericColumn:{headerClass:"ag-right-aligned-header",cellClass:"ag-right-aligned-cell"},rightAligned:{headerClass:"ag-right-aligned-header",cellClass:"ag-right-aligned-cell"}};function jt(){var t=[];for(var n=0;n<arguments.length;n++){t[n]=arguments[n]}for(var r=0;r<t.length;r++){var e=t[r];if(i(e)){return e}}return null}function Rt(t){return t!=null&&t.length>0}function xt(t){if(!t||!t.length){return}return t[t.length-1]}function _t(t,i,n){if(t==null&&i==null){return true}return t!=null&&i!=null&&t.length===i.length&&t.every((function(t,r){return n?n(t,i[r]):i[r]===t}))}function At(t,i){return _t(t,i)}function Ft(t){return t.sort((function(t,i){return t-i}))}function kt(t,i){if(!t){return}for(var n=t.length-2;n>=0;n--){var r=t[n]===i;var e=t[n+1]===i;if(r&&e){t.splice(n+1,1)}}}function Tt(t,i){var n=t.indexOf(i);if(n>=0){t[n]=t[t.length-1];t.pop()}}function Mt(t,i){var n=t.indexOf(i);if(n>=0){t.splice(n,1)}}function Dt(t,i){for(var n=0;n<i.length;n++){Tt(t,i[n])}}function Gt(t,i){for(var n=0;n<i.length;n++){Mt(t,i[n])}}function Pt(t,i,n){t.splice(n,0,i)}function Et(t,i,n){if(t==null||i==null){return}for(var r=i.length-1;r>=0;r--){var e=i[r];Pt(t,e,n)}}function It(t,i,n){Gt(t,i);i.slice().reverse().forEach((function(i){return Pt(t,i,n)}))}function Nt(t,i){return t.indexOf(i)>-1}function Ht(t){return[].concat.apply([],t)}function Lt(t,i){if(i==null||t==null){return}i.forEach((function(i){return t.push(i)}))}function Vt(t){return t.map(e)}function Bt(t,i){if(t==null){return}for(var n=t.length-1;n>=0;n--){i(t[n],n)}}var zt=Object.freeze({__proto__:null,firstExistingValue:jt,existsAndNotEmpty:Rt,last:xt,areEqual:_t,shallowCompare:At,sortNumerically:Ft,removeRepeatsFromArray:kt,removeFromUnorderedArray:Tt,removeFromArray:Mt,removeAllFromUnorderedArray:Dt,removeAllFromArray:Gt,insertIntoArray:Pt,insertArrayIntoArray:Et,moveInArray:It,includes:Nt,flatten:Ht,pushAll:Lt,toStrings:Vt,forEachReverse:Bt});var Wt="__ag_Grid_Stop_Propagation";var Ut=["touchstart","touchend","touchmove","touchcancel","scroll"];var Kt={};function qt(t){t[Wt]=true}function Yt(t){return t[Wt]===true}var Qt=function(){var t={select:"input",change:"input",submit:"form",reset:"form",error:"img",load:"img",abort:"img"};var i=function(i){if(typeof Kt[i]==="boolean"){return Kt[i]}var n=document.createElement(t[i]||"div");i="on"+i;return Kt[i]=i in n};return i}();function Jt(t,i,n){var r=i;while(r){var e=t.getDomData(r,n);if(e){return e}r=r.parentElement}return null}function Zt(t,i){if(!i||!t){return false}return Xt(i).indexOf(t)>=0}function $t(t){var i=[];var n=t.target;while(n){i.push(n);n=n.parentElement}return i}function Xt(t){var i=t;if(i.path){return i.path}if(i.composedPath){return i.composedPath()}return $t(i)}function ti(t,i,n,r){var e=Nt(Ut,n);var s=e?{passive:true}:undefined;if(t&&t.addEventListener){t.addEventListener(i,n,r,s)}}var ii=Object.freeze({__proto__:null,stopPropagationForAgGrid:qt,isStopPropagationForAgGrid:Yt,isEventSupported:Qt,getCtrlForEventTarget:Jt,isElementInEventPath:Zt,createEventPath:$t,getEventPath:Xt,addSafePassiveEventListener:ti});var ni=function(t,i,n,r){var e=arguments.length,s=e<3?i:r===null?r=Object.getOwnPropertyDescriptor(i,n):r,o;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")s=Reflect.decorate(t,i,n,r);else for(var u=t.length-1;u>=0;u--)if(o=t[u])s=(e<3?o(s):e>3?o(i,n,s):o(i,n))||s;return e>3&&s&&Object.defineProperty(i,n,s),s};var ri=function(){function t(){var t=this;this.destroyFunctions=[];this.destroyed=false;this.__v_skip=true;this.lastChangeSetIdLookup={};this.propertyListenerId=0;this.isAlive=function(){return!t.destroyed}}t.prototype.getFrameworkOverrides=function(){return this.frameworkOverrides};t.prototype.getContext=function(){return this.context};t.prototype.destroy=function(){this.destroyFunctions.forEach((function(t){return t()}));this.destroyFunctions.length=0;this.destroyed=true;this.dispatchEvent({type:t.EVENT_DESTROYED})};t.prototype.addEventListener=function(t,i){if(!this.localEventService){this.localEventService=new dt}this.localEventService.addEventListener(t,i)};t.prototype.removeEventListener=function(t,i){if(this.localEventService){this.localEventService.removeEventListener(t,i)}};t.prototype.dispatchEventAsync=function(t){var i=this;window.setTimeout((function(){return i.dispatchEvent(t)}),0)};t.prototype.dispatchEvent=function(t){if(this.localEventService){this.localEventService.dispatchEvent(t)}};t.prototype.addManagedListener=function(t,i,n){var r=this;if(this.destroyed){return}if(t instanceof HTMLElement){ti(this.getFrameworkOverrides(),t,i,n)}else{t.addEventListener(i,n)}var e=function(){t.removeEventListener(i,n);r.destroyFunctions=r.destroyFunctions.filter((function(t){return t!==e}));return null};this.destroyFunctions.push(e);return e};t.prototype.setupGridOptionListener=function(t,i){var n=this;this.gridOptionsService.addEventListener(t,i);var r=function(){n.gridOptionsService.removeEventListener(t,i);n.destroyFunctions=n.destroyFunctions.filter((function(t){return t!==r}));return null};this.destroyFunctions.push(r)};t.prototype.addManagedPropertyListener=function(t,i){if(this.destroyed){return}this.setupGridOptionListener(t,i)};t.prototype.addManagedPropertyListeners=function(t,i){var n=this;if(this.destroyed){return}var r=t.join("-")+this.propertyListenerId++;var e=function(t){if(t.changeSet){if(t.changeSet&&t.changeSet.id===n.lastChangeSetIdLookup[r]){return}n.lastChangeSetIdLookup[r]=t.changeSet.id}var e={type:"gridPropertyChanged",changeSet:t.changeSet};i(e)};t.forEach((function(t){return n.setupGridOptionListener(t,e)}))};t.prototype.addDestroyFunc=function(t){if(this.isAlive()){this.destroyFunctions.push(t)}else{t()}};t.prototype.createManagedBean=function(t,i){var n=this.createBean(t,i);this.addDestroyFunc(this.destroyBean.bind(this,t,i));return n};t.prototype.createBean=function(t,i,n){return(i||this.getContext()).createBean(t,n)};t.prototype.destroyBean=function(t,i){return(i||this.getContext()).destroyBean(t)};t.prototype.destroyBeans=function(t,i){var n=this;if(t){t.forEach((function(t){return n.destroyBean(t,i)}))}return[]};t.EVENT_DESTROYED="destroyed";ni([ut("frameworkOverrides")],t.prototype,"frameworkOverrides",void 0);ni([ut("context")],t.prototype,"context",void 0);ni([ut("eventService")],t.prototype,"eventService",void 0);ni([ut("gridOptionsService")],t.prototype,"gridOptionsService",void 0);ni([ut("localeService")],t.prototype,"localeService",void 0);ni([ut("environment")],t.prototype,"environment",void 0);ni([st],t.prototype,"destroy",null);return t}();var ei=function(){var t=function(i,n){t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var n in i)if(Object.prototype.hasOwnProperty.call(i,n))t[n]=i[n]};return t(i,n)};return function(i,n){if(typeof n!=="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(i,n);function r(){this.constructor=i}i.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}();var si=function(t,i,n,r){var e=arguments.length,s=e<3?i:r===null?r=Object.getOwnPropertyDescriptor(i,n):r,o;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")s=Reflect.decorate(t,i,n,r);else for(var u=t.length-1;u>=0;u--)if(o=t[u])s=(e<3?o(s):e>3?o(i,n,s):o(i,n))||s;return e>3&&s&&Object.defineProperty(i,n,s),s};var oi=function(t,i){return function(n,r){i(n,r,t)}};var ui=function(t){ei(i,t);function i(){return t!==null&&t.apply(this,arguments)||this}i.prototype.setBeans=function(t){this.logger=t.create("ColumnFactory")};i.prototype.createColumnTree=function(t,i,n){var r=new v;var e=this.extractExistingTreeData(n),s=e.existingCols,o=e.existingGroups,u=e.existingColKeys;r.addExistingKeys(u);var a=this.recursivelyCreateColumns(t,0,i,s,r,o);var f=this.findMaxDept(a,0);this.logger.log("Number of levels for grouped columns is "+f);var h=this.balanceColumnTree(a,0,f,r);var c=function(t,i){if(t instanceof Ct){t.setupExpandable()}t.setOriginalParent(i)};this.columnUtils.depthFirstOriginalTreeSearch(null,h,c);return{columnTree:h,treeDept:f}};i.prototype.extractExistingTreeData=function(t){var i=[];var n=[];var r=[];if(t){this.columnUtils.depthFirstOriginalTreeSearch(null,t,(function(t){if(t instanceof Ct){var e=t;n.push(e)}else{var s=t;r.push(s.getId());i.push(s)}}))}return{existingCols:i,existingGroups:n,existingColKeys:r}};i.prototype.createForAutoGroups=function(t,i){var n=this;return t.map((function(t){return n.createAutoGroupTreeItem(i,t)}))};i.prototype.createAutoGroupTreeItem=function(t,i){var n=this.findDepth(t);var r=i;for(var e=n-1;e>=0;e--){var s=new Ct(null,"FAKE_PATH_"+i.getId()+"}_"+e,true,e);this.createBean(s);s.setChildren([r]);r.setOriginalParent(s);r=s}if(n===0){i.setOriginalParent(null)}return r};i.prototype.findDepth=function(t){var i=0;var n=t;while(n&&n[0]&&n[0]instanceof Ct){i++;n=n[0].getChildren()}return i};i.prototype.balanceColumnTree=function(t,i,n,r){var e=[];for(var s=0;s<t.length;s++){var o=t[s];if(o instanceof Ct){var u=o;var a=this.balanceColumnTree(u.getChildren(),i+1,n,r);u.setChildren(a);e.push(u)}else{var f=void 0;var h=void 0;for(var c=n-1;c>=i;c--){var l=r.getUniqueKey(null,null);var v=this.createMergedColGroupDef(null);var d=new Ct(v,l,true,i);this.createBean(d);if(h){h.setChildren([d])}h=d;if(!f){f=h}}if(f&&h){e.push(f);var p=t.some((function(t){return t instanceof Ct}));if(p){h.setChildren([o]);continue}else{h.setChildren(t);break}}e.push(o)}}return e};i.prototype.findMaxDept=function(t,i){var n=i;for(var r=0;r<t.length;r++){var e=t[r];if(e instanceof Ct){var s=e;var o=this.findMaxDept(s.getChildren(),i+1);if(n<o){n=o}}}return n};i.prototype.recursivelyCreateColumns=function(t,i,n,r,e,s){if(!t)return[];var o=new Array(t.length);for(var u=0;u<o.length;u++){var a=t[u];if(this.isColumnGroup(a)){o[u]=this.createColumnGroup(n,a,i,r,e,s)}else{o[u]=this.createColumn(n,a,r,e)}}return o};i.prototype.createColumnGroup=function(t,i,n,r,e,s){var o=this.createMergedColGroupDef(i);var u=e.getUniqueKey(o.groupId||null,null);var a=new Ct(o,u,false,n);this.createBean(a);var f=this.findExistingGroup(i,s);if(f){s.splice(f.idx,1)}var h=f===null||f===void 0?void 0:f.group;if(h){a.setExpanded(h.isExpanded())}var c=this.recursivelyCreateColumns(o.children,n+1,t,r,e,s);a.setChildren(c);return a};i.prototype.createMergedColGroupDef=function(t){var i={};Object.assign(i,this.gridOptionsService.get("defaultColGroupDef"));Object.assign(i,t);return i};i.prototype.createColumn=function(t,i,n,r){var e=this.findExistingColumn(i,n);if(e){n===null||n===void 0?void 0:n.splice(e.idx,1)}var s=e===null||e===void 0?void 0:e.column;if(!s){var o=r.getUniqueKey(i.colId,i.field);var u=this.addColumnDefaultAndTypes(i,o);s=new mt(u,i,o,t);this.context.createBean(s)}else{var u=this.addColumnDefaultAndTypes(i,s.getColId());s.setColDef(u,i);this.applyColumnState(s,u)}this.dataTypeService.addColumnListeners(s);return s};i.prototype.applyColumnState=function(t,i){var n=s(i.flex);if(n!==undefined){t.setFlex(n)}var r=t.getFlex()<=0;if(r){var e=s(i.width);if(e!=null){t.setActualWidth(e)}else{var u=t.getActualWidth();t.setActualWidth(u)}}if(i.sort!==undefined){if(i.sort=="asc"||i.sort=="desc"){t.setSort(i.sort)}else{t.setSort(undefined)}}var a=s(i.sortIndex);if(a!==undefined){t.setSortIndex(a)}var f=o(i.hide);if(f!==undefined){t.setVisible(!f)}if(i.pinned!==undefined){t.setPinned(i.pinned)}};i.prototype.findExistingColumn=function(t,i){if(!i)return undefined;for(var n=0;n<i.length;n++){var r=i[n].getUserProvidedColDef();if(!r)continue;var e=t.colId!=null;if(e){if(i[n].getId()===t.colId){return{idx:n,column:i[n]}}continue}var s=t.field!=null;if(s){if(r.field===t.field){return{idx:n,column:i[n]}}continue}if(r===t){return{idx:n,column:i[n]}}}return undefined};i.prototype.findExistingGroup=function(t,i){var n=t.groupId!=null;if(!n){return undefined}for(var r=0;r<i.length;r++){var e=i[r];var s=e.getColGroupDef();if(!s){continue}if(e.getId()===t.groupId){return{idx:r,group:e}}}return undefined};i.prototype.addColumnDefaultAndTypes=function(t,i){var n={};var r=this.gridOptionsService.get("defaultColDef");x(n,r,false,true);var e=this.dataTypeService.updateColDefAndGetColumnType(n,t,i);if(e){this.assignColumnTypes(e,n)}x(n,t,false,true);var s=this.gridOptionsService.get("autoGroupColumnDef");var o=this.gridOptionsService.isColumnsSortingCoupledToGroup();if(t.rowGroup&&s&&o){x(n,{sort:s.sort,initialSort:s.initialSort},false,true)}this.dataTypeService.validateColDef(n);return n};i.prototype.assignColumnTypes=function(t,i){if(!t.length){return}var n=Object.assign({},Ot);var r=this.gridOptionsService.get("columnTypes")||{};g(r,(function(t,i){if(t in n){console.warn("AG Grid: the column type '"+t+"' is a default column type and cannot be overridden.")}else{n[t]=i}}));t.forEach((function(t){var r=n[t.trim()];if(r){x(i,r,false,true)}else{console.warn("AG Grid: colDef.type '"+t+"' does not correspond to defined gridOptions.columnTypes")}}))};i.prototype.isColumnGroup=function(t){return t.children!==undefined};si([ut("columnUtils")],i.prototype,"columnUtils",void 0);si([ut("dataTypeService")],i.prototype,"dataTypeService",void 0);si([oi(0,ht("loggerFactory"))],i.prototype,"setBeans",null);i=si([ot("columnFactory")],i);return i}(ri);var ai=function(t,i,n,r){var e=arguments.length,s=e<3?i:r===null?r=Object.getOwnPropertyDescriptor(i,n):r,o;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")s=Reflect.decorate(t,i,n,r);else for(var u=t.length-1;u>=0;u--)if(o=t[u])s=(e<3?o(s):e>3?o(i,n,s):o(i,n))||s;return e>3&&s&&Object.defineProperty(i,n,s),s};var fi=function(){function t(t,i,n,r){this.displayedChildren=[];this.localEventService=new dt;this.groupId=i;this.partId=n;this.providedColumnGroup=t;this.pinned=r}t.createUniqueId=function(t,i){return t+"_"+i};t.prototype.reset=function(){this.parent=null;this.children=null;this.displayedChildren=null};t.prototype.getParent=function(){return this.parent};t.prototype.setParent=function(t){this.parent=t};t.prototype.getUniqueId=function(){return t.createUniqueId(this.groupId,this.partId)};t.prototype.isEmptyGroup=function(){return this.displayedChildren.length===0};t.prototype.isMoving=function(){var t=this.getProvidedColumnGroup().getLeafColumns();if(!t||t.length===0){return false}return t.every((function(t){return t.isMoving()}))};t.prototype.checkLeft=function(){this.displayedChildren.forEach((function(i){if(i instanceof t){i.checkLeft()}}));if(this.displayedChildren.length>0){if(this.gridOptionsService.is("enableRtl")){var i=xt(this.displayedChildren);var n=i.getLeft();this.setLeft(n)}else{var r=this.displayedChildren[0].getLeft();this.setLeft(r)}}else{this.setLeft(null)}};t.prototype.getLeft=function(){return this.left};t.prototype.getOldLeft=function(){return this.oldLeft};t.prototype.setLeft=function(i){this.oldLeft=i;if(this.left!==i){this.left=i;this.localEventService.dispatchEvent(this.createAgEvent(t.EVENT_LEFT_CHANGED))}};t.prototype.getPinned=function(){return this.pinned};t.prototype.createAgEvent=function(t){return{type:t}};t.prototype.addEventListener=function(t,i){this.localEventService.addEventListener(t,i)};t.prototype.removeEventListener=function(t,i){this.localEventService.removeEventListener(t,i)};t.prototype.getGroupId=function(){return this.groupId};t.prototype.getPartId=function(){return this.partId};t.prototype.isChildInThisGroupDeepSearch=function(i){var n=false;this.children.forEach((function(r){if(i===r){n=true}if(r instanceof t){if(r.isChildInThisGroupDeepSearch(i)){n=true}}}));return n};t.prototype.getActualWidth=function(){var t=0;if(this.displayedChildren){this.displayedChildren.forEach((function(i){t+=i.getActualWidth()}))}return t};t.prototype.isResizable=function(){if(!this.displayedChildren){return false}var t=false;this.displayedChildren.forEach((function(i){if(i.isResizable()){t=true}}));return t};t.prototype.getMinWidth=function(){var t=0;this.displayedChildren.forEach((function(i){t+=i.getMinWidth()||0}));return t};t.prototype.addChild=function(t){if(!this.children){this.children=[]}this.children.push(t)};t.prototype.getDisplayedChildren=function(){return this.displayedChildren};t.prototype.getLeafColumns=function(){var t=[];this.addLeafColumns(t);return t};t.prototype.getDisplayedLeafColumns=function(){var t=[];this.addDisplayedLeafColumns(t);return t};t.prototype.getDefinition=function(){return this.providedColumnGroup.getColGroupDef()};t.prototype.getColGroupDef=function(){return this.providedColumnGroup.getColGroupDef()};t.prototype.isPadding=function(){return this.providedColumnGroup.isPadding()};t.prototype.isExpandable=function(){return this.providedColumnGroup.isExpandable()};t.prototype.isExpanded=function(){return this.providedColumnGroup.isExpanded()};t.prototype.setExpanded=function(t){this.providedColumnGroup.setExpanded(t)};t.prototype.addDisplayedLeafColumns=function(i){this.displayedChildren.forEach((function(n){if(n instanceof mt){i.push(n)}else if(n instanceof t){n.addDisplayedLeafColumns(i)}}))};t.prototype.addLeafColumns=function(i){this.children.forEach((function(n){if(n instanceof mt){i.push(n)}else if(n instanceof t){n.addLeafColumns(i)}}))};t.prototype.getChildren=function(){return this.children};t.prototype.getColumnGroupShow=function(){return this.providedColumnGroup.getColumnGroupShow()};t.prototype.getProvidedColumnGroup=function(){return this.providedColumnGroup};t.prototype.getPaddingLevel=function(){var t=this.getParent();if(!this.isPadding()||!t||!t.isPadding()){return 0}return 1+t.getPaddingLevel()};t.prototype.calculateDisplayedColumns=function(){var i=this;this.displayedChildren=[];var n=this;while(n!=null&&n.isPadding()){n=n.getParent()}var r=n?n.providedColumnGroup.isExpandable():false;if(!r){this.displayedChildren=this.children;this.localEventService.dispatchEvent(this.createAgEvent(t.EVENT_DISPLAYED_CHILDREN_CHANGED));return}this.children.forEach((function(r){var e=r instanceof t&&(!r.displayedChildren||!r.displayedChildren.length);if(e){return}var s=r.getColumnGroupShow();switch(s){case"open":if(n.providedColumnGroup.isExpanded()){i.displayedChildren.push(r)}break;case"closed":if(!n.providedColumnGroup.isExpanded()){i.displayedChildren.push(r)}break;default:i.displayedChildren.push(r);break}}));this.localEventService.dispatchEvent(this.createAgEvent(t.EVENT_DISPLAYED_CHILDREN_CHANGED))};t.EVENT_LEFT_CHANGED="leftChanged";t.EVENT_DISPLAYED_CHILDREN_CHANGED="displayedChildrenChanged";ai([ut("gridOptionsService")],t.prototype,"gridOptionsService",void 0);return t}();var hi=function(){function t(){}t.EVENT_COLUMN_EVERYTHING_CHANGED="columnEverythingChanged";t.EVENT_NEW_COLUMNS_LOADED="newColumnsLoaded";t.EVENT_COLUMN_PIVOT_MODE_CHANGED="columnPivotModeChanged";t.EVENT_COLUMN_ROW_GROUP_CHANGED="columnRowGroupChanged";t.EVENT_EXPAND_COLLAPSE_ALL="expandOrCollapseAll";t.EVENT_COLUMN_PIVOT_CHANGED="columnPivotChanged";t.EVENT_GRID_COLUMNS_CHANGED="gridColumnsChanged";t.EVENT_COLUMN_VALUE_CHANGED="columnValueChanged";t.EVENT_COLUMN_MOVED="columnMoved";t.EVENT_COLUMN_VISIBLE="columnVisible";t.EVENT_COLUMN_PINNED="columnPinned";t.EVENT_COLUMN_GROUP_OPENED="columnGroupOpened";t.EVENT_COLUMN_RESIZED="columnResized";t.EVENT_DISPLAYED_COLUMNS_CHANGED="displayedColumnsChanged";t.EVENT_VIRTUAL_COLUMNS_CHANGED="virtualColumnsChanged";t.EVENT_ASYNC_TRANSACTIONS_FLUSHED="asyncTransactionsFlushed";t.EVENT_ROW_GROUP_OPENED="rowGroupOpened";t.EVENT_ROW_DATA_CHANGED="rowDataChanged";t.EVENT_ROW_DATA_UPDATED="rowDataUpdated";t.EVENT_PINNED_ROW_DATA_CHANGED="pinnedRowDataChanged";t.EVENT_RANGE_SELECTION_CHANGED="rangeSelectionChanged";t.EVENT_CHART_CREATED="chartCreated";t.EVENT_CHART_RANGE_SELECTION_CHANGED="chartRangeSelectionChanged";t.EVENT_CHART_OPTIONS_CHANGED="chartOptionsChanged";t.EVENT_CHART_DESTROYED="chartDestroyed";t.EVENT_TOOL_PANEL_VISIBLE_CHANGED="toolPanelVisibleChanged";t.EVENT_TOOL_PANEL_SIZE_CHANGED="toolPanelSizeChanged";t.EVENT_COLUMN_PANEL_ITEM_DRAG_START="columnPanelItemDragStart";t.EVENT_COLUMN_PANEL_ITEM_DRAG_END="columnPanelItemDragEnd";t.EVENT_MODEL_UPDATED="modelUpdated";t.EVENT_CUT_START="cutStart";t.EVENT_CUT_END="cutEnd";t.EVENT_PASTE_START="pasteStart";t.EVENT_PASTE_END="pasteEnd";t.EVENT_FILL_START="fillStart";t.EVENT_FILL_END="fillEnd";t.EVENT_RANGE_DELETE_START="rangeDeleteStart";t.EVENT_RANGE_DELETE_END="rangeDeleteEnd";t.EVENT_UNDO_STARTED="undoStarted";t.EVENT_UNDO_ENDED="undoEnded";t.EVENT_REDO_STARTED="redoStarted";t.EVENT_REDO_ENDED="redoEnded";t.EVENT_KEY_SHORTCUT_CHANGED_CELL_START="keyShortcutChangedCellStart";t.EVENT_KEY_SHORTCUT_CHANGED_CELL_END="keyShortcutChangedCellEnd";t.EVENT_CELL_CLICKED="cellClicked";t.EVENT_CELL_DOUBLE_CLICKED="cellDoubleClicked";t.EVENT_CELL_MOUSE_DOWN="cellMouseDown";t.EVENT_CELL_CONTEXT_MENU="cellContextMenu";t.EVENT_CELL_VALUE_CHANGED="cellValueChanged";t.EVENT_CELL_EDIT_REQUEST="cellEditRequest";t.EVENT_ROW_VALUE_CHANGED="rowValueChanged";t.EVENT_CELL_FOCUSED="cellFocused";t.EVENT_CELL_FOCUS_CLEARED="cellFocusCleared";t.EVENT_FULL_WIDTH_ROW_FOCUSED="fullWidthRowFocused";t.EVENT_ROW_SELECTED="rowSelected";t.EVENT_SELECTION_CHANGED="selectionChanged";t.EVENT_TOOLTIP_SHOW="tooltipShow";t.EVENT_TOOLTIP_HIDE="tooltipHide";t.EVENT_CELL_KEY_DOWN="cellKeyDown";t.EVENT_CELL_MOUSE_OVER="cellMouseOver";t.EVENT_CELL_MOUSE_OUT="cellMouseOut";t.EVENT_FILTER_CHANGED="filterChanged";t.EVENT_FILTER_MODIFIED="filterModified";t.EVENT_FILTER_OPENED="filterOpened";t.EVENT_ADVANCED_FILTER_BUILDER_VISIBLE_CHANGED="advancedFilterBuilderVisibleChanged";t.EVENT_SORT_CHANGED="sortChanged";t.EVENT_VIRTUAL_ROW_REMOVED="virtualRowRemoved";t.EVENT_ROW_CLICKED="rowClicked";t.EVENT_ROW_DOUBLE_CLICKED="rowDoubleClicked";t.EVENT_GRID_READY="gridReady";t.EVENT_GRID_PRE_DESTROYED="gridPreDestroyed";t.EVENT_GRID_SIZE_CHANGED="gridSizeChanged";t.EVENT_VIEWPORT_CHANGED="viewportChanged";t.EVENT_SCROLLBAR_WIDTH_CHANGED="scrollbarWidthChanged";t.EVENT_FIRST_DATA_RENDERED="firstDataRendered";t.EVENT_DRAG_STARTED="dragStarted";t.EVENT_DRAG_STOPPED="dragStopped";t.EVENT_CHECKBOX_CHANGED="checkboxChanged";t.EVENT_ROW_EDITING_STARTED="rowEditingStarted";t.EVENT_ROW_EDITING_STOPPED="rowEditingStopped";t.EVENT_CELL_EDITING_STARTED="cellEditingStarted";t.EVENT_CELL_EDITING_STOPPED="cellEditingStopped";t.EVENT_BODY_SCROLL="bodyScroll";t.EVENT_BODY_SCROLL_END="bodyScrollEnd";t.EVENT_HEIGHT_SCALE_CHANGED="heightScaleChanged";t.EVENT_PAGINATION_CHANGED="paginationChanged";t.EVENT_COMPONENT_STATE_CHANGED="componentStateChanged";t.EVENT_STORE_REFRESHED="storeRefreshed";t.EVENT_BODY_HEIGHT_CHANGED="bodyHeightChanged";t.EVENT_DISPLAYED_COLUMNS_WIDTH_CHANGED="displayedColumnsWidthChanged";t.EVENT_SCROLL_VISIBILITY_CHANGED="scrollVisibilityChanged";t.EVENT_COLUMN_HOVER_CHANGED="columnHoverChanged";t.EVENT_FLASH_CELLS="flashCells";t.EVENT_PAGINATION_PIXEL_OFFSET_CHANGED="paginationPixelOffsetChanged";t.EVENT_DISPLAYED_ROWS_CHANGED="displayedRowsChanged";t.EVENT_LEFT_PINNED_WIDTH_CHANGED="leftPinnedWidthChanged";t.EVENT_RIGHT_PINNED_WIDTH_CHANGED="rightPinnedWidthChanged";t.EVENT_ROW_CONTAINER_HEIGHT_CHANGED="rowContainerHeightChanged";t.EVENT_HEADER_HEIGHT_CHANGED="headerHeightChanged";t.EVENT_COLUMN_HEADER_HEIGHT_CHANGED="columnHeaderHeightChanged";t.EVENT_ROW_DRAG_ENTER="rowDragEnter";t.EVENT_ROW_DRAG_MOVE="rowDragMove";t.EVENT_ROW_DRAG_LEAVE="rowDragLeave";t.EVENT_ROW_DRAG_END="rowDragEnd";t.EVENT_GRID_STYLES_CHANGED="gridStylesChanged";t.EVENT_POPUP_TO_FRONT="popupToFront";t.EVENT_COLUMN_ROW_GROUP_CHANGE_REQUEST="columnRowGroupChangeRequest";t.EVENT_COLUMN_PIVOT_CHANGE_REQUEST="columnPivotChangeRequest";t.EVENT_COLUMN_VALUE_CHANGE_REQUEST="columnValueChangeRequest";t.EVENT_COLUMN_AGG_FUNC_CHANGE_REQUEST="columnAggFuncChangeRequest";t.EVENT_KEYBOARD_FOCUS="keyboardFocus";t.EVENT_MOUSE_FOCUS="mouseFocus";t.EVENT_STORE_UPDATED="storeUpdated";t.EVENT_FILTER_DESTROYED="filterDestroyed";t.EVENT_ROW_DATA_UPDATE_STARTED="rowDataUpdateStarted";t.EVENT_ADVANCED_FILTER_ENABLED_CHANGED="advancedFilterEnabledChanged";t.EVENT_DATA_TYPES_INFERRED="dataTypesInferred";t.EVENT_FIELD_VALUE_CHANGED="fieldValueChanged";t.EVENT_FIELD_PICKER_VALUE_SELECTED="fieldPickerValueSelected";return t}();var ci=function(){function t(){this.existingIds={}}t.prototype.getInstanceIdForKey=function(t){var i=this.existingIds[t];var n;if(typeof i!=="number"){n=0}else{n=i+1}this.existingIds[t]=n;return n};return t}();var li=function(){var t=function(i,n){t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var n in i)if(Object.prototype.hasOwnProperty.call(i,n))t[n]=i[n]};return t(i,n)};return function(i,n){if(typeof n!=="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(i,n);function r(){this.constructor=i}i.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}();var vi=function(t,i,n,r){var e=arguments.length,s=e<3?i:r===null?r=Object.getOwnPropertyDescriptor(i,n):r,o;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")s=Reflect.decorate(t,i,n,r);else for(var u=t.length-1;u>=0;u--)if(o=t[u])s=(e<3?o(s):e>3?o(i,n,s):o(i,n))||s;return e>3&&s&&Object.defineProperty(i,n,s),s};var di="ag-Grid-AutoColumn";var pi=function(t){li(i,t);function i(){return t!==null&&t.apply(this,arguments)||this}i.prototype.createAutoGroupColumns=function(t){var i=this;var n=[];var r=this.gridOptionsService.is("treeData");var e=this.gridOptionsService.isGroupMultiAutoColumn();if(r&&e){console.warn('AG Grid: you cannot mix groupDisplayType = "multipleColumns" with treeData, only one column can be used to display groups when doing tree data');e=false}if(e){t.forEach((function(t,r){n.push(i.createOneAutoGroupColumn(t,r))}))}else{n.push(this.createOneAutoGroupColumn())}return n};i.prototype.updateAutoGroupColumns=function(t){var i=this;t.forEach((function(t,n){return i.updateOneAutoGroupColumn(t,n)}))};i.prototype.createOneAutoGroupColumn=function(t,i){var n;if(t){n=di+"-"+t.getId()}else{n=di}var r=this.createAutoGroupColDef(n,t,i);r.colId=n;var e=new mt(r,null,n,true);this.context.createBean(e);return e};i.prototype.updateOneAutoGroupColumn=function(t,i){var n=t.getColDef();var r=typeof n.showRowGroup=="string"?n.showRowGroup:undefined;var e=r!=null?this.columnModel.getPrimaryColumn(r):undefined;var s=this.createAutoGroupColDef(t.getId(),e!==null&&e!==void 0?e:undefined,i);t.setColDef(s,null);this.columnFactory.applyColumnState(t,s)};i.prototype.createAutoGroupColDef=function(t,i,r){var e=this.createBaseColDef(i);var s=this.gridOptionsService.get("autoGroupColumnDef");x(e,s);e=this.columnFactory.addColumnDefaultAndTypes(e,t);if(!this.gridOptionsService.is("treeData")){var o=n(e.field)&&n(e.valueGetter)&&n(e.filterValueGetter)&&e.filter!=="agGroupColumnFilter";if(o){e.filter=false}}if(r&&r>0){e.headerCheckboxSelection=false}var u=this.gridOptionsService.isColumnsSortingCoupledToGroup();var a=e.valueGetter||e.field!=null;if(u&&!a){e.sortIndex=undefined;e.initialSort=undefined}return e};i.prototype.createBaseColDef=function(t){var i=this.gridOptionsService.get("autoGroupColumnDef");var n=this.localeService.getLocaleTextFunc();var r={headerName:n("group","Group")};var e=i&&(i.cellRenderer||i.cellRendererSelector);if(!e){r.cellRenderer="agGroupCellRenderer"}if(t){var s=t.getColDef();Object.assign(r,{headerName:this.columnModel.getDisplayNameForColumn(t,"header"),headerValueGetter:s.headerValueGetter});if(s.cellRenderer){Object.assign(r,{cellRendererParams:{innerRenderer:s.cellRenderer,innerRendererParams:s.cellRendererParams}})}r.showRowGroup=t.getColId()}else{r.showRowGroup=true}return r};vi([ut("columnModel")],i.prototype,"columnModel",void 0);vi([ut("columnFactory")],i.prototype,"columnFactory",void 0);i=vi([ot("autoGroupColService")],i);return i}(ri);var gi=/[&<>"']/g;var bi={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"};function wi(t){var i=String.fromCharCode;function n(t){var i=[];if(!t){return[]}var n=t.length;var r=0;var e;var s;while(r<n){e=t.charCodeAt(r++);if(e>=55296&&e<=56319&&r<n){s=t.charCodeAt(r++);if((s&64512)==56320){i.push(((e&1023)<<10)+(s&1023)+65536)}else{i.push(e);r--}}else{i.push(e)}}return i}function r(t){if(t>=55296&&t<=57343){throw Error("Lone surrogate U+"+t.toString(16).toUpperCase()+" is not a scalar value")}}function e(t,n){return i(t>>n&63|128)}function s(t){if(t>=0&&t<=31&&t!==10){var n=t.toString(16).toUpperCase();var s=n.padStart(4,"0");return"_x"+s+"_"}if((t&4294967168)==0){return i(t)}var o="";if((t&4294965248)==0){o=i(t>>6&31|192)}else if((t&4294901760)==0){r(t);o=i(t>>12&15|224);o+=e(t,6)}else if((t&4292870144)==0){o=i(t>>18&7|240);o+=e(t,12);o+=e(t,6)}o+=i(t&63|128);return o}var o=n(t);var u=o.length;var a=-1;var f;var h="";while(++a<u){f=o[a];h+=s(f)}return h}function yi(t){return t[0].toUpperCase()+t.substr(1).toLowerCase()}function mi(t,i){if(t==null){return null}var n=t.toString().toString();if(i){return n}return n.replace(gi,(function(t){return bi[t]}))}function Si(t){if(!t||t==null){return null}var i=/([a-z])([A-Z])/g;var n=/([A-Z]+)([A-Z])([a-z])/g;var r=t.replace(i,"$1 $2").replace(n,"$1 $2$3").replace(/\./g," ").split(" ");return r.map((function(t){return t.substring(0,1).toUpperCase()+(t.length>1?t.substring(1,t.length):"")})).join(" ")}function Ci(t){return t.replace(/[A-Z]/g,(function(t){return"-"+t.toLocaleLowerCase()}))}var Oi=Object.freeze({__proto__:null,utf8_encode:wi,capitalise:yi,escapeString:mi,camelCaseToHumanText:Si,camelCaseToHyphenated:Ci});function ji(t){var i=new Map;t.forEach((function(t){return i.set(t[0],t[1])}));return i}function Ri(t,i){var n=new Map;t.forEach((function(t){return n.set(i(t),t)}));return n}function xi(t){var i=[];t.forEach((function(t,n){return i.push(n)}));return i}var _i=Object.freeze({__proto__:null,convertToMap:ji,mapById:Ri,keys:xi});var Ai=function(){function t(){}t.ColDefPropertyMap={headerName:undefined,columnGroupShow:undefined,headerClass:undefined,toolPanelClass:undefined,headerValueGetter:undefined,pivotKeys:undefined,groupId:undefined,colId:undefined,sort:undefined,initialSort:undefined,field:undefined,type:undefined,cellDataType:undefined,tooltipComponent:undefined,tooltipField:undefined,headerTooltip:undefined,cellClass:undefined,showRowGroup:undefined,filter:undefined,initialAggFunc:undefined,defaultAggFunc:undefined,aggFunc:undefined,pinned:undefined,initialPinned:undefined,chartDataType:undefined,cellEditorPopupPosition:undefined,headerGroupComponent:undefined,headerGroupComponentParams:undefined,cellStyle:undefined,cellRenderer:undefined,cellRendererParams:undefined,cellEditor:undefined,cellEditorParams:undefined,filterParams:undefined,pivotValueColumn:undefined,headerComponent:undefined,headerComponentParams:undefined,floatingFilterComponent:undefined,floatingFilterComponentParams:undefined,tooltipComponentParams:undefined,refData:undefined,columnsMenuParams:undefined,children:undefined,sortingOrder:undefined,allowedAggFuncs:undefined,menuTabs:undefined,pivotTotalColumnIds:undefined,cellClassRules:undefined,icons:undefined,sortIndex:undefined,initialSortIndex:undefined,flex:undefined,initialFlex:undefined,width:undefined,initialWidth:undefined,minWidth:undefined,maxWidth:undefined,rowGroupIndex:undefined,initialRowGroupIndex:undefined,pivotIndex:undefined,initialPivotIndex:undefined,suppressCellFlash:undefined,suppressColumnsToolPanel:undefined,suppressFiltersToolPanel:undefined,openByDefault:undefined,marryChildren:undefined,suppressStickyLabel:undefined,hide:undefined,initialHide:undefined,rowGroup:undefined,initialRowGroup:undefined,pivot:undefined,initialPivot:undefined,checkboxSelection:undefined,showDisabledCheckboxes:undefined,headerCheckboxSelection:undefined,headerCheckboxSelectionFilteredOnly:undefined,headerCheckboxSelectionCurrentPageOnly:undefined,suppressMenu:undefined,suppressMovable:undefined,lockPosition:undefined,lockVisible:undefined,lockPinned:undefined,unSortIcon:undefined,suppressSizeToFit:undefined,suppressAutoSize:undefined,enableRowGroup:undefined,enablePivot:undefined,enableValue:undefined,editable:undefined,suppressPaste:undefined,suppressNavigable:undefined,enableCellChangeFlash:undefined,rowDrag:undefined,dndSource:undefined,autoHeight:undefined,wrapText:undefined,sortable:undefined,resizable:undefined,singleClickEdit:undefined,floatingFilter:undefined,cellEditorPopup:undefined,suppressFillHandle:undefined,wrapHeaderText:undefined,autoHeaderHeight:undefined,dndSourceOnRowDrag:undefined,valueGetter:undefined,valueSetter:undefined,filterValueGetter:undefined,keyCreator:undefined,valueFormatter:undefined,valueParser:undefined,comparator:undefined,equals:undefined,pivotComparator:undefined,suppressKeyboardEvent:undefined,suppressHeaderKeyboardEvent:undefined,colSpan:undefined,rowSpan:undefined,getQuickFilterText:undefined,onCellValueChanged:undefined,onCellClicked:undefined,onCellDoubleClicked:undefined,onCellContextMenu:undefined,rowDragText:undefined,tooltipValueGetter:undefined,cellRendererSelector:undefined,cellEditorSelector:undefined,suppressSpanHeaderHeight:undefined,useValueFormatterForExport:undefined,useValueParserForImport:undefined};t.ALL_PROPERTIES=Object.keys(t.ColDefPropertyMap);return t}();var Fi=function(t,i){var n=typeof Symbol==="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),e,s=[],o;try{while((i===void 0||i-- >0)&&!(e=r.next()).done)s.push(e.value)}catch(t){o={error:t}}finally{try{if(e&&!e.done&&(n=r["return"]))n.call(r)}finally{if(o)throw o.error}}return s};var ki=function(t,i){for(var n=0,r=i.length,e=t.length;n<r;n++,e++)t[e]=i[n];return t};var Ti=function(){function t(){}t.STRING_PROPERTIES=["rowSelection","overlayLoadingTemplate","overlayNoRowsTemplate","gridId","quickFilterText","rowModelType","editType","domLayout","clipboardDelimiter","rowGroupPanelShow","multiSortKey","pivotColumnGroupTotals","pivotRowTotals","pivotPanelShow","fillHandleDirection","serverSideStoreType","groupDisplayType","treeDataDisplayType","colResizeDefault","tooltipTrigger","serverSidePivotResultFieldSeparator"];t.OBJECT_PROPERTIES=["components","rowStyle","context","autoGroupColumnDef","localeText","icons","datasource","serverSideDatasource","viewportDatasource","groupRowRendererParams","aggFuncs","fullWidthCellRendererParams","defaultColGroupDef","defaultColDef","defaultCsvExportParams","defaultExcelExportParams","columnTypes","rowClassRules","detailCellRendererParams","loadingCellRendererParams","loadingOverlayComponentParams","noRowsOverlayComponentParams","popupParent","statusBar","sideBar","chartThemeOverrides","customChartThemes","chartToolPanelsDef","dataTypeDefinitions","advancedFilterModel","advancedFilterParent","advancedFilterBuilderParams"];t.ARRAY_PROPERTIES=["sortingOrder","alignedGrids","rowData","columnDefs","excelStyles","pinnedTopRowData","pinnedBottomRowData","chartThemes","rowClass"];t.NUMBER_PROPERTIES=["rowHeight","detailRowHeight","rowBuffer","headerHeight","groupHeaderHeight","floatingFiltersHeight","pivotHeaderHeight","pivotGroupHeaderHeight","groupDefaultExpanded","pivotDefaultExpanded","viewportRowModelPageSize","viewportRowModelBufferSize","autoSizePadding","maxBlocksInCache","maxConcurrentDatasourceRequests","tooltipShowDelay","tooltipHideDelay","cacheOverflowSize","paginationPageSize","cacheBlockSize","infiniteInitialRowCount","serverSideInitialRowCount","scrollbarWidth","asyncTransactionWaitMillis","blockLoadDebounceMillis","keepDetailRowsCount","undoRedoCellEditingLimit","cellFlashDelay","cellFadeDelay","tabIndex"];t.BOOLEAN_PROPERTIES=["suppressMakeColumnVisibleAfterUnGroup","suppressRowClickSelection","suppressCellFocus","suppressHorizontalScroll","alwaysShowHorizontalScroll","alwaysShowVerticalScroll","debug","enableBrowserTooltips","enableCellExpressions","groupSelectsChildren","groupIncludeTotalFooter","groupSuppressBlankHeader","suppressMenuHide","suppressRowDeselection","unSortIcon","suppressMultiSort","alwaysMultiSort","singleClickEdit","suppressLoadingOverlay","suppressNoRowsOverlay","suppressAutoSize","skipHeaderOnAutoSize","suppressParentsInRowNodes","suppressColumnMoveAnimation","suppressMovableColumns","suppressFieldDotNotation","enableRangeSelection","enableRangeHandle","enableFillHandle","suppressClearOnFillReduction","deltaSort","suppressTouch","suppressAsyncEvents","allowContextMenuWithControlKey","suppressContextMenu","rememberGroupStateWhenNewData","enableCellChangeFlash","suppressDragLeaveHidesColumns","suppressRowGroupHidesColumns","suppressMiddleClickScrolls","suppressPreventDefaultOnMouseWheel","suppressCopyRowsToClipboard","copyHeadersToClipboard","copyGroupHeadersToClipboard","pivotMode","suppressAggFuncInHeader","suppressColumnVirtualisation","alwaysAggregateAtRootLevel","suppressAggAtRootLevel","suppressFocusAfterRefresh","functionsPassive","functionsReadOnly","animateRows","groupSelectsFiltered","groupRemoveSingleChildren","groupRemoveLowestSingleChildren","enableRtl","suppressClickEdit","rowDragEntireRow","rowDragManaged","suppressRowDrag","suppressMoveWhenRowDragging","rowDragMultiRow","enableGroupEdit","embedFullWidthRows","suppressPaginationPanel","groupHideOpenParents","groupAllowUnbalanced","pagination","paginationAutoPageSize","suppressScrollOnNewData","suppressScrollWhenPopupsAreOpen","purgeClosedRowNodes","cacheQuickFilter","includeHiddenColumnsInQuickFilter","excludeHiddenColumnsFromQuickFilter","ensureDomOrder","accentedSort","suppressChangeDetection","valueCache","valueCacheNeverExpires","aggregateOnlyChangedColumns","suppressAnimationFrame","suppressExcelExport","suppressCsvExport","treeData","masterDetail","suppressMultiRangeSelection","enterMovesDown","enterMovesDownAfterEdit","enterNavigatesVerticallyAfterEdit","enterNavigatesVertically","suppressPropertyNamesCheck","rowMultiSelectWithClick","suppressRowHoverHighlight","suppressRowTransform","suppressClipboardPaste","suppressLastEmptyLineOnPaste","enableCharts","enableChartToolPanelsButton","suppressChartToolPanelsButton","suppressMaintainUnsortedOrder","enableCellTextSelection","suppressBrowserResizeObserver","suppressMaxRenderedRowRestriction","excludeChildrenWhenTreeDataFiltering","tooltipMouseTrack","tooltipInteraction","keepDetailRows","paginateChildRows","preventDefaultOnContextMenu","undoRedoCellEditing","allowDragFromColumnsToolPanel","pivotSuppressAutoColumn","suppressExpandablePivotGroups","debounceVerticalScrollbar","detailRowAutoHeight","serverSideFilteringAlwaysResets","serverSideFilterAllLevels","serverSideSortingAlwaysResets","serverSideSortAllLevels","serverSideOnlyRefreshFilteredGroups","serverSideSortOnServer","serverSideFilterOnServer","suppressAggFilteredOnly","showOpenedGroup","suppressClipboardApi","suppressModelUpdateAfterUpdateTransaction","stopEditingWhenCellsLoseFocus","maintainColumnOrder","groupMaintainOrder","columnHoverHighlight","suppressReactUi","readOnlyEdit","suppressRowVirtualisation","enableCellEditingOnBackspace","resetRowDataOnUpdate","removePivotHeaderRowWhenSingleValueColumn","suppressCopySingleCellRanges","suppressGroupRowsSticky","suppressServerSideInfiniteScroll","rowGroupPanelSuppressSort","allowShowChangeAfterFilter","suppressCutToClipboard","enableAdvancedFilter","includeHiddenColumnsInAdvancedFilter"];t.FUNCTIONAL_PROPERTIES=["doesExternalFilterPass","processSecondaryColDef","processSecondaryColGroupDef","processPivotResultColDef","processPivotResultColGroupDef","getBusinessKeyForNode","isRowSelectable","rowDragText","groupRowRenderer","fullWidthCellRenderer","loadingCellRenderer","loadingOverlayComponent","noRowsOverlayComponent","detailCellRenderer","quickFilterParser","quickFilterMatcher"];t.CALLBACK_PROPERTIES=["getLocaleText","isExternalFilterPresent","getRowHeight","getRowClass","getRowStyle","getContextMenuItems","getMainMenuItems","processRowPostCreate","processCellForClipboard","getGroupRowAgg","isFullWidthRow","sendToClipboard","navigateToNextHeader","tabToNextHeader","navigateToNextCell","tabToNextCell","processCellFromClipboard","getDocument","postProcessPopup","getChildCount","getDataPath","isRowMaster","postSortRows","processHeaderForClipboard","processGroupHeaderForClipboard","paginationNumberFormatter","processDataFromClipboard","getServerSideGroupKey","isServerSideGroup","createChartContainer","getChartToolbarItems","fillOperation","isApplyServerSideTransaction","getServerSideStoreParams","getServerSideGroupLevelParams","isServerSideGroupOpenByDefault","isGroupOpenByDefault","initialGroupOrderComparator","groupIncludeFooter","loadingCellRendererSelector","getRowId","groupAggFiltering"];t.FUNCTION_PROPERTIES=ki(ki([],Fi(t.FUNCTIONAL_PROPERTIES)),Fi(t.CALLBACK_PROPERTIES));t.ALL_PROPERTIES=ki(ki(ki(ki(ki(ki([],Fi(t.ARRAY_PROPERTIES)),Fi(t.OBJECT_PROPERTIES)),Fi(t.STRING_PROPERTIES)),Fi(t.NUMBER_PROPERTIES)),Fi(t.FUNCTION_PROPERTIES)),Fi(t.BOOLEAN_PROPERTIES));return t}();var Mi=function(){Mi=Object.assign||function(t){for(var i,n=1,r=arguments.length;n<r;n++){i=arguments[n];for(var e in i)if(Object.prototype.hasOwnProperty.call(i,e))t[e]=i[e]}return t};return Mi.apply(this,arguments)};var Di=function(t,i){var n=typeof Symbol==="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),e,s=[],o;try{while((i===void 0||i-- >0)&&!(e=r.next()).done)s.push(e.value)}catch(t){o={error:t}}finally{try{if(e&&!e.done&&(n=r["return"]))n.call(r)}finally{if(o)throw o.error}}return s};var Gi=function(t,i){for(var n=0,r=i.length,e=t.length;n<r;n++,e++)t[e]=i[n];return t};var Pi=function(){function t(){}t.getCallbackForEvent=function(t){if(!t||t.length<2){return t}return"on"+t[0].toUpperCase()+t.substr(1)};t.getCoercionLookup=function(){var i={};Gi(Gi(Gi(Gi(Gi([],Di(t.ARRAY_PROPERTIES)),Di(t.OBJECT_PROPERTIES)),Di(t.STRING_PROPERTIES)),Di(t.FUNCTION_PROPERTIES)),Di(t.EVENT_CALLBACKS)).forEach((function(t){return i[t]="none"}));t.BOOLEAN_PROPERTIES.forEach((function(t){return i[t]="boolean"}));t.NUMBER_PROPERTIES.forEach((function(t){return i[t]="number"}));return i};t.getValue=function(i,n){var r=t.coercionLookup[i];if(r){var e=n;switch(r){case"number":{e=t.toNumber(n);break}case"boolean":{e=t.toBoolean(n);break}case"none":{if(i==="groupAggFiltering"&&typeof n!=="function"){e=t.toBoolean(n)}break}}return e}return undefined};t.getGridOptionKeys=function(i,n){return n?Object.keys(t.coercionLookup):Object.keys(i)};t.copyAttributesToGridOptions=function(i,n,r){if(r===void 0){r=false}if(typeof i!=="object"){i={}}var e=i;var s=t.getGridOptionKeys(n,r);s.forEach((function(i){var r=n[i];if(typeof r!=="undefined"){var s=t.getValue(i,r);if(s!==undefined){e[i]=s}}}));return i};t.processOnChange=function(i,n){var r=this;if(!i||Object.keys(i).length===0){return}this.changeSetId++;var e=Mi({},i);if(e.columnTypes){n.setColumnTypes(e.columnTypes.currentValue,"gridOptionsChanged");delete e.columnTypes}if(e.autoGroupColumnDef){n.setAutoGroupColumnDef(e.autoGroupColumnDef.currentValue,"gridOptionsChanged");delete e.autoGroupColumnDef}if(e.defaultColDef){n.setDefaultColDef(e.defaultColDef.currentValue,"gridOptionsChanged");delete e.defaultColDef}if(e.columnDefs){n.setColumnDefs(e.columnDefs.currentValue,"gridOptionsChanged");delete e.columnDefs}var s=Object.keys(e).map((function(i){var r=i;var s=t.getValue(r,e[r].currentValue);var o=n.__setPropertyOnly(r,s);return{gridKey:r,coercedValue:s,isChanged:o}})).filter((function(t){return t.isChanged}));var o=s.map((function(t){return t.gridKey}));s.forEach((function(t){return n.__updateProperty(t.gridKey,t.coercedValue,t.isChanged,{id:r.changeSetId,properties:o})}));var u={type:hi.EVENT_COMPONENT_STATE_CHANGED};g(i,(function(t,i){u[t]=i}));n.dispatchEvent(u)};t.toBoolean=function(t){if(typeof t==="boolean"){return t}if(typeof t==="string"){return t.toUpperCase()==="TRUE"||t==""}return false};t.toNumber=function(t){if(typeof t==="number"){return t}if(typeof t==="string"){return Number(t)}};t.EVENTS=c(hi);t.EXCLUDED_INTERNAL_EVENTS=[hi.EVENT_SCROLLBAR_WIDTH_CHANGED,hi.EVENT_CHECKBOX_CHANGED,hi.EVENT_HEIGHT_SCALE_CHANGED,hi.EVENT_BODY_HEIGHT_CHANGED,hi.EVENT_DISPLAYED_COLUMNS_WIDTH_CHANGED,hi.EVENT_SCROLL_VISIBILITY_CHANGED,hi.EVENT_COLUMN_HOVER_CHANGED,hi.EVENT_FLASH_CELLS,hi.EVENT_PAGINATION_PIXEL_OFFSET_CHANGED,hi.EVENT_DISPLAYED_ROWS_CHANGED,hi.EVENT_LEFT_PINNED_WIDTH_CHANGED,hi.EVENT_RIGHT_PINNED_WIDTH_CHANGED,hi.EVENT_ROW_CONTAINER_HEIGHT_CHANGED,hi.EVENT_POPUP_TO_FRONT,hi.EVENT_KEYBOARD_FOCUS,hi.EVENT_MOUSE_FOCUS,hi.EVENT_STORE_UPDATED,hi.EVENT_COLUMN_PANEL_ITEM_DRAG_START,hi.EVENT_COLUMN_PANEL_ITEM_DRAG_END,hi.EVENT_FILL_START,hi.EVENT_FILL_END,hi.EVENT_KEY_SHORTCUT_CHANGED_CELL_START,hi.EVENT_KEY_SHORTCUT_CHANGED_CELL_END,hi.EVENT_FULL_WIDTH_ROW_FOCUSED,hi.EVENT_HEADER_HEIGHT_CHANGED,hi.EVENT_COLUMN_HEADER_HEIGHT_CHANGED,hi.EVENT_CELL_FOCUS_CLEARED,hi.EVENT_GRID_STYLES_CHANGED,hi.EVENT_FILTER_DESTROYED,hi.EVENT_ROW_DATA_UPDATE_STARTED,hi.EVENT_ADVANCED_FILTER_ENABLED_CHANGED,hi.EVENT_DATA_TYPES_INFERRED,hi.EVENT_FIELD_VALUE_CHANGED,hi.EVENT_FIELD_PICKER_VALUE_SELECTED];t.PUBLIC_EVENTS=t.EVENTS.filter((function(i){return!Nt(t.EXCLUDED_INTERNAL_EVENTS,i)}));t.EVENT_CALLBACKS=t.EVENTS.map((function(i){return t.getCallbackForEvent(i)}));t.STRING_PROPERTIES=Ti.STRING_PROPERTIES;t.OBJECT_PROPERTIES=Ti.OBJECT_PROPERTIES;t.ARRAY_PROPERTIES=Ti.ARRAY_PROPERTIES;t.NUMBER_PROPERTIES=Ti.NUMBER_PROPERTIES;t.BOOLEAN_PROPERTIES=Ti.BOOLEAN_PROPERTIES;t.FUNCTION_PROPERTIES=Ti.FUNCTION_PROPERTIES;t.ALL_PROPERTIES=Ti.ALL_PROPERTIES;t.ALL_PROPERTIES_SET=new Set(Ti.ALL_PROPERTIES);t.changeSetId=0;t.coercionLookup=t.getCoercionLookup();return t}();var Ei=function(t){var i=typeof Symbol==="function"&&Symbol.iterator,n=i&&t[i],r=0;if(n)return n.call(t);if(t&&typeof t.length==="number")return{next:function(){if(t&&r>=t.length)t=void 0;return{value:t&&t[r++],done:!t}}};throw new TypeError(i?"Object is not iterable.":"Symbol.iterator is not defined.")};function Ii(t,i,n){var r={};var e=t.filter((function(t){return!i.some((function(i){return i===t}))}));if(e.length>0){e.forEach((function(t){return r[t]=Ni(t,n).values}))}return r}function Ni(t,i,n,r){var e,s;var o=i.map((function(i,n){return{value:i,relevance:Hi(t.toLowerCase(),i.toLocaleLowerCase()),idx:n}}));o.sort((function(t,i){return i.relevance-t.relevance}));if(n){o=o.filter((function(t){return t.relevance!==0}))}if(o.length>0&&r&&r>0){var u=o[0].relevance;var a=u*r;o=o.filter((function(t){return a-t.relevance<0}))}var f=[];var h=[];try{for(var c=Ei(o),l=c.next();!l.done;l=c.next()){var v=l.value;f.push(v.value);h.push(v.idx)}}catch(t){e={error:t}}finally{try{if(l&&!l.done&&(s=c.return))s.call(c)}finally{if(e)throw e.error}}return{values:f,indices:h}}function Hi(t,i){var n=t.replace(/\s/g,"");var r=i.replace(/\s/g,"");var e=0;var s=-1;for(var o=0;o<n.length;o++){var u=r.indexOf(n[o],s+1);if(u===-1){continue}s=u;e+=100-s*100/1e4*100}return e}var Li=Object.freeze({__proto__:null,fuzzyCheckStrings:Ii,fuzzySuggestions:Ni});var Vi=function(t,i,n,r){var e=arguments.length,s=e<3?i:r===null?r=Object.getOwnPropertyDescriptor(i,n):r,o;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")s=Reflect.decorate(t,i,n,r);else for(var u=t.length-1;u>=0;u--)if(o=t[u])s=(e<3?o(s):e>3?o(i,n,s):o(i,n))||s;return e>3&&s&&Object.defineProperty(i,n,s),s};var Bi=function(t,i){var n=typeof Symbol==="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),e,s=[],o;try{while((i===void 0||i-- >0)&&!(e=r.next()).done)s.push(e.value)}catch(t){o={error:t}}finally{try{if(e&&!e.done&&(n=r["return"]))n.call(r)}finally{if(o)throw o.error}}return s};var zi=function(t,i){for(var n=0,r=i.length,e=t.length;n<r;n++,e++)t[e]=i[n];return t};function Wi(t,i,n,r){var e=n?"Please use '"+n+"' instead. ":"";P((function(){return console.warn("AG Grid: since v"+t+", '"+i+"' is deprecated. "+e+(r!==null&&r!==void 0?r:""))}),"Deprecated_"+i)}var Ui=["__ob__","__v_skip","__metadata__"];var Ki=function(){function t(){this.deprecatedProperties={rememberGroupStateWhenNewData:{version:"24",message:"Now that transaction updates are possible and they keep group state, this feature is no longer needed."},serverSideFilteringAlwaysResets:{version:"28.0",newProp:"serverSideOnlyRefreshFilteredGroups",copyToNewProp:true},serverSideSortingAlwaysResets:{version:"28.0",newProp:"serverSideSortAllLevels",copyToNewProp:true},suppressReactUi:{version:"28",message:"The legacy React rendering engine is deprecated and will be removed in the next major version of the grid."},processSecondaryColDef:{version:"28",newProp:"processPivotResultColDef",copyToNewProp:true},processSecondaryColGroupDef:{version:"28",newProp:"processPivotResultColGroupDef",copyToNewProp:true},getServerSideStoreParams:{version:"28",newProp:"getServerSideGroupLevelParams",copyToNewProp:true},serverSideInfiniteScroll:{version:"29",message:"Infinite Scrolling is now the default behaviour. This can be suppressed with `suppressServerSideInfiniteScroll`."},enableChartToolPanelsButton:{version:"29",message:"The Chart Tool Panels button is now enabled by default. To hide the Chart Tool Panels button and display the hamburger button instead, set suppressChartToolPanelsButton=true."},functionsPassive:{version:"29.2"},onColumnRowGroupChangeRequest:{version:"29.2"},onColumnPivotChangeRequest:{version:"29.2"},onColumnValueChangeRequest:{version:"29.2"},onColumnAggFuncChangeRequest:{version:"29.2"},serverSideFilterAllLevels:{version:"30",message:"All server-side group levels are now filtered by default. This can be toggled using `serverSideOnlyRefreshFilteredGroups`."},suppressAggAtRootLevel:{version:"30",message:"The root level aggregation is now suppressed by default. This can be toggled using `alwaysAggregateAtRootLevel`."},excludeHiddenColumnsFromQuickFilter:{version:"30",message:"Hidden columns are now excluded from the Quick Filter by default. This can be toggled using `includeHiddenColumnsInQuickFilter`."},enterMovesDown:{version:"30",newProp:"enterNavigatesVertically",copyToNewProp:true},enterMovesDownAfterEdit:{version:"30",newProp:"enterNavigatesVerticallyAfterEdit",copyToNewProp:true},suppressParentsInRowNodes:{version:"30.2",message:"Using suppressParentsInRowNodes is no longer recommended. To serialize nodes it is now recommended to instead remove the parent node reference before serialization."}}}t.prototype.pickOneWarning=function(t,i){console.warn("AG Grid: "+t+" and "+i+" do not work with each other, you need to pick one.")};t.prototype.init=function(){var t=this;this.checkForDeprecated();this.checkForViolations();if(this.gridOptions.suppressPropertyNamesCheck!==true){this.checkGridOptionsProperties();this.checkColumnDefProperties()}this.checkColumnDefViolations();if(this.gridOptionsService.is("groupSelectsChildren")&&this.gridOptionsService.is("suppressParentsInRowNodes")){console.warn("AG Grid: 'groupSelectsChildren' does not work with 'suppressParentsInRowNodes', this selection method needs the part in rowNode to work")}if(this.gridOptionsService.is("groupSelectsChildren")){if(this.gridOptionsService.get("rowSelection")!=="multiple"){console.warn("AG Grid: rowSelection must be 'multiple' for groupSelectsChildren to make sense")}}if(this.gridOptionsService.is("groupRemoveSingleChildren")&&this.gridOptionsService.is("groupHideOpenParents")){this.pickOneWarning("groupRemoveSingleChildren","groupHideOpenParents")}if(this.gridOptionsService.isRowModelType("serverSide")){var i=function(t,i){return"AG Grid: '"+t+"' is not supported on the Server-Side Row Model."+(i?" Please use "+i+" instead.":"")};if(this.gridOptionsService.exists("groupDefaultExpanded")){console.warn(i("groupDefaultExpanded","isServerSideGroupOpenByDefault callback"))}if(this.gridOptionsService.exists("groupIncludeFooter")&&this.gridOptionsService.is("suppressServerSideInfiniteScroll")){console.warn(i("groupIncludeFooter"))}if(this.gridOptionsService.exists("groupIncludeTotalFooter")){console.warn(i("groupIncludeTotalFooter"))}}if(this.gridOptionsService.is("enableRangeSelection")){X.__assertRegistered(J.RangeSelectionModule,"enableRangeSelection",this.gridOptionsService.getGridId())}else if(this.gridOptionsService.is("enableRangeHandle")||this.gridOptionsService.is("enableFillHandle")){console.warn("AG Grid: 'enableRangeHandle' or 'enableFillHandle' will not work unless 'enableRangeSelection' is set to true")}var n=function(i,n){return t.gridOptionsService.exists(i)&&X.__assertRegistered(n,i,t.gridOptionsService.getGridId())};n("sideBar",J.SideBarModule);n("statusBar",J.StatusBarModule);n("enableCharts",J.GridChartsModule);n("getMainMenuItems",J.MenuModule);n("getContextMenuItems",J.MenuModule);n("allowContextMenuWithControlKey",J.MenuModule);n("enableAdvancedFilter",J.AdvancedFilterModule);n("treeData",J.RowGroupingModule);n("enableRangeSelection",J.RangeSelectionModule);n("masterDetail",J.MasterDetailModule)};t.prototype.checkColumnDefProperties=function(){var t=this;if(this.gridOptions.columnDefs==null){return}var i=Ai.ALL_PROPERTIES;var n=function(r,e){var s=Object.getOwnPropertyNames(r);t.checkProperties(s,zi(zi([],Bi(i)),Bi(Ui)),i,e,"https://www.ag-grid.com/javascript-data-grid/column-properties/");if(r.children){r.children.forEach((function(t){return n(t,"columnDefs.children")}))}};this.gridOptions.columnDefs.forEach((function(t){return n(t,"columnDefs")}));if(this.gridOptions.defaultColDef){n(this.gridOptions.defaultColDef,"defaultColDef")}};t.prototype.checkColumnDefViolations=function(){var t;var i=(t=this.gridOptionsService.get("rowModelType"))!==null&&t!==void 0?t:"clientSide";var n={infinite:["headerCheckboxSelection","headerCheckboxSelectionFilteredOnly","headerCheckboxSelectionCurrentPageOnly"],viewport:["headerCheckboxSelection","headerCheckboxSelectionFilteredOnly","headerCheckboxSelectionCurrentPageOnly"],serverSide:["headerCheckboxSelectionFilteredOnly","headerCheckboxSelectionCurrentPageOnly"],clientSide:[]};var r=n[i];if(!r){return}var e=this.gridOptionsService.get("rowSelection")==="multiple";var s=["headerCheckboxSelection","headerCheckboxSelectionFilteredOnly","headerCheckboxSelectionCurrentPageOnly"];var o=function(t){if(!e){s.forEach((function(i){if(i in t&&!!t[i]){console.warn("AG Grid: Column property "+i+" is not supported unless rowSelection='multiple'.")}}))}r.forEach((function(n){if(n in t&&!!t[n]){console.warn("AG Grid: Column property "+n+" is not supported with the row model type "+i+".")}}))};if(this.gridOptions.columnDefs!=null){this.gridOptions.columnDefs.forEach((function(t){return o(t)}))}if(this.gridOptions.autoGroupColumnDef!=null){o(this.gridOptions.autoGroupColumnDef)}if(this.gridOptions.defaultColDef!=null){o(this.gridOptions.defaultColDef)}};t.prototype.checkGridOptionsProperties=function(){var t=Object.getOwnPropertyNames(this.gridOptions);var i=zi(zi([],Bi(Ti.ALL_PROPERTIES)),Bi(Pi.EVENT_CALLBACKS));var n=zi(zi(zi(zi([],Bi(i)),["api","columnApi"]),Bi(Ui)),Bi(Object.keys(this.deprecatedProperties)));this.checkProperties(t,n,i,"gridOptions","https://www.ag-grid.com/javascript-data-grid/grid-options/")};t.prototype.checkProperties=function(t,i,n,r,e){var s=Ii(t,i,n);g(s,(function(t,i){P((function(){return console.warn("AG Grid: invalid "+r+" property '"+t+"' did you mean any of these: "+i.slice(0,8).join(", "))}),"invalidProperty"+r+t)}));if(Object.keys(s).length>0){P((function(){return console.warn("AG Grid: to see all the valid "+r+" properties please check: "+e)}),"invalidProperties"+r+e)}};t.prototype.checkForDeprecated=function(){var t=this.gridOptions;Object.entries(this.deprecatedProperties).forEach((function(i){var n;var r=Bi(i,2),e=r[0],s=r[1];var o=t[e];if(o){Wi(s.version,e,s.newProp,s.message);if(s.copyToNewProp&&s.newProp&&t[s.newProp]==null){t[s.newProp]=(n=s.newPropValue)!==null&&n!==void 0?n:o}}}));if(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"}};t.prototype.checkForViolations=function(){if(this.gridOptionsService.is("treeData")){this.treeDataViolations()}};t.prototype.treeDataViolations=function(){if(this.gridOptionsService.isRowModelType("clientSide")){if(!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.")}}if(this.gridOptionsService.isRowModelType("serverSide")){if(!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.")}if(!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.")}}};Vi([ut("gridOptions")],t.prototype,"gridOptions",void 0);Vi([ut("gridOptionsService")],t.prototype,"gridOptionsService",void 0);Vi([et],t.prototype,"init",null);t=Vi([ot("gridOptionsValidator")],t);return t}();function qi(t,i){var n=["groupRows","multipleColumns","custom","singleColumn"];if(n.indexOf(i)<0){console.warn("AG Grid: '"+i+"' is not a valid groupDisplayType value - possible values are: '"+n.join("', '")+"'");return false}return i===t}function Yi(t,i){var n=["auto","custom"];if(n.indexOf(i)<0){console.warn("AG Grid: '"+i+"' is not a valid treeDataDisplayType value - possible values are: '"+n.join("', '")+"'");return false}return i===t}var Qi=function(){var t=function(i,n){t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var n in i)if(Object.prototype.hasOwnProperty.call(i,n))t[n]=i[n]};return t(i,n)};return function(i,n){if(typeof n!=="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(i,n);function r(){this.constructor=i}i.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}();var Ji=function(t,i,n,r){var e=arguments.length,s=e<3?i:r===null?r=Object.getOwnPropertyDescriptor(i,n):r,o;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")s=Reflect.decorate(t,i,n,r);else for(var u=t.length-1;u>=0;u--)if(o=t[u])s=(e<3?o(s):e>3?o(i,n,s):o(i,n))||s;return e>3&&s&&Object.defineProperty(i,n,s),s};var Zi=function(t,i){return function(n,r){i(n,r,t)}};var $i=function(t,i){var n={};for(var r in t)if(Object.prototype.hasOwnProperty.call(t,r)&&i.indexOf(r)<0)n[r]=t[r];if(t!=null&&typeof Object.getOwnPropertySymbols==="function")for(var e=0,r=Object.getOwnPropertySymbols(t);e<r.length;e++){if(i.indexOf(r[e])<0&&Object.prototype.propertyIsEnumerable.call(t,r[e]))n[r[e]]=t[r[e]]}return n};var Xi=function(t,i){var n=typeof Symbol==="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),e,s=[],o;try{while((i===void 0||i-- >0)&&!(e=r.next()).done)s.push(e.value)}catch(t){o={error:t}}finally{try{if(e&&!e.done&&(n=r["return"]))n.call(r)}finally{if(o)throw o.error}}return s};var tn=function(t,i){for(var n=0,r=i.length,e=t.length;n<r;n++,e++)t[e]=i[n];return t};var nn=function(t){var i=typeof Symbol==="function"&&Symbol.iterator,n=i&&t[i],r=0;if(n)return n.call(t);if(t&&typeof t.length==="number")return{next:function(){if(t&&r>=t.length)t=void 0;return{value:t&&t[r++],done:!t}}};throw new TypeError(i?"Object is not iterable.":"Symbol.iterator is not defined.")};var rn=function(t){Qi(e,t);function e(){var i=t!==null&&t.apply(this,arguments)||this;i.primaryHeaderRowCount=0;i.secondaryHeaderRowCount=0;i.gridHeaderRowCount=0;i.displayedColumnsLeft=[];i.displayedColumnsRight=[];i.displayedColumnsCenter=[];i.displayedColumns=[];i.displayedColumnsAndGroupsMap={};i.viewportColumns=[];i.viewportColumnsHash="";i.headerViewportColumns=[];i.viewportColumnsCenter=[];i.headerViewportColumnsCenter=[];i.autoHeightActiveAtLeastOnce=false;i.rowGroupColumns=[];i.valueColumns=[];i.pivotColumns=[];i.ready=false;i.autoGroupsNeedBuilding=false;i.forceRecreateAutoGroups=false;i.pivotMode=false;i.bodyWidth=0;i.leftWidth=0;i.rightWidth=0;i.bodyWidthDirty=true;i.shouldQueueResizeOperations=false;i.resizeOperationQueue=[];return i}e.prototype.init=function(){var t=this;this.suppressColumnVirtualisation=this.gridOptionsService.is("suppressColumnVirtualisation");var i=this.gridOptionsService.is("pivotMode");if(this.isPivotSettingAllowed(i)){this.pivotMode=i}this.addManagedPropertyListeners(["groupDisplayType","treeData"],(function(){return t.buildAutoGroupColumns()}));this.addManagedPropertyListener("autoGroupColumnDef",(function(){return t.onAutoGroupColumnDefChanged()}));this.addManagedPropertyListener("defaultColDef",(function(i){return t.onSharedColDefChanged(i.source)}));this.addManagedPropertyListener("columnTypes",(function(i){return t.onSharedColDefChanged(i.source)}))};e.prototype.buildAutoGroupColumns=function(){if(!this.columnDefs){return}this.autoGroupsNeedBuilding=true;this.forceRecreateAutoGroups=true;this.updateGridColumns();this.updateDisplayedColumns("gridOptionsChanged")};e.prototype.onAutoGroupColumnDefChanged=function(){if(this.groupAutoColumns){this.autoGroupColService.updateAutoGroupColumns(this.groupAutoColumns)}};e.prototype.onSharedColDefChanged=function(t){if(t===void 0){t="api"}if(this.groupAutoColumns){this.autoGroupColService.updateAutoGroupColumns(this.groupAutoColumns)}this.createColumnsFromColumnDefs(true,t)};e.prototype.setColumnDefs=function(t,i){if(i===void 0){i="api"}var n=!!this.columnDefs;this.columnDefs=t;this.createColumnsFromColumnDefs(n,i)};e.prototype.recreateColumnDefs=function(t){if(t===void 0){t="api"}this.onSharedColDefChanged(t)};e.prototype.destroyOldColumns=function(t,i){var n={};if(!t){return}this.columnUtils.depthFirstOriginalTreeSearch(null,t,(function(t){n[t.getInstanceId()]=t}));if(i){this.columnUtils.depthFirstOriginalTreeSearch(null,i,(function(t){n[t.getInstanceId()]=null}))}var r=Object.values(n).filter((function(t){return t!=null}));this.destroyBeans(r)};e.prototype.destroyColumns=function(){this.destroyOldColumns(this.primaryColumnTree);this.destroyOldColumns(this.secondaryBalancedTree);this.destroyOldColumns(this.groupAutoColsBalancedTree)};e.prototype.createColumnsFromColumnDefs=function(t,i){var n=this;if(i===void 0){i="api"}var r=t?this.compareColumnStatesAndDispatchEvents(i):undefined;this.valueCache.expire();this.autoGroupsNeedBuilding=true;var e=this.primaryColumns;var s=this.primaryColumnTree;var o=this.columnFactory.createColumnTree(this.columnDefs,true,s);this.destroyOldColumns(this.primaryColumnTree,o.columnTree);this.primaryColumnTree=o.columnTree;this.primaryHeaderRowCount=o.treeDept+1;this.primaryColumns=this.getColumnsFromTree(this.primaryColumnTree);this.primaryColumnsMap={};this.primaryColumns.forEach((function(t){return n.primaryColumnsMap[t.getId()]=t}));this.extractRowGroupColumns(i,e);this.extractPivotColumns(i,e);this.extractValueColumns(i,e);this.ready=true;var u=this.gridColsArePrimary===undefined;var a=this.gridColsArePrimary||u||this.autoGroupsNeedBuilding;if(a){this.updateGridColumns();if(t&&this.gridColsArePrimary&&!this.gridOptionsService.is("maintainColumnOrder")){this.orderGridColumnsLikePrimary()}this.updateDisplayedColumns(i);this.checkViewportColumns()}this.dispatchEverythingChanged(i);if(r){r()}this.dispatchNewColumnsLoaded(i)};e.prototype.dispatchNewColumnsLoaded=function(t){var i={type:hi.EVENT_NEW_COLUMNS_LOADED,source:t};this.eventService.dispatchEvent(i)};e.prototype.dispatchEverythingChanged=function(t){if(t===void 0){t="api"}var i={type:hi.EVENT_COLUMN_EVERYTHING_CHANGED,source:t};this.eventService.dispatchEvent(i)};e.prototype.orderGridColumnsLikePrimary=function(){var t=this;var i=this.primaryColumns;if(!i){return}var n=i.filter((function(i){return t.gridColumns.indexOf(i)>=0}));var r=this.gridColumns.filter((function(t){return n.indexOf(t)<0}));this.gridColumns=tn(tn([],Xi(r)),Xi(n));this.gridColumns=this.placeLockedColumns(this.gridColumns)};e.prototype.getAllDisplayedAutoHeightCols=function(){return this.displayedAutoHeightCols};e.prototype.setViewport=function(){if(this.gridOptionsService.is("enableRtl")){this.viewportLeft=this.bodyWidth-this.scrollPosition-this.scrollWidth;this.viewportRight=this.bodyWidth-this.scrollPosition}else{this.viewportLeft=this.scrollPosition;this.viewportRight=this.scrollWidth+this.scrollPosition}};e.prototype.getDisplayedColumnsStartingAt=function(t){var i=t;var n=[];while(i!=null){n.push(i);i=this.getDisplayedColAfter(i)}return n};e.prototype.checkViewportColumns=function(t){if(t===void 0){t=false}if(this.displayedColumnsCenter==null){return}var i=this.extractViewport();if(!i){return}var n={type:hi.EVENT_VIRTUAL_COLUMNS_CHANGED,afterScroll:t};this.eventService.dispatchEvent(n)};e.prototype.setViewportPosition=function(t,i,n){if(n===void 0){n=false}if(t!==this.scrollWidth||i!==this.scrollPosition||this.bodyWidthDirty){this.scrollWidth=t;this.scrollPosition=i;this.bodyWidthDirty=true;this.setViewport();if(this.ready){this.checkViewportColumns(n)}}};e.prototype.isPivotMode=function(){return this.pivotMode};e.prototype.isPivotSettingAllowed=function(t){if(t&&this.gridOptionsService.is("treeData")){console.warn("AG Grid: Pivot mode not available in conjunction Tree Data i.e. 'gridOptions.treeData: true'");return false}return true};e.prototype.setPivotMode=function(t,i){if(i===void 0){i="api"}if(t===this.pivotMode||!this.isPivotSettingAllowed(this.pivotMode)){return}this.pivotMode=t;this.autoGroupsNeedBuilding=true;this.updateGridColumns();this.updateDisplayedColumns(i);var n={type:hi.EVENT_COLUMN_PIVOT_MODE_CHANGED};this.eventService.dispatchEvent(n)};e.prototype.getSecondaryPivotColumn=function(t,i){if(n(this.secondaryColumns)){return null}var r=this.getPrimaryColumn(i);var e=null;this.secondaryColumns.forEach((function(i){var n=i.getColDef().pivotKeys;var s=i.getColDef().pivotValueColumn;var o=_t(n,t);var u=s===r;if(o&&u){e=i}}));return e};e.prototype.setBeans=function(t){this.logger=t.create("columnModel")};e.prototype.setFirstRightAndLastLeftPinned=function(t){var i;var n;if(this.gridOptionsService.is("enableRtl")){i=this.displayedColumnsLeft?this.displayedColumnsLeft[0]:null;n=this.displayedColumnsRight?xt(this.displayedColumnsRight):null}else{i=this.displayedColumnsLeft?xt(this.displayedColumnsLeft):null;n=this.displayedColumnsRight?this.displayedColumnsRight[0]:null}this.gridColumns.forEach((function(r){r.setLastLeftPinned(r===i,t);r.setFirstRightPinned(r===n,t)}))};e.prototype.autoSizeColumns=function(t){var i=this;if(this.shouldQueueResizeOperations){this.resizeOperationQueue.push((function(){return i.autoSizeColumns(t)}));return}var n=t.columns,r=t.skipHeader,e=t.skipHeaderGroups,s=t.stopAtGroup,o=t.source,u=o===void 0?"api":o;this.animationFrameService.flushAllFrames();var a=[];var f=-1;var h=r!=null?r:this.gridOptionsService.is("skipHeaderOnAutoSize");var c=e!=null?e:h;while(f!==0){f=0;this.actionOnGridColumns(n,(function(t){if(a.indexOf(t)>=0){return false}var n=i.autoWidthCalculator.getPreferredWidthForColumn(t,h);if(n>0){var r=i.normaliseColumnWidth(t,n);t.setActualWidth(r,u);a.push(t);f++}return true}),u)}if(!c){this.autoSizeColumnGroupsByColumns(n,u,s)}this.dispatchColumnResizedEvent(a,true,"autosizeColumns")};e.prototype.dispatchColumnResizedEvent=function(t,i,n,r){if(r===void 0){r=null}if(t&&t.length){var e={type:hi.EVENT_COLUMN_RESIZED,columns:t,column:t.length===1?t[0]:null,flexColumns:r,finished:i,source:n};this.eventService.dispatchEvent(e)}};e.prototype.dispatchColumnChangedEvent=function(t,i,n){var r={type:t,columns:i,column:i&&i.length==1?i[0]:null,source:n};this.eventService.dispatchEvent(r)};e.prototype.dispatchColumnMovedEvent=function(t){var i=t.movedColumns,n=t.source,r=t.toIndex,e=t.finished;var s={type:hi.EVENT_COLUMN_MOVED,columns:i,column:i&&i.length===1?i[0]:null,toIndex:r,finished:e,source:n};this.eventService.dispatchEvent(s)};e.prototype.dispatchColumnPinnedEvent=function(t,i){if(!t.length){return}var n=t.length===1?t[0]:null;var r=this.getCommonValue(t,(function(t){return t.getPinned()}));var e={type:hi.EVENT_COLUMN_PINNED,pinned:r!=null?r:null,columns:t,column:n,source:i};this.eventService.dispatchEvent(e)};e.prototype.dispatchColumnVisibleEvent=function(t,i){if(!t.length){return}var n=t.length===1?t[0]:null;var r=this.getCommonValue(t,(function(t){return t.isVisible()}));var e={type:hi.EVENT_COLUMN_VISIBLE,visible:r,columns:t,column:n,source:i};this.eventService.dispatchEvent(e)};e.prototype.autoSizeColumn=function(t,i,n){if(n===void 0){n="api"}if(t){this.autoSizeColumns({columns:[t],skipHeader:i,skipHeaderGroups:true,source:n})}};e.prototype.autoSizeColumnGroupsByColumns=function(t,i,n){var r,e,s,o;var u=new Set;var a=this.getGridColumns(t);a.forEach((function(t){var i=t.getParent();while(i&&i!=n){if(!i.isPadding()){u.add(i)}i=i.getParent()}}));var f;var h=[];try{for(var c=nn(u),l=c.next();!l.done;l=c.next()){var v=l.value;try{for(var d=(s=void 0,nn(this.ctrlsService.getHeaderRowContainerCtrls())),p=d.next();!p.done;p=d.next()){var g=p.value;f=g.getHeaderCtrlForColumn(v);if(f){break}}}catch(t){s={error:t}}finally{try{if(p&&!p.done&&(o=d.return))o.call(d)}finally{if(s)throw s.error}}if(f){f.resizeLeafColumnsToFit(i)}}}catch(t){r={error:t}}finally{try{if(l&&!l.done&&(e=c.return))e.call(c)}finally{if(r)throw r.error}}return h};e.prototype.autoSizeAllColumns=function(t,i){var n=this;if(i===void 0){i="api"}if(this.shouldQueueResizeOperations){this.resizeOperationQueue.push((function(){return n.autoSizeAllColumns(t,i)}));return}var r=this.getAllDisplayedColumns();this.autoSizeColumns({columns:r,skipHeader:t,source:i})};e.prototype.getColumnsFromTree=function(t){var i=[];var n=function(t){for(var r=0;r<t.length;r++){var e=t[r];if(e instanceof mt){i.push(e)}else if(e instanceof Ct){n(e.getChildren())}}};n(t);return i};e.prototype.getAllDisplayedTrees=function(){if(this.displayedTreeLeft&&this.displayedTreeRight&&this.displayedTreeCentre){return this.displayedTreeLeft.concat(this.displayedTreeCentre).concat(this.displayedTreeRight)}return null};e.prototype.getPrimaryColumnTree=function(){return this.primaryColumnTree};e.prototype.getHeaderRowCount=function(){return this.gridHeaderRowCount};e.prototype.getDisplayedTreeLeft=function(){return this.displayedTreeLeft};e.prototype.getDisplayedTreeRight=function(){return this.displayedTreeRight};e.prototype.getDisplayedTreeCentre=function(){return this.displayedTreeCentre};e.prototype.isColumnDisplayed=function(t){return this.getAllDisplayedColumns().indexOf(t)>=0};e.prototype.getAllDisplayedColumns=function(){return this.displayedColumns};e.prototype.getViewportColumns=function(){return this.viewportColumns};e.prototype.getDisplayedLeftColumnsForRow=function(t){if(!this.colSpanActive){return this.displayedColumnsLeft}return this.getDisplayedColumnsForRow(t,this.displayedColumnsLeft)};e.prototype.getDisplayedRightColumnsForRow=function(t){if(!this.colSpanActive){return this.displayedColumnsRight}return this.getDisplayedColumnsForRow(t,this.displayedColumnsRight)};e.prototype.isColSpanActive=function(){return this.colSpanActive};e.prototype.getDisplayedColumnsForRow=function(t,i,n,r){var e=[];var s=null;var o=function(o){var a=i[o];var f=i.length-o;var h=Math.min(a.getColSpan(t),f);var c=[a];if(h>1){var l=h-1;for(var v=1;v<=l;v++){c.push(i[o+v])}o+=l}var d;if(n){d=false;c.forEach((function(t){if(n(t)){d=true}}))}else{d=true}if(d){if(e.length===0&&s){var p=r?r(a):false;if(p){e.push(s)}}e.push(a)}s=a;u=o};var u;for(var a=0;a<i.length;a++){o(a);a=u}return e};e.prototype.getViewportCenterColumnsForRow=function(t){var n=this;if(!this.colSpanActive){return this.viewportColumnsCenter}var r=function(t){var r=t.getLeft();return i(r)&&r>n.viewportLeft};var e=this.suppressColumnVirtualisation?null:this.isColumnInRowViewport.bind(this);return this.getDisplayedColumnsForRow(t,this.displayedColumnsCenter,e,r)};e.prototype.getAriaColumnIndex=function(t){return this.getAllGridColumns().indexOf(t)+1};e.prototype.isColumnInHeaderViewport=function(t){if(t.isAutoHeaderHeight()){return true}return this.isColumnInRowViewport(t)};e.prototype.isColumnInRowViewport=function(t){if(t.isAutoHeight()){return true}var i=t.getLeft()||0;var n=i+t.getActualWidth();var r=this.viewportLeft-200;var e=this.viewportRight+200;var s=i<r&&n<r;var o=i>e&&n>e;return!s&&!o};e.prototype.getDisplayedColumnsLeftWidth=function(){return this.getWidthOfColsInList(this.displayedColumnsLeft)};e.prototype.getDisplayedColumnsRightWidth=function(){return this.getWidthOfColsInList(this.displayedColumnsRight)};e.prototype.updatePrimaryColumnList=function(t,i,n,e,s,o){var u=this;if(o===void 0){o="api"}if(!t||r(t)){return}var a=false;t.forEach((function(t){var r=u.getPrimaryColumn(t);if(!r){return}if(n){if(i.indexOf(r)>=0){return}i.push(r)}else{if(i.indexOf(r)<0){return}Mt(i,r)}e(r);a=true}));if(!a){return}if(this.autoGroupsNeedBuilding){this.updateGridColumns()}this.updateDisplayedColumns(o);var f={type:s,columns:i,column:i.length===1?i[0]:null,source:o};this.eventService.dispatchEvent(f)};e.prototype.setRowGroupColumns=function(t,i){if(i===void 0){i="api"}this.autoGroupsNeedBuilding=true;this.setPrimaryColumnList(t,this.rowGroupColumns,hi.EVENT_COLUMN_ROW_GROUP_CHANGED,true,this.setRowGroupActive.bind(this),i)};e.prototype.setRowGroupActive=function(t,i,n){if(t===i.isRowGroupActive()){return}i.setRowGroupActive(t,n);if(t&&!this.gridOptionsService.is("suppressRowGroupHidesColumns")){this.setColumnVisible(i,false,n)}if(!t&&!this.gridOptionsService.is("suppressMakeColumnVisibleAfterUnGroup")){this.setColumnVisible(i,true,n)}};e.prototype.addRowGroupColumn=function(t,i){if(i===void 0){i="api"}if(t){this.addRowGroupColumns([t],i)}};e.prototype.addRowGroupColumns=function(t,i){if(i===void 0){i="api"}this.autoGroupsNeedBuilding=true;this.updatePrimaryColumnList(t,this.rowGroupColumns,true,this.setRowGroupActive.bind(this,true),hi.EVENT_COLUMN_ROW_GROUP_CHANGED,i)};e.prototype.removeRowGroupColumns=function(t,i){if(i===void 0){i="api"}this.autoGroupsNeedBuilding=true;this.updatePrimaryColumnList(t,this.rowGroupColumns,false,this.setRowGroupActive.bind(this,false),hi.EVENT_COLUMN_ROW_GROUP_CHANGED,i)};e.prototype.removeRowGroupColumn=function(t,i){if(i===void 0){i="api"}if(t){this.removeRowGroupColumns([t],i)}};e.prototype.addPivotColumns=function(t,i){if(i===void 0){i="api"}this.updatePrimaryColumnList(t,this.pivotColumns,true,(function(t){return t.setPivotActive(true,i)}),hi.EVENT_COLUMN_PIVOT_CHANGED,i)};e.prototype.setPivotColumns=function(t,i){if(i===void 0){i="api"}this.setPrimaryColumnList(t,this.pivotColumns,hi.EVENT_COLUMN_PIVOT_CHANGED,true,(function(t,n){n.setPivotActive(t,i)}),i)};e.prototype.addPivotColumn=function(t,i){if(i===void 0){i="api"}this.addPivotColumns([t],i)};e.prototype.removePivotColumns=function(t,i){if(i===void 0){i="api"}this.updatePrimaryColumnList(t,this.pivotColumns,false,(function(t){return t.setPivotActive(false,i)}),hi.EVENT_COLUMN_PIVOT_CHANGED,i)};e.prototype.removePivotColumn=function(t,i){if(i===void 0){i="api"}this.removePivotColumns([t],i)};e.prototype.setPrimaryColumnList=function(t,n,r,e,s,o){var u=this;var a=new Map;n.forEach((function(t,i){return a.set(t,i)}));n.length=0;if(i(t)){t.forEach((function(t){var i=u.getPrimaryColumn(t);if(i){n.push(i)}}))}n.forEach((function(t,i){var n=a.get(t);if(n===undefined){a.set(t,0);return}if(e&&n!==i){return}a.delete(t)}));(this.primaryColumns||[]).forEach((function(t){var i=n.indexOf(t)>=0;s(i,t)}));if(this.autoGroupsNeedBuilding){this.updateGridColumns()}this.updateDisplayedColumns(o);this.dispatchColumnChangedEvent(r,tn([],Xi(a.keys())),o)};e.prototype.setValueColumns=function(t,i){if(i===void 0){i="api"}this.setPrimaryColumnList(t,this.valueColumns,hi.EVENT_COLUMN_VALUE_CHANGED,false,this.setValueActive.bind(this),i)};e.prototype.setValueActive=function(t,i,n){if(t===i.isValueActive()){return}i.setValueActive(t,n);if(t&&!i.getAggFunc()){var r=this.aggFuncService.getDefaultAggFunc(i);i.setAggFunc(r)}};e.prototype.addValueColumns=function(t,i){if(i===void 0){i="api"}this.updatePrimaryColumnList(t,this.valueColumns,true,this.setValueActive.bind(this,true),hi.EVENT_COLUMN_VALUE_CHANGED,i)};e.prototype.addValueColumn=function(t,i){if(i===void 0){i="api"}if(t){this.addValueColumns([t],i)}};e.prototype.removeValueColumn=function(t,i){if(i===void 0){i="api"}this.removeValueColumns([t],i)};e.prototype.removeValueColumns=function(t,i){if(i===void 0){i="api"}this.updatePrimaryColumnList(t,this.valueColumns,false,this.setValueActive.bind(this,false),hi.EVENT_COLUMN_VALUE_CHANGED,i)};e.prototype.normaliseColumnWidth=function(t,n){var r=t.getMinWidth();if(i(r)&&n<r){n=r}var e=t.getMaxWidth();if(i(e)&&t.isGreaterThanMax(n)){n=e}return n};e.prototype.getPrimaryOrGridColumn=function(t){var i=this.getPrimaryColumn(t);return i||this.getGridColumn(t)};e.prototype.setColumnWidths=function(t,i,n,r){var e=this;if(r===void 0){r="api"}var s=[];t.forEach((function(t){var n=e.getPrimaryOrGridColumn(t.key);if(!n){return}s.push({width:t.newWidth,ratios:[1],columns:[n]});var r=e.gridOptionsService.get("colResizeDefault")==="shift";if(r){i=!i}if(i){var o=e.getDisplayedColAfter(n);if(!o){return}var u=n.getActualWidth()-t.newWidth;var a=o.getActualWidth()+u;s.push({width:a,ratios:[1],columns:[o]})}}));if(s.length===0){return}this.resizeColumnSets({resizeSets:s,finished:n,source:r})};e.prototype.checkMinAndMaxWidthsForSet=function(t){var n=t.columns,r=t.width;var e=0;var s=0;var o=true;n.forEach((function(t){var n=t.getMinWidth();e+=n||0;var r=t.getMaxWidth();if(i(r)&&r>0){s+=r}else{o=false}}));var u=r>=e;var a=!o||r<=s;return u&&a};e.prototype.resizeColumnSets=function(t){var n=this;var r=t.resizeSets,e=t.finished,s=t.source;var o=!r||r.every((function(t){return n.checkMinAndMaxWidthsForSet(t)}));if(!o){if(e){var u=r&&r.length>0?r[0].columns:null;this.dispatchColumnResizedEvent(u,e,s)}return}var a=[];var f=[];r.forEach((function(t){var n=t.width,r=t.columns,e=t.ratios;var o={};var u={};r.forEach((function(t){return f.push(t)}));var h=true;var c=0;var l=function(){c++;if(c>1e3){console.error("AG Grid: infinite loop in resizeColumnSets");return"break"}h=false;var t=[];var s=0;var a=n;r.forEach((function(i,n){var r=u[i.getId()];if(r){a-=o[i.getId()]}else{t.push(i);var f=e[n];s+=f}}));var f=1/s;t.forEach((function(r,s){var c=s===t.length-1;var l;if(c){l=a}else{l=Math.round(e[s]*n*f);a-=l}var v=r.getMinWidth();var d=r.getMaxWidth();if(i(v)&&l<v){l=v;u[r.getId()]=true;h=true}else if(i(d)&&d>0&&l>d){l=d;u[r.getId()]=true;h=true}o[r.getId()]=l}))};while(h){var v=l();if(v==="break")break}r.forEach((function(t){var i=o[t.getId()];var n=t.getActualWidth();if(n!==i){t.setActualWidth(i,s);a.push(t)}}))}));var h=a.length>0;var c=[];if(h){c=this.refreshFlexedColumns({resizingCols:f,skipSetLeft:true});this.setLeftValues(s);this.updateBodyWidths();this.checkViewportColumns()}var l=f.concat(c);if(h||e){this.dispatchColumnResizedEvent(l,e,s,c)}};e.prototype.setColumnAggFunc=function(t,i,n){if(n===void 0){n="api"}if(!t){return}var r=this.getPrimaryColumn(t);if(!r){return}r.setAggFunc(i);this.dispatchColumnChangedEvent(hi.EVENT_COLUMN_VALUE_CHANGED,[r],n)};e.prototype.moveRowGroupColumn=function(t,i,n){if(n===void 0){n="api"}var r=this.rowGroupColumns[t];var e=this.rowGroupColumns.slice(t,i);this.rowGroupColumns.splice(t,1);this.rowGroupColumns.splice(i,0,r);var s={type:hi.EVENT_COLUMN_ROW_GROUP_CHANGED,columns:e,column:e.length===1?e[0]:null,source:n};this.eventService.dispatchEvent(s)};e.prototype.moveColumns=function(t,i,n,r){if(n===void 0){n="api"}if(r===void 0){r=true}this.columnAnimationService.start();if(i>this.gridColumns.length-t.length){console.warn("AG Grid: tried to insert columns in invalid location, toIndex = "+i);console.warn("AG Grid: remember that you should not count the moving columns when calculating the new index");return}var e=this.getGridColumns(t);var s=!this.doesMovePassRules(e,i);if(s){return}It(this.gridColumns,e,i);this.updateDisplayedColumns(n);this.dispatchColumnMovedEvent({movedColumns:e,source:n,toIndex:i,finished:r});this.columnAnimationService.finish()};e.prototype.doesMovePassRules=function(t,i){var n=this.getProposedColumnOrder(t,i);return this.doesOrderPassRules(n)};e.prototype.doesOrderPassRules=function(t){if(!this.doesMovePassMarryChildren(t)){return false}if(!this.doesMovePassLockedPositions(t)){return false}return true};e.prototype.getProposedColumnOrder=function(t,i){var n=this.gridColumns.slice();It(n,t,i);return n};e.prototype.sortColumnsLikeGridColumns=function(t){var i=this;if(!t||t.length<=1){return}var n=t.filter((function(t){return i.gridColumns.indexOf(t)<0})).length>0;if(n){return}t.sort((function(t,n){var r=i.gridColumns.indexOf(t);var e=i.gridColumns.indexOf(n);return r-e}))};e.prototype.doesMovePassLockedPositions=function(t){var i=0;var n=true;var r=function(t){if(!t){return 1}if(t===true){return 0}return t==="left"?0:2};t.forEach((function(t){var e=r(t.getColDef().lockPosition);if(e<i){n=false}i=e}));return n};e.prototype.doesMovePassMarryChildren=function(t){var i=true;this.columnUtils.depthFirstOriginalTreeSearch(null,this.gridBalancedTree,(function(n){if(!(n instanceof Ct)){return}var r=n;var e=r.getColGroupDef();var s=e&&e.marryChildren;if(!s){return}var o=[];r.getLeafColumns().forEach((function(i){var n=t.indexOf(i);o.push(n)}));var u=Math.max.apply(Math,o);var a=Math.min.apply(Math,o);var f=u-a;var h=r.getLeafColumns().length-1;if(f>h){i=false}}));return i};e.prototype.moveColumn=function(t,i,n){if(n===void 0){n="api"}this.moveColumns([t],i,n)};e.prototype.moveColumnByIndex=function(t,i,n){if(n===void 0){n="api"}var r=this.gridColumns[t];this.moveColumn(r,i,n)};e.prototype.getColumnDefs=function(){var t=this;if(!this.primaryColumns){return}var i=this.primaryColumns.slice();if(this.gridColsArePrimary){i.sort((function(i,n){return t.gridColumns.indexOf(i)-t.gridColumns.indexOf(n)}))}else if(this.lastPrimaryOrder){i.sort((function(i,n){return t.lastPrimaryOrder.indexOf(i)-t.lastPrimaryOrder.indexOf(n)}))}return this.columnDefFactory.buildColumnDefs(i,this.rowGroupColumns,this.pivotColumns)};e.prototype.getBodyContainerWidth=function(){return this.bodyWidth};e.prototype.getContainerWidth=function(t){switch(t){case"left":return this.leftWidth;case"right":return this.rightWidth;default:return this.bodyWidth}};e.prototype.updateBodyWidths=function(){var t=this.getWidthOfColsInList(this.displayedColumnsCenter);var i=this.getWidthOfColsInList(this.displayedColumnsLeft);var n=this.getWidthOfColsInList(this.displayedColumnsRight);this.bodyWidthDirty=this.bodyWidth!==t;var r=this.bodyWidth!==t||this.leftWidth!==i||this.rightWidth!==n;if(r){this.bodyWidth=t;this.leftWidth=i;this.rightWidth=n;var e={type:hi.EVENT_DISPLAYED_COLUMNS_WIDTH_CHANGED};this.eventService.dispatchEvent(e)}};e.prototype.getValueColumns=function(){return this.valueColumns?this.valueColumns:[]};e.prototype.getPivotColumns=function(){return this.pivotColumns?this.pivotColumns:[]};e.prototype.isPivotActive=function(){return this.pivotColumns&&this.pivotColumns.length>0&&this.pivotMode};e.prototype.getRowGroupColumns=function(){return this.rowGroupColumns?this.rowGroupColumns:[]};e.prototype.getDisplayedCenterColumns=function(){return this.displayedColumnsCenter};e.prototype.getDisplayedLeftColumns=function(){return this.displayedColumnsLeft};e.prototype.getDisplayedRightColumns=function(){return this.displayedColumnsRight};e.prototype.getDisplayedColumns=function(t){switch(t){case"left":return this.getDisplayedLeftColumns();case"right":return this.getDisplayedRightColumns();default:return this.getDisplayedCenterColumns()}};e.prototype.getAllPrimaryColumns=function(){return this.primaryColumns?this.primaryColumns.slice():null};e.prototype.getSecondaryColumns=function(){return this.secondaryColumns?this.secondaryColumns.slice():null};e.prototype.getAllColumnsForQuickFilter=function(){return this.columnsForQuickFilter};e.prototype.getAllGridColumns=function(){return this.gridColumns};e.prototype.isEmpty=function(){return r(this.gridColumns)};e.prototype.isRowGroupEmpty=function(){return r(this.rowGroupColumns)};e.prototype.setColumnVisible=function(t,i,n){if(n===void 0){n="api"}this.setColumnsVisible([t],i,n)};e.prototype.setColumnsVisible=function(t,i,n){if(i===void 0){i=false}if(n===void 0){n="api"}this.applyColumnState({state:t.map((function(t){return{colId:typeof t==="string"?t:t.getColId(),hide:!i}}))},n)};e.prototype.setColumnPinned=function(t,i,n){if(n===void 0){n="api"}if(t){this.setColumnsPinned([t],i,n)}};e.prototype.setColumnsPinned=function(t,i,n){if(n===void 0){n="api"}if(this.gridOptionsService.isDomLayout("print")){console.warn("AG Grid: Changing the column pinning status is not allowed with domLayout='print'");return}this.columnAnimationService.start();var r;if(i===true||i==="left"){r="left"}else if(i==="right"){r="right"}else{r=null}this.actionOnGridColumns(t,(function(t){if(t.getPinned()!==r){t.setPinned(r);return true}return false}),n,(function(){var t={type:hi.EVENT_COLUMN_PINNED,pinned:r,column:null,columns:null,source:n};return t}));this.columnAnimationService.finish()};e.prototype.actionOnGridColumns=function(t,n,e,s){var o=this;if(r(t)){return}var u=[];t.forEach((function(t){var i=o.getGridColumn(t);if(!i){return}var r=n(i);if(r!==false){u.push(i)}}));if(!u.length){return}this.updateDisplayedColumns(e);if(i(s)&&s){var a=s();a.columns=u;a.column=u.length===1?u[0]:null;this.eventService.dispatchEvent(a)}};e.prototype.getDisplayedColBefore=function(t){var i=this.getAllDisplayedColumns();var n=i.indexOf(t);if(n>0){return i[n-1]}return null};e.prototype.getDisplayedColAfter=function(t){var i=this.getAllDisplayedColumns();var n=i.indexOf(t);if(n<i.length-1){return i[n+1]}return null};e.prototype.getDisplayedGroupAfter=function(t){return this.getDisplayedGroupAtDirection(t,"After")};e.prototype.getDisplayedGroupBefore=function(t){return this.getDisplayedGroupAtDirection(t,"Before")};e.prototype.getDisplayedGroupAtDirection=function(t,i){var n=t.getProvidedColumnGroup().getLevel()+t.getPaddingLevel();var r=t.getDisplayedLeafColumns();var e=i==="After"?xt(r):r[0];var s="getDisplayedCol"+i;while(true){var o=this[s](e);if(!o){return null}var u=this.getColumnGroupAtLevel(o,n);if(u!==t){return u}}};e.prototype.getColumnGroupAtLevel=function(t,i){var n=t.getParent();var r;var e;while(true){var s=n.getProvidedColumnGroup();r=s.getLevel();e=n.getPaddingLevel();if(r+e<=i){break}n=n.getParent()}return n};e.prototype.isPinningLeft=function(){return this.displayedColumnsLeft.length>0};e.prototype.isPinningRight=function(){return this.displayedColumnsRight.length>0};e.prototype.getPrimaryAndSecondaryAndAutoColumns=function(){var t;return(t=[]).concat.apply(t,[this.primaryColumns||[],this.groupAutoColumns||[],this.secondaryColumns||[]])};e.prototype.createStateItemFromColumn=function(t){var i=t.isRowGroupActive()?this.rowGroupColumns.indexOf(t):null;var n=t.isPivotActive()?this.pivotColumns.indexOf(t):null;var r=t.isValueActive()?t.getAggFunc():null;var e=t.getSort()!=null?t.getSort():null;var s=t.getSortIndex()!=null?t.getSortIndex():null;var o=t.getFlex()!=null&&t.getFlex()>0?t.getFlex():null;var u={colId:t.getColId(),width:t.getActualWidth(),hide:!t.isVisible(),pinned:t.getPinned(),sort:e,sortIndex:s,aggFunc:r,rowGroup:t.isRowGroupActive(),rowGroupIndex:i,pivot:t.isPivotActive(),pivotIndex:n,flex:o};return u};e.prototype.getColumnState=function(){if(n(this.primaryColumns)||!this.isAlive()){return[]}var t=this.getPrimaryAndSecondaryAndAutoColumns();var i=t.map(this.createStateItemFromColumn.bind(this));this.orderColumnStateList(i);return i};e.prototype.orderColumnStateList=function(t){var i=ji(this.gridColumns.map((function(t,i){return[t.getColId(),i]})));t.sort((function(t,n){var r=i.has(t.colId)?i.get(t.colId):-1;var e=i.has(n.colId)?i.get(n.colId):-1;return r-e}))};e.prototype.resetColumnState=function(t){var i=this;if(t===void 0){t="api"}var r=this.getColumnsFromTree(this.primaryColumnTree);var e=[];var s=1e3;var o=1e3;var u=[];if(this.groupAutoColumns){u=u.concat(this.groupAutoColumns)}if(r){u=u.concat(r)}u.forEach((function(t){var r=i.getColumnStateFromColDef(t);if(n(r.rowGroupIndex)&&r.rowGroup){r.rowGroupIndex=s++}if(n(r.pivotIndex)&&r.pivot){r.pivotIndex=o++}e.push(r)}));this.applyColumnState({state:e,applyOrder:true},t)};e.prototype.getColumnStateFromColDef=function(t){var i=function(t,i){return t!=null?t:i!=null?i:null};var n=t.getColDef();var r=i(n.sort,n.initialSort);var e=i(n.sortIndex,n.initialSortIndex);var s=i(n.hide,n.initialHide);var o=i(n.pinned,n.initialPinned);var u=i(n.width,n.initialWidth);var a=i(n.flex,n.initialFlex);var f=i(n.rowGroupIndex,n.initialRowGroupIndex);var h=i(n.rowGroup,n.initialRowGroup);if(f==null&&(h==null||h==false)){f=null;h=null}var c=i(n.pivotIndex,n.initialPivotIndex);var l=i(n.pivot,n.initialPivot);if(c==null&&(l==null||l==false)){c=null;l=null}var v=i(n.aggFunc,n.initialAggFunc);return{colId:t.getColId(),sort:r,sortIndex:e,hide:s,pinned:o,width:u,flex:a,rowGroup:h,rowGroupIndex:f,pivot:l,pivotIndex:c,aggFunc:v}};e.prototype.applyColumnState=function(t,n){var e=this;if(r(this.primaryColumns)){return false}if(t&&t.state&&!t.state.forEach){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.");return false}var s=function(i,r,s){var o=e.compareColumnStatesAndDispatchEvents(n);e.autoGroupsNeedBuilding=true;var u=r.slice();var a={};var f={};var h=[];var c=[];var l=0;var v=e.rowGroupColumns.slice();var d=e.pivotColumns.slice();i.forEach((function(i){var r=i.colId||"";var o=r.startsWith(di);if(o){h.push(i);c.push(i);return}var v=s(r);if(!v){c.push(i);l+=1}else{e.syncColumnWithStateItem(v,i,t.defaultState,a,f,false,n);Mt(u,v)}}));var p=function(i){return e.syncColumnWithStateItem(i,null,t.defaultState,a,f,false,n)};u.forEach(p);var g=function(t,i,n,r){var e=t[n.getId()];var s=t[r.getId()];var o=e!=null;var u=s!=null;if(o&&u){return e-s}if(o){return-1}if(u){return 1}var a=i.indexOf(n);var f=i.indexOf(r);var h=a>=0;var c=f>=0;if(h&&c){return a-f}if(h){return-1}return 1};e.rowGroupColumns.sort(g.bind(e,a,v));e.pivotColumns.sort(g.bind(e,f,d));e.updateGridColumns();var b=e.groupAutoColumns?e.groupAutoColumns.slice():[];h.forEach((function(i){var r=e.getAutoColumn(i.colId);Mt(b,r);e.syncColumnWithStateItem(r,i,t.defaultState,null,null,true,n)}));b.forEach(p);e.applyOrderAfterApplyState(t);e.updateDisplayedColumns(n);e.dispatchEverythingChanged(n);o();return{unmatchedAndAutoStates:c,unmatchedCount:l}};this.columnAnimationService.start();var o=s(t.state||[],this.primaryColumns||[],(function(t){return e.getPrimaryColumn(t)})),u=o.unmatchedAndAutoStates,a=o.unmatchedCount;if(u.length>0||i(t.defaultState)){a=s(u,this.secondaryColumns||[],(function(t){return e.getSecondaryColumn(t)})).unmatchedCount}this.columnAnimationService.finish();return a===0};e.prototype.applyOrderAfterApplyState=function(t){var i=this;if(!t.applyOrder||!t.state){return}var n=[];var r={};t.state.forEach((function(t){if(!t.colId||r[t.colId]){return}var e=i.gridColumnsMap[t.colId];if(e){n.push(e);r[t.colId]=true}}));var e=0;this.gridColumns.forEach((function(t){var i=t.getColId();var s=r[i]!=null;if(s){return}var o=i.startsWith(di);if(o){Pt(n,t,e++)}else{n.push(t)}}));n=this.placeLockedColumns(n);if(!this.doesMovePassMarryChildren(n)){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=n};e.prototype.compareColumnStatesAndDispatchEvents=function(t){var i=this;var n={rowGroupColumns:this.rowGroupColumns.slice(),pivotColumns:this.pivotColumns.slice(),valueColumns:this.valueColumns.slice()};var r=this.getColumnState();var e={};r.forEach((function(t){e[t.colId]=t}));return function(){var s=i.getPrimaryAndSecondaryAndAutoColumns();var o=function(n,r,e,s){var o=r.map(s);var u=e.map(s);var a=_t(o,u);if(a){return}var f=new Set(r);e.forEach((function(t){if(!f.delete(t)){f.add(t)}}));var h=tn([],Xi(f));var c={type:n,columns:h,column:h.length===1?h[0]:null,source:t};i.eventService.dispatchEvent(c)};var u=function(t){var i=[];s.forEach((function(n){var r=e[n.getColId()];if(r&&t(r,n)){i.push(n)}}));return i};var a=function(t){return t.getColId()};o(hi.EVENT_COLUMN_ROW_GROUP_CHANGED,n.rowGroupColumns,i.rowGroupColumns,a);o(hi.EVENT_COLUMN_PIVOT_CHANGED,n.pivotColumns,i.pivotColumns,a);var f=function(t,i){var n=t.aggFunc!=null;var r=n!=i.isValueActive();var e=n&&t.aggFunc!=i.getAggFunc();return r||e};var h=u(f);if(h.length>0){i.dispatchColumnChangedEvent(hi.EVENT_COLUMN_VALUE_CHANGED,h,t)}var c=function(t,i){return t.width!=i.getActualWidth()};i.dispatchColumnResizedEvent(u(c),true,t);var l=function(t,i){return t.pinned!=i.getPinned()};i.dispatchColumnPinnedEvent(u(l),t);var v=function(t,i){return t.hide==i.isVisible()};i.dispatchColumnVisibleEvent(u(v),t);var d=function(t,i){return t.sort!=i.getSort()||t.sortIndex!=i.getSortIndex()};if(u(d).length>0){i.sortController.dispatchSortChangedEvents(t)}i.normaliseColumnMovedEventForColumnState(r,t)}};e.prototype.getCommonValue=function(t,i){if(!t||t.length==0){return undefined}var n=i(t[0]);for(var r=1;r<t.length;r++){if(n!==i(t[r])){return undefined}}return n};e.prototype.normaliseColumnMovedEventForColumnState=function(t,i){var n=this;var r=this.getColumnState();var e={};r.forEach((function(t){return e[t.colId]=t}));var s={};t.forEach((function(t){if(e[t.colId]){s[t.colId]=true}}));var o=t.filter((function(t){return s[t.colId]}));var u=r.filter((function(t){return s[t.colId]}));var a=[];u.forEach((function(t,i){var r=o&&o[i];if(r&&r.colId!==t.colId){var e=n.getGridColumn(r.colId);if(e){a.push(e)}}}));if(!a.length){return}this.dispatchColumnMovedEvent({movedColumns:a,source:i,finished:true})};e.prototype.syncColumnWithStateItem=function(t,n,r,e,s,o,u){if(!t){return}var a=function(t,e){var s={value1:undefined,value2:undefined};var o=false;if(n){if(n[t]!==undefined){s.value1=n[t];o=true}if(i(e)&&n[e]!==undefined){s.value2=n[e];o=true}}if(!o&&r){if(r[t]!==undefined){s.value1=r[t]}if(i(e)&&r[e]!==undefined){s.value2=r[e]}}return s};var f=a("hide").value1;if(f!==undefined){t.setVisible(!f,u)}var h=a("pinned").value1;if(h!==undefined){t.setPinned(h)}var c=this.columnUtils.calculateColMinWidth(t.getColDef());var l=a("flex").value1;if(l!==undefined){t.setFlex(l)}var v=t.getFlex()<=0;if(v){var d=a("width").value1;if(d!=null){if(c!=null&&d>=c){t.setActualWidth(d,u)}}}var p=a("sort").value1;if(p!==undefined){if(p==="desc"||p==="asc"){t.setSort(p,u)}else{t.setSort(undefined,u)}}var g=a("sortIndex").value1;if(g!==undefined){t.setSortIndex(g)}if(o||!t.isPrimary()){return}var b=a("aggFunc").value1;if(b!==undefined){if(typeof b==="string"){t.setAggFunc(b);if(!t.isValueActive()){t.setValueActive(true,u);this.valueColumns.push(t)}}else{if(i(b)){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.")}if(t.isValueActive()){t.setValueActive(false,u);Mt(this.valueColumns,t)}}}var w=a("rowGroup","rowGroupIndex"),y=w.value1,m=w.value2;if(y!==undefined||m!==undefined){if(typeof m==="number"||y){if(!t.isRowGroupActive()){t.setRowGroupActive(true,u);this.rowGroupColumns.push(t)}if(e&&typeof m==="number"){e[t.getId()]=m}}else{if(t.isRowGroupActive()){t.setRowGroupActive(false,u);Mt(this.rowGroupColumns,t)}}}var S=a("pivot","pivotIndex"),C=S.value1,O=S.value2;if(C!==undefined||O!==undefined){if(typeof O==="number"||C){if(!t.isPivotActive()){t.setPivotActive(true,u);this.pivotColumns.push(t)}if(s&&typeof O==="number"){s[t.getId()]=O}}else{if(t.isPivotActive()){t.setPivotActive(false,u);Mt(this.pivotColumns,t)}}}};e.prototype.getGridColumns=function(t){return this.getColumns(t,this.getGridColumn.bind(this))};e.prototype.getColumns=function(t,i){var n=[];if(t){t.forEach((function(t){var r=i(t);if(r){n.push(r)}}))}return n};e.prototype.getColumnWithValidation=function(t){if(t==null){return null}var i=this.getGridColumn(t);if(!i){console.warn("AG Grid: could not find column "+t)}return i};e.prototype.getPrimaryColumn=function(t){if(!this.primaryColumns){return null}return this.getColumn(t,this.primaryColumns,this.primaryColumnsMap)};e.prototype.getGridColumn=function(t){return this.getColumn(t,this.gridColumns,this.gridColumnsMap)};e.prototype.lookupGridColumn=function(t){return this.gridColumnsMap[t]};e.prototype.getSecondaryColumn=function(t){if(!this.secondaryColumns){return null}return this.getColumn(t,this.secondaryColumns,this.secondaryColumnsMap)};e.prototype.getColumn=function(t,i,n){if(!t){return null}if(typeof t=="string"&&n[t]){return n[t]}for(var r=0;r<i.length;r++){if(this.columnsMatch(i[r],t)){return i[r]}}return this.getAutoColumn(t)};e.prototype.getSourceColumnsForGroupColumn=function(t){var i=t.getColDef().showRowGroup;if(!i){return null}if(i===true){return this.rowGroupColumns.slice(0)}var n=this.getPrimaryColumn(i);return n?[n]:null};e.prototype.getAutoColumn=function(t){var r=this;if(!this.groupAutoColumns||!i(this.groupAutoColumns)||n(this.groupAutoColumns)){return null}return this.groupAutoColumns.find((function(i){return r.columnsMatch(i,t)}))||null};e.prototype.columnsMatch=function(t,i){var n=t===i;var r=t.getColDef()===i;var e=t.getColId()==i;return n||r||e};e.prototype.getDisplayNameForColumn=function(t,i,n){if(n===void 0){n=false}if(!t){return null}var r=this.getHeaderName(t.getColDef(),t,null,null,i);if(n){return this.wrapHeaderNameWithAggFunc(t,r)}return r};e.prototype.getDisplayNameForProvidedColumnGroup=function(t,i,n){var r=i?i.getColGroupDef():null;if(r){return this.getHeaderName(r,null,t,i,n)}return null};e.prototype.getDisplayNameForColumnGroup=function(t,i){return this.getDisplayNameForProvidedColumnGroup(t,t.getProvidedColumnGroup(),i)};e.prototype.getHeaderName=function(t,i,n,r,e){var s=t.headerValueGetter;if(s){var o={colDef:t,column:i,columnGroup:n,providedColumnGroup:r,location:e,api:this.gridOptionsService.api,columnApi:this.gridOptionsService.columnApi,context:this.gridOptionsService.context};if(typeof s==="function"){return s(o)}else if(typeof s==="string"){return this.expressionService.evaluate(s,o)}console.warn("AG Grid: headerValueGetter must be a function or a string");return""}else if(t.headerName!=null){return t.headerName}else if(t.field){return Si(t.field)}return""};e.prototype.wrapHeaderNameWithAggFunc=function(t,n){if(this.gridOptionsService.is("suppressAggFuncInHeader")){return n}var r=t.getColDef().pivotValueColumn;var e=i(r);var s=null;var o;if(e){var u=this.gridOptionsService.is("removePivotHeaderRowWhenSingleValueColumn")&&this.valueColumns.length===1;var a=t.getColDef().pivotTotalColumnIds!==undefined;if(u&&!a){return n}s=r?r.getAggFunc():null;o=true}else{var f=t.isValueActive();var h=this.pivotMode||!this.isRowGroupEmpty();if(f&&h){s=t.getAggFunc();o=true}else{o=false}}if(o){var c=typeof s==="string"?s:"func";var l=this.localeService.getLocaleTextFunc();var v=l(c,c);return v+"("+n+")"}return n};e.prototype.getColumnGroup=function(t,i){if(!t){return null}if(t instanceof fi){return t}var n=this.getAllDisplayedTrees();var r=typeof i==="number";var e=null;this.columnUtils.depthFirstAllColumnTreeSearch(n,(function(n){if(n instanceof fi){var s=n;var o=void 0;if(r){o=t===s.getGroupId()&&i===s.getPartId()}else{o=t===s.getGroupId()}if(o){e=s}}}));return e};e.prototype.isReady=function(){return this.ready};e.prototype.extractValueColumns=function(t,i){this.valueColumns=this.extractColumns(i,this.valueColumns,(function(i,n){return i.setValueActive(n,t)}),(function(){return undefined}),(function(){return undefined}),(function(t){var i=t.aggFunc;if(i===null||i===""){return null}if(i===undefined){return}return!!i}),(function(t){return t.initialAggFunc!=null&&t.initialAggFunc!=""}));this.valueColumns.forEach((function(t){var i=t.getColDef();if(i.aggFunc!=null&&i.aggFunc!=""){t.setAggFunc(i.aggFunc)}else{if(!t.getAggFunc()){t.setAggFunc(i.initialAggFunc)}}}))};e.prototype.extractRowGroupColumns=function(t,i){this.rowGroupColumns=this.extractColumns(i,this.rowGroupColumns,(function(i,n){return i.setRowGroupActive(n,t)}),(function(t){return t.rowGroupIndex}),(function(t){return t.initialRowGroupIndex}),(function(t){return t.rowGroup}),(function(t){return t.initialRowGroup}))};e.prototype.extractColumns=function(t,i,n,r,e,u,a){if(t===void 0){t=[]}if(i===void 0){i=[]}var f=[];var h=[];(this.primaryColumns||[]).forEach((function(n){var c=t.indexOf(n)<0;var l=n.getColDef();var v=o(u(l));var d=o(a(l));var p=s(r(l));var g=s(e(l));var b;var w=v!==undefined;var y=p!==undefined;var m=d!==undefined;var S=g!==undefined;if(w){b=v}else if(y){if(p===null){b=false}else{b=p>=0}}else{if(c){if(m){b=d}else if(S){b=g!=null&&g>=0}else{b=false}}else{b=i.indexOf(n)>=0}}if(b){var C=c?p!=null||g!=null:p!=null;C?f.push(n):h.push(n)}}));var c=function(t){var i=r(t.getColDef());var n=e(t.getColDef());return i!=null?i:n};f.sort((function(t,i){var n=c(t);var r=c(i);if(n===r){return 0}if(n<r){return-1}return 1}));var l=[].concat(f);i.forEach((function(t){if(h.indexOf(t)>=0){l.push(t)}}));h.forEach((function(t){if(l.indexOf(t)<0){l.push(t)}}));i.forEach((function(t){if(l.indexOf(t)<0){n(t,false)}}));l.forEach((function(t){if(i.indexOf(t)<0){n(t,true)}}));return l};e.prototype.extractPivotColumns=function(t,i){this.pivotColumns=this.extractColumns(i,this.pivotColumns,(function(i,n){return i.setPivotActive(n,t)}),(function(t){return t.pivotIndex}),(function(t){return t.initialPivotIndex}),(function(t){return t.pivot}),(function(t){return t.initialPivot}))};e.prototype.resetColumnGroupState=function(t){if(t===void 0){t="api"}var i=[];this.columnUtils.depthFirstOriginalTreeSearch(null,this.primaryColumnTree,(function(t){if(t instanceof Ct){var n=t.getColGroupDef();var r={groupId:t.getGroupId(),open:!n?undefined:n.openByDefault};i.push(r)}}));this.setColumnGroupState(i,t)};e.prototype.getColumnGroupState=function(){var t=[];this.columnUtils.depthFirstOriginalTreeSearch(null,this.gridBalancedTree,(function(i){if(i instanceof Ct){t.push({groupId:i.getGroupId(),open:i.isExpanded()})}}));return t};e.prototype.setColumnGroupState=function(t,i){var n=this;if(i===void 0){i="api"}this.columnAnimationService.start();var r=[];t.forEach((function(t){var i=t.groupId;var e=t.open;var s=n.getProvidedColumnGroup(i);if(!s){return}if(s.isExpanded()===e){return}n.logger.log("columnGroupOpened("+s.getGroupId()+","+e+")");s.setExpanded(e);r.push(s)}));this.updateGroupsAndDisplayedColumns(i);this.setFirstRightAndLastLeftPinned(i);r.forEach((function(t){var i={type:hi.EVENT_COLUMN_GROUP_OPENED,columnGroup:t};n.eventService.dispatchEvent(i)}));this.columnAnimationService.finish()};e.prototype.setColumnGroupOpened=function(t,i,n){if(n===void 0){n="api"}var r;if(t instanceof Ct){r=t.getId()}else{r=t||""}this.setColumnGroupState([{groupId:r,open:i}],n)};e.prototype.getProvidedColumnGroup=function(t){if(typeof t!=="string"){console.error("AG Grid: group key must be a string")}var i=null;this.columnUtils.depthFirstOriginalTreeSearch(null,this.gridBalancedTree,(function(n){if(n instanceof Ct){if(n.getId()===t){i=n}}}));return i};e.prototype.calculateColumnsForDisplay=function(){var t=this;var i;if(this.pivotMode&&n(this.secondaryColumns)){i=this.gridColumns.filter((function(i){var n=t.groupAutoColumns&&Nt(t.groupAutoColumns,i);var r=t.valueColumns&&Nt(t.valueColumns,i);return n||r}))}else{i=this.gridColumns.filter((function(i){var n=t.groupAutoColumns&&Nt(t.groupAutoColumns,i);return n||i.isVisible()}))}return i};e.prototype.checkColSpanActiveInCols=function(t){var n=false;t.forEach((function(t){if(i(t.getColDef().colSpan)){n=true}}));return n};e.prototype.calculateColumnsForGroupDisplay=function(){var t=this;this.groupDisplayColumns=[];this.groupDisplayColumnsMap={};var n=function(n){var r=n.getColDef();var e=r.showRowGroup;if(r&&i(e)){t.groupDisplayColumns.push(n);if(typeof e==="string"){t.groupDisplayColumnsMap[e]=n}else if(e===true){t.getRowGroupColumns().forEach((function(i){t.groupDisplayColumnsMap[i.getId()]=n}))}}};this.gridColumns.forEach(n)};e.prototype.getGroupDisplayColumns=function(){return this.groupDisplayColumns};e.prototype.getGroupDisplayColumnForGroup=function(t){return this.groupDisplayColumnsMap[t]};e.prototype.updateDisplayedColumns=function(t){var i=this.calculateColumnsForDisplay();this.buildDisplayedTrees(i);this.updateGroupsAndDisplayedColumns(t);this.setFirstRightAndLastLeftPinned(t)};e.prototype.isSecondaryColumnsPresent=function(){return i(this.secondaryColumns)};e.prototype.setSecondaryColumns=function(t,i){var r=this;if(i===void 0){i="api"}var e=t&&t.length>0;if(!e&&n(this.secondaryColumns)){return}if(e){this.processSecondaryColumnDefinitions(t);var s=this.columnFactory.createColumnTree(t,false,this.secondaryBalancedTree||this.previousSecondaryColumns||undefined);this.destroyOldColumns(this.secondaryBalancedTree,s.columnTree);this.secondaryBalancedTree=s.columnTree;this.secondaryHeaderRowCount=s.treeDept+1;this.secondaryColumns=this.getColumnsFromTree(this.secondaryBalancedTree);this.secondaryColumnsMap={};this.secondaryColumns.forEach((function(t){return r.secondaryColumnsMap[t.getId()]=t}));this.previousSecondaryColumns=null}else{this.previousSecondaryColumns=this.secondaryBalancedTree;this.secondaryBalancedTree=null;this.secondaryHeaderRowCount=-1;this.secondaryColumns=null;this.secondaryColumnsMap={}}this.updateGridColumns();this.updateDisplayedColumns(i)};e.prototype.processSecondaryColumnDefinitions=function(t){var n=this.gridOptionsService.get("processPivotResultColDef")||this.gridOptionsService.get("processSecondaryColDef");var r=this.gridOptionsService.get("processPivotResultColGroupDef")||this.gridOptionsService.get("processSecondaryColGroupDef");if(!n&&!r){return undefined}var e=function(t){t.forEach((function(t){var s=i(t.children);if(s){var o=t;if(r){r(o)}e(o.children)}else{var u=t;if(n){n(u)}}}))};if(t){e(t)}};e.prototype.updateGridColumns=function(){var t=this;var i=this.gridBalancedTree;if(this.gridColsArePrimary){this.lastPrimaryOrder=this.gridColumns}else{this.lastSecondaryOrder=this.gridColumns}var n;if(this.secondaryColumns&&this.secondaryBalancedTree){var r=this.secondaryColumns.every((function(i){return t.gridColumnsMap[i.getColId()]!==undefined}));this.gridBalancedTree=this.secondaryBalancedTree.slice();this.gridHeaderRowCount=this.secondaryHeaderRowCount;this.gridColumns=this.secondaryColumns.slice();this.gridColsArePrimary=false;if(r){n=this.lastSecondaryOrder}}else if(this.primaryColumns){this.gridBalancedTree=this.primaryColumnTree.slice();this.gridHeaderRowCount=this.primaryHeaderRowCount;this.gridColumns=this.primaryColumns.slice();this.gridColsArePrimary=true;n=this.lastPrimaryOrder}var e=this.createGroupAutoColumnsIfNeeded();if(e&&n){var s=ji(this.groupAutoColumns.map((function(t){return[t,true]})));n=n.filter((function(t){return!s.has(t)}));n=tn(tn([],Xi(this.groupAutoColumns)),Xi(n))}this.addAutoGroupToGridColumns();this.orderGridColsLike(n);this.gridColumns=this.placeLockedColumns(this.gridColumns);this.calculateColumnsForGroupDisplay();this.refreshQuickFilterColumns();this.clearDisplayedAndViewportColumns();this.colSpanActive=this.checkColSpanActiveInCols(this.gridColumns);this.gridColumnsMap={};this.gridColumns.forEach((function(i){return t.gridColumnsMap[i.getId()]=i}));this.setAutoHeightActive();if(!_t(i,this.gridBalancedTree)){var o={type:hi.EVENT_GRID_COLUMNS_CHANGED};this.eventService.dispatchEvent(o)}};e.prototype.setAutoHeightActive=function(){this.autoHeightActive=this.gridColumns.filter((function(t){return t.isAutoHeight()})).length>0;if(this.autoHeightActive){this.autoHeightActiveAtLeastOnce=true;var t=this.gridOptionsService.isRowModelType("clientSide")||this.gridOptionsService.isRowModelType("serverSide");if(!t){var i="AG Grid - autoHeight columns only work with Client Side Row Model and Server Side Row Model.";P((function(){return console.warn(i)}),"autoHeightActive.wrongRowModel")}}};e.prototype.orderGridColsLike=function(t){if(n(t)){return}var i=ji(t.map((function(t,i){return[t,i]})));var r=true;this.gridColumns.forEach((function(t){if(i.has(t)){r=false}}));if(r){return}var e=ji(this.gridColumns.map((function(t){return[t,true]})));var s=t.filter((function(t){return e.has(t)}));var o=ji(s.map((function(t){return[t,true]})));var u=this.gridColumns.filter((function(t){return!o.has(t)}));var a=s.slice();u.forEach((function(t){var i=t.getOriginalParent();if(!i){a.push(t);return}var n=[];while(!n.length&&i){var r=i.getLeafColumns();r.forEach((function(t){var i=a.indexOf(t)>=0;var r=n.indexOf(t)<0;if(i&&r){n.push(t)}}));i=i.getOriginalParent()}if(!n.length){a.push(t);return}var e=n.map((function(t){return a.indexOf(t)}));var s=Math.max.apply(Math,tn([],Xi(e)));Pt(a,t,s+1)}));this.gridColumns=a};e.prototype.isPrimaryColumnGroupsPresent=function(){return this.primaryHeaderRowCount>1};e.prototype.refreshQuickFilterColumns=function(){var t;var i=(t=this.isPivotMode()?this.secondaryColumns:this.primaryColumns)!==null&&t!==void 0?t:[];if(this.groupAutoColumns){i=i.concat(this.groupAutoColumns)}this.columnsForQuickFilter=this.gridOptionsService.is("includeHiddenColumnsInQuickFilter")?i:i.filter((function(t){return t.isVisible()||t.isRowGroupActive()}))};e.prototype.placeLockedColumns=function(t){var i=[];var n=[];var r=[];t.forEach((function(t){var e=t.getColDef().lockPosition;if(e==="right"){r.push(t)}else if(e==="left"||e===true){i.push(t)}else{n.push(t)}}));return tn(tn(tn([],Xi(i)),Xi(n)),Xi(r))};e.prototype.addAutoGroupToGridColumns=function(){if(n(this.groupAutoColumns)){this.destroyOldColumns(this.groupAutoColsBalancedTree);this.groupAutoColsBalancedTree=null;return}this.gridColumns=this.groupAutoColumns?this.groupAutoColumns.concat(this.gridColumns):this.gridColumns;var t=this.columnFactory.createForAutoGroups(this.groupAutoColumns,this.gridBalancedTree);this.destroyOldColumns(this.groupAutoColsBalancedTree,t);this.groupAutoColsBalancedTree=t;this.gridBalancedTree=t.concat(this.gridBalancedTree)};e.prototype.clearDisplayedAndViewportColumns=function(){this.viewportRowLeft={};this.viewportRowRight={};this.viewportRowCenter={};this.displayedColumnsLeft=[];this.displayedColumnsRight=[];this.displayedColumnsCenter=[];this.displayedColumns=[];this.viewportColumns=[];this.headerViewportColumns=[];this.viewportColumnsHash=""};e.prototype.updateGroupsAndDisplayedColumns=function(t){this.updateOpenClosedVisibilityInColumnGroups();this.deriveDisplayedColumns(t);this.refreshFlexedColumns();this.extractViewport();this.updateBodyWidths();var i={type:hi.EVENT_DISPLAYED_COLUMNS_CHANGED};this.eventService.dispatchEvent(i)};e.prototype.deriveDisplayedColumns=function(t){this.derivedDisplayedColumnsFromDisplayedTree(this.displayedTreeLeft,this.displayedColumnsLeft);this.derivedDisplayedColumnsFromDisplayedTree(this.displayedTreeCentre,this.displayedColumnsCenter);this.derivedDisplayedColumnsFromDisplayedTree(this.displayedTreeRight,this.displayedColumnsRight);this.joinDisplayedColumns();this.setLeftValues(t);this.displayedAutoHeightCols=this.displayedColumns.filter((function(t){return t.isAutoHeight()}))};e.prototype.isAutoRowHeightActive=function(){return this.autoHeightActive};e.prototype.wasAutoRowHeightEverActive=function(){return this.autoHeightActiveAtLeastOnce};e.prototype.joinDisplayedColumns=function(){if(this.gridOptionsService.is("enableRtl")){this.displayedColumns=this.displayedColumnsRight.concat(this.displayedColumnsCenter).concat(this.displayedColumnsLeft)}else{this.displayedColumns=this.displayedColumnsLeft.concat(this.displayedColumnsCenter).concat(this.displayedColumnsRight)}};e.prototype.setLeftValues=function(t){this.setLeftValuesOfColumns(t);this.setLeftValuesOfGroups()};e.prototype.setLeftValuesOfColumns=function(t){var i=this;if(!this.primaryColumns){return}var n=this.primaryColumns.slice(0);var r=this.gridOptionsService.is("enableRtl");[this.displayedColumnsLeft,this.displayedColumnsRight,this.displayedColumnsCenter].forEach((function(e){if(r){var s=i.getWidthOfColsInList(e);e.forEach((function(i){s-=i.getActualWidth();i.setLeft(s,t)}))}else{var o=0;e.forEach((function(i){i.setLeft(o,t);o+=i.getActualWidth()}))}Dt(n,e)}));n.forEach((function(i){i.setLeft(null,t)}))};e.prototype.setLeftValuesOfGroups=function(){[this.displayedTreeLeft,this.displayedTreeRight,this.displayedTreeCentre].forEach((function(t){t.forEach((function(t){if(t instanceof fi){var i=t;i.checkLeft()}}))}))};e.prototype.derivedDisplayedColumnsFromDisplayedTree=function(t,i){i.length=0;this.columnUtils.depthFirstDisplayedColumnTreeSearch(t,(function(t){if(t instanceof mt){i.push(t)}}))};e.prototype.extractViewportColumns=function(){if(this.suppressColumnVirtualisation){this.viewportColumnsCenter=this.displayedColumnsCenter;this.headerViewportColumnsCenter=this.displayedColumnsCenter}else{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)};e.prototype.getVirtualHeaderGroupRow=function(t,i){var r;switch(t){case"left":r=this.viewportRowLeft[i];break;case"right":r=this.viewportRowRight[i];break;default:r=this.viewportRowCenter[i];break}if(n(r)){r=[]}return r};e.prototype.calculateHeaderRows=function(){this.viewportRowLeft={};this.viewportRowRight={};this.viewportRowCenter={};var t={};this.headerViewportColumns.forEach((function(i){return t[i.getId()]=true}));var i=function(n,r,e){var s=false;for(var o=0;o<n.length;o++){var u=n[o];var a=false;if(u instanceof mt){a=t[u.getId()]===true}else{var f=u;var h=f.getDisplayedChildren();if(h){a=i(h,r,e+1)}}if(a){s=true;if(!r[e]){r[e]=[]}r[e].push(u)}}return s};i(this.displayedTreeLeft,this.viewportRowLeft,0);i(this.displayedTreeRight,this.viewportRowRight,0);i(this.displayedTreeCentre,this.viewportRowCenter,0)};e.prototype.extractViewport=function(){var t=function(t){return t.getId()+"-"+(t.getPinned()||"normal")};this.extractViewportColumns();var i=this.viewportColumns.map(t).join("#");var n=this.viewportColumnsHash!==i;if(n){this.viewportColumnsHash=i;this.calculateHeaderRows()}return n};e.prototype.refreshFlexedColumns=function(t){var n;if(t===void 0){t={}}var r=t.source?t.source:"flex";if(t.viewportWidth!=null){this.flexViewportWidth=t.viewportWidth}if(!this.flexViewportWidth){return[]}var e=-1;if(t.resizingCols){var s=new Set(t.resizingCols);var o=this.displayedColumnsCenter;for(var u=o.length-1;u>=0;u--){if(s.has(o[u])){e=u;break}}}var a=0;var f=[];var h=0;var c=0;for(var u=0;u<this.displayedColumnsCenter.length;u++){var l=this.displayedColumnsCenter[u].getFlex()&&u>e;if(l){f.push(this.displayedColumnsCenter[u]);c+=this.displayedColumnsCenter[u].getFlex();h+=(n=this.displayedColumnsCenter[u].getMinWidth())!==null&&n!==void 0?n:0}else{a+=this.displayedColumnsCenter[u].getActualWidth()}}if(!f.length){return[]}var v=[];if(a+h>this.flexViewportWidth){f.forEach((function(t){var i;return t.setActualWidth((i=t.getMinWidth())!==null&&i!==void 0?i:0,r)}));v=f;f=[]}var d=[];var p;t:while(true){p=this.flexViewportWidth-a;var g=p/c;for(var u=0;u<f.length;u++){var b=f[u];var w=g*b.getFlex();var y=0;var m=b.getMinWidth();var S=b.getMaxWidth();if(i(m)&&w<m){y=m}else if(i(S)&&w>S){y=S}if(y){b.setActualWidth(y,r);Tt(f,b);c-=b.getFlex();v.push(b);a+=b.getActualWidth();continue t}d[u]=Math.round(w)}break}var C=p;f.forEach((function(t,i){t.setActualWidth(Math.min(d[i],C),r);v.push(t);C-=d[i]}));if(!t.skipSetLeft){this.setLeftValues(r)}if(t.updateBodyWidths){this.updateBodyWidths()}if(t.fireResizedEvent){this.dispatchColumnResizedEvent(v,true,r,f)}return f};e.prototype.sizeColumnsToFit=function(t,n,r,e){var s=this;var o,u,a,f,h;if(n===void 0){n="sizeColumnsToFit"}if(this.shouldQueueResizeOperations){this.resizeOperationQueue.push((function(){return s.sizeColumnsToFit(t,n,r,e)}));return}var c={};if(e){(o=e===null||e===void 0?void 0:e.columnLimits)===null||o===void 0?void 0:o.forEach((function(t){var i=t.key,n=$i(t,["key"]);c[typeof i==="string"?i:i.getColId()]=n}))}var l=this.getAllDisplayedColumns();var v=t===this.getWidthOfColsInList(l);if(t<=0||!l.length||v){return}var d=[];var p=[];l.forEach((function(t){if(t.getColDef().suppressSizeToFit===true){p.push(t)}else{d.push(t)}}));var g=d.slice(0);var b=false;var w=function(t){Mt(d,t);p.push(t)};d.forEach((function(t){var i,r;t.resetActualWidth(n);var s=c===null||c===void 0?void 0:c[t.getId()];var o=(i=s===null||s===void 0?void 0:s.minWidth)!==null&&i!==void 0?i:e===null||e===void 0?void 0:e.defaultMinWidth;var u=(r=s===null||s===void 0?void 0:s.maxWidth)!==null&&r!==void 0?r:e===null||e===void 0?void 0:e.defaultMaxWidth;var a=t.getActualWidth();if(typeof o==="number"&&a<o){t.setActualWidth(o,n,true)}else if(typeof u==="number"&&a>u){t.setActualWidth(u,n,true)}}));while(!b){b=true;var y=t-this.getWidthOfColsInList(p);if(y<=0){d.forEach((function(t){var i,r;var s=(r=(i=c===null||c===void 0?void 0:c[t.getId()])===null||i===void 0?void 0:i.minWidth)!==null&&r!==void 0?r:e===null||e===void 0?void 0:e.defaultMinWidth;if(typeof s==="number"){t.setActualWidth(s,n,true);return}t.setMinimum(n)}))}else{var m=y/this.getWidthOfColsInList(d);var S=y;for(var C=d.length-1;C>=0;C--){var O=d[C];var j=c===null||c===void 0?void 0:c[O.getId()];var R=(u=j===null||j===void 0?void 0:j.minWidth)!==null&&u!==void 0?u:e===null||e===void 0?void 0:e.defaultMinWidth;var x=(a=j===null||j===void 0?void 0:j.maxWidth)!==null&&a!==void 0?a:e===null||e===void 0?void 0:e.defaultMaxWidth;var _=(f=O.getMinWidth())!==null&&f!==void 0?f:0;var A=(h=O.getMaxWidth())!==null&&h!==void 0?h:Number.MAX_VALUE;var F=typeof R==="number"&&R>_?R:O.getMinWidth();var k=typeof x==="number"&&x<A?x:O.getMaxWidth();var T=Math.round(O.getActualWidth()*m);if(i(F)&&T<F){T=F;w(O);b=false}else if(i(k)&&T>k){T=k;w(O);b=false}else if(C===0){T=S}O.setActualWidth(T,n,true);S-=T}}}g.forEach((function(t){t.fireColumnWidthChangedEvent(n)}));this.setLeftValues(n);this.updateBodyWidths();if(r){return}this.dispatchColumnResizedEvent(g,true,n)};e.prototype.buildDisplayedTrees=function(t){var i=[];var n=[];var r=[];t.forEach((function(t){switch(t.getPinned()){case"left":i.push(t);break;case"right":n.push(t);break;default:r.push(t);break}}));var e=new ci;this.displayedTreeLeft=this.displayedGroupCreator.createDisplayedGroups(i,e,"left",this.displayedTreeLeft);this.displayedTreeRight=this.displayedGroupCreator.createDisplayedGroups(n,e,"right",this.displayedTreeRight);this.displayedTreeCentre=this.displayedGroupCreator.createDisplayedGroups(r,e,null,this.displayedTreeCentre);this.updateDisplayedMap()};e.prototype.updateDisplayedMap=function(){var t=this;this.displayedColumnsAndGroupsMap={};var i=function(i){t.displayedColumnsAndGroupsMap[i.getUniqueId()]=i};this.columnUtils.depthFirstAllColumnTreeSearch(this.displayedTreeCentre,i);this.columnUtils.depthFirstAllColumnTreeSearch(this.displayedTreeLeft,i);this.columnUtils.depthFirstAllColumnTreeSearch(this.displayedTreeRight,i)};e.prototype.isDisplayed=function(t){var i=this.displayedColumnsAndGroupsMap[t.getUniqueId()];return i===t};e.prototype.updateOpenClosedVisibilityInColumnGroups=function(){var t=this.getAllDisplayedTrees();this.columnUtils.depthFirstAllColumnTreeSearch(t,(function(t){if(t instanceof fi){t.calculateDisplayedColumns()}}))};e.prototype.getGroupAutoColumns=function(){return this.groupAutoColumns};e.prototype.createGroupAutoColumnsIfNeeded=function(){var t=this.forceRecreateAutoGroups;this.forceRecreateAutoGroups=false;if(!this.autoGroupsNeedBuilding){return false}this.autoGroupsNeedBuilding=false;var i=this.gridOptionsService.isGroupUseEntireRow(this.pivotMode);var n=this.pivotMode?this.gridOptionsService.is("pivotSuppressAutoColumn"):this.isGroupSuppressAutoColumn();var r=this.rowGroupColumns.length>0||this.gridOptionsService.is("treeData");var e=r&&!n&&!i;if(e){var s=this.autoGroupColService.createAutoGroupColumns(this.rowGroupColumns);var o=!this.autoColsEqual(s,this.groupAutoColumns);if(o||t){this.groupAutoColumns=s;return true}}else{this.groupAutoColumns=null}return false};e.prototype.isGroupSuppressAutoColumn=function(){var t=this.gridOptionsService.get("groupDisplayType");var i=t?qi("custom",t):false;if(i){return true}var n=this.gridOptionsService.get("treeDataDisplayType");return n?Yi("custom",n):false};e.prototype.autoColsEqual=function(t,i){return _t(t,i,(function(t,i){return t.getColId()===i.getColId()}))};e.prototype.getWidthOfColsInList=function(t){return t.reduce((function(t,i){return t+i.getActualWidth()}),0)};e.prototype.getGridBalancedTree=function(){return this.gridBalancedTree};e.prototype.getFirstDisplayedColumn=function(){var t=this.gridOptionsService.is("enableRtl");var i=["getDisplayedLeftColumns","getDisplayedCenterColumns","getDisplayedRightColumns"];if(t){i.reverse()}for(var n=0;n<i.length;n++){var r=this[i[n]]();if(r.length){return t?xt(r):r[0]}}return null};e.prototype.setColumnHeaderHeight=function(t,i){var n=t.setAutoHeaderHeight(i);if(n){var r={type:hi.EVENT_COLUMN_HEADER_HEIGHT_CHANGED,column:t,columns:[t],source:"autosizeColumnHeaderHeight"};this.eventService.dispatchEvent(r)}};e.prototype.getColumnGroupHeaderRowHeight=function(){if(this.isPivotMode()){return this.getPivotGroupHeaderHeight()}return this.getGroupHeaderHeight()};e.prototype.getColumnHeaderRowHeight=function(){var t=this.isPivotMode()?this.getPivotHeaderHeight():this.getHeaderHeight();var i=this.getAllDisplayedColumns().filter((function(t){return t.isAutoHeaderHeight()})).map((function(t){return t.getAutoHeaderHeight()||0}));return Math.max.apply(Math,tn([t],Xi(i)))};e.prototype.getHeaderHeight=function(){var t;return(t=this.gridOptionsService.getNum("headerHeight"))!==null&&t!==void 0?t:this.environment.getFromTheme(25,"headerHeight")};e.prototype.getFloatingFiltersHeight=function(){var t;return(t=this.gridOptionsService.getNum("floatingFiltersHeight"))!==null&&t!==void 0?t:this.getHeaderHeight()};e.prototype.getGroupHeaderHeight=function(){var t;return(t=this.gridOptionsService.getNum("groupHeaderHeight"))!==null&&t!==void 0?t:this.getHeaderHeight()};e.prototype.getPivotHeaderHeight=function(){var t;return(t=this.gridOptionsService.getNum("pivotHeaderHeight"))!==null&&t!==void 0?t:this.getHeaderHeight()};e.prototype.getPivotGroupHeaderHeight=function(){var t;return(t=this.gridOptionsService.getNum("pivotGroupHeaderHeight"))!==null&&t!==void 0?t:this.getGroupHeaderHeight()};e.prototype.queueResizeOperations=function(){this.shouldQueueResizeOperations=true};e.prototype.processResizeOperations=function(){this.shouldQueueResizeOperations=false;this.resizeOperationQueue.forEach((function(t){return t()}));this.resizeOperationQueue=[]};e.prototype.resetColumnDefIntoColumn=function(t){var i=t.getUserProvidedColDef();if(!i){return false}var n=this.columnFactory.addColumnDefaultAndTypes(i,t.getColId());t.setColDef(n,i);return true};e.prototype.generateColumnStateForRowGroupAndPivotIndexes=function(t,i){var n=this;var r={};var e=function(t,i,e,s,o,u){if(!i.length||!n.primaryColumns){return[]}var a=Object.keys(t);var f=new Set(a);var h=new Set(a);var c=new Set(i.map((function(t){var i=t.getColId();h.delete(i);return i})).concat(a));var l=[];var v={};var d=0;for(var p=0;p<n.primaryColumns.length;p++){var g=n.primaryColumns[p].getColId();if(c.has(g)){l.push(g);v[g]=d++}}var b=1e3;var w=false;var y=0;var m=function(i){var n=v[i];for(var r=y;r<n;r++){var e=l[r];if(h.has(e)){t[e][o]=b++;h.delete(e)}}y=n};i.forEach((function(i){var n=i.getColId();if(f.has(n)){m(n);t[n][o]=b++}else{var a=i.getColDef();var c=a[o]===null||a[o]===undefined&&a[u]==null;if(c){if(!w){var d=a[e]||a[e]===undefined&&a[s];if(d){m(n)}else{h.forEach((function(i){t[i][o]=b+v[i]}));b+=l.length;w=true}}if(!r[n]){r[n]={colId:n}}r[n][o]=b++}}}))};e(t,this.rowGroupColumns,"rowGroup","initialRowGroup","rowGroupIndex","initialRowGroupIndex");e(i,this.pivotColumns,"pivot","initialPivot","pivotIndex","initialPivotIndex");return Object.values(r)};Ji([ut("expressionService")],e.prototype,"expressionService",void 0);Ji([ut("columnFactory")],e.prototype,"columnFactory",void 0);Ji([ut("displayedGroupCreator")],e.prototype,"displayedGroupCreator",void 0);Ji([ut("ctrlsService")],e.prototype,"ctrlsService",void 0);Ji([ut("autoWidthCalculator")],e.prototype,"autoWidthCalculator",void 0);Ji([ut("columnUtils")],e.prototype,"columnUtils",void 0);Ji([ut("columnAnimationService")],e.prototype,"columnAnimationService",void 0);Ji([ut("autoGroupColService")],e.prototype,"autoGroupColService",void 0);Ji([at("aggFuncService")],e.prototype,"aggFuncService",void 0);Ji([at("valueCache")],e.prototype,"valueCache",void 0);Ji([at("animationFrameService")],e.prototype,"animationFrameService",void 0);Ji([ut("sortController")],e.prototype,"sortController",void 0);Ji([ut("columnDefFactory")],e.prototype,"columnDefFactory",void 0);Ji([et],e.prototype,"init",null);Ji([st],e.prototype,"destroyColumns",null);Ji([Zi(0,ht("loggerFactory"))],e.prototype,"setBeans",null);e=Ji([ot("columnModel")],e);return e}(ri);var en=function(){var t=function(i,n){t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var n in i)if(Object.prototype.hasOwnProperty.call(i,n))t[n]=i[n]};return t(i,n)};return function(i,n){if(typeof n!=="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(i,n);function r(){this.constructor=i}i.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}();var sn=function(t,i,n,r){var e=arguments.length,s=e<3?i:r===null?r=Object.getOwnPropertyDescriptor(i,n):r,o;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")s=Reflect.decorate(t,i,n,r);else for(var u=t.length-1;u>=0;u--)if(o=t[u])s=(e<3?o(s):e>3?o(i,n,s):o(i,n))||s;return e>3&&s&&Object.defineProperty(i,n,s),s};var on=function(t){en(i,t);function i(){return t!==null&&t.apply(this,arguments)||this}i.prototype.calculateColMinWidth=function(t){return t.minWidth!=null?t.minWidth:this.environment.getMinColWidth()};i.prototype.calculateColMaxWidth=function(t){return t.maxWidth!=null?t.maxWidth:Number.MAX_SAFE_INTEGER};i.prototype.calculateColInitialWidth=function(t){var i=this.calculateColMinWidth(t);var n=this.calculateColMaxWidth(t);var r;var e=s(t.width);var o=s(t.initialWidth);if(e!=null){r=e}else if(o!=null){r=o}else{r=200}return Math.max(Math.min(r,n),i)};i.prototype.getOriginalPathForColumn=function(t,i){var n=[];var r=false;var e=function(i,s){for(var o=0;o<i.length;o++){if(r){return}var u=i[o];if(u instanceof Ct){var a=u;e(a.getChildren(),s+1);n[s]=u}else if(u===t){r=true}}};e(i,0);return r?n:null};i.prototype.depthFirstOriginalTreeSearch=function(t,i,n){var r=this;if(!i){return}i.forEach((function(i){if(i instanceof Ct){r.depthFirstOriginalTreeSearch(i,i.getChildren(),n)}n(i,t)}))};i.prototype.depthFirstAllColumnTreeSearch=function(t,i){var n=this;if(!t){return}t.forEach((function(t){if(t instanceof fi){n.depthFirstAllColumnTreeSearch(t.getChildren(),i)}i(t)}))};i.prototype.depthFirstDisplayedColumnTreeSearch=function(t,i){var n=this;if(!t){return}t.forEach((function(t){if(t instanceof fi){n.depthFirstDisplayedColumnTreeSearch(t.getDisplayedChildren(),i)}i(t)}))};i=sn([ot("columnUtils")],i);return i}(ri);var un=function(){var t=function(i,n){t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var n in i)if(Object.prototype.hasOwnProperty.call(i,n))t[n]=i[n]};return t(i,n)};return function(i,n){if(typeof n!=="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(i,n);function r(){this.constructor=i}i.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}();var an=function(t,i,n,r){var e=arguments.length,s=e<3?i:r===null?r=Object.getOwnPropertyDescriptor(i,n):r,o;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")s=Reflect.decorate(t,i,n,r);else for(var u=t.length-1;u>=0;u--)if(o=t[u])s=(e<3?o(s):e>3?o(i,n,s):o(i,n))||s;return e>3&&s&&Object.defineProperty(i,n,s),s};var fn=function(t){un(n,t);function n(){return t!==null&&t.apply(this,arguments)||this}n.prototype.createDisplayedGroups=function(t,i,n,r){var e=this;var s=this.mapOldGroupsById(r);var o=[];var u=t;var a=function(){var t=u;u=[];var r=0;var a=function(a){var f=r;r=a;var h=t[f];var c=h instanceof fi?h.getProvidedColumnGroup():h;var l=c.getOriginalParent();if(l==null){for(var v=f;v<a;v++){o.push(t[v])}return}var d=e.createColumnGroup(l,i,s,n);for(var v=f;v<a;v++){d.addChild(t[v])}u.push(d)};for(var f=1;f<t.length;f++){var h=t[f];var c=h instanceof fi?h.getProvidedColumnGroup():h;var l=c.getOriginalParent();var v=t[r];var d=v instanceof fi?v.getProvidedColumnGroup():v;var p=d.getOriginalParent();if(l!==p){a(f)}}if(r<t.length){a(t.length)}};while(u.length){a()}this.setupParentsIntoColumns(o,null);return o};n.prototype.createColumnGroup=function(t,n,r,e){var s=t.getGroupId();var o=n.getInstanceIdForKey(s);var u=fi.createUniqueId(s,o);var a=r[u];if(a&&a.getProvidedColumnGroup()!==t){a=null}if(i(a)){a.reset()}else{a=new fi(t,s,o,e);this.context.createBean(a)}return a};n.prototype.mapOldGroupsById=function(t){var i={};var n=function(t){t.forEach((function(t){if(t instanceof fi){var r=t;i[t.getUniqueId()]=r;n(r.getChildren())}}))};if(t){n(t)}return i};n.prototype.setupParentsIntoColumns=function(t,i){var n=this;t.forEach((function(t){t.setParent(i);if(t instanceof fi){var r=t;n.setupParentsIntoColumns(r.getChildren(),r)}}))};n=an([ot("displayedGroupCreator")],n);return n}(ri);var hn=function(){var t=function(i,n){t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var n in i)if(Object.prototype.hasOwnProperty.call(i,n))t[n]=i[n]};return t(i,n)};return function(i,n){if(typeof n!=="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(i,n);function r(){this.constructor=i}i.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}();var cn=function(t,i,n,r){var e=arguments.length,s=e<3?i:r===null?r=Object.getOwnPropertyDescriptor(i,n):r,o;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")s=Reflect.decorate(t,i,n,r);else for(var u=t.length-1;u>=0;u--)if(o=t[u])s=(e<3?o(s):e>3?o(i,n,s):o(i,n))||s;return e>3&&s&&Object.defineProperty(i,n,s),s};var ln=function(t){hn(i,t);function i(){var i=t!==null&&t.apply(this,arguments)||this;i.componentsMappedByName={};return i}i.prototype.setupComponents=function(t){var i=this;if(t){t.forEach((function(t){return i.addComponent(t)}))}};i.prototype.addComponent=function(t){var i=t.componentName.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase();var n=i.toUpperCase();this.componentsMappedByName[n]=t.componentClass};i.prototype.getComponentClass=function(t){return this.componentsMappedByName[t]};i=cn([ot("agStackComponentsRegistry")],i);return i}(ri);function vn(t,i,n){if(n==null||n==""){pn(t,i)}else{dn(t,i,n)}}function dn(t,i,n){t.setAttribute(gn(i),n.toString())}function pn(t,i){t.removeAttribute(gn(i))}function gn(t){return"aria-"+t}function bn(t,i){if(i){t.setAttribute("role",i)}else{t.removeAttribute("role")}}function wn(t){var i;if(t==="asc"){i="ascending"}else if(t==="desc"){i="descending"}else if(t==="mixed"){i="other"}else{i="none"}return i}function yn(t){return parseInt(t.getAttribute("aria-level"),10)}function mn(t){return parseInt(t.getAttribute("aria-posinset"),10)}function Sn(t){return t.getAttribute("aria-describedby")||""}function Cn(t,i){vn(t,"label",i)}function On(t,i){vn(t,"labelledby",i)}function jn(t,i){vn(t,"description",i)}function Rn(t,i){vn(t,"describedby",i)}function xn(t,i){vn(t,"live",i)}function _n(t,i){vn(t,"level",i)}function An(t,i){vn(t,"disabled",i)}function Fn(t,i){vn(t,"hidden",i)}function kn(t,i){vn(t,"activedescendant",i)}function Tn(t,i){dn(t,"expanded",i)}function Mn(t){pn(t,"expanded")}function Dn(t,i){dn(t,"setsize",i)}function Gn(t,i){dn(t,"posinset",i)}function Pn(t,i){dn(t,"multiselectable",i)}function En(t,i){dn(t,"rowcount",i)}function In(t,i){dn(t,"rowindex",i)}function Nn(t,i){dn(t,"colcount",i)}function Hn(t,i){dn(t,"colindex",i)}function Ln(t,i){dn(t,"colspan",i)}function Vn(t,i){dn(t,"sort",i)}function Bn(t){pn(t,"sort")}function zn(t,i){vn(t,"selected",i)}function Wn(t,i){dn(t,"checked",i===undefined?"mixed":i)}function Un(t,i){vn(t,"controls",i.id);On(i,t.id)}function Kn(t,i){return i===undefined?t("ariaIndeterminate","indeterminate"):i===true?t("ariaChecked","checked"):t("ariaUnchecked","unchecked")}var qn=Object.freeze({__proto__:null,setAriaRole:bn,getAriaSortState:wn,getAriaLevel:yn,getAriaPosInSet:mn,getAriaDescribedBy:Sn,setAriaLabel:Cn,setAriaLabelledBy:On,setAriaDescription:jn,setAriaDescribedBy:Rn,setAriaLive:xn,setAriaLevel:_n,setAriaDisabled:An,setAriaHidden:Fn,setAriaActiveDescendant:kn,setAriaExpanded:Tn,removeAriaExpanded:Mn,setAriaSetSize:Dn,setAriaPosInSet:Gn,setAriaMultiSelectable:Pn,setAriaRowCount:En,setAriaRowIndex:In,setAriaColCount:Nn,setAriaColIndex:Hn,setAriaColSpan:Ln,setAriaSort:Vn,removeAriaSort:Bn,setAriaSelected:zn,setAriaChecked:Wn,setAriaControls:Un,getAriaCheckboxStateName:Kn});var Yn;var Qn;var Jn;var Zn;var $n;var Xn;var tr;var ir;function nr(){if(Yn===undefined){Yn=/^((?!chrome|android).)*safari/i.test(navigator.userAgent)}return Yn}function rr(){if(Qn===undefined){if(nr()){var t=navigator.userAgent.match(/version\/(\d+)/i);if(t){Qn=t[1]!=null?parseFloat(t[1]):0}}else{Qn=0}}return Qn}function er(){if(Jn===undefined){var t=window;Jn=!!t.chrome&&(!!t.chrome.webstore||!!t.chrome.runtime)||/Chrome/.test(navigator.userAgent)&&/Google Inc/.test(navigator.vendor)}return Jn}function sr(){if(Zn===undefined){Zn=/(firefox)/i.test(navigator.userAgent)}return Zn}function or(){if($n===undefined){$n=/(Mac|iPhone|iPod|iPad)/i.test(navigator.platform)}return $n}function ur(){if(Xn===undefined){Xn=/iPad|iPhone|iPod/.test(navigator.platform)||navigator.platform==="MacIntel"&&navigator.maxTouchPoints>1}return Xn}function ar(){return!nr()||rr()>=15}function fr(t){if(!t){return null}var i=t.tabIndex;var n=t.getAttribute("tabIndex");if(i===-1&&(n===null||n===""&&!sr())){return null}return i.toString()}function hr(){if(!document.body){return-1}var t=1e6;var i=navigator.userAgent.toLowerCase().match(/firefox/)?6e6:1e9;var n=document.createElement("div");document.body.appendChild(n);while(true){var r=t*2;n.style.height=r+"px";if(r>i||n.clientHeight!==r){break}else{t=r}}document.body.removeChild(n);return t}function cr(){var t,i,n;return(i=(t=document.body)===null||t===void 0?void 0:t.clientWidth)!==null&&i!==void 0?i:window.innerHeight||((n=document.documentElement)===null||n===void 0?void 0:n.clientWidth)||-1}function lr(){var t,i,n;return(i=(t=document.body)===null||t===void 0?void 0:t.clientHeight)!==null&&i!==void 0?i:window.innerHeight||((n=document.documentElement)===null||n===void 0?void 0:n.clientHeight)||-1}function vr(){if(ir==null){dr()}return ir}function dr(){var t=document.body;var i=document.createElement("div");i.style.width=i.style.height="100px";i.style.opacity="0";i.style.overflow="scroll";i.style.msOverflowStyle="scrollbar";i.style.position="absolute";t.appendChild(i);var n=i.offsetWidth-i.clientWidth;if(n===0&&i.clientWidth===0){n=null}if(i.parentNode){i.parentNode.removeChild(i)}if(n!=null){ir=n;tr=n===0}}function pr(){if(tr==null){dr()}return tr}var gr=Object.freeze({__proto__:null,isBrowserSafari:nr,getSafariVersion:rr,isBrowserChrome:er,isBrowserFirefox:sr,isMacOsUserAgent:or,isIOSUserAgent:ur,browserSupportsPreventScroll:ar,getTabIndex:fr,getMaxDivHeight:hr,getBodyWidth:cr,getBodyHeight:lr,getScrollbarWidth:vr,isInvisibleScrollbar:pr});function br(t,i){return t.toString().padStart(i,"0")}function wr(t,i){var n=[];for(var r=t;r<=i;r++){n.push(r)}return n}function yr(t){if(typeof t==="string"){t=parseInt(t,10)}if(typeof t==="number"){return Math.floor(t)}return null}function mr(t,i){var n="";for(var r=0;r<i;r++){n+=String.fromCharCode(t&255);t>>>=8}return n}function Sr(t,i,n){if(typeof t!=="number"){return""}return Cr(Math.round(t*100)/100,i,n)}function Cr(t,i,n){if(typeof t!=="number"){return""}return t.toString().replace(".",n).replace(/(\d)(?=(\d{3})+(?!\d))/g,"$1"+i)}function Or(t){return t==null?null:t.reduce((function(t,i){return t+i}),0)}function jr(t,i){if(t>=0){return t}return i}function Rr(t,i){var n=parseInt(t,10);if(!isNaN(n)&&isFinite(n)&&n>0){return n}return i}var xr=Object.freeze({__proto__:null,padStartWidthZeros:br,createArrayOfNumbers:wr,cleanNumber:yr,decToHex:mr,formatNumberTwoDecimalPlacesAndCommas:Sr,formatNumberCommas:Cr,sum:Or,zeroOrGreater:jr,oneOrGreater:Rr});var _r=function(t,i){var n=typeof Symbol==="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),e,s=[],o;try{while((i===void 0||i-- >0)&&!(e=r.next()).done)s.push(e.value)}catch(t){o={error:t}}finally{try{if(e&&!e.done&&(n=r["return"]))n.call(r)}finally{if(o)throw o.error}}return s};function Ar(t,i,n){if(i===void 0){i=true}if(n===void 0){n="-"}if(!t){return null}var r=[t.getFullYear(),t.getMonth()+1,t.getDate()].map((function(t){return br(t,2)})).join(n);if(i){r+=" "+[t.getHours(),t.getMinutes(),t.getSeconds()].map((function(t){return br(t,2)})).join(":")}return r}var Fr=function(t){if(t>3&&t<21){return"th"}var i=t%10;switch(i){case 1:return"st";case 2:return"nd";case 3:return"rd"}return"th"};function kr(t,i){if(i===void 0){i="YYYY-MM-DD"}var n=br(t.getFullYear(),4);var r=["January","February","March","April","May","June","July","August","September","October","November","December"];var e=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"];var s={YYYY:function(){return n.slice(n.length-4,n.length)},YY:function(){return n.slice(n.length-2,n.length)},Y:function(){return""+t.getFullYear()},MMMM:function(){return r[t.getMonth()]},MMM:function(){return r[t.getMonth()].slice(0,3)},MM:function(){return br(t.getMonth()+1,2)},Mo:function(){return""+(t.getMonth()+1)+Fr(t.getMonth()+1)},M:function(){return""+(t.getMonth()+1)},Do:function(){return""+t.getDate()+Fr(t.getDate())},DD:function(){return br(t.getDate(),2)},D:function(){return""+t.getDate()},dddd:function(){return e[t.getDay()]},ddd:function(){return e[t.getDay()].slice(0,3)},dd:function(){return e[t.getDay()].slice(0,2)},do:function(){return""+t.getDay()+Fr(t.getDay())},d:function(){return""+t.getDay()}};var o=new RegExp(Object.keys(s).join("|"),"g");return i.replace(o,(function(t){if(t in s){return s[t]()}return t}))}function Tr(t){if(!t){return null}var i=_r(t.split(" "),2),n=i[0],r=i[1];if(!n){return null}var e=n.split("-").map((function(t){return parseInt(t,10)}));if(e.filter((function(t){return!isNaN(t)})).length!==3){return null}var s=_r(e,3),o=s[0],u=s[1],a=s[2];var f=new Date(o,u-1,a);if(f.getFullYear()!==o||f.getMonth()!==u-1||f.getDate()!==a){return null}if(!r||r==="00:00:00"){return f}var h=_r(r.split(":").map((function(t){return parseInt(t,10)})),3),c=h[0],l=h[1],v=h[2];if(c>=0&&c<24){f.setHours(c)}if(l>=0&&l<60){f.setMinutes(l)}if(v>=0&&v<60){f.setSeconds(v)}return f}var Mr=Object.freeze({__proto__:null,serialiseDate:Ar,dateToFormattedString:kr,parseDateTimeFromString:Tr});var Dr=function(t){var i=typeof Symbol==="function"&&Symbol.iterator,n=i&&t[i],r=0;if(n)return n.call(t);if(t&&typeof t.length==="number")return{next:function(){if(t&&r>=t.length)t=void 0;return{value:t&&t[r++],done:!t}}};throw new TypeError(i?"Object is not iterable.":"Symbol.iterator is not defined.")};var Gr=function(t,i){var n=typeof Symbol==="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),e,s=[],o;try{while((i===void 0||i-- >0)&&!(e=r.next()).done)s.push(e.value)}catch(t){o={error:t}}finally{try{if(e&&!e.done&&(n=r["return"]))n.call(r)}finally{if(o)throw o.error}}return s};var Pr;function Er(t,i,n){var r=t.parentElement;var e=r&&r.firstChild;while(e){if(i){e.classList.toggle(i,e===t)}if(n){e.classList.toggle(n,e!==t)}e=e.nextSibling}}var Ir="[tabindex], input, select, button, textarea, [href]";var Nr=".ag-hidden, .ag-hidden *, [disabled], .ag-disabled:not(.ag-button), .ag-disabled *";function Hr(t){var i=Element.prototype.matches||Element.prototype.msMatchesSelector;var n="input, select, button, textarea";var r=i.call(t,n);var e=i.call(t,Nr);var s=ne(t);var o=r&&!e&&s;return o}function Lr(t,i,n){if(n===void 0){n={}}var r=n.skipAriaHidden;t.classList.toggle("ag-hidden",!i);if(!r){Fn(t,!i)}}function Vr(t,i,n){if(n===void 0){n={}}var r=n.skipAriaHidden;t.classList.toggle("ag-invisible",!i);if(!r){Fn(t,!i)}}function Br(t,i){var n="disabled";var r=i?function(t){return t.setAttribute(n,"")}:function(t){return t.removeAttribute(n)};r(t);je(t.querySelectorAll("input"),(function(t){return r(t)}))}function zr(t,i,n){var r=0;while(t){if(t.classList.contains(i)){return true}t=t.parentElement;if(typeof n=="number"){if(++r>n){break}}else if(t===n){break}}return false}function Wr(t){var i=window.getComputedStyle(t),n=i.height,r=i.width,e=i.borderTopWidth,s=i.borderRightWidth,o=i.borderBottomWidth,u=i.borderLeftWidth,a=i.paddingTop,f=i.paddingRight,h=i.paddingBottom,c=i.paddingLeft,l=i.marginTop,v=i.marginRight,d=i.marginBottom,p=i.marginLeft,g=i.boxSizing;return{height:parseFloat(n),width:parseFloat(r),borderTopWidth:parseFloat(e),borderRightWidth:parseFloat(s),borderBottomWidth:parseFloat(o),borderLeftWidth:parseFloat(u),paddingTop:parseFloat(a),paddingRight:parseFloat(f),paddingBottom:parseFloat(h),paddingLeft:parseFloat(c),marginTop:parseFloat(l),marginRight:parseFloat(v),marginBottom:parseFloat(d),marginLeft:parseFloat(p),boxSizing:g}}function Ur(t){var i=Wr(t);if(i.boxSizing==="border-box"){return i.height-i.paddingTop-i.paddingBottom}return i.height}function Kr(t){var i=Wr(t);if(i.boxSizing==="border-box"){return i.width-i.paddingLeft-i.paddingRight}return i.width}function qr(t){var i=Wr(t);var n=i.marginBottom+i.marginTop;return Math.ceil(t.offsetHeight+n)}function Yr(t){var i=Wr(t);var n=i.marginLeft+i.marginRight;return Math.ceil(t.offsetWidth+n)}function Qr(t){var i=t.getBoundingClientRect();var n=Wr(t),r=n.borderTopWidth,e=n.borderLeftWidth,s=n.borderRightWidth,o=n.borderBottomWidth;return{top:i.top+(r||0),left:i.left+(e||0),right:i.right+(s||0),bottom:i.bottom+(o||0)}}function Jr(){if(typeof Pr==="boolean"){return Pr}var t=document.createElement("div");t.style.direction="rtl";t.style.width="1px";t.style.height="1px";t.style.position="fixed";t.style.top="0px";t.style.overflow="hidden";t.dir="rtl";t.innerHTML='<div style="width: 2px">\n <span style="display: inline-block; width: 1px"></span>\n <span style="display: inline-block; width: 1px"></span>\n </div>';document.body.appendChild(t);t.scrollLeft=1;Pr=Math.floor(t.scrollLeft)===0;document.body.removeChild(t);return Pr}function Zr(t,i){var n=t.scrollLeft;if(i){n=Math.abs(n);if(er()&&!Jr()){n=t.scrollWidth-t.clientWidth-n}}return n}function $r(t,i,n){if(n){if(Jr()){i*=-1}else if(nr()||er()){i=t.scrollWidth-t.clientWidth-i}}t.scrollLeft=i}function Xr(t){while(t&&t.firstChild){t.removeChild(t.firstChild)}}function te(t,i){ie(t.querySelector(i))}function ie(t){if(t&&t.parentNode){t.parentNode.removeChild(t)}}function ne(t){return t.offsetParent!==null}function re(t){var i=document.createElement("div");i.innerHTML=(t||"").trim();return i.firstChild}function ee(t,i){if(t.lastChild){t.insertAdjacentHTML("afterbegin",i)}else{t.innerHTML=i}}function se(t,i){if(t.attributes&&t.attributes[i]){var n=t.attributes[i];return n.value}return null}function oe(t){return t&&t.clientHeight?t.clientHeight:0}function ue(t){return t&&t.clientWidth?t.clientWidth:0}function ae(t,i,n){if(n&&n.nextSibling===i){return}var r=document.activeElement;var e=i.contains(r);if(n){if(n.nextSibling){t.insertBefore(i,n.nextSibling)}else{t.appendChild(i)}}else{if(t.firstChild&&t.firstChild!==i){t.insertAdjacentElement("afterbegin",i)}}if(e&&r&&ar()){r.focus({preventScroll:true})}}function fe(t,i){for(var n=0;n<i.length;n++){var r=i[n];var e=t.children[n];if(e!==r){t.insertBefore(r,e)}}}function he(t,i,n){if(n){n.insertAdjacentElement("afterend",i)}else{if(t.firstChild){t.insertAdjacentElement("afterbegin",i)}else{t.appendChild(i)}}}function ce(t,n){if(i(t.firstChild)){t.insertBefore(n,t.firstChild)}else{t.appendChild(n)}}function le(t,i){var n,r;if(!i){return}try{for(var e=Dr(Object.entries(i)),s=e.next();!s.done;s=e.next()){var o=Gr(s.value,2),u=o[0],a=o[1];if(!u||!u.length||a==null){continue}var f=Ci(u);var h=a.toString();var c=h.replace(/\s*!important/g,"");var l=c.length!=h.length?"important":undefined;t.style.setProperty(f,c,l)}}catch(t){n={error:t}}finally{try{if(s&&!s.done&&(r=e.return))r.call(e)}finally{if(n)throw n.error}}}function ve(t){return t.clientWidth<t.scrollWidth}function de(t){return t.clientHeight<t.scrollHeight}function pe(t,i){if(i==="flex"){t.style.removeProperty("width");t.style.removeProperty("minWidth");t.style.removeProperty("maxWidth");t.style.flex="1 1 auto"}else{ge(t,i)}}function ge(t,i){i=ye(i);t.style.width=i.toString();t.style.maxWidth=i.toString();t.style.minWidth=i.toString()}function be(t,i){if(i==="flex"){t.style.removeProperty("height");t.style.removeProperty("minHeight");t.style.removeProperty("maxHeight");t.style.flex="1 1 auto"}else{we(t,i)}}function we(t,i){i=ye(i);t.style.height=i.toString();t.style.maxHeight=i.toString();t.style.minHeight=i.toString()}function ye(t){if(typeof t==="number"){return t+"px"}return t}function me(t){return t instanceof Node||t instanceof HTMLElement}function Se(t){if(t==null){return[]}var i=[];je(t,(function(t){return i.push(t)}));return i}function Ce(t,i){if(!t){return}for(var n=0;n<t.length;n++){var r=t[n];i(r.name,r.value)}}function Oe(t,i,n){if(n==null){t.removeAttribute(i)}else{t.setAttribute(i,n.toString())}}function je(t,i){if(t==null){return}for(var n=0;n<t.length;n++){i(t[n])}}function Re(t,i){t.then((function(t){var n=t.getGui();if(n!=null){if(typeof n==="object"){i.appendChild(n)}else{i.innerHTML=n}}}))}var xe=Object.freeze({__proto__:null,radioCssClass:Er,FOCUSABLE_SELECTOR:Ir,FOCUSABLE_EXCLUDE:Nr,isFocusableFormField:Hr,setDisplayed:Lr,setVisible:Vr,setDisabled:Br,isElementChildOfClass:zr,getElementSize:Wr,getInnerHeight:Ur,getInnerWidth:Kr,getAbsoluteHeight:qr,getAbsoluteWidth:Yr,getElementRectWithOffset:Qr,isRtlNegativeScroll:Jr,getScrollLeft:Zr,setScrollLeft:$r,clearElement:Xr,removeElement:te,removeFromParent:ie,isVisible:ne,loadTemplate:re,appendHtml:ee,getElementAttribute:se,offsetHeight:oe,offsetWidth:ue,ensureDomOrder:ae,setDomChildOrder:fe,insertWithDomOrder:he,prependDC:ce,addStylesToElement:le,isHorizontalScrollShowing:ve,isVerticalScrollShowing:de,setElementWidth:pe,setFixedWidth:ge,setElementHeight:be,setFixedHeight:we,formatSize:ye,isNodeOrElement:me,copyNodeList:Se,iterateNamedNodeMap:Ce,addOrRemoveAttribute:Oe,nodeListForEach:je,bindCellRendererToHtmlElement:Re});var _e={columnGroupOpened:"expanded",columnGroupClosed:"contracted",columnSelectClosed:"tree-closed",columnSelectOpen:"tree-open",columnSelectIndeterminate:"tree-indeterminate",columnMovePin:"pin",columnMoveHide:"eye-slash",columnMoveMove:"arrows",columnMoveLeft:"left",columnMoveRight:"right",columnMoveGroup:"group",columnMoveValue:"aggregation",columnMovePivot:"pivot",dropNotAllowed:"not-allowed",groupContracted:"tree-closed",groupExpanded:"tree-open",setFilterGroupClosed:"tree-closed",setFilterGroupOpen:"tree-open",setFilterGroupIndeterminate:"tree-indeterminate",chart:"chart",close:"cross",cancel:"cancel",check:"tick",first:"first",previous:"previous",next:"next",last:"last",linked:"linked",unlinked:"unlinked",colorPicker:"color-picker",groupLoading:"loading",menu:"menu",filter:"filter",columns:"columns",maximize:"maximize",minimize:"minimize",menuPin:"pin",menuValue:"aggregation",menuAddRowGroup:"group",menuRemoveRowGroup:"group",clipboardCopy:"copy",clipboardCut:"cut",clipboardPaste:"paste",pivotPanel:"pivot",rowGroupPanel:"group",valuePanel:"aggregation",columnDrag:"grip",rowDrag:"grip",save:"save",csvExport:"csv",excelExport:"excel",smallDown:"small-down",smallLeft:"small-left",smallRight:"small-right",smallUp:"small-up",sortAscending:"asc",sortDescending:"desc",sortUnSort:"none",advancedFilterBuilder:"group",advancedFilterBuilderDrag:"grip",advancedFilterBuilderInvalid:"not-allowed",advancedFilterBuilderMoveUp:"up",advancedFilterBuilderMoveDown:"down",advancedFilterBuilderAdd:"plus",advancedFilterBuilderRemove:"minus"};function Ae(t,i,n){var r=Fe(t,i,n);if(r){var e=r.className;if(typeof e==="string"&&e.indexOf("ag-icon")>-1||typeof e==="object"&&e["ag-icon"]){return r}}var s=document.createElement("span");s.appendChild(r);return s}function Fe(t,i,n,r){var e=null;var s=n&&n.getColDef().icons;if(s){e=s[t]}if(i&&!e){var o=i.get("icons");if(o){e=o[t]}}if(e){var u=void 0;if(typeof e==="function"){u=e()}else if(typeof e==="string"){u=e}else{throw new Error("icon from grid options needs to be a string or a function")}if(typeof u==="string"){return re(u)}if(me(u)){return u}console.warn("AG Grid: iconRenderer should return back a string or a dom object")}else{var a=document.createElement("span");var f=_e[t];if(!f){if(!r){console.warn("AG Grid: Did not find icon "+t);f=""}else{f=t}}a.setAttribute("class","ag-icon ag-icon-"+f);a.setAttribute("unselectable","on");bn(a,"presentation");return a}}var ke=Object.freeze({__proto__:null,iconNameClassMap:_e,createIcon:Ae,createIconNoSpan:Fe});var Te=function(){function t(){}t.BACKSPACE="Backspace";t.TAB="Tab";t.ENTER="Enter";t.ESCAPE="Escape";t.SPACE=" ";t.LEFT="ArrowLeft";t.UP="ArrowUp";t.RIGHT="ArrowRight";t.DOWN="ArrowDown";t.DELETE="Delete";t.F2="F2";t.PAGE_UP="PageUp";t.PAGE_DOWN="PageDown";t.PAGE_HOME="Home";t.PAGE_END="End";t.A="KeyA";t.C="KeyC";t.D="KeyD";t.V="KeyV";t.X="KeyX";t.Y="KeyY";t.Z="KeyZ";return t}();var Me=65;var De=67;var Ge=86;var Pe=68;var Ee=90;var Ie=89;function Ne(t){if(t.altKey||t.ctrlKey||t.metaKey){return false}var i=t.key.length===1;return i}function He(t,i,n,r,e){var s=r?r.getColDef().suppressKeyboardEvent:undefined;if(!s){return false}var o={event:i,editing:e,column:r,api:t.api,node:n,data:n.data,colDef:r.getColDef(),context:t.context,columnApi:t.columnApi};if(s){var u=s(o);if(u){return true}}return false}function Le(t,n,r,e){var s=e.getDefinition();var o=s&&s.suppressHeaderKeyboardEvent;if(!i(o)){return false}var u={api:t.api,columnApi:t.columnApi,context:t.context,colDef:s,column:e,headerRowIndex:r,event:n};return!!o(u)}function Ve(t){var i=t.keyCode;var n;switch(i){case Me:n=Te.A;break;case De:n=Te.C;break;case Ge:n=Te.V;break;case Pe:n=Te.D;break;case Ee:n=Te.Z;break;case Ie:n=Te.Y;break;default:n=t.code}return n}function Be(t,i){if(i===void 0){i=false}if(t===Te.DELETE){return true}if(!i&&t===Te.BACKSPACE){return or()}return false}var ze=Object.freeze({__proto__:null,isEventFromPrintableCharacter:Ne,isUserSuppressingKeyboardEvent:He,isUserSuppressingHeaderKeyboardEvent:Le,normaliseQwertyAzerty:Ve,isDeleteKey:Be});function We(t,i,n){if(n===0){return false}var r=Math.abs(t.clientX-i.clientX);var e=Math.abs(t.clientY-i.clientY);return Math.max(r,e)<=n}var Ue=Object.freeze({__proto__:null,areEventsNear:We});function Ke(t,i){if(!t){return false}var n=function(t,n){var r=i[t.id];var e=i[n.id];var s=r!==undefined;var o=e!==undefined;var u=s&&o;var a=!s&&!o;if(u){return r-e}if(a){return t.__objectId-n.__objectId}if(s){return 1}return-1};var r;var e;var s=false;for(var o=0;o<t.length-1;o++){r=t[o];e=t[o+1];if(n(r,e)>0){s=true;break}}if(s){t.sort(n);return true}return false}function qe(t,i){var n=[];r(t);function r(t){if(!t){return}t.forEach((function(t){if(t.group||t.hasChildren()){n.push(t.key);var e=n.join("|");i(t,e);r(t.childrenAfterGroup);n.pop()}}))}}var Ye=Object.freeze({__proto__:null,sortRowNodesByOrder:Ke,traverseNodesWithKey:qe});function Qe(t){var i=new Set;t.forEach((function(t){return i.add(t)}));return i}var Je=Object.freeze({__proto__:null,convertToSet:Qe});var Ze=function(){Ze=Object.assign||function(t){for(var i,n=1,r=arguments.length;n<r;n++){i=arguments[n];for(var e in i)if(Object.prototype.hasOwnProperty.call(i,e))t[e]=i[e]}return t};return Ze.apply(this,arguments)};var $e=Ze(Ze(Ze(Ze(Ze(Ze(Ze(Ze(Ze(Ze(Ze(Ze(Ze(Ze(Ze(Ze(Ze(Ze({},qn),zt),gr),Mr),xe),ii),Q),Li),l),ke),ze),_i),Ue),xr),D),Ye),Je),Oi);var Xe=$e;var ts=function(){function t(t,i){if(t===void 0){t=0}if(i===void 0){i=1}this.nextValue=t;this.step=i}t.prototype.next=function(){var t=this.nextValue;this.nextValue+=this.step;return t};t.prototype.peek=function(){return this.nextValue};t.prototype.skip=function(t){this.nextValue+=t};return t}();var is;(function(t){t[t["IN_PROGRESS"]=0]="IN_PROGRESS";t[t["RESOLVED"]=1]="RESOLVED"})(is||(is={}));var ns=function(){function t(t){var i=this;this.status=is.IN_PROGRESS;this.resolution=null;this.waiters=[];t((function(t){return i.onDone(t)}),(function(t){return i.onReject(t)}))}t.all=function(i){return new t((function(t){var n=i.length;var r=new Array(n);i.forEach((function(i,e){i.then((function(i){r[e]=i;n--;if(n===0){t(r)}}))}))}))};t.resolve=function(i){if(i===void 0){i=null}return new t((function(t){return t(i)}))};t.prototype.then=function(i){var n=this;return new t((function(t){if(n.status===is.RESOLVED){t(i(n.resolution))}else{n.waiters.push((function(n){return t(i(n))}))}}))};t.prototype.resolveNow=function(t,i){return this.status===is.RESOLVED?i(this.resolution):t};t.prototype.onDone=function(t){this.status=is.RESOLVED;this.resolution=t;this.waiters.forEach((function(i){return i(t)}))};t.prototype.onReject=function(t){console.warn("TBI")};return t}();var rs=function(){var t=function(i,n){t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var n in i)if(Object.prototype.hasOwnProperty.call(i,n))t[n]=i[n]};return t(i,n)};return function(i,n){if(typeof n!=="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(i,n);function r(){this.constructor=i}i.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}();var es=function(){es=Object.assign||function(t){for(var i,n=1,r=arguments.length;n<r;n++){i=arguments[n];for(var e in i)if(Object.prototype.hasOwnProperty.call(i,e))t[e]=i[e]}return t};return es.apply(this,arguments)};var ss=function(t,i,n,r){var e=arguments.length,s=e<3?i:r===null?r=Object.getOwnPropertyDescriptor(i,n):r,o;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")s=Reflect.decorate(t,i,n,r);else for(var u=t.length-1;u>=0;u--)if(o=t[u])s=(e<3?o(s):e>3?o(i,n,s):o(i,n))||s;return e>3&&s&&Object.defineProperty(i,n,s),s};var os;(function(t){t[t["NOTHING"]=0]="NOTHING";t[t["WAITING_TO_SHOW"]=1]="WAITING_TO_SHOW";t[t["SHOWING"]=2]="SHOWING"})(os||(os={}));var us;(function(t){t[t["HOVER"]=0]="HOVER";t[t["FOCUS"]=1]="FOCUS"})(us||(us={}));var as=function(t){rs(n,t);function n(i,n,r){var e=t.call(this)||this;e.parentComp=i;e.tooltipShowDelayOverride=n;e.tooltipHideDelayOverride=r;e.DEFAULT_SHOW_TOOLTIP_DELAY=2e3;e.DEFAULT_HIDE_TOOLTIP_DELAY=1e4;e.SHOW_QUICK_TOOLTIP_DIFF=1e3;e.FADE_OUT_TOOLTIP_TIMEOUT=1e3;e.INTERACTIVE_HIDE_DELAY=100;e.interactionEnabled=false;e.isInteractingWithTooltip=false;e.state=os.NOTHING;e.tooltipInstanceCount=0;e.tooltipMouseTrack=false;return e}n.prototype.postConstruct=function(){if(this.gridOptionsService.is("tooltipInteraction")){this.interactionEnabled=true}this.tooltipTrigger=this.getTooltipTrigger();this.tooltipShowDelay=this.getTooltipDelay("show");this.tooltipHideDelay=this.getTooltipDelay("hide");this.tooltipMouseTrack=this.gridOptionsService.is("tooltipMouseTrack");var t=this.parentComp.getGui();if(this.tooltipTrigger===us.HOVER){this.addManagedListener(t,"mouseenter",this.onMouseEnter.bind(this));this.addManagedListener(t,"mouseleave",this.onMouseLeave.bind(this))}if(this.tooltipTrigger===us.FOCUS){this.addManagedListener(t,"focusin",this.onFocusIn.bind(this));this.addManagedListener(t,"focusout",this.onFocusOut.bind(this))}this.addManagedListener(t,"mousemove",this.onMouseMove.bind(this));if(!this.interactionEnabled){this.addManagedListener(t,"mousedown",this.onMouseDown.bind(this));this.addManagedListener(t,"keydown",this.onKeyDown.bind(this))}};n.prototype.getGridOptionsTooltipDelay=function(t){var n=this.gridOptionsService.getNum(t);if(i(n)){if(n<0){P((function(){return console.warn("AG Grid: "+t+" should not be lower than 0")}),t+"Warn")}return Math.max(200,n)}return undefined};n.prototype.getTooltipDelay=function(t){var i,n,r,e;if(t==="show"){return(n=(i=this.getGridOptionsTooltipDelay("tooltipShowDelay"))!==null&&i!==void 0?i:this.tooltipShowDelayOverride)!==null&&n!==void 0?n:this.DEFAULT_SHOW_TOOLTIP_DELAY}else{return(e=(r=this.getGridOptionsTooltipDelay("tooltipHideDelay"))!==null&&r!==void 0?r:this.tooltipHideDelayOverride)!==null&&e!==void 0?e:this.DEFAULT_HIDE_TOOLTIP_DELAY}};n.prototype.destroy=function(){this.setToDoNothing();t.prototype.destroy.call(this)};n.prototype.getTooltipTrigger=function(){var t=this.gridOptionsService.get("tooltipTrigger");if(!t||t==="hover"){return us.HOVER}return us.FOCUS};n.prototype.onMouseEnter=function(t){var i=this;if(this.interactionEnabled&&this.interactiveTooltipTimeoutId){this.unlockService();this.startHideTimeout()}if(ur()){return}if(n.isLocked){this.showTooltipTimeoutId=window.setTimeout((function(){i.prepareToShowTooltip(t)}),this.INTERACTIVE_HIDE_DELAY)}else{this.prepareToShowTooltip(t)}};n.prototype.onMouseMove=function(t){if(this.lastMouseEvent){this.lastMouseEvent=t}if(this.tooltipMouseTrack&&this.state===os.SHOWING&&this.tooltipComp){this.positionTooltip()}};n.prototype.onMouseDown=function(){this.setToDoNothing()};n.prototype.onMouseLeave=function(){if(this.interactionEnabled){this.lockService()}else{this.setToDoNothing()}};n.prototype.onFocusIn=function(){this.prepareToShowTooltip()};n.prototype.onFocusOut=function(t){var i;var n=t.relatedTarget;var r=this.parentComp.getGui();var e=(i=this.tooltipComp)===null||i===void 0?void 0:i.getGui();if(this.isInteractingWithTooltip||r.contains(n)||this.interactionEnabled&&(e===null||e===void 0?void 0:e.contains(n))){return}this.setToDoNothing()};n.prototype.onKeyDown=function(){this.setToDoNothing()};n.prototype.prepareToShowTooltip=function(t){if(this.state!=os.NOTHING||n.isLocked){return false}var i=0;if(t){i=this.isLastTooltipHiddenRecently()?200:this.tooltipShowDelay}this.lastMouseEvent=t||null;this.showTooltipTimeoutId=window.setTimeout(this.showTooltip.bind(this),i);this.state=os.WAITING_TO_SHOW;return true};n.prototype.isLastTooltipHiddenRecently=function(){var t=(new Date).getTime();var i=n.lastTooltipHideTime;return t-i<this.SHOW_QUICK_TOOLTIP_DIFF};n.prototype.setToDoNothing=function(){if(this.state===os.SHOWING){this.hideTooltip()}if(this.onBodyScrollEventCallback){this.onBodyScrollEventCallback();this.onBodyScrollEventCallback=undefined}if(this.onColumnMovedEventCallback){this.onColumnMovedEventCallback();this.onColumnMovedEventCallback=undefined}this.clearTimeouts();this.state=os.NOTHING;this.lastMouseEvent=null};n.prototype.showTooltip=function(){var t=es({},this.parentComp.getTooltipParams());if(!i(t.value)){this.setToDoNothing();return}this.state=os.SHOWING;this.tooltipInstanceCount++;var n=this.newTooltipComponentCallback.bind(this,this.tooltipInstanceCount);var r=this.userComponentFactory.getTooltipCompDetails(t);r.newAgStackInstance().then(n)};n.prototype.hideTooltip=function(t){if(!t&&this.isInteractingWithTooltip){return}if(this.tooltipComp){this.destroyTooltipComp();n.lastTooltipHideTime=(new Date).getTime()}var i={type:hi.EVENT_TOOLTIP_HIDE,parentGui:this.parentComp.getGui()};this.eventService.dispatchEvent(i);this.state=os.NOTHING};n.prototype.newTooltipComponentCallback=function(t,i){var n=this.state!==os.SHOWING||this.tooltipInstanceCount!==t;if(n){this.getContext().destroyBean(i);return}var r=i.getGui();this.tooltipComp=i;if(!r.classList.contains("ag-tooltip")){r.classList.add("ag-tooltip-custom")}if(this.tooltipTrigger===us.HOVER){r.classList.add("ag-tooltip-animate")}if(this.interactionEnabled){r.classList.add("ag-tooltip-interactive")}var e=this.localeService.getLocaleTextFunc();var s=this.popupService.addPopup({eChild:r,ariaLabel:e("ariaLabelTooltip","Tooltip")});if(s){this.tooltipPopupDestroyFunc=s.hideFunc}this.positionTooltip();if(this.tooltipTrigger===us.FOCUS){this.onBodyScrollEventCallback=this.addManagedListener(this.eventService,hi.EVENT_BODY_SCROLL,this.setToDoNothing.bind(this));this.onColumnMovedEventCallback=this.addManagedListener(this.eventService,hi.EVENT_COLUMN_MOVED,this.setToDoNothing.bind(this))}if(this.interactionEnabled){if(this.tooltipTrigger===us.HOVER){this.tooltipMouseEnterListener=this.addManagedListener(r,"mouseenter",this.onTooltipMouseEnter.bind(this))||null;this.tooltipMouseLeaveListener=this.addManagedListener(r,"mouseleave",this.onTooltipMouseLeave.bind(this))||null}else{this.tooltipFocusInListener=this.addManagedListener(r,"focusin",this.onTooltipFocusIn.bind(this))||null;this.tooltipFocusOutListener=this.addManagedListener(r,"focusout",this.onTooltipFocusOut.bind(this))||null}}var o={type:hi.EVENT_TOOLTIP_SHOW,tooltipGui:r,parentGui:this.parentComp.getGui()};this.eventService.dispatchEvent(o);this.startHideTimeout()};n.prototype.onTooltipMouseEnter=function(){this.isInteractingWithTooltip=true;this.unlockService()};n.prototype.onTooltipMouseLeave=function(){this.isInteractingWithTooltip=false;this.lockService()};n.prototype.onTooltipFocusIn=function(){this.isInteractingWithTooltip=true};n.prototype.onTooltipFocusOut=function(t){var i;var n=this.parentComp.getGui();var r=(i=this.tooltipComp)===null||i===void 0?void 0:i.getGui();var e=t.relatedTarget;if(r===null||r===void 0?void 0:r.contains(e)){return}this.isInteractingWithTooltip=false;if(n.contains(e)){this.startHideTimeout()}else{this.hideTooltip()}};n.prototype.positionTooltip=function(){var t={type:"tooltip",ePopup:this.tooltipComp.getGui(),nudgeY:18,skipObserver:this.tooltipMouseTrack};if(this.lastMouseEvent){this.popupService.positionPopupUnderMouseEvent(es(es({},t),{mouseEvent:this.lastMouseEvent}))}else{this.popupService.positionPopupByComponent(es(es({},t),{eventSource:this.parentComp.getGui(),position:"under",keepWithinBounds:true,nudgeY:5}))}};n.prototype.destroyTooltipComp=function(){var t=this;this.tooltipComp.getGui().classList.add("ag-tooltip-hiding");var i=this.tooltipPopupDestroyFunc;var n=this.tooltipComp;var r=this.tooltipTrigger===us.HOVER?this.FADE_OUT_TOOLTIP_TIMEOUT:0;window.setTimeout((function(){i();t.getContext().destroyBean(n)}),r);this.clearTooltipListeners();this.tooltipPopupDestroyFunc=undefined;this.tooltipComp=undefined};n.prototype.clearTooltipListeners=function(){[this.tooltipMouseEnterListener,this.tooltipMouseLeaveListener,this.tooltipFocusInListener,this.tooltipFocusOutListener].forEach((function(t){if(t){t()}}));this.tooltipMouseEnterListener=this.tooltipMouseLeaveListener=this.tooltipFocusInListener=this.tooltipFocusOutListener=null};n.prototype.lockService=function(){var t=this;n.isLocked=true;this.interactiveTooltipTimeoutId=window.setTimeout((function(){t.unlockService();t.setToDoNothing()}),this.INTERACTIVE_HIDE_DELAY)};n.prototype.unlockService=function(){n.isLocked=false;this.clearInteractiveTimeout()};n.prototype.startHideTimeout=function(){this.clearHideTimeout();this.hideTooltipTimeoutId=window.setTimeout(this.hideTooltip.bind(this),this.tooltipHideDelay)};n.prototype.clearShowTimeout=function(){if(!this.showTooltipTimeoutId){return}window.clearTimeout(this.showTooltipTimeoutId);this.showTooltipTimeoutId=undefined};n.prototype.clearHideTimeout=function(){if(!this.hideTooltipTimeoutId){return}window.clearTimeout(this.hideTooltipTimeoutId);this.hideTooltipTimeoutId=undefined};n.prototype.clearInteractiveTimeout=function(){if(!this.interactiveTooltipTimeoutId){return}window.clearTimeout(this.interactiveTooltipTimeoutId);this.interactiveTooltipTimeoutId=undefined};n.prototype.clearTimeouts=function(){this.clearShowTimeout();this.clearHideTimeout();this.clearInteractiveTimeout()};n.isLocked=false;ss([ut("popupService")],n.prototype,"popupService",void 0);ss([ut("userComponentFactory")],n.prototype,"userComponentFactory",void 0);ss([et],n.prototype,"postConstruct",null);return n}(ri);var fs=function(){function t(t){this.cssClassStates={};this.getGui=t}t.prototype.addCssClass=function(t){var i=this;var n=(t||"").split(" ");if(n.length>1){n.forEach((function(t){return i.addCssClass(t)}));return}var r=this.cssClassStates[t]!==true;if(r&&t.length){var e=this.getGui();if(e){e.classList.add(t)}this.cssClassStates[t]=true}};t.prototype.removeCssClass=function(t){var i=this;var n=(t||"").split(" ");if(n.length>1){n.forEach((function(t){return i.removeCssClass(t)}));return}var r=this.cssClassStates[t]!==false;if(r&&t.length){var e=this.getGui();if(e){e.classList.remove(t)}this.cssClassStates[t]=false}};t.prototype.containsCssClass=function(t){var i=this.getGui();if(!i){return false}return i.classList.contains(t)};t.prototype.addOrRemoveCssClass=function(t,i){var n=this;if(!t){return}if(t.indexOf(" ")>=0){var r=(t||"").split(" ");if(r.length>1){r.forEach((function(t){return n.addOrRemoveCssClass(t,i)}));return}}var e=this.cssClassStates[t]!==i;if(e&&t.length){var s=this.getGui();if(s){s.classList.toggle(t,i)}this.cssClassStates[t]=i}};return t}();var hs=function(){var t=function(i,n){t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var n in i)if(Object.prototype.hasOwnProperty.call(i,n))t[n]=i[n]};return t(i,n)};return function(i,n){if(typeof n!=="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(i,n);function r(){this.constructor=i}i.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}();var cs=function(t,i,n,r){var e=arguments.length,s=e<3?i:r===null?r=Object.getOwnPropertyDescriptor(i,n):r,o;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")s=Reflect.decorate(t,i,n,r);else for(var u=t.length-1;u>=0;u--)if(o=t[u])s=(e<3?o(s):e>3?o(i,n,s):o(i,n))||s;return e>3&&s&&Object.defineProperty(i,n,s),s};var ls=new ts;var vs=function(t){hs(i,t);function i(i){var n=t.call(this)||this;n.displayed=true;n.visible=true;n.compId=ls.next();n.cssClassManager=new fs((function(){return n.eGui}));if(i){n.setTemplate(i)}return n}i.prototype.preConstructOnComponent=function(){this.usingBrowserTooltips=this.gridOptionsService.is("enableBrowserTooltips")};i.prototype.getCompId=function(){return this.compId};i.prototype.getTooltipParams=function(){return{value:this.tooltipText,location:"UNKNOWN"}};i.prototype.setTooltip=function(t,i,n){var r=this;var e=function(){if(r.usingBrowserTooltips){r.getGui().removeAttribute("title")}else{r.tooltipFeature=r.destroyBean(r.tooltipFeature)}};var s=function(){if(r.usingBrowserTooltips){r.getGui().setAttribute("title",r.tooltipText)}else{r.tooltipFeature=r.createBean(new as(r,i,n))}};if(this.tooltipText!=t){if(this.tooltipText){e()}if(t!=null){this.tooltipText=t;if(this.tooltipText){s()}}}};i.prototype.createChildComponentsFromTags=function(t,i){var n=this;var r=Se(t.childNodes);r.forEach((function(r){if(!(r instanceof HTMLElement)){return}var e=n.createComponentFromElement(r,(function(t){var i=t.getGui();if(i){n.copyAttributesFromNode(r,t.getGui())}}),i);if(e){if(e.addItems&&r.children.length){n.createChildComponentsFromTags(r,i);var s=Array.prototype.slice.call(r.children);e.addItems(s)}n.swapComponentForNode(e,t,r)}else if(r.childNodes){n.createChildComponentsFromTags(r,i)}}))};i.prototype.createComponentFromElement=function(t,n,r){var e=t.nodeName;var s=r?r[t.getAttribute("ref")]:undefined;var o=this.agStackComponentsRegistry.getComponentClass(e);if(o){i.elementGettingCreated=t;var u=new o(s);u.setParentComponent(this);this.createBean(u,null,n);return u}return null};i.prototype.copyAttributesFromNode=function(t,i){Ce(t.attributes,(function(t,n){return i.setAttribute(t,n)}))};i.prototype.swapComponentForNode=function(t,i,n){var r=t.getGui();i.replaceChild(r,n);i.insertBefore(document.createComment(n.nodeName),r);this.addDestroyFunc(this.destroyBean.bind(this,t));this.swapInComponentForQuerySelectors(t,n)};i.prototype.swapInComponentForQuerySelectors=function(t,i){var n=this;this.iterateOverQuerySelectors((function(r){if(n[r.attributeName]===i){n[r.attributeName]=t}}))};i.prototype.iterateOverQuerySelectors=function(t){var i=Object.getPrototypeOf(this);while(i!=null){var n=i.__agComponentMetaData;var r=E(i.constructor);if(n&&n[r]&&n[r].querySelectors){n[r].querySelectors.forEach((function(i){return t(i)}))}i=Object.getPrototypeOf(i)}};i.prototype.activateTabIndex=function(t){var i=this.gridOptionsService.getNum("tabIndex")||0;if(!t){t=[]}if(!t.length){t.push(this.getGui())}t.forEach((function(t){return t.setAttribute("tabindex",i.toString())}))};i.prototype.setTemplate=function(t,i){var n=re(t);this.setTemplateFromElement(n,i)};i.prototype.setTemplateFromElement=function(t,i){this.eGui=t;this.eGui.__agComponent=this;this.wireQuerySelectors();if(!!this.getContext()){this.createChildComponentsFromTags(this.getGui(),i)}};i.prototype.createChildComponentsPreConstruct=function(){if(!!this.getGui()){this.createChildComponentsFromTags(this.getGui())}};i.prototype.wireQuerySelectors=function(){var t=this;if(!this.eGui){return}var i=this;this.iterateOverQuerySelectors((function(n){var r=function(t){return i[n.attributeName]=t};var e=n.refSelector&&t.getAttribute("ref")===n.refSelector;if(e){r(t.eGui)}else{var s=t.eGui.querySelector(n.querySelector);if(s){r(s.__agComponent||s)}}}))};i.prototype.getGui=function(){return this.eGui};i.prototype.getFocusableElement=function(){return this.eGui};i.prototype.getAriaElement=function(){return this.getFocusableElement()};i.prototype.setParentComponent=function(t){this.parentComponent=t};i.prototype.getParentComponent=function(){return this.parentComponent};i.prototype.setGui=function(t){this.eGui=t};i.prototype.queryForHtmlElement=function(t){return this.eGui.querySelector(t)};i.prototype.queryForHtmlInputElement=function(t){return this.eGui.querySelector(t)};i.prototype.appendChild=function(t,i){if(t==null){return}if(!i){i=this.eGui}if(me(t)){i.appendChild(t)}else{var n=t;i.appendChild(n.getGui())}};i.prototype.isDisplayed=function(){return this.displayed};i.prototype.setVisible=function(t,i){if(i===void 0){i={}}if(t!==this.visible){this.visible=t;var n=i.skipAriaHidden;Vr(this.eGui,t,{skipAriaHidden:n})}};i.prototype.setDisplayed=function(t,n){if(n===void 0){n={}}if(t!==this.displayed){this.displayed=t;var r=n.skipAriaHidden;Lr(this.eGui,t,{skipAriaHidden:r});var e={type:i.EVENT_DISPLAYED_CHANGED,visible:this.displayed};this.dispatchEvent(e)}};i.prototype.destroy=function(){if(this.tooltipFeature){this.tooltipFeature=this.destroyBean(this.tooltipFeature)}if(this.parentComponent){this.parentComponent=undefined}var i=this.eGui;if(i&&i.__agComponent){i.__agComponent=undefined}t.prototype.destroy.call(this)};i.prototype.addGuiEventListener=function(t,i,n){var r=this;this.eGui.addEventListener(t,i,n);this.addDestroyFunc((function(){return r.eGui.removeEventListener(t,i)}))};i.prototype.addCssClass=function(t){this.cssClassManager.addCssClass(t)};i.prototype.removeCssClass=function(t){this.cssClassManager.removeCssClass(t)};i.prototype.containsCssClass=function(t){return this.cssClassManager.containsCssClass(t)};i.prototype.addOrRemoveCssClass=function(t,i){this.cssClassManager.addOrRemoveCssClass(t,i)};i.prototype.getAttribute=function(t){var i=this.eGui;return i?i.getAttribute(t):null};i.prototype.getRefElement=function(t){return this.queryForHtmlElement('[ref="'+t+'"]')};i.EVENT_DISPLAYED_CHANGED="displayedChanged";cs([ut("agStackComponentsRegistry")],i.prototype,"agStackComponentsRegistry",void 0);cs([rt],i.prototype,"preConstructOnComponent",null);cs([rt],i.prototype,"createChildComponentsPreConstruct",null);return i}(ri);function ds(t){return ps.bind(this,"[ref="+t+"]",t)}function ps(t,i,n,r,e){if(t===null){console.error("AG Grid: QuerySelector selector should not be null");return}if(typeof e==="number"){console.error("AG Grid: QuerySelector should be on an attribute");return}gs(n,"querySelectors",{attributeName:r,querySelector:t,refSelector:i})}function gs(t,i,n){var r=bs(t,E(t.constructor));if(!r[i]){r[i]=[]}r[i].push(n)}function bs(t,i){if(!t.__agComponentMetaData){t.__agComponentMetaData={}}if(!t.__agComponentMetaData[i]){t.__agComponentMetaData[i]={}}return t.__agComponentMetaData[i]}var ws=function(){var t=function(i,n){t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var n in i)if(Object.prototype.hasOwnProperty.call(i,n))t[n]=i[n]};return t(i,n)};return function(i,n){if(typeof n!=="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(i,n);function r(){this.constructor=i}i.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}();var ys=function(t,i,n,r){var e=arguments.length,s=e<3?i:r===null?r=Object.getOwnPropertyDescriptor(i,n):r,o;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")s=Reflect.decorate(t,i,n,r);else for(var u=t.length-1;u>=0;u--)if(o=t[u])s=(e<3?o(s):e>3?o(i,n,s):o(i,n))||s;return e>3&&s&&Object.defineProperty(i,n,s),s};var ms=function(t){ws(i,t);function i(){return t.call(this,'\n <div class="ag-floating-filter-input" role="presentation">\n <ag-input-text-field ref="eFloatingFilterText"></ag-input-text-field>\n </div>')||this}i.prototype.destroy=function(){t.prototype.destroy.call(this)};i.prototype.init=function(t){this.params=t;var i=this.columnModel.getDisplayNameForColumn(t.column,"header",true);var n=this.localeService.getLocaleTextFunc();this.eFloatingFilterText.setDisabled(true).setInputAriaLabel(i+" "+n("ariaFilterInput","Filter Input"))};i.prototype.onParentModelChanged=function(t){var i=this;if(!t){this.eFloatingFilterText.setValue("");return}this.params.parentFilterInstance((function(n){if(n.getModelAsString){var r=n.getModelAsString(t);i.eFloatingFilterText.setValue(r)}}))};i.prototype.onParamsUpdated=function(t){this.init(t)};ys([ds("eFloatingFilterText")],i.prototype,"eFloatingFilterText",void 0);ys([ut("columnModel")],i.prototype,"columnModel",void 0);return i}(vs);var Ss=function(){function t(t,i,n,r){var e=this;this.alive=true;this.context=t;this.eParent=r;var s=i.getDateCompDetails(n);var o=s.newAgStackInstance();o.then((function(i){if(!e.alive){t.destroyBean(i);return}e.dateComp=i;if(!i){return}r.appendChild(i.getGui());if(i.afterGuiAttached){i.afterGuiAttached()}if(e.tempValue){i.setDate(e.tempValue)}if(e.disabled!=null){e.setDateCompDisabled(e.disabled)}}))}t.prototype.destroy=function(){this.alive=false;this.dateComp=this.context.destroyBean(this.dateComp)};t.prototype.getDate=function(){return this.dateComp?this.dateComp.getDate():this.tempValue};t.prototype.setDate=function(t){if(this.dateComp){this.dateComp.setDate(t)}else{this.tempValue=t}};t.prototype.setDisabled=function(t){if(this.dateComp){this.setDateCompDisabled(t)}else{this.disabled=t}};t.prototype.setDisplayed=function(t){Lr(this.eParent,t)};t.prototype.setInputPlaceholder=function(t){if(this.dateComp&&this.dateComp.setInputPlaceholder){this.dateComp.setInputPlaceholder(t)}};t.prototype.setInputAriaLabel=function(t){if(this.dateComp&&this.dateComp.setInputAriaLabel){this.dateComp.setInputAriaLabel(t)}};t.prototype.afterGuiAttached=function(t){if(this.dateComp&&typeof this.dateComp.afterGuiAttached==="function"){this.dateComp.afterGuiAttached(t)}};t.prototype.updateParams=function(t){var i;if(((i=this.dateComp)===null||i===void 0?void 0:i.onParamsUpdated)&&typeof this.dateComp.onParamsUpdated==="function"){this.dateComp.onParamsUpdated(t)}};t.prototype.setDateCompDisabled=function(t){if(this.dateComp==null){return}if(this.dateComp.setDisabled==null){return}this.dateComp.setDisabled(t)};return t}();var Cs=function(){function t(){this.customFilterOptions={}}t.prototype.init=function(t,i){this.filterOptions=t.filterOptions||i;this.mapCustomOptions();this.selectDefaultItem(t)};t.prototype.getFilterOptions=function(){return this.filterOptions};t.prototype.mapCustomOptions=function(){var t=this;if(!this.filterOptions){return}this.filterOptions.forEach((function(i){if(typeof i==="string"){return}var n=[["displayKey"],["displayName"],["predicate","test"]];var r=function(t){if(!t.some((function(t){return i[t]!=null}))){console.warn("AG Grid: ignoring FilterOptionDef as it doesn't contain one of '"+t+"'");return false}return true};if(!n.every(r)){t.filterOptions=t.filterOptions.filter((function(t){return t===i}))||[];return}t.customFilterOptions[i.displayKey]=i}))};t.prototype.selectDefaultItem=function(t){if(t.defaultOption){this.defaultOption=t.defaultOption}else if(this.filterOptions.length>=1){var i=this.filterOptions[0];if(typeof i==="string"){this.defaultOption=i}else if(i.displayKey){this.defaultOption=i.displayKey}else{console.warn("AG Grid: invalid FilterOptionDef supplied as it doesn't contain a 'displayKey'")}}else{console.warn("AG Grid: no filter options for filter")}};t.prototype.getDefaultOption=function(){return this.defaultOption};t.prototype.getCustomOption=function(t){return this.customFilterOptions[t]};return t}();var Os={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"};var js=function(){var t=function(i,n){t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var n in i)if(Object.prototype.hasOwnProperty.call(i,n))t[n]=i[n]};return t(i,n)};return function(i,n){if(typeof n!=="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(i,n);function r(){this.constructor=i}i.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}();var Rs=function(){Rs=Object.assign||function(t){for(var i,n=1,r=arguments.length;n<r;n++){i=arguments[n];for(var e in i)if(Object.prototype.hasOwnProperty.call(i,e))t[e]=i[e]}return t};return Rs.apply(this,arguments)};var xs=function(t,i,n,r){var e=arguments.length,s=e<3?i:r===null?r=Object.getOwnPropertyDescriptor(i,n):r,o;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")s=Reflect.decorate(t,i,n,r);else for(var u=t.length-1;u>=0;u--)if(o=t[u])s=(e<3?o(s):e>3?o(i,n,s):o(i,n))||s;return e>3&&s&&Object.defineProperty(i,n,s),s};var _s=function(t){js(i,t);function i(i,n){if(n===void 0){n={}}var r=t.call(this)||this;r.eFocusableElement=i;r.callbacks=n;r.callbacks=Rs({shouldStopEventPropagation:function(){return false},onTabKeyDown:function(t){if(t.defaultPrevented){return}var i=r.focusService.findNextFocusableElement(r.eFocusableElement,false,t.shiftKey);if(!i){return}i.focus();t.preventDefault()}},n);return r}i.prototype.postConstruct=function(){this.eFocusableElement.classList.add(i.FOCUS_MANAGED_CLASS);this.addKeyDownListeners(this.eFocusableElement);if(this.callbacks.onFocusIn){this.addManagedListener(this.eFocusableElement,"focusin",this.callbacks.onFocusIn)}if(this.callbacks.onFocusOut){this.addManagedListener(this.eFocusableElement,"focusout",this.callbacks.onFocusOut)}};i.prototype.addKeyDownListeners=function(t){var i=this;this.addManagedListener(t,"keydown",(function(t){if(t.defaultPrevented||Yt(t)){return}if(i.callbacks.shouldStopEventPropagation(t)){qt(t);return}if(t.key===Te.TAB){i.callbacks.onTabKeyDown(t)}else if(i.callbacks.handleKeyDown){i.callbacks.handleKeyDown(t)}}))};i.FOCUS_MANAGED_CLASS="ag-focus-managed";xs([ut("focusService")],i.prototype,"focusService",void 0);xs([et],i.prototype,"postConstruct",null);return i}(ri);var As=function(){var t=function(i,n){t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var n in i)if(Object.prototype.hasOwnProperty.call(i,n))t[n]=i[n]};return t(i,n)};return function(i,n){if(typeof n!=="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(i,n);function r(){this.constructor=i}i.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}();var Fs=function(t,i,n,r){var e=arguments.length,s=e<3?i:r===null?r=Object.getOwnPropertyDescriptor(i,n):r,o;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")s=Reflect.decorate(t,i,n,r);else for(var u=t.length-1;u>=0;u--)if(o=t[u])s=(e<3?o(s):e>3?o(i,n,s):o(i,n))||s;return e>3&&s&&Object.defineProperty(i,n,s),s};var ks="ag-resizer-wrapper";var Ts='<div class="'+ks+'">\n <div ref="eTopLeftResizer" class="ag-resizer ag-resizer-topLeft"></div>\n <div ref="eTopResizer" class="ag-resizer ag-resizer-top"></div>\n <div ref="eTopRightResizer" class="ag-resizer ag-resizer-topRight"></div>\n <div ref="eRightResizer" class="ag-resizer ag-resizer-right"></div>\n <div ref="eBottomRightResizer" class="ag-resizer ag-resizer-bottomRight"></div>\n <div ref="eBottomResizer" class="ag-resizer ag-resizer-bottom"></div>\n <div ref="eBottomLeftResizer" class="ag-resizer ag-resizer-bottomLeft"></div>\n <div ref="eLeftResizer" class="ag-resizer ag-resizer-left"></div>\n </div>';var Ms=function(t){As(i,t);function i(i,n){var r=t.call(this)||this;r.element=i;r.dragStartPosition={x:0,y:0};r.position={x:0,y:0};r.lastSize={width:-1,height:-1};r.positioned=false;r.resizersAdded=false;r.resizeListeners=[];r.boundaryEl=null;r.isResizing=false;r.isMoving=false;r.resizable={};r.movable=false;r.currentResizer=null;r.config=Object.assign({},{popup:false},n);return r}i.prototype.center=function(){var t=this.offsetParent,i=t.clientHeight,n=t.clientWidth;var r=n/2-this.getWidth()/2;var e=i/2-this.getHeight()/2;this.offsetElement(r,e)};i.prototype.initialisePosition=function(){if(this.positioned){return}var t=this.config,i=t.centered,n=t.forcePopupParentAsOffsetParent,r=t.minWidth,e=t.width,s=t.minHeight,o=t.height,u=t.x,a=t.y;if(!this.offsetParent){this.setOffsetParent()}var f=0;var h=0;var c=!!this.element.offsetParent;if(c){var l=this.findBoundaryElement();var v=window.getComputedStyle(l);if(v.minWidth!=null){var d=l.offsetWidth-this.element.offsetWidth;h=parseInt(v.minWidth,10)-d}if(v.minHeight!=null){var p=l.offsetHeight-this.element.offsetHeight;f=parseInt(v.minHeight,10)-p}}this.minHeight=s||f;this.minWidth=r||h;if(e){this.setWidth(e)}if(o){this.setHeight(o)}if(!e||!o){this.refreshSize()}if(i){this.center()}else if(u||a){this.offsetElement(u,a)}else if(c&&n){var l=this.boundaryEl;var g=true;if(!l){l=this.findBoundaryElement();g=false}if(l){var b=parseFloat(l.style.top);var w=parseFloat(l.style.left);if(g){this.offsetElement(isNaN(w)?0:w,isNaN(b)?0:b)}else{this.setPosition(w,b)}}}this.positioned=!!this.offsetParent};i.prototype.isPositioned=function(){return this.positioned};i.prototype.getPosition=function(){return this.position};i.prototype.setMovable=function(t,i){if(!this.config.popup||t===this.movable){return}this.movable=t;var n=this.moveElementDragListener||{eElement:i,onDragStart:this.onMoveStart.bind(this),onDragging:this.onMove.bind(this),onDragStop:this.onMoveEnd.bind(this)};if(t){this.dragService.addDragSource(n);this.moveElementDragListener=n}else{this.dragService.removeDragSource(n);this.moveElementDragListener=undefined}};i.prototype.setResizable=function(t){var i=this;this.clearResizeListeners();if(t){this.addResizers()}else{this.removeResizers()}if(typeof t==="boolean"){if(t===false){return}t={topLeft:t,top:t,topRight:t,right:t,bottomRight:t,bottom:t,bottomLeft:t,left:t}}Object.keys(t).forEach((function(n){var r=t;var e=!!r[n];var s=i.getResizerElement(n);var o={dragStartPixels:0,eElement:s,onDragStart:function(t){return i.onResizeStart(t,n)},onDragging:i.onResize.bind(i),onDragStop:function(t){return i.onResizeEnd(t,n)}};if(e||!i.isAlive()&&!e){if(e){i.dragService.addDragSource(o);i.resizeListeners.push(o);s.style.pointerEvents="all"}else{s.style.pointerEvents="none"}i.resizable[n]=e}}))};i.prototype.removeSizeFromEl=function(){this.element.style.removeProperty("height");this.element.style.removeProperty("width");this.element.style.removeProperty("flex")};i.prototype.restoreLastSize=function(){this.element.style.flex="0 0 auto";var t=this.lastSize,i=t.height,n=t.width;if(n!==-1){this.element.style.width=n+"px"}if(i!==-1){this.element.style.height=i+"px"}};i.prototype.getHeight=function(){return this.element.offsetHeight};i.prototype.setHeight=function(t){var i=this.config.popup;var n=this.element;var r=false;if(typeof t==="string"&&t.indexOf("%")!==-1){we(n,t);t=qr(n);r=true}else{t=Math.max(this.minHeight,t);if(this.positioned){var e=this.getAvailableHeight();if(e&&t>e){t=e}}}if(this.getHeight()===t){return}if(!r){if(i){we(n,t)}else{n.style.height=t+"px";n.style.flex="0 0 auto";this.lastSize.height=typeof t==="number"?t:parseFloat(t)}}else{n.style.maxHeight="unset";n.style.minHeight="unset"}};i.prototype.getAvailableHeight=function(){var t=this.config,i=t.popup,n=t.forcePopupParentAsOffsetParent;if(!this.positioned){this.initialisePosition()}var r=this.offsetParent.clientHeight;if(!r){return null}var e=this.element.getBoundingClientRect();var s=this.offsetParent.getBoundingClientRect();var o=i?this.position.y:e.top;var u=i?0:s.top;var a=0;if(n){var f=this.element.parentElement;if(f){var h=f.getBoundingClientRect().bottom;a=h-e.bottom}}var c=r+u-o-a;return c};i.prototype.getWidth=function(){return this.element.offsetWidth};i.prototype.setWidth=function(t){var i=this.element;var n=this.config.popup;var r=false;if(typeof t==="string"&&t.indexOf("%")!==-1){ge(i,t);t=Yr(i);r=true}else if(this.positioned){t=Math.max(this.minWidth,t);var e=this.offsetParent.clientWidth;var s=n?this.position.x:this.element.getBoundingClientRect().left;if(e&&t+s>e){t=e-s}}if(this.getWidth()===t){return}if(!r){if(this.config.popup){ge(i,t)}else{i.style.width=t+"px";i.style.flex=" unset";this.lastSize.width=typeof t==="number"?t:parseFloat(t)}}else{i.style.maxWidth="unset";i.style.minWidth="unset"}};i.prototype.offsetElement=function(t,i){if(t===void 0){t=0}if(i===void 0){i=0}var n=this.config.forcePopupParentAsOffsetParent;var r=n?this.boundaryEl:this.element;if(!r){return}this.popupService.positionPopup({ePopup:r,keepWithinBounds:true,skipObserver:this.movable||this.isResizable(),updatePosition:function(){return{x:t,y:i}}});this.setPosition(parseFloat(r.style.left),parseFloat(r.style.top))};i.prototype.constrainSizeToAvailableHeight=function(t){var i=this;if(!this.config.forcePopupParentAsOffsetParent){return}var n=function(){var t=i.getAvailableHeight();i.element.style.setProperty("max-height",t+"px")};if(t){this.resizeObserverSubscriber=this.resizeObserverService.observeResize(this.popupService.getPopupParent(),n)}else{this.element.style.removeProperty("max-height");if(this.resizeObserverSubscriber){this.resizeObserverSubscriber();this.resizeObserverSubscriber=undefined}}};i.prototype.setPosition=function(t,i){this.position.x=t;this.position.y=i};i.prototype.updateDragStartPosition=function(t,i){this.dragStartPosition={x:t,y:i}};i.prototype.calculateMouseMovement=function(t){var i=t.e,n=t.isLeft,r=t.isTop,e=t.anywhereWithin,s=t.topBuffer;var o=i.clientX-this.dragStartPosition.x;var u=i.clientY-this.dragStartPosition.y;var a=this.shouldSkipX(i,!!n,!!e,o)?0:o;var f=this.shouldSkipY(i,!!r,s,u)?0:u;return{movementX:a,movementY:f}};i.prototype.shouldSkipX=function(t,i,n,r){var e=this.element.getBoundingClientRect();var s=this.offsetParent.getBoundingClientRect();var o=this.boundaryEl.getBoundingClientRect();var u=this.config.popup?this.position.x:e.left;var a=u<=0&&s.left>=t.clientX||s.right<=t.clientX&&s.right<=o.right;if(a){return true}if(i){a=r<0&&t.clientX>u+s.left||r>0&&t.clientX<u+s.left}else{if(n){a=r<0&&t.clientX>o.right||r>0&&t.clientX<u+s.left}else{a=r<0&&t.clientX>o.right||r>0&&t.clientX<o.right}}return a};i.prototype.shouldSkipY=function(t,i,n,r){if(n===void 0){n=0}var e=this.element.getBoundingClientRect();var s=this.offsetParent.getBoundingClientRect();var o=this.boundaryEl.getBoundingClientRect();var u=this.config.popup?this.position.y:e.top;var a=u<=0&&s.top>=t.clientY||s.bottom<=t.clientY&&s.bottom<=o.bottom;if(a){return true}if(i){a=r<0&&t.clientY>u+s.top+n||r>0&&t.clientY<u+s.top}else{a=r<0&&t.clientY>o.bottom||r>0&&t.clientY<o.bottom}return a};i.prototype.createResizeMap=function(){var t=this.element;this.resizerMap={topLeft:{element:t.querySelector("[ref=eTopLeftResizer]")},top:{element:t.querySelector("[ref=eTopResizer]")},topRight:{element:t.querySelector("[ref=eTopRightResizer]")},right:{element:t.querySelector("[ref=eRightResizer]")},bottomRight:{element:t.querySelector("[ref=eBottomRightResizer]")},bottom:{element:t.querySelector("[ref=eBottomResizer]")},bottomLeft:{element:t.querySelector("[ref=eBottomLeftResizer]")},left:{element:t.querySelector("[ref=eLeftResizer]")}}};i.prototype.addResizers=function(){if(this.resizersAdded){return}var t=this.element;if(!t){return}var i=new DOMParser;var n=i.parseFromString(Ts,"text/html").body;t.appendChild(n.firstChild);this.createResizeMap();this.resizersAdded=true};i.prototype.removeResizers=function(){this.resizerMap=undefined;var t=this.element.querySelector("."+ks);if(t){this.element.removeChild(t)}this.resizersAdded=false};i.prototype.getResizerElement=function(t){return this.resizerMap[t].element};i.prototype.onResizeStart=function(t,i){this.boundaryEl=this.findBoundaryElement();if(!this.positioned){this.initialisePosition()}this.currentResizer={isTop:!!i.match(/top/i),isRight:!!i.match(/right/i),isBottom:!!i.match(/bottom/i),isLeft:!!i.match(/left/i)};this.element.classList.add("ag-resizing");this.resizerMap[i].element.classList.add("ag-active");var n=this.config,r=n.popup,e=n.forcePopupParentAsOffsetParent;if(!r&&!e){this.applySizeToSiblings(this.currentResizer.isBottom||this.currentResizer.isTop)}this.isResizing=true;this.updateDragStartPosition(t.clientX,t.clientY)};i.prototype.getSiblings=function(){var t=this.element;var i=t.parentElement;if(!i){return null}return Array.prototype.slice.call(i.children).filter((function(t){return!t.classList.contains("ag-hidden")}))};i.prototype.getMinSizeOfSiblings=function(){var t=this.getSiblings()||[];var i=0;var n=0;for(var r=0;r<t.length;r++){var e=t[r];var s=!!e.style.flex&&e.style.flex!=="0 0 auto";if(e===this.element){continue}var o=this.minHeight||0;var u=this.minWidth||0;if(s){var a=window.getComputedStyle(e);if(a.minHeight){o=parseInt(a.minHeight,10)}if(a.minWidth){u=parseInt(a.minWidth,10)}}else{o=e.offsetHeight;u=e.offsetWidth}i+=o;n+=u}return{height:i,width:n}};i.prototype.applySizeToSiblings=function(t){var i=null;var n=this.getSiblings();if(!n){return}for(var r=0;r<n.length;r++){var e=n[r];if(e===i){continue}if(t){e.style.height=e.offsetHeight+"px"}else{e.style.width=e.offsetWidth+"px"}e.style.flex="0 0 auto";if(e===this.element){i=n[r+1]}}if(i){i.style.removeProperty("height");i.style.removeProperty("min-height");i.style.removeProperty("max-height");i.style.flex="1 1 auto"}};i.prototype.isResizable=function(){return Object.values(this.resizable).some((function(t){return t}))};i.prototype.onResize=function(t){if(!this.isResizing||!this.currentResizer){return}var i=this.config,n=i.popup,r=i.forcePopupParentAsOffsetParent;var e=this.currentResizer,s=e.isTop,o=e.isRight,u=e.isBottom,a=e.isLeft;var f=o||a;var h=u||s;var c=this.calculateMouseMovement({e:t,isLeft:a,isTop:s}),l=c.movementX,v=c.movementY;var d=this.position.x;var p=this.position.y;var g=0;var b=0;if(f&&l){var w=a?-1:1;var y=this.getWidth();var m=y+l*w;var S=false;if(a){g=y-m;if(d+g<=0||m<=this.minWidth){S=true;g=0}}if(!S){this.setWidth(m)}}if(h&&v){var w=s?-1:1;var C=this.getHeight();var O=C+v*w;var j=false;if(s){b=C-O;if(p+b<=0||O<=this.minHeight){j=true;b=0}}else{if(!this.config.popup&&!this.config.forcePopupParentAsOffsetParent&&C<O&&this.getMinSizeOfSiblings().height+O>this.element.parentElement.offsetHeight){j=true}}if(!j){this.setHeight(O)}}this.updateDragStartPosition(t.clientX,t.clientY);if((n||r)&&g||b){this.offsetElement(d+g,p+b)}};i.prototype.onResizeEnd=function(t,i){this.isResizing=false;this.currentResizer=null;this.boundaryEl=null;var n={type:"resize",api:this.gridOptionsService.api,columnApi:this.gridOptionsService.columnApi};this.element.classList.remove("ag-resizing");this.resizerMap[i].element.classList.remove("ag-active");this.dispatchEvent(n)};i.prototype.refreshSize=function(){var t=this.element;if(this.config.popup){if(!this.config.width){this.setWidth(t.offsetWidth)}if(!this.config.height){this.setHeight(t.offsetHeight)}}};i.prototype.onMoveStart=function(t){this.boundaryEl=this.findBoundaryElement();if(!this.positioned){this.initialisePosition()}this.isMoving=true;this.element.classList.add("ag-moving");this.updateDragStartPosition(t.clientX,t.clientY)};i.prototype.onMove=function(t){if(!this.isMoving){return}var i=this.position,n=i.x,r=i.y;var e;if(this.config.calculateTopBuffer){e=this.config.calculateTopBuffer()}var s=this.calculateMouseMovement({e:t,isTop:true,anywhereWithin:true,topBuffer:e}),o=s.movementX,u=s.movementY;this.offsetElement(n+o,r+u);this.updateDragStartPosition(t.clientX,t.clientY)};i.prototype.onMoveEnd=function(){this.isMoving=false;this.boundaryEl=null;this.element.classList.remove("ag-moving")};i.prototype.setOffsetParent=function(){if(this.config.forcePopupParentAsOffsetParent){this.offsetParent=this.popupService.getPopupParent()}else{this.offsetParent=this.element.offsetParent}};i.prototype.findBoundaryElement=function(){var t=this.element;while(t){if(window.getComputedStyle(t).position!=="static"){return t}t=t.parentElement}return this.element};i.prototype.clearResizeListeners=function(){while(this.resizeListeners.length){var t=this.resizeListeners.pop();this.dragService.removeDragSource(t)}};i.prototype.destroy=function(){t.prototype.destroy.call(this);if(this.moveElementDragListener){this.dragService.removeDragSource(this.moveElementDragListener)}this.constrainSizeToAvailableHeight(false);this.clearResizeListeners();this.removeResizers()};Fs([ut("popupService")],i.prototype,"popupService",void 0);Fs([ut("resizeObserverService")],i.prototype,"resizeObserverService",void 0);Fs([ut("dragService")],i.prototype,"dragService",void 0);return i}(ri);var Ds=function(){var t=function(i,n){t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var n in i)if(Object.prototype.hasOwnProperty.call(i,n))t[n]=i[n]};return t(i,n)};return function(i,n){if(typeof n!=="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(i,n);function r(){this.constructor=i}i.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}();var Gs=function(t,i,n,r){var e=arguments.length,s=e<3?i:r===null?r=Object.getOwnPropertyDescriptor(i,n):r,o;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")s=Reflect.decorate(t,i,n,r);else for(var u=t.length-1;u>=0;u--)if(o=t[u])s=(e<3?o(s):e>3?o(i,n,s):o(i,n))||s;return e>3&&s&&Object.defineProperty(i,n,s),s};var Ps=function(t){Ds(i,t);function i(i){var n=t.call(this)||this;n.filterNameKey=i;n.applyActive=false;n.hidePopup=null;n.debouncePending=false;n.appliedModel=null;return n}i.prototype.postConstruct=function(){this.resetTemplate();this.createManagedBean(new _s(this.getFocusableElement(),{handleKeyDown:this.handleKeyDown.bind(this)}));this.positionableFeature=new Ms(this.getPositionableElement(),{forcePopupParentAsOffsetParent:true});this.createBean(this.positionableFeature)};i.prototype.handleKeyDown=function(t){};i.prototype.getFilterTitle=function(){return this.translate(this.filterNameKey)};i.prototype.isFilterActive=function(){return!!this.appliedModel};i.prototype.resetTemplate=function(t){var i=this.getGui();if(i){i.removeEventListener("submit",this.onFormSubmit)}var n='\n <form class="ag-filter-wrapper">\n <div class="ag-filter-body-wrapper ag-'+this.getCssIdentifier()+'-body-wrapper" ref="eFilterBody">\n '+this.createBodyTemplate()+"\n </div>\n </form>";this.setTemplate(n,t);i=this.getGui();if(i){i.addEventListener("submit",this.onFormSubmit)}};i.prototype.isReadOnly=function(){return!!this.providedFilterParams.readOnly};i.prototype.init=function(t){var i=this;this.setParams(t);this.resetUiToDefaults(true).then((function(){i.updateUiVisibility();i.setupOnBtApplyDebounce()}))};i.prototype.setParams=function(t){this.providedFilterParams=t;this.applyActive=i.isUseApplyButton(t);this.createButtonPanel()};i.prototype.createButtonPanel=function(){var t=this;var i=this.providedFilterParams.buttons;if(!i||i.length<1||this.isReadOnly()){return}var n=document.createElement("div");n.classList.add("ag-filter-apply-panel");var r=function(i){var r;var e;switch(i){case"apply":r=t.translate("applyFilter");e=function(i){return t.onBtApply(false,false,i)};break;case"clear":r=t.translate("clearFilter");e=function(){return t.onBtClear()};break;case"reset":r=t.translate("resetFilter");e=function(){return t.onBtReset()};break;case"cancel":r=t.translate("cancelFilter");e=function(i){t.onBtCancel(i)};break;default:console.warn("AG Grid: Unknown button type specified");return}var s=i==="apply"?"submit":"button";var o=re('<button\n type="'+s+'"\n ref="'+i+'FilterButton"\n class="ag-button ag-standard-button ag-filter-apply-panel-button"\n >'+r+"\n </button>");n.appendChild(o);t.addManagedListener(o,"click",e)};Qe(i).forEach((function(t){return r(t)}));this.getGui().appendChild(n)};i.prototype.getDefaultDebounceMs=function(){return 0};i.prototype.setupOnBtApplyDebounce=function(){var t=this;var n=i.getDebounceMs(this.providedFilterParams,this.getDefaultDebounceMs());var r=z(this.checkApplyDebounce.bind(this),n);this.onBtApplyDebounce=function(){t.debouncePending=true;r()}};i.prototype.checkApplyDebounce=function(){if(this.debouncePending){this.debouncePending=false;this.onBtApply()}};i.prototype.getModel=function(){return this.appliedModel?this.appliedModel:null};i.prototype.setModel=function(t){var i=this;var n=t!=null?this.setModelIntoUi(t):this.resetUiToDefaults();return n.then((function(){i.updateUiVisibility();i.applyModel("api")}))};i.prototype.onBtCancel=function(t){var i=this;this.resetUiToActiveModel(this.getModel(),(function(){i.handleCancelEnd(t)}))};i.prototype.handleCancelEnd=function(t){if(this.providedFilterParams.closeOnApply){this.close(t)}};i.prototype.resetUiToActiveModel=function(t,i){var n=this;var r=function(){n.onUiChanged(false,"prevent");i===null||i===void 0?void 0:i()};if(t!=null){this.setModelIntoUi(t).then(r)}else{this.resetUiToDefaults().then(r)}};i.prototype.onBtClear=function(){var t=this;this.resetUiToDefaults().then((function(){return t.onUiChanged()}))};i.prototype.onBtReset=function(){this.onBtClear();this.onBtApply()};i.prototype.applyModel=function(t){var i=this.getModelFromUi();if(!this.isModelValid(i)){return false}var n=this.appliedModel;this.appliedModel=i;return!this.areModelsEqual(n,i)};i.prototype.isModelValid=function(t){return true};i.prototype.onFormSubmit=function(t){t.preventDefault()};i.prototype.onBtApply=function(t,i,n){if(t===void 0){t=false}if(i===void 0){i=false}if(n){n.preventDefault()}if(this.applyModel(i?"rowDataUpdated":"ui")){var r="columnFilter";this.providedFilterParams.filterChangedCallback({afterFloatingFilter:t,afterDataChange:i,source:r})}var e=this.providedFilterParams.closeOnApply;if(e&&this.applyActive&&!t&&!i){this.close(n)}};i.prototype.onNewRowsLoaded=function(){};i.prototype.close=function(t){if(!this.hidePopup){return}var i=t;var n=i&&i.key;var r;if(n==="Enter"||n==="Space"){r={keyboardEvent:i}}this.hidePopup(r);this.hidePopup=null};i.prototype.onUiChanged=function(t,i){if(t===void 0){t=false}this.updateUiVisibility();this.providedFilterParams.filterModifiedCallback();if(this.applyActive&&!this.isReadOnly()){var n=this.isModelValid(this.getModelFromUi());Br(this.getRefElement("applyFilterButton"),!n)}if(t&&!i||i==="immediately"){this.onBtApply(t)}else if(!this.applyActive&&!i||i==="debounce"){this.onBtApplyDebounce()}};i.prototype.afterGuiAttached=function(t){if(t){this.hidePopup=t.hidePopup}this.refreshFilterResizer(t===null||t===void 0?void 0:t.container)};i.prototype.refreshFilterResizer=function(t){if(!this.positionableFeature||t==="toolPanel"){return}var i=t==="floatingFilter";var n=this,r=n.positionableFeature,e=n.gridOptionsService;if(i){r.restoreLastSize();r.setResizable(e.is("enableRtl")?{bottom:true,bottomLeft:true,left:true}:{bottom:true,bottomRight:true,right:true})}else{this.positionableFeature.removeSizeFromEl();this.positionableFeature.setResizable(false)}this.positionableFeature.constrainSizeToAvailableHeight(true)};i.prototype.afterGuiDetached=function(){this.checkApplyDebounce();if(this.positionableFeature){this.positionableFeature.constrainSizeToAvailableHeight(false)}};i.getDebounceMs=function(t,n){if(i.isUseApplyButton(t)){if(t.debounceMs!=null){console.warn("AG Grid: debounceMs is ignored when apply button is present")}return 0}return t.debounceMs!=null?t.debounceMs:n};i.isUseApplyButton=function(t){return!!t.buttons&&t.buttons.indexOf("apply")>=0};i.prototype.destroy=function(){var i=this.getGui();if(i){i.removeEventListener("submit",this.onFormSubmit)}this.hidePopup=null;if(this.positionableFeature){this.positionableFeature=this.destroyBean(this.positionableFeature)}t.prototype.destroy.call(this)};i.prototype.translate=function(t){var i=this.localeService.getLocaleTextFunc();return i(t,Os[t])};i.prototype.getCellValue=function(t){var i=this.providedFilterParams,n=i.api,r=i.colDef,e=i.column,s=i.columnApi,o=i.context;return this.providedFilterParams.valueGetter({api:n,colDef:r,column:e,columnApi:s,context:o,data:t.data,getValue:function(i){return t.data[i]},node:t})};i.prototype.getPositionableElement=function(){return this.eFilterBody};Gs([ut("rowModel")],i.prototype,"rowModel",void 0);Gs([ds("eFilterBody")],i.prototype,"eFilterBody",void 0);Gs([et],i.prototype,"postConstruct",null);return i}(vs);var Es=function(){var t=function(i,n){t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var n in i)if(Object.prototype.hasOwnProperty.call(i,n))t[n]=i[n]};return t(i,n)};return function(i,n){if(typeof n!=="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(i,n);function r(){this.constructor=i}i.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}();var Is=function(t,i,n,r){var e=arguments.length,s=e<3?i:r===null?r=Object.getOwnPropertyDescriptor(i,n):r,o;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")s=Reflect.decorate(t,i,n,r);else for(var u=t.length-1;u>=0;u--)if(o=t[u])s=(e<3?o(s):e>3?o(i,n,s):o(i,n))||s;return e>3&&s&&Object.defineProperty(i,n,s),s};var Ns=function(t){Es(i,t);function i(i,n){var r=t.call(this,n)||this;r.labelSeparator="";r.labelAlignment="left";r.disabled=false;r.label="";r.config=i||{};return r}i.prototype.postConstruct=function(){this.addCssClass("ag-labeled");this.eLabel.classList.add("ag-label");var t=this.config,i=t.labelSeparator,n=t.label,r=t.labelWidth,e=t.labelAlignment;if(i!=null){this.setLabelSeparator(i)}if(n!=null){this.setLabel(n)}if(r!=null){this.setLabelWidth(r)}this.setLabelAlignment(e||this.labelAlignment);this.refreshLabel()};i.prototype.refreshLabel=function(){Xr(this.eLabel);if(typeof this.label==="string"){this.eLabel.innerText=this.label+this.labelSeparator}else if(this.label){this.eLabel.appendChild(this.label)}if(this.label===""){Lr(this.eLabel,false);bn(this.eLabel,"presentation")}else{Lr(this.eLabel,true);bn(this.eLabel,null)}};i.prototype.setLabelSeparator=function(t){if(this.labelSeparator===t){return this}this.labelSeparator=t;if(this.label!=null){this.refreshLabel()}return this};i.prototype.getLabelId=function(){this.eLabel.id=this.eLabel.id||"ag-"+this.getCompId()+"-label";return this.eLabel.id};i.prototype.getLabel=function(){return this.label};i.prototype.setLabel=function(t){if(this.label===t){return this}this.label=t;this.refreshLabel();return this};i.prototype.setLabelAlignment=function(t){var i=this.getGui();var n=i.classList;n.toggle("ag-label-align-left",t==="left");n.toggle("ag-label-align-right",t==="right");n.toggle("ag-label-align-top",t==="top");return this};i.prototype.setLabelEllipsis=function(t){this.eLabel.classList.toggle("ag-label-ellipsis",t);return this};i.prototype.setLabelWidth=function(t){if(this.label==null){return this}pe(this.eLabel,t);return this};i.prototype.setDisabled=function(t){t=!!t;var i=this.getGui();Br(i,t);i.classList.toggle("ag-disabled",t);this.disabled=t;return this};i.prototype.isDisabled=function(){return!!this.disabled};Is([et],i.prototype,"postConstruct",null);return i}(vs);var Hs=function(){var t=function(i,n){t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var n in i)if(Object.prototype.hasOwnProperty.call(i,n))t[n]=i[n]};return t(i,n)};return function(i,n){if(typeof n!=="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(i,n);function r(){this.constructor=i}i.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}();var Ls=function(t){Hs(i,t);function i(i,n,r){var e=t.call(this,i,n)||this;e.className=r;return e}i.prototype.postConstruct=function(){t.prototype.postConstruct.call(this);if(this.className){this.addCssClass(this.className)}};i.prototype.onValueChange=function(t){var i=this;this.addManagedListener(this,hi.EVENT_FIELD_VALUE_CHANGED,(function(){return t(i.getValue())}));return this};i.prototype.getWidth=function(){return this.getGui().clientWidth};i.prototype.setWidth=function(t){ge(this.getGui(),t);return this};i.prototype.getPreviousValue=function(){return this.previousValue};i.prototype.getValue=function(){return this.value};i.prototype.setValue=function(t,i){if(this.value===t){return this}this.previousValue=this.value;this.value=t;if(!i){this.dispatchEvent({type:hi.EVENT_FIELD_VALUE_CHANGED})}return this};return i}(Ns);var Vs=function(){var t=function(i,n){t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var n in i)if(Object.prototype.hasOwnProperty.call(i,n))t[n]=i[n]};return t(i,n)};return function(i,n){if(typeof n!=="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(i,n);function r(){this.constructor=i}i.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}();var Bs=function(t,i,n,r){var e=arguments.length,s=e<3?i:r===null?r=Object.getOwnPropertyDescriptor(i,n):r,o;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")s=Reflect.decorate(t,i,n,r);else for(var u=t.length-1;u>=0;u--)if(o=t[u])s=(e<3?o(s):e>3?o(i,n,s):o(i,n))||s;return e>3&&s&&Object.defineProperty(i,n,s),s};var zs='\n <div class="ag-picker-field" role="presentation">\n <div ref="eLabel"></div>\n <div ref="eWrapper" class="ag-wrapper ag-picker-field-wrapper ag-picker-collapsed">\n <div ref="eDisplayField" class="ag-picker-field-display"></div>\n <div ref="eIcon" class="ag-picker-field-icon" aria-hidden="true"></div>\n </div>\n </div>';var Ws=function(t){Vs(i,t);function i(i){var n=t.call(this,i,(i===null||i===void 0?void 0:i.template)||zs,i===null||i===void 0?void 0:i.className)||this;n.isPickerDisplayed=false;n.skipClick=false;n.pickerGap=4;n.hideCurrentPicker=null;n.ariaRole=i===null||i===void 0?void 0:i.ariaRole;n.onPickerFocusIn=n.onPickerFocusIn.bind(n);n.onPickerFocusOut=n.onPickerFocusOut.bind(n);if(!i){return n}var r=i.pickerGap,e=i.maxPickerHeight,s=i.variableWidth,o=i.minPickerWidth,u=i.maxPickerWidth;if(r!=null){n.pickerGap=r}n.variableWidth=!!s;if(e!=null){n.setPickerMaxHeight(e)}if(o!=null){n.setPickerMinWidth(o)}if(u!=null){n.setPickerMaxWidth(u)}return n}i.prototype.postConstruct=function(){t.prototype.postConstruct.call(this);this.setupAria();var i="ag-"+this.getCompId()+"-display";this.eDisplayField.setAttribute("id",i);var n=this.getAriaElement();Rn(n,i);this.addManagedListener(n,"keydown",this.onKeyDown.bind(this));this.addManagedListener(this.eLabel,"mousedown",this.onLabelOrWrapperMouseDown.bind(this));this.addManagedListener(this.eWrapper,"mousedown",this.onLabelOrWrapperMouseDown.bind(this));var r=this.config.pickerIcon;if(r){var e=Fe(r,this.gridOptionsService);if(e){this.eIcon.appendChild(e)}}};i.prototype.setupAria=function(){var t=this.getAriaElement();t.setAttribute("tabindex",(this.gridOptionsService.getNum("tabIndex")||0).toString());Tn(t,false);if(this.ariaRole){bn(t,this.ariaRole)}};i.prototype.refreshLabel=function(){var i;var n=this.getAriaElement();On(n,(i=this.getLabelId())!==null&&i!==void 0?i:"");t.prototype.refreshLabel.call(this)};i.prototype.onLabelOrWrapperMouseDown=function(t){if(t){t.preventDefault();this.getFocusableElement().focus()}if(this.skipClick){this.skipClick=false;return}if(this.isDisabled()){return}if(this.isPickerDisplayed){this.hidePicker()}else{this.showPicker()}};i.prototype.onKeyDown=function(t){switch(t.key){case Te.UP:case Te.DOWN:case Te.ENTER:case Te.SPACE:t.preventDefault();this.onLabelOrWrapperMouseDown();break;case Te.ESCAPE:if(this.isPickerDisplayed){t.preventDefault();t.stopPropagation();if(this.hideCurrentPicker){this.hideCurrentPicker()}}break}};i.prototype.showPicker=function(){this.isPickerDisplayed=true;if(!this.pickerComponent){this.pickerComponent=this.createPickerComponent()}var t=this.pickerComponent.getGui();t.addEventListener("focusin",this.onPickerFocusIn);t.addEventListener("focusout",this.onPickerFocusOut);this.hideCurrentPicker=this.renderAndPositionPicker();this.toggleExpandedStyles(true)};i.prototype.renderAndPositionPicker=function(){var t=this;var i=this.gridOptionsService.getDocument();var n=this.pickerComponent.getGui();if(!this.gridOptionsService.is("suppressScrollWhenPopupsAreOpen")){this.destroyMouseWheelFunc=this.addManagedListener(i.body,"wheel",(function(i){if(!n.contains(i.target)){t.hidePicker()}}))}var r=this.localeService.getLocaleTextFunc();var e=this.config,s=e.pickerType,o=e.pickerAriaLabelKey,u=e.pickerAriaLabelValue,a=e.modalPicker,f=a===void 0?true:a;var h={modal:f,eChild:n,closeOnEsc:true,closedCallback:function(){var n=i.activeElement===i.body;t.beforeHidePicker();if(n&&t.isAlive()){t.getFocusableElement().focus()}},ariaLabel:r(o,u)};var c=this.popupService.addPopup(h);var l=this,v=l.maxPickerHeight,d=l.minPickerWidth,p=l.maxPickerWidth,g=l.pickerGap,b=l.variableWidth;if(b){if(d){n.style.minWidth=d}n.style.width=ye(Yr(this.eWrapper));if(p){n.style.maxWidth=p}}else{pe(n,p!==null&&p!==void 0?p:Yr(this.eWrapper))}var w=v!==null&&v!==void 0?v:Ur(this.popupService.getPopupParent())+"px";n.style.setProperty("max-height",w);n.style.position="absolute";var y=this.gridOptionsService.is("enableRtl")?"right":"left";this.popupService.positionPopupByComponent({type:s,eventSource:this.eWrapper,ePopup:n,position:"under",alignSide:y,keepWithinBounds:true,nudgeY:g});return c.hideFunc};i.prototype.beforeHidePicker=function(){if(this.destroyMouseWheelFunc){this.destroyMouseWheelFunc();this.destroyMouseWheelFunc=undefined}this.toggleExpandedStyles(false);var t=this.pickerComponent.getGui();t.removeEventListener("focusin",this.onPickerFocusIn);t.removeEventListener("focusout",this.onPickerFocusOut);this.isPickerDisplayed=false;this.pickerComponent=undefined;this.hideCurrentPicker=null};i.prototype.toggleExpandedStyles=function(t){if(!this.isAlive()){return}var i=this.getAriaElement();Tn(i,t);this.eWrapper.classList.toggle("ag-picker-expanded",t);this.eWrapper.classList.toggle("ag-picker-collapsed",!t)};i.prototype.onPickerFocusIn=function(){this.togglePickerHasFocus(true)};i.prototype.onPickerFocusOut=function(t){var i;if(!((i=this.pickerComponent)===null||i===void 0?void 0:i.getGui().contains(t.relatedTarget))){this.togglePickerHasFocus(false)}};i.prototype.togglePickerHasFocus=function(t){if(!this.pickerComponent){return}this.eWrapper.classList.toggle("ag-picker-has-focus",t)};i.prototype.hidePicker=function(){if(this.hideCurrentPicker){this.hideCurrentPicker()}};i.prototype.setAriaLabel=function(t){Cn(this.getAriaElement(),t);return this};i.prototype.setInputWidth=function(t){pe(this.eWrapper,t);return this};i.prototype.getFocusableElement=function(){return this.eWrapper};i.prototype.setPickerGap=function(t){this.pickerGap=t;return this};i.prototype.setPickerMinWidth=function(t){if(typeof t==="number"){t=t+"px"}this.minPickerWidth=t==null?undefined:t;return this};i.prototype.setPickerMaxWidth=function(t){if(typeof t==="number"){t=t+"px"}this.maxPickerWidth=t==null?undefined:t;return this};i.prototype.setPickerMaxHeight=function(t){if(typeof t==="number"){t=t+"px"}this.maxPickerHeight=t==null?undefined:t;return this};i.prototype.destroy=function(){this.hidePicker();t.prototype.destroy.call(this)};Bs([ut("popupService")],i.prototype,"popupService",void 0);Bs([ds("eLabel")],i.prototype,"eLabel",void 0);Bs([ds("eWrapper")],i.prototype,"eWrapper",void 0);Bs([ds("eDisplayField")],i.prototype,"eDisplayField",void 0);Bs([ds("eIcon")],i.prototype,"eIcon",void 0);return i}(Ls);var Us=function(){var t=function(i,n){t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var n in i)if(Object.prototype.hasOwnProperty.call(i,n))t[n]=i[n]};return t(i,n)};return function(i,n){if(typeof n!=="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(i,n);function r(){this.constructor=i}i.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}();var Ks=function(t,i,n,r){var e=arguments.length,s=e<3?i:r===null?r=Object.getOwnPropertyDescriptor(i,n):r,o;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")s=Reflect.decorate(t,i,n,r);else for(var u=t.length-1;u>=0;u--)if(o=t[u])s=(e<3?o(s):e>3?o(i,n,s):o(i,n))||s;return e>3&&s&&Object.defineProperty(i,n,s),s};var qs=function(t){Us(i,t);function i(i){if(i===void 0){i="default"}var n=t.call(this,'<div class="ag-list ag-'+i+'-list" role="listbox"></div>')||this;n.cssIdentifier=i;n.options=[];n.itemEls=[];return n}i.prototype.init=function(){this.addManagedListener(this.getGui(),"keydown",this.handleKeyDown.bind(this))};i.prototype.handleKeyDown=function(t){var i=t.key;switch(i){case Te.ENTER:if(!this.highlightedEl){this.setValue(this.getValue())}else{var n=this.itemEls.indexOf(this.highlightedEl);this.setValueByIndex(n)}break;case Te.DOWN:case Te.UP:var r=i===Te.DOWN;var e=void 0;t.preventDefault();if(!this.highlightedEl){e=this.itemEls[r?0:this.itemEls.length-1]}else{var s=this.itemEls.indexOf(this.highlightedEl);var o=s+(r?1:-1);o=Math.min(Math.max(o,0),this.itemEls.length-1);e=this.itemEls[o]}this.highlightItem(e);break}};i.prototype.addOptions=function(t){var i=this;t.forEach((function(t){return i.addOption(t)}));return this};i.prototype.addOption=function(t){var i=t.value,n=t.text;var r=mi(n||i);this.options.push({value:i,text:r});this.renderOption(i,r);this.updateIndices();return this};i.prototype.updateIndices=function(){var t=this.getGui().querySelectorAll(".ag-list-item");t.forEach((function(i,n){Gn(i,n+1);Dn(i,t.length)}))};i.prototype.renderOption=function(t,i){var n=this;var r=document.createElement("div");bn(r,"option");r.classList.add("ag-list-item","ag-"+this.cssIdentifier+"-list-item");r.innerHTML="<span>"+i+"</span>";r.tabIndex=-1;this.itemEls.push(r);this.addManagedListener(r,"mouseover",(function(){return n.highlightItem(r)}));this.addManagedListener(r,"mouseleave",(function(){return n.clearHighlighted()}));this.addManagedListener(r,"click",(function(){return n.setValue(t)}));this.getGui().appendChild(r)};i.prototype.setValue=function(t,i){if(this.value===t){this.fireItemSelected();return this}if(t==null){this.reset();return this}var n=this.options.findIndex((function(i){return i.value===t}));if(n!==-1){var r=this.options[n];this.value=r.value;this.displayValue=r.text!=null?r.text:r.value;this.highlightItem(this.itemEls[n]);if(!i){this.fireChangeEvent()}}return this};i.prototype.setValueByIndex=function(t){return this.setValue(this.options[t].value)};i.prototype.getValue=function(){return this.value};i.prototype.getDisplayValue=function(){return this.displayValue};i.prototype.refreshHighlighted=function(){var t=this;this.clearHighlighted();var i=this.options.findIndex((function(i){return i.value===t.value}));if(i!==-1){this.highlightItem(this.itemEls[i])}};i.prototype.reset=function(){this.value=null;this.displayValue=null;this.clearHighlighted();this.fireChangeEvent()};i.prototype.highlightItem=function(t){if(!t.offsetParent){return}this.clearHighlighted();this.highlightedEl=t;this.highlightedEl.classList.add(i.ACTIVE_CLASS);zn(this.highlightedEl,true);this.highlightedEl.focus()};i.prototype.clearHighlighted=function(){if(!this.highlightedEl||!this.highlightedEl.offsetParent){return}this.highlightedEl.classList.remove(i.ACTIVE_CLASS);zn(this.highlightedEl,false);this.highlightedEl=null};i.prototype.fireChangeEvent=function(){this.dispatchEvent({type:hi.EVENT_FIELD_VALUE_CHANGED});this.fireItemSelected()};i.prototype.fireItemSelected=function(){this.dispatchEvent({type:i.EVENT_ITEM_SELECTED})};i.EVENT_ITEM_SELECTED="selectedItem";i.ACTIVE_CLASS="ag-active-item";Ks([et],i.prototype,"init",null);return i}(vs);var Ys=function(){var t=function(i,n){t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var n in i)if(Object.prototype.hasOwnProperty.call(i,n))t[n]=i[n]};return t(i,n)};return function(i,n){if(typeof n!=="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(i,n);function r(){this.constructor=i}i.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}();var Qs=function(){Qs=Object.assign||function(t){for(var i,n=1,r=arguments.length;n<r;n++){i=arguments[n];for(var e in i)if(Object.prototype.hasOwnProperty.call(i,e))t[e]=i[e]}return t};return Qs.apply(this,arguments)};var Js=function(t){Ys(i,t);function i(i){return t.call(this,Qs({pickerAriaLabelKey:"ariaLabelSelectField",pickerAriaLabelValue:"Select Field",pickerType:"ag-list",className:"ag-select",pickerIcon:"smallDown",ariaRole:"listbox"},i))||this}i.prototype.postConstruct=function(){var i;t.prototype.postConstruct.call(this);this.createListComponent();this.eWrapper.tabIndex=(i=this.gridOptionsService.getNum("tabIndex"))!==null&&i!==void 0?i:0};i.prototype.createListComponent=function(){var t=this;this.listComponent=this.createBean(new qs("select"));this.listComponent.setParentComponent(this);this.listComponent.addGuiEventListener("keydown",(function(i){if(i.key===Te.TAB){i.preventDefault();i.stopImmediatePropagation();t.getGui().dispatchEvent(new KeyboardEvent("keydown",{key:i.key,shiftKey:i.shiftKey,ctrlKey:i.ctrlKey,bubbles:true}))}}));this.listComponent.addManagedListener(this.listComponent,qs.EVENT_ITEM_SELECTED,(function(){t.hidePicker();t.dispatchEvent({type:i.EVENT_ITEM_SELECTED})}));this.listComponent.addManagedListener(this.listComponent,hi.EVENT_FIELD_VALUE_CHANGED,(function(){if(!t.listComponent){return}t.setValue(t.listComponent.getValue(),false,true);t.hidePicker()}))};i.prototype.createPickerComponent=function(){return this.listComponent};i.prototype.showPicker=function(){if(!this.listComponent){return}t.prototype.showPicker.call(this);this.listComponent.refreshHighlighted()};i.prototype.addOptions=function(t){var i=this;t.forEach((function(t){return i.addOption(t)}));return this};i.prototype.addOption=function(t){this.listComponent.addOption(t);return this};i.prototype.setValue=function(i,n,r){if(this.value===i||!this.listComponent){return this}if(!r){this.listComponent.setValue(i,true)}var e=this.listComponent.getValue();if(e===this.getValue()){return this}this.eDisplayField.innerHTML=this.listComponent.getDisplayValue();return t.prototype.setValue.call(this,i,n)};i.prototype.destroy=function(){if(this.listComponent){this.destroyBean(this.listComponent);this.listComponent=undefined}t.prototype.destroy.call(this)};i.EVENT_ITEM_SELECTED="selectedItem";return i}(Ws);var Zs=function(){var t=function(i,n){t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var n in i)if(Object.prototype.hasOwnProperty.call(i,n))t[n]=i[n]};return t(i,n)};return function(i,n){if(typeof n!=="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(i,n);function r(){this.constructor=i}i.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}();var $s=function(t,i,n,r){var e=arguments.length,s=e<3?i:r===null?r=Object.getOwnPropertyDescriptor(i,n):r,o;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")s=Reflect.decorate(t,i,n,r);else for(var u=t.length-1;u>=0;u--)if(o=t[u])s=(e<3?o(s):e>3?o(i,n,s):o(i,n))||s;return e>3&&s&&Object.defineProperty(i,n,s),s};var Xs=function(t){Zs(n,t);function n(i,n,r,e){if(r===void 0){r="text"}if(e===void 0){e="input"}var s=t.call(this,i,'\n <div role="presentation">\n <div ref="eLabel" class="ag-input-field-label"></div>\n <div ref="eWrapper" class="ag-wrapper ag-input-wrapper" role="presentation">\n <'+e+' ref="eInput" class="ag-input-field-input"></'+e+">\n </div>\n </div>",n)||this;s.inputType=r;s.displayFieldTag=e;return s}n.prototype.postConstruct=function(){t.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 i=this.config,n=i.width,r=i.value;if(n!=null){this.setWidth(n)}if(r!=null){this.setValue(r)}this.addInputListeners();this.activateTabIndex([this.eInput])};n.prototype.refreshLabel=function(){if(i(this.getLabel())){On(this.eInput,this.getLabelId())}else{this.eInput.removeAttribute("aria-labelledby")}t.prototype.refreshLabel.call(this)};n.prototype.addInputListeners=function(){var t=this;this.addManagedListener(this.eInput,"input",(function(i){return t.setValue(i.target.value)}))};n.prototype.setInputType=function(){if(this.displayFieldTag==="input"){this.eInput.setAttribute("type",this.inputType)}};n.prototype.getInputElement=function(){return this.eInput};n.prototype.setInputWidth=function(t){pe(this.eWrapper,t);return this};n.prototype.setInputName=function(t){this.getInputElement().setAttribute("name",t);return this};n.prototype.getFocusableElement=function(){return this.eInput};n.prototype.setMaxLength=function(t){var i=this.eInput;i.maxLength=t;return this};n.prototype.setInputPlaceholder=function(t){Oe(this.eInput,"placeholder",t);return this};n.prototype.setInputAriaLabel=function(t){Cn(this.eInput,t);return this};n.prototype.setDisabled=function(i){Br(this.eInput,i);return t.prototype.setDisabled.call(this,i)};n.prototype.setAutoComplete=function(t){if(t===true){Oe(this.eInput,"autocomplete",null)}else{var i=typeof t==="string"?t:"off";Oe(this.eInput,"autocomplete",i)}return this};$s([ds("eLabel")],n.prototype,"eLabel",void 0);$s([ds("eWrapper")],n.prototype,"eWrapper",void 0);$s([ds("eInput")],n.prototype,"eInput",void 0);return n}(Ls);var to=function(){var t=function(i,n){t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var n in i)if(Object.prototype.hasOwnProperty.call(i,n))t[n]=i[n]};return t(i,n)};return function(i,n){if(typeof n!=="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(i,n);function r(){this.constructor=i}i.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}();var io=function(t){to(i,t);function i(i,n,r){if(n===void 0){n="ag-checkbox"}if(r===void 0){r="checkbox"}var e=t.call(this,i,n,r)||this;e.labelAlignment="right";e.selected=false;e.readOnly=false;e.passive=false;return e}i.prototype.addInputListeners=function(){this.addManagedListener(this.eInput,"click",this.onCheckboxClick.bind(this));this.addManagedListener(this.eLabel,"click",this.toggle.bind(this))};i.prototype.getNextValue=function(){return this.selected===undefined?true:!this.selected};i.prototype.setPassive=function(t){this.passive=t};i.prototype.isReadOnly=function(){return this.readOnly};i.prototype.setReadOnly=function(t){this.eWrapper.classList.toggle("ag-disabled",t);this.eInput.disabled=t;this.readOnly=t};i.prototype.setDisabled=function(i){this.eWrapper.classList.toggle("ag-disabled",i);return t.prototype.setDisabled.call(this,i)};i.prototype.toggle=function(){if(this.eInput.disabled){return}var t=this.isSelected();var i=this.getNextValue();if(this.passive){this.dispatchChange(i,t)}else{this.setValue(i)}};i.prototype.getValue=function(){return this.isSelected()};i.prototype.setValue=function(t,i){this.refreshSelectedClass(t);this.setSelected(t,i);return this};i.prototype.setName=function(t){var i=this.getInputElement();i.name=t;return this};i.prototype.isSelected=function(){return this.selected};i.prototype.setSelected=function(t,i){if(this.isSelected()===t){return}this.previousValue=this.isSelected();t=this.selected=typeof t==="boolean"?t:undefined;this.eInput.checked=t;this.eInput.indeterminate=t===undefined;if(!i){this.dispatchChange(this.selected,this.previousValue)}};i.prototype.dispatchChange=function(t,i,n){this.dispatchEvent({type:hi.EVENT_FIELD_VALUE_CHANGED,selected:t,previousValue:i,event:n});var r=this.getInputElement();var e={type:hi.EVENT_CHECKBOX_CHANGED,id:r.id,name:r.name,selected:t,previousValue:i};this.eventService.dispatchEvent(e)};i.prototype.onCheckboxClick=function(t){if(this.passive||this.eInput.disabled){return}var i=this.isSelected();var n=this.selected=t.target.checked;this.refreshSelectedClass(n);this.dispatchChange(n,i,t)};i.prototype.refreshSelectedClass=function(t){this.eWrapper.classList.toggle("ag-checked",t===true);this.eWrapper.classList.toggle("ag-indeterminate",t==null)};return i}(Xs);var no=function(){var t=function(i,n){t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var n in i)if(Object.prototype.hasOwnProperty.call(i,n))t[n]=i[n]};return t(i,n)};return function(i,n){if(typeof n!=="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(i,n);function r(){this.constructor=i}i.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}();var ro=function(t){no(i,t);function i(i){return t.call(this,i,"ag-radio-button","radio")||this}i.prototype.isSelected=function(){return this.eInput.checked};i.prototype.toggle=function(){if(this.eInput.disabled){return}if(!this.isSelected()){this.setValue(true)}};i.prototype.addInputListeners=function(){t.prototype.addInputListeners.call(this);this.addManagedListener(this.eventService,hi.EVENT_CHECKBOX_CHANGED,this.onChange.bind(this))};i.prototype.onChange=function(t){if(t.selected&&t.name&&this.eInput.name&&this.eInput.name===t.name&&t.id&&this.eInput.id!==t.id){this.setValue(false,true)}};return i}(io);var eo=function(){var t=function(i,n){t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var n in i)if(Object.prototype.hasOwnProperty.call(i,n))t[n]=i[n]};return t(i,n)};return function(i,n){if(typeof n!=="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(i,n);function r(){this.constructor=i}i.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}();var so=function(t,i){var n=typeof Symbol==="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),e,s=[],o;try{while((i===void 0||i-- >0)&&!(e=r.next()).done)s.push(e.value)}catch(t){o={error:t}}finally{try{if(e&&!e.done&&(n=r["return"]))n.call(r)}finally{if(o)throw o.error}}return s};var oo=function(t,i){for(var n=0,r=i.length,e=t.length;n<r;n++,e++)t[e]=i[n];return t};var uo=function(){function t(t,i,n){this.localeService=t;this.optionsFactory=i;this.valueFormatter=n}t.prototype.getModelAsString=function(t){var i=this;if(!t){return null}var n=t.operator!=null;var r=this.localeService.getLocaleTextFunc();if(n){var e=t;var s=e.conditions;if(!s){var o=e.condition1,u=e.condition2;s=[o,u]}var a=s.map((function(t){return i.getModelAsString(t)}));var f=e.operator==="AND"?"andCondition":"orCondition";return a.join(" "+r(f,Os[f])+" ")}else if(t.type===ao.BLANK||t.type===ao.NOT_BLANK){return r(t.type,t.type)}else{var h=t;var c=this.optionsFactory.getCustomOption(h.type);var l=c||{},v=l.displayKey,d=l.displayName,p=l.numberOfInputs;if(v&&d&&p===0){r(v,d);return d}return this.conditionToString(h,c)}};t.prototype.updateParams=function(t){this.optionsFactory=t.optionsFactory};t.prototype.formatValue=function(t){var i;return this.valueFormatter?(i=this.valueFormatter(t!==null&&t!==void 0?t:null))!==null&&i!==void 0?i:"":String(t)};return t}();var ao=function(t){eo(i,t);function i(){var i=t!==null&&t.apply(this,arguments)||this;i.eTypes=[];i.eJoinOperatorPanels=[];i.eJoinOperatorsAnd=[];i.eJoinOperatorsOr=[];i.eConditionBodies=[];i.listener=function(){return i.onUiChanged()};i.lastUiCompletePosition=null;i.joinOperatorId=0;return i}i.prototype.getNumberOfInputs=function(t){var n=this.optionsFactory.getCustomOption(t);if(n){var r=n.numberOfInputs;return r!=null?r:1}var e=[i.EMPTY,i.NOT_BLANK,i.BLANK];if(t&&e.indexOf(t)>=0){return 0}else if(t===i.IN_RANGE){return 2}return 1};i.prototype.onFloatingFilterChanged=function(t,i){this.setTypeFromFloatingFilter(t);this.setValueFromFloatingFilter(i);this.onUiChanged(true)};i.prototype.setTypeFromFloatingFilter=function(t){var i=this;this.eTypes.forEach((function(n,r){if(r===0){n.setValue(t,true)}else{n.setValue(i.optionsFactory.getDefaultOption(),true)}}))};i.prototype.getModelFromUi=function(){var t=this.getUiCompleteConditions();if(t.length===0){return null}if(this.maxNumConditions>1&&t.length>1){return{filterType:this.getFilterType(),operator:this.getJoinOperator(),condition1:t[0],condition2:t[1],conditions:t}}return t[0]};i.prototype.getConditionTypes=function(){return this.eTypes.map((function(t){return t.getValue()}))};i.prototype.getConditionType=function(t){return this.eTypes[t].getValue()};i.prototype.getJoinOperator=function(){if(this.eJoinOperatorsOr.length===0){return this.defaultJoinOperator}return this.eJoinOperatorsOr[0].getValue()===true?"OR":"AND"};i.prototype.areModelsEqual=function(t,i){var n=this;if(!t&&!i){return true}if(!t&&i||t&&!i){return false}var r=!t.operator;var e=!i.operator;var s=!r&&e||r&&!e;if(s){return false}var o;if(r){var u=t;var a=i;o=this.areSimpleModelsEqual(u,a)}else{var f=t;var h=i;o=f.operator===h.operator&&_t(f.conditions,h.conditions,(function(t,i){return n.areSimpleModelsEqual(t,i)}))}return o};i.prototype.setModelIntoUi=function(t){var i=this;var n=t.operator;if(n){var r=t;if(!r.conditions){r.conditions=[r.condition1,r.condition2]}var e=this.validateAndUpdateConditions(r.conditions);var s=this.getNumConditions();if(e<s){this.removeConditionsAndOperators(e)}else if(e>s){for(var o=s;o<e;o++){this.createJoinOperatorPanel();this.createOption()}}var u=r.operator==="OR";this.eJoinOperatorsAnd.forEach((function(t){return t.setValue(!u,true)}));this.eJoinOperatorsOr.forEach((function(t){return t.setValue(u,true)}));r.conditions.forEach((function(t,n){i.eTypes[n].setValue(t.type,true);i.setConditionIntoUi(t,n)}))}else{var a=t;if(this.getNumConditions()>1){this.removeConditionsAndOperators(1)}this.eTypes[0].setValue(a.type,true);this.setConditionIntoUi(a,0)}this.lastUiCompletePosition=this.getNumConditions()-1;this.createMissingConditionsAndOperators();this.onUiChanged();return ns.resolve()};i.prototype.validateAndUpdateConditions=function(t){var i=t.length;if(i>this.maxNumConditions){t.splice(this.maxNumConditions);P((function(){return console.warn('AG Grid: Filter Model contains more conditions than "filterParams.maxNumConditions". Additional conditions have been ignored.')}),"simpleFilterSetModelMaxNumConditions");i=this.maxNumConditions}return i};i.prototype.doesFilterPass=function(t){var i=this;var n;var r=this.getModel();if(r==null){return true}var e=r.operator;var s=[];if(e){var o=r;s.push.apply(s,oo([],so((n=o.conditions)!==null&&n!==void 0?n:[])))}else{s.push(r)}var u=e&&e==="OR"?"some":"every";return s[u]((function(n){return i.individualConditionPasses(t,n)}))};i.prototype.setParams=function(i){t.prototype.setParams.call(this,i);this.setNumConditions(i);this.defaultJoinOperator=this.getDefaultJoinOperator(i.defaultJoinOperator);this.filterPlaceholder=i.filterPlaceholder;this.optionsFactory=new Cs;this.optionsFactory.init(i,this.getDefaultFilterOptions());this.createFilterListOptions();this.createOption();this.createMissingConditionsAndOperators();if(this.isReadOnly()){this.eFilterBody.setAttribute("tabindex","-1")}};i.prototype.setNumConditions=function(t){var i,n;if(t.suppressAndOrCondition!=null){P((function(){return console.warn('AG Grid: Since v29.2 "filterParams.suppressAndOrCondition" is deprecated. Use "filterParams.maxNumConditions = 1" instead.')}),"simpleFilterSuppressAndOrCondition")}if(t.alwaysShowBothConditions!=null){P((function(){return console.warn('AG Grid: Since v29.2 "filterParams.alwaysShowBothConditions" is deprecated. Use "filterParams.numAlwaysVisibleConditions = 2" instead.')}),"simpleFilterAlwaysShowBothConditions")}this.maxNumConditions=(i=t.maxNumConditions)!==null&&i!==void 0?i:t.suppressAndOrCondition?1:2;if(this.maxNumConditions<1){P((function(){return console.warn('AG Grid: "filterParams.maxNumConditions" must be greater than or equal to zero.')}),"simpleFilterMaxNumConditions");this.maxNumConditions=1}this.numAlwaysVisibleConditions=(n=t.numAlwaysVisibleConditions)!==null&&n!==void 0?n:t.alwaysShowBothConditions?2:1;if(this.numAlwaysVisibleConditions<1){P((function(){return console.warn('AG Grid: "filterParams.numAlwaysVisibleConditions" must be greater than or equal to zero.')}),"simpleFilterNumAlwaysVisibleConditions");this.numAlwaysVisibleConditions=1}if(this.numAlwaysVisibleConditions>this.maxNumConditions){P((function(){return console.warn('AG Grid: "filterParams.numAlwaysVisibleConditions" cannot be greater than "filterParams.maxNumConditions".')}),"simpleFilterNumAlwaysVisibleGreaterThanMaxNumConditions");this.numAlwaysVisibleConditions=this.maxNumConditions}};i.prototype.createOption=function(){var t=this;var i=this.createManagedBean(new Js);this.eTypes.push(i);i.addCssClass("ag-filter-select");this.eFilterBody.appendChild(i.getGui());var n=this.createValueElement();this.eConditionBodies.push(n);this.eFilterBody.appendChild(n);this.putOptionsIntoDropdown(i);this.resetType(i);var r=this.getNumConditions()-1;this.forEachPositionInput(r,(function(i){return t.resetInput(i)}));this.addChangedListeners(i,r)};i.prototype.createJoinOperatorPanel=function(){var t=document.createElement("div");this.eJoinOperatorPanels.push(t);t.classList.add("ag-filter-condition");var i=this.createJoinOperator(this.eJoinOperatorsAnd,t,"and");var n=this.createJoinOperator(this.eJoinOperatorsOr,t,"or");this.eFilterBody.appendChild(t);var r=this.eJoinOperatorPanels.length-1;var e=this.joinOperatorId++;this.resetJoinOperatorAnd(i,r,e);this.resetJoinOperatorOr(n,r,e);if(!this.isReadOnly()){i.onValueChange(this.listener);n.onValueChange(this.listener)}};i.prototype.createJoinOperator=function(t,i,n){var r=this.createManagedBean(new ro);t.push(r);r.addCssClass("ag-filter-condition-operator");r.addCssClass("ag-filter-condition-operator-"+n);i.appendChild(r.getGui());return r};i.prototype.getDefaultJoinOperator=function(t){return t==="AND"||t==="OR"?t:"AND"};i.prototype.createFilterListOptions=function(){var t=this;var i=this.optionsFactory.getFilterOptions();this.filterListOptions=i.map((function(i){return typeof i==="string"?t.createBoilerplateListOption(i):t.createCustomListOption(i)}))};i.prototype.putOptionsIntoDropdown=function(t){this.filterListOptions.forEach((function(i){t.addOption(i)}));t.setDisabled(this.filterListOptions.length<=1)};i.prototype.createBoilerplateListOption=function(t){return{value:t,text:this.translate(t)}};i.prototype.createCustomListOption=function(t){var i=t.displayKey;var n=this.optionsFactory.getCustomOption(t.displayKey);return{value:i,text:n?this.localeService.getLocaleTextFunc()(n.displayKey,n.displayName):this.translate(i)}};i.prototype.isAllowTwoConditions=function(){return this.maxNumConditions>=2};i.prototype.createBodyTemplate=function(){return""};i.prototype.getCssIdentifier=function(){return"simple-filter"};i.prototype.updateUiVisibility=function(){var t=this.getJoinOperator();this.updateNumConditions();this.updateConditionStatusesAndValues(this.lastUiCompletePosition,t)};i.prototype.updateNumConditions=function(){var t;var i=-1;var n=true;for(var r=0;r<this.getNumConditions();r++){if(this.isConditionUiComplete(r)){i=r}else{n=false}}if(this.shouldAddNewConditionAtEnd(n)){this.createJoinOperatorPanel();this.createOption()}else{var e=(t=this.lastUiCompletePosition)!==null&&t!==void 0?t:this.getNumConditions()-2;if(i<e){this.removeConditionsAndOperators(e+1);var s=i+1;var o=e-s;if(o>0){this.removeConditionsAndOperators(s,o)}this.createMissingConditionsAndOperators()}}this.lastUiCompletePosition=i};i.prototype.updateConditionStatusesAndValues=function(t,i){var n=this;this.eTypes.forEach((function(i,r){var e=n.isConditionDisabled(r,t);i.setDisabled(e||n.filterListOptions.length<=1);if(r===1){Br(n.eJoinOperatorPanels[0],e);n.eJoinOperatorsAnd[0].setDisabled(e);n.eJoinOperatorsOr[0].setDisabled(e)}}));this.eConditionBodies.forEach((function(t,i){Lr(t,n.isConditionBodyVisible(i))}));var r=(i!==null&&i!==void 0?i:this.getJoinOperator())==="OR";this.eJoinOperatorsAnd.forEach((function(t,i){t.setValue(!r,true)}));this.eJoinOperatorsOr.forEach((function(t,i){t.setValue(r,true)}));this.forEachInput((function(i,r,e,s){n.setElementDisplayed(i,r<s);n.setElementDisabled(i,n.isConditionDisabled(e,t))}));this.resetPlaceholder()};i.prototype.shouldAddNewConditionAtEnd=function(t){return t&&this.getNumConditions()<this.maxNumConditions&&!this.isReadOnly()};i.prototype.removeConditionsAndOperators=function(t,i){if(t>=this.getNumConditions()){return}this.removeComponents(this.eTypes,t,i);this.removeElements(this.eConditionBodies,t,i);this.removeValueElements(t,i);var n=Math.max(t-1,0);this.removeElements(this.eJoinOperatorPanels,n,i);this.removeComponents(this.eJoinOperatorsAnd,n,i);this.removeComponents(this.eJoinOperatorsOr,n,i)};i.prototype.removeElements=function(t,i,n){var r=this.removeItems(t,i,n);r.forEach((function(t){return ie(t)}))};i.prototype.removeComponents=function(t,i,n){var r=this;var e=this.removeItems(t,i,n);e.forEach((function(t){ie(t.getGui());r.destroyBean(t)}))};i.prototype.removeItems=function(t,i,n){return n==null?t.splice(i):t.splice(i,n)};i.prototype.afterGuiAttached=function(i){t.prototype.afterGuiAttached.call(this,i);this.resetPlaceholder();if(!(i===null||i===void 0?void 0:i.suppressFocus)){if(this.isReadOnly()){this.eFilterBody.focus()}else{var n=this.getInputs(0)[0];if(!n){return}if(n instanceof Xs){n.getInputElement().focus()}}}};i.prototype.afterGuiDetached=function(){t.prototype.afterGuiDetached.call(this);var i=this.getModel();if(!this.areModelsEqual(i,this.getModelFromUi())||this.hasInvalidInputs()){this.resetUiToActiveModel(i)}var n=-1;var r=-1;var e=false;var s=this.getJoinOperator();for(var o=this.getNumConditions()-1;o>=0;o--){if(this.isConditionUiComplete(o)){if(n===-1){n=o;r=o}}else{var u=o>=this.numAlwaysVisibleConditions&&!this.isConditionUiComplete(o-1);var a=o<n;if(u||a){this.removeConditionsAndOperators(o,1);e=true;if(a){r--}}}}var f=false;if(this.getNumConditions()<this.numAlwaysVisibleConditions){this.createMissingConditionsAndOperators();f=true}if(this.shouldAddNewConditionAtEnd(r===this.getNumConditions()-1)){this.createJoinOperatorPanel();this.createOption();f=true}if(f){this.updateConditionStatusesAndValues(r,s)}if(e){this.updateJoinOperatorsDisabled()}this.lastUiCompletePosition=r};i.prototype.getPlaceholderText=function(t,i){var n=this.translate(t);if(I(this.filterPlaceholder)){var r=this.filterPlaceholder;var e=this.eTypes[i].getValue();var s=this.translate(e);n=r({filterOptionKey:e,filterOption:s,placeholder:n})}else if(typeof this.filterPlaceholder==="string"){n=this.filterPlaceholder}return n};i.prototype.resetPlaceholder=function(){var t=this;var i=this.localeService.getLocaleTextFunc();this.forEachInput((function(n,r,e,s){if(!(n instanceof Xs)){return}var o=r===0&&s>1?"inRangeStart":r===0?"filterOoo":"inRangeEnd";var u=r===0&&s>1?i("ariaFilterFromValue","Filter from value"):r===0?i("ariaFilterValue","Filter Value"):i("ariaFilterToValue","Filter to Value");n.setInputPlaceholder(t.getPlaceholderText(o,e));n.setInputAriaLabel(u)}))};i.prototype.setElementValue=function(t,i,n){if(t instanceof Xs){t.setValue(i!=null?String(i):null,true)}};i.prototype.setElementDisplayed=function(t,i){if(t instanceof vs){Lr(t.getGui(),i)}};i.prototype.setElementDisabled=function(t,i){if(t instanceof vs){Br(t.getGui(),i)}};i.prototype.attachElementOnChange=function(t,i){if(t instanceof Xs){t.onValueChange(i)}};i.prototype.forEachInput=function(t){var i=this;this.getConditionTypes().forEach((function(n,r){i.forEachPositionTypeInput(r,n,t)}))};i.prototype.forEachPositionInput=function(t,i){var n=this.getConditionType(t);this.forEachPositionTypeInput(t,n,i)};i.prototype.forEachPositionTypeInput=function(t,i,n){var r=this.getNumberOfInputs(i);var e=this.getInputs(t);for(var s=0;s<e.length;s++){var o=e[s];if(o!=null){n(o,s,t,r)}}};i.prototype.isConditionDisabled=function(t,i){if(this.isReadOnly()){return true}if(t===0){return false}return t>i+1};i.prototype.isConditionBodyVisible=function(t){var i=this.getConditionType(t);var n=this.getNumberOfInputs(i);return n>0};i.prototype.isConditionUiComplete=function(t){if(t>=this.getNumConditions()){return false}var n=this.getConditionType(t);if(n===i.EMPTY){return false}if(this.getValues(t).some((function(t){return t==null}))){return false}return true};i.prototype.getNumConditions=function(){return this.eTypes.length};i.prototype.getUiCompleteConditions=function(){var t=[];for(var i=0;i<this.getNumConditions();i++){if(this.isConditionUiComplete(i)){t.push(this.createCondition(i))}}return t};i.prototype.createMissingConditionsAndOperators=function(){if(this.isReadOnly()){return}for(var t=this.getNumConditions();t<this.numAlwaysVisibleConditions;t++){this.createJoinOperatorPanel();this.createOption()}};i.prototype.resetUiToDefaults=function(t){var i=this;this.removeConditionsAndOperators(this.isReadOnly()?1:this.numAlwaysVisibleConditions);this.eTypes.forEach((function(t){return i.resetType(t)}));this.eJoinOperatorsAnd.forEach((function(t,n){return i.resetJoinOperatorAnd(t,n,i.joinOperatorId+n)}));this.eJoinOperatorsOr.forEach((function(t,n){return i.resetJoinOperatorOr(t,n,i.joinOperatorId+n)}));this.joinOperatorId++;this.forEachInput((function(t){return i.resetInput(t)}));this.resetPlaceholder();this.createMissingConditionsAndOperators();this.lastUiCompletePosition=null;if(!t){this.onUiChanged()}return ns.resolve()};i.prototype.resetType=function(t){var i=this.localeService.getLocaleTextFunc();var n=i("ariaFilteringOperator","Filtering operator");t.setValue(this.optionsFactory.getDefaultOption(),true).setAriaLabel(n).setDisabled(this.isReadOnly()||this.filterListOptions.length<=1)};i.prototype.resetJoinOperatorAnd=function(t,i,n){this.resetJoinOperator(t,i,this.isDefaultOperator("AND"),this.translate("andCondition"),n)};i.prototype.resetJoinOperatorOr=function(t,i,n){this.resetJoinOperator(t,i,this.isDefaultOperator("OR"),this.translate("orCondition"),n)};i.prototype.resetJoinOperator=function(t,i,n,r,e){this.updateJoinOperatorDisabled(t.setValue(n,true).setName("ag-simple-filter-and-or-"+this.getCompId()+"-"+e).setLabel(r),i)};i.prototype.updateJoinOperatorsDisabled=function(){var t=this;this.eJoinOperatorsAnd.forEach((function(i,n){return t.updateJoinOperatorDisabled(i,n)}));this.eJoinOperatorsOr.forEach((function(i,n){return t.updateJoinOperatorDisabled(i,n)}))};i.prototype.updateJoinOperatorDisabled=function(t,i){t.setDisabled(this.isReadOnly()||i>0)};i.prototype.resetInput=function(t){this.setElementValue(t,null);this.setElementDisabled(t,this.isReadOnly())};i.prototype.setConditionIntoUi=function(t,i){var n=this;var r=this.mapValuesFromModel(t);this.forEachInput((function(t,e,s,o){if(s!==i){return}n.setElementValue(t,r[e]!=null?r[e]:null)}))};i.prototype.setValueFromFloatingFilter=function(t){var i=this;this.forEachInput((function(n,r,e,s){i.setElementValue(n,r===0&&e===0?t:null,true)}))};i.prototype.isDefaultOperator=function(t){return t===this.defaultJoinOperator};i.prototype.addChangedListeners=function(t,i){var n=this;if(this.isReadOnly()){return}t.onValueChange(this.listener);this.forEachPositionInput(i,(function(t){n.attachElementOnChange(t,n.listener)}))};i.prototype.individualConditionPasses=function(t,i){var n=this.getCellValue(t.node);var r=this.mapValuesFromModel(i);var e=this.optionsFactory.getCustomOption(i.type);var s=this.evaluateCustomFilter(e,r,n);if(s!=null){return s}if(n==null){return this.evaluateNullValue(i.type)}return this.evaluateNonNullValue(r,n,i,t)};i.prototype.evaluateCustomFilter=function(t,i,n){if(t==null){return}var r=t.predicate;if(r!=null&&!i.some((function(t){return t==null}))){return r(i,n)}return};i.prototype.isBlank=function(t){return t==null||typeof t==="string"&&t.trim().length===0};i.prototype.hasInvalidInputs=function(){return false};i.EMPTY="empty";i.BLANK="blank";i.NOT_BLANK="notBlank";i.EQUALS="equals";i.NOT_EQUAL="notEqual";i.LESS_THAN="lessThan";i.LESS_THAN_OR_EQUAL="lessThanOrEqual";i.GREATER_THAN="greaterThan";i.GREATER_THAN_OR_EQUAL="greaterThanOrEqual";i.IN_RANGE="inRange";i.CONTAINS="contains";i.NOT_CONTAINS="notContains";i.STARTS_WITH="startsWith";i.ENDS_WITH="endsWith";return i}(Ps);var fo=function(){var t=function(i,n){t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var n in i)if(Object.prototype.hasOwnProperty.call(i,n))t[n]=i[n]};return t(i,n)};return function(i,n){if(typeof n!=="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(i,n);function r(){this.constructor=i}i.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}();var ho=function(t){fo(i,t);function i(){return t!==null&&t.apply(this,arguments)||this}i.prototype.setParams=function(i){t.prototype.setParams.call(this,i);this.scalarFilterParams=i};i.prototype.evaluateNullValue=function(t){switch(t){case i.EQUALS:case i.NOT_EQUAL:if(this.scalarFilterParams.includeBlanksInEquals){return true}break;case i.GREATER_THAN:case i.GREATER_THAN_OR_EQUAL:if(this.scalarFilterParams.includeBlanksInGreaterThan){return true}break;case i.LESS_THAN:case i.LESS_THAN_OR_EQUAL:if(this.scalarFilterParams.includeBlanksInLessThan){return true}break;case i.IN_RANGE:if(this.scalarFilterParams.includeBlanksInRange){return true}break;case i.BLANK:return true;case i.NOT_BLANK:return false}return false};i.prototype.evaluateNonNullValue=function(t,n,r){var e=this.comparator();var s=t[0]!=null?e(t[0],n):0;switch(r.type){case i.EQUALS:return s===0;case i.NOT_EQUAL:return s!==0;case i.GREATER_THAN:return s>0;case i.GREATER_THAN_OR_EQUAL:return s>=0;case i.LESS_THAN:return s<0;case i.LESS_THAN_OR_EQUAL:return s<=0;case i.IN_RANGE:{var o=e(t[1],n);return this.scalarFilterParams.inRangeInclusive?s>=0&&o<=0:s>0&&o<0}case i.BLANK:return this.isBlank(n);case i.NOT_BLANK:return!this.isBlank(n);default:console.warn('AG Grid: Unexpected type of filter "'+r.type+'", it looks like the filter was configured with incorrect Filter Options');return true}};return i}(ao);var co=function(){var t=function(i,n){t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var n in i)if(Object.prototype.hasOwnProperty.call(i,n))t[n]=i[n]};return t(i,n)};return function(i,n){if(typeof n!=="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(i,n);function r(){this.constructor=i}i.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}();var lo=function(){lo=Object.assign||function(t){for(var i,n=1,r=arguments.length;n<r;n++){i=arguments[n];for(var e in i)if(Object.prototype.hasOwnProperty.call(i,e))t[e]=i[e]}return t};return lo.apply(this,arguments)};var vo=function(t,i,n,r){var e=arguments.length,s=e<3?i:r===null?r=Object.getOwnPropertyDescriptor(i,n):r,o;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")s=Reflect.decorate(t,i,n,r);else for(var u=t.length-1;u>=0;u--)if(o=t[u])s=(e<3?o(s):e>3?o(i,n,s):o(i,n))||s;return e>3&&s&&Object.defineProperty(i,n,s),s};var po=1e3;var go=Infinity;var bo=function(t){co(i,t);function i(i,n,r){var e=t.call(this,n,r)||this;e.dateFilterParams=i;return e}i.prototype.conditionToString=function(t,i){var n=t.type;var r=(i||{}).numberOfInputs;var e=n==ao.IN_RANGE||r===2;var s=Tr(t.dateFrom);var o=Tr(t.dateTo);var u=this.dateFilterParams.inRangeFloatingFilterDateFormat;if(e){var a=s!==null?kr(s,u):"null";var f=o!==null?kr(o,u):"null";return a+"-"+f}if(s!=null){return kr(s,u)}return""+n};i.prototype.updateParams=function(i){t.prototype.updateParams.call(this,i);this.dateFilterParams=i.dateFilterParams};return i}(uo);var wo=function(t){co(i,t);function i(){var i=t.call(this,"dateFilter")||this;i.eConditionPanelsFrom=[];i.eConditionPanelsTo=[];i.dateConditionFromComps=[];i.dateConditionToComps=[];i.minValidYear=po;i.maxValidYear=go;i.minValidDate=null;i.maxValidDate=null;return i}i.prototype.afterGuiAttached=function(i){t.prototype.afterGuiAttached.call(this,i);this.dateConditionFromComps[0].afterGuiAttached(i)};i.prototype.mapValuesFromModel=function(t){var i=t||{},n=i.dateFrom,r=i.dateTo,e=i.type;return[n&&Tr(n)||null,r&&Tr(r)||null].slice(0,this.getNumberOfInputs(e))};i.prototype.comparator=function(){return this.dateFilterParams.comparator?this.dateFilterParams.comparator:this.defaultComparator.bind(this)};i.prototype.defaultComparator=function(t,i){var n=i;if(i==null||n<t){return-1}if(n>t){return 1}return 0};i.prototype.setParams=function(i){this.dateFilterParams=i;t.prototype.setParams.call(this,i);var n=function(t,n){if(i[t]!=null){if(!isNaN(i[t])){return i[t]==null?n:Number(i[t])}else{console.warn("AG Grid: DateFilter "+t+" is not a number")}}return n};this.minValidYear=n("minValidYear",po);this.maxValidYear=n("maxValidYear",go);if(this.minValidYear>this.maxValidYear){console.warn("AG Grid: DateFilter minValidYear should be <= maxValidYear")}if(i.minValidDate){this.minValidDate=i.minValidDate instanceof Date?i.minValidDate:Tr(i.minValidDate)}else{this.minValidDate=null}if(i.maxValidDate){this.maxValidDate=i.maxValidDate instanceof Date?i.maxValidDate:Tr(i.maxValidDate)}else{this.maxValidDate=null}if(this.minValidDate&&this.maxValidDate&&this.minValidDate>this.maxValidDate){console.warn("AG Grid: DateFilter minValidDate should be <= maxValidDate")}this.filterModelFormatter=new bo(this.dateFilterParams,this.localeService,this.optionsFactory)};i.prototype.createDateCompWrapper=function(t){var i=this;var n=new Ss(this.getContext(),this.userComponentFactory,{onDateChanged:function(){return i.onUiChanged()},filterParams:this.dateFilterParams},t);this.addDestroyFunc((function(){return n.destroy()}));return n};i.prototype.setElementValue=function(t,i){t.setDate(i)};i.prototype.setElementDisplayed=function(t,i){t.setDisplayed(i)};i.prototype.setElementDisabled=function(t,i){t.setDisabled(i)};i.prototype.getDefaultFilterOptions=function(){return i.DEFAULT_FILTER_OPTIONS};i.prototype.createValueElement=function(){var t=document.createElement("div");t.classList.add("ag-filter-body");this.createFromToElement(t,this.eConditionPanelsFrom,this.dateConditionFromComps,"from");this.createFromToElement(t,this.eConditionPanelsTo,this.dateConditionToComps,"to");return t};i.prototype.createFromToElement=function(t,i,n,r){var e=document.createElement("div");e.classList.add("ag-filter-"+r);e.classList.add("ag-filter-date-"+r);i.push(e);t.appendChild(e);n.push(this.createDateCompWrapper(e))};i.prototype.removeValueElements=function(t,i){this.removeDateComps(this.dateConditionFromComps,t,i);this.removeDateComps(this.dateConditionToComps,t,i);this.removeItems(this.eConditionPanelsFrom,t,i);this.removeItems(this.eConditionPanelsTo,t,i)};i.prototype.removeDateComps=function(t,i,n){var r=this.removeItems(t,i,n);r.forEach((function(t){return t.destroy()}))};i.prototype.isValidDateValue=function(t){if(t===null){return false}if(this.minValidDate){if(t<this.minValidDate){return false}}else{if(t.getUTCFullYear()<this.minValidYear){return false}}if(this.maxValidDate){if(t>this.maxValidDate){return false}}else{if(t.getUTCFullYear()>this.maxValidYear){return false}}return true};i.prototype.isConditionUiComplete=function(i){var n=this;if(!t.prototype.isConditionUiComplete.call(this,i)){return false}var r=true;this.forEachInput((function(t,e,s,o){if(s!==i||!r||e>=o){return}r=r&&n.isValidDateValue(t.getDate())}));return r};i.prototype.areSimpleModelsEqual=function(t,i){return t.dateFrom===i.dateFrom&&t.dateTo===i.dateTo&&t.type===i.type};i.prototype.getFilterType=function(){return"date"};i.prototype.createCondition=function(t){var i=this.getConditionType(t);var n={};var r=this.getValues(t);if(r.length>0){n.dateFrom=Ar(r[0])}if(r.length>1){n.dateTo=Ar(r[1])}return lo({dateFrom:null,dateTo:null,filterType:this.getFilterType(),type:i},n)};i.prototype.resetPlaceholder=function(){var t=this.localeService.getLocaleTextFunc();var i=this.translate("dateFormatOoo");var n=t("ariaFilterValue","Filter Value");this.forEachInput((function(t){t.setInputPlaceholder(i);t.setInputAriaLabel(n)}))};i.prototype.getInputs=function(t){if(t>=this.dateConditionFromComps.length){return[null,null]}return[this.dateConditionFromComps[t],this.dateConditionToComps[t]]};i.prototype.getValues=function(t){var i=[];this.forEachPositionInput(t,(function(t,n,r,e){if(n<e){i.push(t.getDate())}}));return i};i.prototype.getModelAsString=function(t){var i;return(i=this.filterModelFormatter.getModelAsString(t))!==null&&i!==void 0?i:""};i.DEFAULT_FILTER_OPTIONS=[ho.EQUALS,ho.GREATER_THAN,ho.LESS_THAN,ho.NOT_EQUAL,ho.IN_RANGE,ho.BLANK,ho.NOT_BLANK];vo([ut("userComponentFactory")],i.prototype,"userComponentFactory",void 0);return i}(ho);var yo=function(){var t=function(i,n){t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var n in i)if(Object.prototype.hasOwnProperty.call(i,n))t[n]=i[n]};return t(i,n)};return function(i,n){if(typeof n!=="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(i,n);function r(){this.constructor=i}i.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}();var mo=function(t){yo(i,t);function i(){return t!==null&&t.apply(this,arguments)||this}i.prototype.getDefaultDebounceMs=function(){return 0};i.prototype.destroy=function(){t.prototype.destroy.call(this)};i.prototype.isEventFromFloatingFilter=function(t){return t&&t.afterFloatingFilter};i.prototype.isEventFromDataChange=function(t){return t===null||t===void 0?void 0:t.afterDataChange};i.prototype.getLastType=function(){return this.lastType};i.prototype.isReadOnly=function(){return this.readOnly};i.prototype.setLastTypeFromModel=function(t){if(!t){this.lastType=this.optionsFactory.getDefaultOption();return}var i=t.operator;var n;if(i){var r=t;n=r.conditions[0]}else{n=t}this.lastType=n.type};i.prototype.canWeEditAfterModelFromParentFilter=function(t){if(!t){return this.isTypeEditable(this.lastType)}var i=t.operator;if(i){return false}var n=t;return this.isTypeEditable(n.type)};i.prototype.init=function(t){this.setSimpleParams(t)};i.prototype.setSimpleParams=function(t){this.optionsFactory=new Cs;this.optionsFactory.init(t.filterParams,this.getDefaultFilterOptions());this.lastType=this.optionsFactory.getDefaultOption();this.readOnly=!!t.filterParams.readOnly;var i=this.isTypeEditable(this.lastType);this.setEditable(i)};i.prototype.onParamsUpdated=function(t){this.setSimpleParams(t)};i.prototype.doesFilterHaveSingleInput=function(t){var i=this.optionsFactory.getCustomOption(t);var n=(i||{}).numberOfInputs;return n==null||n==1};i.prototype.isTypeEditable=function(t){var i=[ao.IN_RANGE,ao.EMPTY,ao.BLANK,ao.NOT_BLANK];return!!t&&!this.isReadOnly()&&this.doesFilterHaveSingleInput(t)&&i.indexOf(t)<0};return i}(vs);var So=function(){var t=function(i,n){t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var n in i)if(Object.prototype.hasOwnProperty.call(i,n))t[n]=i[n]};return t(i,n)};return function(i,n){if(typeof n!=="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(i,n);function r(){this.constructor=i}i.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}();var Co=function(t,i,n,r){var e=arguments.length,s=e<3?i:r===null?r=Object.getOwnPropertyDescriptor(i,n):r,o;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")s=Reflect.decorate(t,i,n,r);else for(var u=t.length-1;u>=0;u--)if(o=t[u])s=(e<3?o(s):e>3?o(i,n,s):o(i,n))||s;return e>3&&s&&Object.defineProperty(i,n,s),s};var Oo=function(t){So(i,t);function i(){return t.call(this,'\n <div class="ag-floating-filter-input" role="presentation">\n <ag-input-text-field ref="eReadOnlyText"></ag-input-text-field>\n <div ref="eDateWrapper" style="display: flex;"></div>\n </div>')||this}i.prototype.getDefaultFilterOptions=function(){return wo.DEFAULT_FILTER_OPTIONS};i.prototype.init=function(i){t.prototype.init.call(this,i);this.params=i;this.filterParams=i.filterParams;this.createDateComponent();this.filterModelFormatter=new bo(this.filterParams,this.localeService,this.optionsFactory);var n=this.localeService.getLocaleTextFunc();this.eReadOnlyText.setDisabled(true).setInputAriaLabel(n("ariaDateFilterInput","Date Filter Input"))};i.prototype.onParamsUpdated=function(i){t.prototype.onParamsUpdated.call(this,i);this.params=i;this.filterParams=i.filterParams;this.updateDateComponent();this.filterModelFormatter.updateParams({optionsFactory:this.optionsFactory,dateFilterParams:this.filterParams})};i.prototype.setEditable=function(t){Lr(this.eDateWrapper,t);Lr(this.eReadOnlyText.getGui(),!t)};i.prototype.onParentModelChanged=function(i,n){if(this.isEventFromFloatingFilter(n)||this.isEventFromDataChange(n)){return}t.prototype.setLastTypeFromModel.call(this,i);var r=!this.isReadOnly()&&this.canWeEditAfterModelFromParentFilter(i);this.setEditable(r);if(r){if(i){var e=i;this.dateComp.setDate(Tr(e.dateFrom))}else{this.dateComp.setDate(null)}this.eReadOnlyText.setValue("")}else{this.eReadOnlyText.setValue(this.filterModelFormatter.getModelAsString(i));this.dateComp.setDate(null)}};i.prototype.onDateChanged=function(){var t=this;var i=this.dateComp.getDate();var n=Ar(i);this.params.parentFilterInstance((function(i){if(i){var r=Tr(n);i.onFloatingFilterChanged(t.getLastType()||null,r)}}))};i.prototype.getDateComponentParams=function(){var t=Ps.getDebounceMs(this.params.filterParams,this.getDefaultDebounceMs());return{onDateChanged:z(this.onDateChanged.bind(this),t),filterParams:this.params.column.getColDef().filterParams}};i.prototype.createDateComponent=function(){var t=this;this.dateComp=new Ss(this.getContext(),this.userComponentFactory,this.getDateComponentParams(),this.eDateWrapper);this.addDestroyFunc((function(){return t.dateComp.destroy()}))};i.prototype.updateDateComponent=function(){var t=this.getDateComponentParams();var i=this.gridOptionsService,n=i.api,r=i.columnApi,e=i.context;t.api=n;t.columnApi=r;t.context=e;this.dateComp.updateParams(t)};i.prototype.getFilterModelFormatter=function(){return this.filterModelFormatter};Co([ut("userComponentFactory")],i.prototype,"userComponentFactory",void 0);Co([ds("eReadOnlyText")],i.prototype,"eReadOnlyText",void 0);Co([ds("eDateWrapper")],i.prototype,"eDateWrapper",void 0);return i}(mo);var jo=function(){var t=function(i,n){t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var n in i)if(Object.prototype.hasOwnProperty.call(i,n))t[n]=i[n]};return t(i,n)};return function(i,n){if(typeof n!=="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(i,n);function r(){this.constructor=i}i.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}();var Ro=function(t,i,n,r){var e=arguments.length,s=e<3?i:r===null?r=Object.getOwnPropertyDescriptor(i,n):r,o;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")s=Reflect.decorate(t,i,n,r);else for(var u=t.length-1;u>=0;u--)if(o=t[u])s=(e<3?o(s):e>3?o(i,n,s):o(i,n))||s;return e>3&&s&&Object.defineProperty(i,n,s),s};var xo=function(t,i){var n=typeof Symbol==="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),e,s=[],o;try{while((i===void 0||i-- >0)&&!(e=r.next()).done)s.push(e.value)}catch(t){o={error:t}}finally{try{if(e&&!e.done&&(n=r["return"]))n.call(r)}finally{if(o)throw o.error}}return s};var _o=function(t){jo(i,t);function i(){return t.call(this,'\n <div class="ag-filter-filter">\n <ag-input-text-field class="ag-date-filter" ref="eDateInput"></ag-input-text-field>\n </div>')||this}i.prototype.destroy=function(){t.prototype.destroy.call(this)};i.prototype.init=function(t){var i=this;this.params=t;this.setParams(t);var n=this.gridOptionsService.getDocument();var r=this.eDateInput.getInputElement();this.addManagedListener(r,"mousedown",(function(){if(i.eDateInput.isDisabled()||i.usingSafariDatePicker){return}r.focus()}));this.addManagedListener(r,"input",(function(t){if(t.target!==n.activeElement){return}if(i.eDateInput.isDisabled()){return}i.params.onDateChanged()}))};i.prototype.setParams=function(t){var i=this.eDateInput.getInputElement();var n=this.shouldUseBrowserDatePicker(t);this.usingSafariDatePicker=n&&nr();i.type=n?"date":"text";var r=t.filterParams||{},e=r.minValidYear,s=r.maxValidYear,o=r.minValidDate,u=r.maxValidDate;if(o&&e){P((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")}if(u&&s){P((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")}if(o&&u){var a=xo([o,u].map((function(t){return t instanceof Date?t:Tr(t)})),2),f=a[0],h=a[1];if(f&&h&&f.getTime()>h.getTime()){P((function(){return console.warn("AG Grid: DateFilter parameter minValidDate should always be lower than or equal to parameter maxValidDate.")}),"DateFilter.minValidDateAndMaxValidDateWarning")}}if(o){if(o instanceof Date){i.min=kr(o)}else{i.min=o}}else{if(e){i.min=e+"-01-01"}}if(u){if(u instanceof Date){i.max=kr(u)}else{i.max=u}}else{if(s){i.max=s+"-12-31"}}};i.prototype.onParamsUpdated=function(t){this.params=t;this.setParams(t)};i.prototype.getDate=function(){return Tr(this.eDateInput.getValue())};i.prototype.setDate=function(t){this.eDateInput.setValue(Ar(t,false))};i.prototype.setInputPlaceholder=function(t){this.eDateInput.setInputPlaceholder(t)};i.prototype.setDisabled=function(t){this.eDateInput.setDisabled(t)};i.prototype.afterGuiAttached=function(t){if(!t||!t.suppressFocus){this.eDateInput.getInputElement().focus()}};i.prototype.shouldUseBrowserDatePicker=function(t){if(t.filterParams&&t.filterParams.browserDatePicker!=null){return t.filterParams.browserDatePicker}return er()||sr()||nr()&&rr()>=14.1};Ro([ds("eDateInput")],i.prototype,"eDateInput",void 0);return i}(vs);var Ao=function(){var t=function(i,n){t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var n in i)if(Object.prototype.hasOwnProperty.call(i,n))t[n]=i[n]};return t(i,n)};return function(i,n){if(typeof n!=="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(i,n);function r(){this.constructor=i}i.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}();var Fo=function(t){Ao(n,t);function n(i,n,r){if(n===void 0){n="ag-text-field"}if(r===void 0){r="text"}return t.call(this,i,n,r)||this}n.prototype.postConstruct=function(){t.prototype.postConstruct.call(this);if(this.config.allowedCharPattern){this.preventDisallowedCharacters()}};n.prototype.setValue=function(n,r){if(this.eInput.value!==n){this.eInput.value=i(n)?n:""}return t.prototype.setValue.call(this,n,r)};n.prototype.setStartValue=function(t){this.setValue(t,true)};n.prototype.preventDisallowedCharacters=function(){var t=new RegExp("["+this.config.allowedCharPattern+"]");var i=function(i){if(!Ne(i)){return}if(i.key&&!t.test(i.key)){i.preventDefault()}};this.addManagedListener(this.eInput,"keydown",i);this.addManagedListener(this.eInput,"paste",(function(i){var n;var r=(n=i.clipboardData)===null||n===void 0?void 0:n.getData("text");if(r&&r.split("").some((function(i){return!t.test(i)}))){i.preventDefault()}}))};return n}(Xs);var ko=function(){var t=function(i,n){t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var n in i)if(Object.prototype.hasOwnProperty.call(i,n))t[n]=i[n]};return t(i,n)};return function(i,n){if(typeof n!=="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(i,n);function r(){this.constructor=i}i.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}();var To=function(t){ko(n,t);function n(i){return t.call(this,i,"ag-number-field","number")||this}n.prototype.postConstruct=function(){var i=this;t.prototype.postConstruct.call(this);this.addManagedListener(this.eInput,"blur",(function(){var t=parseFloat(i.eInput.value);var n=isNaN(t)?"":i.normalizeValue(t.toString());if(i.value!==n){i.setValue(n)}}));this.addManagedListener(this.eInput,"wheel",this.onWheel.bind(this));this.eInput.step="any"};n.prototype.onWheel=function(t){if(document.activeElement===this.eInput){t.preventDefault()}};n.prototype.normalizeValue=function(t){if(t===""){return""}if(this.precision!=null){t=this.adjustPrecision(t)}var i=parseFloat(t);if(this.min!=null&&i<this.min){t=this.min.toString()}else if(this.max!=null&&i>this.max){t=this.max.toString()}return t};n.prototype.adjustPrecision=function(t,i){if(this.precision==null){return t}if(i){var n=parseFloat(t).toFixed(this.precision);return parseFloat(n).toString()}var r=String(t).split(".");if(r.length>1){if(r[1].length<=this.precision){return t}else if(this.precision>0){return r[0]+"."+r[1].slice(0,this.precision)}}return r[0]};n.prototype.setMin=function(t){if(this.min===t){return this}this.min=t;Oe(this.eInput,"min",t);return this};n.prototype.setMax=function(t){if(this.max===t){return this}this.max=t;Oe(this.eInput,"max",t);return this};n.prototype.setPrecision=function(t){this.precision=t;return this};n.prototype.setStep=function(t){if(this.step===t){return this}this.step=t;Oe(this.eInput,"step",t);return this};n.prototype.setValue=function(i,n){var r=this;return this.setValueOrInputValue((function(i){return t.prototype.setValue.call(r,i,n)}),(function(){return r}),i)};n.prototype.setStartValue=function(i){var n=this;return this.setValueOrInputValue((function(i){return t.prototype.setValue.call(n,i,true)}),(function(t){n.eInput.value=t}),i)};n.prototype.setValueOrInputValue=function(t,n,r){if(i(r)){var e=this.isScientificNotation(r);if(e&&this.eInput.validity.valid){return t(r)}if(!e){r=this.adjustPrecision(r);var s=this.normalizeValue(r);e=r!=s}if(e){return n(r)}}return t(r)};n.prototype.getValue=function(){if(!this.eInput.validity.valid){return undefined}var i=this.eInput.value;if(this.isScientificNotation(i)){return this.adjustPrecision(i,true)}return t.prototype.getValue.call(this)};n.prototype.isScientificNotation=function(t){return typeof t==="string"&&t.includes("e")};return n}(Fo);var Mo=function(){var t=function(i,n){t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var n in i)if(Object.prototype.hasOwnProperty.call(i,n))t[n]=i[n]};return t(i,n)};return function(i,n){if(typeof n!=="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(i,n);function r(){this.constructor=i}i.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}();var Do=function(t){Mo(i,t);function i(){return t!==null&&t.apply(this,arguments)||this}i.prototype.conditionToString=function(t,i){var n=(i||{}).numberOfInputs;var r=t.type==ao.IN_RANGE||n===2;if(r){return this.formatValue(t.filter)+"-"+this.formatValue(t.filterTo)}if(t.filter!=null){return this.formatValue(t.filter)}return""+t.type};return i}(uo);function Go(t){var i=(t!==null&&t!==void 0?t:{}).allowedCharPattern;return i!==null&&i!==void 0?i:null}var Po=function(i){Mo(n,i);function n(){var t=i.call(this,"numberFilter")||this;t.eValuesFrom=[];t.eValuesTo=[];return t}n.prototype.mapValuesFromModel=function(t){var i=t||{},n=i.filter,r=i.filterTo,e=i.type;return[this.processValue(n),this.processValue(r)].slice(0,this.getNumberOfInputs(e))};n.prototype.getDefaultDebounceMs=function(){return 500};n.prototype.comparator=function(){return function(t,i){if(t===i){return 0}return t<i?1:-1}};n.prototype.setParams=function(t){this.numberFilterParams=t;i.prototype.setParams.call(this,t);this.filterModelFormatter=new Do(this.localeService,this.optionsFactory,this.numberFilterParams.numberFormatter)};n.prototype.getDefaultFilterOptions=function(){return n.DEFAULT_FILTER_OPTIONS};n.prototype.setElementValue=function(t,n,r){var e=!r&&this.numberFilterParams.numberFormatter?this.numberFilterParams.numberFormatter(n!==null&&n!==void 0?n:null):n;i.prototype.setElementValue.call(this,t,e)};n.prototype.createValueElement=function(){var t=Go(this.numberFilterParams);var i=document.createElement("div");i.classList.add("ag-filter-body");bn(i,"presentation");this.createFromToElement(i,this.eValuesFrom,"from",t);this.createFromToElement(i,this.eValuesTo,"to",t);return i};n.prototype.createFromToElement=function(t,i,n,r){var e=this.createManagedBean(r?new Fo({allowedCharPattern:r}):new To);e.addCssClass("ag-filter-"+n);e.addCssClass("ag-filter-filter");i.push(e);t.appendChild(e.getGui())};n.prototype.removeValueElements=function(t,i){this.removeComponents(this.eValuesFrom,t,i);this.removeComponents(this.eValuesTo,t,i)};n.prototype.getValues=function(t){var i=this;var n=[];this.forEachPositionInput(t,(function(t,r,e,s){if(r<s){n.push(i.processValue(i.stringToFloat(t.getValue())))}}));return n};n.prototype.areSimpleModelsEqual=function(t,i){return t.filter===i.filter&&t.filterTo===i.filterTo&&t.type===i.type};n.prototype.getFilterType=function(){return"number"};n.prototype.processValue=function(t){if(t==null){return null}return isNaN(t)?null:t};n.prototype.stringToFloat=function(i){if(typeof i==="number"){return i}var n=t(i);if(n!=null&&n.trim()===""){n=null}if(this.numberFilterParams.numberParser){return this.numberFilterParams.numberParser(n)}return n==null||n.trim()==="-"?null:parseFloat(n)};n.prototype.createCondition=function(t){var i=this.getConditionType(t);var n={filterType:this.getFilterType(),type:i};var r=this.getValues(t);if(r.length>0){n.filter=r[0]}if(r.length>1){n.filterTo=r[1]}return n};n.prototype.getInputs=function(t){if(t>=this.eValuesFrom.length){return[null,null]}return[this.eValuesFrom[t],this.eValuesTo[t]]};n.prototype.getModelAsString=function(t){var i;return(i=this.filterModelFormatter.getModelAsString(t))!==null&&i!==void 0?i:""};n.prototype.hasInvalidInputs=function(){var t=false;this.forEachInput((function(i){if(!i.getInputElement().validity.valid){t=true;return}}));return t};n.DEFAULT_FILTER_OPTIONS=[ho.EQUALS,ho.NOT_EQUAL,ho.LESS_THAN,ho.LESS_THAN_OR_EQUAL,ho.GREATER_THAN,ho.GREATER_THAN_OR_EQUAL,ho.IN_RANGE,ho.BLANK,ho.NOT_BLANK];return n}(ho);var Eo=function(){var t=function(i,n){t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var n in i)if(Object.prototype.hasOwnProperty.call(i,n))t[n]=i[n]};return t(i,n)};return function(i,n){if(typeof n!=="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(i,n);function r(){this.constructor=i}i.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}();var Io=function(){Io=Object.assign||function(t){for(var i,n=1,r=arguments.length;n<r;n++){i=arguments[n];for(var e in i)if(Object.prototype.hasOwnProperty.call(i,e))t[e]=i[e]}return t};return Io.apply(this,arguments)};var No=function(t){Eo(i,t);function i(){return t!==null&&t.apply(this,arguments)||this}i.prototype.conditionToString=function(t,i){var n=(i||{}).numberOfInputs;var r=t.type==ao.IN_RANGE||n===2;if(r){return t.filter+"-"+t.filterTo}if(t.filter!=null){return""+t.filter}return""+t.type};return i}(uo);var Ho=function(i){Eo(n,i);function n(){var t=i.call(this,"textFilter")||this;t.eValuesFrom=[];t.eValuesTo=[];return t}n.trimInput=function(t){var i=t&&t.trim();return i===""?t:i};n.prototype.getDefaultDebounceMs=function(){return 500};n.prototype.setParams=function(t){this.textFilterParams=t;i.prototype.setParams.call(this,t);this.matcher=this.getTextMatcher();this.formatter=this.textFilterParams.textFormatter||(this.textFilterParams.caseSensitive?n.DEFAULT_FORMATTER:n.DEFAULT_LOWERCASE_FORMATTER);this.filterModelFormatter=new No(this.localeService,this.optionsFactory)};n.prototype.getTextMatcher=function(){var t=this.textFilterParams.textCustomComparator;if(t){Xe.doOnce((function(){return console.warn("AG Grid - textCustomComparator is deprecated, use textMatcher instead.")}),"textCustomComparator.deprecated");return function(i){var n=i.filterOption,r=i.value,e=i.filterText;return t(n,r,e)}}return this.textFilterParams.textMatcher||n.DEFAULT_MATCHER};n.prototype.createCondition=function(t){var i=this.getConditionType(t);var n={filterType:this.getFilterType(),type:i};var r=this.getValuesWithSideEffects(t,true);if(r.length>0){n.filter=r[0]}if(r.length>1){n.filterTo=r[1]}return n};n.prototype.getFilterType=function(){return"text"};n.prototype.areSimpleModelsEqual=function(t,i){return t.filter===i.filter&&t.filterTo===i.filterTo&&t.type===i.type};n.prototype.getInputs=function(t){if(t>=this.eValuesFrom.length){return[null,null]}return[this.eValuesFrom[t],this.eValuesTo[t]]};n.prototype.getValues=function(t){return this.getValuesWithSideEffects(t,false)};n.prototype.getValuesWithSideEffects=function(i,r){var e=this;var s=[];this.forEachPositionInput(i,(function(i,o,u,a){var f;if(o<a){var h=t(i.getValue());if(r&&e.textFilterParams.trimInput){h=(f=n.trimInput(h))!==null&&f!==void 0?f:null;i.setValue(h,true)}s.push(h)}}));return s};n.prototype.getDefaultFilterOptions=function(){return n.DEFAULT_FILTER_OPTIONS};n.prototype.createValueElement=function(){var t=document.createElement("div");t.classList.add("ag-filter-body");bn(t,"presentation");this.createFromToElement(t,this.eValuesFrom,"from");this.createFromToElement(t,this.eValuesTo,"to");return t};n.prototype.createFromToElement=function(t,i,n){var r=this.createManagedBean(new Fo);r.addCssClass("ag-filter-"+n);r.addCssClass("ag-filter-filter");i.push(r);t.appendChild(r.getGui())};n.prototype.removeValueElements=function(t,i){this.removeComponents(this.eValuesFrom,t,i);this.removeComponents(this.eValuesTo,t,i)};n.prototype.mapValuesFromModel=function(t){var i=t||{},n=i.filter,r=i.filterTo,e=i.type;return[n||null,r||null].slice(0,this.getNumberOfInputs(e))};n.prototype.evaluateNullValue=function(t){var i=[ao.NOT_EQUAL,ao.NOT_CONTAINS,ao.BLANK];return t?i.indexOf(t)>=0:false};n.prototype.evaluateNonNullValue=function(t,i,n,r){var e=this;var s=t.map((function(t){return e.formatter(t)}))||[];var o=this.formatter(i);var u=this.textFilterParams,a=u.api,f=u.colDef,h=u.column,c=u.columnApi,l=u.context,v=u.textFormatter;if(n.type===ao.BLANK){return this.isBlank(i)}else if(n.type===ao.NOT_BLANK){return!this.isBlank(i)}var d={api:a,colDef:f,column:h,columnApi:c,context:l,node:r.node,data:r.data,filterOption:n.type,value:o,textFormatter:v};return s.some((function(t){return e.matcher(Io(Io({},d),{filterText:t}))}))};n.prototype.getModelAsString=function(t){var i;return(i=this.filterModelFormatter.getModelAsString(t))!==null&&i!==void 0?i:""};n.DEFAULT_FILTER_OPTIONS=[ao.CONTAINS,ao.NOT_CONTAINS,ao.EQUALS,ao.NOT_EQUAL,ao.STARTS_WITH,ao.ENDS_WITH,ao.BLANK,ao.NOT_BLANK];n.DEFAULT_FORMATTER=function(t){return t};n.DEFAULT_LOWERCASE_FORMATTER=function(t){return t==null?null:t.toString().toLowerCase()};n.DEFAULT_MATCHER=function(t){var i=t.filterOption,r=t.value,e=t.filterText;if(e==null){return false}switch(i){case n.CONTAINS:return r.indexOf(e)>=0;case n.NOT_CONTAINS:return r.indexOf(e)<0;case n.EQUALS:return r===e;case n.NOT_EQUAL:return r!=e;case n.STARTS_WITH:return r.indexOf(e)===0;case n.ENDS_WITH:var s=r.lastIndexOf(e);return s>=0&&s===r.length-e.length;default:return false}};return n}(ao);var Lo=function(){var t=function(i,n){t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var n in i)if(Object.prototype.hasOwnProperty.call(i,n))t[n]=i[n]};return t(i,n)};return function(i,n){if(typeof n!=="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(i,n);function r(){this.constructor=i}i.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}();var Vo=function(t,i,n,r){var e=arguments.length,s=e<3?i:r===null?r=Object.getOwnPropertyDescriptor(i,n):r,o;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")s=Reflect.decorate(t,i,n,r);else for(var u=t.length-1;u>=0;u--)if(o=t[u])s=(e<3?o(s):e>3?o(i,n,s):o(i,n))||s;return e>3&&s&&Object.defineProperty(i,n,s),s};var Bo=function(t){Lo(i,t);function i(i){var n=t.call(this)||this;n.params=i;n.valueChangedListener=function(){};return n}i.prototype.setupGui=function(t){var i=this;var n;this.eFloatingFilterTextInput=this.createManagedBean(new Fo((n=this.params)===null||n===void 0?void 0:n.config));var r=this.eFloatingFilterTextInput.getGui();t.appendChild(r);this.addManagedListener(r,"input",(function(t){return i.valueChangedListener(t)}));this.addManagedListener(r,"keydown",(function(t){return i.valueChangedListener(t)}))};i.prototype.setEditable=function(t){this.eFloatingFilterTextInput.setDisabled(!t)};i.prototype.setAutoComplete=function(t){this.eFloatingFilterTextInput.setAutoComplete(t)};i.prototype.getValue=function(){return this.eFloatingFilterTextInput.getValue()};i.prototype.setValue=function(t,i){this.eFloatingFilterTextInput.setValue(t,i)};i.prototype.setValueChangedListener=function(t){this.valueChangedListener=t};i.prototype.setParams=function(t){this.setAriaLabel(t.ariaLabel);if(t.autoComplete!==undefined){this.setAutoComplete(t.autoComplete)}};i.prototype.setAriaLabel=function(t){this.eFloatingFilterTextInput.setInputAriaLabel(t)};return i}(ri);var zo=function(t){Lo(i,t);function i(){return t!==null&&t.apply(this,arguments)||this}i.prototype.postConstruct=function(){this.setTemplate('\n <div class="ag-floating-filter-input" role="presentation" ref="eFloatingFilterInputContainer"></div>\n ')};i.prototype.getDefaultDebounceMs=function(){return 500};i.prototype.onParentModelChanged=function(t,i){if(this.isEventFromFloatingFilter(i)||this.isEventFromDataChange(i)){return}this.setLastTypeFromModel(t);this.setEditable(this.canWeEditAfterModelFromParentFilter(t));this.floatingFilterInputService.setValue(this.getFilterModelFormatter().getModelAsString(t))};i.prototype.init=function(i){this.setupFloatingFilterInputService(i);t.prototype.init.call(this,i);this.setTextInputParams(i)};i.prototype.setupFloatingFilterInputService=function(t){this.floatingFilterInputService=this.createFloatingFilterInputService(t);this.floatingFilterInputService.setupGui(this.eFloatingFilterInputContainer)};i.prototype.setTextInputParams=function(t){var i;this.params=t;var n=(i=t.browserAutoComplete)!==null&&i!==void 0?i:false;this.floatingFilterInputService.setParams({ariaLabel:this.getAriaLabel(t),autoComplete:n});this.applyActive=Ps.isUseApplyButton(this.params.filterParams);if(!this.isReadOnly()){var r=Ps.getDebounceMs(this.params.filterParams,this.getDefaultDebounceMs());var e=z(this.syncUpWithParentFilter.bind(this),r);this.floatingFilterInputService.setValueChangedListener(e)}};i.prototype.onParamsUpdated=function(i){t.prototype.onParamsUpdated.call(this,i);this.setTextInputParams(i)};i.prototype.recreateFloatingFilterInputService=function(t){var i=this.floatingFilterInputService.getValue();Xr(this.eFloatingFilterInputContainer);this.destroyBean(this.floatingFilterInputService);this.setupFloatingFilterInputService(t);this.floatingFilterInputService.setValue(i,true)};i.prototype.getAriaLabel=function(t){var i=this.columnModel.getDisplayNameForColumn(t.column,"header",true);var n=this.localeService.getLocaleTextFunc();return i+" "+n("ariaFilterInput","Filter Input")};i.prototype.syncUpWithParentFilter=function(t){var i=this;var n=t.key===Te.ENTER;if(this.applyActive&&!n){return}var r=this.floatingFilterInputService.getValue();if(this.params.filterParams.trimInput){r=Ho.trimInput(r);this.floatingFilterInputService.setValue(r,true)}this.params.parentFilterInstance((function(t){if(t){t.onFloatingFilterChanged(i.getLastType()||null,r||null)}}))};i.prototype.setEditable=function(t){this.floatingFilterInputService.setEditable(t)};Vo([ut("columnModel")],i.prototype,"columnModel",void 0);Vo([ds("eFloatingFilterInputContainer")],i.prototype,"eFloatingFilterInputContainer",void 0);Vo([et],i.prototype,"postConstruct",null);return i}(mo);var Wo=function(){var t=function(i,n){t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var n in i)if(Object.prototype.hasOwnProperty.call(i,n))t[n]=i[n]};return t(i,n)};return function(i,n){if(typeof n!=="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(i,n);function r(){this.constructor=i}i.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}();var Uo=function(t){Wo(i,t);function i(){var i=t!==null&&t.apply(this,arguments)||this;i.valueChangedListener=function(){};i.numberInputActive=true;return i}i.prototype.setupGui=function(t){var i=this;this.eFloatingFilterNumberInput=this.createManagedBean(new To);this.eFloatingFilterTextInput=this.createManagedBean(new Fo);this.eFloatingFilterTextInput.setDisabled(true);var n=this.eFloatingFilterNumberInput.getGui();var r=this.eFloatingFilterTextInput.getGui();t.appendChild(n);t.appendChild(r);this.setupListeners(n,(function(t){return i.valueChangedListener(t)}));this.setupListeners(r,(function(t){return i.valueChangedListener(t)}))};i.prototype.setEditable=function(t){this.numberInputActive=t;this.eFloatingFilterNumberInput.setDisplayed(this.numberInputActive);this.eFloatingFilterTextInput.setDisplayed(!this.numberInputActive)};i.prototype.setAutoComplete=function(t){this.eFloatingFilterNumberInput.setAutoComplete(t);this.eFloatingFilterTextInput.setAutoComplete(t)};i.prototype.getValue=function(){return this.getActiveInputElement().getValue()};i.prototype.setValue=function(t,i){this.getActiveInputElement().setValue(t,i)};i.prototype.getActiveInputElement=function(){return this.numberInputActive?this.eFloatingFilterNumberInput:this.eFloatingFilterTextInput};i.prototype.setValueChangedListener=function(t){this.valueChangedListener=t};i.prototype.setupListeners=function(t,i){this.addManagedListener(t,"input",i);this.addManagedListener(t,"keydown",i)};i.prototype.setParams=function(t){this.setAriaLabel(t.ariaLabel);if(t.autoComplete!==undefined){this.setAutoComplete(t.autoComplete)}};i.prototype.setAriaLabel=function(t){this.eFloatingFilterNumberInput.setInputAriaLabel(t);this.eFloatingFilterTextInput.setInputAriaLabel(t)};return i}(ri);var Ko=function(t){Wo(i,t);function i(){return t!==null&&t.apply(this,arguments)||this}i.prototype.init=function(i){var n;t.prototype.init.call(this,i);this.filterModelFormatter=new Do(this.localeService,this.optionsFactory,(n=i.filterParams)===null||n===void 0?void 0:n.numberFormatter)};i.prototype.onParamsUpdated=function(i){var n=Go(i.filterParams);if(n!==this.allowedCharPattern){this.recreateFloatingFilterInputService(i)}t.prototype.onParamsUpdated.call(this,i);this.filterModelFormatter.updateParams({optionsFactory:this.optionsFactory})};i.prototype.getDefaultFilterOptions=function(){return Po.DEFAULT_FILTER_OPTIONS};i.prototype.getFilterModelFormatter=function(){return this.filterModelFormatter};i.prototype.createFloatingFilterInputService=function(t){this.allowedCharPattern=Go(t.filterParams);if(this.allowedCharPattern){return this.createManagedBean(new Bo({config:{allowedCharPattern:this.allowedCharPattern}}))}return this.createManagedBean(new Uo)};return i}(zo);var qo=function(){var t=function(i,n){t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var n in i)if(Object.prototype.hasOwnProperty.call(i,n))t[n]=i[n]};return t(i,n)};return function(i,n){if(typeof n!=="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(i,n);function r(){this.constructor=i}i.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}();var Yo=function(t){qo(i,t);function i(){return t!==null&&t.apply(this,arguments)||this}i.prototype.init=function(i){t.prototype.init.call(this,i);this.filterModelFormatter=new No(this.localeService,this.optionsFactory)};i.prototype.onParamsUpdated=function(i){t.prototype.onParamsUpdated.call(this,i);this.filterModelFormatter.updateParams({optionsFactory:this.optionsFactory})};i.prototype.getDefaultFilterOptions=function(){return Ho.DEFAULT_FILTER_OPTIONS};i.prototype.getFilterModelFormatter=function(){return this.filterModelFormatter};i.prototype.createFloatingFilterInputService=function(){return this.createManagedBean(new Bo)};return i}(zo);var Qo=function(){function t(t,i){var n=this;if(i===void 0){i=false}this.destroyFuncs=[];this.touching=false;this.eventService=new dt;this.eElement=t;this.preventMouseClick=i;var r=this.onTouchStart.bind(this);var e=this.onTouchMove.bind(this);var s=this.onTouchEnd.bind(this);this.eElement.addEventListener("touchstart",r,{passive:true});this.eElement.addEventListener("touchmove",e,{passive:true});this.eElement.addEventListener("touchend",s,{passive:false});this.destroyFuncs.push((function(){n.eElement.removeEventListener("touchstart",r,{passive:true});n.eElement.removeEventListener("touchmove",e,{passive:true});n.eElement.removeEventListener("touchend",s,{passive:false})}))}t.prototype.getActiveTouch=function(t){for(var i=0;i<t.length;i++){var n=t[i].identifier===this.touchStart.identifier;if(n){return t[i]}}return null};t.prototype.addEventListener=function(t,i){this.eventService.addEventListener(t,i)};t.prototype.removeEventListener=function(t,i){this.eventService.removeEventListener(t,i)};t.prototype.onTouchStart=function(i){var n=this;if(this.touching){return}this.touchStart=i.touches[0];this.touching=true;this.moved=false;var r=this.touchStart;window.setTimeout((function(){var e=n.touchStart===r;if(n.touching&&e&&!n.moved){n.moved=true;var s={type:t.EVENT_LONG_TAP,touchStart:n.touchStart,touchEvent:i};n.eventService.dispatchEvent(s)}}),500)};t.prototype.onTouchMove=function(t){if(!this.touching){return}var i=this.getActiveTouch(t.touches);if(!i){return}var n=!We(i,this.touchStart,4);if(n){this.moved=true}};t.prototype.onTouchEnd=function(i){if(!this.touching){return}if(!this.moved){var n={type:t.EVENT_TAP,touchStart:this.touchStart};this.eventService.dispatchEvent(n);this.checkForDoubleTap()}if(this.preventMouseClick&&i.cancelable){i.preventDefault()}this.touching=false};t.prototype.checkForDoubleTap=function(){var i=(new Date).getTime();if(this.lastTapTime&&this.lastTapTime>0){var n=i-this.lastTapTime;if(n>t.DOUBLE_TAP_MILLIS){var r={type:t.EVENT_DOUBLE_TAP,touchStart:this.touchStart};this.eventService.dispatchEvent(r);this.lastTapTime=null}else{this.lastTapTime=i}}else{this.lastTapTime=i}};t.prototype.destroy=function(){this.destroyFuncs.forEach((function(t){return t()}))};t.EVENT_TAP="tap";t.EVENT_DOUBLE_TAP="doubleTap";t.EVENT_LONG_TAP="longTap";t.DOUBLE_TAP_MILLIS=500;return t}();var Jo=function(){var t=function(i,n){t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var n in i)if(Object.prototype.hasOwnProperty.call(i,n))t[n]=i[n]};return t(i,n)};return function(i,n){if(typeof n!=="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(i,n);function r(){this.constructor=i}i.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}();var Zo=function(t,i,n,r){var e=arguments.length,s=e<3?i:r===null?r=Object.getOwnPropertyDescriptor(i,n):r,o;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")s=Reflect.decorate(t,i,n,r);else for(var u=t.length-1;u>=0;u--)if(o=t[u])s=(e<3?o(s):e>3?o(i,n,s):o(i,n))||s;return e>3&&s&&Object.defineProperty(i,n,s),s};var $o=function(t){Jo(i,t);function i(n){var r=t.call(this)||this;if(!n){r.setTemplate(i.TEMPLATE)}return r}i.prototype.attachCustomElements=function(t,i,n,r,e){this.eSortOrder=t;this.eSortAsc=i;this.eSortDesc=n;this.eSortMixed=r;this.eSortNone=e};i.prototype.setupSort=function(t,i){var n=this;if(i===void 0){i=false}this.column=t;this.suppressOrder=i;this.setupMultiSortIndicator();var r=!!this.column.getColDef().sortable;if(!r){return}this.addInIcon("sortAscending",this.eSortAsc,t);this.addInIcon("sortDescending",this.eSortDesc,t);this.addInIcon("sortUnSort",this.eSortNone,t);this.addManagedListener(this.eventService,hi.EVENT_SORT_CHANGED,(function(){return n.onSortChanged()}));this.addManagedListener(this.eventService,hi.EVENT_COLUMN_ROW_GROUP_CHANGED,(function(){return n.onSortChanged()}));this.onSortChanged()};i.prototype.addInIcon=function(t,i,n){if(i==null){return}var r=Fe(t,this.gridOptionsService,n);if(r){i.appendChild(r)}};i.prototype.onSortChanged=function(){this.updateIcons();if(!this.suppressOrder){this.updateSortOrder()}};i.prototype.updateIcons=function(){var t=this.sortController.getDisplaySortForColumn(this.column);if(this.eSortAsc){var i=t==="asc";Lr(this.eSortAsc,i,{skipAriaHidden:true})}if(this.eSortDesc){var n=t==="desc";Lr(this.eSortDesc,n,{skipAriaHidden:true})}if(this.eSortNone){var r=!this.column.getColDef().unSortIcon&&!this.gridOptionsService.is("unSortIcon");var e=t===null||t===undefined;Lr(this.eSortNone,!r&&e,{skipAriaHidden:true})}};i.prototype.setupMultiSortIndicator=function(){var t=this;this.addInIcon("sortUnSort",this.eSortMixed,this.column);var i=this.column.getColDef().showRowGroup;var n=this.gridOptionsService.isColumnsSortingCoupledToGroup();if(n&&i){this.addManagedListener(this.eventService,hi.EVENT_SORT_CHANGED,(function(){return t.updateMultiSortIndicator()}));this.addManagedListener(this.eventService,hi.EVENT_COLUMN_ROW_GROUP_CHANGED,(function(){return t.updateMultiSortIndicator()}));this.updateMultiSortIndicator()}};i.prototype.updateMultiSortIndicator=function(){if(this.eSortMixed){var t=this.sortController.getDisplaySortForColumn(this.column)==="mixed";Lr(this.eSortMixed,t,{skipAriaHidden:true})}};i.prototype.updateSortOrder=function(){var t=this;var i;if(!this.eSortOrder){return}var n=this.sortController.getColumnsWithSortingOrdered();var r=(i=this.sortController.getDisplaySortIndexForColumn(this.column))!==null&&i!==void 0?i:-1;var e=n.some((function(i){var n;return(n=t.sortController.getDisplaySortIndexForColumn(i))!==null&&n!==void 0?n:-1>=1}));var s=r>=0&&e;Lr(this.eSortOrder,s,{skipAriaHidden:true});if(r>=0){this.eSortOrder.innerHTML=(r+1).toString()}else{Xr(this.eSortOrder)}};i.TEMPLATE='<span class="ag-sort-indicator-container">\n <span ref="eSortOrder" class="ag-sort-indicator-icon ag-sort-order ag-hidden" aria-hidden="true"></span>\n <span ref="eSortAsc" class="ag-sort-indicator-icon ag-sort-ascending-icon ag-hidden" aria-hidden="true"></span>\n <span ref="eSortDesc" class="ag-sort-indicator-icon ag-sort-descending-icon ag-hidden" aria-hidden="true"></span>\n <span ref="eSortMixed" class="ag-sort-indicator-icon ag-sort-mixed-icon ag-hidden" aria-hidden="true"></span>\n <span ref="eSortNone" class="ag-sort-indicator-icon ag-sort-none-icon ag-hidden" aria-hidden="true"></span>\n </span>';Zo([ds("eSortOrder")],i.prototype,"eSortOrder",void 0);Zo([ds("eSortAsc")],i.prototype,"eSortAsc",void 0);Zo([ds("eSortDesc")],i.prototype,"eSortDesc",void 0);Zo([ds("eSortMixed")],i.prototype,"eSortMixed",void 0);Zo([ds("eSortNone")],i.prototype,"eSortNone",void 0);Zo([ut("columnModel")],i.prototype,"columnModel",void 0);Zo([ut("sortController")],i.prototype,"sortController",void 0);return i}(vs);var Xo=function(){var t=function(i,n){t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var n in i)if(Object.prototype.hasOwnProperty.call(i,n))t[n]=i[n]};return t(i,n)};return function(i,n){if(typeof n!=="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(i,n);function r(){this.constructor=i}i.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}();var tu=function(t,i,n,r){var e=arguments.length,s=e<3?i:r===null?r=Object.getOwnPropertyDescriptor(i,n):r,o;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")s=Reflect.decorate(t,i,n,r);else for(var u=t.length-1;u>=0;u--)if(o=t[u])s=(e<3?o(s):e>3?o(i,n,s):o(i,n))||s;return e>3&&s&&Object.defineProperty(i,n,s),s};var iu=function(t){Xo(n,t);function n(){var i=t!==null&&t.apply(this,arguments)||this;i.lastMovingChanged=0;return i}n.prototype.destroy=function(){t.prototype.destroy.call(this)};n.prototype.refresh=function(t){this.params=t;if(this.workOutTemplate()!=this.currentTemplate){return false}if(this.workOutShowMenu()!=this.currentShowMenu){return false}if(this.workOutSort()!=this.currentSort){return false}this.setDisplayName(t);return true};n.prototype.workOutTemplate=function(){var t=jt(this.params.template,n.TEMPLATE);t=t&&t.trim?t.trim():t;return t};n.prototype.init=function(t){this.params=t;this.currentTemplate=this.workOutTemplate();this.setTemplate(this.currentTemplate);this.setupTap();this.setupIcons(t.column);this.setMenu();this.setupSort();this.setupFilterIcon();this.setDisplayName(t)};n.prototype.setDisplayName=function(t){if(this.currentDisplayName!=t.displayName){this.currentDisplayName=t.displayName;var i=mi(this.currentDisplayName);if(this.eText){this.eText.innerHTML=i}}};n.prototype.setupIcons=function(t){this.addInIcon("menu",this.eMenu,t);this.addInIcon("filter",this.eFilter,t)};n.prototype.addInIcon=function(t,i,n){if(i==null){return}var r=Fe(t,this.gridOptionsService,n);if(r){i.appendChild(r)}};n.prototype.setupTap=function(){var t=this;var n=this.gridOptionsService;if(n.is("suppressTouch")){return}var r=new Qo(this.getGui(),true);var e=n.is("suppressMenuHide");var s=e&&i(this.eMenu);var o=s?new Qo(this.eMenu,true):r;if(this.params.enableMenu){var u=s?"EVENT_TAP":"EVENT_LONG_TAP";var a=function(i){n.api.showColumnMenuAfterMouseClick(t.params.column,i.touchStart)};this.addManagedListener(o,Qo[u],a)}if(this.params.enableSorting){var f=function(i){var n=i.touchStart.target;if(e&&t.eMenu.contains(n)){return}t.sortController.progressSort(t.params.column,false,"uiColumnSorted")};this.addManagedListener(r,Qo.EVENT_TAP,f)}this.addDestroyFunc((function(){return r.destroy()}));if(s){this.addDestroyFunc((function(){return o.destroy()}))}};n.prototype.workOutShowMenu=function(){var t=!this.gridOptionsService.is("suppressMenuHide");var i=ur()&&t;var n=this.params.enableMenu&&!i;return n};n.prototype.setMenu=function(){var t=this;if(!this.eMenu){return}this.currentShowMenu=this.workOutShowMenu();if(!this.currentShowMenu){ie(this.eMenu);return}var i=this.gridOptionsService.is("suppressMenuHide");this.addManagedListener(this.eMenu,"click",(function(){return t.showMenu(t.eMenu)}));this.eMenu.classList.toggle("ag-header-menu-always-show",i)};n.prototype.showMenu=function(t){if(!t){t=this.eMenu}this.menuFactory.showMenuAfterButtonClick(this.params.column,t,"columnMenu")};n.prototype.workOutSort=function(){return this.params.enableSorting};n.prototype.setupSort=function(){var t=this;this.currentSort=this.params.enableSorting;if(!this.eSortIndicator){this.eSortIndicator=this.context.createBean(new $o(true));this.eSortIndicator.attachCustomElements(this.eSortOrder,this.eSortAsc,this.eSortDesc,this.eSortMixed,this.eSortNone)}this.eSortIndicator.setupSort(this.params.column);if(!this.currentSort){return}var i=this.gridOptionsService.get("multiSortKey")==="ctrl";this.addManagedListener(this.params.column,mt.EVENT_MOVING_CHANGED,(function(){t.lastMovingChanged=(new Date).getTime()}));if(this.eLabel){this.addManagedListener(this.eLabel,"click",(function(n){var r=t.params.column.isMoving();var e=(new Date).getTime();var s=e-t.lastMovingChanged<50;var o=r||s;if(!o){var u=i?n.ctrlKey||n.metaKey:n.shiftKey;t.params.progressSort(u)}}))}var n=function(){t.addOrRemoveCssClass("ag-header-cell-sorted-asc",t.params.column.isSortAscending());t.addOrRemoveCssClass("ag-header-cell-sorted-desc",t.params.column.isSortDescending());t.addOrRemoveCssClass("ag-header-cell-sorted-none",t.params.column.isSortNone());if(t.params.column.getColDef().showRowGroup){var i=t.columnModel.getSourceColumnsForGroupColumn(t.params.column);var n=i===null||i===void 0?void 0:i.every((function(i){return t.params.column.getSort()==i.getSort()}));var r=!n;t.addOrRemoveCssClass("ag-header-cell-sorted-mixed",r)}};this.addManagedListener(this.eventService,hi.EVENT_SORT_CHANGED,n);this.addManagedListener(this.eventService,hi.EVENT_COLUMN_ROW_GROUP_CHANGED,n)};n.prototype.setupFilterIcon=function(){if(!this.eFilter){return}this.addManagedListener(this.params.column,mt.EVENT_FILTER_CHANGED,this.onFilterChanged.bind(this));this.onFilterChanged()};n.prototype.onFilterChanged=function(){var t=this.params.column.isFilterActive();Lr(this.eFilter,t,{skipAriaHidden:true})};n.TEMPLATE='<div class="ag-cell-label-container" role="presentation">\n <span ref="eMenu" class="ag-header-icon ag-header-cell-menu-button" aria-hidden="true"></span>\n <div ref="eLabel" class="ag-header-cell-label" role="presentation">\n <span ref="eText" class="ag-header-cell-text"></span>\n <span ref="eFilter" class="ag-header-icon ag-header-label-icon ag-filter-icon" aria-hidden="true"></span>\n <ag-sort-indicator ref="eSortIndicator"></ag-sort-indicator>\n </div>\n </div>';tu([ut("sortController")],n.prototype,"sortController",void 0);tu([ut("menuFactory")],n.prototype,"menuFactory",void 0);tu([ut("columnModel")],n.prototype,"columnModel",void 0);tu([ds("eFilter")],n.prototype,"eFilter",void 0);tu([ds("eSortIndicator")],n.prototype,"eSortIndicator",void 0);tu([ds("eMenu")],n.prototype,"eMenu",void 0);tu([ds("eLabel")],n.prototype,"eLabel",void 0);tu([ds("eText")],n.prototype,"eText",void 0);tu([ds("eSortOrder")],n.prototype,"eSortOrder",void 0);tu([ds("eSortAsc")],n.prototype,"eSortAsc",void 0);tu([ds("eSortDesc")],n.prototype,"eSortDesc",void 0);tu([ds("eSortMixed")],n.prototype,"eSortMixed",void 0);tu([ds("eSortNone")],n.prototype,"eSortNone",void 0);return n}(vs);var nu=function(){var t=function(i,n){t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var n in i)if(Object.prototype.hasOwnProperty.call(i,n))t[n]=i[n]};return t(i,n)};return function(i,n){if(typeof n!=="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(i,n);function r(){this.constructor=i}i.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}();var ru=function(t,i,n,r){var e=arguments.length,s=e<3?i:r===null?r=Object.getOwnPropertyDescriptor(i,n):r,o;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")s=Reflect.decorate(t,i,n,r);else for(var u=t.length-1;u>=0;u--)if(o=t[u])s=(e<3?o(s):e>3?o(i,n,s):o(i,n))||s;return e>3&&s&&Object.defineProperty(i,n,s),s};var eu=function(t){nu(n,t);function n(){return t.call(this,n.TEMPLATE)||this}n.prototype.destroy=function(){t.prototype.destroy.call(this)};n.prototype.init=function(t){this.params=t;this.checkWarnings();this.setupLabel();this.addGroupExpandIcon();this.setupExpandIcons()};n.prototype.checkWarnings=function(){var t=this.params;if(t.template){var i="AG Grid: A template was provided for Header Group Comp - templates are only supported for Header Comps (not groups)";P((function(){return console.warn(i)}),"HeaderGroupComp.templateNotSupported")}};n.prototype.setupExpandIcons=function(){var t=this;this.addInIcon("columnGroupOpened","agOpened");this.addInIcon("columnGroupClosed","agClosed");var i=function(i){if(Yt(i)){return}var n=!t.params.columnGroup.isExpanded();t.columnModel.setColumnGroupOpened(t.params.columnGroup.getProvidedColumnGroup(),n,"uiColumnExpanded")};this.addTouchAndClickListeners(this.eCloseIcon,i);this.addTouchAndClickListeners(this.eOpenIcon,i);var n=function(t){qt(t)};this.addManagedListener(this.eCloseIcon,"dblclick",n);this.addManagedListener(this.eOpenIcon,"dblclick",n);this.addManagedListener(this.getGui(),"dblclick",i);this.updateIconVisibility();var r=this.params.columnGroup.getProvidedColumnGroup();this.addManagedListener(r,Ct.EVENT_EXPANDED_CHANGED,this.updateIconVisibility.bind(this));this.addManagedListener(r,Ct.EVENT_EXPANDABLE_CHANGED,this.updateIconVisibility.bind(this))};n.prototype.addTouchAndClickListeners=function(t,i){var n=new Qo(t,true);this.addManagedListener(n,Qo.EVENT_TAP,i);this.addDestroyFunc((function(){return n.destroy()}));this.addManagedListener(t,"click",i)};n.prototype.updateIconVisibility=function(){var t=this.params.columnGroup;if(t.isExpandable()){var i=this.params.columnGroup.isExpanded();Lr(this.eOpenIcon,i);Lr(this.eCloseIcon,!i)}else{Lr(this.eOpenIcon,false);Lr(this.eCloseIcon,false)}};n.prototype.addInIcon=function(t,i){var n=Fe(t,this.gridOptionsService,null);if(n){this.getRefElement(i).appendChild(n)}};n.prototype.addGroupExpandIcon=function(){if(!this.params.columnGroup.isExpandable()){Lr(this.eOpenIcon,false);Lr(this.eCloseIcon,false);return}};n.prototype.setupLabel=function(){var t;var n=this.params,r=n.displayName,e=n.columnGroup;if(i(r)){var s=mi(r);this.getRefElement("agLabel").innerHTML=s}this.addOrRemoveCssClass("ag-sticky-label",!((t=e.getColGroupDef())===null||t===void 0?void 0:t.suppressStickyLabel))};n.TEMPLATE='<div class="ag-header-group-cell-label" ref="agContainer" role="presentation">\n <span ref="agLabel" class="ag-header-group-text" role="presentation"></span>\n <span ref="agOpened" class="ag-header-icon ag-header-expand-icon ag-header-expand-icon-expanded"></span>\n <span ref="agClosed" class="ag-header-icon ag-header-expand-icon ag-header-expand-icon-collapsed"></span>\n </div>';ru([ut("columnModel")],n.prototype,"columnModel",void 0);ru([ds("agOpened")],n.prototype,"eOpenIcon",void 0);ru([ds("agClosed")],n.prototype,"eCloseIcon",void 0);return n}(vs);var su=function(){var t=function(i,n){t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var n in i)if(Object.prototype.hasOwnProperty.call(i,n))t[n]=i[n]};return t(i,n)};return function(i,n){if(typeof n!=="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(i,n);function r(){this.constructor=i}i.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}();var ou=function(t){su(i,t);function i(){return t!==null&&t.apply(this,arguments)||this}i.prototype.isPopup=function(){return true};i.prototype.setParentComponent=function(i){i.addCssClass("ag-has-popup");t.prototype.setParentComponent.call(this,i)};i.prototype.destroy=function(){var i=this.parentComponent;var n=i&&i.isAlive();if(n){i.getGui().classList.remove("ag-has-popup")}t.prototype.destroy.call(this)};return i}(vs);var uu=function(){var t=function(i,n){t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var n in i)if(Object.prototype.hasOwnProperty.call(i,n))t[n]=i[n]};return t(i,n)};return function(i,n){if(typeof n!=="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(i,n);function r(){this.constructor=i}i.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}();var au=function(t,i,n,r){var e=arguments.length,s=e<3?i:r===null?r=Object.getOwnPropertyDescriptor(i,n):r,o;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")s=Reflect.decorate(t,i,n,r);else for(var u=t.length-1;u>=0;u--)if(o=t[u])s=(e<3?o(s):e>3?o(i,n,s):o(i,n))||s;return e>3&&s&&Object.defineProperty(i,n,s),s};var fu=function(t){uu(n,t);function n(){return t.call(this,n.TEMPLATE)||this}n.prototype.init=function(t){this.params=t;this.focusAfterAttached=t.cellStartedEdit;this.eTextArea.setMaxLength(t.maxLength||200).setCols(t.cols||60).setRows(t.rows||10);if(i(t.value,true)){this.eTextArea.setValue(t.value.toString(),true)}this.addGuiEventListener("keydown",this.onKeyDown.bind(this));this.activateTabIndex()};n.prototype.onKeyDown=function(t){var i=t.key;if(i===Te.LEFT||i===Te.UP||i===Te.RIGHT||i===Te.DOWN||t.shiftKey&&i===Te.ENTER){t.stopPropagation()}};n.prototype.afterGuiAttached=function(){var t=this.localeService.getLocaleTextFunc();this.eTextArea.setInputAriaLabel(t("ariaInputEditor","Input Editor"));if(this.focusAfterAttached){this.eTextArea.getFocusableElement().focus()}};n.prototype.getValue=function(){var t=this.eTextArea.getValue();if(!i(t)&&!i(this.params.value)){return this.params.value}return this.params.parseValue(t)};n.TEMPLATE='<div class="ag-large-text">\n <ag-input-text-area ref="eTextArea" class="ag-large-text-input"></ag-input-text-area>\n </div>';au([ds("eTextArea")],n.prototype,"eTextArea",void 0);return n}(ou);var hu=function(){var t=function(i,n){t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var n in i)if(Object.prototype.hasOwnProperty.call(i,n))t[n]=i[n]};return t(i,n)};return function(i,n){if(typeof n!=="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(i,n);function r(){this.constructor=i}i.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}();var cu=function(t,i,n,r){var e=arguments.length,s=e<3?i:r===null?r=Object.getOwnPropertyDescriptor(i,n):r,o;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")s=Reflect.decorate(t,i,n,r);else for(var u=t.length-1;u>=0;u--)if(o=t[u])s=(e<3?o(s):e>3?o(i,n,s):o(i,n))||s;return e>3&&s&&Object.defineProperty(i,n,s),s};var lu=function(t){hu(i,t);function i(){var i=t.call(this,'<div class="ag-cell-edit-wrapper">\n <ag-select class="ag-cell-editor" ref="eSelect"></ag-select>\n </div>')||this;i.startedByEnter=false;return i}i.prototype.init=function(t){this.focusAfterAttached=t.cellStartedEdit;var i=this,r=i.eSelect,e=i.valueFormatterService,s=i.gridOptionsService;var o=t.values,u=t.value,a=t.eventKey;if(n(o)){console.warn("AG Grid: no values found for select cellEditor");return}this.startedByEnter=a!=null?a===Te.ENTER:false;var f=false;o.forEach((function(i){var n={value:i};var s=e.formatValue(t.column,null,i);var o=s!==null&&s!==undefined;n.text=o?s:i;r.addOption(n);f=f||u===i}));if(f){r.setValue(t.value,true)}else if(t.values.length){r.setValue(t.values[0],true)}var h=t.valueListGap,c=t.valueListMaxWidth,l=t.valueListMaxHeight;if(h!=null){r.setPickerGap(h)}if(l!=null){r.setPickerMaxHeight(l)}if(c!=null){r.setPickerMaxWidth(c)}if(s.get("editType")!=="fullRow"){this.addManagedListener(this.eSelect,Js.EVENT_ITEM_SELECTED,(function(){return t.stopEditing()}))}};i.prototype.afterGuiAttached=function(){var t=this;if(this.focusAfterAttached){this.eSelect.getFocusableElement().focus()}if(this.startedByEnter){setTimeout((function(){if(t.isAlive()){t.eSelect.showPicker()}}))}};i.prototype.focusIn=function(){this.eSelect.getFocusableElement().focus()};i.prototype.getValue=function(){return this.eSelect.getValue()};i.prototype.isPopup=function(){return false};cu([ut("valueFormatterService")],i.prototype,"valueFormatterService",void 0);cu([ds("eSelect")],i.prototype,"eSelect",void 0);return i}(ou);var vu=function(){var t=function(i,n){t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var n in i)if(Object.prototype.hasOwnProperty.call(i,n))t[n]=i[n]};return t(i,n)};return function(i,n){if(typeof n!=="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(i,n);function r(){this.constructor=i}i.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}();var du=function(t,i,n,r){var e=arguments.length,s=e<3?i:r===null?r=Object.getOwnPropertyDescriptor(i,n):r,o;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")s=Reflect.decorate(t,i,n,r);else for(var u=t.length-1;u>=0;u--)if(o=t[u])s=(e<3?o(s):e>3?o(i,n,s):o(i,n))||s;return e>3&&s&&Object.defineProperty(i,n,s),s};var pu=function(t){vu(i,t);function i(i){var n=t.call(this,'\n <div class="ag-cell-edit-wrapper">\n '+i.getTemplate()+"\n </div>")||this;n.cellEditorInput=i;return n}i.prototype.init=function(t){this.params=t;var i=this.eInput;this.cellEditorInput.init(i,t);var n;if(t.cellStartedEdit){this.focusAfterAttached=true;var r=t.eventKey;if(r===Te.BACKSPACE||t.eventKey===Te.DELETE){n=""}else if(r&&r.length===1){n=r}else{n=this.cellEditorInput.getStartValue();if(r!==Te.F2){this.highlightAllOnFocus=true}}}else{this.focusAfterAttached=false;n=this.cellEditorInput.getStartValue()}if(n!=null){i.setStartValue(n)}this.addManagedListener(i.getGui(),"keydown",(function(t){var i=t.key;if(i===Te.PAGE_UP||i===Te.PAGE_DOWN){t.preventDefault()}}))};i.prototype.afterGuiAttached=function(){var t,i;var n=this.localeService.getLocaleTextFunc();var r=this.eInput;r.setInputAriaLabel(n("ariaInputEditor","Input Editor"));if(!this.focusAfterAttached){return}if(!nr()){r.getFocusableElement().focus()}var e=r.getInputElement();if(this.highlightAllOnFocus){e.select()}else{(i=(t=this.cellEditorInput).setCaret)===null||i===void 0?void 0:i.call(t)}};i.prototype.focusIn=function(){var t=this.eInput;var i=t.getFocusableElement();var n=t.getInputElement();i.focus();n.select()};i.prototype.getValue=function(){return this.cellEditorInput.getValue()};i.prototype.isPopup=function(){return false};du([ds("eInput")],i.prototype,"eInput",void 0);return i}(ou);var gu=function(){var t=function(i,n){t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var n in i)if(Object.prototype.hasOwnProperty.call(i,n))t[n]=i[n]};return t(i,n)};return function(i,n){if(typeof n!=="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(i,n);function r(){this.constructor=i}i.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}();var bu=function(){function t(){}t.prototype.getTemplate=function(){return'<ag-input-text-field class="ag-cell-editor" ref="eInput"></ag-input-text-field>'};t.prototype.init=function(t,i){this.eInput=t;this.params=i;if(i.maxLength!=null){t.setMaxLength(i.maxLength)}};t.prototype.getValue=function(){var t=this.eInput.getValue();if(!i(t)&&!i(this.params.value)){return this.params.value}return this.params.parseValue(t)};t.prototype.getStartValue=function(){var t=this.params.useFormatter||this.params.column.getColDef().refData;return t?this.params.formatValue(this.params.value):this.params.value};t.prototype.setCaret=function(){var t=this.eInput.getValue();var n=i(t)&&t.length||0;if(n){this.eInput.getInputElement().setSelectionRange(n,n)}};return t}();var wu=function(t){gu(i,t);function i(){return t.call(this,new bu)||this}return i}(pu);var yu=function(){var t=function(i,n){t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var n in i)if(Object.prototype.hasOwnProperty.call(i,n))t[n]=i[n]};return t(i,n)};return function(i,n){if(typeof n!=="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(i,n);function r(){this.constructor=i}i.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}();var mu=function(t,i,n,r){var e=arguments.length,s=e<3?i:r===null?r=Object.getOwnPropertyDescriptor(i,n):r,o;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")s=Reflect.decorate(t,i,n,r);else for(var u=t.length-1;u>=0;u--)if(o=t[u])s=(e<3?o(s):e>3?o(i,n,s):o(i,n))||s;return e>3&&s&&Object.defineProperty(i,n,s),s};var Su="↑";var Cu="↓";var Ou=function(t){yu(n,t);function n(){var i=t.call(this,n.TEMPLATE)||this;i.refreshCount=0;return i}n.prototype.init=function(t){this.eValue=this.queryForHtmlElement(".ag-value-change-value");this.eDelta=this.queryForHtmlElement(".ag-value-change-delta");this.refresh(t)};n.prototype.showDelta=function(t,n){var r=Math.abs(n);var e=t.formatValue(r);var s=i(e)?e:r;var o=n>=0;if(o){this.eDelta.innerHTML=Su+s}else{this.eDelta.innerHTML=Cu+s}this.eDelta.classList.toggle("ag-value-change-delta-up",o);this.eDelta.classList.toggle("ag-value-change-delta-down",!o)};n.prototype.setTimerToRemoveDelta=function(){var t=this;this.refreshCount++;var i=this.refreshCount;window.setTimeout((function(){if(i===t.refreshCount){t.hideDeltaValue()}}),2e3)};n.prototype.hideDeltaValue=function(){this.eValue.classList.remove("ag-value-change-value-highlight");Xr(this.eDelta)};n.prototype.refresh=function(t){var n=t.value;if(n===this.lastValue){return false}if(i(t.valueFormatted)){this.eValue.innerHTML=t.valueFormatted}else if(i(t.value)){this.eValue.innerHTML=n}else{Xr(this.eValue)}if(this.filterManager.isSuppressFlashingCellsBecauseFiltering()){return false}if(typeof n==="number"&&typeof this.lastValue==="number"){var r=n-this.lastValue;this.showDelta(t,r)}if(this.lastValue){this.eValue.classList.add("ag-value-change-value-highlight")}this.setTimerToRemoveDelta();this.lastValue=n;return true};n.TEMPLATE="<span>"+'<span class="ag-value-change-delta"></span>'+'<span class="ag-value-change-value"></span>'+"</span>";mu([ut("filterManager")],n.prototype,"filterManager",void 0);return n}(vs);var ju=function(){var t=function(i,n){t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var n in i)if(Object.prototype.hasOwnProperty.call(i,n))t[n]=i[n]};return t(i,n)};return function(i,n){if(typeof n!=="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(i,n);function r(){this.constructor=i}i.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}();var Ru=function(t,i,n,r){var e=arguments.length,s=e<3?i:r===null?r=Object.getOwnPropertyDescriptor(i,n):r,o;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")s=Reflect.decorate(t,i,n,r);else for(var u=t.length-1;u>=0;u--)if(o=t[u])s=(e<3?o(s):e>3?o(i,n,s):o(i,n))||s;return e>3&&s&&Object.defineProperty(i,n,s),s};var xu=function(t){ju(r,t);function r(){var i=t.call(this,r.TEMPLATE)||this;i.refreshCount=0;i.eCurrent=i.queryForHtmlElement(".ag-value-slide-current");return i}r.prototype.init=function(t){this.refresh(t)};r.prototype.addSlideAnimation=function(){var t=this;this.refreshCount++;var i=this.refreshCount;if(this.ePrevious){this.getGui().removeChild(this.ePrevious)}this.ePrevious=re('<span class="ag-value-slide-previous ag-value-slide-out"></span>');this.ePrevious.innerHTML=this.eCurrent.innerHTML;this.getGui().insertBefore(this.ePrevious,this.eCurrent);window.setTimeout((function(){if(i!==t.refreshCount){return}t.ePrevious.classList.add("ag-value-slide-out-end")}),50);window.setTimeout((function(){if(i!==t.refreshCount){return}t.getGui().removeChild(t.ePrevious);t.ePrevious=null}),3e3)};r.prototype.refresh=function(t){var r=t.value;if(n(r)){r=""}if(r===this.lastValue){return false}if(this.filterManager.isSuppressFlashingCellsBecauseFiltering()){return false}this.addSlideAnimation();this.lastValue=r;if(i(t.valueFormatted)){this.eCurrent.innerHTML=t.valueFormatted}else if(i(t.value)){this.eCurrent.innerHTML=r}else{Xr(this.eCurrent)}return true};r.TEMPLATE='<span>\n <span class="ag-value-slide-current"></span>\n </span>';Ru([ut("filterManager")],r.prototype,"filterManager",void 0);return r}(vs);var _u=function(){_u=Object.assign||function(t){for(var i,n=1,r=arguments.length;n<r;n++){i=arguments[n];for(var e in i)if(Object.prototype.hasOwnProperty.call(i,e))t[e]=i[e]}return t};return _u.apply(this,arguments)};var Au=function(){function t(i){this.rowIndex=null;this.key=null;this.childrenMapped={};this.displayed=false;this.rowTop=null;this.oldRowTop=null;this.selectable=true;this.__objectId=t.OBJECT_ID_SEQUENCE++;this.__autoHeights={};this.alreadyRendered=false;this.highlighted=null;this.hovered=false;this.selected=false;this.beans=i}t.prototype.setData=function(t){this.setDataCommon(t,false)};t.prototype.updateData=function(t){this.setDataCommon(t,true)};t.prototype.setDataCommon=function(t,i){var n=this.data;this.data=t;this.beans.valueCache.onDataChanged();this.updateDataOnDetailNode();this.checkRowSelectable();this.resetQuickFilterAggregateText();var r=this.createDataChangedEvent(t,n,i);this.dispatchLocalEvent(r)};t.prototype.updateDataOnDetailNode=function(){if(this.detailNode){this.detailNode.data=this.data}};t.prototype.createDataChangedEvent=function(i,n,r){return{type:t.EVENT_DATA_CHANGED,node:this,oldData:n,newData:i,update:r}};t.prototype.createLocalRowEvent=function(t){return{type:t,node:this}};t.prototype.getRowIndexString=function(){if(this.rowPinned==="top"){return"t-"+this.rowIndex}if(this.rowPinned==="bottom"){return"b-"+this.rowIndex}return this.rowIndex.toString()};t.prototype.createDaemonNode=function(){var i=new t(this.beans);i.id=this.id;i.data=this.data;i.__daemon=true;i.selected=this.selected;i.level=this.level;return i};t.prototype.setDataAndId=function(t,n){var r=i(this.id)?this.createDaemonNode():null;var e=this.data;this.data=t;this.updateDataOnDetailNode();this.setId(n);this.checkRowSelectable();this.beans.selectionService.syncInRowNode(this,r);var s=this.createDataChangedEvent(t,e,false);this.dispatchLocalEvent(s)};t.prototype.checkRowSelectable=function(){var t=this.beans.gridOptionsService.get("isRowSelectable");this.setRowSelectable(t?t(this):true)};t.prototype.setRowSelectable=function(i){if(this.selectable!==i){this.selectable=i;if(this.eventService){this.eventService.dispatchEvent(this.createLocalRowEvent(t.EVENT_SELECTABLE_CHANGED))}var n=this.beans.gridOptionsService.is("groupSelectsChildren");if(n){var r=this.calculateSelectedFromChildren();this.setSelectedParams({newValue:r!==null&&r!==void 0?r:false,source:"selectableChanged"})}}};t.prototype.setId=function(i){var n=this.beans.gridOptionsService.getCallback("getRowId");if(n){if(this.data){var r=this.getGroupKeys(true);this.id=n({data:this.data,parentKeys:r.length>0?r:undefined,level:this.level});if(this.id!==null&&typeof this.id==="string"&&this.id.startsWith(t.ID_PREFIX_ROW_GROUP)){console.error("AG Grid: Row IDs cannot start with "+t.ID_PREFIX_ROW_GROUP+", this is a reserved prefix for AG Grid's row grouping feature.")}if(this.id!==null&&typeof this.id!=="string"){this.id=""+this.id}}else{this.id=undefined}}else{this.id=i}};t.prototype.getGroupKeys=function(t){if(t===void 0){t=false}var i=[];var n=this;if(t){n=n.parent}while(n&&n.level>=0){i.push(n.key);n=n.parent}i.reverse();return i};t.prototype.isPixelInRange=function(t){if(!i(this.rowTop)||!i(this.rowHeight)){return false}return t>=this.rowTop&&t<this.rowTop+this.rowHeight};t.prototype.setFirstChild=function(i){if(this.firstChild===i){return}this.firstChild=i;if(this.eventService){this.eventService.dispatchEvent(this.createLocalRowEvent(t.EVENT_FIRST_CHILD_CHANGED))}};t.prototype.setLastChild=function(i){if(this.lastChild===i){return}this.lastChild=i;if(this.eventService){this.eventService.dispatchEvent(this.createLocalRowEvent(t.EVENT_LAST_CHILD_CHANGED))}};t.prototype.setChildIndex=function(i){if(this.childIndex===i){return}this.childIndex=i;if(this.eventService){this.eventService.dispatchEvent(this.createLocalRowEvent(t.EVENT_CHILD_INDEX_CHANGED))}};t.prototype.setRowTop=function(i){this.oldRowTop=this.rowTop;if(this.rowTop===i){return}this.rowTop=i;if(this.eventService){this.eventService.dispatchEvent(this.createLocalRowEvent(t.EVENT_TOP_CHANGED))}this.setDisplayed(i!==null)};t.prototype.clearRowTopAndRowIndex=function(){this.oldRowTop=null;this.setRowTop(null);this.setRowIndex(null)};t.prototype.setDisplayed=function(i){if(this.displayed===i){return}this.displayed=i;if(this.eventService){this.eventService.dispatchEvent(this.createLocalRowEvent(t.EVENT_DISPLAYED_CHANGED))}};t.prototype.setDragging=function(i){if(this.dragging===i){return}this.dragging=i;if(this.eventService){this.eventService.dispatchEvent(this.createLocalRowEvent(t.EVENT_DRAGGING_CHANGED))}};t.prototype.setHighlighted=function(i){if(i===this.highlighted){return}this.highlighted=i;if(this.eventService){this.eventService.dispatchEvent(this.createLocalRowEvent(t.EVENT_HIGHLIGHT_CHANGED))}};t.prototype.setHovered=function(t){if(this.hovered===t){return}this.hovered=t};t.prototype.isHovered=function(){return this.hovered};t.prototype.setAllChildrenCount=function(i){if(this.allChildrenCount===i){return}this.allChildrenCount=i;if(this.eventService){this.eventService.dispatchEvent(this.createLocalRowEvent(t.EVENT_ALL_CHILDREN_COUNT_CHANGED))}};t.prototype.setMaster=function(i){if(this.master===i){return}if(this.master&&!i){this.expanded=false}this.master=i;if(this.eventService){this.eventService.dispatchEvent(this.createLocalRowEvent(t.EVENT_MASTER_CHANGED))}};t.prototype.setGroup=function(i){if(this.group===i){return}if(this.group&&!i){this.expanded=false}this.group=i;this.updateHasChildren();if(this.eventService){this.eventService.dispatchEvent(this.createLocalRowEvent(t.EVENT_GROUP_CHANGED))}};t.prototype.setRowHeight=function(i,n){if(n===void 0){n=false}this.rowHeight=i;this.rowHeightEstimated=n;if(this.eventService){this.eventService.dispatchEvent(this.createLocalRowEvent(t.EVENT_HEIGHT_CHANGED))}};t.prototype.setRowAutoHeight=function(t,i){if(!this.__autoHeights){this.__autoHeights={}}this.__autoHeights[i.getId()]=t;if(t!=null){if(this.checkAutoHeightsDebounced==null){this.checkAutoHeightsDebounced=z(this.checkAutoHeights.bind(this),1)}this.checkAutoHeightsDebounced()}};t.prototype.checkAutoHeights=function(){var t=this;var i=false;var n=true;var r=0;var e=this.__autoHeights;if(e==null){return}var s=this.beans.columnModel.getAllDisplayedAutoHeightCols();s.forEach((function(s){var o=e[s.getId()];if(o==null){if(t.beans.columnModel.isColSpanActive()){var u=[];switch(s.getPinned()){case"left":u=t.beans.columnModel.getDisplayedLeftColumnsForRow(t);break;case"right":u=t.beans.columnModel.getDisplayedRightColumnsForRow(t);break;case null:u=t.beans.columnModel.getViewportCenterColumnsForRow(t);break}if(u.includes(s)){i=true;return}o=-1}else{i=true;return}}else{n=false}if(o>r){r=o}}));if(i){return}if(n||r<10){r=this.beans.gridOptionsService.getRowHeightForNode(this).height}if(r==this.rowHeight){return}this.setRowHeight(r);var o=this.beans.rowModel;if(o.onRowHeightChangedDebounced){o.onRowHeightChangedDebounced()}};t.prototype.setRowIndex=function(i){if(this.rowIndex===i){return}this.rowIndex=i;if(this.eventService){this.eventService.dispatchEvent(this.createLocalRowEvent(t.EVENT_ROW_INDEX_CHANGED))}};t.prototype.setUiLevel=function(i){if(this.uiLevel===i){return}this.uiLevel=i;if(this.eventService){this.eventService.dispatchEvent(this.createLocalRowEvent(t.EVENT_UI_LEVEL_CHANGED))}};t.prototype.setExpanded=function(i,n){if(this.expanded===i){return}this.expanded=i;if(this.eventService){this.eventService.dispatchEvent(this.createLocalRowEvent(t.EVENT_EXPANDED_CHANGED))}var r=Object.assign({},this.createGlobalRowEvent(hi.EVENT_ROW_GROUP_OPENED),{expanded:i,event:n||null});this.beans.rowNodeEventThrottle.dispatchExpanded(r);if(this.sibling){this.beans.rowRenderer.refreshCells({rowNodes:[this]})}};t.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}};t.prototype.dispatchLocalEvent=function(t){if(this.eventService){this.eventService.dispatchEvent(t)}};t.prototype.setDataValue=function(t,i,n){var r=this;var e=function(){var i;if(typeof t!=="string"){return t}return(i=r.beans.columnModel.getGridColumn(t))!==null&&i!==void 0?i:r.beans.columnModel.getPrimaryColumn(t)};var s=e();var o=this.getValueFromValueService(s);if(this.beans.gridOptionsService.is("readOnlyEdit")){this.dispatchEventForSaveValueReadOnly(s,o,i,n);return false}var u=this.beans.valueService.setValue(this,s,i,n);this.dispatchCellChangedEvent(s,i,o);this.checkRowSelectable();return u};t.prototype.getValueFromValueService=function(t){var i=this.leafGroup&&this.beans.columnModel.isPivotMode();var n=this.group&&this.expanded&&!this.footer&&!i;var r=this.beans.gridOptionsService.getGroupIncludeFooter();var e=r({node:this});var s=this.beans.gridOptionsService.is("groupSuppressBlankHeader");var o=n&&e&&!s;var u=this.beans.valueService.getValue(t,this,false,o);return u};t.prototype.dispatchEventForSaveValueReadOnly=function(t,i,n,r){var e={type:hi.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:i,newValue:n,value:n,source:r};this.beans.eventService.dispatchEvent(e)};t.prototype.setGroupValue=function(t,i){var r=this.beans.columnModel.getGridColumn(t);if(n(this.groupData)){this.groupData={}}var e=r.getColId();var s=this.groupData[e];if(s===i){return}this.groupData[e]=i;this.dispatchCellChangedEvent(r,i,s)};t.prototype.setAggData=function(t){var i=this;var n=j([this.aggData,t]);var r=this.aggData;this.aggData=t;if(this.eventService){n.forEach((function(t){var n=i.aggData?i.aggData[t]:undefined;var e=r?r[t]:undefined;if(n===e){return}var s=i.beans.columnModel.lookupGridColumn(t);if(!s){return}i.dispatchCellChangedEvent(s,n,e)}))}};t.prototype.updateHasChildren=function(){var i=this.group&&!this.footer||this.childrenAfterGroup&&this.childrenAfterGroup.length>0;var n=this.beans.gridOptionsService.isRowModelType("serverSide");if(n){var r=this.beans.gridOptionsService.is("treeData");var e=this.beans.gridOptionsService.get("isServerSideGroup");i=!this.stub&&!this.footer&&(r?!!e&&e(this.data):!!this.group)}if(i!==this.__hasChildren){this.__hasChildren=!!i;if(this.eventService){this.eventService.dispatchEvent(this.createLocalRowEvent(t.EVENT_HAS_CHILDREN_CHANGED))}}};t.prototype.hasChildren=function(){if(this.__hasChildren==null){this.updateHasChildren()}return this.__hasChildren};t.prototype.isEmptyRowGroupNode=function(){return this.group&&r(this.childrenAfterGroup)};t.prototype.dispatchCellChangedEvent=function(i,n,r){var e={type:t.EVENT_CELL_CHANGED,node:this,column:i,newValue:n,oldValue:r};this.dispatchLocalEvent(e)};t.prototype.resetQuickFilterAggregateText=function(){this.quickFilterAggregateText=null};t.prototype.isExpandable=function(){return this.hasChildren()&&!this.footer||this.master?true:false};t.prototype.isSelected=function(){if(this.footer){return this.sibling.isSelected()}return this.selected};t.prototype.depthFirstSearch=function(t){if(this.childrenAfterGroup){this.childrenAfterGroup.forEach((function(i){return i.depthFirstSearch(t)}))}t(this)};t.prototype.calculateSelectedFromChildren=function(){var t;var i=false;var n=false;var r=false;if(!((t=this.childrenAfterGroup)===null||t===void 0?void 0:t.length)){return this.selectable?this.selected:null}for(var e=0;e<this.childrenAfterGroup.length;e++){var s=this.childrenAfterGroup[e];var o=s.isSelected();if(!s.selectable){var u=s.calculateSelectedFromChildren();if(u===null){continue}o=u}switch(o){case true:i=true;break;case false:n=true;break;default:r=true;break}}if(r||i&&n){return undefined}if(i){return true}if(n){return false}if(!this.selectable){return null}return this.selected};t.prototype.setSelectedInitialValue=function(t){this.selected=t};t.prototype.selectThisNode=function(i,n,r){if(r===void 0){r="api"}var e=!this.selectable&&i;var s=this.selected===i;if(e||s){return false}this.selected=i;if(this.eventService){this.dispatchLocalEvent(this.createLocalRowEvent(t.EVENT_ROW_SELECTED));var o=this.sibling;if(o&&o.footer){o.dispatchLocalEvent(o.createLocalRowEvent(t.EVENT_ROW_SELECTED))}}var u=_u(_u({},this.createGlobalRowEvent(hi.EVENT_ROW_SELECTED)),{event:n||null,source:r});this.beans.eventService.dispatchEvent(u);return true};t.prototype.setSelected=function(t,i,n){if(i===void 0){i=false}if(n===void 0){n="api"}if(typeof n==="boolean"){console.warn("AG Grid: since version v30, rowNode.setSelected() property `suppressFinishActions` has been removed, please use `gridApi.setNodesSelected()` for bulk actions, and the event `source` property for ignoring events instead.");return}this.setSelectedParams({newValue:t,clearSelection:i,rangeSelect:false,source:n})};t.prototype.setSelectedParams=function(t){if(this.rowPinned){console.warn("AG Grid: cannot select pinned rows");return 0}if(this.id===undefined){console.warn("AG Grid: cannot select node until id for node is known");return 0}return this.beans.selectionService.setNodesSelected(_u(_u({},t),{nodes:[this.footer?this.sibling:this]}))};t.prototype.isRowPinned=function(){return this.rowPinned==="top"||this.rowPinned==="bottom"};t.prototype.isParentOfNode=function(t){var i=this.parent;while(i){if(i===t){return true}i=i.parent}return false};t.prototype.addEventListener=function(t,i){if(!this.eventService){this.eventService=new dt}this.eventService.addEventListener(t,i)};t.prototype.removeEventListener=function(t,i){if(!this.eventService){return}this.eventService.removeEventListener(t,i);if(this.eventService.noRegisteredListenersExist()){this.eventService=null}};t.prototype.onMouseEnter=function(){this.dispatchLocalEvent(this.createLocalRowEvent(t.EVENT_MOUSE_ENTER))};t.prototype.onMouseLeave=function(){this.dispatchLocalEvent(this.createLocalRowEvent(t.EVENT_MOUSE_LEAVE))};t.prototype.getFirstChildOfFirstChild=function(t){var n=this;var r=true;var e=false;var s=null;while(r&&!e){var o=n.parent;var u=i(o)&&n.firstChild;if(u){if(o.rowGroupColumn===t){e=true;s=o}}else{r=false}n=o}return e?s:null};t.prototype.isFullWidthCell=function(){if(this.detail){return true}var t=this.beans.gridOptionsService.getCallback("isFullWidthRow");return t?t({rowNode:this}):false};t.prototype.getRoute=function(){if(this.key==null){return}var t=[];var i=this;while(i.key!=null){t.push(i.key);i=i.parent}return t.reverse()};t.prototype.createFooter=function(){var i=this;if(this.sibling){return}var n=new Set(["eventService","__objectId","sticky"]);var r=new t(this.beans);Object.keys(this).forEach((function(t){if(n.has(t)){return}r[t]=i[t]}));r.footer=true;r.setRowTop(null);r.setRowIndex(null);r.oldRowTop=null;r.id="rowGroupFooter_"+this.id;r.sibling=this;this.sibling=r};t.prototype.destroyFooter=function(){if(!this.sibling){return}this.sibling.setRowTop(null);this.sibling.setRowIndex(null);this.sibling=undefined};t.ID_PREFIX_ROW_GROUP="row-group-";t.ID_PREFIX_TOP_PINNED="t-";t.ID_PREFIX_BOTTOM_PINNED="b-";t.OBJECT_ID_SEQUENCE=0;t.EVENT_ROW_SELECTED="rowSelected";t.EVENT_DATA_CHANGED="dataChanged";t.EVENT_CELL_CHANGED="cellChanged";t.EVENT_ALL_CHILDREN_COUNT_CHANGED="allChildrenCountChanged";t.EVENT_MASTER_CHANGED="masterChanged";t.EVENT_GROUP_CHANGED="groupChanged";t.EVENT_MOUSE_ENTER="mouseEnter";t.EVENT_MOUSE_LEAVE="mouseLeave";t.EVENT_HEIGHT_CHANGED="heightChanged";t.EVENT_TOP_CHANGED="topChanged";t.EVENT_DISPLAYED_CHANGED="displayedChanged";t.EVENT_FIRST_CHILD_CHANGED="firstChildChanged";t.EVENT_LAST_CHILD_CHANGED="lastChildChanged";t.EVENT_CHILD_INDEX_CHANGED="childIndexChanged";t.EVENT_ROW_INDEX_CHANGED="rowIndexChanged";t.EVENT_EXPANDED_CHANGED="expandedChanged";t.EVENT_HAS_CHILDREN_CHANGED="hasChildrenChanged";t.EVENT_SELECTABLE_CHANGED="selectableChanged";t.EVENT_UI_LEVEL_CHANGED="uiLevelChanged";t.EVENT_HIGHLIGHT_CHANGED="rowHighlightChanged";t.EVENT_DRAGGING_CHANGED="draggingChanged";return t}();var Fu=function(){var t=function(i,n){t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var n in i)if(Object.prototype.hasOwnProperty.call(i,n))t[n]=i[n]};return t(i,n)};return function(i,n){if(typeof n!=="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(i,n);function r(){this.constructor=i}i.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}();var ku=function(){ku=Object.assign||function(t){for(var i,n=1,r=arguments.length;n<r;n++){i=arguments[n];for(var e in i)if(Object.prototype.hasOwnProperty.call(i,e))t[e]=i[e]}return t};return ku.apply(this,arguments)};var Tu=function(t,i,n,r){var e=arguments.length,s=e<3?i:r===null?r=Object.getOwnPropertyDescriptor(i,n):r,o;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")s=Reflect.decorate(t,i,n,r);else for(var u=t.length-1;u>=0;u--)if(o=t[u])s=(e<3?o(s):e>3?o(i,n,s):o(i,n))||s;return e>3&&s&&Object.defineProperty(i,n,s),s};var Mu=function(t){Fu(i,t);function i(){return t.call(this,'\n <div class="ag-selection-checkbox" role="presentation">\n <ag-checkbox role="presentation" ref="eCheckbox"></ag-checkbox>\n </div>')||this}i.prototype.postConstruct=function(){this.eCheckbox.setPassive(true);xn(this.eCheckbox.getInputElement(),"polite")};i.prototype.getCheckboxId=function(){return this.eCheckbox.getInputElement().id};i.prototype.onDataChanged=function(){this.onSelectionChanged()};i.prototype.onSelectableChanged=function(){this.showOrHideSelect()};i.prototype.onSelectionChanged=function(){var t=this.localeService.getLocaleTextFunc();var i=this.rowNode.isSelected();var n=Kn(t,i);var r=t("ariaRowToggleSelection","Press Space to toggle row selection");this.eCheckbox.setValue(i,true);this.eCheckbox.setInputAriaLabel(r+" ("+n+")")};i.prototype.onClicked=function(t,i,n){return this.rowNode.setSelectedParams({newValue:t,rangeSelect:n.shiftKey,groupSelectsFiltered:i,event:n,source:"checkboxSelected"})};i.prototype.init=function(t){var i=this;this.rowNode=t.rowNode;this.column=t.column;this.overrides=t.overrides;this.onSelectionChanged();this.addManagedListener(this.eCheckbox.getInputElement(),"dblclick",(function(t){qt(t)}));this.addManagedListener(this.eCheckbox.getInputElement(),"click",(function(t){qt(t);var n=i.gridOptionsService.is("groupSelectsFiltered");var r=i.eCheckbox.getValue();if(i.shouldHandleIndeterminateState(r,n)){var e=i.onClicked(true,n,t||{});if(e===0){i.onClicked(false,n,t)}}else if(r){i.onClicked(false,n,t)}else{i.onClicked(true,n,t||{})}}));this.addManagedListener(this.rowNode,Au.EVENT_ROW_SELECTED,this.onSelectionChanged.bind(this));this.addManagedListener(this.rowNode,Au.EVENT_DATA_CHANGED,this.onDataChanged.bind(this));this.addManagedListener(this.rowNode,Au.EVENT_SELECTABLE_CHANGED,this.onSelectableChanged.bind(this));var n=this.gridOptionsService.get("isRowSelectable");var r=n||typeof this.getIsVisible()==="function";if(r){var e=this.showOrHideSelect.bind(this);this.addManagedListener(this.eventService,hi.EVENT_DISPLAYED_COLUMNS_CHANGED,e);this.addManagedListener(this.rowNode,Au.EVENT_DATA_CHANGED,e);this.addManagedListener(this.rowNode,Au.EVENT_CELL_CHANGED,e);this.showOrHideSelect()}this.eCheckbox.getInputElement().setAttribute("tabindex","-1")};i.prototype.shouldHandleIndeterminateState=function(t,i){return i&&(this.eCheckbox.getPreviousValue()===undefined||t===undefined)&&this.gridOptionsService.isRowModelType("clientSide")};i.prototype.showOrHideSelect=function(){var t,i,n,r;var e=this.rowNode.selectable;var s=this.getIsVisible();if(e){if(typeof s==="function"){var o=(t=this.overrides)===null||t===void 0?void 0:t.callbackParams;var u=(i=this.column)===null||i===void 0?void 0:i.createColumnFunctionCallbackParams(this.rowNode);e=u?s(ku(ku({},o),u)):false}else{e=s!==null&&s!==void 0?s:false}}var a=(n=this.column)===null||n===void 0?void 0:n.getColDef().showDisabledCheckboxes;if(a){this.eCheckbox.setDisabled(!e);this.setVisible(true);this.setDisplayed(true);return}if((r=this.overrides)===null||r===void 0?void 0:r.removeHidden){this.setDisplayed(e);return}this.setVisible(e)};i.prototype.getIsVisible=function(){var t,i;if(this.overrides){return this.overrides.isVisible}return(i=(t=this.column)===null||t===void 0?void 0:t.getColDef())===null||i===void 0?void 0:i.checkboxSelection};Tu([ds("eCheckbox")],i.prototype,"eCheckbox",void 0);Tu([et],i.prototype,"postConstruct",null);return i}(vs);var Du=function(){var t=function(i,n){t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var n in i)if(Object.prototype.hasOwnProperty.call(i,n))t[n]=i[n]};return t(i,n)};return function(i,n){if(typeof n!=="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(i,n);function r(){this.constructor=i}i.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}();var Gu=function(t,i,n,r){var e=arguments.length,s=e<3?i:r===null?r=Object.getOwnPropertyDescriptor(i,n):r,o;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")s=Reflect.decorate(t,i,n,r);else for(var u=t.length-1;u>=0;u--)if(o=t[u])s=(e<3?o(s):e>3?o(i,n,s):o(i,n))||s;return e>3&&s&&Object.defineProperty(i,n,s),s};var Pu=function(t){var i=typeof Symbol==="function"&&Symbol.iterator,n=i&&t[i],r=0;if(n)return n.call(t);if(t&&typeof t.length==="number")return{next:function(){if(t&&r>=t.length)t=void 0;return{value:t&&t[r++],done:!t}}};throw new TypeError(i?"Object is not iterable.":"Symbol.iterator is not defined.")};var Eu;(function(t){t[t["ToolPanel"]=0]="ToolPanel";t[t["HeaderCell"]=1]="HeaderCell";t[t["RowDrag"]=2]="RowDrag";t[t["ChartPanel"]=3]="ChartPanel";t[t["AdvancedFilterBuilder"]=4]="AdvancedFilterBuilder"})(Eu||(Eu={}));var Iu;(function(t){t[t["Up"]=0]="Up";t[t["Down"]=1]="Down"})(Iu||(Iu={}));var Nu;(function(t){t[t["Left"]=0]="Left";t[t["Right"]=1]="Right"})(Nu||(Nu={}));var Hu=function(t){Du(i,t);function i(){var i=t!==null&&t.apply(this,arguments)||this;i.dragSourceAndParamsList=[];i.dropTargets=[];return i}n=i;i.prototype.init=function(){this.ePinnedIcon=Ae("columnMovePin",this.gridOptionsService,null);this.eHideIcon=Ae("columnMoveHide",this.gridOptionsService,null);this.eMoveIcon=Ae("columnMoveMove",this.gridOptionsService,null);this.eLeftIcon=Ae("columnMoveLeft",this.gridOptionsService,null);this.eRightIcon=Ae("columnMoveRight",this.gridOptionsService,null);this.eGroupIcon=Ae("columnMoveGroup",this.gridOptionsService,null);this.eAggregateIcon=Ae("columnMoveValue",this.gridOptionsService,null);this.ePivotIcon=Ae("columnMovePivot",this.gridOptionsService,null);this.eDropNotAllowedIcon=Ae("dropNotAllowed",this.gridOptionsService,null)};i.prototype.addDragSource=function(t,i){if(i===void 0){i=false}var n={eElement:t.eElement,dragStartPixels:t.dragStartPixels,onDragStart:this.onDragStart.bind(this,t),onDragStop:this.onDragStop.bind(this),onDragging:this.onDragging.bind(this),includeTouch:i};this.dragSourceAndParamsList.push({params:n,dragSource:t});this.dragService.addDragSource(n)};i.prototype.removeDragSource=function(t){var i=this.dragSourceAndParamsList.find((function(i){return i.dragSource===t}));if(i){this.dragService.removeDragSource(i.params);Mt(this.dragSourceAndParamsList,i)}};i.prototype.clearDragSourceParamsList=function(){var t=this;this.dragSourceAndParamsList.forEach((function(i){return t.dragService.removeDragSource(i.params)}));this.dragSourceAndParamsList.length=0;this.dropTargets.length=0};i.prototype.nudge=function(){if(this.dragging){this.onDragging(this.eventLastTime,true)}};i.prototype.onDragStart=function(t,i){this.dragging=true;this.dragSource=t;this.eventLastTime=i;this.dragItem=this.dragSource.getDragItem();this.lastDropTarget=this.dragSource.dragSourceDropTarget;if(this.dragSource.onDragStarted){this.dragSource.onDragStarted()}this.createGhost()};i.prototype.onDragStop=function(t){this.eventLastTime=null;this.dragging=false;if(this.dragSource.onDragStopped){this.dragSource.onDragStopped()}if(this.lastDropTarget&&this.lastDropTarget.onDragStop){var i=this.createDropTargetEvent(this.lastDropTarget,t,null,null,false);this.lastDropTarget.onDragStop(i)}this.lastDropTarget=null;this.dragItem=null;this.removeGhost()};i.prototype.onDragging=function(t,i){var n=this;var r,e,s,o;var u=this.getHorizontalDirection(t);var a=this.getVerticalDirection(t);this.eventLastTime=t;this.positionGhost(t);var f=this.dropTargets.filter((function(i){return n.isMouseOnDropTarget(t,i)}));var h=this.findCurrentDropTarget(t,f);if(h!==this.lastDropTarget){this.leaveLastTargetIfExists(t,u,a,i);if(this.lastDropTarget!==null&&h===null){(e=(r=this.dragSource).onGridExit)===null||e===void 0?void 0:e.call(r,this.dragItem)}if(this.lastDropTarget===null&&h!==null){(o=(s=this.dragSource).onGridEnter)===null||o===void 0?void 0:o.call(s,this.dragItem)}this.enterDragTargetIfExists(h,t,u,a,i);this.lastDropTarget=h}else if(h&&h.onDragging){var c=this.createDropTargetEvent(h,t,u,a,i);h.onDragging(c)}};i.prototype.getAllContainersFromDropTarget=function(t){var i=t.getSecondaryContainers?t.getSecondaryContainers():null;var n=[[t.getContainer()]];return i?n.concat(i):n};i.prototype.allContainersIntersect=function(t,i){var n,r;try{for(var e=Pu(i),s=e.next();!s.done;s=e.next()){var o=s.value;var u=o.getBoundingClientRect();if(u.width===0||u.height===0){return false}var a=t.clientX>=u.left&&t.clientX<u.right;var f=t.clientY>=u.top&&t.clientY<u.bottom;if(!a||!f){return false}}}catch(t){n={error:t}}finally{try{if(s&&!s.done&&(r=e.return))r.call(e)}finally{if(n)throw n.error}}return true};i.prototype.isMouseOnDropTarget=function(t,i){var n,r;var e=this.getAllContainersFromDropTarget(i);var s=false;try{for(var o=Pu(e),u=o.next();!u.done;u=o.next()){var a=u.value;if(this.allContainersIntersect(t,a)){s=true;break}}}catch(t){n={error:t}}finally{try{if(u&&!u.done&&(r=o.return))r.call(o)}finally{if(n)throw n.error}}if(i.targetContainsSource&&!i.getContainer().contains(this.dragSource.eElement)){return false}return s&&i.isInterestedIn(this.dragSource.type,this.dragSource.eElement)};i.prototype.findCurrentDropTarget=function(t,i){var n,r,e,s;var o=i.length;if(o===0){return null}if(o===1){return i[0]}var u=this.gridOptionsService.getRootNode();var a=u.elementsFromPoint(t.clientX,t.clientY);try{for(var f=Pu(a),h=f.next();!h.done;h=f.next()){var c=h.value;try{for(var l=(e=void 0,Pu(i)),v=l.next();!v.done;v=l.next()){var d=v.value;var p=Ht(this.getAllContainersFromDropTarget(d));if(p.indexOf(c)!==-1){return d}}}catch(t){e={error:t}}finally{try{if(v&&!v.done&&(s=l.return))s.call(l)}finally{if(e)throw e.error}}}}catch(t){n={error:t}}finally{try{if(h&&!h.done&&(r=f.return))r.call(f)}finally{if(n)throw n.error}}return null};i.prototype.enterDragTargetIfExists=function(t,i,n,r,e){if(!t){return}if(t.onDragEnter){var s=this.createDropTargetEvent(t,i,n,r,e);t.onDragEnter(s)}this.setGhostIcon(t.getIconName?t.getIconName():null)};i.prototype.leaveLastTargetIfExists=function(t,i,n,r){if(!this.lastDropTarget){return}if(this.lastDropTarget.onDragLeave){var e=this.createDropTargetEvent(this.lastDropTarget,t,i,n,r);this.lastDropTarget.onDragLeave(e)}this.setGhostIcon(null)};i.prototype.addDropTarget=function(t){this.dropTargets.push(t)};i.prototype.removeDropTarget=function(t){this.dropTargets=this.dropTargets.filter((function(i){return i.getContainer()!==t.getContainer()}))};i.prototype.hasExternalDropZones=function(){return this.dropTargets.some((function(t){return t.external}))};i.prototype.findExternalZone=function(t){var i=this.dropTargets.filter((function(t){return t.external}));return i.find((function(i){return i.getContainer()===t.getContainer()}))||null};i.prototype.getHorizontalDirection=function(t){var i=this.eventLastTime&&this.eventLastTime.clientX;var n=t.clientX;if(i===n){return null}return i>n?Nu.Left:Nu.Right};i.prototype.getVerticalDirection=function(t){var i=this.eventLastTime&&this.eventLastTime.clientY;var n=t.clientY;if(i===n){return null}return i>n?Iu.Up:Iu.Down};i.prototype.createDropTargetEvent=function(t,i,n,r,e){var s=t.getContainer();var o=s.getBoundingClientRect();var u=this,a=u.gridApi,f=u.columnApi,h=u.dragItem,c=u.dragSource;var l=i.clientX-o.left;var v=i.clientY-o.top;return{event:i,x:l,y:v,vDirection:r,hDirection:n,dragSource:c,fromNudge:e,dragItem:h,api:a,columnApi:f,dropZoneTarget:s}};i.prototype.positionGhost=function(t){var i=this.eGhost;if(!i){return}var n=i.getBoundingClientRect();var r=n.height;var e=cr()-2;var s=lr()-2;var o=Qr(i.offsetParent);var u=t.clientY,a=t.clientX;var f=u-o.top-r/2;var h=a-o.left-10;var c=this.gridOptionsService.getDocument();var l=c.defaultView||window;var v=l.pageYOffset||c.documentElement.scrollTop;var d=l.pageXOffset||c.documentElement.scrollLeft;if(e>0&&h+i.clientWidth>e+d){h=e+d-i.clientWidth}if(h<0){h=0}if(s>0&&f+i.clientHeight>s+v){f=s+v-i.clientHeight}if(f<0){f=0}i.style.left=h+"px";i.style.top=f+"px"};i.prototype.removeGhost=function(){if(this.eGhost&&this.eGhostParent){this.eGhostParent.removeChild(this.eGhost)}this.eGhost=null};i.prototype.createGhost=function(){this.eGhost=re(n.GHOST_TEMPLATE);this.mouseEventService.stampTopLevelGridCompWithGridInstance(this.eGhost);var t=this.environment.getTheme().theme;if(t){this.eGhost.classList.add(t)}this.eGhostIcon=this.eGhost.querySelector(".ag-dnd-ghost-icon");this.setGhostIcon(null);var i=this.eGhost.querySelector(".ag-dnd-ghost-label");var r=this.dragSource.dragItemName;if(I(r)){r=r()}i.innerHTML=mi(r)||"";this.eGhost.style.height="25px";this.eGhost.style.top="20px";this.eGhost.style.left="20px";var e=this.gridOptionsService.getDocument();var s=null;try{s=e.fullscreenElement}catch(t){}finally{if(!s){var o=this.gridOptionsService.getRootNode();var u=o.querySelector("body");if(u){s=u}else if(o instanceof ShadowRoot){s=o}else{s=o===null||o===void 0?void 0:o.documentElement}}}this.eGhostParent=s;if(!this.eGhostParent){console.warn("AG Grid: could not find document body, it is needed for dragging columns")}else{this.eGhostParent.appendChild(this.eGhost)}};i.prototype.setGhostIcon=function(t,i){if(i===void 0){i=false}Xr(this.eGhostIcon);var r=null;if(!t){t=this.dragSource.getDefaultIconName?this.dragSource.getDefaultIconName():n.ICON_NOT_ALLOWED}switch(t){case n.ICON_PINNED:r=this.ePinnedIcon;break;case n.ICON_MOVE:r=this.eMoveIcon;break;case n.ICON_LEFT:r=this.eLeftIcon;break;case n.ICON_RIGHT:r=this.eRightIcon;break;case n.ICON_GROUP:r=this.eGroupIcon;break;case n.ICON_AGGREGATE:r=this.eAggregateIcon;break;case n.ICON_PIVOT:r=this.ePivotIcon;break;case n.ICON_NOT_ALLOWED:r=this.eDropNotAllowedIcon;break;case n.ICON_HIDE:r=this.eHideIcon;break}this.eGhostIcon.classList.toggle("ag-shake-left-to-right",i);if(r===this.eHideIcon&&this.gridOptionsService.is("suppressDragLeaveHidesColumns")){return}if(r){this.eGhostIcon.appendChild(r)}};var n;i.ICON_PINNED="pinned";i.ICON_MOVE="move";i.ICON_LEFT="left";i.ICON_RIGHT="right";i.ICON_GROUP="group";i.ICON_AGGREGATE="aggregate";i.ICON_PIVOT="pivot";i.ICON_NOT_ALLOWED="notAllowed";i.ICON_HIDE="hide";i.GHOST_TEMPLATE='<div class="ag-dnd-ghost ag-unselectable">\n <span class="ag-dnd-ghost-icon ag-shake-left-to-right"></span>\n <div class="ag-dnd-ghost-label"></div>\n </div>';Gu([ut("dragService")],i.prototype,"dragService",void 0);Gu([ut("mouseEventService")],i.prototype,"mouseEventService",void 0);Gu([ut("columnApi")],i.prototype,"columnApi",void 0);Gu([ut("gridApi")],i.prototype,"gridApi",void 0);Gu([et],i.prototype,"init",null);Gu([st],i.prototype,"clearDragSourceParamsList",null);i=n=Gu([ot("dragAndDropService")],i);return i}(ri);var Lu=function(){var t=function(i,n){t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var n in i)if(Object.prototype.hasOwnProperty.call(i,n))t[n]=i[n]};return t(i,n)};return function(i,n){if(typeof n!=="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(i,n);function r(){this.constructor=i}i.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}();var Vu=function(t,i,n,r){var e=arguments.length,s=e<3?i:r===null?r=Object.getOwnPropertyDescriptor(i,n):r,o;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")s=Reflect.decorate(t,i,n,r);else for(var u=t.length-1;u>=0;u--)if(o=t[u])s=(e<3?o(s):e>3?o(i,n,s):o(i,n))||s;return e>3&&s&&Object.defineProperty(i,n,s),s};var Bu=function(t){Lu(i,t);function i(i,n,r,e,s,o){var u=t.call(this)||this;u.cellValueFn=i;u.rowNode=n;u.column=r;u.customGui=e;u.dragStartPixels=s;u.suppressVisibilityChange=o;u.dragSource=null;return u}i.prototype.isCustomGui=function(){return this.customGui!=null};i.prototype.postConstruct=function(){if(!this.customGui){this.setTemplate('<div class="ag-drag-handle ag-row-drag" aria-hidden="true"></div>');this.getGui().appendChild(Fe("rowDrag",this.gridOptionsService,null));this.addDragSource()}else{this.setDragElement(this.customGui,this.dragStartPixels)}this.checkCompatibility();if(!this.suppressVisibilityChange){var t=this.gridOptionsService.is("rowDragManaged")?new Uu(this,this.beans,this.rowNode,this.column):new Wu(this,this.beans,this.rowNode,this.column);this.createManagedBean(t,this.beans.context)}};i.prototype.setDragElement=function(t,i){this.setTemplateFromElement(t);this.addDragSource(i)};i.prototype.getSelectedNodes=function(){var t=this.gridOptionsService.is("rowDragMultiRow");if(!t){return[this.rowNode]}var i=this.beans.selectionService.getSelectedNodes();return i.indexOf(this.rowNode)!==-1?i:[this.rowNode]};i.prototype.checkCompatibility=function(){var t=this.gridOptionsService.is("rowDragManaged");var i=this.gridOptionsService.is("treeData");if(i&&t){P((function(){return console.warn("AG Grid: If using row drag with tree data, you cannot have rowDragManaged=true")}),"RowDragComp.managedAndTreeData")}};i.prototype.getDragItem=function(){return{rowNode:this.rowNode,rowNodes:this.getSelectedNodes(),columns:this.column?[this.column]:undefined,defaultTextValue:this.cellValueFn()}};i.prototype.getRowDragText=function(t){if(t){var i=t.getColDef();if(i.rowDragText){return i.rowDragText}}return this.gridOptionsService.get("rowDragText")};i.prototype.addDragSource=function(t){var i=this;if(t===void 0){t=4}if(this.dragSource){this.removeDragSource()}var n=this.getRowDragText(this.column);var r=this.localeService.getLocaleTextFunc();this.dragSource={type:Eu.RowDrag,eElement:this.getGui(),dragItemName:function(){var t;var e=i.getDragItem();var s=((t=e.rowNodes)===null||t===void 0?void 0:t.length)||1;if(n){return n(e,s)}return s===1?i.cellValueFn():s+" "+r("rowDragRows","rows")},getDragItem:function(){return i.getDragItem()},dragStartPixels:t,dragSourceDomDataKey:this.gridOptionsService.getDomDataKey()};this.beans.dragAndDropService.addDragSource(this.dragSource,true)};i.prototype.removeDragSource=function(){if(this.dragSource){this.beans.dragAndDropService.removeDragSource(this.dragSource)}this.dragSource=null};Vu([ut("beans")],i.prototype,"beans",void 0);Vu([et],i.prototype,"postConstruct",null);Vu([st],i.prototype,"removeDragSource",null);return i}(vs);var zu=function(t){Lu(i,t);function i(i,n,r){var e=t.call(this)||this;e.parent=i;e.rowNode=n;e.column=r;return e}i.prototype.setDisplayedOrVisible=function(t){var i={skipAriaHidden:true};if(t){this.parent.setDisplayed(false,i)}else{var n=true;var r=false;if(this.column){n=this.column.isRowDrag(this.rowNode)||this.parent.isCustomGui();r=I(this.column.getColDef().rowDrag)}if(r){this.parent.setDisplayed(true,i);this.parent.setVisible(n,i)}else{this.parent.setDisplayed(n,i);this.parent.setVisible(true,i)}}};return i}(ri);var Wu=function(t){Lu(i,t);function i(i,n,r,e){var s=t.call(this,i,r,e)||this;s.beans=n;return s}i.prototype.postConstruct=function(){this.addManagedPropertyListener("suppressRowDrag",this.onSuppressRowDrag.bind(this));this.addManagedListener(this.rowNode,Au.EVENT_DATA_CHANGED,this.workOutVisibility.bind(this));this.addManagedListener(this.rowNode,Au.EVENT_CELL_CHANGED,this.workOutVisibility.bind(this));this.addManagedListener(this.rowNode,Au.EVENT_CELL_CHANGED,this.workOutVisibility.bind(this));this.addManagedListener(this.beans.eventService,hi.EVENT_NEW_COLUMNS_LOADED,this.workOutVisibility.bind(this));this.workOutVisibility()};i.prototype.onSuppressRowDrag=function(){this.workOutVisibility()};i.prototype.workOutVisibility=function(){var t=this.gridOptionsService.is("suppressRowDrag");this.setDisplayedOrVisible(t)};Vu([et],i.prototype,"postConstruct",null);return i}(zu);var Uu=function(t){Lu(i,t);function i(i,n,r,e){var s=t.call(this,i,r,e)||this;s.beans=n;return s}i.prototype.postConstruct=function(){this.addManagedListener(this.beans.eventService,hi.EVENT_SORT_CHANGED,this.workOutVisibility.bind(this));this.addManagedListener(this.beans.eventService,hi.EVENT_FILTER_CHANGED,this.workOutVisibility.bind(this));this.addManagedListener(this.beans.eventService,hi.EVENT_COLUMN_ROW_GROUP_CHANGED,this.workOutVisibility.bind(this));this.addManagedListener(this.beans.eventService,hi.EVENT_NEW_COLUMNS_LOADED,this.workOutVisibility.bind(this));this.addManagedListener(this.rowNode,Au.EVENT_DATA_CHANGED,this.workOutVisibility.bind(this));this.addManagedListener(this.rowNode,Au.EVENT_CELL_CHANGED,this.workOutVisibility.bind(this));this.addManagedPropertyListener("suppressRowDrag",this.onSuppressRowDrag.bind(this));this.workOutVisibility()};i.prototype.onSuppressRowDrag=function(){this.workOutVisibility()};i.prototype.workOutVisibility=function(){var t=this.beans.ctrlsService.getGridBodyCtrl();var i=t.getRowDragFeature();var n=i&&i.shouldPreventRowMove();var r=this.gridOptionsService.is("suppressRowDrag");var e=this.beans.dragAndDropService.hasExternalDropZones();var s=n&&!e||r;this.setDisplayedOrVisible(s)};Vu([et],i.prototype,"postConstruct",null);return i}(zu);var Ku=function(){var t=function(i,n){t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var n in i)if(Object.prototype.hasOwnProperty.call(i,n))t[n]=i[n]};return t(i,n)};return function(i,n){if(typeof n!=="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(i,n);function r(){this.constructor=i}i.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}();var qu=function(){qu=Object.assign||function(t){for(var i,n=1,r=arguments.length;n<r;n++){i=arguments[n];for(var e in i)if(Object.prototype.hasOwnProperty.call(i,e))t[e]=i[e]}return t};return qu.apply(this,arguments)};var Yu=function(t,i,n,r){var e=arguments.length,s=e<3?i:r===null?r=Object.getOwnPropertyDescriptor(i,n):r,o;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")s=Reflect.decorate(t,i,n,r);else for(var u=t.length-1;u>=0;u--)if(o=t[u])s=(e<3?o(s):e>3?o(i,n,s):o(i,n))||s;return e>3&&s&&Object.defineProperty(i,n,s),s};var Qu=function(t){Ku(i,t);function i(){return t!==null&&t.apply(this,arguments)||this}i.prototype.init=function(t,i,n,r,e,s,o){this.params=o;this.eGui=i;this.eCheckbox=n;this.eExpanded=r;this.eContracted=e;this.comp=t;this.compClass=s;var u=o.node,a=o.value,f=o.colDef;var h=this.isTopLevelFooter();if(!h){var c=this.isEmbeddedRowMismatch();if(c){return}var l=(f===null||f===void 0?void 0:f.showRowGroup)===true;var v=a==null&&!u.master;if(!l&&v){return}if(u.footer&&this.gridOptionsService.is("groupHideOpenParents")){var d=f&&f.showRowGroup;var p=u.rowGroupColumn&&u.rowGroupColumn.getColId();if(d!==p){return}}}this.setupShowingValueForOpenedParent();this.findDisplayedGroupNode();this.addFullWidthRowDraggerIfNeeded();this.addExpandAndContract();this.addCheckboxIfNeeded();this.addValueElement();this.setupIndent();this.refreshAriaExpanded()};i.prototype.destroy=function(){t.prototype.destroy.call(this);this.expandListener=null};i.prototype.refreshAriaExpanded=function(){var t=this.params,i=t.node,n=t.eParentOfValue;if(this.expandListener){this.expandListener=this.expandListener()}if(!this.isExpandable()){Mn(n);return}var r=function(){Tn(n,!!i.expanded)};this.expandListener=this.addManagedListener(i,Au.EVENT_EXPANDED_CHANGED,r)||null;r()};i.prototype.isTopLevelFooter=function(){if(!this.gridOptionsService.is("groupIncludeTotalFooter")){return false}if(this.params.value!=null||this.params.node.level!=-1){return false}var t=this.params.colDef;var i=t==null;if(i){return true}if(t.showRowGroup===true){return true}var n=this.columnModel.getRowGroupColumns();if(!n||n.length===0){return true}var r=n[0];return r.getId()===t.showRowGroup};i.prototype.isEmbeddedRowMismatch=function(){if(!this.params.fullWidth||!this.gridOptionsService.is("embedFullWidthRows")){return false}var t=this.params.pinned==="left";var i=this.params.pinned==="right";var n=!t&&!i;if(this.gridOptionsService.is("enableRtl")){if(this.columnModel.isPinningLeft()){return!i}return!n}if(this.columnModel.isPinningLeft()){return!t}return!n};i.prototype.findDisplayedGroupNode=function(){var t=this.params.column;var i=this.params.node;if(this.showingValueForOpenedParent){var r=i.parent;while(r!=null){if(r.rowGroupColumn&&t.isRowGroupDisplayed(r.rowGroupColumn.getId())){this.displayedGroupNode=r;break}r=r.parent}}if(n(this.displayedGroupNode)){this.displayedGroupNode=i}};i.prototype.setupShowingValueForOpenedParent=function(){var t=this.params.node;var i=this.params.column;if(!this.gridOptionsService.is("groupHideOpenParents")){this.showingValueForOpenedParent=false;return}if(!t.groupData){this.showingValueForOpenedParent=false;return}var n=t.rowGroupColumn!=null;if(n){var r=t.rowGroupColumn.getId();var e=i.isRowGroupDisplayed(r);if(e){this.showingValueForOpenedParent=false;return}}var s=t.groupData[i.getId()]!=null;this.showingValueForOpenedParent=s};i.prototype.addValueElement=function(){if(this.displayedGroupNode.footer){this.addFooterValue()}else{this.addGroupValue();this.addChildCount()}};i.prototype.addGroupValue=function(){var t=this.adjustParamsWithDetailsFromRelatedColumn();var i=this.getInnerCompDetails(t);var n=t.valueFormatted,r=t.value;var e=n;if(e==null){if(r===""&&this.params.node.group){var s=this.localeService.getLocaleTextFunc();e=s("blanks","(Blanks)")}else{e=r!==null&&r!==void 0?r:null}}this.comp.setInnerRenderer(i,e)};i.prototype.adjustParamsWithDetailsFromRelatedColumn=function(){var t=this.displayedGroupNode.rowGroupColumn;var i=this.params.column;if(!t){return this.params}var n=i!=null;if(n){var r=i.isRowGroupDisplayed(t.getId());if(!r){return this.params}}var e=this.params;var s=this.params,o=s.value,u=s.node;var a=this.valueFormatterService.formatValue(t,u,o);var f=qu(qu({},e),{valueFormatted:a});return f};i.prototype.addFooterValue=function(){var t=this.params.footerValueGetter;var i="";if(t){var n=b(this.params);n.value=this.params.value;if(typeof t==="function"){i=t(n)}else if(typeof t==="string"){i=this.expressionService.evaluate(t,n)}else{console.warn("AG Grid: footerValueGetter should be either a function or a string (expression)")}}else{i="Total "+(this.params.value!=null?this.params.value:"")}var r=this.getInnerCompDetails(this.params);this.comp.setInnerRenderer(r,i)};i.prototype.getInnerCompDetails=function(t){var i=this;if(t.fullWidth){return this.userComponentFactory.getFullWidthGroupRowInnerCellRenderer(this.gridOptionsService.get("groupRowRendererParams"),t)}var n=this.userComponentFactory.getInnerRendererDetails(t,t);var r=function(t){return t&&t.componentClass==i.compClass};if(n&&!r(n)){return n}var e=this.displayedGroupNode.rowGroupColumn;var s=e?e.getColDef():undefined;if(!s){return}var o=this.userComponentFactory.getCellRendererDetails(s,t);if(o&&!r(o)){return o}if(r(o)&&s.cellRendererParams&&s.cellRendererParams.innerRenderer){var u=this.userComponentFactory.getInnerRendererDetails(s.cellRendererParams,t);return u}};i.prototype.addChildCount=function(){if(this.params.suppressCount){return}this.addManagedListener(this.displayedGroupNode,Au.EVENT_ALL_CHILDREN_COUNT_CHANGED,this.updateChildCount.bind(this));this.updateChildCount()};i.prototype.updateChildCount=function(){var t=this.displayedGroupNode.allChildrenCount;var i=this.isShowRowGroupForThisRow();var n=i&&t!=null&&t>=0;var r=n?"("+t+")":"";this.comp.setChildCount(r)};i.prototype.isShowRowGroupForThisRow=function(){if(this.gridOptionsService.is("treeData")){return true}var t=this.displayedGroupNode.rowGroupColumn;if(!t){return false}var i=this.params.column;var n=i==null||i.isRowGroupDisplayed(t.getId());return n};i.prototype.addExpandAndContract=function(){var t;var i=this.params;var n=Fe("groupExpanded",this.gridOptionsService,null);var r=Fe("groupContracted",this.gridOptionsService,null);if(n){this.eExpanded.appendChild(n)}if(r){this.eContracted.appendChild(r)}var e=i.eGridCell;var s=((t=this.params.column)===null||t===void 0?void 0:t.isCellEditable(i.node))&&this.gridOptionsService.is("enableGroupEdit");if(!s&&this.isExpandable()&&!i.suppressDoubleClickExpand){this.addManagedListener(e,"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(e,"keydown",this.onKeyDown.bind(this));this.addManagedListener(i.node,Au.EVENT_EXPANDED_CHANGED,this.showExpandAndContractIcons.bind(this));this.showExpandAndContractIcons();var o=this.onRowNodeIsExpandableChanged.bind(this);this.addManagedListener(this.displayedGroupNode,Au.EVENT_ALL_CHILDREN_COUNT_CHANGED,o);this.addManagedListener(this.displayedGroupNode,Au.EVENT_MASTER_CHANGED,o);this.addManagedListener(this.displayedGroupNode,Au.EVENT_GROUP_CHANGED,o);this.addManagedListener(this.displayedGroupNode,Au.EVENT_HAS_CHILDREN_CHANGED,o)};i.prototype.onExpandClicked=function(t){if(Yt(t)){return}qt(t);this.onExpandOrContract(t)};i.prototype.onExpandOrContract=function(t){var i=this.displayedGroupNode;var n=!i.expanded;if(!n&&i.sticky){this.scrollToStickyNode(i)}i.setExpanded(n,t)};i.prototype.scrollToStickyNode=function(t){var i=this.ctrlsService.getGridBodyCtrl();var n=i.getScrollFeature();n.setVerticalScrollPosition(t.rowTop-t.stickyRowTop)};i.prototype.isExpandable=function(){if(this.showingValueForOpenedParent){return true}var t=this.displayedGroupNode;var i=this.columnModel.isPivotMode()&&t.leafGroup;var n=t.isExpandable()&&!t.footer&&!i;if(!n){return false}var r=this.params.column;var e=r!=null&&typeof r.getColDef().showRowGroup==="string";if(e){var s=this.isShowRowGroupForThisRow();return s}return true};i.prototype.showExpandAndContractIcons=function(){var t=this,i=t.params,n=t.displayedGroupNode,r=t.columnModel;var e=i.node;var s=this.isExpandable();if(s){var o=this.showingValueForOpenedParent?true:e.expanded;this.comp.setExpandedDisplayed(o);this.comp.setContractedDisplayed(!o)}else{this.comp.setExpandedDisplayed(false);this.comp.setContractedDisplayed(false)}var u=r.isPivotMode();var a=u&&n.leafGroup;var f=s&&!a;var h=e.footer&&e.level===-1;this.comp.addOrRemoveCssClass("ag-cell-expandable",f);this.comp.addOrRemoveCssClass("ag-row-group",f);if(u){this.comp.addOrRemoveCssClass("ag-pivot-leaf-group",a)}else if(!h){this.comp.addOrRemoveCssClass("ag-row-group-leaf-indent",!f)}};i.prototype.onRowNodeIsExpandableChanged=function(){this.showExpandAndContractIcons();this.setIndent();this.refreshAriaExpanded()};i.prototype.setupIndent=function(){var t=this.params.node;var i=this.params.suppressPadding;if(!i){this.addManagedListener(t,Au.EVENT_UI_LEVEL_CHANGED,this.setIndent.bind(this));this.setIndent()}};i.prototype.setIndent=function(){if(this.gridOptionsService.is("groupHideOpenParents")){return}var t=this.params;var i=t.node;var n=!!t.colDef;var r=this.gridOptionsService.is("treeData");var e=!n||r||t.colDef.showRowGroup===true;var s=e?i.uiLevel:0;if(this.indentClass){this.comp.addOrRemoveCssClass(this.indentClass,false)}this.indentClass="ag-row-group-indent-"+s;this.comp.addOrRemoveCssClass(this.indentClass,true)};i.prototype.addFullWidthRowDraggerIfNeeded=function(){var t=this;if(!this.params.fullWidth||!this.params.rowDrag){return}var i=new Bu((function(){return t.params.value}),this.params.node);this.createManagedBean(i,this.context);this.eGui.insertAdjacentElement("afterbegin",i.getGui())};i.prototype.isUserWantsSelected=function(){var t=this.params.checkbox;return typeof t==="function"||t===true};i.prototype.addCheckboxIfNeeded=function(){var t=this;var i=this.displayedGroupNode;var n=this.isUserWantsSelected()&&!i.footer&&!i.rowPinned&&!i.detail;if(n){var r=new Mu;this.getContext().createBean(r);r.init({rowNode:this.params.node,column:this.params.column,overrides:{isVisible:this.params.checkbox,callbackParams:this.params,removeHidden:true}});this.eCheckbox.appendChild(r.getGui());this.addDestroyFunc((function(){return t.getContext().destroyBean(r)}))}this.comp.setCheckboxVisible(n)};i.prototype.onKeyDown=function(t){var i=t.key===Te.ENTER;if(!i||this.params.suppressEnterExpand){return}var n=this.params.column&&this.params.column.isCellEditable(this.params.node);if(n){return}this.onExpandOrContract(t)};i.prototype.onCellDblClicked=function(t){if(Yt(t)){return}var i=Zt(this.eExpanded,t)||Zt(this.eContracted,t);if(!i){this.onExpandOrContract(t)}};Yu([ut("expressionService")],i.prototype,"expressionService",void 0);Yu([ut("valueFormatterService")],i.prototype,"valueFormatterService",void 0);Yu([ut("columnModel")],i.prototype,"columnModel",void 0);Yu([ut("userComponentFactory")],i.prototype,"userComponentFactory",void 0);Yu([ut("ctrlsService")],i.prototype,"ctrlsService",void 0);return i}(ri);var Ju=function(){var t=function(i,n){t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var n in i)if(Object.prototype.hasOwnProperty.call(i,n))t[n]=i[n]};return t(i,n)};return function(i,n){if(typeof n!=="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(i,n);function r(){this.constructor=i}i.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}();var Zu=function(t,i,n,r){var e=arguments.length,s=e<3?i:r===null?r=Object.getOwnPropertyDescriptor(i,n):r,o;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")s=Reflect.decorate(t,i,n,r);else for(var u=t.length-1;u>=0;u--)if(o=t[u])s=(e<3?o(s):e>3?o(i,n,s):o(i,n))||s;return e>3&&s&&Object.defineProperty(i,n,s),s};var $u=function(t){Ju(i,t);function i(){return t.call(this,i.TEMPLATE)||this}i.prototype.init=function(t){var i=this;var n={setInnerRenderer:function(t,n){return i.setRenderDetails(t,n)},setChildCount:function(t){return i.eChildCount.innerHTML=t},addOrRemoveCssClass:function(t,n){return i.addOrRemoveCssClass(t,n)},setContractedDisplayed:function(t){return Lr(i.eContracted,t)},setExpandedDisplayed:function(t){return Lr(i.eExpanded,t)},setCheckboxVisible:function(t){return i.eCheckbox.classList.toggle("ag-invisible",!t)}};var r=this.createManagedBean(new Qu);var e=!t.colDef;var s=this.getGui();r.init(n,s,this.eCheckbox,this.eExpanded,this.eContracted,this.constructor,t);if(e){bn(s,"gridcell")}};i.prototype.setRenderDetails=function(t,i){var n=this;if(t){var r=t.newAgStackInstance();if(!r){return}r.then((function(t){if(!t){return}var i=function(){return n.context.destroyBean(t)};if(n.isAlive()){n.eValue.appendChild(t.getGui());n.addDestroyFunc(i)}else{i()}}))}else{this.eValue.innerText=i}};i.prototype.destroy=function(){this.getContext().destroyBean(this.innerCellRenderer);t.prototype.destroy.call(this)};i.prototype.refresh=function(){return false};i.TEMPLATE='<span class="ag-cell-wrapper">\n <span class="ag-group-expanded" ref="eExpanded"></span>\n <span class="ag-group-contracted" ref="eContracted"></span>\n <span class="ag-group-checkbox ag-invisible" ref="eCheckbox"></span>\n <span class="ag-group-value" ref="eValue"></span>\n <span class="ag-group-child-count" ref="eChildCount"></span>\n </span>';Zu([ds("eExpanded")],i.prototype,"eExpanded",void 0);Zu([ds("eContracted")],i.prototype,"eContracted",void 0);Zu([ds("eCheckbox")],i.prototype,"eCheckbox",void 0);Zu([ds("eValue")],i.prototype,"eValue",void 0);Zu([ds("eChildCount")],i.prototype,"eChildCount",void 0);return i}(vs);var Xu=function(){var t=function(i,n){t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var n in i)if(Object.prototype.hasOwnProperty.call(i,n))t[n]=i[n]};return t(i,n)};return function(i,n){if(typeof n!=="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(i,n);function r(){this.constructor=i}i.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}();var ta=function(t,i,n,r){var e=arguments.length,s=e<3?i:r===null?r=Object.getOwnPropertyDescriptor(i,n):r,o;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")s=Reflect.decorate(t,i,n,r);else for(var u=t.length-1;u>=0;u--)if(o=t[u])s=(e<3?o(s):e>3?o(i,n,s):o(i,n))||s;return e>3&&s&&Object.defineProperty(i,n,s),s};var ia=function(t){Xu(i,t);function i(){return t.call(this,i.TEMPLATE)||this}i.prototype.init=function(t){t.node.failedLoad?this.setupFailed():this.setupLoading()};i.prototype.setupFailed=function(){var t=this.localeService.getLocaleTextFunc();this.eLoadingText.innerText=t("loadingError","ERR")};i.prototype.setupLoading=function(){var t=Fe("groupLoading",this.gridOptionsService,null);if(t){this.eLoadingIcon.appendChild(t)}var i=this.localeService.getLocaleTextFunc();this.eLoadingText.innerText=i("loadingOoo","Loading")};i.prototype.refresh=function(t){return false};i.prototype.destroy=function(){t.prototype.destroy.call(this)};i.TEMPLATE='<div class="ag-loading">\n <span class="ag-loading-icon" ref="eLoadingIcon"></span>\n <span class="ag-loading-text" ref="eLoadingText"></span>\n </div>';ta([ds("eLoadingIcon")],i.prototype,"eLoadingIcon",void 0);ta([ds("eLoadingText")],i.prototype,"eLoadingText",void 0);return i}(vs);var na=function(){var t=function(i,n){t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var n in i)if(Object.prototype.hasOwnProperty.call(i,n))t[n]=i[n]};return t(i,n)};return function(i,n){if(typeof n!=="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(i,n);function r(){this.constructor=i}i.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}();var ra=function(t){na(i,t);function i(){return t.call(this)||this}i.prototype.destroy=function(){t.prototype.destroy.call(this)};i.prototype.init=function(t){var n;var r=(n=this.gridOptionsService.get("overlayLoadingTemplate"))!==null&&n!==void 0?n:i.DEFAULT_LOADING_OVERLAY_TEMPLATE;var e=this.localeService.getLocaleTextFunc();var s=r.replace("[LOADING...]",e("loadingOoo","Loading..."));this.setTemplate(s)};i.DEFAULT_LOADING_OVERLAY_TEMPLATE='<span class="ag-overlay-loading-center">[LOADING...]</span>';return i}(vs);var ea=function(){var t=function(i,n){t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var n in i)if(Object.prototype.hasOwnProperty.call(i,n))t[n]=i[n]};return t(i,n)};return function(i,n){if(typeof n!=="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(i,n);function r(){this.constructor=i}i.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}();var sa=function(t){ea(i,t);function i(){return t.call(this)||this}i.prototype.destroy=function(){t.prototype.destroy.call(this)};i.prototype.init=function(t){var n;var r=(n=this.gridOptionsService.get("overlayNoRowsTemplate"))!==null&&n!==void 0?n:i.DEFAULT_NO_ROWS_TEMPLATE;var e=this.localeService.getLocaleTextFunc();var s=r.replace("[NO_ROWS_TO_SHOW]",e("noRowsToShow","No Rows To Show"));this.setTemplate(s)};i.DEFAULT_NO_ROWS_TEMPLATE='<span class="ag-overlay-no-rows-center">[NO_ROWS_TO_SHOW]</span>';return i}(vs);var oa=function(){var t=function(i,n){t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var n in i)if(Object.prototype.hasOwnProperty.call(i,n))t[n]=i[n]};return t(i,n)};return function(i,n){if(typeof n!=="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(i,n);function r(){this.constructor=i}i.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}();var ua=function(t){oa(i,t);function i(){return t.call(this,'<div class="ag-tooltip"></div>')||this}i.prototype.init=function(t){var i=t.value;this.getGui().innerHTML=mi(i)};return i}(ou);var aa=function(){var t=function(i,n){t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var n in i)if(Object.prototype.hasOwnProperty.call(i,n))t[n]=i[n]};return t(i,n)};return function(i,n){if(typeof n!=="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(i,n);function r(){this.constructor=i}i.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}();var fa=function(){function t(){}t.prototype.getTemplate=function(){return'<ag-input-number-field class="ag-cell-editor" ref="eInput"></ag-input-number-field>'};t.prototype.init=function(t,i){this.eInput=t;this.params=i;if(i.max!=null){t.setMax(i.max)}if(i.min!=null){t.setMin(i.min)}if(i.precision!=null){t.setPrecision(i.precision)}if(i.step!=null){t.setStep(i.step)}if(i.showStepperButtons){t.getInputElement().classList.add("ag-number-field-input-stepper")}};t.prototype.getValue=function(){var t=this.eInput.getValue();if(!i(t)&&!i(this.params.value)){return this.params.value}var n=this.params.parseValue(t);if(n==null){return n}if(typeof n==="string"){if(n===""){return null}n=Number(n)}return isNaN(n)?null:n};t.prototype.getStartValue=function(){return this.params.value};return t}();var ha=function(t){aa(i,t);function i(){return t.call(this,new fa)||this}return i}(pu);var ca=function(){var t=function(i,n){t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var n in i)if(Object.prototype.hasOwnProperty.call(i,n))t[n]=i[n]};return t(i,n)};return function(i,n){if(typeof n!=="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(i,n);function r(){this.constructor=i}i.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}();var la=function(){function t(){}t.prototype.getTemplate=function(){return'<ag-input-date-field class="ag-cell-editor" ref="eInput"></ag-input-date-field>'};t.prototype.init=function(t,i){this.eInput=t;this.params=i;if(i.min!=null){t.setMin(i.min)}if(i.max!=null){t.setMax(i.max)}if(i.step!=null){t.setStep(i.step)}};t.prototype.getValue=function(){var t=this.eInput.getDate();if(!i(t)&&!i(this.params.value)){return this.params.value}return t!==null&&t!==void 0?t:null};t.prototype.getStartValue=function(){var t=this.params.value;if(!(t instanceof Date)){return undefined}return Ar(t,false)};return t}();var va=function(t){ca(i,t);function i(){return t.call(this,new la)||this}return i}(pu);var da=function(){var t=function(i,n){t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var n in i)if(Object.prototype.hasOwnProperty.call(i,n))t[n]=i[n]};return t(i,n)};return function(i,n){if(typeof n!=="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(i,n);function r(){this.constructor=i}i.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}();var pa=function(t,i,n,r){var e=arguments.length,s=e<3?i:r===null?r=Object.getOwnPropertyDescriptor(i,n):r,o;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")s=Reflect.decorate(t,i,n,r);else for(var u=t.length-1;u>=0;u--)if(o=t[u])s=(e<3?o(s):e>3?o(i,n,s):o(i,n))||s;return e>3&&s&&Object.defineProperty(i,n,s),s};var ga=function(){function t(t){this.getDataTypeService=t}t.prototype.getTemplate=function(){return'<ag-input-date-field class="ag-cell-editor" ref="eInput"></ag-input-date-field>'};t.prototype.init=function(t,i){this.eInput=t;this.params=i;if(i.min!=null){t.setMin(i.min)}if(i.max!=null){t.setMax(i.max)}if(i.step!=null){t.setStep(i.step)}};t.prototype.getValue=function(){var t=this.formatDate(this.eInput.getDate());if(!i(t)&&!i(this.params.value)){return this.params.value}return this.params.parseValue(t!==null&&t!==void 0?t:"")};t.prototype.getStartValue=function(){var t,i;return Ar((i=this.parseDate((t=this.params.value)!==null&&t!==void 0?t:undefined))!==null&&i!==void 0?i:null,false)};t.prototype.parseDate=function(t){return this.getDataTypeService().getDateParserFunction()(t)};t.prototype.formatDate=function(t){return this.getDataTypeService().getDateFormatterFunction()(t)};return t}();var ba=function(t){da(i,t);function i(){var i=t.call(this,new ga((function(){return i.dataTypeService})))||this;return i}pa([ut("dataTypeService")],i.prototype,"dataTypeService",void 0);return i}(pu);var wa=function(){var t=function(i,n){t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var n in i)if(Object.prototype.hasOwnProperty.call(i,n))t[n]=i[n]};return t(i,n)};return function(i,n){if(typeof n!=="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(i,n);function r(){this.constructor=i}i.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}();var ya=function(t,i,n,r){var e=arguments.length,s=e<3?i:r===null?r=Object.getOwnPropertyDescriptor(i,n):r,o;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")s=Reflect.decorate(t,i,n,r);else for(var u=t.length-1;u>=0;u--)if(o=t[u])s=(e<3?o(s):e>3?o(i,n,s):o(i,n))||s;return e>3&&s&&Object.defineProperty(i,n,s),s};var ma=function(t){wa(i,t);function i(){return t.call(this,i.TEMPLATE)||this}i.prototype.init=function(t){var i=this;this.params=t;this.updateCheckbox(t);this.eCheckbox.getInputElement().setAttribute("tabindex","-1");this.addManagedListener(this.eCheckbox.getInputElement(),"click",(function(t){qt(t);if(i.eCheckbox.isDisabled()){return}var n=i.eCheckbox.getValue();i.onCheckboxChanged(n)}));this.addManagedListener(this.eCheckbox.getInputElement(),"dblclick",(function(t){qt(t)}));var n=this.gridOptionsService.getDocument();this.addManagedListener(this.params.eGridCell,"keydown",(function(t){if(t.key===Te.SPACE&&!i.eCheckbox.isDisabled()){if(i.params.eGridCell===n.activeElement){i.eCheckbox.toggle()}var r=i.eCheckbox.getValue();i.onCheckboxChanged(r);t.preventDefault()}}))};i.prototype.refresh=function(t){this.params=t;this.updateCheckbox(t);return true};i.prototype.updateCheckbox=function(t){var i,n,r;var e;var s=true;if(t.node.group&&t.column){var o=t.column.getColId();if(o.startsWith(di)){e=t.value==null||t.value===""?undefined:t.value==="true"}else if(t.node.aggData&&t.node.aggData[o]!==undefined){e=(i=t.value)!==null&&i!==void 0?i:undefined}else{s=false}}else{e=(n=t.value)!==null&&n!==void 0?n:undefined}if(!s){this.eCheckbox.setDisplayed(false);return}this.eCheckbox.setValue(e);var u=t.disabled!=null?t.disabled:!((r=t.column)===null||r===void 0?void 0:r.isCellEditable(t.node));this.eCheckbox.setDisabled(u);var a=this.localeService.getLocaleTextFunc();var f=Kn(a,e);var h=u?f:a("ariaToggleCellValue","Press SPACE to toggle cell value")+" ("+f+")";this.eCheckbox.setInputAriaLabel(h)};i.prototype.onCheckboxChanged=function(t){var i=this.params,n=i.column,r=i.node,e=i.rowIndex,s=i.value;var o={type:hi.EVENT_CELL_EDITING_STARTED,column:n,colDef:n===null||n===void 0?void 0:n.getColDef(),data:r.data,node:r,rowIndex:e,rowPinned:r.rowPinned,value:s};this.eventService.dispatchEvent(o);var u=this.params.node.setDataValue(this.params.column,t,"edit");var a={type:hi.EVENT_CELL_EDITING_STOPPED,column:n,colDef:n===null||n===void 0?void 0:n.getColDef(),data:r.data,node:r,rowIndex:e,rowPinned:r.rowPinned,value:s,oldValue:s,newValue:t,valueChanged:u};this.eventService.dispatchEvent(a)};i.TEMPLATE='\n <div class="ag-cell-wrapper ag-checkbox-cell" role="presentation">\n <ag-checkbox role="presentation" ref="eCheckbox"></ag-checkbox>\n </div>';ya([ds("eCheckbox")],i.prototype,"eCheckbox",void 0);return i}(vs);var Sa=function(){var t=function(i,n){t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var n in i)if(Object.prototype.hasOwnProperty.call(i,n))t[n]=i[n]};return t(i,n)};return function(i,n){if(typeof n!=="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(i,n);function r(){this.constructor=i}i.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}();var Ca=function(t,i,n,r){var e=arguments.length,s=e<3?i:r===null?r=Object.getOwnPropertyDescriptor(i,n):r,o;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")s=Reflect.decorate(t,i,n,r);else for(var u=t.length-1;u>=0;u--)if(o=t[u])s=(e<3?o(s):e>3?o(i,n,s):o(i,n))||s;return e>3&&s&&Object.defineProperty(i,n,s),s};var Oa=function(t){Sa(i,t);function i(){return t.call(this,'\n <div class="ag-cell-wrapper ag-cell-edit-wrapper ag-checkbox-edit">\n <ag-checkbox role="presentation" ref="eCheckbox"></ag-checkbox>\n </div>')||this}i.prototype.init=function(t){var i=this;var n;this.params=t;var r=(n=t.value)!==null&&n!==void 0?n:undefined;this.eCheckbox.setValue(r);this.eCheckbox.getInputElement().setAttribute("tabindex","-1");this.setAriaLabel(r);this.addManagedListener(this.eCheckbox,hi.EVENT_FIELD_VALUE_CHANGED,(function(t){return i.setAriaLabel(t.selected)}))};i.prototype.getValue=function(){return this.eCheckbox.getValue()};i.prototype.focusIn=function(){this.eCheckbox.getFocusableElement().focus()};i.prototype.afterGuiAttached=function(){if(this.params.cellStartedEdit){this.focusIn()}};i.prototype.isPopup=function(){return false};i.prototype.setAriaLabel=function(t){var i=this.localeService.getLocaleTextFunc();var n=Kn(i,t);var r=i("ariaToggleCellValue","Press SPACE to toggle cell value");this.eCheckbox.setInputAriaLabel(r+" ("+n+")")};Ca([ds("eCheckbox")],i.prototype,"eCheckbox",void 0);return i}(ou);var ja=function(){var t=function(i,n){t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var n in i)if(Object.prototype.hasOwnProperty.call(i,n))t[n]=i[n]};return t(i,n)};return function(i,n){if(typeof n!=="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(i,n);function r(){this.constructor=i}i.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}();var Ra=function(t,i,n,r){var e=arguments.length,s=e<3?i:r===null?r=Object.getOwnPropertyDescriptor(i,n):r,o;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")s=Reflect.decorate(t,i,n,r);else for(var u=t.length-1;u>=0;u--)if(o=t[u])s=(e<3?o(s):e>3?o(i,n,s):o(i,n))||s;return e>3&&s&&Object.defineProperty(i,n,s),s};var xa=function(t,i){var n=typeof Symbol==="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),e,s=[],o;try{while((i===void 0||i-- >0)&&!(e=r.next()).done)s.push(e.value)}catch(t){o={error:t}}finally{try{if(e&&!e.done&&(n=r["return"]))n.call(r)}finally{if(o)throw o.error}}return s};var _a=function(t,i){for(var n=0,r=i.length,e=t.length;n<r;n++,e++)t[e]=i[n];return t};var Aa=function(t){ja(i,t);function i(){var i=t!==null&&t.apply(this,arguments)||this;i.agGridDefaults={agDateInput:_o,agColumnHeader:iu,agColumnGroupHeader:eu,agSortIndicator:$o,agTextColumnFloatingFilter:Yo,agNumberColumnFloatingFilter:Ko,agDateColumnFloatingFilter:Oo,agReadOnlyFloatingFilter:ms,agAnimateShowChangeCellRenderer:Ou,agAnimateSlideCellRenderer:xu,agGroupCellRenderer:$u,agGroupRowRenderer:$u,agLoadingCellRenderer:ia,agCheckboxCellRenderer:ma,agCellEditor:wu,agTextCellEditor:wu,agNumberCellEditor:ha,agDateCellEditor:va,agDateStringCellEditor:ba,agSelectCellEditor:lu,agLargeTextCellEditor:fu,agCheckboxCellEditor:Oa,agTextColumnFilter:Ho,agNumberColumnFilter:Po,agDateColumnFilter:wo,agLoadingOverlay:ra,agNoRowsOverlay:sa,agTooltipComponent:ua};i.enterpriseAgDefaultCompsModule={agSetColumnFilter:J.SetFilterModule,agSetColumnFloatingFilter:J.SetFilterModule,agMultiColumnFilter:J.MultiFilterModule,agMultiColumnFloatingFilter:J.MultiFilterModule,agGroupColumnFilter:J.RowGroupingModule,agGroupColumnFloatingFilter:J.RowGroupingModule,agRichSelect:J.RichSelectModule,agRichSelectCellEditor:J.RichSelectModule,agDetailCellRenderer:J.MasterDetailModule,agSparklineCellRenderer:J.SparklinesModule};i.jsComps={};return i}i.prototype.init=function(){var t=this;if(this.gridOptions.components!=null){g(this.gridOptions.components,(function(i,n){return t.registerJsComponent(i,n)}))}};i.prototype.registerDefaultComponent=function(t,i){if(this.agGridDefaults[t]){console.error("Trying to overwrite a default component. You should call registerComponent");return}this.agGridDefaults[t]=i};i.prototype.registerJsComponent=function(t,i){this.jsComps[t]=i};i.prototype.retrieve=function(t,i){var n=this;var r=function(t,i){return{componentFromFramework:i,component:t}};var e=this.getFrameworkOverrides().frameworkComponent(i,this.gridOptions.components);if(e!=null){return r(e,true)}var s=this.jsComps[i];if(s){var o=this.getFrameworkOverrides().isFrameworkComponent(s);return r(s,o)}var u=this.agGridDefaults[i];if(u){return r(u,false)}var a=this.enterpriseAgDefaultCompsModule[i];if(a){X.__assertRegistered(a,"AG Grid '"+t+"' component: "+i,this.context.getGridId())}else{P((function(){n.warnAboutMissingComponent(t,i)}),"MissingComp"+i)}return null};i.prototype.warnAboutMissingComponent=function(t,i){var n=_a(_a([],xa(Object.keys(this.agGridDefaults).filter((function(t){return!["agCellEditor","agGroupRowRenderer","agSortIndicator"].includes(t)})))),xa(Object.keys(this.jsComps)));var r=Ni(i,n,true,.8).values;console.warn("AG Grid: Could not find '"+i+"' component. It was configured as \""+t+": '"+i+"'\" but it wasn't found in the list of registered components.");if(r.length>0){console.warn(" Did you mean: ["+r.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/")};Ra([ut("gridOptions")],i.prototype,"gridOptions",void 0);Ra([et],i.prototype,"init",null);i=Ra([ot("userComponentRegistry")],i);return i}(ri);var Fa={propertyName:"dateComponent",cellRenderer:false};var ka={propertyName:"headerComponent",cellRenderer:false};var Ta={propertyName:"headerGroupComponent",cellRenderer:false};var Ma={propertyName:"cellRenderer",cellRenderer:true};var Da={propertyName:"cellEditor",cellRenderer:false};var Ga={propertyName:"innerRenderer",cellRenderer:true};var Pa={propertyName:"loadingOverlayComponent",cellRenderer:false};var Ea={propertyName:"noRowsOverlayComponent",cellRenderer:false};var Ia={propertyName:"tooltipComponent",cellRenderer:false};var Na={propertyName:"filter",cellRenderer:false};var Ha={propertyName:"floatingFilterComponent",cellRenderer:false};var La={propertyName:"toolPanel",cellRenderer:false};var Va={propertyName:"statusPanel",cellRenderer:false};var Ba={propertyName:"fullWidthCellRenderer",cellRenderer:true};var za={propertyName:"loadingCellRenderer",cellRenderer:true};var Wa={propertyName:"groupRowRenderer",cellRenderer:true};var Ua={propertyName:"detailCellRenderer",cellRenderer:true};var Ka=function(){function t(){}t.getFloatingFilterType=function(t){return this.filterToFloatingFilterMapping[t]};t.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"};return t}();var qa=function(){var t=function(i,n){t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var n in i)if(Object.prototype.hasOwnProperty.call(i,n))t[n]=i[n]};return t(i,n)};return function(i,n){if(typeof n!=="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(i,n);function r(){this.constructor=i}i.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}();var Ya=function(t,i,n,r){var e=arguments.length,s=e<3?i:r===null?r=Object.getOwnPropertyDescriptor(i,n):r,o;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")s=Reflect.decorate(t,i,n,r);else for(var u=t.length-1;u>=0;u--)if(o=t[u])s=(e<3?o(s):e>3?o(i,n,s):o(i,n))||s;return e>3&&s&&Object.defineProperty(i,n,s),s};var Qa=function(t){qa(i,t);function i(){return t!==null&&t.apply(this,arguments)||this}i.prototype.getHeaderCompDetails=function(t,i){return this.getCompDetails(t,ka,"agColumnHeader",i)};i.prototype.getHeaderGroupCompDetails=function(t){var i=t.columnGroup.getColGroupDef();return this.getCompDetails(i,Ta,"agColumnGroupHeader",t)};i.prototype.getFullWidthCellRendererDetails=function(t){return this.getCompDetails(this.gridOptions,Ba,null,t,true)};i.prototype.getFullWidthLoadingCellRendererDetails=function(t){return this.getCompDetails(this.gridOptions,za,"agLoadingCellRenderer",t,true)};i.prototype.getFullWidthGroupCellRendererDetails=function(t){return this.getCompDetails(this.gridOptions,Wa,"agGroupRowRenderer",t,true)};i.prototype.getFullWidthDetailCellRendererDetails=function(t){return this.getCompDetails(this.gridOptions,Ua,"agDetailCellRenderer",t,true)};i.prototype.getInnerRendererDetails=function(t,i){return this.getCompDetails(t,Ga,null,i)};i.prototype.getFullWidthGroupRowInnerCellRenderer=function(t,i){return this.getCompDetails(t,Ga,null,i)};i.prototype.getCellRendererDetails=function(t,i){return this.getCompDetails(t,Ma,null,i)};i.prototype.getCellEditorDetails=function(t,i){return this.getCompDetails(t,Da,"agCellEditor",i,true)};i.prototype.getFilterDetails=function(t,i,n){return this.getCompDetails(t,Na,n,i,true)};i.prototype.getDateCompDetails=function(t){return this.getCompDetails(this.gridOptions,Fa,"agDateInput",t,true)};i.prototype.getLoadingOverlayCompDetails=function(t){return this.getCompDetails(this.gridOptions,Pa,"agLoadingOverlay",t,true)};i.prototype.getNoRowsOverlayCompDetails=function(t){return this.getCompDetails(this.gridOptions,Ea,"agNoRowsOverlay",t,true)};i.prototype.getTooltipCompDetails=function(t){return this.getCompDetails(t.colDef,Ia,"agTooltipComponent",t,true)};i.prototype.getSetFilterCellRendererDetails=function(t,i){return this.getCompDetails(t,Ma,null,i)};i.prototype.getFloatingFilterCompDetails=function(t,i,n){return this.getCompDetails(t,Ha,n,i)};i.prototype.getToolPanelCompDetails=function(t,i){return this.getCompDetails(t,La,null,i,true)};i.prototype.getStatusPanelCompDetails=function(t,i){return this.getCompDetails(t,Va,null,i,true)};i.prototype.getCompDetails=function(t,i,n,r,e){var s=this;if(e===void 0){e=false}var o=i.propertyName,u=i.cellRenderer;var a=this.getCompKeys(t,i,r),f=a.compName,h=a.jsComp,c=a.fwComp,l=a.paramsFromSelector,v=a.popupFromSelector,d=a.popupPositionFromSelector;var p=function(t){var i=s.userComponentRegistry.retrieve(o,t);if(i){h=!i.componentFromFramework?i.component:undefined;c=i.componentFromFramework?i.component:undefined}};if(f!=null){p(f)}if(h==null&&c==null&&n!=null){p(n)}if(h&&u&&!this.agComponentUtils.doesImplementIComponent(h)){h=this.agComponentUtils.adaptFunction(o,h)}if(!h&&!c){if(e){console.error("AG Grid: Could not find component "+f+", did you forget to configure this component?")}return}var g=this.mergeParamsWithApplicationProvidedParams(t,i,r,l);var b=h==null;var w=h?h:c;return{componentFromFramework:b,componentClass:w,params:g,type:i,popupFromSelector:v,popupPositionFromSelector:d,newAgStackInstance:function(){return s.newAgStackInstance(w,b,g,i)}}};i.prototype.getCompKeys=function(t,i,n){var r=this;var e=i.propertyName;var s;var o;var u;var a;var f;var h;if(t){var c=t;var l=c[e+"Selector"];var v=l?l(n):null;var d=function(t){if(typeof t==="string"){s=t}else if(t!=null&&t!==true){var i=r.getFrameworkOverrides().isFrameworkComponent(t);if(i){u=t}else{o=t}}};if(v){d(v.component);a=v.params;f=v.popup;h=v.popupPosition}else{d(c[e])}}return{compName:s,jsComp:o,fwComp:u,paramsFromSelector:a,popupFromSelector:f,popupPositionFromSelector:h}};i.prototype.newAgStackInstance=function(t,i,n,r){var e=r.propertyName;var s=!i;var o;if(s){o=new t}else{var u=this.componentMetadataProvider.retrieve(e);o=this.frameworkComponentWrapper.wrap(t,u.mandatoryMethodList,u.optionalMethodList,r)}var a=this.initComponent(o,n);if(a==null){return ns.resolve(o)}return a.then((function(){return o}))};i.prototype.mergeParamsWithApplicationProvidedParams=function(t,i,n,r){if(r===void 0){r=null}var e={context:this.gridOptionsService.context,columnApi:this.gridOptionsService.columnApi,api:this.gridOptionsService.api};x(e,n);var s=t;var o=s&&s[i.propertyName+"Params"];if(typeof o==="function"){var u=o(n);x(e,u)}else if(typeof o==="object"){x(e,o)}x(e,r);return e};i.prototype.initComponent=function(t,i){this.context.createBean(t);if(t.init==null){return}return t.init(i)};i.prototype.getDefaultFloatingFilterType=function(t,i){if(t==null){return null}var n=null;var r=this.getCompKeys(t,Na),e=r.compName,s=r.jsComp,o=r.fwComp;if(e){n=Ka.getFloatingFilterType(e)}else{var u=s==null&&o==null&&t.filter===true;if(u){n=i()}}return n};Ya([ut("gridOptions")],i.prototype,"gridOptions",void 0);Ya([ut("agComponentUtils")],i.prototype,"agComponentUtils",void 0);Ya([ut("componentMetadataProvider")],i.prototype,"componentMetadataProvider",void 0);Ya([ut("userComponentRegistry")],i.prototype,"userComponentRegistry",void 0);Ya([at("frameworkComponentWrapper")],i.prototype,"frameworkComponentWrapper",void 0);i=Ya([ot("userComponentFactory")],i);return i}(ri);var Ja;(function(t){t[t["SINGLE_SHEET"]=0]="SINGLE_SHEET";t[t["MULTI_SHEET"]=1]="MULTI_SHEET"})(Ja||(Ja={}));var Za=function(){var t=function(i,n){t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var n in i)if(Object.prototype.hasOwnProperty.call(i,n))t[n]=i[n]};return t(i,n)};return function(i,n){if(typeof n!=="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(i,n);function r(){this.constructor=i}i.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}();var $a=function(t,i,n,r){var e=arguments.length,s=e<3?i:r===null?r=Object.getOwnPropertyDescriptor(i,n):r,o;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")s=Reflect.decorate(t,i,n,r);else for(var u=t.length-1;u>=0;u--)if(o=t[u])s=(e<3?o(s):e>3?o(i,n,s):o(i,n))||s;return e>3&&s&&Object.defineProperty(i,n,s),s};var Xa=function(t){Za(n,t);function n(){var i=t!==null&&t.apply(this,arguments)||this;i.dragEndFunctions=[];i.dragSources=[];return i}n.prototype.removeAllListeners=function(){this.dragSources.forEach(this.removeListener.bind(this));this.dragSources.length=0};n.prototype.removeListener=function(t){var i=t.dragSource.eElement;var n=t.mouseDownListener;i.removeEventListener("mousedown",n);if(t.touchEnabled){var r=t.touchStartListener;i.removeEventListener("touchstart",r,{passive:true})}};n.prototype.removeDragSource=function(t){var i=this.dragSources.find((function(i){return i.dragSource===t}));if(!i){return}this.removeListener(i);Mt(this.dragSources,i)};n.prototype.isDragging=function(){return this.dragging};n.prototype.addDragSource=function(t){var i=this;var n=this.onMouseDown.bind(this,t);var r=t.eElement,e=t.includeTouch,s=t.stopPropagationForTouch;r.addEventListener("mousedown",n);var o=null;var u=this.gridOptionsService.is("suppressTouch");if(e&&!u){o=function(n){if(Hr(n.target)){return}if(n.cancelable){n.preventDefault();if(s){n.stopPropagation()}}i.onTouchStart(t,n)};r.addEventListener("touchstart",o,{passive:false})}this.dragSources.push({dragSource:t,mouseDownListener:n,touchStartListener:o,touchEnabled:!!e})};n.prototype.getStartTarget=function(){return this.startTarget};n.prototype.onTouchStart=function(t,i){var n=this;this.currentDragParams=t;this.dragging=false;var r=i.touches[0];this.touchLastTime=r;this.touchStart=r;var e=function(i){return n.onTouchMove(i,t.eElement)};var s=function(i){return n.onTouchUp(i,t.eElement)};var o=function(t){if(t.cancelable){t.preventDefault()}};var u=i.target;var a=[{target:this.gridOptionsService.getRootNode(),type:"touchmove",listener:o,options:{passive:false}},{target:u,type:"touchmove",listener:e,options:{passive:true}},{target:u,type:"touchend",listener:s,options:{passive:true}},{target:u,type:"touchcancel",listener:s,options:{passive:true}}];this.addTemporaryEvents(a);if(t.dragStartPixels===0){this.onCommonMove(r,this.touchStart,t.eElement)}};n.prototype.onMouseDown=function(t,i){var n=this;var r=i;if(t.skipMouseEvent&&t.skipMouseEvent(i)){return}if(r._alreadyProcessedByDragService){return}r._alreadyProcessedByDragService=true;if(i.button!==0){return}if(this.shouldPreventMouseEvent(i)){i.preventDefault()}this.currentDragParams=t;this.dragging=false;this.mouseStartEvent=i;this.startTarget=i.target;var e=function(i){return n.onMouseMove(i,t.eElement)};var s=function(i){return n.onMouseUp(i,t.eElement)};var o=function(t){return t.preventDefault()};var u=this.gridOptionsService.getRootNode();var a=[{target:u,type:"mousemove",listener:e},{target:u,type:"mouseup",listener:s},{target:u,type:"contextmenu",listener:o}];this.addTemporaryEvents(a);if(t.dragStartPixels===0){this.onMouseMove(i,t.eElement)}};n.prototype.addTemporaryEvents=function(t){t.forEach((function(t){var i=t.target,n=t.type,r=t.listener,e=t.options;i.addEventListener(n,r,e)}));this.dragEndFunctions.push((function(){t.forEach((function(t){var i=t.target,n=t.type,r=t.listener,e=t.options;i.removeEventListener(n,r,e)}))}))};n.prototype.isEventNearStartEvent=function(t,n){var r=this.currentDragParams.dragStartPixels;var e=i(r)?r:4;return We(t,n,e)};n.prototype.getFirstActiveTouch=function(t){for(var i=0;i<t.length;i++){if(t[i].identifier===this.touchStart.identifier){return t[i]}}return null};n.prototype.onCommonMove=function(t,i,n){if(!this.dragging){if(!this.dragging&&this.isEventNearStartEvent(t,i)){return}this.dragging=true;var r={type:hi.EVENT_DRAG_STARTED,target:n};this.eventService.dispatchEvent(r);this.currentDragParams.onDragStart(i);this.currentDragParams.onDragging(i)}this.currentDragParams.onDragging(t)};n.prototype.onTouchMove=function(t,i){var n=this.getFirstActiveTouch(t.touches);if(!n){return}this.onCommonMove(n,this.touchStart,i)};n.prototype.onMouseMove=function(t,i){if(this.shouldPreventMouseEvent(t)){t.preventDefault()}this.onCommonMove(t,this.mouseStartEvent,i)};n.prototype.shouldPreventMouseEvent=function(t){var i=this.gridOptionsService.is("enableCellTextSelection");var n=nr();var r=t.type==="mousemove";return(i&&r||n)&&t.cancelable&&this.mouseEventService.isEventFromThisGrid(t)&&!this.isOverFormFieldElement(t)};n.prototype.isOverFormFieldElement=function(t){var i=t.target;var n=i===null||i===void 0?void 0:i.tagName.toLocaleLowerCase();return!!(n===null||n===void 0?void 0:n.match("^a$|textarea|input|select|button"))};n.prototype.onTouchUp=function(t,i){var n=this.getFirstActiveTouch(t.changedTouches);if(!n){n=this.touchLastTime}this.onUpCommon(n,i)};n.prototype.onMouseUp=function(t,i){this.onUpCommon(t,i)};n.prototype.onUpCommon=function(t,i){if(this.dragging){this.dragging=false;this.currentDragParams.onDragStop(t);var n={type:hi.EVENT_DRAG_STOPPED,target:i};this.eventService.dispatchEvent(n)}this.mouseStartEvent=null;this.startTarget=null;this.touchStart=null;this.touchLastTime=null;this.currentDragParams=null;this.dragEndFunctions.forEach((function(t){return t()}));this.dragEndFunctions.length=0};$a([ut("mouseEventService")],n.prototype,"mouseEventService",void 0);$a([st],n.prototype,"removeAllListeners",null);n=$a([ot("dragService")],n);return n}(ri);var tf=function(){function t(t){this.tickingInterval=null;this.onScrollCallback=null;this.scrollContainer=t.scrollContainer;this.scrollHorizontally=t.scrollAxis.indexOf("x")!==-1;this.scrollVertically=t.scrollAxis.indexOf("y")!==-1;this.scrollByTick=t.scrollByTick!=null?t.scrollByTick:20;if(t.onScrollCallback){this.onScrollCallback=t.onScrollCallback}if(this.scrollVertically){this.getVerticalPosition=t.getVerticalPosition;this.setVerticalPosition=t.setVerticalPosition}if(this.scrollHorizontally){this.getHorizontalPosition=t.getHorizontalPosition;this.setHorizontalPosition=t.setHorizontalPosition}this.shouldSkipVerticalScroll=t.shouldSkipVerticalScroll||function(){return false};this.shouldSkipHorizontalScroll=t.shouldSkipHorizontalScroll||function(){return false}}t.prototype.check=function(t,i){if(i===void 0){i=false}var n=i||this.shouldSkipVerticalScroll();if(n&&this.shouldSkipHorizontalScroll()){return}var r=this.scrollContainer.getBoundingClientRect();var e=this.scrollByTick;this.tickLeft=t.clientX<r.left+e;this.tickRight=t.clientX>r.right-e;this.tickUp=t.clientY<r.top+e&&!n;this.tickDown=t.clientY>r.bottom-e&&!n;if(this.tickLeft||this.tickRight||this.tickUp||this.tickDown){this.ensureTickingStarted()}else{this.ensureCleared()}};t.prototype.ensureTickingStarted=function(){if(this.tickingInterval===null){this.tickingInterval=window.setInterval(this.doTick.bind(this),100);this.tickCount=0}};t.prototype.doTick=function(){this.tickCount++;var t;t=this.tickCount>20?200:this.tickCount>10?80:40;if(this.scrollVertically){var i=this.getVerticalPosition();if(this.tickUp){this.setVerticalPosition(i-t)}if(this.tickDown){this.setVerticalPosition(i+t)}}if(this.scrollHorizontally){var n=this.getHorizontalPosition();if(this.tickLeft){this.setHorizontalPosition(n-t)}if(this.tickRight){this.setHorizontalPosition(n+t)}}if(this.onScrollCallback){this.onScrollCallback()}};t.prototype.ensureCleared=function(){if(this.tickingInterval){window.clearInterval(this.tickingInterval);this.tickingInterval=null}};return t}();var nf=function(){var t=function(i,n){t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var n in i)if(Object.prototype.hasOwnProperty.call(i,n))t[n]=i[n]};return t(i,n)};return function(i,n){if(typeof n!=="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(i,n);function r(){this.constructor=i}i.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}();var rf=function(t,i,n,r){var e=arguments.length,s=e<3?i:r===null?r=Object.getOwnPropertyDescriptor(i,n):r,o;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")s=Reflect.decorate(t,i,n,r);else for(var u=t.length-1;u>=0;u--)if(o=t[u])s=(e<3?o(s):e>3?o(i,n,s):o(i,n))||s;return e>3&&s&&Object.defineProperty(i,n,s),s};var ef="ag-list-item-hovered";(function(t){nf(i,t);function i(i,n,r){var e=t.call(this)||this;e.comp=i;e.virtualList=n;e.params=r;e.currentDragValue=null;e.lastHoveredListItem=null;return e}i.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()};i.prototype.listItemDragStart=function(t){this.currentDragValue=this.params.getCurrentDragValue(t);this.moveBlocked=this.params.isMoveBlocked(this.currentDragValue)};i.prototype.listItemDragEnd=function(){var t=this;window.setTimeout((function(){t.currentDragValue=null;t.moveBlocked=false}),10)};i.prototype.createDropTarget=function(){var t=this;var i={isInterestedIn:function(i){return i===t.params.dragSourceType},getIconName:function(){return Hu[t.moveBlocked?"ICON_NOT_ALLOWED":"ICON_MOVE"]},getContainer:function(){return t.comp.getGui()},onDragging:function(i){return t.onDragging(i)},onDragStop:function(){return t.onDragStop()},onDragLeave:function(){return t.onDragLeave()}};this.dragAndDropService.addDropTarget(i)};i.prototype.createAutoScrollService=function(){var t=this.virtualList.getGui();this.autoScrollService=new tf({scrollContainer:t,scrollAxis:"y",getVerticalPosition:function(){return t.scrollTop},setVerticalPosition:function(i){return t.scrollTop=i}})};i.prototype.onDragging=function(t){if(!this.currentDragValue||this.moveBlocked){return}var i=this.getListDragItem(t);var n=this.virtualList.getComponentAt(i.rowIndex);if(!n){return}var r=n.getGui().parentElement;if(this.lastHoveredListItem&&this.lastHoveredListItem.rowIndex===i.rowIndex&&this.lastHoveredListItem.position===i.position){return}this.autoScrollService.check(t.event);this.clearHoveredItems();this.lastHoveredListItem=i;Er(r,ef);Er(r,"ag-item-highlight-"+i.position)};i.prototype.getListDragItem=function(t){var i=this.virtualList.getGui();var n=parseFloat(window.getComputedStyle(i).paddingTop);var r=this.virtualList.getRowHeight();var e=this.virtualList.getScrollTop();var s=Math.max(0,(t.y-n+e)/r);var o=this.params.getNumRows(this.comp)-1;var u=Math.min(o,s)|0;return{rowIndex:u,position:Math.round(s)>s||s>o?"bottom":"top",component:this.virtualList.getComponentAt(u)}};i.prototype.onDragStop=function(){if(this.moveBlocked){return}this.params.moveItem(this.currentDragValue,this.lastHoveredListItem);this.clearHoveredItems();this.autoScrollService.ensureCleared()};i.prototype.onDragLeave=function(){this.clearHoveredItems();this.autoScrollService.ensureCleared()};i.prototype.clearHoveredItems=function(){var t=this.virtualList.getGui();t.querySelectorAll("."+ef).forEach((function(t){[ef,"ag-item-highlight-top","ag-item-highlight-bottom"].forEach((function(i){t.classList.remove(i)}))}));this.lastHoveredListItem=null};rf([ut("dragAndDropService")],i.prototype,"dragAndDropService",void 0);rf([et],i.prototype,"postConstruct",null);return i})(ri);var sf;(function(t){t[t["Above"]=0]="Above";t[t["Below"]=1]="Below"})(sf||(sf={}));var of;(function(t){t["EVERYTHING"]="group";t["FILTER"]="filter";t["SORT"]="sort";t["MAP"]="map";t["AGGREGATE"]="aggregate";t["FILTER_AGGREGATES"]="filter_aggregates";t["PIVOT"]="pivot";t["NOTHING"]="nothing"})(of||(of={}));var uf=function(t,i,n,r){var e=arguments.length,s=e<3?i:r===null?r=Object.getOwnPropertyDescriptor(i,n):r,o;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")s=Reflect.decorate(t,i,n,r);else for(var u=t.length-1;u>=0;u--)if(o=t[u])s=(e<3?o(s):e>3?o(i,n,s):o(i,n))||s;return e>3&&s&&Object.defineProperty(i,n,s),s};function af(t){var i=t;var n=i!=null&&i.getFrameworkComponentInstance!=null;return n?i.getFrameworkComponentInstance():t}var ff=function(){function t(){this.detailGridInfoMap={};this.destroyCalled=false}t.prototype.registerOverlayWrapperComp=function(t){this.overlayWrapperComp=t};t.prototype.registerSideBarComp=function(t){this.sideBarComp=t};t.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()}))};t.prototype.__getAlignedGridService=function(){return this.alignedGridsService};t.prototype.__getContext=function(){return this.context};t.prototype.getSetterMethod=function(t){return"set"+t.charAt(0).toUpperCase()+t.substring(1)};t.prototype.__setPropertyOnly=function(t,i){return this.gos.__setPropertyOnly(t,i)};t.prototype.__updateProperty=function(t,i,n,r){if(r===void 0){r=undefined}this.gos.set(t,i,n,{},r);var e=this.getSetterMethod(t);var s=this;if(s[e]){s[e](i)}};t.prototype.getGridId=function(){return this.context.getGridId()};t.prototype.addDetailGridInfo=function(t,i){this.detailGridInfoMap[t]=i};t.prototype.removeDetailGridInfo=function(t){this.detailGridInfoMap[t]=undefined};t.prototype.getDetailGridInfo=function(t){return this.detailGridInfoMap[t]};t.prototype.forEachDetailGridInfo=function(t){var n=0;g(this.detailGridInfoMap,(function(r,e){if(i(e)){t(e,n);n++}}))};t.prototype.getDataAsCsv=function(t){if(X.__assertRegistered(J.CsvExportModule,"api.getDataAsCsv",this.context.getGridId())){return this.csvCreator.getDataAsCsv(t)}};t.prototype.exportDataAsCsv=function(t){if(X.__assertRegistered(J.CsvExportModule,"api.exportDataAsCSv",this.context.getGridId())){this.csvCreator.exportDataAsCsv(t)}};t.prototype.getExcelExportMode=function(t){var i=this.gos.get("defaultExcelExportParams");var n=Object.assign({exportMode:"xlsx"},i,t);return n.exportMode};t.prototype.assertNotExcelMultiSheet=function(t,i){if(!X.__assertRegistered(J.ExcelExportModule,"api."+t,this.context.getGridId())){return false}var n=this.getExcelExportMode(i);if(this.excelCreator.getFactoryMode(n)===Ja.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()'");return false}return true};t.prototype.getDataAsExcel=function(t){if(this.assertNotExcelMultiSheet("getDataAsExcel",t)){return this.excelCreator.getDataAsExcel(t)}};t.prototype.exportDataAsExcel=function(t){if(this.assertNotExcelMultiSheet("exportDataAsExcel",t)){this.excelCreator.exportDataAsExcel(t)}};t.prototype.getSheetDataForExcel=function(t){if(!X.__assertRegistered(J.ExcelExportModule,"api.getSheetDataForExcel",this.context.getGridId())){return}var i=this.getExcelExportMode(t);this.excelCreator.setFactoryMode(Ja.MULTI_SHEET,i);return this.excelCreator.getSheetDataForExcel(t)};t.prototype.getMultipleSheetsAsExcel=function(t){if(X.__assertRegistered(J.ExcelExportModule,"api.getMultipleSheetsAsExcel",this.context.getGridId())){return this.excelCreator.getMultipleSheetsAsExcel(t)}};t.prototype.exportMultipleSheetsAsExcel=function(t){if(X.__assertRegistered(J.ExcelExportModule,"api.exportMultipleSheetsAsExcel",this.context.getGridId())){return this.excelCreator.exportMultipleSheetsAsExcel(t)}};t.prototype.setTreeData=function(t){this.gos.set("treeData",t)};t.prototype.setGridAriaProperty=function(t,i){if(!t){return}var n=this.ctrlsService.getGridBodyCtrl().getGui();var r="aria-"+t;if(i===null){n.removeAttribute(r)}else{n.setAttribute(r,i)}};t.prototype.logMissingRowModel=function(t){var i=[];for(var n=1;n<arguments.length;n++){i[n-1]=arguments[n]}console.error("AG Grid: api."+t+" can only be called when gridOptions.rowModelType is "+i.join(" or "))};t.prototype.setServerSideDatasource=function(t){if(this.serverSideRowModel){this.serverSideRowModel.setDatasource(t)}else{this.logMissingRowModel("setServerSideDatasource","serverSide")}};t.prototype.setCacheBlockSize=function(t){if(this.serverSideRowModel){this.gos.set("cacheBlockSize",t);this.serverSideRowModel.resetRootStore()}else{this.logMissingRowModel("setCacheBlockSize","serverSide")}};t.prototype.setDatasource=function(t){if(this.gos.isRowModelType("infinite")){this.rowModel.setDatasource(t)}else{this.logMissingRowModel("setDatasource","infinite")}};t.prototype.setViewportDatasource=function(t){if(this.gos.isRowModelType("viewport")){this.rowModel.setViewportDatasource(t)}else{this.logMissingRowModel("setViewportDatasource","viewport")}};t.prototype.setRowData=function(t){var i=this.immutableService==null;if(i){this.logMissingRowModel("setRowData","clientSide");return}if(this.immutableService.isActive()){this.immutableService.setRowData(t)}else{this.selectionService.reset();this.clientSideRowModel.setRowData(t)}};t.prototype.setPinnedTopRowData=function(t){this.pinnedRowModel.setPinnedTopRowData(t)};t.prototype.setPinnedBottomRowData=function(t){this.pinnedRowModel.setPinnedBottomRowData(t)};t.prototype.getPinnedTopRowCount=function(){return this.pinnedRowModel.getPinnedTopRowCount()};t.prototype.getPinnedBottomRowCount=function(){return this.pinnedRowModel.getPinnedBottomRowCount()};t.prototype.getPinnedTopRow=function(t){return this.pinnedRowModel.getPinnedTopRow(t)};t.prototype.getPinnedBottomRow=function(t){return this.pinnedRowModel.getPinnedBottomRow(t)};t.prototype.setColumnDefs=function(t,i){if(i===void 0){i="api"}this.columnModel.setColumnDefs(t,i);this.gos.set("columnDefs",t,true,{source:i})};t.prototype.setAutoGroupColumnDef=function(t,i){if(i===void 0){i="api"}this.gos.set("autoGroupColumnDef",t,true,{source:i})};t.prototype.setDefaultColDef=function(t,i){if(i===void 0){i="api"}this.gos.set("defaultColDef",t,true,{source:i})};t.prototype.setColumnTypes=function(t,i){if(i===void 0){i="api"}this.gos.set("columnTypes",t,true,{source:i})};t.prototype.expireValueCache=function(){this.valueCache.expire()};t.prototype.getVerticalPixelRange=function(){return this.gridBodyCtrl.getScrollFeature().getVScrollPosition()};t.prototype.getHorizontalPixelRange=function(){return this.gridBodyCtrl.getScrollFeature().getHScrollPosition()};t.prototype.setAlwaysShowHorizontalScroll=function(t){this.gos.set("alwaysShowHorizontalScroll",t)};t.prototype.setAlwaysShowVerticalScroll=function(t){this.gos.set("alwaysShowVerticalScroll",t)};t.prototype.refreshCells=function(t){if(t===void 0){t={}}this.rowRenderer.refreshCells(t)};t.prototype.flashCells=function(t){if(t===void 0){t={}}this.rowRenderer.flashCells(t)};t.prototype.redrawRows=function(t){if(t===void 0){t={}}var i=t?t.rowNodes:undefined;this.rowRenderer.redrawRows(i)};t.prototype.setFunctionsReadOnly=function(t){this.gos.set("functionsReadOnly",t)};t.prototype.refreshHeader=function(){this.ctrlsService.getHeaderRowContainerCtrls().forEach((function(t){return t.refresh()}))};t.prototype.isAnyFilterPresent=function(){return this.filterManager.isAnyFilterPresent()};t.prototype.isColumnFilterPresent=function(){return this.filterManager.isColumnFilterPresent()||this.filterManager.isAggregateFilterPresent()};t.prototype.isQuickFilterPresent=function(){return this.filterManager.isQuickFilterPresent()};t.prototype.getModel=function(){return this.rowModel};t.prototype.setRowNodeExpanded=function(t,i,n){if(t){if(n&&t.parent&&t.parent.level!==-1){this.setRowNodeExpanded(t.parent,i,n)}t.setExpanded(i)}};t.prototype.onGroupExpandedOrCollapsed=function(){if(n(this.clientSideRowModel)){this.logMissingRowModel("onGroupExpandedOrCollapsed","clientSide");return}this.clientSideRowModel.refreshModel({step:of.MAP})};t.prototype.refreshClientSideRowModel=function(t){if(n(this.clientSideRowModel)){this.logMissingRowModel("refreshClientSideRowModel","clientSide");return}this.clientSideRowModel.refreshModel(t)};t.prototype.isAnimationFrameQueueEmpty=function(){return this.animationFrameService.isQueueEmpty()};t.prototype.flushAllAnimationFrames=function(){this.animationFrameService.flushAllFrames()};t.prototype.getRowNode=function(t){return this.rowModel.getRowNode(t)};t.prototype.getSizesForCurrentTheme=function(){return{rowHeight:this.gos.getRowHeightAsNumber(),headerHeight:this.columnModel.getHeaderHeight()}};t.prototype.expandAll=function(){if(this.clientSideRowModel){this.clientSideRowModel.expandOrCollapseAll(true)}else if(this.serverSideRowModel){this.serverSideRowModel.expandAll(true)}else{this.logMissingRowModel("expandAll","clientSide","serverSide")}};t.prototype.collapseAll=function(){if(this.clientSideRowModel){this.clientSideRowModel.expandOrCollapseAll(false)}else if(this.serverSideRowModel){this.serverSideRowModel.expandAll(false)}else{this.logMissingRowModel("expandAll","clientSide","serverSide")}};t.prototype.addRenderedRowListener=function(t,i,n){this.rowRenderer.addRenderedRowListener(t,i,n)};t.prototype.getQuickFilter=function(){return this.gos.get("quickFilterText")};t.prototype.setQuickFilter=function(t){this.gos.set("quickFilterText",t)};t.prototype.setExcludeHiddenColumnsFromQuickFilter=function(t){Wi("30","setExcludeHiddenColumnsFromQuickFilter",undefined,"Hidden columns are now excluded from the Quick Filter by default. This can be toggled using `setIncludeHiddenColumnsInQuickFilter`");this.setIncludeHiddenColumnsInQuickFilter(!t)};t.prototype.setIncludeHiddenColumnsInQuickFilter=function(t){this.gos.set("includeHiddenColumnsInQuickFilter",t)};t.prototype.setQuickFilterParser=function(t){this.gos.set("quickFilterParser",t)};t.prototype.setQuickFilterMatcher=function(t){this.gos.set("quickFilterMatcher",t)};t.prototype.getAdvancedFilterModel=function(){if(X.__assertRegistered(J.AdvancedFilterModule,"api.getAdvancedFilterModel",this.context.getGridId())){return this.filterManager.getAdvancedFilterModel()}return null};t.prototype.setAdvancedFilterModel=function(t){this.gos.set("advancedFilterModel",t)};t.prototype.setEnableAdvancedFilter=function(t){this.gos.set("enableAdvancedFilter",t)};t.prototype.setIncludeHiddenColumnsInAdvancedFilter=function(t){this.gos.set("includeHiddenColumnsInAdvancedFilter",t)};t.prototype.setAdvancedFilterParent=function(t){this.gos.set("advancedFilterParent",t)};t.prototype.setAdvancedFilterBuilderParams=function(t){this.gos.set("advancedFilterBuilderParams",t)};t.prototype.showAdvancedFilterBuilder=function(){if(X.__assertRegistered(J.AdvancedFilterModule,"api.setAdvancedFilterModel",this.context.getGridId())){this.filterManager.showAdvancedFilterBuilder("api")}};t.prototype.setNodesSelected=function(t){var i=t.nodes.every((function(t){if(t.rowPinned){console.warn("AG Grid: cannot select pinned rows");return false}if(t.id===undefined){console.warn("AG Grid: cannot select node until id for node is known");return false}return true}));if(!i){return}var n=t.nodes,r=t.source,e=t.newValue;var s=n;this.selectionService.setNodesSelected({nodes:s,source:r!==null&&r!==void 0?r:"api",newValue:e})};t.prototype.selectAll=function(t){if(t===void 0){t="apiSelectAll"}this.selectionService.selectAllRowNodes({source:t})};t.prototype.deselectAll=function(t){if(t===void 0){t="apiSelectAll"}this.selectionService.deselectAllRowNodes({source:t})};t.prototype.selectAllFiltered=function(t){if(t===void 0){t="apiSelectAllFiltered"}this.selectionService.selectAllRowNodes({source:t,justFiltered:true})};t.prototype.deselectAllFiltered=function(t){if(t===void 0){t="apiSelectAllFiltered"}this.selectionService.deselectAllRowNodes({source:t,justFiltered:true})};t.prototype.getServerSideSelectionState=function(){if(n(this.serverSideRowModel)){this.logMissingRowModel("getServerSideSelectionState","serverSide");return null}return this.selectionService.getServerSideSelectionState()};t.prototype.setServerSideSelectionState=function(t){if(n(this.serverSideRowModel)){this.logMissingRowModel("setServerSideSelectionState","serverSide");return}this.selectionService.setServerSideSelectionState(t)};t.prototype.selectAllOnCurrentPage=function(t){if(t===void 0){t="apiSelectAllCurrentPage"}this.selectionService.selectAllRowNodes({source:t,justCurrentPage:true})};t.prototype.deselectAllOnCurrentPage=function(t){if(t===void 0){t="apiSelectAllCurrentPage"}this.selectionService.deselectAllRowNodes({source:t,justCurrentPage:true})};t.prototype.sizeColumnsToFit=function(t){this.gridBodyCtrl.sizeColumnsToFit(t)};t.prototype.showLoadingOverlay=function(){this.overlayWrapperComp.showLoadingOverlay()};t.prototype.showNoRowsOverlay=function(){this.overlayWrapperComp.showNoRowsOverlay()};t.prototype.hideOverlay=function(){this.overlayWrapperComp.hideOverlay()};t.prototype.getSelectedNodes=function(){return this.selectionService.getSelectedNodes()};t.prototype.getSelectedRows=function(){return this.selectionService.getSelectedRows()};t.prototype.getBestCostNodeSelection=function(){if(n(this.clientSideRowModel)){this.logMissingRowModel("getBestCostNodeSelection","clientSide");return}return this.selectionService.getBestCostNodeSelection()};t.prototype.getRenderedNodes=function(){return this.rowRenderer.getRenderedNodes()};t.prototype.ensureColumnVisible=function(t,i){if(i===void 0){i="auto"}this.gridBodyCtrl.getScrollFeature().ensureColumnVisible(t,i)};t.prototype.ensureIndexVisible=function(t,i){this.gridBodyCtrl.getScrollFeature().ensureIndexVisible(t,i)};t.prototype.ensureNodeVisible=function(t,i){if(i===void 0){i=null}this.gridBodyCtrl.getScrollFeature().ensureNodeVisible(t,i)};t.prototype.forEachLeafNode=function(t){if(n(this.clientSideRowModel)){this.logMissingRowModel("forEachLeafNode","clientSide");return}this.clientSideRowModel.forEachLeafNode(t)};t.prototype.forEachNode=function(t,i){this.rowModel.forEachNode(t,i)};t.prototype.forEachNodeAfterFilter=function(t){if(n(this.clientSideRowModel)){this.logMissingRowModel("forEachNodeAfterFilter","clientSide");return}this.clientSideRowModel.forEachNodeAfterFilter(t)};t.prototype.forEachNodeAfterFilterAndSort=function(t){if(n(this.clientSideRowModel)){this.logMissingRowModel("forEachNodeAfterFilterAndSort","clientSide");return}this.clientSideRowModel.forEachNodeAfterFilterAndSort(t)};t.prototype.getFilterInstance=function(t,i){return this.filterManager.getFilterInstance(t,i)};t.prototype.destroyFilter=function(t){var i=this.columnModel.getPrimaryColumn(t);if(i){return this.filterManager.destroyFilter(i,"api")}};t.prototype.getStatusPanel=function(t){if(!X.__assertRegistered(J.StatusBarModule,"api.getStatusPanel",this.context.getGridId())){return}var i=this.statusBarService.getStatusPanel(t);return af(i)};t.prototype.getColumnDef=function(t){var i=this.columnModel.getPrimaryColumn(t);if(i){return i.getColDef()}return null};t.prototype.getColumnDefs=function(){return this.columnModel.getColumnDefs()};t.prototype.onFilterChanged=function(t){if(t===void 0){t="api"}this.filterManager.onFilterChanged({source:t})};t.prototype.onSortChanged=function(){this.sortController.onSortChanged("api")};t.prototype.setFilterModel=function(t){this.filterManager.setFilterModel(t)};t.prototype.getFilterModel=function(){return this.filterManager.getFilterModel()};t.prototype.getFocusedCell=function(){return this.focusService.getFocusedCell()};t.prototype.clearFocusedCell=function(){return this.focusService.clearFocusedCell()};t.prototype.setFocusedCell=function(t,i,n){this.focusService.setFocusedCell({rowIndex:t,column:i,rowPinned:n,forceBrowserFocus:true})};t.prototype.setSuppressRowDrag=function(t){this.gos.set("suppressRowDrag",t)};t.prototype.setSuppressMoveWhenRowDragging=function(t){this.gos.set("suppressMoveWhenRowDragging",t)};t.prototype.setSuppressRowClickSelection=function(t){this.gos.set("suppressRowClickSelection",t)};t.prototype.addRowDropZone=function(t){this.gridBodyCtrl.getRowDragFeature().addRowDropZone(t)};t.prototype.removeRowDropZone=function(t){var i=this.dragAndDropService.findExternalZone(t);if(i){this.dragAndDropService.removeDropTarget(i)}};t.prototype.getRowDropZoneParams=function(t){return this.gridBodyCtrl.getRowDragFeature().getRowDropZone(t)};t.prototype.setHeaderHeight=function(t){this.gos.set("headerHeight",t)};t.prototype.setDomLayout=function(t){this.gos.set("domLayout",t)};t.prototype.setEnableCellTextSelection=function(t){this.gridBodyCtrl.setCellTextSelection(t)};t.prototype.setFillHandleDirection=function(t){this.gos.set("fillHandleDirection",t)};t.prototype.setGroupHeaderHeight=function(t){this.gos.set("groupHeaderHeight",t)};t.prototype.setFloatingFiltersHeight=function(t){this.gos.set("floatingFiltersHeight",t)};t.prototype.setPivotHeaderHeight=function(t){this.gos.set("pivotHeaderHeight",t)};t.prototype.setPivotGroupHeaderHeight=function(t){this.gos.set("pivotGroupHeaderHeight",t)};t.prototype.setPivotMode=function(t){this.columnModel.setPivotMode(t)};t.prototype.setAnimateRows=function(t){this.gos.set("animateRows",t)};t.prototype.setIsExternalFilterPresent=function(t){this.gos.set("isExternalFilterPresent",t)};t.prototype.setDoesExternalFilterPass=function(t){this.gos.set("doesExternalFilterPass",t)};t.prototype.setNavigateToNextCell=function(t){this.gos.set("navigateToNextCell",t)};t.prototype.setTabToNextCell=function(t){this.gos.set("tabToNextCell",t)};t.prototype.setTabToNextHeader=function(t){this.gos.set("tabToNextHeader",t)};t.prototype.setNavigateToNextHeader=function(t){this.gos.set("navigateToNextHeader",t)};t.prototype.setRowGroupPanelShow=function(t){this.gos.set("rowGroupPanelShow",t)};t.prototype.setGetGroupRowAgg=function(t){this.gos.set("getGroupRowAgg",t)};t.prototype.setGetBusinessKeyForNode=function(t){this.gos.set("getBusinessKeyForNode",t)};t.prototype.setGetChildCount=function(t){this.gos.set("getChildCount",t)};t.prototype.setProcessRowPostCreate=function(t){this.gos.set("processRowPostCreate",t)};t.prototype.setGetRowId=function(t){this.gos.set("getRowId",t)};t.prototype.setGetRowClass=function(t){this.gos.set("getRowClass",t)};t.prototype.setIsFullWidthRow=function(t){this.gos.set("isFullWidthRow",t)};t.prototype.setIsRowSelectable=function(t){this.gos.set("isRowSelectable",t)};t.prototype.setIsRowMaster=function(t){this.gos.set("isRowMaster",t)};t.prototype.setPostSortRows=function(t){this.gos.set("postSortRows",t)};t.prototype.setGetDocument=function(t){this.gos.set("getDocument",t)};t.prototype.setGetContextMenuItems=function(t){this.gos.set("getContextMenuItems",t)};t.prototype.setGetMainMenuItems=function(t){this.gos.set("getMainMenuItems",t)};t.prototype.setProcessCellForClipboard=function(t){this.gos.set("processCellForClipboard",t)};t.prototype.setSendToClipboard=function(t){this.gos.set("sendToClipboard",t)};t.prototype.setProcessCellFromClipboard=function(t){this.gos.set("processCellFromClipboard",t)};t.prototype.setProcessSecondaryColDef=function(t){Wi("28.0","setProcessSecondaryColDef","setProcessPivotResultColDef");this.setProcessPivotResultColDef(t)};t.prototype.setProcessSecondaryColGroupDef=function(t){Wi("28.0","setProcessSecondaryColGroupDef","setProcessPivotResultColGroupDef");this.setProcessPivotResultColGroupDef(t)};t.prototype.setProcessPivotResultColDef=function(t){this.gos.set("processPivotResultColDef",t)};t.prototype.setProcessPivotResultColGroupDef=function(t){this.gos.set("processPivotResultColGroupDef",t)};t.prototype.setPostProcessPopup=function(t){this.gos.set("postProcessPopup",t)};t.prototype.setInitialGroupOrderComparator=function(t){this.gos.set("initialGroupOrderComparator",t)};t.prototype.setGetChartToolbarItems=function(t){this.gos.set("getChartToolbarItems",t)};t.prototype.setPaginationNumberFormatter=function(t){this.gos.set("paginationNumberFormatter",t)};t.prototype.setGetServerSideStoreParams=function(t){Wi("28.0","setGetServerSideStoreParams","setGetServerSideGroupLevelParams");this.setGetServerSideGroupLevelParams(t)};t.prototype.setGetServerSideGroupLevelParams=function(t){this.gos.set("getServerSideGroupLevelParams",t)};t.prototype.setIsServerSideGroupOpenByDefault=function(t){this.gos.set("isServerSideGroupOpenByDefault",t)};t.prototype.setIsApplyServerSideTransaction=function(t){this.gos.set("isApplyServerSideTransaction",t)};t.prototype.setIsServerSideGroup=function(t){this.gos.set("isServerSideGroup",t)};t.prototype.setGetServerSideGroupKey=function(t){this.gos.set("getServerSideGroupKey",t)};t.prototype.setGetRowStyle=function(t){this.gos.set("getRowStyle",t)};t.prototype.setGetRowHeight=function(t){this.gos.set("getRowHeight",t)};t.prototype.assertSideBarLoaded=function(t){return X.__assertRegistered(J.SideBarModule,"api."+t,this.context.getGridId())};t.prototype.isSideBarVisible=function(){return this.assertSideBarLoaded("isSideBarVisible")&&this.sideBarComp.isDisplayed()};t.prototype.setSideBarVisible=function(t){if(this.assertSideBarLoaded("setSideBarVisible")){this.sideBarComp.setDisplayed(t)}};t.prototype.setSideBarPosition=function(t){if(this.assertSideBarLoaded("setSideBarPosition")){this.sideBarComp.setSideBarPosition(t)}};t.prototype.openToolPanel=function(t){if(this.assertSideBarLoaded("openToolPanel")){this.sideBarComp.openToolPanel(t,"api")}};t.prototype.closeToolPanel=function(){if(this.assertSideBarLoaded("closeToolPanel")){this.sideBarComp.close("api")}};t.prototype.getOpenedToolPanel=function(){if(this.assertSideBarLoaded("getOpenedToolPanel")){return this.sideBarComp.openedItem()}return null};t.prototype.refreshToolPanel=function(){if(this.assertSideBarLoaded("refreshToolPanel")){this.sideBarComp.refresh()}};t.prototype.isToolPanelShowing=function(){return this.assertSideBarLoaded("isToolPanelShowing")&&this.sideBarComp.isToolPanelShowing()};t.prototype.getToolPanelInstance=function(t){if(this.assertSideBarLoaded("getToolPanelInstance")){var i=this.sideBarComp.getToolPanelInstance(t);return af(i)}};t.prototype.getSideBar=function(){if(this.assertSideBarLoaded("getSideBar")){return this.sideBarComp.getDef()}return undefined};t.prototype.setSideBar=function(t){this.gos.set("sideBar",t)};t.prototype.setSuppressClipboardPaste=function(t){this.gos.set("suppressClipboardPaste",t)};t.prototype.resetRowHeights=function(){if(i(this.clientSideRowModel)){if(this.columnModel.isAutoRowHeightActive()){console.warn("AG Grid: calling gridApi.resetRowHeights() makes no sense when using Auto Row Height.");return}this.clientSideRowModel.resetRowHeights()}};t.prototype.setGroupRemoveSingleChildren=function(t){this.gos.set("groupRemoveSingleChildren",t)};t.prototype.setGroupRemoveLowestSingleChildren=function(t){this.gos.set("groupRemoveLowestSingleChildren",t)};t.prototype.setGroupDisplayType=function(t){this.gos.set("groupDisplayType",t)};t.prototype.setGroupIncludeFooter=function(t){this.gos.set("groupIncludeFooter",t)};t.prototype.setGroupIncludeTotalFooter=function(t){this.gos.set("groupIncludeTotalFooter",t)};t.prototype.setRowClass=function(t){this.gos.set("rowClass",t)};t.prototype.setDeltaSort=function(t){this.gos.set("deltaSort",t)};t.prototype.setRowCount=function(t,i){if(this.serverSideRowModel){if(this.columnModel.isRowGroupEmpty()){this.serverSideRowModel.setRowCount(t,i);return}console.error("AG Grid: setRowCount cannot be used while using row grouping.");return}if(this.infiniteRowModel){this.infiniteRowModel.setRowCount(t,i);return}this.logMissingRowModel("setRowCount","infinite","serverSide")};t.prototype.onRowHeightChanged=function(){if(this.clientSideRowModel){this.clientSideRowModel.onRowHeightChanged()}else if(this.serverSideRowModel){this.serverSideRowModel.onRowHeightChanged()}};t.prototype.getValue=function(t,i){var r=this.columnModel.getPrimaryColumn(t);if(n(r)){r=this.columnModel.getGridColumn(t)}if(n(r)){return null}return this.valueService.getValue(r,i)};t.prototype.addEventListener=function(t,i){var n=this.gos.useAsyncEvents();this.eventService.addEventListener(t,i,n)};t.prototype.addGlobalListener=function(t){var i=this.gos.useAsyncEvents();this.eventService.addGlobalListener(t,i)};t.prototype.removeEventListener=function(t,i){var n=this.gos.useAsyncEvents();this.eventService.removeEventListener(t,i,n)};t.prototype.removeGlobalListener=function(t){var i=this.gos.useAsyncEvents();this.eventService.removeGlobalListener(t,i)};t.prototype.dispatchEvent=function(t){this.eventService.dispatchEvent(t)};t.prototype.destroy=function(){if(this.destroyCalled){return}this.destroyCalled=true;this.dispatchEvent({type:hi.EVENT_GRID_PRE_DESTROYED});var t=this.ctrlsService.getGridCtrl();if(t){t.destroyGridUi()}this.context.destroy()};t.prototype.cleanDownReferencesToAvoidMemoryLeakInCaseApplicationIsKeepingReferenceToDestroyedGrid=function(){setTimeout(T.bind(window,this,"Grid API"),100)};t.prototype.warnIfDestroyed=function(t){if(this.destroyCalled){console.warn("AG Grid: Grid API method "+t+" was called on a grid that was destroyed.")}return this.destroyCalled};t.prototype.resetQuickFilter=function(){if(this.warnIfDestroyed("resetQuickFilter")){return}this.filterManager.resetQuickFilterCache()};t.prototype.getCellRanges=function(){if(this.rangeService){return this.rangeService.getCellRanges()}X.__assertRegistered(J.RangeSelectionModule,"api.getCellRanges",this.context.getGridId());return null};t.prototype.addCellRange=function(t){if(this.rangeService){this.rangeService.addCellRange(t);return}X.__assertRegistered(J.RangeSelectionModule,"api.addCellRange",this.context.getGridId())};t.prototype.clearRangeSelection=function(){if(this.rangeService){this.rangeService.removeAllCellRanges()}X.__assertRegistered(J.RangeSelectionModule,"gridApi.clearRangeSelection",this.context.getGridId())};t.prototype.undoCellEditing=function(){this.undoRedoService.undo("api")};t.prototype.redoCellEditing=function(){this.undoRedoService.redo("api")};t.prototype.getCurrentUndoSize=function(){return this.undoRedoService.getCurrentUndoStackSize()};t.prototype.getCurrentRedoSize=function(){return this.undoRedoService.getCurrentRedoStackSize()};t.prototype.getChartModels=function(){if(X.__assertRegistered(J.GridChartsModule,"api.getChartModels",this.context.getGridId())){return this.chartService.getChartModels()}};t.prototype.getChartRef=function(t){if(X.__assertRegistered(J.GridChartsModule,"api.getChartRef",this.context.getGridId())){return this.chartService.getChartRef(t)}};t.prototype.getChartImageDataURL=function(t){if(X.__assertRegistered(J.GridChartsModule,"api.getChartImageDataURL",this.context.getGridId())){return this.chartService.getChartImageDataURL(t)}};t.prototype.downloadChart=function(t){if(X.__assertRegistered(J.GridChartsModule,"api.downloadChart",this.context.getGridId())){return this.chartService.downloadChart(t)}};t.prototype.openChartToolPanel=function(t){if(X.__assertRegistered(J.GridChartsModule,"api.openChartToolPanel",this.context.getGridId())){return this.chartService.openChartToolPanel(t)}};t.prototype.closeChartToolPanel=function(t){if(X.__assertRegistered(J.GridChartsModule,"api.closeChartToolPanel",this.context.getGridId())){return this.chartService.closeChartToolPanel(t.chartId)}};t.prototype.createRangeChart=function(t){if(X.__assertRegistered(J.GridChartsModule,"api.createRangeChart",this.context.getGridId())){return this.chartService.createRangeChart(t)}};t.prototype.createPivotChart=function(t){if(X.__assertRegistered(J.GridChartsModule,"api.createPivotChart",this.context.getGridId())){return this.chartService.createPivotChart(t)}};t.prototype.createCrossFilterChart=function(t){if(X.__assertRegistered(J.GridChartsModule,"api.createCrossFilterChart",this.context.getGridId())){return this.chartService.createCrossFilterChart(t)}};t.prototype.updateChart=function(t){if(X.__assertRegistered(J.GridChartsModule,"api.updateChart",this.context.getGridId())){this.chartService.updateChart(t)}};t.prototype.restoreChart=function(t,i){if(X.__assertRegistered(J.GridChartsModule,"api.restoreChart",this.context.getGridId())){return this.chartService.restoreChart(t,i)}};t.prototype.copyToClipboard=function(t){if(X.__assertRegistered(J.ClipboardModule,"api.copyToClipboard",this.context.getGridId())){this.clipboardService.copyToClipboard(t)}};t.prototype.cutToClipboard=function(t){if(X.__assertRegistered(J.ClipboardModule,"api.cutToClipboard",this.context.getGridId())){this.clipboardService.cutToClipboard(t,"api")}};t.prototype.copySelectedRowsToClipboard=function(t){if(X.__assertRegistered(J.ClipboardModule,"api.copySelectedRowsToClipboard",this.context.getGridId())){this.clipboardService.copySelectedRowsToClipboard(t)}};t.prototype.copySelectedRangeToClipboard=function(t){if(X.__assertRegistered(J.ClipboardModule,"api.copySelectedRangeToClipboard",this.context.getGridId())){this.clipboardService.copySelectedRangeToClipboard(t)}};t.prototype.copySelectedRangeDown=function(){if(X.__assertRegistered(J.ClipboardModule,"api.copySelectedRangeDown",this.context.getGridId())){this.clipboardService.copyRangeDown()}};t.prototype.pasteFromClipboard=function(){if(X.__assertRegistered(J.ClipboardModule,"api.pasteFromClipboard",this.context.getGridId())){this.clipboardService.pasteFromClipboard()}};t.prototype.showColumnMenuAfterButtonClick=function(t,i){var n=this.columnModel.getGridColumn(t);this.menuFactory.showMenuAfterButtonClick(n,i,"columnMenu")};t.prototype.showColumnMenuAfterMouseClick=function(t,i){var n=this.columnModel.getGridColumn(t);if(!n){n=this.columnModel.getPrimaryColumn(t)}if(!n){console.error("AG Grid: column '"+t+"' not found");return}this.menuFactory.showMenuAfterMouseEvent(n,i)};t.prototype.hidePopupMenu=function(){if(this.contextMenuFactory){this.contextMenuFactory.hideActiveMenu()}this.menuFactory.hideActiveMenu()};t.prototype.setPopupParent=function(t){this.gos.set("popupParent",t)};t.prototype.tabToNextCell=function(t){return this.navigationService.tabToNextCell(false,t)};t.prototype.tabToPreviousCell=function(t){return this.navigationService.tabToNextCell(true,t)};t.prototype.getCellRendererInstances=function(t){if(t===void 0){t={}}var i=this.rowRenderer.getCellRendererInstances(t);var n=i.map(af);return n};t.prototype.getCellEditorInstances=function(t){if(t===void 0){t={}}var i=this.rowRenderer.getCellEditorInstances(t);var n=i.map(af);return n};t.prototype.getEditingCells=function(){return this.rowRenderer.getEditingCells()};t.prototype.stopEditing=function(t){if(t===void 0){t=false}this.rowRenderer.stopEditing(t)};t.prototype.startEditingCell=function(t){var i=this.columnModel.getGridColumn(t.colKey);if(!i){console.warn("AG Grid: no column found for "+t.colKey);return}var n={rowIndex:t.rowIndex,rowPinned:t.rowPinned||null,column:i};var r=t.rowPinned==null;if(r){this.gridBodyCtrl.getScrollFeature().ensureIndexVisible(t.rowIndex)}var e=this.navigationService.getCellByPosition(n);if(!e){return}if(!this.focusService.isCellFocused(n)){this.focusService.setFocusedCell(n)}e.startRowOrCellEdit(t.key)};t.prototype.addAggFunc=function(t,i){if(this.aggFuncService){this.aggFuncService.addAggFunc(t,i)}};t.prototype.addAggFuncs=function(t){if(this.aggFuncService){this.aggFuncService.addAggFuncs(t)}};t.prototype.clearAggFuncs=function(){if(this.aggFuncService){this.aggFuncService.clear()}};t.prototype.applyServerSideTransaction=function(t){if(!this.serverSideTransactionManager){this.logMissingRowModel("applyServerSideTransaction","serverSide");return}return this.serverSideTransactionManager.applyTransaction(t)};t.prototype.applyServerSideTransactionAsync=function(t,i){if(!this.serverSideTransactionManager){this.logMissingRowModel("applyServerSideTransactionAsync","serverSide");return}return this.serverSideTransactionManager.applyTransactionAsync(t,i)};t.prototype.applyServerSideRowData=function(t){var i,n;var r=(i=t.startRow)!==null&&i!==void 0?i:0;var e=(n=t.route)!==null&&n!==void 0?n:[];if(r<0){console.warn("AG Grid: invalid value "+t.startRow+" for startRow, the value should be >= 0");return}if(this.serverSideRowModel){this.serverSideRowModel.applyRowData(t.successParams,r,e)}else{this.logMissingRowModel("setServerSideDatasource","serverSide")}};t.prototype.retryServerSideLoads=function(){if(!this.serverSideRowModel){this.logMissingRowModel("retryServerSideLoads","serverSide");return}this.serverSideRowModel.retryLoads()};t.prototype.flushServerSideAsyncTransactions=function(){if(!this.serverSideTransactionManager){this.logMissingRowModel("flushServerSideAsyncTransactions","serverSide");return}return this.serverSideTransactionManager.flushAsyncTransactions()};t.prototype.applyTransaction=function(t){if(!this.clientSideRowModel){this.logMissingRowModel("applyTransaction","clientSide");return}return this.clientSideRowModel.updateRowData(t)};t.prototype.applyTransactionAsync=function(t,i){if(!this.clientSideRowModel){this.logMissingRowModel("applyTransactionAsync","clientSide");return}this.clientSideRowModel.batchUpdateRowData(t,i)};t.prototype.flushAsyncTransactions=function(){if(!this.clientSideRowModel){this.logMissingRowModel("flushAsyncTransactions","clientSide");return}this.clientSideRowModel.flushAsyncTransactions()};t.prototype.setSuppressModelUpdateAfterUpdateTransaction=function(t){this.gos.set("suppressModelUpdateAfterUpdateTransaction",t)};t.prototype.refreshInfiniteCache=function(){if(this.infiniteRowModel){this.infiniteRowModel.refreshCache()}else{this.logMissingRowModel("refreshInfiniteCache","infinite")}};t.prototype.purgeInfiniteCache=function(){if(this.infiniteRowModel){this.infiniteRowModel.purgeCache()}else{this.logMissingRowModel("purgeInfiniteCache","infinite")}};t.prototype.refreshServerSide=function(t){if(!this.serverSideRowModel){this.logMissingRowModel("refreshServerSide","serverSide");return}this.serverSideRowModel.refreshStore(t)};t.prototype.refreshServerSideStore=function(t){Wi("28.0","refreshServerSideStore","refreshServerSide");return this.refreshServerSide(t)};t.prototype.getServerSideStoreState=function(){Wi("28.0","getServerSideStoreState","getServerSideGroupLevelState");return this.getServerSideGroupLevelState()};t.prototype.getServerSideGroupLevelState=function(){if(!this.serverSideRowModel){this.logMissingRowModel("getServerSideGroupLevelState","serverSide");return[]}return this.serverSideRowModel.getStoreState()};t.prototype.getInfiniteRowCount=function(){if(this.infiniteRowModel){return this.infiniteRowModel.getRowCount()}else{this.logMissingRowModel("getInfiniteRowCount","infinite")}};t.prototype.isLastRowIndexKnown=function(){if(this.infiniteRowModel){return this.infiniteRowModel.isLastRowIndexKnown()}else{this.logMissingRowModel("isLastRowIndexKnown","infinite")}};t.prototype.getCacheBlockState=function(){return this.rowNodeBlockLoader.getBlockState()};t.prototype.getFirstDisplayedRow=function(){return this.rowRenderer.getFirstVirtualRenderedRow()};t.prototype.getLastDisplayedRow=function(){return this.rowRenderer.getLastVirtualRenderedRow()};t.prototype.getDisplayedRowAtIndex=function(t){return this.rowModel.getRow(t)};t.prototype.getDisplayedRowCount=function(){return this.rowModel.getRowCount()};t.prototype.setDataTypeDefinitions=function(t){this.gos.set("dataTypeDefinitions",t)};t.prototype.setPagination=function(t){this.gos.set("pagination",t)};t.prototype.paginationIsLastPageFound=function(){return this.paginationProxy.isLastPageFound()};t.prototype.paginationGetPageSize=function(){return this.paginationProxy.getPageSize()};t.prototype.paginationSetPageSize=function(t){this.gos.set("paginationPageSize",t)};t.prototype.paginationGetCurrentPage=function(){return this.paginationProxy.getCurrentPage()};t.prototype.paginationGetTotalPages=function(){return this.paginationProxy.getTotalPages()};t.prototype.paginationGetRowCount=function(){return this.paginationProxy.getMasterRowCount()};t.prototype.paginationGoToNextPage=function(){this.paginationProxy.goToNextPage()};t.prototype.paginationGoToPreviousPage=function(){this.paginationProxy.goToPreviousPage()};t.prototype.paginationGoToFirstPage=function(){this.paginationProxy.goToFirstPage()};t.prototype.paginationGoToLastPage=function(){this.paginationProxy.goToLastPage()};t.prototype.paginationGoToPage=function(t){this.paginationProxy.goToPage(t)};uf([at("immutableService")],t.prototype,"immutableService",void 0);uf([at("csvCreator")],t.prototype,"csvCreator",void 0);uf([at("excelCreator")],t.prototype,"excelCreator",void 0);uf([ut("rowRenderer")],t.prototype,"rowRenderer",void 0);uf([ut("navigationService")],t.prototype,"navigationService",void 0);uf([ut("filterManager")],t.prototype,"filterManager",void 0);uf([ut("columnModel")],t.prototype,"columnModel",void 0);uf([ut("selectionService")],t.prototype,"selectionService",void 0);uf([ut("gridOptionsService")],t.prototype,"gos",void 0);uf([ut("valueService")],t.prototype,"valueService",void 0);uf([ut("alignedGridsService")],t.prototype,"alignedGridsService",void 0);uf([ut("eventService")],t.prototype,"eventService",void 0);uf([ut("pinnedRowModel")],t.prototype,"pinnedRowModel",void 0);uf([ut("context")],t.prototype,"context",void 0);uf([ut("rowModel")],t.prototype,"rowModel",void 0);uf([ut("sortController")],t.prototype,"sortController",void 0);uf([ut("paginationProxy")],t.prototype,"paginationProxy",void 0);uf([ut("focusService")],t.prototype,"focusService",void 0);uf([ut("dragAndDropService")],t.prototype,"dragAndDropService",void 0);uf([at("rangeService")],t.prototype,"rangeService",void 0);uf([at("clipboardService")],t.prototype,"clipboardService",void 0);uf([at("aggFuncService")],t.prototype,"aggFuncService",void 0);uf([ut("menuFactory")],t.prototype,"menuFactory",void 0);uf([at("contextMenuFactory")],t.prototype,"contextMenuFactory",void 0);uf([ut("valueCache")],t.prototype,"valueCache",void 0);uf([ut("animationFrameService")],t.prototype,"animationFrameService",void 0);uf([at("statusBarService")],t.prototype,"statusBarService",void 0);uf([at("chartService")],t.prototype,"chartService",void 0);uf([at("undoRedoService")],t.prototype,"undoRedoService",void 0);uf([at("rowNodeBlockLoader")],t.prototype,"rowNodeBlockLoader",void 0);uf([at("ssrmTransactionManager")],t.prototype,"serverSideTransactionManager",void 0);uf([ut("ctrlsService")],t.prototype,"ctrlsService",void 0);uf([et],t.prototype,"init",null);uf([st],t.prototype,"cleanDownReferencesToAvoidMemoryLeakInCaseApplicationIsKeepingReferenceToDestroyedGrid",null);t=uf([ot("gridApi")],t);return t}();var hf=function(){var t=function(i,n){t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var n in i)if(Object.prototype.hasOwnProperty.call(i,n))t[n]=i[n]};return t(i,n)};return function(i,n){if(typeof n!=="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(i,n);function r(){this.constructor=i}i.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}();var cf=function(t,i,n,r){var e=arguments.length,s=e<3?i:r===null?r=Object.getOwnPropertyDescriptor(i,n):r,o;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")s=Reflect.decorate(t,i,n,r);else for(var u=t.length-1;u>=0;u--)if(o=t[u])s=(e<3?o(s):e>3?o(i,n,s):o(i,n))||s;return e>3&&s&&Object.defineProperty(i,n,s),s};var lf=function(t){hf(n,t);function n(){var i=t!==null&&t.apply(this,arguments)||this;i.quickFilter=null;i.quickFilterParts=null;return i}r=n;n.prototype.postConstruct=function(){var t=this;this.addManagedListener(this.eventService,hi.EVENT_COLUMN_PIVOT_MODE_CHANGED,(function(){return t.resetQuickFilterCache()}));this.addManagedListener(this.eventService,hi.EVENT_NEW_COLUMNS_LOADED,(function(){return t.resetQuickFilterCache()}));this.addManagedListener(this.eventService,hi.EVENT_COLUMN_ROW_GROUP_CHANGED,(function(){return t.resetQuickFilterCache()}));this.addManagedListener(this.eventService,hi.EVENT_COLUMN_VISIBLE,(function(){if(!t.gridOptionsService.is("includeHiddenColumnsInQuickFilter")){t.resetQuickFilterCache()}}));this.addManagedPropertyListener("quickFilterText",(function(i){return t.setQuickFilter(i.currentValue)}));this.addManagedPropertyListener("includeHiddenColumnsInQuickFilter",(function(){return t.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 t.setQuickFilterParserAndMatcher()}))};n.prototype.isQuickFilterPresent=function(){return this.quickFilter!==null};n.prototype.doesRowPassQuickFilter=function(t){var i=this;var n=this.gridOptionsService.is("cacheQuickFilter");if(this.matcher){return this.doesRowPassQuickFilterMatcher(n,t)}return this.quickFilterParts.every((function(r){return n?i.doesRowPassQuickFilterCache(t,r):i.doesRowPassQuickFilterNoCache(t,r)}))};n.prototype.resetQuickFilterCache=function(){this.rowModel.forEachNode((function(t){return t.quickFilterAggregateText=null}))};n.prototype.setQuickFilterParts=function(){var t=this,i=t.quickFilter,n=t.parser;if(i){this.quickFilterParts=n?n(i):i.split(" ")}else{this.quickFilterParts=null}};n.prototype.parseQuickFilter=function(t){if(!i(t)){return null}if(!this.gridOptionsService.isRowModelType("clientSide")){console.warn("AG Grid - Quick filtering only works with the Client-Side Row Model");return null}return t.toUpperCase()};n.prototype.setQuickFilter=function(t){if(t!=null&&typeof t!=="string"){console.warn("AG Grid - setQuickFilter() only supports string inputs, received: "+typeof t);return}var i=this.parseQuickFilter(t);if(this.quickFilter!==i){this.quickFilter=i;this.setQuickFilterParts();this.dispatchEvent({type:r.EVENT_QUICK_FILTER_CHANGED})}};n.prototype.setQuickFilterParserAndMatcher=function(){var t=this.gridOptionsService.get("quickFilterParser");var i=this.gridOptionsService.get("quickFilterMatcher");var n=t!==this.parser||i!==this.matcher;this.parser=t;this.matcher=i;if(n){this.setQuickFilterParts();this.dispatchEvent({type:r.EVENT_QUICK_FILTER_CHANGED})}};n.prototype.onIncludeHiddenColumnsInQuickFilterChanged=function(){this.columnModel.refreshQuickFilterColumns();this.resetQuickFilterCache();if(this.isQuickFilterPresent()){this.dispatchEvent({type:r.EVENT_QUICK_FILTER_CHANGED})}};n.prototype.doesRowPassQuickFilterNoCache=function(t,n){var r=this;var e=this.columnModel.getAllColumnsForQuickFilter();return e.some((function(e){var s=r.getQuickFilterTextForColumn(e,t);return i(s)&&s.indexOf(n)>=0}))};n.prototype.doesRowPassQuickFilterCache=function(t,i){this.checkGenerateQuickFilterAggregateText(t);return t.quickFilterAggregateText.indexOf(i)>=0};n.prototype.doesRowPassQuickFilterMatcher=function(t,i){var n;if(t){this.checkGenerateQuickFilterAggregateText(i);n=i.quickFilterAggregateText}else{n=this.getQuickFilterAggregateText(i)}var r=this,e=r.quickFilterParts,s=r.matcher;return s(e,n)};n.prototype.checkGenerateQuickFilterAggregateText=function(t){if(!t.quickFilterAggregateText){t.quickFilterAggregateText=this.getQuickFilterAggregateText(t)}};n.prototype.getQuickFilterTextForColumn=function(t,n){var r=this.valueService.getValue(t,n,true);var e=t.getColDef();if(e.getQuickFilterText){var s={value:r,node:n,data:n.data,column:t,colDef:e,api:this.gridOptionsService.api,columnApi:this.gridOptionsService.columnApi,context:this.gridOptionsService.context};r=e.getQuickFilterText(s)}return i(r)?r.toString().toUpperCase():null};n.prototype.getQuickFilterAggregateText=function(t){var n=this;var e=[];var s=this.columnModel.getAllColumnsForQuickFilter();s.forEach((function(r){var s=n.getQuickFilterTextForColumn(r,t);if(i(s)){e.push(s)}}));return e.join(r.QUICK_FILTER_SEPARATOR)};var r;n.EVENT_QUICK_FILTER_CHANGED="quickFilterChanged";n.QUICK_FILTER_SEPARATOR="\n";cf([ut("valueService")],n.prototype,"valueService",void 0);cf([ut("columnModel")],n.prototype,"columnModel",void 0);cf([ut("rowModel")],n.prototype,"rowModel",void 0);cf([et],n.prototype,"postConstruct",null);n=r=cf([ot("quickFilterService")],n);return n}(ri);var vf=function(){var t=function(i,n){t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var n in i)if(Object.prototype.hasOwnProperty.call(i,n))t[n]=i[n]};return t(i,n)};return function(i,n){if(typeof n!=="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(i,n);function r(){this.constructor=i}i.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}();var df=function(){df=Object.assign||function(t){for(var i,n=1,r=arguments.length;n<r;n++){i=arguments[n];for(var e in i)if(Object.prototype.hasOwnProperty.call(i,e))t[e]=i[e]}return t};return df.apply(this,arguments)};var pf=function(t,i,n,r){var e=arguments.length,s=e<3?i:r===null?r=Object.getOwnPropertyDescriptor(i,n):r,o;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")s=Reflect.decorate(t,i,n,r);else for(var u=t.length-1;u>=0;u--)if(o=t[u])s=(e<3?o(s):e>3?o(i,n,s):o(i,n))||s;return e>3&&s&&Object.defineProperty(i,n,s),s};var gf=function(t){vf(n,t);function n(){var i=t!==null&&t.apply(this,arguments)||this;i.allColumnFilters=new Map;i.allColumnListeners=new Map;i.activeAggregateFilters=[];i.activeColumnFilters=[];i.processingFilterChange=false;i.filterModelUpdateQueue=[];return i}n.prototype.init=function(){var t=this;this.addManagedListener(this.eventService,hi.EVENT_GRID_COLUMNS_CHANGED,(function(){return t.onColumnsChanged()}));this.addManagedListener(this.eventService,hi.EVENT_COLUMN_VALUE_CHANGED,(function(){return t.refreshFiltersForAggregations()}));this.addManagedListener(this.eventService,hi.EVENT_COLUMN_PIVOT_CHANGED,(function(){return t.refreshFiltersForAggregations()}));this.addManagedListener(this.eventService,hi.EVENT_COLUMN_PIVOT_MODE_CHANGED,(function(){return t.refreshFiltersForAggregations()}));this.addManagedListener(this.eventService,hi.EVENT_NEW_COLUMNS_LOADED,(function(){return t.updateAdvancedFilterColumns()}));this.addManagedListener(this.eventService,hi.EVENT_COLUMN_VISIBLE,(function(){return t.updateAdvancedFilterColumns()}));this.allowShowChangeAfterFilter=this.gridOptionsService.is("allowShowChangeAfterFilter");this.externalFilterPresent=this.isExternalFilterPresentCallback();this.updateAggFiltering();this.addManagedPropertyListener("groupAggFiltering",(function(){return t.updateAggFiltering()}));this.addManagedPropertyListener("advancedFilterModel",(function(i){return t.setAdvancedFilterModel(i.currentValue)}));this.addManagedListener(this.eventService,hi.EVENT_ADVANCED_FILTER_ENABLED_CHANGED,(function(i){var n=i.enabled;return t.onAdvancedFilterEnabledChanged(n)}));this.addManagedListener(this.eventService,hi.EVENT_DATA_TYPES_INFERRED,(function(){return t.processFilterModelUpdateQueue()}));this.addManagedListener(this.quickFilterService,lf.EVENT_QUICK_FILTER_CHANGED,(function(){return t.onFilterChanged({source:"quickFilter"})}))};n.prototype.isExternalFilterPresentCallback=function(){var t=this.gridOptionsService.getCallback("isExternalFilterPresent");if(typeof t==="function"){return t({})}return false};n.prototype.doesExternalFilterPass=function(t){var i=this.gridOptionsService.get("doesExternalFilterPass");if(typeof i==="function"){return i(t)}return false};n.prototype.setFilterModel=function(t){var i=this;if(this.isAdvancedFilterEnabled()){this.warnAdvancedFilters();return}if(this.dataTypeService.isPendingInference()){this.filterModelUpdateQueue.push(t);return}var n=[];var r=this.getFilterModel();if(t){var e=Qe(Object.keys(t));this.allColumnFilters.forEach((function(r,s){var o=t[s];n.push(i.setModelOnFilterWrapper(r.filterPromise,o));e.delete(s)}));e.forEach((function(r){var e=i.columnModel.getPrimaryColumn(r)||i.columnModel.getGridColumn(r);if(!e){console.warn("AG Grid: setFilterModel() - no column found for colId: "+r);return}if(!e.isFilterAllowed()){console.warn("AG Grid: setFilterModel() - unable to fully apply model, filtering disabled for colId: "+r);return}var s=i.getOrCreateFilterWrapper(e,"NO_UI");if(!s){console.warn("AG-Grid: setFilterModel() - unable to fully apply model, unable to create filter for colId: "+r);return}n.push(i.setModelOnFilterWrapper(s.filterPromise,t[r]))}))}else{this.allColumnFilters.forEach((function(t){n.push(i.setModelOnFilterWrapper(t.filterPromise,null))}))}ns.all(n).then((function(){var t=i.getFilterModel();var n=[];i.allColumnFilters.forEach((function(i,e){var s=r?r[e]:null;var o=t?t[e]:null;if(!Xe.jsonEquals(s,o)){n.push(i.column)}}));if(n.length>0){i.onFilterChanged({columns:n,source:"api"})}}))};n.prototype.setModelOnFilterWrapper=function(t,i){return new ns((function(n){t.then((function(t){if(typeof t.setModel!=="function"){console.warn("AG Grid: filter missing setModel method, which is needed for setFilterModel");n()}(t.setModel(i)||ns.resolve()).then((function(){return n()}))}))}))};n.prototype.getFilterModel=function(){var t={};this.allColumnFilters.forEach((function(n,r){var e=n.filterPromise;var s=e.resolveNow(null,(function(t){return t}));if(s==null){return null}if(typeof s.getModel!=="function"){console.warn("AG Grid: filter API missing getModel method, which is needed for getFilterModel");return}var o=s.getModel();if(i(o)){t[r]=o}}));return t};n.prototype.isColumnFilterPresent=function(){return this.activeColumnFilters.length>0};n.prototype.isAggregateFilterPresent=function(){return!!this.activeAggregateFilters.length};n.prototype.isExternalFilterPresent=function(){return this.externalFilterPresent};n.prototype.isChildFilterPresent=function(){return this.isColumnFilterPresent()||this.isQuickFilterPresent()||this.isExternalFilterPresent()||this.isAdvancedFilterPresent()};n.prototype.isAdvancedFilterPresent=function(){return this.isAdvancedFilterEnabled()&&this.advancedFilterService.isFilterPresent()};n.prototype.onAdvancedFilterEnabledChanged=function(t){var i=this;var n;if(t){if(this.allColumnFilters.size){this.allColumnFilters.forEach((function(t){return i.disposeFilterWrapper(t,"advancedFilterEnabled")}));this.onFilterChanged({source:"advancedFilter"})}}else{if((n=this.advancedFilterService)===null||n===void 0?void 0:n.isFilterPresent()){this.advancedFilterService.setModel(null);this.onFilterChanged({source:"advancedFilter"})}}};n.prototype.isAdvancedFilterEnabled=function(){var t;return(t=this.advancedFilterService)===null||t===void 0?void 0:t.isEnabled()};n.prototype.isAdvancedFilterHeaderActive=function(){return this.isAdvancedFilterEnabled()&&this.advancedFilterService.isHeaderActive()};n.prototype.doAggregateFiltersPass=function(t,i){return this.doColumnFiltersPass(t,i,true)};n.prototype.updateActiveFilters=function(){var t=this;this.activeColumnFilters.length=0;this.activeAggregateFilters.length=0;var i=function(t){if(!t){return false}if(!t.isFilterActive){console.warn("AG Grid: Filter is missing isFilterActive() method");return false}return t.isFilterActive()};var n=!!this.gridOptionsService.getGroupAggFiltering();var r=function(i){var r=!i.isPrimary();if(r){return true}var e=!t.columnModel.isPivotActive();var s=i.isValueActive();if(!s||!e){return false}if(t.columnModel.isPivotMode()){return true}return n};this.allColumnFilters.forEach((function(n){if(n.filterPromise.resolveNow(false,i)){var e=n.filterPromise.resolveNow(null,(function(t){return t}));if(r(n.column)){t.activeAggregateFilters.push(e)}else{t.activeColumnFilters.push(e)}}}))};n.prototype.updateFilterFlagInColumns=function(t,i){this.allColumnFilters.forEach((function(n){var r=n.filterPromise.resolveNow(false,(function(t){return t.isFilterActive()}));n.column.setFilterActive(r,t,i)}))};n.prototype.isAnyFilterPresent=function(){return this.isQuickFilterPresent()||this.isColumnFilterPresent()||this.isAggregateFilterPresent()||this.isExternalFilterPresent()};n.prototype.doColumnFiltersPass=function(t,i,n){var r=t.data,e=t.aggData;var s=n?this.activeAggregateFilters:this.activeColumnFilters;var o=n?e:r;for(var u=0;u<s.length;u++){var a=s[u];if(a==null||a===i){continue}if(typeof a.doesFilterPass!=="function"){throw new Error("Filter is missing method doesFilterPass")}if(!a.doesFilterPass({node:t,data:o})){return false}}return true};n.prototype.resetQuickFilterCache=function(){this.quickFilterService.resetQuickFilterCache()};n.prototype.refreshFiltersForAggregations=function(){var t=this.gridOptionsService.getGroupAggFiltering();if(t){this.onFilterChanged()}};n.prototype.callOnFilterChangedOutsideRenderCycle=function(t){var i=this;var n=function(){return i.onFilterChanged(t)};if(this.rowRenderer.isRefreshInProgress()){setTimeout(n,0)}else{n()}};n.prototype.onFilterChanged=function(t){if(t===void 0){t={}}var i=t.source,n=t.filterInstance,r=t.additionalEventAttributes,e=t.columns;this.updateDependantFilters();this.updateActiveFilters();this.updateFilterFlagInColumns("filterChanged",r);this.externalFilterPresent=this.isExternalFilterPresentCallback();this.allColumnFilters.forEach((function(t){if(!t.filterPromise){return}t.filterPromise.then((function(t){if(t&&t!==n&&t.onAnyFilterChanged){t.onAnyFilterChanged()}}))}));var s={source:i,type:hi.EVENT_FILTER_CHANGED,columns:e||[]};if(r){x(s,r)}this.processingFilterChange=true;this.eventService.dispatchEvent(s);this.processingFilterChange=false};n.prototype.isSuppressFlashingCellsBecauseFiltering=function(){return!this.allowShowChangeAfterFilter&&this.processingFilterChange};n.prototype.isQuickFilterPresent=function(){return this.quickFilterService.isQuickFilterPresent()};n.prototype.updateAggFiltering=function(){this.aggFiltering=!!this.gridOptionsService.getGroupAggFiltering()};n.prototype.isAggregateQuickFilterPresent=function(){return this.isQuickFilterPresent()&&(this.aggFiltering||this.columnModel.isPivotMode())};n.prototype.isNonAggregateQuickFilterPresent=function(){return this.isQuickFilterPresent()&&!(this.aggFiltering||this.columnModel.isPivotMode())};n.prototype.doesRowPassOtherFilters=function(t,i){return this.doesRowPassFilter({rowNode:i,filterInstanceToSkip:t})};n.prototype.doesRowPassAggregateFilters=function(t){if(this.isAggregateQuickFilterPresent()&&!this.quickFilterService.doesRowPassQuickFilter(t.rowNode)){return false}if(this.isAggregateFilterPresent()&&!this.doAggregateFiltersPass(t.rowNode,t.filterInstanceToSkip)){return false}return true};n.prototype.doesRowPassFilter=function(t){if(this.isNonAggregateQuickFilterPresent()&&!this.quickFilterService.doesRowPassQuickFilter(t.rowNode)){return false}if(this.isExternalFilterPresent()&&!this.doesExternalFilterPass(t.rowNode)){return false}if(this.isColumnFilterPresent()&&!this.doColumnFiltersPass(t.rowNode,t.filterInstanceToSkip)){return false}if(this.isAdvancedFilterPresent()&&!this.advancedFilterService.doesFilterPass(t.rowNode)){return false}return true};n.prototype.onNewRowsLoaded=function(t){this.allColumnFilters.forEach((function(t){t.filterPromise.then((function(t){if(t.onNewRowsLoaded){t.onNewRowsLoaded()}}))}));this.updateFilterFlagInColumns(t,{afterDataChange:true});this.updateActiveFilters()};n.prototype.createValueGetter=function(t){var i=this;return function(n){var r=n.node;return i.valueService.getValue(t,r,true)}};n.prototype.getFilterComponent=function(t,i,n){var r;if(n===void 0){n=true}if(n){return((r=this.getOrCreateFilterWrapper(t,i))===null||r===void 0?void 0:r.filterPromise)||null}var e=this.cachedFilter(t);return e?e.filterPromise:null};n.prototype.isFilterActive=function(t){var i=this.cachedFilter(t);return!!i&&i.filterPromise.resolveNow(false,(function(t){return t.isFilterActive()}))};n.prototype.getOrCreateFilterWrapper=function(t,i){var n=this;if(!t.isFilterAllowed()){return null}var r=this.cachedFilter(t);if(!r){r=this.createFilterWrapper(t,i);var e=t.getColId();this.allColumnFilters.set(e,r);this.allColumnListeners.set(e,this.addManagedListener(t,mt.EVENT_COL_DEF_CHANGED,(function(){return n.checkDestroyFilter(e)})))}else if(i!=="NO_UI"){this.putIntoGui(r,i)}return r};n.prototype.cachedFilter=function(t){return this.allColumnFilters.get(t.getColId())};n.prototype.getDefaultFilter=function(t){var i;if(X.__isRegistered(J.SetFilterModule,this.context.getGridId())){i="agSetColumnFilter"}else{var n=t.getColDef().cellDataType;if(n==="number"){i="agNumberColumnFilter"}else if(n==="date"||n==="dateString"){i="agDateColumnFilter"}else{i="agTextColumnFilter"}}return i};n.prototype.getDefaultFloatingFilter=function(t){var i;if(X.__isRegistered(J.SetFilterModule,this.context.getGridId())){i="agSetColumnFloatingFilter"}else{var n=t.getColDef().cellDataType;if(n==="number"){i="agNumberColumnFloatingFilter"}else if(n==="date"||n==="dateString"){i="agDateColumnFloatingFilter"}else{i="agTextColumnFloatingFilter"}}return i};n.prototype.createFilterInstance=function(t){var i=this;var n=this.getDefaultFilter(t);var r=t.getColDef();var e;var s=df(df({},this.createFilterParams(t,r)),{filterModifiedCallback:function(){var n={type:hi.EVENT_FILTER_MODIFIED,column:t,filterInstance:e};i.eventService.dispatchEvent(n)},filterChangedCallback:function(n){var r;var s=(r=n===null||n===void 0?void 0:n.source)!==null&&r!==void 0?r:"api";var o={filterInstance:e,additionalEventAttributes:n,columns:[t],source:s};i.callOnFilterChangedOutsideRenderCycle(o)},doesRowPassOtherFilter:function(t){return i.doesRowPassOtherFilters(e,t)}});var o=this.userComponentFactory.getFilterDetails(r,s,n);if(!o){return{filterPromise:null,compDetails:null}}return{filterPromise:function(){var t=o.newAgStackInstance();if(t){t.then((function(t){return e=t}))}return t},compDetails:o}};n.prototype.createFilterParams=function(t,i){var n={column:t,colDef:b(i),rowModel:this.rowModel,filterChangedCallback:function(){},filterModifiedCallback:function(){},valueGetter:this.createValueGetter(t),doesRowPassOtherFilter:function(){return true},api:this.gridOptionsService.api,columnApi:this.gridOptionsService.columnApi,context:this.gridOptionsService.context};return n};n.prototype.createFilterWrapper=function(t,i){var n;var r={column:t,filterPromise:null,compiledElement:null,guiPromise:ns.resolve(null),compDetails:null};var e=this.createFilterInstance(t),s=e.filterPromise,o=e.compDetails;r.filterPromise=(n=s===null||s===void 0?void 0:s())!==null&&n!==void 0?n:null;r.compDetails=o;if(s){this.putIntoGui(r,i)}return r};n.prototype.putIntoGui=function(t,n){var r=this;var e=document.createElement("div");e.className="ag-filter";t.guiPromise=new ns((function(s){t.filterPromise.then((function(o){var u=o.getGui();if(!i(u)){console.warn("AG Grid: getGui method from filter returned "+u+", it should be a DOM element or an HTML template string.")}if(typeof u==="string"){u=re(u)}e.appendChild(u);s(e);var a={type:hi.EVENT_FILTER_OPENED,column:t.column,source:n,eGui:e};r.eventService.dispatchEvent(a)}))}))};n.prototype.onColumnsChanged=function(){var t=this;var i=[];this.allColumnFilters.forEach((function(n,r){var e;if(n.column.isPrimary()){e=t.columnModel.getPrimaryColumn(r)}else{e=t.columnModel.getGridColumn(r)}if(e){return}i.push(n.column);t.disposeFilterWrapper(n,"columnChanged");t.disposeColumnListener(r)}));if(i.length>0){this.onFilterChanged({columns:i,source:"api"})}else{this.updateDependantFilters()}};n.prototype.updateDependantFilters=function(){var t=this;var i=this.columnModel.getGroupAutoColumns();i===null||i===void 0?void 0:i.forEach((function(i){if(i.getColDef().filter==="agGroupColumnFilter"){t.getOrCreateFilterWrapper(i,"NO_UI")}}))};n.prototype.isFilterAllowed=function(t){var i,n;if(this.isAdvancedFilterEnabled()){return false}var r=t.isFilterAllowed();if(!r){return false}var e=this.allColumnFilters.get(t.getColId());return(n=(i=e===null||e===void 0?void 0:e.filterPromise)===null||i===void 0?void 0:i.resolveNow(true,(function(t){var i,n;return typeof((i=t)===null||i===void 0?void 0:i.isFilterAllowed)==="function"?(n=t)===null||n===void 0?void 0:n.isFilterAllowed():true})))!==null&&n!==void 0?n:true};n.prototype.getFloatingFilterCompDetails=function(t,i){var n=this;var r=t.getColDef();var e=this.createFilterParams(t,r);var s=this.userComponentFactory.mergeParamsWithApplicationProvidedParams(r,Na,e);var o=this.userComponentFactory.getDefaultFloatingFilterType(r,(function(){return n.getDefaultFloatingFilter(t)}));if(o==null){o="agReadOnlyFloatingFilter"}var u=function(i){var r=n.getFilterComponent(t,"NO_UI");if(r==null){return}r.then((function(t){i(af(t))}))};var a={column:t,filterParams:s,currentParentModel:function(){return n.getCurrentFloatingFilterParentModel(t)},parentFilterInstance:u,showParentFilter:i,suppressFilterButton:false};return this.userComponentFactory.getFloatingFilterCompDetails(r,a,o)};n.prototype.getCurrentFloatingFilterParentModel=function(t){var i=this.getFilterComponent(t,"NO_UI",false);return i?i.resolveNow(null,(function(t){return t&&t.getModel()})):null};n.prototype.destroyFilter=function(t,i){if(i===void 0){i="api"}var n=t.getColId();var r=this.allColumnFilters.get(n);this.disposeColumnListener(n);if(r){this.disposeFilterWrapper(r,i);this.onFilterChanged({columns:[t],source:"api"})}};n.prototype.disposeColumnListener=function(t){var i=this.allColumnListeners.get(t);if(i){this.allColumnListeners.delete(t);i()}};n.prototype.disposeFilterWrapper=function(t,i){var n=this;t.filterPromise.then((function(r){(r.setModel(null)||ns.resolve()).then((function(){n.getContext().destroyBean(r);t.column.setFilterActive(false,"filterDestroyed");n.allColumnFilters.delete(t.column.getColId());var e={type:hi.EVENT_FILTER_DESTROYED,source:i,column:t.column};n.eventService.dispatchEvent(e)}))}))};n.prototype.checkDestroyFilter=function(t){var i=this.allColumnFilters.get(t);if(!i){return}var n=i.column;var r=(n.isFilterAllowed()?this.createFilterInstance(n):{compDetails:null}).compDetails;if(this.areFilterCompsDifferent(i.compDetails,r)){this.destroyFilter(n,"columnChanged")}};n.prototype.areFilterCompsDifferent=function(t,i){if(!i||!t){return true}var n=t.componentClass;var r=i.componentClass;var e=n===r||(n===null||n===void 0?void 0:n.render)&&(r===null||r===void 0?void 0:r.render)&&n.render===r.render;return!e};n.prototype.getAdvancedFilterModel=function(){return this.isAdvancedFilterEnabled()?this.advancedFilterService.getModel():null};n.prototype.setAdvancedFilterModel=function(t){if(!this.isAdvancedFilterEnabled()){return}this.advancedFilterService.setModel(t!==null&&t!==void 0?t:null);this.onFilterChanged({source:"advancedFilter"})};n.prototype.showAdvancedFilterBuilder=function(t){if(!this.isAdvancedFilterEnabled()){return}this.advancedFilterService.getCtrl().toggleFilterBuilder(t,true)};n.prototype.updateAdvancedFilterColumns=function(){if(!this.isAdvancedFilterEnabled()){return}if(this.advancedFilterService.updateValidity()){this.onFilterChanged({source:"advancedFilter"})}};n.prototype.hasFloatingFilters=function(){if(this.isAdvancedFilterEnabled()){return false}var t=this.columnModel.getAllGridColumns();if(!t){return false}return t.some((function(t){return t.getColDef().floatingFilter}))};n.prototype.getFilterInstance=function(t,i){if(this.isAdvancedFilterEnabled()){this.warnAdvancedFilters();return undefined}var n=this.getFilterInstanceImpl(t,(function(t){if(!i){return}var n=af(t);i(n)}));var r=af(n);return r};n.prototype.getFilterInstanceImpl=function(t,i){var n=this.columnModel.getPrimaryColumn(t);if(!n){return undefined}var r=this.getFilterComponent(n,"NO_UI");var e=r&&r.resolveNow(null,(function(t){return t}));if(e){setTimeout(i,0,e)}else if(r){r.then((function(t){i(t)}))}return e};n.prototype.warnAdvancedFilters=function(){P((function(){console.warn("AG Grid: Column Filter API methods have been disabled as Advanced Filters are enabled.")}),"advancedFiltersCompatibility")};n.prototype.setupAdvancedFilterHeaderComp=function(t){var i;(i=this.advancedFilterService)===null||i===void 0?void 0:i.getCtrl().setupHeaderComp(t)};n.prototype.getHeaderRowCount=function(){return this.isAdvancedFilterHeaderActive()?1:0};n.prototype.getHeaderHeight=function(){return this.isAdvancedFilterHeaderActive()?this.advancedFilterService.getCtrl().getHeaderHeight():0};n.prototype.processFilterModelUpdateQueue=function(){var t=this;this.filterModelUpdateQueue.forEach((function(i){return t.setFilterModel(i)}));this.filterModelUpdateQueue=[]};n.prototype.destroy=function(){var i=this;t.prototype.destroy.call(this);this.allColumnFilters.forEach((function(t){return i.disposeFilterWrapper(t,"gridDestroyed")}));this.allColumnListeners.clear()};pf([ut("valueService")],n.prototype,"valueService",void 0);pf([ut("columnModel")],n.prototype,"columnModel",void 0);pf([ut("rowModel")],n.prototype,"rowModel",void 0);pf([ut("userComponentFactory")],n.prototype,"userComponentFactory",void 0);pf([ut("rowRenderer")],n.prototype,"rowRenderer",void 0);pf([ut("dataTypeService")],n.prototype,"dataTypeService",void 0);pf([ut("quickFilterService")],n.prototype,"quickFilterService",void 0);pf([at("advancedFilterService")],n.prototype,"advancedFilterService",void 0);pf([et],n.prototype,"init",null);n=pf([ot("filterManager")],n);return n}(ri);var bf=function(){var t=function(i,n){t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var n in i)if(Object.prototype.hasOwnProperty.call(i,n))t[n]=i[n]};return t(i,n)};return function(i,n){if(typeof n!=="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(i,n);function r(){this.constructor=i}i.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}();var wf=function(t){bf(i,t);function i(i,n){var r=t.call(this,i)||this;r.ctrl=n;return r}i.prototype.getCtrl=function(){return this.ctrl};return i}(vs);var yf=function(){var t=function(i,n){t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var n in i)if(Object.prototype.hasOwnProperty.call(i,n))t[n]=i[n]};return t(i,n)};return function(i,n){if(typeof n!=="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(i,n);function r(){this.constructor=i}i.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}();var mf=function(t,i,n,r){var e=arguments.length,s=e<3?i:r===null?r=Object.getOwnPropertyDescriptor(i,n):r,o;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")s=Reflect.decorate(t,i,n,r);else for(var u=t.length-1;u>=0;u--)if(o=t[u])s=(e<3?o(s):e>3?o(i,n,s):o(i,n))||s;return e>3&&s&&Object.defineProperty(i,n,s),s};var Sf=function(t){yf(i,t);function i(n){return t.call(this,i.TEMPLATE,n)||this}i.prototype.postConstruct=function(){var t=this;var i=this.getGui();var n={addOrRemoveCssClass:function(i,n){return t.addOrRemoveCssClass(i,n)},addOrRemoveBodyCssClass:function(i,n){return t.eFloatingFilterBody.classList.toggle(i,n)},setButtonWrapperDisplayed:function(i){return Lr(t.eButtonWrapper,i)},setCompDetails:function(i){return t.setCompDetails(i)},getFloatingFilterComp:function(){return t.compPromise},setWidth:function(t){return i.style.width=t},setMenuIcon:function(i){return t.eButtonShowMainFilter.appendChild(i)}};this.ctrl.setComp(n,i,this.eButtonShowMainFilter,this.eFloatingFilterBody)};i.prototype.setCompDetails=function(t){var i=this;if(!t){this.destroyFloatingFilterComp();this.compPromise=null;return}this.compPromise=t.newAgStackInstance();this.compPromise.then((function(t){return i.afterCompCreated(t)}))};i.prototype.destroyFloatingFilterComp=function(){if(this.floatingFilterComp){this.eFloatingFilterBody.removeChild(this.floatingFilterComp.getGui());this.floatingFilterComp=this.destroyBean(this.floatingFilterComp)}};i.prototype.afterCompCreated=function(t){if(!t){return}if(!this.isAlive()){this.destroyBean(t);return}this.destroyFloatingFilterComp();this.floatingFilterComp=t;this.eFloatingFilterBody.appendChild(t.getGui());if(t.afterGuiAttached){t.afterGuiAttached()}};i.TEMPLATE='<div class="ag-header-cell ag-floating-filter" role="gridcell" tabindex="-1">\n <div ref="eFloatingFilterBody" role="presentation"></div>\n <div class="ag-floating-filter-button ag-hidden" ref="eButtonWrapper" role="presentation">\n <button type="button" class="ag-button ag-floating-filter-button-button" ref="eButtonShowMainFilter" tabindex="-1"></button>\n </div>\n </div>';mf([ds("eFloatingFilterBody")],i.prototype,"eFloatingFilterBody",void 0);mf([ds("eButtonWrapper")],i.prototype,"eButtonWrapper",void 0);mf([ds("eButtonShowMainFilter")],i.prototype,"eButtonShowMainFilter",void 0);mf([et],i.prototype,"postConstruct",null);mf([st],i.prototype,"destroyFloatingFilterComp",null);return i}(wf);var Cf=function(){var t=function(i,n){t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var n in i)if(Object.prototype.hasOwnProperty.call(i,n))t[n]=i[n]};return t(i,n)};return function(i,n){if(typeof n!=="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(i,n);function r(){this.constructor=i}i.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}();var Of=function(t,i,n,r){var e=arguments.length,s=e<3?i:r===null?r=Object.getOwnPropertyDescriptor(i,n):r,o;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")s=Reflect.decorate(t,i,n,r);else for(var u=t.length-1;u>=0;u--)if(o=t[u])s=(e<3?o(s):e>3?o(i,n,s):o(i,n))||s;return e>3&&s&&Object.defineProperty(i,n,s),s};var jf;(function(t){t["AUTO_HEIGHT"]="ag-layout-auto-height";t["NORMAL"]="ag-layout-normal";t["PRINT"]="ag-layout-print"})(jf||(jf={}));var Rf=function(t){Cf(i,t);function i(i){var n=t.call(this)||this;n.view=i;return n}i.prototype.postConstruct=function(){this.addManagedPropertyListener("domLayout",this.updateLayoutClasses.bind(this));this.updateLayoutClasses()};i.prototype.updateLayoutClasses=function(){var t=this.getDomLayout();var i={autoHeight:t==="autoHeight",normal:t==="normal",print:t==="print"};var n=i.autoHeight?jf.AUTO_HEIGHT:i.print?jf.PRINT:jf.NORMAL;this.view.updateLayoutClasses(n,i)};i.prototype.getDomLayout=function(){var t;var i=(t=this.gridOptionsService.get("domLayout"))!==null&&t!==void 0?t:"normal";var n=["normal","print","autoHeight"];if(n.indexOf(i)===-1){P((function(){return console.warn("AG Grid: "+i+" is not valid for DOM Layout, valid values are 'normal', 'autoHeight', 'print'.")}),"warn about dom layout values");return"normal"}return i};Of([et],i.prototype,"postConstruct",null);return i}(ri);var xf=function(){var t=function(i,n){t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var n in i)if(Object.prototype.hasOwnProperty.call(i,n))t[n]=i[n]};return t(i,n)};return function(i,n){if(typeof n!=="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(i,n);function r(){this.constructor=i}i.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}();var _f=function(){_f=Object.assign||function(t){for(var i,n=1,r=arguments.length;n<r;n++){i=arguments[n];for(var e in i)if(Object.prototype.hasOwnProperty.call(i,e))t[e]=i[e]}return t};return _f.apply(this,arguments)};var Af=function(t,i,n,r){var e=arguments.length,s=e<3?i:r===null?r=Object.getOwnPropertyDescriptor(i,n):r,o;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")s=Reflect.decorate(t,i,n,r);else for(var u=t.length-1;u>=0;u--)if(o=t[u])s=(e<3?o(s):e>3?o(i,n,s):o(i,n))||s;return e>3&&s&&Object.defineProperty(i,n,s),s};var Ff;(function(t){t[t["Vertical"]=0]="Vertical";t[t["Horizontal"]=1]="Horizontal"})(Ff||(Ff={}));var kf;(function(t){t[t["Container"]=0]="Container";t[t["FakeContainer"]=1]="FakeContainer"})(kf||(kf={}));var Tf=function(t){xf(i,t);function i(i){var n=t.call(this)||this;n.lastScrollSource=[null,null];n.scrollLeft=-1;n.nextScrollTop=-1;n.scrollTop=-1;n.eBodyViewport=i;n.resetLastHScrollDebounced=z((function(){return n.lastScrollSource[Ff.Horizontal]=null}),500);n.resetLastVScrollDebounced=z((function(){return n.lastScrollSource[Ff.Vertical]=null}),500);return n}i.prototype.postConstruct=function(){var t=this;this.enableRtl=this.gridOptionsService.is("enableRtl");this.addManagedListener(this.eventService,hi.EVENT_DISPLAYED_COLUMNS_WIDTH_CHANGED,this.onDisplayedColumnsWidthChanged.bind(this));this.ctrlsService.whenReady((function(i){t.centerRowContainerCtrl=i.centerRowContainerCtrl;t.onDisplayedColumnsWidthChanged();t.addScrollListener()}))};i.prototype.addScrollListener=function(){var t=this.ctrlsService.getFakeHScrollComp();var i=this.ctrlsService.getFakeVScrollComp();this.addManagedListener(this.centerRowContainerCtrl.getViewportElement(),"scroll",this.onHScroll.bind(this));t.onScrollCallback(this.onFakeHScroll.bind(this));var n=this.gridOptionsService.is("debounceVerticalScrollbar");var r=n?z(this.onVScroll.bind(this),100):this.onVScroll.bind(this);var e=n?z(this.onFakeVScroll.bind(this),100):this.onFakeVScroll.bind(this);this.addManagedListener(this.eBodyViewport,"scroll",r);i.onScrollCallback(e)};i.prototype.onDisplayedColumnsWidthChanged=function(){if(this.enableRtl){this.horizontallyScrollHeaderCenterAndFloatingCenter()}};i.prototype.horizontallyScrollHeaderCenterAndFloatingCenter=function(t){var i=this.centerRowContainerCtrl==null;if(i){return}if(t===undefined){t=this.centerRowContainerCtrl.getCenterViewportScrollLeft()}var n=this.enableRtl?t:-t;var r=this.ctrlsService.getTopCenterRowContainerCtrl();var e=this.ctrlsService.getStickyTopCenterRowContainerCtrl();var s=this.ctrlsService.getBottomCenterRowContainerCtrl();var o=this.ctrlsService.getFakeHScrollComp();var u=this.ctrlsService.getHeaderRowContainerCtrl();u.setHorizontalScroll(-n);s.setContainerTranslateX(n);r.setContainerTranslateX(n);e.setContainerTranslateX(n);var a=this.centerRowContainerCtrl.getViewportElement();var f=this.lastScrollSource[Ff.Horizontal]===kf.Container;t=Math.abs(t);if(f){o.setScrollPosition(t)}else{$r(a,t,this.enableRtl)}};i.prototype.isControllingScroll=function(t,i){if(this.lastScrollSource[i]==null){this.lastScrollSource[i]=t;return true}return this.lastScrollSource[i]===t};i.prototype.onFakeHScroll=function(){if(!this.isControllingScroll(kf.FakeContainer,Ff.Horizontal)){return}this.onHScrollCommon(kf.FakeContainer)};i.prototype.onHScroll=function(){if(!this.isControllingScroll(kf.Container,Ff.Horizontal)){return}this.onHScrollCommon(kf.Container)};i.prototype.onHScrollCommon=function(t){var i=this.centerRowContainerCtrl.getViewportElement();var n=i.scrollLeft;if(this.shouldBlockScrollUpdate(Ff.Horizontal,n,true)){return}var r;if(t===kf.Container){r=Zr(i,this.enableRtl)}else{r=this.ctrlsService.getFakeHScrollComp().getScrollPosition()}this.doHorizontalScroll(Math.round(r));this.resetLastHScrollDebounced()};i.prototype.onFakeVScroll=function(){if(!this.isControllingScroll(kf.FakeContainer,Ff.Vertical)){return}this.onVScrollCommon(kf.FakeContainer)};i.prototype.onVScroll=function(){if(!this.isControllingScroll(kf.Container,Ff.Vertical)){return}this.onVScrollCommon(kf.Container)};i.prototype.onVScrollCommon=function(t){var i;if(t===kf.Container){i=this.eBodyViewport.scrollTop}else{i=this.ctrlsService.getFakeVScrollComp().getScrollPosition()}if(this.shouldBlockScrollUpdate(Ff.Vertical,i,true)){return}this.animationFrameService.setScrollTop(i);this.nextScrollTop=i;if(t===kf.Container){this.ctrlsService.getFakeVScrollComp().setScrollPosition(i)}else{this.eBodyViewport.scrollTop=i}if(this.gridOptionsService.is("suppressAnimationFrame")){this.scrollGridIfNeeded()}else{this.animationFrameService.schedule()}this.resetLastVScrollDebounced()};i.prototype.doHorizontalScroll=function(t){var i=this.ctrlsService.getFakeHScrollComp().getScrollPosition();if(this.scrollLeft===t&&t===i){return}this.scrollLeft=t;this.fireScrollEvent(Ff.Horizontal);this.horizontallyScrollHeaderCenterAndFloatingCenter(t);this.centerRowContainerCtrl.onHorizontalViewportChanged(true)};i.prototype.fireScrollEvent=function(t){var i=this;var n={type:hi.EVENT_BODY_SCROLL,direction:t===Ff.Horizontal?"horizontal":"vertical",left:this.scrollLeft,top:this.scrollTop};this.eventService.dispatchEvent(n);window.clearTimeout(this.scrollTimer);this.scrollTimer=undefined;this.scrollTimer=window.setTimeout((function(){var t=_f(_f({},n),{type:hi.EVENT_BODY_SCROLL_END});i.eventService.dispatchEvent(t)}),100)};i.prototype.shouldBlockScrollUpdate=function(t,i,n){if(n===void 0){n=false}if(n&&!ur()){return false}if(t===Ff.Vertical){return this.shouldBlockVerticalScroll(i)}return this.shouldBlockHorizontalScroll(i)};i.prototype.shouldBlockVerticalScroll=function(t){var i=Ur(this.eBodyViewport);var n=this.eBodyViewport.scrollHeight;if(t<0||t+i>n){return true}return false};i.prototype.shouldBlockHorizontalScroll=function(t){var i=this.centerRowContainerCtrl.getCenterWidth();var n=this.centerRowContainerCtrl.getViewportElement().scrollWidth;if(this.enableRtl&&Jr()){if(t>0){return true}}else if(t<0){return true}if(Math.abs(t)+i>n){return true}return false};i.prototype.redrawRowsAfterScroll=function(){this.fireScrollEvent(Ff.Vertical)};i.prototype.checkScrollLeft=function(){if(this.scrollLeft!==this.centerRowContainerCtrl.getCenterViewportScrollLeft()){this.onHScrollCommon(kf.Container)}};i.prototype.scrollGridIfNeeded=function(){var t=this.scrollTop!=this.nextScrollTop;if(t){this.scrollTop=this.nextScrollTop;this.redrawRowsAfterScroll()}return t};i.prototype.setHorizontalScrollPosition=function(t,i){if(i===void 0){i=false}var n=0;var r=this.centerRowContainerCtrl.getViewportElement().scrollWidth-this.centerRowContainerCtrl.getCenterWidth();if(!i&&this.shouldBlockScrollUpdate(Ff.Horizontal,t)){if(this.enableRtl&&Jr()){t=t>0?0:r}else{t=Math.min(Math.max(t,n),r)}}$r(this.centerRowContainerCtrl.getViewportElement(),Math.abs(t),this.enableRtl);this.doHorizontalScroll(t)};i.prototype.setVerticalScrollPosition=function(t){this.eBodyViewport.scrollTop=t};i.prototype.getVScrollPosition=function(){var t={top:this.eBodyViewport.scrollTop,bottom:this.eBodyViewport.scrollTop+this.eBodyViewport.offsetHeight};return t};i.prototype.getHScrollPosition=function(){return this.centerRowContainerCtrl.getHScrollPosition()};i.prototype.isHorizontalScrollShowing=function(){return this.centerRowContainerCtrl.isHorizontalScrollShowing()};i.prototype.scrollHorizontally=function(t){var i=this.centerRowContainerCtrl.getViewportElement().scrollLeft;this.setHorizontalScrollPosition(i+t);return this.centerRowContainerCtrl.getViewportElement().scrollLeft-i};i.prototype.scrollToTop=function(){this.eBodyViewport.scrollTop=0};i.prototype.ensureNodeVisible=function(t,i){if(i===void 0){i=null}var n=this.rowModel.getRowCount();var r=-1;for(var e=0;e<n;e++){var s=this.rowModel.getRow(e);if(typeof t==="function"){var o=t;if(s&&o(s)){r=e;break}}else{if(t===s||t===s.data){r=e;break}}}if(r>=0){this.ensureIndexVisible(r,i)}};i.prototype.ensureIndexVisible=function(t,i){if(this.gridOptionsService.isDomLayout("print")){return}var n=this.paginationProxy.getRowCount();if(typeof t!=="number"||t<0||t>=n){console.warn("AG Grid: Invalid row index for ensureIndexVisible: "+t);return}var r=this.gridOptionsService.is("pagination");var e=r&&!this.gridOptionsService.is("suppressPaginationPanel");if(!e){this.paginationProxy.goToPageWithIndex(t)}var s=this.ctrlsService.getGridBodyCtrl();var o=s.getStickyTopHeight();var u=this.paginationProxy.getRow(t);var a;do{var f=u.rowTop;var h=u.rowHeight;var c=this.paginationProxy.getPixelOffset();var l=u.rowTop-c;var v=l+u.rowHeight;var d=this.getVScrollPosition();var p=this.heightScaler.getDivStretchOffset();var g=d.top+p;var b=d.bottom+p;var w=b-g;var y=this.heightScaler.getScrollPositionForPixel(l);var m=this.heightScaler.getScrollPositionForPixel(v-w);var S=Math.min((y+m)/2,l);var C=g+o>l;var O=b<v;var j=null;if(i==="top"){j=y}else if(i==="bottom"){j=m}else if(i==="middle"){j=S}else if(C){j=y-o}else if(O){j=m}if(j!==null){this.setVerticalScrollPosition(j);this.rowRenderer.redraw({afterScroll:true})}a=f!==u.rowTop||h!==u.rowHeight}while(a);this.animationFrameService.flushAllFrames()};i.prototype.ensureColumnVisible=function(t,i){if(i===void 0){i="auto"}var n=this.columnModel.getGridColumn(t);if(!n){return}if(n.isPinned()){return}if(!this.columnModel.isColumnDisplayed(n)){return}var r=this.getPositionedHorizontalScroll(n,i);if(r!==null){this.centerRowContainerCtrl.setCenterViewportScrollLeft(r)}this.centerRowContainerCtrl.onHorizontalViewportChanged();this.animationFrameService.flushAllFrames()};i.prototype.getPositionedHorizontalScroll=function(t,i){var n=this.isColumnOutsideViewport(t),r=n.columnBeforeStart,e=n.columnAfterEnd;var s=this.centerRowContainerCtrl.getCenterWidth()<t.getActualWidth();var o=this.centerRowContainerCtrl.getCenterWidth();var u=this.enableRtl;var a=(u?r:e)||s;var f=u?e:r;if(i!=="auto"){a=i==="start";f=i==="end"}var h=i==="middle";if(a||f||h){var c=this.getColumnBounds(t),l=c.colLeft,v=c.colMiddle,d=c.colRight;if(h){return v-o/2}if(a){return u?d:l}return u?l-o:d-o}return null};i.prototype.isColumnOutsideViewport=function(t){var i=this.getViewportBounds(),n=i.start,r=i.end;var e=this.getColumnBounds(t),s=e.colLeft,o=e.colRight;var u=this.enableRtl;var a=u?n>o:r<o;var f=u?r<s:n>s;return{columnBeforeStart:a,columnAfterEnd:f}};i.prototype.getColumnBounds=function(t){var i=this.enableRtl;var n=this.columnModel.getBodyContainerWidth();var r=t.getActualWidth();var e=t.getLeft();var s=i?-1:1;var o=i?n-e:e;var u=o+r*s;var a=o+r/2*s;return{colLeft:o,colMiddle:a,colRight:u}};i.prototype.getViewportBounds=function(){var t=this.centerRowContainerCtrl.getCenterWidth();var i=this.centerRowContainerCtrl.getCenterViewportScrollLeft();var n=i;var r=t+i;return{start:n,end:r,width:t}};Af([ut("ctrlsService")],i.prototype,"ctrlsService",void 0);Af([ut("animationFrameService")],i.prototype,"animationFrameService",void 0);Af([ut("paginationProxy")],i.prototype,"paginationProxy",void 0);Af([ut("rowModel")],i.prototype,"rowModel",void 0);Af([ut("rowContainerHeightService")],i.prototype,"heightScaler",void 0);Af([ut("rowRenderer")],i.prototype,"rowRenderer",void 0);Af([ut("columnModel")],i.prototype,"columnModel",void 0);Af([et],i.prototype,"postConstruct",null);return i}(ri);var Mf=function(){var t=function(i,n){t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var n in i)if(Object.prototype.hasOwnProperty.call(i,n))t[n]=i[n]};return t(i,n)};return function(i,n){if(typeof n!=="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(i,n);function r(){this.constructor=i}i.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}();var Df=function(){Df=Object.assign||function(t){for(var i,n=1,r=arguments.length;n<r;n++){i=arguments[n];for(var e in i)if(Object.prototype.hasOwnProperty.call(i,e))t[e]=i[e]}return t};return Df.apply(this,arguments)};var Gf=function(t,i,n,r){var e=arguments.length,s=e<3?i:r===null?r=Object.getOwnPropertyDescriptor(i,n):r,o;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")s=Reflect.decorate(t,i,n,r);else for(var u=t.length-1;u>=0;u--)if(o=t[u])s=(e<3?o(s):e>3?o(i,n,s):o(i,n))||s;return e>3&&s&&Object.defineProperty(i,n,s),s};var Pf=function(t,i){var n=typeof Symbol==="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),e,s=[],o;try{while((i===void 0||i-- >0)&&!(e=r.next()).done)s.push(e.value)}catch(t){o={error:t}}finally{try{if(e&&!e.done&&(n=r["return"]))n.call(r)}finally{if(o)throw o.error}}return s};var Ef=function(t,i){for(var n=0,r=i.length,e=t.length;n<r;n++,e++)t[e]=i[n];return t};var If=function(t){Mf(i,t);function i(i){var n=t.call(this)||this;n.isMultiRowDrag=false;n.isGridSorted=false;n.isGridFiltered=false;n.isRowGroupActive=false;n.eContainer=i;return n}i.prototype.postConstruct=function(){var t=this;if(this.gridOptionsService.isRowModelType("clientSide")){this.clientSideRowModel=this.rowModel}var i=function(){t.onSortChanged();t.onFilterChanged();t.onRowGroupChanged()};this.addManagedListener(this.eventService,hi.EVENT_SORT_CHANGED,this.onSortChanged.bind(this));this.addManagedListener(this.eventService,hi.EVENT_FILTER_CHANGED,this.onFilterChanged.bind(this));this.addManagedListener(this.eventService,hi.EVENT_COLUMN_ROW_GROUP_CHANGED,this.onRowGroupChanged.bind(this));this.addManagedListener(this.eventService,hi.EVENT_MODEL_UPDATED,(function(){i()}));i();this.ctrlsService.whenReady((function(){var i=t.ctrlsService.getGridBodyCtrl();t.autoScrollService=new tf({scrollContainer:i.getBodyViewportElement(),scrollAxis:"y",getVerticalPosition:function(){return i.getScrollFeature().getVScrollPosition().top},setVerticalPosition:function(t){return i.getScrollFeature().setVerticalScrollPosition(t)},onScrollCallback:function(){t.onDragging(t.lastDraggingEvent)}})}))};i.prototype.onSortChanged=function(){this.isGridSorted=this.sortController.isSortActive()};i.prototype.onFilterChanged=function(){this.isGridFiltered=this.filterManager.isAnyFilterPresent()};i.prototype.onRowGroupChanged=function(){var t=this.columnModel.getRowGroupColumns();this.isRowGroupActive=!r(t)};i.prototype.getContainer=function(){return this.eContainer};i.prototype.isInterestedIn=function(t){return t===Eu.RowDrag};i.prototype.getIconName=function(){var t=this.gridOptionsService.is("rowDragManaged");if(t&&this.shouldPreventRowMove()){return Hu.ICON_NOT_ALLOWED}return Hu.ICON_MOVE};i.prototype.shouldPreventRowMove=function(){return this.isGridSorted||this.isGridFiltered||this.isRowGroupActive};i.prototype.getRowNodes=function(t){var i=this;if(!this.isFromThisGrid(t)){return t.dragItem.rowNodes||[]}var n=this.gridOptionsService.is("rowDragMultiRow");var r=Ef([],Pf(this.selectionService.getSelectedNodes())).sort((function(t,n){if(t.rowIndex==null||n.rowIndex==null){return 0}return i.getRowIndexNumber(t)-i.getRowIndexNumber(n)}));var e=t.dragItem.rowNode;if(n&&r.indexOf(e)!==-1){this.isMultiRowDrag=true;return r}this.isMultiRowDrag=false;return[e]};i.prototype.onDragEnter=function(t){t.dragItem.rowNodes=this.getRowNodes(t);this.dispatchGridEvent(hi.EVENT_ROW_DRAG_ENTER,t);this.getRowNodes(t).forEach((function(t){t.setDragging(true)}));this.onEnterOrDragging(t)};i.prototype.onDragging=function(t){this.onEnterOrDragging(t)};i.prototype.isFromThisGrid=function(t){var i=t.dragSource.dragSourceDomDataKey;return i===this.gridOptionsService.getDomDataKey()};i.prototype.isDropZoneWithinThisGrid=function(t){var i=this.ctrlsService.getGridBodyCtrl();var n=i.getGui();var r=t.dropZoneTarget;return!n.contains(r)};i.prototype.onEnterOrDragging=function(t){this.dispatchGridEvent(hi.EVENT_ROW_DRAG_MOVE,t);this.lastDraggingEvent=t;var i=this.mouseEventService.getNormalisedPosition(t).y;var n=this.gridOptionsService.is("rowDragManaged");if(n){this.doManagedDrag(t,i)}this.autoScrollService.check(t.event)};i.prototype.doManagedDrag=function(t,i){var n=this.isFromThisGrid(t);var r=this.gridOptionsService.is("rowDragManaged");var e=t.dragItem.rowNodes;if(r&&this.shouldPreventRowMove()){return}if(this.gridOptionsService.is("suppressMoveWhenRowDragging")||!n){if(!this.isDropZoneWithinThisGrid(t)){this.clientSideRowModel.highlightRowAtPixel(e[0],i)}}else{this.moveRows(e,i)}};i.prototype.getRowIndexNumber=function(t){return parseInt(xt(t.getRowIndexString().split("-")),10)};i.prototype.moveRowAndClearHighlight=function(t){var i=this;var n=this.clientSideRowModel.getLastHighlightedRowNode();var r=n&&n.highlighted===sf.Below;var e=this.mouseEventService.getNormalisedPosition(t).y;var s=t.dragItem.rowNodes;var o=r?1:0;if(this.isFromThisGrid(t)){s.forEach((function(t){if(t.rowTop<e){o-=1}}));this.moveRows(s,e,o)}else{var u=this.gridOptionsService.getCallback("getRowId");var a=this.clientSideRowModel.getRowIndexAtPixel(e)+1;if(this.clientSideRowModel.getHighlightPosition(e)===sf.Above){a--}this.clientSideRowModel.updateRowData({add:s.map((function(t){return t.data})).filter((function(t){return!i.clientSideRowModel.getRowNode(u?u({data:t,level:0}):t.id)})),addIndex:a})}this.clearRowHighlight()};i.prototype.clearRowHighlight=function(){this.clientSideRowModel.highlightRowAtPixel(null)};i.prototype.moveRows=function(t,i,n){if(n===void 0){n=0}var r=this.clientSideRowModel.ensureRowsAtPixel(t,i,n);if(r){this.focusService.clearFocusedCell();if(this.rangeService){this.rangeService.removeAllCellRanges()}}};i.prototype.addRowDropZone=function(t){var i=this;if(!t.getContainer()){P((function(){return console.warn("AG Grid: addRowDropZone - A container target needs to be provided")}),"add-drop-zone-empty-target");return}if(this.dragAndDropService.findExternalZone(t)){console.warn("AG Grid: addRowDropZone - target already exists in the list of DropZones. Use `removeRowDropZone` before adding it again.");return}var n={getContainer:t.getContainer};if(t.fromGrid){t.fromGrid=undefined;n=t}else{if(t.onDragEnter){n.onDragEnter=function(n){t.onDragEnter(i.draggingToRowDragEvent(hi.EVENT_ROW_DRAG_ENTER,n))}}if(t.onDragLeave){n.onDragLeave=function(n){t.onDragLeave(i.draggingToRowDragEvent(hi.EVENT_ROW_DRAG_LEAVE,n))}}if(t.onDragging){n.onDragging=function(n){t.onDragging(i.draggingToRowDragEvent(hi.EVENT_ROW_DRAG_MOVE,n))}}if(t.onDragStop){n.onDragStop=function(n){t.onDragStop(i.draggingToRowDragEvent(hi.EVENT_ROW_DRAG_END,n))}}}this.dragAndDropService.addDropTarget(Df({isInterestedIn:function(t){return t===Eu.RowDrag},getIconName:function(){return Hu.ICON_MOVE},external:true},n))};i.prototype.getRowDropZone=function(t){var i=this;var n=this.getContainer.bind(this);var r=this.onDragEnter.bind(this);var e=this.onDragLeave.bind(this);var s=this.onDragging.bind(this);var o=this.onDragStop.bind(this);if(!t){return{getContainer:n,onDragEnter:r,onDragLeave:e,onDragging:s,onDragStop:o,fromGrid:true}}return{getContainer:n,onDragEnter:t.onDragEnter?function(n){r(n);t.onDragEnter(i.draggingToRowDragEvent(hi.EVENT_ROW_DRAG_ENTER,n))}:r,onDragLeave:t.onDragLeave?function(n){e(n);t.onDragLeave(i.draggingToRowDragEvent(hi.EVENT_ROW_DRAG_LEAVE,n))}:e,onDragging:t.onDragging?function(n){s(n);t.onDragging(i.draggingToRowDragEvent(hi.EVENT_ROW_DRAG_MOVE,n))}:s,onDragStop:t.onDragStop?function(n){o(n);t.onDragStop(i.draggingToRowDragEvent(hi.EVENT_ROW_DRAG_END,n))}:o,fromGrid:true}};i.prototype.draggingToRowDragEvent=function(t,i){var n=this.mouseEventService.getNormalisedPosition(i).y;var r=n>this.paginationProxy.getCurrentPageHeight();var e=-1;var s;if(!r){e=this.rowModel.getRowIndexAtPixel(n);s=this.rowModel.getRow(e)}var o;switch(i.vDirection){case Iu.Down:o="down";break;case Iu.Up:o="up";break;default:o=null;break}var u={type:t,api:this.gridOptionsService.api,columnApi:this.gridOptionsService.columnApi,context:this.gridOptionsService.context,event:i.event,node:i.dragItem.rowNode,nodes:i.dragItem.rowNodes,overIndex:e,overNode:s,y:n,vDirection:o};return u};i.prototype.dispatchGridEvent=function(t,i){var n=this.draggingToRowDragEvent(t,i);this.eventService.dispatchEvent(n)};i.prototype.onDragLeave=function(t){this.dispatchGridEvent(hi.EVENT_ROW_DRAG_LEAVE,t);this.stopDragging(t);if(this.gridOptionsService.is("rowDragManaged")){this.clearRowHighlight()}if(this.isFromThisGrid(t)){this.isMultiRowDrag=false}};i.prototype.onDragStop=function(t){this.dispatchGridEvent(hi.EVENT_ROW_DRAG_END,t);this.stopDragging(t);if(this.gridOptionsService.is("rowDragManaged")&&(this.gridOptionsService.is("suppressMoveWhenRowDragging")||!this.isFromThisGrid(t))&&!this.isDropZoneWithinThisGrid(t)){this.moveRowAndClearHighlight(t)}};i.prototype.stopDragging=function(t){this.autoScrollService.ensureCleared();this.getRowNodes(t).forEach((function(t){t.setDragging(false)}))};Gf([ut("dragAndDropService")],i.prototype,"dragAndDropService",void 0);Gf([ut("rowModel")],i.prototype,"rowModel",void 0);Gf([ut("paginationProxy")],i.prototype,"paginationProxy",void 0);Gf([ut("columnModel")],i.prototype,"columnModel",void 0);Gf([ut("focusService")],i.prototype,"focusService",void 0);Gf([ut("sortController")],i.prototype,"sortController",void 0);Gf([ut("filterManager")],i.prototype,"filterManager",void 0);Gf([ut("selectionService")],i.prototype,"selectionService",void 0);Gf([ut("mouseEventService")],i.prototype,"mouseEventService",void 0);Gf([ut("ctrlsService")],i.prototype,"ctrlsService",void 0);Gf([at("rangeService")],i.prototype,"rangeService",void 0);Gf([et],i.prototype,"postConstruct",null);return i}(ri);var Nf=function(){var t=function(i,n){t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var n in i)if(Object.prototype.hasOwnProperty.call(i,n))t[n]=i[n]};return t(i,n)};return function(i,n){if(typeof n!=="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(i,n);function r(){this.constructor=i}i.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}();var Hf=function(t,i,n,r){var e=arguments.length,s=e<3?i:r===null?r=Object.getOwnPropertyDescriptor(i,n):r,o;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")s=Reflect.decorate(t,i,n,r);else for(var u=t.length-1;u>=0;u--)if(o=t[u])s=(e<3?o(s):e>3?o(i,n,s):o(i,n))||s;return e>3&&s&&Object.defineProperty(i,n,s),s};var Lf;(function(t){t["ANIMATION_ON"]="ag-row-animation";t["ANIMATION_OFF"]="ag-row-no-animation"})(Lf||(Lf={}));var Vf="ag-force-vertical-scroll";var Bf="ag-selectable";var zf="ag-column-moving";var Wf=function(t){Nf(i,t);function i(){var i=t!==null&&t.apply(this,arguments)||this;i.stickyTopHeight=0;return i}i.prototype.getScrollFeature=function(){return this.bodyScrollFeature};i.prototype.getBodyViewportElement=function(){return this.eBodyViewport};i.prototype.setComp=function(t,i,n,r,e,s){this.comp=t;this.eGridBody=i;this.eBodyViewport=n;this.eTop=r;this.eBottom=e;this.eStickyTop=s;this.setCellTextSelection(this.gridOptionsService.is("enableCellTextSelection"));this.createManagedBean(new Rf(this.comp));this.bodyScrollFeature=this.createManagedBean(new Tf(this.eBodyViewport));this.addRowDragListener();this.setupRowAnimationCssClass();this.addEventListeners();this.addFocusListeners([r,n,e,s]);this.onGridColumnsChanged();this.addBodyViewportListener();this.setFloatingHeights();this.disableBrowserDragging();this.addStopEditingWhenGridLosesFocus();this.filterManager.setupAdvancedFilterHeaderComp(r);this.ctrlsService.registerGridBodyCtrl(this)};i.prototype.getComp=function(){return this.comp};i.prototype.addEventListeners=function(){this.addManagedListener(this.eventService,hi.EVENT_GRID_COLUMNS_CHANGED,this.onGridColumnsChanged.bind(this));this.addManagedListener(this.eventService,hi.EVENT_SCROLL_VISIBILITY_CHANGED,this.onScrollVisibilityChanged.bind(this));this.addManagedListener(this.eventService,hi.EVENT_PINNED_ROW_DATA_CHANGED,this.onPinnedRowDataChanged.bind(this));this.addManagedListener(this.eventService,hi.EVENT_HEADER_HEIGHT_CHANGED,this.onHeaderHeightChanged.bind(this))};i.prototype.addFocusListeners=function(t){var i=this;t.forEach((function(t){i.addManagedListener(t,"focusin",(function(i){var n=i.target;var r=zr(n,"ag-root",t);t.classList.toggle("ag-has-focus",!r)}));i.addManagedListener(t,"focusout",(function(i){var n=i.target,r=i.relatedTarget;var e=t.contains(r);var s=zr(r,"ag-root",t);var o=zr(n,"ag-root",t);if(o){return}if(!e||s){t.classList.remove("ag-has-focus")}}))}))};i.prototype.setColumnMovingCss=function(t){this.comp.setColumnMovingCss(zf,t)};i.prototype.setCellTextSelection=function(t){if(t===void 0){t=false}this.comp.setCellSelectableCss(Bf,t)};i.prototype.onScrollVisibilityChanged=function(){var t=this;var i=this.scrollVisibleService.isVerticalScrollShowing();this.setVerticalScrollPaddingVisible(i);this.setStickyTopWidth(i);var n=i?this.gridOptionsService.getScrollbarWidth()||0:0;var r=pr()?16:0;var e="calc(100% + "+(n+r)+"px)";this.animationFrameService.requestAnimationFrame((function(){return t.comp.setBodyViewportWidth(e)}))};i.prototype.onGridColumnsChanged=function(){var t=this.columnModel.getAllGridColumns();this.comp.setColumnCount(t?t.length:0)};i.prototype.disableBrowserDragging=function(){this.addManagedListener(this.eGridBody,"dragstart",(function(t){if(t.target instanceof HTMLImageElement){t.preventDefault();return false}}))};i.prototype.addStopEditingWhenGridLosesFocus=function(){var t=this;if(!this.gridOptionsService.is("stopEditingWhenCellsLoseFocus")){return}var i=function(i){var r=i.relatedTarget;if(fr(r)===null){t.rowRenderer.stopEditing();return}var e=n.some((function(t){return t.contains(r)}))&&t.mouseEventService.isElementInThisGrid(r);if(!e){var s=t.popupService;e=s.getActivePopups().some((function(t){return t.contains(r)}))||s.isElementWithinCustomPopup(r)}if(!e){t.rowRenderer.stopEditing()}};var n=[this.eBodyViewport,this.eBottom,this.eTop,this.eStickyTop];n.forEach((function(n){return t.addManagedListener(n,"focusout",i)}))};i.prototype.updateRowCount=function(){var t=this.headerNavigationService.getHeaderRowCount()+this.filterManager.getHeaderRowCount();var i=this.rowModel.isLastRowIndexKnown()?this.rowModel.getRowCount():-1;var n=i===-1?-1:t+i;this.comp.setRowCount(n)};i.prototype.registerBodyViewportResizeListener=function(t){this.comp.registerBodyViewportResizeListener(t)};i.prototype.setVerticalScrollPaddingVisible=function(t){var i=t?"scroll":"hidden";this.comp.setPinnedTopBottomOverflowY(i)};i.prototype.isVerticalScrollShowing=function(){var t=this.gridOptionsService.is("alwaysShowVerticalScroll");var i=t?Vf:null;var n=this.gridOptionsService.isDomLayout("normal");this.comp.setAlwaysVerticalScrollClass(i,t);return t||n&&de(this.eBodyViewport)};i.prototype.setupRowAnimationCssClass=function(){var t=this;var i=function(){var i=t.gridOptionsService.isAnimateRows()&&!t.rowContainerHeightService.isStretching();var n=i?Lf.ANIMATION_ON:Lf.ANIMATION_OFF;t.comp.setRowAnimationCssOnBodyViewport(n,i)};i();this.addManagedListener(this.eventService,hi.EVENT_HEIGHT_SCALE_CHANGED,i);this.addManagedPropertyListener("animateRows",i)};i.prototype.getGridBodyElement=function(){return this.eGridBody};i.prototype.addBodyViewportListener=function(){var t=this.onBodyViewportContextMenu.bind(this);this.addManagedListener(this.eBodyViewport,"contextmenu",t);this.mockContextMenuForIPad(t);this.addManagedListener(this.eBodyViewport,"wheel",this.onBodyViewportWheel.bind(this));this.addManagedListener(this.eStickyTop,"wheel",this.onStickyTopWheel.bind(this));this.addFullWidthContainerWheelListener()};i.prototype.addFullWidthContainerWheelListener=function(){var t=this;var i=this.eBodyViewport.querySelector(".ag-full-width-container");var n=this.eBodyViewport.querySelector(".ag-center-cols-viewport");if(i&&n){this.addManagedListener(i,"wheel",(function(i){return t.onFullWidthContainerWheel(i,n)}))}};i.prototype.onFullWidthContainerWheel=function(t,i){if(!t.deltaX||Math.abs(t.deltaY)>Math.abs(t.deltaX)||!this.mouseEventService.isEventFromThisGrid(t)){return}t.preventDefault();i.scrollBy({left:t.deltaX})};i.prototype.onBodyViewportContextMenu=function(t,i,n){if(!t&&!n){return}if(this.gridOptionsService.is("preventDefaultOnContextMenu")){var r=t||n;r.preventDefault()}var e=(t||i).target;if(e===this.eBodyViewport||e===this.ctrlsService.getCenterRowContainerCtrl().getViewportElement()){if(!this.contextMenuFactory){return}if(t){this.contextMenuFactory.onContextMenu(t,null,null,null,null,this.eGridBody)}else if(n){this.contextMenuFactory.onContextMenu(null,n,null,null,null,this.eGridBody)}}};i.prototype.mockContextMenuForIPad=function(t){if(!ur()){return}var i=new Qo(this.eBodyViewport);var n=function(i){t(undefined,i.touchStart,i.touchEvent)};this.addManagedListener(i,Qo.EVENT_LONG_TAP,n);this.addDestroyFunc((function(){return i.destroy()}))};i.prototype.onBodyViewportWheel=function(t){if(!this.gridOptionsService.is("suppressScrollWhenPopupsAreOpen")){return}if(this.popupService.hasAnchoredPopup()){t.preventDefault()}};i.prototype.onStickyTopWheel=function(t){t.preventDefault();if(t.offsetY){this.scrollVertically(t.deltaY)}};i.prototype.getGui=function(){return this.eGridBody};i.prototype.scrollVertically=function(t){var i=this.eBodyViewport.scrollTop;this.bodyScrollFeature.setVerticalScrollPosition(i+t);return this.eBodyViewport.scrollTop-i};i.prototype.addRowDragListener=function(){this.rowDragFeature=this.createManagedBean(new If(this.eBodyViewport));this.dragAndDropService.addDropTarget(this.rowDragFeature)};i.prototype.getRowDragFeature=function(){return this.rowDragFeature};i.prototype.onPinnedRowDataChanged=function(){this.setFloatingHeights()};i.prototype.setFloatingHeights=function(){var t=this.pinnedRowModel;var i=t.getPinnedTopTotalHeight();if(i){i+=1}var n=t.getPinnedBottomTotalHeight();if(n){n+=1}this.comp.setTopHeight(i);this.comp.setBottomHeight(n);this.comp.setTopDisplay(i?"inherit":"none");this.comp.setBottomDisplay(n?"inherit":"none");this.setStickyTopOffsetTop()};i.prototype.setStickyTopHeight=function(t){if(t===void 0){t=0}this.comp.setStickyTopHeight(t+"px");this.stickyTopHeight=t};i.prototype.getStickyTopHeight=function(){return this.stickyTopHeight};i.prototype.setStickyTopWidth=function(t){if(!t){this.comp.setStickyTopWidth("100%")}else{var i=this.gridOptionsService.getScrollbarWidth();this.comp.setStickyTopWidth("calc(100% - "+i+"px)")}};i.prototype.onHeaderHeightChanged=function(){this.setStickyTopOffsetTop()};i.prototype.setStickyTopOffsetTop=function(){var t=this.ctrlsService.getGridHeaderCtrl();var i=t.getHeaderHeight()+this.filterManager.getHeaderHeight();var n=this.pinnedRowModel.getPinnedTopTotalHeight();var r=0;if(i>0){r+=i+1}if(n>0){r+=n+1}this.comp.setStickyTopTop(r+"px")};i.prototype.sizeColumnsToFit=function(t,i){var n=this;var r=this.isVerticalScrollShowing();var e=r?this.gridOptionsService.getScrollbarWidth():0;var s=Kr(this.eGridBody);var o=s-e;if(o>0){this.columnModel.sizeColumnsToFit(o,"sizeColumnsToFit",false,t);return}if(i===undefined){window.setTimeout((function(){n.sizeColumnsToFit(t,100)}),0)}else if(i===100){window.setTimeout((function(){n.sizeColumnsToFit(t,500)}),100)}else if(i===500){window.setTimeout((function(){n.sizeColumnsToFit(t,-1)}),500)}else{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?")}};i.prototype.addScrollEventListener=function(t){this.eBodyViewport.addEventListener("scroll",t,{passive:true})};i.prototype.removeScrollEventListener=function(t){this.eBodyViewport.removeEventListener("scroll",t)};Hf([ut("animationFrameService")],i.prototype,"animationFrameService",void 0);Hf([ut("rowContainerHeightService")],i.prototype,"rowContainerHeightService",void 0);Hf([ut("ctrlsService")],i.prototype,"ctrlsService",void 0);Hf([ut("columnModel")],i.prototype,"columnModel",void 0);Hf([ut("scrollVisibleService")],i.prototype,"scrollVisibleService",void 0);Hf([at("contextMenuFactory")],i.prototype,"contextMenuFactory",void 0);Hf([ut("headerNavigationService")],i.prototype,"headerNavigationService",void 0);Hf([ut("dragAndDropService")],i.prototype,"dragAndDropService",void 0);Hf([ut("pinnedRowModel")],i.prototype,"pinnedRowModel",void 0);Hf([ut("rowRenderer")],i.prototype,"rowRenderer",void 0);Hf([ut("popupService")],i.prototype,"popupService",void 0);Hf([ut("mouseEventService")],i.prototype,"mouseEventService",void 0);Hf([ut("rowModel")],i.prototype,"rowModel",void 0);Hf([ut("filterManager")],i.prototype,"filterManager",void 0);return i}(ri);var Uf;(function(t){t[t["FILL"]=0]="FILL";t[t["RANGE"]=1]="RANGE"})(Uf||(Uf={}));var Kf;(function(t){t[t["VALUE"]=0]="VALUE";t[t["DIMENSION"]=1]="DIMENSION"})(Kf||(Kf={}));var qf="ag-cell-range-selected";var Yf="ag-cell-range-chart";var Qf="ag-cell-range-single-cell";var Jf="ag-cell-range-chart-category";var Zf="ag-cell-range-handle";var $f="ag-cell-range-top";var Xf="ag-cell-range-right";var th="ag-cell-range-bottom";var ih="ag-cell-range-left";var nh=function(){function t(t,i){this.beans=t;this.cellCtrl=i}t.prototype.setComp=function(t,i){this.cellComp=t;this.eGui=i;this.onRangeSelectionChanged()};t.prototype.onRangeSelectionChanged=function(){if(!this.cellComp){return}this.rangeCount=this.beans.rangeService.getCellRangeCount(this.cellCtrl.getCellPosition());this.hasChartRange=this.getHasChartRange();this.cellComp.addOrRemoveCssClass(qf,this.rangeCount!==0);this.cellComp.addOrRemoveCssClass(qf+"-1",this.rangeCount===1);this.cellComp.addOrRemoveCssClass(qf+"-2",this.rangeCount===2);this.cellComp.addOrRemoveCssClass(qf+"-3",this.rangeCount===3);this.cellComp.addOrRemoveCssClass(qf+"-4",this.rangeCount>=4);this.cellComp.addOrRemoveCssClass(Yf,this.hasChartRange);zn(this.eGui,this.rangeCount>0?true:undefined);this.cellComp.addOrRemoveCssClass(Qf,this.isSingleCell());this.updateRangeBorders();this.refreshHandle()};t.prototype.updateRangeBorders=function(){var t=this.getRangeBorders();var i=this.isSingleCell();var n=!i&&t.top;var r=!i&&t.right;var e=!i&&t.bottom;var s=!i&&t.left;this.cellComp.addOrRemoveCssClass($f,n);this.cellComp.addOrRemoveCssClass(Xf,r);this.cellComp.addOrRemoveCssClass(th,e);this.cellComp.addOrRemoveCssClass(ih,s)};t.prototype.isSingleCell=function(){var t=this.beans.rangeService;return this.rangeCount===1&&t&&!t.isMoreThanOneCell()};t.prototype.getHasChartRange=function(){var t=this.beans.rangeService;if(!this.rangeCount||!t){return false}var i=t.getCellRanges();return i.length>0&&i.every((function(t){return Nt([Kf.DIMENSION,Kf.VALUE],t.type)}))};t.prototype.updateRangeBordersIfRangeCount=function(){if(this.rangeCount>0){this.updateRangeBorders();this.refreshHandle()}};t.prototype.getRangeBorders=function(){var t=this;var i=this.beans.gridOptionsService.is("enableRtl");var n=false;var r=false;var e=false;var s=false;var o=this.cellCtrl.getCellPosition().column;var u=this.beans,a=u.rangeService,f=u.columnModel;var h;var c;if(i){h=f.getDisplayedColAfter(o);c=f.getDisplayedColBefore(o)}else{h=f.getDisplayedColBefore(o);c=f.getDisplayedColAfter(o)}var l=a.getCellRanges().filter((function(i){return a.isCellInSpecificRange(t.cellCtrl.getCellPosition(),i)}));if(!h){s=true}if(!c){r=true}for(var v=0;v<l.length;v++){if(n&&r&&e&&s){break}var d=l[v];var p=a.getRangeStartRow(d);var g=a.getRangeEndRow(d);if(!n&&this.beans.rowPositionUtils.sameRow(p,this.cellCtrl.getCellPosition())){n=true}if(!e&&this.beans.rowPositionUtils.sameRow(g,this.cellCtrl.getCellPosition())){e=true}if(!s&&h&&d.columns.indexOf(h)<0){s=true}if(!r&&c&&d.columns.indexOf(c)<0){r=true}}return{top:n,right:r,bottom:e,left:s}};t.prototype.refreshHandle=function(){if(!this.beans.rangeService){return}var t=this.shouldHaveSelectionHandle();if(this.selectionHandle&&!t){this.selectionHandle=this.beans.context.destroyBean(this.selectionHandle)}if(t){this.addSelectionHandle()}this.cellComp.addOrRemoveCssClass(Zf,!!this.selectionHandle)};t.prototype.shouldHaveSelectionHandle=function(){var t=this.beans,i=t.gridOptionsService,n=t.rangeService;var r=n.getCellRanges();var e=r.length;if(this.rangeCount<1||e<1){return false}var s=xt(r);var o=this.cellCtrl.getCellPosition();var u=i.is("enableFillHandle")&&!this.cellCtrl.isSuppressFillHandle();var a=i.is("enableRangeHandle");var f=e===1&&!this.cellCtrl.isEditing()&&(u||a);if(this.hasChartRange){var h=r[0].type===Kf.DIMENSION;var c=h&&n.isCellInSpecificRange(o,r[0]);this.cellComp.addOrRemoveCssClass(Jf,c);f=s.type===Kf.VALUE}return f&&s.endRow!=null&&n.isContiguousRange(s)&&n.isBottomRightCell(s,o)};t.prototype.addSelectionHandle=function(){var t=this.beans,i=t.gridOptionsService,r=t.rangeService;var e=xt(r.getCellRanges()).type;var s=i.is("enableFillHandle")&&n(e);var o=s?Uf.FILL:Uf.RANGE;if(this.selectionHandle&&this.selectionHandle.getType()!==o){this.selectionHandle=this.beans.context.destroyBean(this.selectionHandle)}if(!this.selectionHandle){this.selectionHandle=this.beans.selectionHandleFactory.createSelectionHandle(o)}this.selectionHandle.refresh(this.cellCtrl)};t.prototype.destroy=function(){this.beans.context.destroyBean(this.selectionHandle)};return t}();var rh=function(){var t=function(i,n){t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var n in i)if(Object.prototype.hasOwnProperty.call(i,n))t[n]=i[n]};return t(i,n)};return function(i,n){if(typeof n!=="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(i,n);function r(){this.constructor=i}i.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}();var eh=function(t){rh(i,t);function i(i,n){var r=t.call(this)||this;r.cellCtrl=i;r.beans=n;r.column=i.getColumn();r.rowNode=i.getRowNode();r.setupColSpan();r.setupRowSpan();return r}i.prototype.setupRowSpan=function(){this.rowSpan=this.column.getRowSpan(this.rowNode)};i.prototype.setComp=function(t){this.eGui=t;this.onLeftChanged();this.onWidthChanged();this.applyRowSpan()};i.prototype.onDisplayColumnsChanged=function(){var t=this.getColSpanningList();if(!_t(this.colsSpanning,t)){this.colsSpanning=t;this.onWidthChanged();this.onLeftChanged()}};i.prototype.setupColSpan=function(){if(this.column.getColDef().colSpan==null){return}this.colsSpanning=this.getColSpanningList();this.addManagedListener(this.beans.eventService,hi.EVENT_DISPLAYED_COLUMNS_CHANGED,this.onDisplayColumnsChanged.bind(this));this.addManagedListener(this.beans.eventService,hi.EVENT_DISPLAYED_COLUMNS_WIDTH_CHANGED,this.onWidthChanged.bind(this))};i.prototype.onWidthChanged=function(){if(!this.eGui){return}var t=this.getCellWidth();this.eGui.style.width=t+"px"};i.prototype.getCellWidth=function(){if(!this.colsSpanning){return this.column.getActualWidth()}return this.colsSpanning.reduce((function(t,i){return t+i.getActualWidth()}),0)};i.prototype.getColSpanningList=function(){var t=this.column.getColSpan(this.rowNode);var i=[];if(t===1){i.push(this.column)}else{var r=this.column;var e=this.column.getPinned();for(var s=0;r&&s<t;s++){i.push(r);r=this.beans.columnModel.getDisplayedColAfter(r);if(!r||n(r)){break}if(e!==r.getPinned()){break}}}return i};i.prototype.onLeftChanged=function(){if(!this.eGui){return}var t=this.modifyLeftForPrintLayout(this.getCellLeft());this.eGui.style.left=t+"px"};i.prototype.getCellLeft=function(){var t;if(this.beans.gridOptionsService.is("enableRtl")&&this.colsSpanning){t=xt(this.colsSpanning)}else{t=this.column}return t.getLeft()};i.prototype.modifyLeftForPrintLayout=function(t){if(!this.cellCtrl.isPrintLayout()||this.column.getPinned()==="left"){return t}var i=this.beans.columnModel.getDisplayedColumnsLeftWidth();if(this.column.getPinned()==="right"){var n=this.beans.columnModel.getBodyContainerWidth();return i+n+(t||0)}return i+(t||0)};i.prototype.applyRowSpan=function(){if(this.rowSpan===1){return}var t=this.beans.gridOptionsService.getRowHeightAsNumber();var i=t*this.rowSpan;this.eGui.style.height=i+"px";this.eGui.style.zIndex="1"};i.prototype.destroy=function(){t.prototype.destroy.call(this)};return i}(ri);var sh=function(){var t=function(i,n){t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var n in i)if(Object.prototype.hasOwnProperty.call(i,n))t[n]=i[n]};return t(i,n)};return function(i,n){if(typeof n!=="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(i,n);function r(){this.constructor=i}i.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}();var oh=function(t){sh(i,t);function i(i,n){var r=t.call(this)||this;r.staticClasses=[];r.cellCtrl=i;r.beans=n;r.column=i.getColumn();r.rowNode=i.getRowNode();return r}i.prototype.setComp=function(t){this.cellComp=t;this.applyUserStyles();this.applyCellClassRules();this.applyClassesFromColDef()};i.prototype.applyCellClassRules=function(){var t=this;var i=this.column.getColDef();var n={value:this.cellCtrl.getValue(),data:this.rowNode.data,node:this.rowNode,colDef:i,column:this.column,rowIndex:this.rowNode.rowIndex,api:this.beans.gridOptionsService.api,columnApi:this.beans.gridOptionsService.columnApi,context:this.beans.gridOptionsService.context};this.beans.stylingService.processClassRules(i.cellClassRules,n,(function(i){return t.cellComp.addOrRemoveCssClass(i,true)}),(function(i){return t.cellComp.addOrRemoveCssClass(i,false)}))};i.prototype.applyUserStyles=function(){var t=this.column.getColDef();if(!t.cellStyle){return}var i;if(typeof t.cellStyle==="function"){var n={column:this.column,value:this.cellCtrl.getValue(),colDef:t,data:this.rowNode.data,node:this.rowNode,rowIndex:this.rowNode.rowIndex,api:this.beans.gridOptionsService.api,columnApi:this.beans.gridOptionsService.columnApi,context:this.beans.gridOptionsService.context};var r=t.cellStyle;i=r(n)}else{i=t.cellStyle}if(i){this.cellComp.setUserStyles(i)}};i.prototype.applyClassesFromColDef=function(){var t=this;var i=this.column.getColDef();var n={value:this.cellCtrl.getValue(),data:this.rowNode.data,node:this.rowNode,column:this.column,colDef:i,rowIndex:this.rowNode.rowIndex,api:this.beans.gridOptionsService.api,columnApi:this.beans.gridOptionsService.columnApi,context:this.beans.gridOptionsService.context};if(this.staticClasses.length){this.staticClasses.forEach((function(i){return t.cellComp.addOrRemoveCssClass(i,false)}))}this.staticClasses=this.beans.stylingService.getStaticCellClasses(i,n);if(this.staticClasses.length){this.staticClasses.forEach((function(i){return t.cellComp.addOrRemoveCssClass(i,true)}))}};i.prototype.destroy=function(){t.prototype.destroy.call(this)};return i}(ri);var uh=function(){var t=function(i,n){t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var n in i)if(Object.prototype.hasOwnProperty.call(i,n))t[n]=i[n]};return t(i,n)};return function(i,n){if(typeof n!=="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(i,n);function r(){this.constructor=i}i.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}();var ah=function(t){uh(i,t);function i(i,n){var r=t.call(this)||this;r.ctrl=i;r.beans=n;return r}i.prototype.setComp=function(t){this.eGui=t;this.setupTooltip()};i.prototype.setBrowserTooltip=function(t){var i="title";if(t!=null&&t!=""){this.eGui.setAttribute(i,t)}else{this.eGui.removeAttribute(i)}};i.prototype.setupTooltip=function(){this.browserTooltips=this.beans.gridOptionsService.is("enableBrowserTooltips");this.updateTooltipText();if(this.browserTooltips){this.setBrowserTooltip(this.tooltip)}else{this.createTooltipFeatureIfNeeded()}};i.prototype.updateTooltipText=function(){this.tooltip=this.ctrl.getTooltipValue()};i.prototype.createTooltipFeatureIfNeeded=function(){var t=this;var i,n,r,e;if(this.genericTooltipFeature!=null){return}var s={getTooltipParams:function(){return t.getTooltipParams()},getGui:function(){return t.ctrl.getGui()}};this.genericTooltipFeature=this.createManagedBean(new as(s,(n=(i=this.ctrl).getTooltipShowDelayOverride)===null||n===void 0?void 0:n.call(i),(e=(r=this.ctrl).getTooltipHideDelayOverride)===null||e===void 0?void 0:e.call(r)),this.beans.context)};i.prototype.refreshToolTip=function(){this.updateTooltipText();if(this.browserTooltips){this.setBrowserTooltip(this.tooltip)}};i.prototype.getTooltipParams=function(){var t=this;var i=this.ctrl;var n=i.getColumn?i.getColumn():undefined;var r=i.getColDef?i.getColDef():undefined;var e=i.getRowNode?i.getRowNode():undefined;return{location:i.getLocation(),colDef:r,column:n,rowIndex:i.getRowIndex?i.getRowIndex():undefined,node:e,data:e?e.data:undefined,value:this.getTooltipText(),valueFormatted:i.getValueFormatted?i.getValueFormatted():undefined,hideTooltipCallback:function(){return t.genericTooltipFeature.hideTooltip(true)}}};i.prototype.getTooltipText=function(){return this.tooltip};i.prototype.destroy=function(){t.prototype.destroy.call(this)};return i}(ri);var fh=function(t,i,n,r){var e=arguments.length,s=e<3?i:r===null?r=Object.getOwnPropertyDescriptor(i,n):r,o;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")s=Reflect.decorate(t,i,n,r);else for(var u=t.length-1;u>=0;u--)if(o=t[u])s=(e<3?o(s):e>3?o(i,n,s):o(i,n))||s;return e>3&&s&&Object.defineProperty(i,n,s),s};var hh=function(){function t(){}t.prototype.postConstruct=function(){this.doingMasterDetail=this.gridOptionsService.is("masterDetail");if(this.gridOptionsService.isRowModelType("clientSide")){this.clientSideRowModel=this.rowModel}if(this.gridOptionsService.isRowModelType("serverSide")){this.serverSideRowModel=this.rowModel}};fh([ut("resizeObserverService")],t.prototype,"resizeObserverService",void 0);fh([ut("paginationProxy")],t.prototype,"paginationProxy",void 0);fh([ut("context")],t.prototype,"context",void 0);fh([ut("columnApi")],t.prototype,"columnApi",void 0);fh([ut("gridApi")],t.prototype,"gridApi",void 0);fh([ut("gridOptionsService")],t.prototype,"gridOptionsService",void 0);fh([ut("expressionService")],t.prototype,"expressionService",void 0);fh([ut("environment")],t.prototype,"environment",void 0);fh([ut("rowRenderer")],t.prototype,"rowRenderer",void 0);fh([ut("templateService")],t.prototype,"templateService",void 0);fh([ut("valueService")],t.prototype,"valueService",void 0);fh([ut("eventService")],t.prototype,"eventService",void 0);fh([ut("columnModel")],t.prototype,"columnModel",void 0);fh([ut("headerNavigationService")],t.prototype,"headerNavigationService",void 0);fh([ut("navigationService")],t.prototype,"navigationService",void 0);fh([ut("columnAnimationService")],t.prototype,"columnAnimationService",void 0);fh([at("rangeService")],t.prototype,"rangeService",void 0);fh([ut("focusService")],t.prototype,"focusService",void 0);fh([at("contextMenuFactory")],t.prototype,"contextMenuFactory",void 0);fh([ut("popupService")],t.prototype,"popupService",void 0);fh([ut("valueFormatterService")],t.prototype,"valueFormatterService",void 0);fh([ut("stylingService")],t.prototype,"stylingService",void 0);fh([ut("columnHoverService")],t.prototype,"columnHoverService",void 0);fh([ut("userComponentFactory")],t.prototype,"userComponentFactory",void 0);fh([ut("userComponentRegistry")],t.prototype,"userComponentRegistry",void 0);fh([ut("animationFrameService")],t.prototype,"animationFrameService",void 0);fh([ut("dragService")],t.prototype,"dragService",void 0);fh([ut("dragAndDropService")],t.prototype,"dragAndDropService",void 0);fh([ut("sortController")],t.prototype,"sortController",void 0);fh([ut("filterManager")],t.prototype,"filterManager",void 0);fh([ut("rowContainerHeightService")],t.prototype,"rowContainerHeightService",void 0);fh([ut("frameworkOverrides")],t.prototype,"frameworkOverrides",void 0);fh([ut("cellPositionUtils")],t.prototype,"cellPositionUtils",void 0);fh([ut("rowPositionUtils")],t.prototype,"rowPositionUtils",void 0);fh([ut("selectionService")],t.prototype,"selectionService",void 0);fh([at("selectionHandleFactory")],t.prototype,"selectionHandleFactory",void 0);fh([ut("rowCssClassCalculator")],t.prototype,"rowCssClassCalculator",void 0);fh([ut("rowModel")],t.prototype,"rowModel",void 0);fh([ut("ctrlsService")],t.prototype,"ctrlsService",void 0);fh([ut("ctrlsFactory")],t.prototype,"ctrlsFactory",void 0);fh([ut("agStackComponentsRegistry")],t.prototype,"agStackComponentsRegistry",void 0);fh([ut("valueCache")],t.prototype,"valueCache",void 0);fh([ut("rowNodeEventThrottle")],t.prototype,"rowNodeEventThrottle",void 0);fh([ut("localeService")],t.prototype,"localeService",void 0);fh([ut("valueParserService")],t.prototype,"valueParserService",void 0);fh([et],t.prototype,"postConstruct",null);t=fh([ot("beans")],t);return t}();var ch=function(){var t=function(i,n){t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var n in i)if(Object.prototype.hasOwnProperty.call(i,n))t[n]=i[n]};return t(i,n)};return function(i,n){if(typeof n!=="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(i,n);function r(){this.constructor=i}i.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}();var lh=function(t){ch(i,t);function i(i,n,r){var e=t.call(this)||this;e.cellCtrl=i;e.beans=n;e.column=r;return e}i.prototype.onMouseEvent=function(t,i){if(Yt(i)){return}switch(t){case"click":this.onCellClicked(i);break;case"mousedown":case"touchstart":this.onMouseDown(i);break;case"dblclick":this.onCellDoubleClicked(i);break;case"mouseout":this.onMouseOut(i);break;case"mouseover":this.onMouseOver(i);break}};i.prototype.onCellClicked=function(t){if(this.isDoubleClickOnIPad()){this.onCellDoubleClicked(t);t.preventDefault();return}var i=this.beans,n=i.eventService,r=i.rangeService,e=i.gridOptionsService;var s=t.ctrlKey||t.metaKey;if(r&&s){if(r.getCellRangeCount(this.cellCtrl.getCellPosition())>1){r.intersectLastRange(true)}}var o=this.cellCtrl.createEvent(t,hi.EVENT_CELL_CLICKED);n.dispatchEvent(o);var u=this.column.getColDef();if(u.onCellClicked){window.setTimeout((function(){return u.onCellClicked(o)}),0)}var a=(e.is("singleClickEdit")||u.singleClickEdit)&&!e.is("suppressClickEdit");if(a&&!(t.shiftKey&&(r===null||r===void 0?void 0:r.getCellRanges().length)!=0)){this.cellCtrl.startRowOrCellEdit()}};i.prototype.isDoubleClickOnIPad=function(){if(!ur()||Qt("dblclick")){return false}var t=(new Date).getTime();var i=t-this.lastIPadMouseClickEvent<200;this.lastIPadMouseClickEvent=t;return i};i.prototype.onCellDoubleClicked=function(t){var i=this.column.getColDef();var n=this.cellCtrl.createEvent(t,hi.EVENT_CELL_DOUBLE_CLICKED);this.beans.eventService.dispatchEvent(n);if(typeof i.onCellDoubleClicked==="function"){window.setTimeout((function(){return i.onCellDoubleClicked(n)}),0)}var r=!this.beans.gridOptionsService.is("singleClickEdit")&&!this.beans.gridOptionsService.is("suppressClickEdit");if(r){this.cellCtrl.startRowOrCellEdit(null,t)}};i.prototype.onMouseDown=function(t){var i=t.ctrlKey,n=t.metaKey,r=t.shiftKey;var e=t.target;var s=this,o=s.cellCtrl,u=s.beans;var a=u.eventService,f=u.rangeService,h=u.focusService;if(this.isRightClickInExistingRange(t)){return}var c=f&&f.getCellRanges().length!=0;if(!r||!c){var l=nr()&&!o.isEditing()&&!Hr(e);o.focusCell(l)}if(r&&c&&!h.isCellFocused(o.getCellPosition())){t.preventDefault();var v=h.getFocusedCell();if(v){var d=v.column,p=v.rowIndex,g=v.rowPinned;var b=u.rowRenderer.getRowByPosition({rowIndex:p,rowPinned:g});var w=b===null||b===void 0?void 0:b.getCellCtrl(d);if(w===null||w===void 0?void 0:w.isEditing()){w.stopEditing()}h.setFocusedCell({column:d,rowIndex:p,rowPinned:g,forceBrowserFocus:true,preventScrollOnBrowserFocus:true})}}if(this.containsWidget(e)){return}if(f){var y=this.cellCtrl.getCellPosition();if(r){f.extendLatestRangeToCell(y)}else{var m=i||n;f.setRangeToCell(y,m)}}a.dispatchEvent(this.cellCtrl.createEvent(t,hi.EVENT_CELL_MOUSE_DOWN))};i.prototype.isRightClickInExistingRange=function(t){var i=this.beans.rangeService;if(i){var n=i.isCellInAnyRange(this.cellCtrl.getCellPosition());var r=t.button===2||t.ctrlKey&&this.beans.gridOptionsService.is("allowContextMenuWithControlKey");if(n&&r){return true}}return false};i.prototype.containsWidget=function(t){return zr(t,"ag-selection-checkbox",3)};i.prototype.onMouseOut=function(t){if(this.mouseStayingInsideCell(t)){return}var i=this.cellCtrl.createEvent(t,hi.EVENT_CELL_MOUSE_OUT);this.beans.eventService.dispatchEvent(i);this.beans.columnHoverService.clearMouseOver()};i.prototype.onMouseOver=function(t){if(this.mouseStayingInsideCell(t)){return}var i=this.cellCtrl.createEvent(t,hi.EVENT_CELL_MOUSE_OVER);this.beans.eventService.dispatchEvent(i);this.beans.columnHoverService.setMouseOver([this.column])};i.prototype.mouseStayingInsideCell=function(t){if(!t.target||!t.relatedTarget){return false}var i=this.cellCtrl.getGui();var n=i.contains(t.target);var r=i.contains(t.relatedTarget);return n&&r};i.prototype.destroy=function(){};return i}(hh);var vh=function(){var t=function(i,n){t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var n in i)if(Object.prototype.hasOwnProperty.call(i,n))t[n]=i[n]};return t(i,n)};return function(i,n){if(typeof n!=="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(i,n);function r(){this.constructor=i}i.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}();var dh=function(t){vh(i,t);function i(i,n,r,e,s){var o=t.call(this)||this;o.cellCtrl=i;o.beans=n;o.rowNode=e;o.rowCtrl=s;return o}i.prototype.setComp=function(t){this.eGui=t};i.prototype.onKeyDown=function(t){var i=t.key;switch(i){case Te.ENTER:this.onEnterKeyDown(t);break;case Te.F2:this.onF2KeyDown(t);break;case Te.ESCAPE:this.onEscapeKeyDown(t);break;case Te.TAB:this.onTabKeyDown(t);break;case Te.BACKSPACE:case Te.DELETE:this.onBackspaceOrDeleteKeyDown(i,t);break;case Te.DOWN:case Te.UP:case Te.RIGHT:case Te.LEFT:this.onNavigationKeyDown(t,i);break}};i.prototype.onNavigationKeyDown=function(t,i){if(this.cellCtrl.isEditing()){return}if(t.shiftKey&&this.cellCtrl.isRangeSelectionEnabled()){this.onShiftRangeSelect(t)}else{this.beans.navigationService.navigateToNextCell(t,i,this.cellCtrl.getCellPosition(),true)}t.preventDefault()};i.prototype.onShiftRangeSelect=function(t){if(!this.beans.rangeService){return}var i=this.beans.rangeService.extendLatestRangeInDirection(t);if(i){this.beans.navigationService.ensureCellVisible(i)}};i.prototype.onTabKeyDown=function(t){this.beans.navigationService.onTabKeyDown(this.cellCtrl,t)};i.prototype.onBackspaceOrDeleteKeyDown=function(t,i){var n=this,r=n.cellCtrl,e=n.beans,s=n.rowNode;var o=e.gridOptionsService,u=e.rangeService,a=e.eventService;if(r.isEditing()){return}a.dispatchEvent({type:hi.EVENT_KEY_SHORTCUT_CHANGED_CELL_START});if(Be(t,o.is("enableCellEditingOnBackspace"))){if(u&&o.is("enableRangeSelection")){u.clearCellRangeCellValues({dispatchWrapperEvents:true,wrapperEventSource:"deleteKey"})}else if(r.isCellEditable()){s.setDataValue(r.getColumn(),null,"cellClear")}}else{r.startRowOrCellEdit(t,i)}a.dispatchEvent({type:hi.EVENT_KEY_SHORTCUT_CHANGED_CELL_END})};i.prototype.onEnterKeyDown=function(t){if(this.cellCtrl.isEditing()||this.rowCtrl.isEditing()){this.cellCtrl.stopEditingAndFocus(false,t.shiftKey)}else{if(this.beans.gridOptionsService.is("enterNavigatesVertically")){var i=t.shiftKey?Te.UP:Te.DOWN;this.beans.navigationService.navigateToNextCell(null,i,this.cellCtrl.getCellPosition(),false)}else{this.cellCtrl.startRowOrCellEdit(Te.ENTER,t);if(this.cellCtrl.isEditing()){t.preventDefault()}}}};i.prototype.onF2KeyDown=function(t){if(!this.cellCtrl.isEditing()){this.cellCtrl.startRowOrCellEdit(Te.F2,t)}};i.prototype.onEscapeKeyDown=function(t){if(this.cellCtrl.isEditing()){this.cellCtrl.stopRowOrCellEdit(true);this.cellCtrl.focusCell(true)}};i.prototype.processCharacter=function(t){var i=t.target;var n=i!==this.eGui;if(n||this.cellCtrl.isEditing()){return}var r=t.key;if(r===" "){this.onSpaceKeyDown(t)}else{this.cellCtrl.startRowOrCellEdit(r,t);t.preventDefault()}};i.prototype.onSpaceKeyDown=function(t){var i=this.beans.gridOptionsService;if(!this.cellCtrl.isEditing()&&i.isRowSelection()){var n=this.rowNode.isSelected();var r=!n;if(r||!i.is("suppressRowDeselection")){var e=this.beans.gridOptionsService.is("groupSelectsFiltered");var s=this.rowNode.setSelectedParams({newValue:r,rangeSelect:t.shiftKey,groupSelectsFiltered:e,event:t,source:"spaceKey"});if(n===undefined&&s===0){this.rowNode.setSelectedParams({newValue:false,rangeSelect:t.shiftKey,groupSelectsFiltered:e,event:t,source:"spaceKey"})}}}t.preventDefault()};i.prototype.destroy=function(){t.prototype.destroy.call(this)};return i}(ri);var ph=function(){var t=function(i,n){t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var n in i)if(Object.prototype.hasOwnProperty.call(i,n))t[n]=i[n]};return t(i,n)};return function(i,n){if(typeof n!=="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(i,n);function r(){this.constructor=i}i.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}();var gh=function(t,i,n,r){var e=arguments.length,s=e<3?i:r===null?r=Object.getOwnPropertyDescriptor(i,n):r,o;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")s=Reflect.decorate(t,i,n,r);else for(var u=t.length-1;u>=0;u--)if(o=t[u])s=(e<3?o(s):e>3?o(i,n,s):o(i,n))||s;return e>3&&s&&Object.defineProperty(i,n,s),s};var bh=function(t){ph(i,t);function i(i,n,r){var e=t.call(this,'<div class="ag-drag-handle ag-row-drag" draggable="true"></div>')||this;e.rowNode=i;e.column=n;e.eCell=r;return e}i.prototype.postConstruct=function(){var t=this.getGui();t.appendChild(Fe("rowDrag",this.gridOptionsService,null));this.addGuiEventListener("mousedown",(function(t){t.stopPropagation()}));this.addDragSource();this.checkVisibility()};i.prototype.addDragSource=function(){this.addGuiEventListener("dragstart",this.onDragStart.bind(this))};i.prototype.onDragStart=function(t){var i=this;var n=this.column.getColDef().dndSourceOnRowDrag;t.dataTransfer.setDragImage(this.eCell,0,0);var r=function(){try{var n=JSON.stringify(i.rowNode.data);t.dataTransfer.setData("application/json",n);t.dataTransfer.setData("text/plain",n)}catch(t){}};if(n){var e={rowNode:this.rowNode,dragEvent:t,api:this.gridOptionsService.api,columnApi:this.gridOptionsService.columnApi,context:this.gridOptionsService.context};n(e)}else{r()}};i.prototype.checkVisibility=function(){var t=this.column.isDndSource(this.rowNode);this.setDisplayed(t)};gh([et],i.prototype,"postConstruct",null);return i}(vs);var wh=function(){var t=function(i,n){t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var n in i)if(Object.prototype.hasOwnProperty.call(i,n))t[n]=i[n]};return t(i,n)};return function(i,n){if(typeof n!=="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(i,n);function r(){this.constructor=i}i.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}();var yh=function(){yh=Object.assign||function(t){for(var i,n=1,r=arguments.length;n<r;n++){i=arguments[n];for(var e in i)if(Object.prototype.hasOwnProperty.call(i,e))t[e]=i[e]}return t};return yh.apply(this,arguments)};var mh="ag-cell";var Sh="ag-cell-auto-height";var Ch="ag-cell-normal-height";var Oh="ag-cell-focus";var jh="ag-cell-first-right-pinned";var Rh="ag-cell-last-left-pinned";var xh="ag-cell-not-inline-editing";var _h="ag-column-hover";var Ah="ag-cell-wrap-text";var Fh=0;var kh=function(n){wh(r,n);function r(t,i,r,e){var s=n.call(this)||this;s.cellRangeFeature=null;s.cellPositionFeature=null;s.cellCustomStyleFeature=null;s.tooltipFeature=null;s.cellMouseListenerFeature=null;s.cellKeyboardListenerFeature=null;s.suppressRefreshCell=false;s.onCellCompAttachedFuncs=[];s.column=t;s.rowNode=i;s.beans=r;s.rowCtrl=e;s.instanceId=t.getId()+"-"+Fh++;var o=s.column.getColDef();s.colIdSanitised=mi(s.column.getId());if(!s.beans.gridOptionsService.is("suppressCellFocus")){s.tabIndex=-1}s.isCellRenderer=o.cellRenderer!=null||o.cellRendererSelector!=null;s.createCellPosition();s.addFeatures();s.updateAndFormatValue(true);return s}r.prototype.shouldRestoreFocus=function(){return this.beans.focusService.shouldRestoreFocus(this.cellPosition)};r.prototype.addFeatures=function(){var t=this;this.cellPositionFeature=new eh(this,this.beans);this.addDestroyFunc((function(){var i;(i=t.cellPositionFeature)===null||i===void 0?void 0:i.destroy();t.cellPositionFeature=null}));this.cellCustomStyleFeature=new oh(this,this.beans);this.addDestroyFunc((function(){var i;(i=t.cellCustomStyleFeature)===null||i===void 0?void 0:i.destroy();t.cellCustomStyleFeature=null}));this.cellMouseListenerFeature=new lh(this,this.beans,this.column);this.addDestroyFunc((function(){var i;(i=t.cellMouseListenerFeature)===null||i===void 0?void 0:i.destroy();t.cellMouseListenerFeature=null}));this.cellKeyboardListenerFeature=new dh(this,this.beans,this.column,this.rowNode,this.rowCtrl);this.addDestroyFunc((function(){var i;(i=t.cellKeyboardListenerFeature)===null||i===void 0?void 0:i.destroy();t.cellKeyboardListenerFeature=null}));var i=this.beans.rangeService&&this.beans.gridOptionsService.is("enableRangeSelection");if(i){this.cellRangeFeature=new nh(this.beans,this);this.addDestroyFunc((function(){var i;(i=t.cellRangeFeature)===null||i===void 0?void 0:i.destroy();t.cellRangeFeature=null}))}if(this.column.isTooltipEnabled()){this.addTooltipFeature()}};r.prototype.addTooltipFeature=function(){var t=this;var n=function(){var n=t.column.getColDef();var r=t.rowNode.data;if(n.tooltipField&&i(r)){return k(r,n.tooltipField,t.column.isTooltipFieldContainsDots())}var e=n.tooltipValueGetter;if(e){return e({location:"cell",api:t.beans.gridOptionsService.api,columnApi:t.beans.gridOptionsService.columnApi,context:t.beans.gridOptionsService.context,colDef:t.column.getColDef(),column:t.column,rowIndex:t.cellPosition.rowIndex,node:t.rowNode,data:t.rowNode.data,value:t.value,valueFormatted:t.valueFormatted})}return null};var r={getColumn:function(){return t.column},getColDef:function(){return t.column.getColDef()},getRowIndex:function(){return t.cellPosition.rowIndex},getRowNode:function(){return t.rowNode},getGui:function(){return t.getGui()},getLocation:function(){return"cell"},getTooltipValue:n,getValueFormatted:function(){return t.valueFormatted}};this.tooltipFeature=new ah(r,this.beans);this.addDestroyFunc((function(){var i;(i=t.tooltipFeature)===null||i===void 0?void 0:i.destroy();t.tooltipFeature=null}))};r.prototype.setComp=function(t,i,n,r,e){var s,o,u,a;this.cellComp=t;this.eGui=i;this.printLayout=r;this.addDomData();this.onCellFocused(this.focusEventToRestore);this.applyStaticCssClasses();this.setWrapText();this.onFirstRightPinnedChanged();this.onLastLeftPinnedChanged();this.onColumnHover();this.setupControlComps();if(n){this.setupAutoHeight(n)}this.setAriaColIndex();(s=this.cellPositionFeature)===null||s===void 0?void 0:s.setComp(i);(o=this.cellCustomStyleFeature)===null||o===void 0?void 0:o.setComp(t);(u=this.tooltipFeature)===null||u===void 0?void 0:u.setComp(i);(a=this.cellKeyboardListenerFeature)===null||a===void 0?void 0:a.setComp(this.eGui);if(this.cellRangeFeature){this.cellRangeFeature.setComp(t,i)}if(e&&this.isCellEditable()){this.startEditing()}else{this.showValue()}if(this.onCellCompAttachedFuncs.length){this.onCellCompAttachedFuncs.forEach((function(t){return t()}));this.onCellCompAttachedFuncs=[]}};r.prototype.setupAutoHeight=function(t){var i=this;if(!this.column.isAutoHeight()){return}var n=t.parentElement;var r=this.beans.gridOptionsService.getRowHeightForNode(this.rowNode).height;var e=function(s){if(i.editing){return}if(!i.isAlive()){return}var o=Wr(n),u=o.paddingTop,a=o.paddingBottom,f=o.borderBottomWidth,h=o.borderTopWidth;var c=u+a+f+h;var l=t.offsetHeight;var v=l+c;if(s<5){var d=i.beans.gridOptionsService.getDocument();var p=!d||!d.contains(t);var g=v==0;if(p||g){i.beans.frameworkOverrides.setTimeout((function(){return e(s+1)}),0);return}}var b=Math.max(v,r);i.rowNode.setRowAutoHeight(b,i.column)};var s=function(){return e(0)};s();var o=this.beans.resizeObserverService.observeResize(t,s);this.addDestroyFunc((function(){o();i.rowNode.setRowAutoHeight(undefined,i.column)}))};r.prototype.getInstanceId=function(){return this.instanceId};r.prototype.getIncludeSelection=function(){return this.includeSelection};r.prototype.getIncludeRowDrag=function(){return this.includeRowDrag};r.prototype.getIncludeDndSource=function(){return this.includeDndSource};r.prototype.getColumnIdSanitised=function(){return this.colIdSanitised};r.prototype.getTabIndex=function(){return this.tabIndex};r.prototype.getIsCellRenderer=function(){return this.isCellRenderer};r.prototype.getValueToDisplay=function(){return this.valueFormatted!=null?this.valueFormatted:this.value};r.prototype.showValue=function(t){if(t===void 0){t=false}var i=this.getValueToDisplay();var n;if(this.isCellRenderer){var r=this.createCellRendererParams();n=this.beans.userComponentFactory.getCellRendererDetails(this.column.getColDef(),r)}this.cellComp.setRenderDetails(n,i,t);this.refreshHandle()};r.prototype.setupControlComps=function(){var t=this.column.getColDef();this.includeSelection=this.isIncludeControl(t.checkboxSelection);this.includeRowDrag=this.isIncludeControl(t.rowDrag);this.includeDndSource=this.isIncludeControl(t.dndSource);this.cellComp.setIncludeSelection(this.includeSelection);this.cellComp.setIncludeDndSource(this.includeDndSource);this.cellComp.setIncludeRowDrag(this.includeRowDrag)};r.prototype.isForceWrapper=function(){var t=this.beans.gridOptionsService.is("enableCellTextSelection")||this.column.isAutoHeight();return t};r.prototype.isIncludeControl=function(t){var i=this.rowNode.rowPinned!=null;var n=typeof t==="function";var r=i?false:n||t===true;return r};r.prototype.refreshShouldDestroy=function(){var t=this.column.getColDef();var i=this.includeSelection!=this.isIncludeControl(t.checkboxSelection);var n=this.includeRowDrag!=this.isIncludeControl(t.rowDrag);var r=this.includeDndSource!=this.isIncludeControl(t.dndSource);return i||n||r};r.prototype.startEditing=function(t,i,n){var r=this;if(t===void 0){t=null}if(i===void 0){i=false}if(n===void 0){n=null}if(!this.isCellEditable()||this.editing){return}if(!this.cellComp){this.onCellCompAttachedFuncs.push((function(){r.startEditing(t,i,n)}));return}var e=this.createCellEditorParams(t,i);var s=this.column.getColDef();var o=this.beans.userComponentFactory.getCellEditorDetails(s,e);var u=(o===null||o===void 0?void 0:o.popupFromSelector)!=null?o.popupFromSelector:!!s.cellEditorPopup;var a=(o===null||o===void 0?void 0:o.popupPositionFromSelector)!=null?o.popupPositionFromSelector:s.cellEditorPopupPosition;this.setEditing(true);this.cellComp.setEditDetails(o,u,a);var f=this.createEvent(n,hi.EVENT_CELL_EDITING_STARTED);this.beans.eventService.dispatchEvent(f)};r.prototype.setEditing=function(t){if(this.editing===t){return}this.editing=t;this.refreshHandle()};r.prototype.stopRowOrCellEdit=function(t){if(t===void 0){t=false}if(this.beans.gridOptionsService.get("editType")==="fullRow"){this.rowCtrl.stopRowEditing(t)}else{this.stopEditing(t)}};r.prototype.onPopupEditorClosed=function(){if(!this.isEditing()){return}this.stopEditingAndFocus()};r.prototype.takeValueFromCellEditor=function(t){var i={newValueExists:false};if(t){return i}var n=this.cellComp.getCellEditor();if(!n){return i}var r=n.isCancelAfterEnd&&n.isCancelAfterEnd();if(r){return i}var e=n.getValue();return{newValue:e,newValueExists:true}};r.prototype.saveNewValue=function(t,i){if(i===t){return false}this.suppressRefreshCell=true;var n=this.rowNode.setDataValue(this.column,i,"edit");this.suppressRefreshCell=false;return n};r.prototype.stopEditing=function(t){if(t===void 0){t=false}if(!this.editing){return false}var i=this.takeValueFromCellEditor(t),n=i.newValue,r=i.newValueExists;var e=this.rowNode.getValueFromValueService(this.column);var s=false;if(r){s=this.saveNewValue(e,n)}this.setEditing(false);this.cellComp.setEditDetails();this.updateAndFormatValue();this.refreshCell({forceRefresh:true,suppressFlash:true});this.dispatchEditingStoppedEvent(e,n,!t&&!!s);return s};r.prototype.dispatchEditingStoppedEvent=function(t,i,n){var r=yh(yh({},this.createEvent(null,hi.EVENT_CELL_EDITING_STOPPED)),{oldValue:t,newValue:i,valueChanged:n});this.beans.eventService.dispatchEvent(r)};r.prototype.createCellEditorParams=function(t,i){return{value:this.rowNode.getValueFromValueService(this.column),eventKey:t,column:this.column,colDef:this.column.getColDef(),rowIndex:this.getCellPosition().rowIndex,node:this.rowNode,data:this.rowNode.data,api:this.beans.gridOptionsService.api,cellStartedEdit:i,columnApi:this.beans.gridOptionsService.columnApi,context:this.beans.gridOptionsService.context,onKeyDown:this.onKeyDown.bind(this),stopEditing:this.stopEditingAndFocus.bind(this),eGridCell:this.getGui(),parseValue:this.parseValue.bind(this),formatValue:this.formatValue.bind(this)}};r.prototype.createCellRendererParams=function(){var t=this;var i={value:this.value,valueFormatted:this.valueFormatted,getValue:function(){return t.rowNode.getValueFromValueService(t.column)},setValue:function(i){return t.beans.valueService.setValue(t.rowNode,t.column,i)},formatValue:this.formatValue.bind(this),data:this.rowNode.data,node:this.rowNode,pinned:this.column.getPinned(),colDef:this.column.getColDef(),column:this.column,rowIndex:this.getCellPosition().rowIndex,api:this.beans.gridOptionsService.api,columnApi:this.beans.gridOptionsService.columnApi,context:this.beans.gridOptionsService.context,refreshCell:this.refreshCell.bind(this),eGridCell:this.getGui(),eParentOfValue:this.cellComp.getParentOfValue(),registerRowDragger:function(i,n,r,e){return t.registerRowDragger(i,n,e)}};return i};r.prototype.parseValue=function(t){return this.beans.valueParserService.parseValue(this.column,this.rowNode,t,this.getValue())};r.prototype.setFocusOutOnEditor=function(){if(!this.editing){return}var t=this.cellComp.getCellEditor();if(t&&t.focusOut){t.focusOut()}};r.prototype.setFocusInOnEditor=function(){if(!this.editing){return}var t=this.cellComp.getCellEditor();if(t&&t.focusIn){t.focusIn()}else{this.focusCell(true)}};r.prototype.onCellChanged=function(t){if(!this.cellComp){return}var i=t.column===this.column;if(i){this.refreshCell({})}};r.prototype.refreshCell=function(t){var i,n,r;if(this.suppressRefreshCell||this.editing){return}if(!this.cellComp){return}var e=this.column.getColDef();var s=t!=null&&!!t.newData;var o=t!=null&&!!t.suppressFlash||!!e.suppressCellFlash;var u=e.field==null&&e.valueGetter==null&&e.showRowGroup==null;var a=t&&t.forceRefresh||u||s;var f=this.updateAndFormatValue();var h=a||f;if(h){this.showValue(s);var c=this.beans.filterManager.isSuppressFlashingCellsBecauseFiltering();var l=!o&&!c&&(this.beans.gridOptionsService.is("enableCellChangeFlash")||e.enableCellChangeFlash);if(l){this.flashCell()}(i=this.cellCustomStyleFeature)===null||i===void 0?void 0:i.applyUserStyles();(n=this.cellCustomStyleFeature)===null||n===void 0?void 0:n.applyClassesFromColDef()}this.refreshToolTip();(r=this.cellCustomStyleFeature)===null||r===void 0?void 0:r.applyCellClassRules()};r.prototype.stopEditingAndFocus=function(t,i){if(t===void 0){t=false}if(i===void 0){i=false}this.stopRowOrCellEdit();this.focusCell(true);if(!t){this.navigateAfterEdit(i)}};r.prototype.navigateAfterEdit=function(t){var i=this.beans.gridOptionsService.is("enterNavigatesVerticallyAfterEdit");if(i){var n=t?Te.UP:Te.DOWN;this.beans.navigationService.navigateToNextCell(null,n,this.getCellPosition(),false)}};r.prototype.flashCell=function(t){var i=t&&t.flashDelay;var n=t&&t.fadeDelay;this.animateCell("data-changed",i,n)};r.prototype.animateCell=function(t,n,r){var e=this;var s,o;if(!this.cellComp){return}var u="ag-cell-"+t;var a="ag-cell-"+t+"-animation";var f=this.beans.gridOptionsService;if(!n){n=(s=f.getNum("cellFlashDelay"))!==null&&s!==void 0?s:500}if(!i(r)){r=(o=f.getNum("cellFadeDelay"))!==null&&o!==void 0?o:1e3}this.cellComp.addOrRemoveCssClass(u,true);this.cellComp.addOrRemoveCssClass(a,false);window.setTimeout((function(){if(!e.isAlive()){return}e.cellComp.addOrRemoveCssClass(u,false);e.cellComp.addOrRemoveCssClass(a,true);e.eGui.style.transition="background-color "+r+"ms";window.setTimeout((function(){if(!e.isAlive()){return}e.cellComp.addOrRemoveCssClass(a,false);e.eGui.style.transition=""}),r)}),n)};r.prototype.onFlashCells=function(t){if(!this.cellComp){return}var i=this.beans.cellPositionUtils.createId(this.getCellPosition());var n=t.cells[i];if(n){this.animateCell("highlight")}};r.prototype.isCellEditable=function(){return this.column.isCellEditable(this.rowNode)};r.prototype.isSuppressFillHandle=function(){return this.column.isSuppressFillHandle()};r.prototype.formatValue=function(t){var i;return(i=this.callValueFormatter(t))!==null&&i!==void 0?i:t};r.prototype.callValueFormatter=function(t){return this.beans.valueFormatterService.formatValue(this.column,this.rowNode,t)};r.prototype.updateAndFormatValue=function(t){if(t===void 0){t=false}var i=this.value;var n=this.valueFormatted;this.value=this.rowNode.getValueFromValueService(this.column);this.valueFormatted=this.callValueFormatter(this.value);var r=t?true:!this.valuesAreEqual(i,this.value)||this.valueFormatted!=n;return r};r.prototype.valuesAreEqual=function(t,i){var n=this.column.getColDef();return n.equals?n.equals(t,i):t===i};r.prototype.getComp=function(){return this.cellComp};r.prototype.getValue=function(){return this.value};r.prototype.getValueFormatted=function(){return this.valueFormatted};r.prototype.addDomData=function(){var t=this;var i=this.getGui();this.beans.gridOptionsService.setDomData(i,r.DOM_DATA_KEY_CELL_CTRL,this);this.addDestroyFunc((function(){return t.beans.gridOptionsService.setDomData(i,r.DOM_DATA_KEY_CELL_CTRL,null)}))};r.prototype.createEvent=function(t,i){var n={type:i,node:this.rowNode,data:this.rowNode.data,value:this.value,column:this.column,colDef:this.column.getColDef(),context:this.beans.gridOptionsService.context,api:this.beans.gridApi,columnApi:this.beans.columnApi,rowPinned:this.rowNode.rowPinned,event:t,rowIndex:this.rowNode.rowIndex};return n};r.prototype.processCharacter=function(t){var i;(i=this.cellKeyboardListenerFeature)===null||i===void 0?void 0:i.processCharacter(t)};r.prototype.onKeyDown=function(t){var i;(i=this.cellKeyboardListenerFeature)===null||i===void 0?void 0:i.onKeyDown(t)};r.prototype.onMouseEvent=function(t,i){var n;(n=this.cellMouseListenerFeature)===null||n===void 0?void 0:n.onMouseEvent(t,i)};r.prototype.getGui=function(){return this.eGui};r.prototype.refreshToolTip=function(){var t;(t=this.tooltipFeature)===null||t===void 0?void 0:t.refreshToolTip()};r.prototype.getColSpanningList=function(){return this.cellPositionFeature.getColSpanningList()};r.prototype.onLeftChanged=function(){var t;if(!this.cellComp){return}(t=this.cellPositionFeature)===null||t===void 0?void 0:t.onLeftChanged()};r.prototype.onDisplayedColumnsChanged=function(){if(!this.eGui){return}this.setAriaColIndex()};r.prototype.setAriaColIndex=function(){var t=this.beans.columnModel.getAriaColumnIndex(this.column);Hn(this.getGui(),t)};r.prototype.isSuppressNavigable=function(){return this.column.isSuppressNavigable(this.rowNode)};r.prototype.onWidthChanged=function(){var t;return(t=this.cellPositionFeature)===null||t===void 0?void 0:t.onWidthChanged()};r.prototype.getColumn=function(){return this.column};r.prototype.getRowNode=function(){return this.rowNode};r.prototype.getBeans=function(){return this.beans};r.prototype.isPrintLayout=function(){return this.printLayout};r.prototype.appendChild=function(t){this.eGui.appendChild(t)};r.prototype.refreshHandle=function(){if(this.cellRangeFeature){this.cellRangeFeature.refreshHandle()}};r.prototype.getCellPosition=function(){return this.cellPosition};r.prototype.isEditing=function(){return this.editing};r.prototype.startRowOrCellEdit=function(t,i){if(i===void 0){i=null}if(!this.cellComp){return}if(this.beans.gridOptionsService.get("editType")==="fullRow"){this.rowCtrl.startRowEditing(t,this)}else{this.startEditing(t,true,i)}};r.prototype.getRowCtrl=function(){return this.rowCtrl};r.prototype.getRowPosition=function(){return{rowIndex:this.cellPosition.rowIndex,rowPinned:this.cellPosition.rowPinned}};r.prototype.updateRangeBordersIfRangeCount=function(){if(!this.cellComp){return}if(this.cellRangeFeature){this.cellRangeFeature.updateRangeBordersIfRangeCount()}};r.prototype.onRangeSelectionChanged=function(){if(!this.cellComp){return}if(this.cellRangeFeature){this.cellRangeFeature.onRangeSelectionChanged()}};r.prototype.isRangeSelectionEnabled=function(){return this.cellRangeFeature!=null};r.prototype.focusCell=function(t){if(t===void 0){t=false}this.beans.focusService.setFocusedCell({rowIndex:this.getCellPosition().rowIndex,column:this.column,rowPinned:this.rowNode.rowPinned,forceBrowserFocus:t})};r.prototype.onRowIndexChanged=function(){this.createCellPosition();this.onCellFocused();if(this.cellRangeFeature){this.cellRangeFeature.onRangeSelectionChanged()}};r.prototype.onFirstRightPinnedChanged=function(){if(!this.cellComp){return}var t=this.column.isFirstRightPinned();this.cellComp.addOrRemoveCssClass(jh,t)};r.prototype.onLastLeftPinnedChanged=function(){if(!this.cellComp){return}var t=this.column.isLastLeftPinned();this.cellComp.addOrRemoveCssClass(Rh,t)};r.prototype.onCellFocused=function(t){if(this.beans.gridOptionsService.is("suppressCellFocus")){return}var i=this.beans.focusService.isCellFocused(this.cellPosition);if(!this.cellComp){if(i&&(t===null||t===void 0?void 0:t.forceBrowserFocus)){this.focusEventToRestore=t}return}this.focusEventToRestore=undefined;this.cellComp.addOrRemoveCssClass(Oh,i);if(i&&t&&t.forceBrowserFocus){var n=this.cellComp.getFocusableElement();n.focus({preventScroll:!!t.preventScrollOnBrowserFocus})}var r=this.beans.gridOptionsService.get("editType")==="fullRow";if(!i&&!r&&this.editing){this.stopRowOrCellEdit()}};r.prototype.createCellPosition=function(){this.cellPosition={rowIndex:this.rowNode.rowIndex,rowPinned:t(this.rowNode.rowPinned),column:this.column}};r.prototype.applyStaticCssClasses=function(){this.cellComp.addOrRemoveCssClass(mh,true);this.cellComp.addOrRemoveCssClass(xh,true);var t=this.column.isAutoHeight()==true;this.cellComp.addOrRemoveCssClass(Sh,t);this.cellComp.addOrRemoveCssClass(Ch,!t)};r.prototype.onColumnHover=function(){if(!this.cellComp){return}if(!this.beans.gridOptionsService.is("columnHoverHighlight")){return}var t=this.beans.columnHoverService.isHovered(this.column);this.cellComp.addOrRemoveCssClass(_h,t)};r.prototype.onColDefChanged=function(){if(!this.cellComp){return}this.setWrapText();if(!this.editing){this.refreshCell({forceRefresh:true,suppressFlash:true})}};r.prototype.setWrapText=function(){var t=this.column.getColDef().wrapText==true;this.cellComp.addOrRemoveCssClass(Ah,t)};r.prototype.dispatchCellContextMenuEvent=function(t){var i=this.column.getColDef();var n=this.createEvent(t,hi.EVENT_CELL_CONTEXT_MENU);this.beans.eventService.dispatchEvent(n);if(i.onCellContextMenu){window.setTimeout((function(){return i.onCellContextMenu(n)}),0)}};r.prototype.getCellRenderer=function(){return this.cellComp?this.cellComp.getCellRenderer():null};r.prototype.getCellEditor=function(){return this.cellComp?this.cellComp.getCellEditor():null};r.prototype.destroy=function(){this.onCellCompAttachedFuncs=[];n.prototype.destroy.call(this)};r.prototype.createSelectionCheckbox=function(){var t=new Mu;this.beans.context.createBean(t);t.init({rowNode:this.rowNode,column:this.column});return t};r.prototype.createDndSource=function(){var t=new bh(this.rowNode,this.column,this.eGui);this.beans.context.createBean(t);return t};r.prototype.registerRowDragger=function(t,i,n){var r=this;if(this.customRowDragComp){this.customRowDragComp.setDragElement(t,i);return}var e=this.createRowDragComp(t,i,n);if(e){this.customRowDragComp=e;this.addDestroyFunc((function(){r.beans.context.destroyBean(e);r.customRowDragComp=null}))}};r.prototype.createRowDragComp=function(t,i,n){var r=this;var e=this.beans.gridOptionsService.is("pagination");var s=this.beans.gridOptionsService.is("rowDragManaged");var o=this.beans.gridOptionsService.isRowModelType("clientSide");if(s){if(!o){P((function(){return console.warn("AG Grid: managed row dragging is only allowed in the Client Side Row Model")}),"CellComp.addRowDragging");return}if(e){P((function(){return console.warn("AG Grid: managed row dragging is not possible when doing pagination")}),"CellComp.addRowDragging");return}}var u=new Bu((function(){return r.value}),this.rowNode,this.column,t,i,n);this.beans.context.createBean(u);return u};r.DOM_DATA_KEY_CELL_CTRL="cellCtrl";return r}(ri);var Th=function(){var t=function(i,n){t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var n in i)if(Object.prototype.hasOwnProperty.call(i,n))t[n]=i[n]};return t(i,n)};return function(i,n){if(typeof n!=="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(i,n);function r(){this.constructor=i}i.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}();var Mh=function(t){var i=typeof Symbol==="function"&&Symbol.iterator,n=i&&t[i],r=0;if(n)return n.call(t);if(t&&typeof t.length==="number")return{next:function(){if(t&&r>=t.length)t=void 0;return{value:t&&t[r++],done:!t}}};throw new TypeError(i?"Object is not iterable.":"Symbol.iterator is not defined.")};var Dh=function(t,i){var n=typeof Symbol==="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),e,s=[],o;try{while((i===void 0||i-- >0)&&!(e=r.next()).done)s.push(e.value)}catch(t){o={error:t}}finally{try{if(e&&!e.done&&(n=r["return"]))n.call(r)}finally{if(o)throw o.error}}return s};var Gh=function(t,i){for(var n=0,r=i.length,e=t.length;n<r;n++,e++)t[e]=i[n];return t};var Ph;(function(t){t["Normal"]="Normal";t["FullWidth"]="FullWidth";t["FullWidthLoading"]="FullWidthLoading";t["FullWidthGroup"]="FullWidthGroup";t["FullWidthDetail"]="FullWidthDetail"})(Ph||(Ph={}));var Eh=0;var Ih=function(n){Th(r,n);function r(t,i,r,e,s){var o=n.call(this)||this;o.allRowGuis=[];o.active=true;o.centerCellCtrls={list:[],map:{}};o.leftCellCtrls={list:[],map:{}};o.rightCellCtrls={list:[],map:{}};o.slideInAnimation={left:false,center:false,right:false,fullWidth:false};o.fadeInAnimation={left:false,center:false,right:false,fullWidth:false};o.lastMouseDownOnDragger=false;o.emptyStyle={};o.updateColumnListsPending=false;o.rowId=null;o.businessKeySanitised=null;o.beans=i;o.gridOptionsService=i.gridOptionsService;o.rowNode=t;o.paginationPage=i.paginationProxy.getCurrentPage();o.useAnimationFrameForCreate=e;o.printLayout=s;o.instanceId=t.id+"-"+Eh++;o.rowId=mi(t.id);o.initRowBusinessKey();o.rowFocused=i.focusService.isRowFocused(o.rowNode.rowIndex,o.rowNode.rowPinned);o.rowLevel=i.rowCssClassCalculator.calculateRowLevel(o.rowNode);o.setRowType();o.setAnimateFlags(r);o.rowStyles=o.processStylesFromGridOptions();if(o.isFullWidth()&&!o.gridOptionsService.is("suppressCellFocus")){o.tabIndex=-1}o.addListeners();return o}r.prototype.initRowBusinessKey=function(){this.businessKeyForNodeFunc=this.gridOptionsService.get("getBusinessKeyForNode");this.updateRowBusinessKey()};r.prototype.updateRowBusinessKey=function(){if(typeof this.businessKeyForNodeFunc!=="function"){return}var t=this.businessKeyForNodeFunc(this.rowNode);this.businessKeySanitised=mi(t)};r.prototype.getRowId=function(){return this.rowId};r.prototype.getRowStyles=function(){return this.rowStyles};r.prototype.getTabIndex=function(){return this.tabIndex};r.prototype.isSticky=function(){return this.rowNode.sticky};r.prototype.getBeans=function(){return this.beans};r.prototype.getInstanceId=function(){return this.instanceId};r.prototype.setComp=function(t,i,n){var r={rowComp:t,element:i,containerType:n};this.allRowGuis.push(r);if(n===cc.LEFT){this.leftGui=r}else if(n===cc.RIGHT){this.rightGui=r}else if(n===cc.FULL_WIDTH){this.fullWidthGui=r}else{this.centerGui=r}this.initialiseRowComp(r);if(this.rowType!=="FullWidthLoading"&&!this.rowNode.rowPinned){this.beans.rowRenderer.dispatchFirstDataRenderedEvent()}};r.prototype.unsetComp=function(t){this.allRowGuis=this.allRowGuis.filter((function(i){return i.containerType!==t}));switch(t){case cc.LEFT:this.leftGui=undefined;break;case cc.RIGHT:this.rightGui=undefined;break;case cc.FULL_WIDTH:this.fullWidthGui=undefined;break;case cc.CENTER:this.centerGui=undefined;break}};r.prototype.isCacheable=function(){return this.rowType===Ph.FullWidthDetail&&this.gridOptionsService.is("keepDetailRows")};r.prototype.setCached=function(t){var i=t?"none":"";this.allRowGuis.forEach((function(t){return t.element.style.display=i}))};r.prototype.initialiseRowComp=function(t){var i=this;var n=this.gridOptionsService;this.listenOnDomOrder(t);this.onRowHeightChanged(t);this.updateRowIndexes(t);this.setFocusedClasses(t);this.setStylesFromGridOptions(false,t);if(n.isRowSelection()&&this.rowNode.selectable){this.onRowSelected(t)}this.updateColumnLists(!this.useAnimationFrameForCreate);var e=t.rowComp;var s=this.getInitialRowClasses(t.containerType);s.forEach((function(t){return e.addOrRemoveCssClass(t,true)}));this.executeSlideAndFadeAnimations(t);if(this.rowNode.group){Tn(t.element,this.rowNode.expanded==true)}this.setRowCompRowId(e);this.setRowCompRowBusinessKey(e);n.setDomData(t.element,r.DOM_DATA_KEY_ROW_CTRL,this);this.addDestroyFunc((function(){return n.setDomData(t.element,r.DOM_DATA_KEY_ROW_CTRL,null)}));if(this.useAnimationFrameForCreate){this.beans.animationFrameService.createTask(this.addHoverFunctionality.bind(this,t.element),this.rowNode.rowIndex,"createTasksP2")}else{this.addHoverFunctionality(t.element)}if(this.isFullWidth()){this.setupFullWidth(t)}if(n.is("rowDragEntireRow")){this.addRowDraggerToRow(t)}if(this.useAnimationFrameForCreate){this.beans.animationFrameService.addDestroyTask((function(){if(!i.isAlive()){return}t.rowComp.addOrRemoveCssClass("ag-after-created",true)}))}this.executeProcessRowPostCreateFunc()};r.prototype.setRowCompRowBusinessKey=function(t){if(this.businessKeySanitised==null){return}t.setRowBusinessKey(this.businessKeySanitised)};r.prototype.getBusinessKey=function(){return this.businessKeySanitised};r.prototype.setRowCompRowId=function(t){this.rowId=mi(this.rowNode.id);if(this.rowId==null){return}t.setRowId(this.rowId)};r.prototype.executeSlideAndFadeAnimations=function(t){var i=this;var n=t.containerType;var r=this.slideInAnimation[n];if(r){V((function(){i.onTopChanged()}));this.slideInAnimation[n]=false}var e=this.fadeInAnimation[n];if(e){V((function(){t.rowComp.addOrRemoveCssClass("ag-opacity-zero",false)}));this.fadeInAnimation[n]=false}};r.prototype.addRowDraggerToRow=function(t){if(this.gridOptionsService.is("enableRangeSelection")){P((function(){console.warn("AG Grid: Setting `rowDragEntireRow: true` in the gridOptions doesn't work with `enableRangeSelection: true`")}),"rowDragAndRangeSelectionEnabled");return}var i=this.beans.localeService.getLocaleTextFunc();var n=new Bu((function(){return"1 "+i("rowDragRow","row")}),this.rowNode,undefined,t.element,undefined,true);this.createManagedBean(n,this.beans.context)};r.prototype.setupFullWidth=function(t){var i=this.getPinnedForContainer(t.containerType);var n=this.createFullWidthParams(t.element,i);if(this.rowType==Ph.FullWidthDetail){if(!X.__assertRegistered(J.MasterDetailModule,"cell renderer 'agDetailCellRenderer' (for master detail)",this.beans.context.getGridId())){return}}var r;switch(this.rowType){case Ph.FullWidthDetail:r=this.beans.userComponentFactory.getFullWidthDetailCellRendererDetails(n);break;case Ph.FullWidthGroup:r=this.beans.userComponentFactory.getFullWidthGroupCellRendererDetails(n);break;case Ph.FullWidthLoading:r=this.beans.userComponentFactory.getFullWidthLoadingCellRendererDetails(n);break;default:r=this.beans.userComponentFactory.getFullWidthCellRendererDetails(n);break}t.rowComp.showFullWidth(r)};r.prototype.isPrintLayout=function(){return this.printLayout};r.prototype.getFullWidthCellRenderer=function(){var t,i;return(i=(t=this.fullWidthGui)===null||t===void 0?void 0:t.rowComp)===null||i===void 0?void 0:i.getFullWidthCellRenderer()};r.prototype.getCellElement=function(t){var i=this.getCellCtrl(t);return i?i.getGui():null};r.prototype.executeProcessRowPostCreateFunc=function(){var t=this.gridOptionsService.getCallback("processRowPostCreate");if(!t||!this.areAllContainersReady()){return}var i={eRow:this.centerGui.element,ePinnedLeftRow:this.leftGui?this.leftGui.element:undefined,ePinnedRightRow:this.rightGui?this.rightGui.element:undefined,node:this.rowNode,rowIndex:this.rowNode.rowIndex,addRenderedRowListener:this.addEventListener.bind(this)};t(i)};r.prototype.areAllContainersReady=function(){var t=!!this.leftGui||!this.beans.columnModel.isPinningLeft();var i=!!this.centerGui;var n=!!this.rightGui||!this.beans.columnModel.isPinningRight();return t&&i&&n};r.prototype.setRowType=function(){var t=this.rowNode.stub;var i=this.rowNode.isFullWidthCell();var n=this.beans.doingMasterDetail&&this.rowNode.detail;var r=this.beans.columnModel.isPivotMode();var e=!!this.rowNode.group&&!this.rowNode.footer;var s=e&&this.gridOptionsService.isGroupUseEntireRow(r);if(t){this.rowType=Ph.FullWidthLoading}else if(n){this.rowType=Ph.FullWidthDetail}else if(i){this.rowType=Ph.FullWidth}else if(s){this.rowType=Ph.FullWidthGroup}else{this.rowType=Ph.Normal}};r.prototype.updateColumnLists=function(t,i){var n=this;if(t===void 0){t=false}if(i===void 0){i=false}if(this.isFullWidth()){return}var r=t||this.gridOptionsService.is("suppressAnimationFrame")||this.printLayout;if(r){this.updateColumnListsImpl(i);return}if(this.updateColumnListsPending){return}this.beans.animationFrameService.createTask((function(){if(!n.active){return}n.updateColumnListsImpl(true)}),this.rowNode.rowIndex,"createTasksP1");this.updateColumnListsPending=true};r.prototype.createCellCtrls=function(t,i,n){var r=this;if(n===void 0){n=null}var e={list:[],map:{}};var s=function(t,i){e.list.push(i);e.map[t]=i};i.forEach((function(i){var n=i.getInstanceId();var e=t.map[n];if(!e){e=new kh(i,r.rowNode,r.beans,r)}s(n,e)}));t.list.forEach((function(t){var i=e.map[t.getColumn().getInstanceId()]!=null;if(i){return}var o=!r.isCellEligibleToBeRemoved(t,n);if(o){s(t.getColumn().getInstanceId(),t);return}t.destroy()}));return e};r.prototype.updateColumnListsImpl=function(t){this.updateColumnListsPending=false;this.createAllCellCtrls();this.setCellCtrls(t)};r.prototype.setCellCtrls=function(t){var i=this;this.allRowGuis.forEach((function(n){var r=i.getCellCtrlsForContainer(n.containerType);n.rowComp.setCellCtrls(r,t)}))};r.prototype.getCellCtrlsForContainer=function(t){switch(t){case cc.LEFT:return this.leftCellCtrls.list;case cc.RIGHT:return this.rightCellCtrls.list;case cc.FULL_WIDTH:return[];case cc.CENTER:return this.centerCellCtrls.list;default:var i=t;throw new Error("Unhandled case: "+i)}};r.prototype.createAllCellCtrls=function(){var t=this.beans.columnModel;if(this.printLayout){this.centerCellCtrls=this.createCellCtrls(this.centerCellCtrls,t.getAllDisplayedColumns());this.leftCellCtrls={list:[],map:{}};this.rightCellCtrls={list:[],map:{}}}else{var i=t.getViewportCenterColumnsForRow(this.rowNode);this.centerCellCtrls=this.createCellCtrls(this.centerCellCtrls,i);var n=t.getDisplayedLeftColumnsForRow(this.rowNode);this.leftCellCtrls=this.createCellCtrls(this.leftCellCtrls,n,"left");var r=t.getDisplayedRightColumnsForRow(this.rowNode);this.rightCellCtrls=this.createCellCtrls(this.rightCellCtrls,r,"right")}};r.prototype.isCellEligibleToBeRemoved=function(t,i){var n=true;var r=false;var e=t.getColumn();if(e.getPinned()!=i){return n}var s=t.isEditing();var o=this.beans.focusService.isCellFocused(t.getCellPosition());var u=s||o;if(u){var a=t.getColumn();var f=this.beans.columnModel.getAllDisplayedColumns();var h=f.indexOf(a)>=0;return h?r:n}return n};r.prototype.getDomOrder=function(){var t=this.gridOptionsService.is("ensureDomOrder");return t||this.gridOptionsService.isDomLayout("print")};r.prototype.listenOnDomOrder=function(t){var i=this;var n=function(){t.rowComp.setDomOrder(i.getDomOrder())};this.addManagedPropertyListener("domLayout",n);this.addManagedPropertyListener("ensureDomOrder",n)};r.prototype.setAnimateFlags=function(t){if(this.isSticky()||!t){return}var n=i(this.rowNode.oldRowTop);var r=this.beans.columnModel.isPinningLeft();var e=this.beans.columnModel.isPinningRight();if(n){if(this.isFullWidth()&&!this.gridOptionsService.is("embedFullWidthRows")){this.slideInAnimation.fullWidth=true;return}this.slideInAnimation.center=true;this.slideInAnimation.left=r;this.slideInAnimation.right=e}else{if(this.isFullWidth()&&!this.gridOptionsService.is("embedFullWidthRows")){this.fadeInAnimation.fullWidth=true;return}this.fadeInAnimation.center=true;this.fadeInAnimation.left=r;this.fadeInAnimation.right=e}};r.prototype.isEditing=function(){return this.editingRow};r.prototype.stopRowEditing=function(t){this.stopEditing(t)};r.prototype.isFullWidth=function(){return this.rowType!==Ph.Normal};r.prototype.getRowType=function(){return this.rowType};r.prototype.refreshFullWidth=function(){var t=this;var i=function(i,n){if(!i){return true}var r=i.rowComp.getFullWidthCellRenderer();if(!r){return false}if(!r.refresh){return false}var e=t.createFullWidthParams(i.element,n);var s=r.refresh(e);return s};var n=i(this.fullWidthGui,null);var r=i(this.centerGui,null);var e=i(this.leftGui,"left");var s=i(this.rightGui,"right");var o=n&&r&&e&&s;return o};r.prototype.addListeners=function(){var t=this;this.addManagedListener(this.rowNode,Au.EVENT_HEIGHT_CHANGED,(function(){return t.onRowHeightChanged()}));this.addManagedListener(this.rowNode,Au.EVENT_ROW_SELECTED,(function(){return t.onRowSelected()}));this.addManagedListener(this.rowNode,Au.EVENT_ROW_INDEX_CHANGED,this.onRowIndexChanged.bind(this));this.addManagedListener(this.rowNode,Au.EVENT_TOP_CHANGED,this.onTopChanged.bind(this));this.addManagedListener(this.rowNode,Au.EVENT_EXPANDED_CHANGED,this.updateExpandedCss.bind(this));this.addManagedListener(this.rowNode,Au.EVENT_HAS_CHILDREN_CHANGED,this.updateExpandedCss.bind(this));if(this.rowNode.detail){this.addManagedListener(this.rowNode.parent,Au.EVENT_DATA_CHANGED,this.onRowNodeDataChanged.bind(this))}this.addManagedListener(this.rowNode,Au.EVENT_DATA_CHANGED,this.onRowNodeDataChanged.bind(this));this.addManagedListener(this.rowNode,Au.EVENT_CELL_CHANGED,this.onRowNodeCellChanged.bind(this));this.addManagedListener(this.rowNode,Au.EVENT_HIGHLIGHT_CHANGED,this.onRowNodeHighlightChanged.bind(this));this.addManagedListener(this.rowNode,Au.EVENT_DRAGGING_CHANGED,this.onRowNodeDraggingChanged.bind(this));this.addManagedListener(this.rowNode,Au.EVENT_UI_LEVEL_CHANGED,this.onUiLevelChanged.bind(this));var i=this.beans.eventService;this.addManagedListener(i,hi.EVENT_PAGINATION_PIXEL_OFFSET_CHANGED,this.onPaginationPixelOffsetChanged.bind(this));this.addManagedListener(i,hi.EVENT_HEIGHT_SCALE_CHANGED,this.onTopChanged.bind(this));this.addManagedListener(i,hi.EVENT_DISPLAYED_COLUMNS_CHANGED,this.onDisplayedColumnsChanged.bind(this));this.addManagedListener(i,hi.EVENT_VIRTUAL_COLUMNS_CHANGED,this.onVirtualColumnsChanged.bind(this));this.addManagedListener(i,hi.EVENT_CELL_FOCUSED,this.onCellFocused.bind(this));this.addManagedListener(i,hi.EVENT_CELL_FOCUS_CLEARED,this.onCellFocusCleared.bind(this));this.addManagedListener(i,hi.EVENT_PAGINATION_CHANGED,this.onPaginationChanged.bind(this));this.addManagedListener(i,hi.EVENT_MODEL_UPDATED,this.onModelUpdated.bind(this));this.addManagedListener(i,hi.EVENT_COLUMN_MOVED,this.onColumnMoved.bind(this));this.addListenersForCellComps()};r.prototype.onColumnMoved=function(){this.updateColumnLists()};r.prototype.addListenersForCellComps=function(){var t=this;this.addManagedListener(this.rowNode,Au.EVENT_ROW_INDEX_CHANGED,(function(){t.getAllCellCtrls().forEach((function(t){return t.onRowIndexChanged()}))}));this.addManagedListener(this.rowNode,Au.EVENT_CELL_CHANGED,(function(i){t.getAllCellCtrls().forEach((function(t){return t.onCellChanged(i)}))}))};r.prototype.onRowNodeDataChanged=function(t){var i=this;var n=this.isFullWidth()!==!!this.rowNode.isFullWidthCell();if(n){this.beans.rowRenderer.redrawRow(this.rowNode);return}if(this.isFullWidth()){var r=this.refreshFullWidth();if(!r){this.beans.rowRenderer.redrawRow(this.rowNode)}return}this.getAllCellCtrls().forEach((function(i){return i.refreshCell({suppressFlash:!t.update,newData:!t.update})}));this.allRowGuis.forEach((function(t){i.setRowCompRowId(t.rowComp);i.updateRowBusinessKey();i.setRowCompRowBusinessKey(t.rowComp)}));this.onRowSelected();this.postProcessCss()};r.prototype.onRowNodeCellChanged=function(){this.postProcessCss()};r.prototype.postProcessCss=function(){this.setStylesFromGridOptions(true);this.postProcessClassesFromGridOptions();this.postProcessRowClassRules();this.postProcessRowDragging()};r.prototype.onRowNodeHighlightChanged=function(){var t=this.rowNode.highlighted;this.allRowGuis.forEach((function(i){var n=t===sf.Above;var r=t===sf.Below;i.rowComp.addOrRemoveCssClass("ag-row-highlight-above",n);i.rowComp.addOrRemoveCssClass("ag-row-highlight-below",r)}))};r.prototype.onRowNodeDraggingChanged=function(){this.postProcessRowDragging()};r.prototype.postProcessRowDragging=function(){var t=this.rowNode.dragging;this.allRowGuis.forEach((function(i){return i.rowComp.addOrRemoveCssClass("ag-row-dragging",t)}))};r.prototype.updateExpandedCss=function(){var t=this.rowNode.isExpandable();var i=this.rowNode.expanded==true;this.allRowGuis.forEach((function(n){n.rowComp.addOrRemoveCssClass("ag-row-group",t);n.rowComp.addOrRemoveCssClass("ag-row-group-expanded",t&&i);n.rowComp.addOrRemoveCssClass("ag-row-group-contracted",t&&!i);Tn(n.element,t&&i)}))};r.prototype.onDisplayedColumnsChanged=function(){this.updateColumnLists(true);if(this.beans.columnModel.wasAutoRowHeightEverActive()){this.rowNode.checkAutoHeights()}};r.prototype.onVirtualColumnsChanged=function(){this.updateColumnLists(false,true)};r.prototype.getRowPosition=function(){return{rowPinned:t(this.rowNode.rowPinned),rowIndex:this.rowNode.rowIndex}};r.prototype.onKeyboardNavigate=function(t){var i=this.allRowGuis.find((function(i){return i.element.contains(t.target)}));var n=i?i.element:null;var r=n===t.target;if(!r){return}var e=this.rowNode;var s=this.beans.focusService.getFocusedCell();var o={rowIndex:e.rowIndex,rowPinned:e.rowPinned,column:s&&s.column};this.beans.navigationService.navigateToNextCell(t,t.key,o,true);t.preventDefault()};r.prototype.onTabKeyDown=function(t){if(t.defaultPrevented||Yt(t)){return}var i=this.allRowGuis.find((function(i){return i.element.contains(t.target)}));var n=i?i.element:null;var r=n===t.target;var e=null;if(!r){e=this.beans.focusService.findNextFocusableElement(n,false,t.shiftKey)}if(this.isFullWidth()&&r||!e){this.beans.navigationService.onTabKeyDown(this,t)}};r.prototype.onFullWidthRowFocused=function(t){var i;var n=this.rowNode;var r=!t?false:this.isFullWidth()&&t.rowIndex===n.rowIndex&&t.rowPinned==n.rowPinned;var e=this.fullWidthGui?this.fullWidthGui.element:(i=this.centerGui)===null||i===void 0?void 0:i.element;if(!e){return}e.classList.toggle("ag-full-width-focus",r);if(r){e.focus({preventScroll:true})}};r.prototype.refreshCell=function(t){this.centerCellCtrls=this.removeCellCtrl(this.centerCellCtrls,t);this.leftCellCtrls=this.removeCellCtrl(this.leftCellCtrls,t);this.rightCellCtrls=this.removeCellCtrl(this.rightCellCtrls,t);this.updateColumnLists()};r.prototype.removeCellCtrl=function(t,i){var n={list:[],map:{}};t.list.forEach((function(t){if(t===i){return}n.list.push(t);n.map[t.getInstanceId()]=t}));return n};r.prototype.onMouseEvent=function(t,i){switch(t){case"dblclick":this.onRowDblClick(i);break;case"click":this.onRowClick(i);break;case"touchstart":case"mousedown":this.onRowMouseDown(i);break}};r.prototype.createRowEvent=function(t,i){return{type:t,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:i}};r.prototype.createRowEventWithSource=function(t,i){var n=this.createRowEvent(t,i);n.source=this;return n};r.prototype.onRowDblClick=function(t){if(Yt(t)){return}var i=this.createRowEventWithSource(hi.EVENT_ROW_DOUBLE_CLICKED,t);this.beans.eventService.dispatchEvent(i)};r.prototype.onRowMouseDown=function(t){this.lastMouseDownOnDragger=zr(t.target,"ag-row-drag",3);if(!this.isFullWidth()){return}var i=this.rowNode;var n=this.beans.columnModel;if(this.beans.rangeService){this.beans.rangeService.removeAllCellRanges()}this.beans.focusService.setFocusedCell({rowIndex:i.rowIndex,column:n.getAllDisplayedColumns()[0],rowPinned:i.rowPinned,forceBrowserFocus:true})};r.prototype.onRowClick=function(t){var i=Yt(t)||this.lastMouseDownOnDragger;if(i){return}var n=this.createRowEventWithSource(hi.EVENT_ROW_CLICKED,t);this.beans.eventService.dispatchEvent(n);var r=t.ctrlKey||t.metaKey;var e=t.shiftKey;var s=this.gridOptionsService.is("groupSelectsChildren");if(s&&this.rowNode.group||!this.rowNode.selectable||this.rowNode.rowPinned||!this.gridOptionsService.isRowSelection()||this.gridOptionsService.is("suppressRowClickSelection")){return}var o=this.gridOptionsService.is("rowMultiSelectWithClick");var u=!this.gridOptionsService.is("suppressRowDeselection");var a="rowClicked";if(this.rowNode.isSelected()){if(o){this.rowNode.setSelectedParams({newValue:false,event:t,source:a})}else if(r){if(u){this.rowNode.setSelectedParams({newValue:false,event:t,source:a})}}else{this.rowNode.setSelectedParams({newValue:true,clearSelection:!e,rangeSelect:e,event:t,source:a})}}else{var f=o?false:!r;this.rowNode.setSelectedParams({newValue:true,clearSelection:f,rangeSelect:e,event:t,source:a})}};r.prototype.setupDetailRowAutoHeight=function(t){var i=this;if(this.rowType!==Ph.FullWidthDetail){return}if(!this.gridOptionsService.is("detailRowAutoHeight")){return}var n=function(){var n=t.clientHeight;if(n!=null&&n>0){var r=function(){i.rowNode.setRowHeight(n);if(i.beans.clientSideRowModel){i.beans.clientSideRowModel.onRowHeightChanged()}else if(i.beans.serverSideRowModel){i.beans.serverSideRowModel.onRowHeightChanged()}};i.beans.frameworkOverrides.setTimeout(r,0)}};var r=this.beans.resizeObserverService.observeResize(t,n);this.addDestroyFunc(r);n()};r.prototype.createFullWidthParams=function(t,i){var n=this;var r={fullWidth:true,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:t,eParentOfValue:t,pinned:i,addRenderedRowListener:this.addEventListener.bind(this),registerRowDragger:function(t,i,r,e){return n.addFullWidthRowDragging(t,i,r,e)}};return r};r.prototype.addFullWidthRowDragging=function(t,i,n,r){if(n===void 0){n=""}if(!this.isFullWidth()){return}var e=new Bu((function(){return n}),this.rowNode,undefined,t,i,r);this.createManagedBean(e,this.beans.context)};r.prototype.onUiLevelChanged=function(){var t=this.beans.rowCssClassCalculator.calculateRowLevel(this.rowNode);if(this.rowLevel!=t){var i="ag-row-level-"+t;var n="ag-row-level-"+this.rowLevel;this.allRowGuis.forEach((function(t){t.rowComp.addOrRemoveCssClass(i,true);t.rowComp.addOrRemoveCssClass(n,false)}))}this.rowLevel=t};r.prototype.isFirstRowOnPage=function(){return this.rowNode.rowIndex===this.beans.paginationProxy.getPageFirstRow()};r.prototype.isLastRowOnPage=function(){return this.rowNode.rowIndex===this.beans.paginationProxy.getPageLastRow()};r.prototype.onModelUpdated=function(){this.refreshFirstAndLastRowStyles()};r.prototype.refreshFirstAndLastRowStyles=function(){var t=this.isFirstRowOnPage();var i=this.isLastRowOnPage();if(this.firstRowOnPage!==t){this.firstRowOnPage=t;this.allRowGuis.forEach((function(i){return i.rowComp.addOrRemoveCssClass("ag-row-first",t)}))}if(this.lastRowOnPage!==i){this.lastRowOnPage=i;this.allRowGuis.forEach((function(t){return t.rowComp.addOrRemoveCssClass("ag-row-last",i)}))}};r.prototype.stopEditing=function(t){var i,n;if(t===void 0){t=false}if(this.stoppingRowEdit){return}var r=this.getAllCellCtrls();var e=this.editingRow;this.stoppingRowEdit=true;var s=false;try{for(var o=Mh(r),u=o.next();!u.done;u=o.next()){var a=u.value;var f=a.stopEditing(t);if(e&&!t&&!s&&f){s=true}}}catch(t){i={error:t}}finally{try{if(u&&!u.done&&(n=o.return))n.call(o)}finally{if(i)throw i.error}}if(s){var h=this.createRowEvent(hi.EVENT_ROW_VALUE_CHANGED);this.beans.eventService.dispatchEvent(h)}if(e){this.setEditingRow(false)}this.stoppingRowEdit=false};r.prototype.setInlineEditingCss=function(t){this.allRowGuis.forEach((function(i){i.rowComp.addOrRemoveCssClass("ag-row-inline-editing",t);i.rowComp.addOrRemoveCssClass("ag-row-not-inline-editing",!t)}))};r.prototype.setEditingRow=function(t){this.editingRow=t;this.allRowGuis.forEach((function(i){return i.rowComp.addOrRemoveCssClass("ag-row-editing",t)}));var i=t?this.createRowEvent(hi.EVENT_ROW_EDITING_STARTED):this.createRowEvent(hi.EVENT_ROW_EDITING_STOPPED);this.beans.eventService.dispatchEvent(i)};r.prototype.startRowEditing=function(t,i,n){if(t===void 0){t=null}if(i===void 0){i=null}if(n===void 0){n=null}if(this.editingRow){return}var r=this.getAllCellCtrls().reduce((function(r,e){var s=e===i;if(s){e.startEditing(t,s,n)}else{e.startEditing(null,s,n)}if(r){return true}return e.isEditing()}),false);if(r){this.setEditingRow(true)}};r.prototype.getAllCellCtrls=function(){if(this.leftCellCtrls.list.length===0&&this.rightCellCtrls.list.length===0){return this.centerCellCtrls.list}var t=Gh(Gh(Gh([],Dh(this.centerCellCtrls.list)),Dh(this.leftCellCtrls.list)),Dh(this.rightCellCtrls.list));return t};r.prototype.postProcessClassesFromGridOptions=function(){var t=this;var i=this.beans.rowCssClassCalculator.processClassesFromGridOptions(this.rowNode);if(!i||!i.length){return}i.forEach((function(i){t.allRowGuis.forEach((function(t){return t.rowComp.addOrRemoveCssClass(i,true)}))}))};r.prototype.postProcessRowClassRules=function(){var t=this;this.beans.rowCssClassCalculator.processRowClassRules(this.rowNode,(function(i){t.allRowGuis.forEach((function(t){return t.rowComp.addOrRemoveCssClass(i,true)}))}),(function(i){t.allRowGuis.forEach((function(t){return t.rowComp.addOrRemoveCssClass(i,false)}))}))};r.prototype.setStylesFromGridOptions=function(t,i){var n=this;if(t){this.rowStyles=this.processStylesFromGridOptions()}this.forEachGui(i,(function(t){return t.rowComp.setUserStyles(n.rowStyles)}))};r.prototype.getPinnedForContainer=function(t){var i=t===cc.LEFT?"left":t===cc.RIGHT?"right":null;return i};r.prototype.getInitialRowClasses=function(t){var i=this.getPinnedForContainer(t);var n={rowNode:this.rowNode,rowFocused:this.rowFocused,fadeRowIn:this.fadeInAnimation[t],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:i};return this.beans.rowCssClassCalculator.getInitialRowClasses(n)};r.prototype.processStylesFromGridOptions=function(){var t=this.gridOptionsService.get("rowStyle");if(t&&typeof t==="function"){console.warn("AG Grid: rowStyle should be an object of key/value styles, not be a function, use getRowStyle() instead");return}var i=this.gridOptionsService.getCallback("getRowStyle");var n;if(i){var r={data:this.rowNode.data,node:this.rowNode,rowIndex:this.rowNode.rowIndex};n=i(r)}if(n||t){return Object.assign({},t,n)}return this.emptyStyle};r.prototype.onRowSelected=function(t){var i=this;var n=!!this.rowNode.isSelected();this.forEachGui(t,(function(t){t.rowComp.addOrRemoveCssClass("ag-row-selected",n);zn(t.element,n?true:undefined);var r=i.createAriaLabel();Cn(t.element,r==null?"":r)}))};r.prototype.createAriaLabel=function(){var t=this.rowNode.isSelected();if(t&&this.gridOptionsService.is("suppressRowDeselection")){return undefined}var i=this.beans.localeService.getLocaleTextFunc();var n=i(t?"ariaRowDeselect":"ariaRowSelect","Press SPACE to "+(t?"deselect":"select")+" this row.");return n};r.prototype.isUseAnimationFrameForCreate=function(){return this.useAnimationFrameForCreate};r.prototype.addHoverFunctionality=function(t){var i=this;if(!this.active){return}this.addManagedListener(t,"mouseenter",(function(){return i.rowNode.onMouseEnter()}));this.addManagedListener(t,"mouseleave",(function(){return i.rowNode.onMouseLeave()}));this.addManagedListener(this.rowNode,Au.EVENT_MOUSE_ENTER,(function(){if(!i.beans.dragService.isDragging()&&!i.gridOptionsService.is("suppressRowHoverHighlight")){t.classList.add("ag-row-hover");i.rowNode.setHovered(true)}}));this.addManagedListener(this.rowNode,Au.EVENT_MOUSE_LEAVE,(function(){t.classList.remove("ag-row-hover");i.rowNode.setHovered(false)}))};r.prototype.roundRowTopToBounds=function(t){var i=this.beans.ctrlsService.getGridBodyCtrl();var n=i.getScrollFeature().getVScrollPosition();var r=this.applyPaginationOffset(n.top,true)-100;var e=this.applyPaginationOffset(n.bottom,true)+100;return Math.min(Math.max(r,t),e)};r.prototype.getFrameworkOverrides=function(){return this.beans.frameworkOverrides};r.prototype.forEachGui=function(t,i){if(t){i(t)}else{this.allRowGuis.forEach(i)}};r.prototype.onRowHeightChanged=function(t){if(this.rowNode.rowHeight==null){return}var i=this.rowNode.rowHeight;var n=this.beans.environment.getDefaultRowHeight();var r=this.gridOptionsService.isGetRowHeightFunction();var e=r?this.gridOptionsService.getRowHeightForNode(this.rowNode).height:undefined;var s=e?Math.min(n,e)-2+"px":undefined;this.forEachGui(t,(function(t){t.element.style.height=i+"px";if(s){t.element.style.setProperty("--ag-line-height",s)}}))};r.prototype.addEventListener=function(t,i){n.prototype.addEventListener.call(this,t,i)};r.prototype.removeEventListener=function(t,i){n.prototype.removeEventListener.call(this,t,i)};r.prototype.destroyFirstPass=function(){this.active=false;if(this.gridOptionsService.isAnimateRows()){this.setupRemoveAnimation()}this.rowNode.setHovered(false);var t=this.createRowEvent(hi.EVENT_VIRTUAL_ROW_REMOVED);this.dispatchEvent(t);this.beans.eventService.dispatchEvent(t);n.prototype.destroy.call(this)};r.prototype.setupRemoveAnimation=function(){if(this.isSticky()){return}var t=this.rowNode.rowTop!=null;if(t){var i=this.roundRowTopToBounds(this.rowNode.rowTop);this.setRowTop(i)}else{this.allRowGuis.forEach((function(t){return t.rowComp.addOrRemoveCssClass("ag-opacity-zero",true)}))}};r.prototype.destroySecondPass=function(){this.allRowGuis.length=0;var t=function(t){t.list.forEach((function(t){return t.destroy()}));return{list:[],map:{}}};this.centerCellCtrls=t(this.centerCellCtrls);this.leftCellCtrls=t(this.leftCellCtrls);this.rightCellCtrls=t(this.rightCellCtrls)};r.prototype.setFocusedClasses=function(t){var i=this;this.forEachGui(t,(function(t){t.rowComp.addOrRemoveCssClass("ag-row-focus",i.rowFocused);t.rowComp.addOrRemoveCssClass("ag-row-no-focus",!i.rowFocused)}))};r.prototype.onCellFocused=function(){this.onCellFocusChanged()};r.prototype.onCellFocusCleared=function(){this.onCellFocusChanged()};r.prototype.onCellFocusChanged=function(){var t=this.beans.focusService.isRowFocused(this.rowNode.rowIndex,this.rowNode.rowPinned);if(t!==this.rowFocused){this.rowFocused=t;this.setFocusedClasses()}if(!t&&this.editingRow){this.stopEditing(false)}};r.prototype.onPaginationChanged=function(){var t=this.beans.paginationProxy.getCurrentPage();if(this.paginationPage!==t){this.paginationPage=t;this.onTopChanged()}this.refreshFirstAndLastRowStyles()};r.prototype.onTopChanged=function(){this.setRowTop(this.rowNode.rowTop)};r.prototype.onPaginationPixelOffsetChanged=function(){this.onTopChanged()};r.prototype.applyPaginationOffset=function(t,i){if(i===void 0){i=false}if(this.rowNode.isRowPinned()||this.rowNode.sticky){return t}var n=this.beans.paginationProxy.getPixelOffset();var r=i?1:-1;return t+n*r};r.prototype.setRowTop=function(t){if(this.printLayout){return}if(i(t)){var n=this.applyPaginationOffset(t);var r=this.rowNode.isRowPinned()||this.rowNode.sticky;var e=r?n:this.beans.rowContainerHeightService.getRealPixelPosition(n);var s=e+"px";this.setRowTopStyle(s)}};r.prototype.getInitialRowTop=function(t){var i=this.gridOptionsService.is("suppressRowTransform");return i?this.getInitialRowTopShared(t):undefined};r.prototype.getInitialTransform=function(t){var i=this.gridOptionsService.is("suppressRowTransform");return i?undefined:"translateY("+this.getInitialRowTopShared(t)+")"};r.prototype.getInitialRowTopShared=function(t){if(this.printLayout){return""}var i;if(this.isSticky()){i=this.rowNode.stickyRowTop}else{var n=this.slideInAnimation[t]?this.roundRowTopToBounds(this.rowNode.oldRowTop):this.rowNode.rowTop;var r=this.applyPaginationOffset(n);i=this.rowNode.isRowPinned()?r:this.beans.rowContainerHeightService.getRealPixelPosition(r)}return i+"px"};r.prototype.setRowTopStyle=function(t){var i=this.gridOptionsService.is("suppressRowTransform");this.allRowGuis.forEach((function(n){return i?n.rowComp.setTop(t):n.rowComp.setTransform("translateY("+t+")")}))};r.prototype.getRowNode=function(){return this.rowNode};r.prototype.getCellCtrl=function(t){var i=null;this.getAllCellCtrls().forEach((function(n){if(n.getColumn()==t){i=n}}));if(i!=null){return i}this.getAllCellCtrls().forEach((function(n){if(n.getColSpanningList().indexOf(t)>=0){i=n}}));return i};r.prototype.onRowIndexChanged=function(){if(this.rowNode.rowIndex!=null){this.onCellFocusChanged();this.updateRowIndexes();this.postProcessCss()}};r.prototype.getRowIndex=function(){return this.rowNode.getRowIndexString()};r.prototype.updateRowIndexes=function(t){var i=this.rowNode.getRowIndexString();var n=this.beans.headerNavigationService.getHeaderRowCount()+this.beans.filterManager.getHeaderRowCount();var r=this.rowNode.rowIndex%2===0;var e=n+this.rowNode.rowIndex+1;this.forEachGui(t,(function(t){t.rowComp.setRowIndex(i);t.rowComp.addOrRemoveCssClass("ag-row-even",r);t.rowComp.addOrRemoveCssClass("ag-row-odd",!r);In(t.element,e)}))};r.prototype.getPinnedLeftRowElement=function(){return this.leftGui?this.leftGui.element:undefined};r.prototype.getPinnedRightRowElement=function(){return this.rightGui?this.rightGui.element:undefined};r.prototype.getBodyRowElement=function(){return this.centerGui?this.centerGui.element:undefined};r.prototype.getFullWidthRowElement=function(){return this.fullWidthGui?this.fullWidthGui.element:undefined};r.DOM_DATA_KEY_ROW_CTRL="renderedRow";return r}(ri);var Nh=function(){var t=function(i,n){t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var n in i)if(Object.prototype.hasOwnProperty.call(i,n))t[n]=i[n]};return t(i,n)};return function(i,n){if(typeof n!=="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(i,n);function r(){this.constructor=i}i.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}();var Hh=function(t,i,n,r){var e=arguments.length,s=e<3?i:r===null?r=Object.getOwnPropertyDescriptor(i,n):r,o;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")s=Reflect.decorate(t,i,n,r);else for(var u=t.length-1;u>=0;u--)if(o=t[u])s=(e<3?o(s):e>3?o(i,n,s):o(i,n))||s;return e>3&&s&&Object.defineProperty(i,n,s),s};var Lh=function(t,i){var n=typeof Symbol==="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),e,s=[],o;try{while((i===void 0||i-- >0)&&!(e=r.next()).done)s.push(e.value)}catch(t){o={error:t}}finally{try{if(e&&!e.done&&(n=r["return"]))n.call(r)}finally{if(o)throw o.error}}return s};var Vh=function(t){Nh(i,t);function i(i){var n=t.call(this)||this;n.element=i;return n}i.prototype.postConstruct=function(){this.addKeyboardListeners();this.addMouseListeners();this.mockContextMenuForIPad()};i.prototype.addKeyboardListeners=function(){var t="keydown";var i=this.processKeyboardEvent.bind(this,t);this.addManagedListener(this.element,t,i)};i.prototype.addMouseListeners=function(){var t=this;var i=Qt("touchstart")?"touchstart":"mousedown";var n=["dblclick","contextmenu","mouseover","mouseout","click",i];n.forEach((function(i){var n=t.processMouseEvent.bind(t,i);t.addManagedListener(t.element,i,n)}))};i.prototype.processMouseEvent=function(t,i){if(!this.mouseEventService.isEventFromThisGrid(i)||Yt(i)){return}var n=this.getRowForEvent(i);var r=this.mouseEventService.getRenderedCellForEvent(i);if(t==="contextmenu"){this.handleContextMenuMouseEvent(i,null,n,r)}else{if(r){r.onMouseEvent(t,i)}if(n){n.onMouseEvent(t,i)}}};i.prototype.mockContextMenuForIPad=function(){var t=this;if(!ur()){return}var i=new Qo(this.element);var n=function(i){var n=t.getRowForEvent(i.touchEvent);var r=t.mouseEventService.getRenderedCellForEvent(i.touchEvent);t.handleContextMenuMouseEvent(null,i.touchEvent,n,r)};this.addManagedListener(i,Qo.EVENT_LONG_TAP,n);this.addDestroyFunc((function(){return i.destroy()}))};i.prototype.getRowForEvent=function(t){var i=t.target;while(i){var n=this.gridOptionsService.getDomData(i,Ih.DOM_DATA_KEY_ROW_CTRL);if(n){return n}i=i.parentElement}return null};i.prototype.handleContextMenuMouseEvent=function(t,i,n,r){var e=n?n.getRowNode():null;var s=r?r.getColumn():null;var o=null;if(s){var u=t?t:i;r.dispatchCellContextMenuEvent(u);o=this.valueService.getValue(s,e)}var a=this.ctrlsService.getGridBodyCtrl();var f=r?r.getGui():a.getGridBodyElement();if(this.contextMenuFactory){this.contextMenuFactory.onContextMenu(t,i,e,s,o,f)}};i.prototype.getControlsForEventTarget=function(t){return{cellCtrl:Jt(this.gridOptionsService,t,kh.DOM_DATA_KEY_CELL_CTRL),rowCtrl:Jt(this.gridOptionsService,t,Ih.DOM_DATA_KEY_ROW_CTRL)}};i.prototype.processKeyboardEvent=function(t,i){var n=this.getControlsForEventTarget(i.target),r=n.cellCtrl,e=n.rowCtrl;if(i.defaultPrevented){return}if(r){this.processCellKeyboardEvent(r,t,i)}else if(e&&e.isFullWidth()){this.processFullWidthRowKeyboardEvent(e,t,i)}};i.prototype.processCellKeyboardEvent=function(t,i,n){var r=t.getRowNode();var e=t.getColumn();var s=t.isEditing();var o=!He(this.gridOptionsService,n,r,e,s);if(o){if(i==="keydown"){var u=!s&&this.navigationService.handlePageScrollingKey(n);if(!u){t.onKeyDown(n)}this.doGridOperations(n,t.isEditing());if(Ne(n)){t.processCharacter(n)}}}if(i==="keydown"){var a=t.createEvent(n,hi.EVENT_CELL_KEY_DOWN);this.eventService.dispatchEvent(a)}};i.prototype.processFullWidthRowKeyboardEvent=function(t,i,n){var r=t.getRowNode();var e=this.focusService.getFocusedCell();var s=e&&e.column;var o=!He(this.gridOptionsService,n,r,s,false);if(o){var u=n.key;if(i==="keydown"){switch(u){case Te.PAGE_HOME:case Te.PAGE_END:case Te.PAGE_UP:case Te.PAGE_DOWN:this.navigationService.handlePageScrollingKey(n,true);break;case Te.UP:case Te.DOWN:t.onKeyboardNavigate(n);break;case Te.TAB:t.onTabKeyDown(n);break}}}if(i==="keydown"){var a=t.createRowEvent(hi.EVENT_CELL_KEY_DOWN,n);this.eventService.dispatchEvent(a)}};i.prototype.doGridOperations=function(t,i){if(!t.ctrlKey&&!t.metaKey){return}if(i){return}if(!this.mouseEventService.isEventFromThisGrid(t)){return}var n=Ve(t);if(n===Te.A){return this.onCtrlAndA(t)}if(n===Te.C){return this.onCtrlAndC(t)}if(n===Te.D){return this.onCtrlAndD(t)}if(n===Te.V){return this.onCtrlAndV(t)}if(n===Te.X){return this.onCtrlAndX(t)}if(n===Te.Y){return this.onCtrlAndY()}if(n===Te.Z){return this.onCtrlAndZ(t)}};i.prototype.onCtrlAndA=function(t){var i=this,n=i.pinnedRowModel,e=i.paginationProxy,s=i.rangeService;if(s&&e.isRowsToRender()){var o=Lh([n.isEmpty("top"),n.isEmpty("bottom")],2),u=o[0],a=o[1];var f=u?null:"top";var h=void 0;var c=void 0;if(a){h=null;c=this.paginationProxy.getRowCount()-1}else{h="bottom";c=n.getPinnedBottomRowData().length-1}var l=this.columnModel.getAllDisplayedColumns();if(r(l)){return}s.setCellRange({rowStartIndex:0,rowStartPinned:f,rowEndIndex:c,rowEndPinned:h,columnStart:l[0],columnEnd:xt(l)})}t.preventDefault()};i.prototype.onCtrlAndC=function(t){if(!this.clipboardService||this.gridOptionsService.is("enableCellTextSelection")){return}var i=this.getControlsForEventTarget(t.target),n=i.cellCtrl,r=i.rowCtrl;if((n===null||n===void 0?void 0:n.isEditing())||(r===null||r===void 0?void 0:r.isEditing())){return}t.preventDefault();this.clipboardService.copyToClipboard()};i.prototype.onCtrlAndX=function(t){if(!this.clipboardService||this.gridOptionsService.is("enableCellTextSelection")||this.gridOptionsService.is("suppressCutToClipboard")){return}var i=this.getControlsForEventTarget(t.target),n=i.cellCtrl,r=i.rowCtrl;if((n===null||n===void 0?void 0:n.isEditing())||(r===null||r===void 0?void 0:r.isEditing())){return}t.preventDefault();this.clipboardService.cutToClipboard(undefined,"ui")};i.prototype.onCtrlAndV=function(t){var i=this.getControlsForEventTarget(t.target),n=i.cellCtrl,r=i.rowCtrl;if((n===null||n===void 0?void 0:n.isEditing())||(r===null||r===void 0?void 0:r.isEditing())){return}if(this.clipboardService&&!this.gridOptionsService.is("suppressClipboardPaste")){this.clipboardService.pasteFromClipboard()}};i.prototype.onCtrlAndD=function(t){if(this.clipboardService&&!this.gridOptionsService.is("suppressClipboardPaste")){this.clipboardService.copyRangeDown()}t.preventDefault()};i.prototype.onCtrlAndZ=function(t){if(!this.gridOptionsService.is("undoRedoCellEditing")){return}t.preventDefault();if(t.shiftKey){this.undoRedoService.redo("ui")}else{this.undoRedoService.undo("ui")}};i.prototype.onCtrlAndY=function(){this.undoRedoService.redo("ui")};Hh([ut("mouseEventService")],i.prototype,"mouseEventService",void 0);Hh([ut("valueService")],i.prototype,"valueService",void 0);Hh([at("contextMenuFactory")],i.prototype,"contextMenuFactory",void 0);Hh([ut("ctrlsService")],i.prototype,"ctrlsService",void 0);Hh([ut("navigationService")],i.prototype,"navigationService",void 0);Hh([ut("focusService")],i.prototype,"focusService",void 0);Hh([ut("undoRedoService")],i.prototype,"undoRedoService",void 0);Hh([ut("columnModel")],i.prototype,"columnModel",void 0);Hh([ut("paginationProxy")],i.prototype,"paginationProxy",void 0);Hh([ut("pinnedRowModel")],i.prototype,"pinnedRowModel",void 0);Hh([at("rangeService")],i.prototype,"rangeService",void 0);Hh([at("clipboardService")],i.prototype,"clipboardService",void 0);Hh([et],i.prototype,"postConstruct",null);return i}(ri);var Bh=function(){var t=function(i,n){t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var n in i)if(Object.prototype.hasOwnProperty.call(i,n))t[n]=i[n]};return t(i,n)};return function(i,n){if(typeof n!=="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(i,n);function r(){this.constructor=i}i.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}();var zh=function(t,i,n,r){var e=arguments.length,s=e<3?i:r===null?r=Object.getOwnPropertyDescriptor(i,n):r,o;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")s=Reflect.decorate(t,i,n,r);else for(var u=t.length-1;u>=0;u--)if(o=t[u])s=(e<3?o(s):e>3?o(i,n,s):o(i,n))||s;return e>3&&s&&Object.defineProperty(i,n,s),s};var Wh=function(t){Bh(i,t);function i(i){var n=t.call(this)||this;n.centerContainerCtrl=i;return n}i.prototype.postConstruct=function(){var t=this;this.ctrlsService.whenReady((function(){t.gridBodyCtrl=t.ctrlsService.getGridBodyCtrl();t.listenForResize()}));this.addManagedListener(this.eventService,hi.EVENT_SCROLLBAR_WIDTH_CHANGED,this.onScrollbarWidthChanged.bind(this))};i.prototype.listenForResize=function(){var t=this;var i=function(){return t.onCenterViewportResized()};this.centerContainerCtrl.registerViewportResizeListener(i);this.gridBodyCtrl.registerBodyViewportResizeListener(i)};i.prototype.onScrollbarWidthChanged=function(){this.checkViewportAndScrolls()};i.prototype.onCenterViewportResized=function(){if(this.centerContainerCtrl.isViewportVisible()){this.checkViewportAndScrolls();var t=this.centerContainerCtrl.getCenterWidth();if(t!==this.centerWidth){this.centerWidth=t;this.columnModel.refreshFlexedColumns({viewportWidth:this.centerWidth,updateBodyWidths:true,fireResizedEvent:true})}}else{this.bodyHeight=0}};i.prototype.checkViewportAndScrolls=function(){this.updateScrollVisibleService();this.checkBodyHeight();this.onHorizontalViewportChanged();this.gridBodyCtrl.getScrollFeature().checkScrollLeft()};i.prototype.getBodyHeight=function(){return this.bodyHeight};i.prototype.checkBodyHeight=function(){var t=this.gridBodyCtrl.getBodyViewportElement();var i=Ur(t);if(this.bodyHeight!==i){this.bodyHeight=i;var n={type:hi.EVENT_BODY_HEIGHT_CHANGED};this.eventService.dispatchEvent(n)}};i.prototype.updateScrollVisibleService=function(){this.updateScrollVisibleServiceImpl();setTimeout(this.updateScrollVisibleServiceImpl.bind(this),500)};i.prototype.updateScrollVisibleServiceImpl=function(){var t={horizontalScrollShowing:this.isHorizontalScrollShowing(),verticalScrollShowing:this.gridBodyCtrl.isVerticalScrollShowing()};this.scrollVisibleService.setScrollsVisible(t)};i.prototype.isHorizontalScrollShowing=function(){return this.centerContainerCtrl.isHorizontalScrollShowing()};i.prototype.onHorizontalViewportChanged=function(){var t=this.centerContainerCtrl.getCenterWidth();var i=this.centerContainerCtrl.getViewportScrollLeft();this.columnModel.setViewportPosition(t,i)};zh([ut("ctrlsService")],i.prototype,"ctrlsService",void 0);zh([ut("columnModel")],i.prototype,"columnModel",void 0);zh([ut("scrollVisibleService")],i.prototype,"scrollVisibleService",void 0);zh([et],i.prototype,"postConstruct",null);return i}(ri);var Uh=function(){var t=function(i,n){t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var n in i)if(Object.prototype.hasOwnProperty.call(i,n))t[n]=i[n]};return t(i,n)};return function(i,n){if(typeof n!=="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(i,n);function r(){this.constructor=i}i.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}();var Kh=function(t,i,n,r){var e=arguments.length,s=e<3?i:r===null?r=Object.getOwnPropertyDescriptor(i,n):r,o;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")s=Reflect.decorate(t,i,n,r);else for(var u=t.length-1;u>=0;u--)if(o=t[u])s=(e<3?o(s):e>3?o(i,n,s):o(i,n))||s;return e>3&&s&&Object.defineProperty(i,n,s),s};var qh=function(t){Uh(i,t);function i(i){var n=t.call(this)||this;n.element=i;return n}i.prototype.postConstruct=function(){this.addManagedListener(this.eventService,hi.EVENT_LEFT_PINNED_WIDTH_CHANGED,this.onPinnedLeftWidthChanged.bind(this))};i.prototype.onPinnedLeftWidthChanged=function(){var t=this.pinnedWidthService.getPinnedLeftWidth();var i=t>0;Lr(this.element,i);ge(this.element,t)};i.prototype.getWidth=function(){return this.pinnedWidthService.getPinnedLeftWidth()};Kh([ut("pinnedWidthService")],i.prototype,"pinnedWidthService",void 0);Kh([et],i.prototype,"postConstruct",null);return i}(ri);var Yh=function(){var t=function(i,n){t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var n in i)if(Object.prototype.hasOwnProperty.call(i,n))t[n]=i[n]};return t(i,n)};return function(i,n){if(typeof n!=="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(i,n);function r(){this.constructor=i}i.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}();var Qh=function(t,i,n,r){var e=arguments.length,s=e<3?i:r===null?r=Object.getOwnPropertyDescriptor(i,n):r,o;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")s=Reflect.decorate(t,i,n,r);else for(var u=t.length-1;u>=0;u--)if(o=t[u])s=(e<3?o(s):e>3?o(i,n,s):o(i,n))||s;return e>3&&s&&Object.defineProperty(i,n,s),s};var Jh=function(t){Yh(i,t);function i(i){var n=t.call(this)||this;n.element=i;return n}i.prototype.postConstruct=function(){this.addManagedListener(this.eventService,hi.EVENT_RIGHT_PINNED_WIDTH_CHANGED,this.onPinnedRightWidthChanged.bind(this))};i.prototype.onPinnedRightWidthChanged=function(){var t=this.pinnedWidthService.getPinnedRightWidth();var i=t>0;Lr(this.element,i);ge(this.element,t)};i.prototype.getWidth=function(){return this.pinnedWidthService.getPinnedRightWidth()};Qh([ut("pinnedWidthService")],i.prototype,"pinnedWidthService",void 0);Qh([et],i.prototype,"postConstruct",null);return i}(ri);var Zh=function(){var t=function(i,n){t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var n in i)if(Object.prototype.hasOwnProperty.call(i,n))t[n]=i[n]};return t(i,n)};return function(i,n){if(typeof n!=="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(i,n);function r(){this.constructor=i}i.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}();var $h=function(t,i,n,r){var e=arguments.length,s=e<3?i:r===null?r=Object.getOwnPropertyDescriptor(i,n):r,o;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")s=Reflect.decorate(t,i,n,r);else for(var u=t.length-1;u>=0;u--)if(o=t[u])s=(e<3?o(s):e>3?o(i,n,s):o(i,n))||s;return e>3&&s&&Object.defineProperty(i,n,s),s};var Xh=function(t){Zh(i,t);function i(i,n){var r=t.call(this)||this;r.eContainer=i;r.eViewport=n;return r}i.prototype.postConstruct=function(){this.addManagedListener(this.eventService,hi.EVENT_ROW_CONTAINER_HEIGHT_CHANGED,this.onHeightChanged.bind(this))};i.prototype.onHeightChanged=function(){var t=this.maxDivHeightScaler.getUiContainerHeight();var i=t!=null?t+"px":"";this.eContainer.style.height=i;if(this.eViewport){this.eViewport.style.height=i}};$h([ut("rowContainerHeightService")],i.prototype,"maxDivHeightScaler",void 0);$h([et],i.prototype,"postConstruct",null);return i}(ri);var tc=function(){var t=function(i,n){t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var n in i)if(Object.prototype.hasOwnProperty.call(i,n))t[n]=i[n]};return t(i,n)};return function(i,n){if(typeof n!=="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(i,n);function r(){this.constructor=i}i.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}();var ic=function(t,i,n,r){var e=arguments.length,s=e<3?i:r===null?r=Object.getOwnPropertyDescriptor(i,n):r,o;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")s=Reflect.decorate(t,i,n,r);else for(var u=t.length-1;u>=0;u--)if(o=t[u])s=(e<3?o(s):e>3?o(i,n,s):o(i,n))||s;return e>3&&s&&Object.defineProperty(i,n,s),s};var nc=function(t){tc(i,t);function i(i){var n=t.call(this)||this;n.eContainer=i;return n}i.prototype.postConstruct=function(){var t=this;if(!this.gridOptionsService.is("enableRangeSelection")||n(this.rangeService)){return}var i={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(i);this.addDestroyFunc((function(){return t.dragService.removeDragSource(i)}))};ic([at("rangeService")],i.prototype,"rangeService",void 0);ic([ut("dragService")],i.prototype,"dragService",void 0);ic([et],i.prototype,"postConstruct",null);return i}(ri);var rc=function(){var t=function(i,n){t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var n in i)if(Object.prototype.hasOwnProperty.call(i,n))t[n]=i[n]};return t(i,n)};return function(i,n){if(typeof n!=="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(i,n);function r(){this.constructor=i}i.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}();var ec=function(t,i,n,r){var e=arguments.length,s=e<3?i:r===null?r=Object.getOwnPropertyDescriptor(i,n):r,o;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")s=Reflect.decorate(t,i,n,r);else for(var u=t.length-1;u>=0;u--)if(o=t[u])s=(e<3?o(s):e>3?o(i,n,s):o(i,n))||s;return e>3&&s&&Object.defineProperty(i,n,s),s};var sc=function(t){rc(i,t);function i(i,n){if(n===void 0){n=false}var r=t.call(this)||this;r.callback=i;r.addSpacer=n;return r}i.prototype.postConstruct=function(){var t=this.setWidth.bind(this);this.addManagedPropertyListener("domLayout",t);this.addManagedListener(this.eventService,hi.EVENT_DISPLAYED_COLUMNS_CHANGED,t);this.addManagedListener(this.eventService,hi.EVENT_DISPLAYED_COLUMNS_WIDTH_CHANGED,t);this.addManagedListener(this.eventService,hi.EVENT_LEFT_PINNED_WIDTH_CHANGED,t);if(this.addSpacer){this.addManagedListener(this.eventService,hi.EVENT_RIGHT_PINNED_WIDTH_CHANGED,t);this.addManagedListener(this.eventService,hi.EVENT_SCROLL_VISIBILITY_CHANGED,t);this.addManagedListener(this.eventService,hi.EVENT_SCROLLBAR_WIDTH_CHANGED,t)}this.setWidth()};i.prototype.setWidth=function(){var t=this.columnModel;var i=this.gridOptionsService.isDomLayout("print");var n=t.getBodyContainerWidth();var r=t.getDisplayedColumnsLeftWidth();var e=t.getDisplayedColumnsRightWidth();var s;if(i){s=n+r+e}else{s=n;if(this.addSpacer){var o=this.gridOptionsService.is("enableRtl")?r:e;if(o===0&&this.scrollVisibleService.isVerticalScrollShowing()){s+=this.gridOptionsService.getScrollbarWidth()}}}this.callback(s)};ec([ut("columnModel")],i.prototype,"columnModel",void 0);ec([ut("scrollVisibleService")],i.prototype,"scrollVisibleService",void 0);ec([et],i.prototype,"postConstruct",null);return i}(ri);var oc=function(){var t=function(i,n){t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var n in i)if(Object.prototype.hasOwnProperty.call(i,n))t[n]=i[n]};return t(i,n)};return function(i,n){if(typeof n!=="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(i,n);function r(){this.constructor=i}i.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}();var uc=function(t,i,n,r){var e=arguments.length,s=e<3?i:r===null?r=Object.getOwnPropertyDescriptor(i,n):r,o;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")s=Reflect.decorate(t,i,n,r);else for(var u=t.length-1;u>=0;u--)if(o=t[u])s=(e<3?o(s):e>3?o(i,n,s):o(i,n))||s;return e>3&&s&&Object.defineProperty(i,n,s),s};var ac=function(t,i){var n=typeof Symbol==="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),e,s=[],o;try{while((i===void 0||i-- >0)&&!(e=r.next()).done)s.push(e.value)}catch(t){o={error:t}}finally{try{if(e&&!e.done&&(n=r["return"]))n.call(r)}finally{if(o)throw o.error}}return s};var fc=function(t,i){for(var n=0,r=i.length,e=t.length;n<r;n++,e++)t[e]=i[n];return t};var hc;(function(t){t["LEFT"]="left";t["RIGHT"]="right";t["CENTER"]="center";t["FULL_WIDTH"]="fullWidth";t["TOP_LEFT"]="topLeft";t["TOP_RIGHT"]="topRight";t["TOP_CENTER"]="topCenter";t["TOP_FULL_WIDTH"]="topFullWidth";t["STICKY_TOP_LEFT"]="stickyTopLeft";t["STICKY_TOP_RIGHT"]="stickyTopRight";t["STICKY_TOP_CENTER"]="stickyTopCenter";t["STICKY_TOP_FULL_WIDTH"]="stickyTopFullWidth";t["BOTTOM_LEFT"]="bottomLeft";t["BOTTOM_RIGHT"]="bottomRight";t["BOTTOM_CENTER"]="bottomCenter";t["BOTTOM_FULL_WIDTH"]="bottomFullWidth"})(hc||(hc={}));var cc;(function(t){t["LEFT"]="left";t["RIGHT"]="right";t["CENTER"]="center";t["FULL_WIDTH"]="fullWidth"})(cc||(cc={}));function lc(t){switch(t){case hc.CENTER:case hc.TOP_CENTER:case hc.STICKY_TOP_CENTER:case hc.BOTTOM_CENTER:return cc.CENTER;case hc.LEFT:case hc.TOP_LEFT:case hc.STICKY_TOP_LEFT:case hc.BOTTOM_LEFT:return cc.LEFT;case hc.RIGHT:case hc.TOP_RIGHT:case hc.STICKY_TOP_RIGHT:case hc.BOTTOM_RIGHT:return cc.RIGHT;case hc.FULL_WIDTH:case hc.TOP_FULL_WIDTH:case hc.STICKY_TOP_FULL_WIDTH:case hc.BOTTOM_FULL_WIDTH:return cc.FULL_WIDTH;default:throw Error("Invalid Row Container Type")}}var vc=ji([[hc.CENTER,"ag-center-cols-container"],[hc.LEFT,"ag-pinned-left-cols-container"],[hc.RIGHT,"ag-pinned-right-cols-container"],[hc.FULL_WIDTH,"ag-full-width-container"],[hc.TOP_CENTER,"ag-floating-top-container"],[hc.TOP_LEFT,"ag-pinned-left-floating-top"],[hc.TOP_RIGHT,"ag-pinned-right-floating-top"],[hc.TOP_FULL_WIDTH,"ag-floating-top-full-width-container"],[hc.STICKY_TOP_CENTER,"ag-sticky-top-container"],[hc.STICKY_TOP_LEFT,"ag-pinned-left-sticky-top"],[hc.STICKY_TOP_RIGHT,"ag-pinned-right-sticky-top"],[hc.STICKY_TOP_FULL_WIDTH,"ag-sticky-top-full-width-container"],[hc.BOTTOM_CENTER,"ag-floating-bottom-container"],[hc.BOTTOM_LEFT,"ag-pinned-left-floating-bottom"],[hc.BOTTOM_RIGHT,"ag-pinned-right-floating-bottom"],[hc.BOTTOM_FULL_WIDTH,"ag-floating-bottom-full-width-container"]]);var dc=ji([[hc.CENTER,"ag-center-cols-viewport"],[hc.TOP_CENTER,"ag-floating-top-viewport"],[hc.STICKY_TOP_CENTER,"ag-sticky-top-viewport"],[hc.BOTTOM_CENTER,"ag-floating-bottom-viewport"]]);var pc=function(t){oc(i,t);function i(i){var n=t.call(this)||this;n.visible=true;n.EMPTY_CTRLS=[];n.name=i;n.isFullWithContainer=n.name===hc.TOP_FULL_WIDTH||n.name===hc.STICKY_TOP_FULL_WIDTH||n.name===hc.BOTTOM_FULL_WIDTH||n.name===hc.FULL_WIDTH;return n}i.getRowContainerCssClasses=function(t){var i=vc.get(t);var n=dc.get(t);return{container:i,viewport:n}};i.getPinned=function(t){switch(t){case hc.BOTTOM_LEFT:case hc.TOP_LEFT:case hc.STICKY_TOP_LEFT:case hc.LEFT:return"left";case hc.BOTTOM_RIGHT:case hc.TOP_RIGHT:case hc.STICKY_TOP_RIGHT:case hc.RIGHT:return"right";default:return null}};i.prototype.postConstruct=function(){var t=this;this.enableRtl=this.gridOptionsService.is("enableRtl");this.embedFullWidthRows=this.gridOptionsService.is("embedFullWidthRows");this.forContainers([hc.CENTER],(function(){return t.viewportSizeFeature=t.createManagedBean(new Wh(t))}))};i.prototype.registerWithCtrlsService=function(){switch(this.name){case hc.CENTER:this.ctrlsService.registerCenterRowContainerCtrl(this);break;case hc.LEFT:this.ctrlsService.registerLeftRowContainerCtrl(this);break;case hc.RIGHT:this.ctrlsService.registerRightRowContainerCtrl(this);break;case hc.TOP_CENTER:this.ctrlsService.registerTopCenterRowContainerCtrl(this);break;case hc.TOP_LEFT:this.ctrlsService.registerTopLeftRowContainerCon(this);break;case hc.TOP_RIGHT:this.ctrlsService.registerTopRightRowContainerCtrl(this);break;case hc.STICKY_TOP_CENTER:this.ctrlsService.registerStickyTopCenterRowContainerCtrl(this);break;case hc.STICKY_TOP_LEFT:this.ctrlsService.registerStickyTopLeftRowContainerCon(this);break;case hc.STICKY_TOP_RIGHT:this.ctrlsService.registerStickyTopRightRowContainerCtrl(this);break;case hc.BOTTOM_CENTER:this.ctrlsService.registerBottomCenterRowContainerCtrl(this);break;case hc.BOTTOM_LEFT:this.ctrlsService.registerBottomLeftRowContainerCtrl(this);break;case hc.BOTTOM_RIGHT:this.ctrlsService.registerBottomRightRowContainerCtrl(this);break}};i.prototype.forContainers=function(t,i){if(t.indexOf(this.name)>=0){i()}};i.prototype.getContainerElement=function(){return this.eContainer};i.prototype.getViewportSizeFeature=function(){return this.viewportSizeFeature};i.prototype.setComp=function(t,i,n){var r=this;this.comp=t;this.eContainer=i;this.eViewport=n;this.createManagedBean(new Vh(this.eContainer));this.addPreventScrollWhileDragging();this.listenOnDomOrder();this.stopHScrollOnPinnedRows();var e=[hc.TOP_CENTER,hc.TOP_LEFT,hc.TOP_RIGHT];var s=[hc.STICKY_TOP_CENTER,hc.STICKY_TOP_LEFT,hc.STICKY_TOP_RIGHT];var o=[hc.BOTTOM_CENTER,hc.BOTTOM_LEFT,hc.BOTTOM_RIGHT];var u=[hc.CENTER,hc.LEFT,hc.RIGHT];var a=fc(fc(fc(fc([],ac(e)),ac(o)),ac(u)),ac(s));var f=[hc.CENTER,hc.LEFT,hc.RIGHT,hc.FULL_WIDTH];var h=[hc.CENTER,hc.TOP_CENTER,hc.STICKY_TOP_CENTER,hc.BOTTOM_CENTER];var c=[hc.LEFT,hc.BOTTOM_LEFT,hc.TOP_LEFT,hc.STICKY_TOP_LEFT];var l=[hc.RIGHT,hc.BOTTOM_RIGHT,hc.TOP_RIGHT,hc.STICKY_TOP_RIGHT];this.forContainers(c,(function(){r.pinnedWidthFeature=r.createManagedBean(new qh(r.eContainer));r.addManagedListener(r.eventService,hi.EVENT_LEFT_PINNED_WIDTH_CHANGED,(function(){return r.onPinnedWidthChanged()}))}));this.forContainers(l,(function(){r.pinnedWidthFeature=r.createManagedBean(new Jh(r.eContainer));r.addManagedListener(r.eventService,hi.EVENT_RIGHT_PINNED_WIDTH_CHANGED,(function(){return r.onPinnedWidthChanged()}))}));this.forContainers(f,(function(){return r.createManagedBean(new Xh(r.eContainer,r.name===hc.CENTER?n:undefined))}));this.forContainers(a,(function(){return r.createManagedBean(new nc(r.eContainer))}));this.forContainers(h,(function(){return r.createManagedBean(new sc((function(t){return r.comp.setContainerWidth(t+"px")})))}));if(pr()){this.forContainers([hc.CENTER],(function(){var t=r.enableRtl?hi.EVENT_LEFT_PINNED_WIDTH_CHANGED:hi.EVENT_RIGHT_PINNED_WIDTH_CHANGED;r.addManagedListener(r.eventService,t,(function(){return r.refreshPaddingForFakeScrollbar()}))}));this.refreshPaddingForFakeScrollbar()}this.addListeners();this.registerWithCtrlsService()};i.prototype.refreshPaddingForFakeScrollbar=function(){var t=this,i=t.enableRtl,n=t.columnModel,r=t.eContainer;var e=i?hc.LEFT:hc.RIGHT;this.forContainers([hc.CENTER,e],(function(){var t=n.getContainerWidth(e);var s=i?"marginLeft":"marginRight";r.style[s]=t?"16px":"0px"}))};i.prototype.addListeners=function(){var t=this;this.addManagedListener(this.eventService,hi.EVENT_DISPLAYED_COLUMNS_CHANGED,(function(){return t.onDisplayedColumnsChanged()}));this.addManagedListener(this.eventService,hi.EVENT_DISPLAYED_COLUMNS_WIDTH_CHANGED,(function(){return t.onDisplayedColumnsWidthChanged()}));this.addManagedListener(this.eventService,hi.EVENT_DISPLAYED_ROWS_CHANGED,(function(i){return t.onDisplayedRowsChanged(i.afterScroll)}));this.onDisplayedColumnsChanged();this.onDisplayedColumnsWidthChanged();this.onDisplayedRowsChanged()};i.prototype.listenOnDomOrder=function(){var t=this;var i=[hc.STICKY_TOP_CENTER,hc.STICKY_TOP_LEFT,hc.STICKY_TOP_RIGHT,hc.STICKY_TOP_FULL_WIDTH];var n=i.indexOf(this.name)>=0;if(n){this.comp.setDomOrder(true);return}var r=function(){var i=t.gridOptionsService.is("ensureDomOrder");var n=t.gridOptionsService.isDomLayout("print");t.comp.setDomOrder(i||n)};this.addManagedPropertyListener("domLayout",r);r()};i.prototype.stopHScrollOnPinnedRows=function(){var t=this;this.forContainers([hc.TOP_CENTER,hc.STICKY_TOP_CENTER,hc.BOTTOM_CENTER],(function(){var i=function(){return t.eViewport.scrollLeft=0};t.addManagedListener(t.eViewport,"scroll",i)}))};i.prototype.onDisplayedColumnsChanged=function(){var t=this;this.forContainers([hc.CENTER],(function(){return t.onHorizontalViewportChanged()}))};i.prototype.onDisplayedColumnsWidthChanged=function(){var t=this;this.forContainers([hc.CENTER],(function(){return t.onHorizontalViewportChanged()}))};i.prototype.addPreventScrollWhileDragging=function(){var t=this;var i=function(i){if(t.dragService.isDragging()){if(i.cancelable){i.preventDefault()}}};this.eContainer.addEventListener("touchmove",i,{passive:false});this.addDestroyFunc((function(){return t.eContainer.removeEventListener("touchmove",i)}))};i.prototype.onHorizontalViewportChanged=function(t){if(t===void 0){t=false}var i=this.getCenterWidth();var n=this.getCenterViewportScrollLeft();this.columnModel.setViewportPosition(i,n,t)};i.prototype.getCenterWidth=function(){return Kr(this.eViewport)};i.prototype.getCenterViewportScrollLeft=function(){return Zr(this.eViewport,this.enableRtl)};i.prototype.registerViewportResizeListener=function(t){var i=this.resizeObserverService.observeResize(this.eViewport,t);this.addDestroyFunc((function(){return i()}))};i.prototype.isViewportVisible=function(){return ne(this.eViewport)};i.prototype.getViewportScrollLeft=function(){return Zr(this.eViewport,this.enableRtl)};i.prototype.isHorizontalScrollShowing=function(){var t=this.gridOptionsService.is("alwaysShowHorizontalScroll");return t||ve(this.eViewport)};i.prototype.getViewportElement=function(){return this.eViewport};i.prototype.setContainerTranslateX=function(t){this.eContainer.style.transform="translateX("+t+"px)"};i.prototype.getHScrollPosition=function(){var t={left:this.eViewport.scrollLeft,right:this.eViewport.scrollLeft+this.eViewport.offsetWidth};return t};i.prototype.setCenterViewportScrollLeft=function(t){$r(this.eViewport,t,this.enableRtl)};i.prototype.isContainerVisible=function(){var t=i.getPinned(this.name);return!t||!!this.pinnedWidthFeature&&this.pinnedWidthFeature.getWidth()>0};i.prototype.onPinnedWidthChanged=function(){var t=this.isContainerVisible();if(this.visible!=t){this.visible=t;this.onDisplayedRowsChanged()}if(pr()){this.refreshPaddingForFakeScrollbar()}};i.prototype.onDisplayedRowsChanged=function(t){var i=this;if(t===void 0){t=false}if(this.visible){var n=this.gridOptionsService.isDomLayout("print");var r=function(t){var r=t.isFullWidth();var e=i.embedFullWidthRows||n;var s=i.isFullWithContainer?!e&&r:e||!r;return s};var e=this.getRowCtrls().filter(r);this.comp.setRowCtrls(e,t)}else{this.comp.setRowCtrls(this.EMPTY_CTRLS,false)}};i.prototype.getRowCtrls=function(){switch(this.name){case hc.TOP_CENTER:case hc.TOP_LEFT:case hc.TOP_RIGHT:case hc.TOP_FULL_WIDTH:return this.rowRenderer.getTopRowCtrls();case hc.STICKY_TOP_CENTER:case hc.STICKY_TOP_LEFT:case hc.STICKY_TOP_RIGHT:case hc.STICKY_TOP_FULL_WIDTH:return this.rowRenderer.getStickyTopRowCtrls();case hc.BOTTOM_CENTER:case hc.BOTTOM_LEFT:case hc.BOTTOM_RIGHT:case hc.BOTTOM_FULL_WIDTH:return this.rowRenderer.getBottomRowCtrls();default:return this.rowRenderer.getCentreRowCtrls()}};uc([ut("scrollVisibleService")],i.prototype,"scrollVisibleService",void 0);uc([ut("dragService")],i.prototype,"dragService",void 0);uc([ut("ctrlsService")],i.prototype,"ctrlsService",void 0);uc([ut("columnModel")],i.prototype,"columnModel",void 0);uc([ut("resizeObserverService")],i.prototype,"resizeObserverService",void 0);uc([ut("animationFrameService")],i.prototype,"animationFrameService",void 0);uc([ut("rowRenderer")],i.prototype,"rowRenderer",void 0);uc([et],i.prototype,"postConstruct",null);return i}(ri);var gc=function(){var t=function(i,n){t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var n in i)if(Object.prototype.hasOwnProperty.call(i,n))t[n]=i[n]};return t(i,n)};return function(i,n){if(typeof n!=="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(i,n);function r(){this.constructor=i}i.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}();var bc=function(t,i,n,r){var e=arguments.length,s=e<3?i:r===null?r=Object.getOwnPropertyDescriptor(i,n):r,o;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")s=Reflect.decorate(t,i,n,r);else for(var u=t.length-1;u>=0;u--)if(o=t[u])s=(e<3?o(s):e>3?o(i,n,s):o(i,n))||s;return e>3&&s&&Object.defineProperty(i,n,s),s};var wc='<div class="ag-root ag-unselectable" role="treegrid">\n <ag-header-root ref="gridHeader"></ag-header-root>\n <div class="ag-floating-top" ref="eTop" role="presentation">\n <ag-row-container ref="topLeftContainer" name="'+hc.TOP_LEFT+'"></ag-row-container>\n <ag-row-container ref="topCenterContainer" name="'+hc.TOP_CENTER+'"></ag-row-container>\n <ag-row-container ref="topRightContainer" name="'+hc.TOP_RIGHT+'"></ag-row-container>\n <ag-row-container ref="topFullWidthContainer" name="'+hc.TOP_FULL_WIDTH+'"></ag-row-container>\n </div>\n <div class="ag-body" ref="eBody" role="presentation">\n <div class="ag-body-viewport" ref="eBodyViewport" role="presentation">\n <ag-row-container ref="leftContainer" name="'+hc.LEFT+'"></ag-row-container>\n <ag-row-container ref="centerContainer" name="'+hc.CENTER+'"></ag-row-container>\n <ag-row-container ref="rightContainer" name="'+hc.RIGHT+'"></ag-row-container>\n <ag-row-container ref="fullWidthContainer" name="'+hc.FULL_WIDTH+'"></ag-row-container>\n </div>\n <ag-fake-vertical-scroll></ag-fake-vertical-scroll>\n </div>\n <div class="ag-sticky-top" ref="eStickyTop" role="presentation">\n <ag-row-container ref="stickyTopLeftContainer" name="'+hc.STICKY_TOP_LEFT+'"></ag-row-container>\n <ag-row-container ref="stickyTopCenterContainer" name="'+hc.STICKY_TOP_CENTER+'"></ag-row-container>\n <ag-row-container ref="stickyTopRightContainer" name="'+hc.STICKY_TOP_RIGHT+'"></ag-row-container>\n <ag-row-container ref="stickyTopFullWidthContainer" name="'+hc.STICKY_TOP_FULL_WIDTH+'"></ag-row-container>\n </div>\n <div class="ag-floating-bottom" ref="eBottom" role="presentation">\n <ag-row-container ref="bottomLeftContainer" name="'+hc.BOTTOM_LEFT+'"></ag-row-container>\n <ag-row-container ref="bottomCenterContainer" name="'+hc.BOTTOM_CENTER+'"></ag-row-container>\n <ag-row-container ref="bottomRightContainer" name="'+hc.BOTTOM_RIGHT+'"></ag-row-container>\n <ag-row-container ref="bottomFullWidthContainer" name="'+hc.BOTTOM_FULL_WIDTH+'"></ag-row-container>\n </div>\n <ag-fake-horizontal-scroll></ag-fake-horizontal-scroll>\n <ag-overlay-wrapper></ag-overlay-wrapper>\n </div>';var yc=function(t){gc(i,t);function i(){return t.call(this,wc)||this}i.prototype.init=function(){var t=this;var i=function(t,i){var n=t+"px";i.style.minHeight=n;i.style.height=n};var n={setRowAnimationCssOnBodyViewport:function(i,n){return t.setRowAnimationCssOnBodyViewport(i,n)},setColumnCount:function(i){return Nn(t.getGui(),i)},setRowCount:function(i){return En(t.getGui(),i)},setTopHeight:function(n){return i(n,t.eTop)},setBottomHeight:function(n){return i(n,t.eBottom)},setTopDisplay:function(i){return t.eTop.style.display=i},setBottomDisplay:function(i){return t.eBottom.style.display=i},setStickyTopHeight:function(i){return t.eStickyTop.style.height=i},setStickyTopTop:function(i){return t.eStickyTop.style.top=i},setStickyTopWidth:function(i){return t.eStickyTop.style.width=i},setColumnMovingCss:function(i,n){return t.addOrRemoveCssClass(i,n)},updateLayoutClasses:function(i,n){var r=[t.eBodyViewport.classList,t.eBody.classList];r.forEach((function(t){t.toggle(jf.AUTO_HEIGHT,n.autoHeight);t.toggle(jf.NORMAL,n.normal);t.toggle(jf.PRINT,n.print)}));t.addOrRemoveCssClass(jf.AUTO_HEIGHT,n.autoHeight);t.addOrRemoveCssClass(jf.NORMAL,n.normal);t.addOrRemoveCssClass(jf.PRINT,n.print)},setAlwaysVerticalScrollClass:function(i,n){return t.eBodyViewport.classList.toggle(Vf,n)},registerBodyViewportResizeListener:function(i){var n=t.resizeObserverService.observeResize(t.eBodyViewport,i);t.addDestroyFunc((function(){return n()}))},setPinnedTopBottomOverflowY:function(i){return t.eTop.style.overflowY=t.eBottom.style.overflowY=i},setCellSelectableCss:function(i,n){[t.eTop,t.eBodyViewport,t.eBottom].forEach((function(t){return t.classList.toggle(i,n)}))},setBodyViewportWidth:function(i){return t.eBodyViewport.style.width=i}};this.ctrl=this.createManagedBean(new Wf);this.ctrl.setComp(n,this.getGui(),this.eBodyViewport,this.eTop,this.eBottom,this.eStickyTop);if(this.rangeService||this.gridOptionsService.get("rowSelection")==="multiple"){Pn(this.getGui(),true)}};i.prototype.setRowAnimationCssOnBodyViewport=function(t,i){var n=this.eBodyViewport.classList;n.toggle(Lf.ANIMATION_ON,i);n.toggle(Lf.ANIMATION_OFF,!i)};i.prototype.getFloatingTopBottom=function(){return[this.eTop,this.eBottom]};bc([ut("resizeObserverService")],i.prototype,"resizeObserverService",void 0);bc([at("rangeService")],i.prototype,"rangeService",void 0);bc([ds("eBodyViewport")],i.prototype,"eBodyViewport",void 0);bc([ds("eStickyTop")],i.prototype,"eStickyTop",void 0);bc([ds("eTop")],i.prototype,"eTop",void 0);bc([ds("eBottom")],i.prototype,"eBottom",void 0);bc([ds("gridHeader")],i.prototype,"headerRootComp",void 0);bc([ds("eBody")],i.prototype,"eBody",void 0);bc([et],i.prototype,"init",null);return i}(vs);var mc=function(){var t=function(i,n){t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var n in i)if(Object.prototype.hasOwnProperty.call(i,n))t[n]=i[n]};return t(i,n)};return function(i,n){if(typeof n!=="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(i,n);function r(){this.constructor=i}i.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}();var Sc=function(t,i,n,r){var e=arguments.length,s=e<3?i:r===null?r=Object.getOwnPropertyDescriptor(i,n):r,o;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")s=Reflect.decorate(t,i,n,r);else for(var u=t.length-1;u>=0;u--)if(o=t[u])s=(e<3?o(s):e>3?o(i,n,s):o(i,n))||s;return e>3&&s&&Object.defineProperty(i,n,s),s};var Cc=function(t){mc(i,t);function i(){return t!==null&&t.apply(this,arguments)||this}i.prototype.postConstruct=function(){this.addManagedListener(this.eventService,hi.EVENT_DISPLAYED_COLUMNS_CHANGED,this.onDisplayedColumnsChanged.bind(this));this.addManagedListener(this.eventService,hi.EVENT_DISPLAYED_COLUMNS_WIDTH_CHANGED,this.onDisplayedColumnsWidthChanged.bind(this))};i.prototype.onDisplayedColumnsChanged=function(){this.update()};i.prototype.onDisplayedColumnsWidthChanged=function(){this.update()};i.prototype.update=function(){this.updateImpl();setTimeout(this.updateImpl.bind(this),500)};i.prototype.updateImpl=function(){var t=this.ctrlsService.getCenterRowContainerCtrl();if(!t){return}var i={horizontalScrollShowing:t.isHorizontalScrollShowing(),verticalScrollShowing:this.isVerticalScrollShowing()};this.setScrollsVisible(i)};i.prototype.setScrollsVisible=function(t){var i=this.horizontalScrollShowing!==t.horizontalScrollShowing||this.verticalScrollShowing!==t.verticalScrollShowing;if(i){this.horizontalScrollShowing=t.horizontalScrollShowing;this.verticalScrollShowing=t.verticalScrollShowing;var n={type:hi.EVENT_SCROLL_VISIBILITY_CHANGED};this.eventService.dispatchEvent(n)}};i.prototype.isHorizontalScrollShowing=function(){return this.horizontalScrollShowing};i.prototype.isVerticalScrollShowing=function(){return this.verticalScrollShowing};Sc([ut("ctrlsService")],i.prototype,"ctrlsService",void 0);Sc([et],i.prototype,"postConstruct",null);i=Sc([ot("scrollVisibleService")],i);return i}(ri);var Oc=function(){var t=function(i,n){t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var n in i)if(Object.prototype.hasOwnProperty.call(i,n))t[n]=i[n]};return t(i,n)};return function(i,n){if(typeof n!=="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(i,n);function r(){this.constructor=i}i.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}();var jc=function(t,i,n,r){var e=arguments.length,s=e<3?i:r===null?r=Object.getOwnPropertyDescriptor(i,n):r,o;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")s=Reflect.decorate(t,i,n,r);else for(var u=t.length-1;u>=0;u--)if(o=t[u])s=(e<3?o(s):e>3?o(i,n,s):o(i,n))||s;return e>3&&s&&Object.defineProperty(i,n,s),s};var Rc=function(t){Oc(n,t);function n(){var i=t!==null&&t.apply(this,arguments)||this;i.gridInstanceId=r.gridInstanceSequence.next();return i}r=n;n.prototype.stampTopLevelGridCompWithGridInstance=function(t){t[r.GRID_DOM_KEY]=this.gridInstanceId};n.prototype.getRenderedCellForEvent=function(t){return Jt(this.gridOptionsService,t.target,kh.DOM_DATA_KEY_CELL_CTRL)};n.prototype.isEventFromThisGrid=function(t){var i=this.isElementInThisGrid(t.target);return i};n.prototype.isElementInThisGrid=function(t){var n=t;while(n){var e=n[r.GRID_DOM_KEY];if(i(e)){var s=e===this.gridInstanceId;return s}n=n.parentElement}return false};n.prototype.getCellPositionForEvent=function(t){var i=this.getRenderedCellForEvent(t);return i?i.getCellPosition():null};n.prototype.getNormalisedPosition=function(t){var i=this.gridOptionsService.isDomLayout("normal");var n=t;var r;var e;if(n.clientX!=null||n.clientY!=null){r=n.clientX;e=n.clientY}else{r=n.x;e=n.y}if(i){var s=this.ctrlsService.getGridBodyCtrl();var o=s.getScrollFeature().getVScrollPosition();var u=s.getScrollFeature().getHScrollPosition();r+=u.left;e+=o.top}return{x:r,y:e}};var r;n.gridInstanceSequence=new ts;n.GRID_DOM_KEY="__ag_grid_instance";jc([ut("ctrlsService")],n.prototype,"ctrlsService",void 0);n=r=jc([ot("mouseEventService")],n);return n}(ri);var xc=function(){var t=function(i,n){t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var n in i)if(Object.prototype.hasOwnProperty.call(i,n))t[n]=i[n]};return t(i,n)};return function(i,n){if(typeof n!=="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(i,n);function r(){this.constructor=i}i.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}();var _c=function(){_c=Object.assign||function(t){for(var i,n=1,r=arguments.length;n<r;n++){i=arguments[n];for(var e in i)if(Object.prototype.hasOwnProperty.call(i,e))t[e]=i[e]}return t};return _c.apply(this,arguments)};var Ac=function(t,i,n,r){var e=arguments.length,s=e<3?i:r===null?r=Object.getOwnPropertyDescriptor(i,n):r,o;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")s=Reflect.decorate(t,i,n,r);else for(var u=t.length-1;u>=0;u--)if(o=t[u])s=(e<3?o(s):e>3?o(i,n,s):o(i,n))||s;return e>3&&s&&Object.defineProperty(i,n,s),s};var Fc=function(t){xc(r,t);function r(){var i=t.call(this)||this;i.onPageDown=W(i.onPageDown,100);i.onPageUp=W(i.onPageUp,100);return i}r.prototype.postConstruct=function(){var t=this;this.ctrlsService.whenReady((function(i){t.gridBodyCon=i.gridBodyCtrl}))};r.prototype.handlePageScrollingKey=function(t,i){if(i===void 0){i=false}var n=t.key;var r=t.altKey;var e=t.ctrlKey||t.metaKey;var s=!!this.rangeService&&t.shiftKey;var o=this.mouseEventService.getCellPositionForEvent(t);var u=false;switch(n){case Te.PAGE_HOME:case Te.PAGE_END:if(!e&&!r){this.onHomeOrEndKey(n);u=true}break;case Te.LEFT:case Te.RIGHT:case Te.UP:case Te.DOWN:if(!o){return false}if(e&&!r&&!s){this.onCtrlUpDownLeftRight(n,o);u=true}break;case Te.PAGE_DOWN:case Te.PAGE_UP:if(!e&&!r){u=this.handlePageUpDown(n,o,i)}break}if(u){t.preventDefault()}return u};r.prototype.handlePageUpDown=function(t,i,n){if(n){i=this.focusService.getFocusedCell()}if(!i){return false}if(t===Te.PAGE_UP){this.onPageUp(i)}else{this.onPageDown(i)}return true};r.prototype.navigateTo=function(t){var n=t.scrollIndex,r=t.scrollType,e=t.scrollColumn,s=t.focusIndex,o=t.focusColumn;if(i(e)&&!e.isPinned()){this.gridBodyCon.getScrollFeature().ensureColumnVisible(e)}if(i(n)){this.gridBodyCon.getScrollFeature().ensureIndexVisible(n,r)}if(!t.isAsync){this.gridBodyCon.getScrollFeature().ensureIndexVisible(s)}this.focusService.setFocusedCell({rowIndex:s,column:o,rowPinned:null,forceBrowserFocus:true});if(this.rangeService){var u={rowIndex:s,rowPinned:null,column:o};this.rangeService.setRangeToCell(u)}};r.prototype.onPageDown=function(t){var i=this.ctrlsService.getGridBodyCtrl();var n=i.getScrollFeature().getVScrollPosition();var r=this.getViewportHeight();var e=this.paginationProxy.getPixelOffset();var s=n.top+r;var o=this.paginationProxy.getRowIndexAtPixel(s+e);if(this.columnModel.isAutoRowHeightActive()){this.navigateToNextPageWithAutoHeight(t,o)}else{this.navigateToNextPage(t,o)}};r.prototype.onPageUp=function(t){var i=this.ctrlsService.getGridBodyCtrl();var n=i.getScrollFeature().getVScrollPosition();var r=this.paginationProxy.getPixelOffset();var e=n.top;var s=this.paginationProxy.getRowIndexAtPixel(e+r);if(this.columnModel.isAutoRowHeightActive()){this.navigateToNextPageWithAutoHeight(t,s,true)}else{this.navigateToNextPage(t,s,true)}};r.prototype.navigateToNextPage=function(t,i,n){if(n===void 0){n=false}var r=this.getViewportHeight();var e=this.paginationProxy.getPageFirstRow();var s=this.paginationProxy.getPageLastRow();var o=this.paginationProxy.getPixelOffset();var u=this.paginationProxy.getRow(t.rowIndex);var a=n?(u===null||u===void 0?void 0:u.rowHeight)-r-o:r-o;var f=(u===null||u===void 0?void 0:u.rowTop)+a;var h=this.paginationProxy.getRowIndexAtPixel(f+o);if(h===t.rowIndex){var c=n?-1:1;i=h=t.rowIndex+c}var l;if(n){l="bottom";if(h<e){h=e}if(i<e){i=e}}else{l="top";if(h>s){h=s}if(i>s){i=s}}if(this.isRowTallerThanView(h)){i=h;l="top"}this.navigateTo({scrollIndex:i,scrollType:l,scrollColumn:null,focusIndex:h,focusColumn:t.column})};r.prototype.navigateToNextPageWithAutoHeight=function(t,i,n){var r=this;if(n===void 0){n=false}this.navigateTo({scrollIndex:i,scrollType:n?"bottom":"top",scrollColumn:null,focusIndex:i,focusColumn:t.column});setTimeout((function(){var e=r.getNextFocusIndexForAutoHeight(t,n);r.navigateTo({scrollIndex:i,scrollType:n?"bottom":"top",scrollColumn:null,focusIndex:e,focusColumn:t.column,isAsync:true})}),50)};r.prototype.getNextFocusIndexForAutoHeight=function(t,i){var n;if(i===void 0){i=false}var r=i?-1:1;var e=this.getViewportHeight();var s=this.paginationProxy.getPageLastRow();var o=0;var u=t.rowIndex;while(u>=0&&u<=s){var a=this.paginationProxy.getRow(u);if(a){var f=(n=a.rowHeight)!==null&&n!==void 0?n:0;if(o+f>e){break}o+=f}u+=r}return Math.max(0,Math.min(u,s))};r.prototype.getViewportHeight=function(){var t=this.ctrlsService.getGridBodyCtrl();var i=t.getScrollFeature().getVScrollPosition();var n=this.gridOptionsService.getScrollbarWidth();var r=i.bottom-i.top;if(this.ctrlsService.getCenterRowContainerCtrl().isHorizontalScrollShowing()){r-=n}return r};r.prototype.isRowTallerThanView=function(t){var i=this.paginationProxy.getRow(t);if(!i){return false}var n=i.rowHeight;if(typeof n!=="number"){return false}return n>this.getViewportHeight()};r.prototype.onCtrlUpDownLeftRight=function(t,i){var n=this.cellNavigationService.getNextCellToFocus(t,i,true);var r=n.rowIndex,e=n.column;this.navigateTo({scrollIndex:r,scrollType:null,scrollColumn:e,focusIndex:r,focusColumn:e})};r.prototype.onHomeOrEndKey=function(t){var i=t===Te.PAGE_HOME;var n=this.columnModel.getAllDisplayedColumns();var r=i?n[0]:xt(n);var e=i?this.paginationProxy.getPageFirstRow():this.paginationProxy.getPageLastRow();this.navigateTo({scrollIndex:e,scrollType:null,scrollColumn:r,focusIndex:e,focusColumn:r})};r.prototype.onTabKeyDown=function(t,i){var n=i.shiftKey;var r=this.tabToNextCellCommon(t,n,i);if(r){i.preventDefault();return}if(n){var e=t.getRowPosition(),s=e.rowIndex,o=e.rowPinned;var u=o?s===0:s===this.paginationProxy.getPageFirstRow();if(u){if(this.gridOptionsService.getNum("headerHeight")===0){this.focusService.focusNextGridCoreContainer(true,true)}else{i.preventDefault();this.focusService.focusPreviousFromFirstCell(i)}}}else{if(t instanceof kh){t.focusCell(true)}if(this.focusService.focusNextGridCoreContainer(n)){i.preventDefault()}}};r.prototype.tabToNextCell=function(t,i){var n=this.focusService.getFocusedCell();if(!n){return false}var r=this.getCellByPosition(n);if(!r){r=this.rowRenderer.getRowByPosition(n);if(!r||!r.isFullWidth()){return false}}return this.tabToNextCellCommon(r,t,i)};r.prototype.tabToNextCellCommon=function(t,i,n){var r=t.isEditing();if(!r&&t instanceof kh){var e=t;var s=e.getRowCtrl();if(s){r=s.isEditing()}}var o;if(r){if(this.gridOptionsService.get("editType")==="fullRow"){o=this.moveToNextEditingRow(t,i,n)}else{o=this.moveToNextEditingCell(t,i,n)}}else{o=this.moveToNextCellNotEditing(t,i)}return o||!!this.focusService.getFocusedHeader()};r.prototype.moveToNextEditingCell=function(t,i,n){if(n===void 0){n=null}var r=t.getCellPosition();t.getGui().focus();t.stopEditing();var e=this.findNextCellToFocusOn(r,i,true);if(e==null){return false}e.startEditing(null,true,n);e.focusCell(false);return true};r.prototype.moveToNextEditingRow=function(t,i,n){if(n===void 0){n=null}var r=t.getCellPosition();var e=this.findNextCellToFocusOn(r,i,true);if(e==null){return false}var s=e.getCellPosition();var o=this.isCellEditable(r);var u=this.isCellEditable(s);var a=s&&r.rowIndex===s.rowIndex&&r.rowPinned===s.rowPinned;if(o){t.setFocusOutOnEditor()}if(!a){var f=t.getRowCtrl();f.stopEditing();var h=e.getRowCtrl();h.startRowEditing(undefined,undefined,n)}if(u){e.setFocusInOnEditor();e.focusCell()}else{e.focusCell(true)}return true};r.prototype.moveToNextCellNotEditing=function(t,n){var r=this.columnModel.getAllDisplayedColumns();var e;if(t instanceof Ih){e=_c(_c({},t.getRowPosition()),{column:n?r[0]:xt(r)})}else{e=t.getCellPosition()}var s=this.findNextCellToFocusOn(e,n,false);if(s instanceof kh){s.focusCell(true)}else if(s){return this.tryToFocusFullWidthRow(s.getRowPosition(),n)}return i(s)};r.prototype.findNextCellToFocusOn=function(t,n,r){var e=t;while(true){if(t!==e){t=e}if(!n){e=this.getLastCellOfColSpan(e)}e=this.cellNavigationService.getNextTabbedCell(e,n);var s=this.gridOptionsService.getCallback("tabToNextCell");if(i(s)){var o={backwards:n,editing:r,previousCellPosition:t,nextCellPosition:e?e:null};var u=s(o);if(i(u)){if(u.floating){P((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");u.rowPinned=u.floating}e={rowIndex:u.rowIndex,column:u.column,rowPinned:u.rowPinned}}else{e=null}}if(!e){return null}if(e.rowIndex<0){var a=this.headerNavigationService.getHeaderRowCount();this.focusService.focusHeaderPosition({headerPosition:{headerRowIndex:a+e.rowIndex,column:e.column},fromCell:true});return null}var f=this.gridOptionsService.get("editType")==="fullRow";if(r&&!f){var h=this.isCellEditable(e);if(!h){continue}}this.ensureCellVisible(e);var c=this.getCellByPosition(e);if(!c){var l=this.rowRenderer.getRowByPosition(e);if(!l||!l.isFullWidth()||r){continue}return l}if(c.isSuppressNavigable()){continue}if(this.rangeService){this.rangeService.setRangeToCell(e)}return c}};r.prototype.isCellEditable=function(t){var i=this.lookupRowNodeForCell(t);if(i){return t.column.isCellEditable(i)}return false};r.prototype.getCellByPosition=function(t){var i=this.rowRenderer.getRowByPosition(t);if(!i){return null}return i.getCellCtrl(t.column)};r.prototype.lookupRowNodeForCell=function(t){if(t.rowPinned==="top"){return this.pinnedRowModel.getPinnedTopRow(t.rowIndex)}if(t.rowPinned==="bottom"){return this.pinnedRowModel.getPinnedBottomRow(t.rowIndex)}return this.paginationProxy.getRow(t.rowIndex)};r.prototype.navigateToNextCell=function(t,r,e,s){var o=e;var u=false;while(o&&(o===e||!this.isValidNavigateCell(o))){if(this.gridOptionsService.is("enableRtl")){if(r===Te.LEFT){o=this.getLastCellOfColSpan(o)}}else if(r===Te.RIGHT){o=this.getLastCellOfColSpan(o)}o=this.cellNavigationService.getNextCellToFocus(r,o);u=n(o)}if(u&&t&&t.key===Te.UP){o={rowIndex:-1,rowPinned:null,column:e.column}}if(s){var a=this.gridOptionsService.getCallback("navigateToNextCell");if(i(a)){var f={key:r,previousCellPosition:e,nextCellPosition:o?o:null,event:t};var h=a(f);if(i(h)){if(h.floating){P((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");h.rowPinned=h.floating}o={rowPinned:h.rowPinned,rowIndex:h.rowIndex,column:h.column}}else{o=null}}}if(!o){return}if(o.rowIndex<0){var c=this.headerNavigationService.getHeaderRowCount();this.focusService.focusHeaderPosition({headerPosition:{headerRowIndex:c+o.rowIndex,column:e.column},event:t||undefined,fromCell:true});return}var l=this.getNormalisedPosition(o);if(l){this.focusPosition(l)}else{this.tryToFocusFullWidthRow(o)}};r.prototype.getNormalisedPosition=function(t){this.ensureCellVisible(t);var i=this.getCellByPosition(t);if(!i){return null}t=i.getCellPosition();this.ensureCellVisible(t);return t};r.prototype.tryToFocusFullWidthRow=function(t,i){if(i===void 0){i=false}var n=this.columnModel.getAllDisplayedColumns();var r=this.rowRenderer.getRowByPosition(t);if(!r||!r.isFullWidth()){return false}var e=this.focusService.getFocusedCell();var s={rowIndex:t.rowIndex,rowPinned:t.rowPinned,column:t.column||(i?xt(n):n[0])};this.focusPosition(s);var o=e!=null?this.rowPositionUtils.before(s,e):false;var u={type:hi.EVENT_FULL_WIDTH_ROW_FOCUSED,rowIndex:s.rowIndex,rowPinned:s.rowPinned,column:s.column,isFullWidthCell:true,floating:s.rowPinned,fromBelow:o};this.eventService.dispatchEvent(u);return true};r.prototype.focusPosition=function(t){this.focusService.setFocusedCell({rowIndex:t.rowIndex,column:t.column,rowPinned:t.rowPinned,forceBrowserFocus:true});if(this.rangeService){this.rangeService.setRangeToCell(t)}};r.prototype.isValidNavigateCell=function(t){var i=this.rowPositionUtils.getRowNode(t);return!!i};r.prototype.getLastCellOfColSpan=function(t){var i=this.getCellByPosition(t);if(!i){return t}var n=i.getColSpanningList();if(n.length===1){return t}return{rowIndex:t.rowIndex,column:xt(n),rowPinned:t.rowPinned}};r.prototype.ensureCellVisible=function(t){var i=this.gridOptionsService.isGroupRowsSticky();var r=this.rowModel.getRow(t.rowIndex);var e=i&&(r===null||r===void 0?void 0:r.sticky);if(!e&&n(t.rowPinned)){this.gridBodyCon.getScrollFeature().ensureIndexVisible(t.rowIndex)}if(!t.column.isPinned()){this.gridBodyCon.getScrollFeature().ensureColumnVisible(t.column)}};Ac([ut("mouseEventService")],r.prototype,"mouseEventService",void 0);Ac([ut("paginationProxy")],r.prototype,"paginationProxy",void 0);Ac([ut("focusService")],r.prototype,"focusService",void 0);Ac([at("rangeService")],r.prototype,"rangeService",void 0);Ac([ut("columnModel")],r.prototype,"columnModel",void 0);Ac([ut("rowModel")],r.prototype,"rowModel",void 0);Ac([ut("ctrlsService")],r.prototype,"ctrlsService",void 0);Ac([ut("rowRenderer")],r.prototype,"rowRenderer",void 0);Ac([ut("headerNavigationService")],r.prototype,"headerNavigationService",void 0);Ac([ut("rowPositionUtils")],r.prototype,"rowPositionUtils",void 0);Ac([ut("cellNavigationService")],r.prototype,"cellNavigationService",void 0);Ac([ut("pinnedRowModel")],r.prototype,"pinnedRowModel",void 0);Ac([et],r.prototype,"postConstruct",null);r=Ac([ot("navigationService")],r);return r}(ri);var kc=function(){var t=function(i,n){t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var n in i)if(Object.prototype.hasOwnProperty.call(i,n))t[n]=i[n]};return t(i,n)};return function(i,n){if(typeof n!=="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(i,n);function r(){this.constructor=i}i.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}();var Tc=function(t,i,n,r){var e=arguments.length,s=e<3?i:r===null?r=Object.getOwnPropertyDescriptor(i,n):r,o;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")s=Reflect.decorate(t,i,n,r);else for(var u=t.length-1;u>=0;u--)if(o=t[u])s=(e<3?o(s):e>3?o(i,n,s):o(i,n))||s;return e>3&&s&&Object.defineProperty(i,n,s),s};var Mc=function(t){kc(i,t);function i(i){var n=t.call(this,'<div class="ag-popup-editor" tabindex="-1"/>')||this;n.params=i;return n}i.prototype.postConstruct=function(){this.gridOptionsService.setDomData(this.getGui(),i.DOM_KEY_POPUP_EDITOR_WRAPPER,true);this.addKeyDownListener()};i.prototype.addKeyDownListener=function(){var t=this;var i=this.getGui();var n=this.params;var r=function(i){if(!He(t.gridOptionsService,i,n.node,n.column,true)){n.onKeyDown(i)}};this.addManagedListener(i,"keydown",r)};i.DOM_KEY_POPUP_EDITOR_WRAPPER="popupEditorWrapper";Tc([et],i.prototype,"postConstruct",null);return i}(ou);var Dc=function(){var t=function(i,n){t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var n in i)if(Object.prototype.hasOwnProperty.call(i,n))t[n]=i[n]};return t(i,n)};return function(i,n){if(typeof n!=="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(i,n);function r(){this.constructor=i}i.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}();var Gc=function(t){Dc(i,t);function i(i,n,r,e,s){var o=t.call(this)||this;o.rendererVersion=0;o.editorVersion=0;o.beans=i;o.column=n.getColumn();o.rowNode=n.getRowNode();o.rowCtrl=n.getRowCtrl();o.eRow=e;o.cellCtrl=n;o.setTemplate('<div comp-id="'+o.getCompId()+'"/>');var u=o.getGui();o.forceWrapper=n.isForceWrapper();o.refreshWrapper(false);var a=function(t,i){if(i!=null&&i!=""){u.setAttribute(t,i)}else{u.removeAttribute(t)}};bn(u,"gridcell");a("col-id",n.getColumnIdSanitised());var f=n.getTabIndex();if(f!==undefined){a("tabindex",f.toString())}var h={addOrRemoveCssClass:function(t,i){return o.addOrRemoveCssClass(t,i)},setUserStyles:function(t){return le(u,t)},getFocusableElement:function(){return o.getFocusableElement()},setIncludeSelection:function(t){return o.includeSelection=t},setIncludeRowDrag:function(t){return o.includeRowDrag=t},setIncludeDndSource:function(t){return o.includeDndSource=t},setRenderDetails:function(t,i,n){return o.setRenderDetails(t,i,n)},setEditDetails:function(t,i,n){return o.setEditDetails(t,i,n)},getCellEditor:function(){return o.cellEditor||null},getCellRenderer:function(){return o.cellRenderer||null},getParentOfValue:function(){return o.getParentOfValue()}};n.setComp(h,o.getGui(),o.eCellWrapper,r,s);return o}i.prototype.getParentOfValue=function(){if(this.eCellValue){return this.eCellValue}if(this.eCellWrapper){return this.eCellWrapper}return this.getGui()};i.prototype.setRenderDetails=function(t,i,n){var r=this.cellEditor&&!this.cellEditorPopupWrapper;if(r){return}this.firstRender=this.firstRender==null;var e=this.refreshWrapper(false);this.refreshEditStyles(false);if(t){var s=n||e;var o=s?false:this.refreshCellRenderer(t);if(!o){this.destroyRenderer();this.createCellRendererInstance(t)}}else{this.destroyRenderer();this.insertValueWithoutCellRenderer(i)}};i.prototype.setEditDetails=function(t,i,n){if(t){this.createCellEditorInstance(t,i,n)}else{this.destroyEditor()}};i.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)};i.prototype.refreshWrapper=function(t){var i=this.includeRowDrag||this.includeDndSource||this.includeSelection;var n=i||this.forceWrapper;var r=n&&this.eCellWrapper==null;if(r){this.eCellWrapper=re('<div class="ag-cell-wrapper" role="presentation"></div>');this.getGui().appendChild(this.eCellWrapper)}var e=!n&&this.eCellWrapper!=null;if(e){ie(this.eCellWrapper);this.eCellWrapper=undefined}this.addOrRemoveCssClass("ag-cell-value",!n);var s=!t&&n;var o=s&&this.eCellValue==null;if(o){this.eCellValue=re('<span class="ag-cell-value" role="presentation"></span>');this.eCellWrapper.appendChild(this.eCellValue)}var u=!s&&this.eCellValue!=null;if(u){ie(this.eCellValue);this.eCellValue=undefined}var a=r||e||o||u;if(a){this.removeControls()}if(!t){if(i){this.addControls()}}return a};i.prototype.addControls=function(){if(this.includeRowDrag){if(this.rowDraggingComp==null){this.rowDraggingComp=this.cellCtrl.createRowDragComp();if(this.rowDraggingComp){this.eCellWrapper.insertBefore(this.rowDraggingComp.getGui(),this.eCellValue)}}}if(this.includeDndSource){if(this.dndSourceComp==null){this.dndSourceComp=this.cellCtrl.createDndSource();this.eCellWrapper.insertBefore(this.dndSourceComp.getGui(),this.eCellValue)}}if(this.includeSelection){if(this.checkboxSelectionComp==null){this.checkboxSelectionComp=this.cellCtrl.createSelectionCheckbox();this.eCellWrapper.insertBefore(this.checkboxSelectionComp.getGui(),this.eCellValue)}}};i.prototype.createCellEditorInstance=function(t,i,r){var e=this;var s=this.editorVersion;var o=t.newAgStackInstance();if(!o){return}var u=t.params;o.then((function(t){return e.afterCellEditorCreated(s,t,u,i,r)}));var a=n(this.cellEditor);if(a&&u.cellStartedEdit){this.cellCtrl.focusCell(true)}};i.prototype.insertValueWithoutCellRenderer=function(t){var i=this.getParentOfValue();Xr(i);var n=t!=null?mi(t):null;if(n!=null){i.innerHTML=n}};i.prototype.destroyEditorAndRenderer=function(){this.destroyRenderer();this.destroyEditor()};i.prototype.destroyRenderer=function(){var t=this.beans.context;this.cellRenderer=t.destroyBean(this.cellRenderer);ie(this.cellRendererGui);this.cellRendererGui=null;this.rendererVersion++};i.prototype.destroyEditor=function(){var t=this.beans.context;if(this.hideEditorPopup){this.hideEditorPopup()}this.hideEditorPopup=undefined;this.cellEditor=t.destroyBean(this.cellEditor);this.cellEditorPopupWrapper=t.destroyBean(this.cellEditorPopupWrapper);ie(this.cellEditorGui);this.cellEditorGui=null;this.editorVersion++};i.prototype.refreshCellRenderer=function(t){if(this.cellRenderer==null||this.cellRenderer.refresh==null){return false}if(this.cellRendererClass!==t.componentClass){return false}var i=this.cellRenderer.refresh(t.params);return i===true||i===undefined};i.prototype.createCellRendererInstance=function(t){var i=this;var n=this.beans.gridOptionsService.is("suppressAnimationFrame");var r=!n;var e=this.rendererVersion;var s=t.componentClass;var o=function(){var n=i.rendererVersion!==e||!i.isAlive();if(n){return}var r=t.newAgStackInstance();var o=i.afterCellRendererCreated.bind(i,e,s);if(r){r.then(o)}};if(r&&this.firstRender){this.beans.animationFrameService.createTask(o,this.rowNode.rowIndex,"createTasksP2")}else{o()}};i.prototype.getCtrl=function(){return this.cellCtrl};i.prototype.getRowCtrl=function(){return this.rowCtrl};i.prototype.getCellRenderer=function(){return this.cellRenderer};i.prototype.getCellEditor=function(){return this.cellEditor};i.prototype.afterCellRendererCreated=function(t,i,n){var r=!this.isAlive()||t!==this.rendererVersion;if(r){this.beans.context.destroyBean(n);return}this.cellRenderer=n;this.cellRendererClass=i;this.cellRendererGui=this.cellRenderer.getGui();if(this.cellRendererGui!=null){var e=this.getParentOfValue();Xr(e);e.appendChild(this.cellRendererGui)}};i.prototype.afterCellEditorCreated=function(t,i,n,r,e){var s=t!==this.editorVersion;if(s){this.beans.context.destroyBean(i);return}var o=i.isCancelBeforeStart&&i.isCancelBeforeStart();if(o){this.beans.context.destroyBean(i);this.cellCtrl.stopEditing(true);return}if(!i.getGui){console.warn("AG Grid: cellEditor for column "+this.column.getId()+" is missing getGui() method");this.beans.context.destroyBean(i);return}this.cellEditor=i;this.cellEditorGui=i.getGui();var u=r||i.isPopup!==undefined&&i.isPopup();if(u){this.addPopupCellEditor(n,e)}else{this.addInCellEditor()}this.refreshEditStyles(true,u);if(i.afterGuiAttached){i.afterGuiAttached()}};i.prototype.refreshEditStyles=function(t,i){var n;this.addOrRemoveCssClass("ag-cell-inline-editing",t&&!i);this.addOrRemoveCssClass("ag-cell-popup-editing",t&&!!i);this.addOrRemoveCssClass("ag-cell-not-inline-editing",!t||!!i);(n=this.rowCtrl)===null||n===void 0?void 0:n.setInlineEditingCss(t)};i.prototype.addInCellEditor=function(){var t=this.getGui();var i=this.beans.gridOptionsService.getDocument();if(t.contains(i.activeElement)){t.focus()}this.destroyRenderer();this.refreshWrapper(true);this.clearParentOfValue();if(this.cellEditorGui){var n=this.getParentOfValue();n.appendChild(this.cellEditorGui)}};i.prototype.addPopupCellEditor=function(t,i){var n=this;if(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 r=this.cellEditor;this.cellEditorPopupWrapper=this.beans.context.createBean(new Mc(t));var e=this.cellEditorPopupWrapper.getGui();if(this.cellEditorGui){e.appendChild(this.cellEditorGui)}var s=this.beans.popupService;var o=this.beans.gridOptionsService.is("stopEditingWhenCellsLoseFocus");var u=i!=null?i:r.getPopupPosition?r.getPopupPosition():"over";var a=this.beans.gridOptionsService.is("enableRtl");var f={ePopup:e,column:this.column,rowNode:this.rowNode,type:"popupCellEditor",eventSource:this.getGui(),position:u,alignSide:a?"right":"left",keepWithinBounds:true};var h=s.positionPopupByComponent.bind(s,f);var c=this.beans.localeService.getLocaleTextFunc();var l=s.addPopup({modal:o,eChild:e,closeOnEsc:true,closedCallback:function(){n.cellCtrl.onPopupEditorClosed()},anchorToElement:this.getGui(),positionCallback:h,ariaLabel:c("ariaLabelCellEditor","Cell Editor")});if(l){this.hideEditorPopup=l.hideFunc}};i.prototype.detach=function(){this.eRow.removeChild(this.getGui())};i.prototype.destroy=function(){this.cellCtrl.stopEditing();this.destroyEditorAndRenderer();this.removeControls();t.prototype.destroy.call(this)};i.prototype.clearParentOfValue=function(){var t=this.getGui();var i=this.beans.gridOptionsService.getDocument();if(t.contains(i.activeElement)&&ar()){t.focus({preventScroll:true})}Xr(this.getParentOfValue())};return i}(vs);var Pc=function(){var t=function(i,n){t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var n in i)if(Object.prototype.hasOwnProperty.call(i,n))t[n]=i[n]};return t(i,n)};return function(i,n){if(typeof n!=="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(i,n);function r(){this.constructor=i}i.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}();var Ec=function(t){Pc(i,t);function i(i,n,r){var e=t.call(this)||this;e.cellComps={};e.beans=n;e.rowCtrl=i;e.setTemplate('<div comp-id="'+e.getCompId()+'" style="'+e.getInitialStyle(r)+'"/>');var s=e.getGui();var o=s.style;e.domOrder=e.rowCtrl.getDomOrder();bn(s,"row");var u=e.rowCtrl.getTabIndex();if(u!=null){s.setAttribute("tabindex",u.toString())}var a={setDomOrder:function(t){return e.domOrder=t},setCellCtrls:function(t){return e.setCellCtrls(t)},showFullWidth:function(t){return e.showFullWidth(t)},getFullWidthCellRenderer:function(){return e.getFullWidthCellRenderer()},addOrRemoveCssClass:function(t,i){return e.addOrRemoveCssClass(t,i)},setUserStyles:function(t){return le(s,t)},setTop:function(t){return o.top=t},setTransform:function(t){return o.transform=t},setRowIndex:function(t){return s.setAttribute("row-index",t)},setRowId:function(t){return s.setAttribute("row-id",t)},setRowBusinessKey:function(t){return s.setAttribute("row-business-key",t)}};i.setComp(a,e.getGui(),r);e.addDestroyFunc((function(){i.unsetComp(r)}));return e}i.prototype.getInitialStyle=function(t){var i=this.rowCtrl.getInitialTransform(t);var n=this.rowCtrl.getInitialRowTop(t);return i?"transform: "+i:"top: "+n};i.prototype.showFullWidth=function(t){var i=this;var n=function(t){if(i.isAlive()){var n=t.getGui();i.getGui().appendChild(n);i.rowCtrl.setupDetailRowAutoHeight(n);i.setFullWidthRowComp(t)}else{i.beans.context.destroyBean(t)}};var r=t.newAgStackInstance();if(!r){return}r.then(n)};i.prototype.setCellCtrls=function(t){var i=this;var n=Object.assign({},this.cellComps);t.forEach((function(t){var r=t.getInstanceId();var e=i.cellComps[r];if(e==null){i.newCellComp(t)}else{n[r]=null}}));var r=R(n).filter((function(t){return t!=null}));this.destroyCells(r);this.ensureDomOrder(t)};i.prototype.ensureDomOrder=function(t){var i=this;if(!this.domOrder){return}var n=[];t.forEach((function(t){var r=i.cellComps[t.getInstanceId()];if(r){n.push(r.getGui())}}));fe(this.getGui(),n)};i.prototype.newCellComp=function(t){var i=new Gc(this.beans,t,this.rowCtrl.isPrintLayout(),this.getGui(),this.rowCtrl.isEditing());this.cellComps[t.getInstanceId()]=i;this.getGui().appendChild(i.getGui())};i.prototype.destroy=function(){t.prototype.destroy.call(this);this.destroyAllCells()};i.prototype.destroyAllCells=function(){var t=R(this.cellComps).filter((function(t){return t!=null}));this.destroyCells(t)};i.prototype.setFullWidthRowComp=function(t){var i=this;if(this.fullWidthCellRenderer){console.error("AG Grid - should not be setting fullWidthRowComponent twice")}this.fullWidthCellRenderer=t;this.addDestroyFunc((function(){i.fullWidthCellRenderer=i.beans.context.destroyBean(i.fullWidthCellRenderer)}))};i.prototype.getFullWidthCellRenderer=function(){return this.fullWidthCellRenderer};i.prototype.destroyCells=function(t){var i=this;t.forEach((function(t){if(!t){return}var n=t.getCtrl().getInstanceId();if(i.cellComps[n]!==t){return}t.detach();t.destroy();i.cellComps[n]=null}))};return i}(vs);var Ic=function(){var t=function(i,n){t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var n in i)if(Object.prototype.hasOwnProperty.call(i,n))t[n]=i[n]};return t(i,n)};return function(i,n){if(typeof n!=="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(i,n);function r(){this.constructor=i}i.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}();var Nc=function(){Nc=Object.assign||function(t){for(var i,n=1,r=arguments.length;n<r;n++){i=arguments[n];for(var e in i)if(Object.prototype.hasOwnProperty.call(i,e))t[e]=i[e]}return t};return Nc.apply(this,arguments)};var Hc=function(t,i,n,r){var e=arguments.length,s=e<3?i:r===null?r=Object.getOwnPropertyDescriptor(i,n):r,o;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")s=Reflect.decorate(t,i,n,r);else for(var u=t.length-1;u>=0;u--)if(o=t[u])s=(e<3?o(s):e>3?o(i,n,s):o(i,n))||s;return e>3&&s&&Object.defineProperty(i,n,s),s};function Lc(){var t=vs.elementGettingCreated.getAttribute("name");var i=pc.getRowContainerCssClasses(t);var n;var r=t===hc.CENTER||t===hc.TOP_CENTER||t===hc.STICKY_TOP_CENTER||t===hc.BOTTOM_CENTER;if(r){n='<div class="'+i.viewport+'" ref="eViewport" role="presentation">\n <div class="'+i.container+'" ref="eContainer"></div>\n </div>'}else{n='<div class="'+i.container+'" ref="eContainer"></div>'}return n}var Vc=function(t){Ic(i,t);function i(){var i=t.call(this,Lc())||this;i.rowComps={};i.name=vs.elementGettingCreated.getAttribute("name");i.type=lc(i.name);return i}i.prototype.postConstruct=function(){var t=this;var i={setViewportHeight:function(i){return t.eViewport.style.height=i},setRowCtrls:function(i){return t.setRowCtrls(i)},setDomOrder:function(i){t.domOrder=i},setContainerWidth:function(i){return t.eContainer.style.width=i}};var n=this.createManagedBean(new pc(this.name));n.setComp(i,this.eContainer,this.eViewport)};i.prototype.preDestroy=function(){this.setRowCtrls([])};i.prototype.setRowCtrls=function(t){var i=this;var n=Nc({},this.rowComps);this.rowComps={};this.lastPlacedElement=null;var r=function(t){var r=t.getInstanceId();var e=n[r];if(e){i.rowComps[r]=e;delete n[r];i.ensureDomOrder(e.getGui())}else{if(!t.getRowNode().displayed){return}var s=new Ec(t,i.beans,i.type);i.rowComps[r]=s;i.appendRow(s.getGui())}};t.forEach(r);R(n).forEach((function(t){i.eContainer.removeChild(t.getGui());t.destroy()}));bn(this.eContainer,t.length?"rowgroup":"presentation")};i.prototype.appendRow=function(t){if(this.domOrder){he(this.eContainer,t,this.lastPlacedElement)}else{this.eContainer.appendChild(t)}this.lastPlacedElement=t};i.prototype.ensureDomOrder=function(t){if(this.domOrder){ae(this.eContainer,t,this.lastPlacedElement);this.lastPlacedElement=t}};Hc([ut("beans")],i.prototype,"beans",void 0);Hc([ds("eViewport")],i.prototype,"eViewport",void 0);Hc([ds("eContainer")],i.prototype,"eContainer",void 0);Hc([et],i.prototype,"postConstruct",null);Hc([st],i.prototype,"preDestroy",null);return i}(vs);var Bc=function(t,i,n,r){var e=arguments.length,s=e<3?i:r===null?r=Object.getOwnPropertyDescriptor(i,n):r,o;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")s=Reflect.decorate(t,i,n,r);else for(var u=t.length-1;u>=0;u--)if(o=t[u])s=(e<3?o(s):e>3?o(i,n,s):o(i,n))||s;return e>3&&s&&Object.defineProperty(i,n,s),s};var zc=function(){function t(t){this.columnsToAggregate=[];this.columnsToGroup=[];this.columnsToPivot=[];this.pinned=t}t.prototype.onDragEnter=function(t){var i=this;this.clearColumnsList();if(this.gridOptionsService.is("functionsReadOnly")){return}var n=t.dragItem.columns;if(!n){return}n.forEach((function(t){if(!t.isPrimary()){return}if(t.isAnyFunctionActive()){return}if(t.isAllowValue()){i.columnsToAggregate.push(t)}else if(t.isAllowRowGroup()){i.columnsToGroup.push(t)}else if(t.isAllowPivot()){i.columnsToPivot.push(t)}}))};t.prototype.getIconName=function(){var t=this.columnsToAggregate.length+this.columnsToGroup.length+this.columnsToPivot.length;if(t>0){return this.pinned?Hu.ICON_PINNED:Hu.ICON_MOVE}return null};t.prototype.onDragLeave=function(t){this.clearColumnsList()};t.prototype.clearColumnsList=function(){this.columnsToAggregate.length=0;this.columnsToGroup.length=0;this.columnsToPivot.length=0};t.prototype.onDragging=function(t){};t.prototype.onDragStop=function(t){if(this.columnsToAggregate.length>0){this.columnModel.addValueColumns(this.columnsToAggregate,"toolPanelDragAndDrop")}if(this.columnsToGroup.length>0){this.columnModel.addRowGroupColumns(this.columnsToGroup,"toolPanelDragAndDrop")}if(this.columnsToPivot.length>0){this.columnModel.addPivotColumns(this.columnsToPivot,"toolPanelDragAndDrop")}};Bc([ut("columnModel")],t.prototype,"columnModel",void 0);Bc([ut("gridOptionsService")],t.prototype,"gridOptionsService",void 0);return t}();var Wc=function(t,i,n,r){var e=arguments.length,s=e<3?i:r===null?r=Object.getOwnPropertyDescriptor(i,n):r,o;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")s=Reflect.decorate(t,i,n,r);else for(var u=t.length-1;u>=0;u--)if(o=t[u])s=(e<3?o(s):e>3?o(i,n,s):o(i,n))||s;return e>3&&s&&Object.defineProperty(i,n,s),s};var Uc=function(t,i){var n=typeof Symbol==="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),e,s=[],o;try{while((i===void 0||i-- >0)&&!(e=r.next()).done)s.push(e.value)}catch(t){o={error:t}}finally{try{if(e&&!e.done&&(n=r["return"]))n.call(r)}finally{if(o)throw o.error}}return s};var Kc=function(){function t(t,n){this.needToMoveLeft=false;this.needToMoveRight=false;this.lastMovedInfo=null;this.pinned=t;this.eContainer=n;this.centerContainer=!i(t)}t.prototype.init=function(){var t=this;this.ctrlsService.whenReady((function(){t.gridBodyCon=t.ctrlsService.getGridBodyCtrl()}))};t.prototype.getIconName=function(){return this.pinned?Hu.ICON_PINNED:Hu.ICON_MOVE};t.prototype.onDragEnter=function(t){var i=t.dragItem.columns;var n=t.dragSource.type===Eu.ToolPanel;if(n){this.setColumnsVisible(i,true,"uiColumnDragged")}else{var r=t.dragItem.visibleState;var e=(i||[]).filter((function(t){return r[t.getId()]}));this.setColumnsVisible(e,true,"uiColumnDragged")}this.setColumnsPinned(i,this.pinned,"uiColumnDragged");this.onDragging(t,true,true)};t.prototype.onDragLeave=function(){this.ensureIntervalCleared();this.lastMovedInfo=null};t.prototype.setColumnsVisible=function(t,i,n){if(n===void 0){n="api"}if(t){var r=t.filter((function(t){return!t.getColDef().lockVisible}));this.columnModel.setColumnsVisible(r,i,n)}};t.prototype.setColumnsPinned=function(t,i,n){if(n===void 0){n="api"}if(t){var r=t.filter((function(t){return!t.getColDef().lockPinned}));this.columnModel.setColumnsPinned(r,i,n)}};t.prototype.onDragStop=function(){this.onDragging(this.lastDraggingEvent,false,true,true);this.ensureIntervalCleared();this.lastMovedInfo=null};t.prototype.normaliseX=function(t){if(this.gridOptionsService.is("enableRtl")){var i=this.eContainer.clientWidth;t=i-t}if(this.centerContainer){t+=this.ctrlsService.getCenterRowContainerCtrl().getCenterViewportScrollLeft()}return t};t.prototype.checkCenterForScrolling=function(t){if(this.centerContainer){var i=this.ctrlsService.getCenterRowContainerCtrl().getCenterViewportScrollLeft();var n=i+this.ctrlsService.getCenterRowContainerCtrl().getCenterWidth();if(this.gridOptionsService.is("enableRtl")){this.needToMoveRight=t<i+50;this.needToMoveLeft=t>n-50}else{this.needToMoveLeft=t<i+50;this.needToMoveRight=t>n-50}if(this.needToMoveLeft||this.needToMoveRight){this.ensureIntervalStarted()}else{this.ensureIntervalCleared()}}};t.prototype.onDragging=function(t,i,r,e){var s=this;var o;if(t===void 0){t=this.lastDraggingEvent}if(i===void 0){i=false}if(r===void 0){r=false}if(e===void 0){e=false}if(e){if(this.lastMovedInfo){var u=this.lastMovedInfo,a=u.columns,f=u.toIndex;this.moveColumns(a,f,"uiColumnMoved",true)}return}this.lastDraggingEvent=t;if(n(t.hDirection)){return}var h=this.normaliseX(t.x);if(!i){this.checkCenterForScrolling(h)}var c=this.normaliseDirection(t.hDirection);var l=t.dragSource.type;var v=((o=t.dragSource.getDragItem().columns)===null||o===void 0?void 0:o.filter((function(t){if(t.getColDef().lockPinned){return t.getPinned()==s.pinned}return true})))||[];this.attemptMoveColumns({dragSourceType:l,allMovingColumns:v,hDirection:c,mouseX:h,fromEnter:i,fakeEvent:r})};t.prototype.normaliseDirection=function(t){if(this.gridOptionsService.is("enableRtl")){switch(t){case Nu.Left:return Nu.Right;case Nu.Right:return Nu.Left;default:console.error("AG Grid: Unknown direction "+t)}}else{return t}};t.prototype.attemptMoveColumns=function(t){var i=t.dragSourceType,n=t.hDirection,r=t.mouseX,e=t.fromEnter,s=t.fakeEvent;var o=n===Nu.Left;var u=n===Nu.Right;var a=t.allMovingColumns;if(i===Eu.HeaderCell){var f=[];a.forEach((function(t){var i;var n=null;var r=t.getParent();while(r!=null&&r.getDisplayedLeafColumns().length===1){n=r;r=r.getParent()}if(n!=null){var e=!!((i=n.getColGroupDef())===null||i===void 0?void 0:i.marryChildren);var s=e?n.getProvidedColumnGroup().getLeafColumns():n.getLeafColumns();s.forEach((function(t){if(!f.includes(t)){f.push(t)}}))}else if(!f.includes(t)){f.push(t)}}));a=f}var h=a.slice();this.columnModel.sortColumnsLikeGridColumns(h);var c=this.calculateValidMoves(h,u,r);var l=this.calculateOldIndex(h);if(c.length===0){return}var v=c[0];var d=l!==null&&!e;if(i==Eu.HeaderCell){d=l!==null}if(d&&!s){if(o&&v>=l){return}if(u&&v<=l){return}}var p=this.columnModel.getAllDisplayedColumns();var g=[];var b=null;for(var w=0;w<c.length;w++){var y=c[w];var m=this.columnModel.getProposedColumnOrder(h,y);if(!this.columnModel.doesOrderPassRules(m)){continue}var S=m.filter((function(t){return p.includes(t)}));if(b===null){b=S}else if(!Xe.areEqual(S,b)){break}var C=this.groupFragCount(m);g.push({move:y,fragCount:C})}if(g.length===0){return}g.sort((function(t,i){return t.fragCount-i.fragCount}));this.moveColumns(a,g[0].move,"uiColumnMoved",false)};t.prototype.calculateOldIndex=function(t){var i=this.columnModel.getAllGridColumns();var n=Ft(t.map((function(t){return i.indexOf(t)})));var r=n[0];var e=xt(n);var s=e-r;var o=s!==n.length-1;return o?null:r};t.prototype.moveColumns=function(t,i,n,r){this.columnModel.moveColumns(t,i,n,r);this.lastMovedInfo=r?null:{columns:t,toIndex:i}};t.prototype.groupFragCount=function(t){function i(t){var i=[];var n=t.getOriginalParent();while(n!=null){i.push(n);n=n.getOriginalParent()}return i}var n=0;var r=function(r){var e;var s=i(t[r]);var o=i(t[r+1]);e=Uc(s.length>o.length?[s,o]:[o,s],2),s=e[0],o=e[1];s.forEach((function(t){if(o.indexOf(t)===-1){n++}}))};for(var e=0;e<t.length-1;e++){r(e)}return n};t.prototype.calculateValidMoves=function(t,i,n){var r=this.gridOptionsService.is("suppressMovableColumns")||t.some((function(t){return t.getColDef().suppressMovable}));if(r){return[]}var e=this.columnModel.getDisplayedColumns(this.pinned);var s=this.columnModel.getAllGridColumns();var o=e.filter((function(i){return Nt(t,i)}));var u=e.filter((function(i){return!Nt(t,i)}));var a=s.filter((function(i){return!Nt(t,i)}));var f=0;var h=n;if(i){var c=0;o.forEach((function(t){return c+=t.getActualWidth()}));h-=c}if(h>0){for(var l=0;l<u.length;l++){var v=u[l];h-=v.getActualWidth();if(h<0){break}f++}if(i){f++}}var d;if(f>0){var p=u[f-1];d=a.indexOf(p)+1}else{d=a.indexOf(u[0]);if(d===-1){d=0}}var g=[d];var b=function(t,i){return t-i};if(i){var w=d+1;var y=s.length-1;while(w<=y){g.push(w);w++}g.sort(b)}else{var w=d;var y=s.length-1;var m=s[w];while(w<=y&&this.isColumnHidden(e,m)){w++;g.push(w);m=s[w]}w=d-1;var S=0;while(w>=S){g.push(w);w--}g.sort(b).reverse()}return g};t.prototype.isColumnHidden=function(t,i){return t.indexOf(i)<0};t.prototype.ensureIntervalStarted=function(){if(!this.movingIntervalId){this.intervalCount=0;this.failedMoveAttempts=0;this.movingIntervalId=window.setInterval(this.moveInterval.bind(this),100);if(this.needToMoveLeft){this.dragAndDropService.setGhostIcon(Hu.ICON_LEFT,true)}else{this.dragAndDropService.setGhostIcon(Hu.ICON_RIGHT,true)}}};t.prototype.ensureIntervalCleared=function(){if(this.movingIntervalId){window.clearInterval(this.movingIntervalId);this.movingIntervalId=null;this.dragAndDropService.setGhostIcon(Hu.ICON_MOVE)}};t.prototype.moveInterval=function(){var t;this.intervalCount++;t=10+this.intervalCount*5;if(t>100){t=100}var i=null;var n=this.gridBodyCon.getScrollFeature();if(this.needToMoveLeft){i=n.scrollHorizontally(-t)}else if(this.needToMoveRight){i=n.scrollHorizontally(t)}if(i!==0){this.onDragging(this.lastDraggingEvent);this.failedMoveAttempts=0}else{this.failedMoveAttempts++;var r=this.lastDraggingEvent.dragItem.columns;var e=r.filter((function(t){return!t.getColDef().lockPinned}));if(e.length>0){this.dragAndDropService.setGhostIcon(Hu.ICON_PINNED);if(this.failedMoveAttempts>7){var s=this.needToMoveLeft?"left":"right";this.setColumnsPinned(e,s,"uiColumnDragged");this.dragAndDropService.nudge()}}}};Wc([ut("columnModel")],t.prototype,"columnModel",void 0);Wc([ut("dragAndDropService")],t.prototype,"dragAndDropService",void 0);Wc([ut("gridOptionsService")],t.prototype,"gridOptionsService",void 0);Wc([ut("ctrlsService")],t.prototype,"ctrlsService",void 0);Wc([et],t.prototype,"init",null);return t}();var qc=function(){var t=function(i,n){t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var n in i)if(Object.prototype.hasOwnProperty.call(i,n))t[n]=i[n]};return t(i,n)};return function(i,n){if(typeof n!=="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(i,n);function r(){this.constructor=i}i.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}();var Yc=function(t,i,n,r){var e=arguments.length,s=e<3?i:r===null?r=Object.getOwnPropertyDescriptor(i,n):r,o;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")s=Reflect.decorate(t,i,n,r);else for(var u=t.length-1;u>=0;u--)if(o=t[u])s=(e<3?o(s):e>3?o(i,n,s):o(i,n))||s;return e>3&&s&&Object.defineProperty(i,n,s),s};var Qc=function(t){qc(i,t);function i(i,n){var r=t.call(this)||this;r.pinned=i;r.eContainer=n;return r}i.prototype.postConstruct=function(){var t=this;this.ctrlsService.whenReady((function(i){switch(t.pinned){case"left":t.eSecondaryContainers=[[i.gridBodyCtrl.getBodyViewportElement(),i.leftRowContainerCtrl.getContainerElement()],[i.bottomLeftRowContainerCtrl.getContainerElement()],[i.topLeftRowContainerCtrl.getContainerElement()]];break;case"right":t.eSecondaryContainers=[[i.gridBodyCtrl.getBodyViewportElement(),i.rightRowContainerCtrl.getContainerElement()],[i.bottomRightRowContainerCtrl.getContainerElement()],[i.topRightRowContainerCtrl.getContainerElement()]];break;default:t.eSecondaryContainers=[[i.gridBodyCtrl.getBodyViewportElement(),i.centerRowContainerCtrl.getViewportElement()],[i.bottomCenterRowContainerCtrl.getViewportElement()],[i.topCenterRowContainerCtrl.getViewportElement()]];break}}))};i.prototype.isInterestedIn=function(t){return t===Eu.HeaderCell||t===Eu.ToolPanel&&this.gridOptionsService.is("allowDragFromColumnsToolPanel")};i.prototype.getSecondaryContainers=function(){return this.eSecondaryContainers};i.prototype.getContainer=function(){return this.eContainer};i.prototype.init=function(){this.moveColumnFeature=this.createManagedBean(new Kc(this.pinned,this.eContainer));this.bodyDropPivotTarget=this.createManagedBean(new zc(this.pinned));this.dragAndDropService.addDropTarget(this)};i.prototype.getIconName=function(){return this.currentDropListener.getIconName()};i.prototype.isDropColumnInPivotMode=function(t){return this.columnModel.isPivotMode()&&t.dragSource.type===Eu.ToolPanel};i.prototype.onDragEnter=function(t){this.currentDropListener=this.isDropColumnInPivotMode(t)?this.bodyDropPivotTarget:this.moveColumnFeature;this.currentDropListener.onDragEnter(t)};i.prototype.onDragLeave=function(t){this.currentDropListener.onDragLeave(t)};i.prototype.onDragging=function(t){this.currentDropListener.onDragging(t)};i.prototype.onDragStop=function(t){this.currentDropListener.onDragStop(t)};Yc([ut("dragAndDropService")],i.prototype,"dragAndDropService",void 0);Yc([ut("columnModel")],i.prototype,"columnModel",void 0);Yc([ut("ctrlsService")],i.prototype,"ctrlsService",void 0);Yc([et],i.prototype,"postConstruct",null);Yc([et],i.prototype,"init",null);return i}(ri);var Jc=function(t,i){var n=typeof Symbol==="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),e,s=[],o;try{while((i===void 0||i-- >0)&&!(e=r.next()).done)s.push(e.value)}catch(t){o={error:t}}finally{try{if(e&&!e.done&&(n=r["return"]))n.call(r)}finally{if(o)throw o.error}}return s};var Zc=function(t,i){for(var n=0,r=i.length,e=t.length;n<r;n++,e++)t[e]=i[n];return t};var $c=function(){function t(){}t.getHeaderClassesFromColDef=function(t,i,r,e){if(n(t)){return[]}return this.getColumnClassesFromCollDef(t.headerClass,t,i,r,e)};t.getToolPanelClassesFromColDef=function(t,i,r,e){if(n(t)){return[]}return this.getColumnClassesFromCollDef(t.toolPanelClass,t,i,r,e)};t.getClassParams=function(t,i,n,r){return{colDef:t,column:n,columnGroup:r,api:i.api,columnApi:i.columnApi,context:i.context}};t.getColumnClassesFromCollDef=function(t,i,r,e,s){if(n(t)){return[]}var o;if(typeof t==="function"){var u=this.getClassParams(i,r,e,s);o=t(u)}else{o=t}if(typeof o==="string"){return[o]}if(Array.isArray(o)){return Zc([],Jc(o))}return[]};return t}();var Xc=function(){var t=function(i,n){t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var n in i)if(Object.prototype.hasOwnProperty.call(i,n))t[n]=i[n]};return t(i,n)};return function(i,n){if(typeof n!=="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(i,n);function r(){this.constructor=i}i.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}();var tl=function(t,i,n,r){var e=arguments.length,s=e<3?i:r===null?r=Object.getOwnPropertyDescriptor(i,n):r,o;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")s=Reflect.decorate(t,i,n,r);else for(var u=t.length-1;u>=0;u--)if(o=t[u])s=(e<3?o(s):e>3?o(i,n,s):o(i,n))||s;return e>3&&s&&Object.defineProperty(i,n,s),s};var il=function(t){Xc(i,t);function i(n){var r=t.call(this,i.TEMPLATE,n)||this;r.headerCompVersion=0;r.column=n.getColumnGroupChild();r.pinned=n.getPinned();return r}i.prototype.postConstruct=function(){var t=this;var i=this.getGui();var n=function(t,n){if(n!=null&&n!=""){i.setAttribute(t,n)}else{i.removeAttribute(t)}};n("col-id",this.column.getColId());var r={setWidth:function(t){return i.style.width=t},addOrRemoveCssClass:function(i,n){return t.addOrRemoveCssClass(i,n)},setAriaDescription:function(t){return jn(i,t)},setAriaSort:function(t){return t?Vn(i,t):Bn(i)},setUserCompDetails:function(i){return t.setUserCompDetails(i)},getUserCompInstance:function(){return t.headerComp}};this.ctrl.setComp(r,this.getGui(),this.eResize,this.eHeaderCompWrapper);var e=this.ctrl.getSelectAllGui();this.eResize.insertAdjacentElement("afterend",e)};i.prototype.destroyHeaderComp=function(){if(this.headerComp){this.eHeaderCompWrapper.removeChild(this.headerCompGui);this.headerComp=this.destroyBean(this.headerComp);this.headerCompGui=undefined}};i.prototype.setUserCompDetails=function(t){var i=this;this.headerCompVersion++;var n=this.headerCompVersion;t.newAgStackInstance().then((function(t){return i.afterCompCreated(n,t)}))};i.prototype.afterCompCreated=function(t,i){if(t!=this.headerCompVersion||!this.isAlive()){this.destroyBean(i);return}this.destroyHeaderComp();this.headerComp=i;this.headerCompGui=i.getGui();this.eHeaderCompWrapper.appendChild(this.headerCompGui);this.ctrl.setDragSource(this.getGui())};i.TEMPLATE='<div class="ag-header-cell" role="columnheader" tabindex="-1">\n <div ref="eResize" class="ag-header-cell-resize" role="presentation"></div>\n <div ref="eHeaderCompWrapper" class="ag-header-cell-comp-wrapper" role="presentation"></div>\n </div>';tl([ds("eResize")],i.prototype,"eResize",void 0);tl([ds("eHeaderCompWrapper")],i.prototype,"eHeaderCompWrapper",void 0);tl([et],i.prototype,"postConstruct",null);tl([st],i.prototype,"destroyHeaderComp",null);return i}(wf);var nl=function(){var t=function(i,n){t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var n in i)if(Object.prototype.hasOwnProperty.call(i,n))t[n]=i[n]};return t(i,n)};return function(i,n){if(typeof n!=="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(i,n);function r(){this.constructor=i}i.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}();var rl=function(t,i,n,r){var e=arguments.length,s=e<3?i:r===null?r=Object.getOwnPropertyDescriptor(i,n):r,o;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")s=Reflect.decorate(t,i,n,r);else for(var u=t.length-1;u>=0;u--)if(o=t[u])s=(e<3?o(s):e>3?o(i,n,s):o(i,n))||s;return e>3&&s&&Object.defineProperty(i,n,s),s};var el=function(t){nl(i,t);function i(n){return t.call(this,i.TEMPLATE,n)||this}i.prototype.postConstruct=function(){var t=this;var i=this.getGui();var n=function(t,n){return n!=undefined?i.setAttribute(t,n):i.removeAttribute(t)};i.setAttribute("col-id",this.ctrl.getColId());var r={addOrRemoveCssClass:function(i,n){return t.addOrRemoveCssClass(i,n)},setResizableDisplayed:function(i){return Lr(t.eResize,i)},setWidth:function(t){return i.style.width=t},setAriaExpanded:function(t){return n("aria-expanded",t)},setUserCompDetails:function(i){return t.setUserCompDetails(i)}};this.ctrl.setComp(r,i,this.eResize)};i.prototype.setUserCompDetails=function(t){var i=this;t.newAgStackInstance().then((function(t){return i.afterHeaderCompCreated(t)}))};i.prototype.afterHeaderCompCreated=function(t){var i=this;var n=function(){return i.destroyBean(t)};if(!this.isAlive()){n();return}var r=this.getGui();var e=t.getGui();r.appendChild(e);this.addDestroyFunc(n);this.ctrl.setDragSource(r)};i.TEMPLATE='<div class="ag-header-group-cell" role="columnheader" tabindex="-1">\n <div ref="eResize" class="ag-header-cell-resize" role="presentation"></div>\n </div>';rl([ut("userComponentFactory")],i.prototype,"userComponentFactory",void 0);rl([ds("eResize")],i.prototype,"eResize",void 0);rl([et],i.prototype,"postConstruct",null);return i}(wf);var sl=function(){var t=function(i,n){t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var n in i)if(Object.prototype.hasOwnProperty.call(i,n))t[n]=i[n]};return t(i,n)};return function(i,n){if(typeof n!=="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(i,n);function r(){this.constructor=i}i.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}();var ol=function(t,i,n,r){var e=arguments.length,s=e<3?i:r===null?r=Object.getOwnPropertyDescriptor(i,n):r,o;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")s=Reflect.decorate(t,i,n,r);else for(var u=t.length-1;u>=0;u--)if(o=t[u])s=(e<3?o(s):e>3?o(i,n,s):o(i,n))||s;return e>3&&s&&Object.defineProperty(i,n,s),s};var ul;(function(t){t["COLUMN_GROUP"]="group";t["COLUMN"]="column";t["FLOATING_FILTER"]="filter"})(ul||(ul={}));var al=function(t){sl(i,t);function i(i){var n=t.call(this)||this;n.headerComps={};n.ctrl=i;n.setTemplate('<div class="'+n.ctrl.getHeaderRowClass()+'" role="row"></div>');return n}i.prototype.init=function(){var t=this;this.getGui().style.transform=this.ctrl.getTransform();In(this.getGui(),this.ctrl.getAriaRowIndex());var i={setHeight:function(i){return t.getGui().style.height=i},setTop:function(i){return t.getGui().style.top=i},setHeaderCtrls:function(i,n){return t.setHeaderCtrls(i,n)},setWidth:function(i){return t.getGui().style.width=i}};this.ctrl.setComp(i)};i.prototype.destroyHeaderCtrls=function(){this.setHeaderCtrls([],false)};i.prototype.setHeaderCtrls=function(t,i){var n=this;if(!this.isAlive()){return}var r=this.headerComps;this.headerComps={};t.forEach((function(t){var i=t.getInstanceId();var e=r[i];delete r[i];if(e==null){e=n.createHeaderComp(t);n.getGui().appendChild(e.getGui())}n.headerComps[i]=e}));g(r,(function(t,i){n.getGui().removeChild(i.getGui());n.destroyBean(i)}));if(i){var e=R(this.headerComps);e.sort((function(t,i){var n=t.getCtrl().getColumnGroupChild().getLeft();var r=i.getCtrl().getColumnGroupChild().getLeft();return n-r}));var s=e.map((function(t){return t.getGui()}));fe(this.getGui(),s)}};i.prototype.createHeaderComp=function(t){var i;switch(this.ctrl.getType()){case ul.COLUMN_GROUP:i=new el(t);break;case ul.FLOATING_FILTER:i=new Sf(t);break;default:i=new il(t);break}this.createBean(i);i.setParentComponent(this);return i};ol([et],i.prototype,"init",null);ol([st],i.prototype,"destroyHeaderCtrls",null);return i}(vs);var fl=function(){var t=function(i,n){t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var n in i)if(Object.prototype.hasOwnProperty.call(i,n))t[n]=i[n]};return t(i,n)};return function(i,n){if(typeof n!=="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(i,n);function r(){this.constructor=i}i.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}();var hl=function(t,i,n,r){var e=arguments.length,s=e<3?i:r===null?r=Object.getOwnPropertyDescriptor(i,n):r,o;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")s=Reflect.decorate(t,i,n,r);else for(var u=t.length-1;u>=0;u--)if(o=t[u])s=(e<3?o(s):e>3?o(i,n,s):o(i,n))||s;return e>3&&s&&Object.defineProperty(i,n,s),s};var cl=0;var ll=function(t){fl(i,t);function i(i,n){var r=t.call(this)||this;r.lastFocusEvent=null;r.columnGroupChild=i;r.parentRowCtrl=n;r.instanceId=i.getUniqueId()+"-"+cl++;return r}i.prototype.shouldStopEventPropagation=function(t){var i=this.focusService.getFocusedHeader(),n=i.headerRowIndex,r=i.column;return Le(this.gridOptionsService,t,n,r)};i.prototype.getWrapperHasFocus=function(){var t=this.gridOptionsService.getDocument();var i=t.activeElement;return i===this.eGui};i.prototype.setGui=function(t){this.eGui=t;this.addDomData()};i.prototype.handleKeyDown=function(t){var i=this.getWrapperHasFocus();switch(t.key){case Te.PAGE_DOWN:case Te.PAGE_UP:case Te.PAGE_HOME:case Te.PAGE_END:if(i){t.preventDefault()}}};i.prototype.addDomData=function(){var t=this;var n=i.DOM_DATA_KEY_HEADER_CTRL;this.gridOptionsService.setDomData(this.eGui,n,this);this.addDestroyFunc((function(){return t.gridOptionsService.setDomData(t.eGui,n,null)}))};i.prototype.getGui=function(){return this.eGui};i.prototype.focus=function(t){if(!this.eGui){return false}this.lastFocusEvent=t||null;this.eGui.focus();return true};i.prototype.getRowIndex=function(){return this.parentRowCtrl.getRowIndex()};i.prototype.getParentRowCtrl=function(){return this.parentRowCtrl};i.prototype.getPinned=function(){return this.parentRowCtrl.getPinned()};i.prototype.getInstanceId=function(){return this.instanceId};i.prototype.getColumnGroupChild=function(){return this.columnGroupChild};i.DOM_DATA_KEY_HEADER_CTRL="headerCtrl";hl([ut("focusService")],i.prototype,"focusService",void 0);hl([ut("beans")],i.prototype,"beans",void 0);hl([ut("userComponentFactory")],i.prototype,"userComponentFactory",void 0);return i}(ri);var vl=function(){var t=function(i,n){t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var n in i)if(Object.prototype.hasOwnProperty.call(i,n))t[n]=i[n]};return t(i,n)};return function(i,n){if(typeof n!=="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(i,n);function r(){this.constructor=i}i.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}();var dl=function(t,i,n,r){var e=arguments.length,s=e<3?i:r===null?r=Object.getOwnPropertyDescriptor(i,n):r,o;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")s=Reflect.decorate(t,i,n,r);else for(var u=t.length-1;u>=0;u--)if(o=t[u])s=(e<3?o(s):e>3?o(i,n,s):o(i,n))||s;return e>3&&s&&Object.defineProperty(i,n,s),s};var pl=function(t){vl(n,t);function n(i,n,r,e){var s=t.call(this)||this;s.columnOrGroup=i;s.eCell=n;s.ariaEl=s.eCell.querySelector("[role=columnheader]")||s.eCell;s.colsSpanning=e;s.beans=r;return s}n.prototype.setColsSpanning=function(t){this.colsSpanning=t;this.onLeftChanged()};n.prototype.getColumnOrGroup=function(){if(this.beans.gridOptionsService.is("enableRtl")&&this.colsSpanning){return xt(this.colsSpanning)}return this.columnOrGroup};n.prototype.postConstruct=function(){this.addManagedListener(this.columnOrGroup,mt.EVENT_LEFT_CHANGED,this.onLeftChanged.bind(this));this.setLeftFirstTime();this.addManagedListener(this.eventService,hi.EVENT_DISPLAYED_COLUMNS_WIDTH_CHANGED,this.onLeftChanged.bind(this));this.addManagedPropertyListener("domLayout",this.onLeftChanged.bind(this))};n.prototype.setLeftFirstTime=function(){var t=this.beans.gridOptionsService.is("suppressColumnMoveAnimation");var n=i(this.columnOrGroup.getOldLeft());var r=this.beans.columnAnimationService.isActive()&&n&&!t;if(r){this.animateInLeft()}else{this.onLeftChanged()}};n.prototype.animateInLeft=function(){var t=this;var i=this.getColumnOrGroup();var n=i.getLeft();var r=i.getOldLeft();var e=this.modifyLeftForPrintLayout(i,r);var s=this.modifyLeftForPrintLayout(i,n);this.setLeft(e);this.actualLeft=s;this.beans.columnAnimationService.executeNextVMTurn((function(){if(t.actualLeft===s){t.setLeft(s)}}))};n.prototype.onLeftChanged=function(){var t=this.getColumnOrGroup();var i=t.getLeft();this.actualLeft=this.modifyLeftForPrintLayout(t,i);this.setLeft(this.actualLeft)};n.prototype.modifyLeftForPrintLayout=function(t,i){var n=this.beans.gridOptionsService.isDomLayout("print");if(!n){return i}if(t.getPinned()==="left"){return i}var r=this.beans.columnModel.getDisplayedColumnsLeftWidth();if(t.getPinned()==="right"){var e=this.beans.columnModel.getBodyContainerWidth();return r+e+i}return r+i};n.prototype.setLeft=function(t){if(i(t)){this.eCell.style.left=t+"px"}var n;if(this.columnOrGroup instanceof mt){n=this.columnOrGroup}else{var r=this.columnOrGroup;var e=r.getLeafColumns();if(!e.length){return}if(e.length>1){Ln(this.ariaEl,e.length)}n=e[0]}var s=this.beans.columnModel.getAriaColumnIndex(n);Hn(this.ariaEl,s)};dl([et],n.prototype,"postConstruct",null);return n}(ri);var gl=function(){var t=function(i,n){t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var n in i)if(Object.prototype.hasOwnProperty.call(i,n))t[n]=i[n]};return t(i,n)};return function(i,n){if(typeof n!=="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(i,n);function r(){this.constructor=i}i.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}();var bl=function(t,i,n,r){var e=arguments.length,s=e<3?i:r===null?r=Object.getOwnPropertyDescriptor(i,n):r,o;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")s=Reflect.decorate(t,i,n,r);else for(var u=t.length-1;u>=0;u--)if(o=t[u])s=(e<3?o(s):e>3?o(i,n,s):o(i,n))||s;return e>3&&s&&Object.defineProperty(i,n,s),s};var wl=function(t){gl(i,t);function i(i,n){var r=t.call(this)||this;r.columns=i;r.element=n;return r}i.prototype.postConstruct=function(){if(this.gridOptionsService.is("columnHoverHighlight")){this.addMouseHoverListeners()}};i.prototype.addMouseHoverListeners=function(){this.addManagedListener(this.element,"mouseout",this.onMouseOut.bind(this));this.addManagedListener(this.element,"mouseover",this.onMouseOver.bind(this))};i.prototype.onMouseOut=function(){this.columnHoverService.clearMouseOver()};i.prototype.onMouseOver=function(){this.columnHoverService.setMouseOver(this.columns)};bl([ut("columnHoverService")],i.prototype,"columnHoverService",void 0);bl([et],i.prototype,"postConstruct",null);return i}(ri);var yl=function(){var t=function(i,n){t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var n in i)if(Object.prototype.hasOwnProperty.call(i,n))t[n]=i[n]};return t(i,n)};return function(i,n){if(typeof n!=="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(i,n);function r(){this.constructor=i}i.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}();var ml=function(t,i,n,r){var e=arguments.length,s=e<3?i:r===null?r=Object.getOwnPropertyDescriptor(i,n):r,o;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")s=Reflect.decorate(t,i,n,r);else for(var u=t.length-1;u>=0;u--)if(o=t[u])s=(e<3?o(s):e>3?o(i,n,s):o(i,n))||s;return e>3&&s&&Object.defineProperty(i,n,s),s};var Sl=function(t){yl(i,t);function i(i,n){var r=t.call(this,i,n)||this;r.iconCreated=false;r.column=i;return r}i.prototype.setComp=function(i,n,r,e){t.prototype.setGui.call(this,n);this.comp=i;this.eButtonShowMainFilter=r;this.eFloatingFilterBody=e;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,mt.EVENT_COL_DEF_CHANGED,this.onColDefChanged.bind(this))};i.prototype.setupActive=function(){var t=this.column.getColDef();var i=!!t.filter;var n=!!t.floatingFilter;this.active=i&&n};i.prototype.setupUi=function(){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);if(!this.active||this.iconCreated){return}var t=Fe("filter",this.gridOptionsService,this.column);if(t){this.iconCreated=true;this.eButtonShowMainFilter.appendChild(t)}};i.prototype.setupFocus=function(){this.createManagedBean(new _s(this.eGui,{shouldStopEventPropagation:this.shouldStopEventPropagation.bind(this),onTabKeyDown:this.onTabKeyDown.bind(this),handleKeyDown:this.handleKeyDown.bind(this),onFocusIn:this.onFocusIn.bind(this)}))};i.prototype.setupAria=function(){var t=this.localeService.getLocaleTextFunc();Cn(this.eButtonShowMainFilter,t("ariaFilterMenuOpen","Open Filter Menu"))};i.prototype.onTabKeyDown=function(t){var i=this.gridOptionsService.getDocument();var n=i.activeElement;var r=n===this.eGui;if(r){return}var e=this.focusService.findNextFocusableElement(this.eGui,null,t.shiftKey);if(e){this.beans.headerNavigationService.scrollToColumn(this.column);t.preventDefault();e.focus();return}var s=this.findNextColumnWithFloatingFilter(t.shiftKey);if(!s){return}if(this.focusService.focusHeaderPosition({headerPosition:{headerRowIndex:this.getParentRowCtrl().getRowIndex(),column:s},event:t})){t.preventDefault()}};i.prototype.findNextColumnWithFloatingFilter=function(t){var i=this.beans.columnModel;var n=this.column;do{n=t?i.getDisplayedColBefore(n):i.getDisplayedColAfter(n);if(!n){break}}while(!n.getColDef().filter||!n.getColDef().floatingFilter);return n};i.prototype.handleKeyDown=function(i){t.prototype.handleKeyDown.call(this,i);var n=this.getWrapperHasFocus();switch(i.key){case Te.UP:case Te.DOWN:if(!n){i.preventDefault()}case Te.LEFT:case Te.RIGHT:if(n){return}i.stopPropagation();case Te.ENTER:if(n){if(this.focusService.focusInto(this.eGui)){i.preventDefault()}}break;case Te.ESCAPE:if(!n){this.eGui.focus()}}};i.prototype.onFocusIn=function(t){var i=this.eGui.contains(t.relatedTarget);if(i){return}var n=!!t.relatedTarget&&!t.relatedTarget.classList.contains("ag-floating-filter");var r=!!t.relatedTarget&&zr(t.relatedTarget,"ag-floating-filter");if(n&&r&&t.target===this.eGui){var e=this.lastFocusEvent;var s=!!(e&&e.key===Te.TAB);if(e&&s){var o=e.shiftKey;this.focusService.focusInto(this.eGui,o)}}var u=this.getRowIndex();this.beans.focusService.setFocusedHeader(u,this.column)};i.prototype.setupHover=function(){var t=this;this.createManagedBean(new wl([this.column],this.eGui));var i=function(){if(!t.gridOptionsService.is("columnHoverHighlight")){return}var i=t.columnHoverService.isHovered(t.column);t.comp.addOrRemoveCssClass("ag-column-hover",i)};this.addManagedListener(this.eventService,hi.EVENT_COLUMN_HOVER_CHANGED,i);i()};i.prototype.setupLeft=function(){var t=new pl(this.column,this.eGui,this.beans);this.createManagedBean(t)};i.prototype.setupFilterButton=function(){var t=this.column.getColDef();this.suppressFilterButton=t.floatingFilterComponentParams?!!t.floatingFilterComponentParams.suppressFilterButton:false};i.prototype.setupUserComp=function(){var t=this;if(!this.active){return}var i=this.filterManager.getFloatingFilterCompDetails(this.column,(function(){return t.showParentFilter()}));if(i){this.setCompDetails(i)}};i.prototype.setCompDetails=function(t){this.userCompDetails=t;this.comp.setCompDetails(t)};i.prototype.showParentFilter=function(){var t=this.suppressFilterButton?this.eFloatingFilterBody:this.eButtonShowMainFilter;this.menuFactory.showMenuAfterButtonClick(this.column,t,"floatingFilter","filterMenuTab",["filterMenuTab"])};i.prototype.setupSyncWithFilter=function(){var t=this;if(!this.active){return}var i=function(i){var n=t.comp.getFloatingFilterComp();if(!n){return}n.then((function(n){if(n){var r=t.filterManager.getCurrentFloatingFilterParentModel(t.column);n.onParentModelChanged(r,i)}}))};this.destroySyncListener=this.addManagedListener(this.column,mt.EVENT_FILTER_CHANGED,i);if(this.filterManager.isFilterActive(this.column)){i(null)}};i.prototype.setupWidth=function(){var t=this;var i=function(){var i=t.column.getActualWidth()+"px";t.comp.setWidth(i)};this.addManagedListener(this.column,mt.EVENT_WIDTH_CHANGED,i);i()};i.prototype.setupFilterChangedListener=function(){if(this.active){this.destroyFilterChangedListener=this.addManagedListener(this.column,mt.EVENT_FILTER_CHANGED,this.updateFilterButton.bind(this))}};i.prototype.updateFilterButton=function(){if(!this.suppressFilterButton&&this.comp){this.comp.setButtonWrapperDisplayed(this.filterManager.isFilterAllowed(this.column))}};i.prototype.onColDefChanged=function(){var t=this;var i,n;var r=this.active;this.setupActive();var e=!r&&this.active;if(r&&!this.active){(i=this.destroySyncListener)===null||i===void 0?void 0:i.call(this);(n=this.destroyFilterChangedListener)===null||n===void 0?void 0:n.call(this)}var s=this.active?this.filterManager.getFloatingFilterCompDetails(this.column,(function(){return t.showParentFilter()})):null;var o=this.comp.getFloatingFilterComp();if(!o||!s){this.updateCompDetails(s,e)}else{o.then((function(i){var n;if(!i||t.filterManager.areFilterCompsDifferent((n=t.userCompDetails)!==null&&n!==void 0?n:null,s)){t.updateCompDetails(s,e)}else{t.updateFloatingFilterParams(s)}}))}};i.prototype.updateCompDetails=function(t,i){this.setCompDetails(t);this.setupFilterButton();this.setupUi();if(i){this.setupSyncWithFilter();this.setupFilterChangedListener()}};i.prototype.updateFloatingFilterParams=function(t){var i;if(!t){return}var n=t.params;(i=this.comp.getFloatingFilterComp())===null||i===void 0?void 0:i.then((function(t){if((t===null||t===void 0?void 0:t.onParamsUpdated)&&typeof t.onParamsUpdated==="function"){t.onParamsUpdated(n)}}))};ml([ut("filterManager")],i.prototype,"filterManager",void 0);ml([ut("columnHoverService")],i.prototype,"columnHoverService",void 0);ml([ut("menuFactory")],i.prototype,"menuFactory",void 0);return i}(ll);var Cl=function(){var t=function(i,n){t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var n in i)if(Object.prototype.hasOwnProperty.call(i,n))t[n]=i[n]};return t(i,n)};return function(i,n){if(typeof n!=="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(i,n);function r(){this.constructor=i}i.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}();var Ol=function(t,i,n,r){var e=arguments.length,s=e<3?i:r===null?r=Object.getOwnPropertyDescriptor(i,n):r,o;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")s=Reflect.decorate(t,i,n,r);else for(var u=t.length-1;u>=0;u--)if(o=t[u])s=(e<3?o(s):e>3?o(i,n,s):o(i,n))||s;return e>3&&s&&Object.defineProperty(i,n,s),s};var jl=function(t){Cl(i,t);function i(i,n,r,e,s){var o=t.call(this)||this;o.pinned=i;o.column=n;o.eResize=r;o.comp=e;o.ctrl=s;return o}i.prototype.postConstruct=function(){var t=this;var i=this.column.getColDef();var n=[];var r;var e;var s=function(){Lr(t.eResize,r);if(!r){return}var i=t.horizontalResizeService.addResizeBar({eResizeBar:t.eResize,onResizeStart:t.onResizeStart.bind(t),onResizing:t.onResizing.bind(t,false),onResizeEnd:t.onResizing.bind(t,true)});n.push(i);if(e){var s=t.gridOptionsService.is("skipHeaderOnAutoSize");var o=function(){t.columnModel.autoSizeColumn(t.column,s,"uiColumnResized")};t.eResize.addEventListener("dblclick",o);var u=new Qo(t.eResize);u.addEventListener(Qo.EVENT_DOUBLE_TAP,o);t.addDestroyFunc((function(){t.eResize.removeEventListener("dblclick",o);u.removeEventListener(Qo.EVENT_DOUBLE_TAP,o);u.destroy()}))}};var o=function(){n.forEach((function(t){return t()}));n.length=0};var u=function(){var n=t.column.isResizable();var u=!t.gridOptionsService.is("suppressAutoSize")&&!i.suppressAutoSize;var a=n!==r||u!==e;if(a){r=n;e=u;o();s()}};u();this.addDestroyFunc(o);this.ctrl.addRefreshFunction(u)};i.prototype.onResizing=function(t,i){var n=this.normaliseResizeAmount(i);var r=[{key:this.column,newWidth:this.resizeStartWidth+n}];this.columnModel.setColumnWidths(r,this.resizeWithShiftKey,t,"uiColumnResized");if(t){this.comp.addOrRemoveCssClass("ag-column-resizing",false)}};i.prototype.onResizeStart=function(t){this.resizeStartWidth=this.column.getActualWidth();this.resizeWithShiftKey=t;this.comp.addOrRemoveCssClass("ag-column-resizing",true)};i.prototype.normaliseResizeAmount=function(t){var i=t;var n=this.pinned!=="left";var r=this.pinned==="right";if(this.gridOptionsService.is("enableRtl")){if(n){i*=-1}}else{if(r){i*=-1}}return i};Ol([ut("horizontalResizeService")],i.prototype,"horizontalResizeService",void 0);Ol([ut("columnModel")],i.prototype,"columnModel",void 0);Ol([et],i.prototype,"postConstruct",null);return i}(ri);var Rl=function(){var t=function(i,n){t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var n in i)if(Object.prototype.hasOwnProperty.call(i,n))t[n]=i[n]};return t(i,n)};return function(i,n){if(typeof n!=="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(i,n);function r(){this.constructor=i}i.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}();var xl=function(t,i,n,r){var e=arguments.length,s=e<3?i:r===null?r=Object.getOwnPropertyDescriptor(i,n):r,o;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")s=Reflect.decorate(t,i,n,r);else for(var u=t.length-1;u>=0;u--)if(o=t[u])s=(e<3?o(s):e>3?o(i,n,s):o(i,n))||s;return e>3&&s&&Object.defineProperty(i,n,s),s};var _l=function(t){Rl(i,t);function i(i){var n=t.call(this)||this;n.cbSelectAllVisible=false;n.processingEventFromCheckbox=false;n.column=i;var r=i.getColDef();n.filteredOnly=!!(r===null||r===void 0?void 0:r.headerCheckboxSelectionFilteredOnly);n.currentPageOnly=!!(r===null||r===void 0?void 0:r.headerCheckboxSelectionCurrentPageOnly);return n}i.prototype.onSpaceKeyDown=function(t){var i=this.cbSelectAll;var n=this.gridOptionsService.getDocument();if(i.isDisplayed()&&!i.getGui().contains(n.activeElement)){t.preventDefault();i.setValue(!i.getValue())}};i.prototype.getCheckboxGui=function(){return this.cbSelectAll.getGui()};i.prototype.setComp=function(t){this.headerCellCtrl=t;this.cbSelectAll=this.createManagedBean(new io);this.cbSelectAll.addCssClass("ag-header-select-all");bn(this.cbSelectAll.getGui(),"presentation");this.showOrHideSelectAll();this.addManagedListener(this.eventService,hi.EVENT_NEW_COLUMNS_LOADED,this.showOrHideSelectAll.bind(this));this.addManagedListener(this.eventService,hi.EVENT_DISPLAYED_COLUMNS_CHANGED,this.showOrHideSelectAll.bind(this));this.addManagedListener(this.eventService,hi.EVENT_SELECTION_CHANGED,this.onSelectionChanged.bind(this));this.addManagedListener(this.eventService,hi.EVENT_PAGINATION_CHANGED,this.onSelectionChanged.bind(this));this.addManagedListener(this.eventService,hi.EVENT_MODEL_UPDATED,this.onModelChanged.bind(this));this.addManagedListener(this.cbSelectAll,hi.EVENT_FIELD_VALUE_CHANGED,this.onCbSelectAll.bind(this));Fn(this.cbSelectAll.getGui(),true);this.cbSelectAll.getInputElement().setAttribute("tabindex","-1");this.refreshSelectAllLabel()};i.prototype.showOrHideSelectAll=function(){this.cbSelectAllVisible=this.isCheckboxSelection();this.cbSelectAll.setDisplayed(this.cbSelectAllVisible,{skipAriaHidden:true});if(this.cbSelectAllVisible){this.checkRightRowModelType("selectAllCheckbox");this.checkSelectionType("selectAllCheckbox");this.updateStateOfCheckbox()}this.refreshSelectAllLabel()};i.prototype.onModelChanged=function(){if(!this.cbSelectAllVisible){return}this.updateStateOfCheckbox()};i.prototype.onSelectionChanged=function(){if(!this.cbSelectAllVisible){return}this.updateStateOfCheckbox()};i.prototype.updateStateOfCheckbox=function(){if(this.processingEventFromCheckbox){return}this.processingEventFromCheckbox=true;var t=this.selectionService.getSelectAllState(this.filteredOnly,this.currentPageOnly);this.cbSelectAll.setValue(t);this.refreshSelectAllLabel();this.processingEventFromCheckbox=false};i.prototype.refreshSelectAllLabel=function(){var t=this.localeService.getLocaleTextFunc();var i=this.cbSelectAll.getValue();var n=i?t("ariaChecked","checked"):t("ariaUnchecked","unchecked");var r=t("ariaRowSelectAll","Press Space to toggle all rows selection");if(!this.cbSelectAllVisible){this.headerCellCtrl.setAriaDescriptionProperty("selectAll",null)}else{this.headerCellCtrl.setAriaDescriptionProperty("selectAll",r+" ("+n+")")}this.cbSelectAll.setInputAriaLabel(r+" ("+n+")");this.headerCellCtrl.refreshAriaDescription()};i.prototype.checkSelectionType=function(t){var i=this.gridOptionsService.get("rowSelection")==="multiple";if(!i){console.warn("AG Grid: "+t+" is only available if using 'multiple' rowSelection.");return false}return true};i.prototype.checkRightRowModelType=function(t){var i=this.rowModel.getType();var n=i==="clientSide"||i==="serverSide";if(!n){console.warn("AG Grid: "+t+" is only available if using 'clientSide' or 'serverSide' rowModelType, you are using "+i+".");return false}return true};i.prototype.onCbSelectAll=function(){if(this.processingEventFromCheckbox){return}if(!this.cbSelectAllVisible){return}var t=this.cbSelectAll.getValue();var i="uiSelectAll";if(this.currentPageOnly)i="uiSelectAllCurrentPage";else if(this.filteredOnly)i="uiSelectAllFiltered";var n={source:i,justFiltered:this.filteredOnly,justCurrentPage:this.currentPageOnly};if(t){this.selectionService.selectAllRowNodes(n)}else{this.selectionService.deselectAllRowNodes(n)}};i.prototype.isCheckboxSelection=function(){var t=this.column.getColDef().headerCheckboxSelection;if(typeof t==="function"){var i=t;var n={column:this.column,colDef:this.column.getColDef(),columnApi:this.columnApi,api:this.gridApi,context:this.gridOptionsService.context};t=i(n)}if(t){return this.checkRightRowModelType("headerCheckboxSelection")&&this.checkSelectionType("headerCheckboxSelection")}return false};xl([ut("gridApi")],i.prototype,"gridApi",void 0);xl([ut("columnApi")],i.prototype,"columnApi",void 0);xl([ut("rowModel")],i.prototype,"rowModel",void 0);xl([ut("selectionService")],i.prototype,"selectionService",void 0);return i}(ri);var Al=function(){var t=function(i,n){t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var n in i)if(Object.prototype.hasOwnProperty.call(i,n))t[n]=i[n]};return t(i,n)};return function(i,n){if(typeof n!=="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(i,n);function r(){this.constructor=i}i.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}();var Fl=function(t,i,n,r){var e=arguments.length,s=e<3?i:r===null?r=Object.getOwnPropertyDescriptor(i,n):r,o;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")s=Reflect.decorate(t,i,n,r);else for(var u=t.length-1;u>=0;u--)if(o=t[u])s=(e<3?o(s):e>3?o(i,n,s):o(i,n))||s;return e>3&&s&&Object.defineProperty(i,n,s),s};var kl;(function(t){t["TAB_GUARD"]="ag-tab-guard";t["TAB_GUARD_TOP"]="ag-tab-guard-top";t["TAB_GUARD_BOTTOM"]="ag-tab-guard-bottom"})(kl||(kl={}));var Tl=function(t){Al(i,t);function i(i){var n=t.call(this)||this;n.skipTabGuardFocus=false;var r=i.comp,e=i.eTopGuard,s=i.eBottomGuard,o=i.focusInnerElement,u=i.onFocusIn,a=i.onFocusOut,f=i.shouldStopEventPropagation,h=i.onTabKeyDown,c=i.handleKeyDown,l=i.eFocusableElement;n.comp=r;n.eTopGuard=e;n.eBottomGuard=s;n.providedFocusInnerElement=o;n.eFocusableElement=l;n.providedFocusIn=u;n.providedFocusOut=a;n.providedShouldStopEventPropagation=f;n.providedOnTabKeyDown=h;n.providedHandleKeyDown=c;return n}i.prototype.postConstruct=function(){var t=this;this.createManagedBean(new _s(this.eFocusableElement,{shouldStopEventPropagation:function(){return t.shouldStopEventPropagation()},onTabKeyDown:function(i){return t.onTabKeyDown(i)},handleKeyDown:function(i){return t.handleKeyDown(i)},onFocusIn:function(i){return t.onFocusIn(i)},onFocusOut:function(i){return t.onFocusOut(i)}}));this.activateTabGuards();[this.eTopGuard,this.eBottomGuard].forEach((function(i){return t.addManagedListener(i,"focus",t.onFocus.bind(t))}))};i.prototype.handleKeyDown=function(t){if(this.providedHandleKeyDown){this.providedHandleKeyDown(t)}};i.prototype.tabGuardsAreActive=function(){return!!this.eTopGuard&&this.eTopGuard.hasAttribute("tabIndex")};i.prototype.shouldStopEventPropagation=function(){if(this.providedShouldStopEventPropagation){return this.providedShouldStopEventPropagation()}return false};i.prototype.activateTabGuards=function(){var t=this.gridOptionsService.getNum("tabIndex")||0;this.comp.setTabIndex(t.toString())};i.prototype.deactivateTabGuards=function(){this.comp.setTabIndex()};i.prototype.onFocus=function(t){if(this.skipTabGuardFocus){this.skipTabGuardFocus=false;return}var i=t.target===this.eBottomGuard;if(this.providedFocusInnerElement){this.providedFocusInnerElement(i)}else{this.focusInnerElement(i)}};i.prototype.onFocusIn=function(t){if(this.providedFocusIn&&this.providedFocusIn(t)){return}this.deactivateTabGuards()};i.prototype.onFocusOut=function(t){if(this.providedFocusOut&&this.providedFocusOut(t)){return}if(!this.eFocusableElement.contains(t.relatedTarget)){this.activateTabGuards()}};i.prototype.onTabKeyDown=function(t){var i=this;if(this.providedOnTabKeyDown){this.providedOnTabKeyDown(t);return}if(t.defaultPrevented){return}var n=this.tabGuardsAreActive();if(n){this.deactivateTabGuards()}var r=this.getNextFocusableElement(t.shiftKey);if(n){setTimeout((function(){return i.activateTabGuards()}),0)}if(!r){return}r.focus();t.preventDefault()};i.prototype.focusInnerElement=function(t){if(t===void 0){t=false}var i=this.focusService.findFocusableElements(this.eFocusableElement);if(this.tabGuardsAreActive()){i.splice(0,1);i.splice(i.length-1,1)}if(!i.length){return}i[t?i.length-1:0].focus({preventScroll:true})};i.prototype.getNextFocusableElement=function(t){return this.focusService.findNextFocusableElement(this.eFocusableElement,false,t)};i.prototype.forceFocusOutOfContainer=function(t){if(t===void 0){t=false}var i=t?this.eTopGuard:this.eBottomGuard;this.activateTabGuards();this.skipTabGuardFocus=true;i.focus()};Fl([ut("focusService")],i.prototype,"focusService",void 0);Fl([et],i.prototype,"postConstruct",null);return i}(ri);var Ml=function(){var t=function(i,n){t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var n in i)if(Object.prototype.hasOwnProperty.call(i,n))t[n]=i[n]};return t(i,n)};return function(i,n){if(typeof n!=="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(i,n);function r(){this.constructor=i}i.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}();var Dl=function(){Dl=Object.assign||function(t){for(var i,n=1,r=arguments.length;n<r;n++){i=arguments[n];for(var e in i)if(Object.prototype.hasOwnProperty.call(i,e))t[e]=i[e]}return t};return Dl.apply(this,arguments)};var Gl=function(t,i,n,r){var e=arguments.length,s=e<3?i:r===null?r=Object.getOwnPropertyDescriptor(i,n):r,o;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")s=Reflect.decorate(t,i,n,r);else for(var u=t.length-1;u>=0;u--)if(o=t[u])s=(e<3?o(s):e>3?o(i,n,s):o(i,n))||s;return e>3&&s&&Object.defineProperty(i,n,s),s};var Pl=function(t,i){var n=typeof Symbol==="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),e,s=[],o;try{while((i===void 0||i-- >0)&&!(e=r.next()).done)s.push(e.value)}catch(t){o={error:t}}finally{try{if(e&&!e.done&&(n=r["return"]))n.call(r)}finally{if(o)throw o.error}}return s};var El=function(t,i){for(var n=0,r=i.length,e=t.length;n<r;n++,e++)t[e]=i[n];return t};var Il=function(i){Ml(n,i);function n(){return i!==null&&i.apply(this,arguments)||this}r=n;n.addKeyboardModeEvents=function(t,i){var n=r.instancesMonitored.get(t);if(n&&n.length>0){if(n.indexOf(i)===-1){n.push(i)}}else{r.instancesMonitored.set(t,[i]);t.addEventListener("keydown",r.toggleKeyboardMode);t.addEventListener("mousedown",r.toggleKeyboardMode)}};n.removeKeyboardModeEvents=function(t,i){var n=r.instancesMonitored.get(t);var e=[];if(n&&n.length){e=El([],Pl(n)).filter((function(t){return t!==i}));r.instancesMonitored.set(t,e)}if(e.length===0){t.removeEventListener("keydown",r.toggleKeyboardMode);t.removeEventListener("mousedown",r.toggleKeyboardMode)}};n.toggleKeyboardMode=function(t){var i=r.keyboardModeActive;var n=t.type==="keydown";if(n){if(t.ctrlKey||t.metaKey||t.altKey){return}}if(i&&n||!i&&!n){return}r.keyboardModeActive=n;var e=t.target.ownerDocument;if(!e){return}var s=r.instancesMonitored.get(e);if(s){s.forEach((function(t){t.dispatchEvent({type:n?hi.EVENT_KEYBOARD_FOCUS:hi.EVENT_MOUSE_FOCUS})}))}};n.prototype.init=function(){var t=this;var i=this.clearFocusedCell.bind(this);this.addManagedListener(this.eventService,hi.EVENT_COLUMN_PIVOT_MODE_CHANGED,i);this.addManagedListener(this.eventService,hi.EVENT_NEW_COLUMNS_LOADED,this.onColumnEverythingChanged.bind(this));this.addManagedListener(this.eventService,hi.EVENT_COLUMN_GROUP_OPENED,i);this.addManagedListener(this.eventService,hi.EVENT_COLUMN_ROW_GROUP_CHANGED,i);this.ctrlsService.whenReady((function(i){t.gridCtrl=i.gridCtrl;var n=t.gridOptionsService.getDocument();r.addKeyboardModeEvents(n,t.gridCtrl);t.addDestroyFunc((function(){return t.unregisterGridCompController(t.gridCtrl)}))}))};n.prototype.unregisterGridCompController=function(t){var i=this.gridOptionsService.getDocument();r.removeKeyboardModeEvents(i,t)};n.prototype.onColumnEverythingChanged=function(){if(!this.focusedCellPosition){return}var t=this.focusedCellPosition.column;var i=this.columnModel.getGridColumn(t.getId());if(t!==i){this.clearFocusedCell()}};n.prototype.isKeyboardMode=function(){return r.keyboardModeActive};n.prototype.getFocusCellToUseAfterRefresh=function(){var t=this.gridOptionsService.getDocument();if(this.gridOptionsService.is("suppressFocusAfterRefresh")||!this.focusedCellPosition){return null}if(this.isDomDataMissingInHierarchy(t.activeElement,Ih.DOM_DATA_KEY_ROW_CTRL)){return null}return this.focusedCellPosition};n.prototype.getFocusHeaderToUseAfterRefresh=function(){var t=this.gridOptionsService.getDocument();if(this.gridOptionsService.is("suppressFocusAfterRefresh")||!this.focusedHeaderPosition){return null}if(this.isDomDataMissingInHierarchy(t.activeElement,ll.DOM_DATA_KEY_HEADER_CTRL)){return null}return this.focusedHeaderPosition};n.prototype.isDomDataMissingInHierarchy=function(t,i){var n=t;while(n){var r=this.gridOptionsService.getDomData(n,i);if(r){return false}n=n.parentNode}return true};n.prototype.getFocusedCell=function(){return this.focusedCellPosition};n.prototype.shouldRestoreFocus=function(t){var i=this;if(this.isCellRestoreFocused(t)){setTimeout((function(){i.restoredFocusedCellPosition=null}),0);return true}return false};n.prototype.isCellRestoreFocused=function(t){if(this.restoredFocusedCellPosition==null){return false}return this.cellPositionUtils.equals(t,this.restoredFocusedCellPosition)};n.prototype.setRestoreFocusedCell=function(t){if(this.getFrameworkOverrides().renderingEngine==="react"){this.restoredFocusedCellPosition=t}};n.prototype.getFocusEventParams=function(){var t=this.focusedCellPosition,i=t.rowIndex,n=t.rowPinned,r=t.column;var e={rowIndex:i,rowPinned:n,column:r,isFullWidthCell:false};var s=this.rowRenderer.getRowByPosition({rowIndex:i,rowPinned:n});if(s){e.isFullWidthCell=s.isFullWidth()}return e};n.prototype.clearFocusedCell=function(){this.restoredFocusedCellPosition=null;if(this.focusedCellPosition==null){return}var t=Dl({type:hi.EVENT_CELL_FOCUS_CLEARED},this.getFocusEventParams());this.focusedCellPosition=null;this.eventService.dispatchEvent(t)};n.prototype.setFocusedCell=function(i){var n=i.column,r=i.rowIndex,e=i.rowPinned,s=i.forceBrowserFocus,o=s===void 0?false:s,u=i.preventScrollOnBrowserFocus,a=u===void 0?false:u;var f=this.columnModel.getGridColumn(n);if(!f){this.focusedCellPosition=null;return}this.focusedCellPosition=f?{rowIndex:r,rowPinned:t(e),column:f}:null;var h=Dl(Dl({type:hi.EVENT_CELL_FOCUSED},this.getFocusEventParams()),{forceBrowserFocus:o,preventScrollOnBrowserFocus:a,floating:null});this.eventService.dispatchEvent(h)};n.prototype.isCellFocused=function(t){if(this.focusedCellPosition==null){return false}return this.cellPositionUtils.equals(t,this.focusedCellPosition)};n.prototype.isRowNodeFocused=function(t){return this.isRowFocused(t.rowIndex,t.rowPinned)};n.prototype.isHeaderWrapperFocused=function(t){if(this.focusedHeaderPosition==null){return false}var i=t.getColumnGroupChild();var n=t.getRowIndex();var r=t.getPinned();var e=this.focusedHeaderPosition,s=e.column,o=e.headerRowIndex;return i===s&&n===o&&r==s.getPinned()};n.prototype.clearFocusedHeader=function(){this.focusedHeaderPosition=null};n.prototype.getFocusedHeader=function(){return this.focusedHeaderPosition};n.prototype.setFocusedHeader=function(t,i){this.focusedHeaderPosition={headerRowIndex:t,column:i}};n.prototype.focusHeaderPosition=function(t){var i=t.direction,n=t.fromTab,r=t.allowUserOverride,e=t.event,s=t.fromCell;var o=t.headerPosition;if(s&&this.filterManager.isAdvancedFilterHeaderActive()){return this.focusAdvancedFilter(o)}if(r){var u=this.getFocusedHeader();var a=this.headerNavigationService.getHeaderRowCount();if(n){var f=this.gridOptionsService.getCallback("tabToNextHeader");if(f){var h={backwards:i==="Before",previousHeaderPosition:u,nextHeaderPosition:o,headerRowCount:a};o=f(h)}}else{var f=this.gridOptionsService.getCallback("navigateToNextHeader");if(f&&e){var c={key:e.key,previousHeaderPosition:u,nextHeaderPosition:o,headerRowCount:a,event:e};o=f(c)}}}if(!o){return false}if(o.headerRowIndex===-1){if(this.filterManager.isAdvancedFilterHeaderActive()){return this.focusAdvancedFilter(o)}else{return this.focusGridView(o.column)}}this.headerNavigationService.scrollToColumn(o.column,i);var l=this.ctrlsService.getHeaderRowContainerCtrl(o.column.getPinned());var v=l.focusHeader(o.headerRowIndex,o.column,e);return v};n.prototype.focusFirstHeader=function(){var t=this.columnModel.getAllDisplayedColumns()[0];if(!t){return false}if(t.getParent()){t=this.columnModel.getColumnGroupAtLevel(t,0)}return this.focusHeaderPosition({headerPosition:{headerRowIndex:0,column:t}})};n.prototype.focusLastHeader=function(t){var i=this.headerNavigationService.getHeaderRowCount()-1;var n=xt(this.columnModel.getAllDisplayedColumns());return this.focusHeaderPosition({headerPosition:{headerRowIndex:i,column:n},event:t})};n.prototype.focusPreviousFromFirstCell=function(t){if(this.filterManager.isAdvancedFilterHeaderActive()){return this.focusAdvancedFilter(null)}else{return this.focusLastHeader(t)}};n.prototype.isAnyCellFocused=function(){return!!this.focusedCellPosition};n.prototype.isRowFocused=function(i,n){if(this.focusedCellPosition==null){return false}return this.focusedCellPosition.rowIndex===i&&this.focusedCellPosition.rowPinned===t(n)};n.prototype.findFocusableElements=function(t,i,n){if(n===void 0){n=false}var r=Ir;var e=Nr;if(i){e+=", "+i}if(n){e+=', [tabindex="-1"]'}var s=Array.prototype.slice.apply(t.querySelectorAll(r));var o=Array.prototype.slice.apply(t.querySelectorAll(e));if(!o.length){return s}var u=function(t,i){return t.filter((function(t){return i.indexOf(t)===-1}))};return u(s,o)};n.prototype.focusInto=function(t,i,n){if(i===void 0){i=false}if(n===void 0){n=false}var r=this.findFocusableElements(t,null,n);var e=i?xt(r):r[0];if(e){e.focus({preventScroll:true});return true}return false};n.prototype.findFocusableElementBeforeTabGuard=function(t,i){if(!i){return null}var n=this.findFocusableElements(t);var r=n.indexOf(i);if(r===-1){return null}var e=-1;for(var s=r-1;s>=0;s--){if(n[s].classList.contains(kl.TAB_GUARD_TOP)){e=s;break}}if(e<=0){return null}return n[e-1]};n.prototype.findNextFocusableElement=function(t,i,n){if(t===void 0){t=this.eGridDiv}var r=this.findFocusableElements(t,i?':not([tabindex="-1"])':null);var e=this.gridOptionsService.getDocument();var s=e.activeElement;var o;if(i){o=r.findIndex((function(t){return t.contains(s)}))}else{o=r.indexOf(s)}var u=o+(n?-1:1);if(u<0||u>=r.length){return null}return r[u]};n.prototype.isTargetUnderManagedComponent=function(t,i){if(!i){return false}var n=t.querySelectorAll("."+_s.FOCUS_MANAGED_CLASS);if(!n.length){return false}for(var r=0;r<n.length;r++){if(n[r].contains(i)){return true}}return false};n.prototype.findTabbableParent=function(t,i){if(i===void 0){i=5}var n=0;while(t&&fr(t)===null&&++n<=i){t=t.parentElement}if(fr(t)===null){return null}return t};n.prototype.focusGridView=function(i,n){if(this.gridOptionsService.is("suppressCellFocus")){if(n){return this.focusLastHeader()}return this.focusNextGridCoreContainer(false)}var r=n?this.rowPositionUtils.getLastRow():this.rowPositionUtils.getFirstRow();if(!r){return false}var e=r.rowIndex,s=r.rowPinned;var o=this.getFocusedHeader();if(!i&&o){i=o.column}if(e==null||!i){return false}this.navigationService.ensureCellVisible({rowIndex:e,column:i,rowPinned:s});this.setFocusedCell({rowIndex:e,column:i,rowPinned:t(s),forceBrowserFocus:true});if(this.rangeService){var u={rowIndex:e,rowPinned:s,column:i};this.rangeService.setRangeToCell(u)}return true};n.prototype.focusNextGridCoreContainer=function(t,i){if(i===void 0){i=false}if(!i&&this.gridCtrl.focusNextInnerContainer(t)){return true}if(i||!t&&!this.gridCtrl.isDetailGrid()){this.gridCtrl.forceFocusOutOfContainer(t)}return false};n.prototype.focusAdvancedFilter=function(t){this.advancedFilterFocusColumn=t===null||t===void 0?void 0:t.column;return this.advancedFilterService.getCtrl().focusHeaderComp()};n.prototype.focusNextFromAdvancedFilter=function(t,i){var n,r;var e=(n=i?undefined:this.advancedFilterFocusColumn)!==null&&n!==void 0?n:(r=this.columnModel.getAllDisplayedColumns())===null||r===void 0?void 0:r[0];if(t){return this.focusHeaderPosition({headerPosition:{column:e,headerRowIndex:this.headerNavigationService.getHeaderRowCount()-1}})}else{return this.focusGridView(e)}};n.prototype.clearAdvancedFilterColumn=function(){this.advancedFilterFocusColumn=undefined};var r;n.AG_KEYBOARD_FOCUS="ag-keyboard-focus";n.keyboardModeActive=false;n.instancesMonitored=new Map;Gl([ut("eGridDiv")],n.prototype,"eGridDiv",void 0);Gl([ut("columnModel")],n.prototype,"columnModel",void 0);Gl([ut("headerNavigationService")],n.prototype,"headerNavigationService",void 0);Gl([ut("rowRenderer")],n.prototype,"rowRenderer",void 0);Gl([ut("rowPositionUtils")],n.prototype,"rowPositionUtils",void 0);Gl([ut("cellPositionUtils")],n.prototype,"cellPositionUtils",void 0);Gl([at("rangeService")],n.prototype,"rangeService",void 0);Gl([ut("navigationService")],n.prototype,"navigationService",void 0);Gl([ut("ctrlsService")],n.prototype,"ctrlsService",void 0);Gl([ut("filterManager")],n.prototype,"filterManager",void 0);Gl([at("advancedFilterService")],n.prototype,"advancedFilterService",void 0);Gl([et],n.prototype,"init",null);n=r=Gl([ot("focusService")],n);return n}(ri);var Nl=function(){var t=function(i,n){t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var n in i)if(Object.prototype.hasOwnProperty.call(i,n))t[n]=i[n]};return t(i,n)};return function(i,n){if(typeof n!=="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(i,n);function r(){this.constructor=i}i.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}();var Hl=function(t,i,n,r){var e=arguments.length,s=e<3?i:r===null?r=Object.getOwnPropertyDescriptor(i,n):r,o;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")s=Reflect.decorate(t,i,n,r);else for(var u=t.length-1;u>=0;u--)if(o=t[u])s=(e<3?o(s):e>3?o(i,n,s):o(i,n))||s;return e>3&&s&&Object.defineProperty(i,n,s),s};var Ll=function(t){Nl(i,t);function i(i,n){var r=t.call(this,i,n)||this;r.refreshFunctions=[];r.userHeaderClasses=new Set;r.ariaDescriptionProperties=new Map;r.column=i;return r}i.prototype.setComp=function(i,n,r,e){var s=this;t.prototype.setGui.call(this,n);this.comp=i;this.updateState();this.setupWidth();this.setupMovingCss();this.setupMenuClass();this.setupSortableClass();this.setupWrapTextClass();this.refreshSpanHeaderHeight();this.setupAutoHeight(e);this.addColumnHoverListener();this.setupFilterCss();this.setupClassesFromColDef();this.setupTooltip();this.addActiveHeaderMouseListeners();this.setupSelectAll();this.setupUserComp();this.refreshAria();this.createManagedBean(new jl(this.getPinned(),this.column,r,i,this));this.createManagedBean(new wl([this.column],n));this.createManagedBean(new pl(this.column,n,this.beans));this.createManagedBean(new _s(n,{shouldStopEventPropagation:function(t){return s.shouldStopEventPropagation(t)},onTabKeyDown:function(){return null},handleKeyDown:this.handleKeyDown.bind(this),onFocusIn:this.onFocusIn.bind(this),onFocusOut:this.onFocusOut.bind(this)}));this.addMouseDownListenerIfNeeded(n);this.addManagedListener(this.column,mt.EVENT_COL_DEF_CHANGED,this.onColDefChanged.bind(this));this.addManagedListener(this.eventService,hi.EVENT_COLUMN_VALUE_CHANGED,this.onColumnValueChanged.bind(this));this.addManagedListener(this.eventService,hi.EVENT_COLUMN_ROW_GROUP_CHANGED,this.onColumnRowGroupChanged.bind(this));this.addManagedListener(this.eventService,hi.EVENT_COLUMN_PIVOT_CHANGED,this.onColumnPivotChanged.bind(this));this.addManagedListener(this.eventService,hi.EVENT_HEADER_HEIGHT_CHANGED,this.onHeaderHeightChanged.bind(this));this.addManagedListener(this.eventService,hi.EVENT_DISPLAYED_COLUMNS_CHANGED,this.onHeaderHeightChanged.bind(this))};i.prototype.addMouseDownListenerIfNeeded=function(t){var i=this;if(!nr()){return}var n=["mousedown","touchstart"];var r=this.gridOptionsService.getDocument();n.forEach((function(n){i.addManagedListener(t,n,(function(i){var n=r.activeElement;if(n!==t&&!t.contains(n)){t.focus();Il.toggleKeyboardMode(i)}}))}))};i.prototype.setupUserComp=function(){var t=this.lookupUserCompDetails();this.setCompDetails(t)};i.prototype.setCompDetails=function(t){this.userCompDetails=t;this.comp.setUserCompDetails(t)};i.prototype.lookupUserCompDetails=function(){var t=this.createParams();var i=this.column.getColDef();return this.userComponentFactory.getHeaderCompDetails(i,t)};i.prototype.createParams=function(){var t=this;var i=this.column.getColDef();var n={column:this.column,displayName:this.displayName,enableSorting:i.sortable,enableMenu:this.menuEnabled,showColumnMenu:function(i){t.gridApi.showColumnMenuAfterButtonClick(t.column,i)},progressSort:function(i){t.sortController.progressSort(t.column,!!i,"uiColumnSorted")},setSort:function(i,n){t.sortController.setSortForColumn(t.column,i,!!n,"uiColumnSorted")},api:this.gridApi,columnApi:this.columnApi,context:this.gridOptionsService.context,eGridHeader:this.getGui()};return n};i.prototype.setupSelectAll=function(){this.selectAllFeature=this.createManagedBean(new _l(this.column));this.selectAllFeature.setComp(this)};i.prototype.getSelectAllGui=function(){return this.selectAllFeature.getCheckboxGui()};i.prototype.handleKeyDown=function(i){t.prototype.handleKeyDown.call(this,i);if(i.key===Te.SPACE){this.selectAllFeature.onSpaceKeyDown(i)}if(i.key===Te.ENTER){this.onEnterKeyDown(i)}};i.prototype.onEnterKeyDown=function(t){var i=this.comp.getUserCompInstance();if(!i){return}if(t.ctrlKey||t.metaKey){if(this.menuEnabled&&i.showMenu){t.preventDefault();i.showMenu()}}else if(this.sortable){var n=t.shiftKey;this.sortController.progressSort(this.column,n,"uiColumnSorted")}};i.prototype.isMenuEnabled=function(){return this.menuEnabled};i.prototype.onFocusIn=function(t){if(!this.getGui().contains(t.relatedTarget)){var i=this.getRowIndex();this.focusService.setFocusedHeader(i,this.column)}this.setActiveHeader(true)};i.prototype.onFocusOut=function(t){if(this.getGui().contains(t.relatedTarget)){return}this.setActiveHeader(false)};i.prototype.setupTooltip=function(){var t=this;var i={getColumn:function(){return t.column},getColDef:function(){return t.column.getColDef()},getGui:function(){return t.eGui},getLocation:function(){return"header"},getTooltipValue:function(){var i=t.column.getColDef().headerTooltip;return i}};var n=this.createManagedBean(new ah(i,this.beans));n.setComp(this.eGui);this.refreshFunctions.push((function(){return n.refreshToolTip()}))};i.prototype.setupClassesFromColDef=function(){var t=this;var i=function(){var i=t.column.getColDef();var n=$c.getHeaderClassesFromColDef(i,t.gridOptionsService,t.column,null);var r=t.userHeaderClasses;t.userHeaderClasses=new Set(n);n.forEach((function(i){if(r.has(i)){r.delete(i)}else{t.comp.addOrRemoveCssClass(i,true)}}));r.forEach((function(i){return t.comp.addOrRemoveCssClass(i,false)}))};this.refreshFunctions.push(i);i()};i.prototype.setDragSource=function(t){var i=this;this.dragSourceElement=t;this.removeDragSource();if(!t){return}if(!this.draggable){return}var n=!this.gridOptionsService.is("suppressDragLeaveHidesColumns");this.moveDragSource={type:Eu.HeaderCell,eElement:t,getDefaultIconName:function(){return n?Hu.ICON_HIDE:Hu.ICON_NOT_ALLOWED},getDragItem:function(){return i.createDragItem()},dragItemName:this.displayName,onDragStarted:function(){n=!i.gridOptionsService.is("suppressDragLeaveHidesColumns");i.column.setMoving(true,"uiColumnMoved")},onDragStopped:function(){return i.column.setMoving(false,"uiColumnMoved")},onGridEnter:function(t){var r;if(n){var e=((r=t===null||t===void 0?void 0:t.columns)===null||r===void 0?void 0:r.filter((function(t){return!t.getColDef().lockVisible})))||[];i.columnModel.setColumnsVisible(e,true,"uiColumnMoved")}},onGridExit:function(t){var r;if(n){var e=((r=t===null||t===void 0?void 0:t.columns)===null||r===void 0?void 0:r.filter((function(t){return!t.getColDef().lockVisible})))||[];i.columnModel.setColumnsVisible(e,false,"uiColumnMoved")}}};this.dragAndDropService.addDragSource(this.moveDragSource,true)};i.prototype.createDragItem=function(){var t={};t[this.column.getId()]=this.column.isVisible();return{columns:[this.column],visibleState:t}};i.prototype.removeDragSource=function(){if(this.moveDragSource){this.dragAndDropService.removeDragSource(this.moveDragSource);this.moveDragSource=undefined}};i.prototype.onColDefChanged=function(){this.refresh()};i.prototype.updateState=function(){var t=this.column.getColDef();this.menuEnabled=this.menuFactory.isMenuEnabled(this.column)&&!t.suppressMenu;this.sortable=t.sortable;this.displayName=this.calculateDisplayName();this.draggable=this.workOutDraggable()};i.prototype.addRefreshFunction=function(t){this.refreshFunctions.push(t)};i.prototype.refresh=function(){this.updateState();this.refreshHeaderComp();this.refreshAria();this.refreshFunctions.forEach((function(t){return t()}))};i.prototype.refreshHeaderComp=function(){var t=this.lookupUserCompDetails();var i=this.comp.getUserCompInstance();var n=i!=null&&this.userCompDetails.componentClass==t.componentClass;var r=n?this.attemptHeaderCompRefresh(t.params):false;if(r){this.setDragSource(this.dragSourceElement)}else{this.setCompDetails(t)}};i.prototype.attemptHeaderCompRefresh=function(t){var i=this.comp.getUserCompInstance();if(!i){return false}if(!i.refresh){return false}var n=i.refresh(t);return n};i.prototype.calculateDisplayName=function(){return this.columnModel.getDisplayNameForColumn(this.column,"header",true)};i.prototype.checkDisplayName=function(){if(this.displayName!==this.calculateDisplayName()){this.refresh()}};i.prototype.workOutDraggable=function(){var t=this.column.getColDef();var i=this.gridOptionsService.is("suppressMovableColumns");var n=!i&&!t.suppressMovable&&!t.lockPosition;return!!n||!!t.enableRowGroup||!!t.enablePivot};i.prototype.onColumnRowGroupChanged=function(){this.checkDisplayName()};i.prototype.onColumnPivotChanged=function(){this.checkDisplayName()};i.prototype.onColumnValueChanged=function(){this.checkDisplayName()};i.prototype.setupWidth=function(){var t=this;var i=function(){var i=t.column.getActualWidth();t.comp.setWidth(i+"px")};this.addManagedListener(this.column,mt.EVENT_WIDTH_CHANGED,i);i()};i.prototype.setupMovingCss=function(){var t=this;var i=function(){t.comp.addOrRemoveCssClass("ag-header-cell-moving",t.column.isMoving())};this.addManagedListener(this.column,mt.EVENT_MOVING_CHANGED,i);i()};i.prototype.setupMenuClass=function(){var t=this;var i=function(){t.comp.addOrRemoveCssClass("ag-column-menu-visible",t.column.isMenuVisible())};this.addManagedListener(this.column,mt.EVENT_MENU_VISIBLE_CHANGED,i);i()};i.prototype.setupSortableClass=function(){var t=this;var i=function(){t.comp.addOrRemoveCssClass("ag-header-cell-sortable",!!t.sortable)};i();this.addRefreshFunction(i);this.addManagedListener(this.eventService,mt.EVENT_SORT_CHANGED,this.refreshAriaSort.bind(this))};i.prototype.setupWrapTextClass=function(){var t=this;var i=function(){var i=!!t.column.getColDef().wrapHeaderText;t.comp.addOrRemoveCssClass("ag-header-cell-wrap-text",i)};i();this.addRefreshFunction(i)};i.prototype.onHeaderHeightChanged=function(){this.refreshSpanHeaderHeight()};i.prototype.refreshSpanHeaderHeight=function(){var t=this,i=t.eGui,n=t.column,r=t.comp,e=t.columnModel,s=t.gridOptionsService;if(!n.isSpanHeaderHeight()){return}var o=this.getColumnGroupPaddingInfo(),u=o.numberOfParents,a=o.isSpanningTotal;r.addOrRemoveCssClass("ag-header-span-height",u>0);var f=e.getColumnHeaderRowHeight();if(u===0){r.addOrRemoveCssClass("ag-header-span-total",false);i.style.setProperty("top","0px");i.style.setProperty("height",f+"px");return}r.addOrRemoveCssClass("ag-header-span-total",a);var h=s.is("pivotMode");var c=h?e.getPivotGroupHeaderHeight():e.getGroupHeaderHeight();var l=u*c;i.style.setProperty("top",-l+"px");i.style.setProperty("height",f+l+"px")};i.prototype.getColumnGroupPaddingInfo=function(){var t=this.column.getParent();if(!t||!t.isPadding()){return{numberOfParents:0,isSpanningTotal:false}}var i=t.getPaddingLevel()+1;var n=true;while(t){if(!t.isPadding()){n=false;break}t=t.getParent()}return{numberOfParents:i,isSpanningTotal:n}};i.prototype.setupAutoHeight=function(t){var i=this;var n=function(r){if(!i.isAlive()){return}var e=Wr(i.getGui()),s=e.paddingTop,o=e.paddingBottom,u=e.borderBottomWidth,a=e.borderTopWidth;var f=s+o+u+a;var h=t.offsetHeight;var c=h+f;if(r<5){var l=i.beans.gridOptionsService.getDocument();var v=!l||!l.contains(t);var d=c==0;if(v||d){i.beans.frameworkOverrides.setTimeout((function(){return n(r+1)}),0);return}}i.columnModel.setColumnHeaderHeight(i.column,c)};var r=false;var e;var s=function(){var t=i.column.isAutoHeaderHeight();if(t&&!r){o()}if(!t&&r){u()}};var o=function(){r=true;n(0);i.comp.addOrRemoveCssClass("ag-header-cell-auto-height",true);e=i.resizeObserverService.observeResize(t,(function(){return n(0)}))};var u=function(){r=false;if(e){e()}i.comp.addOrRemoveCssClass("ag-header-cell-auto-height",false);e=undefined};s();this.addDestroyFunc((function(){return u()}));this.addManagedListener(this.column,mt.EVENT_WIDTH_CHANGED,(function(){return r&&n(0)}));this.addManagedListener(this.eventService,mt.EVENT_SORT_CHANGED,(function(){if(r){i.beans.frameworkOverrides.setTimeout((function(){return n(0)}))}}));this.addRefreshFunction(s)};i.prototype.refreshAriaSort=function(){if(this.sortable){var t=this.localeService.getLocaleTextFunc();var i=this.sortController.getDisplaySortForColumn(this.column)||null;this.comp.setAriaSort(wn(i));this.setAriaDescriptionProperty("sort",t("ariaSortableColumn","Press ENTER to sort."))}else{this.comp.setAriaSort();this.setAriaDescriptionProperty("sort",null)}};i.prototype.refreshAriaMenu=function(){if(this.menuEnabled){var t=this.localeService.getLocaleTextFunc();this.setAriaDescriptionProperty("menu",t("ariaMenuColumn","Press CTRL ENTER to open column menu."))}else{this.setAriaDescriptionProperty("menu",null)}};i.prototype.setAriaDescriptionProperty=function(t,i){if(i!=null){this.ariaDescriptionProperties.set(t,i)}else{this.ariaDescriptionProperties.delete(t)}};i.prototype.refreshAriaDescription=function(){var t=Array.from(this.ariaDescriptionProperties.values());this.comp.setAriaDescription(t.length?t.join(" "):undefined)};i.prototype.refreshAria=function(){this.refreshAriaSort();this.refreshAriaMenu();this.refreshAriaDescription()};i.prototype.addColumnHoverListener=function(){var t=this;var i=function(){if(!t.gridOptionsService.is("columnHoverHighlight")){return}var i=t.columnHoverService.isHovered(t.column);t.comp.addOrRemoveCssClass("ag-column-hover",i)};this.addManagedListener(this.eventService,hi.EVENT_COLUMN_HOVER_CHANGED,i);i()};i.prototype.setupFilterCss=function(){var t=this;var i=function(){t.comp.addOrRemoveCssClass("ag-header-cell-filtered",t.column.isFilterActive())};this.addManagedListener(this.column,mt.EVENT_FILTER_ACTIVE_CHANGED,i);i()};i.prototype.getColId=function(){return this.column.getColId()};i.prototype.addActiveHeaderMouseListeners=function(){var t=this;var i=function(i){return t.setActiveHeader(i.type==="mouseenter")};this.addManagedListener(this.getGui(),"mouseenter",i);this.addManagedListener(this.getGui(),"mouseleave",i)};i.prototype.setActiveHeader=function(t){this.comp.addOrRemoveCssClass("ag-header-active",t)};Hl([ut("columnModel")],i.prototype,"columnModel",void 0);Hl([ut("columnHoverService")],i.prototype,"columnHoverService",void 0);Hl([ut("sortController")],i.prototype,"sortController",void 0);Hl([ut("menuFactory")],i.prototype,"menuFactory",void 0);Hl([ut("dragAndDropService")],i.prototype,"dragAndDropService",void 0);Hl([ut("resizeObserverService")],i.prototype,"resizeObserverService",void 0);Hl([ut("gridApi")],i.prototype,"gridApi",void 0);Hl([ut("columnApi")],i.prototype,"columnApi",void 0);Hl([st],i.prototype,"removeDragSource",null);return i}(ll);var Vl=function(){var t=function(i,n){t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var n in i)if(Object.prototype.hasOwnProperty.call(i,n))t[n]=i[n]};return t(i,n)};return function(i,n){if(typeof n!=="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(i,n);function r(){this.constructor=i}i.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}();var Bl=function(t,i,n,r){var e=arguments.length,s=e<3?i:r===null?r=Object.getOwnPropertyDescriptor(i,n):r,o;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")s=Reflect.decorate(t,i,n,r);else for(var u=t.length-1;u>=0;u--)if(o=t[u])s=(e<3?o(s):e>3?o(i,n,s):o(i,n))||s;return e>3&&s&&Object.defineProperty(i,n,s),s};var zl=function(t){Vl(i,t);function i(i,n,r,e){var s=t.call(this)||this;s.eResize=n;s.comp=i;s.pinned=r;s.columnGroup=e;return s}i.prototype.postConstruct=function(){var t=this;if(!this.columnGroup.isResizable()){this.comp.setResizableDisplayed(false);return}var i=this.horizontalResizeService.addResizeBar({eResizeBar:this.eResize,onResizeStart:this.onResizeStart.bind(this),onResizing:this.onResizing.bind(this,false),onResizeEnd:this.onResizing.bind(this,true)});this.addDestroyFunc(i);if(!this.gridOptionsService.is("suppressAutoSize")){var n=this.gridOptionsService.is("skipHeaderOnAutoSize");this.eResize.addEventListener("dblclick",(function(){var i=[];var r=t.columnGroup.getDisplayedLeafColumns();r.forEach((function(t){if(!t.getColDef().suppressAutoSize){i.push(t.getColId())}}));if(i.length>0){t.columnModel.autoSizeColumns({columns:i,skipHeader:n,stopAtGroup:t.columnGroup,source:"uiColumnResized"})}t.resizeLeafColumnsToFit("uiColumnResized")}))}};i.prototype.onResizeStart=function(t){var i=this;this.calculateInitialValues();var n=null;if(t){n=this.columnModel.getDisplayedGroupAfter(this.columnGroup)}if(n){var r=n.getDisplayedLeafColumns();this.resizeTakeFromCols=r.filter((function(t){return t.isResizable()}));this.resizeTakeFromStartWidth=0;this.resizeTakeFromCols.forEach((function(t){return i.resizeTakeFromStartWidth+=t.getActualWidth()}));this.resizeTakeFromRatios=[];this.resizeTakeFromCols.forEach((function(t){return i.resizeTakeFromRatios.push(t.getActualWidth()/i.resizeTakeFromStartWidth)}))}else{this.resizeTakeFromCols=null;this.resizeTakeFromStartWidth=null;this.resizeTakeFromRatios=null}this.comp.addOrRemoveCssClass("ag-column-resizing",true)};i.prototype.onResizing=function(t,i,n){if(n===void 0){n="uiColumnResized"}var r=this.normaliseDragChange(i);var e=this.resizeStartWidth+r;this.resizeColumns(e,n,t)};i.prototype.resizeLeafColumnsToFit=function(t){var i=this.autoWidthCalculator.getPreferredWidthForColumnGroup(this.columnGroup);this.calculateInitialValues();if(i>this.resizeStartWidth){this.resizeColumns(i,t,true)}};i.prototype.resizeColumns=function(t,i,n){if(n===void 0){n=true}var r=[];r.push({columns:this.resizeCols,ratios:this.resizeRatios,width:t});if(this.resizeTakeFromCols){var e=t-this.resizeStartWidth;r.push({columns:this.resizeTakeFromCols,ratios:this.resizeTakeFromRatios,width:this.resizeTakeFromStartWidth-e})}this.columnModel.resizeColumnSets({resizeSets:r,finished:n,source:i});if(n){this.comp.addOrRemoveCssClass("ag-column-resizing",false)}};i.prototype.calculateInitialValues=function(){var t=this;var i=this.columnGroup.getDisplayedLeafColumns();this.resizeCols=i.filter((function(t){return t.isResizable()}));this.resizeStartWidth=0;this.resizeCols.forEach((function(i){return t.resizeStartWidth+=i.getActualWidth()}));this.resizeRatios=[];this.resizeCols.forEach((function(i){return t.resizeRatios.push(i.getActualWidth()/t.resizeStartWidth)}))};i.prototype.normaliseDragChange=function(t){var i=t;if(this.gridOptionsService.is("enableRtl")){if(this.pinned!=="left"){i*=-1}}else if(this.pinned==="right"){i*=-1}return i};Bl([ut("horizontalResizeService")],i.prototype,"horizontalResizeService",void 0);Bl([ut("autoWidthCalculator")],i.prototype,"autoWidthCalculator",void 0);Bl([ut("columnModel")],i.prototype,"columnModel",void 0);Bl([et],i.prototype,"postConstruct",null);return i}(ri);var Wl=function(){var t=function(i,n){t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var n in i)if(Object.prototype.hasOwnProperty.call(i,n))t[n]=i[n]};return t(i,n)};return function(i,n){if(typeof n!=="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(i,n);function r(){this.constructor=i}i.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}();var Ul=function(t,i,n,r){var e=arguments.length,s=e<3?i:r===null?r=Object.getOwnPropertyDescriptor(i,n):r,o;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")s=Reflect.decorate(t,i,n,r);else for(var u=t.length-1;u>=0;u--)if(o=t[u])s=(e<3?o(s):e>3?o(i,n,s):o(i,n))||s;return e>3&&s&&Object.defineProperty(i,n,s),s};var Kl=function(t){Wl(i,t);function i(i,n){var r=t.call(this)||this;r.removeChildListenersFuncs=[];r.columnGroup=n;r.comp=i;return r}i.prototype.postConstruct=function(){this.addListenersToChildrenColumns();this.addManagedListener(this.columnGroup,fi.EVENT_DISPLAYED_CHILDREN_CHANGED,this.onDisplayedChildrenChanged.bind(this));this.onWidthChanged();this.addDestroyFunc(this.removeListenersOnChildrenColumns.bind(this))};i.prototype.addListenersToChildrenColumns=function(){var t=this;this.removeListenersOnChildrenColumns();var i=this.onWidthChanged.bind(this);this.columnGroup.getLeafColumns().forEach((function(n){n.addEventListener("widthChanged",i);n.addEventListener("visibleChanged",i);t.removeChildListenersFuncs.push((function(){n.removeEventListener("widthChanged",i);n.removeEventListener("visibleChanged",i)}))}))};i.prototype.removeListenersOnChildrenColumns=function(){this.removeChildListenersFuncs.forEach((function(t){return t()}));this.removeChildListenersFuncs=[]};i.prototype.onDisplayedChildrenChanged=function(){this.addListenersToChildrenColumns();this.onWidthChanged()};i.prototype.onWidthChanged=function(){var t=this.columnGroup.getActualWidth();this.comp.setWidth(t+"px");this.comp.addOrRemoveCssClass("ag-hidden",t===0)};Ul([et],i.prototype,"postConstruct",null);return i}(ri);var ql=function(){var t=function(i,n){t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var n in i)if(Object.prototype.hasOwnProperty.call(i,n))t[n]=i[n]};return t(i,n)};return function(i,n){if(typeof n!=="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(i,n);function r(){this.constructor=i}i.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}();var Yl=function(t,i,n,r){var e=arguments.length,s=e<3?i:r===null?r=Object.getOwnPropertyDescriptor(i,n):r,o;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")s=Reflect.decorate(t,i,n,r);else for(var u=t.length-1;u>=0;u--)if(o=t[u])s=(e<3?o(s):e>3?o(i,n,s):o(i,n))||s;return e>3&&s&&Object.defineProperty(i,n,s),s};var Ql=function(t){ql(i,t);function i(i,n){var r=t.call(this,i,n)||this;r.columnGroup=i;return r}i.prototype.setComp=function(i,n,r){t.prototype.setGui.call(this,n);this.comp=i;this.displayName=this.columnModel.getDisplayNameForColumnGroup(this.columnGroup,"header");this.addClasses();this.setupMovingCss();this.setupExpandable();this.setupTooltip();this.setupUserComp();var e=this.getParentRowCtrl().getPinned();var s=this.columnGroup.getProvidedColumnGroup().getLeafColumns();this.createManagedBean(new wl(s,n));this.createManagedBean(new pl(this.columnGroup,n,this.beans));this.createManagedBean(new Kl(i,this.columnGroup));this.groupResizeFeature=this.createManagedBean(new zl(i,r,e,this.columnGroup));this.createManagedBean(new _s(n,{shouldStopEventPropagation:this.shouldStopEventPropagation.bind(this),onTabKeyDown:function(){return undefined},handleKeyDown:this.handleKeyDown.bind(this),onFocusIn:this.onFocusIn.bind(this)}))};i.prototype.resizeLeafColumnsToFit=function(t){if(!this.groupResizeFeature){return}this.groupResizeFeature.resizeLeafColumnsToFit(t)};i.prototype.setupUserComp=function(){var t=this;var i=this.displayName;var n={displayName:this.displayName,columnGroup:this.columnGroup,setExpanded:function(i){t.columnModel.setColumnGroupOpened(t.columnGroup.getProvidedColumnGroup(),i,"gridInitializing")},api:this.gridApi,columnApi:this.columnApi,context:this.gridOptionsService.context};if(!i){var r=this.columnGroup;var e=r.getLeafColumns();while(r.getParent()&&r.getParent().getLeafColumns().length===e.length){r=r.getParent()}var s=r.getColGroupDef();if(s){i=s.headerName}if(!i){i=e?this.columnModel.getDisplayNameForColumn(e[0],"header",true):""}}var o=this.userComponentFactory.getHeaderGroupCompDetails(n);this.comp.setUserCompDetails(o)};i.prototype.setupTooltip=function(){var t=this;var i=this.columnGroup.getColGroupDef();var n={getColumn:function(){return t.columnGroup},getGui:function(){return t.eGui},getLocation:function(){return"headerGroup"},getTooltipValue:function(){return i&&i.headerTooltip}};if(i){n.getColDef=function(){return i}}var r=this.createManagedBean(new ah(n,this.beans));r.setComp(this.eGui)};i.prototype.setupExpandable=function(){var t=this.columnGroup.getProvidedColumnGroup();this.refreshExpanded();this.addManagedListener(t,Ct.EVENT_EXPANDABLE_CHANGED,this.refreshExpanded.bind(this));this.addManagedListener(t,Ct.EVENT_EXPANDED_CHANGED,this.refreshExpanded.bind(this))};i.prototype.refreshExpanded=function(){var t=this.columnGroup;this.expandable=t.isExpandable();var i=t.isExpanded();if(this.expandable){this.comp.setAriaExpanded(i?"true":"false")}else{this.comp.setAriaExpanded(undefined)}};i.prototype.getColId=function(){return this.columnGroup.getUniqueId()};i.prototype.addClasses=function(){var t=this;var i=this.columnGroup.getColGroupDef();var n=$c.getHeaderClassesFromColDef(i,this.gridOptionsService,null,this.columnGroup);if(this.columnGroup.isPadding()){n.push("ag-header-group-cell-no-group");var r=this.columnGroup.getLeafColumns();if(r.every((function(t){return t.isSpanHeaderHeight()}))){n.push("ag-header-span-height")}}else{n.push("ag-header-group-cell-with-group")}n.forEach((function(i){return t.comp.addOrRemoveCssClass(i,true)}))};i.prototype.setupMovingCss=function(){var t=this;var i=this.columnGroup.getProvidedColumnGroup();var n=i.getLeafColumns();var r=function(){return t.comp.addOrRemoveCssClass("ag-header-cell-moving",t.columnGroup.isMoving())};n.forEach((function(i){t.addManagedListener(i,mt.EVENT_MOVING_CHANGED,r)}));r()};i.prototype.onFocusIn=function(t){if(!this.eGui.contains(t.relatedTarget)){var i=this.getRowIndex();this.beans.focusService.setFocusedHeader(i,this.columnGroup)}};i.prototype.handleKeyDown=function(i){t.prototype.handleKeyDown.call(this,i);var n=this.getWrapperHasFocus();if(!this.expandable||!n){return}if(i.key===Te.ENTER){var r=this.columnGroup;var e=!r.isExpanded();this.columnModel.setColumnGroupOpened(r.getProvidedColumnGroup(),e,"uiColumnExpanded")}};i.prototype.setDragSource=function(t){var i=this;if(this.isSuppressMoving()){return}var n=this.columnGroup.getProvidedColumnGroup().getLeafColumns();var r=!this.gridOptionsService.is("suppressDragLeaveHidesColumns");var e={type:Eu.HeaderCell,eElement:t,getDefaultIconName:function(){return r?Hu.ICON_HIDE:Hu.ICON_NOT_ALLOWED},dragItemName:this.displayName,getDragItem:this.getDragItemForGroup.bind(this),onDragStarted:function(){r=!i.gridOptionsService.is("suppressDragLeaveHidesColumns");n.forEach((function(t){return t.setMoving(true,"uiColumnDragged")}))},onDragStopped:function(){return n.forEach((function(t){return t.setMoving(false,"uiColumnDragged")}))},onGridEnter:function(t){var n;if(r){var e=((n=t===null||t===void 0?void 0:t.columns)===null||n===void 0?void 0:n.filter((function(t){return!t.getColDef().lockVisible})))||[];i.columnModel.setColumnsVisible(e,true,"uiColumnMoved")}},onGridExit:function(t){var n;if(r){var e=((n=t===null||t===void 0?void 0:t.columns)===null||n===void 0?void 0:n.filter((function(t){return!t.getColDef().lockVisible})))||[];i.columnModel.setColumnsVisible(e,false,"uiColumnMoved")}}};this.dragAndDropService.addDragSource(e,true);this.addDestroyFunc((function(){return i.dragAndDropService.removeDragSource(e)}))};i.prototype.getDragItemForGroup=function(){var t=this.columnGroup.getProvidedColumnGroup().getLeafColumns();var i={};t.forEach((function(t){return i[t.getId()]=t.isVisible()}));var n=[];this.columnModel.getAllDisplayedColumns().forEach((function(i){if(t.indexOf(i)>=0){n.push(i);Mt(t,i)}}));t.forEach((function(t){return n.push(t)}));return{columns:n,visibleState:i}};i.prototype.isSuppressMoving=function(){var t=false;this.columnGroup.getLeafColumns().forEach((function(i){if(i.getColDef().suppressMovable||i.getColDef().lockPosition){t=true}}));var i=t||this.gridOptionsService.is("suppressMovableColumns");return i};Yl([ut("columnModel")],i.prototype,"columnModel",void 0);Yl([ut("dragAndDropService")],i.prototype,"dragAndDropService",void 0);Yl([ut("gridApi")],i.prototype,"gridApi",void 0);Yl([ut("columnApi")],i.prototype,"columnApi",void 0);return i}(ll);var Jl=function(){var t=function(i,n){t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var n in i)if(Object.prototype.hasOwnProperty.call(i,n))t[n]=i[n]};return t(i,n)};return function(i,n){if(typeof n!=="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(i,n);function r(){this.constructor=i}i.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}();var Zl=function(t,i,n,r){var e=arguments.length,s=e<3?i:r===null?r=Object.getOwnPropertyDescriptor(i,n):r,o;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")s=Reflect.decorate(t,i,n,r);else for(var u=t.length-1;u>=0;u--)if(o=t[u])s=(e<3?o(s):e>3?o(i,n,s):o(i,n))||s;return e>3&&s&&Object.defineProperty(i,n,s),s};var $l=0;var Xl=function(t){Jl(i,t);function i(i,n,r){var e=t.call(this)||this;e.instanceId=$l++;e.headerCellCtrls={};e.rowIndex=i;e.pinned=n;e.type=r;var s=r==ul.COLUMN_GROUP?"ag-header-row-column-group":r==ul.FLOATING_FILTER?"ag-header-row-column-filter":"ag-header-row-column";e.headerRowClass="ag-header-row "+s;return e}i.prototype.postConstruct=function(){this.isPrintLayout=this.gridOptionsService.isDomLayout("print");this.isEnsureDomOrder=this.gridOptionsService.is("ensureDomOrder")};i.prototype.getInstanceId=function(){return this.instanceId};i.prototype.setComp=function(t,i){if(i===void 0){i=true}this.comp=t;if(i){this.onRowHeightChanged();this.onVirtualColumnsChanged()}this.setWidth();this.addEventListeners()};i.prototype.getHeaderRowClass=function(){return this.headerRowClass};i.prototype.getAriaRowIndex=function(){return this.rowIndex+1};i.prototype.getTransform=function(){if(nr()){return"translateZ(0)"}};i.prototype.addEventListeners=function(){var t=this;this.addManagedListener(this.eventService,hi.EVENT_COLUMN_RESIZED,this.onColumnResized.bind(this));this.addManagedListener(this.eventService,hi.EVENT_DISPLAYED_COLUMNS_CHANGED,this.onDisplayedColumnsChanged.bind(this));this.addManagedListener(this.eventService,hi.EVENT_VIRTUAL_COLUMNS_CHANGED,(function(i){return t.onVirtualColumnsChanged(i.afterScroll)}));this.addManagedListener(this.eventService,hi.EVENT_COLUMN_HEADER_HEIGHT_CHANGED,this.onRowHeightChanged.bind(this));this.addManagedListener(this.eventService,hi.EVENT_GRID_STYLES_CHANGED,this.onRowHeightChanged.bind(this));this.addManagedListener(this.eventService,hi.EVENT_ADVANCED_FILTER_ENABLED_CHANGED,this.onRowHeightChanged.bind(this));this.addManagedPropertyListener("domLayout",this.onDisplayedColumnsChanged.bind(this));this.addManagedPropertyListener("ensureDomOrder",(function(i){return t.isEnsureDomOrder=i.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))};i.prototype.getHeaderCellCtrl=function(t){return c(this.headerCellCtrls).find((function(i){return i.getColumnGroupChild()===t}))};i.prototype.onDisplayedColumnsChanged=function(){this.isPrintLayout=this.gridOptionsService.isDomLayout("print");this.onVirtualColumnsChanged();this.setWidth();this.onRowHeightChanged()};i.prototype.getType=function(){return this.type};i.prototype.onColumnResized=function(){this.setWidth()};i.prototype.setWidth=function(){var t=this.getWidthForRow();this.comp.setWidth(t+"px")};i.prototype.getWidthForRow=function(){if(this.isPrintLayout){var t=this.pinned!=null;if(t){return 0}return this.columnModel.getContainerWidth("right")+this.columnModel.getContainerWidth("left")+this.columnModel.getContainerWidth(null)}return this.columnModel.getContainerWidth(this.pinned)};i.prototype.onRowHeightChanged=function(){var t=this.getTopAndHeight(),i=t.topOffset,n=t.rowHeight;this.comp.setTop(i+"px");this.comp.setHeight(n+"px")};i.prototype.getTopAndHeight=function(){var t=this.columnModel.getHeaderRowCount();var i=[];var n=0;if(this.filterManager.hasFloatingFilters()){t++;n=1}var r=this.columnModel.getColumnGroupHeaderRowHeight();var e=this.columnModel.getColumnHeaderRowHeight();var s=1+n;var o=t-s;for(var u=0;u<o;u++){i.push(r)}i.push(e);for(var u=0;u<n;u++){i.push(this.columnModel.getFloatingFiltersHeight())}var a=0;for(var u=0;u<this.rowIndex;u++){a+=i[u]}var f=i[this.rowIndex];return{topOffset:a,rowHeight:f}};i.prototype.getPinned=function(){return this.pinned};i.prototype.getRowIndex=function(){return this.rowIndex};i.prototype.onVirtualColumnsChanged=function(t){if(t===void 0){t=false}var i=this.getHeaderCtrls();var n=this.isEnsureDomOrder||this.isPrintLayout;this.comp.setHeaderCtrls(i,n,t)};i.prototype.getHeaderCtrls=function(){var t=this;var i=this.headerCellCtrls;this.headerCellCtrls={};var n=this.getColumnsInViewport();n.forEach((function(n){if(n.isEmptyGroup()){return}var r=n.getUniqueId();var e=i[r];delete i[r];var s=e&&e.getColumnGroupChild()!=n;if(s){t.destroyBean(e);e=undefined}if(e==null){switch(t.type){case ul.FLOATING_FILTER:e=t.createBean(new Sl(n,t));break;case ul.COLUMN_GROUP:e=t.createBean(new Ql(n,t));break;default:e=t.createBean(new Ll(n,t));break}}t.headerCellCtrls[r]=e}));var r=function(i){var n=t.focusService.isHeaderWrapperFocused(i);if(!n){return false}var r=t.columnModel.isDisplayed(i.getColumnGroupChild());return r};g(i,(function(i,n){var e=r(n);if(e){t.headerCellCtrls[i]=n}else{t.destroyBean(n)}}));var e=R(this.headerCellCtrls);return e};i.prototype.getColumnsInViewport=function(){return this.isPrintLayout?this.getColumnsInViewportPrintLayout():this.getColumnsInViewportNormalLayout()};i.prototype.getColumnsInViewportPrintLayout=function(){var t=this;if(this.pinned!=null){return[]}var i=[];var n=this.getActualDepth();["left",null,"right"].forEach((function(r){var e=t.columnModel.getVirtualHeaderGroupRow(r,n);i=i.concat(e)}));return i};i.prototype.getActualDepth=function(){return this.type==ul.FLOATING_FILTER?this.rowIndex-1:this.rowIndex};i.prototype.getColumnsInViewportNormalLayout=function(){return this.columnModel.getVirtualHeaderGroupRow(this.pinned,this.getActualDepth())};i.prototype.focusHeader=function(t,i){var n=R(this.headerCellCtrls);var r=n.find((function(i){return i.getColumnGroupChild()==t}));if(!r){return false}r.focus(i);return true};i.prototype.destroy=function(){var i=this;g(this.headerCellCtrls,(function(t,n){i.destroyBean(n)}));this.headerCellCtrls={};t.prototype.destroy.call(this)};Zl([ut("columnModel")],i.prototype,"columnModel",void 0);Zl([ut("focusService")],i.prototype,"focusService",void 0);Zl([ut("filterManager")],i.prototype,"filterManager",void 0);Zl([et],i.prototype,"postConstruct",null);return i}(ri);var tv=function(){var t=function(i,n){t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var n in i)if(Object.prototype.hasOwnProperty.call(i,n))t[n]=i[n]};return t(i,n)};return function(i,n){if(typeof n!=="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(i,n);function r(){this.constructor=i}i.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}();var iv=function(t,i,n,r){var e=arguments.length,s=e<3?i:r===null?r=Object.getOwnPropertyDescriptor(i,n):r,o;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")s=Reflect.decorate(t,i,n,r);else for(var u=t.length-1;u>=0;u--)if(o=t[u])s=(e<3?o(s):e>3?o(i,n,s):o(i,n))||s;return e>3&&s&&Object.defineProperty(i,n,s),s};var nv=function(t,i){var n=typeof Symbol==="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),e,s=[],o;try{while((i===void 0||i-- >0)&&!(e=r.next()).done)s.push(e.value)}catch(t){o={error:t}}finally{try{if(e&&!e.done&&(n=r["return"]))n.call(r)}finally{if(o)throw o.error}}return s};var rv=function(t,i){for(var n=0,r=i.length,e=t.length;n<r;n++,e++)t[e]=i[n];return t};var ev=function(t){tv(i,t);function i(i){var n=t.call(this)||this;n.hidden=false;n.includeFloatingFilter=false;n.groupsRowCtrls=[];n.pinned=i;return n}i.prototype.setComp=function(t,i){this.comp=t;this.eViewport=i;this.setupCenterWidth();this.setupPinnedWidth();this.setupDragAndDrop(this.eViewport);this.addManagedListener(this.eventService,hi.EVENT_GRID_COLUMNS_CHANGED,this.onGridColumnsChanged.bind(this));this.addManagedListener(this.eventService,hi.EVENT_DISPLAYED_COLUMNS_CHANGED,this.onDisplayedColumnsChanged.bind(this));this.addManagedListener(this.eventService,hi.EVENT_ADVANCED_FILTER_ENABLED_CHANGED,this.onDisplayedColumnsChanged.bind(this));this.ctrlsService.registerHeaderContainer(this,this.pinned);if(this.columnModel.isReady()){this.refresh()}};i.prototype.setupDragAndDrop=function(t){var i=new Qc(this.pinned,t);this.createManagedBean(i)};i.prototype.refresh=function(t){var i=this;if(t===void 0){t=false}var n=new ts;var r=this.focusService.getFocusHeaderToUseAfterRefresh();var e=function(){var t=i.columnModel.getHeaderRowCount()-1;i.groupsRowCtrls=i.destroyBeans(i.groupsRowCtrls);for(var r=0;r<t;r++){var e=i.createBean(new Xl(n.next(),i.pinned,ul.COLUMN_GROUP));i.groupsRowCtrls.push(e)}};var s=function(){var r=n.next();var e=!i.hidden&&(i.columnsRowCtrl==null||!t||i.columnsRowCtrl.getRowIndex()!==r);var s=e||i.hidden;if(s){i.columnsRowCtrl=i.destroyBean(i.columnsRowCtrl)}if(e){i.columnsRowCtrl=i.createBean(new Xl(r,i.pinned,ul.COLUMN))}};var o=function(){i.includeFloatingFilter=i.filterManager.hasFloatingFilters()&&!i.hidden;var r=function(){i.filtersRowCtrl=i.destroyBean(i.filtersRowCtrl)};if(!i.includeFloatingFilter){r();return}var e=n.next();if(i.filtersRowCtrl){var s=i.filtersRowCtrl.getRowIndex()!==e;if(!t||s){r()}}if(!i.filtersRowCtrl){i.filtersRowCtrl=i.createBean(new Xl(e,i.pinned,ul.FLOATING_FILTER))}};e();s();o();var u=this.getAllCtrls();this.comp.setCtrls(u);this.restoreFocusOnHeader(r)};i.prototype.restoreFocusOnHeader=function(t){if(t==null||t.column.getPinned()!=this.pinned){return}this.focusService.focusHeaderPosition({headerPosition:t})};i.prototype.getAllCtrls=function(){var t=rv([],nv(this.groupsRowCtrls));if(this.columnsRowCtrl){t.push(this.columnsRowCtrl)}if(this.filtersRowCtrl){t.push(this.filtersRowCtrl)}return t};i.prototype.onGridColumnsChanged=function(){this.refresh(true)};i.prototype.onDisplayedColumnsChanged=function(){var t=this.filterManager.hasFloatingFilters()&&!this.hidden;if(this.includeFloatingFilter!==t){this.refresh(true)}};i.prototype.setupCenterWidth=function(){var t=this;if(this.pinned!=null){return}this.createManagedBean(new sc((function(i){return t.comp.setCenterWidth(i+"px")}),true))};i.prototype.setHorizontalScroll=function(t){this.comp.setViewportScrollLeft(t)};i.prototype.setupPinnedWidth=function(){var t=this;if(this.pinned==null){return}var i=this.pinned==="left";var n=this.pinned==="right";this.hidden=true;var r=function(){var r=i?t.pinnedWidthService.getPinnedLeftWidth():t.pinnedWidthService.getPinnedRightWidth();if(r==null){return}var e=r==0;var s=t.hidden!==e;var o=t.gridOptionsService.is("enableRtl");var u=t.gridOptionsService.getScrollbarWidth();var a=t.scrollVisibleService.isVerticalScrollShowing()&&(o&&i||!o&&n);var f=a?r+u:r;t.comp.setPinnedContainerWidth(f+"px");t.comp.setDisplayed(!e);if(s){t.hidden=e;t.refresh()}};this.addManagedListener(this.eventService,hi.EVENT_LEFT_PINNED_WIDTH_CHANGED,r);this.addManagedListener(this.eventService,hi.EVENT_RIGHT_PINNED_WIDTH_CHANGED,r);this.addManagedListener(this.eventService,hi.EVENT_SCROLL_VISIBILITY_CHANGED,r);this.addManagedListener(this.eventService,hi.EVENT_SCROLLBAR_WIDTH_CHANGED,r)};i.prototype.getHeaderCtrlForColumn=function(t){if(t instanceof mt){if(!this.columnsRowCtrl){return}return this.columnsRowCtrl.getHeaderCellCtrl(t)}if(this.groupsRowCtrls.length===0){return}for(var i=0;i<this.groupsRowCtrls.length;i++){var n=this.groupsRowCtrls[i].getHeaderCellCtrl(t);if(n){return n}}};i.prototype.getHtmlElementForColumnHeader=function(t){var i=this.getHeaderCtrlForColumn(t);if(!i){return null}return i.getGui()};i.prototype.getRowType=function(t){var i=this.getAllCtrls();var n=i[t];return n?n.getType():undefined};i.prototype.focusHeader=function(t,i,n){var r=this.getAllCtrls();var e=r[t];if(!e){return false}return e.focusHeader(i,n)};i.prototype.getRowCount=function(){return this.groupsRowCtrls.length+(this.columnsRowCtrl?1:0)+(this.filtersRowCtrl?1:0)};i.prototype.destroy=function(){if(this.filtersRowCtrl){this.filtersRowCtrl=this.destroyBean(this.filtersRowCtrl)}if(this.columnsRowCtrl){this.columnsRowCtrl=this.destroyBean(this.columnsRowCtrl)}if(this.groupsRowCtrls&&this.groupsRowCtrls.length){this.groupsRowCtrls=this.destroyBeans(this.groupsRowCtrls)}t.prototype.destroy.call(this)};iv([ut("ctrlsService")],i.prototype,"ctrlsService",void 0);iv([ut("scrollVisibleService")],i.prototype,"scrollVisibleService",void 0);iv([ut("pinnedWidthService")],i.prototype,"pinnedWidthService",void 0);iv([ut("columnModel")],i.prototype,"columnModel",void 0);iv([ut("focusService")],i.prototype,"focusService",void 0);iv([ut("filterManager")],i.prototype,"filterManager",void 0);return i}(ri);var sv=function(){var t=function(i,n){t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var n in i)if(Object.prototype.hasOwnProperty.call(i,n))t[n]=i[n]};return t(i,n)};return function(i,n){if(typeof n!=="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(i,n);function r(){this.constructor=i}i.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}();var ov=function(t,i,n,r){var e=arguments.length,s=e<3?i:r===null?r=Object.getOwnPropertyDescriptor(i,n):r,o;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")s=Reflect.decorate(t,i,n,r);else for(var u=t.length-1;u>=0;u--)if(o=t[u])s=(e<3?o(s):e>3?o(i,n,s):o(i,n))||s;return e>3&&s&&Object.defineProperty(i,n,s),s};var uv=function(t){sv(i,t);function i(i){var n=t.call(this)||this;n.headerRowComps={};n.rowCompsList=[];n.pinned=i;return n}i.prototype.init=function(){var t=this;this.selectAndSetTemplate();var i={setDisplayed:function(i){return t.setDisplayed(i)},setCtrls:function(i){return t.setCtrls(i)},setCenterWidth:function(i){return t.eCenterContainer.style.width=i},setViewportScrollLeft:function(i){return t.getGui().scrollLeft=i},setPinnedContainerWidth:function(i){var n=t.getGui();n.style.width=i;n.style.maxWidth=i;n.style.minWidth=i}};var n=this.createManagedBean(new ev(this.pinned));n.setComp(i,this.getGui())};i.prototype.selectAndSetTemplate=function(){var t=this.pinned=="left";var n=this.pinned=="right";var r=t?i.PINNED_LEFT_TEMPLATE:n?i.PINNED_RIGHT_TEMPLATE:i.CENTER_TEMPLATE;this.setTemplate(r);this.eRowContainer=this.eCenterContainer?this.eCenterContainer:this.getGui()};i.prototype.destroyRowComps=function(){this.setCtrls([])};i.prototype.destroyRowComp=function(t){this.destroyBean(t);this.eRowContainer.removeChild(t.getGui())};i.prototype.setCtrls=function(t){var i=this;var n=this.headerRowComps;this.headerRowComps={};this.rowCompsList=[];var r;var e=function(t){var n=t.getGui();var e=n.parentElement!=i.eRowContainer;if(e){i.eRowContainer.appendChild(n)}if(r){ae(i.eRowContainer,n,r)}r=n};t.forEach((function(t){var r=t.getInstanceId();var s=n[r];delete n[r];var o=s?s:i.createBean(new al(t));i.headerRowComps[r]=o;i.rowCompsList.push(o);e(o)}));R(n).forEach((function(t){return i.destroyRowComp(t)}))};i.PINNED_LEFT_TEMPLATE='<div class="ag-pinned-left-header" role="presentation"></div>';i.PINNED_RIGHT_TEMPLATE='<div class="ag-pinned-right-header" role="presentation"></div>';i.CENTER_TEMPLATE='<div class="ag-header-viewport" role="presentation">\n <div class="ag-header-container" ref="eCenterContainer" role="rowgroup"></div>\n </div>';ov([ds("eCenterContainer")],i.prototype,"eCenterContainer",void 0);ov([et],i.prototype,"init",null);ov([st],i.prototype,"destroyRowComps",null);return i}(vs);var av=function(){var t=function(i,n){t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var n in i)if(Object.prototype.hasOwnProperty.call(i,n))t[n]=i[n]};return t(i,n)};return function(i,n){if(typeof n!=="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(i,n);function r(){this.constructor=i}i.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}();var fv=function(t,i,n,r){var e=arguments.length,s=e<3?i:r===null?r=Object.getOwnPropertyDescriptor(i,n):r,o;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")s=Reflect.decorate(t,i,n,r);else for(var u=t.length-1;u>=0;u--)if(o=t[u])s=(e<3?o(s):e>3?o(i,n,s):o(i,n))||s;return e>3&&s&&Object.defineProperty(i,n,s),s};var hv;(function(t){t[t["UP"]=0]="UP";t[t["DOWN"]=1]="DOWN";t[t["LEFT"]=2]="LEFT";t[t["RIGHT"]=3]="RIGHT"})(hv||(hv={}));var cv=function(t){av(i,t);function i(){return t!==null&&t.apply(this,arguments)||this}i.prototype.postConstruct=function(){var t=this;this.ctrlsService.whenReady((function(i){t.gridBodyCon=i.gridBodyCtrl}))};i.prototype.getHeaderRowCount=function(){var t=this.ctrlsService.getHeaderRowContainerCtrl();return t?t.getRowCount():0};i.prototype.navigateVertically=function(t,i,n){if(!i){i=this.focusService.getFocusedHeader()}if(!i){return false}var r=i.headerRowIndex,e=i.column;var s=this.getHeaderRowCount();var o=t===hv.UP;var u=o?this.headerPositionUtils.getColumnVisibleParent(e,r):this.headerPositionUtils.getColumnVisibleChild(e,r),a=u.nextRow,f=u.nextFocusColumn;var h=false;if(a<0){a=0;f=e;h=true}if(a>=s){a=-1}if(!h&&!f){return false}return this.focusService.focusHeaderPosition({headerPosition:{headerRowIndex:a,column:f},allowUserOverride:true,event:n})};i.prototype.navigateHorizontally=function(t,i,n){if(i===void 0){i=false}var r=this.focusService.getFocusedHeader();var e=t===hv.LEFT;var s=this.gridOptionsService.is("enableRtl");var o;var u;if(e!==s){u="Before";o=this.headerPositionUtils.findHeader(r,u)}else{u="After";o=this.headerPositionUtils.findHeader(r,u)}if(o||!i){return this.focusService.focusHeaderPosition({headerPosition:o,direction:u,fromTab:i,allowUserOverride:true,event:n})}return this.focusNextHeaderRow(r,u,n)};i.prototype.focusNextHeaderRow=function(t,i,n){var r=t.headerRowIndex;var e=null;var s;if(i==="Before"){if(r>0){s=r-1;e=this.headerPositionUtils.findColAtEdgeForHeaderRow(s,"end")}}else{s=r+1;e=this.headerPositionUtils.findColAtEdgeForHeaderRow(s,"start")}return this.focusService.focusHeaderPosition({headerPosition:e,direction:i,fromTab:true,allowUserOverride:true,event:n})};i.prototype.scrollToColumn=function(t,i){if(i===void 0){i="After"}if(t.getPinned()){return}var n;if(t instanceof fi){var r=t.getDisplayedLeafColumns();n=i==="Before"?xt(r):r[0]}else{n=t}this.gridBodyCon.getScrollFeature().ensureColumnVisible(n)};fv([ut("focusService")],i.prototype,"focusService",void 0);fv([ut("headerPositionUtils")],i.prototype,"headerPositionUtils",void 0);fv([ut("ctrlsService")],i.prototype,"ctrlsService",void 0);fv([et],i.prototype,"postConstruct",null);i=fv([ot("headerNavigationService")],i);return i}(ri);var lv=function(){var t=function(i,n){t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var n in i)if(Object.prototype.hasOwnProperty.call(i,n))t[n]=i[n]};return t(i,n)};return function(i,n){if(typeof n!=="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(i,n);function r(){this.constructor=i}i.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}();var vv=function(t,i,n,r){var e=arguments.length,s=e<3?i:r===null?r=Object.getOwnPropertyDescriptor(i,n):r,o;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")s=Reflect.decorate(t,i,n,r);else for(var u=t.length-1;u>=0;u--)if(o=t[u])s=(e<3?o(s):e>3?o(i,n,s):o(i,n))||s;return e>3&&s&&Object.defineProperty(i,n,s),s};var dv=function(t){lv(n,t);function n(){return t!==null&&t.apply(this,arguments)||this}n.prototype.setComp=function(t,i,n){this.comp=t;this.eGui=i;this.createManagedBean(new _s(n,{onTabKeyDown:this.onTabKeyDown.bind(this),handleKeyDown:this.handleKeyDown.bind(this),onFocusOut:this.onFocusOut.bind(this)}));this.addManagedListener(this.eventService,hi.EVENT_COLUMN_PIVOT_MODE_CHANGED,this.onPivotModeChanged.bind(this));this.addManagedListener(this.eventService,hi.EVENT_DISPLAYED_COLUMNS_CHANGED,this.onDisplayedColumnsChanged.bind(this));this.onPivotModeChanged();this.setupHeaderHeight();this.ctrlsService.registerGridHeaderCtrl(this)};n.prototype.setupHeaderHeight=function(){var t=this.setHeaderHeight.bind(this);t();this.addManagedPropertyListener("headerHeight",t);this.addManagedPropertyListener("pivotHeaderHeight",t);this.addManagedPropertyListener("groupHeaderHeight",t);this.addManagedPropertyListener("pivotGroupHeaderHeight",t);this.addManagedPropertyListener("floatingFiltersHeight",t);this.addManagedListener(this.eventService,hi.EVENT_DISPLAYED_COLUMNS_CHANGED,t);this.addManagedListener(this.eventService,hi.EVENT_COLUMN_HEADER_HEIGHT_CHANGED,t);this.addManagedListener(this.eventService,hi.EVENT_GRID_STYLES_CHANGED,t);this.addManagedListener(this.eventService,hi.EVENT_ADVANCED_FILTER_ENABLED_CHANGED,t)};n.prototype.getHeaderHeight=function(){return this.headerHeight};n.prototype.setHeaderHeight=function(){var t=this.columnModel;var i=0;var n=t.getHeaderRowCount();var r;var e=this.filterManager.hasFloatingFilters();if(e){n++;i=1}var s=this.columnModel.getColumnGroupHeaderRowHeight();var o=this.columnModel.getColumnHeaderRowHeight();var u=1+i;var a=n-u;r=i*t.getFloatingFiltersHeight();r+=a*s;r+=o;if(this.headerHeight===r){return}this.headerHeight=r;var f=r+1+"px";this.comp.setHeightAndMinHeight(f);this.eventService.dispatchEvent({type:hi.EVENT_HEADER_HEIGHT_CHANGED})};n.prototype.onPivotModeChanged=function(){var t=this.columnModel.isPivotMode();this.comp.addOrRemoveCssClass("ag-pivot-on",t);this.comp.addOrRemoveCssClass("ag-pivot-off",!t)};n.prototype.onDisplayedColumnsChanged=function(){var t=this.columnModel.getAllDisplayedColumns();var i=t.some((function(t){return t.isSpanHeaderHeight()}));this.comp.addOrRemoveCssClass("ag-header-allow-overflow",i)};n.prototype.onTabKeyDown=function(t){var i=this.gridOptionsService.is("enableRtl");var n=t.shiftKey!==i?hv.LEFT:hv.RIGHT;if(this.headerNavigationService.navigateHorizontally(n,true,t)||this.focusService.focusNextGridCoreContainer(t.shiftKey)){t.preventDefault()}};n.prototype.handleKeyDown=function(t){var n=null;switch(t.key){case Te.LEFT:n=hv.LEFT;case Te.RIGHT:if(!i(n)){n=hv.RIGHT}this.headerNavigationService.navigateHorizontally(n,false,t);break;case Te.UP:n=hv.UP;case Te.DOWN:if(!i(n)){n=hv.DOWN}if(this.headerNavigationService.navigateVertically(n,null,t)){t.preventDefault()}break;default:return}};n.prototype.onFocusOut=function(t){var i=this.gridOptionsService.getDocument();var n=t.relatedTarget;if(!n&&this.eGui.contains(i.activeElement)){return}if(!this.eGui.contains(n)){this.focusService.clearFocusedHeader()}};vv([ut("headerNavigationService")],n.prototype,"headerNavigationService",void 0);vv([ut("focusService")],n.prototype,"focusService",void 0);vv([ut("columnModel")],n.prototype,"columnModel",void 0);vv([ut("ctrlsService")],n.prototype,"ctrlsService",void 0);vv([ut("filterManager")],n.prototype,"filterManager",void 0);return n}(ri);var pv=function(){var t=function(i,n){t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var n in i)if(Object.prototype.hasOwnProperty.call(i,n))t[n]=i[n]};return t(i,n)};return function(i,n){if(typeof n!=="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(i,n);function r(){this.constructor=i}i.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}();var gv=function(t,i,n,r){var e=arguments.length,s=e<3?i:r===null?r=Object.getOwnPropertyDescriptor(i,n):r,o;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")s=Reflect.decorate(t,i,n,r);else for(var u=t.length-1;u>=0;u--)if(o=t[u])s=(e<3?o(s):e>3?o(i,n,s):o(i,n))||s;return e>3&&s&&Object.defineProperty(i,n,s),s};var bv=function(t){pv(i,t);function i(){return t.call(this,i.TEMPLATE)||this}i.prototype.postConstruct=function(){var t=this;var i={addOrRemoveCssClass:function(i,n){return t.addOrRemoveCssClass(i,n)},setHeightAndMinHeight:function(i){t.getGui().style.height=i;t.getGui().style.minHeight=i}};var n=this.createManagedBean(new dv);n.setComp(i,this.getGui(),this.getFocusableElement());var r=function(i){t.createManagedBean(i);t.appendChild(i)};r(new uv("left"));r(new uv(null));r(new uv("right"))};i.TEMPLATE='<div class="ag-header" role="presentation"/>';gv([et],i.prototype,"postConstruct",null);return i}(vs);var wv=function(){var t=function(i,n){t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var n in i)if(Object.prototype.hasOwnProperty.call(i,n))t[n]=i[n]};return t(i,n)};return function(i,n){if(typeof n!=="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(i,n);function r(){this.constructor=i}i.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}();var yv=function(t,i,n,r){var e=arguments.length,s=e<3?i:r===null?r=Object.getOwnPropertyDescriptor(i,n):r,o;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")s=Reflect.decorate(t,i,n,r);else for(var u=t.length-1;u>=0;u--)if(o=t[u])s=(e<3?o(s):e>3?o(i,n,s):o(i,n))||s;return e>3&&s&&Object.defineProperty(i,n,s),s};var mv=function(t){wv(i,t);function i(){return t!==null&&t.apply(this,arguments)||this}i.prototype.addResizeBar=function(t){var i=this;var n={dragStartPixels:t.dragStartPixels||0,eElement:t.eResizeBar,onDragStart:this.onDragStart.bind(this,t),onDragStop:this.onDragStop.bind(this,t),onDragging:this.onDragging.bind(this,t),includeTouch:true,stopPropagationForTouch:true};this.dragService.addDragSource(n);var r=function(){return i.dragService.removeDragSource(n)};return r};i.prototype.onDragStart=function(t,i){this.dragStartX=i.clientX;this.setResizeIcons();var n=i instanceof MouseEvent&&i.shiftKey===true;t.onResizeStart(n)};i.prototype.setResizeIcons=function(){var t=this.ctrlsService.getGridCtrl();t.setResizeCursor(true);t.disableUserSelect(true)};i.prototype.onDragStop=function(t,i){t.onResizeEnd(this.resizeAmount);this.resetIcons()};i.prototype.resetIcons=function(){var t=this.ctrlsService.getGridCtrl();t.setResizeCursor(false);t.disableUserSelect(false)};i.prototype.onDragging=function(t,i){this.resizeAmount=i.clientX-this.dragStartX;t.onResizing(this.resizeAmount)};yv([ut("dragService")],i.prototype,"dragService",void 0);yv([ut("ctrlsService")],i.prototype,"ctrlsService",void 0);i=yv([ot("horizontalResizeService")],i);return i}(ri);var Sv=function(){var t=function(i,n){t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var n in i)if(Object.prototype.hasOwnProperty.call(i,n))t[n]=i[n]};return t(i,n)};return function(i,n){if(typeof n!=="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(i,n);function r(){this.constructor=i}i.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}();var Cv=function(t,i,n,r){var e=arguments.length,s=e<3?i:r===null?r=Object.getOwnPropertyDescriptor(i,n):r,o;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")s=Reflect.decorate(t,i,n,r);else for(var u=t.length-1;u>=0;u--)if(o=t[u])s=(e<3?o(s):e>3?o(i,n,s):o(i,n))||s;return e>3&&s&&Object.defineProperty(i,n,s),s};var Ov=function(t){Sv(i,t);function i(){return t!==null&&t.apply(this,arguments)||this}i.prototype.hideActiveMenu=function(){if(this.hidePopup){this.hidePopup()}};i.prototype.showMenuAfterMouseEvent=function(t,i){var n=this;this.showPopup(t,(function(r){n.popupService.positionPopupUnderMouseEvent({column:t,type:"columnMenu",mouseEvent:i,ePopup:r})}),"columnMenu",i.target)};i.prototype.showMenuAfterButtonClick=function(t,i,n){var r=this;this.showPopup(t,(function(e){r.popupService.positionPopupByComponent({type:n,eventSource:i,ePopup:e,keepWithinBounds:true,position:"under",column:t})}),n,i)};i.prototype.showPopup=function(t,i,n,r){var e=this;var s=this.filterManager.getOrCreateFilterWrapper(t,"COLUMN_MENU");if(!s){throw new Error("AG Grid - unable to show popup filter, filter instantiation failed")}var o=document.createElement("div");bn(o,"presentation");o.classList.add("ag-menu");this.tabListener=this.addManagedListener(o,"keydown",(function(t){return e.trapFocusWithin(t,o)}));s.guiPromise.then((function(t){return o.appendChild(t)}));var u;var a=function(){var t;return(t=s.filterPromise)===null||t===void 0?void 0:t.then((function(t){var i;return(i=t===null||t===void 0?void 0:t.afterGuiDetached)===null||i===void 0?void 0:i.call(t)}))};var f=r||this.ctrlsService.getGridBodyCtrl().getGui();var h=function(i){t.setMenuVisible(false,"contextMenu");var n=i instanceof KeyboardEvent;if(e.tabListener){e.tabListener=e.tabListener()}if(n&&r&&ne(r)){var s=e.focusService.findTabbableParent(r);if(s){s.focus()}}a()};var c=this.localeService.getLocaleTextFunc();var l=this.popupService.addPopup({modal:true,eChild:o,closeOnEsc:true,closedCallback:h,positionCallback:function(){return i(o)},anchorToElement:f,ariaLabel:c("ariaLabelColumnMenu","Column Menu")});if(l){this.hidePopup=u=l.hideFunc}s.filterPromise.then((function(t){i(o);if(t.afterGuiAttached){t.afterGuiAttached({container:n,hidePopup:u})}}));t.setMenuVisible(true,"contextMenu")};i.prototype.trapFocusWithin=function(t,i){if(t.key!==Te.TAB||t.defaultPrevented||this.focusService.findNextFocusableElement(i,false,t.shiftKey)){return}t.preventDefault();this.focusService.focusInto(i,t.shiftKey)};i.prototype.isMenuEnabled=function(t){return t.isFilterAllowed()&&t.getMenuTabs(["filterMenuTab"]).includes("filterMenuTab")};Cv([ut("filterManager")],i.prototype,"filterManager",void 0);Cv([ut("popupService")],i.prototype,"popupService",void 0);Cv([ut("focusService")],i.prototype,"focusService",void 0);Cv([ut("ctrlsService")],i.prototype,"ctrlsService",void 0);i=Cv([ot("menuFactory")],i);return i}(ri);var jv=function(){var t=function(i,n){t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var n in i)if(Object.prototype.hasOwnProperty.call(i,n))t[n]=i[n]};return t(i,n)};return function(i,n){if(typeof n!=="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(i,n);function r(){this.constructor=i}i.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}();var Rv=function(t,i,n,r){var e=arguments.length,s=e<3?i:r===null?r=Object.getOwnPropertyDescriptor(i,n):r,o;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")s=Reflect.decorate(t,i,n,r);else for(var u=t.length-1;u>=0;u--)if(o=t[u])s=(e<3?o(s):e>3?o(i,n,s):o(i,n))||s;return e>3&&s&&Object.defineProperty(i,n,s),s};(function(t){jv(i,t);function i(n){var r=t.call(this,i.getTemplate(n.cssClass))||this;r.items=[];r.tabbedItemScrollMap=new Map;r.params=n;if(n.items){n.items.forEach((function(t){return r.addItem(t)}))}return r}i.prototype.postConstruct=function(){var t=this;this.createManagedBean(new _s(this.getFocusableElement(),{onTabKeyDown:this.onTabKeyDown.bind(this),handleKeyDown:this.handleKeyDown.bind(this)}));this.addDestroyFunc((function(){var i,n,r;return(r=(n=(i=t.activeItem)===null||i===void 0?void 0:i.tabbedItem)===null||n===void 0?void 0:n.afterDetachedCallback)===null||r===void 0?void 0:r.call(n)}))};i.getTemplate=function(t){return'<div class="ag-tabs '+t+'">\n <div ref="eHeader" role="tablist" class="ag-tabs-header '+(t?t+"-header":"")+'"></div>\n <div ref="eBody" role="presentation" class="ag-tabs-body '+(t?t+"-body":"")+'"></div>\n </div>'};i.prototype.handleKeyDown=function(t){var i=this.gridOptionsService.getDocument();switch(t.key){case Te.RIGHT:case Te.LEFT:if(!this.eHeader.contains(i.activeElement)){return}var n=t.key===Te.RIGHT;var r=this.gridOptionsService.is("enableRtl");var e=this.items.indexOf(this.activeItem);var s=n!==r?Math.min(e+1,this.items.length-1):Math.max(e-1,0);if(e===s){return}t.preventDefault();var o=this.items[s];this.showItemWrapper(o);o.eHeaderButton.focus();break;case Te.UP:case Te.DOWN:t.stopPropagation();break}};i.prototype.onTabKeyDown=function(t){if(t.defaultPrevented){return}var i=this,n=i.focusService,r=i.eHeader,e=i.eBody,s=i.activeItem;var o=this.gridOptionsService.getDocument();var u=o.activeElement;var a=t.target;t.preventDefault();if(r.contains(u)){n.focusInto(e,t.shiftKey);return}var f=null;if(n.isTargetUnderManagedComponent(e,a)){if(t.shiftKey){f=this.focusService.findFocusableElementBeforeTabGuard(e,a)}if(!f){f=s.eHeaderButton}}if(!f&&e.contains(u)){f=n.findNextFocusableElement(e,false,t.shiftKey);if(!f){f=s.eHeaderButton}}if(f){f.focus()}};i.prototype.setAfterAttachedParams=function(t){this.afterAttachedParams=t};i.prototype.showFirstItem=function(){if(this.items.length>0){this.showItemWrapper(this.items[0])}};i.prototype.addItem=function(t){var i=document.createElement("span");bn(i,"tab");i.setAttribute("tabindex","-1");i.appendChild(t.title);i.classList.add("ag-tab");this.eHeader.appendChild(i);Cn(i,t.titleLabel);var n={tabbedItem:t,eHeaderButton:i};this.items.push(n);i.addEventListener("click",this.showItemWrapper.bind(this,n))};i.prototype.showItem=function(t){var i=this.items.find((function(i){return i.tabbedItem===t}));if(i){this.showItemWrapper(i)}};i.prototype.showItemWrapper=function(t){var i=this;var n,r;var e=t.tabbedItem,s=t.eHeaderButton;if(this.params.onItemClicked){this.params.onItemClicked({item:e})}if(this.activeItem===t){q(this.params.onActiveItemClicked);return}if(this.lastScrollListener){this.lastScrollListener=this.lastScrollListener()}Xr(this.eBody);e.bodyPromise.then((function(t){i.eBody.appendChild(t);var n=!i.focusService.isKeyboardMode();i.focusService.focusInto(i.eBody,false,n);if(e.afterAttachedCallback){e.afterAttachedCallback(i.afterAttachedParams)}if(i.params.keepScrollPosition){var r=e.getScrollableContainer&&e.getScrollableContainer()||t;i.lastScrollListener=i.addManagedListener(r,"scroll",(function(){i.tabbedItemScrollMap.set(e.name,r.scrollTop)}));var s=i.tabbedItemScrollMap.get(e.name);if(s!==undefined){setTimeout((function(){r.scrollTop=s}),0)}}}));if(this.activeItem){this.activeItem.eHeaderButton.classList.remove("ag-tab-selected");(r=(n=this.activeItem.tabbedItem).afterDetachedCallback)===null||r===void 0?void 0:r.call(n)}s.classList.add("ag-tab-selected");this.activeItem=t};Rv([ut("focusService")],i.prototype,"focusService",void 0);Rv([ds("eHeader")],i.prototype,"eHeader",void 0);Rv([ds("eBody")],i.prototype,"eBody",void 0);Rv([et],i.prototype,"postConstruct",null);return i})(vs);var xv=function(){var t=function(i,n){t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var n in i)if(Object.prototype.hasOwnProperty.call(i,n))t[n]=i[n]};return t(i,n)};return function(i,n){if(typeof n!=="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(i,n);function r(){this.constructor=i}i.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}();var _v=function(t,i,n,r){var e=arguments.length,s=e<3?i:r===null?r=Object.getOwnPropertyDescriptor(i,n):r,o;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")s=Reflect.decorate(t,i,n,r);else for(var u=t.length-1;u>=0;u--)if(o=t[u])s=(e<3?o(s):e>3?o(i,n,s):o(i,n))||s;return e>3&&s&&Object.defineProperty(i,n,s),s};var Av=50;var Fv=function(t){xv(i,t);function i(){var i=t!==null&&t.apply(this,arguments)||this;i.polyfillFunctions=[];return i}i.prototype.observeResize=function(t,i){var n=this;var r=this.gridOptionsService.getWindow();var e=function(){var n=new r.ResizeObserver(i);n.observe(t);return function(){return n.disconnect()}};var s=function(){var r=ue(t);var e=oe(t);var s=true;var o=function(){if(s){var u=ue(t);var a=oe(t);var f=u!==r||a!==e;if(f){r=u;e=a;i()}n.doNextPolyfillTurn(o)}};o();return function(){return s=false}};var o=this.gridOptionsService.is("suppressBrowserResizeObserver");var u=!!r.ResizeObserver;if(u&&!o){return e()}return s()};i.prototype.doNextPolyfillTurn=function(t){this.polyfillFunctions.push(t);this.schedulePolyfill()};i.prototype.schedulePolyfill=function(){var t=this;if(this.polyfillScheduled){return}var i=function(){var i=t.polyfillFunctions;t.polyfillScheduled=false;t.polyfillFunctions=[];i.forEach((function(t){return t()}))};this.polyfillScheduled=true;this.getFrameworkOverrides().setTimeout(i,Av)};i=_v([ot("resizeObserverService")],i);return i}(ri);var kv=function(){var t=function(i,n){t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var n in i)if(Object.prototype.hasOwnProperty.call(i,n))t[n]=i[n]};return t(i,n)};return function(i,n){if(typeof n!=="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(i,n);function r(){this.constructor=i}i.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}();var Tv=function(t,i,n,r){var e=arguments.length,s=e<3?i:r===null?r=Object.getOwnPropertyDescriptor(i,n):r,o;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")s=Reflect.decorate(t,i,n,r);else for(var u=t.length-1;u>=0;u--)if(o=t[u])s=(e<3?o(s):e>3?o(i,n,s):o(i,n))||s;return e>3&&s&&Object.defineProperty(i,n,s),s};var Mv=function(t){kv(i,t);function i(){var i=t!==null&&t.apply(this,arguments)||this;i.createTasksP1={list:[],sorted:false};i.createTasksP2={list:[],sorted:false};i.destroyTasks=[];i.ticking=false;i.scrollGoingDown=true;i.lastPage=0;i.lastScrollTop=0;i.taskCount=0;i.cancelledTasks=new Set;return i}i.prototype.setScrollTop=function(t){var i=this.gridOptionsService.is("pagination");this.scrollGoingDown=t>=this.lastScrollTop;if(i&&t===0){var n=this.paginationProxy.getCurrentPage();if(n!==this.lastPage){this.lastPage=n;this.scrollGoingDown=true}}this.lastScrollTop=t};i.prototype.init=function(){this.useAnimationFrame=!this.gridOptionsService.is("suppressAnimationFrame")};i.prototype.isOn=function(){return this.useAnimationFrame};i.prototype.verifyAnimationFrameOn=function(t){if(this.useAnimationFrame===false){console.warn("AG Grid: AnimationFrameService."+t+" called but animation frames are off")}};i.prototype.createTask=function(t,i,n){this.verifyAnimationFrameOn(n);var r={task:t,index:i,createOrder:++this.taskCount};this.addTaskToList(this[n],r);this.schedule()};i.prototype.cancelTask=function(t){this.cancelledTasks.add(t)};i.prototype.addTaskToList=function(t,i){t.list.push(i);t.sorted=false};i.prototype.sortTaskList=function(t){if(t.sorted){return}var i=this.scrollGoingDown?1:-1;t.list.sort((function(t,n){return t.index!==n.index?i*(n.index-t.index):n.createOrder-t.createOrder}));t.sorted=true};i.prototype.addDestroyTask=function(t){this.verifyAnimationFrameOn("createTasksP3");this.destroyTasks.push(t);this.schedule()};i.prototype.executeFrame=function(t){this.verifyAnimationFrameOn("executeFrame");var i=this.createTasksP1;var n=i.list;var r=this.createTasksP2;var e=r.list;var s=this.destroyTasks;var o=(new Date).getTime();var u=(new Date).getTime()-o;var a=t<=0;var f=this.ctrlsService.getGridBodyCtrl();while(a||u<t){var h=f.getScrollFeature().scrollGridIfNeeded();if(!h){var c=void 0;if(n.length){this.sortTaskList(i);c=n.pop().task}else if(e.length){this.sortTaskList(r);c=e.pop().task}else if(s.length){c=s.pop()}else{this.cancelledTasks.clear();break}if(!this.cancelledTasks.has(c)){c()}}u=(new Date).getTime()-o}if(n.length||e.length||s.length){this.requestFrame()}else{this.stopTicking()}};i.prototype.stopTicking=function(){this.ticking=false};i.prototype.flushAllFrames=function(){if(!this.useAnimationFrame){return}this.executeFrame(-1)};i.prototype.schedule=function(){if(!this.useAnimationFrame){return}if(!this.ticking){this.ticking=true;this.requestFrame()}};i.prototype.requestFrame=function(){var t=this.executeFrame.bind(this,60);this.requestAnimationFrame(t)};i.prototype.requestAnimationFrame=function(t){var i=this.gridOptionsService.getWindow();if(i.requestAnimationFrame){i.requestAnimationFrame(t)}else if(i.webkitRequestAnimationFrame){i.webkitRequestAnimationFrame(t)}else{i.setTimeout(t,0)}};i.prototype.isQueueEmpty=function(){return!this.ticking};i.prototype.debounce=function(t){var i=this;var n=false;return function(){if(!i.isOn()){i.getFrameworkOverrides().setTimeout(t,0);return}if(n){return}n=true;i.addDestroyTask((function(){n=false;t()}))}};Tv([ut("ctrlsService")],i.prototype,"ctrlsService",void 0);Tv([ut("paginationProxy")],i.prototype,"paginationProxy",void 0);Tv([et],i.prototype,"init",null);i=Tv([ot("animationFrameService")],i);return i}(ri);var Dv=function(){var t=function(i,n){t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var n in i)if(Object.prototype.hasOwnProperty.call(i,n))t[n]=i[n]};return t(i,n)};return function(i,n){if(typeof n!=="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(i,n);function r(){this.constructor=i}i.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}();var Gv=function(t,i,n,r){var e=arguments.length,s=e<3?i:r===null?r=Object.getOwnPropertyDescriptor(i,n):r,o;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")s=Reflect.decorate(t,i,n,r);else for(var u=t.length-1;u>=0;u--)if(o=t[u])s=(e<3?o(s):e>3?o(i,n,s):o(i,n))||s;return e>3&&s&&Object.defineProperty(i,n,s),s};var Pv=function(t){Dv(i,t);function i(){return t!==null&&t.apply(this,arguments)||this}i.prototype.postConstruct=function(){var t=this;this.ctrlsService.whenReady((function(i){t.centerRowContainerCtrl=i.centerRowContainerCtrl}))};i.prototype.getPreferredWidthForColumn=function(t,i){var n=this.getHeaderCellForColumn(t);if(!n){return-1}var r=this.rowRenderer.getAllCellsForColumn(t);if(!i){r.push(n)}return this.addElementsToContainerAndGetWidth(r)};i.prototype.getPreferredWidthForColumnGroup=function(t){var i=this.getHeaderCellForColumn(t);if(!i){return-1}return this.addElementsToContainerAndGetWidth([i])};i.prototype.addElementsToContainerAndGetWidth=function(t){var i=this;var n=document.createElement("form");n.style.position="fixed";var r=this.centerRowContainerCtrl.getContainerElement();t.forEach((function(t){return i.cloneItemIntoDummy(t,n)}));r.appendChild(n);var e=n.offsetWidth;r.removeChild(n);var s=this.getAutoSizePadding();return e+s};i.prototype.getAutoSizePadding=function(){var t=this.gridOptionsService.getNum("autoSizePadding");return t!=null&&t>=0?t:20};i.prototype.getHeaderCellForColumn=function(t){var i=null;this.ctrlsService.getHeaderRowContainerCtrls().forEach((function(n){var r=n.getHtmlElementForColumnHeader(t);if(r!=null){i=r}}));return i};i.prototype.cloneItemIntoDummy=function(t,i){var n=t.cloneNode(true);n.style.width="";n.style.position="static";n.style.left="";var r=document.createElement("div");var e=r.classList;var s=["ag-header-cell","ag-header-group-cell"].some((function(t){return n.classList.contains(t)}));if(s){e.add("ag-header","ag-header-row");r.style.position="static"}else{e.add("ag-row")}var o=t.parentElement;while(o){var u=["ag-header-row","ag-row"].some((function(t){return o.classList.contains(t)}));if(u){for(var a=0;a<o.classList.length;a++){var f=o.classList[a];if(f!="ag-row-position-absolute"){e.add(f)}}break}o=o.parentElement}r.appendChild(n);i.appendChild(r)};Gv([ut("rowRenderer")],i.prototype,"rowRenderer",void 0);Gv([ut("ctrlsService")],i.prototype,"ctrlsService",void 0);Gv([ut("rowCssClassCalculator")],i.prototype,"rowCssClassCalculator",void 0);Gv([et],i.prototype,"postConstruct",null);i=Gv([ot("autoWidthCalculator")],i);return i}(ri);var Ev=function(){var t=function(i,n){t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var n in i)if(Object.prototype.hasOwnProperty.call(i,n))t[n]=i[n]};return t(i,n)};return function(i,n){if(typeof n!=="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(i,n);function r(){this.constructor=i}i.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}();var Iv=function(t,i,n,r){var e=arguments.length,s=e<3?i:r===null?r=Object.getOwnPropertyDescriptor(i,n):r,o;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")s=Reflect.decorate(t,i,n,r);else for(var u=t.length-1;u>=0;u--)if(o=t[u])s=(e<3?o(s):e>3?o(i,n,s):o(i,n))||s;return e>3&&s&&Object.defineProperty(i,n,s),s};var Nv=function(t){var i=typeof Symbol==="function"&&Symbol.iterator,n=i&&t[i],r=0;if(n)return n.call(t);if(t&&typeof t.length==="number")return{next:function(){if(t&&r>=t.length)t=void 0;return{value:t&&t[r++],done:!t}}};throw new TypeError(i?"Object is not iterable.":"Symbol.iterator is not defined.")};var Hv=function(t,i){var n=typeof Symbol==="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),e,s=[],o;try{while((i===void 0||i-- >0)&&!(e=r.next()).done)s.push(e.value)}catch(t){o={error:t}}finally{try{if(e&&!e.done&&(n=r["return"]))n.call(r)}finally{if(o)throw o.error}}return s};var Lv=function(t,i){for(var n=0,r=i.length,e=t.length;n<r;n++,e++)t[e]=i[n];return t};var Vv=function(t){Ev(i,t);function i(i,n){var r=t.call(this)||this;r.createRowCon=i;r.destroyRowCtrls=n;r.stickyRowCtrls=[];r.containerHeight=0;return r}i.prototype.postConstruct=function(){var t=this;this.isClientSide=this.rowModel.getType()==="clientSide";this.ctrlsService.whenReady((function(i){t.gridBodyCtrl=i.gridBodyCtrl}))};i.prototype.getStickyRowCtrls=function(){return this.stickyRowCtrls};i.prototype.checkStickyRows=function(){var t=this;var i=0;if(!this.gridOptionsService.isGroupRowsSticky()){return this.refreshNodesAndContainerHeight([],i)}var n=[];var r=this.rowRenderer.getFirstVisibleVerticalPixel();var e=function(e){var s,o,u;n.push(e);var a;if(t.isClientSide){var f=e;while(f.expanded){if(f.master){f=f.detailNode}else if(f.childrenAfterSort){if(f.childrenAfterSort.length===0){break}f=xt(f.childrenAfterSort)}}a=f.rowTop+f.rowHeight}else{if(e.master){a=e.detailNode.rowTop+e.detailNode.rowHeight}else{var h=(s=e.childStore)===null||s===void 0?void 0:s.getStoreBounds();a=((o=h===null||h===void 0?void 0:h.heightPx)!==null&&o!==void 0?o:0)+((u=h===null||h===void 0?void 0:h.topPx)!==null&&u!==void 0?u:0)}}var c=r+i+e.rowHeight;if(a<c){e.stickyRowTop=i+(a-c)}else{e.stickyRowTop=i}i=0;n.forEach((function(t){var n=t.stickyRowTop+t.rowHeight;if(i<n){i=n}}))};while(true){var s=r+i;var o=this.rowModel.getRowIndexAtPixel(s);var u=this.rowModel.getRow(o);if(u==null){break}if(u.level<0){break}var a=[];var f=u.parent;while(f.level>=0){a.push(f);f=f.parent}var h=a.reverse().find((function(t){return n.indexOf(t)<0&&t.displayed}));if(h){e(h);continue}if(u.isExpandable()&&u.expanded&&u.rowTop<s){e(u);continue}break}return this.refreshNodesAndContainerHeight(n,i)};i.prototype.refreshStickyNode=function(t){var i=[];for(var n=0;n<this.stickyRowCtrls.length;n++){var r=this.stickyRowCtrls[n].getRowNode();if(r!==t){i.push(r)}}if(this.refreshNodesAndContainerHeight(i,this.containerHeight)){this.checkStickyRows()}};i.prototype.refreshNodesAndContainerHeight=function(t,i){var n,r,e;var s=this;var o=false;var u=this.stickyRowCtrls.filter((function(i){return t.indexOf(i.getRowNode())===-1}));var a=t.filter((function(t){return s.stickyRowCtrls.findIndex((function(i){return i.getRowNode()===t}))===-1}));if(u.length||a.length){o=true}var f={};u.forEach((function(t){f[t.getRowNode().id]=t;s.stickyRowCtrls=s.stickyRowCtrls.filter((function(i){return i!==t}))}));try{for(var h=Nv(Object.values(f)),c=h.next();!c.done;c=h.next()){var l=c.value;l.getRowNode().sticky=false}}catch(t){n={error:t}}finally{try{if(c&&!c.done&&(r=h.return))r.call(h)}finally{if(n)throw n.error}}this.destroyRowCtrls(f,false);var v=a.map((function(t){t.sticky=true;return s.createRowCon(t,false,false)}));(e=this.stickyRowCtrls).push.apply(e,Lv([],Hv(v)));this.stickyRowCtrls.forEach((function(t){return t.setRowTop(t.getRowNode().stickyRowTop)}));this.stickyRowCtrls.sort((function(t,i){return i.getRowNode().rowIndex-t.getRowNode().rowIndex}));if(this.containerHeight!==i){this.containerHeight=i;this.gridBodyCtrl.setStickyTopHeight(i);o=true}return o};Iv([ut("rowModel")],i.prototype,"rowModel",void 0);Iv([ut("rowRenderer")],i.prototype,"rowRenderer",void 0);Iv([ut("ctrlsService")],i.prototype,"ctrlsService",void 0);Iv([et],i.prototype,"postConstruct",null);return i}(ri);var Bv=function(){var t=function(i,n){t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var n in i)if(Object.prototype.hasOwnProperty.call(i,n))t[n]=i[n]};return t(i,n)};return function(i,n){if(typeof n!=="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(i,n);function r(){this.constructor=i}i.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}();var zv=function(t,i,n,r){var e=arguments.length,s=e<3?i:r===null?r=Object.getOwnPropertyDescriptor(i,n):r,o;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")s=Reflect.decorate(t,i,n,r);else for(var u=t.length-1;u>=0;u--)if(o=t[u])s=(e<3?o(s):e>3?o(i,n,s):o(i,n))||s;return e>3&&s&&Object.defineProperty(i,n,s),s};var Wv=function(t,i){var n=typeof Symbol==="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),e,s=[],o;try{while((i===void 0||i-- >0)&&!(e=r.next()).done)s.push(e.value)}catch(t){o={error:t}}finally{try{if(e&&!e.done&&(n=r["return"]))n.call(r)}finally{if(o)throw o.error}}return s};var Uv=function(t,i){for(var n=0,r=i.length,e=t.length;n<r;n++,e++)t[e]=i[n];return t};var Kv=function(t){var i=typeof Symbol==="function"&&Symbol.iterator,n=i&&t[i],r=0;if(n)return n.call(t);if(t&&typeof t.length==="number")return{next:function(){if(t&&r>=t.length)t=void 0;return{value:t&&t[r++],done:!t}}};throw new TypeError(i?"Object is not iterable.":"Symbol.iterator is not defined.")};var qv=10;var Yv=function(t){Bv(n,t);function n(){var i=t!==null&&t.apply(this,arguments)||this;i.destroyFuncsForColumnListeners=[];i.rowCtrlsByRowIndex={};i.zombieRowCtrls={};i.allRowCtrls=[];i.topRowCtrls=[];i.bottomRowCtrls=[];i.refreshInProgress=false;i.dataFirstRenderedFired=false;return i}n.prototype.postConstruct=function(){var t=this;this.ctrlsService.whenReady((function(){t.gridBodyCtrl=t.ctrlsService.getGridBodyCtrl();t.initialise()}))};n.prototype.initialise=function(){this.addManagedListener(this.eventService,hi.EVENT_PAGINATION_CHANGED,this.onPageLoaded.bind(this));this.addManagedListener(this.eventService,hi.EVENT_PINNED_ROW_DATA_CHANGED,this.onPinnedRowDataChanged.bind(this));this.addManagedListener(this.eventService,hi.EVENT_DISPLAYED_COLUMNS_CHANGED,this.onDisplayedColumnsChanged.bind(this));this.addManagedListener(this.eventService,hi.EVENT_BODY_SCROLL,this.onBodyScroll.bind(this));this.addManagedListener(this.eventService,hi.EVENT_BODY_HEIGHT_CHANGED,this.redraw.bind(this));this.addManagedPropertyListener("domLayout",this.onDomLayoutChanged.bind(this));this.addManagedPropertyListener("rowClass",this.redrawRows.bind(this));if(this.gridOptionsService.isGroupRowsSticky()){var t=this.rowModel.getType();if(t==="clientSide"||t==="serverSide"){this.stickyRowFeature=this.createManagedBean(new Vv(this.createRowCon.bind(this),this.destroyRowCtrls.bind(this)))}}this.registerCellEventListeners();this.initialiseCache();this.printLayout=this.gridOptionsService.isDomLayout("print");this.embedFullWidthRows=this.printLayout||this.gridOptionsService.is("embedFullWidthRows");this.redrawAfterModelUpdate()};n.prototype.initialiseCache=function(){if(this.gridOptionsService.is("keepDetailRows")){var t=this.getKeepDetailRowsCount();var i=t!=null?t:3;this.cachedRowCtrls=new Qv(i)}};n.prototype.getKeepDetailRowsCount=function(){var t=this.gridOptionsService.getNum("keepDetailRowsCount");if(i(t)&&t>0){return t}return qv};n.prototype.getStickyTopRowCtrls=function(){if(!this.stickyRowFeature){return[]}return this.stickyRowFeature.getStickyRowCtrls()};n.prototype.updateAllRowCtrls=function(){var t=R(this.rowCtrlsByRowIndex);var i=this.gridOptionsService.is("ensureDomOrder");var n=this.gridOptionsService.isDomLayout("print");if(i||n){t.sort((function(t,i){return t.getRowNode().rowIndex-i.getRowNode.rowIndex}))}var r=R(this.zombieRowCtrls);var e=this.cachedRowCtrls?this.cachedRowCtrls.getEntries():[];if(r.length>0||e.length>0){this.allRowCtrls=Uv(Uv(Uv([],Wv(t)),Wv(r)),Wv(e))}else{this.allRowCtrls=t}};n.prototype.onCellFocusChanged=function(t){this.getAllCellCtrls().forEach((function(i){return i.onCellFocused(t)}));this.getFullWidthRowCtrls().forEach((function(i){return i.onFullWidthRowFocused(t)}))};n.prototype.registerCellEventListeners=function(){var t=this;this.addManagedListener(this.eventService,hi.EVENT_CELL_FOCUSED,(function(i){t.onCellFocusChanged(i)}));this.addManagedListener(this.eventService,hi.EVENT_CELL_FOCUS_CLEARED,(function(){t.onCellFocusChanged()}));this.addManagedListener(this.eventService,hi.EVENT_FLASH_CELLS,(function(i){t.getAllCellCtrls().forEach((function(t){return t.onFlashCells(i)}))}));this.addManagedListener(this.eventService,hi.EVENT_COLUMN_HOVER_CHANGED,(function(){t.getAllCellCtrls().forEach((function(t){return t.onColumnHover()}))}));this.addManagedListener(this.eventService,hi.EVENT_DISPLAYED_COLUMNS_CHANGED,(function(){t.getAllCellCtrls().forEach((function(t){return t.onDisplayedColumnsChanged()}))}));this.addManagedListener(this.eventService,hi.EVENT_DISPLAYED_COLUMNS_WIDTH_CHANGED,(function(){if(t.printLayout){t.getAllCellCtrls().forEach((function(t){return t.onLeftChanged()}))}}));var i=this.gridOptionsService.is("enableRangeSelection");if(i){this.addManagedListener(this.eventService,hi.EVENT_RANGE_SELECTION_CHANGED,(function(){t.getAllCellCtrls().forEach((function(t){return t.onRangeSelectionChanged()}))}));this.addManagedListener(this.eventService,hi.EVENT_COLUMN_MOVED,(function(){t.getAllCellCtrls().forEach((function(t){return t.updateRangeBordersIfRangeCount()}))}));this.addManagedListener(this.eventService,hi.EVENT_COLUMN_PINNED,(function(){t.getAllCellCtrls().forEach((function(t){return t.updateRangeBordersIfRangeCount()}))}));this.addManagedListener(this.eventService,hi.EVENT_COLUMN_VISIBLE,(function(){t.getAllCellCtrls().forEach((function(t){return t.updateRangeBordersIfRangeCount()}))}))}this.refreshListenersToColumnsForCellComps();this.addManagedListener(this.eventService,hi.EVENT_GRID_COLUMNS_CHANGED,this.refreshListenersToColumnsForCellComps.bind(this));this.addDestroyFunc(this.removeGridColumnListeners.bind(this))};n.prototype.removeGridColumnListeners=function(){this.destroyFuncsForColumnListeners.forEach((function(t){return t()}));this.destroyFuncsForColumnListeners.length=0};n.prototype.refreshListenersToColumnsForCellComps=function(){var t=this;this.removeGridColumnListeners();var i=this.columnModel.getAllGridColumns();if(!i){return}i.forEach((function(i){var n=function(n){t.getAllCellCtrls().forEach((function(t){if(t.getColumn()===i){n(t)}}))};var r=function(){n((function(t){return t.onLeftChanged()}))};var e=function(){n((function(t){return t.onWidthChanged()}))};var s=function(){n((function(t){return t.onFirstRightPinnedChanged()}))};var o=function(){n((function(t){return t.onLastLeftPinnedChanged()}))};var u=function(){n((function(t){return t.onColDefChanged()}))};i.addEventListener("leftChanged",r);i.addEventListener("widthChanged",e);i.addEventListener("firstRightPinnedChanged",s);i.addEventListener("lastLeftPinnedChanged",o);i.addEventListener("colDefChanged",u);t.destroyFuncsForColumnListeners.push((function(){i.removeEventListener("leftChanged",r);i.removeEventListener("widthChanged",e);i.removeEventListener("firstRightPinnedChanged",s);i.removeEventListener("lastLeftPinnedChanged",o);i.removeEventListener("colDefChanged",u)}))}))};n.prototype.onDomLayoutChanged=function(){var t=this.gridOptionsService.isDomLayout("print");var i=t||this.gridOptionsService.is("embedFullWidthRows");var n=i!==this.embedFullWidthRows||this.printLayout!==t;this.printLayout=t;this.embedFullWidthRows=i;if(n){this.redrawAfterModelUpdate({domLayoutChanged:true})}};n.prototype.datasourceChanged=function(){this.firstRenderedRow=0;this.lastRenderedRow=-1;var t=Object.keys(this.rowCtrlsByRowIndex);this.removeRowCtrls(t)};n.prototype.onPageLoaded=function(t){var i={recycleRows:t.keepRenderedRows,animate:t.animate,newData:t.newData,newPage:t.newPage,onlyBody:true};this.redrawAfterModelUpdate(i)};n.prototype.getAllCellsForColumn=function(t){var i=[];this.getAllRowCtrls().forEach((function(n){var r=n.getCellElement(t);if(r){i.push(r)}}));return i};n.prototype.refreshFloatingRowComps=function(){this.refreshFloatingRows(this.topRowCtrls,this.pinnedRowModel.getPinnedTopRowData());this.refreshFloatingRows(this.bottomRowCtrls,this.pinnedRowModel.getPinnedBottomRowData())};n.prototype.getTopRowCtrls=function(){return this.topRowCtrls};n.prototype.getCentreRowCtrls=function(){return this.allRowCtrls};n.prototype.getBottomRowCtrls=function(){return this.bottomRowCtrls};n.prototype.refreshFloatingRows=function(t,i){var n=this;t.forEach((function(t){t.destroyFirstPass();t.destroySecondPass()}));t.length=0;if(!i){return}i.forEach((function(i){var r=new Ih(i,n.beans,false,false,n.printLayout);t.push(r)}))};n.prototype.onPinnedRowDataChanged=function(){var t={recycleRows:true};this.redrawAfterModelUpdate(t)};n.prototype.redrawRow=function(t,i){var n=this;if(i===void 0){i=false}if(t.sticky){this.stickyRowFeature.refreshStickyNode(t)}else{var r=function(i){var r=i[t.rowIndex];if(!r){return}if(r.getRowNode()!==t){return}r.destroyFirstPass();r.destroySecondPass();i[t.rowIndex]=n.createRowCon(t,false,false)};switch(t.rowPinned){case"top":r(this.topRowCtrls);case"bottom":r(this.bottomRowCtrls);default:r(this.rowCtrlsByRowIndex);this.updateAllRowCtrls()}}if(!i){this.dispatchDisplayedRowsChanged(false)}};n.prototype.redrawRows=function(t){var i=this;var n=t!=null;if(n){t===null||t===void 0?void 0:t.forEach((function(t){return i.redrawRow(t,true)}));this.dispatchDisplayedRowsChanged(false);return}this.redrawAfterModelUpdate()};n.prototype.getCellToRestoreFocusToAfterRefresh=function(t){var i=(t===null||t===void 0?void 0:t.suppressKeepFocus)?null:this.focusService.getFocusCellToUseAfterRefresh();if(i==null){return null}var n=this.gridOptionsService.getDocument();var r=n.activeElement;var e=this.gridOptionsService.getDomData(r,kh.DOM_DATA_KEY_CELL_CTRL);var s=this.gridOptionsService.getDomData(r,Ih.DOM_DATA_KEY_ROW_CTRL);var o=e||s;return o?i:null};n.prototype.redrawAfterModelUpdate=function(t){if(t===void 0){t={}}this.getLockOnRefresh();var i=this.getCellToRestoreFocusToAfterRefresh(t);this.updateContainerHeights();this.scrollToTopIfNewData(t);var n=!t.domLayoutChanged&&!!t.recycleRows;var r=t.animate&&this.gridOptionsService.isAnimateRows();var e=n?this.getRowsToRecycle():null;if(!n){this.removeAllRowComps()}this.workOutFirstAndLastRowsToRender();if(this.stickyRowFeature){this.stickyRowFeature.checkStickyRows()}this.recycleRows(e,r);this.gridBodyCtrl.updateRowCount();if(!t.onlyBody){this.refreshFloatingRowComps()}this.dispatchDisplayedRowsChanged();if(i!=null){this.restoreFocusedCell(i)}this.releaseLockOnRefresh()};n.prototype.scrollToTopIfNewData=function(t){var i=t.newData||t.newPage;var n=this.gridOptionsService.is("suppressScrollOnNewData");if(i&&!n){this.gridBodyCtrl.getScrollFeature().scrollToTop()}};n.prototype.updateContainerHeights=function(){if(this.printLayout){this.rowContainerHeightService.setModelHeight(null);return}var t=this.paginationProxy.getCurrentPageHeight();if(t===0){t=1}this.rowContainerHeightService.setModelHeight(t)};n.prototype.getLockOnRefresh=function(){if(this.refreshInProgress){throw new Error("AG Grid: cannot get grid to draw rows when it is in the middle of drawing rows. "+"Your code probably called a grid API method while the grid was in the render stage. To overcome "+"this, put the API call into a timeout, e.g. instead of api.redrawRows(), "+"call setTimeout(function() { api.redrawRows(); }, 0). To see what part of your code "+"that caused the refresh check this stacktrace.")}this.refreshInProgress=true};n.prototype.releaseLockOnRefresh=function(){this.refreshInProgress=false};n.prototype.isRefreshInProgress=function(){return this.refreshInProgress};n.prototype.restoreFocusedCell=function(t){if(t){this.focusService.setRestoreFocusedCell(t);this.onCellFocusChanged({rowIndex:t.rowIndex,column:t.column,rowPinned:t.rowPinned,forceBrowserFocus:true,preventScrollOnBrowserFocus:true,api:this.beans.gridApi,columnApi:this.beans.columnApi,context:this.beans.gridOptionsService.context,type:"mock"})}};n.prototype.stopEditing=function(t){if(t===void 0){t=false}this.getAllRowCtrls().forEach((function(i){i.stopEditing(t)}))};n.prototype.getAllCellCtrls=function(){var t=[];var i=this.getAllRowCtrls();var n=i.length;for(var r=0;r<n;r++){var e=i[r].getAllCellCtrls();var s=e.length;for(var o=0;o<s;o++){t.push(e[o])}}return t};n.prototype.getAllRowCtrls=function(){var t,i;var n=this.stickyRowFeature&&this.stickyRowFeature.getStickyRowCtrls()||[];var r=Uv(Uv(Uv([],Wv(this.topRowCtrls)),Wv(this.bottomRowCtrls)),Wv(n));try{for(var e=Kv(Object.keys(this.rowCtrlsByRowIndex)),s=e.next();!s.done;s=e.next()){var o=s.value;r.push(this.rowCtrlsByRowIndex[o])}}catch(i){t={error:i}}finally{try{if(s&&!s.done&&(i=e.return))i.call(e)}finally{if(t)throw t.error}}return r};n.prototype.addRenderedRowListener=function(t,i,n){var r=this.rowCtrlsByRowIndex[i];if(r){r.addEventListener(t,n)}};n.prototype.flashCells=function(t){if(t===void 0){t={}}var i=t.flashDelay,n=t.fadeDelay;this.getCellCtrls(t.rowNodes,t.columns).forEach((function(t){return t.flashCell({flashDelay:i,fadeDelay:n})}))};n.prototype.refreshCells=function(t){var i=this;if(t===void 0){t={}}var n={forceRefresh:t.force,newData:false,suppressFlash:t.suppressFlash};this.getCellCtrls(t.rowNodes,t.columns).forEach((function(t){if(t.refreshShouldDestroy()){var i=t.getRowCtrl();if(i){i.refreshCell(t)}}else{t.refreshCell(n)}}));if(t.rowNodes){this.getRowCtrls(t.rowNodes).forEach((function(t){if(!t.isFullWidth()){return}var n=t.refreshFullWidth();if(!n){i.redrawRow(t.getRowNode(),true)}}));this.dispatchDisplayedRowsChanged(false)}};n.prototype.getCellRendererInstances=function(t){var i=this;var n;var r=this.getCellCtrls(t.rowNodes,t.columns).map((function(t){return t.getCellRenderer()})).filter((function(t){return t!=null}));if((n=t.columns)===null||n===void 0?void 0:n.length){return r}var e=[];var s=this.mapRowNodes(t.rowNodes);this.getAllRowCtrls().forEach((function(t){if(s&&!i.isRowInMap(t.getRowNode(),s)){return}if(!t.isFullWidth()){return}var n=t.getFullWidthCellRenderer();if(n){e.push(n)}}));return Uv(Uv([],Wv(e)),Wv(r))};n.prototype.getCellEditorInstances=function(t){var i=[];this.getCellCtrls(t.rowNodes,t.columns).forEach((function(t){var n=t.getCellEditor();if(n){i.push(n)}}));return i};n.prototype.getEditingCells=function(){var t=[];this.getAllCellCtrls().forEach((function(i){if(i.isEditing()){var n=i.getCellPosition();t.push(n)}}));return t};n.prototype.mapRowNodes=function(t){if(!t){return}var i={top:{},bottom:{},normal:{}};t.forEach((function(t){var n=t.id;if(t.rowPinned==="top"){i.top[n]=t}else if(t.rowPinned==="bottom"){i.bottom[n]=t}else{i.normal[n]=t}}));return i};n.prototype.isRowInMap=function(t,i){var n=t.id;var r=t.rowPinned;if(r==="bottom"){return i.bottom[n]!=null}if(r==="top"){return i.top[n]!=null}return i.normal[n]!=null};n.prototype.getRowCtrls=function(t){var i=this;var n=this.mapRowNodes(t);var r=this.getAllRowCtrls();if(!t||!n){return r}return r.filter((function(t){var r=t.getRowNode();return i.isRowInMap(r,n)}))};n.prototype.getCellCtrls=function(t,n){var r=this;var e;if(i(n)){e={};n.forEach((function(t){var n=r.columnModel.getGridColumn(t);if(i(n)){e[n.getId()]=true}}))}var s=[];this.getRowCtrls(t).forEach((function(t){t.getAllCellCtrls().forEach((function(t){var i=t.getColumn().getId();var n=e&&!e[i];if(n){return}s.push(t)}))}));return s};n.prototype.destroy=function(){this.removeAllRowComps();t.prototype.destroy.call(this)};n.prototype.removeAllRowComps=function(){var t=Object.keys(this.rowCtrlsByRowIndex);this.removeRowCtrls(t)};n.prototype.getRowsToRecycle=function(){var t=[];g(this.rowCtrlsByRowIndex,(function(i,n){var r=n.getRowNode().id==null;if(r){t.push(i)}}));this.removeRowCtrls(t);var i={};g(this.rowCtrlsByRowIndex,(function(t,n){var r=n.getRowNode();i[r.id]=n}));this.rowCtrlsByRowIndex={};return i};n.prototype.removeRowCtrls=function(t){var i=this;t.forEach((function(t){var n=i.rowCtrlsByRowIndex[t];if(n){n.destroyFirstPass();n.destroySecondPass()}delete i.rowCtrlsByRowIndex[t]}))};n.prototype.onBodyScroll=function(t){if(t.direction!=="vertical"){return}this.redraw({afterScroll:true})};n.prototype.redraw=function(t){if(t===void 0){t={}}var i=t.afterScroll;var n;if(this.stickyRowFeature&&ar()){n=this.getCellToRestoreFocusToAfterRefresh()||undefined}var r=this.firstRenderedRow;var e=this.lastRenderedRow;this.workOutFirstAndLastRowsToRender();var s=false;if(this.stickyRowFeature){s=this.stickyRowFeature.checkStickyRows()}var o=this.firstRenderedRow!==r||this.lastRenderedRow!==e;if(i&&!s&&!o){return}this.getLockOnRefresh();this.recycleRows(null,false,i);this.releaseLockOnRefresh();this.dispatchDisplayedRowsChanged(i);if(n!=null){var u=this.getCellToRestoreFocusToAfterRefresh();if(n!=null&&u==null){this.animationFrameService.flushAllFrames();this.restoreFocusedCell(n)}}};n.prototype.removeRowCompsNotToDraw=function(t){var i={};t.forEach((function(t){return i[t]=true}));var n=Object.keys(this.rowCtrlsByRowIndex);var r=n.filter((function(t){return!i[t]}));this.removeRowCtrls(r)};n.prototype.calculateIndexesToDraw=function(t){var i=this;var n=wr(this.firstRenderedRow,this.lastRenderedRow);var r=function(t,r){var e=r.getRowNode().rowIndex;if(e==null){return}if(e<i.firstRenderedRow||e>i.lastRenderedRow){if(i.doNotUnVirtualiseRow(r)){n.push(e)}}};g(this.rowCtrlsByRowIndex,r);g(t,r);n.sort((function(t,i){return t-i}));var e=[];for(var s=0;s<n.length;s++){var o=n[s];var u=this.paginationProxy.getRow(o);if(u&&!u.sticky){e.push(o)}}return e};n.prototype.recycleRows=function(t,n,r){var e=this;if(n===void 0){n=false}if(r===void 0){r=false}var s=this.calculateIndexesToDraw(t);this.removeRowCompsNotToDraw(s);if(this.printLayout){n=false}s.forEach((function(s){var o=e.createOrUpdateRowCtrl(s,t,n,r);if(i(o));}));if(t){var o=r&&!this.gridOptionsService.is("suppressAnimationFrame")&&!this.printLayout;if(o){this.beans.animationFrameService.addDestroyTask((function(){e.destroyRowCtrls(t,n);e.updateAllRowCtrls();e.dispatchDisplayedRowsChanged()}))}else{this.destroyRowCtrls(t,n)}}this.updateAllRowCtrls()};n.prototype.dispatchDisplayedRowsChanged=function(t){if(t===void 0){t=false}var i={type:hi.EVENT_DISPLAYED_ROWS_CHANGED,afterScroll:t};this.eventService.dispatchEvent(i)};n.prototype.onDisplayedColumnsChanged=function(){var t=this.columnModel.isPinningLeft();var i=this.columnModel.isPinningRight();var n=this.pinningLeft!==t||i!==this.pinningRight;if(n){this.pinningLeft=t;this.pinningRight=i;if(this.embedFullWidthRows){this.redrawFullWidthEmbeddedRows()}}};n.prototype.redrawFullWidthEmbeddedRows=function(){var t=[];this.getFullWidthRowCtrls().forEach((function(i){var n=i.getRowNode().rowIndex;t.push(n.toString())}));this.refreshFloatingRowComps();this.removeRowCtrls(t);this.redraw({afterScroll:true})};n.prototype.getFullWidthRowCtrls=function(t){var i=this;var n=this.mapRowNodes(t);return this.getAllRowCtrls().filter((function(t){if(!t.isFullWidth()){return false}var r=t.getRowNode();if(n!=null&&!i.isRowInMap(r,n)){return false}return true}))};n.prototype.createOrUpdateRowCtrl=function(t,n,r,e){var s;var o=this.rowCtrlsByRowIndex[t];if(!o){s=this.paginationProxy.getRow(t);if(i(s)&&i(n)&&n[s.id]&&s.alreadyRendered){o=n[s.id];n[s.id]=null}}var u=!o;if(u){if(!s){s=this.paginationProxy.getRow(t)}if(i(s)){o=this.createRowCon(s,r,e)}else{return}}if(s){s.alreadyRendered=true}this.rowCtrlsByRowIndex[t]=o;return o};n.prototype.destroyRowCtrls=function(t,i){var n=this;var r=[];g(t,(function(t,e){if(!e){return}if(n.cachedRowCtrls&&e.isCacheable()){n.cachedRowCtrls.addRow(e);return}e.destroyFirstPass();if(i){n.zombieRowCtrls[e.getInstanceId()]=e;r.push((function(){e.destroySecondPass();delete n.zombieRowCtrls[e.getInstanceId()]}))}else{e.destroySecondPass()}}));if(i){r.push((function(){n.updateAllRowCtrls();n.dispatchDisplayedRowsChanged()}));N(r)}};n.prototype.getRowBuffer=function(){var t=this.gridOptionsService.getNum("rowBuffer");if(typeof t==="number"){if(t<0){P((function(){return console.warn("AG Grid: rowBuffer should not be negative")}),"warn rowBuffer negative");t=0;this.gridOptionsService.set("rowBuffer",0)}}else{t=10}return t};n.prototype.getRowBufferInPixels=function(){var t=this.getRowBuffer();var i=this.gridOptionsService.getRowHeightAsNumber();return t*i};n.prototype.workOutFirstAndLastRowsToRender=function(){this.rowContainerHeightService.updateOffset();var t;var i;if(!this.paginationProxy.isRowsToRender()){t=0;i=-1}else if(this.printLayout){this.environment.refreshRowHeightVariable();t=this.paginationProxy.getPageFirstRow();i=this.paginationProxy.getPageLastRow()}else{var n=this.getRowBufferInPixels();var r=this.ctrlsService.getGridBodyCtrl();var e=this.gridOptionsService.is("suppressRowVirtualisation");var s=false;var o=void 0;var u=void 0;do{var a=this.paginationProxy.getPixelOffset();var f=this.paginationProxy.getCurrentPagePixelRange(),h=f.pageFirstPixel,c=f.pageLastPixel;var l=this.rowContainerHeightService.getDivStretchOffset();var v=r.getScrollFeature().getVScrollPosition();var d=v.top;var p=v.bottom;if(e){o=h+l;u=c+l}else{o=Math.max(d+a-n,h)+l;u=Math.min(p+a+n,c)+l}this.firstVisibleVPixel=Math.max(d+a,h)+l;s=this.ensureAllRowsInRangeHaveHeightsCalculated(o,u)}while(s);var g=this.paginationProxy.getRowIndexAtPixel(o);var b=this.paginationProxy.getRowIndexAtPixel(u);var w=this.paginationProxy.getPageFirstRow();var y=this.paginationProxy.getPageLastRow();if(g<w){g=w}if(b>y){b=y}t=g;i=b}var m=this.gridOptionsService.isDomLayout("normal");var S=this.gridOptionsService.is("suppressMaxRenderedRowRestriction");var C=Math.max(this.getRowBuffer(),500);if(m&&!S){if(i-t>C){i=t+C}}var O=t!==this.firstRenderedRow;var j=i!==this.lastRenderedRow;if(O||j){this.firstRenderedRow=t;this.lastRenderedRow=i;var R={type:hi.EVENT_VIEWPORT_CHANGED,firstRow:t,lastRow:i};this.eventService.dispatchEvent(R)}};n.prototype.dispatchFirstDataRenderedEvent=function(){var t=this;if(this.dataFirstRenderedFired){return}this.dataFirstRenderedFired=true;var i={type:hi.EVENT_FIRST_DATA_RENDERED,firstRow:this.firstRenderedRow,lastRow:this.lastRenderedRow};window.requestAnimationFrame((function(){t.beans.eventService.dispatchEvent(i)}))};n.prototype.ensureAllRowsInRangeHaveHeightsCalculated=function(t,i){var n=this.paginationProxy.ensureRowHeightsValid(t,i,-1,-1);if(n){this.updateContainerHeights()}return n};n.prototype.getFirstVisibleVerticalPixel=function(){return this.firstVisibleVPixel};n.prototype.getFirstVirtualRenderedRow=function(){return this.firstRenderedRow};n.prototype.getLastVirtualRenderedRow=function(){return this.lastRenderedRow};n.prototype.doNotUnVirtualiseRow=function(t){var i=false;var n=true;var r=t.getRowNode();var e=this.focusService.isRowNodeFocused(r);var s=t.isEditing();var o=r.detail;var u=e||s||o;if(!u){return i}var a=this.paginationProxy.isRowPresent(r);return a?n:i};n.prototype.createRowCon=function(t,i,n){var r=this.cachedRowCtrls?this.cachedRowCtrls.getRow(t):null;if(r){return r}var e=this.gridOptionsService.is("suppressAnimationFrame");var s=n&&!e&&!this.printLayout;var o=new Ih(t,this.beans,i,s,this.printLayout);return o};n.prototype.getRenderedNodes=function(){var t=this.rowCtrlsByRowIndex;return Object.keys(t).map((function(i){return t[i].getRowNode()}))};n.prototype.getRowByPosition=function(t){var i;var n=t.rowIndex;switch(t.rowPinned){case"top":i=this.topRowCtrls[n];break;case"bottom":i=this.bottomRowCtrls[n];break;default:i=this.rowCtrlsByRowIndex[n];if(!i){i=this.getStickyTopRowCtrls().find((function(t){return t.getRowNode().rowIndex===n}))||null}break}return i};n.prototype.getRowNode=function(t){switch(t.rowPinned){case"top":return this.pinnedRowModel.getPinnedTopRowData()[t.rowIndex];case"bottom":return this.pinnedRowModel.getPinnedBottomRowData()[t.rowIndex];default:return this.rowModel.getRow(t.rowIndex)}};n.prototype.isRangeInRenderedViewport=function(t,i){var n=t==null||i==null;if(n){return false}var r=t>this.lastRenderedRow;var e=i<this.firstRenderedRow;var s=!e&&!r;return s};zv([ut("animationFrameService")],n.prototype,"animationFrameService",void 0);zv([ut("paginationProxy")],n.prototype,"paginationProxy",void 0);zv([ut("columnModel")],n.prototype,"columnModel",void 0);zv([ut("pinnedRowModel")],n.prototype,"pinnedRowModel",void 0);zv([ut("rowModel")],n.prototype,"rowModel",void 0);zv([ut("focusService")],n.prototype,"focusService",void 0);zv([ut("beans")],n.prototype,"beans",void 0);zv([ut("rowContainerHeightService")],n.prototype,"rowContainerHeightService",void 0);zv([ut("ctrlsService")],n.prototype,"ctrlsService",void 0);zv([et],n.prototype,"postConstruct",null);n=zv([ot("rowRenderer")],n);return n}(ri);var Qv=function(){function t(t){this.entriesMap={};this.entriesList=[];this.maxCount=t}t.prototype.addRow=function(t){this.entriesMap[t.getRowNode().id]=t;this.entriesList.push(t);t.setCached(true);if(this.entriesList.length>this.maxCount){var i=this.entriesList[0];i.destroyFirstPass();i.destroySecondPass();this.removeFromCache(i)}};t.prototype.getRow=function(t){if(t==null||t.id==null){return null}var i=this.entriesMap[t.id];if(!i){return null}this.removeFromCache(i);i.setCached(false);var n=i.getRowNode()!=t;return n?null:i};t.prototype.removeFromCache=function(t){var i=t.getRowNode().id;delete this.entriesMap[i];Mt(this.entriesList,t)};t.prototype.getEntries=function(){return this.entriesList};return t}();var Jv=function(){var t=function(i,n){t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var n in i)if(Object.prototype.hasOwnProperty.call(i,n))t[n]=i[n]};return t(i,n)};return function(i,n){if(typeof n!=="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(i,n);function r(){this.constructor=i}i.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}();var Zv=function(t,i,n,r){var e=arguments.length,s=e<3?i:r===null?r=Object.getOwnPropertyDescriptor(i,n):r,o;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")s=Reflect.decorate(t,i,n,r);else for(var u=t.length-1;u>=0;u--)if(o=t[u])s=(e<3?o(s):e>3?o(i,n,s):o(i,n))||s;return e>3&&s&&Object.defineProperty(i,n,s),s};var $v=function(t){Jv(i,t);function i(){return t!==null&&t.apply(this,arguments)||this}i.prototype.formatValue=function(t,i,n,r,e){if(e===void 0){e=true}var s=null;var o;var u=t.getColDef();if(r){o=r}else if(e){o=u.valueFormatter}if(o){var a={value:n,node:i,data:i?i.data:null,colDef:u,column:t,api:this.gridOptionsService.api,columnApi:this.gridOptionsService.columnApi,context:this.gridOptionsService.context};if(typeof o==="function"){s=o(a)}else{s=this.expressionService.evaluate(o,a)}}else if(u.refData){return u.refData[n]||""}if(s==null&&Array.isArray(n)){s=n.join(", ")}return s};Zv([ut("expressionService")],i.prototype,"expressionService",void 0);i=Zv([ot("valueFormatterService")],i);return i}(ri);var Xv=function(){var t=function(i,n){t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var n in i)if(Object.prototype.hasOwnProperty.call(i,n))t[n]=i[n]};return t(i,n)};return function(i,n){if(typeof n!=="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(i,n);function r(){this.constructor=i}i.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}();var td=function(t,i,n,r){var e=arguments.length,s=e<3?i:r===null?r=Object.getOwnPropertyDescriptor(i,n):r,o;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")s=Reflect.decorate(t,i,n,r);else for(var u=t.length-1;u>=0;u--)if(o=t[u])s=(e<3?o(s):e>3?o(i,n,s):o(i,n))||s;return e>3&&s&&Object.defineProperty(i,n,s),s};var id=function(t){Xv(i,t);function i(){return t!==null&&t.apply(this,arguments)||this}i.prototype.init=function(){this.setPinnedTopRowData(this.gridOptionsService.get("pinnedTopRowData"));this.setPinnedBottomRowData(this.gridOptionsService.get("pinnedBottomRowData"))};i.prototype.isEmpty=function(t){var i=t==="top"?this.pinnedTopRows:this.pinnedBottomRows;return r(i)};i.prototype.isRowsToRender=function(t){return!this.isEmpty(t)};i.prototype.getRowAtPixel=function(t,i){var n=i==="top"?this.pinnedTopRows:this.pinnedBottomRows;if(r(n)){return 0}for(var e=0;e<n.length;e++){var s=n[e];var o=s.rowTop+s.rowHeight-1;if(o>=t){return e}}return n.length-1};i.prototype.setPinnedTopRowData=function(t){this.pinnedTopRows=this.createNodesFromData(t,true);var i={type:hi.EVENT_PINNED_ROW_DATA_CHANGED};this.eventService.dispatchEvent(i)};i.prototype.setPinnedBottomRowData=function(t){this.pinnedBottomRows=this.createNodesFromData(t,false);var i={type:hi.EVENT_PINNED_ROW_DATA_CHANGED};this.eventService.dispatchEvent(i)};i.prototype.createNodesFromData=function(t,i){var n=this;var r=[];if(t){var e=0;t.forEach((function(t,s){var o=new Au(n.beans);o.data=t;var u=i?Au.ID_PREFIX_TOP_PINNED:Au.ID_PREFIX_BOTTOM_PINNED;o.id=u+s;o.rowPinned=i?"top":"bottom";o.setRowTop(e);o.setRowHeight(n.gridOptionsService.getRowHeightForNode(o).height);o.setRowIndex(s);e+=o.rowHeight;r.push(o)}))}return r};i.prototype.getPinnedTopRowData=function(){return this.pinnedTopRows};i.prototype.getPinnedBottomRowData=function(){return this.pinnedBottomRows};i.prototype.getPinnedTopTotalHeight=function(){return this.getTotalHeight(this.pinnedTopRows)};i.prototype.getPinnedTopRowCount=function(){return this.pinnedTopRows?this.pinnedTopRows.length:0};i.prototype.getPinnedBottomRowCount=function(){return this.pinnedBottomRows?this.pinnedBottomRows.length:0};i.prototype.getPinnedTopRow=function(t){return this.pinnedTopRows[t]};i.prototype.getPinnedBottomRow=function(t){return this.pinnedBottomRows[t]};i.prototype.forEachPinnedTopRow=function(t){if(r(this.pinnedTopRows)){return}this.pinnedTopRows.forEach(t)};i.prototype.forEachPinnedBottomRow=function(t){if(r(this.pinnedBottomRows)){return}this.pinnedBottomRows.forEach(t)};i.prototype.getPinnedBottomTotalHeight=function(){return this.getTotalHeight(this.pinnedBottomRows)};i.prototype.getTotalHeight=function(t){if(!t||t.length===0){return 0}var i=xt(t);return i.rowTop+i.rowHeight};td([ut("beans")],i.prototype,"beans",void 0);td([et],i.prototype,"init",null);i=td([ot("pinnedRowModel")],i);return i}(ri);var nd;(function(t){t["Applied"]="Applied";t["StoreNotFound"]="StoreNotFound";t["StoreLoading"]="StoreLoading";t["StoreWaitingToLoad"]="StoreWaitingToLoad";t["StoreLoadingFailed"]="StoreLoadingFailed";t["StoreWrongType"]="StoreWrongType";t["Cancelled"]="Cancelled"})(nd||(nd={}));var rd=function(){function t(t,i){this.active=true;this.nodeIdsToColumns={};this.mapToItems={};this.keepingColumns=t;this.pathRoot={rowNode:i,children:null};this.mapToItems[i.id]=this.pathRoot}t.prototype.setInactive=function(){this.active=false};t.prototype.isActive=function(){return this.active};t.prototype.depthFirstSearchChangedPath=function(t,i){if(t.children){for(var n=0;n<t.children.length;n++){this.depthFirstSearchChangedPath(t.children[n],i)}}i(t.rowNode)};t.prototype.depthFirstSearchEverything=function(t,i,n){if(t.childrenAfterGroup){for(var r=0;r<t.childrenAfterGroup.length;r++){var e=t.childrenAfterGroup[r];if(e.childrenAfterGroup){this.depthFirstSearchEverything(t.childrenAfterGroup[r],i,n)}else if(n){i(e)}}}i(t)};t.prototype.forEachChangedNodeDepthFirst=function(t,i,n){if(i===void 0){i=false}if(n===void 0){n=false}if(this.active&&!n){this.depthFirstSearchChangedPath(this.pathRoot,t)}else{this.depthFirstSearchEverything(this.pathRoot.rowNode,t,i)}};t.prototype.executeFromRootNode=function(t){t(this.pathRoot.rowNode)};t.prototype.createPathItems=function(t){var i=t;var n=0;while(!this.mapToItems[i.id]){var r={rowNode:i,children:null};this.mapToItems[i.id]=r;n++;i=i.parent}return n};t.prototype.populateColumnsMap=function(t,i){var n=this;if(!this.keepingColumns||!i){return}var r=t;while(r){if(!this.nodeIdsToColumns[r.id]){this.nodeIdsToColumns[r.id]={}}i.forEach((function(t){return n.nodeIdsToColumns[r.id][t.getId()]=true}));r=r.parent}};t.prototype.linkPathItems=function(t,i){var n=t;for(var r=0;r<i;r++){var e=this.mapToItems[n.id];var s=this.mapToItems[n.parent.id];if(!s.children){s.children=[]}s.children.push(e);n=n.parent}};t.prototype.addParentNode=function(t,i){if(!t||t.isRowPinned()){return}var n=this.createPathItems(t);this.linkPathItems(t,n);this.populateColumnsMap(t,i)};t.prototype.canSkip=function(t){return this.active&&!this.mapToItems[t.id]};t.prototype.getValueColumnsForNode=function(t,i){if(!this.keepingColumns){return i}var n=this.nodeIdsToColumns[t.id];var r=i.filter((function(t){return n[t.getId()]}));return r};t.prototype.getNotValueColumnsForNode=function(t,i){if(!this.keepingColumns){return null}var n=this.nodeIdsToColumns[t.id];var r=i.filter((function(t){return!n[t.getId()]}));return r};return t}();var ed=function(){var t=function(i,n){t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var n in i)if(Object.prototype.hasOwnProperty.call(i,n))t[n]=i[n]};return t(i,n)};return function(i,n){if(typeof n!=="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(i,n);function r(){this.constructor=i}i.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}();var sd=function(t){ed(i,t);function i(n){var r=t.call(this)||this;r.state=i.STATE_WAITING_TO_LOAD;r.version=0;r.id=n;return r}i.prototype.getId=function(){return this.id};i.prototype.load=function(){this.state=i.STATE_LOADING;this.loadFromDatasource()};i.prototype.getVersion=function(){return this.version};i.prototype.setStateWaitingToLoad=function(){this.version++;this.state=i.STATE_WAITING_TO_LOAD};i.prototype.getState=function(){return this.state};i.prototype.pageLoadFailed=function(t){var n=this.isRequestMostRecentAndLive(t);if(n){this.state=i.STATE_FAILED;this.processServerFail()}this.dispatchLoadCompleted(false)};i.prototype.success=function(t,i){this.successCommon(t,i)};i.prototype.pageLoaded=function(t,i,n){this.successCommon(t,{rowData:i,rowCount:n})};i.prototype.isRequestMostRecentAndLive=function(t){var i=t===this.version;var n=this.isAlive();return i&&n};i.prototype.successCommon=function(t,n){this.dispatchLoadCompleted();var r=this.isRequestMostRecentAndLive(t);if(r){this.state=i.STATE_LOADED;this.processServerResult(n)}};i.prototype.dispatchLoadCompleted=function(t){if(t===void 0){t=true}var n={type:i.EVENT_LOAD_COMPLETE,success:t,block:this};this.dispatchEvent(n)};i.EVENT_LOAD_COMPLETE="loadComplete";i.STATE_WAITING_TO_LOAD="needsLoading";i.STATE_LOADING="loading";i.STATE_LOADED="loaded";i.STATE_FAILED="failed";return i}(ri);var od=function(){var t=function(i,n){t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var n in i)if(Object.prototype.hasOwnProperty.call(i,n))t[n]=i[n]};return t(i,n)};return function(i,n){if(typeof n!=="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(i,n);function r(){this.constructor=i}i.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}();var ud=function(t,i,n,r){var e=arguments.length,s=e<3?i:r===null?r=Object.getOwnPropertyDescriptor(i,n):r,o;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")s=Reflect.decorate(t,i,n,r);else for(var u=t.length-1;u>=0;u--)if(o=t[u])s=(e<3?o(s):e>3?o(i,n,s):o(i,n))||s;return e>3&&s&&Object.defineProperty(i,n,s),s};var ad=function(t,i){return function(n,r){i(n,r,t)}};var fd=function(t){od(i,t);function i(){var i=t!==null&&t.apply(this,arguments)||this;i.activeBlockLoadsCount=0;i.blocks=[];i.active=true;return i}n=i;i.prototype.postConstruct=function(){this.maxConcurrentRequests=this.getMaxConcurrentDatasourceRequests();var t=this.gridOptionsService.getNum("blockLoadDebounceMillis");if(t&&t>0){this.checkBlockToLoadDebounce=Xe.debounce(this.performCheckBlocksToLoad.bind(this),t)}};i.prototype.setBeans=function(t){this.logger=t.create("RowNodeBlockLoader")};i.prototype.getMaxConcurrentDatasourceRequests=function(){var t=this.gridOptionsService.getNum("maxConcurrentDatasourceRequests");if(t==null){return 2}if(t<=0){return}return t};i.prototype.addBlock=function(t){this.blocks.push(t);t.addEventListener(sd.EVENT_LOAD_COMPLETE,this.loadComplete.bind(this));this.checkBlockToLoad()};i.prototype.removeBlock=function(t){Xe.removeFromArray(this.blocks,t)};i.prototype.destroy=function(){t.prototype.destroy.call(this);this.active=false};i.prototype.loadComplete=function(){this.activeBlockLoadsCount--;this.checkBlockToLoad();this.dispatchEvent({type:n.BLOCK_LOADED_EVENT});if(this.activeBlockLoadsCount==0){this.dispatchEvent({type:n.BLOCK_LOADER_FINISHED_EVENT})}};i.prototype.checkBlockToLoad=function(){if(this.checkBlockToLoadDebounce){this.checkBlockToLoadDebounce()}else{this.performCheckBlocksToLoad()}};i.prototype.performCheckBlocksToLoad=function(){if(!this.active){return}this.printCacheStatus();if(this.maxConcurrentRequests!=null&&this.activeBlockLoadsCount>=this.maxConcurrentRequests){this.logger.log("checkBlockToLoad: max loads exceeded");return}var t=this.getAvailableLoadingCount();var i=this.blocks.filter((function(t){return t.getState()===sd.STATE_WAITING_TO_LOAD})).slice(0,t);this.registerLoads(i.length);i.forEach((function(t){return t.load()}));this.printCacheStatus()};i.prototype.getBlockState=function(){if(this.gridOptionsService.isRowModelType("serverSide")){var t=this.rowModel;return t.getBlockStates()}var i={};this.blocks.forEach((function(t){var n=t.getBlockStateJson(),r=n.id,e=n.state;i[r]=e}));return i};i.prototype.printCacheStatus=function(){if(this.logger.isLogging()){this.logger.log("printCacheStatus: activePageLoadsCount = "+this.activeBlockLoadsCount+","+(" blocks = "+JSON.stringify(this.getBlockState())))}};i.prototype.isLoading=function(){return this.activeBlockLoadsCount>0};i.prototype.registerLoads=function(t){this.activeBlockLoadsCount+=t};i.prototype.getAvailableLoadingCount=function(){return this.maxConcurrentRequests!==undefined?this.maxConcurrentRequests-this.activeBlockLoadsCount:undefined};var n;i.BLOCK_LOADED_EVENT="blockLoaded";i.BLOCK_LOADER_FINISHED_EVENT="blockLoaderFinished";ud([ut("rowModel")],i.prototype,"rowModel",void 0);ud([et],i.prototype,"postConstruct",null);ud([ad(0,ht("loggerFactory"))],i.prototype,"setBeans",null);i=n=ud([ot("rowNodeBlockLoader")],i);return i}(ri);var hd=function(){var t=function(i,n){t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var n in i)if(Object.prototype.hasOwnProperty.call(i,n))t[n]=i[n]};return t(i,n)};return function(i,n){if(typeof n!=="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(i,n);function r(){this.constructor=i}i.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}();var cd=function(t,i,n,r){var e=arguments.length,s=e<3?i:r===null?r=Object.getOwnPropertyDescriptor(i,n):r,o;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")s=Reflect.decorate(t,i,n,r);else for(var u=t.length-1;u>=0;u--)if(o=t[u])s=(e<3?o(s):e>3?o(i,n,s):o(i,n))||s;return e>3&&s&&Object.defineProperty(i,n,s),s};var ld=function(t){hd(r,t);function r(){var i=t!==null&&t.apply(this,arguments)||this;i.currentPage=0;i.topDisplayedRowIndex=0;i.bottomDisplayedRowIndex=0;i.pixelOffset=0;i.masterRowCount=0;return i}r.prototype.postConstruct=function(){this.active=this.gridOptionsService.is("pagination");this.paginateChildRows=this.isPaginateChildRows();this.addManagedListener(this.eventService,hi.EVENT_MODEL_UPDATED,this.onModelUpdated.bind(this));this.addManagedPropertyListener("pagination",this.onPaginationPageSizeChanged.bind(this));this.addManagedPropertyListener("paginationPageSize",this.onPaginationPageSizeChanged.bind(this));this.onModelUpdated()};r.prototype.ensureRowHeightsValid=function(t,i,n,r){var e=this.rowModel.ensureRowHeightsValid(t,i,this.getPageFirstRow(),this.getPageLastRow());if(e){this.calculatePages()}return e};r.prototype.isPaginateChildRows=function(){var t=this.gridOptionsService.is("groupRemoveSingleChildren")||this.gridOptionsService.is("groupRemoveLowestSingleChildren");if(t){return true}return this.gridOptionsService.is("paginateChildRows")};r.prototype.onModelUpdated=function(t){this.calculatePages();var i={type:hi.EVENT_PAGINATION_CHANGED,animate:t?t.animate:false,newData:t?t.newData:false,newPage:t?t.newPage:false,keepRenderedRows:t?t.keepRenderedRows:false};this.eventService.dispatchEvent(i)};r.prototype.onPaginationPageSizeChanged=function(){this.active=this.gridOptionsService.is("pagination");this.calculatePages();var t={type:hi.EVENT_PAGINATION_CHANGED,animate:false,newData:false,newPage:false,keepRenderedRows:true};this.eventService.dispatchEvent(t)};r.prototype.goToPage=function(t){if(!this.active||this.currentPage===t||typeof this.currentPage!=="number"){return}this.currentPage=t;var i={type:hi.EVENT_MODEL_UPDATED,animate:false,keepRenderedRows:false,newData:false,newPage:true};this.onModelUpdated(i)};r.prototype.getPixelOffset=function(){return this.pixelOffset};r.prototype.getRow=function(t){return this.rowModel.getRow(t)};r.prototype.getRowNode=function(t){return this.rowModel.getRowNode(t)};r.prototype.getRowIndexAtPixel=function(t){return this.rowModel.getRowIndexAtPixel(t)};r.prototype.getCurrentPageHeight=function(){if(n(this.topRowBounds)||n(this.bottomRowBounds)){return 0}return Math.max(this.bottomRowBounds.rowTop+this.bottomRowBounds.rowHeight-this.topRowBounds.rowTop,0)};r.prototype.getCurrentPagePixelRange=function(){var t=this.topRowBounds?this.topRowBounds.rowTop:0;var i=this.bottomRowBounds?this.bottomRowBounds.rowTop+this.bottomRowBounds.rowHeight:0;return{pageFirstPixel:t,pageLastPixel:i}};r.prototype.isRowPresent=function(t){if(!this.rowModel.isRowPresent(t)){return false}var i=t.rowIndex>=this.topDisplayedRowIndex&&t.rowIndex<=this.bottomDisplayedRowIndex;return i};r.prototype.isEmpty=function(){return this.rowModel.isEmpty()};r.prototype.isRowsToRender=function(){return this.rowModel.isRowsToRender()};r.prototype.forEachNode=function(t){return this.rowModel.forEachNode(t)};r.prototype.forEachNodeOnPage=function(t){var i=this.getPageFirstRow();var n=this.getPageLastRow();for(var r=i;r<=n;r++){var e=this.getRow(r);if(e){t(e)}}};r.prototype.getType=function(){return this.rowModel.getType()};r.prototype.getRowBounds=function(t){var i=this.rowModel.getRowBounds(t);i.rowIndex=t;return i};r.prototype.getPageFirstRow=function(){return this.topRowBounds?this.topRowBounds.rowIndex:-1};r.prototype.getPageLastRow=function(){return this.bottomRowBounds?this.bottomRowBounds.rowIndex:-1};r.prototype.getRowCount=function(){return this.rowModel.getRowCount()};r.prototype.getPageForIndex=function(t){return Math.floor(t/this.pageSize)};r.prototype.goToPageWithIndex=function(t){if(!this.active){return}var i=this.getPageForIndex(t);this.goToPage(i)};r.prototype.isRowInPage=function(t){if(!this.active){return true}var i=this.getPageForIndex(t.rowIndex);return i===this.currentPage};r.prototype.isLastPageFound=function(){return this.rowModel.isLastRowIndexKnown()};r.prototype.getCurrentPage=function(){return this.currentPage};r.prototype.goToNextPage=function(){this.goToPage(this.currentPage+1)};r.prototype.goToPreviousPage=function(){this.goToPage(this.currentPage-1)};r.prototype.goToFirstPage=function(){this.goToPage(0)};r.prototype.goToLastPage=function(){var t=this.rowModel.getRowCount();var i=Math.floor(t/this.pageSize);this.goToPage(i)};r.prototype.getPageSize=function(){return this.pageSize};r.prototype.getTotalPages=function(){return this.totalPages};r.prototype.setPageSize=function(){this.pageSize=this.gridOptionsService.getNum("paginationPageSize");if(this.pageSize==null||this.pageSize<1){this.pageSize=100}};r.prototype.calculatePages=function(){if(this.active){this.setPageSize();if(this.paginateChildRows){this.calculatePagesAllRows()}else{this.calculatePagesMasterRowsOnly()}}else{this.calculatedPagesNotActive()}this.topRowBounds=this.rowModel.getRowBounds(this.topDisplayedRowIndex);if(this.topRowBounds){this.topRowBounds.rowIndex=this.topDisplayedRowIndex}this.bottomRowBounds=this.rowModel.getRowBounds(this.bottomDisplayedRowIndex);if(this.bottomRowBounds){this.bottomRowBounds.rowIndex=this.bottomDisplayedRowIndex}this.setPixelOffset(i(this.topRowBounds)?this.topRowBounds.rowTop:0)};r.prototype.setPixelOffset=function(t){if(this.pixelOffset===t){return}this.pixelOffset=t;this.eventService.dispatchEvent({type:hi.EVENT_PAGINATION_PIXEL_OFFSET_CHANGED})};r.prototype.setZeroRows=function(){this.masterRowCount=0;this.topDisplayedRowIndex=0;this.bottomDisplayedRowIndex=-1;this.currentPage=0;this.totalPages=0};r.prototype.adjustCurrentPageIfInvalid=function(){if(this.currentPage>=this.totalPages){this.currentPage=this.totalPages-1}if(!isFinite(this.currentPage)||isNaN(this.currentPage)||this.currentPage<0){this.currentPage=0}};r.prototype.calculatePagesMasterRowsOnly=function(){this.masterRowCount=this.rowModel.getTopLevelRowCount();if(this.masterRowCount<=0){this.setZeroRows();return}var t=this.masterRowCount-1;this.totalPages=Math.floor(t/this.pageSize)+1;this.adjustCurrentPageIfInvalid();var i=this.pageSize*this.currentPage;var n=this.pageSize*(this.currentPage+1)-1;if(n>t){n=t}this.topDisplayedRowIndex=this.rowModel.getTopLevelRowDisplayedIndex(i);if(n===t){this.bottomDisplayedRowIndex=this.rowModel.getRowCount()-1}else{var r=this.rowModel.getTopLevelRowDisplayedIndex(n+1);this.bottomDisplayedRowIndex=r-1}};r.prototype.getMasterRowCount=function(){return this.masterRowCount};r.prototype.calculatePagesAllRows=function(){this.masterRowCount=this.rowModel.getRowCount();if(this.masterRowCount===0){this.setZeroRows();return}var t=this.masterRowCount-1;this.totalPages=Math.floor(t/this.pageSize)+1;this.adjustCurrentPageIfInvalid();this.topDisplayedRowIndex=this.pageSize*this.currentPage;this.bottomDisplayedRowIndex=this.pageSize*(this.currentPage+1)-1;if(this.bottomDisplayedRowIndex>t){this.bottomDisplayedRowIndex=t}};r.prototype.calculatedPagesNotActive=function(){this.pageSize=this.rowModel.getRowCount();this.totalPages=1;this.currentPage=0;this.topDisplayedRowIndex=0;this.bottomDisplayedRowIndex=this.rowModel.getRowCount()-1};cd([ut("rowModel")],r.prototype,"rowModel",void 0);cd([et],r.prototype,"postConstruct",null);r=cd([ot("paginationProxy")],r);return r}(ri);var vd=function(){var t=function(i,n){t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var n in i)if(Object.prototype.hasOwnProperty.call(i,n))t[n]=i[n]};return t(i,n)};return function(i,n){if(typeof n!=="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(i,n);function r(){this.constructor=i}i.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}();var dd=function(t,i,n,r){var e=arguments.length,s=e<3?i:r===null?r=Object.getOwnPropertyDescriptor(i,n):r,o;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")s=Reflect.decorate(t,i,n,r);else for(var u=t.length-1;u>=0;u--)if(o=t[u])s=(e<3?o(s):e>3?o(i,n,s):o(i,n))||s;return e>3&&s&&Object.defineProperty(i,n,s),s};var pd=function(t){vd(i,t);function i(){return t!==null&&t.apply(this,arguments)||this}i.prototype.processAllCellClasses=function(t,i,n,r){this.processClassRules(t.cellClassRules,i,n,r);this.processStaticCellClasses(t,i,n)};i.prototype.processClassRules=function(t,i,n,r){if(t==null){return}var e=Object.keys(t);var s={};var o={};var u=function(n){var r=e[n];var u=t[r];var f;if(typeof u==="string"){f=a.expressionService.evaluate(u,i)}else if(typeof u==="function"){f=u(i)}r.split(" ").forEach((function(t){if(t==null||t.trim()==""){return}f?s[t]=true:o[t]=true}))};var a=this;for(var f=0;f<e.length;f++){u(f)}if(r){Object.keys(o).forEach(r)}Object.keys(s).forEach(n)};i.prototype.getStaticCellClasses=function(t,i){var n=t.cellClass;if(!n){return[]}var r;if(typeof n==="function"){var e=n;r=e(i)}else{r=n}if(typeof r==="string"){r=[r]}return r||[]};i.prototype.processStaticCellClasses=function(t,i,n){var r=this.getStaticCellClasses(t,i);r.forEach((function(t){n(t)}))};dd([ut("expressionService")],i.prototype,"expressionService",void 0);i=dd([ot("stylingService")],i);return i}(ri);var gd=function(){var t=function(i,n){t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var n in i)if(Object.prototype.hasOwnProperty.call(i,n))t[n]=i[n]};return t(i,n)};return function(i,n){if(typeof n!=="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(i,n);function r(){this.constructor=i}i.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}();var bd=function(t){gd(i,t);function i(i){return t.call(this,i,"ag-toggle-button")||this}i.prototype.setValue=function(i,n){t.prototype.setValue.call(this,i,n);this.addOrRemoveCssClass("ag-selected",this.getValue());return this};return i}(io);var wd=function(){var t=function(i,n){t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var n in i)if(Object.prototype.hasOwnProperty.call(i,n))t[n]=i[n]};return t(i,n)};return function(i,n){if(typeof n!=="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(i,n);function r(){this.constructor=i}i.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}();var yd=function(t){wd(i,t);function i(i){return t.call(this,i,"ag-text-area",null,"textarea")||this}i.prototype.setValue=function(i,n){var r=t.prototype.setValue.call(this,i,n);this.eInput.value=i;return r};i.prototype.setCols=function(t){this.eInput.cols=t;return this};i.prototype.setRows=function(t){this.eInput.rows=t;return this};return i}(Xs);var md=function(){var t=function(i,n){t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var n in i)if(Object.prototype.hasOwnProperty.call(i,n))t[n]=i[n]};return t(i,n)};return function(i,n){if(typeof n!=="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(i,n);function r(){this.constructor=i}i.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}();var Sd=function(t){md(i,t);function i(i){return t.call(this,i,"ag-date-field","date")||this}i.prototype.postConstruct=function(){var i=this;t.prototype.postConstruct.call(this);this.addManagedListener(this.eInput,"wheel",this.onWheel.bind(this));var n=nr();this.addManagedListener(this.eInput,"mousedown",(function(){if(i.isDisabled()||n){return}i.eInput.focus()}));this.eInput.step="any"};i.prototype.onWheel=function(t){if(document.activeElement===this.eInput){t.preventDefault()}};i.prototype.setMin=function(t){var i;var n=t instanceof Date?(i=Ar(t!==null&&t!==void 0?t:null,false))!==null&&i!==void 0?i:undefined:t;if(this.min===n){return this}this.min=n;Oe(this.eInput,"min",n);return this};i.prototype.setMax=function(t){var i;var n=t instanceof Date?(i=Ar(t!==null&&t!==void 0?t:null,false))!==null&&i!==void 0?i:undefined:t;if(this.max===n){return this}this.max=n;Oe(this.eInput,"max",n);return this};i.prototype.setStep=function(t){if(this.step===t){return this}this.step=t;Oe(this.eInput,"step",t);return this};i.prototype.getDate=function(){var t;if(!this.eInput.validity.valid){return undefined}return(t=Tr(this.getValue()))!==null&&t!==void 0?t:undefined};i.prototype.setDate=function(t,i){this.setValue(Ar(t!==null&&t!==void 0?t:null,false),i)};return i}(Fo);var Cd=function(){var t=function(i,n){t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var n in i)if(Object.prototype.hasOwnProperty.call(i,n))t[n]=i[n]};return t(i,n)};return function(i,n){if(typeof n!=="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(i,n);function r(){this.constructor=i}i.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}();var Od=function(t){Cd(i,t);function i(i){return t.call(this,i,"ag-range-field","range")||this}i.prototype.postConstruct=function(){t.prototype.postConstruct.call(this);var i=this.config,n=i.min,r=i.max,e=i.step;if(n!=null){this.setMinValue(n)}if(r!=null){this.setMaxValue(r)}this.setStep(e||1)};i.prototype.addInputListeners=function(){var t=this;this.addManagedListener(this.eInput,"input",(function(i){var n=i.target.value;t.setValue(n)}))};i.prototype.setMinValue=function(t){this.min=t;this.eInput.setAttribute("min",t.toString());return this};i.prototype.setMaxValue=function(t){this.max=t;this.eInput.setAttribute("max",t.toString());return this};i.prototype.setStep=function(t){this.eInput.setAttribute("step",t.toString());return this};i.prototype.setValue=function(i,n){if(this.min!=null){i=Math.max(parseFloat(i),this.min).toString()}if(this.max!=null){i=Math.min(parseFloat(i),this.max).toString()}var r=t.prototype.setValue.call(this,i,n);this.eInput.value=i;return r};return i}(Xs);var jd=function(){var t=function(i,n){t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var n in i)if(Object.prototype.hasOwnProperty.call(i,n))t[n]=i[n]};return t(i,n)};return function(i,n){if(typeof n!=="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(i,n);function r(){this.constructor=i}i.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}();var Rd=function(t,i,n,r){var e=arguments.length,s=e<3?i:r===null?r=Object.getOwnPropertyDescriptor(i,n):r,o;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")s=Reflect.decorate(t,i,n,r);else for(var u=t.length-1;u>=0;u--)if(o=t[u])s=(e<3?o(s):e>3?o(i,n,s):o(i,n))||s;return e>3&&s&&Object.defineProperty(i,n,s),s};var xd=function(t){jd(n,t);function n(i,n){var r=t.call(this,'<div class="ag-rich-select-row" role="presentation"></div>')||this;r.params=i;r.wrapperEl=n;return r}n.prototype.postConstruct=function(){this.addManagedListener(this.getGui(),"mouseup",this.onMouseUp.bind(this))};n.prototype.setState=function(t){var i="";if(this.params.valueFormatter){i=this.params.valueFormatter(t)}var n=this.populateWithRenderer(t,i);if(!n){this.populateWithoutRenderer(t,i)}this.value=t};n.prototype.highlightString=function(t){var n=this.parsedValue;if(this.params.cellRenderer||!i(n)){return}if(i(t)){var r=n===null||n===void 0?void 0:n.toLocaleLowerCase().indexOf(t.toLocaleLowerCase());if(r>=0){var e=r+t.length;var s=mi(n.slice(0,r),true);var o=mi(n.slice(r,e),true);var u=mi(n.slice(e));this.renderValueWithoutRenderer(s+'<span class="ag-rich-select-row-text-highlight">'+o+"</span>"+u)}}else{this.renderValueWithoutRenderer(n)}};n.prototype.updateHighlighted=function(t){var i;var n=this.getGui();var r="ag-rich-select-row-"+this.getCompId();(i=n.parentElement)===null||i===void 0?void 0:i.setAttribute("id",r);if(t){var e=this.getParentComponent().getAriaElement();kn(e,r);this.wrapperEl.setAttribute("data-active-option",r)}zn(n.parentElement,t);this.addOrRemoveCssClass("ag-rich-select-row-selected",t)};n.prototype.populateWithoutRenderer=function(t,n){var r=this.gridOptionsService.getDocument();var e=this.getGui();var s=r.createElement("span");s.style.overflow="hidden";s.style.textOverflow="ellipsis";var o=mi(i(n)?n:t,true);this.parsedValue=i(o)?o:null;e.appendChild(s);this.renderValueWithoutRenderer(o)};n.prototype.renderValueWithoutRenderer=function(t){var n=this.getGui().querySelector("span");if(!n){return}n.innerHTML=i(t)?t:"&nbsp;"};n.prototype.populateWithRenderer=function(t,i){var n=this;var r;var e;if(this.params.cellRenderer){e=this.userComponentFactory.getCellRendererDetails(this.params,{value:t,valueFormatted:i,api:this.gridOptionsService.api})}if(e){r=e.newAgStackInstance()}if(r){Re(r,this.getGui())}if(r){r.then((function(t){n.addDestroyFunc((function(){n.getContext().destroyBean(t)}))}));return true}return false};n.prototype.onMouseUp=function(){var t=this.getParentComponent();var i={type:hi.EVENT_FIELD_PICKER_VALUE_SELECTED,fromEnterKey:false,value:this.value};t===null||t===void 0?void 0:t.dispatchEvent(i)};Rd([ut("userComponentFactory")],n.prototype,"userComponentFactory",void 0);Rd([et],n.prototype,"postConstruct",null);return n}(vs);var _d=function(){var t=function(i,n){t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var n in i)if(Object.prototype.hasOwnProperty.call(i,n))t[n]=i[n]};return t(i,n)};return function(i,n){if(typeof n!=="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(i,n);function r(){this.constructor=i}i.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}();var Ad=function(t,i){var n=typeof Symbol==="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),e,s=[],o;try{while((i===void 0||i-- >0)&&!(e=r.next()).done)s.push(e.value)}catch(t){o={error:t}}finally{try{if(e&&!e.done&&(n=r["return"]))n.call(r)}finally{if(o)throw o.error}}return s};var Fd=function(t,i){for(var n=0,r=i.length,e=t.length;n<r;n++,e++)t[e]=i[n];return t};var kd=function(t){_d(i,t);function i(){return t!==null&&t.apply(this,arguments)||this}i.prototype.initialiseTabGuard=function(t){this.eTopGuard=this.createTabGuard("top");this.eBottomGuard=this.createTabGuard("bottom");this.eFocusableElement=this.getFocusableElement();var i=[this.eTopGuard,this.eBottomGuard];var n={setTabIndex:function(t){i.forEach((function(i){return t!=null?i.setAttribute("tabindex",t):i.removeAttribute("tabindex")}))}};this.addTabGuards(this.eTopGuard,this.eBottomGuard);this.tabGuardCtrl=this.createManagedBean(new Tl({comp:n,eTopGuard:this.eTopGuard,eBottomGuard:this.eBottomGuard,eFocusableElement:this.eFocusableElement,onFocusIn:t.onFocusIn,onFocusOut:t.onFocusOut,focusInnerElement:t.focusInnerElement,handleKeyDown:t.handleKeyDown,onTabKeyDown:t.onTabKeyDown,shouldStopEventPropagation:t.shouldStopEventPropagation}))};i.prototype.createTabGuard=function(t){var i=document.createElement("div");var n=t==="top"?kl.TAB_GUARD_TOP:kl.TAB_GUARD_BOTTOM;i.classList.add(kl.TAB_GUARD,n);bn(i,"presentation");return i};i.prototype.addTabGuards=function(t,i){this.eFocusableElement.insertAdjacentElement("afterbegin",t);this.eFocusableElement.insertAdjacentElement("beforeend",i)};i.prototype.removeAllChildrenExceptTabGuards=function(){var t=[this.eTopGuard,this.eBottomGuard];Xr(this.getFocusableElement());this.addTabGuards.apply(this,Fd([],Ad(t)))};i.prototype.forceFocusOutOfContainer=function(t){if(t===void 0){t=false}this.tabGuardCtrl.forceFocusOutOfContainer(t)};i.prototype.appendChild=function(i,n){if(!me(i)){i=i.getGui()}var r=this.eBottomGuard;if(r){r.insertAdjacentElement("beforebegin",i)}else{t.prototype.appendChild.call(this,i,n)}};return i}(vs);var Td=function(){var t=function(i,n){t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var n in i)if(Object.prototype.hasOwnProperty.call(i,n))t[n]=i[n]};return t(i,n)};return function(i,n){if(typeof n!=="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(i,n);function r(){this.constructor=i}i.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}();var Md=function(t,i,n,r){var e=arguments.length,s=e<3?i:r===null?r=Object.getOwnPropertyDescriptor(i,n):r,o;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")s=Reflect.decorate(t,i,n,r);else for(var u=t.length-1;u>=0;u--)if(o=t[u])s=(e<3?o(s):e>3?o(i,n,s):o(i,n))||s;return e>3&&s&&Object.defineProperty(i,n,s),s};var Dd=function(t){Td(i,t);function i(n){var r=t.call(this,i.getTemplate((n===null||n===void 0?void 0:n.cssIdentifier)||"default"))||this;r.renderedRows=new Map;r.rowHeight=20;var e=n||{},s=e.cssIdentifier,o=s===void 0?"default":s,u=e.ariaRole,a=u===void 0?"listbox":u,f=e.listName;r.cssIdentifier=o;r.ariaRole=a;r.listName=f;return r}i.prototype.postConstruct=function(){var t=this;this.addScrollListener();this.rowHeight=this.getItemHeight();this.addResizeObserver();this.initialiseTabGuard({onFocusIn:function(i){return t.onFocusIn(i)},onFocusOut:function(i){return t.onFocusOut(i)},focusInnerElement:function(i){return t.focusInnerElement(i)},onTabKeyDown:function(i){return t.onTabKeyDown(i)},handleKeyDown:function(i){return t.handleKeyDown(i)}});this.setAriaProperties();this.addManagedListener(this.eventService,hi.EVENT_GRID_STYLES_CHANGED,this.onGridStylesChanged.bind(this))};i.prototype.onGridStylesChanged=function(){this.rowHeight=this.getItemHeight();this.refresh()};i.prototype.setAriaProperties=function(){var t=this.localeService.getLocaleTextFunc();var i=t("ariaDefaultListName",this.listName||"List");var n=this.eContainer;bn(n,this.ariaRole);Cn(n,i)};i.prototype.addResizeObserver=function(){var t=this;var i=function(){return t.animationFrameService.requestAnimationFrame((function(){return t.drawVirtualRows()}))};var n=this.resizeObserverService.observeResize(this.getGui(),i);this.addDestroyFunc(n)};i.prototype.focusInnerElement=function(t){this.focusRow(t?this.model.getRowCount()-1:0)};i.prototype.onFocusIn=function(t){var i=t.target;if(i.classList.contains("ag-virtual-list-item")){this.lastFocusedRowIndex=mn(i)-1}return false};i.prototype.onFocusOut=function(t){if(!this.getFocusableElement().contains(t.relatedTarget)){this.lastFocusedRowIndex=null}return false};i.prototype.handleKeyDown=function(t){switch(t.key){case Te.UP:case Te.DOWN:if(this.navigate(t.key===Te.UP)){t.preventDefault()}break}};i.prototype.onTabKeyDown=function(t){if(this.navigate(t.shiftKey)){t.preventDefault()}else{qt(t);this.forceFocusOutOfContainer(t.shiftKey)}};i.prototype.navigate=function(t){if(this.lastFocusedRowIndex==null){return false}var i=this.lastFocusedRowIndex+(t?-1:1);if(i<0||i>=this.model.getRowCount()){return false}this.focusRow(i);return true};i.prototype.getLastFocusedRow=function(){return this.lastFocusedRowIndex};i.prototype.focusRow=function(t){var i=this;this.ensureIndexVisible(t);window.setTimeout((function(){if(!i.isAlive()){return}var n=i.renderedRows.get(t);if(n){n.eDiv.focus()}}),10)};i.prototype.getComponentAt=function(t){var i=this.renderedRows.get(t);return i&&i.rowComponent};i.prototype.forEachRenderedRow=function(t){this.renderedRows.forEach((function(i,n){return t(i.rowComponent,n)}))};i.getTemplate=function(t){return'<div class="ag-virtual-list-viewport ag-'+t+'-virtual-list-viewport" role="presentation">\n <div class="ag-virtual-list-container ag-'+t+'-virtual-list-container" ref="eContainer"></div>\n </div>'};i.prototype.getItemHeight=function(){return this.environment.getListItemHeight()};i.prototype.ensureIndexVisible=function(t,i){if(i===void 0){i=true}var n=this.model.getRowCount();if(typeof t!=="number"||t<0||t>=n){console.warn("AG Grid: invalid row index for ensureIndexVisible: "+t);return false}var r=t*this.rowHeight;var e=r+this.rowHeight;var s=this.getGui();var o=s.scrollTop;var u=s.offsetHeight;var a=o+u;var f=i?0:this.rowHeight;var h=o>r+f;var c=a<e-f;if(h){s.scrollTop=r;return true}if(c){var l=e-u;s.scrollTop=l;return true}return false};i.prototype.setComponentCreator=function(t){this.componentCreator=t};i.prototype.setComponentUpdater=function(t){this.componentUpdater=t};i.prototype.getRowHeight=function(){return this.rowHeight};i.prototype.getScrollTop=function(){return this.getGui().scrollTop};i.prototype.setRowHeight=function(t){this.rowHeight=t;this.refresh()};i.prototype.refresh=function(t){var i=this;if(this.model==null||!this.isAlive()){return}var n=this.model.getRowCount();this.eContainer.style.height=n*this.rowHeight+"px";U((function(){return i.eContainer.clientHeight>=n*i.rowHeight}),(function(){if(!i.isAlive()){return}if(i.canSoftRefresh(t)){i.drawVirtualRows(true)}else{i.clearVirtualRows();i.drawVirtualRows()}}))};i.prototype.canSoftRefresh=function(t){return!!(t&&this.renderedRows.size&&typeof this.model.areRowsEqual==="function"&&this.componentUpdater)};i.prototype.clearVirtualRows=function(){var t=this;this.renderedRows.forEach((function(i,n){return t.removeRow(n)}))};i.prototype.drawVirtualRows=function(t){if(!this.isAlive()||!this.model){return}var i=this.getGui();var n=i.scrollTop;var r=n+i.offsetHeight;var e=Math.floor(n/this.rowHeight);var s=Math.floor(r/this.rowHeight);this.ensureRowsRendered(e,s,t)};i.prototype.ensureRowsRendered=function(t,i,n){var r=this;this.renderedRows.forEach((function(n,e){if((e<t||e>i)&&e!==r.lastFocusedRowIndex){r.removeRow(e)}}));if(n){this.refreshRows()}for(var e=t;e<=i;e++){if(this.renderedRows.has(e)){continue}if(e<this.model.getRowCount()){this.insertRow(e)}}};i.prototype.insertRow=function(t){var i=this;var n=this.model.getRow(t);var r=document.createElement("div");r.classList.add("ag-virtual-list-item","ag-"+this.cssIdentifier+"-virtual-list-item");bn(r,this.ariaRole==="tree"?"treeitem":"option");Dn(r,this.model.getRowCount());Gn(r,t+1);r.setAttribute("tabindex","-1");if(typeof this.model.isRowSelected==="function"){var e=this.model.isRowSelected(t);zn(r,!!e);Wn(r,e)}r.style.height=this.rowHeight+"px";r.style.top=this.rowHeight*t+"px";var s=this.componentCreator(n,r);s.addGuiEventListener("focusin",(function(){return i.lastFocusedRowIndex=t}));r.appendChild(s.getGui());if(this.renderedRows.has(t-1)){this.renderedRows.get(t-1).eDiv.insertAdjacentElement("afterend",r)}else if(this.renderedRows.has(t+1)){this.renderedRows.get(t+1).eDiv.insertAdjacentElement("beforebegin",r)}else{this.eContainer.appendChild(r)}this.renderedRows.set(t,{rowComponent:s,eDiv:r,value:n})};i.prototype.removeRow=function(t){var i=this.renderedRows.get(t);this.eContainer.removeChild(i.eDiv);this.destroyBean(i.rowComponent);this.renderedRows.delete(t)};i.prototype.refreshRows=function(){var t=this;var i=this.model.getRowCount();this.renderedRows.forEach((function(n,r){var e,s;if(r>=i){t.removeRow(r)}else{var o=t.model.getRow(r);if((s=(e=t.model).areRowsEqual)===null||s===void 0?void 0:s.call(e,n.value,o)){t.componentUpdater(o,n.rowComponent)}else{t.removeRow(r)}}}))};i.prototype.addScrollListener=function(){var t=this;this.addGuiEventListener("scroll",(function(){return t.drawVirtualRows()}),{passive:true})};i.prototype.setModel=function(t){this.model=t};i.prototype.getAriaElement=function(){return this.eContainer};i.prototype.destroy=function(){if(!this.isAlive()){return}this.clearVirtualRows();t.prototype.destroy.call(this)};Md([ut("resizeObserverService")],i.prototype,"resizeObserverService",void 0);Md([ut("animationFrameService")],i.prototype,"animationFrameService",void 0);Md([ds("eContainer")],i.prototype,"eContainer",void 0);Md([et],i.prototype,"postConstruct",null);return i}(kd);var Gd=function(){var t=function(i,n){t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var n in i)if(Object.prototype.hasOwnProperty.call(i,n))t[n]=i[n]};return t(i,n)};return function(i,n){if(typeof n!=="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(i,n);function r(){this.constructor=i}i.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}();var Pd=function(){Pd=Object.assign||function(t){for(var i,n=1,r=arguments.length;n<r;n++){i=arguments[n];for(var e in i)if(Object.prototype.hasOwnProperty.call(i,e))t[e]=i[e]}return t};return Pd.apply(this,arguments)};var Ed=function(t,i,n,r){var e=arguments.length,s=e<3?i:r===null?r=Object.getOwnPropertyDescriptor(i,n):r,o;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")s=Reflect.decorate(t,i,n,r);else for(var u=t.length-1;u>=0;u--)if(o=t[u])s=(e<3?o(s):e>3?o(i,n,s):o(i,n))||s;return e>3&&s&&Object.defineProperty(i,n,s),s};var Id='\n <div class="ag-picker-field" role="presentation">\n <div ref="eLabel"></div>\n <div ref="eWrapper" class="ag-wrapper ag-picker-field-wrapper ag-rich-select-value ag-picker-collapsed">\n <div ref="eDisplayField" class="ag-picker-field-display"></div>\n <ag-input-text-field ref="eInput" class="ag-rich-select-field-input"></ag-input-text-field>\n <div ref="eIcon" class="ag-picker-field-icon" aria-hidden="true"></div>\n </div>\n </div>';var Nd=function(t){Gd(n,t);function n(i){var n,r;var e=t.call(this,Pd(Pd({pickerAriaLabelKey:"ariaLabelRichSelectField",pickerAriaLabelValue:"Rich Select Field",pickerType:"ag-list",className:"ag-rich-select",pickerIcon:"smallDown",ariaRole:"combobox",template:(n=i===null||i===void 0?void 0:i.template)!==null&&n!==void 0?n:Id,modalPicker:false},i),{maxPickerHeight:(r=i===null||i===void 0?void 0:i.maxPickerHeight)!==null&&r!==void 0?r:"calc(var(--ag-row-height) * 6.5)"}))||this;e.searchString="";e.highlightedItem=-1;e.lastRowHovered=-1;e.searchStringCreator=null;var s=i||{},o=s.cellRowHeight,u=s.value,a=s.valueList,f=s.searchStringCreator;if(o!=null){e.cellRowHeight=o}if(u!==undefined){e.value=u}if(a!=null){e.values=a}if(f){e.searchStringCreator=f}return e}n.prototype.postConstruct=function(){var i=this;var n;t.prototype.postConstruct.call(this);this.createLoadingElement();this.createListComponent();var r=this.config,e=r.allowTyping,s=r.placeholder;if(e){this.eInput.setAutoComplete(false).setInputPlaceholder(s);this.eDisplayField.classList.add("ag-hidden")}else{this.eInput.setDisplayed(false)}this.eWrapper.tabIndex=(n=this.gridOptionsService.getNum("tabIndex"))!==null&&n!==void 0?n:0;var o=this.config.searchDebounceDelay,u=o===void 0?300:o;this.clearSearchString=z(this.clearSearchString,u);this.renderSelectedValue();if(e){this.eInput.onValueChange((function(t){return i.searchTextFromString(t)}));this.addManagedListener(this.eWrapper,"focus",this.onWrapperFocus.bind(this))}this.addManagedListener(this.eWrapper,"focusout",this.onWrapperFocusOut.bind(this))};n.prototype.createLoadingElement=function(){var t=this.gridOptionsService.getDocument();var i=this.localeService.getLocaleTextFunc();var n=t.createElement("div");n.classList.add("ag-loading-text");n.innerText=i("loadingOoo","Loading...");this.eLoading=n};n.prototype.createListComponent=function(){var t=this;this.listComponent=this.createBean(new Dd({cssIdentifier:"rich-select"}));this.listComponent.setComponentCreator(this.createRowComponent.bind(this));this.listComponent.setParentComponent(this);this.addManagedListener(this.listComponent,hi.EVENT_FIELD_PICKER_VALUE_SELECTED,(function(i){t.onListValueSelected(i.value,i.fromEnterKey)}));var i=this.cellRowHeight;if(i){this.listComponent.setRowHeight(i)}var n=this.listComponent.getGui();var r=this.listComponent.getAriaElement();this.addManagedListener(n,"mousemove",this.onPickerMouseMove.bind(this));this.addManagedListener(n,"mousedown",(function(t){return t.preventDefault()}));n.classList.add("ag-rich-select-list");var e="ag-rich-select-list-"+this.listComponent.getCompId();r.setAttribute("id",e);var s=this.localeService.getLocaleTextFunc();var o=s(this.config.pickerAriaLabelKey,this.config.pickerAriaLabelValue);Cn(r,o);Un(this.eWrapper,r)};n.prototype.renderSelectedValue=function(){var t=this;var n=this,r=n.value,e=n.eDisplayField,s=n.config;var o=this.config.valueFormatter?this.config.valueFormatter(r):r;if(s.allowTyping){this.eInput.setValue(o);return}var u;if(s.cellRenderer){u=this.userComponentFactory.getCellRendererDetails(this.config,{value:r,valueFormatted:o,api:this.gridOptionsService.api})}var a;if(u){a=u.newAgStackInstance()}if(a){Xr(e);Re(a,e);a.then((function(i){t.addDestroyFunc((function(){return t.getContext().destroyBean(i)}))}))}else{if(i(this.value)){e.innerText=o;e.classList.remove("ag-display-as-placeholder")}else{var f=s.placeholder;if(i(f)){e.innerHTML=""+mi(f);e.classList.add("ag-display-as-placeholder")}else{Xr(e)}}}};n.prototype.getCurrentValueIndex=function(){var t=this,i=t.currentList,n=t.value;if(n==null){return-1}for(var r=0;r<i.length;r++){if(i[r]===n){return r}}return-1};n.prototype.highlightFilterMatch=function(){var t=this;var i;(i=this.listComponent)===null||i===void 0?void 0:i.forEachRenderedRow((function(i,n){i.highlightString(t.searchString)}))};n.prototype.highlightSelectedValue=function(t){var i=this;var n;if(t==null){t=this.getCurrentValueIndex()}this.highlightedItem=t;(n=this.listComponent)===null||n===void 0?void 0:n.forEachRenderedRow((function(n,r){var e=t===-1?false:i.highlightedItem===r;n.updateHighlighted(e)}))};n.prototype.setRowHeight=function(t){if(t!==this.cellRowHeight){this.cellRowHeight=t}if(this.listComponent){this.listComponent.setRowHeight(t)}};n.prototype.createPickerComponent=function(){var t=this.values;if(t){this.setValueList({valueList:t})}return this.listComponent};n.prototype.setSearchStringCreator=function(t){this.searchStringCreator=t};n.prototype.setValueList=function(t){var i=t.valueList,n=t.refresh;if(!this.listComponent){return}if(this.currentList===i){return}this.currentList=i;this.listComponent.setModel({getRowCount:function(){return i.length},getRow:function(t){return i[t]}});if(n){if(!this.values){this.values=i;if(this.isPickerDisplayed){this.showCurrentValueInPicker()}}else{this.listComponent.refresh()}}};n.prototype.showPicker=function(){t.prototype.showPicker.call(this);this.showCurrentValueInPicker()};n.prototype.showCurrentValueInPicker=function(){var t,i;if(!this.listComponent){return}if(!this.currentList){if(this.isPickerDisplayed&&this.eLoading){this.listComponent.appendChild(this.eLoading)}return}if((t=this.eLoading)===null||t===void 0?void 0:t.offsetParent){(i=this.eLoading.parentElement)===null||i===void 0?void 0:i.removeChild(this.eLoading)}var n=this.getCurrentValueIndex();if(n!==-1){this.listComponent.refresh();this.listComponent.ensureIndexVisible(n);this.listComponent.refresh(true);this.highlightSelectedValue(n)}else{this.listComponent.refresh()}};n.prototype.beforeHidePicker=function(){this.highlightedItem=-1;t.prototype.beforeHidePicker.call(this)};n.prototype.onWrapperFocus=function(t){if(this.eInput){this.eInput.getFocusableElement().focus()}};n.prototype.onWrapperFocusOut=function(t){if(!this.eWrapper.contains(t.relatedTarget)){this.hidePicker()}};n.prototype.buildSearchStringFromKeyboardEvent=function(t){var i=t.key;if(i===Te.BACKSPACE){this.searchString=this.searchString.slice(0,-1);i=""}else if(!Ne(t)){return}t.preventDefault();this.searchTextFromCharacter(i)};n.prototype.searchTextFromCharacter=function(t){this.searchString+=t;this.runSearch();this.clearSearchString()};n.prototype.searchTextFromString=function(t){if(t==null){t=""}this.searchString=t;this.runSearch()};n.prototype.buildSearchStrings=function(t){var i=this.config.valueFormatter,n=i===void 0?function(t){return t}:i;var r;if(typeof t[0]==="number"||typeof t[0]==="string"){r=t.map((function(t){return n(t)}))}else if(typeof t[0]==="object"&&this.searchStringCreator){r=this.searchStringCreator(t)}return r};n.prototype.getSuggestionsAndFilteredValues=function(t,i){var n=this;var r=[];var e=[];if(!t.length){return{suggestions:r,filteredValues:e}}var s=this.config,o=s.allowTyping,u=s.searchType,a=u===void 0?"fuzzy":u,f=s.filterList;var h=f&&o;if(a==="fuzzy"){var c=Ni(this.searchString,i,true);r=c.values;var l=c.indices;if(h&&l.length){for(var v=0;v<l.length;v++){e.push(this.values[l[v]])}}}else{r=i.filter((function(t,i){var r=t.toLocaleLowerCase();var s=n.searchString.toLocaleLowerCase();var o=a==="match"?r.startsWith(s):r.indexOf(s)!==-1;if(h&&o){e.push(n.values[i])}return o}))}return{suggestions:r,filteredValues:e}};n.prototype.filterListModel=function(t){var i=this.config,n=i.allowTyping,r=i.filterList;if(!n||!r){return}this.setValueList({valueList:t,refresh:true})};n.prototype.runSearch=function(){var t,i,n;var r=this.values;var e=this.buildSearchStrings(r);if(!e){this.highlightSelectedValue(-1);return}var s=this.getSuggestionsAndFilteredValues(this.searchString,e),o=s.suggestions,u=s.filteredValues;var a=this.config,f=a.allowTyping,h=a.filterList,c=a.highlightMatch,l=a.searchType,v=l===void 0?"fuzzy":l;var d=u.length;var p=!!(f&&h&&this.searchString!=="");if(p){this.filterListModel(p?u:r)}if(o.length){var g=p?0:e.indexOf(o[0]);this.selectListItem(g);if(c&&v!=="fuzzy"){this.highlightFilterMatch()}}else{this.highlightSelectedValue(-1);if(!p||d){(t=this.listComponent)===null||t===void 0?void 0:t.ensureIndexVisible(0)}else if(p){this.getAriaElement().removeAttribute("data-active-option");var b=(i=this.listComponent)===null||i===void 0?void 0:i.getAriaElement();if(b){kn(b,null)}}}var w=(n=this.listComponent)===null||n===void 0?void 0:n.getGui();w===null||w===void 0?void 0:w.classList.toggle("ag-hidden",p&&!d)};n.prototype.clearSearchString=function(){this.searchString=""};n.prototype.selectListItem=function(t,i,n){if(!this.isPickerDisplayed||!this.listComponent||t<0||t>=this.currentList.length){return}var r=this.listComponent.ensureIndexVisible(t,!i);if(r&&!n){this.listComponent.refresh(true)}this.highlightSelectedValue(t)};n.prototype.setValue=function(i,n,r){var e=this.currentList.indexOf(i);if(e===-1){return this}this.value=i;if(!r){this.selectListItem(e)}this.renderSelectedValue();return t.prototype.setValue.call(this,i,n)};n.prototype.createRowComponent=function(t){var i=new xd(this.config,this.eWrapper);i.setParentComponent(this.listComponent);this.getContext().createBean(i);i.setState(t);var n=this.config,r=n.highlightMatch,e=n.searchType,s=e===void 0?"fuzzy":e;if(r&&s!=="fuzzy"){i.highlightString(this.searchString)}return i};n.prototype.getRowForMouseEvent=function(t){var i=this.listComponent;if(!i){return-1}var n=i===null||i===void 0?void 0:i.getGui();var r=n.getBoundingClientRect();var e=i.getScrollTop();var s=t.clientY-r.top+e;return Math.floor(s/i.getRowHeight())};n.prototype.onPickerMouseMove=function(t){if(!this.listComponent){return}var i=this.getRowForMouseEvent(t);if(i!==-1&&i!=this.lastRowHovered){this.lastRowHovered=i;this.selectListItem(i,true,true)}};n.prototype.onNavigationKeyDown=function(t,i){t.preventDefault();var n=i===Te.DOWN;if(!this.isPickerDisplayed&&n){this.showPicker();return}var r=this.highlightedItem;var e=n?1:-1;var s=r===-1?0:r+e;this.selectListItem(s,false,true)};n.prototype.onEnterKeyDown=function(t){if(!this.isPickerDisplayed){return}t.preventDefault();this.onListValueSelected(this.currentList[this.highlightedItem],true)};n.prototype.onTabKeyDown=function(){if(!this.isPickerDisplayed){return}this.setValue(this.currentList[this.highlightedItem],false,true)};n.prototype.onListValueSelected=function(t,i){this.setValue(t,false,true);this.dispatchPickerEvent(t,i);this.hidePicker()};n.prototype.dispatchPickerEvent=function(t,i){var n={type:hi.EVENT_FIELD_PICKER_VALUE_SELECTED,fromEnterKey:i,value:t};this.dispatchEvent(n)};n.prototype.getFocusableElement=function(){var i=this.config.allowTyping;if(i){return this.eInput.getFocusableElement()}return t.prototype.getFocusableElement.call(this)};n.prototype.onKeyDown=function(t){var i=t.key;var n=this.config.allowTyping;switch(i){case Te.LEFT:case Te.RIGHT:case Te.PAGE_HOME:case Te.PAGE_END:if(!n){t.preventDefault()}break;case Te.PAGE_UP:case Te.PAGE_DOWN:t.preventDefault();break;case Te.DOWN:case Te.UP:this.onNavigationKeyDown(t,i);break;case Te.ESCAPE:if(this.isPickerDisplayed){t.preventDefault();qt(t);this.hidePicker()}break;case Te.ENTER:this.onEnterKeyDown(t);break;case Te.TAB:this.onTabKeyDown();break;default:if(!n){this.buildSearchStringFromKeyboardEvent(t)}}};n.prototype.destroy=function(){if(this.listComponent){this.destroyBean(this.listComponent);this.listComponent=undefined}this.eLoading=undefined;t.prototype.destroy.call(this)};Ed([ut("userComponentFactory")],n.prototype,"userComponentFactory",void 0);Ed([ds("eInput")],n.prototype,"eInput",void 0);return n}(Ws);var Hd=function(){var t=function(i,n){t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var n in i)if(Object.prototype.hasOwnProperty.call(i,n))t[n]=i[n]};return t(i,n)};return function(i,n){if(typeof n!=="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(i,n);function r(){this.constructor=i}i.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}();var Ld=function(t,i,n,r){var e=arguments.length,s=e<3?i:r===null?r=Object.getOwnPropertyDescriptor(i,n):r,o;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")s=Reflect.decorate(t,i,n,r);else for(var u=t.length-1;u>=0;u--)if(o=t[u])s=(e<3?o(s):e>3?o(i,n,s):o(i,n))||s;return e>3&&s&&Object.defineProperty(i,n,s),s};var Vd=function(t){Hd(i,t);function i(n){var r=t.call(this,n,i.TEMPLATE)||this;r.labelAlignment="top";return r}i.prototype.init=function(){this.eSlider.addCssClass("ag-slider-field")};i.prototype.onValueChange=function(t){var i=this;var n=hi.EVENT_FIELD_VALUE_CHANGED;this.addManagedListener(this.eText,n,(function(){var n=parseFloat(i.eText.getValue());i.eSlider.setValue(n.toString(),true);t(n||0)}));this.addManagedListener(this.eSlider,n,(function(){var n=i.eSlider.getValue();i.eText.setValue(n,true);t(parseFloat(n))}));return this};i.prototype.setSliderWidth=function(t){this.eSlider.setWidth(t);return this};i.prototype.setTextFieldWidth=function(t){this.eText.setWidth(t);return this};i.prototype.setMinValue=function(t){this.eSlider.setMinValue(t);this.eText.setMin(t);return this};i.prototype.setMaxValue=function(t){this.eSlider.setMaxValue(t);this.eText.setMax(t);return this};i.prototype.getValue=function(){return this.eText.getValue()};i.prototype.setValue=function(t){if(this.getValue()===t){return this}this.eText.setValue(t,true);this.eSlider.setValue(t,true);this.dispatchEvent({type:hi.EVENT_FIELD_VALUE_CHANGED});return this};i.prototype.setStep=function(t){this.eSlider.setStep(t);this.eText.setStep(t);return this};i.TEMPLATE='<div class="ag-slider">\n <label ref="eLabel"></label>\n <div class="ag-wrapper ag-slider-wrapper">\n <ag-input-range ref="eSlider"></ag-input-range>\n <ag-input-number-field ref="eText"></ag-input-number-field>\n </div>\n </div>';Ld([ds("eLabel")],i.prototype,"eLabel",void 0);Ld([ds("eSlider")],i.prototype,"eSlider",void 0);Ld([ds("eText")],i.prototype,"eText",void 0);Ld([et],i.prototype,"init",null);return i}(Ns);var Bd=function(){var t=function(i,n){t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var n in i)if(Object.prototype.hasOwnProperty.call(i,n))t[n]=i[n]};return t(i,n)};return function(i,n){if(typeof n!=="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(i,n);function r(){this.constructor=i}i.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}();var zd=function(t,i,n,r){var e=arguments.length,s=e<3?i:r===null?r=Object.getOwnPropertyDescriptor(i,n):r,o;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")s=Reflect.decorate(t,i,n,r);else for(var u=t.length-1;u>=0;u--)if(o=t[u])s=(e<3?o(s):e>3?o(i,n,s):o(i,n))||s;return e>3&&s&&Object.defineProperty(i,n,s),s};var Wd=function(t){Bd(i,t);function i(n){if(n===void 0){n={}}var r=t.call(this,i.getTemplate(n))||this;r.suppressEnabledCheckbox=true;r.suppressOpenCloseIcons=false;var e=n.title,s=n.enabled,o=n.items,u=n.suppressEnabledCheckbox,a=n.suppressOpenCloseIcons;r.title=e;r.cssIdentifier=n.cssIdentifier||"default";r.enabled=s!=null?s:true;r.items=o||[];r.alignItems=n.alignItems||"center";if(u!=null){r.suppressEnabledCheckbox=u}if(a!=null){r.suppressOpenCloseIcons=a}return r}i.getTemplate=function(t){var i=t.cssIdentifier||"default";var n=t.direction||"vertical";return'<div class="ag-group ag-'+i+'-group" role="presentation">\n <div class="ag-group-title-bar ag-'+i+'-group-title-bar ag-unselectable" ref="eTitleBar" role="button">\n <span class="ag-group-title-bar-icon ag-'+i+'-group-title-bar-icon" ref="eGroupOpenedIcon" role="presentation"></span>\n <span class="ag-group-title-bar-icon ag-'+i+'-group-title-bar-icon" ref="eGroupClosedIcon" role="presentation"></span>\n <span ref="eTitle" class="ag-group-title ag-'+i+'-group-title"></span>\n </div>\n <div ref="eToolbar" class="ag-group-toolbar ag-'+i+'-group-toolbar">\n <ag-checkbox ref="cbGroupEnabled"></ag-checkbox>\n </div>\n <div ref="eContainer" class="ag-group-container ag-group-container-'+n+" ag-"+i+'-group-container"></div>\n </div>'};i.prototype.postConstruct=function(){if(this.items.length){var t=this.items;this.items=[];this.addItems(t)}var i=this.localeService.getLocaleTextFunc();this.cbGroupEnabled.setLabel(i("enabled","Enabled"));if(this.title){this.setTitle(this.title)}if(this.enabled){this.setEnabled(this.enabled)}this.setAlignItems(this.alignItems);this.hideEnabledCheckbox(this.suppressEnabledCheckbox);this.hideOpenCloseIcons(this.suppressOpenCloseIcons);this.setupExpandContract();this.refreshAriaStatus();this.refreshChildDisplay()};i.prototype.setupExpandContract=function(){var t=this;this.eGroupClosedIcon.appendChild(Ae("columnSelectClosed",this.gridOptionsService,null));this.eGroupOpenedIcon.appendChild(Ae("columnSelectOpen",this.gridOptionsService,null));this.addManagedListener(this.eTitleBar,"click",(function(){return t.toggleGroupExpand()}));this.addManagedListener(this.eTitleBar,"keydown",(function(i){switch(i.key){case Te.ENTER:case Te.SPACE:i.preventDefault();t.toggleGroupExpand();break;case Te.RIGHT:case Te.LEFT:i.preventDefault();t.toggleGroupExpand(i.key===Te.RIGHT);break}}))};i.prototype.refreshAriaStatus=function(){if(!this.suppressOpenCloseIcons){Tn(this.eTitleBar,this.expanded)}};i.prototype.refreshChildDisplay=function(){var t=!this.suppressOpenCloseIcons;Lr(this.eToolbar,this.expanded&&!this.suppressEnabledCheckbox);Lr(this.eGroupOpenedIcon,t&&this.expanded);Lr(this.eGroupClosedIcon,t&&!this.expanded)};i.prototype.isExpanded=function(){return this.expanded};i.prototype.setAlignItems=function(t){if(this.alignItems!==t){this.removeCssClass("ag-group-item-alignment-"+this.alignItems)}this.alignItems=t;var i="ag-group-item-alignment-"+this.alignItems;this.addCssClass(i);return this};i.prototype.toggleGroupExpand=function(t){if(this.suppressOpenCloseIcons){this.expanded=true;this.refreshChildDisplay();Lr(this.eContainer,true);return this}t=t!=null?t:!this.expanded;if(this.expanded===t){return this}this.expanded=t;this.refreshAriaStatus();this.refreshChildDisplay();Lr(this.eContainer,t);this.dispatchEvent({type:this.expanded?i.EVENT_EXPANDED:i.EVENT_COLLAPSED});return this};i.prototype.addItems=function(t){var i=this;t.forEach((function(t){return i.addItem(t)}))};i.prototype.addItem=function(t){var i=this.eContainer;var n=t instanceof vs?t.getGui():t;n.classList.add("ag-group-item","ag-"+this.cssIdentifier+"-group-item");i.appendChild(n);this.items.push(n)};i.prototype.hideItem=function(t,i){var n=this.items[i];Lr(n,!t)};i.prototype.setTitle=function(t){this.eTitle.innerText=t;return this};i.prototype.addCssClassToTitleBar=function(t){this.eTitleBar.classList.add(t)};i.prototype.setEnabled=function(t,i){this.enabled=t;this.refreshDisabledStyles();this.toggleGroupExpand(t);if(!i){this.cbGroupEnabled.setValue(t)}return this};i.prototype.isEnabled=function(){return this.enabled};i.prototype.onEnableChange=function(t){var i=this;this.cbGroupEnabled.onValueChange((function(n){i.setEnabled(n,true);t(n)}));return this};i.prototype.hideEnabledCheckbox=function(t){this.suppressEnabledCheckbox=t;this.refreshChildDisplay();this.refreshDisabledStyles();return this};i.prototype.hideOpenCloseIcons=function(t){this.suppressOpenCloseIcons=t;if(t){this.toggleGroupExpand(true)}return this};i.prototype.refreshDisabledStyles=function(){this.addOrRemoveCssClass("ag-disabled",!this.enabled);if(this.suppressEnabledCheckbox&&!this.enabled){this.eTitleBar.classList.add("ag-disabled-group-title-bar");this.eTitleBar.removeAttribute("tabindex")}else{this.eTitleBar.classList.remove("ag-disabled-group-title-bar");this.eTitleBar.setAttribute("tabindex","0")}this.eContainer.classList.toggle("ag-disabled-group-container",!this.enabled)};i.EVENT_EXPANDED="expanded";i.EVENT_COLLAPSED="collapsed";zd([ds("eTitleBar")],i.prototype,"eTitleBar",void 0);zd([ds("eGroupOpenedIcon")],i.prototype,"eGroupOpenedIcon",void 0);zd([ds("eGroupClosedIcon")],i.prototype,"eGroupClosedIcon",void 0);zd([ds("eToolbar")],i.prototype,"eToolbar",void 0);zd([ds("cbGroupEnabled")],i.prototype,"cbGroupEnabled",void 0);zd([ds("eTitle")],i.prototype,"eTitle",void 0);zd([ds("eContainer")],i.prototype,"eContainer",void 0);zd([et],i.prototype,"postConstruct",null);return i}(vs);var Ud=function(){var t=function(i,n){t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var n in i)if(Object.prototype.hasOwnProperty.call(i,n))t[n]=i[n]};return t(i,n)};return function(i,n){if(typeof n!=="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(i,n);function r(){this.constructor=i}i.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}();var Kd=function(){Kd=Object.assign||function(t){for(var i,n=1,r=arguments.length;n<r;n++){i=arguments[n];for(var e in i)if(Object.prototype.hasOwnProperty.call(i,e))t[e]=i[e]}return t};return Kd.apply(this,arguments)};var qd=function(t,i,n,r){var e=arguments.length,s=e<3?i:r===null?r=Object.getOwnPropertyDescriptor(i,n):r,o;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")s=Reflect.decorate(t,i,n,r);else for(var u=t.length-1;u>=0;u--)if(o=t[u])s=(e<3?o(s):e>3?o(i,n,s):o(i,n))||s;return e>3&&s&&Object.defineProperty(i,n,s),s};var Yd=function(t){Ud(i,t);function i(i){if(i===void 0){i=1}var n=t.call(this,'<div class="ag-menu-list" role="tree"></div>')||this;n.level=i;n.menuItems=[];return n}i.prototype.postConstruct=function(){var t=this;this.initialiseTabGuard({onTabKeyDown:function(i){return t.onTabKeyDown(i)},handleKeyDown:function(i){return t.handleKeyDown(i)}})};i.prototype.onTabKeyDown=function(t){var i=this.getParentComponent();var n=i&&i.getGui();var r=n&&n.classList.contains("ag-focus-managed");if(!r){t.preventDefault()}if(t.shiftKey){this.closeIfIsChild(t)}};i.prototype.handleKeyDown=function(t){switch(t.key){case Te.UP:case Te.RIGHT:case Te.DOWN:case Te.LEFT:t.preventDefault();this.handleNavKey(t.key);break;case Te.ESCAPE:var i=this.findTopMenu();if(i){this.focusService.focusInto(i.getGui())}break}};i.prototype.clearActiveItem=function(){if(this.activeMenuItem){this.activeMenuItem.deactivate();this.activeMenuItem=null}};i.prototype.addMenuItems=function(t){var i=this;if(t==null){return}t.forEach((function(t){if(t==="separator"){i.addSeparator()}else if(typeof t==="string"){console.warn("AG Grid: unrecognised menu item "+t)}else{i.addItem(t)}}))};i.prototype.addItem=function(t){var i=this;var n=this.createManagedBean(new tp(Kd(Kd({},t),{isAnotherSubMenuOpen:function(){return i.menuItems.some((function(t){return t.isSubMenuOpen()}))}})));n.setParentComponent(this);_n(n.getGui(),this.level);this.menuItems.push(n);this.appendChild(n.getGui());this.addManagedListener(n,tp.EVENT_MENU_ITEM_SELECTED,(function(t){i.dispatchEvent(t)}));this.addManagedListener(n,tp.EVENT_MENU_ITEM_ACTIVATED,(function(t){if(i.activeMenuItem&&i.activeMenuItem!==t.menuItem){i.activeMenuItem.deactivate()}i.activeMenuItem=t.menuItem}))};i.prototype.activateFirstItem=function(){var t=this.menuItems.filter((function(t){return!t.isDisabled()}))[0];if(!t){return}t.activate()};i.prototype.addSeparator=function(){var t='\n <div class="ag-menu-separator" aria-hidden="true">\n <div class="ag-menu-separator-part"></div>\n <div class="ag-menu-separator-part"></div>\n <div class="ag-menu-separator-part"></div>\n <div class="ag-menu-separator-part"></div>\n </div>';this.appendChild(re(t))};i.prototype.findTopMenu=function(){var t=this.getParentComponent();if(!t&&this instanceof i){return this}while(true){var n=t&&t.getParentComponent&&t.getParentComponent();if(!n||!(n instanceof i||n instanceof tp)){break}t=n}return t instanceof i?t:undefined};i.prototype.handleNavKey=function(t){switch(t){case Te.UP:case Te.DOWN:var i=this.findNextItem(t===Te.UP);if(i&&i!==this.activeMenuItem){i.activate()}return}var n=this.gridOptionsService.is("enableRtl")?Te.RIGHT:Te.LEFT;if(t===n){this.closeIfIsChild()}else{this.openChild()}};i.prototype.closeIfIsChild=function(t){var i=this.getParentComponent();if(i&&i instanceof tp){if(t){t.preventDefault()}i.closeSubMenu();i.getGui().focus()}};i.prototype.openChild=function(){if(this.activeMenuItem){this.activeMenuItem.openSubMenu(true)}};i.prototype.findNextItem=function(t){var i=this.menuItems.filter((function(t){return!t.isDisabled()}));if(!i.length){return}if(!this.activeMenuItem){return t?xt(i):i[0]}if(t){i.reverse()}var n;var r=false;for(var e=0;e<i.length;e++){var s=i[e];if(!r){if(s===this.activeMenuItem){r=true}continue}n=s;break}return n||this.activeMenuItem};i.prototype.destroy=function(){this.clearActiveItem();t.prototype.destroy.call(this)};qd([ut("focusService")],i.prototype,"focusService",void 0);qd([et],i.prototype,"postConstruct",null);return i}(kd);var Qd=function(){var t=function(i,n){t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var n in i)if(Object.prototype.hasOwnProperty.call(i,n))t[n]=i[n]};return t(i,n)};return function(i,n){if(typeof n!=="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(i,n);function r(){this.constructor=i}i.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}();var Jd=function(t,i,n,r){var e=arguments.length,s=e<3?i:r===null?r=Object.getOwnPropertyDescriptor(i,n):r,o;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")s=Reflect.decorate(t,i,n,r);else for(var u=t.length-1;u>=0;u--)if(o=t[u])s=(e<3?o(s):e>3?o(i,n,s):o(i,n))||s;return e>3&&s&&Object.defineProperty(i,n,s),s};var Zd=function(t){Qd(i,t);function i(i){var n=t.call(this)||this;n.wrappedComponent=i;n.setTemplateFromElement(i.getGui());return n}i.prototype.postConstruct=function(){var t=this;this.initialiseTabGuard({onTabKeyDown:function(i){return t.onTabKeyDown(i)},handleKeyDown:function(i){return t.handleKeyDown(i)}})};i.prototype.handleKeyDown=function(t){if(t.key===Te.ESCAPE){this.closePanel()}};i.prototype.onTabKeyDown=function(t){if(t.defaultPrevented){return}this.closePanel();t.preventDefault()};i.prototype.closePanel=function(){var t=this.parentComponent;t.closeSubMenu();setTimeout((function(){return t.getGui().focus()}),0)};Jd([et],i.prototype,"postConstruct",null);return i}(kd);var $d=function(){var t=function(i,n){t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var n in i)if(Object.prototype.hasOwnProperty.call(i,n))t[n]=i[n]};return t(i,n)};return function(i,n){if(typeof n!=="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(i,n);function r(){this.constructor=i}i.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}();var Xd=function(t,i,n,r){var e=arguments.length,s=e<3?i:r===null?r=Object.getOwnPropertyDescriptor(i,n):r,o;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")s=Reflect.decorate(t,i,n,r);else for(var u=t.length-1;u>=0;u--)if(o=t[u])s=(e<3?o(s):e>3?o(i,n,s):o(i,n))||s;return e>3&&s&&Object.defineProperty(i,n,s),s};var tp=function(t){$d(i,t);function i(i){var n=t.call(this)||this;n.params=i;n.isActive=false;n.subMenuIsOpen=false;n.setTemplate('<div class="'+n.getClassName()+'" tabindex="-1" role="treeitem"></div>');return n}i.prototype.init=function(){var t=this;this.addIcon();this.addName();this.addShortcut();this.addSubMenu();this.addTooltip();var i=this.getGui();if(this.params.disabled){this.addCssClass(this.getClassName("disabled"));An(i,true)}else{this.addGuiEventListener("click",(function(i){return t.onItemSelected(i)}));this.addGuiEventListener("keydown",(function(i){if(i.key===Te.ENTER||i.key===Te.SPACE){i.preventDefault();t.onItemSelected(i)}}));this.addGuiEventListener("mousedown",(function(t){t.stopPropagation();t.preventDefault()}));this.addGuiEventListener("mouseenter",(function(){return t.onMouseEnter()}));this.addGuiEventListener("mouseleave",(function(){return t.onMouseLeave()}))}if(this.params.cssClasses){this.params.cssClasses.forEach((function(i){return t.addCssClass(i)}))}};i.prototype.isDisabled=function(){return!!this.params.disabled};i.prototype.openSubMenu=function(t){var n=this;if(t===void 0){t=false}this.closeSubMenu();if(!this.params.subMenu){return}var r=re('<div class="ag-menu" role="presentation"></div>');var e;if(this.params.subMenu instanceof Array){var s=yn(this.getGui());var o=isNaN(s)?1:s+1;var u=this.createBean(new Yd(o));u.setParentComponent(this);u.addMenuItems(this.params.subMenu);r.appendChild(u.getGui());this.addManagedListener(u,i.EVENT_MENU_ITEM_SELECTED,(function(t){return n.dispatchEvent(t)}));u.addGuiEventListener("mouseenter",(function(){return n.cancelDeactivate()}));e=function(){return n.destroyBean(u)};if(t){setTimeout((function(){return u.activateFirstItem()}),0)}}else{var a=this.params.subMenu;var f=this.createBean(new Zd(a));f.setParentComponent(this);var h=f.getGui();var c="mouseenter";var l=function(){return n.cancelDeactivate()};h.addEventListener(c,l);e=function(){return h.removeEventListener(c,l)};r.appendChild(h);if(a.afterGuiAttached){setTimeout((function(){return a.afterGuiAttached()}),0)}}var v=this.getGui();var d=this.popupService.positionPopupForMenu.bind(this.popupService,{eventSource:v,ePopup:r});var p=this.localeService.getLocaleTextFunc();var g=this.popupService.addPopup({modal:true,eChild:r,positionCallback:d,anchorToElement:v,ariaLabel:p("ariaLabelSubMenu","SubMenu")});this.subMenuIsOpen=true;Tn(v,true);this.hideSubMenu=function(){if(g){g.hideFunc()}n.subMenuIsOpen=false;Tn(v,false);e()}};i.prototype.closeSubMenu=function(){if(!this.hideSubMenu){return}this.hideSubMenu();this.hideSubMenu=null;Tn(this.getGui(),false)};i.prototype.isSubMenuOpen=function(){return this.subMenuIsOpen};i.prototype.activate=function(t){var i=this;this.cancelActivate();if(this.params.disabled){return}this.isActive=true;this.addCssClass(this.getClassName("active"));this.getGui().focus();if(t&&this.params.subMenu){window.setTimeout((function(){if(i.isAlive()&&i.isActive){i.openSubMenu()}}),300)}this.onItemActivated()};i.prototype.deactivate=function(){this.cancelDeactivate();this.removeCssClass(this.getClassName("active"));this.isActive=false;if(this.subMenuIsOpen){this.hideSubMenu()}};i.prototype.addIcon=function(){if(!this.params.checked&&!this.params.icon&&this.params.isCompact){return}var t=re('<span ref="eIcon" class="'+this.getClassName("part")+" "+this.getClassName("icon")+'" role="presentation"></span>');if(this.params.checked){t.appendChild(Fe("check",this.gridOptionsService))}else if(this.params.icon){if(me(this.params.icon)){t.appendChild(this.params.icon)}else if(typeof this.params.icon==="string"){t.innerHTML=this.params.icon}else{console.warn("AG Grid: menu item icon must be DOM node or string")}}this.getGui().appendChild(t)};i.prototype.addName=function(){if(!this.params.name&&this.params.isCompact){return}var t=re('<span ref="eName" class="'+this.getClassName("part")+" "+this.getClassName("text")+'">'+(this.params.name||"")+"</span>");this.getGui().appendChild(t)};i.prototype.addTooltip=function(){if(!this.params.tooltip){return}this.tooltip=this.params.tooltip;if(this.gridOptionsService.is("enableBrowserTooltips")){this.getGui().setAttribute("title",this.tooltip)}else{this.createManagedBean(new as(this))}};i.prototype.getTooltipParams=function(){return{location:"menu",value:this.tooltip}};i.prototype.addShortcut=function(){if(!this.params.shortcut&&this.params.isCompact){return}var t=re('<span ref="eShortcut" class="'+this.getClassName("part")+" "+this.getClassName("shortcut")+'">'+(this.params.shortcut||"")+"</span>");this.getGui().appendChild(t)};i.prototype.addSubMenu=function(){if(!this.params.subMenu&&this.params.isCompact){return}var t=re('<span ref="ePopupPointer" class="'+this.getClassName("part")+" "+this.getClassName("popup-pointer")+'"></span>');var i=this.getGui();if(this.params.subMenu){var n=this.gridOptionsService.is("enableRtl")?"smallLeft":"smallRight";Tn(i,false);t.appendChild(Fe(n,this.gridOptionsService))}i.appendChild(t)};i.prototype.onItemSelected=function(t){if(this.params.action){this.params.action()}else{this.openSubMenu(t&&t.type==="keydown")}if(this.params.subMenu&&!this.params.action){return}var n={type:i.EVENT_MENU_ITEM_SELECTED,action:this.params.action,checked:this.params.checked,cssClasses:this.params.cssClasses,disabled:this.params.disabled,icon:this.params.icon,name:this.params.name,shortcut:this.params.shortcut,subMenu:this.params.subMenu,tooltip:this.params.tooltip,event:t};this.dispatchEvent(n)};i.prototype.onItemActivated=function(){var t={type:i.EVENT_MENU_ITEM_ACTIVATED,menuItem:this};this.dispatchEvent(t)};i.prototype.cancelActivate=function(){if(this.activateTimeoutId){window.clearTimeout(this.activateTimeoutId);this.activateTimeoutId=0}};i.prototype.cancelDeactivate=function(){if(this.deactivateTimeoutId){window.clearTimeout(this.deactivateTimeoutId);this.deactivateTimeoutId=0}};i.prototype.onMouseEnter=function(){var t=this;this.cancelDeactivate();if(this.params.isAnotherSubMenuOpen()){this.activateTimeoutId=window.setTimeout((function(){return t.activate(true)}),i.ACTIVATION_DELAY)}else{this.activate(true)}};i.prototype.onMouseLeave=function(){var t=this;this.cancelActivate();if(this.isSubMenuOpen()){this.deactivateTimeoutId=window.setTimeout((function(){return t.deactivate()}),i.ACTIVATION_DELAY)}else{this.deactivate()}};i.prototype.getClassName=function(t){var i=this.params.isCompact?"ag-compact-menu-option":"ag-menu-option";return t?i+"-"+t:i};i.EVENT_MENU_ITEM_SELECTED="menuItemSelected";i.EVENT_MENU_ITEM_ACTIVATED="menuItemActivated";i.ACTIVATION_DELAY=80;Xd([ut("popupService")],i.prototype,"popupService",void 0);Xd([et],i.prototype,"init",null);return i}(vs);var ip=function(){var t=function(i,n){t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var n in i)if(Object.prototype.hasOwnProperty.call(i,n))t[n]=i[n]};return t(i,n)};return function(i,n){if(typeof n!=="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(i,n);function r(){this.constructor=i}i.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}();var np=function(t,i,n,r){var e=arguments.length,s=e<3?i:r===null?r=Object.getOwnPropertyDescriptor(i,n):r,o;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")s=Reflect.decorate(t,i,n,r);else for(var u=t.length-1;u>=0;u--)if(o=t[u])s=(e<3?o(s):e>3?o(i,n,s):o(i,n))||s;return e>3&&s&&Object.defineProperty(i,n,s),s};var rp=function(t){ip(i,t);function i(n){var r=t.call(this,i.getTemplate(n))||this;r.closable=true;r.config=n;return r}i.getTemplate=function(t){var i=t&&t.cssIdentifier||"default";return'<div class="ag-panel ag-'+i+'-panel" tabindex="-1">\n <div ref="eTitleBar" class="ag-panel-title-bar ag-'+i+'-panel-title-bar ag-unselectable">\n <span ref="eTitle" class="ag-panel-title-bar-title ag-'+i+'-panel-title-bar-title"></span>\n <div ref="eTitleBarButtons" class="ag-panel-title-bar-buttons ag-'+i+'-panel-title-bar-buttons"></div>\n </div>\n <div ref="eContentWrapper" class="ag-panel-content-wrapper ag-'+i+'-panel-content-wrapper"></div>\n </div>'};i.prototype.postConstruct=function(){var t=this;var i=this.config,n=i.component,r=i.closable,e=i.hideTitleBar,s=i.title,o=i.minWidth,u=o===void 0?250:o,a=i.width,f=i.minHeight,h=f===void 0?250:f,c=i.height,l=i.centered,v=i.popup,d=i.x,p=i.y;this.positionableFeature=new Ms(this.getGui(),{minWidth:u,width:a,minHeight:h,height:c,centered:l,x:d,y:p,popup:v,calculateTopBuffer:function(){return t.positionableFeature.getHeight()-t.getBodyHeight()}});this.createManagedBean(this.positionableFeature);var g=this.getGui();if(n){this.setBodyComponent(n)}if(!e){if(s){this.setTitle(s)}this.setClosable(r!=null?r:this.closable)}else{Lr(this.eTitleBar,false)}this.addManagedListener(this.eTitleBar,"mousedown",(function(i){var n=t.gridOptionsService.getDocument();if(g.contains(i.relatedTarget)||g.contains(n.activeElement)||t.eTitleBarButtons.contains(i.target)){i.preventDefault();return}var r=t.eContentWrapper.querySelector("button, [href], input, select, textarea, [tabindex]");if(r){r.focus()}}));if(v&&this.positionableFeature.isPositioned()){return}if(this.renderComponent){this.renderComponent()}this.positionableFeature.initialisePosition();this.eContentWrapper.style.height="0"};i.prototype.renderComponent=function(){var t=this;var i=this.getGui();i.focus();this.close=function(){i.parentElement.removeChild(i);t.destroy()}};i.prototype.getHeight=function(){return this.positionableFeature.getHeight()};i.prototype.setHeight=function(t){this.positionableFeature.setHeight(t)};i.prototype.getWidth=function(){return this.positionableFeature.getWidth()};i.prototype.setWidth=function(t){this.positionableFeature.setWidth(t)};i.prototype.setClosable=function(t){if(t!==this.closable){this.closable=t}if(t){var n=this.closeButtonComp=new vs(i.CLOSE_BTN_TEMPLATE);this.getContext().createBean(n);var r=n.getGui();var e=Fe("close",this.gridOptionsService);e.classList.add("ag-panel-title-bar-button-icon");r.appendChild(e);this.addTitleBarButton(n);n.addManagedListener(r,"click",this.onBtClose.bind(this))}else if(this.closeButtonComp){var r=this.closeButtonComp.getGui();r.parentElement.removeChild(r);this.closeButtonComp=this.destroyBean(this.closeButtonComp)}};i.prototype.setBodyComponent=function(t){t.setParentComponent(this);this.eContentWrapper.appendChild(t.getGui())};i.prototype.addTitleBarButton=function(t,i){var n=this.eTitleBarButtons;var r=n.children;var e=r.length;if(i==null){i=e}i=Math.max(0,Math.min(i,e));t.addCssClass("ag-panel-title-bar-button");var s=t.getGui();if(i===0){n.insertAdjacentElement("afterbegin",s)}else if(i===e){n.insertAdjacentElement("beforeend",s)}else{r[i-1].insertAdjacentElement("afterend",s)}t.setParentComponent(this)};i.prototype.getBodyHeight=function(){return Ur(this.eContentWrapper)};i.prototype.getBodyWidth=function(){return Kr(this.eContentWrapper)};i.prototype.setTitle=function(t){this.eTitle.innerText=t};i.prototype.onBtClose=function(){this.close()};i.prototype.destroy=function(){if(this.closeButtonComp){this.closeButtonComp=this.destroyBean(this.closeButtonComp)}var i=this.getGui();if(i&&i.offsetParent){this.close()}t.prototype.destroy.call(this)};i.CLOSE_BTN_TEMPLATE='<div class="ag-button"></div>';np([ds("eContentWrapper")],i.prototype,"eContentWrapper",void 0);np([ds("eTitleBar")],i.prototype,"eTitleBar",void 0);np([ds("eTitleBarButtons")],i.prototype,"eTitleBarButtons",void 0);np([ds("eTitle")],i.prototype,"eTitle",void 0);np([et],i.prototype,"postConstruct",null);return i}(vs);var ep=function(){var t=function(i,n){t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var n in i)if(Object.prototype.hasOwnProperty.call(i,n))t[n]=i[n]};return t(i,n)};return function(i,n){if(typeof n!=="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(i,n);function r(){this.constructor=i}i.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}();var sp=function(){sp=Object.assign||function(t){for(var i,n=1,r=arguments.length;n<r;n++){i=arguments[n];for(var e in i)if(Object.prototype.hasOwnProperty.call(i,e))t[e]=i[e]}return t};return sp.apply(this,arguments)};var op=function(t,i,n,r){var e=arguments.length,s=e<3?i:r===null?r=Object.getOwnPropertyDescriptor(i,n):r,o;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")s=Reflect.decorate(t,i,n,r);else for(var u=t.length-1;u>=0;u--)if(o=t[u])s=(e<3?o(s):e>3?o(i,n,s):o(i,n))||s;return e>3&&s&&Object.defineProperty(i,n,s),s};var up=function(t){ep(i,t);function i(i){var n=t.call(this,sp(sp({},i),{popup:true}))||this;n.isMaximizable=false;n.isMaximized=false;n.maximizeListeners=[];n.resizeListenerDestroy=null;n.lastPosition={x:0,y:0,width:0,height:0};return n}i.prototype.postConstruct=function(){var i=this;var n=this.getGui();var r=this.config,e=r.movable,s=r.resizable,o=r.maximizable;this.addCssClass("ag-dialog");t.prototype.postConstruct.call(this);this.addManagedListener(n,"focusin",(function(t){if(n.contains(t.relatedTarget)){return}i.popupService.bringPopupToFront(n)}));if(e){this.setMovable(e)}if(o){this.setMaximizable(o)}if(s){this.setResizable(s)}};i.prototype.renderComponent=function(){var t=this.getGui();var i=this.config,n=i.alwaysOnTop,r=i.modal,e=i.title,s=i.afterGuiAttached;var o=this.localeService.getLocaleTextFunc();var u=this.popupService.addPopup({modal:r,eChild:t,closeOnEsc:true,closedCallback:this.destroy.bind(this),alwaysOnTop:n,ariaLabel:e||o("ariaLabelDialog","Dialog"),afterGuiAttached:s});if(u){this.close=u.hideFunc}};i.prototype.toggleMaximize=function(){var t=this.positionableFeature.getPosition();if(this.isMaximized){var i=this.lastPosition,n=i.x,r=i.y,e=i.width,s=i.height;this.setWidth(e);this.setHeight(s);this.positionableFeature.offsetElement(n,r)}else{this.lastPosition.width=this.getWidth();this.lastPosition.height=this.getHeight();this.lastPosition.x=t.x;this.lastPosition.y=t.y;this.positionableFeature.offsetElement(0,0);this.setHeight("100%");this.setWidth("100%")}this.isMaximized=!this.isMaximized;this.refreshMaximizeIcon()};i.prototype.refreshMaximizeIcon=function(){Lr(this.maximizeIcon,!this.isMaximized);Lr(this.minimizeIcon,this.isMaximized)};i.prototype.clearMaximizebleListeners=function(){if(this.maximizeListeners.length){this.maximizeListeners.forEach((function(t){return t()}));this.maximizeListeners.length=0}if(this.resizeListenerDestroy){this.resizeListenerDestroy();this.resizeListenerDestroy=null}};i.prototype.destroy=function(){this.maximizeButtonComp=this.destroyBean(this.maximizeButtonComp);this.clearMaximizebleListeners();t.prototype.destroy.call(this)};i.prototype.setResizable=function(t){this.positionableFeature.setResizable(t)};i.prototype.setMovable=function(t){this.positionableFeature.setMovable(t,this.eTitleBar)};i.prototype.setMaximizable=function(t){var i=this;if(!t){this.clearMaximizebleListeners();if(this.maximizeButtonComp){this.destroyBean(this.maximizeButtonComp);this.maximizeButtonComp=this.maximizeIcon=this.minimizeIcon=undefined}return}var n=this.eTitleBar;if(!n||t===this.isMaximizable){return}var r=this.buildMaximizeAndMinimizeElements();this.refreshMaximizeIcon();r.addManagedListener(r.getGui(),"click",this.toggleMaximize.bind(this));this.addTitleBarButton(r,0);this.maximizeListeners.push(this.addManagedListener(n,"dblclick",this.toggleMaximize.bind(this)));this.resizeListenerDestroy=this.addManagedListener(this,"resize",(function(){i.isMaximized=false;i.refreshMaximizeIcon()}))};i.prototype.buildMaximizeAndMinimizeElements=function(){var t=this.maximizeButtonComp=this.createBean(new vs('<div class="ag-dialog-button"></span>'));var i=t.getGui();this.maximizeIcon=Fe("maximize",this.gridOptionsService);i.appendChild(this.maximizeIcon);this.maximizeIcon.classList.add("ag-panel-title-bar-button-icon");this.minimizeIcon=Fe("minimize",this.gridOptionsService);i.appendChild(this.minimizeIcon);this.minimizeIcon.classList.add("ag-panel-title-bar-button-icon");return t};op([ut("popupService")],i.prototype,"popupService",void 0);return i}(rp);var ap=function(){var t=function(i,n){t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var n in i)if(Object.prototype.hasOwnProperty.call(i,n))t[n]=i[n]};return t(i,n)};return function(i,n){if(typeof n!=="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(i,n);function r(){this.constructor=i}i.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}();var fp=function(){fp=Object.assign||function(t){for(var i,n=1,r=arguments.length;n<r;n++){i=arguments[n];for(var e in i)if(Object.prototype.hasOwnProperty.call(i,e))t[e]=i[e]}return t};return fp.apply(this,arguments)};var hp=function(t,i,n,r){var e=arguments.length,s=e<3?i:r===null?r=Object.getOwnPropertyDescriptor(i,n):r,o;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")s=Reflect.decorate(t,i,n,r);else for(var u=t.length-1;u>=0;u--)if(o=t[u])s=(e<3?o(s):e>3?o(i,n,s):o(i,n))||s;return e>3&&s&&Object.defineProperty(i,n,s),s};var cp=function(t,i){var n=typeof Symbol==="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),e,s=[],o;try{while((i===void 0||i-- >0)&&!(e=r.next()).done)s.push(e.value)}catch(t){o={error:t}}finally{try{if(e&&!e.done&&(n=r["return"]))n.call(r)}finally{if(o)throw o.error}}return s};var lp=function(t,i){for(var n=0,r=i.length,e=t.length;n<r;n++,e++)t[e]=i[n];return t};var vp;(function(t){t[t["vertical"]=0]="vertical";t[t["horizontal"]=1]="horizontal"})(vp||(vp={}));var dp=0;var pp=function(t){ap(n,t);function n(){var i=t!==null&&t.apply(this,arguments)||this;i.popupList=[];return i}r=n;n.prototype.postConstruct=function(){var t=this;this.ctrlsService.whenReady((function(i){t.gridCtrl=i.gridCtrl;t.addManagedListener(t.gridCtrl,hi.EVENT_KEYBOARD_FOCUS,(function(){t.popupList.forEach((function(t){return t.element.classList.add(Il.AG_KEYBOARD_FOCUS)}))}));t.addManagedListener(t.gridCtrl,hi.EVENT_MOUSE_FOCUS,(function(){t.popupList.forEach((function(t){return t.element.classList.remove(Il.AG_KEYBOARD_FOCUS)}))}))}))};n.prototype.getPopupParent=function(){var t=this.gridOptionsService.get("popupParent");if(t){return t}return this.gridCtrl.getGui()};n.prototype.positionPopupForMenu=function(t){var i=t.eventSource,n=t.ePopup;var r=this.getPopupIndex(n);if(r!==-1){var e=this.popupList[r];e.alignedToElement=i}var s=i.getBoundingClientRect();var o=this.getParentRect();var u=this.keepXYWithinBounds(n,s.top-o.top,vp.vertical);var a=n.clientWidth>0?n.clientWidth:200;n.style.minWidth=a+"px";var f=o.right-o.left;var h=f-a;var c;if(this.gridOptionsService.is("enableRtl")){c=v();if(c<0){c=l();this.setAlignedStyles(n,"left")}if(c>h){c=0;this.setAlignedStyles(n,"right")}}else{c=l();if(c>h){c=v();this.setAlignedStyles(n,"right")}if(c<0){c=0;this.setAlignedStyles(n,"left")}}n.style.left=c+"px";n.style.top=u+"px";function l(){return s.right-o.left-2}function v(){return s.left-o.left-a}};n.prototype.positionPopupUnderMouseEvent=function(t){var i=this;var n=t.ePopup,r=t.nudgeX,e=t.nudgeY,s=t.skipObserver;this.positionPopup({ePopup:n,nudgeX:r,nudgeY:e,keepWithinBounds:true,skipObserver:s,updatePosition:function(){return i.calculatePointerAlign(t.mouseEvent)},postProcessCallback:function(){return i.callPostProcessPopup(t.type,t.ePopup,null,t.mouseEvent,t.column,t.rowNode)}})};n.prototype.calculatePointerAlign=function(t){var i=this.getParentRect();return{x:t.clientX-i.left,y:t.clientY-i.top}};n.prototype.positionPopupByComponent=function(t){var i=this;var n=t.ePopup,r=t.nudgeX,e=t.nudgeY,s=t.keepWithinBounds,o=t.eventSource,u=t.alignSide,a=u===void 0?"left":u,f=t.position,h=f===void 0?"over":f,c=t.column,l=t.rowNode,v=t.type;var d=o.getBoundingClientRect();var p=this.getParentRect();var g=this.getPopupIndex(n);if(g!==-1){var b=this.popupList[g];b.alignedToElement=o}var w=function(){var r=d.left-p.left;if(a==="right"){r-=n.offsetWidth-d.width}var s;if(h==="over"){s=d.top-p.top;i.setAlignedStyles(n,"over")}else{i.setAlignedStyles(n,"under");var o=i.shouldRenderUnderOrAbove(n,d,p,t.nudgeY||0);if(o==="under"){s=d.top-p.top+d.height}else{s=d.top-n.offsetHeight-(e||0)*2-p.top}}return{x:r,y:s}};this.positionPopup({ePopup:n,nudgeX:r,nudgeY:e,keepWithinBounds:s,updatePosition:w,postProcessCallback:function(){return i.callPostProcessPopup(v,n,o,null,c,l)}})};n.prototype.shouldRenderUnderOrAbove=function(t,i,n,r){var e=n.bottom-i.bottom;var s=i.top-n.top;var o=t.offsetHeight+r;if(e>o){return"under"}if(s>o||s>e){return"above"}return"under"};n.prototype.setAlignedStyles=function(t,i){var n=this.getPopupIndex(t);if(n===-1){return}var r=this.popupList[n];var e=r.alignedToElement;if(!e){return}var s=["right","left","over","above","under"];s.forEach((function(i){e.classList.remove("ag-has-popup-positioned-"+i);t.classList.remove("ag-popup-positioned-"+i)}));if(!i){return}e.classList.add("ag-has-popup-positioned-"+i);t.classList.add("ag-popup-positioned-"+i)};n.prototype.callPostProcessPopup=function(t,i,n,r,e,s){var o=this.gridOptionsService.getCallback("postProcessPopup");if(o){var u={column:e,rowNode:s,ePopup:i,type:t,eventSource:n,mouseEvent:r};o(u)}};n.prototype.positionPopup=function(t){var i=this;var n=t.ePopup,e=t.keepWithinBounds,s=t.nudgeX,o=t.nudgeY,u=t.skipObserver,a=t.updatePosition;var f={width:0,height:0};var h=function(r){if(r===void 0){r=false}var u=a(),h=u.x,c=u.y;if(r&&n.clientWidth===f.width&&n.clientHeight===f.height){return}f.width=n.clientWidth;f.height=n.clientHeight;if(s){h+=s}if(o){c+=o}if(e){h=i.keepXYWithinBounds(n,h,vp.horizontal);c=i.keepXYWithinBounds(n,c,vp.vertical)}n.style.left=h+"px";n.style.top=c+"px";if(t.postProcessCallback){t.postProcessCallback()}};h();if(!u){var c=this.resizeObserverService.observeResize(n,(function(){return h(true)}));setTimeout((function(){return c()}),r.WAIT_FOR_POPUP_CONTENT_RESIZE)}};n.prototype.getActivePopups=function(){return this.popupList.map((function(t){return t.element}))};n.prototype.getPopupList=function(){return this.popupList};n.prototype.getParentRect=function(){var t=this.gridOptionsService.getDocument();var i=this.getPopupParent();if(i===t.body){i=t.documentElement}else if(getComputedStyle(i).position==="static"){i=i.offsetParent}return Qr(i)};n.prototype.keepXYWithinBounds=function(t,i,n){var r=n===vp.vertical;var e=r?"clientHeight":"clientWidth";var s=r?"top":"left";var o=r?"offsetHeight":"offsetWidth";var u=r?"scrollTop":"scrollLeft";var a=this.gridOptionsService.getDocument();var f=a.documentElement;var h=this.getPopupParent();var c=h.getBoundingClientRect();var l=a.documentElement.getBoundingClientRect();var v=h===a.body;var d=t[o];var p=r?qr:Yr;var g=v?p(f)+f[u]:h[e];if(v){g-=Math.abs(l[s]-c[s])}var b=g-d;return Math.min(Math.max(i,0),Math.abs(b))};n.prototype.addPopup=function(t){var i=this.gridOptionsService.getDocument();var n=t.eChild,r=t.ariaLabel,e=t.alwaysOnTop,s=t.positionCallback,o=t.anchorToElement;if(!i){console.warn("AG Grid: could not find the document, document is empty");return{hideFunc:function(){}}}var u=this.getPopupIndex(n);if(u!==-1){var a=this.popupList[u];return{hideFunc:a.hideFunc}}this.initialisePopupPosition(n);var f=this.createPopupWrapper(n,r,!!e);var h=this.addEventListenersToPopup(fp(fp({},t),{wrapperEl:f}));if(s){s()}this.addPopupToPopupList(n,f,h,o);return{hideFunc:h}};n.prototype.initialisePopupPosition=function(t){var n=this.getPopupParent();var r=n.getBoundingClientRect();if(!i(t.style.top)){t.style.top=r.top*-1+"px"}if(!i(t.style.left)){t.style.left=r.left*-1+"px"}};n.prototype.createPopupWrapper=function(t,i,n){var r;var e=this.getPopupParent();var s=document.createElement("div");var o=this.environment.getTheme().allThemes;if(o.length){(r=s.classList).add.apply(r,lp([],cp(o)))}s.classList.add("ag-popup");t.classList.add(this.gridOptionsService.is("enableRtl")?"ag-rtl":"ag-ltr","ag-popup-child");if(!t.hasAttribute("role")){bn(t,"dialog")}Cn(t,i);if(this.focusService.isKeyboardMode()){t.classList.add(Il.AG_KEYBOARD_FOCUS)}s.appendChild(t);e.appendChild(s);if(n){this.setAlwaysOnTop(t,true)}else{this.bringPopupToFront(t)}return s};n.prototype.addEventListenersToPopup=function(t){var i=this;var n=this.gridOptionsService.getDocument();var r=this.getPopupParent();var e=t.wrapperEl,s=t.eChild;var o=t.closedCallback,u=t.afterGuiAttached,a=t.closeOnEsc,f=t.modal;var h=false;var c=function(t){if(!e.contains(n.activeElement)){return}var i=t.key;if(i===Te.ESCAPE&&!Yt(t)){d({keyboardEvent:t})}};var l=function(t){return d({mouseEvent:t})};var v=function(t){return d({touchEvent:t})};var d=function(t){if(t===void 0){t={}}var u=t.mouseEvent,a=t.touchEvent,f=t.keyboardEvent;if(i.isEventFromCurrentPopup({mouseEvent:u,touchEvent:a},s)||h){return}h=true;r.removeChild(e);n.removeEventListener("keydown",c);n.removeEventListener("mousedown",l);n.removeEventListener("touchstart",v);n.removeEventListener("contextmenu",l);i.eventService.removeEventListener(hi.EVENT_DRAG_STARTED,l);if(o){o(u||a||f)}i.removePopupFromPopupList(s)};if(u){u({hidePopup:d})}window.setTimeout((function(){if(a){n.addEventListener("keydown",c)}if(f){n.addEventListener("mousedown",l);i.eventService.addEventListener(hi.EVENT_DRAG_STARTED,l);n.addEventListener("touchstart",v);n.addEventListener("contextmenu",l)}}),0);return d};n.prototype.addPopupToPopupList=function(t,i,n,r){this.popupList.push({element:t,wrapper:i,hideFunc:n,instanceId:dp++,isAnchored:!!r});if(r){this.setPopupPositionRelatedToElement(t,r)}};n.prototype.getPopupIndex=function(t){return this.popupList.findIndex((function(i){return i.element===t}))};n.prototype.setPopupPositionRelatedToElement=function(t,i){var n=this.getPopupIndex(t);if(n===-1){return}var r=this.popupList[n];if(r.stopAnchoringPromise){r.stopAnchoringPromise.then((function(t){return t&&t()}))}r.stopAnchoringPromise=undefined;r.isAnchored=false;if(!i){return}var e=this.keepPopupPositionedRelativeTo({element:i,ePopup:t,hidePopup:r.hideFunc});r.stopAnchoringPromise=e;r.isAnchored=true;return e};n.prototype.removePopupFromPopupList=function(t){this.setAlignedStyles(t,null);this.setPopupPositionRelatedToElement(t,null);this.popupList=this.popupList.filter((function(i){return i.element!==t}))};n.prototype.keepPopupPositionedRelativeTo=function(t){var i=this;var n=this.getPopupParent();var r=n.getBoundingClientRect();var e=t.element,s=t.ePopup;var o=e.getBoundingClientRect();var u=r.top-o.top;var a=r.left-o.left;var f=u;var h=a;var c=s.style.top;var l=parseInt(c.substring(0,c.length-1),10);var v=s.style.left;var d=parseInt(v.substring(0,v.length-1),10);return new ns((function(r){i.getFrameworkOverrides().setInterval((function(){var r=n.getBoundingClientRect();var o=e.getBoundingClientRect();var c=o.top==0&&o.left==0&&o.height==0&&o.width==0;if(c){t.hidePopup();return}var v=r.top-o.top;if(v!=f){var p=i.keepXYWithinBounds(s,l+u-v,vp.vertical);s.style.top=p+"px"}f=v;var g=r.left-o.left;if(g!=h){var b=i.keepXYWithinBounds(s,d+a-g,vp.horizontal);s.style.left=b+"px"}h=g}),200).then((function(t){var i=function(){if(t!=null){window.clearInterval(t)}};r(i)}))}))};n.prototype.hasAnchoredPopup=function(){return this.popupList.some((function(t){return t.isAnchored}))};n.prototype.isEventFromCurrentPopup=function(t,i){var n=t.mouseEvent,r=t.touchEvent;var e=n?n:r;if(!e){return false}var s=this.getPopupIndex(i);if(s===-1){return false}for(var o=s;o<this.popupList.length;o++){var u=this.popupList[o];if(Zt(u.element,e)){return true}}return this.isElementWithinCustomPopup(e.target)};n.prototype.isElementWithinCustomPopup=function(t){var i=this.gridOptionsService.getDocument();while(t&&t!==i.body){if(t.classList.contains("ag-custom-component-popup")||t.parentElement===null){return true}t=t.parentElement}return false};n.prototype.getWrapper=function(t){while(!t.classList.contains("ag-popup")&&t.parentElement){t=t.parentElement}return t.classList.contains("ag-popup")?t:null};n.prototype.setAlwaysOnTop=function(t,i){var n=this.getWrapper(t);if(!n){return}n.classList.toggle("ag-always-on-top",!!i);if(i){this.bringPopupToFront(n)}};n.prototype.bringPopupToFront=function(t){var i=this.getPopupParent();var n=Array.prototype.slice.call(i.querySelectorAll(".ag-popup"));var r=n.length;var e=Array.prototype.slice.call(i.querySelectorAll(".ag-popup.ag-always-on-top"));var s=e.length;var o=this.getWrapper(t);if(!o||r<=1||!i.contains(t)){return}var u=n.indexOf(o);var a=o.querySelectorAll("div");var f=[];a.forEach((function(t){if(t.scrollTop!==0){f.push([t,t.scrollTop])}}));if(s){var h=o.classList.contains("ag-always-on-top");if(h){if(u!==r-1){xt(e).insertAdjacentElement("afterend",o)}}else if(u!==r-s-1){e[0].insertAdjacentElement("beforebegin",o)}}else if(u!==r-1){xt(n).insertAdjacentElement("afterend",o)}while(f.length){var c=f.pop();c[0].scrollTop=c[1]}var l={type:"popupToFront",api:this.gridOptionsService.api,columnApi:this.gridOptionsService.columnApi,eWrapper:o};this.eventService.dispatchEvent(l)};var r;n.WAIT_FOR_POPUP_CONTENT_RESIZE=200;hp([ut("focusService")],n.prototype,"focusService",void 0);hp([ut("ctrlsService")],n.prototype,"ctrlsService",void 0);hp([ut("resizeObserverService")],n.prototype,"resizeObserverService",void 0);hp([et],n.prototype,"postConstruct",null);n=r=hp([ot("popupService")],n);return n}(ri);var gp=function(){var t=function(i,n){t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var n in i)if(Object.prototype.hasOwnProperty.call(i,n))t[n]=i[n]};return t(i,n)};return function(i,n){if(typeof n!=="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(i,n);function r(){this.constructor=i}i.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}();var bp=function(t){gp(n,t);function n(){var i=t.call(this,'\n <div class="ag-autocomplete-row" role="presentation">\n <div class="ag-autocomplete-row-label"></div>\n </div>')||this;i.hasHighlighting=false;return i}n.prototype.setState=function(t,i){this.value=t;this.render();this.updateSelected(i)};n.prototype.updateSelected=function(t){this.addOrRemoveCssClass("ag-autocomplete-row-selected",t)};n.prototype.setSearchString=function(t){var n;var r=false;if(i(t)){var e=(n=this.value)===null||n===void 0?void 0:n.toLocaleLowerCase().indexOf(t.toLocaleLowerCase());if(e>=0){r=true;this.hasHighlighting=true;var s=e+t.length;var o=mi(this.value.slice(0,e));var u=mi(this.value.slice(e,s));var a=mi(this.value.slice(s));this.getGui().lastElementChild.innerHTML=o+"<b>"+u+"</b>"+a}}if(!r&&this.hasHighlighting){this.hasHighlighting=false;this.render()}};n.prototype.render=function(){var t;this.getGui().lastElementChild.innerHTML=(t=mi(this.value))!==null&&t!==void 0?t:"&nbsp;"};return n}(vs);var wp=function(){var t=function(i,n){t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var n in i)if(Object.prototype.hasOwnProperty.call(i,n))t[n]=i[n]};return t(i,n)};return function(i,n){if(typeof n!=="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(i,n);function r(){this.constructor=i}i.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}();var yp=function(t,i,n,r){var e=arguments.length,s=e<3?i:r===null?r=Object.getOwnPropertyDescriptor(i,n):r,o;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")s=Reflect.decorate(t,i,n,r);else for(var u=t.length-1;u>=0;u--)if(o=t[u])s=(e<3?o(s):e>3?o(i,n,s):o(i,n))||s;return e>3&&s&&Object.defineProperty(i,n,s),s};var mp=function(t){wp(n,t);function n(i){var r=t.call(this,n.TEMPLATE)||this;r.params=i;r.searchString="";return r}n.prototype.destroy=function(){t.prototype.destroy.call(this)};n.prototype.init=function(){var t=this;this.autocompleteEntries=this.params.autocompleteEntries;this.virtualList=this.createManagedBean(new Dd({cssIdentifier:"autocomplete"}));this.virtualList.setComponentCreator(this.createRowComponent.bind(this));this.eList.appendChild(this.virtualList.getGui());this.virtualList.setModel({getRowCount:function(){return t.autocompleteEntries.length},getRow:function(i){return t.autocompleteEntries[i]}});var i=this.virtualList.getGui();this.addManagedListener(i,"click",(function(){return t.params.onConfirmed()}));this.addManagedListener(i,"mousemove",this.onMouseMove.bind(this));this.addManagedListener(i,"mousedown",(function(t){return t.preventDefault()}));this.setSelectedValue(0)};n.prototype.onNavigationKeyDown=function(t,i){t.preventDefault();var n=this.autocompleteEntries.indexOf(this.selectedValue);var r=i===Te.UP?n-1:n+1;this.checkSetSelectedValue(r)};n.prototype.setSearch=function(t){this.searchString=t;if(i(t)){this.runSearch()}else{this.autocompleteEntries=this.params.autocompleteEntries;this.virtualList.refresh();this.checkSetSelectedValue(0)}this.updateSearchInList()};n.prototype.runContainsSearch=function(t,i){var n;var r=false;var e=t.toLocaleLowerCase();var s=i.filter((function(t){var i=t.toLocaleLowerCase();var s=i.indexOf(e);var o=s===0;var u=s>=0;if(u&&(!n||!r&&o||r===o&&t.length<n.length)){n=t;r=o}return u}));if(!n&&s.length){n=s[0]}return{topMatch:n,allMatches:s}};n.prototype.runSearch=function(){var t,i;var n=this.params.autocompleteEntries;var r=n.map((function(t){var i;return(i=t.displayValue)!==null&&i!==void 0?i:t.key}));var e;var s;if(this.params.useFuzzySearch){e=Ni(this.searchString,r,true).values;s=e.length?e[0]:undefined}else{var o=this.runContainsSearch(this.searchString,r);e=o.allMatches;s=o.topMatch}var u=n.filter((function(t){var i=t.key,n=t.displayValue;return e.includes(n!==null&&n!==void 0?n:i)}));if(!u.length&&this.selectedValue&&((i=(t=this.params)===null||t===void 0?void 0:t.forceLastSelection)===null||i===void 0?void 0:i.call(t,this.selectedValue,this.searchString))){u=[this.selectedValue]}this.autocompleteEntries=u;this.virtualList.refresh();if(!s){return}var a=e.indexOf(s);this.checkSetSelectedValue(a)};n.prototype.updateSearchInList=function(){var t=this;this.virtualList.forEachRenderedRow((function(i){return i.setSearchString(t.searchString)}))};n.prototype.checkSetSelectedValue=function(t){if(t>=0&&t<this.autocompleteEntries.length){this.setSelectedValue(t)}};n.prototype.setSelectedValue=function(t){var i=this.autocompleteEntries[t];if(this.selectedValue===i){return}this.selectedValue=i;this.virtualList.ensureIndexVisible(t);this.virtualList.forEachRenderedRow((function(i,n){i.updateSelected(t===n)}))};n.prototype.createRowComponent=function(t){var i;var n=new bp;this.getContext().createBean(n);n.setState((i=t.displayValue)!==null&&i!==void 0?i:t.key,t===this.selectedValue);return n};n.prototype.onMouseMove=function(t){var i=this.virtualList.getGui().getBoundingClientRect();var n=this.virtualList.getScrollTop();var r=t.clientY-i.top+n;var e=Math.floor(r/this.virtualList.getRowHeight());this.checkSetSelectedValue(e)};n.prototype.afterGuiAttached=function(){this.virtualList.refresh()};n.prototype.getSelectedValue=function(){var t;if(!this.autocompleteEntries.length){return null}return(t=this.selectedValue)!==null&&t!==void 0?t:null};n.TEMPLATE='<div class="ag-autocomplete-list-popup">\n <div ref="eList" class="ag-autocomplete-list"></div>\n <div>';yp([ds("eList")],n.prototype,"eList",void 0);yp([et],n.prototype,"init",null);return n}(ou);var Sp=function(){var t=function(i,n){t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var n in i)if(Object.prototype.hasOwnProperty.call(i,n))t[n]=i[n]};return t(i,n)};return function(i,n){if(typeof n!=="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(i,n);function r(){this.constructor=i}i.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}();var Cp=function(t,i,n,r){var e=arguments.length,s=e<3?i:r===null?r=Object.getOwnPropertyDescriptor(i,n):r,o;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")s=Reflect.decorate(t,i,n,r);else for(var u=t.length-1;u>=0;u--)if(o=t[u])s=(e<3?o(s):e>3?o(i,n,s):o(i,n))||s;return e>3&&s&&Object.defineProperty(i,n,s),s};var Op=function(i){Sp(n,i);function n(){var t=i.call(this,'\n <div class="ag-autocomplete" role="presentation">\n <ag-input-text-field ref="eAutocompleteInput"></ag-input-text-field>\n </div>')||this;t.isListOpen=false;t.lastPosition=0;t.valid=true;return t}n.prototype.postConstruct=function(){var t=this;this.eAutocompleteInput.onValueChange((function(i){return t.onValueChanged(i)}));this.eAutocompleteInput.getInputElement().setAttribute("autocomplete","off");this.addGuiEventListener("keydown",this.onKeyDown.bind(this));this.addGuiEventListener("click",this.updatePositionAndList.bind(this));this.addDestroyFunc((function(){t.destroyBean(t.autocompleteList)}));this.addGuiEventListener("focusout",(function(){return t.onFocusOut()}))};n.prototype.onValueChanged=function(i){var n=t(i);this.updateValue(n);this.updateAutocompleteList(n)};n.prototype.updateValue=function(t){this.updateLastPosition();this.dispatchEvent({type:n.EVENT_VALUE_CHANGED,value:t});this.validate(t)};n.prototype.updateAutocompleteList=function(t){var i,n,r,e;var s=(n=(i=this.listGenerator)===null||i===void 0?void 0:i.call(this,t,this.lastPosition))!==null&&n!==void 0?n:{enabled:false};if(!s.type||s.type!==((r=this.autocompleteListParams)===null||r===void 0?void 0:r.type)){if(this.isListOpen){this.closeList()}}this.autocompleteListParams=s;if((e=this.autocompleteListParams)===null||e===void 0?void 0:e.enabled){if(!this.isListOpen){this.openList()}var o=this.autocompleteListParams.searchString;this.autocompleteList.setSearch(o!==null&&o!==void 0?o:"")}else{if(this.isListOpen){this.closeList()}}};n.prototype.onKeyDown=function(t){var i=this;var n=t.key;this.updateLastPosition();switch(n){case Te.ENTER:this.onEnterKeyDown(t);break;case Te.TAB:this.onTabKeyDown(t);break;case Te.DOWN:case Te.UP:this.onUpDownKeyDown(t,n);break;case Te.LEFT:case Te.RIGHT:case Te.PAGE_HOME:case Te.PAGE_END:setTimeout((function(){i.updatePositionAndList()}));break;case Te.ESCAPE:this.onEscapeKeyDown(t);break;case Te.SPACE:if(t.ctrlKey&&!this.isListOpen){t.preventDefault();this.forceOpenList()}break}};n.prototype.confirmSelection=function(){var t;var i=(t=this.autocompleteList)===null||t===void 0?void 0:t.getSelectedValue();if(i){this.closeList();this.dispatchEvent({type:n.EVENT_OPTION_SELECTED,value:this.getValue(),position:this.lastPosition,updateEntry:i,autocompleteType:this.autocompleteListParams.type})}};n.prototype.onTabKeyDown=function(t){if(this.isListOpen){t.preventDefault();t.stopPropagation();this.confirmSelection()}};n.prototype.onEnterKeyDown=function(t){t.preventDefault();if(this.isListOpen){this.confirmSelection()}else{this.onCompleted()}};n.prototype.onUpDownKeyDown=function(t,i){var n;t.preventDefault();if(!this.isListOpen){this.forceOpenList()}else{(n=this.autocompleteList)===null||n===void 0?void 0:n.onNavigationKeyDown(t,i)}};n.prototype.onEscapeKeyDown=function(t){if(this.isListOpen){t.preventDefault();t.stopPropagation();this.closeList();this.setCaret(this.lastPosition,true)}};n.prototype.onFocusOut=function(){if(this.isListOpen){this.closeList()}};n.prototype.updatePositionAndList=function(){var t;this.updateLastPosition();this.updateAutocompleteList((t=this.eAutocompleteInput.getValue())!==null&&t!==void 0?t:null)};n.prototype.setCaret=function(t,i){var n=this.gridOptionsService.getDocument();if(i&&n.activeElement===n.body){this.eAutocompleteInput.getFocusableElement().focus()}this.eAutocompleteInput.getInputElement().setSelectionRange(t,t)};n.prototype.forceOpenList=function(){this.onValueChanged(this.eAutocompleteInput.getValue())};n.prototype.updateLastPosition=function(){var t;this.lastPosition=(t=this.eAutocompleteInput.getInputElement().selectionStart)!==null&&t!==void 0?t:0};n.prototype.validate=function(t){var i;if(!this.validator){return}this.validationMessage=this.validator(t);this.eAutocompleteInput.getInputElement().setCustomValidity((i=this.validationMessage)!==null&&i!==void 0?i:"");this.valid=!this.validationMessage;this.dispatchEvent({type:n.EVENT_VALID_CHANGED,isValid:this.valid,validationMessage:this.validationMessage})};n.prototype.openList=function(){var t=this;this.isListOpen=true;this.autocompleteList=this.createBean(new mp({autocompleteEntries:this.autocompleteListParams.entries,onConfirmed:function(){return t.confirmSelection()},forceLastSelection:this.forceLastSelection}));var i=this.autocompleteList.getGui();var n={ePopup:i,type:"autocomplete",eventSource:this.getGui(),position:"under",alignSide:this.gridOptionsService.is("enableRtl")?"right":"left",keepWithinBounds:true};var r=this.popupService.addPopup({eChild:i,anchorToElement:this.getGui(),positionCallback:function(){return t.popupService.positionPopupByComponent(n)},ariaLabel:this.listAriaLabel});this.hidePopup=r.hideFunc;this.autocompleteList.afterGuiAttached()};n.prototype.closeList=function(){this.isListOpen=false;this.hidePopup();this.destroyBean(this.autocompleteList);this.autocompleteList=null};n.prototype.onCompleted=function(){if(this.isListOpen){this.closeList()}this.dispatchEvent({type:n.EVENT_VALUE_CONFIRMED,value:this.getValue(),isValid:this.isValid()})};n.prototype.getValue=function(){return t(this.eAutocompleteInput.getValue())};n.prototype.setInputPlaceholder=function(t){this.eAutocompleteInput.setInputPlaceholder(t);return this};n.prototype.setInputAriaLabel=function(t){this.eAutocompleteInput.setInputAriaLabel(t);return this};n.prototype.setListAriaLabel=function(t){this.listAriaLabel=t;return this};n.prototype.setListGenerator=function(t){this.listGenerator=t;return this};n.prototype.setValidator=function(t){this.validator=t;return this};n.prototype.isValid=function(){return this.valid};n.prototype.setValue=function(t){var i=t.value,n=t.position,r=t.silent,e=t.updateListOnlyIfOpen,s=t.restoreFocus;this.eAutocompleteInput.setValue(i,true);this.setCaret(n!==null&&n!==void 0?n:this.lastPosition,s);if(!r){this.updateValue(i)}if(!e||this.isListOpen){this.updateAutocompleteList(i)}};n.prototype.setForceLastSelection=function(t){this.forceLastSelection=t;return this};n.prototype.setInputDisabled=function(t){this.eAutocompleteInput.setDisabled(t);return this};n.EVENT_VALUE_CHANGED="eventValueChanged";n.EVENT_VALUE_CONFIRMED="eventValueConfirmed";n.EVENT_OPTION_SELECTED="eventOptionSelected";n.EVENT_VALID_CHANGED="eventValidChanged";Cp([ut("popupService")],n.prototype,"popupService",void 0);Cp([ds("eAutocompleteInput")],n.prototype,"eAutocompleteInput",void 0);Cp([et],n.prototype,"postConstruct",null);return n}(vs);var jp=["mouseover","mouseout","mouseenter","mouseleave","mousemove"];var Rp=["touchstart","touchend","touchmove","touchcancel"];var xp=function(){function t(){this.renderingEngine="vanilla";this.isOutsideAngular=function(t){return Nt(jp,t)}}t.prototype.setTimeout=function(t,i){window.setTimeout(t,i)};t.prototype.setInterval=function(t,i){return new ns((function(n){n(window.setInterval(t,i))}))};t.prototype.addEventListener=function(t,i,n,r){var e=Nt(Rp,i);t.addEventListener(i,n,{capture:!!r,passive:e})};t.prototype.dispatchEvent=function(t,i,n){i()};t.prototype.frameworkComponent=function(t){return null};t.prototype.isFrameworkComponent=function(t){return false};return t}();var _p=function(){var t=function(i,n){t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var n in i)if(Object.prototype.hasOwnProperty.call(i,n))t[n]=i[n]};return t(i,n)};return function(i,n){if(typeof n!=="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(i,n);function r(){this.constructor=i}i.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}();var Ap=function(t,i,n,r){var e=arguments.length,s=e<3?i:r===null?r=Object.getOwnPropertyDescriptor(i,n):r,o;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")s=Reflect.decorate(t,i,n,r);else for(var u=t.length-1;u>=0;u--)if(o=t[u])s=(e<3?o(s):e>3?o(i,n,s):o(i,n))||s;return e>3&&s&&Object.defineProperty(i,n,s),s};var Fp=function(t,i){var n=typeof Symbol==="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),e,s=[],o;try{while((i===void 0||i-- >0)&&!(e=r.next()).done)s.push(e.value)}catch(t){o={error:t}}finally{try{if(e&&!e.done&&(n=r["return"]))n.call(r)}finally{if(o)throw o.error}}return s};var kp=function(t,i){for(var n=0,r=i.length,e=t.length;n<r;n++,e++)t[e]=i[n];return t};var Tp=function(t){_p(i,t);function i(){return t!==null&&t.apply(this,arguments)||this}i.prototype.getNextCellToFocus=function(t,i,n){if(n===void 0){n=false}if(n){return this.getNextCellToFocusWithCtrlPressed(t,i)}return this.getNextCellToFocusWithoutCtrlPressed(t,i)};i.prototype.getNextCellToFocusWithCtrlPressed=function(t,i){var n=t===Te.UP;var r=t===Te.DOWN;var e=t===Te.LEFT;var s;var o;if(n||r){o=n?this.paginationProxy.getPageFirstRow():this.paginationProxy.getPageLastRow();s=i.column}else{var u=this.columnModel.getAllDisplayedColumns();var a=this.gridOptionsService.is("enableRtl");o=i.rowIndex;s=e!==a?u[0]:xt(u)}return{rowIndex:o,rowPinned:null,column:s}};i.prototype.getNextCellToFocusWithoutCtrlPressed=function(t,i){var n=i;var r=false;while(!r){switch(t){case Te.UP:n=this.getCellAbove(n);break;case Te.DOWN:n=this.getCellBelow(n);break;case Te.RIGHT:if(this.gridOptionsService.is("enableRtl")){n=this.getCellToLeft(n)}else{n=this.getCellToRight(n)}break;case Te.LEFT:if(this.gridOptionsService.is("enableRtl")){n=this.getCellToRight(n)}else{n=this.getCellToLeft(n)}break;default:n=null;console.warn("AG Grid: unknown key for navigation "+t);break}if(n){r=this.isCellGoodToFocusOn(n)}else{r=true}}return n};i.prototype.isCellGoodToFocusOn=function(t){var i=t.column;var n;switch(t.rowPinned){case"top":n=this.pinnedRowModel.getPinnedTopRow(t.rowIndex);break;case"bottom":n=this.pinnedRowModel.getPinnedBottomRow(t.rowIndex);break;default:n=this.rowModel.getRow(t.rowIndex);break}if(!n){return false}var r=i.isSuppressNavigable(n);return!r};i.prototype.getCellToLeft=function(t){if(!t){return null}var i=this.columnModel.getDisplayedColBefore(t.column);if(!i){return null}return{rowIndex:t.rowIndex,column:i,rowPinned:t.rowPinned}};i.prototype.getCellToRight=function(t){if(!t){return null}var i=this.columnModel.getDisplayedColAfter(t.column);if(!i){return null}return{rowIndex:t.rowIndex,column:i,rowPinned:t.rowPinned}};i.prototype.getRowBelow=function(t){var i=t.rowIndex;var n=t.rowPinned;if(this.isLastRowInContainer(t)){switch(n){case"bottom":return null;case"top":if(this.rowModel.isRowsToRender()){return{rowIndex:this.paginationProxy.getPageFirstRow(),rowPinned:null}}if(this.pinnedRowModel.isRowsToRender("bottom")){return{rowIndex:0,rowPinned:"bottom"}}return null;default:if(this.pinnedRowModel.isRowsToRender("bottom")){return{rowIndex:0,rowPinned:"bottom"}}return null}}var r=this.rowModel.getRow(t.rowIndex);var e=this.getNextStickyPosition(r);if(e){return e}return{rowIndex:i+1,rowPinned:n}};i.prototype.getNextStickyPosition=function(t,i){if(!this.gridOptionsService.isGroupRowsSticky()||!t||!t.sticky){return}var n=kp([],Fp(this.rowRenderer.getStickyTopRowCtrls())).sort((function(t,i){return t.getRowNode().rowIndex-i.getRowNode().rowIndex}));var r=i?-1:1;var e=n.findIndex((function(i){return i.getRowNode().rowIndex===t.rowIndex}));var s=n[e+r];if(s){return{rowIndex:s.getRowNode().rowIndex,rowPinned:null}}};i.prototype.getCellBelow=function(t){if(!t){return null}var i=this.getRowBelow(t);if(i){return{rowIndex:i.rowIndex,column:t.column,rowPinned:i.rowPinned}}return null};i.prototype.isLastRowInContainer=function(t){var i=t.rowPinned;var n=t.rowIndex;if(i==="top"){var r=this.pinnedRowModel.getPinnedTopRowData().length-1;return r<=n}if(i==="bottom"){var e=this.pinnedRowModel.getPinnedBottomRowData().length-1;return e<=n}var s=this.paginationProxy.getPageLastRow();return s<=n};i.prototype.getRowAbove=function(t){var i=t.rowIndex;var n=t.rowPinned;var r=n?i===0:i===this.paginationProxy.getPageFirstRow();if(r){if(n==="top"){return null}if(!n){if(this.pinnedRowModel.isRowsToRender("top")){return this.getLastFloatingTopRow()}return null}if(this.rowModel.isRowsToRender()){return this.getLastBodyCell()}if(this.pinnedRowModel.isRowsToRender("top")){return this.getLastFloatingTopRow()}return null}var e=this.rowModel.getRow(t.rowIndex);var s=this.getNextStickyPosition(e,true);if(s){return s}return{rowIndex:i-1,rowPinned:n}};i.prototype.getCellAbove=function(t){if(!t){return null}var i=this.getRowAbove({rowIndex:t.rowIndex,rowPinned:t.rowPinned});if(i){return{rowIndex:i.rowIndex,column:t.column,rowPinned:i.rowPinned}}return null};i.prototype.getLastBodyCell=function(){var t=this.paginationProxy.getPageLastRow();return{rowIndex:t,rowPinned:null}};i.prototype.getLastFloatingTopRow=function(){var t=this.pinnedRowModel.getPinnedTopRowData().length-1;return{rowIndex:t,rowPinned:"top"}};i.prototype.getNextTabbedCell=function(t,i){if(i){return this.getNextTabbedCellBackwards(t)}return this.getNextTabbedCellForwards(t)};i.prototype.getNextTabbedCellForwards=function(t){var i=this.columnModel.getAllDisplayedColumns();var r=t.rowIndex;var e=t.rowPinned;var s=this.columnModel.getDisplayedColAfter(t.column);if(!s){s=i[0];var o=this.getRowBelow(t);if(n(o)){return null}if(!o.rowPinned&&!this.paginationProxy.isRowInPage(o)){return null}r=o?o.rowIndex:null;e=o?o.rowPinned:null}return{rowIndex:r,column:s,rowPinned:e}};i.prototype.getNextTabbedCellBackwards=function(t){var i=this.columnModel.getAllDisplayedColumns();var r=t.rowIndex;var e=t.rowPinned;var s=this.columnModel.getDisplayedColBefore(t.column);if(!s){s=xt(i);var o=this.getRowAbove({rowIndex:t.rowIndex,rowPinned:t.rowPinned});if(n(o)){return null}if(!o.rowPinned&&!this.paginationProxy.isRowInPage(o)){return null}r=o?o.rowIndex:null;e=o?o.rowPinned:null}return{rowIndex:r,column:s,rowPinned:e}};Ap([ut("columnModel")],i.prototype,"columnModel",void 0);Ap([ut("rowModel")],i.prototype,"rowModel",void 0);Ap([ut("rowRenderer")],i.prototype,"rowRenderer",void 0);Ap([ut("pinnedRowModel")],i.prototype,"pinnedRowModel",void 0);Ap([ut("paginationProxy")],i.prototype,"paginationProxy",void 0);i=Ap([ot("cellNavigationService")],i);return i}(ri);var Mp=function(){var t=function(i,n){t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var n in i)if(Object.prototype.hasOwnProperty.call(i,n))t[n]=i[n]};return t(i,n)};return function(i,n){if(typeof n!=="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(i,n);function r(){this.constructor=i}i.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}();var Dp=function(t,i,n,r){var e=arguments.length,s=e<3?i:r===null?r=Object.getOwnPropertyDescriptor(i,n):r,o;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")s=Reflect.decorate(t,i,n,r);else for(var u=t.length-1;u>=0;u--)if(o=t[u])s=(e<3?o(s):e>3?o(i,n,s):o(i,n))||s;return e>3&&s&&Object.defineProperty(i,n,s),s};var Gp=function(t,i){return function(n,r){i(n,r,t)}};var Pp=function(t){Mp(i,t);function i(){var i=t!==null&&t.apply(this,arguments)||this;i.consuming=false;return i}i.prototype.setBeans=function(t){this.logger=t.create("AlignedGridsService")};i.prototype.init=function(){this.addManagedListener(this.eventService,hi.EVENT_COLUMN_MOVED,this.fireColumnEvent.bind(this));this.addManagedListener(this.eventService,hi.EVENT_COLUMN_VISIBLE,this.fireColumnEvent.bind(this));this.addManagedListener(this.eventService,hi.EVENT_COLUMN_PINNED,this.fireColumnEvent.bind(this));this.addManagedListener(this.eventService,hi.EVENT_COLUMN_GROUP_OPENED,this.fireColumnEvent.bind(this));this.addManagedListener(this.eventService,hi.EVENT_COLUMN_RESIZED,this.fireColumnEvent.bind(this));this.addManagedListener(this.eventService,hi.EVENT_BODY_SCROLL,this.fireScrollEvent.bind(this))};i.prototype.fireEvent=function(t){if(this.consuming){return}var i=this.gridOptionsService.get("alignedGrids");if(i){i.forEach((function(i){if(i.api){var n=i.api.__getAlignedGridService();t(n)}}))}};i.prototype.onEvent=function(t){this.consuming=true;t();this.consuming=false};i.prototype.fireColumnEvent=function(t){this.fireEvent((function(i){i.onColumnEvent(t)}))};i.prototype.fireScrollEvent=function(t){if(t.direction!=="horizontal"){return}this.fireEvent((function(i){i.onScrollEvent(t)}))};i.prototype.onScrollEvent=function(t){var i=this;this.onEvent((function(){var n=i.ctrlsService.getGridBodyCtrl();n.getScrollFeature().setHorizontalScrollPosition(t.left,true)}))};i.prototype.getMasterColumns=function(t){var i=[];if(t.columns){t.columns.forEach((function(t){i.push(t)}))}else if(t.column){i.push(t.column)}return i};i.prototype.getColumnIds=function(t){var i=[];if(t.columns){t.columns.forEach((function(t){i.push(t.getColId())}))}else if(t.column){i.push(t.column.getColId())}return i};i.prototype.onColumnEvent=function(t){var i=this;this.onEvent((function(){switch(t.type){case hi.EVENT_COLUMN_MOVED:case hi.EVENT_COLUMN_VISIBLE:case hi.EVENT_COLUMN_PINNED:case hi.EVENT_COLUMN_RESIZED:var n=t;i.processColumnEvent(n);break;case hi.EVENT_COLUMN_GROUP_OPENED:var r=t;i.processGroupOpenedEvent(r);break;case hi.EVENT_COLUMN_PIVOT_CHANGED:console.warn("AG Grid: pivoting is not supported with aligned grids. "+"You can only use one of these features at a time in a grid.");break}}))};i.prototype.processGroupOpenedEvent=function(t){var i=t.columnGroup;var n=null;if(i){var r=i.getGroupId();n=this.columnModel.getProvidedColumnGroup(r)}if(i&&!n){return}this.logger.log("onColumnEvent-> processing "+t+" expanded = "+i.isExpanded());this.columnModel.setColumnGroupOpened(n,i.isExpanded(),"alignedGridChanged")};i.prototype.processColumnEvent=function(t){var i=this;var n;var r=t.column;var e=null;if(r){e=this.columnModel.getPrimaryColumn(r.getColId())}if(r&&!e){return}var s=this.getMasterColumns(t);switch(t.type){case hi.EVENT_COLUMN_MOVED:{var o=t;var u=t.columnApi.getColumnState();var a=u.map((function(t){return{colId:t.colId}}));this.columnModel.applyColumnState({state:a,applyOrder:true},"alignedGridChanged");this.logger.log("onColumnEvent-> processing "+t.type+" toIndex = "+o.toIndex)}break;case hi.EVENT_COLUMN_VISIBLE:{var f=t;var u=t.columnApi.getColumnState();var a=u.map((function(t){return{colId:t.colId,hide:t.hide}}));this.columnModel.applyColumnState({state:a},"alignedGridChanged");this.logger.log("onColumnEvent-> processing "+t.type+" visible = "+f.visible)}break;case hi.EVENT_COLUMN_PINNED:{var h=t;var u=t.columnApi.getColumnState();var a=u.map((function(t){return{colId:t.colId,pinned:t.pinned}}));this.columnModel.applyColumnState({state:a},"alignedGridChanged");this.logger.log("onColumnEvent-> processing "+t.type+" pinned = "+h.pinned)}break;case hi.EVENT_COLUMN_RESIZED:var c=t;var l={};s.forEach((function(n){i.logger.log("onColumnEvent-> processing "+t.type+" actualWidth = "+n.getActualWidth());l[n.getId()]={key:n.getColId(),newWidth:n.getActualWidth()}}));(n=c.flexColumns)===null||n===void 0?void 0:n.forEach((function(t){if(l[t.getId()]){delete l[t.getId()]}}));this.columnModel.setColumnWidths(Object.values(l),false,c.finished,"alignedGridChanged");break}var v=this.ctrlsService.getGridBodyCtrl();var d=v.isVerticalScrollShowing();var p=this.gridOptionsService.get("alignedGrids");if(p){p.forEach((function(t){if(t.api){t.api.setAlwaysShowVerticalScroll(d)}}))}};Dp([ut("columnModel")],i.prototype,"columnModel",void 0);Dp([ut("ctrlsService")],i.prototype,"ctrlsService",void 0);Dp([Gp(0,ht("loggerFactory"))],i.prototype,"setBeans",null);Dp([et],i.prototype,"init",null);i=Dp([ot("alignedGridsService")],i);return i}(ri);var Ep=function(){var t=function(i,n){t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var n in i)if(Object.prototype.hasOwnProperty.call(i,n))t[n]=i[n]};return t(i,n)};return function(i,n){if(typeof n!=="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(i,n);function r(){this.constructor=i}i.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}();var Ip=function(t,i,n,r){var e=arguments.length,s=e<3?i:r===null?r=Object.getOwnPropertyDescriptor(i,n):r,o;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")s=Reflect.decorate(t,i,n,r);else for(var u=t.length-1;u>=0;u--)if(o=t[u])s=(e<3?o(s):e>3?o(i,n,s):o(i,n))||s;return e>3&&s&&Object.defineProperty(i,n,s),s};var Np=function(t,i){return function(n,r){i(n,r,t)}};var Hp=function(t,i){var n=typeof Symbol==="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),e,s=[],o;try{while((i===void 0||i-- >0)&&!(e=r.next()).done)s.push(e.value)}catch(t){o={error:t}}finally{try{if(e&&!e.done&&(n=r["return"]))n.call(r)}finally{if(o)throw o.error}}return s};var Lp=function(t){Ep(n,t);function n(){return t!==null&&t.apply(this,arguments)||this}n.prototype.setBeans=function(t){this.logger=t.create("selectionService");this.reset()};n.prototype.init=function(){var t=this;this.groupSelectsChildren=this.gridOptionsService.is("groupSelectsChildren");this.addManagedPropertyListener("groupSelectsChildren",(function(i){return t.groupSelectsChildren=i.currentValue}));this.rowSelection=this.gridOptionsService.get("rowSelection");this.addManagedPropertyListener("rowSelection",(function(i){return t.rowSelection=i.currentValue}));this.addManagedListener(this.eventService,hi.EVENT_ROW_SELECTED,this.onRowSelected.bind(this))};n.prototype.isMultiselect=function(){return this.rowSelection==="multiple"};n.prototype.setNodesSelected=function(t){var i;if(t.nodes.length===0)return 0;var n=t.newValue,r=t.clearSelection,e=t.suppressFinishActions,s=t.rangeSelect;var o=t.source,u=o===void 0?"api":o;if(t.nodes.length>1&&!this.isMultiselect()){console.warn("AG Grid: cannot multi select while rowSelection='single'");return 0}var a=this.groupSelectsChildren&&t.groupSelectsFiltered===true;var f=t.nodes.map((function(t){return t.footer?t.sibling:t}));if(s){if(t.nodes.length>1){console.warn("AG Grid: cannot range select while selecting multiple rows");return 0}var h=this.getLastSelectedNode();if(h){var c=f[0];var l=h!==c;if(l&&this.isMultiselect()){var v=this.selectRange(c,h,t.newValue,u);this.setLastSelectedNode(c);return v}}}var d=0;for(var p=0;p<f.length;p++){var c=f[p];var g=a&&c.group;if(!g){var b=c.selectThisNode(n,t.event,u);if(b){d++}}if(this.groupSelectsChildren&&((i=c.childrenAfterGroup)===null||i===void 0?void 0:i.length)){d+=this.selectChildren(c,n,a,u)}}if(!e){var w=n&&(r||!this.isMultiselect());if(w){d+=this.clearOtherNodes(f[0],u)}if(d>0){this.updateGroupsFromChildrenSelections(u);var y={type:hi.EVENT_SELECTION_CHANGED,source:u};this.eventService.dispatchEvent(y)}if(n){this.setLastSelectedNode(f[f.length-1])}}return d};n.prototype.selectRange=function(t,i,n,r){var e=this;if(n===void 0){n=true}var s=this.rowModel.getNodesInRangeForSelection(t,i);var o=0;s.forEach((function(i){if(i.group&&e.groupSelectsChildren||n===false&&t===i){return}var s=i.selectThisNode(n,undefined,r);if(s){o++}}));this.updateGroupsFromChildrenSelections(r);var u={type:hi.EVENT_SELECTION_CHANGED,source:r};this.eventService.dispatchEvent(u);return o};n.prototype.selectChildren=function(t,i,n,r){var e=n?t.childrenAfterAggFilter:t.childrenAfterGroup;if(Xe.missing(e)){return 0}return this.setNodesSelected({newValue:i,clearSelection:false,suppressFinishActions:true,groupSelectsFiltered:n,source:r,nodes:e})};n.prototype.setLastSelectedNode=function(t){this.lastSelectedNode=t};n.prototype.getLastSelectedNode=function(){return this.lastSelectedNode};n.prototype.getSelectedNodes=function(){var t=[];g(this.selectedNodes,(function(i,n){if(n){t.push(n)}}));return t};n.prototype.getSelectedRows=function(){var t=[];g(this.selectedNodes,(function(i,n){if(n&&n.data){t.push(n.data)}}));return t};n.prototype.getSelectionCount=function(){return Object.values(this.selectedNodes).length};n.prototype.filterFromSelection=function(t){var i={};Object.entries(this.selectedNodes).forEach((function(n){var r=Hp(n,2),e=r[0],s=r[1];var o=s&&t(s);if(o){i[e]=s}}));this.selectedNodes=i};n.prototype.updateGroupsFromChildrenSelections=function(t,i){if(!this.groupSelectsChildren){return false}if(this.rowModel.getType()!=="clientSide"){return false}var n=this.rowModel;var r=n.getRootNode();if(!i){i=new rd(true,r);i.setInactive()}var e=false;i.forEachChangedNodeDepthFirst((function(i){if(i!==r){var n=i.calculateSelectedFromChildren();e=i.selectThisNode(n===null?false:n,undefined,t)||e}}));return e};n.prototype.clearOtherNodes=function(t,i){var n=this;var r={};var e=0;g(this.selectedNodes,(function(s,o){if(o&&o.id!==t.id){var u=n.selectedNodes[o.id];e+=u.setSelectedParams({newValue:false,clearSelection:false,suppressFinishActions:true,source:i});if(n.groupSelectsChildren&&o.parent){r[o.parent.id]=o.parent}}}));g(r,(function(t,n){var r=n.calculateSelectedFromChildren();n.selectThisNode(r===null?false:r,undefined,i)}));return e};n.prototype.onRowSelected=function(t){var i=t.node;if(this.groupSelectsChildren&&i.group){return}if(i.isSelected()){this.selectedNodes[i.id]=i}else{delete this.selectedNodes[i.id]}};n.prototype.syncInRowNode=function(t,i){this.syncInOldRowNode(t,i);this.syncInNewRowNode(t)};n.prototype.syncInOldRowNode=function(t,n){var r=i(n)&&t.id!==n.id;if(r&&n){var e=n.id;var s=this.selectedNodes[e]==t;if(s){this.selectedNodes[n.id]=n}}};n.prototype.syncInNewRowNode=function(t){if(i(this.selectedNodes[t.id])){t.setSelectedInitialValue(true);this.selectedNodes[t.id]=t}else{t.setSelectedInitialValue(false)}};n.prototype.reset=function(){this.logger.log("reset");this.selectedNodes={};this.lastSelectedNode=null};n.prototype.getBestCostNodeSelection=function(){if(this.rowModel.getType()!=="clientSide"){return}var t=this.rowModel;var i=t.getTopLevelNodes();if(i===null){return}var n=[];function r(t){for(var i=0,e=t.length;i<e;i++){var s=t[i];if(s.isSelected()){n.push(s)}else{var o=s;if(o.group&&o.children){r(o.children)}}}}r(i);return n};n.prototype.isEmpty=function(){var t=0;g(this.selectedNodes,(function(i,n){if(n){t++}}));return t===0};n.prototype.deselectAllRowNodes=function(t){var i=function(t){return t.selectThisNode(false,undefined,r)};var n=this.rowModel.getType()==="clientSide";var r=t.source,e=t.justFiltered,s=t.justCurrentPage;if(s||e){if(!n){console.error("AG Grid: selecting just filtered only works when gridOptions.rowModelType='clientSide'");return}this.getNodesToSelect(e,s).forEach(i)}else{g(this.selectedNodes,(function(t,n){if(n){i(n)}}));this.reset()}if(n&&this.groupSelectsChildren){this.updateGroupsFromChildrenSelections(r)}var o={type:hi.EVENT_SELECTION_CHANGED,source:r};this.eventService.dispatchEvent(o)};n.prototype.getSelectAllState=function(t,i){var n=this;var r=0;var e=0;var s=function(t){if(n.groupSelectsChildren&&t.group){return}if(t.isSelected()){r++}else if(!t.selectable);else{e++}};this.getNodesToSelect(t,i).forEach(s);if(r===0&&e===0){return false}if(r>0&&e>0){return null}return r>0};n.prototype.getNodesToSelect=function(t,i){var n=this;if(t===void 0){t=false}if(i===void 0){i=false}if(this.rowModel.getType()!=="clientSide"){throw new Error("selectAll only available when rowModelType='clientSide', ie not "+this.rowModel.getType())}var r=[];if(i){this.paginationProxy.forEachNodeOnPage((function(t){if(!t.group){r.push(t);return}if(!t.expanded){var i=function(t){var n;r.push(t);if((n=t.childrenAfterFilter)===null||n===void 0?void 0:n.length){t.childrenAfterFilter.forEach(i)}};i(t);return}if(!n.groupSelectsChildren){r.push(t)}}));return r}var e=this.rowModel;if(t){e.forEachNodeAfterFilter((function(t){r.push(t)}));return r}e.forEachNode((function(t){r.push(t)}));return r};n.prototype.selectAllRowNodes=function(t){if(this.rowModel.getType()!=="clientSide"){throw new Error("selectAll only available when rowModelType='clientSide', ie not "+this.rowModel.getType())}var i=t.source,n=t.justFiltered,r=t.justCurrentPage;var e=function(t){return t.selectThisNode(true,undefined,i)};this.getNodesToSelect(n,r).forEach(e);if(this.rowModel.getType()==="clientSide"&&this.groupSelectsChildren){this.updateGroupsFromChildrenSelections(i)}var s={type:hi.EVENT_SELECTION_CHANGED,source:i};this.eventService.dispatchEvent(s)};n.prototype.getServerSideSelectionState=function(){return null};n.prototype.setServerSideSelectionState=function(t){};Ip([ut("rowModel")],n.prototype,"rowModel",void 0);Ip([ut("paginationProxy")],n.prototype,"paginationProxy",void 0);Ip([Np(0,ht("loggerFactory"))],n.prototype,"setBeans",null);Ip([et],n.prototype,"init",null);n=Ip([ot("selectionService")],n);return n}(ri);var Vp=function(t,i,n,r){var e=arguments.length,s=e<3?i:r===null?r=Object.getOwnPropertyDescriptor(i,n):r,o;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")s=Reflect.decorate(t,i,n,r);else for(var u=t.length-1;u>=0;u--)if(o=t[u])s=(e<3?o(s):e>3?o(i,n,s):o(i,n))||s;return e>3&&s&&Object.defineProperty(i,n,s),s};var Bp=function(){function t(){}t.prototype.sizeColumnsToFit=function(t){if(typeof t==="undefined"){console.error("AG Grid: missing parameter to columnApi.sizeColumnsToFit(gridWidth)")}this.columnModel.sizeColumnsToFit(t,"api")};t.prototype.setColumnGroupOpened=function(t,i){this.columnModel.setColumnGroupOpened(t,i,"api")};t.prototype.getColumnGroup=function(t,i){return this.columnModel.getColumnGroup(t,i)};t.prototype.getProvidedColumnGroup=function(t){return this.columnModel.getProvidedColumnGroup(t)};t.prototype.getDisplayNameForColumn=function(t,i){return this.columnModel.getDisplayNameForColumn(t,i)||""};t.prototype.getDisplayNameForColumnGroup=function(t,i){return this.columnModel.getDisplayNameForColumnGroup(t,i)||""};t.prototype.getColumn=function(t){return this.columnModel.getPrimaryColumn(t)};t.prototype.getColumns=function(){return this.columnModel.getAllPrimaryColumns()};t.prototype.applyColumnState=function(t){return this.columnModel.applyColumnState(t,"api")};t.prototype.getColumnState=function(){return this.columnModel.getColumnState()};t.prototype.resetColumnState=function(){this.columnModel.resetColumnState("api")};t.prototype.getColumnGroupState=function(){return this.columnModel.getColumnGroupState()};t.prototype.setColumnGroupState=function(t){this.columnModel.setColumnGroupState(t,"api")};t.prototype.resetColumnGroupState=function(){this.columnModel.resetColumnGroupState("api")};t.prototype.isPinning=function(){return this.columnModel.isPinningLeft()||this.columnModel.isPinningRight()};t.prototype.isPinningLeft=function(){return this.columnModel.isPinningLeft()};t.prototype.isPinningRight=function(){return this.columnModel.isPinningRight()};t.prototype.getDisplayedColAfter=function(t){return this.columnModel.getDisplayedColAfter(t)};t.prototype.getDisplayedColBefore=function(t){return this.columnModel.getDisplayedColBefore(t)};t.prototype.setColumnVisible=function(t,i){this.columnModel.setColumnVisible(t,i,"api")};t.prototype.setColumnsVisible=function(t,i){this.columnModel.setColumnsVisible(t,i,"api")};t.prototype.setColumnPinned=function(t,i){this.columnModel.setColumnPinned(t,i,"api")};t.prototype.setColumnsPinned=function(t,i){this.columnModel.setColumnsPinned(t,i,"api")};t.prototype.getAllGridColumns=function(){return this.columnModel.getAllGridColumns()};t.prototype.getDisplayedLeftColumns=function(){return this.columnModel.getDisplayedLeftColumns()};t.prototype.getDisplayedCenterColumns=function(){return this.columnModel.getDisplayedCenterColumns()};t.prototype.getDisplayedRightColumns=function(){return this.columnModel.getDisplayedRightColumns()};t.prototype.getAllDisplayedColumns=function(){return this.columnModel.getAllDisplayedColumns()};t.prototype.getAllDisplayedVirtualColumns=function(){return this.columnModel.getViewportColumns()};t.prototype.moveColumn=function(t,i){this.columnModel.moveColumn(t,i,"api")};t.prototype.moveColumnByIndex=function(t,i){this.columnModel.moveColumnByIndex(t,i,"api")};t.prototype.moveColumns=function(t,i){this.columnModel.moveColumns(t,i,"api")};t.prototype.moveRowGroupColumn=function(t,i){this.columnModel.moveRowGroupColumn(t,i)};t.prototype.setColumnAggFunc=function(t,i){this.columnModel.setColumnAggFunc(t,i)};t.prototype.setColumnWidth=function(t,i,n,r){if(n===void 0){n=true}this.columnModel.setColumnWidths([{key:t,newWidth:i}],false,n,r)};t.prototype.setColumnWidths=function(t,i,n){if(i===void 0){i=true}this.columnModel.setColumnWidths(t,false,i,n)};t.prototype.setPivotMode=function(t){this.columnModel.setPivotMode(t)};t.prototype.isPivotMode=function(){return this.columnModel.isPivotMode()};t.prototype.getPivotResultColumn=function(t,i){return this.columnModel.getSecondaryPivotColumn(t,i)};t.prototype.setValueColumns=function(t){this.columnModel.setValueColumns(t,"api")};t.prototype.getValueColumns=function(){return this.columnModel.getValueColumns()};t.prototype.removeValueColumn=function(t){this.columnModel.removeValueColumn(t,"api")};t.prototype.removeValueColumns=function(t){this.columnModel.removeValueColumns(t,"api")};t.prototype.addValueColumn=function(t){this.columnModel.addValueColumn(t,"api")};t.prototype.addValueColumns=function(t){this.columnModel.addValueColumns(t,"api")};t.prototype.setRowGroupColumns=function(t){this.columnModel.setRowGroupColumns(t,"api")};t.prototype.removeRowGroupColumn=function(t){this.columnModel.removeRowGroupColumn(t,"api")};t.prototype.removeRowGroupColumns=function(t){this.columnModel.removeRowGroupColumns(t,"api")};t.prototype.addRowGroupColumn=function(t){this.columnModel.addRowGroupColumn(t,"api")};t.prototype.addRowGroupColumns=function(t){this.columnModel.addRowGroupColumns(t,"api")};t.prototype.getRowGroupColumns=function(){return this.columnModel.getRowGroupColumns()};t.prototype.setPivotColumns=function(t){this.columnModel.setPivotColumns(t,"api")};t.prototype.removePivotColumn=function(t){this.columnModel.removePivotColumn(t,"api")};t.prototype.removePivotColumns=function(t){this.columnModel.removePivotColumns(t,"api")};t.prototype.addPivotColumn=function(t){this.columnModel.addPivotColumn(t,"api")};t.prototype.addPivotColumns=function(t){this.columnModel.addPivotColumns(t,"api")};t.prototype.getPivotColumns=function(){return this.columnModel.getPivotColumns()};t.prototype.getLeftDisplayedColumnGroups=function(){return this.columnModel.getDisplayedTreeLeft()};t.prototype.getCenterDisplayedColumnGroups=function(){return this.columnModel.getDisplayedTreeCentre()};t.prototype.getRightDisplayedColumnGroups=function(){return this.columnModel.getDisplayedTreeRight()};t.prototype.getAllDisplayedColumnGroups=function(){return this.columnModel.getAllDisplayedTrees()};t.prototype.autoSizeColumn=function(t,i){return this.columnModel.autoSizeColumn(t,i,"api")};t.prototype.autoSizeColumns=function(t,i){this.columnModel.autoSizeColumns({columns:t,skipHeader:i})};t.prototype.autoSizeAllColumns=function(t){this.columnModel.autoSizeAllColumns(t,"api")};t.prototype.setPivotResultColumns=function(t){this.columnModel.setSecondaryColumns(t,"api")};t.prototype.getPivotResultColumns=function(){return this.columnModel.getSecondaryColumns()};t.prototype.cleanDownReferencesToAvoidMemoryLeakInCaseApplicationIsKeepingReferenceToDestroyedGrid=function(){setTimeout(Xe.removeAllReferences.bind(window,this,"Column API"),100)};t.prototype.getAllColumns=function(){Wi("28.0","getAllColumns","getColumns");return this.getColumns()};t.prototype.getPrimaryColumns=function(){Wi("28.0","getPrimaryColumns","getColumns");return this.getColumns()};t.prototype.getSecondaryColumns=function(){Wi("28.0","getSecondaryColumns","getPivotResultColumns");return this.getPivotResultColumns()};t.prototype.setSecondaryColumns=function(t){Wi("28.0","setSecondaryColumns","setPivotResultColumns");this.setPivotResultColumns(t)};t.prototype.getSecondaryPivotColumn=function(t,i){Wi("28.0","getSecondaryPivotColumn","getPivotResultColumn");return this.getPivotResultColumn(t,i)};Vp([ut("columnModel")],t.prototype,"columnModel",void 0);Vp([st],t.prototype,"cleanDownReferencesToAvoidMemoryLeakInCaseApplicationIsKeepingReferenceToDestroyedGrid",null);t=Vp([ot("columnApi")],t);return t}();var zp=function(){var t=function(i,n){t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var n in i)if(Object.prototype.hasOwnProperty.call(i,n))t[n]=i[n]};return t(i,n)};return function(i,n){if(typeof n!=="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(i,n);function r(){this.constructor=i}i.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}();var Wp=function(t,i,n,r){var e=arguments.length,s=e<3?i:r===null?r=Object.getOwnPropertyDescriptor(i,n):r,o;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")s=Reflect.decorate(t,i,n,r);else for(var u=t.length-1;u>=0;u--)if(o=t[u])s=(e<3?o(s):e>3?o(i,n,s):o(i,n))||s;return e>3&&s&&Object.defineProperty(i,n,s),s};var Up=function(t){zp(r,t);function r(){var i=t!==null&&t.apply(this,arguments)||this;i.initialised=false;i.isSsrm=false;return i}r.prototype.init=function(){var t=this;this.isSsrm=this.gridOptionsService.isRowModelType("serverSide");this.cellExpressions=this.gridOptionsService.is("enableCellExpressions");this.isTreeData=this.gridOptionsService.is("treeData");this.initialised=true;this.eventService.addEventListener(hi.EVENT_CELL_VALUE_CHANGED,(function(i){return t.callColumnCellValueChangedHandler(i)}),this.gridOptionsService.useAsyncEvents());this.addManagedPropertyListener("treeData",(function(i){return t.isTreeData=i.currentValue}))};r.prototype.getValue=function(t,i,n,r){if(n===void 0){n=false}if(r===void 0){r=false}if(!this.initialised){this.init()}if(!i){return}var e=t.getColDef();var s=e.field;var o=t.getColId();var u=i.data;var a;var f=i.groupData&&i.groupData[o]!==undefined;var h=!r&&i.aggData&&i.aggData[o]!==undefined;var c=this.isSsrm&&r&&!!t.getColDef().aggFunc;var l=this.isSsrm&&i.footer&&i.field&&(t.getColDef().showRowGroup===true||t.getColDef().showRowGroup===i.field);if(n&&e.filterValueGetter){a=this.executeFilterValueGetter(e.filterValueGetter,u,t,i)}else if(this.isTreeData&&h){a=i.aggData[o]}else if(this.isTreeData&&e.valueGetter){a=this.executeValueGetter(e.valueGetter,u,t,i)}else if(this.isTreeData&&(s&&u)){a=k(u,s,t.isFieldContainsDots())}else if(f){a=i.groupData[o]}else if(h){a=i.aggData[o]}else if(e.valueGetter){a=this.executeValueGetter(e.valueGetter,u,t,i)}else if(l){a=k(u,i.field,t.isFieldContainsDots())}else if(s&&u&&!c){a=k(u,s,t.isFieldContainsDots())}if(this.cellExpressions&&typeof a==="string"&&a.indexOf("=")===0){var v=a.substring(1);a=this.executeValueGetter(v,u,t,i)}if(a==null){var d=this.getOpenedGroup(i,t);if(d!=null){return d}}return a};r.prototype.getOpenedGroup=function(t,i){if(!this.gridOptionsService.is("showOpenedGroup")){return}var n=i.getColDef();if(!n.showRowGroup){return}var r=i.getColDef().showRowGroup;var e=t.parent;while(e!=null){if(e.rowGroupColumn&&(r===true||r===e.rowGroupColumn.getColId())){return e.key}e=e.parent}return undefined};r.prototype.setValue=function(t,r,e,s){var o=this.columnModel.getPrimaryColumn(r);if(!t||!o){return false}if(n(t.data)){t.data={}}var u=o.getColDef(),a=u.field,f=u.valueSetter;if(n(a)&&n(f)){console.warn("AG Grid: you need either field or valueSetter set on colDef for editing to work");return false}if(!this.dataTypeService.checkType(o,e)){console.warn("AG Grid: Data type of the new value does not match the cell data type of the column");return false}var h={node:t,data:t.data,oldValue:this.getValue(o,t),newValue:e,colDef:o.getColDef(),column:o,api:this.gridOptionsService.api,columnApi:this.gridOptionsService.columnApi,context:this.gridOptionsService.context};h.newValue=e;var c;if(i(f)){if(typeof f==="function"){c=f(h)}else{c=this.expressionService.evaluate(f,h)}}else{c=this.setValueUsingField(t.data,a,e,o.isFieldContainsDots())}if(c===undefined){c=true}if(!c){return false}t.resetQuickFilterAggregateText();this.valueCache.onDataChanged();h.newValue=this.getValue(o,t);var l={type:hi.EVENT_CELL_VALUE_CHANGED,event:null,rowIndex:t.rowIndex,rowPinned:t.rowPinned,column:h.column,api:h.api,columnApi:h.columnApi,colDef:h.colDef,context:h.context,data:t.data,node:t,oldValue:h.oldValue,newValue:h.newValue,value:h.newValue,source:s};this.eventService.dispatchEvent(l);return true};r.prototype.callColumnCellValueChangedHandler=function(t){var i=t.colDef.onCellValueChanged;if(typeof i==="function"){i({node:t.node,data:t.data,oldValue:t.oldValue,newValue:t.newValue,colDef:t.colDef,column:t.column,api:t.api,columnApi:t.columnApi,context:t.context})}};r.prototype.setValueUsingField=function(t,i,n,r){if(!i){return false}var e=false;if(!r){e=t[i]===n;if(!e){t[i]=n}}else{var s=i.split(".");var o=t;while(s.length>0&&o){var u=s.shift();if(s.length===0){e=o[u]===n;if(!e){o[u]=n}}else{o=o[u]}}}return!e};r.prototype.executeFilterValueGetter=function(t,i,n,r){var e={data:i,node:r,column:n,colDef:n.getColDef(),api:this.gridOptionsService.api,columnApi:this.gridOptionsService.columnApi,context:this.gridOptionsService.context,getValue:this.getValueCallback.bind(this,r)};if(typeof t==="function"){return t(e)}return this.expressionService.evaluate(t,e)};r.prototype.executeValueGetter=function(t,i,n,r){var e=n.getColId();var s=this.valueCache.getValue(r,e);if(s!==undefined){return s}var o={data:i,node:r,column:n,colDef:n.getColDef(),api:this.gridOptionsService.api,columnApi:this.gridOptionsService.columnApi,context:this.gridOptionsService.context,getValue:this.getValueCallback.bind(this,r)};var u;if(typeof t==="function"){u=t(o)}else{u=this.expressionService.evaluate(t,o)}this.valueCache.setValue(r,e,u);return u};r.prototype.getValueCallback=function(t,i){var n=this.columnModel.getPrimaryColumn(i);if(n){return this.getValue(n,t)}return null};r.prototype.getKeyForNode=function(t,i){var n=this.getValue(t,i);var r=t.getColDef().keyCreator;var e=n;if(r){var s={value:n,colDef:t.getColDef(),column:t,node:i,data:i.data,api:this.gridOptionsService.api,columnApi:this.gridOptionsService.columnApi,context:this.gridOptionsService.context};e=r(s)}if(typeof e==="string"||e==null){return e}e=String(e);if(e==="[object Object]"){P((function(){console.warn("AG Grid: a column you are grouping or pivoting by has objects as values. If you want to group by complex objects then either a) use a colDef.keyCreator (se AG Grid docs) or b) to toString() on the object to return a key")}),"getKeyForNode - warn about [object,object]")}return e};Wp([ut("expressionService")],r.prototype,"expressionService",void 0);Wp([ut("columnModel")],r.prototype,"columnModel",void 0);Wp([ut("valueCache")],r.prototype,"valueCache",void 0);Wp([ut("dataTypeService")],r.prototype,"dataTypeService",void 0);Wp([et],r.prototype,"init",null);r=Wp([ot("valueService")],r);return r}(ri);var Kp=function(){var t=function(i,n){t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var n in i)if(Object.prototype.hasOwnProperty.call(i,n))t[n]=i[n]};return t(i,n)};return function(i,n){if(typeof n!=="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(i,n);function r(){this.constructor=i}i.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}();var qp=function(t,i,n,r){var e=arguments.length,s=e<3?i:r===null?r=Object.getOwnPropertyDescriptor(i,n):r,o;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")s=Reflect.decorate(t,i,n,r);else for(var u=t.length-1;u>=0;u--)if(o=t[u])s=(e<3?o(s):e>3?o(i,n,s):o(i,n))||s;return e>3&&s&&Object.defineProperty(i,n,s),s};var Yp=function(t,i){return function(n,r){i(n,r,t)}};var Qp=function(t){Kp(i,t);function i(){var i=t!==null&&t.apply(this,arguments)||this;i.expressionToFunctionCache={};return i}i.prototype.setBeans=function(t){this.logger=t.create("ExpressionService")};i.prototype.evaluate=function(t,i){if(typeof t==="string"){return this.evaluateExpression(t,i)}else{console.error("AG Grid: value should be either a string or a function",t)}};i.prototype.evaluateExpression=function(t,i){try{var n=this.createExpressionFunction(t);var r=n(i.value,i.context,i.oldValue,i.newValue,i.value,i.node,i.data,i.colDef,i.rowIndex,i.api,i.columnApi,i.getValue,i.column,i.columnGroup);return r}catch(n){console.log("Processing of the expression failed");console.log("Expression = "+t);console.log("Params =",i);console.log("Exception = "+n);return null}};i.prototype.createExpressionFunction=function(t){if(this.expressionToFunctionCache[t]){return this.expressionToFunctionCache[t]}var i=this.createFunctionBody(t);var n=new Function("x, ctx, oldValue, newValue, value, node, data, colDef, rowIndex, api, columnApi, getValue, column, columnGroup",i);this.expressionToFunctionCache[t]=n;return n};i.prototype.createFunctionBody=function(t){if(t.indexOf("return")>=0){return t}else{return"return "+t+";"}};qp([Yp(0,ht("loggerFactory"))],i.prototype,"setBeans",null);i=qp([ot("expressionService")],i);return i}(ri);var Jp=function(){var t=function(i,n){t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var n in i)if(Object.prototype.hasOwnProperty.call(i,n))t[n]=i[n]};return t(i,n)};return function(i,n){if(typeof n!=="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(i,n);function r(){this.constructor=i}i.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}();var Zp=function(t,i,n,r){var e=arguments.length,s=e<3?i:r===null?r=Object.getOwnPropertyDescriptor(i,n):r,o;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")s=Reflect.decorate(t,i,n,r);else for(var u=t.length-1;u>=0;u--)if(o=t[u])s=(e<3?o(s):e>3?o(i,n,s):o(i,n))||s;return e>3&&s&&Object.defineProperty(i,n,s),s};var $p=function(t){Jp(i,t);function i(){var i=t!==null&&t.apply(this,arguments)||this;i.templateCache={};i.waitingCallbacks={};return i}i.prototype.getTemplate=function(t,i){var n=this.templateCache[t];if(n){return n}var r=this.waitingCallbacks[t];var e=this;if(!r){r=[];this.waitingCallbacks[t]=r;var s=new XMLHttpRequest;s.onload=function(){e.handleHttpResult(this,t)};s.open("GET",t);s.send()}if(i){r.push(i)}return null};i.prototype.handleHttpResult=function(t,i){if(t.status!==200||t.response===null){console.warn("AG Grid: Unable to get template error "+t.status+" - "+i);return}this.templateCache[i]=t.response||t.responseText;var n=this.waitingCallbacks[i];for(var r=0;r<n.length;r++){var e=n[r];e()}};i=Zp([ot("templateService")],i);return i}(ri);var Xp=function(){var t=function(i,n){t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var n in i)if(Object.prototype.hasOwnProperty.call(i,n))t[n]=i[n]};return t(i,n)};return function(i,n){if(typeof n!=="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(i,n);function r(){this.constructor=i}i.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}();var tg=function(t,i,n,r){var e=arguments.length,s=e<3?i:r===null?r=Object.getOwnPropertyDescriptor(i,n):r,o;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")s=Reflect.decorate(t,i,n,r);else for(var u=t.length-1;u>=0;u--)if(o=t[u])s=(e<3?o(s):e>3?o(i,n,s):o(i,n))||s;return e>3&&s&&Object.defineProperty(i,n,s),s};var ig=function(t,i){return function(n,r){i(n,r,t)}};var ng=function(t){Xp(i,t);function i(){return t!==null&&t.apply(this,arguments)||this}i.prototype.setBeans=function(t){this.logging=t.is("debug")};i.prototype.create=function(t){return new rg(t,this.isLogging.bind(this))};i.prototype.isLogging=function(){return this.logging};tg([ig(0,ht("gridOptionsService"))],i.prototype,"setBeans",null);i=tg([ot("loggerFactory")],i);return i}(ri);var rg=function(){function t(t,i){this.name=t;this.isLoggingFunc=i}t.prototype.isLogging=function(){return this.isLoggingFunc()};t.prototype.log=function(t){if(this.isLoggingFunc()){console.log("AG Grid."+this.name+": "+t)}};return t}();var eg=function(){var t=function(i,n){t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var n in i)if(Object.prototype.hasOwnProperty.call(i,n))t[n]=i[n]};return t(i,n)};return function(i,n){if(typeof n!=="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(i,n);function r(){this.constructor=i}i.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}();var sg=function(t,i,n,r){var e=arguments.length,s=e<3?i:r===null?r=Object.getOwnPropertyDescriptor(i,n):r,o;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")s=Reflect.decorate(t,i,n,r);else for(var u=t.length-1;u>=0;u--)if(o=t[u])s=(e<3?o(s):e>3?o(i,n,s):o(i,n))||s;return e>3&&s&&Object.defineProperty(i,n,s),s};var og=function(t){eg(i,t);function i(){return t!==null&&t.apply(this,arguments)||this}i.prototype.setComp=function(t,i,n){var r=this;this.view=t;this.eGridHostDiv=i;this.eGui=n;this.eGui.setAttribute("grid-id",this.context.getGridId());this.dragAndDropService.addDropTarget({getContainer:function(){return r.eGui},isInterestedIn:function(t){return t===Eu.HeaderCell||t===Eu.ToolPanel},getIconName:function(){return Hu.ICON_NOT_ALLOWED}});this.mouseEventService.stampTopLevelGridCompWithGridInstance(i);this.createManagedBean(new Rf(this.view));this.addRtlSupport();this.addManagedListener(this,hi.EVENT_KEYBOARD_FOCUS,(function(){r.view.addOrRemoveKeyboardFocusClass(true)}));this.addManagedListener(this,hi.EVENT_MOUSE_FOCUS,(function(){r.view.addOrRemoveKeyboardFocusClass(false)}));var e=this.resizeObserverService.observeResize(this.eGridHostDiv,this.onGridSizeChanged.bind(this));this.addDestroyFunc((function(){return e()}));this.ctrlsService.registerGridCtrl(this)};i.prototype.isDetailGrid=function(){var t;var i=this.focusService.findTabbableParent(this.getGui());return((t=i===null||i===void 0?void 0:i.getAttribute("row-id"))===null||t===void 0?void 0:t.startsWith("detail"))||false};i.prototype.showDropZones=function(){return X.__isRegistered(J.RowGroupingModule,this.context.getGridId())};i.prototype.showSideBar=function(){return X.__isRegistered(J.SideBarModule,this.context.getGridId())};i.prototype.showStatusBar=function(){return X.__isRegistered(J.StatusBarModule,this.context.getGridId())};i.prototype.showWatermark=function(){return X.__isRegistered(J.EnterpriseCoreModule,this.context.getGridId())};i.prototype.onGridSizeChanged=function(){var t={type:hi.EVENT_GRID_SIZE_CHANGED,clientWidth:this.eGridHostDiv.clientWidth,clientHeight:this.eGridHostDiv.clientHeight};this.eventService.dispatchEvent(t)};i.prototype.addRtlSupport=function(){var t=this.gridOptionsService.is("enableRtl")?"ag-rtl":"ag-ltr";this.view.setRtlClass(t)};i.prototype.destroyGridUi=function(){this.view.destroyGridUi()};i.prototype.getGui=function(){return this.eGui};i.prototype.setResizeCursor=function(t){this.view.setCursor(t?"ew-resize":null)};i.prototype.disableUserSelect=function(t){this.view.setUserSelect(t?"none":null)};i.prototype.focusNextInnerContainer=function(t){var i=this.gridOptionsService.getDocument();var n=this.view.getFocusableContainers();var r=n.findIndex((function(t){return t.contains(i.activeElement)}));var e=r+(t?-1:1);if(e<=0||e>=n.length){return false}return this.focusService.focusInto(n[e])};i.prototype.focusInnerElement=function(t){var i=this.view.getFocusableContainers();var n=this.columnModel.getAllDisplayedColumns();if(t){if(i.length>1){return this.focusService.focusInto(xt(i),true)}var r=xt(n);if(this.focusService.focusGridView(r,true)){return true}}if(this.gridOptionsService.getNum("headerHeight")===0){return this.focusService.focusGridView(n[0])}return this.focusService.focusFirstHeader()};i.prototype.forceFocusOutOfContainer=function(t){if(t===void 0){t=false}this.view.forceFocusOutOfContainer(t)};sg([ut("focusService")],i.prototype,"focusService",void 0);sg([ut("resizeObserverService")],i.prototype,"resizeObserverService",void 0);sg([ut("columnModel")],i.prototype,"columnModel",void 0);sg([ut("ctrlsService")],i.prototype,"ctrlsService",void 0);sg([ut("mouseEventService")],i.prototype,"mouseEventService",void 0);sg([ut("dragAndDropService")],i.prototype,"dragAndDropService",void 0);return i}(ri);var ug=function(){var t=function(i,n){t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var n in i)if(Object.prototype.hasOwnProperty.call(i,n))t[n]=i[n]};return t(i,n)};return function(i,n){if(typeof n!=="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(i,n);function r(){this.constructor=i}i.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}();var ag=function(t,i,n,r){var e=arguments.length,s=e<3?i:r===null?r=Object.getOwnPropertyDescriptor(i,n):r,o;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")s=Reflect.decorate(t,i,n,r);else for(var u=t.length-1;u>=0;u--)if(o=t[u])s=(e<3?o(s):e>3?o(i,n,s):o(i,n))||s;return e>3&&s&&Object.defineProperty(i,n,s),s};var fg=function(t){ug(i,t);function i(i){var n=t.call(this)||this;n.eGridDiv=i;return n}i.prototype.postConstruct=function(){var t=this;this.logger=this.loggerFactory.create("GridComp");var i={destroyGridUi:function(){return t.destroyBean(t)},setRtlClass:function(i){return t.addCssClass(i)},addOrRemoveKeyboardFocusClass:function(i){return t.addOrRemoveCssClass(Il.AG_KEYBOARD_FOCUS,i)},forceFocusOutOfContainer:this.forceFocusOutOfContainer.bind(this),updateLayoutClasses:this.updateLayoutClasses.bind(this),getFocusableContainers:this.getFocusableContainers.bind(this),setUserSelect:function(i){t.getGui().style.userSelect=i!=null?i:"";t.getGui().style.webkitUserSelect=i!=null?i:""},setCursor:function(i){t.getGui().style.cursor=i!=null?i:""}};this.ctrl=this.createManagedBean(new og);var n=this.createTemplate();this.setTemplate(n);this.ctrl.setComp(i,this.eGridDiv,this.getGui());this.insertGridIntoDom();this.initialiseTabGuard({onTabKeyDown:function(){return undefined},focusInnerElement:function(i){return t.ctrl.focusInnerElement(i)}})};i.prototype.insertGridIntoDom=function(){var t=this;var i=this.getGui();this.eGridDiv.appendChild(i);this.addDestroyFunc((function(){t.eGridDiv.removeChild(i);t.logger.log("Grid removed from DOM")}))};i.prototype.updateLayoutClasses=function(t,i){var n=this.eRootWrapperBody.classList;n.toggle(jf.AUTO_HEIGHT,i.autoHeight);n.toggle(jf.NORMAL,i.normal);n.toggle(jf.PRINT,i.print);this.addOrRemoveCssClass(jf.AUTO_HEIGHT,i.autoHeight);this.addOrRemoveCssClass(jf.NORMAL,i.normal);this.addOrRemoveCssClass(jf.PRINT,i.print)};i.prototype.createTemplate=function(){var t=this.ctrl.showDropZones()?"<ag-grid-header-drop-zones></ag-grid-header-drop-zones>":"";var i=this.ctrl.showSideBar()?'<ag-side-bar ref="sideBar"></ag-side-bar>':"";var n=this.ctrl.showStatusBar()?'<ag-status-bar ref="statusBar"></ag-status-bar>':"";var r=this.ctrl.showWatermark()?"<ag-watermark></ag-watermark>":"";var e='<div class="ag-root-wrapper" role="presentation">\n '+t+'\n <div class="ag-root-wrapper-body" ref="rootWrapperBody" role="presentation">\n <ag-grid-body ref="gridBody"></ag-grid-body>\n '+i+"\n </div>\n "+n+"\n <ag-pagination></ag-pagination>\n "+r+"\n </div>";return e};i.prototype.getFocusableElement=function(){return this.eRootWrapperBody};i.prototype.getFocusableContainers=function(){var t=[this.gridBodyComp.getGui()];if(this.sideBarComp){t.push(this.sideBarComp.getGui())}return t.filter((function(t){return ne(t)}))};ag([ut("loggerFactory")],i.prototype,"loggerFactory",void 0);ag([ds("gridBody")],i.prototype,"gridBodyComp",void 0);ag([ds("sideBar")],i.prototype,"sideBarComp",void 0);ag([ds("rootWrapperBody")],i.prototype,"eRootWrapperBody",void 0);ag([et],i.prototype,"postConstruct",null);return i}(kd);var hg=function(){var t=function(i,n){t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var n in i)if(Object.prototype.hasOwnProperty.call(i,n))t[n]=i[n]};return t(i,n)};return function(i,n){if(typeof n!=="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(i,n);function r(){this.constructor=i}i.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}();var cg=function(t,i,n,r){var e=arguments.length,s=e<3?i:r===null?r=Object.getOwnPropertyDescriptor(i,n):r,o;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")s=Reflect.decorate(t,i,n,r);else for(var u=t.length-1;u>=0;u--)if(o=t[u])s=(e<3?o(s):e>3?o(i,n,s):o(i,n))||s;return e>3&&s&&Object.defineProperty(i,n,s),s};var lg=function(t,i){var n=typeof Symbol==="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),e,s=[],o;try{while((i===void 0||i-- >0)&&!(e=r.next()).done)s.push(e.value)}catch(t){o={error:t}}finally{try{if(e&&!e.done&&(n=r["return"]))n.call(r)}finally{if(o)throw o.error}}return s};var vg=function(t,i){for(var n=0,r=i.length,e=t.length;n<r;n++,e++)t[e]=i[n];return t};var dg=function(t){hg(i,t);function i(){return t!==null&&t.apply(this,arguments)||this}n=i;i.prototype.progressSort=function(t,i,n){var r=this.getNextSortDirection(t);this.setSortForColumn(t,r,i,n)};i.prototype.setSortForColumn=function(t,i,n,r){if(i!=="asc"&&i!=="desc"){i=null}var e=this.gridOptionsService.isColumnsSortingCoupledToGroup();var s=[t];if(e){if(t.getColDef().showRowGroup){var o=this.columnModel.getSourceColumnsForGroupColumn(t);var u=o===null||o===void 0?void 0:o.filter((function(t){return t.getColDef().sortable}));if(u){s=vg([t],lg(u))}}}s.forEach((function(t){return t.setSort(i,r)}));var a=(n||this.gridOptionsService.is("alwaysMultiSort"))&&!this.gridOptionsService.is("suppressMultiSort");if(!a){this.clearSortBarTheseColumns(s,r)}this.updateSortIndex(t);this.dispatchSortChangedEvents(r)};i.prototype.updateSortIndex=function(t){var i=this.gridOptionsService.isColumnsSortingCoupledToGroup();var n=this.columnModel.getGroupDisplayColumnForGroup(t.getId());var r=i?n||t:t;var e=this.getColumnsWithSortingOrdered();this.columnModel.getPrimaryAndSecondaryAndAutoColumns().forEach((function(t){return t.setSortIndex(null)}));var s=e.filter((function(t){return t!==r}));var o=!!r.getSort()?vg(vg([],lg(s)),[r]):s;o.forEach((function(t,i){return t.setSortIndex(i)}))};i.prototype.onSortChanged=function(t){this.dispatchSortChangedEvents(t)};i.prototype.isSortActive=function(){var t=this.columnModel.getPrimaryAndSecondaryAndAutoColumns();var i=t.filter((function(t){return!!t.getSort()}));return i&&i.length>0};i.prototype.dispatchSortChangedEvents=function(t){var i={type:hi.EVENT_SORT_CHANGED,source:t};this.eventService.dispatchEvent(i)};i.prototype.clearSortBarTheseColumns=function(t,i){this.columnModel.getPrimaryAndSecondaryAndAutoColumns().forEach((function(n){if(!t.includes(n)){n.setSort(undefined,i)}}))};i.prototype.getNextSortDirection=function(t){var i;if(t.getColDef().sortingOrder){i=t.getColDef().sortingOrder}else if(this.gridOptionsService.get("sortingOrder")){i=this.gridOptionsService.get("sortingOrder")}else{i=n.DEFAULT_SORTING_ORDER}if(!Array.isArray(i)||i.length<=0){console.warn("AG Grid: sortingOrder must be an array with at least one element, currently it's "+i);return null}var r=i.indexOf(t.getSort());var e=r<0;var s=r==i.length-1;var o;if(e||s){o=i[0]}else{o=i[r+1]}if(n.DEFAULT_SORTING_ORDER.indexOf(o)<0){console.warn("AG Grid: invalid sort type "+o);return null}return o};i.prototype.getIndexedSortMap=function(){var t=this;var i=this.columnModel.getPrimaryAndSecondaryAndAutoColumns().filter((function(t){return!!t.getSort()}));if(this.columnModel.isPivotMode()){var n=this.gridOptionsService.isColumnsSortingCoupledToGroup();i=i.filter((function(i){var r=!!i.getAggFunc();var e=!i.isPrimary();var s=n?t.columnModel.getGroupDisplayColumnForGroup(i.getId()):i.getColDef().showRowGroup;return r||e||s}))}var r=this.columnModel.getRowGroupColumns().filter((function(t){return!!t.getSort()}));var e=this.gridOptionsService.isColumnsSortingCoupledToGroup()&&!!r.length;if(e){i=vg([],lg(new Set(i.map((function(i){var n;return(n=t.columnModel.getGroupDisplayColumnForGroup(i.getId()))!==null&&n!==void 0?n:i})))))}var s={};i.forEach((function(t,i){return s[t.getId()]=i}));i.sort((function(t,i){var n=t.getSortIndex();var r=i.getSortIndex();if(n!=null&&r!=null){return n-r}else if(n==null&&r==null){var e=s[t.getId()];var o=s[i.getId()];return e>o?1:-1}else if(r==null){return-1}else{return 1}}));var o=new Map;i.forEach((function(t,i){return o.set(t,i)}));if(e){r.forEach((function(i){var n=t.columnModel.getGroupDisplayColumnForGroup(i.getId());o.set(i,o.get(n))}))}return o};i.prototype.getColumnsWithSortingOrdered=function(){return vg([],lg(this.getIndexedSortMap().entries())).sort((function(t,i){var n=lg(t,2);var r=n[1];var e=lg(i,2);var s=e[1];return r-s})).map((function(t){var i=lg(t,1),n=i[0];return n}))};i.prototype.getSortModel=function(){return this.getColumnsWithSortingOrdered().filter((function(t){return t.getSort()})).map((function(t){return{sort:t.getSort(),colId:t.getId()}}))};i.prototype.getSortOptions=function(){return this.getColumnsWithSortingOrdered().filter((function(t){return t.getSort()})).map((function(t){return{sort:t.getSort(),column:t}}))};i.prototype.canColumnDisplayMixedSort=function(t){var i=this.gridOptionsService.isColumnsSortingCoupledToGroup();var n=!!t.getColDef().showRowGroup;return i&&n};i.prototype.getDisplaySortForColumn=function(t){var i=this.columnModel.getSourceColumnsForGroupColumn(t);if(!this.canColumnDisplayMixedSort(t)||!(i===null||i===void 0?void 0:i.length)){return t.getSort()}var n=t.getColDef().field!=null||!!t.getColDef().valueGetter;var r=n?vg([t],lg(i)):i;var e=r[0].getSort();var s=r.every((function(t){return t.getSort()==e}));if(!s){return"mixed"}return e};i.prototype.getDisplaySortIndexForColumn=function(t){return this.getIndexedSortMap().get(t)};var n;i.DEFAULT_SORTING_ORDER=["asc","desc",null];cg([ut("columnModel")],i.prototype,"columnModel",void 0);i=n=cg([ot("sortController")],i);return i}(ri);var pg=function(){var t=function(i,n){t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var n in i)if(Object.prototype.hasOwnProperty.call(i,n))t[n]=i[n]};return t(i,n)};return function(i,n){if(typeof n!=="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(i,n);function r(){this.constructor=i}i.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}();var gg=function(t,i,n,r){var e=arguments.length,s=e<3?i:r===null?r=Object.getOwnPropertyDescriptor(i,n):r,o;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")s=Reflect.decorate(t,i,n,r);else for(var u=t.length-1;u>=0;u--)if(o=t[u])s=(e<3?o(s):e>3?o(i,n,s):o(i,n))||s;return e>3&&s&&Object.defineProperty(i,n,s),s};var bg=function(t){pg(i,t);function i(){return t!==null&&t.apply(this,arguments)||this}i.prototype.setMouseOver=function(t){this.selectedColumns=t;var i={type:hi.EVENT_COLUMN_HOVER_CHANGED};this.eventService.dispatchEvent(i)};i.prototype.clearMouseOver=function(){this.selectedColumns=null;var t={type:hi.EVENT_COLUMN_HOVER_CHANGED};this.eventService.dispatchEvent(t)};i.prototype.isHovered=function(t){return!!this.selectedColumns&&this.selectedColumns.indexOf(t)>=0};i=gg([ot("columnHoverService")],i);return i}(ri);var wg=function(){var t=function(i,n){t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var n in i)if(Object.prototype.hasOwnProperty.call(i,n))t[n]=i[n]};return t(i,n)};return function(i,n){if(typeof n!=="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(i,n);function r(){this.constructor=i}i.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}();var yg=function(t,i,n,r){var e=arguments.length,s=e<3?i:r===null?r=Object.getOwnPropertyDescriptor(i,n):r,o;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")s=Reflect.decorate(t,i,n,r);else for(var u=t.length-1;u>=0;u--)if(o=t[u])s=(e<3?o(s):e>3?o(i,n,s):o(i,n))||s;return e>3&&s&&Object.defineProperty(i,n,s),s};var mg=function(t){wg(i,t);function i(){var i=t!==null&&t.apply(this,arguments)||this;i.executeNextFuncs=[];i.executeLaterFuncs=[];i.active=false;i.animationThreadCount=0;return i}i.prototype.postConstruct=function(){var t=this;this.ctrlsService.whenReady((function(i){return t.gridBodyCtrl=i.gridBodyCtrl}))};i.prototype.isActive=function(){return this.active};i.prototype.start=function(){if(this.active){return}if(this.gridOptionsService.is("suppressColumnMoveAnimation")){return}if(this.gridOptionsService.is("enableRtl")){return}this.ensureAnimationCssClassPresent();this.active=true};i.prototype.finish=function(){if(!this.active){return}this.flush();this.active=false};i.prototype.executeNextVMTurn=function(t){if(this.active){this.executeNextFuncs.push(t)}else{t()}};i.prototype.executeLaterVMTurn=function(t){if(this.active){this.executeLaterFuncs.push(t)}else{t()}};i.prototype.ensureAnimationCssClassPresent=function(){var t=this;this.animationThreadCount++;var i=this.animationThreadCount;this.gridBodyCtrl.setColumnMovingCss(true);this.executeLaterFuncs.push((function(){if(t.animationThreadCount===i){t.gridBodyCtrl.setColumnMovingCss(false)}}))};i.prototype.flush=function(){var t=this.executeNextFuncs;this.executeNextFuncs=[];var i=this.executeLaterFuncs;this.executeLaterFuncs=[];if(t.length===0&&i.length===0){return}window.setTimeout((function(){return t.forEach((function(t){return t()}))}),0);window.setTimeout((function(){return i.forEach((function(t){return t()}))}),300)};yg([ut("ctrlsService")],i.prototype,"ctrlsService",void 0);yg([et],i.prototype,"postConstruct",null);i=yg([ot("columnAnimationService")],i);return i}(ri);var Sg=function(){var t=function(i,n){t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var n in i)if(Object.prototype.hasOwnProperty.call(i,n))t[n]=i[n]};return t(i,n)};return function(i,n){if(typeof n!=="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(i,n);function r(){this.constructor=i}i.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}();var Cg=function(t,i,n,r){var e=arguments.length,s=e<3?i:r===null?r=Object.getOwnPropertyDescriptor(i,n):r,o;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")s=Reflect.decorate(t,i,n,r);else for(var u=t.length-1;u>=0;u--)if(o=t[u])s=(e<3?o(s):e>3?o(i,n,s):o(i,n))||s;return e>3&&s&&Object.defineProperty(i,n,s),s};var Og=function(t){Sg(i,t);function i(){return t!==null&&t.apply(this,arguments)||this}i.prototype.postConstruct=function(){var t=this;this.ctrlsService.whenReady((function(i){t.centerRowContainerCon=i.centerRowContainerCtrl;t.addManagedListener(t.eventService,hi.EVENT_BODY_HEIGHT_CHANGED,t.checkPageSize.bind(t));t.addManagedListener(t.eventService,hi.EVENT_SCROLL_VISIBILITY_CHANGED,t.checkPageSize.bind(t));t.checkPageSize()}))};i.prototype.notActive=function(){return!this.gridOptionsService.is("paginationAutoPageSize")||this.centerRowContainerCon==null};i.prototype.checkPageSize=function(){var t=this;if(this.notActive()){return}var i=this.centerRowContainerCon.getViewportSizeFeature().getBodyHeight();if(i>0){var n=function(){var n=t.gridOptionsService.getRowHeightAsNumber();var r=Math.floor(i/n);t.gridOptionsService.set("paginationPageSize",r)};if(!this.isBodyRendered){n();this.isBodyRendered=true}else{z((function(){return n()}),50)()}}else{this.isBodyRendered=false}};Cg([ut("ctrlsService")],i.prototype,"ctrlsService",void 0);Cg([et],i.prototype,"postConstruct",null);i=Cg([ot("paginationAutoPageSizeService")],i);return i}(ri);var jg=function(){var t=function(i,n){t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var n in i)if(Object.prototype.hasOwnProperty.call(i,n))t[n]=i[n]};return t(i,n)};return function(i,n){if(typeof n!=="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(i,n);function r(){this.constructor=i}i.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}();var Rg=function(t,i,n,r){var e=arguments.length,s=e<3?i:r===null?r=Object.getOwnPropertyDescriptor(i,n):r,o;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")s=Reflect.decorate(t,i,n,r);else for(var u=t.length-1;u>=0;u--)if(o=t[u])s=(e<3?o(s):e>3?o(i,n,s):o(i,n))||s;return e>3&&s&&Object.defineProperty(i,n,s),s};var xg=function(t){jg(i,t);function i(){var i=t!==null&&t.apply(this,arguments)||this;i.cacheVersion=0;return i}i.prototype.init=function(){this.active=this.gridOptionsService.is("valueCache");this.neverExpires=this.gridOptionsService.is("valueCacheNeverExpires")};i.prototype.onDataChanged=function(){if(this.neverExpires){return}this.expire()};i.prototype.expire=function(){this.cacheVersion++};i.prototype.setValue=function(t,i,n){if(this.active){if(t.__cacheVersion!==this.cacheVersion){t.__cacheVersion=this.cacheVersion;t.__cacheData={}}t.__cacheData[i]=n}};i.prototype.getValue=function(t,i){if(!this.active||t.__cacheVersion!==this.cacheVersion){return undefined}return t.__cacheData[i]};Rg([et],i.prototype,"init",null);i=Rg([ot("valueCache")],i);return i}(ri);var _g=function(){var t=function(i,n){t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var n in i)if(Object.prototype.hasOwnProperty.call(i,n))t[n]=i[n]};return t(i,n)};return function(i,n){if(typeof n!=="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(i,n);function r(){this.constructor=i}i.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}();var Ag=function(t,i,n,r){var e=arguments.length,s=e<3?i:r===null?r=Object.getOwnPropertyDescriptor(i,n):r,o;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")s=Reflect.decorate(t,i,n,r);else for(var u=t.length-1;u>=0;u--)if(o=t[u])s=(e<3?o(s):e>3?o(i,n,s):o(i,n))||s;return e>3&&s&&Object.defineProperty(i,n,s),s};var Fg="paste";var kg=function(t){_g(i,t);function i(){return t!==null&&t.apply(this,arguments)||this}i.prototype.init=function(){if(this.rowModel.getType()==="clientSide"){this.clientSideRowModel=this.rowModel}this.addManagedListener(this.eventService,hi.EVENT_CELL_VALUE_CHANGED,this.onCellValueChanged.bind(this))};i.prototype.onCellValueChanged=function(t){if(t.source===Fg){return}this.doChangeDetection(t.node,t.column)};i.prototype.doChangeDetection=function(t,i){if(this.gridOptionsService.is("suppressChangeDetection")){return}var n=[t];if(this.clientSideRowModel&&!t.isRowPinned()){var r=this.gridOptionsService.is("aggregateOnlyChangedColumns");var e=new rd(r,this.clientSideRowModel.getRootNode());e.addParentNode(t.parent,[i]);this.clientSideRowModel.doAggregate(e);e.forEachChangedNodeDepthFirst((function(t){n.push(t)}))}this.rowRenderer.refreshCells({rowNodes:n})};Ag([ut("rowModel")],i.prototype,"rowModel",void 0);Ag([ut("rowRenderer")],i.prototype,"rowRenderer",void 0);Ag([et],i.prototype,"init",null);i=Ag([ot("changeDetectionService")],i);return i}(ri);var Tg=function(){var t=function(i,n){t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var n in i)if(Object.prototype.hasOwnProperty.call(i,n))t[n]=i[n]};return t(i,n)};return function(i,n){if(typeof n!=="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(i,n);function r(){this.constructor=i}i.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}();var Mg=function(t,i,n,r){var e=arguments.length,s=e<3?i:r===null?r=Object.getOwnPropertyDescriptor(i,n):r,o;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")s=Reflect.decorate(t,i,n,r);else for(var u=t.length-1;u>=0;u--)if(o=t[u])s=(e<3?o(s):e>3?o(i,n,s):o(i,n))||s;return e>3&&s&&Object.defineProperty(i,n,s),s};var Dg=function(t){Tg(i,t);function i(){return t!==null&&t.apply(this,arguments)||this}i.prototype.adaptFunction=function(t,i){var n=this.componentMetadataProvider.retrieve(t);if(n&&n.functionAdapter){return n.functionAdapter(i)}return null};i.prototype.adaptCellRendererFunction=function(t){var i=function(){function i(){}i.prototype.refresh=function(t){return false};i.prototype.getGui=function(){return this.eGui};i.prototype.init=function(i){var n=t(i);var r=typeof n;if(r==="string"||r==="number"||r==="boolean"){this.eGui=re("<span>"+n+"</span>");return}if(n==null){this.eGui=re("<span></span>");return}this.eGui=n};return i}();return i};i.prototype.doesImplementIComponent=function(t){if(!t){return false}return t.prototype&&"getGui"in t.prototype};Mg([ut("componentMetadataProvider")],i.prototype,"componentMetadataProvider",void 0);i=Mg([ot("agComponentUtils")],i);return i}(ri);var Gg=function(){var t=function(i,n){t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var n in i)if(Object.prototype.hasOwnProperty.call(i,n))t[n]=i[n]};return t(i,n)};return function(i,n){if(typeof n!=="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(i,n);function r(){this.constructor=i}i.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}();var Pg=function(t,i,n,r){var e=arguments.length,s=e<3?i:r===null?r=Object.getOwnPropertyDescriptor(i,n):r,o;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")s=Reflect.decorate(t,i,n,r);else for(var u=t.length-1;u>=0;u--)if(o=t[u])s=(e<3?o(s):e>3?o(i,n,s):o(i,n))||s;return e>3&&s&&Object.defineProperty(i,n,s),s};var Eg=function(t){Gg(i,t);function i(){return t!==null&&t.apply(this,arguments)||this}i.prototype.postConstruct=function(){this.componentMetaData={dateComponent:{mandatoryMethodList:["getDate","setDate"],optionalMethodList:["afterGuiAttached","setInputPlaceholder","setInputAriaLabel"]},detailCellRenderer:{mandatoryMethodList:[],optionalMethodList:["refresh"],functionAdapter:this.agComponentUtils.adaptCellRendererFunction.bind(this.agComponentUtils)},headerComponent:{mandatoryMethodList:[],optionalMethodList:["refresh"]},headerGroupComponent:{mandatoryMethodList:[],optionalMethodList:[]},loadingCellRenderer:{mandatoryMethodList:[],optionalMethodList:[]},loadingOverlayComponent:{mandatoryMethodList:[],optionalMethodList:[]},noRowsOverlayComponent:{mandatoryMethodList:[],optionalMethodList:[]},floatingFilterComponent:{mandatoryMethodList:["onParentModelChanged"],optionalMethodList:["afterGuiAttached"]},floatingFilterWrapperComponent:{mandatoryMethodList:[],optionalMethodList:[]},cellRenderer:{mandatoryMethodList:[],optionalMethodList:["refresh","afterGuiAttached"],functionAdapter:this.agComponentUtils.adaptCellRendererFunction.bind(this.agComponentUtils)},cellEditor:{mandatoryMethodList:["getValue"],optionalMethodList:["isPopup","isCancelBeforeStart","isCancelAfterEnd","getPopupPosition","focusIn","focusOut","afterGuiAttached"]},innerRenderer:{mandatoryMethodList:[],optionalMethodList:["afterGuiAttached"],functionAdapter:this.agComponentUtils.adaptCellRendererFunction.bind(this.agComponentUtils)},fullWidthCellRenderer:{mandatoryMethodList:[],optionalMethodList:["refresh","afterGuiAttached"],functionAdapter:this.agComponentUtils.adaptCellRendererFunction.bind(this.agComponentUtils)},groupRowRenderer:{mandatoryMethodList:[],optionalMethodList:["afterGuiAttached"],functionAdapter:this.agComponentUtils.adaptCellRendererFunction.bind(this.agComponentUtils)},filter:{mandatoryMethodList:["isFilterActive","doesFilterPass","getModel","setModel"],optionalMethodList:["afterGuiAttached","afterGuiDetached","onNewRowsLoaded","getModelAsString","onFloatingFilterChanged","onAnyFilterChanged"]},filterComponent:{mandatoryMethodList:["isFilterActive","doesFilterPass","getModel","setModel"],optionalMethodList:["afterGuiAttached","afterGuiDetached","onNewRowsLoaded","getModelAsString","onFloatingFilterChanged","onAnyFilterChanged"]},statusPanel:{mandatoryMethodList:[],optionalMethodList:["afterGuiAttached"]},toolPanel:{mandatoryMethodList:[],optionalMethodList:["refresh","afterGuiAttached"]},tooltipComponent:{mandatoryMethodList:[],optionalMethodList:[]}}};i.prototype.retrieve=function(t){return this.componentMetaData[t]};Pg([ut("agComponentUtils")],i.prototype,"agComponentUtils",void 0);Pg([et],i.prototype,"postConstruct",null);i=Pg([ot("componentMetadataProvider")],i);return i}(ri);var Ig=function(){var t=function(i,n){t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var n in i)if(Object.prototype.hasOwnProperty.call(i,n))t[n]=i[n]};return t(i,n)};return function(i,n){if(typeof n!=="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(i,n);function r(){this.constructor=i}i.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}();var Ng=function(t,i,n,r){var e=arguments.length,s=e<3?i:r===null?r=Object.getOwnPropertyDescriptor(i,n):r,o;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")s=Reflect.decorate(t,i,n,r);else for(var u=t.length-1;u>=0;u--)if(o=t[u])s=(e<3?o(s):e>3?o(i,n,s):o(i,n))||s;return e>3&&s&&Object.defineProperty(i,n,s),s};var Hg=function(t,i){var n=typeof Symbol==="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),e,s=[],o;try{while((i===void 0||i-- >0)&&!(e=r.next()).done)s.push(e.value)}catch(t){o={error:t}}finally{try{if(e&&!e.done&&(n=r["return"]))n.call(r)}finally{if(o)throw o.error}}return s};var Lg=function(t,i){for(var n=0,r=i.length,e=t.length;n<r;n++,e++)t[e]=i[n];return t};var Vg=25;var Bg=10;var zg=8;var Wg=4;var Ug=4;var Kg=6;var qg={"ag-theme-custom":{headerHeight:25,headerCellMinWidth:24,listItemHeight:Wg*5,rowHeight:25,chartMenuPanelWidth:220},"ag-theme-material":{headerHeight:zg*7,headerCellMinWidth:48,listItemHeight:zg*4,rowHeight:zg*6,chartMenuPanelWidth:240},"ag-theme-balham":{headerHeight:Ug*8,headerCellMinWidth:24,listItemHeight:Ug*6,rowHeight:Ug*7,chartMenuPanelWidth:220},"ag-theme-alpine":{headerHeight:Kg*8,headerCellMinWidth:36,listItemHeight:Kg*4,rowHeight:Kg*7,chartMenuPanelWidth:240}};var Yg={headerHeight:["ag-header-row"],headerCellMinWidth:["ag-header-cell"],listItemHeight:["ag-virtual-list-item"],rowHeight:["ag-row"],chartMenuPanelWidth:["ag-chart-docked-container"]};var Qg=function(t){Ig(n,t);function n(){var i=t!==null&&t.apply(this,arguments)||this;i.calculatedSizes={};return i}n.prototype.postConstruct=function(){var t=this;var i;var n=(i=this.getTheme().el)!==null&&i!==void 0?i:this.eGridDiv;this.mutationObserver=new MutationObserver((function(){t.calculatedSizes={};t.fireGridStylesChangedEvent()}));this.mutationObserver.observe(n||this.eGridDiv,{attributes:true,attributeFilter:["class"]})};n.prototype.fireGridStylesChangedEvent=function(){var t={type:hi.EVENT_GRID_STYLES_CHANGED};this.eventService.dispatchEvent(t)};n.prototype.getSassVariable=function(t){var i=this.getTheme(),n=i.themeFamily,r=i.el;if(!n||n.indexOf("ag-theme")!==0){return}if(!this.calculatedSizes){this.calculatedSizes={}}if(!this.calculatedSizes[n]){this.calculatedSizes[n]={}}var e=this.calculatedSizes[n][t];if(e!=null){return e}this.calculatedSizes[n][t]=this.calculateValueForSassProperty(t,n,r);return this.calculatedSizes[n][t]};n.prototype.calculateValueForSassProperty=function(t,i,n){var r;var e="ag-theme-"+(i.match("material")?"material":i.match("balham")?"balham":i.match("alpine")?"alpine":"custom");var s=qg[e][t];var o=this.gridOptionsService.getDocument();if(!n){n=this.eGridDiv}if(!Yg[t]){return s}var u=Yg[t];var a=o.createElement("div");var f=Array.from(n.classList);(r=a.classList).add.apply(r,Lg([i],Hg(f)));a.style.position="absolute";var h=u.reduce((function(t,i){var n=o.createElement("div");n.style.position="static";n.classList.add(i);t.appendChild(n);return n}),a);var c=0;if(o.body){o.body.appendChild(a);var l=t.toLowerCase().indexOf("height")!==-1?"height":"width";c=parseInt(window.getComputedStyle(h)[l],10);o.body.removeChild(a)}return c||s};n.prototype.isThemeDark=function(){var t=this.getTheme().theme;return!!t&&t.indexOf("dark")>=0};n.prototype.chartMenuPanelWidth=function(){return this.getSassVariable("chartMenuPanelWidth")};n.prototype.getTheme=function(){var t=/\bag-(material|(?:theme-([\w\-]*)))\b/g;var i=this.eGridDiv;var n=null;var r=[];while(i){n=t.exec(i.className);if(!n){i=i.parentElement||undefined}else{var e=i.className.match(t);if(e){r=e}break}}if(!n){return{allThemes:r}}var s=n[0];return{theme:s,el:i,themeFamily:s.replace(/-dark$/,""),allThemes:r}};n.prototype.getFromTheme=function(t,i){var n;return(n=this.getSassVariable(i))!==null&&n!==void 0?n:t};n.prototype.getDefaultRowHeight=function(){return this.getFromTheme(Vg,"rowHeight")};n.prototype.getListItemHeight=function(){return this.getFromTheme(20,"listItemHeight")};n.prototype.refreshRowHeightVariable=function(){var t=this.eGridDiv.style.getPropertyValue("--ag-line-height").trim();var i=this.gridOptionsService.getNum("rowHeight");if(i==null||isNaN(i)||!isFinite(i)){return-1}var n=i+"px";if(t!=n){this.eGridDiv.style.setProperty("--ag-line-height",n);return i}return t!=""?parseFloat(t):-1};n.prototype.getMinColWidth=function(){var t=this.getFromTheme(null,"headerCellMinWidth");return i(t)?Math.max(t,Bg):Bg};n.prototype.destroy=function(){this.calculatedSizes=null;if(this.mutationObserver){this.mutationObserver.disconnect()}t.prototype.destroy.call(this)};Ng([ut("eGridDiv")],n.prototype,"eGridDiv",void 0);Ng([et],n.prototype,"postConstruct",null);n=Ng([ot("environment")],n);return n}(ri);var Jg=function(){var t=function(i,n){t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var n in i)if(Object.prototype.hasOwnProperty.call(i,n))t[n]=i[n]};return t(i,n)};return function(i,n){if(typeof n!=="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(i,n);function r(){this.constructor=i}i.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}();var Zg=function(t,i,n,r){var e=arguments.length,s=e<3?i:r===null?r=Object.getOwnPropertyDescriptor(i,n):r,o;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")s=Reflect.decorate(t,i,n,r);else for(var u=t.length-1;u>=0;u--)if(o=t[u])s=(e<3?o(s):e>3?o(i,n,s):o(i,n))||s;return e>3&&s&&Object.defineProperty(i,n,s),s};var $g=function(t,i){return function(n,r){i(n,r,t)}};var Xg=function(t){Jg(i,t);function i(){var i=t!==null&&t.apply(this,arguments)||this;i.scrollY=0;i.uiBodyHeight=0;return i}i.prototype.agWire=function(t){this.logger=t.create("RowContainerHeightService")};i.prototype.postConstruct=function(){this.addManagedListener(this.eventService,hi.EVENT_BODY_HEIGHT_CHANGED,this.updateOffset.bind(this));this.maxDivHeight=hr();this.logger.log("maxDivHeight = "+this.maxDivHeight)};i.prototype.isStretching=function(){return this.stretching};i.prototype.getDivStretchOffset=function(){return this.divStretchOffset};i.prototype.updateOffset=function(){if(!this.stretching){return}var t=this.ctrlsService.getGridBodyCtrl();var i=t.getScrollFeature().getVScrollPosition().top;var n=this.getUiBodyHeight();var r=i!==this.scrollY||n!==this.uiBodyHeight;if(r){this.scrollY=i;this.uiBodyHeight=n;this.calculateOffset()}};i.prototype.calculateOffset=function(){this.setUiContainerHeight(this.maxDivHeight);this.pixelsToShave=this.modelHeight-this.uiContainerHeight;this.maxScrollY=this.uiContainerHeight-this.uiBodyHeight;var t=this.scrollY/this.maxScrollY;var i=t*this.pixelsToShave;this.logger.log("Div Stretch Offset = "+i+" ("+this.pixelsToShave+" * "+t+")");this.setDivStretchOffset(i)};i.prototype.setUiContainerHeight=function(t){if(t!==this.uiContainerHeight){this.uiContainerHeight=t;this.eventService.dispatchEvent({type:hi.EVENT_ROW_CONTAINER_HEIGHT_CHANGED})}};i.prototype.clearOffset=function(){this.setUiContainerHeight(this.modelHeight);this.pixelsToShave=0;this.setDivStretchOffset(0)};i.prototype.setDivStretchOffset=function(t){var i=typeof t==="number"?Math.floor(t):null;if(this.divStretchOffset===i){return}this.divStretchOffset=i;this.eventService.dispatchEvent({type:hi.EVENT_HEIGHT_SCALE_CHANGED})};i.prototype.setModelHeight=function(t){this.modelHeight=t;this.stretching=t!=null&&this.maxDivHeight>0&&t>this.maxDivHeight;if(this.stretching){this.calculateOffset()}else{this.clearOffset()}};i.prototype.getUiContainerHeight=function(){return this.uiContainerHeight};i.prototype.getRealPixelPosition=function(t){return t-this.divStretchOffset};i.prototype.getUiBodyHeight=function(){var t=this.ctrlsService.getGridBodyCtrl();var i=t.getScrollFeature().getVScrollPosition();return i.bottom-i.top};i.prototype.getScrollPositionForPixel=function(t){if(this.pixelsToShave<=0){return t}var i=this.modelHeight-this.getUiBodyHeight();var n=t/i;var r=this.maxScrollY*n;return r};Zg([ut("ctrlsService")],i.prototype,"ctrlsService",void 0);Zg([$g(0,ht("loggerFactory"))],i.prototype,"agWire",null);Zg([et],i.prototype,"postConstruct",null);i=Zg([ot("rowContainerHeightService")],i);return i}(ri);var tb=function(){var t=function(i,n){t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var n in i)if(Object.prototype.hasOwnProperty.call(i,n))t[n]=i[n]};return t(i,n)};return function(i,n){if(typeof n!=="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(i,n);function r(){this.constructor=i}i.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}();var ib=function(t,i,n,r){var e=arguments.length,s=e<3?i:r===null?r=Object.getOwnPropertyDescriptor(i,n):r,o;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")s=Reflect.decorate(t,i,n,r);else for(var u=t.length-1;u>=0;u--)if(o=t[u])s=(e<3?o(s):e>3?o(i,n,s):o(i,n))||s;return e>3&&s&&Object.defineProperty(i,n,s),s};var nb=function(t){tb(n,t);function n(){return t!==null&&t.apply(this,arguments)||this}n.prototype.init=function(){this.groupSelectsChildren=this.gridOptionsService.is("groupSelectsChildren");this.isRowSelectableFunc=this.gridOptionsService.get("isRowSelectable")};n.prototype.updateSelectableAfterGrouping=function(t){if(this.isRowSelectableFunc){var i=function(t){return t.childrenAfterGroup};this.recurseDown(t.childrenAfterGroup,i)}};n.prototype.recurseDown=function(t,n){var r=this;if(!t){return}t.forEach((function(t){if(!t.group){return}if(t.hasChildren()){r.recurseDown(n(t),n)}var e;if(r.groupSelectsChildren){var s=(n(t)||[]).find((function(t){return t.selectable===true}));e=i(s)}else{e=r.isRowSelectableFunc?r.isRowSelectableFunc(t):false}t.setRowSelectable(e)}))};ib([et],n.prototype,"init",null);n=ib([ot("selectableService")],n);return n}(ri);var rb=function(){var t=function(i,n){t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var n in i)if(Object.prototype.hasOwnProperty.call(i,n))t[n]=i[n]};return t(i,n)};return function(i,n){if(typeof n!=="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(i,n);function r(){this.constructor=i}i.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}();var eb=function(t,i,n,r){var e=arguments.length,s=e<3?i:r===null?r=Object.getOwnPropertyDescriptor(i,n):r,o;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")s=Reflect.decorate(t,i,n,r);else for(var u=t.length-1;u>=0;u--)if(o=t[u])s=(e<3?o(s):e>3?o(i,n,s):o(i,n))||s;return e>3&&s&&Object.defineProperty(i,n,s),s};var sb=function(t){rb(i,t);function i(){var i=t.call(this)||this;i.previousAndFirstButtonsDisabled=false;i.nextButtonDisabled=false;i.lastButtonDisabled=false;i.areListenersSetup=false;return i}i.prototype.postConstruct=function(){var t=this.gridOptionsService.is("enableRtl");this.setTemplate(this.getTemplate());var i=this,n=i.btFirst,r=i.btPrevious,e=i.btNext,s=i.btLast;this.activateTabIndex([n,r,e,s]);n.insertAdjacentElement("afterbegin",Fe(t?"last":"first",this.gridOptionsService));r.insertAdjacentElement("afterbegin",Fe(t?"next":"previous",this.gridOptionsService));e.insertAdjacentElement("afterbegin",Fe(t?"previous":"next",this.gridOptionsService));s.insertAdjacentElement("afterbegin",Fe(t?"first":"last",this.gridOptionsService));this.addManagedPropertyListener("pagination",this.onPaginationChanged.bind(this));this.addManagedPropertyListener("suppressPaginationPanel",this.onPaginationChanged.bind(this));this.onPaginationChanged()};i.prototype.onPaginationChanged=function(){var t=this.gridOptionsService.is("pagination");var i=t&&!this.gridOptionsService.is("suppressPaginationPanel");this.setDisplayed(i);if(!i){return}this.setupListeners();this.enableOrDisableButtons();this.updateRowLabels();this.setCurrentPageLabel();this.setTotalLabels()};i.prototype.setupListeners=function(){var t=this;if(!this.areListenersSetup){this.addManagedListener(this.eventService,hi.EVENT_PAGINATION_CHANGED,this.onPaginationChanged.bind(this));[{el:this.btFirst,fn:this.onBtFirst.bind(this)},{el:this.btPrevious,fn:this.onBtPrevious.bind(this)},{el:this.btNext,fn:this.onBtNext.bind(this)},{el:this.btLast,fn:this.onBtLast.bind(this)}].forEach((function(i){var n=i.el,r=i.fn;t.addManagedListener(n,"click",r);t.addManagedListener(n,"keydown",(function(t){if(t.key===Te.ENTER||t.key===Te.SPACE){t.preventDefault();r()}}))}));this.areListenersSetup=true}};i.prototype.onBtFirst=function(){if(!this.previousAndFirstButtonsDisabled){this.paginationProxy.goToFirstPage()}};i.prototype.setCurrentPageLabel=function(){var t=this.paginationProxy.getTotalPages()>0;var i=this.paginationProxy.getCurrentPage();var n=t?i+1:0;this.lbCurrent.innerHTML=this.formatNumber(n)};i.prototype.formatNumber=function(t){var i=this.gridOptionsService.getCallback("paginationNumberFormatter");if(i){var n={value:t};return i(n)}var r=this.localeService.getLocaleTextFunc();var e=r("thousandSeparator",",");var s=r("decimalSeparator",".");return Cr(t,e,s)};i.prototype.getTemplate=function(){var t=this.localeService.getLocaleTextFunc();var i=t("page","Page");var n=t("to","to");var r=t("of","of");var e=t("firstPage","First Page");var s=t("previousPage","Previous Page");var o=t("nextPage","Next Page");var u=t("lastPage","Last Page");var a=this.getCompId();return'<div class="ag-paging-panel ag-unselectable" id="ag-'+a+'">\n <span class="ag-paging-row-summary-panel" role="status">\n <span id="ag-'+a+'-first-row" ref="lbFirstRowOnPage" class="ag-paging-row-summary-panel-number"></span>\n <span id="ag-'+a+'-to">'+n+'</span>\n <span id="ag-'+a+'-last-row" ref="lbLastRowOnPage" class="ag-paging-row-summary-panel-number"></span>\n <span id="ag-'+a+'-of">'+r+'</span>\n <span id="ag-'+a+'-row-count" ref="lbRecordCount" class="ag-paging-row-summary-panel-number"></span>\n </span>\n <span class="ag-paging-page-summary-panel" role="presentation">\n <div ref="btFirst" class="ag-button ag-paging-button" role="button" aria-label="'+e+'"></div>\n <div ref="btPrevious" class="ag-button ag-paging-button" role="button" aria-label="'+s+'"></div>\n <span class="ag-paging-description" role="status">\n <span id="ag-'+a+'-start-page">'+i+'</span>\n <span id="ag-'+a+'-start-page-number" ref="lbCurrent" class="ag-paging-number"></span>\n <span id="ag-'+a+'-of-page">'+r+'</span>\n <span id="ag-'+a+'-of-page-number" ref="lbTotal" class="ag-paging-number"></span>\n </span>\n <div ref="btNext" class="ag-button ag-paging-button" role="button" aria-label="'+o+'"></div>\n <div ref="btLast" class="ag-button ag-paging-button" role="button" aria-label="'+u+'"></div>\n </span>\n </div>'};i.prototype.onBtNext=function(){if(!this.nextButtonDisabled){this.paginationProxy.goToNextPage()}};i.prototype.onBtPrevious=function(){if(!this.previousAndFirstButtonsDisabled){this.paginationProxy.goToPreviousPage()}};i.prototype.onBtLast=function(){if(!this.lastButtonDisabled){this.paginationProxy.goToLastPage()}};i.prototype.enableOrDisableButtons=function(){var t=this.paginationProxy.getCurrentPage();var i=this.paginationProxy.isLastPageFound();var n=this.paginationProxy.getTotalPages();this.previousAndFirstButtonsDisabled=t===0;this.toggleButtonDisabled(this.btFirst,this.previousAndFirstButtonsDisabled);this.toggleButtonDisabled(this.btPrevious,this.previousAndFirstButtonsDisabled);var r=this.isZeroPagesToDisplay();var e=i&&t===n-1;this.nextButtonDisabled=e||r;this.lastButtonDisabled=!i||r||t===n-1;this.toggleButtonDisabled(this.btNext,this.nextButtonDisabled);this.toggleButtonDisabled(this.btLast,this.lastButtonDisabled)};i.prototype.toggleButtonDisabled=function(t,i){An(t,i);t.classList.toggle("ag-disabled",i)};i.prototype.updateRowLabels=function(){var t=this.paginationProxy.getCurrentPage();var i=this.paginationProxy.getPageSize();var n=this.paginationProxy.isLastPageFound();var r=this.paginationProxy.isLastPageFound()?this.paginationProxy.getMasterRowCount():null;var e;var s;if(this.isZeroPagesToDisplay()){e=s=0}else{e=i*t+1;s=e+i-1;if(n&&s>r){s=r}}this.lbFirstRowOnPage.innerHTML=this.formatNumber(e);if(this.rowNodeBlockLoader.isLoading()){var o=this.localeService.getLocaleTextFunc();this.lbLastRowOnPage.innerHTML=o("pageLastRowUnknown","?")}else{this.lbLastRowOnPage.innerHTML=this.formatNumber(s)}};i.prototype.isZeroPagesToDisplay=function(){var t=this.paginationProxy.isLastPageFound();var i=this.paginationProxy.getTotalPages();return t&&i===0};i.prototype.setTotalLabels=function(){var t=this.paginationProxy.isLastPageFound();var i=this.paginationProxy.getTotalPages();var n=t?this.paginationProxy.getMasterRowCount():null;if(n===1){var r=this.paginationProxy.getRow(0);var e=r&&r.group&&!(r.groupData||r.aggData);if(e){this.setTotalLabelsToZero();return}}if(t){this.lbTotal.innerHTML=this.formatNumber(i);this.lbRecordCount.innerHTML=this.formatNumber(n)}else{var s=this.localeService.getLocaleTextFunc()("more","more");this.lbTotal.innerHTML=s;this.lbRecordCount.innerHTML=s}};i.prototype.setTotalLabelsToZero=function(){this.lbFirstRowOnPage.innerHTML=this.formatNumber(0);this.lbCurrent.innerHTML=this.formatNumber(0);this.lbLastRowOnPage.innerHTML=this.formatNumber(0);this.lbTotal.innerHTML=this.formatNumber(0);this.lbRecordCount.innerHTML=this.formatNumber(0)};eb([ut("paginationProxy")],i.prototype,"paginationProxy",void 0);eb([ut("rowNodeBlockLoader")],i.prototype,"rowNodeBlockLoader",void 0);eb([ds("btFirst")],i.prototype,"btFirst",void 0);eb([ds("btPrevious")],i.prototype,"btPrevious",void 0);eb([ds("btNext")],i.prototype,"btNext",void 0);eb([ds("btLast")],i.prototype,"btLast",void 0);eb([ds("lbRecordCount")],i.prototype,"lbRecordCount",void 0);eb([ds("lbFirstRowOnPage")],i.prototype,"lbFirstRowOnPage",void 0);eb([ds("lbLastRowOnPage")],i.prototype,"lbLastRowOnPage",void 0);eb([ds("lbCurrent")],i.prototype,"lbCurrent",void 0);eb([ds("lbTotal")],i.prototype,"lbTotal",void 0);eb([et],i.prototype,"postConstruct",null);return i}(vs);var ob=function(){var t=function(i,n){t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var n in i)if(Object.prototype.hasOwnProperty.call(i,n))t[n]=i[n]};return t(i,n)};return function(i,n){if(typeof n!=="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(i,n);function r(){this.constructor=i}i.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}();var ub=function(t,i,n,r){var e=arguments.length,s=e<3?i:r===null?r=Object.getOwnPropertyDescriptor(i,n):r,o;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")s=Reflect.decorate(t,i,n,r);else for(var u=t.length-1;u>=0;u--)if(o=t[u])s=(e<3?o(s):e>3?o(i,n,s):o(i,n))||s;return e>3&&s&&Object.defineProperty(i,n,s),s};var ab;(function(t){t[t["Loading"]=0]="Loading";t[t["NoRows"]=1]="NoRows"})(ab||(ab={}));var fb=function(t){ob(i,t);function i(){var n=t.call(this,i.TEMPLATE)||this;n.inProgress=false;n.destroyRequested=false;n.manuallyDisplayed=false;return n}i.prototype.updateLayoutClasses=function(t,i){var n=this.eOverlayWrapper.classList;n.toggle(jf.AUTO_HEIGHT,i.autoHeight);n.toggle(jf.NORMAL,i.normal);n.toggle(jf.PRINT,i.print)};i.prototype.postConstruct=function(){this.createManagedBean(new Rf(this));this.setDisplayed(false,{skipAriaHidden:true});this.addManagedListener(this.eventService,hi.EVENT_ROW_DATA_UPDATED,this.onRowDataUpdated.bind(this));this.addManagedListener(this.eventService,hi.EVENT_NEW_COLUMNS_LOADED,this.onNewColumnsLoaded.bind(this));if(this.gridOptionsService.isRowModelType("clientSide")&&!this.gridOptionsService.get("rowData")){this.showLoadingOverlay()}this.gridApi.registerOverlayWrapperComp(this)};i.prototype.setWrapperTypeClass=function(t){var i=this.eOverlayWrapper.classList;i.toggle("ag-overlay-loading-wrapper",t===ab.Loading);i.toggle("ag-overlay-no-rows-wrapper",t===ab.NoRows)};i.prototype.showLoadingOverlay=function(){if(this.gridOptionsService.is("suppressLoadingOverlay")){return}var t={};var i=this.userComponentFactory.getLoadingOverlayCompDetails(t);var n=i.newAgStackInstance();this.showOverlay(n,ab.Loading)};i.prototype.showNoRowsOverlay=function(){if(this.gridOptionsService.is("suppressNoRowsOverlay")){return}var t={};var i=this.userComponentFactory.getNoRowsOverlayCompDetails(t);var n=i.newAgStackInstance();this.showOverlay(n,ab.NoRows)};i.prototype.showOverlay=function(t,i){var n=this;if(this.inProgress){return}this.setWrapperTypeClass(i);this.destroyActiveOverlay();this.inProgress=true;if(t){t.then((function(t){n.inProgress=false;n.eOverlayWrapper.appendChild(t.getGui());n.activeOverlay=t;if(n.destroyRequested){n.destroyRequested=false;n.destroyActiveOverlay()}}))}this.manuallyDisplayed=this.columnModel.isReady()&&!this.paginationProxy.isEmpty();this.setDisplayed(true,{skipAriaHidden:true})};i.prototype.destroyActiveOverlay=function(){if(this.inProgress){this.destroyRequested=true;return}if(!this.activeOverlay){return}this.activeOverlay=this.getContext().destroyBean(this.activeOverlay);Xr(this.eOverlayWrapper)};i.prototype.hideOverlay=function(){this.manuallyDisplayed=false;this.destroyActiveOverlay();this.setDisplayed(false,{skipAriaHidden:true})};i.prototype.destroy=function(){this.destroyActiveOverlay();t.prototype.destroy.call(this)};i.prototype.showOrHideOverlay=function(){var t=this.paginationProxy.isEmpty();var i=this.gridOptionsService.is("suppressNoRowsOverlay");if(t&&!i){this.showNoRowsOverlay()}else{this.hideOverlay()}};i.prototype.onRowDataUpdated=function(){this.showOrHideOverlay()};i.prototype.onNewColumnsLoaded=function(){if(this.columnModel.isReady()&&!this.paginationProxy.isEmpty()&&!this.manuallyDisplayed){this.hideOverlay()}};i.TEMPLATE='\n <div class="ag-overlay" aria-hidden="true">\n <div class="ag-overlay-panel">\n <div class="ag-overlay-wrapper" ref="eOverlayWrapper"></div>\n </div>\n </div>';ub([ut("userComponentFactory")],i.prototype,"userComponentFactory",void 0);ub([ut("paginationProxy")],i.prototype,"paginationProxy",void 0);ub([ut("gridApi")],i.prototype,"gridApi",void 0);ub([ut("columnModel")],i.prototype,"columnModel",void 0);ub([ds("eOverlayWrapper")],i.prototype,"eOverlayWrapper",void 0);ub([et],i.prototype,"postConstruct",null);return i}(vs);var hb=function(){var t=function(i,n){t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var n in i)if(Object.prototype.hasOwnProperty.call(i,n))t[n]=i[n]};return t(i,n)};return function(i,n){if(typeof n!=="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(i,n);function r(){this.constructor=i}i.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}();var cb=function(t,i,n,r){var e=arguments.length,s=e<3?i:r===null?r=Object.getOwnPropertyDescriptor(i,n):r,o;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")s=Reflect.decorate(t,i,n,r);else for(var u=t.length-1;u>=0;u--)if(o=t[u])s=(e<3?o(s):e>3?o(i,n,s):o(i,n))||s;return e>3&&s&&Object.defineProperty(i,n,s),s};var lb=function(t){hb(n,t);function n(){return t!==null&&t.apply(this,arguments)||this}n.prototype.getFirstRow=function(){var t=0;var i;if(this.pinnedRowModel.getPinnedTopRowCount()){i="top"}else if(this.rowModel.getRowCount()){i=null;t=this.paginationProxy.getPageFirstRow()}else if(this.pinnedRowModel.getPinnedBottomRowCount()){i="bottom"}return i===undefined?null:{rowIndex:t,rowPinned:i}};n.prototype.getLastRow=function(){var t;var i=null;var n=this.pinnedRowModel.getPinnedBottomRowCount();var r=this.pinnedRowModel.getPinnedTopRowCount();if(n){i="bottom";t=n-1}else if(this.rowModel.getRowCount()){i=null;t=this.paginationProxy.getPageLastRow()}else if(r){i="top";t=r-1}return t===undefined?null:{rowIndex:t,rowPinned:i}};n.prototype.getRowNode=function(t){switch(t.rowPinned){case"top":return this.pinnedRowModel.getPinnedTopRowData()[t.rowIndex];case"bottom":return this.pinnedRowModel.getPinnedBottomRowData()[t.rowIndex];default:return this.rowModel.getRow(t.rowIndex)}};n.prototype.sameRow=function(t,i){if(!t&&!i){return true}if(t&&!i||!t&&i){return false}return t.rowIndex===i.rowIndex&&t.rowPinned==i.rowPinned};n.prototype.before=function(t,n){switch(t.rowPinned){case"top":if(n.rowPinned!=="top"){return true}break;case"bottom":if(n.rowPinned!=="bottom"){return false}break;default:if(i(n.rowPinned)){return n.rowPinned!=="top"}break}return t.rowIndex<n.rowIndex};n.prototype.rowMax=function(t){var i=this;var n;t.forEach((function(t){if(n===undefined||i.before(n,t)){n=t}}));return n};n.prototype.rowMin=function(t){var i=this;var n;t.forEach((function(t){if(n===undefined||i.before(t,n)){n=t}}));return n};cb([ut("rowModel")],n.prototype,"rowModel",void 0);cb([ut("pinnedRowModel")],n.prototype,"pinnedRowModel",void 0);cb([ut("paginationProxy")],n.prototype,"paginationProxy",void 0);n=cb([ot("rowPositionUtils")],n);return n}(ri);var vb=function(){var t=function(i,n){t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var n in i)if(Object.prototype.hasOwnProperty.call(i,n))t[n]=i[n]};return t(i,n)};return function(i,n){if(typeof n!=="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(i,n);function r(){this.constructor=i}i.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}();var db=function(t,i,n,r){var e=arguments.length,s=e<3?i:r===null?r=Object.getOwnPropertyDescriptor(i,n):r,o;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")s=Reflect.decorate(t,i,n,r);else for(var u=t.length-1;u>=0;u--)if(o=t[u])s=(e<3?o(s):e>3?o(i,n,s):o(i,n))||s;return e>3&&s&&Object.defineProperty(i,n,s),s};var pb=function(t){vb(i,t);function i(){return t!==null&&t.apply(this,arguments)||this}i.prototype.createId=function(t){var i=t.rowIndex,n=t.rowPinned,r=t.column;return this.createIdFromValues({rowIndex:i,column:r,rowPinned:n})};i.prototype.createIdFromValues=function(t){var i=t.rowIndex,n=t.rowPinned,r=t.column;return i+"."+(n==null?"null":n)+"."+r.getId()};i.prototype.equals=function(t,i){var n=t.column===i.column;var r=t.rowPinned===i.rowPinned;var e=t.rowIndex===i.rowIndex;return n&&r&&e};i=db([ot("cellPositionUtils")],i);return i}(ri);var gb=function(){var t=function(i,n){t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var n in i)if(Object.prototype.hasOwnProperty.call(i,n))t[n]=i[n]};return t(i,n)};return function(i,n){if(typeof n!=="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(i,n);function r(){this.constructor=i}i.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}();var bb=function(){function t(t){this.cellValueChanges=t}return t}();var wb=function(t){gb(i,t);function i(i,n,r,e){var s=t.call(this,i)||this;s.initialRange=n;s.finalRange=r;s.ranges=e;return s}return i}(bb);var yb=function(){function t(i){this.actionStack=[];this.maxStackSize=i?i:t.DEFAULT_STACK_SIZE;this.actionStack=new Array(this.maxStackSize)}t.prototype.pop=function(){return this.actionStack.pop()};t.prototype.push=function(t){var i=t.cellValueChanges&&t.cellValueChanges.length>0;if(!i){return}if(this.actionStack.length===this.maxStackSize){this.actionStack.shift()}this.actionStack.push(t)};t.prototype.clear=function(){this.actionStack=[]};t.prototype.getCurrentStackSize=function(){return this.actionStack.length};t.DEFAULT_STACK_SIZE=10;return t}();var mb=function(){var t=function(i,n){t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var n in i)if(Object.prototype.hasOwnProperty.call(i,n))t[n]=i[n]};return t(i,n)};return function(i,n){if(typeof n!=="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(i,n);function r(){this.constructor=i}i.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}();var Sb=function(){Sb=Object.assign||function(t){for(var i,n=1,r=arguments.length;n<r;n++){i=arguments[n];for(var e in i)if(Object.prototype.hasOwnProperty.call(i,e))t[e]=i[e]}return t};return Sb.apply(this,arguments)};var Cb=function(t,i,n,r){var e=arguments.length,s=e<3?i:r===null?r=Object.getOwnPropertyDescriptor(i,n):r,o;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")s=Reflect.decorate(t,i,n,r);else for(var u=t.length-1;u>=0;u--)if(o=t[u])s=(e<3?o(s):e>3?o(i,n,s):o(i,n))||s;return e>3&&s&&Object.defineProperty(i,n,s),s};var Ob=function(t,i){var n=typeof Symbol==="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),e,s=[],o;try{while((i===void 0||i-- >0)&&!(e=r.next()).done)s.push(e.value)}catch(t){o={error:t}}finally{try{if(e&&!e.done&&(n=r["return"]))n.call(r)}finally{if(o)throw o.error}}return s};var jb=function(t,i){for(var n=0,r=i.length,e=t.length;n<r;n++,e++)t[e]=i[n];return t};var Rb=function(t){mb(i,t);function i(){var i=t!==null&&t.apply(this,arguments)||this;i.cellValueChanges=[];i.activeCellEdit=null;i.activeRowEdit=null;i.isPasting=false;i.isRangeInAction=false;i.onCellValueChanged=function(t){var n={column:t.column,rowIndex:t.rowIndex,rowPinned:t.rowPinned};var r=i.activeCellEdit!==null&&i.cellPositionUtils.equals(i.activeCellEdit,n);var e=i.activeRowEdit!==null&&i.rowPositionUtils.sameRow(i.activeRowEdit,n);var s=r||e||i.isPasting||i.isRangeInAction;if(!s){return}var o=t.rowPinned,u=t.rowIndex,a=t.column,f=t.oldValue,h=t.value;var c={rowPinned:o,rowIndex:u,columnId:a.getColId(),newValue:h,oldValue:f};i.cellValueChanges.push(c)};i.clearStacks=function(){i.undoStack.clear();i.redoStack.clear()};return i}i.prototype.init=function(){var t=this;if(!this.gridOptionsService.is("undoRedoCellEditing")){return}var i=this.gridOptionsService.getNum("undoRedoCellEditingLimit");if(i<=0){return}this.undoStack=new yb(i);this.redoStack=new yb(i);this.addRowEditingListeners();this.addCellEditingListeners();this.addPasteListeners();this.addFillListeners();this.addCellKeyListeners();this.addManagedListener(this.eventService,hi.EVENT_CELL_VALUE_CHANGED,this.onCellValueChanged);this.addManagedListener(this.eventService,hi.EVENT_MODEL_UPDATED,(function(i){if(!i.keepUndoRedoStack){t.clearStacks()}}));this.addManagedListener(this.eventService,hi.EVENT_COLUMN_PIVOT_MODE_CHANGED,this.clearStacks);this.addManagedListener(this.eventService,hi.EVENT_NEW_COLUMNS_LOADED,this.clearStacks);this.addManagedListener(this.eventService,hi.EVENT_COLUMN_GROUP_OPENED,this.clearStacks);this.addManagedListener(this.eventService,hi.EVENT_COLUMN_ROW_GROUP_CHANGED,this.clearStacks);this.addManagedListener(this.eventService,hi.EVENT_COLUMN_MOVED,this.clearStacks);this.addManagedListener(this.eventService,hi.EVENT_COLUMN_PINNED,this.clearStacks);this.addManagedListener(this.eventService,hi.EVENT_COLUMN_VISIBLE,this.clearStacks);this.addManagedListener(this.eventService,hi.EVENT_ROW_DRAG_END,this.clearStacks);this.ctrlsService.whenReady((function(){t.gridBodyCtrl=t.ctrlsService.getGridBodyCtrl()}))};i.prototype.getCurrentUndoStackSize=function(){return this.undoStack?this.undoStack.getCurrentStackSize():0};i.prototype.getCurrentRedoStackSize=function(){return this.redoStack?this.redoStack.getCurrentStackSize():0};i.prototype.undo=function(t){var i={type:hi.EVENT_UNDO_STARTED,source:t};this.eventService.dispatchEvent(i);var n=this.undoRedo(this.undoStack,this.redoStack,"initialRange","oldValue","undo");var r={type:hi.EVENT_UNDO_ENDED,source:t,operationPerformed:n};this.eventService.dispatchEvent(r)};i.prototype.redo=function(t){var i={type:hi.EVENT_REDO_STARTED,source:t};this.eventService.dispatchEvent(i);var n=this.undoRedo(this.redoStack,this.undoStack,"finalRange","newValue","redo");var r={type:hi.EVENT_REDO_ENDED,source:t,operationPerformed:n};this.eventService.dispatchEvent(r)};i.prototype.undoRedo=function(t,i,n,r,e){if(!t){return false}var s=t.pop();if(!s||!s.cellValueChanges){return false}this.processAction(s,(function(t){return t[r]}),e);if(s instanceof wb){this.processRange(s.ranges||[s[n]])}else{this.processCell(s.cellValueChanges)}i.push(s);return true};i.prototype.processAction=function(t,i,n){var r=this;t.cellValueChanges.forEach((function(t){var e=t.rowIndex,s=t.rowPinned,o=t.columnId;var u={rowIndex:e,rowPinned:s};var a=r.getRowNode(u);if(!a.displayed){return}a.setDataValue(o,i(t),n)}))};i.prototype.processRange=function(t){var i=this;var n;this.rangeService.removeAllCellRanges(true);t.forEach((function(r,e){if(!r){return}var s=r.startRow;var o=r.endRow;if(e===t.length-1){n={rowPinned:s.rowPinned,rowIndex:s.rowIndex,columnId:r.startColumn.getColId()};i.setLastFocusedCell(n)}var u={rowStartIndex:s.rowIndex,rowStartPinned:s.rowPinned,rowEndIndex:o.rowIndex,rowEndPinned:o.rowPinned,columnStart:r.startColumn,columns:r.columns};i.rangeService.addCellRange(u)}))};i.prototype.processCell=function(t){var i=t[0];var n=i.rowIndex,r=i.rowPinned;var e={rowIndex:n,rowPinned:r};var s=this.getRowNode(e);var o={rowPinned:i.rowPinned,rowIndex:s.rowIndex,columnId:i.columnId};this.setLastFocusedCell(o,!!this.rangeService)};i.prototype.setLastFocusedCell=function(t,i){var n=t.rowIndex,r=t.columnId,e=t.rowPinned;var s=this.gridBodyCtrl.getScrollFeature();var o=this.columnModel.getGridColumn(r);if(!o){return}s.ensureIndexVisible(n);s.ensureColumnVisible(o);var u={rowIndex:n,column:o,rowPinned:e};this.focusService.setFocusedCell(Sb(Sb({},u),{forceBrowserFocus:true}));if(i){this.rangeService.setRangeToCell(u)}};i.prototype.addRowEditingListeners=function(){var t=this;this.addManagedListener(this.eventService,hi.EVENT_ROW_EDITING_STARTED,(function(i){t.activeRowEdit={rowIndex:i.rowIndex,rowPinned:i.rowPinned}}));this.addManagedListener(this.eventService,hi.EVENT_ROW_EDITING_STOPPED,(function(){var i=new bb(t.cellValueChanges);t.pushActionsToUndoStack(i);t.activeRowEdit=null}))};i.prototype.addCellEditingListeners=function(){var t=this;this.addManagedListener(this.eventService,hi.EVENT_CELL_EDITING_STARTED,(function(i){t.activeCellEdit={column:i.column,rowIndex:i.rowIndex,rowPinned:i.rowPinned}}));this.addManagedListener(this.eventService,hi.EVENT_CELL_EDITING_STOPPED,(function(i){t.activeCellEdit=null;var n=i.valueChanged&&!t.activeRowEdit&&!t.isPasting&&!t.isRangeInAction;if(n){var r=new bb(t.cellValueChanges);t.pushActionsToUndoStack(r)}}))};i.prototype.addPasteListeners=function(){var t=this;this.addManagedListener(this.eventService,hi.EVENT_PASTE_START,(function(){t.isPasting=true}));this.addManagedListener(this.eventService,hi.EVENT_PASTE_END,(function(){var i=new bb(t.cellValueChanges);t.pushActionsToUndoStack(i);t.isPasting=false}))};i.prototype.addFillListeners=function(){var t=this;this.addManagedListener(this.eventService,hi.EVENT_FILL_START,(function(){t.isRangeInAction=true}));this.addManagedListener(this.eventService,hi.EVENT_FILL_END,(function(i){var n=new wb(t.cellValueChanges,i.initialRange,i.finalRange);t.pushActionsToUndoStack(n);t.isRangeInAction=false}))};i.prototype.addCellKeyListeners=function(){var t=this;this.addManagedListener(this.eventService,hi.EVENT_KEY_SHORTCUT_CHANGED_CELL_START,(function(){t.isRangeInAction=true}));this.addManagedListener(this.eventService,hi.EVENT_KEY_SHORTCUT_CHANGED_CELL_END,(function(){var i;if(t.rangeService&&t.gridOptionsService.is("enableRangeSelection")){i=new wb(t.cellValueChanges,undefined,undefined,jb([],Ob(t.rangeService.getCellRanges())))}else{i=new bb(t.cellValueChanges)}t.pushActionsToUndoStack(i);t.isRangeInAction=false}))};i.prototype.pushActionsToUndoStack=function(t){this.undoStack.push(t);this.cellValueChanges=[];this.redoStack.clear()};i.prototype.getRowNode=function(t){switch(t.rowPinned){case"top":return this.pinnedRowModel.getPinnedTopRowData()[t.rowIndex];case"bottom":return this.pinnedRowModel.getPinnedBottomRowData()[t.rowIndex];default:return this.rowModel.getRow(t.rowIndex)}};Cb([ut("focusService")],i.prototype,"focusService",void 0);Cb([ut("ctrlsService")],i.prototype,"ctrlsService",void 0);Cb([ut("rowModel")],i.prototype,"rowModel",void 0);Cb([ut("pinnedRowModel")],i.prototype,"pinnedRowModel",void 0);Cb([ut("cellPositionUtils")],i.prototype,"cellPositionUtils",void 0);Cb([ut("rowPositionUtils")],i.prototype,"rowPositionUtils",void 0);Cb([ut("columnModel")],i.prototype,"columnModel",void 0);Cb([at("rangeService")],i.prototype,"rangeService",void 0);Cb([et],i.prototype,"init",null);i=Cb([ot("undoRedoService")],i);return i}(ri);var xb=function(){var t=function(i,n){t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var n in i)if(Object.prototype.hasOwnProperty.call(i,n))t[n]=i[n]};return t(i,n)};return function(i,n){if(typeof n!=="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(i,n);function r(){this.constructor=i}i.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}();var _b=function(t,i,n,r){var e=arguments.length,s=e<3?i:r===null?r=Object.getOwnPropertyDescriptor(i,n):r,o;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")s=Reflect.decorate(t,i,n,r);else for(var u=t.length-1;u>=0;u--)if(o=t[u])s=(e<3?o(s):e>3?o(i,n,s):o(i,n))||s;return e>3&&s&&Object.defineProperty(i,n,s),s};var Ab=function(t){xb(i,t);function i(){return t!==null&&t.apply(this,arguments)||this}i.prototype.findHeader=function(t,i){var n;var r;var e;if(t.column instanceof fi){r="getDisplayedGroup"+i;n=this.columnModel[r](t.column)}else{e="getDisplayedCol"+i;n=this.columnModel[e](t.column)}if(!n){return}var s=t.headerRowIndex;var o=this.getHeaderRowType(s);if(o===ul.COLUMN_GROUP){var u=n;if(u.isPadding()&&this.isAnyChildSpanningHeaderHeight(u)){var a=this.getColumnVisibleChild(u,s,i),f=a.nextFocusColumn,h=a.nextRow;if(f){n=f;s=h}}}return{column:n,headerRowIndex:s}};i.prototype.isAnyChildSpanningHeaderHeight=function(t){if(!t){return false}return t.getLeafColumns().some((function(t){return t.isSpanHeaderHeight()}))};i.prototype.getColumnVisibleParent=function(t,i){var n=this.getHeaderRowType(i);var r=n===ul.FLOATING_FILTER;var e=n===ul.COLUMN;var s=r?t:t.getParent();var o=i-1;if(e&&this.isAnyChildSpanningHeaderHeight(t.getParent())){while(s&&s.isPadding()){s=s.getParent();o--}if(o<0){s=t;o=i}}return{nextFocusColumn:s,nextRow:o}};i.prototype.getColumnVisibleChild=function(t,i,n){if(n===void 0){n="After"}var r=this.getHeaderRowType(i);var e=t;var s=i+1;if(r===ul.COLUMN_GROUP){var o=t.getLeafColumns();var u=n==="After"?o[0]:xt(o);if(this.isAnyChildSpanningHeaderHeight(u.getParent())){e=u;var a=u.getParent();while(a&&a!==t){a=a.getParent();s++}}else{e=t.getDisplayedChildren()[0]}}return{nextFocusColumn:e,nextRow:s}};i.prototype.getHeaderRowType=function(t){var i=this.ctrlsService.getHeaderRowContainerCtrl();if(i){return i.getRowType(t)}};i.prototype.findColAtEdgeForHeaderRow=function(t,i){var n=this.columnModel.getAllDisplayedColumns();var r=n[i==="start"?0:n.length-1];if(!r){return}var e=this.ctrlsService.getHeaderRowContainerCtrl(r.getPinned());var s=e.getRowType(t);if(s==ul.COLUMN_GROUP){var o=this.columnModel.getColumnGroupAtLevel(r,t);return{headerRowIndex:t,column:o}}return{headerRowIndex:s==null?-1:t,column:r}};_b([ut("columnModel")],i.prototype,"columnModel",void 0);_b([ut("ctrlsService")],i.prototype,"ctrlsService",void 0);i=_b([ot("headerPositionUtils")],i);return i}(ri);var Fb=function(t,i,n,r){var e=arguments.length,s=e<3?i:r===null?r=Object.getOwnPropertyDescriptor(i,n):r,o;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")s=Reflect.decorate(t,i,n,r);else for(var u=t.length-1;u>=0;u--)if(o=t[u])s=(e<3?o(s):e>3?o(i,n,s):o(i,n))||s;return e>3&&s&&Object.defineProperty(i,n,s),s};var kb=function(){function t(){}t.prototype.buildColumnDefs=function(t,i,n){var r=this;var e=[];var s={};t.forEach((function(t){var o=r.createDefFromColumn(t,i,n);var u=true;var a=o;var f=t.getOriginalParent();var h=null;while(f){var c=null;if(f.isPadding()){f=f.getOriginalParent();continue}var l=s[f.getGroupId()];if(l){l.children.push(a);u=false;break}c=r.createDefFromGroup(f);if(c){c.children=[a];s[c.groupId]=c;a=c;f=f.getOriginalParent()}if(f!=null&&h===f){u=false;break}h=f}if(u){e.push(a)}}));return e};t.prototype.createDefFromGroup=function(t){var i=y(t.getColGroupDef(),["children"]);if(i){i.groupId=t.getGroupId()}return i};t.prototype.createDefFromColumn=function(t,i,n){var r=y(t.getColDef());r.colId=t.getColId();r.width=t.getActualWidth();r.rowGroup=t.isRowGroupActive();r.rowGroupIndex=t.isRowGroupActive()?i.indexOf(t):null;r.pivot=t.isPivotActive();r.pivotIndex=t.isPivotActive()?n.indexOf(t):null;r.aggFunc=t.isValueActive()?t.getAggFunc():null;r.hide=t.isVisible()?undefined:true;r.pinned=t.isPinned()?t.getPinned():null;r.sort=t.getSort()?t.getSort():null;r.sortIndex=t.getSortIndex()!=null?t.getSortIndex():null;return r};t=Fb([ot("columnDefFactory")],t);return t}();var Tb=function(t,i,n,r){var e=arguments.length,s=e<3?i:r===null?r=Object.getOwnPropertyDescriptor(i,n):r,o;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")s=Reflect.decorate(t,i,n,r);else for(var u=t.length-1;u>=0;u--)if(o=t[u])s=(e<3?o(s):e>3?o(i,n,s):o(i,n))||s;return e>3&&s&&Object.defineProperty(i,n,s),s};var Mb=function(){function t(){}t.prototype.getInitialRowClasses=function(t){var n=[];if(i(t.extraCssClass)){n.push(t.extraCssClass)}n.push("ag-row");n.push(t.rowFocused?"ag-row-focus":"ag-row-no-focus");if(t.fadeRowIn){n.push("ag-opacity-zero")}n.push(t.rowIsEven?"ag-row-even":"ag-row-odd");if(t.rowNode.isRowPinned()){n.push("ag-row-pinned")}if(t.rowNode.isSelected()){n.push("ag-row-selected")}if(t.rowNode.footer){n.push("ag-row-footer")}n.push("ag-row-level-"+t.rowLevel);if(t.rowNode.stub){n.push("ag-row-loading")}if(t.fullWidthRow){n.push("ag-full-width-row")}if(t.expandable){n.push("ag-row-group");n.push(t.rowNode.expanded?"ag-row-group-expanded":"ag-row-group-contracted")}if(t.rowNode.dragging){n.push("ag-row-dragging")}Lt(n,this.processClassesFromGridOptions(t.rowNode));Lt(n,this.preProcessRowClassRules(t.rowNode));n.push(t.printLayout?"ag-row-position-relative":"ag-row-position-absolute");if(t.firstRowOnPage){n.push("ag-row-first")}if(t.lastRowOnPage){n.push("ag-row-last")}if(t.fullWidthRow){if(t.pinned==="left"){n.push("ag-cell-last-left-pinned")}if(t.pinned==="right"){n.push("ag-cell-first-right-pinned")}}return n};t.prototype.processClassesFromGridOptions=function(t){var i=[];var n=function(t){if(typeof t==="string"){i.push(t)}else if(Array.isArray(t)){t.forEach((function(t){return i.push(t)}))}};var r=this.gridOptionsService.get("rowClass");if(r){if(typeof r==="function"){console.warn("AG Grid: rowClass should not be a function, please use getRowClass instead");return[]}n(r)}var e=this.gridOptionsService.getCallback("getRowClass");if(e){var s={data:t.data,node:t,rowIndex:t.rowIndex};var o=e(s);n(o)}return i};t.prototype.preProcessRowClassRules=function(t){var i=[];this.processRowClassRules(t,(function(t){i.push(t)}),(function(t){}));return i};t.prototype.processRowClassRules=function(t,i,n){var r={data:t.data,node:t,rowIndex:t.rowIndex,api:this.gridOptionsService.api,columnApi:this.gridOptionsService.columnApi,context:this.gridOptionsService.context};this.stylingService.processClassRules(this.gridOptionsService.get("rowClassRules"),r,i,n)};t.prototype.calculateRowLevel=function(t){if(t.group){return t.level}return t.parent?t.parent.level+1:0};Tb([ut("stylingService")],t.prototype,"stylingService",void 0);Tb([ut("gridOptionsService")],t.prototype,"gridOptionsService",void 0);t=Tb([ot("rowCssClassCalculator")],t);return t}();var Db=function(){var t=function(i,n){t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var n in i)if(Object.prototype.hasOwnProperty.call(i,n))t[n]=i[n]};return t(i,n)};return function(i,n){if(typeof n!=="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(i,n);function r(){this.constructor=i}i.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}();var Gb=function(t,i,n,r){var e=arguments.length,s=e<3?i:r===null?r=Object.getOwnPropertyDescriptor(i,n):r,o;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")s=Reflect.decorate(t,i,n,r);else for(var u=t.length-1;u>=0;u--)if(o=t[u])s=(e<3?o(s):e>3?o(i,n,s):o(i,n))||s;return e>3&&s&&Object.defineProperty(i,n,s),s};var Pb=function(t){Db(i,t);function i(){return t!==null&&t.apply(this,arguments)||this}i.prototype.init=function(){var t=this;this.isAccentedSort=this.gridOptionsService.is("accentedSort");this.primaryColumnsSortGroups=this.gridOptionsService.isColumnsSortingCoupledToGroup();this.addManagedPropertyListener("accentedSort",(function(i){return t.isAccentedSort=i.currentValue}));this.addManagedPropertyListener("autoGroupColumnDef",(function(){return t.primaryColumnsSortGroups=t.gridOptionsService.isColumnsSortingCoupledToGroup()}))};i.prototype.doFullSort=function(t,i){var n=function(t,i){return{currentPos:i,rowNode:t}};var r=t.map(n);r.sort(this.compareRowNodes.bind(this,i));return r.map((function(t){return t.rowNode}))};i.prototype.compareRowNodes=function(t,i,n){var r=i.rowNode;var e=n.rowNode;for(var s=0,o=t.length;s<o;s++){var u=t[s];var a=u.sort==="desc";var f=this.getValue(r,u.column);var h=this.getValue(e,u.column);var c=void 0;var l=this.getComparator(u,r);if(l){c=l(f,h,r,e,a)}else{c=Xe.defaultComparator(f,h,this.isAccentedSort)}var v=!isNaN(c);if(v&&c!==0){return u.sort==="asc"?c:c*-1}}return i.currentPos-n.currentPos};i.prototype.getComparator=function(t,i){var n=t.column;var r=n.getColDef().comparator;if(r!=null){return r}if(!n.getColDef().showRowGroup){return}var e=!i.group&&n.getColDef().field;if(!e){return}var s=this.columnModel.getPrimaryColumn(e);if(!s){return}return s.getColDef().comparator};i.prototype.getValue=function(t,i){var n,r;if(!this.primaryColumnsSortGroups){return this.valueService.getValue(i,t,false,false)}var e=t.rowGroupColumn===i;if(e){var s=this.gridOptionsService.isGroupUseEntireRow(this.columnModel.isPivotActive());if(s){var o=i.getColDef().keyCreator;if(o){return t.key}var u=(n=t.allLeafChildren)===null||n===void 0?void 0:n[0];if(u){return this.valueService.getValue(i,u,false,false)}return undefined}var a=this.columnModel.getGroupDisplayColumnForGroup(i.getId());if(!a){return undefined}return(r=t.groupData)===null||r===void 0?void 0:r[a.getId()]}if(t.group&&i.getColDef().showRowGroup){return undefined}return this.valueService.getValue(i,t,false,false)};Gb([ut("valueService")],i.prototype,"valueService",void 0);Gb([ut("columnModel")],i.prototype,"columnModel",void 0);Gb([et],i.prototype,"init",null);i=Gb([ot("rowNodeSorter")],i);return i}(ri);var Eb=function(){var t=function(i,n){t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var n in i)if(Object.prototype.hasOwnProperty.call(i,n))t[n]=i[n]};return t(i,n)};return function(i,n){if(typeof n!=="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(i,n);function r(){this.constructor=i}i.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}();var Ib=function(t,i,n,r){var e=arguments.length,s=e<3?i:r===null?r=Object.getOwnPropertyDescriptor(i,n):r,o;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")s=Reflect.decorate(t,i,n,r);else for(var u=t.length-1;u>=0;u--)if(o=t[u])s=(e<3?o(s):e>3?o(i,n,s):o(i,n))||s;return e>3&&s&&Object.defineProperty(i,n,s),s};var Nb=function(t){Eb(i,t);function i(){var i=t!==null&&t.apply(this,arguments)||this;i.ready=false;i.readyCallbacks=[];return i}n=i;i.prototype.checkReady=function(){this.ready=this.gridCtrl!=null&&this.gridBodyCtrl!=null&&this.centerRowContainerCtrl!=null&&this.leftRowContainerCtrl!=null&&this.rightRowContainerCtrl!=null&&this.bottomCenterRowContainerCtrl!=null&&this.bottomLeftRowContainerCtrl!=null&&this.bottomRightRowContainerCtrl!=null&&this.topCenterRowContainerCtrl!=null&&this.topLeftRowContainerCtrl!=null&&this.topRightRowContainerCtrl!=null&&this.stickyTopCenterRowContainerCtrl!=null&&this.stickyTopLeftRowContainerCtrl!=null&&this.stickyTopRightRowContainerCtrl!=null&&this.centerHeaderRowContainerCtrl!=null&&this.leftHeaderRowContainerCtrl!=null&&this.rightHeaderRowContainerCtrl!=null&&this.fakeHScrollComp!=null&&this.fakeVScrollComp!=null&&this.gridHeaderCtrl!=null;if(this.ready){var t=this.createReadyParams();this.readyCallbacks.forEach((function(i){return i(t)}));this.readyCallbacks.length=0}};i.prototype.whenReady=function(t){if(this.ready){t(this.createReadyParams())}else{this.readyCallbacks.push(t)}};i.prototype.createReadyParams=function(){return{centerRowContainerCtrl:this.centerRowContainerCtrl,leftRowContainerCtrl:this.leftRowContainerCtrl,rightRowContainerCtrl:this.rightRowContainerCtrl,bottomCenterRowContainerCtrl:this.bottomCenterRowContainerCtrl,bottomLeftRowContainerCtrl:this.bottomLeftRowContainerCtrl,bottomRightRowContainerCtrl:this.bottomRightRowContainerCtrl,topCenterRowContainerCtrl:this.topCenterRowContainerCtrl,topLeftRowContainerCtrl:this.topLeftRowContainerCtrl,topRightRowContainerCtrl:this.topRightRowContainerCtrl,stickyTopCenterRowContainerCtrl:this.stickyTopCenterRowContainerCtrl,stickyTopLeftRowContainerCtrl:this.stickyTopLeftRowContainerCtrl,stickyTopRightRowContainerCtrl:this.stickyTopRightRowContainerCtrl,centerHeaderRowContainerCtrl:this.centerHeaderRowContainerCtrl,leftHeaderRowContainerCtrl:this.leftHeaderRowContainerCtrl,rightHeaderRowContainerCtrl:this.rightHeaderRowContainerCtrl,fakeHScrollComp:this.fakeHScrollComp,fakeVScrollComp:this.fakeVScrollComp,gridBodyCtrl:this.gridBodyCtrl,gridCtrl:this.gridCtrl,gridHeaderCtrl:this.gridHeaderCtrl}};i.prototype.registerFakeHScrollComp=function(t){this.fakeHScrollComp=t;this.checkReady()};i.prototype.registerFakeVScrollComp=function(t){this.fakeVScrollComp=t;this.checkReady()};i.prototype.registerGridHeaderCtrl=function(t){this.gridHeaderCtrl=t;this.checkReady()};i.prototype.registerCenterRowContainerCtrl=function(t){this.centerRowContainerCtrl=t;this.checkReady()};i.prototype.registerLeftRowContainerCtrl=function(t){this.leftRowContainerCtrl=t;this.checkReady()};i.prototype.registerRightRowContainerCtrl=function(t){this.rightRowContainerCtrl=t;this.checkReady()};i.prototype.registerTopCenterRowContainerCtrl=function(t){this.topCenterRowContainerCtrl=t;this.checkReady()};i.prototype.registerTopLeftRowContainerCon=function(t){this.topLeftRowContainerCtrl=t;this.checkReady()};i.prototype.registerTopRightRowContainerCtrl=function(t){this.topRightRowContainerCtrl=t;this.checkReady()};i.prototype.registerStickyTopCenterRowContainerCtrl=function(t){this.stickyTopCenterRowContainerCtrl=t;this.checkReady()};i.prototype.registerStickyTopLeftRowContainerCon=function(t){this.stickyTopLeftRowContainerCtrl=t;this.checkReady()};i.prototype.registerStickyTopRightRowContainerCtrl=function(t){this.stickyTopRightRowContainerCtrl=t;this.checkReady()};i.prototype.registerBottomCenterRowContainerCtrl=function(t){this.bottomCenterRowContainerCtrl=t;this.checkReady()};i.prototype.registerBottomLeftRowContainerCtrl=function(t){this.bottomLeftRowContainerCtrl=t;this.checkReady()};i.prototype.registerBottomRightRowContainerCtrl=function(t){this.bottomRightRowContainerCtrl=t;this.checkReady()};i.prototype.registerHeaderContainer=function(t,i){switch(i){case"left":this.leftHeaderRowContainerCtrl=t;break;case"right":this.rightHeaderRowContainerCtrl=t;break;default:this.centerHeaderRowContainerCtrl=t;break}this.checkReady()};i.prototype.registerGridBodyCtrl=function(t){this.gridBodyCtrl=t;this.checkReady()};i.prototype.registerGridCtrl=function(t){this.gridCtrl=t;this.checkReady()};i.prototype.getFakeHScrollComp=function(){return this.fakeHScrollComp};i.prototype.getFakeVScrollComp=function(){return this.fakeVScrollComp};i.prototype.getGridHeaderCtrl=function(){return this.gridHeaderCtrl};i.prototype.getGridCtrl=function(){return this.gridCtrl};i.prototype.getCenterRowContainerCtrl=function(){return this.centerRowContainerCtrl};i.prototype.getTopCenterRowContainerCtrl=function(){return this.topCenterRowContainerCtrl};i.prototype.getBottomCenterRowContainerCtrl=function(){return this.bottomCenterRowContainerCtrl};i.prototype.getStickyTopCenterRowContainerCtrl=function(){return this.stickyTopCenterRowContainerCtrl};i.prototype.getGridBodyCtrl=function(){return this.gridBodyCtrl};i.prototype.getHeaderRowContainerCtrls=function(){return[this.leftHeaderRowContainerCtrl,this.rightHeaderRowContainerCtrl,this.centerHeaderRowContainerCtrl]};i.prototype.getHeaderRowContainerCtrl=function(t){switch(t){case"left":return this.leftHeaderRowContainerCtrl;case"right":return this.rightHeaderRowContainerCtrl;default:return this.centerHeaderRowContainerCtrl}};var n;i.NAME="ctrlsService";i=n=Ib([ot(n.NAME)],i);return i}(ri);var Hb=function(){var t=function(i,n){t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var n in i)if(Object.prototype.hasOwnProperty.call(i,n))t[n]=i[n]};return t(i,n)};return function(i,n){if(typeof n!=="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(i,n);function r(){this.constructor=i}i.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}();var Lb=function(t,i,n,r){var e=arguments.length,s=e<3?i:r===null?r=Object.getOwnPropertyDescriptor(i,n):r,o;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")s=Reflect.decorate(t,i,n,r);else for(var u=t.length-1;u>=0;u--)if(o=t[u])s=(e<3?o(s):e>3?o(i,n,s):o(i,n))||s;return e>3&&s&&Object.defineProperty(i,n,s),s};var Vb=function(t){Hb(i,t);function i(){var i=t!==null&&t.apply(this,arguments)||this;i.registry={};return i}i.prototype.register=function(t){this.registry[t.controllerName]=t.controllerClass};i.prototype.getInstance=function(t){var i=this.registry[t];if(i==null){return undefined}return new i};i=Lb([ot("ctrlsFactory")],i);return i}(ri);var Bb=function(){var t=function(i,n){t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var n in i)if(Object.prototype.hasOwnProperty.call(i,n))t[n]=i[n]};return t(i,n)};return function(i,n){if(typeof n!=="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(i,n);function r(){this.constructor=i}i.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}();var zb=function(t,i,n,r){var e=arguments.length,s=e<3?i:r===null?r=Object.getOwnPropertyDescriptor(i,n):r,o;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")s=Reflect.decorate(t,i,n,r);else for(var u=t.length-1;u>=0;u--)if(o=t[u])s=(e<3?o(s):e>3?o(i,n,s):o(i,n))||s;return e>3&&s&&Object.defineProperty(i,n,s),s};var Wb=function(t){Bb(i,t);function i(i,n){var r=t.call(this,i)||this;r.direction=n;r.hideTimeout=null;return r}i.prototype.postConstruct=function(){this.addManagedListener(this.eventService,hi.EVENT_SCROLL_VISIBILITY_CHANGED,this.onScrollVisibilityChanged.bind(this));this.onScrollVisibilityChanged();this.addOrRemoveCssClass("ag-apple-scrollbar",or()||ur())};i.prototype.initialiseInvisibleScrollbar=function(){if(this.invisibleScrollbar!==undefined){return}this.invisibleScrollbar=pr();if(this.invisibleScrollbar){this.hideAndShowInvisibleScrollAsNeeded();this.addActiveListenerToggles()}};i.prototype.addActiveListenerToggles=function(){var t=this;var i=["mouseenter","mousedown","touchstart"];var n=["mouseleave","touchend"];var r=this.getGui();i.forEach((function(i){return t.addManagedListener(r,i,(function(){return t.addOrRemoveCssClass("ag-scrollbar-active",true)}))}));n.forEach((function(i){return t.addManagedListener(r,i,(function(){return t.addOrRemoveCssClass("ag-scrollbar-active",false)}))}))};i.prototype.onScrollVisibilityChanged=function(){var t=this;if(this.invisibleScrollbar===undefined){this.initialiseInvisibleScrollbar()}this.animationFrameService.requestAnimationFrame((function(){return t.setScrollVisible()}))};i.prototype.hideAndShowInvisibleScrollAsNeeded=function(){var t=this;this.addManagedListener(this.eventService,hi.EVENT_BODY_SCROLL,(function(i){if(i.direction===t.direction){if(t.hideTimeout!==null){window.clearTimeout(t.hideTimeout);t.hideTimeout=null}t.addOrRemoveCssClass("ag-scrollbar-scrolling",true)}}));this.addManagedListener(this.eventService,hi.EVENT_BODY_SCROLL_END,(function(){t.hideTimeout=window.setTimeout((function(){t.addOrRemoveCssClass("ag-scrollbar-scrolling",false);t.hideTimeout=null}),400)}))};i.prototype.attemptSettingScrollPosition=function(t){var i=this;var n=this.getViewport();U((function(){return ne(n)}),(function(){return i.setScrollPosition(t)}),100)};i.prototype.getViewport=function(){return this.eViewport};i.prototype.getContainer=function(){return this.eContainer};i.prototype.onScrollCallback=function(t){this.addManagedListener(this.getViewport(),"scroll",t)};zb([ds("eViewport")],i.prototype,"eViewport",void 0);zb([ds("eContainer")],i.prototype,"eContainer",void 0);zb([ut("scrollVisibleService")],i.prototype,"scrollVisibleService",void 0);zb([ut("ctrlsService")],i.prototype,"ctrlsService",void 0);zb([ut("animationFrameService")],i.prototype,"animationFrameService",void 0);return i}(vs);var Ub=function(){var t=function(i,n){t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var n in i)if(Object.prototype.hasOwnProperty.call(i,n))t[n]=i[n]};return t(i,n)};return function(i,n){if(typeof n!=="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(i,n);function r(){this.constructor=i}i.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}();var Kb=function(t,i,n,r){var e=arguments.length,s=e<3?i:r===null?r=Object.getOwnPropertyDescriptor(i,n):r,o;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")s=Reflect.decorate(t,i,n,r);else for(var u=t.length-1;u>=0;u--)if(o=t[u])s=(e<3?o(s):e>3?o(i,n,s):o(i,n))||s;return e>3&&s&&Object.defineProperty(i,n,s),s};var qb=function(t){Ub(i,t);function i(){return t.call(this,i.TEMPLATE,"horizontal")||this}i.prototype.postConstruct=function(){var i=this;t.prototype.postConstruct.call(this);var n=this.setFakeHScrollSpacerWidths.bind(this);this.addManagedListener(this.eventService,hi.EVENT_DISPLAYED_COLUMNS_CHANGED,n);this.addManagedListener(this.eventService,hi.EVENT_DISPLAYED_COLUMNS_WIDTH_CHANGED,n);this.addManagedListener(this.eventService,hi.EVENT_PINNED_ROW_DATA_CHANGED,this.onPinnedRowDataChanged.bind(this));this.addManagedPropertyListener("domLayout",n);this.ctrlsService.registerFakeHScrollComp(this);this.createManagedBean(new sc((function(t){return i.eContainer.style.width=t+"px"})))};i.prototype.initialiseInvisibleScrollbar=function(){if(this.invisibleScrollbar!==undefined){return}this.enableRtl=this.gridOptionsService.is("enableRtl");t.prototype.initialiseInvisibleScrollbar.call(this);if(this.invisibleScrollbar){this.refreshCompBottom()}};i.prototype.onPinnedRowDataChanged=function(){this.refreshCompBottom()};i.prototype.refreshCompBottom=function(){if(!this.invisibleScrollbar){return}var t=this.pinnedRowModel.getPinnedBottomTotalHeight();this.getGui().style.bottom=t+"px"};i.prototype.onScrollVisibilityChanged=function(){t.prototype.onScrollVisibilityChanged.call(this);this.setFakeHScrollSpacerWidths()};i.prototype.setFakeHScrollSpacerWidths=function(){var t=this.scrollVisibleService.isVerticalScrollShowing();var i=this.columnModel.getDisplayedColumnsRightWidth();var n=!this.enableRtl&&t;var r=this.gridOptionsService.getScrollbarWidth();if(n){i+=r}ge(this.eRightSpacer,i);this.eRightSpacer.classList.toggle("ag-scroller-corner",i<=r);var e=this.columnModel.getDisplayedColumnsLeftWidth();var s=this.enableRtl&&t;if(s){e+=r}ge(this.eLeftSpacer,e);this.eLeftSpacer.classList.toggle("ag-scroller-corner",e<=r)};i.prototype.setScrollVisible=function(){var t=this.scrollVisibleService.isHorizontalScrollShowing();var i=this.invisibleScrollbar;var n=this.gridOptionsService.is("suppressHorizontalScroll");var r=t?this.gridOptionsService.getScrollbarWidth()||0:0;var e=r===0&&i?16:r;var s=!n?e:0;this.addOrRemoveCssClass("ag-scrollbar-invisible",i);we(this.getGui(),s);we(this.eViewport,s);we(this.eContainer,s);this.setDisplayed(t,{skipAriaHidden:true})};i.prototype.getScrollPosition=function(){return Zr(this.getViewport(),this.enableRtl)};i.prototype.setScrollPosition=function(t){if(!ne(this.getViewport())){this.attemptSettingScrollPosition(t)}$r(this.getViewport(),t,this.enableRtl)};i.TEMPLATE='<div class="ag-body-horizontal-scroll" aria-hidden="true">\n <div class="ag-horizontal-left-spacer" ref="eLeftSpacer"></div>\n <div class="ag-body-horizontal-scroll-viewport" ref="eViewport">\n <div class="ag-body-horizontal-scroll-container" ref="eContainer"></div>\n </div>\n <div class="ag-horizontal-right-spacer" ref="eRightSpacer"></div>\n </div>';Kb([ds("eLeftSpacer")],i.prototype,"eLeftSpacer",void 0);Kb([ds("eRightSpacer")],i.prototype,"eRightSpacer",void 0);Kb([ut("columnModel")],i.prototype,"columnModel",void 0);Kb([ut("pinnedRowModel")],i.prototype,"pinnedRowModel",void 0);Kb([et],i.prototype,"postConstruct",null);return i}(Wb);var Yb=function(){var t=function(i,n){t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var n in i)if(Object.prototype.hasOwnProperty.call(i,n))t[n]=i[n]};return t(i,n)};return function(i,n){if(typeof n!=="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(i,n);function r(){this.constructor=i}i.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}();var Qb=function(t,i,n,r){var e=arguments.length,s=e<3?i:r===null?r=Object.getOwnPropertyDescriptor(i,n):r,o;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")s=Reflect.decorate(t,i,n,r);else for(var u=t.length-1;u>=0;u--)if(o=t[u])s=(e<3?o(s):e>3?o(i,n,s):o(i,n))||s;return e>3&&s&&Object.defineProperty(i,n,s),s};var Jb=function(t){Yb(i,t);function i(){return t!==null&&t.apply(this,arguments)||this}i.prototype.postConstruct=function(){var t=this.checkContainerWidths.bind(this);this.addManagedListener(this.eventService,hi.EVENT_DISPLAYED_COLUMNS_CHANGED,t);this.addManagedListener(this.eventService,hi.EVENT_DISPLAYED_COLUMNS_WIDTH_CHANGED,t);this.addManagedPropertyListener("domLayout",t)};i.prototype.checkContainerWidths=function(){var t=this.gridOptionsService.isDomLayout("print");var i=t?0:this.columnModel.getDisplayedColumnsLeftWidth();var n=t?0:this.columnModel.getDisplayedColumnsRightWidth();if(i!=this.leftWidth){this.leftWidth=i;this.eventService.dispatchEvent({type:hi.EVENT_LEFT_PINNED_WIDTH_CHANGED})}if(n!=this.rightWidth){this.rightWidth=n;this.eventService.dispatchEvent({type:hi.EVENT_RIGHT_PINNED_WIDTH_CHANGED})}};i.prototype.getPinnedRightWidth=function(){return this.rightWidth};i.prototype.getPinnedLeftWidth=function(){return this.leftWidth};Qb([ut("columnModel")],i.prototype,"columnModel",void 0);Qb([et],i.prototype,"postConstruct",null);i=Qb([ot("pinnedWidthService")],i);return i}(ri);var Zb=function(){var t=function(i,n){t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var n in i)if(Object.prototype.hasOwnProperty.call(i,n))t[n]=i[n]};return t(i,n)};return function(i,n){if(typeof n!=="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(i,n);function r(){this.constructor=i}i.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}();var $b=function(t,i,n,r){var e=arguments.length,s=e<3?i:r===null?r=Object.getOwnPropertyDescriptor(i,n):r,o;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")s=Reflect.decorate(t,i,n,r);else for(var u=t.length-1;u>=0;u--)if(o=t[u])s=(e<3?o(s):e>3?o(i,n,s):o(i,n))||s;return e>3&&s&&Object.defineProperty(i,n,s),s};var Xb=function(t){Zb(i,t);function i(){var i=t!==null&&t.apply(this,arguments)||this;i.events=[];return i}i.prototype.postConstruct=function(){if(this.rowModel.getType()=="clientSide"){this.clientSideRowModel=this.rowModel}};i.prototype.dispatchExpanded=function(t){var i=this;if(this.clientSideRowModel==null){this.eventService.dispatchEvent(t);return}this.events.push(t);var n=function(){if(i.clientSideRowModel){i.clientSideRowModel.onRowGroupOpened()}i.events.forEach((function(t){return i.eventService.dispatchEvent(t)}));i.events=[]};if(this.dispatchExpandedDebounced==null){this.dispatchExpandedDebounced=this.animationFrameService.debounce(n)}this.dispatchExpandedDebounced()};$b([ut("animationFrameService")],i.prototype,"animationFrameService",void 0);$b([ut("rowModel")],i.prototype,"rowModel",void 0);$b([et],i.prototype,"postConstruct",null);i=$b([ot("rowNodeEventThrottle")],i);return i}(ri);var tw=function(){tw=Object.assign||function(t){for(var i,n=1,r=arguments.length;n<r;n++){i=arguments[n];for(var e in i)if(Object.prototype.hasOwnProperty.call(i,e))t[e]=i[e]}return t};return tw.apply(this,arguments)};var iw=function(t,i,n,r){var e=arguments.length,s=e<3?i:r===null?r=Object.getOwnPropertyDescriptor(i,n):r,o;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")s=Reflect.decorate(t,i,n,r);else for(var u=t.length-1;u>=0;u--)if(o=t[u])s=(e<3?o(s):e>3?o(i,n,s):o(i,n))||s;return e>3&&s&&Object.defineProperty(i,n,s),s};var nw=function(t,i){return function(n,r){i(n,r,t)}};var rw=function(t,i){var n=typeof Symbol==="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),e,s=[],o;try{while((i===void 0||i-- >0)&&!(e=r.next()).done)s.push(e.value)}catch(t){o={error:t}}finally{try{if(e&&!e.done&&(n=r["return"]))n.call(r)}finally{if(o)throw o.error}}return s};var ew=function(t,i){for(var n=0,r=i.length,e=t.length;n<r;n++,e++)t[e]=i[n];return t};function sw(t){if(typeof t=="number"){return t}if(typeof t=="string"){return parseInt(t,10)}}function ow(t){return t===true||t==="true"}var uw=function(){function t(){var t=this;this.destroyed=false;this.domDataKey="__AG_"+Math.random().toString();this.propertyEventService=new dt;this.globalEventHandlerFactory=function(i){return function(n,e){if(t.destroyed){return}var s=r.alwaysSyncGlobalEvents.has(n);if(s&&!i||!s&&i){return}var o=Pi.getCallbackForEvent(n);if(typeof t.gridOptions[o]==="function"){t.gridOptions[o](e)}}}}r=t;Object.defineProperty(t.prototype,"context",{get:function(){return this.gridOptions["context"]},enumerable:false,configurable:true});t.prototype.agWire=function(t,i){this.gridOptions.api=t;this.gridOptions.columnApi=i;this.api=t;this.columnApi=i};t.prototype.init=function(){this.gridOptionLookup=new Set(ew(ew([],rw(Pi.ALL_PROPERTIES)),rw(Pi.EVENT_CALLBACKS)));var t=!this.is("suppressAsyncEvents");this.eventService.addGlobalListener(this.globalEventHandlerFactory().bind(this),t);this.eventService.addGlobalListener(this.globalEventHandlerFactory(true).bind(this),false);this.getScrollbarWidth()};t.prototype.destroy=function(){this.gridOptions.api=null;this.gridOptions.columnApi=null;this.destroyed=true};t.prototype.is=function(t){return ow(this.gridOptions[t])};t.prototype.get=function(t){return this.gridOptions[t]};t.prototype.getNum=function(t){return sw(this.gridOptions[t])};t.prototype.getCallback=function(t){return this.mergeGridCommonParams(this.gridOptions[t])};t.prototype.exists=function(t){return i(this.gridOptions[t])};t.prototype.mergeGridCommonParams=function(t){var i=this;if(t){var n=function(n){var r=n;r.api=i.api;r.columnApi=i.columnApi;r.context=i.context;return t(r)};return n}return t};t.prototype.__setPropertyOnly=function(t,i){var n=this.gridOptions[t];if(this.gridOptionLookup.has(t)){this.gridOptions[t]=i}return n!==i};t.prototype.set=function(t,i,n,r,e){if(n===void 0){n=false}if(r===void 0){r={}}if(e===void 0){e=undefined}if(this.gridOptionLookup.has(t)){var s=this.gridOptions[t];if(n||s!==i){this.gridOptions[t]=i;var o=tw({type:t,currentValue:i,previousValue:s,changeSet:e},r);this.propertyEventService.dispatchEvent(o)}}};t.prototype.addEventListener=function(t,i){this.propertyEventService.addEventListener(t,i)};t.prototype.removeEventListener=function(t,i){this.propertyEventService.removeEventListener(t,i)};t.prototype.getGridId=function(){return this.api.getGridId()};t.prototype.getScrollbarWidth=function(){if(this.scrollbarWidth==null){var t=typeof this.gridOptions.scrollbarWidth==="number"&&this.gridOptions.scrollbarWidth>=0;var i=t?this.gridOptions.scrollbarWidth:vr();if(i!=null){this.scrollbarWidth=i;this.eventService.dispatchEvent({type:hi.EVENT_SCROLLBAR_WIDTH_CHANGED})}}return this.scrollbarWidth};t.prototype.isRowModelType=function(t){return this.gridOptions.rowModelType===t||t==="clientSide"&&n(this.gridOptions.rowModelType)};t.prototype.isDomLayout=function(t){var i;var n=(i=this.gridOptions.domLayout)!==null&&i!==void 0?i:"normal";return n===t};t.prototype.isRowSelection=function(){return this.gridOptions.rowSelection==="single"||this.gridOptions.rowSelection==="multiple"};t.prototype.useAsyncEvents=function(){return!this.is("suppressAsyncEvents")};t.prototype.isGetRowHeightFunction=function(){return typeof this.gridOptions.getRowHeight==="function"};t.prototype.getRowHeightForNode=function(t,i,n){if(i===void 0){i=false}if(n==null){n=this.environment.getDefaultRowHeight()}if(this.isGetRowHeightFunction()){if(i){return{height:n,estimated:true}}var r={node:t,data:t.data};var e=this.getCallback("getRowHeight")(r);if(this.isNumeric(e)){if(e===0){P((function(){return console.warn("AG Grid: The return of `getRowHeight` cannot be zero. If the intention is to hide rows, use a filter instead.")}),"invalidRowHeight")}return{height:Math.max(1,e),estimated:false}}}if(t.detail&&this.is("masterDetail")){return this.getMasterDetailRowHeight()}var s=this.gridOptions.rowHeight&&this.isNumeric(this.gridOptions.rowHeight)?this.gridOptions.rowHeight:n;return{height:s,estimated:false}};t.prototype.getMasterDetailRowHeight=function(){if(this.is("detailRowAutoHeight")){return{height:1,estimated:false}}if(this.isNumeric(this.gridOptions.detailRowHeight)){return{height:this.gridOptions.detailRowHeight,estimated:false}}return{height:300,estimated:false}};t.prototype.getRowHeightAsNumber=function(){if(!this.gridOptions.rowHeight||n(this.gridOptions.rowHeight)){return this.environment.getDefaultRowHeight()}var t=this.environment.refreshRowHeightVariable();if(t!==-1){return t}console.warn("AG Grid row height must be a number if not using standard row model");return this.environment.getDefaultRowHeight()};t.prototype.isNumeric=function(t){return!isNaN(t)&&typeof t==="number"&&isFinite(t)};t.prototype.getDomDataKey=function(){return this.domDataKey};t.prototype.getDomData=function(t,i){var n=t[this.getDomDataKey()];return n?n[i]:undefined};t.prototype.setDomData=function(t,i,r){var e=this.getDomDataKey();var s=t[e];if(n(s)){s={};t[e]=s}s[i]=r};t.prototype.getDocument=function(){var t=null;if(this.gridOptions.getDocument&&i(this.gridOptions.getDocument)){t=this.gridOptions.getDocument()}else if(this.eGridDiv){t=this.eGridDiv.ownerDocument}if(t&&i(t)){return t}return document};t.prototype.getWindow=function(){var t=this.getDocument();return t.defaultView||window};t.prototype.getRootNode=function(){return this.eGridDiv.getRootNode()};t.prototype.getAsyncTransactionWaitMillis=function(){return i(this.gridOptions.asyncTransactionWaitMillis)?this.gridOptions.asyncTransactionWaitMillis:50};t.prototype.isAnimateRows=function(){if(this.is("ensureDomOrder")){return false}return this.is("animateRows")};t.prototype.isGroupRowsSticky=function(){if(this.is("suppressGroupRowsSticky")||this.is("paginateChildRows")||this.is("groupHideOpenParents")){return false}return true};t.prototype.isColumnsSortingCoupledToGroup=function(){var t=this.gridOptions.autoGroupColumnDef;var i=this.isRowModelType("clientSide");return i&&!(t===null||t===void 0?void 0:t.comparator)&&!this.is("treeData")};t.prototype.getGroupAggFiltering=function(){var t=this.gridOptions.groupAggFiltering;if(typeof t==="function"){return this.getCallback("groupAggFiltering")}if(ow(t)){return function(){return true}}return undefined};t.prototype.isGroupIncludeFooterTrueOrCallback=function(){var t=this.gridOptions.groupIncludeFooter;return ow(t)||typeof t==="function"};t.prototype.getGroupIncludeFooter=function(){var t=this.gridOptions.groupIncludeFooter;if(typeof t==="function"){return this.getCallback("groupIncludeFooter")}if(ow(t)){return function(){return true}}return function(){return false}};t.prototype.isGroupMultiAutoColumn=function(){if(this.gridOptions.groupDisplayType){return qi("multipleColumns",this.gridOptions.groupDisplayType)}return this.is("groupHideOpenParents")};t.prototype.isGroupUseEntireRow=function(t){if(t){return false}return this.gridOptions.groupDisplayType?qi("groupRows",this.gridOptions.groupDisplayType):false};var r;t.alwaysSyncGlobalEvents=new Set([hi.EVENT_GRID_PRE_DESTROYED]);iw([ut("gridOptions")],t.prototype,"gridOptions",void 0);iw([ut("eventService")],t.prototype,"eventService",void 0);iw([ut("environment")],t.prototype,"environment",void 0);iw([ut("eGridDiv")],t.prototype,"eGridDiv",void 0);iw([nw(0,ht("gridApi")),nw(1,ht("columnApi"))],t.prototype,"agWire",null);iw([et],t.prototype,"init",null);iw([st],t.prototype,"destroy",null);t=r=iw([ot("gridOptionsService")],t);return t}();var aw=function(){var t=function(i,n){t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var n in i)if(Object.prototype.hasOwnProperty.call(i,n))t[n]=i[n]};return t(i,n)};return function(i,n){if(typeof n!=="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(i,n);function r(){this.constructor=i}i.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}();var fw=function(t,i,n,r){var e=arguments.length,s=e<3?i:r===null?r=Object.getOwnPropertyDescriptor(i,n):r,o;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")s=Reflect.decorate(t,i,n,r);else for(var u=t.length-1;u>=0;u--)if(o=t[u])s=(e<3?o(s):e>3?o(i,n,s):o(i,n))||s;return e>3&&s&&Object.defineProperty(i,n,s),s};var hw=function(t){aw(i,t);function i(){return t!==null&&t.apply(this,arguments)||this}i.prototype.getLocaleTextFunc=function(){var t=this.gridOptionsService.getCallback("getLocaleText");if(t){return function(i,n,r){var e={key:i,defaultValue:n,variableValues:r};return t(e)}}var i=this.gridOptionsService.get("localeText");return function(t,n,r){var e=i&&i[t];if(e&&r&&r.length){var s=0;while(true){if(s>=r.length){break}var o=e.indexOf("${variable}");if(o===-1){break}e=e.replace("${variable}",r[s++])}}return e!==null&&e!==void 0?e:n}};i=fw([ot("localeService")],i);return i}(ri);var cw=function(){var t=function(i,n){t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var n in i)if(Object.prototype.hasOwnProperty.call(i,n))t[n]=i[n]};return t(i,n)};return function(i,n){if(typeof n!=="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(i,n);function r(){this.constructor=i}i.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}();var lw=function(t,i,n,r){var e=arguments.length,s=e<3?i:r===null?r=Object.getOwnPropertyDescriptor(i,n):r,o;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")s=Reflect.decorate(t,i,n,r);else for(var u=t.length-1;u>=0;u--)if(o=t[u])s=(e<3?o(s):e>3?o(i,n,s):o(i,n))||s;return e>3&&s&&Object.defineProperty(i,n,s),s};var vw=function(t){cw(i,t);function i(){return t.call(this,i.TEMPLATE,"vertical")||this}i.prototype.postConstruct=function(){t.prototype.postConstruct.call(this);this.createManagedBean(new Xh(this.eContainer));this.ctrlsService.registerFakeVScrollComp(this);this.addManagedListener(this.eventService,hi.EVENT_ROW_CONTAINER_HEIGHT_CHANGED,this.onRowContainerHeightChanged.bind(this))};i.prototype.setScrollVisible=function(){var t=this.scrollVisibleService.isVerticalScrollShowing();var i=this.invisibleScrollbar;var n=t?this.gridOptionsService.getScrollbarWidth()||0:0;var r=n===0&&i?16:n;this.addOrRemoveCssClass("ag-scrollbar-invisible",i);ge(this.getGui(),r);ge(this.eViewport,r);ge(this.eContainer,r);this.setDisplayed(t,{skipAriaHidden:true})};i.prototype.onRowContainerHeightChanged=function(){var t=this.ctrlsService.getGridBodyCtrl();var i=t.getBodyViewportElement();if(this.eViewport.scrollTop!=i.scrollTop){this.eViewport.scrollTop=i.scrollTop}};i.prototype.getScrollPosition=function(){return this.getViewport().scrollTop};i.prototype.setScrollPosition=function(t){if(!ne(this.getViewport())){this.attemptSettingScrollPosition(t)}this.getViewport().scrollTop=t};i.TEMPLATE='<div class="ag-body-vertical-scroll" aria-hidden="true">\n <div class="ag-body-vertical-scroll-viewport" ref="eViewport">\n <div class="ag-body-vertical-scroll-container" ref="eContainer"></div>\n </div>\n </div>';lw([et],i.prototype,"postConstruct",null);return i}(Wb);var dw=function(){var t=function(i,n){t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var n in i)if(Object.prototype.hasOwnProperty.call(i,n))t[n]=i[n]};return t(i,n)};return function(i,n){if(typeof n!=="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(i,n);function r(){this.constructor=i}i.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}();var pw=function(){pw=Object.assign||function(t){for(var i,n=1,r=arguments.length;n<r;n++){i=arguments[n];for(var e in i)if(Object.prototype.hasOwnProperty.call(i,e))t[e]=i[e]}return t};return pw.apply(this,arguments)};var gw=function(t,i,n,r){var e=arguments.length,s=e<3?i:r===null?r=Object.getOwnPropertyDescriptor(i,n):r,o;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")s=Reflect.decorate(t,i,n,r);else for(var u=t.length-1;u>=0;u--)if(o=t[u])s=(e<3?o(s):e>3?o(i,n,s):o(i,n))||s;return e>3&&s&&Object.defineProperty(i,n,s),s};var bw=function(t,i){var n=typeof Symbol==="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),e,s=[],o;try{while((i===void 0||i-- >0)&&!(e=r.next()).done)s.push(e.value)}catch(t){o={error:t}}finally{try{if(e&&!e.done&&(n=r["return"]))n.call(r)}finally{if(o)throw o.error}}return s};var ww=function(t,i){for(var n=0,r=i.length,e=t.length;n<r;n++,e++)t[e]=i[n];return t};var yw={january:"January",february:"February",march:"March",april:"April",may:"May",june:"June",july:"July",august:"August",september:"September",october:"October",november:"November",december:"December"};var mw=["january","february","march","april","may","june","july","august","september","october","november","december"];var Sw=function(t){dw(n,t);function n(){var i=t!==null&&t.apply(this,arguments)||this;i.dataTypeDefinitions={};i.isWaitingForRowData=false;i.isColumnTypeOverrideInDataTypeDefinitions=false;i.columnStateUpdatesPendingInference={};i.columnStateUpdateListenerDestroyFuncs=[];return i}n.prototype.init=function(){var t=this;this.groupHideOpenParents=this.gridOptionsService.is("groupHideOpenParents");this.addManagedPropertyListener("groupHideOpenParents",(function(){t.groupHideOpenParents=t.gridOptionsService.is("groupHideOpenParents")}));this.processDataTypeDefinitions();this.addManagedPropertyListener("dataTypeDefinitions",(function(){t.processDataTypeDefinitions();t.columnModel.recreateColumnDefs("gridOptionsChanged")}))};n.prototype.processDataTypeDefinitions=function(){var t=this;var i;var n=this.getDefaultDataTypes();this.dataTypeDefinitions={};Object.entries(n).forEach((function(i){var n=bw(i,2),r=n[0],e=n[1];t.dataTypeDefinitions[r]=pw(pw({},e),{groupSafeValueFormatter:t.createGroupSafeValueFormatter(e)})}));var r=(i=this.gridOptionsService.get("dataTypeDefinitions"))!==null&&i!==void 0?i:{};this.dataTypeMatchers={};Object.entries(r).forEach((function(i){var e=bw(i,2),s=e[0],o=e[1];var u=t.processDataTypeDefinition(o,r,[s],n);if(u){t.dataTypeDefinitions[s]=u;if(o.dataTypeMatcher){t.dataTypeMatchers[s]=o.dataTypeMatcher}}}));this.checkObjectValueHandlers(n);["dateString","text","number","boolean","date"].forEach((function(i){var r=t.dataTypeMatchers[i];if(r){delete t.dataTypeMatchers[i]}t.dataTypeMatchers[i]=r!==null&&r!==void 0?r:n[i].dataTypeMatcher}))};n.prototype.mergeDataTypeDefinitions=function(t,i){var n=pw(pw({},t),i);if(t.columnTypes&&i.columnTypes&&i.appendColumnTypes){n.columnTypes=ww(ww([],bw(this.convertColumnTypes(t.columnTypes))),bw(this.convertColumnTypes(i.columnTypes)))}return n};n.prototype.processDataTypeDefinition=function(t,i,n,r){var e;var s=t.extendsDataType;if(t.columnTypes){this.isColumnTypeOverrideInDataTypeDefinitions=true}if(t.extendsDataType===t.baseDataType){var o=r[s];if(!this.validateDataTypeDefinition(t,o,s)){return undefined}e=this.mergeDataTypeDefinitions(o,t)}else{if(n.includes(s)){P((function(){return console.warn('AG Grid: Data type definition hierarchies (via the "extendsDataType" property) cannot contain circular references.')}),"dataTypeExtendsCircularRef");return undefined}var u=i[s];if(!this.validateDataTypeDefinition(t,u,s)){return undefined}var a=this.processDataTypeDefinition(u,i,ww(ww([],bw(n)),[s]),r);if(!a){return undefined}e=this.mergeDataTypeDefinitions(a,t)}return pw(pw({},e),{groupSafeValueFormatter:this.createGroupSafeValueFormatter(e)})};n.prototype.validateDataTypeDefinition=function(t,i,n){if(!i){P((function(){return console.warn("AG Grid: The data type definition "+n+" does not exist.")}),"dataTypeDefMissing"+n);return false}if(i.baseDataType!==t.baseDataType){P((function(){return console.warn('AG Grid: The "baseDataType" property of a data type definition must match that of its parent.')}),"dataTypeBaseTypesMatch");return false}return true};n.prototype.createGroupSafeValueFormatter=function(t){var i=this;if(!t.valueFormatter){return undefined}return function(n){var r,e;if((r=n.node)===null||r===void 0?void 0:r.group){var s=n.column.getAggFunc();if(s){if(s==="first"||s==="last"){return t.valueFormatter(n)}if(t.baseDataType==="number"&&s!=="count"){if(typeof n.value==="number"){return t.valueFormatter(n)}if(typeof n.value==="object"){if(!n.value){return undefined}if("toNumber"in n.value){return t.valueFormatter(pw(pw({},n),{value:n.value.toNumber()}))}if("value"in n.value){return t.valueFormatter(pw(pw({},n),{value:n.value.value}))}}}}return undefined}else if(i.groupHideOpenParents&&n.column.isRowGroupActive()){if(typeof n.value!=="string"||((e=t.dataTypeMatcher)===null||e===void 0?void 0:e.call(t,n.value))){return t.valueFormatter(n)}return undefined}return t.valueFormatter(n)}};n.prototype.updateColDefAndGetDataTypeDefinitionColumnType=function(t,i,n){var r=i.cellDataType;var e=i.field;if(r===undefined){r=t.cellDataType}if(r==null||r===true){r=this.canInferCellDataType(t,i)?this.inferCellDataType(e,n):false}if(!r){t.cellDataType=false;return undefined}var s=this.dataTypeDefinitions[r];if(!s){P((function(){return console.warn('AG Grid: Missing data type definition - "'+r+'"')}),"dataTypeMissing"+r);return undefined}t.cellDataType=r;if(s.groupSafeValueFormatter){t.valueFormatter=s.groupSafeValueFormatter}if(s.valueParser){t.valueParser=s.valueParser}if(!s.suppressDefaultProperties){this.setColDefPropertiesForBaseDataType(t,s,n)}return s.columnTypes};n.prototype.updateColDefAndGetColumnType=function(t,i,n){var r,e;var s=this.updateColDefAndGetDataTypeDefinitionColumnType(t,i,n);var o=(e=(r=i.type)!==null&&r!==void 0?r:s)!==null&&e!==void 0?e:t.type;t.type=o;return o?this.convertColumnTypes(o):undefined};n.prototype.addColumnListeners=function(t){if(!this.isWaitingForRowData){return}var i=this.columnStateUpdatesPendingInference[t.getColId()];if(!i){return}var n=function(t){i.add(t.key)};t.addEventListener(mt.EVENT_STATE_UPDATED,n);this.columnStateUpdateListenerDestroyFuncs.push((function(){return t.removeEventListener(mt.EVENT_STATE_UPDATED,n)}))};n.prototype.canInferCellDataType=function(t,i){var n=this;var r;if(this.rowModel.getType()!=="clientSide"){return false}var e={cellRenderer:true,valueGetter:true,valueParser:true,refData:true};if(this.doColDefPropsPreventInference(i,e)){return false}var s=i.type===null?t.type:i.type;if(s){var o=(r=this.gridOptionsService.get("columnTypes"))!==null&&r!==void 0?r:{};var u=this.convertColumnTypes(s).some((function(t){var i=o[t.trim()];return i&&n.doColDefPropsPreventInference(i,e)}));if(u){return false}}return!this.doColDefPropsPreventInference(t,e)};n.prototype.doColDefPropsPreventInference=function(t,i){var n=this;return[["cellRenderer","agSparklineCellRenderer"],["valueGetter",undefined],["valueParser",undefined],["refData",undefined]].some((function(r){var e=bw(r,2),s=e[0],o=e[1];return n.doesColDefPropPreventInference(t,i,s,o)}))};n.prototype.doesColDefPropPreventInference=function(t,i,n,r){if(!i[n]){return false}var e=t[n];if(e===null){i[n]=false;return false}else{return r===undefined?!!e:e===r}};n.prototype.inferCellDataType=function(t,i){var n;if(!t){return undefined}var r;var e=this.getInitialData();if(e){var s=t.indexOf(".")>=0&&!this.gridOptionsService.is("suppressFieldDotNotation");r=k(e,t,s)}else{this.initWaitForRowData(i)}if(r==null){return undefined}var o=bw((n=Object.entries(this.dataTypeMatchers).find((function(t){var i=bw(t,2);var n=i[1];return n(r)})))!==null&&n!==void 0?n:["object"],1),u=o[0];return u};n.prototype.getInitialData=function(){var t=this.gridOptionsService.get("rowData");if(t===null||t===void 0?void 0:t.length){return t[0]}else if(this.initialData){return this.initialData}else{var i=this.rowModel.getRootNode().allLeafChildren;if(i===null||i===void 0?void 0:i.length){return i[0].data}}return null};n.prototype.initWaitForRowData=function(t){var i=this;this.columnStateUpdatesPendingInference[t]=new Set;if(this.isWaitingForRowData){return}this.isWaitingForRowData=true;var n=this.isColumnTypeOverrideInDataTypeDefinitions;if(n){this.columnModel.queueResizeOperations()}var r=this.addManagedListener(this.eventService,hi.EVENT_ROW_DATA_UPDATE_STARTED,(function(t){var e=t.firstRowData;if(!e){return}r===null||r===void 0?void 0:r();i.isWaitingForRowData=false;i.processColumnsPendingInference(e,n);i.columnStateUpdatesPendingInference={};if(n){i.columnModel.processResizeOperations()}var s={type:hi.EVENT_DATA_TYPES_INFERRED};i.eventService.dispatchEvent(s)}))};n.prototype.isPendingInference=function(){return this.isWaitingForRowData};n.prototype.processColumnsPendingInference=function(t,i){var n=this;this.initialData=t;var r=[];this.columnStateUpdateListenerDestroyFuncs.forEach((function(t){return t()}));this.columnStateUpdateListenerDestroyFuncs=[];var e={};var s={};Object.entries(this.columnStateUpdatesPendingInference).forEach((function(t){var o=bw(t,2),u=o[0],a=o[1];var f=n.columnModel.getGridColumn(u);if(!f){return}var h=f.getColDef();if(!n.columnModel.resetColumnDefIntoColumn(f)){return}var c=f.getColDef();if(i&&c.type&&c.type!==h.type){var l=n.getUpdatedColumnState(f,a);if(l.rowGroup&&l.rowGroupIndex==null){e[u]=l}if(l.pivot&&l.pivotIndex==null){s[u]=l}r.push(l)}}));if(i){r.push.apply(r,ww([],bw(this.columnModel.generateColumnStateForRowGroupAndPivotIndexes(e,s))))}if(r.length){this.columnModel.applyColumnState({state:r},"cellDataTypeInferred")}this.initialData=null};n.prototype.getUpdatedColumnState=function(t,i){var n=this.columnModel.getColumnStateFromColDef(t);i.forEach((function(t){delete n[t];if(t==="rowGroup"){delete n.rowGroupIndex}else if(t==="pivot"){delete n.pivotIndex}}));return n};n.prototype.checkObjectValueHandlers=function(t){var i=this.dataTypeDefinitions.object;var n=t.object;this.hasObjectValueParser=i.valueParser!==n.valueParser;this.hasObjectValueFormatter=i.valueFormatter!==n.valueFormatter};n.prototype.convertColumnTypes=function(t){var i=[];if(t instanceof Array){var n=t.some((function(t){return typeof t!=="string"}));if(n){console.warn("AG Grid: if colDef.type is supplied an array it should be of type 'string[]'")}else{i=t}}else if(typeof t==="string"){i=t.split(",")}else{console.warn("AG Grid: colDef.type should be of type 'string' | 'string[]'")}return i};n.prototype.getDateStringTypeDefinition=function(){return this.dataTypeDefinitions.dateString};n.prototype.getDateParserFunction=function(){return this.getDateStringTypeDefinition().dateParser};n.prototype.getDateFormatterFunction=function(){return this.getDateStringTypeDefinition().dateFormatter};n.prototype.getDataTypeDefinition=function(t){var i=t.getColDef();if(!i.cellDataType){return undefined}return this.dataTypeDefinitions[i.cellDataType]};n.prototype.getBaseDataType=function(t){var i;return(i=this.getDataTypeDefinition(t))===null||i===void 0?void 0:i.baseDataType};n.prototype.checkType=function(t,i){var n;if(i==null){return true}var r=(n=this.getDataTypeDefinition(t))===null||n===void 0?void 0:n.dataTypeMatcher;if(!r){return true}return r(i)};n.prototype.validateColDef=function(t){if(t.cellDataType==="object"){if(t.valueFormatter===this.dataTypeDefinitions.object.groupSafeValueFormatter&&!this.hasObjectValueFormatter){P((function(){return console.warn('AG Grid: Cell data type is "object" but no value formatter has been provided. Please either provide an object data type definition with a value formatter, or set "colDef.valueFormatter"')}),"dataTypeObjectValueFormatter")}if(t.editable&&t.valueParser===this.dataTypeDefinitions.object.valueParser&&!this.hasObjectValueParser){P((function(){return console.warn('AG Grid: Cell data type is "object" but no value parser has been provided. Please either provide an object data type definition with a value parser, or set "colDef.valueParser"')}),"dataTypeObjectValueParser")}}};n.prototype.setColDefPropertiesForBaseDataType=function(t,n,r){var e=this;var s=function(t,i,r){var s=t.getColDef().valueFormatter;if(s===n.groupSafeValueFormatter){s=n.valueFormatter}return e.valueFormatterService.formatValue(t,i,r,s)};var o=X.__isRegistered(J.SetFilterModule,this.context.getGridId());var u=this.localeService.getLocaleTextFunc();var a=function(i){var n=t.filterParams;t.filterParams=typeof n==="object"?pw(pw({},n),i):i};t.useValueFormatterForExport=true;t.useValueParserForImport=true;switch(n.baseDataType){case"number":{t.cellEditor="agNumberCellEditor";if(o){a({comparator:function(t,i){var n=t==null?0:parseInt(t);var r=i==null?0:parseInt(i);if(n===r)return 0;return n>r?1:-1}})}break}case"boolean":{t.cellEditor="agCheckboxCellEditor";t.cellRenderer="agCheckboxCellRenderer";t.suppressKeyboardEvent=function(t){return!!t.colDef.editable&&t.event.key===Te.SPACE};if(o){a({valueFormatter:function(t){if(!i(t.value)){return u("blanks","(Blanks)")}return u(String(t.value),t.value?"True":"False")}})}else{a({maxNumConditions:1,filterOptions:["empty",{displayKey:"true",displayName:"True",predicate:function(t,i){return i},numberOfInputs:0},{displayKey:"false",displayName:"False",predicate:function(t,i){return i===false},numberOfInputs:0}]})}break}case"date":{t.cellEditor="agDateCellEditor";t.keyCreator=function(t){return s(t.column,t.node,t.value)};if(o){a({valueFormatter:function(t){var n=s(t.column,t.node,t.value);return i(n)?n:u("blanks","(Blanks)")},treeList:true,treeListFormatter:function(t,i){if(i===1&&t!=null){var n=mw[Number(t)-1];return u(n,yw[n])}return t!==null&&t!==void 0?t:u("blanks","(Blanks)")}})}break}case"dateString":{t.cellEditor="agDateStringCellEditor";t.keyCreator=function(t){return s(t.column,t.node,t.value)};var f=this.getDateParserFunction();if(o){a({valueFormatter:function(t){var n=s(t.column,t.node,t.value);return i(n)?n:u("blanks","(Blanks)")},treeList:true,treeListPathGetter:function(t){var i=f(t!==null&&t!==void 0?t:undefined);return i?[String(i.getFullYear()),String(i.getMonth()+1),String(i.getDate())]:null},treeListFormatter:function(t,i){if(i===1&&t!=null){var n=mw[Number(t)-1];return u(n,yw[n])}return t!==null&&t!==void 0?t:u("blanks","(Blanks)")}})}else{a({comparator:function(t,i){var n=f(i);if(i==null||n<t){return-1}if(n>t){return 1}return 0}})}break}case"object":{t.cellEditorParams={useFormatter:true};t.comparator=function(t,i){var n=e.columnModel.getPrimaryColumn(r);var o=n===null||n===void 0?void 0:n.getColDef();if(!n||!o){return 0}var u=t==null?"":s(n,null,t);var a=i==null?"":s(n,null,i);if(u===a)return 0;return u>a?1:-1};t.keyCreator=function(t){return s(t.column,t.node,t.value)};if(o){a({valueFormatter:function(t){var n=s(t.column,t.node,t.value);return i(n)?n:u("blanks","(Blanks)")}})}else{t.filterValueGetter=function(t){return s(t.column,t.node,e.valueService.getValue(t.column,t.node))}}break}}};n.prototype.getDefaultDataTypes=function(){var t=function(t){return!!t.match("^\\d{4}-\\d{2}-\\d{2}$")};var i=this.localeService.getLocaleTextFunc();return{number:{baseDataType:"number",valueParser:function(t){return t.newValue===""?null:Number(t.newValue)},valueFormatter:function(t){if(t.value==null){return""}if(typeof t.value!=="number"||isNaN(t.value)){return i("invalidNumber","Invalid Number")}return String(t.value)},dataTypeMatcher:function(t){return typeof t==="number"}},text:{baseDataType:"text",valueParser:function(t){return t.newValue===""?null:e(t.newValue)},dataTypeMatcher:function(t){return typeof t==="string"}},boolean:{baseDataType:"boolean",valueParser:function(t){return t.newValue===""?null:String(t.newValue).toLowerCase()==="true"},valueFormatter:function(t){return t.value==null?"":String(t.value)},dataTypeMatcher:function(t){return typeof t==="boolean"}},date:{baseDataType:"date",valueParser:function(t){return Tr(t.newValue==null?null:String(t.newValue))},valueFormatter:function(t){var n;if(t.value==null){return""}if(!(t.value instanceof Date)||isNaN(t.value.getTime())){return i("invalidDate","Invalid Date")}return(n=Ar(t.value,false))!==null&&n!==void 0?n:""},dataTypeMatcher:function(t){return t instanceof Date}},dateString:{baseDataType:"dateString",dateParser:function(t){var i;return(i=Tr(t))!==null&&i!==void 0?i:undefined},dateFormatter:function(t){var i;return(i=Ar(t!==null&&t!==void 0?t:null,false))!==null&&i!==void 0?i:undefined},valueParser:function(i){return t(String(i.newValue))?i.newValue:null},valueFormatter:function(i){return t(String(i.value))?i.value:""},dataTypeMatcher:function(i){return typeof i==="string"&&t(i)}},object:{baseDataType:"object",valueParser:function(){return null},valueFormatter:function(t){var i;return(i=e(t.value))!==null&&i!==void 0?i:""}}}};gw([ut("rowModel")],n.prototype,"rowModel",void 0);gw([ut("columnModel")],n.prototype,"columnModel",void 0);gw([ut("columnUtils")],n.prototype,"columnUtils",void 0);gw([ut("valueService")],n.prototype,"valueService",void 0);gw([ut("valueFormatterService")],n.prototype,"valueFormatterService",void 0);gw([et],n.prototype,"init",null);n=gw([ot("dataTypeService")],n);return n}(ri);var Cw=function(){var t=function(i,n){t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var n in i)if(Object.prototype.hasOwnProperty.call(i,n))t[n]=i[n]};return t(i,n)};return function(i,n){if(typeof n!=="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(i,n);function r(){this.constructor=i}i.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}();var Ow=function(t,i,n,r){var e=arguments.length,s=e<3?i:r===null?r=Object.getOwnPropertyDescriptor(i,n):r,o;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")s=Reflect.decorate(t,i,n,r);else for(var u=t.length-1;u>=0;u--)if(o=t[u])s=(e<3?o(s):e>3?o(i,n,s):o(i,n))||s;return e>3&&s&&Object.defineProperty(i,n,s),s};var jw=function(t){Cw(n,t);function n(){return t!==null&&t.apply(this,arguments)||this}n.prototype.parseValue=function(t,n,r,e){var s=t.getColDef();var o={node:n,data:n===null||n===void 0?void 0:n.data,oldValue:e,newValue:r,colDef:s,column:t,api:this.gridOptionsService.api,columnApi:this.gridOptionsService.columnApi,context:this.gridOptionsService.context};var u=s.valueParser;if(i(u)){if(typeof u==="function"){return u(o)}return this.expressionService.evaluate(u,o)}return r};Ow([ut("expressionService")],n.prototype,"expressionService",void 0);n=Ow([ot("valueParserService")],n);return n}(ri);var Rw=function(t,i){var n=typeof Symbol==="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),e,s=[],o;try{while((i===void 0||i-- >0)&&!(e=r.next()).done)s.push(e.value)}catch(t){o={error:t}}finally{try{if(e&&!e.done&&(n=r["return"]))n.call(r)}finally{if(o)throw o.error}}return s};var xw=function(t,i){for(var n=0,r=i.length,e=t.length;n<r;n++,e++)t[e]=i[n];return t};var _w=function(){function t(t,i,n){if(!i){console.error("AG Grid: no gridOptions provided to the grid");return}this.gridOptions=i;(new Fw).create(t,i,(function(i){var n=new fg(t);i.createBean(n)}),undefined,n)}t.prototype.destroy=function(){if(this.gridOptions&&this.gridOptions.api){this.gridOptions.api.destroy()}};return t}();var Aw=1;var Fw=function(){function t(){}t.prototype.create=function(t,i,n,r,e){var s=this;var o;var u=!!i.debug;var a=(o=i.gridId)!==null&&o!==void 0?o:String(Aw++);var f=this.getRegisteredModules(e,a);var h=this.createBeansList(i.rowModelType,f,a);var c=this.createProvidedBeans(t,i,e);if(!h){return}var l={providedBeanInstances:c,beanClasses:h,debug:u,gridId:a};var v=new rg("AG Grid",(function(){return i.debug}));var d=new rg("Context",(function(){return l.debug}));var p=new nt(l,d);var g=p.getBean("beans");this.registerModuleUserComponents(g,f);this.registerStackComponents(g,f);this.registerControllers(g,f);n(p);g.ctrlsService.whenReady((function(){s.setColumnsAndData(g);s.dispatchGridReadyEvent(g);var t=X.__isRegistered(J.EnterpriseCoreModule,a);v.log("initialised successfully, enterprise = "+t)}));if(r){r(p)}};t.prototype.registerControllers=function(t,i){i.forEach((function(i){if(i.controllers){i.controllers.forEach((function(i){return t.ctrlsFactory.register(i)}))}}))};t.prototype.registerStackComponents=function(t,i){var n=this.createAgStackComponentsList(i);t.agStackComponentsRegistry.setupComponents(n)};t.prototype.getRegisteredModules=function(t,i){var n=t?t.modules:null;var r=X.__getRegisteredModules(i);var e=[];var s={};var o=function(t,i,n){var r=function(i){if(!s[i.moduleName]){s[i.moduleName]=true;e.push(i);X.__register(i,t,n)}};r(i);if(i.dependantModules){i.dependantModules.forEach((function(i){return o(t,i,n)}))}};if(n){n.forEach((function(t){return o(true,t,i)}))}if(r){r.forEach((function(t){return o(!X.__isPackageBased(),t,undefined)}))}return e};t.prototype.registerModuleUserComponents=function(t,i){var n=this.extractModuleEntity(i,(function(t){return t.userComponents?t.userComponents:[]}));n.forEach((function(i){t.userComponentRegistry.registerDefaultComponent(i.componentName,i.componentClass)}))};t.prototype.createProvidedBeans=function(t,i,r){var e=r?r.frameworkOverrides:null;if(n(e)){e=new xp}var s={gridOptions:i,eGridDiv:t,globalEventListener:r?r.globalEventListener:null,globalSyncEventListener:r?r.globalSyncEventListener:null,frameworkOverrides:e};if(r&&r.providedBeanInstances){Object.assign(s,r.providedBeanInstances)}return s};t.prototype.createAgStackComponentsList=function(t){var i=[{componentName:"AgCheckbox",componentClass:io},{componentName:"AgRadioButton",componentClass:ro},{componentName:"AgToggleButton",componentClass:bd},{componentName:"AgInputTextField",componentClass:Fo},{componentName:"AgInputTextArea",componentClass:yd},{componentName:"AgInputNumberField",componentClass:To},{componentName:"AgInputDateField",componentClass:Sd},{componentName:"AgInputRange",componentClass:Od},{componentName:"AgRichSelect",componentClass:Nd},{componentName:"AgSelect",componentClass:Js},{componentName:"AgSlider",componentClass:Vd},{componentName:"AgGridBody",componentClass:yc},{componentName:"AgHeaderRoot",componentClass:bv},{componentName:"AgSortIndicator",componentClass:$o},{componentName:"AgPagination",componentClass:sb},{componentName:"AgOverlayWrapper",componentClass:fb},{componentName:"AgGroupComponent",componentClass:Wd},{componentName:"AgPanel",componentClass:rp},{componentName:"AgDialog",componentClass:up},{componentName:"AgRowContainer",componentClass:Vc},{componentName:"AgFakeHorizontalScroll",componentClass:qb},{componentName:"AgFakeVerticalScroll",componentClass:vw},{componentName:"AgAutocomplete",componentClass:Op}];var n=this.extractModuleEntity(t,(function(t){return t.agStackComponents?t.agStackComponents:[]}));i=i.concat(n);return i};t.prototype.createBeansList=function(t,i,n){if(t===void 0){t="clientSide"}var r=i.filter((function(i){return!i.rowModel||i.rowModel===t}));var e={clientSide:J.ClientSideRowModelModule,infinite:J.InfiniteRowModelModule,serverSide:J.ServerSideRowModelModule,viewport:J.ViewportRowModelModule};if(!e[t]){console.error("AG Grid: could not find row model for rowModelType = "+t);return}if(!X.__assertRegistered(e[t],"rowModelType = '"+t+"'",n)){return}var s=[hh,lb,pb,Ab,Og,ff,Aa,Dg,Eg,Fv,Qa,Xg,mv,hw,Ki,id,Xa,fn,dt,uw,pp,Lp,gf,rn,cv,ld,Yv,Qp,ui,$p,Pp,Fc,xg,Up,ng,on,Pv,Ov,Hu,Bp,Il,Rc,Qg,Tp,$v,pd,Cc,dg,bg,mg,nb,pi,kg,Mv,Rb,ln,kb,Mb,fd,Pb,Nb,Jb,Xb,Vb,Sw,jw,lf];var o=this.extractModuleEntity(r,(function(t){return t.beans?t.beans:[]}));s.push.apply(s,xw([],Rw(o)));var u=[];s.forEach((function(t){if(u.indexOf(t)<0){u.push(t)}}));return u};t.prototype.extractModuleEntity=function(t,i){return[].concat.apply([],xw([],Rw(t.map(i))))};t.prototype.setColumnsAndData=function(t){var i=t.gridOptionsService.get("columnDefs");t.columnModel.setColumnDefs(i||[],"gridInitializing");t.rowModel.start()};t.prototype.dispatchGridReadyEvent=function(t){var i={type:hi.EVENT_GRID_READY};t.eventService.dispatchEvent(i)};return t}();var kw;(function(t){t["InsideBase"]="insideBase";t["InsideEnd"]="insideEnd";t["Center"]="center";t["OutsideEnd"]="outsideEnd"})(kw||(kw={}));
/**
* @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
* @version v30.2.1
* @link https://www.ag-grid.com/
* @license MIT
*/var Tw=typeof global==="undefined"?{}:global;Tw.HTMLElement=typeof HTMLElement==="undefined"?{}:HTMLElement;Tw.HTMLButtonElement=typeof HTMLButtonElement==="undefined"?{}:HTMLButtonElement;Tw.HTMLSelectElement=typeof HTMLSelectElement==="undefined"?{}:HTMLSelectElement;Tw.HTMLInputElement=typeof HTMLInputElement==="undefined"?{}:HTMLInputElement;Tw.Node=typeof Node==="undefined"?{}:Node;Tw.MouseEvent=typeof MouseEvent==="undefined"?{}:MouseEvent;var Mw=function(t,i){var n=typeof Symbol==="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),e,s=[],o;try{while((i===void 0||i-- >0)&&!(e=r.next()).done)s.push(e.value)}catch(t){o={error:t}}finally{try{if(e&&!e.done&&(n=r["return"]))n.call(r)}finally{if(o)throw o.error}}return s};var Dw=function(t,i){for(var n=0,r=i.length,e=t.length;n<r;n++,e++)t[e]=i[n];return t};var Gw=function(){function t(i,n,r,e,s,o){this.nextId=0;this.allNodesMap={};this.rootNode=i;this.gridOptionsService=n;this.eventService=r;this.columnModel=e;this.beans=o;this.selectionService=s;this.rootNode.group=true;this.rootNode.level=-1;this.rootNode.id=t.ROOT_NODE_ID;this.rootNode.allLeafChildren=[];this.rootNode.childrenAfterGroup=[];this.rootNode.childrenAfterSort=[];this.rootNode.childrenAfterAggFilter=[];this.rootNode.childrenAfterFilter=[];this.postConstruct()}t.prototype.postConstruct=function(){this.suppressParentsInRowNodes=this.gridOptionsService.is("suppressParentsInRowNodes");this.isRowMasterFunc=this.gridOptionsService.get("isRowMaster");this.doingMasterDetail=this.gridOptionsService.is("masterDetail")};t.prototype.getCopyOfNodesMap=function(){return Xe.cloneObject(this.allNodesMap)};t.prototype.getRowNode=function(t){return this.allNodesMap[t]};t.prototype.setRowData=function(i){var n=this;if(typeof i==="string"){console.warn("AG Grid: rowData must be an array, however you passed in a string. If you are loading JSON, make sure you convert the JSON string to JavaScript objects first");return}this.dispatchRowDataUpdateStartedEvent(i);var r=this.rootNode;var e=this.rootNode.sibling;r.childrenAfterFilter=null;r.childrenAfterGroup=null;r.childrenAfterAggFilter=null;r.childrenAfterSort=null;r.childrenMapped=null;r.updateHasChildren();this.nextId=0;this.allNodesMap={};if(i){r.allLeafChildren=i.map((function(i){return n.createNode(i,n.rootNode,t.TOP_LEVEL)}))}else{r.allLeafChildren=[];r.childrenAfterGroup=[]}if(e){e.childrenAfterFilter=r.childrenAfterFilter;e.childrenAfterGroup=r.childrenAfterGroup;e.childrenAfterAggFilter=r.childrenAfterAggFilter;e.childrenAfterSort=r.childrenAfterSort;e.childrenMapped=r.childrenMapped;e.allLeafChildren=r.allLeafChildren}};t.prototype.updateRowData=function(t,i){this.dispatchRowDataUpdateStartedEvent(t.add);var n={remove:[],update:[],add:[]};var r=[];this.executeRemove(t,n,r);this.executeUpdate(t,n,r);this.executeAdd(t,n);this.updateSelection(r,"rowDataChanged");if(i){Xe.sortRowNodesByOrder(this.rootNode.allLeafChildren,i)}return n};t.prototype.dispatchRowDataUpdateStartedEvent=function(t){var i={type:hi.EVENT_ROW_DATA_UPDATE_STARTED,firstRowData:(t===null||t===void 0?void 0:t.length)?t[0]:null};this.eventService.dispatchEvent(i)};t.prototype.updateSelection=function(t,i){var n=t.length>0;if(n){this.selectionService.setNodesSelected({newValue:false,nodes:t,suppressFinishActions:true,source:i})}this.selectionService.updateGroupsFromChildrenSelections(i);if(n){var r={type:hi.EVENT_SELECTION_CHANGED,source:i};this.eventService.dispatchEvent(r)}};t.prototype.executeAdd=function(i,n){var r=this;var e;var s=i.add,o=i.addIndex;if(Xe.missingOrEmpty(s)){return}var u=s.map((function(i){return r.createNode(i,r.rootNode,t.TOP_LEVEL)}));if(typeof o==="number"&&o>=0){var a=this.rootNode.allLeafChildren;var f=a.length;var h=o;var c=this.gridOptionsService.is("treeData");if(c&&o>0&&f>0){for(var l=0;l<f;l++){if(((e=a[l])===null||e===void 0?void 0:e.rowIndex)==o-1){h=l+1;break}}}var v=a.slice(0,h);var d=a.slice(h,a.length);this.rootNode.allLeafChildren=Dw(Dw(Dw([],Mw(v)),Mw(u)),Mw(d))}else{this.rootNode.allLeafChildren=Dw(Dw([],Mw(this.rootNode.allLeafChildren)),Mw(u))}if(this.rootNode.sibling){this.rootNode.sibling.allLeafChildren=this.rootNode.allLeafChildren}n.add=u};t.prototype.executeRemove=function(t,i,n){var r=this;var e=t.remove;if(Xe.missingOrEmpty(e)){return}var s={};e.forEach((function(t){var e=r.lookupRowNode(t);if(!e){return}if(e.isSelected()){n.push(e)}e.clearRowTopAndRowIndex();s[e.id]=true;delete r.allNodesMap[e.id];i.remove.push(e)}));this.rootNode.allLeafChildren=this.rootNode.allLeafChildren.filter((function(t){return!s[t.id]}));if(this.rootNode.sibling){this.rootNode.sibling.allLeafChildren=this.rootNode.allLeafChildren}};t.prototype.executeUpdate=function(i,n,r){var e=this;var s=i.update;if(Xe.missingOrEmpty(s)){return}s.forEach((function(i){var s=e.lookupRowNode(i);if(!s){return}s.updateData(i);if(!s.selectable&&s.isSelected()){r.push(s)}e.setMasterForRow(s,i,t.TOP_LEVEL,false);n.update.push(s)}))};t.prototype.lookupRowNode=function(t){var i=this.gridOptionsService.getCallback("getRowId");var n;if(i){var r=i({data:t,level:0});n=this.allNodesMap[r];if(!n){console.error("AG Grid: could not find row id="+r+", data item was not found for this id");return null}}else{n=this.rootNode.allLeafChildren.find((function(i){return i.data===t}));if(!n){console.error("AG Grid: could not find data item as object was not found",t);console.error("Consider using getRowId to help the Grid find matching row data");return null}}return n||null};t.prototype.createNode=function(t,i,n){var r=new Au(this.beans);r.group=false;this.setMasterForRow(r,t,n,true);if(i&&!this.suppressParentsInRowNodes){r.parent=i}r.level=n;r.setDataAndId(t,this.nextId.toString());if(this.allNodesMap[r.id]){console.warn("AG Grid: duplicate node id '"+r.id+"' detected from getRowId callback, this could cause issues in your grid.")}this.allNodesMap[r.id]=r;this.nextId++;return r};t.prototype.setMasterForRow=function(t,i,n,r){var e=this.gridOptionsService.is("treeData");if(e){t.setMaster(false);if(r){t.expanded=false}}else{if(this.doingMasterDetail){if(this.isRowMasterFunc){t.setMaster(this.isRowMasterFunc(i))}else{t.setMaster(true)}}else{t.setMaster(false)}if(r){var s=this.columnModel.getRowGroupColumns();var o=s?s.length:0;var u=n+o;t.expanded=t.master?this.isExpanded(u):false}}};t.prototype.isExpanded=function(t){var i=this.gridOptionsService.getNum("groupDefaultExpanded");if(i===-1){return true}return t<i};t.TOP_LEVEL=0;t.ROOT_NODE_ID="ROOT_NODE_ID";return t}();var Pw=function(){var t=function(i,n){t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var n in i)if(Object.prototype.hasOwnProperty.call(i,n))t[n]=i[n]};return t(i,n)};return function(i,n){if(typeof n!=="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(i,n);function r(){this.constructor=i}i.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}();var Ew=function(t,i,n,r){var e=arguments.length,s=e<3?i:r===null?r=Object.getOwnPropertyDescriptor(i,n):r,o;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")s=Reflect.decorate(t,i,n,r);else for(var u=t.length-1;u>=0;u--)if(o=t[u])s=(e<3?o(s):e>3?o(i,n,s):o(i,n))||s;return e>3&&s&&Object.defineProperty(i,n,s),s};var Iw=function(t,i){var n=typeof Symbol==="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),e,s=[],o;try{while((i===void 0||i-- >0)&&!(e=r.next()).done)s.push(e.value)}catch(t){o={error:t}}finally{try{if(e&&!e.done&&(n=r["return"]))n.call(r)}finally{if(o)throw o.error}}return s};var Nw=function(t,i){for(var n=0,r=i.length,e=t.length;n<r;n++,e++)t[e]=i[n];return t};var Hw;(function(t){t[t["Normal"]=0]="Normal";t[t["AfterFilter"]=1]="AfterFilter";t[t["AfterFilterAndSort"]=2]="AfterFilterAndSort";t[t["PivotNodes"]=3]="PivotNodes"})(Hw||(Hw={}));var Lw=function(t){Pw(i,t);function i(){var i=t!==null&&t.apply(this,arguments)||this;i.onRowHeightChanged_debounced=Xe.debounce(i.onRowHeightChanged.bind(i),100);i.rowsToDisplay=[];return i}i.prototype.init=function(){var t=this;var i=this.refreshModel.bind(this,{step:of.EVERYTHING});var n=!this.gridOptionsService.is("suppressAnimationFrame");var r=this.refreshModel.bind(this,{step:of.EVERYTHING,afterColumnsChanged:true,keepRenderedRows:true,animate:n});this.addManagedListener(this.eventService,hi.EVENT_NEW_COLUMNS_LOADED,r);this.addManagedListener(this.eventService,hi.EVENT_COLUMN_ROW_GROUP_CHANGED,i);this.addManagedListener(this.eventService,hi.EVENT_COLUMN_VALUE_CHANGED,this.onValueChanged.bind(this));this.addManagedListener(this.eventService,hi.EVENT_COLUMN_PIVOT_CHANGED,this.refreshModel.bind(this,{step:of.PIVOT}));this.addManagedListener(this.eventService,hi.EVENT_FILTER_CHANGED,this.onFilterChanged.bind(this));this.addManagedListener(this.eventService,hi.EVENT_SORT_CHANGED,this.onSortChanged.bind(this));this.addManagedListener(this.eventService,hi.EVENT_COLUMN_PIVOT_MODE_CHANGED,i);this.addManagedListener(this.eventService,hi.EVENT_GRID_STYLES_CHANGED,this.onGridStylesChanges.bind(this));var e=this.refreshModel.bind(this,{step:of.MAP,keepRenderedRows:true,animate:n});this.addManagedPropertyListeners(["groupRemoveSingleChildren","groupRemoveLowestSingleChildren","groupIncludeFooter"],e);var s=this.refreshModel.bind(this,{step:of.AGGREGATE,keepRenderedRows:true,animate:n});this.addManagedPropertyListeners(["groupIncludeTotalFooter"],s);this.rootNode=new Au(this.beans);this.nodeManager=new Gw(this.rootNode,this.gridOptionsService,this.eventService,this.columnModel,this.selectionService,this.beans);this.addManagedPropertyListener("treeData",(function(){t.setRowData(t.rootNode.allLeafChildren.map((function(t){return t.data})))}))};i.prototype.start=function(){var t=this.gridOptionsService.get("rowData");if(t){this.setRowData(t)}};i.prototype.ensureRowHeightsValid=function(t,i,n,r){var e;var s=false;do{e=false;var o=this.getRowIndexAtPixel(t);var u=this.getRowIndexAtPixel(i);var a=Math.max(o,n);var f=Math.min(u,r);for(var h=a;h<=f;h++){var c=this.getRow(h);if(c.rowHeightEstimated){var l=this.gridOptionsService.getRowHeightForNode(c);c.setRowHeight(l.height);e=true;s=true}}if(e){this.setRowTopAndRowIndex()}}while(e);return s};i.prototype.setRowTopAndRowIndex=function(){var t=this.environment.getDefaultRowHeight();var i=0;var n=new Set;var r=this.gridOptionsService.isDomLayout("normal");for(var e=0;e<this.rowsToDisplay.length;e++){var s=this.rowsToDisplay[e];if(s.id!=null){n.add(s.id)}if(s.rowHeight==null){var o=this.gridOptionsService.getRowHeightForNode(s,r,t);s.setRowHeight(o.height,o.estimated)}s.setRowTop(i);s.setRowIndex(e);i+=s.rowHeight}return n};i.prototype.clearRowTopAndRowIndex=function(t,i){var n=t.isActive();var r=function(t){if(t&&t.id!=null&&!i.has(t.id)){t.clearRowTopAndRowIndex()}};var e=function(t){r(t);r(t.detailNode);r(t.sibling);if(t.hasChildren()){if(t.childrenAfterGroup){var i=t.level==-1;var s=n&&!i&&!t.expanded;if(!s){t.childrenAfterGroup.forEach(e)}}}};e(this.rootNode)};i.prototype.ensureRowsAtPixel=function(t,i,n){var r=this;if(n===void 0){n=0}var e=this.getRowIndexAtPixel(i);var s=this.getRow(e);var o=!this.gridOptionsService.is("suppressAnimationFrame");if(s===t[0]){return false}t.forEach((function(t){Xe.removeFromArray(r.rootNode.allLeafChildren,t)}));t.forEach((function(t,i){Xe.insertIntoArray(r.rootNode.allLeafChildren,t,Math.max(e+n,0)+i)}));this.refreshModel({step:of.EVERYTHING,keepRenderedRows:true,keepEditingRows:true,animate:o});return true};i.prototype.highlightRowAtPixel=function(t,i){var n=i!=null?this.getRowIndexAtPixel(i):null;var r=n!=null?this.getRow(n):null;if(!r||!t||r===t||i==null){if(this.lastHighlightedRow){this.lastHighlightedRow.setHighlighted(null);this.lastHighlightedRow=null}return}var e=this.getHighlightPosition(i,r);if(this.lastHighlightedRow&&this.lastHighlightedRow!==r){this.lastHighlightedRow.setHighlighted(null);this.lastHighlightedRow=null}r.setHighlighted(e);this.lastHighlightedRow=r};i.prototype.getHighlightPosition=function(t,i){if(!i){var n=this.getRowIndexAtPixel(t);i=this.getRow(n||0);if(!i){return sf.Below}}var r=i.rowTop,e=i.rowHeight;return t-r<e/2?sf.Above:sf.Below};i.prototype.getLastHighlightedRowNode=function(){return this.lastHighlightedRow};i.prototype.isLastRowIndexKnown=function(){return true};i.prototype.getRowCount=function(){if(this.rowsToDisplay){return this.rowsToDisplay.length}return 0};i.prototype.getTopLevelRowCount=function(){var t=this.rowsToDisplay&&this.rowsToDisplay[0]===this.rootNode;if(t){return 1}var i=this.rootNode.childrenAfterAggFilter;return i?i.length:0};i.prototype.getTopLevelRowDisplayedIndex=function(t){var i=this.rowsToDisplay&&this.rowsToDisplay[0]===this.rootNode;if(i){return t}var n=this.rootNode.childrenAfterSort[t];if(this.gridOptionsService.is("groupHideOpenParents")){while(n.expanded&&n.childrenAfterSort&&n.childrenAfterSort.length>0){n=n.childrenAfterSort[0]}}return n.rowIndex};i.prototype.getRowBounds=function(t){if(Xe.missing(this.rowsToDisplay)){return null}var i=this.rowsToDisplay[t];if(i){return{rowTop:i.rowTop,rowHeight:i.rowHeight}}return null};i.prototype.onRowGroupOpened=function(){var t=this.gridOptionsService.isAnimateRows();this.refreshModel({step:of.MAP,keepRenderedRows:true,animate:t})};i.prototype.onFilterChanged=function(t){if(t.afterDataChange){return}var i=this.gridOptionsService.isAnimateRows();var n=t.columns.length===0||t.columns.some((function(t){return t.isPrimary()}));var r=n?of.FILTER:of.FILTER_AGGREGATES;this.refreshModel({step:r,keepRenderedRows:true,animate:i})};i.prototype.onSortChanged=function(){var t=this.gridOptionsService.isAnimateRows();this.refreshModel({step:of.SORT,keepRenderedRows:true,animate:t,keepEditingRows:true})};i.prototype.getType=function(){return"clientSide"};i.prototype.onValueChanged=function(){if(this.columnModel.isPivotActive()){this.refreshModel({step:of.PIVOT})}else{this.refreshModel({step:of.AGGREGATE})}};i.prototype.createChangePath=function(t){var i=Xe.missingOrEmpty(t);var n=new rd(false,this.rootNode);if(i||this.gridOptionsService.is("treeData")){n.setInactive()}return n};i.prototype.isSuppressModelUpdateAfterUpdateTransaction=function(t){if(!this.gridOptionsService.is("suppressModelUpdateAfterUpdateTransaction")){return false}if(t.rowNodeTransactions==null){return false}var i=t.rowNodeTransactions.filter((function(t){return t.add!=null&&t.add.length>0||t.remove!=null&&t.remove.length>0}));var n=i==null||i.length==0;return n};i.prototype.buildRefreshModelParams=function(t){var i=of.EVERYTHING;var n={everything:of.EVERYTHING,group:of.EVERYTHING,filter:of.FILTER,map:of.MAP,aggregate:of.AGGREGATE,sort:of.SORT,pivot:of.PIVOT};if(Xe.exists(t)){i=n[t]}if(Xe.missing(i)){console.error("AG Grid: invalid step "+t+", available steps are "+Object.keys(n).join(", "));return undefined}var r=!this.gridOptionsService.is("suppressAnimationFrame");var e={step:i,keepRenderedRows:true,keepEditingRows:true,animate:r};return e};i.prototype.refreshModel=function(t){var i=typeof t==="object"&&"step"in t?t:this.buildRefreshModelParams(t);if(!i){return}if(this.isSuppressModelUpdateAfterUpdateTransaction(i)){return}var n=this.createChangePath(i.rowNodeTransactions);switch(i.step){case of.EVERYTHING:this.doRowGrouping(i.groupState,i.rowNodeTransactions,i.rowNodeOrder,n,!!i.afterColumnsChanged);case of.FILTER:this.doFilter(n);case of.PIVOT:this.doPivot(n);case of.AGGREGATE:this.doAggregate(n);case of.FILTER_AGGREGATES:this.doFilterAggregates(n);case of.SORT:this.doSort(i.rowNodeTransactions,n);case of.MAP:this.doRowsToDisplay()}var r=this.setRowTopAndRowIndex();this.clearRowTopAndRowIndex(n,r);var e={type:hi.EVENT_MODEL_UPDATED,animate:i.animate,keepRenderedRows:i.keepRenderedRows,newData:i.newData,newPage:false,keepUndoRedoStack:i.keepUndoRedoStack};this.eventService.dispatchEvent(e)};i.prototype.isEmpty=function(){var t=Xe.missing(this.rootNode.allLeafChildren)||this.rootNode.allLeafChildren.length===0;return Xe.missing(this.rootNode)||t||!this.columnModel.isReady()};i.prototype.isRowsToRender=function(){return Xe.exists(this.rowsToDisplay)&&this.rowsToDisplay.length>0};i.prototype.getNodesInRangeForSelection=function(t,i){var n=!i;var r=false;var e=[];var s=this.gridOptionsService.is("groupSelectsChildren");this.forEachNodeAfterFilterAndSort((function(o){if(r){return}if(n){if(o===i||o===t){r=true;if(o.group&&s){e.push.apply(e,Nw([],Iw(o.allLeafChildren)));return}}}if(!n){if(o!==i&&o!==t){return}n=true}var u=!o.group||!s;if(u){e.push(o);return}}));return e};i.prototype.setDatasource=function(t){console.error("AG Grid: should never call setDatasource on clientSideRowController")};i.prototype.getTopLevelNodes=function(){return this.rootNode?this.rootNode.childrenAfterGroup:null};i.prototype.getRootNode=function(){return this.rootNode};i.prototype.getRow=function(t){return this.rowsToDisplay[t]};i.prototype.isRowPresent=function(t){return this.rowsToDisplay.indexOf(t)>=0};i.prototype.getRowIndexAtPixel=function(t){if(this.isEmpty()||this.rowsToDisplay.length===0){return-1}var i=0;var n=this.rowsToDisplay.length-1;if(t<=0){return 0}var r=Xe.last(this.rowsToDisplay);if(r.rowTop<=t){return this.rowsToDisplay.length-1}var e=-1;var s=-1;while(true){var o=Math.floor((i+n)/2);var u=this.rowsToDisplay[o];if(this.isRowInPixel(u,t)){return o}if(u.rowTop<t){i=o+1}else if(u.rowTop>t){n=o-1}var a=e===i&&s===n;if(a){return o}e=i;s=n}};i.prototype.isRowInPixel=function(t,i){var n=t.rowTop;var r=t.rowTop+t.rowHeight;var e=n<=i&&r>i;return e};i.prototype.forEachLeafNode=function(t){if(this.rootNode.allLeafChildren){this.rootNode.allLeafChildren.forEach((function(i,n){return t(i,n)}))}};i.prototype.forEachNode=function(t,i){if(i===void 0){i=false}this.recursivelyWalkNodesAndCallback({nodes:Nw([],Iw(this.rootNode.childrenAfterGroup||[])),callback:t,recursionType:Hw.Normal,index:0,includeFooterNodes:i})};i.prototype.forEachNodeAfterFilter=function(t,i){if(i===void 0){i=false}this.recursivelyWalkNodesAndCallback({nodes:Nw([],Iw(this.rootNode.childrenAfterAggFilter||[])),callback:t,recursionType:Hw.AfterFilter,index:0,includeFooterNodes:i})};i.prototype.forEachNodeAfterFilterAndSort=function(t,i){if(i===void 0){i=false}this.recursivelyWalkNodesAndCallback({nodes:Nw([],Iw(this.rootNode.childrenAfterSort||[])),callback:t,recursionType:Hw.AfterFilterAndSort,index:0,includeFooterNodes:i})};i.prototype.forEachPivotNode=function(t,i){if(i===void 0){i=false}this.recursivelyWalkNodesAndCallback({nodes:[this.rootNode],callback:t,recursionType:Hw.PivotNodes,index:0,includeFooterNodes:i})};i.prototype.recursivelyWalkNodesAndCallback=function(t){var i;var n=t.nodes,r=t.callback,e=t.recursionType,s=t.includeFooterNodes;var o=t.index;for(var u=0;u<n.length;u++){var a=n[u];r(a,o++);if(a.hasChildren()&&!a.footer){var f=null;switch(e){case Hw.Normal:f=a.childrenAfterGroup;break;case Hw.AfterFilter:f=a.childrenAfterAggFilter;break;case Hw.AfterFilterAndSort:f=a.childrenAfterSort;break;case Hw.PivotNodes:f=!a.leafGroup?a.childrenAfterSort:null;break}if(f){o=this.recursivelyWalkNodesAndCallback({nodes:Nw([],Iw(f)),callback:r,recursionType:e,index:o,includeFooterNodes:s})}}}var h=(i=n[0])===null||i===void 0?void 0:i.parent;if(!s||!h)return o;var c=h===this.rootNode;if(c){var l=this.gridOptionsService.is("groupIncludeTotalFooter");if(!l)return o}else{var v=this.gridOptionsService.getGroupIncludeFooter();if(!v({node:h}))return o}h.createFooter();r(h.sibling,o++);return o};i.prototype.doAggregate=function(t){if(this.aggregationStage){this.aggregationStage.execute({rowNode:this.rootNode,changedPath:t})}};i.prototype.doFilterAggregates=function(t){if(this.filterAggregatesStage){this.filterAggregatesStage.execute({rowNode:this.rootNode,changedPath:t})}else{this.rootNode.childrenAfterAggFilter=this.rootNode.childrenAfterFilter}};i.prototype.expandOrCollapseAll=function(t){var i=this.gridOptionsService.is("treeData");var n=this.columnModel.isPivotActive();var r=function(e){if(!e){return}e.forEach((function(e){var s=function(){e.expanded=t;r(e.childrenAfterGroup)};if(i){var o=Xe.exists(e.childrenAfterGroup);if(o){s()}return}if(n){var u=!e.leafGroup;if(u){s()}return}var a=e.group;if(a){s()}}))};if(this.rootNode){r(this.rootNode.childrenAfterGroup)}this.refreshModel({step:of.MAP});var e=t?"expandAll":"collapseAll";var s={type:hi.EVENT_EXPAND_COLLAPSE_ALL,source:e};this.eventService.dispatchEvent(s)};i.prototype.doSort=function(t,i){this.sortStage.execute({rowNode:this.rootNode,rowNodeTransactions:t,changedPath:i})};i.prototype.doRowGrouping=function(t,i,n,r,e){if(this.groupStage){if(i){this.groupStage.execute({rowNode:this.rootNode,rowNodeTransactions:i,rowNodeOrder:n,changedPath:r})}else{this.groupStage.execute({rowNode:this.rootNode,changedPath:r,afterColumnsChanged:e});this.restoreGroupState(t)}if(this.gridOptionsService.is("groupSelectsChildren")){var s=this.selectionService.updateGroupsFromChildrenSelections("rowGroupChanged",r);if(s){var o={type:hi.EVENT_SELECTION_CHANGED,source:"rowGroupChanged"};this.eventService.dispatchEvent(o)}}}else{this.rootNode.childrenAfterGroup=this.rootNode.allLeafChildren;if(this.rootNode.sibling){this.rootNode.sibling.childrenAfterGroup=this.rootNode.childrenAfterGroup}this.rootNode.updateHasChildren()}};i.prototype.restoreGroupState=function(t){if(!t){return}Xe.traverseNodesWithKey(this.rootNode.childrenAfterGroup,(function(i,n){if(typeof t[n]==="boolean"){i.expanded=t[n]}}))};i.prototype.doFilter=function(t){this.filterStage.execute({rowNode:this.rootNode,changedPath:t})};i.prototype.doPivot=function(t){if(this.pivotStage){this.pivotStage.execute({rowNode:this.rootNode,changedPath:t})}};i.prototype.getGroupState=function(){if(!this.rootNode.childrenAfterGroup||!this.gridOptionsService.is("rememberGroupStateWhenNewData")){return null}var t={};Xe.traverseNodesWithKey(this.rootNode.childrenAfterGroup,(function(i,n){return t[n]=i.expanded}));return t};i.prototype.getCopyOfNodesMap=function(){return this.nodeManager.getCopyOfNodesMap()};i.prototype.getRowNode=function(t){var i=typeof t=="string"&&t.indexOf(Au.ID_PREFIX_ROW_GROUP)==0;if(i){var n=undefined;this.forEachNode((function(i){if(i.id===t){n=i}}));return n}return this.nodeManager.getRowNode(t)};i.prototype.setRowData=function(t){var i=this.getGroupState();this.nodeManager.setRowData(t);this.selectionService.reset();this.filterManager.onNewRowsLoaded("rowDataUpdated");var n={type:hi.EVENT_ROW_DATA_UPDATED};this.eventService.dispatchEvent(n);this.refreshModel({step:of.EVERYTHING,groupState:i,newData:true})};i.prototype.batchUpdateRowData=function(t,i){var n=this;if(this.applyAsyncTransactionsTimeout==null){this.rowDataTransactionBatch=[];var r=this.gridOptionsService.getAsyncTransactionWaitMillis();this.applyAsyncTransactionsTimeout=window.setTimeout((function(){n.executeBatchUpdateRowData()}),r)}this.rowDataTransactionBatch.push({rowDataTransaction:t,callback:i})};i.prototype.flushAsyncTransactions=function(){if(this.applyAsyncTransactionsTimeout!=null){clearTimeout(this.applyAsyncTransactionsTimeout);this.executeBatchUpdateRowData()}};i.prototype.executeBatchUpdateRowData=function(){var t=this;this.valueCache.onDataChanged();var i=[];var n=[];var r=false;if(this.rowDataTransactionBatch){this.rowDataTransactionBatch.forEach((function(e){var s=t.nodeManager.updateRowData(e.rowDataTransaction,undefined);n.push(s);if(e.callback){i.push(e.callback.bind(null,s))}if(typeof e.rowDataTransaction.addIndex==="number"){r=true}}))}this.commonUpdateRowData(n,undefined,r);if(i.length>0){window.setTimeout((function(){i.forEach((function(t){return t()}))}),0)}if(n.length>0){var e={type:hi.EVENT_ASYNC_TRANSACTIONS_FLUSHED,results:n};this.eventService.dispatchEvent(e)}this.rowDataTransactionBatch=null;this.applyAsyncTransactionsTimeout=undefined};i.prototype.updateRowData=function(t,i){this.valueCache.onDataChanged();var n=this.nodeManager.updateRowData(t,i);var r=typeof t.addIndex==="number";this.commonUpdateRowData([n],i,r);return n};i.prototype.createRowNodeOrder=function(){var t=this.gridOptionsService.is("suppressMaintainUnsortedOrder");if(t){return}var i={};if(this.rootNode&&this.rootNode.allLeafChildren){for(var n=0;n<this.rootNode.allLeafChildren.length;n++){var r=this.rootNode.allLeafChildren[n];i[r.id]=n}}return i};i.prototype.commonUpdateRowData=function(t,i,n){var r=!this.gridOptionsService.is("suppressAnimationFrame");if(n){i=this.createRowNodeOrder()}this.refreshModel({step:of.EVERYTHING,rowNodeTransactions:t,rowNodeOrder:i,keepRenderedRows:true,keepEditingRows:true,animate:r});this.filterManager.onNewRowsLoaded("rowDataUpdated");var e={type:hi.EVENT_ROW_DATA_UPDATED};this.eventService.dispatchEvent(e)};i.prototype.doRowsToDisplay=function(){this.rowsToDisplay=this.flattenStage.execute({rowNode:this.rootNode})};i.prototype.onRowHeightChanged=function(){this.refreshModel({step:of.MAP,keepRenderedRows:true,keepEditingRows:true,keepUndoRedoStack:true})};i.prototype.onRowHeightChangedDebounced=function(){this.onRowHeightChanged_debounced()};i.prototype.resetRowHeights=function(){var t=this.resetRowHeightsForAllRowNodes();this.rootNode.setRowHeight(this.rootNode.rowHeight,true);if(this.rootNode.sibling){this.rootNode.sibling.setRowHeight(this.rootNode.sibling.rowHeight,true)}if(t){this.onRowHeightChanged()}};i.prototype.resetRowHeightsForAllRowNodes=function(){var t=false;this.forEachNode((function(i){i.setRowHeight(i.rowHeight,true);var n=i.detailNode;if(n){n.setRowHeight(n.rowHeight,true)}if(i.sibling){i.sibling.setRowHeight(i.sibling.rowHeight,true)}t=true}));return t};i.prototype.onGridStylesChanges=function(){if(this.columnModel.isAutoRowHeightActive()){return}this.resetRowHeights()};Ew([ut("columnModel")],i.prototype,"columnModel",void 0);Ew([ut("selectionService")],i.prototype,"selectionService",void 0);Ew([ut("filterManager")],i.prototype,"filterManager",void 0);Ew([ut("valueCache")],i.prototype,"valueCache",void 0);Ew([ut("beans")],i.prototype,"beans",void 0);Ew([ut("filterStage")],i.prototype,"filterStage",void 0);Ew([ut("sortStage")],i.prototype,"sortStage",void 0);Ew([ut("flattenStage")],i.prototype,"flattenStage",void 0);Ew([at("groupStage")],i.prototype,"groupStage",void 0);Ew([at("aggregationStage")],i.prototype,"aggregationStage",void 0);Ew([at("pivotStage")],i.prototype,"pivotStage",void 0);Ew([at("filterAggregatesStage")],i.prototype,"filterAggregatesStage",void 0);Ew([et],i.prototype,"init",null);i=Ew([ot("rowModel")],i);return i}(ri);var Vw=function(){var t=function(i,n){t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var n in i)if(Object.prototype.hasOwnProperty.call(i,n))t[n]=i[n]};return t(i,n)};return function(i,n){if(typeof n!=="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(i,n);function r(){this.constructor=i}i.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}();var Bw=function(t,i,n,r){var e=arguments.length,s=e<3?i:r===null?r=Object.getOwnPropertyDescriptor(i,n):r,o;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")s=Reflect.decorate(t,i,n,r);else for(var u=t.length-1;u>=0;u--)if(o=t[u])s=(e<3?o(s):e>3?o(i,n,s):o(i,n))||s;return e>3&&s&&Object.defineProperty(i,n,s),s};var zw=function(t){Vw(i,t);function i(){return t!==null&&t.apply(this,arguments)||this}i.prototype.execute=function(t){var i=t.changedPath;this.filterService.filter(i)};Bw([ut("filterService")],i.prototype,"filterService",void 0);i=Bw([ot("filterStage")],i);return i}(ri);var Ww=function(){var t=function(i,n){t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var n in i)if(Object.prototype.hasOwnProperty.call(i,n))t[n]=i[n]};return t(i,n)};return function(i,n){if(typeof n!=="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(i,n);function r(){this.constructor=i}i.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}();var Uw=function(t,i,n,r){var e=arguments.length,s=e<3?i:r===null?r=Object.getOwnPropertyDescriptor(i,n):r,o;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")s=Reflect.decorate(t,i,n,r);else for(var u=t.length-1;u>=0;u--)if(o=t[u])s=(e<3?o(s):e>3?o(i,n,s):o(i,n))||s;return e>3&&s&&Object.defineProperty(i,n,s),s};var Kw=function(t){Ww(i,t);function i(){return t!==null&&t.apply(this,arguments)||this}i.prototype.execute=function(t){var i=this;var n=this.sortController.getSortOptions();var r=Xe.exists(n)&&n.length>0;var e=r&&Xe.exists(t.rowNodeTransactions)&&this.gridOptionsService.is("deltaSort");var s=n.some((function(t){var n=i.gridOptionsService.isColumnsSortingCoupledToGroup();if(n){return t.column.isPrimary()&&t.column.isRowGroupActive()}return!!t.column.getColDef().showRowGroup}));this.sortService.sort(n,r,e,t.rowNodeTransactions,t.changedPath,s)};Uw([ut("sortService")],i.prototype,"sortService",void 0);Uw([ut("sortController")],i.prototype,"sortController",void 0);Uw([ut("columnModel")],i.prototype,"columnModel",void 0);i=Uw([ot("sortStage")],i);return i}(ri);var qw=function(){var t=function(i,n){t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var n in i)if(Object.prototype.hasOwnProperty.call(i,n))t[n]=i[n]};return t(i,n)};return function(i,n){if(typeof n!=="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(i,n);function r(){this.constructor=i}i.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}();var Yw=function(t,i,n,r){var e=arguments.length,s=e<3?i:r===null?r=Object.getOwnPropertyDescriptor(i,n):r,o;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")s=Reflect.decorate(t,i,n,r);else for(var u=t.length-1;u>=0;u--)if(o=t[u])s=(e<3?o(s):e>3?o(i,n,s):o(i,n))||s;return e>3&&s&&Object.defineProperty(i,n,s),s};var Qw=function(t){qw(i,t);function i(){return t!==null&&t.apply(this,arguments)||this}i.prototype.execute=function(t){var i=t.rowNode;var n=[];var r=this.columnModel.isPivotMode();var e=r&&i.leafGroup;var s=e?[i]:i.childrenAfterSort;var o=this.getFlattenDetails();this.recursivelyAddToRowsToDisplay(o,s,n,r,0);var u=n.length>0;var a=!e&&u&&o.groupIncludeTotalFooter;if(a){i.createFooter();this.addRowNodeToRowsToDisplay(o,i.sibling,n,0)}return n};i.prototype.getFlattenDetails=function(){var t=this.gridOptionsService.is("groupRemoveSingleChildren");var i=!t&&this.gridOptionsService.is("groupRemoveLowestSingleChildren");return{groupRemoveLowestSingleChildren:i,groupRemoveSingleChildren:t,isGroupMultiAutoColumn:this.gridOptionsService.isGroupMultiAutoColumn(),hideOpenParents:this.gridOptionsService.is("groupHideOpenParents"),groupIncludeTotalFooter:this.gridOptionsService.is("groupIncludeTotalFooter"),getGroupIncludeFooter:this.gridOptionsService.getGroupIncludeFooter()}};i.prototype.recursivelyAddToRowsToDisplay=function(t,i,n,r,e){if(Xe.missingOrEmpty(i)){return}for(var s=0;s<i.length;s++){var o=i[s];var u=o.hasChildren();var a=r&&!u;var f=t.groupRemoveSingleChildren&&u&&o.childrenAfterGroup.length===1;var h=t.groupRemoveLowestSingleChildren&&u&&o.leafGroup&&o.childrenAfterGroup.length===1;var c=r&&o.leafGroup;var l=t.hideOpenParents&&o.expanded&&!o.master&&!c;var v=!a&&!l&&!f&&!h;if(v){this.addRowNodeToRowsToDisplay(t,o,n,e)}if(r&&o.leafGroup){continue}if(u){var d=f||h;if(o.expanded||d){var p=d?e:e+1;this.recursivelyAddToRowsToDisplay(t,o.childrenAfterSort,n,r,p);var g=t.getGroupIncludeFooter({node:o});if(g){o.createFooter();this.addRowNodeToRowsToDisplay(t,o.sibling,n,p)}else{o.destroyFooter()}}}else if(o.master&&o.expanded){var b=this.createDetailNode(o);this.addRowNodeToRowsToDisplay(t,b,n,e)}}};i.prototype.addRowNodeToRowsToDisplay=function(t,i,n,r){n.push(i);i.setUiLevel(t.isGroupMultiAutoColumn?0:r)};i.prototype.createDetailNode=function(t){if(Xe.exists(t.detailNode)){return t.detailNode}var i=new Au(this.beans);i.detail=true;i.selectable=false;i.parent=t;if(Xe.exists(t.id)){i.id="detail_"+t.id}i.data=t.data;i.level=t.level+1;t.detailNode=i;return i};Yw([ut("columnModel")],i.prototype,"columnModel",void 0);Yw([ut("beans")],i.prototype,"beans",void 0);i=Yw([ot("flattenStage")],i);return i}(ri);var Jw=function(){var t=function(i,n){t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var n in i)if(Object.prototype.hasOwnProperty.call(i,n))t[n]=i[n]};return t(i,n)};return function(i,n){if(typeof n!=="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(i,n);function r(){this.constructor=i}i.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}();var Zw=function(t,i,n,r){var e=arguments.length,s=e<3?i:r===null?r=Object.getOwnPropertyDescriptor(i,n):r,o;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")s=Reflect.decorate(t,i,n,r);else for(var u=t.length-1;u>=0;u--)if(o=t[u])s=(e<3?o(s):e>3?o(i,n,s):o(i,n))||s;return e>3&&s&&Object.defineProperty(i,n,s),s};var $w=function(t){Jw(i,t);function i(){return t!==null&&t.apply(this,arguments)||this}i.prototype.init=function(){this.postSortFunc=this.gridOptionsService.getCallback("postSortRows")};i.prototype.sort=function(t,i,n,r,e,s){var o=this;var u=this.gridOptionsService.is("groupMaintainOrder");var a=this.columnModel.getAllGridColumns().some((function(t){return t.isRowGroupActive()}));var f={};if(n&&r){f=this.calculateDirtyNodes(r)}var h=this.columnModel.isPivotMode();var c=function(r){o.pullDownGroupDataForHideOpenParents(r.childrenAfterAggFilter,true);var c=h&&r.leafGroup;var l=u&&a&&!r.leafGroup&&!s;if(l){var v=r.childrenAfterAggFilter.slice(0);if(r.childrenAfterSort){var d={};r.childrenAfterSort.forEach((function(t,i){d[t.id]=i}));v.sort((function(t,i){var n,r;return((n=d[t.id])!==null&&n!==void 0?n:0)-((r=d[i.id])!==null&&r!==void 0?r:0)}))}r.childrenAfterSort=v}else if(!i||c){r.childrenAfterSort=r.childrenAfterAggFilter.slice(0)}else if(n){r.childrenAfterSort=o.doDeltaSort(r,f,e,t)}else{r.childrenAfterSort=o.rowNodeSorter.doFullSort(r.childrenAfterAggFilter,t)}if(r.sibling){r.sibling.childrenAfterSort=r.childrenAfterSort}o.updateChildIndexes(r);if(o.postSortFunc){var p={nodes:r.childrenAfterSort};o.postSortFunc(p)}};if(e){e.forEachChangedNodeDepthFirst(c)}this.updateGroupDataForHideOpenParents(e)};i.prototype.calculateDirtyNodes=function(t){var i={};var n=function(t){if(t){t.forEach((function(t){return i[t.id]=true}))}};if(t){t.forEach((function(t){n(t.add);n(t.update);n(t.remove)}))}return i};i.prototype.doDeltaSort=function(t,i,n,r){var e=this;var s=t.childrenAfterAggFilter;var o=t.childrenAfterSort;if(!o){return this.rowNodeSorter.doFullSort(s,r)}var u={};var a=[];s.forEach((function(t){if(i[t.id]||!n.canSkip(t)){a.push(t)}else{u[t.id]=true}}));var f=o.filter((function(t){return u[t.id]}));var h=function(t,i){return{currentPos:i,rowNode:t}};var c=a.map(h).sort((function(t,i){return e.rowNodeSorter.compareRowNodes(r,t,i)}));return this.mergeSortedArrays(r,c,f.map(h)).map((function(t){var i=t.rowNode;return i}))};i.prototype.mergeSortedArrays=function(t,i,n){var r=[];var e=0;var s=0;while(e<i.length&&s<n.length){var o=this.rowNodeSorter.compareRowNodes(t,i[e],n[s]);if(o<0){r.push(i[e++])}else{r.push(n[s++])}}while(e<i.length){r.push(i[e++])}while(s<n.length){r.push(n[s++])}return r};i.prototype.updateChildIndexes=function(t){if(Xe.missing(t.childrenAfterSort)){return}var i=t.childrenAfterSort;for(var n=0;n<i.length;n++){var r=i[n];var e=n===0;var s=n===t.childrenAfterSort.length-1;r.setFirstChild(e);r.setLastChild(s);r.setChildIndex(n)}};i.prototype.updateGroupDataForHideOpenParents=function(t){var i=this;if(!this.gridOptionsService.is("groupHideOpenParents")){return}if(this.gridOptionsService.is("treeData")){var n="AG Grid: The property hideOpenParents dose not work with Tree Data. This is because Tree Data has values at the group level, it doesn't make sense to hide them (as opposed to Row Grouping, which only has Aggregated Values at the group level).";Xe.doOnce((function(){return console.warn(n)}),"sortService.hideOpenParentsWithTreeData");return false}var r=function(t){i.pullDownGroupDataForHideOpenParents(t.childrenAfterSort,false);t.childrenAfterSort.forEach((function(t){if(t.hasChildren()){r(t)}}))};if(t){t.executeFromRootNode((function(t){return r(t)}))}};i.prototype.pullDownGroupDataForHideOpenParents=function(t,i){var n=this;if(!this.gridOptionsService.is("groupHideOpenParents")||Xe.missing(t)){return}t.forEach((function(t){var r=n.columnModel.getGroupDisplayColumns();r.forEach((function(r){var e=r.getColDef().showRowGroup;if(typeof e!=="string"){console.error("AG Grid: groupHideOpenParents only works when specifying specific columns for colDef.showRowGroup");return}var s=e;var o=n.columnModel.getPrimaryColumn(s);var u=o===t.rowGroupColumn;if(u){return}if(i){t.setGroupValue(r.getId(),undefined)}else{var a=t.getFirstChildOfFirstChild(o);if(a){t.setGroupValue(r.getId(),a.key)}}}))}))};Zw([ut("columnModel")],i.prototype,"columnModel",void 0);Zw([ut("rowNodeSorter")],i.prototype,"rowNodeSorter",void 0);Zw([et],i.prototype,"init",null);i=Zw([ot("sortService")],i);return i}(ri);var Xw=function(){var t=function(i,n){t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var n in i)if(Object.prototype.hasOwnProperty.call(i,n))t[n]=i[n]};return t(i,n)};return function(i,n){if(typeof n!=="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(i,n);function r(){this.constructor=i}i.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}();var ty=function(t,i,n,r){var e=arguments.length,s=e<3?i:r===null?r=Object.getOwnPropertyDescriptor(i,n):r,o;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")s=Reflect.decorate(t,i,n,r);else for(var u=t.length-1;u>=0;u--)if(o=t[u])s=(e<3?o(s):e>3?o(i,n,s):o(i,n))||s;return e>3&&s&&Object.defineProperty(i,n,s),s};var iy=function(t){Xw(i,t);function i(){return t!==null&&t.apply(this,arguments)||this}i.prototype.filter=function(t){var i=this.filterManager.isChildFilterPresent();this.filterNodes(i,t)};i.prototype.filterNodes=function(t,i){var n=this;var r=function(i,r){if(i.hasChildren()){if(t&&!r){i.childrenAfterFilter=i.childrenAfterGroup.filter((function(t){var i=t.childrenAfterFilter&&t.childrenAfterFilter.length>0;var r=t.data&&n.filterManager.doesRowPassFilter({rowNode:t});return i||r}))}else{i.childrenAfterFilter=i.childrenAfterGroup}}else{i.childrenAfterFilter=i.childrenAfterGroup}if(i.sibling){i.sibling.childrenAfterFilter=i.childrenAfterFilter}};if(this.doingTreeDataFiltering()){var e=function(t,i){if(t.childrenAfterGroup){for(var s=0;s<t.childrenAfterGroup.length;s++){var o=t.childrenAfterGroup[s];var u=i||n.filterManager.doesRowPassFilter({rowNode:o});if(o.childrenAfterGroup){e(t.childrenAfterGroup[s],u)}else{r(o,u)}}}r(t,i)};var s=function(t){return e(t,false)};i.executeFromRootNode(s)}else{var o=function(t){return r(t,false)};i.forEachChangedNodeDepthFirst(o,true)}};i.prototype.doingTreeDataFiltering=function(){return this.gridOptionsService.is("treeData")&&!this.gridOptionsService.is("excludeChildrenWhenTreeDataFiltering")};ty([ut("filterManager")],i.prototype,"filterManager",void 0);i=ty([ot("filterService")],i);return i}(ri);var ny=function(){var t=function(i,n){t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var n in i)if(Object.prototype.hasOwnProperty.call(i,n))t[n]=i[n]};return t(i,n)};return function(i,n){if(typeof n!=="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(i,n);function r(){this.constructor=i}i.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}();var ry=function(t,i,n,r){var e=arguments.length,s=e<3?i:r===null?r=Object.getOwnPropertyDescriptor(i,n):r,o;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")s=Reflect.decorate(t,i,n,r);else for(var u=t.length-1;u>=0;u--)if(o=t[u])s=(e<3?o(s):e>3?o(i,n,s):o(i,n))||s;return e>3&&s&&Object.defineProperty(i,n,s),s};var ey=function(t,i){var n=typeof Symbol==="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),e,s=[],o;try{while((i===void 0||i-- >0)&&!(e=r.next()).done)s.push(e.value)}catch(t){o={error:t}}finally{try{if(e&&!e.done&&(n=r["return"]))n.call(r)}finally{if(o)throw o.error}}return s};var sy=function(t){ny(i,t);function i(){return t!==null&&t.apply(this,arguments)||this}i.prototype.postConstruct=function(){if(this.rowModel.getType()==="clientSide"){this.clientSideRowModel=this.rowModel}};i.prototype.isActive=function(){var t=this.gridOptionsService.exists("getRowId");var i=this.gridOptionsService.is("resetRowDataOnUpdate");if(i){return false}return t};i.prototype.setRowData=function(t){var i=this.createTransactionForRowData(t);if(!i){return}var n=ey(i,2),r=n[0],e=n[1];this.clientSideRowModel.updateRowData(r,e)};i.prototype.createTransactionForRowData=function(t){if(Xe.missing(this.clientSideRowModel)){console.error("AG Grid: ImmutableService only works with ClientSideRowModel");return}var i=this.gridOptionsService.getCallback("getRowId");if(i==null){console.error("AG Grid: ImmutableService requires getRowId() callback to be implemented, your row data needs IDs!");return}var n={remove:[],update:[],add:[]};var r=this.clientSideRowModel.getCopyOfNodesMap();var e=this.gridOptionsService.is("suppressMaintainUnsortedOrder");var s=e?undefined:{};if(Xe.exists(t)){t.forEach((function(t,e){var o=i({data:t,level:0});var u=r[o];if(s){s[o]=e}if(u){var a=u.data!==t;if(a){n.update.push(t)}r[o]=undefined}else{n.add.push(t)}}))}Xe.iterateObject(r,(function(t,i){if(i){n.remove.push(i.data)}}));return[n,s]};ry([ut("rowModel")],i.prototype,"rowModel",void 0);ry([ut("rowRenderer")],i.prototype,"rowRenderer",void 0);ry([et],i.prototype,"postConstruct",null);i=ry([ot("immutableService")],i);return i}(ri);var oy="30.2.1";var uy={version:oy,moduleName:J.ClientSideRowModelModule,rowModel:"clientSide",beans:[Lw,zw,Kw,Qw,$w,iy,sy]};var ay=function(){var t=function(i,n){t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var n in i)if(Object.prototype.hasOwnProperty.call(i,n))t[n]=i[n]};return t(i,n)};return function(i,n){if(typeof n!=="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(i,n);function r(){this.constructor=i}i.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}();var fy=function(t,i,n,r){var e=arguments.length,s=e<3?i:r===null?r=Object.getOwnPropertyDescriptor(i,n):r,o;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")s=Reflect.decorate(t,i,n,r);else for(var u=t.length-1;u>=0;u--)if(o=t[u])s=(e<3?o(s):e>3?o(i,n,s):o(i,n))||s;return e>3&&s&&Object.defineProperty(i,n,s),s};var hy=function(t){ay(i,t);function i(i,n,r){var e=t.call(this,i)||this;e.parentCache=n;e.params=r;e.startRow=i*r.blockSize;e.endRow=e.startRow+r.blockSize;return e}i.prototype.postConstruct=function(){this.createRowNodes()};i.prototype.getBlockStateJson=function(){return{id:""+this.getId(),state:{blockNumber:this.getId(),startRow:this.getStartRow(),endRow:this.getEndRow(),pageStatus:this.getState()}}};i.prototype.setDataAndId=function(t,i,n){if(Xe.exists(i)){t.setDataAndId(i,n.toString())}else{t.setDataAndId(undefined,undefined)}};i.prototype.loadFromDatasource=function(){var t=this;var i=this.createLoadParams();if(Xe.missing(this.params.datasource.getRows)){console.warn("AG Grid: datasource is missing getRows method");return}window.setTimeout((function(){t.params.datasource.getRows(i)}),0)};i.prototype.processServerFail=function(){};i.prototype.createLoadParams=function(){var t={startRow:this.getStartRow(),endRow:this.getEndRow(),successCallback:this.pageLoaded.bind(this,this.getVersion()),failCallback:this.pageLoadFailed.bind(this,this.getVersion()),sortModel:this.params.sortModel,filterModel:this.params.filterModel,context:this.gridOptionsService.context};return t};i.prototype.forEachNode=function(t,i,n){var r=this;this.rowNodes.forEach((function(e,s){var o=r.startRow+s;if(o<n){t(e,i.next())}}))};i.prototype.getLastAccessed=function(){return this.lastAccessed};i.prototype.getRow=function(t,i){if(i===void 0){i=false}if(!i){this.lastAccessed=this.params.lastAccessedSequence.next()}var n=t-this.startRow;return this.rowNodes[n]};i.prototype.getStartRow=function(){return this.startRow};i.prototype.getEndRow=function(){return this.endRow};i.prototype.createRowNodes=function(){this.rowNodes=[];for(var t=0;t<this.params.blockSize;t++){var i=this.startRow+t;var n=new Au(this.beans);n.setRowHeight(this.params.rowHeight);n.uiLevel=0;n.setRowIndex(i);n.setRowTop(this.params.rowHeight*i);this.rowNodes.push(n)}};i.prototype.processServerResult=function(t){var i=this;this.rowNodes.forEach((function(n,r){var e=t.rowData?t.rowData[r]:undefined;if(!n.id&&n.alreadyRendered&&e){i.rowNodes[r]=new Au(i.beans);i.rowNodes[r].setRowIndex(n.rowIndex);i.rowNodes[r].setRowTop(n.rowTop);i.rowNodes[r].setRowHeight(n.rowHeight);n.clearRowTopAndRowIndex()}i.setDataAndId(i.rowNodes[r],e,i.startRow+r)}));var n=t.rowCount!=null&&t.rowCount>=0?t.rowCount:undefined;this.parentCache.pageLoaded(this,n)};i.prototype.destroyRowNodes=function(){this.rowNodes.forEach((function(t){t.clearRowTopAndRowIndex()}))};fy([ut("beans")],i.prototype,"beans",void 0);fy([et],i.prototype,"postConstruct",null);fy([st],i.prototype,"destroyRowNodes",null);return i}(sd);var cy=function(){var t=function(i,n){t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var n in i)if(Object.prototype.hasOwnProperty.call(i,n))t[n]=i[n]};return t(i,n)};return function(i,n){if(typeof n!=="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(i,n);function r(){this.constructor=i}i.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}();var ly=function(t,i,n,r){var e=arguments.length,s=e<3?i:r===null?r=Object.getOwnPropertyDescriptor(i,n):r,o;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")s=Reflect.decorate(t,i,n,r);else for(var u=t.length-1;u>=0;u--)if(o=t[u])s=(e<3?o(s):e>3?o(i,n,s):o(i,n))||s;return e>3&&s&&Object.defineProperty(i,n,s),s};var vy=function(t,i){return function(n,r){i(n,r,t)}};var dy=function(t){cy(i,t);function i(i){var n=t.call(this)||this;n.lastRowIndexKnown=false;n.blocks={};n.blockCount=0;n.rowCount=i.initialRowCount;n.params=i;return n}i.prototype.setBeans=function(t){this.logger=t.create("InfiniteCache")};i.prototype.getRow=function(t,i){if(i===void 0){i=false}var n=Math.floor(t/this.params.blockSize);var r=this.blocks[n];if(!r){if(i){return undefined}r=this.createBlock(n)}return r.getRow(t)};i.prototype.createBlock=function(t){var i=this.createBean(new hy(t,this,this.params));this.blocks[i.getId()]=i;this.blockCount++;this.purgeBlocksIfNeeded(i);this.params.rowNodeBlockLoader.addBlock(i);return i};i.prototype.refreshCache=function(){var t=this.blockCount==0;if(t){this.purgeCache();return}this.getBlocksInOrder().forEach((function(t){return t.setStateWaitingToLoad()}));this.params.rowNodeBlockLoader.checkBlockToLoad()};i.prototype.destroyAllBlocks=function(){var t=this;this.getBlocksInOrder().forEach((function(i){return t.destroyBlock(i)}))};i.prototype.getRowCount=function(){return this.rowCount};i.prototype.isLastRowIndexKnown=function(){return this.lastRowIndexKnown};i.prototype.pageLoaded=function(t,i){if(!this.isAlive()){return}this.logger.log("onPageLoaded: page = "+t.getId()+", lastRow = "+i);this.checkRowCount(t,i);this.onCacheUpdated()};i.prototype.purgeBlocksIfNeeded=function(t){var n=this;var r=this.getBlocksInOrder().filter((function(i){return i!=t}));var e=function(t,i){return i.getLastAccessed()-t.getLastAccessed()};r.sort(e);var s=this.params.maxBlocksInCache>0;var o=s?this.params.maxBlocksInCache-1:null;var u=i.MAX_EMPTY_BLOCKS_TO_KEEP-1;r.forEach((function(t,i){var r=t.getState()===hy.STATE_WAITING_TO_LOAD&&i>=u;var e=s?i>=o:false;if(r||e){if(n.isBlockCurrentlyDisplayed(t)){return}if(n.isBlockFocused(t)){return}n.removeBlockFromCache(t)}}))};i.prototype.isBlockFocused=function(t){var i=this.focusService.getFocusCellToUseAfterRefresh();if(!i){return false}if(i.rowPinned!=null){return false}var n=t.getStartRow();var r=t.getEndRow();var e=i.rowIndex>=n&&i.rowIndex<r;return e};i.prototype.isBlockCurrentlyDisplayed=function(t){var i=t.getStartRow();var n=t.getEndRow()-1;return this.rowRenderer.isRangeInRenderedViewport(i,n)};i.prototype.removeBlockFromCache=function(t){if(!t){return}this.destroyBlock(t)};i.prototype.checkRowCount=function(t,i){if(typeof i==="number"&&i>=0){this.rowCount=i;this.lastRowIndexKnown=true}else if(!this.lastRowIndexKnown){var n=(t.getId()+1)*this.params.blockSize;var r=n+this.params.overflowSize;if(this.rowCount<r){this.rowCount=r}}};i.prototype.setRowCount=function(t,i){this.rowCount=t;if(Xe.exists(i)){this.lastRowIndexKnown=i}if(!this.lastRowIndexKnown){if(this.rowCount%this.params.blockSize===0){this.rowCount++}}this.onCacheUpdated()};i.prototype.forEachNodeDeep=function(t){var i=this;var n=new ts;this.getBlocksInOrder().forEach((function(r){return r.forEachNode(t,n,i.rowCount)}))};i.prototype.getBlocksInOrder=function(){var t=function(t,i){return t.getId()-i.getId()};var i=Xe.getAllValuesInObject(this.blocks).sort(t);return i};i.prototype.destroyBlock=function(t){delete this.blocks[t.getId()];this.destroyBean(t);this.blockCount--;this.params.rowNodeBlockLoader.removeBlock(t)};i.prototype.onCacheUpdated=function(){if(this.isAlive()){this.destroyAllBlocksPastVirtualRowCount();var t={type:hi.EVENT_STORE_UPDATED};this.eventService.dispatchEvent(t)}};i.prototype.destroyAllBlocksPastVirtualRowCount=function(){var t=this;var i=[];this.getBlocksInOrder().forEach((function(n){var r=n.getId()*t.params.blockSize;if(r>=t.rowCount){i.push(n)}}));if(i.length>0){i.forEach((function(i){return t.destroyBlock(i)}))}};i.prototype.purgeCache=function(){var t=this;this.getBlocksInOrder().forEach((function(i){return t.removeBlockFromCache(i)}));this.lastRowIndexKnown=false;if(this.rowCount===0){this.rowCount=this.params.initialRowCount}this.onCacheUpdated()};i.prototype.getRowNodesInRange=function(t,i){var n=this;var r=[];var e=-1;var s=false;var o=new ts;if(Xe.missing(t)){s=true}var u=false;this.getBlocksInOrder().forEach((function(a){if(u){return}if(s&&e+1!==a.getId()){u=true;return}e=a.getId();a.forEachNode((function(n){var e=n===t||n===i;if(s||e){r.push(n)}if(e){s=!s}}),o,n.rowCount)}));var a=u||s;return a?[]:r};i.MAX_EMPTY_BLOCKS_TO_KEEP=2;ly([ut("rowRenderer")],i.prototype,"rowRenderer",void 0);ly([ut("focusService")],i.prototype,"focusService",void 0);ly([vy(0,ht("loggerFactory"))],i.prototype,"setBeans",null);ly([st],i.prototype,"destroyAllBlocks",null);return i}(ri);var py=function(){var t=function(i,n){t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var n in i)if(Object.prototype.hasOwnProperty.call(i,n))t[n]=i[n]};return t(i,n)};return function(i,n){if(typeof n!=="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(i,n);function r(){this.constructor=i}i.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}();var gy=function(t,i,n,r){var e=arguments.length,s=e<3?i:r===null?r=Object.getOwnPropertyDescriptor(i,n):r,o;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")s=Reflect.decorate(t,i,n,r);else for(var u=t.length-1;u>=0;u--)if(o=t[u])s=(e<3?o(s):e>3?o(i,n,s):o(i,n))||s;return e>3&&s&&Object.defineProperty(i,n,s),s};var by=function(t){py(i,t);function i(){return t!==null&&t.apply(this,arguments)||this}i.prototype.getRowBounds=function(t){return{rowHeight:this.rowHeight,rowTop:this.rowHeight*t}};i.prototype.ensureRowHeightsValid=function(t,i,n,r){return false};i.prototype.init=function(){var t=this;if(!this.gridOptionsService.isRowModelType("infinite")){return}this.rowHeight=this.gridOptionsService.getRowHeightAsNumber();this.addEventListeners();this.addDestroyFunc((function(){return t.destroyCache()}));this.verifyProps()};i.prototype.verifyProps=function(){if(this.gridOptionsService.exists("initialGroupOrderComparator")){var t="AG Grid: initialGroupOrderComparator cannot be used with Infinite Row Model. If using Infinite Row Model, then sorting is done on the server side, nothing to do with the client.";Xe.doOnce((function(){return console.warn(t)}),"IRM.InitialGroupOrderComparator")}};i.prototype.start=function(){this.setDatasource(this.gridOptionsService.get("datasource"))};i.prototype.destroyDatasource=function(){if(this.datasource){this.getContext().destroyBean(this.datasource);this.rowRenderer.datasourceChanged();this.datasource=null}};i.prototype.addEventListeners=function(){this.addManagedListener(this.eventService,hi.EVENT_FILTER_CHANGED,this.onFilterChanged.bind(this));this.addManagedListener(this.eventService,hi.EVENT_SORT_CHANGED,this.onSortChanged.bind(this));this.addManagedListener(this.eventService,hi.EVENT_NEW_COLUMNS_LOADED,this.onColumnEverything.bind(this));this.addManagedListener(this.eventService,hi.EVENT_STORE_UPDATED,this.onCacheUpdated.bind(this))};i.prototype.onFilterChanged=function(){this.reset()};i.prototype.onSortChanged=function(){this.reset()};i.prototype.onColumnEverything=function(){var t;if(this.cacheParams){t=this.isSortModelDifferent()}else{t=true}if(t){this.reset()}};i.prototype.isSortModelDifferent=function(){return!Xe.jsonEquals(this.cacheParams.sortModel,this.sortController.getSortModel())};i.prototype.getType=function(){return"infinite"};i.prototype.setDatasource=function(t){this.destroyDatasource();this.datasource=t;if(t){this.reset()}};i.prototype.isEmpty=function(){return!this.infiniteCache};i.prototype.isRowsToRender=function(){return!!this.infiniteCache};i.prototype.getNodesInRangeForSelection=function(t,i){return this.infiniteCache?this.infiniteCache.getRowNodesInRange(t,i):[]};i.prototype.reset=function(){if(!this.datasource){return}var t=this.gridOptionsService.getCallback("getRowId");var i=t!=null;if(!i){this.selectionService.reset()}this.resetCache();var n=this.createModelUpdatedEvent();this.eventService.dispatchEvent(n)};i.prototype.createModelUpdatedEvent=function(){return{type:hi.EVENT_MODEL_UPDATED,newPage:false,newData:false,keepRenderedRows:true,animate:false}};i.prototype.resetCache=function(){this.destroyCache();this.cacheParams={datasource:this.datasource,filterModel:this.filterManager.getFilterModel(),sortModel:this.sortController.getSortModel(),rowNodeBlockLoader:this.rowNodeBlockLoader,initialRowCount:this.defaultIfInvalid(this.gridOptionsService.getNum("infiniteInitialRowCount"),1),maxBlocksInCache:this.gridOptionsService.getNum("maxBlocksInCache"),rowHeight:this.gridOptionsService.getRowHeightAsNumber(),overflowSize:this.defaultIfInvalid(this.gridOptionsService.getNum("cacheOverflowSize"),1),blockSize:this.defaultIfInvalid(this.gridOptionsService.getNum("cacheBlockSize"),100),lastAccessedSequence:new ts};this.infiniteCache=this.createBean(new dy(this.cacheParams))};i.prototype.defaultIfInvalid=function(t,i){return t>0?t:i};i.prototype.destroyCache=function(){if(this.infiniteCache){this.infiniteCache=this.destroyBean(this.infiniteCache)}};i.prototype.onCacheUpdated=function(){var t=this.createModelUpdatedEvent();this.eventService.dispatchEvent(t)};i.prototype.getRow=function(t){if(!this.infiniteCache){return undefined}if(t>=this.infiniteCache.getRowCount()){return undefined}return this.infiniteCache.getRow(t)};i.prototype.getRowNode=function(t){var i;this.forEachNode((function(n){if(n.id===t){i=n}}));return i};i.prototype.forEachNode=function(t){if(this.infiniteCache){this.infiniteCache.forEachNodeDeep(t)}};i.prototype.getTopLevelRowCount=function(){return this.getRowCount()};i.prototype.getTopLevelRowDisplayedIndex=function(t){return t};i.prototype.getRowIndexAtPixel=function(t){if(this.rowHeight!==0){var i=Math.floor(t/this.rowHeight);var n=this.getRowCount()-1;if(i>n){return n}return i}return 0};i.prototype.getRowCount=function(){return this.infiniteCache?this.infiniteCache.getRowCount():0};i.prototype.isRowPresent=function(t){var i=this.getRowNode(t.id);return!!i};i.prototype.refreshCache=function(){if(this.infiniteCache){this.infiniteCache.refreshCache()}};i.prototype.purgeCache=function(){if(this.infiniteCache){this.infiniteCache.purgeCache()}};i.prototype.isLastRowIndexKnown=function(){if(this.infiniteCache){return this.infiniteCache.isLastRowIndexKnown()}return false};i.prototype.setRowCount=function(t,i){if(this.infiniteCache){this.infiniteCache.setRowCount(t,i)}};gy([ut("filterManager")],i.prototype,"filterManager",void 0);gy([ut("sortController")],i.prototype,"sortController",void 0);gy([ut("selectionService")],i.prototype,"selectionService",void 0);gy([ut("rowRenderer")],i.prototype,"rowRenderer",void 0);gy([ut("rowNodeBlockLoader")],i.prototype,"rowNodeBlockLoader",void 0);gy([et],i.prototype,"init",null);gy([st],i.prototype,"destroyDatasource",null);i=gy([ot("rowModel")],i);return i}(ri);var wy="30.2.1";var yy={version:wy,moduleName:J.InfiniteRowModelModule,rowModel:"infinite",beans:[by]};var my=function(){function t(){}t.prototype.setBeans=function(t){this.beans=t};t.prototype.getFileName=function(t){var i=this.getDefaultFileExtension();if(t==null||!t.length){t=this.getDefaultFileName()}return t.indexOf(".")===-1?t+"."+i:t};t.prototype.getData=function(t){var i=this.createSerializingSession(t);var n=this.beans.gridSerializer.serialize(i,t);return n};return t}();var Sy=function(){function t(t){this.groupColumns=[];var i=t.columnModel,n=t.valueService,r=t.gridOptionsService,e=t.valueFormatterService,s=t.valueParserService,o=t.processCellCallback,u=t.processHeaderCallback,a=t.processGroupHeaderCallback,f=t.processRowGroupCallback;this.columnModel=i;this.valueService=n;this.gridOptionsService=r;this.valueFormatterService=e;this.valueParserService=s;this.processCellCallback=o;this.processHeaderCallback=u;this.processGroupHeaderCallback=a;this.processRowGroupCallback=f}t.prototype.prepare=function(t){this.groupColumns=t.filter((function(t){return!!t.getColDef().showRowGroup}))};t.prototype.extractHeaderValue=function(t){var i=this.getHeaderName(this.processHeaderCallback,t);return i!=null?i:""};t.prototype.extractRowCellValue=function(t,i,n,r,e){var s=this.gridOptionsService.is("groupHideOpenParents");var o=(!s||e.footer)&&this.shouldRenderGroupSummaryCell(e,t,i)?this.createValueForGroupNode(e):this.valueService.getValue(t,e);var u=this.processCell({accumulatedRowIndex:n,rowNode:e,column:t,value:o,processCellCallback:this.processCellCallback,type:r});return u};t.prototype.shouldRenderGroupSummaryCell=function(t,i,n){var r;var e=t&&t.group;if(!e){return false}var s=this.groupColumns.indexOf(i);if(s!==-1){if(((r=t.groupData)===null||r===void 0?void 0:r[i.getId()])!=null){return true}if(this.gridOptionsService.isRowModelType("serverSide")&&t.group){return true}if(t.footer&&t.level===-1){var o=i.getColDef();var u=o==null||o.showRowGroup===true;return u||o.showRowGroup===this.columnModel.getRowGroupColumns()[0].getId()}}var a=this.gridOptionsService.isGroupUseEntireRow(this.columnModel.isPivotMode());return n===0&&a};t.prototype.getHeaderName=function(t,i){if(t){return t({column:i,api:this.gridOptionsService.api,columnApi:this.gridOptionsService.columnApi,context:this.gridOptionsService.context})}return this.columnModel.getDisplayNameForColumn(i,"csv",true)};t.prototype.createValueForGroupNode=function(t){if(this.processRowGroupCallback){return this.processRowGroupCallback({node:t,api:this.gridOptionsService.api,columnApi:this.gridOptionsService.columnApi,context:this.gridOptionsService.context})}var i=t.footer;var n=[t.key];if(!this.gridOptionsService.isGroupMultiAutoColumn()){while(t.parent){t=t.parent;n.push(t.key)}}var r=n.reverse().join(" -> ");return i?"Total "+r:r};t.prototype.processCell=function(t){var i=this;var n;var r=t.accumulatedRowIndex,e=t.rowNode,s=t.column,o=t.value,u=t.processCellCallback,a=t.type;if(u){return{value:(n=u({accumulatedRowIndex:r,column:s,node:e,value:o,api:this.gridOptionsService.api,columnApi:this.gridOptionsService.columnApi,context:this.gridOptionsService.context,type:a,parseValue:function(t){return i.valueParserService.parseValue(s,e,t,i.valueService.getValue(s,e))},formatValue:function(t){var n;return(n=i.valueFormatterService.formatValue(s,e,t))!==null&&n!==void 0?n:t}}))!==null&&n!==void 0?n:""}}if(s.getColDef().useValueFormatterForExport){return{value:o!==null&&o!==void 0?o:"",valueFormatted:this.valueFormatterService.formatValue(s,e,o)}}return{value:o!==null&&o!==void 0?o:""}};return t}();var Cy=function(){function t(){}t.download=function(t,i){var n=document.defaultView||window;if(!n){console.warn("AG Grid: There is no `window` associated with the current `document`");return}var r=document.createElement("a");var e=n.URL.createObjectURL(i);r.setAttribute("href",e);r.setAttribute("download",t);r.style.display="none";document.body.appendChild(r);r.dispatchEvent(new MouseEvent("click",{bubbles:false,cancelable:true,view:n}));document.body.removeChild(r);n.setTimeout((function(){n.URL.revokeObjectURL(e)}),0)};return t}();var Oy=function(){var t=function(i,n){t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var n in i)if(Object.prototype.hasOwnProperty.call(i,n))t[n]=i[n]};return t(i,n)};return function(i,n){if(typeof n!=="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(i,n);function r(){this.constructor=i}i.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}();var jy="\r\n";var Ry=function(t){Oy(i,t);function i(i){var n=t.call(this,i)||this;n.isFirstLine=true;n.result="";var r=i.suppressQuotes,e=i.columnSeparator;n.suppressQuotes=r;n.columnSeparator=e;return n}i.prototype.addCustomContent=function(t){var i=this;if(!t){return}if(typeof t==="string"){if(!/^\s*\n/.test(t)){this.beginNewLine()}t=t.replace(/\r?\n/g,jy);this.result+=t}else{t.forEach((function(t){i.beginNewLine();t.forEach((function(t,n){if(n!==0){i.result+=i.columnSeparator}i.result+=i.putInQuotes(t.data.value||"");if(t.mergeAcross){i.appendEmptyCells(t.mergeAcross)}}))}))}};i.prototype.onNewHeaderGroupingRow=function(){this.beginNewLine();return{onColumn:this.onNewHeaderGroupingRowColumn.bind(this)}};i.prototype.onNewHeaderGroupingRowColumn=function(t,i,n,r){if(n!=0){this.result+=this.columnSeparator}this.result+=this.putInQuotes(i);this.appendEmptyCells(r)};i.prototype.appendEmptyCells=function(t){for(var i=1;i<=t;i++){this.result+=this.columnSeparator+this.putInQuotes("")}};i.prototype.onNewHeaderRow=function(){this.beginNewLine();return{onColumn:this.onNewHeaderRowColumn.bind(this)}};i.prototype.onNewHeaderRowColumn=function(t,i){if(i!=0){this.result+=this.columnSeparator}this.result+=this.putInQuotes(this.extractHeaderValue(t))};i.prototype.onNewBodyRow=function(){this.beginNewLine();return{onColumn:this.onNewBodyRowColumn.bind(this)}};i.prototype.onNewBodyRowColumn=function(t,i,n){var r;if(i!=0){this.result+=this.columnSeparator}var e=this.extractRowCellValue(t,i,i,"csv",n);this.result+=this.putInQuotes((r=e.valueFormatted)!==null&&r!==void 0?r:e.value)};i.prototype.putInQuotes=function(t){if(this.suppressQuotes){return t}if(t===null||t===undefined){return'""'}var i;if(typeof t==="string"){i=t}else if(typeof t.toString==="function"){i=t.toString()}else{console.warn("AG Grid: unknown value type during csv conversion");i=""}var n=i.replace(/"/g,'""');return'"'+n+'"'};i.prototype.parse=function(){return this.result};i.prototype.beginNewLine=function(){if(!this.isFirstLine){this.result+=jy}this.isFirstLine=false};return i}(Sy);var xy=function(){var t=function(i,n){t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var n in i)if(Object.prototype.hasOwnProperty.call(i,n))t[n]=i[n]};return t(i,n)};return function(i,n){if(typeof n!=="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(i,n);function r(){this.constructor=i}i.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}();var _y=function(t,i,n,r){var e=arguments.length,s=e<3?i:r===null?r=Object.getOwnPropertyDescriptor(i,n):r,o;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")s=Reflect.decorate(t,i,n,r);else for(var u=t.length-1;u>=0;u--)if(o=t[u])s=(e<3?o(s):e>3?o(i,n,s):o(i,n))||s;return e>3&&s&&Object.defineProperty(i,n,s),s};var Ay=function(t){xy(i,t);function i(){return t!==null&&t.apply(this,arguments)||this}i.prototype.postConstruct=function(){this.setBeans({gridSerializer:this.gridSerializer,gridOptionsService:this.gridOptionsService})};i.prototype.getMergedParams=function(t){var i=this.gridOptionsService.get("defaultCsvExportParams");return Object.assign({},i,t)};i.prototype.export=function(t){if(this.isExportSuppressed()){console.warn("AG Grid: Export cancelled. Export is not allowed as per your configuration.");return""}var i=this.getMergedParams(t);var n=this.getData(i);var r=new Blob(["\ufeff",n],{type:"text/plain"});Cy.download(this.getFileName(i.fileName),r);return n};i.prototype.exportDataAsCsv=function(t){return this.export(t)};i.prototype.getDataAsCsv=function(t,i){if(i===void 0){i=false}var n=i?Object.assign({},t):this.getMergedParams(t);return this.getData(n)};i.prototype.getDefaultFileName=function(){return"export.csv"};i.prototype.getDefaultFileExtension=function(){return"csv"};i.prototype.createSerializingSession=function(t){var i=this,n=i.columnModel,r=i.valueService,e=i.gridOptionsService,s=i.valueFormatterService,o=i.valueParserService;var u=t,a=u.processCellCallback,f=u.processHeaderCallback,h=u.processGroupHeaderCallback,c=u.processRowGroupCallback,l=u.suppressQuotes,v=u.columnSeparator;return new Ry({columnModel:n,valueService:r,gridOptionsService:e,valueFormatterService:s,valueParserService:o,processCellCallback:a||undefined,processHeaderCallback:f||undefined,processGroupHeaderCallback:h||undefined,processRowGroupCallback:c||undefined,suppressQuotes:l||false,columnSeparator:v||","})};i.prototype.isExportSuppressed=function(){return this.gridOptionsService.is("suppressCsvExport")};_y([ut("columnModel")],i.prototype,"columnModel",void 0);_y([ut("valueService")],i.prototype,"valueService",void 0);_y([ut("gridSerializer")],i.prototype,"gridSerializer",void 0);_y([ut("gridOptionsService")],i.prototype,"gridOptionsService",void 0);_y([ut("valueFormatterService")],i.prototype,"valueFormatterService",void 0);_y([ut("valueParserService")],i.prototype,"valueParserService",void 0);_y([et],i.prototype,"postConstruct",null);i=_y([ot("csvCreator")],i);return i}(my);var Fy=function(){var t=function(i,n){t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var n in i)if(Object.prototype.hasOwnProperty.call(i,n))t[n]=i[n]};return t(i,n)};return function(i,n){if(typeof n!=="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(i,n);function r(){this.constructor=i}i.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}();var ky=function(t,i,n,r){var e=arguments.length,s=e<3?i:r===null?r=Object.getOwnPropertyDescriptor(i,n):r,o;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")s=Reflect.decorate(t,i,n,r);else for(var u=t.length-1;u>=0;u--)if(o=t[u])s=(e<3?o(s):e>3?o(i,n,s):o(i,n))||s;return e>3&&s&&Object.defineProperty(i,n,s),s};var Ty;(function(t){t[t["HEADER_GROUPING"]=0]="HEADER_GROUPING";t[t["HEADER"]=1]="HEADER";t[t["BODY"]=2]="BODY"})(Ty||(Ty={}));var My=function(t){Fy(i,t);function i(){return t!==null&&t.apply(this,arguments)||this}i.prototype.serialize=function(t,i){if(i===void 0){i={}}var n=this.getColumnsToExport(i.allColumns,i.columnKeys);var r=Xe.compose(this.prepareSession(n),this.prependContent(i),this.exportColumnGroups(i,n),this.exportHeaders(i,n),this.processPinnedTopRows(i,n),this.processRows(i,n),this.processPinnedBottomRows(i,n),this.appendContent(i));return r(t).parse()};i.prototype.processRow=function(t,i,n,r){var e=i.shouldRowBeSkipped||function(){return false};var s=this.gridOptionsService.context;var o=this.gridOptionsService.api;var u=this.gridOptionsService.columnApi;var a=this.gridOptionsService.is("groupRemoveSingleChildren");var f=this.gridOptionsService.is("groupRemoveLowestSingleChildren");var h=i.rowPositions!=null;var c=h||!!i.onlySelected;var l=this.gridOptionsService.is("groupHideOpenParents")&&!c;var v=this.columnModel.isPivotMode()?r.leafGroup:!r.group;var d=!!r.footer;var p=i.skipGroups||i.skipRowGroups;var g=f&&r.leafGroup;var b=r.allChildrenCount===1&&(a||g);if(p&&i.skipGroups){Xe.doOnce((function(){return console.warn("AG Grid: Since v25.2 `skipGroups` has been renamed to `skipRowGroups`.")}),"gridSerializer-skipGroups")}if(!v&&!d&&(i.skipRowGroups||b||l)||i.onlySelected&&!r.isSelected()||i.skipPinnedTop&&r.rowPinned==="top"||i.skipPinnedBottom&&r.rowPinned==="bottom"){return}var w=r.level===-1;if(w&&!v&&!d){return}var y=e({node:r,api:o,columnApi:u,context:s});if(y){return}var m=t.onNewBodyRow(r);n.forEach((function(t,i){m.onColumn(t,i,r)}));if(i.getCustomContentBelowRow){var S=i.getCustomContentBelowRow({node:r,api:o,columnApi:u,context:s});if(S){t.addCustomContent(S)}}};i.prototype.appendContent=function(t){return function(i){var n=t.customFooter||t.appendContent;if(n){if(t.customFooter){Xe.doOnce((function(){return console.warn("AG Grid: Since version 25.2.0 the `customFooter` param has been deprecated. Use `appendContent` instead.")}),"gridSerializer-customFooter")}i.addCustomContent(n)}return i}};i.prototype.prependContent=function(t){return function(i){var n=t.customHeader||t.prependContent;if(n){if(t.customHeader){Xe.doOnce((function(){return console.warn("AG Grid: Since version 25.2.0 the `customHeader` param has been deprecated. Use `prependContent` instead.")}),"gridSerializer-customHeader")}i.addCustomContent(n)}return i}};i.prototype.prepareSession=function(t){return function(i){i.prepare(t);return i}};i.prototype.exportColumnGroups=function(t,i){var n=this;return function(r){if(!t.skipColumnGroupHeaders){var e=new ci;var s=n.displayedGroupCreator.createDisplayedGroups(i,e,null);n.recursivelyAddHeaderGroups(s,r,t.processGroupHeaderCallback)}else if(t.columnGroups){Xe.doOnce((function(){return console.warn("AG Grid: Since v25.2 the `columnGroups` param has deprecated, and groups are exported by default.")}),"gridSerializer-columnGroups")}return r}};i.prototype.exportHeaders=function(t,i){return function(n){if(!t.skipHeader&&!t.skipColumnHeaders){var r=n.onNewHeaderRow();i.forEach((function(t,i){r.onColumn(t,i,undefined)}))}else if(t.skipHeader){Xe.doOnce((function(){return console.warn("AG Grid: Since v25.2 the `skipHeader` param has been renamed to `skipColumnHeaders`.")}),"gridSerializer-skipHeader")}return n}};i.prototype.processPinnedTopRows=function(t,i){var n=this;return function(r){var e=n.processRow.bind(n,r,t,i);if(t.rowPositions){t.rowPositions.filter((function(t){return t.rowPinned==="top"})).sort((function(t,i){return t.rowIndex-i.rowIndex})).map((function(t){return n.pinnedRowModel.getPinnedTopRow(t.rowIndex)})).forEach(e)}else{n.pinnedRowModel.forEachPinnedTopRow(e)}return r}};i.prototype.processRows=function(t,i){var n=this;return function(r){var e=n.rowModel;var s=e.getType();var o=s==="clientSide";var u=s==="serverSide";var a=!o&&t.onlySelected;var f=n.processRow.bind(n,r,t,i);var h=t.exportedRows,c=h===void 0?"filteredAndSorted":h;if(t.rowPositions){t.rowPositions.filter((function(t){return t.rowPinned==null})).sort((function(t,i){return t.rowIndex-i.rowIndex})).map((function(t){return e.getRow(t.rowIndex)})).forEach(f)}else if(n.columnModel.isPivotMode()){if(o){e.forEachPivotNode(f,true)}else if(u){e.forEachNodeAfterFilterAndSort(f,true)}else{e.forEachNode(f)}}else{if(t.onlySelectedAllPages||a){var l=n.selectionService.getSelectedNodes();n.replicateSortedOrder(l);l.forEach(f)}else{if(c==="all"){e.forEachNode(f)}else if(o){e.forEachNodeAfterFilterAndSort(f,true)}else if(u){e.forEachNodeAfterFilterAndSort(f,true)}else{e.forEachNode(f)}}}return r}};i.prototype.replicateSortedOrder=function(t){var i=this;var n=this.sortController.getSortOptions();var r=function(t,e){var s,o,u,a;if(t.rowIndex!=null&&e.rowIndex!=null){return t.rowIndex-e.rowIndex}if(t.level===e.level){if(((s=t.parent)===null||s===void 0?void 0:s.id)===((o=e.parent)===null||o===void 0?void 0:o.id)){return i.rowNodeSorter.compareRowNodes(n,{rowNode:t,currentPos:(u=t.rowIndex)!==null&&u!==void 0?u:-1},{rowNode:e,currentPos:(a=e.rowIndex)!==null&&a!==void 0?a:-1})}return r(t.parent,e.parent)}if(t.level>e.level){return r(t.parent,e)}return r(t,e.parent)};t.sort(r)};i.prototype.processPinnedBottomRows=function(t,i){var n=this;return function(r){var e=n.processRow.bind(n,r,t,i);if(t.rowPositions){t.rowPositions.filter((function(t){return t.rowPinned==="bottom"})).sort((function(t,i){return t.rowIndex-i.rowIndex})).map((function(t){return n.pinnedRowModel.getPinnedBottomRow(t.rowIndex)})).forEach(e)}else{n.pinnedRowModel.forEachPinnedBottomRow(e)}return r}};i.prototype.getColumnsToExport=function(t,i){if(t===void 0){t=false}var n=this.columnModel.isPivotMode();if(i&&i.length){return this.columnModel.getGridColumns(i)}if(t&&!n){var r=this.gridOptionsService.is("treeData")?this.columnModel.getGridColumns([di]):[];return r.concat(this.columnModel.getAllGridColumns()||[])}return this.columnModel.getAllDisplayedColumns()};i.prototype.recursivelyAddHeaderGroups=function(t,i,n){var r=[];t.forEach((function(t){var i=t;if(!i.getChildren){return}i.getChildren().forEach((function(t){return r.push(t)}))}));if(t.length>0&&t[0]instanceof fi){this.doAddHeaderHeader(i,t,n)}if(r&&r.length>0){this.recursivelyAddHeaderGroups(r,i,n)}};i.prototype.doAddHeaderHeader=function(t,i,n){var r=this;var e=t.onNewHeaderGroupingRow();var s=0;i.forEach((function(t){var i=t;var o;if(n){o=n({columnGroup:i,api:r.gridOptionsService.api,columnApi:r.gridOptionsService.columnApi,context:r.gridOptionsService.context})}else{o=r.columnModel.getDisplayNameForColumnGroup(i,"header")}var u=i.getLeafColumns().reduce((function(t,i,n,r){var e=Xe.last(t);var s=i.getColumnGroupShow()==="open";if(!s){if(e&&e[1]==null){e[1]=n-1}}else if(!e||e[1]!=null){e=[n];t.push(e)}if(n===r.length-1&&e&&e[1]==null){e[1]=n}return t}),[]);e.onColumn(i,o||"",s++,i.getLeafColumns().length-1,u)}))};ky([ut("displayedGroupCreator")],i.prototype,"displayedGroupCreator",void 0);ky([ut("columnModel")],i.prototype,"columnModel",void 0);ky([ut("rowModel")],i.prototype,"rowModel",void 0);ky([ut("pinnedRowModel")],i.prototype,"pinnedRowModel",void 0);ky([ut("selectionService")],i.prototype,"selectionService",void 0);ky([ut("rowNodeSorter")],i.prototype,"rowNodeSorter",void 0);ky([ut("sortController")],i.prototype,"sortController",void 0);i=ky([ot("gridSerializer")],i);return i}(ri);var Dy="30.2.1";var Gy={version:Dy,moduleName:J.CsvExportModule,beans:[Ay,My]};var Py=[uy,yy,Gy];X.registerModules(Py);export{_w as G};
//# sourceMappingURL=p-79548ec1.js.map