/** * @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=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=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;r1){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(i0){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;en;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;i0)&&!(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<\/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> 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=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;s0}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=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=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=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={"&":"&","<":"<",">":">",'"':""","'":"'"};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=55296&&e<=56319&&r=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(++a1?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;n0)&&!(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=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=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;n0){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);e0)&&!(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=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=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;an.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=ie&&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)&&n0){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)&&l0&&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(eh){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(n0};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=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=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=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=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;ue;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;uS){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"&&au){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"&&xk){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=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=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=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>>=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='
\n \n \n
';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-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;o0){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=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-i1){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 ')||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=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='
\n
\n
\n
\n
\n
\n
\n
\n
\n
';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.clientXo.right||r>0&&t.clientXo.right||r>0&&t.clientX=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.clientYo.bottom||r>0&&t.clientYthis.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
\n
\n '+this.createBodyTemplate()+"\n
\n
";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(''+r+"\n ");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 ';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,'
')||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=""+i+"";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=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
\n
\n \n
",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=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(es){for(var o=s;o1){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;r0){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=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=o1?"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;si+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;i0)};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=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||nt){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(tthis.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=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 ')||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
\n \n
')||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&&ithis.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 t0){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;n0){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=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 \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;i0){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='\n \n \n \n \n \n ';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='';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='';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='
\n \n
';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,'
\n \n
')||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
\n '+i.getTemplate()+"\n
")||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''};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=""+''+''+"";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('');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='\n \n ';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;n0?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&&tr){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=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 ')||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.top&&t.clientYn?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='
\n \n
\n
';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('');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=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='\n \n \n \n \n \n ';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='
\n \n \n
';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='[LOADING...]';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='[NO_ROWS_TO_SHOW]';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,'
')||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''};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''};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''};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 ';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
\n \n
')||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;n0){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;ir.right-e;this.tickUp=t.clientYr.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= 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=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;u0){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='
\n
\n \n
';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=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=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=bo:rs;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=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;nthis.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=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,'
')||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=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=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=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='
\n \n \n \n \n \n \n \n
';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=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(hs){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,'
')||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('
');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('');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('');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('
');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=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=''}else{n='
'}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=tn-50}else{this.needToMoveLeft=tn-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;wo.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;e0){for(var l=0;l0){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=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='
\n \n \n
';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='
\n \n
';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('
');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=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;n0){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=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=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=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='';i.PINNED_RIGHT_TEMPLATE='';i.CENTER_TEMPLATE='';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='