{"version":3,"sources":["node_modules/ag-grid-community/dist/ag-grid-community.auto.esm.js"],"sourcesContent":["/**\n * @ag-grid-community/all-modules - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue * @version v28.2.1\n * @link https://www.ag-grid.com/\n * @license MIT\n */\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue\n * @version v28.2.1\n * @link https://www.ag-grid.com/\n * @license MIT\n */\n/**\n * If value is undefined, null or blank, returns null, otherwise returns the value\n * @param {T} value\n * @returns {T | null}\n */\nfunction makeNull(value) {\n if (value == null || value === '') {\n return null;\n }\n return value;\n}\nfunction exists(value, allowEmptyString) {\n if (allowEmptyString === void 0) {\n allowEmptyString = false;\n }\n return value != null && (value !== '' || allowEmptyString);\n}\nfunction missing(value) {\n return !exists(value);\n}\nfunction missingOrEmpty(value) {\n return value == null || value.length === 0;\n}\nfunction toStringOrNull(value) {\n return value != null && typeof value.toString === 'function' ? value.toString() : null;\n}\n// for parsing html attributes, where we want empty strings and missing attributes to be undefined\nfunction attrToNumber(value) {\n if (value === undefined) {\n // undefined or empty means ignore the value\n return;\n }\n if (value === null || value === '') {\n // null or blank means clear\n return null;\n }\n if (typeof value === 'number') {\n return isNaN(value) ? undefined : value;\n }\n var valueParsed = parseInt(value, 10);\n return isNaN(valueParsed) ? undefined : valueParsed;\n}\n// for parsing html attributes, where we want empty strings and missing attributes to be undefined\nfunction attrToBoolean(value) {\n if (value === undefined) {\n // undefined or empty means ignore the value\n return;\n }\n if (value === null || value === '') {\n // null means clear\n return false;\n }\n if (typeof value === 'boolean') {\n // if simple boolean, return the boolean\n return value;\n }\n // if equal to the string 'true' (ignoring case) then return true\n return /true/i.test(value);\n}\n// for parsing html attributes, where we want empty strings and missing attributes to be undefined\nfunction attrToString(value) {\n if (value == null || value === '') {\n return;\n }\n return value;\n}\n/** @deprecated */\nfunction referenceCompare(left, right) {\n if (left == null && right == null) {\n return true;\n }\n if (left == null && right != null) {\n return false;\n }\n if (left != null && right == null) {\n return false;\n }\n return left === right;\n}\nfunction jsonEquals(val1, val2) {\n var val1Json = val1 ? JSON.stringify(val1) : null;\n var val2Json = val2 ? JSON.stringify(val2) : null;\n return val1Json === val2Json;\n}\nfunction defaultComparator(valueA, valueB, accentedCompare) {\n if (accentedCompare === void 0) {\n accentedCompare = false;\n }\n var valueAMissing = valueA == null;\n var valueBMissing = valueB == null;\n // this is for aggregations sum and avg, where the result can be a number that is wrapped.\n // if we didn't do this, then the toString() value would be used, which would result in\n // the strings getting used instead of the numbers.\n if (valueA && valueA.toNumber) {\n valueA = valueA.toNumber();\n }\n if (valueB && valueB.toNumber) {\n valueB = valueB.toNumber();\n }\n if (valueAMissing && valueBMissing) {\n return 0;\n }\n if (valueAMissing) {\n return -1;\n }\n if (valueBMissing) {\n return 1;\n }\n function doQuickCompare(a, b) {\n return a > b ? 1 : a < b ? -1 : 0;\n }\n if (typeof valueA !== 'string') {\n return doQuickCompare(valueA, valueB);\n }\n if (!accentedCompare) {\n return doQuickCompare(valueA, valueB);\n }\n try {\n // using local compare also allows chinese comparisons\n return valueA.localeCompare(valueB);\n } catch (e) {\n // if something wrong with localeCompare, eg not supported\n // by browser, then just continue with the quick one\n return doQuickCompare(valueA, valueB);\n }\n}\nfunction values(object) {\n if (object instanceof Set || object instanceof Map) {\n var arr_1 = [];\n object.forEach(function (value) {\n return arr_1.push(value);\n });\n return arr_1;\n }\n return Object.values(object);\n}\nvar GenericUtils = /*#__PURE__*/Object.freeze({\n __proto__: null,\n makeNull: makeNull,\n exists: exists,\n missing: missing,\n missingOrEmpty: missingOrEmpty,\n toStringOrNull: toStringOrNull,\n attrToNumber: attrToNumber,\n attrToBoolean: attrToBoolean,\n attrToString: attrToString,\n referenceCompare: referenceCompare,\n jsonEquals: jsonEquals,\n defaultComparator: defaultComparator,\n values: values\n});\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue\n * @version v28.2.1\n * @link https://www.ag-grid.com/\n * @license MIT\n */\nvar ColumnKeyCreator = /** @class */function () {\n function ColumnKeyCreator() {\n this.existingKeys = {};\n }\n ColumnKeyCreator.prototype.addExistingKeys = function (keys) {\n for (var i = 0; i < keys.length; i++) {\n this.existingKeys[keys[i]] = true;\n }\n };\n ColumnKeyCreator.prototype.getUniqueKey = function (colId, colField) {\n // in case user passed in number for colId, convert to string\n colId = toStringOrNull(colId);\n var count = 0;\n while (true) {\n var idToTry = void 0;\n if (colId) {\n idToTry = colId;\n if (count !== 0) {\n idToTry += '_' + count;\n }\n } else if (colField) {\n idToTry = colField;\n if (count !== 0) {\n idToTry += '_' + count;\n }\n } else {\n idToTry = '' + count;\n }\n if (!this.existingKeys[idToTry]) {\n this.existingKeys[idToTry] = true;\n return idToTry;\n }\n count++;\n }\n };\n return ColumnKeyCreator;\n}();\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue\n * @version v28.2.1\n * @link https://www.ag-grid.com/\n * @license MIT\n */\nfunction iterateObject(object, callback) {\n if (object == null) {\n return;\n }\n if (Array.isArray(object)) {\n object.forEach(function (value, index) {\n return callback(\"\" + index, value);\n });\n } else {\n Object.keys(object).forEach(function (key) {\n return callback(key, object[key]);\n });\n }\n}\nfunction cloneObject(object) {\n var copy = {};\n var keys = Object.keys(object);\n for (var i = 0; i < keys.length; i++) {\n var key = keys[i];\n var value = object[key];\n copy[key] = value;\n }\n return copy;\n}\nfunction deepCloneObject(object) {\n return JSON.parse(JSON.stringify(object));\n}\n// returns copy of an object, doing a deep clone of any objects with that object.\n// this is used for eg creating copies of Column Definitions, where we want to\n// deep copy all objects, but do not want to deep copy functions (eg when user provides\n// a function or class for colDef.cellRenderer)\nfunction deepCloneDefinition(object, keysToSkip) {\n if (!object) {\n return;\n }\n var obj = object;\n var res = {};\n Object.keys(obj).forEach(function (key) {\n if (keysToSkip && keysToSkip.indexOf(key) >= 0) {\n return;\n }\n var value = obj[key];\n // 'simple object' means a bunch of key/value pairs, eg {filter: 'myFilter'}. it does\n // NOT include the following:\n // 1) arrays\n // 2) functions or classes (eg ColumnAPI instance)\n var sourceIsSimpleObject = isNonNullObject(value) && value.constructor === Object;\n if (sourceIsSimpleObject) {\n res[key] = deepCloneDefinition(value);\n } else {\n res[key] = value;\n }\n });\n return res;\n}\nfunction getProperty(object, key) {\n return object[key];\n}\nfunction setProperty(object, key, value) {\n object[key] = value;\n}\n/**\n * Will copy the specified properties from `source` into the equivalent properties on `target`, ignoring properties with\n * a value of `undefined`.\n */\nfunction copyPropertiesIfPresent(source, target) {\n var properties = [];\n for (var _i = 2; _i < arguments.length; _i++) {\n properties[_i - 2] = arguments[_i];\n }\n properties.forEach(function (p) {\n return copyPropertyIfPresent(source, target, p);\n });\n}\n/**\n * Will copy the specified property from `source` into the equivalent property on `target`, unless the property has a\n * value of `undefined`. If a transformation is provided, it will be applied to the value before being set on `target`.\n */\nfunction copyPropertyIfPresent(source, target, property, transform) {\n var value = getProperty(source, property);\n if (value !== undefined) {\n setProperty(target, property, transform ? transform(value) : value);\n }\n}\nfunction getAllKeysInObjects(objects) {\n var allValues = {};\n objects.filter(function (obj) {\n return obj != null;\n }).forEach(function (obj) {\n Object.keys(obj).forEach(function (key) {\n return allValues[key] = null;\n });\n });\n return Object.keys(allValues);\n}\nfunction getAllValuesInObject(obj) {\n if (!obj) {\n return [];\n }\n var anyObject = Object;\n if (typeof anyObject.values === 'function') {\n return anyObject.values(obj);\n }\n var ret = [];\n for (var key in obj) {\n if (obj.hasOwnProperty(key) && obj.propertyIsEnumerable(key)) {\n ret.push(obj[key]);\n }\n }\n return ret;\n}\nfunction mergeDeep(dest, source, copyUndefined, makeCopyOfSimpleObjects) {\n if (copyUndefined === void 0) {\n copyUndefined = true;\n }\n if (makeCopyOfSimpleObjects === void 0) {\n makeCopyOfSimpleObjects = false;\n }\n if (!exists(source)) {\n return;\n }\n iterateObject(source, function (key, sourceValue) {\n var destValue = dest[key];\n if (destValue === sourceValue) {\n return;\n }\n // when creating params, we don't want to just copy objects over. otherwise merging ColDefs (eg DefaultColDef\n // and Column Types) would result in params getting shared between objects.\n // by putting an empty value into destValue first, it means we end up copying over values from\n // the source object, rather than just copying in the source object in it's entirety.\n if (makeCopyOfSimpleObjects) {\n var objectIsDueToBeCopied = destValue == null && sourceValue != null;\n if (objectIsDueToBeCopied) {\n // 'simple object' means a bunch of key/value pairs, eg {filter: 'myFilter'}, as opposed\n // to a Class instance (such as ColumnAPI instance).\n var sourceIsSimpleObject = typeof sourceValue === 'object' && sourceValue.constructor === Object;\n var dontCopy = sourceIsSimpleObject;\n if (dontCopy) {\n destValue = {};\n dest[key] = destValue;\n }\n }\n }\n if (isNonNullObject(sourceValue) && isNonNullObject(destValue) && !Array.isArray(destValue)) {\n mergeDeep(destValue, sourceValue, copyUndefined, makeCopyOfSimpleObjects);\n } else if (copyUndefined || sourceValue !== undefined) {\n dest[key] = sourceValue;\n }\n });\n}\nfunction missingOrEmptyObject(value) {\n return missing(value) || Object.keys(value).length === 0;\n}\nfunction get(source, expression, defaultValue) {\n if (source == null) {\n return defaultValue;\n }\n var keys = expression.split('.');\n var objectToRead = source;\n while (keys.length > 1) {\n objectToRead = objectToRead[keys.shift()];\n if (objectToRead == null) {\n return defaultValue;\n }\n }\n var value = objectToRead[keys[0]];\n return value != null ? value : defaultValue;\n}\nfunction set(target, expression, value) {\n if (target == null) {\n return;\n }\n var keys = expression.split('.');\n var objectToUpdate = target;\n while (keys.length > 1) {\n objectToUpdate = objectToUpdate[keys.shift()];\n if (objectToUpdate == null) {\n return;\n }\n }\n objectToUpdate[keys[0]] = value;\n}\nfunction deepFreeze(object) {\n Object.freeze(object);\n values(object).forEach(function (v) {\n if (isNonNullObject(v) || typeof v === 'function') {\n deepFreeze(v);\n }\n });\n return object;\n}\nfunction getValueUsingField(data, field, fieldContainsDots) {\n if (!field || !data) {\n return;\n }\n // if no '.', then it's not a deep value\n if (!fieldContainsDots) {\n return data[field];\n }\n // otherwise it is a deep value, so need to dig for it\n var fields = field.split('.');\n var currentObject = data;\n for (var i = 0; i < fields.length; i++) {\n if (currentObject == null) {\n return undefined;\n }\n currentObject = currentObject[fields[i]];\n }\n return currentObject;\n}\n// used by ColumnAPI and GridAPI to remove all references, so keeping grid in memory resulting in a\n// memory leak if user is not disposing of the GridAPI or ColumnApi references\nfunction removeAllReferences(obj, objectName) {\n Object.keys(obj).forEach(function (key) {\n var value = obj[key];\n // we want to replace all the @autowired services, which are objects. any simple types (boolean, string etc)\n // we don't care about\n if (typeof value === 'object') {\n obj[key] = undefined;\n }\n });\n var proto = Object.getPrototypeOf(obj);\n var properties = {};\n Object.keys(proto).forEach(function (key) {\n var value = proto[key];\n // leave all basic types - this is needed for GridAPI to leave the \"destroyed: boolean\" attribute alone\n if (typeof value === 'function') {\n var func = function () {\n console.warn(\"AG Grid: \" + objectName + \" function \" + key + \"() cannot be called as the grid has been destroyed.\\n Please don't call grid API functions on destroyed grids - as a matter of fact you shouldn't\\n be keeping the API reference, your application has a memory leak! Remove the API reference\\n when the grid is destroyed.\");\n };\n properties[key] = {\n value: func,\n writable: true\n };\n }\n });\n Object.defineProperties(obj, properties);\n}\nfunction isNonNullObject(value) {\n return typeof value === 'object' && value !== null;\n}\nvar ObjectUtils = /*#__PURE__*/Object.freeze({\n __proto__: null,\n iterateObject: iterateObject,\n cloneObject: cloneObject,\n deepCloneObject: deepCloneObject,\n deepCloneDefinition: deepCloneDefinition,\n getProperty: getProperty,\n setProperty: setProperty,\n copyPropertiesIfPresent: copyPropertiesIfPresent,\n copyPropertyIfPresent: copyPropertyIfPresent,\n getAllKeysInObjects: getAllKeysInObjects,\n getAllValuesInObject: getAllValuesInObject,\n mergeDeep: mergeDeep,\n missingOrEmptyObject: missingOrEmptyObject,\n get: get,\n set: set,\n deepFreeze: deepFreeze,\n getValueUsingField: getValueUsingField,\n removeAllReferences: removeAllReferences,\n isNonNullObject: isNonNullObject\n});\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue\n * @version v28.2.1\n * @link https://www.ag-grid.com/\n * @license MIT\n */\nvar doOnceFlags = {};\n/**\n * If the key was passed before, then doesn't execute the func\n * @param {Function} func\n * @param {string} key\n */\nfunction doOnce(func, key) {\n if (doOnceFlags[key]) {\n return;\n }\n func();\n doOnceFlags[key] = true;\n}\nfunction getFunctionName(funcConstructor) {\n // for every other browser in the world\n if (funcConstructor.name) {\n return funcConstructor.name;\n }\n // for the pestilence that is ie11\n var matches = /function\\s+([^\\(]+)/.exec(funcConstructor.toString());\n return matches && matches.length === 2 ? matches[1].trim() : null;\n}\nfunction isFunction(val) {\n return !!(val && val.constructor && val.call && val.apply);\n}\nfunction executeInAWhile(funcs) {\n executeAfter(funcs, 400);\n}\nvar executeNextVMTurnFuncs = [];\nvar executeNextVMTurnPending = false;\nfunction executeNextVMTurn(func) {\n executeNextVMTurnFuncs.push(func);\n if (executeNextVMTurnPending) {\n return;\n }\n executeNextVMTurnPending = true;\n window.setTimeout(function () {\n var funcsCopy = executeNextVMTurnFuncs.slice();\n executeNextVMTurnFuncs.length = 0;\n executeNextVMTurnPending = false;\n funcsCopy.forEach(function (func) {\n return func();\n });\n }, 0);\n}\nfunction executeAfter(funcs, milliseconds) {\n if (milliseconds === void 0) {\n milliseconds = 0;\n }\n if (funcs.length > 0) {\n window.setTimeout(function () {\n return funcs.forEach(function (func) {\n return func();\n });\n }, milliseconds);\n }\n}\n/**\n * from https://stackoverflow.com/questions/24004791/can-someone-explain-the-debounce-function-in-javascript\n * @param {Function} func The function to be debounced\n * @param {number} wait The time in ms to debounce\n * @param {boolean} immediate If it should run immediately or wait for the initial debounce delay\n * @return {Function} The debounced function\n */\nfunction debounce(func, wait, immediate) {\n if (immediate === void 0) {\n immediate = false;\n }\n // 'private' variable for instance\n // The returned function will be able to reference this due to closure.\n // Each call to the returned function will share this common timer.\n var timeout;\n // Calling debounce returns a new anonymous function\n return function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n // reference the context and args for the setTimeout function\n var context = this;\n // Should the function be called now? If immediate is true\n // and not already in a timeout then the answer is: Yes\n var callNow = immediate && !timeout;\n // This is the basic debounce behaviour where you can call this\n // function several times, but it will only execute once\n // [before or after imposing a delay].\n // Each time the returned function is called, the timer starts over.\n window.clearTimeout(timeout);\n // Set the new timeout\n timeout = window.setTimeout(function () {\n // Inside the timeout function, clear the timeout variable\n // which will let the next execution run when in 'immediate' mode\n timeout = null;\n // Check if the function already ran with the immediate flag\n if (!immediate) {\n // Call the original function with apply\n // apply lets you define the 'this' object as well as the arguments\n // (both captured before setTimeout)\n func.apply(context, args);\n }\n }, wait);\n // Immediate mode and no wait timer? Execute the function..\n if (callNow) {\n func.apply(context, args);\n }\n };\n}\n/**\n * @param {Function} func The function to be throttled\n * @param {number} wait The time in ms to throttle\n * @return {Function} The throttled function\n */\nfunction throttle(func, wait) {\n var previousCall = 0;\n return function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n var context = this;\n var currentCall = new Date().getTime();\n if (currentCall - previousCall < wait) {\n return;\n }\n previousCall = currentCall;\n func.apply(context, args);\n };\n}\nfunction waitUntil(condition, callback, timeout, timeoutMessage) {\n if (timeout === void 0) {\n timeout = 100;\n }\n var timeStamp = new Date().getTime();\n var interval = null;\n var executed = false;\n var internalCallback = function () {\n var reachedTimeout = new Date().getTime() - timeStamp > timeout;\n if (condition() || reachedTimeout) {\n callback();\n executed = true;\n if (interval != null) {\n window.clearInterval(interval);\n interval = null;\n }\n if (reachedTimeout && timeoutMessage) {\n console.warn(timeoutMessage);\n }\n }\n };\n internalCallback();\n if (!executed) {\n interval = window.setInterval(internalCallback, 10);\n }\n}\nfunction compose() {\n var fns = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n fns[_i] = arguments[_i];\n }\n return function (arg) {\n return fns.reduce(function (composed, f) {\n return f(composed);\n }, arg);\n };\n}\nfunction callIfPresent(func) {\n if (func) {\n func();\n }\n}\nvar noop = function () {\n return;\n};\nvar FunctionUtils = /*#__PURE__*/Object.freeze({\n __proto__: null,\n doOnce: doOnce,\n getFunctionName: getFunctionName,\n isFunction: isFunction,\n executeInAWhile: executeInAWhile,\n executeNextVMTurn: executeNextVMTurn,\n executeAfter: executeAfter,\n debounce: debounce,\n throttle: throttle,\n waitUntil: waitUntil,\n compose: compose,\n callIfPresent: callIfPresent,\n noop: noop\n});\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue\n * @version v28.2.1\n * @link https://www.ag-grid.com/\n * @license MIT\n */\nvar Context = /** @class */function () {\n function Context(params, logger) {\n this.beanWrappers = {};\n this.destroyed = false;\n if (!params || !params.beanClasses) {\n return;\n }\n this.contextParams = params;\n this.logger = logger;\n this.logger.log(\">> creating ag-Application Context\");\n this.createBeans();\n var beanInstances = this.getBeanInstances();\n this.wireBeans(beanInstances);\n this.logger.log(\">> ag-Application Context ready - component is alive\");\n }\n Context.prototype.getBeanInstances = function () {\n return values(this.beanWrappers).map(function (beanEntry) {\n return beanEntry.beanInstance;\n });\n };\n Context.prototype.createBean = function (bean, afterPreCreateCallback) {\n if (!bean) {\n throw Error(\"Can't wire to bean since it is null\");\n }\n this.wireBeans([bean], afterPreCreateCallback);\n return bean;\n };\n Context.prototype.wireBeans = function (beanInstances, afterPreCreateCallback) {\n this.autoWireBeans(beanInstances);\n this.methodWireBeans(beanInstances);\n this.callLifeCycleMethods(beanInstances, 'preConstructMethods');\n // the callback sets the attributes, so the component has access to attributes\n // before postConstruct methods in the component are executed\n if (exists(afterPreCreateCallback)) {\n beanInstances.forEach(afterPreCreateCallback);\n }\n this.callLifeCycleMethods(beanInstances, 'postConstructMethods');\n };\n Context.prototype.createBeans = function () {\n var _this = this;\n // register all normal beans\n this.contextParams.beanClasses.forEach(this.createBeanWrapper.bind(this));\n // register override beans, these will overwrite beans above of same name\n // instantiate all beans - overridden beans will be left out\n iterateObject(this.beanWrappers, function (key, beanEntry) {\n var constructorParamsMeta;\n if (beanEntry.bean.__agBeanMetaData && beanEntry.bean.__agBeanMetaData.autowireMethods && beanEntry.bean.__agBeanMetaData.autowireMethods.agConstructor) {\n constructorParamsMeta = beanEntry.bean.__agBeanMetaData.autowireMethods.agConstructor;\n }\n var constructorParams = _this.getBeansForParameters(constructorParamsMeta, beanEntry.bean.name);\n var newInstance = applyToConstructor(beanEntry.bean, constructorParams);\n beanEntry.beanInstance = newInstance;\n });\n var createdBeanNames = Object.keys(this.beanWrappers).join(', ');\n this.logger.log(\"created beans: \" + createdBeanNames);\n };\n // tslint:disable-next-line\n Context.prototype.createBeanWrapper = function (BeanClass) {\n var metaData = BeanClass.__agBeanMetaData;\n if (!metaData) {\n var beanName = void 0;\n if (BeanClass.prototype.constructor) {\n beanName = getFunctionName(BeanClass.prototype.constructor);\n } else {\n beanName = \"\" + BeanClass;\n }\n console.error(\"Context item \" + beanName + \" is not a bean\");\n return;\n }\n var beanEntry = {\n bean: BeanClass,\n beanInstance: null,\n beanName: metaData.beanName\n };\n this.beanWrappers[metaData.beanName] = beanEntry;\n };\n Context.prototype.autoWireBeans = function (beanInstances) {\n var _this = this;\n beanInstances.forEach(function (beanInstance) {\n _this.forEachMetaDataInHierarchy(beanInstance, function (metaData, beanName) {\n var attributes = metaData.agClassAttributes;\n if (!attributes) {\n return;\n }\n attributes.forEach(function (attribute) {\n var otherBean = _this.lookupBeanInstance(beanName, attribute.beanName, attribute.optional);\n beanInstance[attribute.attributeName] = otherBean;\n });\n });\n });\n };\n Context.prototype.methodWireBeans = function (beanInstances) {\n var _this = this;\n beanInstances.forEach(function (beanInstance) {\n _this.forEachMetaDataInHierarchy(beanInstance, function (metaData, beanName) {\n iterateObject(metaData.autowireMethods, function (methodName, wireParams) {\n // skip constructor, as this is dealt with elsewhere\n if (methodName === \"agConstructor\") {\n return;\n }\n var initParams = _this.getBeansForParameters(wireParams, beanName);\n beanInstance[methodName].apply(beanInstance, initParams);\n });\n });\n });\n };\n Context.prototype.forEachMetaDataInHierarchy = function (beanInstance, callback) {\n var prototype = Object.getPrototypeOf(beanInstance);\n while (prototype != null) {\n var constructor = prototype.constructor;\n if (constructor.hasOwnProperty('__agBeanMetaData')) {\n var metaData = constructor.__agBeanMetaData;\n var beanName = this.getBeanName(constructor);\n callback(metaData, beanName);\n }\n prototype = Object.getPrototypeOf(prototype);\n }\n };\n Context.prototype.getBeanName = function (constructor) {\n if (constructor.__agBeanMetaData && constructor.__agBeanMetaData.beanName) {\n return constructor.__agBeanMetaData.beanName;\n }\n var constructorString = constructor.toString();\n var beanName = constructorString.substring(9, constructorString.indexOf(\"(\"));\n return beanName;\n };\n Context.prototype.getBeansForParameters = function (parameters, beanName) {\n var _this = this;\n var beansList = [];\n if (parameters) {\n iterateObject(parameters, function (paramIndex, otherBeanName) {\n var otherBean = _this.lookupBeanInstance(beanName, otherBeanName);\n beansList[Number(paramIndex)] = otherBean;\n });\n }\n return beansList;\n };\n Context.prototype.lookupBeanInstance = function (wiringBean, beanName, optional) {\n if (optional === void 0) {\n optional = false;\n }\n if (beanName === \"context\") {\n return this;\n }\n if (this.contextParams.providedBeanInstances && this.contextParams.providedBeanInstances.hasOwnProperty(beanName)) {\n return this.contextParams.providedBeanInstances[beanName];\n }\n var beanEntry = this.beanWrappers[beanName];\n if (beanEntry) {\n return beanEntry.beanInstance;\n }\n if (!optional) {\n console.error(\"AG Grid: unable to find bean reference \" + beanName + \" while initialising \" + wiringBean);\n }\n return null;\n };\n Context.prototype.callLifeCycleMethods = function (beanInstances, lifeCycleMethod) {\n var _this = this;\n beanInstances.forEach(function (beanInstance) {\n return _this.callLifeCycleMethodsOnBean(beanInstance, lifeCycleMethod);\n });\n };\n Context.prototype.callLifeCycleMethodsOnBean = function (beanInstance, lifeCycleMethod, methodToIgnore) {\n // putting all methods into a map removes duplicates\n var allMethods = {};\n // dump methods from each level of the metadata hierarchy\n this.forEachMetaDataInHierarchy(beanInstance, function (metaData) {\n var methods = metaData[lifeCycleMethod];\n if (methods) {\n methods.forEach(function (methodName) {\n if (methodName != methodToIgnore) {\n allMethods[methodName] = true;\n }\n });\n }\n });\n var allMethodsList = Object.keys(allMethods);\n allMethodsList.forEach(function (methodName) {\n return beanInstance[methodName]();\n });\n };\n Context.prototype.getBean = function (name) {\n return this.lookupBeanInstance(\"getBean\", name, true);\n };\n Context.prototype.destroy = function () {\n if (this.destroyed) {\n return;\n }\n this.logger.log(\">> Shutting down ag-Application Context\");\n var beanInstances = this.getBeanInstances();\n this.destroyBeans(beanInstances);\n this.contextParams.providedBeanInstances = null;\n this.destroyed = true;\n this.logger.log(\">> ag-Application Context shut down - component is dead\");\n };\n Context.prototype.destroyBean = function (bean) {\n if (!bean) {\n return;\n }\n this.destroyBeans([bean]);\n };\n Context.prototype.destroyBeans = function (beans) {\n var _this = this;\n if (!beans) {\n return [];\n }\n beans.forEach(function (bean) {\n _this.callLifeCycleMethodsOnBean(bean, 'preDestroyMethods', 'destroy');\n // call destroy() explicitly if it exists\n var beanAny = bean;\n if (typeof beanAny.destroy === 'function') {\n beanAny.destroy();\n }\n });\n return [];\n };\n return Context;\n}();\n// taken from: http://stackoverflow.com/questions/3362471/how-can-i-call-a-javascript-constructor-using-call-or-apply\n// allows calling 'apply' on a constructor\nfunction applyToConstructor(constructor, argArray) {\n var args = [null].concat(argArray);\n var factoryFunction = constructor.bind.apply(constructor, args);\n return new factoryFunction();\n}\nfunction PreConstruct(target, methodName, descriptor) {\n var props = getOrCreateProps$1(target.constructor);\n if (!props.preConstructMethods) {\n props.preConstructMethods = [];\n }\n props.preConstructMethods.push(methodName);\n}\nfunction PostConstruct(target, methodName, descriptor) {\n var props = getOrCreateProps$1(target.constructor);\n if (!props.postConstructMethods) {\n props.postConstructMethods = [];\n }\n props.postConstructMethods.push(methodName);\n}\nfunction PreDestroy(target, methodName, descriptor) {\n var props = getOrCreateProps$1(target.constructor);\n if (!props.preDestroyMethods) {\n props.preDestroyMethods = [];\n }\n props.preDestroyMethods.push(methodName);\n}\nfunction Bean(beanName) {\n return function (classConstructor) {\n var props = getOrCreateProps$1(classConstructor);\n props.beanName = beanName;\n };\n}\nfunction Autowired(name) {\n return function (target, propertyKey, descriptor) {\n autowiredFunc(target, name, false, target, propertyKey, null);\n };\n}\nfunction Optional(name) {\n return function (target, propertyKey, descriptor) {\n autowiredFunc(target, name, true, target, propertyKey, null);\n };\n}\nfunction autowiredFunc(target, name, optional, classPrototype, methodOrAttributeName, index) {\n if (name === null) {\n console.error(\"AG Grid: Autowired name should not be null\");\n return;\n }\n if (typeof index === \"number\") {\n console.error(\"AG Grid: Autowired should be on an attribute\");\n return;\n }\n // it's an attribute on the class\n var props = getOrCreateProps$1(target.constructor);\n if (!props.agClassAttributes) {\n props.agClassAttributes = [];\n }\n props.agClassAttributes.push({\n attributeName: methodOrAttributeName,\n beanName: name,\n optional: optional\n });\n}\nfunction Qualifier(name) {\n return function (classPrototype, methodOrAttributeName, index) {\n var constructor = typeof classPrototype == \"function\" ? classPrototype : classPrototype.constructor;\n var props;\n if (typeof index === \"number\") {\n // it's a parameter on a method\n var methodName = void 0;\n if (methodOrAttributeName) {\n props = getOrCreateProps$1(constructor);\n methodName = methodOrAttributeName;\n } else {\n props = getOrCreateProps$1(constructor);\n methodName = \"agConstructor\";\n }\n if (!props.autowireMethods) {\n props.autowireMethods = {};\n }\n if (!props.autowireMethods[methodName]) {\n props.autowireMethods[methodName] = {};\n }\n props.autowireMethods[methodName][index] = name;\n }\n };\n}\nfunction getOrCreateProps$1(target) {\n if (!target.hasOwnProperty(\"__agBeanMetaData\")) {\n target.__agBeanMetaData = {};\n }\n return target.__agBeanMetaData;\n}\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue\n * @version v28.2.1\n * @link https://www.ag-grid.com/\n * @license MIT\n */\nvar __assign$i = undefined && undefined.__assign || function () {\n __assign$i = Object.assign || function (t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\n }\n return t;\n };\n return __assign$i.apply(this, arguments);\n};\nvar __decorate$2A = undefined && undefined.__decorate || function (decorators, target, key, desc) {\n var c = arguments.length,\n r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc,\n d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nvar __param$a = undefined && undefined.__param || function (paramIndex, decorator) {\n return function (target, key) {\n decorator(target, key, paramIndex);\n };\n};\nvar EventService = /** @class */function () {\n function EventService() {\n this.allSyncListeners = new Map();\n this.allAsyncListeners = new Map();\n this.globalSyncListeners = new Set();\n this.globalAsyncListeners = new Set();\n this.asyncFunctionsQueue = [];\n this.scheduled = false;\n // using an object performs better than a Set for the number of different events we have\n this.firedEvents = {};\n }\n // because this class is used both inside the context and outside the context, we do not\n // use autowired attributes, as that would be confusing, as sometimes the attributes\n // would be wired, and sometimes not.\n //\n // the global event servers used by AG Grid is autowired by the context once, and this\n // setBeans method gets called once.\n //\n // the times when this class is used outside of the context (eg RowNode has an instance of this\n // class) then it is not a bean, and this setBeans method is not called.\n EventService.prototype.setBeans = function (loggerFactory, gridOptionsWrapper, frameworkOverrides, globalEventListener) {\n if (globalEventListener === void 0) {\n globalEventListener = null;\n }\n this.frameworkOverrides = frameworkOverrides;\n this.gridOptionsWrapper = gridOptionsWrapper;\n if (globalEventListener) {\n var async = gridOptionsWrapper.useAsyncEvents();\n this.addGlobalListener(globalEventListener, async);\n }\n };\n EventService.prototype.getListeners = function (eventType, async, autoCreateListenerCollection) {\n var listenerMap = async ? this.allAsyncListeners : this.allSyncListeners;\n var listeners = listenerMap.get(eventType);\n // Note: 'autoCreateListenerCollection' should only be 'true' if a listener is about to be added. For instance\n // getListeners() is also called during event dispatch even though no listeners are added. This measure protects\n // against 'memory bloat' as empty collections will prevent the RowNode's event service from being removed after\n // the RowComp is destroyed, see noRegisteredListenersExist() below.\n if (!listeners && autoCreateListenerCollection) {\n listeners = new Set();\n listenerMap.set(eventType, listeners);\n }\n return listeners;\n };\n EventService.prototype.noRegisteredListenersExist = function () {\n return this.allSyncListeners.size === 0 && this.allAsyncListeners.size === 0 && this.globalSyncListeners.size === 0 && this.globalAsyncListeners.size === 0;\n };\n EventService.prototype.addEventListener = function (eventType, listener, async) {\n if (async === void 0) {\n async = false;\n }\n this.getListeners(eventType, async, true).add(listener);\n };\n EventService.prototype.removeEventListener = function (eventType, listener, async) {\n if (async === void 0) {\n async = false;\n }\n var listeners = this.getListeners(eventType, async, false);\n if (!listeners) {\n return;\n }\n listeners.delete(listener);\n if (listeners.size === 0) {\n var listenerMap = async ? this.allAsyncListeners : this.allSyncListeners;\n listenerMap.delete(eventType);\n }\n };\n EventService.prototype.addGlobalListener = function (listener, async) {\n if (async === void 0) {\n async = false;\n }\n (async ? this.globalAsyncListeners : this.globalSyncListeners).add(listener);\n };\n EventService.prototype.removeGlobalListener = function (listener, async) {\n if (async === void 0) {\n async = false;\n }\n (async ? this.globalAsyncListeners : this.globalSyncListeners).delete(listener);\n };\n EventService.prototype.dispatchEvent = function (event) {\n var agEvent = event;\n if (this.gridOptionsWrapper) {\n // Apply common properties to all dispatched events if this event service has had its beans set with gridOptionsWrapper.\n // Note there are multiple instances of EventService that are used local to components which do not set gridOptionsWrapper. \n agEvent = __assign$i(__assign$i({}, event), {\n api: this.gridOptionsWrapper.getApi(),\n columnApi: this.gridOptionsWrapper.getColumnApi(),\n context: this.gridOptionsWrapper.getContext()\n });\n }\n this.dispatchToListeners(agEvent, true);\n this.dispatchToListeners(agEvent, false);\n this.firedEvents[agEvent.type] = true;\n };\n EventService.prototype.dispatchEventOnce = function (event) {\n if (!this.firedEvents[event.type]) {\n this.dispatchEvent(event);\n }\n };\n EventService.prototype.dispatchToListeners = function (event, async) {\n var _this = this;\n var eventType = event.type;\n var processEventListeners = function (listeners) {\n return listeners.forEach(function (listener) {\n if (async) {\n _this.dispatchAsync(function () {\n return listener(event);\n });\n } else {\n listener(event);\n }\n });\n };\n var listeners = this.getListeners(eventType, async, false);\n if (listeners) {\n processEventListeners(listeners);\n }\n var globalListeners = async ? this.globalAsyncListeners : this.globalSyncListeners;\n globalListeners.forEach(function (listener) {\n if (async) {\n _this.dispatchAsync(function () {\n return _this.frameworkOverrides.dispatchEvent(eventType, function () {\n return listener(eventType, event);\n }, true);\n });\n } else {\n _this.frameworkOverrides.dispatchEvent(eventType, function () {\n return listener(eventType, event);\n }, true);\n }\n });\n };\n // this gets called inside the grid's thread, for each event that it\n // wants to set async. the grid then batches the events into one setTimeout()\n // because setTimeout() is an expensive operation. ideally we would have\n // each event in it's own setTimeout(), but we batch for performance.\n EventService.prototype.dispatchAsync = function (func) {\n // add to the queue for executing later in the next VM turn\n this.asyncFunctionsQueue.push(func);\n // check if timeout is already scheduled. the first time the grid calls\n // this within it's thread turn, this should be false, so it will schedule\n // the 'flush queue' method the first time it comes here. then the flag is\n // set to 'true' so it will know it's already scheduled for subsequent calls.\n if (!this.scheduled) {\n // if not scheduled, schedule one\n window.setTimeout(this.flushAsyncQueue.bind(this), 0);\n // mark that it is scheduled\n this.scheduled = true;\n }\n };\n // this happens in the next VM turn only, and empties the queue of events\n EventService.prototype.flushAsyncQueue = function () {\n this.scheduled = false;\n // we take a copy, because the event listener could be using\n // the grid, which would cause more events, which would be potentially\n // added to the queue, so safe to take a copy, the new events will\n // get executed in a later VM turn rather than risk updating the\n // queue as we are flushing it.\n var queueCopy = this.asyncFunctionsQueue.slice();\n this.asyncFunctionsQueue = [];\n // execute the queue\n queueCopy.forEach(function (func) {\n return func();\n });\n };\n __decorate$2A([__param$a(0, Qualifier('loggerFactory')), __param$a(1, Qualifier('gridOptionsWrapper')), __param$a(2, Qualifier('frameworkOverrides')), __param$a(3, Qualifier('globalEventListener'))], EventService.prototype, \"setBeans\", null);\n EventService = __decorate$2A([Bean('eventService')], EventService);\n return EventService;\n}();\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue\n * @version v28.2.1\n * @link https://www.ag-grid.com/\n * @license MIT\n */\nvar Constants = /** @class */function () {\n function Constants() {}\n Constants.ROW_BUFFER_SIZE = 10;\n Constants.LAYOUT_INTERVAL = 500;\n Constants.BATCH_WAIT_MILLIS = 50;\n Constants.EXPORT_TYPE_DRAG_COPY = 'dragCopy';\n Constants.EXPORT_TYPE_CLIPBOARD = 'clipboard';\n Constants.EXPORT_TYPE_EXCEL = 'excel';\n Constants.EXPORT_TYPE_CSV = 'csv';\n Constants.ROW_MODEL_TYPE_INFINITE = 'infinite';\n Constants.ROW_MODEL_TYPE_VIEWPORT = 'viewport';\n Constants.ROW_MODEL_TYPE_CLIENT_SIDE = 'clientSide';\n Constants.ROW_MODEL_TYPE_SERVER_SIDE = 'serverSide';\n Constants.ALWAYS = 'always';\n Constants.ONLY_WHEN_GROUPING = 'onlyWhenGrouping';\n Constants.PINNED_TOP = 'top';\n Constants.PINNED_BOTTOM = 'bottom';\n Constants.DOM_LAYOUT_NORMAL = 'normal';\n Constants.DOM_LAYOUT_PRINT = 'print';\n Constants.DOM_LAYOUT_AUTO_HEIGHT = 'autoHeight';\n Constants.GROUP_AUTO_COLUMN_ID = 'ag-Grid-AutoColumn';\n Constants.SOURCE_PASTE = 'paste';\n Constants.PINNED_RIGHT = 'right';\n Constants.PINNED_LEFT = 'left';\n Constants.SORT_ASC = 'asc';\n Constants.SORT_DESC = 'desc';\n Constants.INPUT_SELECTOR = 'input, select, button, textarea';\n Constants.FOCUSABLE_SELECTOR = '[tabindex], input, select, button, textarea';\n Constants.FOCUSABLE_EXCLUDE = '.ag-hidden, .ag-hidden *, [disabled], .ag-disabled, .ag-disabled *';\n return Constants;\n}();\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue\n * @version v28.2.1\n * @link https://www.ag-grid.com/\n * @license MIT\n */\nvar ModuleNames = /*#__PURE__*/function (ModuleNames) {\n // when using modules, user references this\n ModuleNames[\"CommunityCoreModule\"] = \"@ag-grid-community/core\";\n // when not using modules, user references this\n ModuleNames[\"CommunityAllModules\"] = \"@ag-grid-community/all\";\n // community modules\n ModuleNames[\"InfiniteRowModelModule\"] = \"@ag-grid-community/infinite-row-model\";\n ModuleNames[\"ClientSideRowModelModule\"] = \"@ag-grid-community/client-side-row-model\";\n ModuleNames[\"CsvExportModule\"] = \"@ag-grid-community/csv-export\";\n // enterprise core - users never import on this, but other enterprise modules do\n ModuleNames[\"EnterpriseCoreModule\"] = \"@ag-grid-enterprise/core\";\n // when not using modules, user references this\n ModuleNames[\"EnterpriseAllModules\"] = \"@ag-grid-enterprise/all\";\n // enterprise modules\n ModuleNames[\"RowGroupingModule\"] = \"@ag-grid-enterprise/row-grouping\";\n ModuleNames[\"ColumnToolPanelModule\"] = \"@ag-grid-enterprise/column-tool-panel\";\n ModuleNames[\"FiltersToolPanelModule\"] = \"@ag-grid-enterprise/filter-tool-panel\";\n ModuleNames[\"MenuModule\"] = \"@ag-grid-enterprise/menu\";\n ModuleNames[\"SetFilterModule\"] = \"@ag-grid-enterprise/set-filter\";\n ModuleNames[\"MultiFilterModule\"] = \"@ag-grid-enterprise/multi-filter\";\n ModuleNames[\"StatusBarModule\"] = \"@ag-grid-enterprise/status-bar\";\n ModuleNames[\"SideBarModule\"] = \"@ag-grid-enterprise/side-bar\";\n ModuleNames[\"RangeSelectionModule\"] = \"@ag-grid-enterprise/range-selection\";\n ModuleNames[\"MasterDetailModule\"] = \"@ag-grid-enterprise/master-detail\";\n ModuleNames[\"RichSelectModule\"] = \"@ag-grid-enterprise/rich-select\";\n ModuleNames[\"GridChartsModule\"] = \"@ag-grid-enterprise/charts\";\n ModuleNames[\"ViewportRowModelModule\"] = \"@ag-grid-enterprise/viewport-row-model\";\n ModuleNames[\"ServerSideRowModelModule\"] = \"@ag-grid-enterprise/server-side-row-model\";\n ModuleNames[\"ExcelExportModule\"] = \"@ag-grid-enterprise/excel-export\";\n ModuleNames[\"ClipboardModule\"] = \"@ag-grid-enterprise/clipboard\";\n ModuleNames[\"SparklinesModule\"] = \"@ag-grid-enterprise/sparklines\";\n // framework wrappers currently don't provide beans, comps etc, so no need to be modules,\n // however i argue they should be as in theory they 'could' provide beans etc\n ModuleNames[\"AngularModule\"] = \"@ag-grid-community/angular\";\n ModuleNames[\"ReactModule\"] = \"@ag-grid-community/react\";\n ModuleNames[\"VueModule\"] = \"@ag-grid-community/vue\";\n ModuleNames[\"PolymerModule\"] = \"@ag-grid-community/polymer\";\n // and then this, which is definitely not a grid module, as it should not have any dependency\n // on the grid (ie shouldn't even reference the Module interface)\n // ChartsModule = \"@ag-grid-community/charts-core\",\n return ModuleNames;\n}(ModuleNames || {});\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue\n * @version v28.2.1\n * @link https://www.ag-grid.com/\n * @license MIT\n */\nvar ModuleRegistry = /** @class */function () {\n function ModuleRegistry() {}\n ModuleRegistry.register = function (module, moduleBased) {\n if (moduleBased === void 0) {\n moduleBased = true;\n }\n ModuleRegistry.modulesMap[module.moduleName] = module;\n if (ModuleRegistry.moduleBased === undefined) {\n ModuleRegistry.moduleBased = moduleBased;\n } else {\n if (ModuleRegistry.moduleBased !== moduleBased) {\n doOnce(function () {\n console.warn(\"AG Grid: You are mixing modules (i.e. @ag-grid-community/core) and packages (ag-grid-community) - you can only use one or the other of these mechanisms.\");\n console.warn('Please see https://www.ag-grid.com/javascript-grid/packages-modules/ for more information.');\n }, 'ModulePackageCheck');\n }\n }\n };\n // noinspection JSUnusedGlobalSymbols\n ModuleRegistry.registerModules = function (modules, moduleBased) {\n if (moduleBased === void 0) {\n moduleBased = true;\n }\n if (!modules) {\n return;\n }\n modules.forEach(function (module) {\n return ModuleRegistry.register(module, moduleBased);\n });\n };\n ModuleRegistry.assertRegistered = function (moduleName, reason) {\n if (this.isRegistered(moduleName)) {\n return true;\n }\n var warningKey = reason + moduleName;\n var warningMessage;\n if (ModuleRegistry.moduleBased) {\n warningMessage = \"AG Grid: unable to use \" + reason + \" as module \" + moduleName + \" is not present. Please see: https://www.ag-grid.com/javascript-grid/modules/\";\n } else {\n warningMessage = \"AG Grid: unable to use \" + reason + \" as package 'ag-grid-enterprise' is not present. Please see: https://www.ag-grid.com/javascript-grid/packages/\";\n }\n doOnce(function () {\n console.warn(warningMessage);\n }, warningKey);\n return false;\n };\n ModuleRegistry.isRegistered = function (moduleName) {\n return !!ModuleRegistry.modulesMap[moduleName];\n };\n ModuleRegistry.getRegisteredModules = function () {\n return values(ModuleRegistry.modulesMap);\n };\n ModuleRegistry.isPackageBased = function () {\n return !ModuleRegistry.moduleBased;\n };\n // having in a map a) removes duplicates and b) allows fast lookup\n ModuleRegistry.modulesMap = {};\n return ModuleRegistry;\n}();\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue\n * @version v28.2.1\n * @link https://www.ag-grid.com/\n * @license MIT\n */\nvar __decorate$2z = undefined && undefined.__decorate || function (decorators, target, key, desc) {\n var c = arguments.length,\n r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc,\n d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nvar instanceIdSequence$4 = 0;\n// Wrapper around a user provide column definition. The grid treats the column definition as ready only.\n// This class contains all the runtime information about a column, plus some logic (the definition has no logic).\n// This class implements both interfaces ColumnGroupChild and ProvidedColumnGroupChild as the class can\n// appear as a child of either the original tree or the displayed tree. However the relevant group classes\n// for each type only implements one, as each group can only appear in it's associated tree (eg ProvidedColumnGroup\n// can only appear in OriginalColumn tree).\nvar Column = /** @class */function () {\n function Column(colDef, userProvidedColDef, colId, primary) {\n // used by React (and possibly other frameworks) as key for rendering\n this.instanceId = instanceIdSequence$4++;\n // The measured height of this column's header when autoHeaderHeight is enabled\n this.autoHeaderHeight = null;\n this.moving = false;\n this.menuVisible = false;\n this.filterActive = false;\n this.eventService = new EventService();\n this.rowGroupActive = false;\n this.pivotActive = false;\n this.aggregationActive = false;\n this.colDef = colDef;\n this.userProvidedColDef = userProvidedColDef;\n this.colId = colId;\n this.primary = primary;\n this.setState(colDef);\n }\n Column.prototype.getInstanceId = function () {\n return this.instanceId;\n };\n Column.prototype.setState = function (colDef) {\n // sort\n if (colDef.sort !== undefined) {\n if (colDef.sort === Constants.SORT_ASC || colDef.sort === Constants.SORT_DESC) {\n this.sort = colDef.sort;\n }\n } else {\n if (colDef.initialSort === Constants.SORT_ASC || colDef.initialSort === Constants.SORT_DESC) {\n this.sort = colDef.initialSort;\n }\n }\n // sortIndex\n var sortIndex = attrToNumber(colDef.sortIndex);\n var initialSortIndex = attrToNumber(colDef.initialSortIndex);\n if (sortIndex !== undefined) {\n if (sortIndex !== null) {\n this.sortIndex = sortIndex;\n }\n } else {\n if (initialSortIndex !== null) {\n this.sortIndex = initialSortIndex;\n }\n }\n // hide\n var hide = attrToBoolean(colDef.hide);\n var initialHide = attrToBoolean(colDef.initialHide);\n if (hide !== undefined) {\n this.visible = !hide;\n } else {\n this.visible = !initialHide;\n }\n // pinned\n if (colDef.pinned !== undefined) {\n this.setPinned(colDef.pinned);\n } else {\n this.setPinned(colDef.initialPinned);\n }\n // flex\n var flex = attrToNumber(colDef.flex);\n var initialFlex = attrToNumber(colDef.initialFlex);\n if (flex !== undefined) {\n this.flex = flex;\n } else if (initialFlex !== undefined) {\n this.flex = initialFlex;\n }\n };\n // gets called when user provides an alternative colDef, eg\n Column.prototype.setColDef = function (colDef, userProvidedColDef) {\n this.colDef = colDef;\n this.userProvidedColDef = userProvidedColDef;\n this.initMinAndMaxWidths();\n this.initDotNotation();\n this.eventService.dispatchEvent(this.createColumnEvent(Column.EVENT_COL_DEF_CHANGED, \"api\"));\n };\n /**\n * Returns the column definition provided by the application.\n * This may not be correct, as items can be superseded by default column options.\n * However it's useful for comparison, eg to know which application column definition matches that column.\n */\n Column.prototype.getUserProvidedColDef = function () {\n return this.userProvidedColDef;\n };\n Column.prototype.setParent = function (parent) {\n this.parent = parent;\n };\n /** Returns the parent column group, if column grouping is active. */\n Column.prototype.getParent = function () {\n return this.parent;\n };\n Column.prototype.setOriginalParent = function (originalParent) {\n this.originalParent = originalParent;\n };\n Column.prototype.getOriginalParent = function () {\n return this.originalParent;\n };\n // this is done after constructor as it uses gridOptionsWrapper\n Column.prototype.initialise = function () {\n this.initMinAndMaxWidths();\n this.resetActualWidth('gridInitializing');\n this.initDotNotation();\n this.validate();\n };\n Column.prototype.initDotNotation = function () {\n var suppressDotNotation = this.gridOptionsWrapper.isSuppressFieldDotNotation();\n this.fieldContainsDots = exists(this.colDef.field) && this.colDef.field.indexOf('.') >= 0 && !suppressDotNotation;\n this.tooltipFieldContainsDots = exists(this.colDef.tooltipField) && this.colDef.tooltipField.indexOf('.') >= 0 && !suppressDotNotation;\n };\n Column.prototype.initMinAndMaxWidths = function () {\n var colDef = this.colDef;\n this.minWidth = this.columnUtils.calculateColMinWidth(colDef);\n this.maxWidth = this.columnUtils.calculateColMaxWidth(colDef);\n };\n Column.prototype.resetActualWidth = function (source) {\n if (source === void 0) {\n source = 'api';\n }\n var initialWidth = this.columnUtils.calculateColInitialWidth(this.colDef);\n this.setActualWidth(initialWidth, source, true);\n };\n Column.prototype.isEmptyGroup = function () {\n return false;\n };\n Column.prototype.isRowGroupDisplayed = function (colId) {\n if (missing(this.colDef) || missing(this.colDef.showRowGroup)) {\n return false;\n }\n var showingAllGroups = this.colDef.showRowGroup === true;\n var showingThisGroup = this.colDef.showRowGroup === colId;\n return showingAllGroups || showingThisGroup;\n };\n /** Returns `true` if column is a primary column, `false` if secondary. Secondary columns are used for pivoting. */\n Column.prototype.isPrimary = function () {\n return this.primary;\n };\n /** Returns `true` if column filtering is allowed. */\n Column.prototype.isFilterAllowed = function () {\n // filter defined means it's a string, class or true.\n // if its false, null or undefined then it's false.\n var filterDefined = !!this.colDef.filter || !!this.colDef.filterFramework;\n return filterDefined;\n };\n Column.prototype.isFieldContainsDots = function () {\n return this.fieldContainsDots;\n };\n Column.prototype.isTooltipFieldContainsDots = function () {\n return this.tooltipFieldContainsDots;\n };\n Column.prototype.validate = function () {\n var colDefAny = this.colDef;\n function warnOnce(msg, key, obj) {\n doOnce(function () {\n if (obj) {\n console.warn(msg, obj);\n } else {\n doOnce(function () {\n return console.warn(msg);\n }, key);\n }\n }, key);\n }\n var usingCSRM = this.gridOptionsWrapper.isRowModelDefault();\n if (usingCSRM && !ModuleRegistry.isRegistered(ModuleNames.RowGroupingModule)) {\n var rowGroupingItems = ['enableRowGroup', 'rowGroup', 'rowGroupIndex', 'enablePivot', 'enableValue', 'pivot', 'pivotIndex', 'aggFunc'];\n rowGroupingItems.forEach(function (item) {\n if (exists(colDefAny[item])) {\n if (ModuleRegistry.isPackageBased()) {\n warnOnce(\"AG Grid: \" + item + \" is only valid in ag-grid-enterprise, your column definition should not have \" + item, 'ColumnRowGroupingMissing' + item);\n } else {\n warnOnce(\"AG Grid: \" + item + \" is only valid with AG Grid Enterprise Module \" + ModuleNames.RowGroupingModule + \" - your column definition should not have \" + item, 'ColumnRowGroupingMissing' + item);\n }\n }\n });\n }\n if (!ModuleRegistry.isRegistered(ModuleNames.RichSelectModule)) {\n if (this.colDef.cellEditor === 'agRichSelect' || this.colDef.cellEditor === 'agRichSelectCellEditor') {\n if (ModuleRegistry.isPackageBased()) {\n warnOnce(\"AG Grid: \" + this.colDef.cellEditor + \" can only be used with ag-grid-enterprise\", 'ColumnRichSelectMissing');\n } else {\n warnOnce(\"AG Grid: \" + this.colDef.cellEditor + \" can only be used with AG Grid Enterprise Module \" + ModuleNames.RichSelectModule, 'ColumnRichSelectMissing');\n }\n }\n }\n if (this.gridOptionsWrapper.isTreeData()) {\n var itemsNotAllowedWithTreeData = ['rowGroup', 'rowGroupIndex', 'pivot', 'pivotIndex'];\n itemsNotAllowedWithTreeData.forEach(function (item) {\n if (exists(colDefAny[item])) {\n warnOnce(\"AG Grid: \" + item + \" is not possible when doing tree data, your column definition should not have \" + item, 'TreeDataCannotRowGroup');\n }\n });\n }\n if (exists(this.colDef.width) && typeof this.colDef.width !== 'number') {\n warnOnce('AG Grid: colDef.width should be a number, not ' + typeof this.colDef.width, 'ColumnCheck_asdfawef');\n }\n if (colDefAny.pinnedRowCellRenderer) {\n warnOnce('AG Grid: pinnedRowCellRenderer no longer exists, use cellRendererSelector if you want a different Cell Renderer for pinned rows. Check params.node.rowPinned. This was an unfortunate (but necessary) change we had to do to allow future plans we have of re-skinng the data grid in frameworks such as React, Angular and Vue. See https://www.ag-grid.com/javascript-grid/cell-rendering/#many-renderers-one-column', 'colDef.pinnedRowCellRenderer-deprecated');\n }\n if (colDefAny.pinnedRowCellRendererParams) {\n warnOnce('AG Grid: pinnedRowCellRenderer no longer exists, use cellRendererSelector if you want a different Cell Renderer for pinned rows. Check params.node.rowPinned. This was an unfortunate (but necessary) change we had to do to allow future plans we have of re-skinng the data grid in frameworks such as React, Angular and Vue. See https://www.ag-grid.com/javascript-grid/cell-rendering/#many-renderers-one-column', 'colDef.pinnedRowCellRenderer-deprecated');\n }\n if (colDefAny.pinnedRowCellRendererFramework) {\n warnOnce('AG Grid: pinnedRowCellRenderer no longer exists, use cellRendererSelector if you want a different Cell Renderer for pinned rows. Check params.node.rowPinned. This was an unfortunate (but necessary) change we had to do to allow future plans we have of re-skinng the data grid in frameworks such as React, Angular and Vue. See https://www.ag-grid.com/javascript-grid/cell-rendering/#many-renderers-one-column', 'colDef.pinnedRowCellRenderer-deprecated');\n }\n if (colDefAny.pinnedRowValueGetter) {\n warnOnce('AG Grid: pinnedRowCellRenderer is deprecated, use cellRendererSelector if you want a different Cell Renderer for pinned rows. Check params.node.rowPinned. This was an unfortunate (but necessary) change we had to do to allow future plans we have of re-skinng the data grid in frameworks such as React, Angular and Vue.', 'colDef.pinnedRowCellRenderer-deprecated');\n }\n };\n /** Add an event listener to the column. */\n Column.prototype.addEventListener = function (eventType, listener) {\n this.eventService.addEventListener(eventType, listener);\n };\n /** Remove event listener from the column. */\n Column.prototype.removeEventListener = function (eventType, listener) {\n this.eventService.removeEventListener(eventType, listener);\n };\n Column.prototype.createColumnFunctionCallbackParams = function (rowNode) {\n return {\n node: rowNode,\n data: rowNode.data,\n column: this,\n colDef: this.colDef,\n context: this.gridOptionsWrapper.getContext(),\n api: this.gridOptionsWrapper.getApi(),\n columnApi: this.gridOptionsWrapper.getColumnApi()\n };\n };\n Column.prototype.isSuppressNavigable = function (rowNode) {\n // if boolean set, then just use it\n if (typeof this.colDef.suppressNavigable === 'boolean') {\n return this.colDef.suppressNavigable;\n }\n // if function, then call the function to find out\n if (typeof this.colDef.suppressNavigable === 'function') {\n var params = this.createColumnFunctionCallbackParams(rowNode);\n var userFunc = this.colDef.suppressNavigable;\n return userFunc(params);\n }\n return false;\n };\n Column.prototype.isCellEditable = function (rowNode) {\n // only allow editing of groups if the user has this option enabled\n if (rowNode.group && !this.gridOptionsWrapper.isEnableGroupEdit()) {\n return false;\n }\n return this.isColumnFunc(rowNode, this.colDef.editable);\n };\n Column.prototype.isSuppressFillHandle = function () {\n return !!attrToBoolean(this.colDef.suppressFillHandle);\n };\n Column.prototype.isAutoHeight = function () {\n return !!attrToBoolean(this.colDef.autoHeight);\n };\n Column.prototype.isAutoHeaderHeight = function () {\n return !!attrToBoolean(this.colDef.autoHeaderHeight);\n };\n Column.prototype.isRowDrag = function (rowNode) {\n return this.isColumnFunc(rowNode, this.colDef.rowDrag);\n };\n Column.prototype.isDndSource = function (rowNode) {\n return this.isColumnFunc(rowNode, this.colDef.dndSource);\n };\n Column.prototype.isCellCheckboxSelection = function (rowNode) {\n return this.isColumnFunc(rowNode, this.colDef.checkboxSelection);\n };\n Column.prototype.isSuppressPaste = function (rowNode) {\n return this.isColumnFunc(rowNode, this.colDef ? this.colDef.suppressPaste : null);\n };\n Column.prototype.isResizable = function () {\n return !!attrToBoolean(this.colDef.resizable);\n };\n Column.prototype.isColumnFunc = function (rowNode, value) {\n // if boolean set, then just use it\n if (typeof value === 'boolean') {\n return value;\n }\n // if function, then call the function to find out\n if (typeof value === 'function') {\n var params = this.createColumnFunctionCallbackParams(rowNode);\n var editableFunc = value;\n return editableFunc(params);\n }\n return false;\n };\n Column.prototype.setMoving = function (moving, source) {\n if (source === void 0) {\n source = \"api\";\n }\n this.moving = moving;\n this.eventService.dispatchEvent(this.createColumnEvent(Column.EVENT_MOVING_CHANGED, source));\n };\n Column.prototype.createColumnEvent = function (type, source) {\n return {\n type: type,\n column: this,\n columns: [this],\n source: source,\n api: this.gridOptionsWrapper.getApi(),\n columnApi: this.gridOptionsWrapper.getColumnApi(),\n context: this.gridOptionsWrapper.getContext()\n };\n };\n Column.prototype.isMoving = function () {\n return this.moving;\n };\n /** If sorting is active, returns the sort direction e.g. `'asc'` or `'desc'`. */\n Column.prototype.getSort = function () {\n return this.sort;\n };\n Column.prototype.setSort = function (sort, source) {\n if (source === void 0) {\n source = \"api\";\n }\n if (this.sort !== sort) {\n this.sort = sort;\n this.eventService.dispatchEvent(this.createColumnEvent(Column.EVENT_SORT_CHANGED, source));\n }\n };\n Column.prototype.setMenuVisible = function (visible, source) {\n if (source === void 0) {\n source = \"api\";\n }\n if (this.menuVisible !== visible) {\n this.menuVisible = visible;\n this.eventService.dispatchEvent(this.createColumnEvent(Column.EVENT_MENU_VISIBLE_CHANGED, source));\n }\n };\n Column.prototype.isMenuVisible = function () {\n return this.menuVisible;\n };\n Column.prototype.isSortAscending = function () {\n return this.sort === Constants.SORT_ASC;\n };\n Column.prototype.isSortDescending = function () {\n return this.sort === Constants.SORT_DESC;\n };\n Column.prototype.isSortNone = function () {\n return missing(this.sort);\n };\n Column.prototype.isSorting = function () {\n return exists(this.sort);\n };\n Column.prototype.getSortIndex = function () {\n return this.sortIndex;\n };\n Column.prototype.setSortIndex = function (sortOrder) {\n this.sortIndex = sortOrder;\n };\n Column.prototype.setAggFunc = function (aggFunc) {\n this.aggFunc = aggFunc;\n };\n /** If aggregation is set for the column, returns the aggregation function. */\n Column.prototype.getAggFunc = function () {\n return this.aggFunc;\n };\n Column.prototype.getLeft = function () {\n return this.left;\n };\n Column.prototype.getOldLeft = function () {\n return this.oldLeft;\n };\n Column.prototype.getRight = function () {\n return this.left + this.actualWidth;\n };\n Column.prototype.setLeft = function (left, source) {\n if (source === void 0) {\n source = \"api\";\n }\n this.oldLeft = this.left;\n if (this.left !== left) {\n this.left = left;\n this.eventService.dispatchEvent(this.createColumnEvent(Column.EVENT_LEFT_CHANGED, source));\n }\n };\n /** Returns `true` if filter is active on the column. */\n Column.prototype.isFilterActive = function () {\n return this.filterActive;\n };\n // additionalEventAttributes is used by provided simple floating filter, so it can add 'floatingFilter=true' to the event\n Column.prototype.setFilterActive = function (active, source, additionalEventAttributes) {\n if (source === void 0) {\n source = \"api\";\n }\n if (this.filterActive !== active) {\n this.filterActive = active;\n this.eventService.dispatchEvent(this.createColumnEvent(Column.EVENT_FILTER_ACTIVE_CHANGED, source));\n }\n var filterChangedEvent = this.createColumnEvent(Column.EVENT_FILTER_CHANGED, source);\n if (additionalEventAttributes) {\n mergeDeep(filterChangedEvent, additionalEventAttributes);\n }\n this.eventService.dispatchEvent(filterChangedEvent);\n };\n Column.prototype.setPinned = function (pinned) {\n if (pinned === true || pinned === Constants.PINNED_LEFT) {\n this.pinned = Constants.PINNED_LEFT;\n } else if (pinned === Constants.PINNED_RIGHT) {\n this.pinned = Constants.PINNED_RIGHT;\n } else {\n this.pinned = null;\n }\n };\n Column.prototype.setFirstRightPinned = function (firstRightPinned, source) {\n if (source === void 0) {\n source = \"api\";\n }\n if (this.firstRightPinned !== firstRightPinned) {\n this.firstRightPinned = firstRightPinned;\n this.eventService.dispatchEvent(this.createColumnEvent(Column.EVENT_FIRST_RIGHT_PINNED_CHANGED, source));\n }\n };\n Column.prototype.setLastLeftPinned = function (lastLeftPinned, source) {\n if (source === void 0) {\n source = \"api\";\n }\n if (this.lastLeftPinned !== lastLeftPinned) {\n this.lastLeftPinned = lastLeftPinned;\n this.eventService.dispatchEvent(this.createColumnEvent(Column.EVENT_LAST_LEFT_PINNED_CHANGED, source));\n }\n };\n Column.prototype.isFirstRightPinned = function () {\n return this.firstRightPinned;\n };\n Column.prototype.isLastLeftPinned = function () {\n return this.lastLeftPinned;\n };\n Column.prototype.isPinned = function () {\n return this.pinned === Constants.PINNED_LEFT || this.pinned === Constants.PINNED_RIGHT;\n };\n Column.prototype.isPinnedLeft = function () {\n return this.pinned === Constants.PINNED_LEFT;\n };\n Column.prototype.isPinnedRight = function () {\n return this.pinned === Constants.PINNED_RIGHT;\n };\n Column.prototype.getPinned = function () {\n return this.pinned;\n };\n Column.prototype.setVisible = function (visible, source) {\n if (source === void 0) {\n source = \"api\";\n }\n var newValue = visible === true;\n if (this.visible !== newValue) {\n this.visible = newValue;\n this.eventService.dispatchEvent(this.createColumnEvent(Column.EVENT_VISIBLE_CHANGED, source));\n }\n };\n Column.prototype.isVisible = function () {\n return this.visible;\n };\n /** Returns the column definition for this column.\n * The column definition will be the result of merging the application provided column definition with any provided defaults\n * (e.g. `defaultColDef` grid option, or column types.\n *\n * Equivalent: `getDefinition` */\n Column.prototype.getColDef = function () {\n return this.colDef;\n };\n Column.prototype.getColumnGroupShow = function () {\n return this.colDef.columnGroupShow;\n };\n /**\n * Returns the unique ID for the column.\n *\n * Equivalent: `getId`, `getUniqueId` */\n Column.prototype.getColId = function () {\n return this.colId;\n };\n /**\n * Returns the unique ID for the column.\n *\n * Equivalent: `getColId`, `getUniqueId` */\n Column.prototype.getId = function () {\n return this.getColId();\n };\n /**\n * Returns the unique ID for the column.\n *\n * Equivalent: `getColId`, `getId` */\n Column.prototype.getUniqueId = function () {\n return this.getId();\n };\n Column.prototype.getDefinition = function () {\n return this.colDef;\n };\n /** Returns the current width of the column. If the column is resized, the actual width is the new size. */\n Column.prototype.getActualWidth = function () {\n return this.actualWidth;\n };\n Column.prototype.getAutoHeaderHeight = function () {\n return this.autoHeaderHeight;\n };\n /** Returns true if the header height has changed */\n Column.prototype.setAutoHeaderHeight = function (height) {\n var changed = height !== this.autoHeaderHeight;\n this.autoHeaderHeight = height;\n return changed;\n };\n Column.prototype.createBaseColDefParams = function (rowNode) {\n var params = {\n node: rowNode,\n data: rowNode.data,\n colDef: this.colDef,\n column: this,\n api: this.gridOptionsWrapper.getApi(),\n columnApi: this.gridOptionsWrapper.getColumnApi(),\n context: this.gridOptionsWrapper.getContext()\n };\n return params;\n };\n Column.prototype.getColSpan = function (rowNode) {\n if (missing(this.colDef.colSpan)) {\n return 1;\n }\n var params = this.createBaseColDefParams(rowNode);\n var colSpan = this.colDef.colSpan(params);\n // colSpan must be number equal to or greater than 1\n return Math.max(colSpan, 1);\n };\n Column.prototype.getRowSpan = function (rowNode) {\n if (missing(this.colDef.rowSpan)) {\n return 1;\n }\n var params = this.createBaseColDefParams(rowNode);\n var rowSpan = this.colDef.rowSpan(params);\n // rowSpan must be number equal to or greater than 1\n return Math.max(rowSpan, 1);\n };\n Column.prototype.setActualWidth = function (actualWidth, source, silent) {\n if (source === void 0) {\n source = \"api\";\n }\n if (silent === void 0) {\n silent = false;\n }\n if (this.minWidth != null) {\n actualWidth = Math.max(actualWidth, this.minWidth);\n }\n if (this.maxWidth != null) {\n actualWidth = Math.min(actualWidth, this.maxWidth);\n }\n if (this.actualWidth !== actualWidth) {\n // disable flex for this column if it was manually resized.\n this.actualWidth = actualWidth;\n if (this.flex && source !== 'flex' && source !== 'gridInitializing') {\n this.flex = null;\n }\n if (!silent) {\n this.fireColumnWidthChangedEvent(source);\n }\n }\n };\n Column.prototype.fireColumnWidthChangedEvent = function (source) {\n this.eventService.dispatchEvent(this.createColumnEvent(Column.EVENT_WIDTH_CHANGED, source));\n };\n Column.prototype.isGreaterThanMax = function (width) {\n if (this.maxWidth != null) {\n return width > this.maxWidth;\n }\n return false;\n };\n Column.prototype.getMinWidth = function () {\n return this.minWidth;\n };\n Column.prototype.getMaxWidth = function () {\n return this.maxWidth;\n };\n Column.prototype.getFlex = function () {\n return this.flex || 0;\n };\n // this method should only be used by the columnModel to\n // change flex when required by the setColumnState method.\n Column.prototype.setFlex = function (flex) {\n if (this.flex !== flex) {\n this.flex = flex;\n }\n };\n Column.prototype.setMinimum = function (source) {\n if (source === void 0) {\n source = \"api\";\n }\n if (exists(this.minWidth)) {\n this.setActualWidth(this.minWidth, source);\n }\n };\n Column.prototype.setRowGroupActive = function (rowGroup, source) {\n if (source === void 0) {\n source = \"api\";\n }\n if (this.rowGroupActive !== rowGroup) {\n this.rowGroupActive = rowGroup;\n this.eventService.dispatchEvent(this.createColumnEvent(Column.EVENT_ROW_GROUP_CHANGED, source));\n }\n };\n /** Returns `true` if row group is currently active for this column. */\n Column.prototype.isRowGroupActive = function () {\n return this.rowGroupActive;\n };\n Column.prototype.setPivotActive = function (pivot, source) {\n if (source === void 0) {\n source = \"api\";\n }\n if (this.pivotActive !== pivot) {\n this.pivotActive = pivot;\n this.eventService.dispatchEvent(this.createColumnEvent(Column.EVENT_PIVOT_CHANGED, source));\n }\n };\n /** Returns `true` if pivot is currently active for this column. */\n Column.prototype.isPivotActive = function () {\n return this.pivotActive;\n };\n Column.prototype.isAnyFunctionActive = function () {\n return this.isPivotActive() || this.isRowGroupActive() || this.isValueActive();\n };\n Column.prototype.isAnyFunctionAllowed = function () {\n return this.isAllowPivot() || this.isAllowRowGroup() || this.isAllowValue();\n };\n Column.prototype.setValueActive = function (value, source) {\n if (source === void 0) {\n source = \"api\";\n }\n if (this.aggregationActive !== value) {\n this.aggregationActive = value;\n this.eventService.dispatchEvent(this.createColumnEvent(Column.EVENT_VALUE_CHANGED, source));\n }\n };\n /** Returns `true` if value (aggregation) is currently active for this column. */\n Column.prototype.isValueActive = function () {\n return this.aggregationActive;\n };\n Column.prototype.isAllowPivot = function () {\n return this.colDef.enablePivot === true;\n };\n Column.prototype.isAllowValue = function () {\n return this.colDef.enableValue === true;\n };\n Column.prototype.isAllowRowGroup = function () {\n return this.colDef.enableRowGroup === true;\n };\n Column.prototype.getMenuTabs = function (defaultValues) {\n var menuTabs = this.getColDef().menuTabs;\n if (menuTabs == null) {\n menuTabs = defaultValues;\n }\n return menuTabs;\n };\n // this used to be needed, as previous version of ag-grid had lockPosition as column state,\n // so couldn't depend on colDef version.\n Column.prototype.isLockPosition = function () {\n console.warn('AG Grid: since v21, col.isLockPosition() should not be used, please use col.getColDef().lockPosition instead.');\n return this.colDef ? !!this.colDef.lockPosition : false;\n };\n // this used to be needed, as previous version of ag-grid had lockVisible as column state,\n // so couldn't depend on colDef version.\n Column.prototype.isLockVisible = function () {\n console.warn('AG Grid: since v21, col.isLockVisible() should not be used, please use col.getColDef().lockVisible instead.');\n return this.colDef ? !!this.colDef.lockVisible : false;\n };\n // this used to be needed, as previous version of ag-grid had lockPinned as column state,\n // so couldn't depend on colDef version.\n Column.prototype.isLockPinned = function () {\n console.warn('AG Grid: since v21, col.isLockPinned() should not be used, please use col.getColDef().lockPinned instead.');\n return this.colDef ? !!this.colDef.lockPinned : false;\n };\n // + renderedHeaderCell - for making header cell transparent when moving\n Column.EVENT_MOVING_CHANGED = 'movingChanged';\n // + renderedCell - changing left position\n Column.EVENT_LEFT_CHANGED = 'leftChanged';\n // + renderedCell - changing width\n Column.EVENT_WIDTH_CHANGED = 'widthChanged';\n // + renderedCell - for changing pinned classes\n Column.EVENT_LAST_LEFT_PINNED_CHANGED = 'lastLeftPinnedChanged';\n Column.EVENT_FIRST_RIGHT_PINNED_CHANGED = 'firstRightPinnedChanged';\n // + renderedColumn - for changing visibility icon\n Column.EVENT_VISIBLE_CHANGED = 'visibleChanged';\n // + every time the filter changes, used in the floating filters\n Column.EVENT_FILTER_CHANGED = 'filterChanged';\n // + renderedHeaderCell - marks the header with filter icon\n Column.EVENT_FILTER_ACTIVE_CHANGED = 'filterActiveChanged';\n // + renderedHeaderCell - marks the header with sort icon\n Column.EVENT_SORT_CHANGED = 'sortChanged';\n // + renderedHeaderCell - marks the header with sort icon\n Column.EVENT_COL_DEF_CHANGED = 'colDefChanged';\n Column.EVENT_MENU_VISIBLE_CHANGED = 'menuVisibleChanged';\n // + toolpanel, for gui updates\n Column.EVENT_ROW_GROUP_CHANGED = 'columnRowGroupChanged';\n // + toolpanel, for gui updates\n Column.EVENT_PIVOT_CHANGED = 'columnPivotChanged';\n // + toolpanel, for gui updates\n Column.EVENT_VALUE_CHANGED = 'columnValueChanged';\n __decorate$2z([Autowired('gridOptionsWrapper')], Column.prototype, \"gridOptionsWrapper\", void 0);\n __decorate$2z([Autowired('columnUtils')], Column.prototype, \"columnUtils\", void 0);\n __decorate$2z([PostConstruct], Column.prototype, \"initialise\", null);\n return Column;\n}();\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue\n * @version v28.2.1\n * @link https://www.ag-grid.com/\n * @license MIT\n */\nfunction firstExistingValue() {\n var values = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n values[_i] = arguments[_i];\n }\n for (var i = 0; i < values.length; i++) {\n var value = values[i];\n if (exists(value)) {\n return value;\n }\n }\n return null;\n}\nfunction existsAndNotEmpty(value) {\n return value != null && value.length > 0;\n}\nfunction last(arr) {\n if (!arr || !arr.length) {\n return;\n }\n return arr[arr.length - 1];\n}\nfunction areEqual(a, b, comparator) {\n if (a == null && b == null) {\n return true;\n }\n return a != null && b != null && a.length === b.length && a.every(function (value, index) {\n return comparator ? comparator(value, b[index]) : b[index] === value;\n });\n}\n/** @deprecated */\nfunction compareArrays(array1, array2) {\n return areEqual(array1, array2);\n}\n/** @deprecated */\nfunction shallowCompare(arr1, arr2) {\n return areEqual(arr1, arr2);\n}\nfunction sortNumerically(array) {\n return array.sort(function (a, b) {\n return a - b;\n });\n}\nfunction removeRepeatsFromArray(array, object) {\n if (!array) {\n return;\n }\n for (var index = array.length - 2; index >= 0; index--) {\n var thisOneMatches = array[index] === object;\n var nextOneMatches = array[index + 1] === object;\n if (thisOneMatches && nextOneMatches) {\n array.splice(index + 1, 1);\n }\n }\n}\nfunction removeFromArray(array, object) {\n var index = array.indexOf(object);\n if (index >= 0) {\n array.splice(index, 1);\n }\n}\nfunction removeAllFromArray(array, toRemove) {\n toRemove.forEach(function (item) {\n return removeFromArray(array, item);\n });\n}\nfunction insertIntoArray(array, object, toIndex) {\n array.splice(toIndex, 0, object);\n}\nfunction insertArrayIntoArray(dest, src, toIndex) {\n if (dest == null || src == null) {\n return;\n }\n // put items in backwards, otherwise inserted items end up in reverse order\n for (var i = src.length - 1; i >= 0; i--) {\n var item = src[i];\n insertIntoArray(dest, item, toIndex);\n }\n}\nfunction moveInArray(array, objectsToMove, toIndex) {\n // first take out items from the array\n removeAllFromArray(array, objectsToMove);\n // now add the objects, in same order as provided to us, that means we start at the end\n // as the objects will be pushed to the right as they are inserted\n objectsToMove.slice().reverse().forEach(function (obj) {\n return insertIntoArray(array, obj, toIndex);\n });\n}\nfunction includes(array, value) {\n return array.indexOf(value) > -1;\n}\nfunction flatten(arrayOfArrays) {\n return [].concat.apply([], arrayOfArrays);\n}\nfunction pushAll(target, source) {\n if (source == null || target == null) {\n return;\n }\n source.forEach(function (value) {\n return target.push(value);\n });\n}\nfunction toStrings(array) {\n return array.map(toStringOrNull);\n}\nfunction forEachReverse(list, action) {\n if (list == null) {\n return;\n }\n for (var i = list.length - 1; i >= 0; i--) {\n action(list[i], i);\n }\n}\nvar ArrayUtils = /*#__PURE__*/Object.freeze({\n __proto__: null,\n firstExistingValue: firstExistingValue,\n existsAndNotEmpty: existsAndNotEmpty,\n last: last,\n areEqual: areEqual,\n compareArrays: compareArrays,\n shallowCompare: shallowCompare,\n sortNumerically: sortNumerically,\n removeRepeatsFromArray: removeRepeatsFromArray,\n removeFromArray: removeFromArray,\n removeAllFromArray: removeAllFromArray,\n insertIntoArray: insertIntoArray,\n insertArrayIntoArray: insertArrayIntoArray,\n moveInArray: moveInArray,\n includes: includes,\n flatten: flatten,\n pushAll: pushAll,\n toStrings: toStrings,\n forEachReverse: forEachReverse\n});\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue\n * @version v28.2.1\n * @link https://www.ag-grid.com/\n * @license MIT\n */\nvar __decorate$2y = undefined && undefined.__decorate || function (decorators, target, key, desc) {\n var c = arguments.length,\n r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc,\n d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nvar ColumnGroup = /** @class */function () {\n function ColumnGroup(providedColumnGroup, groupId, instanceId, pinned) {\n // depends on the open/closed state of the group, only displaying columns are stored here\n this.displayedChildren = [];\n this.localEventService = new EventService();\n this.groupId = groupId;\n this.instanceId = instanceId;\n this.providedColumnGroup = providedColumnGroup;\n this.pinned = pinned;\n }\n // this is static, a it is used outside of this class\n ColumnGroup.createUniqueId = function (groupId, instanceId) {\n return groupId + '_' + instanceId;\n };\n // as the user is adding and removing columns, the groups are recalculated.\n // this reset clears out all children, ready for children to be added again\n ColumnGroup.prototype.reset = function () {\n this.parent = null;\n this.children = null;\n this.displayedChildren = null;\n };\n ColumnGroup.prototype.getParent = function () {\n return this.parent;\n };\n ColumnGroup.prototype.setParent = function (parent) {\n this.parent = parent;\n };\n ColumnGroup.prototype.getUniqueId = function () {\n return ColumnGroup.createUniqueId(this.groupId, this.instanceId);\n };\n ColumnGroup.prototype.isEmptyGroup = function () {\n return this.displayedChildren.length === 0;\n };\n ColumnGroup.prototype.isMoving = function () {\n var allLeafColumns = this.getProvidedColumnGroup().getLeafColumns();\n if (!allLeafColumns || allLeafColumns.length === 0) {\n return false;\n }\n return allLeafColumns.every(function (col) {\n return col.isMoving();\n });\n };\n ColumnGroup.prototype.checkLeft = function () {\n // first get all children to setLeft, as it impacts our decision below\n this.displayedChildren.forEach(function (child) {\n if (child instanceof ColumnGroup) {\n child.checkLeft();\n }\n });\n // set our left based on first displayed column\n if (this.displayedChildren.length > 0) {\n if (this.gridOptionsWrapper.isEnableRtl()) {\n var lastChild = last(this.displayedChildren);\n var lastChildLeft = lastChild.getLeft();\n this.setLeft(lastChildLeft);\n } else {\n var firstChildLeft = this.displayedChildren[0].getLeft();\n this.setLeft(firstChildLeft);\n }\n } else {\n // this should never happen, as if we have no displayed columns, then\n // this groups should not even exist.\n this.setLeft(null);\n }\n };\n ColumnGroup.prototype.getLeft = function () {\n return this.left;\n };\n ColumnGroup.prototype.getOldLeft = function () {\n return this.oldLeft;\n };\n ColumnGroup.prototype.setLeft = function (left) {\n this.oldLeft = left;\n if (this.left !== left) {\n this.left = left;\n this.localEventService.dispatchEvent(this.createAgEvent(ColumnGroup.EVENT_LEFT_CHANGED));\n }\n };\n ColumnGroup.prototype.getPinned = function () {\n return this.pinned;\n };\n ColumnGroup.prototype.createAgEvent = function (type) {\n return {\n type: type\n };\n };\n ColumnGroup.prototype.addEventListener = function (eventType, listener) {\n this.localEventService.addEventListener(eventType, listener);\n };\n ColumnGroup.prototype.removeEventListener = function (eventType, listener) {\n this.localEventService.removeEventListener(eventType, listener);\n };\n ColumnGroup.prototype.getGroupId = function () {\n return this.groupId;\n };\n ColumnGroup.prototype.getInstanceId = function () {\n return this.instanceId;\n };\n ColumnGroup.prototype.isChildInThisGroupDeepSearch = function (wantedChild) {\n var result = false;\n this.children.forEach(function (foundChild) {\n if (wantedChild === foundChild) {\n result = true;\n }\n if (foundChild instanceof ColumnGroup) {\n if (foundChild.isChildInThisGroupDeepSearch(wantedChild)) {\n result = true;\n }\n }\n });\n return result;\n };\n ColumnGroup.prototype.getActualWidth = function () {\n var groupActualWidth = 0;\n if (this.displayedChildren) {\n this.displayedChildren.forEach(function (child) {\n groupActualWidth += child.getActualWidth();\n });\n }\n return groupActualWidth;\n };\n ColumnGroup.prototype.isResizable = function () {\n if (!this.displayedChildren) {\n return false;\n }\n // if at least one child is resizable, then the group is resizable\n var result = false;\n this.displayedChildren.forEach(function (child) {\n if (child.isResizable()) {\n result = true;\n }\n });\n return result;\n };\n ColumnGroup.prototype.getMinWidth = function () {\n var result = 0;\n this.displayedChildren.forEach(function (groupChild) {\n result += groupChild.getMinWidth() || 0;\n });\n return result;\n };\n ColumnGroup.prototype.addChild = function (child) {\n if (!this.children) {\n this.children = [];\n }\n this.children.push(child);\n };\n ColumnGroup.prototype.getDisplayedChildren = function () {\n return this.displayedChildren;\n };\n ColumnGroup.prototype.getLeafColumns = function () {\n var result = [];\n this.addLeafColumns(result);\n return result;\n };\n ColumnGroup.prototype.getDisplayedLeafColumns = function () {\n var result = [];\n this.addDisplayedLeafColumns(result);\n return result;\n };\n // why two methods here doing the same thing?\n ColumnGroup.prototype.getDefinition = function () {\n return this.providedColumnGroup.getColGroupDef();\n };\n ColumnGroup.prototype.getColGroupDef = function () {\n return this.providedColumnGroup.getColGroupDef();\n };\n ColumnGroup.prototype.isPadding = function () {\n return this.providedColumnGroup.isPadding();\n };\n ColumnGroup.prototype.isExpandable = function () {\n return this.providedColumnGroup.isExpandable();\n };\n ColumnGroup.prototype.isExpanded = function () {\n return this.providedColumnGroup.isExpanded();\n };\n ColumnGroup.prototype.setExpanded = function (expanded) {\n this.providedColumnGroup.setExpanded(expanded);\n };\n ColumnGroup.prototype.addDisplayedLeafColumns = function (leafColumns) {\n this.displayedChildren.forEach(function (child) {\n if (child instanceof Column) {\n leafColumns.push(child);\n } else if (child instanceof ColumnGroup) {\n child.addDisplayedLeafColumns(leafColumns);\n }\n });\n };\n ColumnGroup.prototype.addLeafColumns = function (leafColumns) {\n this.children.forEach(function (child) {\n if (child instanceof Column) {\n leafColumns.push(child);\n } else if (child instanceof ColumnGroup) {\n child.addLeafColumns(leafColumns);\n }\n });\n };\n ColumnGroup.prototype.getChildren = function () {\n return this.children;\n };\n ColumnGroup.prototype.getColumnGroupShow = function () {\n return this.providedColumnGroup.getColumnGroupShow();\n };\n ColumnGroup.prototype.getProvidedColumnGroup = function () {\n return this.providedColumnGroup;\n };\n /** @deprecated getOriginalColumnGroup is deprecated, use getOriginalColumnGroup. */\n ColumnGroup.prototype.getOriginalColumnGroup = function () {\n console.warn('AG Grid: columnGroup.getOriginalColumnGroup() is deprecated due to a method rename, use columnGroup.getProvidedColumnGroup() instead');\n return this.getProvidedColumnGroup();\n };\n ColumnGroup.prototype.getPaddingLevel = function () {\n var parent = this.getParent();\n if (!this.isPadding() || !parent || !parent.isPadding()) {\n return 0;\n }\n return 1 + parent.getPaddingLevel();\n };\n ColumnGroup.prototype.calculateDisplayedColumns = function () {\n var _this = this;\n // clear out last time we calculated\n this.displayedChildren = [];\n // find the column group that is controlling expandable. this is relevant when we have padding (empty)\n // groups, where the expandable is actually the first parent that is not a padding group.\n var parentWithExpansion = this;\n while (parentWithExpansion != null && parentWithExpansion.isPadding()) {\n parentWithExpansion = parentWithExpansion.getParent();\n }\n var isExpandable = parentWithExpansion ? parentWithExpansion.providedColumnGroup.isExpandable() : false;\n // it not expandable, everything is visible\n if (!isExpandable) {\n this.displayedChildren = this.children;\n this.localEventService.dispatchEvent(this.createAgEvent(ColumnGroup.EVENT_DISPLAYED_CHILDREN_CHANGED));\n return;\n }\n // Add cols based on columnGroupShow\n // Note - the below also adds padding groups, these are always added because they never have\n // colDef.columnGroupShow set.\n this.children.forEach(function (child) {\n // never add empty groups\n var emptyGroup = child instanceof ColumnGroup && (!child.displayedChildren || !child.displayedChildren.length);\n if (emptyGroup) {\n return;\n }\n var headerGroupShow = child.getColumnGroupShow();\n switch (headerGroupShow) {\n case ColumnGroup.HEADER_GROUP_SHOW_OPEN:\n // when set to open, only show col if group is open\n if (parentWithExpansion.providedColumnGroup.isExpanded()) {\n _this.displayedChildren.push(child);\n }\n break;\n case ColumnGroup.HEADER_GROUP_SHOW_CLOSED:\n // when set to open, only show col if group is open\n if (!parentWithExpansion.providedColumnGroup.isExpanded()) {\n _this.displayedChildren.push(child);\n }\n break;\n default:\n _this.displayedChildren.push(child);\n break;\n }\n });\n this.localEventService.dispatchEvent(this.createAgEvent(ColumnGroup.EVENT_DISPLAYED_CHILDREN_CHANGED));\n };\n ColumnGroup.HEADER_GROUP_SHOW_OPEN = 'open';\n ColumnGroup.HEADER_GROUP_SHOW_CLOSED = 'closed';\n ColumnGroup.EVENT_LEFT_CHANGED = 'leftChanged';\n ColumnGroup.EVENT_DISPLAYED_CHILDREN_CHANGED = 'displayedChildrenChanged';\n __decorate$2y([Autowired('gridOptionsWrapper')], ColumnGroup.prototype, \"gridOptionsWrapper\", void 0);\n return ColumnGroup;\n}();\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue\n * @version v28.2.1\n * @link https://www.ag-grid.com/\n * @license MIT\n */\nvar ProvidedColumnGroup = /** @class */function () {\n function ProvidedColumnGroup(colGroupDef, groupId, padding, level) {\n this.localEventService = new EventService();\n this.expandable = false;\n this.colGroupDef = colGroupDef;\n this.groupId = groupId;\n this.expanded = !!colGroupDef && !!colGroupDef.openByDefault;\n this.padding = padding;\n this.level = level;\n }\n ProvidedColumnGroup.prototype.reset = function (colGroupDef, level) {\n this.colGroupDef = colGroupDef;\n this.level = level;\n this.originalParent = null;\n // we use ! below, as we want to set the object back to the\n // way it was when it was first created\n this.children = undefined;\n this.expandable = undefined;\n };\n ProvidedColumnGroup.prototype.setOriginalParent = function (originalParent) {\n this.originalParent = originalParent;\n };\n ProvidedColumnGroup.prototype.getOriginalParent = function () {\n return this.originalParent;\n };\n ProvidedColumnGroup.prototype.getLevel = function () {\n return this.level;\n };\n ProvidedColumnGroup.prototype.isVisible = function () {\n // return true if at least one child is visible\n if (this.children) {\n return this.children.some(function (child) {\n return child.isVisible();\n });\n }\n return false;\n };\n ProvidedColumnGroup.prototype.isPadding = function () {\n return this.padding;\n };\n ProvidedColumnGroup.prototype.setExpanded = function (expanded) {\n this.expanded = expanded === undefined ? false : expanded;\n var event = {\n type: ProvidedColumnGroup.EVENT_EXPANDED_CHANGED\n };\n this.localEventService.dispatchEvent(event);\n };\n ProvidedColumnGroup.prototype.isExpandable = function () {\n return this.expandable;\n };\n ProvidedColumnGroup.prototype.isExpanded = function () {\n return this.expanded;\n };\n ProvidedColumnGroup.prototype.getGroupId = function () {\n return this.groupId;\n };\n ProvidedColumnGroup.prototype.getId = function () {\n return this.getGroupId();\n };\n ProvidedColumnGroup.prototype.setChildren = function (children) {\n this.children = children;\n };\n ProvidedColumnGroup.prototype.getChildren = function () {\n return this.children;\n };\n ProvidedColumnGroup.prototype.getColGroupDef = function () {\n return this.colGroupDef;\n };\n ProvidedColumnGroup.prototype.getLeafColumns = function () {\n var result = [];\n this.addLeafColumns(result);\n return result;\n };\n ProvidedColumnGroup.prototype.addLeafColumns = function (leafColumns) {\n if (!this.children) {\n return;\n }\n this.children.forEach(function (child) {\n if (child instanceof Column) {\n leafColumns.push(child);\n } else if (child instanceof ProvidedColumnGroup) {\n child.addLeafColumns(leafColumns);\n }\n });\n };\n ProvidedColumnGroup.prototype.getColumnGroupShow = function () {\n var colGroupDef = this.colGroupDef;\n if (!colGroupDef) {\n return;\n }\n return colGroupDef.columnGroupShow;\n };\n // need to check that this group has at least one col showing when both expanded and contracted.\n // if not, then we don't allow expanding and contracting on this group\n ProvidedColumnGroup.prototype.setupExpandable = function () {\n var _this = this;\n this.setExpandable();\n // note - we should be removing this event listener\n this.getLeafColumns().forEach(function (col) {\n return col.addEventListener(Column.EVENT_VISIBLE_CHANGED, _this.onColumnVisibilityChanged.bind(_this));\n });\n };\n ProvidedColumnGroup.prototype.setExpandable = function () {\n if (this.isPadding()) {\n return;\n }\n // want to make sure the group doesn't disappear when it's open\n var atLeastOneShowingWhenOpen = false;\n // want to make sure the group doesn't disappear when it's closed\n var atLeastOneShowingWhenClosed = false;\n // want to make sure the group has something to show / hide\n var atLeastOneChangeable = false;\n var children = this.findChildrenRemovingPadding();\n for (var i = 0, j = children.length; i < j; i++) {\n var abstractColumn = children[i];\n if (!abstractColumn.isVisible()) {\n continue;\n }\n // if the abstractColumn is a grid generated group, there will be no colDef\n var headerGroupShow = abstractColumn.getColumnGroupShow();\n if (headerGroupShow === ColumnGroup.HEADER_GROUP_SHOW_OPEN) {\n atLeastOneShowingWhenOpen = true;\n atLeastOneChangeable = true;\n } else if (headerGroupShow === ColumnGroup.HEADER_GROUP_SHOW_CLOSED) {\n atLeastOneShowingWhenClosed = true;\n atLeastOneChangeable = true;\n } else {\n atLeastOneShowingWhenOpen = true;\n atLeastOneShowingWhenClosed = true;\n }\n }\n var expandable = atLeastOneShowingWhenOpen && atLeastOneShowingWhenClosed && atLeastOneChangeable;\n if (this.expandable !== expandable) {\n this.expandable = expandable;\n var event_1 = {\n type: ProvidedColumnGroup.EVENT_EXPANDABLE_CHANGED\n };\n this.localEventService.dispatchEvent(event_1);\n }\n };\n ProvidedColumnGroup.prototype.findChildrenRemovingPadding = function () {\n var res = [];\n var process = function (items) {\n items.forEach(function (item) {\n // if padding, we add this children instead of the padding\n var skipBecausePadding = item instanceof ProvidedColumnGroup && item.isPadding();\n if (skipBecausePadding) {\n process(item.children);\n } else {\n res.push(item);\n }\n });\n };\n process(this.children);\n return res;\n };\n ProvidedColumnGroup.prototype.onColumnVisibilityChanged = function () {\n this.setExpandable();\n };\n ProvidedColumnGroup.prototype.addEventListener = function (eventType, listener) {\n this.localEventService.addEventListener(eventType, listener);\n };\n ProvidedColumnGroup.prototype.removeEventListener = function (eventType, listener) {\n this.localEventService.removeEventListener(eventType, listener);\n };\n ProvidedColumnGroup.EVENT_EXPANDED_CHANGED = 'expandedChanged';\n ProvidedColumnGroup.EVENT_EXPANDABLE_CHANGED = 'expandableChanged';\n return ProvidedColumnGroup;\n}();\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue\n * @version v28.2.1\n * @link https://www.ag-grid.com/\n * @license MIT\n */\nvar DefaultColumnTypes = {\n numericColumn: {\n headerClass: 'ag-right-aligned-header',\n cellClass: 'ag-right-aligned-cell'\n },\n rightAligned: {\n headerClass: 'ag-right-aligned-header',\n cellClass: 'ag-right-aligned-cell'\n }\n};\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue\n * @version v28.2.1\n * @link https://www.ag-grid.com/\n * @license MIT\n */\nvar AG_GRID_STOP_PROPAGATION = '__ag_Grid_Stop_Propagation';\nvar PASSIVE_EVENTS$1 = ['touchstart', 'touchend', 'touchmove', 'touchcancel'];\nvar supports = {};\n/**\n * a user once raised an issue - they said that when you opened a popup (eg context menu)\n * and then clicked on a selection checkbox, the popup wasn't closed. this is because the\n * popup listens for clicks on the body, however ag-grid WAS stopping propagation on the\n * checkbox clicks (so the rows didn't pick them up as row selection selection clicks).\n * to get around this, we have a pattern to stop propagation for the purposes of AG Grid,\n * but we still let the event pass back to the body.\n * @param {Event} event\n */\nfunction stopPropagationForAgGrid(event) {\n event[AG_GRID_STOP_PROPAGATION] = true;\n}\nfunction isStopPropagationForAgGrid(event) {\n return event[AG_GRID_STOP_PROPAGATION] === true;\n}\nvar isEventSupported = function () {\n var tags = {\n select: 'input',\n change: 'input',\n submit: 'form',\n reset: 'form',\n error: 'img',\n load: 'img',\n abort: 'img'\n };\n var eventChecker = function (eventName) {\n if (typeof supports[eventName] === 'boolean') {\n return supports[eventName];\n }\n var el = document.createElement(tags[eventName] || 'div');\n eventName = 'on' + eventName;\n return supports[eventName] = eventName in el;\n };\n return eventChecker;\n}();\nfunction getCtrlForEvent(gridOptionsWrapper, event, type) {\n var sourceElement = event.target;\n while (sourceElement) {\n var renderedComp = gridOptionsWrapper.getDomData(sourceElement, type);\n if (renderedComp) {\n return renderedComp;\n }\n sourceElement = sourceElement.parentElement;\n }\n return null;\n}\n/**\n * @deprecated\n * Adds all type of change listeners to an element, intended to be a text field\n * @param {HTMLElement} element\n * @param {EventListener} listener\n */\nfunction addChangeListener(element, listener) {\n element.addEventListener('changed', listener);\n element.addEventListener('paste', listener);\n element.addEventListener('input', listener);\n}\nfunction isElementInEventPath(element, event) {\n if (!event || !element) {\n return false;\n }\n return getEventPath(event).indexOf(element) >= 0;\n}\nfunction createEventPath(event) {\n var res = [];\n var pointer = event.target;\n while (pointer) {\n res.push(pointer);\n pointer = pointer.parentElement;\n }\n return res;\n}\n/**\n * firefox doesn't have event.path set, or any alternative to it, so we hack\n * it in. this is needed as it's to late to work out the path when the item is\n * removed from the dom. used by MouseEventService, where it works out if a click\n * was from the current grid, or a detail grid (master / detail).\n * @param {Event} event\n */\nfunction addAgGridEventPath(event) {\n event.__agGridEventPath = getEventPath(event);\n}\n/**\n * Gets the path for an Event.\n * https://stackoverflow.com/questions/39245488/event-path-undefined-with-firefox-and-vue-js\n * https://developer.mozilla.org/en-US/docs/Web/API/Event\n * @param {Event} event\n * @returns {EventTarget[]}\n */\nfunction getEventPath(event) {\n var eventNoType = event;\n if (eventNoType.path) {\n // Chrome supports path\n return eventNoType.path;\n }\n if (eventNoType.composedPath) {\n // Firefox supports composePath\n return eventNoType.composedPath();\n }\n if (eventNoType.__agGridEventPath) {\n // Firefox supports composePath\n return eventNoType.__agGridEventPath;\n }\n // and finally, if none of the above worked,\n // we create the path ourselves\n return createEventPath(event);\n}\nfunction addSafePassiveEventListener(frameworkOverrides, eElement, event, listener) {\n var isPassive = includes(PASSIVE_EVENTS$1, event);\n var options = isPassive ? {\n passive: true\n } : undefined;\n // this check is here for certain scenarios where I believe the user must be destroying\n // the grid somehow but continuing for it to be used\n if (frameworkOverrides && frameworkOverrides.addEventListener) {\n frameworkOverrides.addEventListener(eElement, event, listener, options);\n }\n}\nvar EventUtils = /*#__PURE__*/Object.freeze({\n __proto__: null,\n stopPropagationForAgGrid: stopPropagationForAgGrid,\n isStopPropagationForAgGrid: isStopPropagationForAgGrid,\n isEventSupported: isEventSupported,\n getCtrlForEvent: getCtrlForEvent,\n addChangeListener: addChangeListener,\n isElementInEventPath: isElementInEventPath,\n createEventPath: createEventPath,\n addAgGridEventPath: addAgGridEventPath,\n getEventPath: getEventPath,\n addSafePassiveEventListener: addSafePassiveEventListener\n});\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue\n * @version v28.2.1\n * @link https://www.ag-grid.com/\n * @license MIT\n */\nvar __decorate$2x = undefined && undefined.__decorate || function (decorators, target, key, desc) {\n var c = arguments.length,\n r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc,\n d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nvar BeanStub = /** @class */function () {\n function BeanStub() {\n var _this = this;\n this.destroyFunctions = [];\n this.destroyed = false;\n // for vue 3 - prevents Vue from trying to make this (and obviously any sub classes) from being reactive\n // prevents vue from creating proxies for created objects and prevents identity related issues\n this.__v_skip = true;\n this.isAlive = function () {\n return !_this.destroyed;\n };\n }\n // this was a test constructor niall built, when active, it prints after 5 seconds all beans/components that are\n // not destroyed. to use, create a new grid, then api.destroy() before 5 seconds. then anything that gets printed\n // points to a bean or component that was not properly disposed of.\n // constructor() {\n // setTimeout(()=> {\n // if (this.isAlive()) {\n // let prototype: any = Object.getPrototypeOf(this);\n // const constructor: any = prototype.constructor;\n // const constructorString = constructor.toString();\n // const beanName = constructorString.substring(9, constructorString.indexOf(\"(\"));\n // console.log('is alive ' + beanName);\n // }\n // }, 5000);\n // }\n // CellComp and GridComp and override this because they get the FrameworkOverrides from the Beans bean\n BeanStub.prototype.getFrameworkOverrides = function () {\n return this.frameworkOverrides;\n };\n BeanStub.prototype.getContext = function () {\n return this.context;\n };\n BeanStub.prototype.destroy = function () {\n // let prototype: any = Object.getPrototypeOf(this);\n // const constructor: any = prototype.constructor;\n // const constructorString = constructor.toString();\n // const beanName = constructorString.substring(9, constructorString.indexOf(\"(\"));\n this.destroyFunctions.forEach(function (func) {\n return func();\n });\n this.destroyFunctions.length = 0;\n this.destroyed = true;\n this.dispatchEvent({\n type: BeanStub.EVENT_DESTROYED\n });\n };\n BeanStub.prototype.addEventListener = function (eventType, listener) {\n if (!this.localEventService) {\n this.localEventService = new EventService();\n }\n this.localEventService.addEventListener(eventType, listener);\n };\n BeanStub.prototype.removeEventListener = function (eventType, listener) {\n if (this.localEventService) {\n this.localEventService.removeEventListener(eventType, listener);\n }\n };\n BeanStub.prototype.dispatchEventAsync = function (event) {\n var _this = this;\n window.setTimeout(function () {\n return _this.dispatchEvent(event);\n }, 0);\n };\n BeanStub.prototype.dispatchEvent = function (event) {\n if (this.localEventService) {\n this.localEventService.dispatchEvent(event);\n }\n };\n BeanStub.prototype.addManagedListener = function (object, event, listener) {\n var _this = this;\n if (this.destroyed) {\n return;\n }\n if (object instanceof HTMLElement) {\n addSafePassiveEventListener(this.getFrameworkOverrides(), object, event, listener);\n } else {\n object.addEventListener(event, listener);\n }\n var destroyFunc = function () {\n object.removeEventListener(event, listener);\n _this.destroyFunctions = _this.destroyFunctions.filter(function (fn) {\n return fn !== destroyFunc;\n });\n return null;\n };\n this.destroyFunctions.push(destroyFunc);\n return destroyFunc;\n };\n BeanStub.prototype.addDestroyFunc = function (func) {\n // if we are already destroyed, we execute the func now\n if (this.isAlive()) {\n this.destroyFunctions.push(func);\n } else {\n func();\n }\n };\n BeanStub.prototype.createManagedBean = function (bean, context) {\n var res = this.createBean(bean, context);\n this.addDestroyFunc(this.destroyBean.bind(this, bean, context));\n return res;\n };\n BeanStub.prototype.createBean = function (bean, context, afterPreCreateCallback) {\n return (context || this.getContext()).createBean(bean, afterPreCreateCallback);\n };\n BeanStub.prototype.destroyBean = function (bean, context) {\n return (context || this.getContext()).destroyBean(bean);\n };\n BeanStub.prototype.destroyBeans = function (beans, context) {\n var _this = this;\n if (beans) {\n beans.forEach(function (bean) {\n return _this.destroyBean(bean, context);\n });\n }\n return [];\n };\n BeanStub.EVENT_DESTROYED = 'destroyed';\n __decorate$2x([Autowired('frameworkOverrides')], BeanStub.prototype, \"frameworkOverrides\", void 0);\n __decorate$2x([Autowired('context')], BeanStub.prototype, \"context\", void 0);\n __decorate$2x([Autowired('eventService')], BeanStub.prototype, \"eventService\", void 0);\n __decorate$2x([Autowired('gridOptionsWrapper')], BeanStub.prototype, \"gridOptionsWrapper\", void 0);\n __decorate$2x([PreDestroy], BeanStub.prototype, \"destroy\", null);\n return BeanStub;\n}();\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue\n * @version v28.2.1\n * @link https://www.ag-grid.com/\n * @license MIT\n */\nvar __extends$2U = undefined && undefined.__extends || function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf || {\n __proto__: []\n } instanceof Array && function (d, b) {\n d.__proto__ = b;\n } || function (d, b) {\n for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];\n };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() {\n this.constructor = d;\n }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n}();\nvar __decorate$2w = undefined && undefined.__decorate || function (decorators, target, key, desc) {\n var c = arguments.length,\n r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc,\n d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nvar __param$9 = undefined && undefined.__param || function (paramIndex, decorator) {\n return function (target, key) {\n decorator(target, key, paramIndex);\n };\n};\n// takes ColDefs and ColGroupDefs and turns them into Columns and OriginalGroups\nvar ColumnFactory = /** @class */function (_super) {\n __extends$2U(ColumnFactory, _super);\n function ColumnFactory() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n ColumnFactory.prototype.setBeans = function (loggerFactory) {\n this.logger = loggerFactory.create('ColumnFactory');\n };\n ColumnFactory.prototype.createColumnTree = function (defs, primaryColumns, existingTree) {\n // column key creator dishes out unique column id's in a deterministic way,\n // so if we have two grids (that could be master/slave) with same column definitions,\n // then this ensures the two grids use identical id's.\n var columnKeyCreator = new ColumnKeyCreator();\n var _a = this.extractExistingTreeData(existingTree),\n existingCols = _a.existingCols,\n existingGroups = _a.existingGroups,\n existingColKeys = _a.existingColKeys;\n columnKeyCreator.addExistingKeys(existingColKeys);\n // create am unbalanced tree that maps the provided definitions\n var unbalancedTree = this.recursivelyCreateColumns(defs, 0, primaryColumns, existingCols, columnKeyCreator, existingGroups);\n var treeDept = this.findMaxDept(unbalancedTree, 0);\n this.logger.log('Number of levels for grouped columns is ' + treeDept);\n var columnTree = this.balanceColumnTree(unbalancedTree, 0, treeDept, columnKeyCreator);\n var deptFirstCallback = function (child, parent) {\n if (child instanceof ProvidedColumnGroup) {\n child.setupExpandable();\n }\n // we set the original parents at the end, rather than when we go along, as balancing the tree\n // adds extra levels into the tree. so we can only set parents when balancing is done.\n child.setOriginalParent(parent);\n };\n this.columnUtils.depthFirstOriginalTreeSearch(null, columnTree, deptFirstCallback);\n return {\n columnTree: columnTree,\n treeDept: treeDept\n };\n };\n ColumnFactory.prototype.extractExistingTreeData = function (existingTree) {\n var existingCols = [];\n var existingGroups = [];\n var existingColKeys = [];\n if (existingTree) {\n this.columnUtils.depthFirstOriginalTreeSearch(null, existingTree, function (item) {\n if (item instanceof ProvidedColumnGroup) {\n var group = item;\n existingGroups.push(group);\n } else {\n var col = item;\n existingColKeys.push(col.getId());\n existingCols.push(col);\n }\n });\n }\n return {\n existingCols: existingCols,\n existingGroups: existingGroups,\n existingColKeys: existingColKeys\n };\n };\n ColumnFactory.prototype.createForAutoGroups = function (autoGroupCols, gridBalancedTree) {\n var _this = this;\n return autoGroupCols.map(function (col) {\n return _this.createAutoGroupTreeItem(gridBalancedTree, col);\n });\n };\n ColumnFactory.prototype.createAutoGroupTreeItem = function (balancedColumnTree, column) {\n var dept = this.findDepth(balancedColumnTree);\n // at the end, this will be the top of the tree item.\n var nextChild = column;\n for (var i = dept - 1; i >= 0; i--) {\n var autoGroup = new ProvidedColumnGroup(null, \"FAKE_PATH_\" + column.getId() + \"}_\" + i, true, i);\n this.context.createBean(autoGroup);\n autoGroup.setChildren([nextChild]);\n nextChild.setOriginalParent(autoGroup);\n nextChild = autoGroup;\n }\n // at this point, the nextChild is the top most item in the tree\n return nextChild;\n };\n ColumnFactory.prototype.findDepth = function (balancedColumnTree) {\n var dept = 0;\n var pointer = balancedColumnTree;\n while (pointer && pointer[0] && pointer[0] instanceof ProvidedColumnGroup) {\n dept++;\n pointer = pointer[0].getChildren();\n }\n return dept;\n };\n ColumnFactory.prototype.balanceColumnTree = function (unbalancedTree, currentDept, columnDept, columnKeyCreator) {\n var result = [];\n // go through each child, for groups, recurse a level deeper,\n // for columns we need to pad\n for (var i = 0; i < unbalancedTree.length; i++) {\n var child = unbalancedTree[i];\n if (child instanceof ProvidedColumnGroup) {\n // child is a group, all we do is go to the next level of recursion\n var originalGroup = child;\n var newChildren = this.balanceColumnTree(originalGroup.getChildren(), currentDept + 1, columnDept, columnKeyCreator);\n originalGroup.setChildren(newChildren);\n result.push(originalGroup);\n } else {\n // child is a column - so here we add in the padded column groups if needed\n var firstPaddedGroup = void 0;\n var currentPaddedGroup = void 0;\n // this for loop will NOT run any loops if no padded column groups are needed\n for (var j = columnDept - 1; j >= currentDept; j--) {\n var newColId = columnKeyCreator.getUniqueKey(null, null);\n var colGroupDefMerged = this.createMergedColGroupDef(null);\n var paddedGroup = new ProvidedColumnGroup(colGroupDefMerged, newColId, true, currentDept);\n this.context.createBean(paddedGroup);\n if (currentPaddedGroup) {\n currentPaddedGroup.setChildren([paddedGroup]);\n }\n currentPaddedGroup = paddedGroup;\n if (!firstPaddedGroup) {\n firstPaddedGroup = currentPaddedGroup;\n }\n }\n // likewise this if statement will not run if no padded groups\n if (firstPaddedGroup && currentPaddedGroup) {\n result.push(firstPaddedGroup);\n var hasGroups = unbalancedTree.some(function (leaf) {\n return leaf instanceof ProvidedColumnGroup;\n });\n if (hasGroups) {\n currentPaddedGroup.setChildren([child]);\n continue;\n } else {\n currentPaddedGroup.setChildren(unbalancedTree);\n break;\n }\n }\n result.push(child);\n }\n }\n return result;\n };\n ColumnFactory.prototype.findMaxDept = function (treeChildren, dept) {\n var maxDeptThisLevel = dept;\n for (var i = 0; i < treeChildren.length; i++) {\n var abstractColumn = treeChildren[i];\n if (abstractColumn instanceof ProvidedColumnGroup) {\n var originalGroup = abstractColumn;\n var newDept = this.findMaxDept(originalGroup.getChildren(), dept + 1);\n if (maxDeptThisLevel < newDept) {\n maxDeptThisLevel = newDept;\n }\n }\n }\n return maxDeptThisLevel;\n };\n ColumnFactory.prototype.recursivelyCreateColumns = function (defs, level, primaryColumns, existingColsCopy, columnKeyCreator, existingGroups) {\n var _this = this;\n return (defs || []).map(function (def) {\n if (_this.isColumnGroup(def)) {\n return _this.createColumnGroup(primaryColumns, def, level, existingColsCopy, columnKeyCreator, existingGroups);\n } else {\n return _this.createColumn(primaryColumns, def, existingColsCopy, columnKeyCreator);\n }\n });\n };\n ColumnFactory.prototype.createColumnGroup = function (primaryColumns, colGroupDef, level, existingColumns, columnKeyCreator, existingGroups) {\n var colGroupDefMerged = this.createMergedColGroupDef(colGroupDef);\n var groupId = columnKeyCreator.getUniqueKey(colGroupDefMerged.groupId || null, null);\n var existingGroup = this.findExistingGroup(colGroupDef, existingGroups);\n var providedGroup;\n if (existingGroup) {\n providedGroup = existingGroup;\n providedGroup.reset(colGroupDefMerged, level);\n removeFromArray(existingGroups, existingGroup);\n } else {\n providedGroup = new ProvidedColumnGroup(colGroupDefMerged, groupId, false, level);\n this.context.createBean(providedGroup);\n }\n var children = this.recursivelyCreateColumns(colGroupDefMerged.children, level + 1, primaryColumns, existingColumns, columnKeyCreator, existingGroups);\n providedGroup.setChildren(children);\n return providedGroup;\n };\n ColumnFactory.prototype.createMergedColGroupDef = function (colGroupDef) {\n var colGroupDefMerged = {};\n Object.assign(colGroupDefMerged, this.gridOptionsWrapper.getDefaultColGroupDef());\n Object.assign(colGroupDefMerged, colGroupDef);\n this.checkForDeprecatedItems(colGroupDefMerged);\n return colGroupDefMerged;\n };\n ColumnFactory.prototype.createColumn = function (primaryColumns, colDef, existingColsCopy, columnKeyCreator) {\n var colDefMerged = this.mergeColDefs(colDef);\n this.checkForDeprecatedItems(colDefMerged);\n // see if column already exists\n var column = this.findExistingColumn(colDef, existingColsCopy);\n // make sure we remove, so if user provided duplicate id, then we don't have more than\n // one column instance for colDef with common id\n if (existingColsCopy && column) {\n removeFromArray(existingColsCopy, column);\n }\n if (!column) {\n // no existing column, need to create one\n var colId = columnKeyCreator.getUniqueKey(colDefMerged.colId, colDefMerged.field);\n column = new Column(colDefMerged, colDef, colId, primaryColumns);\n this.context.createBean(column);\n } else {\n column.setColDef(colDefMerged, colDef);\n this.applyColumnState(column, colDefMerged);\n }\n return column;\n };\n ColumnFactory.prototype.applyColumnState = function (column, colDef) {\n // flex\n var flex = attrToNumber(colDef.flex);\n if (flex !== undefined) {\n column.setFlex(flex);\n }\n // width - we only set width if column is not flexing\n var noFlexThisCol = column.getFlex() <= 0;\n if (noFlexThisCol) {\n // both null and undefined means we skip, as it's not possible to 'clear' width (a column must have a width)\n var width = attrToNumber(colDef.width);\n if (width != null) {\n column.setActualWidth(width);\n } else {\n // otherwise set the width again, in case min or max width has changed,\n // and width needs to be adjusted.\n var widthBeforeUpdate = column.getActualWidth();\n column.setActualWidth(widthBeforeUpdate);\n }\n }\n // sort - anything but undefined will set sort, thus null or empty string will clear the sort\n if (colDef.sort !== undefined) {\n if (colDef.sort == Constants.SORT_ASC || colDef.sort == Constants.SORT_DESC) {\n column.setSort(colDef.sort);\n } else {\n column.setSort(undefined);\n }\n }\n // sorted at - anything but undefined, thus null will clear the sortIndex\n var sortIndex = attrToNumber(colDef.sortIndex);\n if (sortIndex !== undefined) {\n column.setSortIndex(sortIndex);\n }\n // hide - anything but undefined, thus null will clear the hide\n var hide = attrToBoolean(colDef.hide);\n if (hide !== undefined) {\n column.setVisible(!hide);\n }\n // pinned - anything but undefined, thus null or empty string will remove pinned\n if (colDef.pinned !== undefined) {\n column.setPinned(colDef.pinned);\n }\n };\n ColumnFactory.prototype.findExistingColumn = function (newColDef, existingColsCopy) {\n return (existingColsCopy || []).find(function (existingCol) {\n var existingColDef = existingCol.getUserProvidedColDef();\n if (!existingColDef) {\n return false;\n }\n var newHasId = newColDef.colId != null;\n var newHasField = newColDef.field != null;\n if (newHasId) {\n return existingCol.getId() === newColDef.colId;\n }\n if (newHasField) {\n return existingColDef.field === newColDef.field;\n }\n // if no id or field present, then try object equivalence.\n if (existingColDef === newColDef) {\n return true;\n }\n return false;\n });\n };\n ColumnFactory.prototype.findExistingGroup = function (newGroupDef, existingGroups) {\n return existingGroups.find(function (existingGroup) {\n var existingDef = existingGroup.getColGroupDef();\n if (!existingDef) {\n return false;\n }\n var newHasId = newGroupDef.groupId != null;\n if (newHasId) {\n return existingGroup.getId() === newGroupDef.groupId;\n }\n return false;\n });\n };\n ColumnFactory.prototype.mergeColDefs = function (colDef) {\n // start with empty merged definition\n var colDefMerged = {};\n // merge properties from default column definitions\n var defaultColDef = this.gridOptionsWrapper.getDefaultColDef();\n mergeDeep(colDefMerged, defaultColDef, false, true);\n // merge properties from column type properties\n var columnType = colDef.type;\n if (!columnType) {\n columnType = defaultColDef && defaultColDef.type;\n }\n // if type of both colDef and defaultColDef, then colDef gets preference\n if (columnType) {\n this.assignColumnTypes(columnType, colDefMerged);\n }\n // merge properties from column definitions\n mergeDeep(colDefMerged, colDef, false, true);\n var autoGroupColDef = this.gridOptionsWrapper.getAutoGroupColumnDef();\n var isSortingCoupled = this.gridOptionsWrapper.isColumnsSortingCoupledToGroup();\n if (colDef.rowGroup && autoGroupColDef && isSortingCoupled) {\n // override the sort for row group columns where the autoGroupColDef defines these values.\n mergeDeep(colDefMerged, {\n sort: autoGroupColDef.sort,\n initialSort: autoGroupColDef.initialSort\n }, false, true);\n }\n return colDefMerged;\n };\n ColumnFactory.prototype.assignColumnTypes = function (type, colDefMerged) {\n var typeKeys = [];\n if (type instanceof Array) {\n var invalidArray = type.some(function (a) {\n return typeof a !== 'string';\n });\n if (invalidArray) {\n console.warn(\"AG Grid: if colDef.type is supplied an array it should be of type 'string[]'\");\n } else {\n typeKeys = type;\n }\n } else if (typeof type === 'string') {\n typeKeys = type.split(',');\n } else {\n console.warn(\"AG Grid: colDef.type should be of type 'string' | 'string[]'\");\n return;\n }\n // merge user defined with default column types\n var allColumnTypes = Object.assign({}, DefaultColumnTypes);\n var userTypes = this.gridOptionsWrapper.getColumnTypes() || {};\n iterateObject(userTypes, function (key, value) {\n if (key in allColumnTypes) {\n console.warn(\"AG Grid: the column type '\" + key + \"' is a default column type and cannot be overridden.\");\n } else {\n allColumnTypes[key] = value;\n }\n });\n typeKeys.forEach(function (t) {\n var typeColDef = allColumnTypes[t.trim()];\n if (typeColDef) {\n mergeDeep(colDefMerged, typeColDef, false, true);\n } else {\n console.warn(\"AG Grid: colDef.type '\" + t + \"' does not correspond to defined gridOptions.columnTypes\");\n }\n });\n };\n ColumnFactory.prototype.checkForDeprecatedItems = function (colDef) {\n if (colDef) {\n var colDefNoType = colDef; // take out the type, so we can access attributes not defined in the type\n if (colDefNoType.group !== undefined) {\n console.warn('AG Grid: colDef.group is invalid, please check documentation on how to do grouping as it changed in version 3');\n }\n if (colDefNoType.headerGroup !== undefined) {\n console.warn('AG Grid: colDef.headerGroup is invalid, please check documentation on how to do grouping as it changed in version 3');\n }\n if (colDefNoType.headerGroupShow !== undefined) {\n console.warn('AG Grid: colDef.headerGroupShow is invalid, should be columnGroupShow, please check documentation on how to do grouping as it changed in version 3');\n }\n if (colDefNoType.suppressRowGroup !== undefined) {\n console.warn('AG Grid: colDef.suppressRowGroup is deprecated, please use colDef.type instead');\n }\n if (colDefNoType.suppressAggregation !== undefined) {\n console.warn('AG Grid: colDef.suppressAggregation is deprecated, please use colDef.type instead');\n }\n if (colDefNoType.suppressRowGroup || colDefNoType.suppressAggregation) {\n console.warn('AG Grid: colDef.suppressAggregation and colDef.suppressRowGroup are deprecated, use allowRowGroup, allowPivot and allowValue instead');\n }\n if (colDefNoType.displayName) {\n console.warn(\"AG Grid: Found displayName \" + colDefNoType.displayName + \", please use headerName instead, displayName is deprecated.\");\n colDefNoType.headerName = colDefNoType.displayName;\n }\n }\n };\n // if object has children, we assume it's a group\n ColumnFactory.prototype.isColumnGroup = function (abstractColDef) {\n return abstractColDef.children !== undefined;\n };\n __decorate$2w([Autowired('columnUtils')], ColumnFactory.prototype, \"columnUtils\", void 0);\n __decorate$2w([__param$9(0, Qualifier('loggerFactory'))], ColumnFactory.prototype, \"setBeans\", null);\n ColumnFactory = __decorate$2w([Bean('columnFactory')], ColumnFactory);\n return ColumnFactory;\n}(BeanStub);\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue\n * @version v28.2.1\n * @link https://www.ag-grid.com/\n * @license MIT\n */\nvar Events = /** @class */function () {\n function Events() {}\n /** Everything has changed with the columns. Either complete new set of columns set, or user called setState() */\n /** @deprecated - grid no longer uses this, and setSate() also fires individual events */\n Events.EVENT_COLUMN_EVERYTHING_CHANGED = 'columnEverythingChanged';\n /** User has set in new columns. */\n Events.EVENT_NEW_COLUMNS_LOADED = 'newColumnsLoaded';\n /** The pivot mode flag was changed */\n Events.EVENT_COLUMN_PIVOT_MODE_CHANGED = 'columnPivotModeChanged';\n /** A row group column was added, removed or order changed. */\n Events.EVENT_COLUMN_ROW_GROUP_CHANGED = 'columnRowGroupChanged';\n /** expandAll / collapseAll was called from the api. */\n Events.EVENT_EXPAND_COLLAPSE_ALL = 'expandOrCollapseAll';\n /** A pivot column was added, removed or order changed. */\n Events.EVENT_COLUMN_PIVOT_CHANGED = 'columnPivotChanged';\n /** The list of grid columns has changed. */\n Events.EVENT_GRID_COLUMNS_CHANGED = 'gridColumnsChanged';\n /** A value column was added, removed or agg function was changed. */\n Events.EVENT_COLUMN_VALUE_CHANGED = 'columnValueChanged';\n /** A column was moved */\n Events.EVENT_COLUMN_MOVED = 'columnMoved';\n /** One or more columns was shown / hidden */\n Events.EVENT_COLUMN_VISIBLE = 'columnVisible';\n /** One or more columns was pinned / unpinned*/\n Events.EVENT_COLUMN_PINNED = 'columnPinned';\n /** A column group was opened / closed */\n Events.EVENT_COLUMN_GROUP_OPENED = 'columnGroupOpened';\n /** One or more columns was resized. If just one, the column in the event is set. */\n Events.EVENT_COLUMN_RESIZED = 'columnResized';\n /** The list of displayed columns has changed, can result from columns open / close, column move, pivot, group, etc */\n Events.EVENT_DISPLAYED_COLUMNS_CHANGED = 'displayedColumnsChanged';\n /** The list of virtual columns has changed, results from viewport changing */\n Events.EVENT_VIRTUAL_COLUMNS_CHANGED = 'virtualColumnsChanged';\n /** Async Transactions Executed */\n Events.EVENT_ASYNC_TRANSACTIONS_FLUSHED = 'asyncTransactionsFlushed';\n /** A row group was opened / closed */\n Events.EVENT_ROW_GROUP_OPENED = 'rowGroupOpened';\n /** @deprecated use EVENT_ROW_DATA_UPDATED instead */\n Events.EVENT_ROW_DATA_CHANGED = 'rowDataChanged';\n /** The client has updated data for the grid */\n Events.EVENT_ROW_DATA_UPDATED = 'rowDataUpdated';\n /** The client has set new floating data into the grid */\n Events.EVENT_PINNED_ROW_DATA_CHANGED = 'pinnedRowDataChanged';\n /** Range selection has changed */\n Events.EVENT_RANGE_SELECTION_CHANGED = 'rangeSelectionChanged';\n /** Chart was created */\n Events.EVENT_CHART_CREATED = 'chartCreated';\n /** Chart Range selection has changed */\n Events.EVENT_CHART_RANGE_SELECTION_CHANGED = 'chartRangeSelectionChanged';\n /** Chart Options have changed */\n Events.EVENT_CHART_OPTIONS_CHANGED = 'chartOptionsChanged';\n /** Chart was destroyed */\n Events.EVENT_CHART_DESTROYED = 'chartDestroyed';\n /** For when the tool panel is shown / hidden */\n Events.EVENT_TOOL_PANEL_VISIBLE_CHANGED = 'toolPanelVisibleChanged';\n Events.EVENT_TOOL_PANEL_SIZE_CHANGED = 'toolPanelSizeChanged';\n Events.EVENT_COLUMN_PANEL_ITEM_DRAG_START = 'columnPanelItemDragStart';\n Events.EVENT_COLUMN_PANEL_ITEM_DRAG_END = 'columnPanelItemDragEnd';\n /** Model was updated - grid updates the drawn rows when this happens */\n Events.EVENT_MODEL_UPDATED = 'modelUpdated';\n Events.EVENT_PASTE_START = 'pasteStart';\n Events.EVENT_PASTE_END = 'pasteEnd';\n Events.EVENT_FILL_START = 'fillStart';\n Events.EVENT_FILL_END = 'fillEnd';\n Events.EVENT_KEY_SHORTCUT_CHANGED_CELL_START = 'keyShortcutChangedCellStart';\n Events.EVENT_KEY_SHORTCUT_CHANGED_CELL_END = 'keyShortcutChangedCellEnd';\n Events.EVENT_CELL_CLICKED = 'cellClicked';\n Events.EVENT_CELL_DOUBLE_CLICKED = 'cellDoubleClicked';\n Events.EVENT_CELL_MOUSE_DOWN = 'cellMouseDown';\n Events.EVENT_CELL_CONTEXT_MENU = 'cellContextMenu';\n Events.EVENT_CELL_VALUE_CHANGED = 'cellValueChanged';\n Events.EVENT_CELL_EDIT_REQUEST = 'cellEditRequest';\n Events.EVENT_ROW_VALUE_CHANGED = 'rowValueChanged';\n Events.EVENT_CELL_FOCUSED = 'cellFocused';\n Events.EVENT_FULL_WIDTH_ROW_FOCUSED = 'fullWidthRowFocused';\n Events.EVENT_ROW_SELECTED = 'rowSelected';\n Events.EVENT_SELECTION_CHANGED = 'selectionChanged';\n Events.EVENT_CELL_KEY_DOWN = 'cellKeyDown';\n Events.EVENT_CELL_KEY_PRESS = 'cellKeyPress';\n Events.EVENT_CELL_MOUSE_OVER = 'cellMouseOver';\n Events.EVENT_CELL_MOUSE_OUT = 'cellMouseOut';\n /** 2 events for filtering. The grid LISTENS for filterChanged and afterFilterChanged */\n Events.EVENT_FILTER_CHANGED = 'filterChanged';\n /** Filter was change but not applied. Only useful if apply buttons are used in filters. */\n Events.EVENT_FILTER_MODIFIED = 'filterModified';\n Events.EVENT_FILTER_OPENED = 'filterOpened';\n Events.EVENT_SORT_CHANGED = 'sortChanged';\n /** A row was removed from the dom, for any reason. Use to clean up resources (if any) used by the row. */\n Events.EVENT_VIRTUAL_ROW_REMOVED = 'virtualRowRemoved';\n Events.EVENT_ROW_CLICKED = 'rowClicked';\n Events.EVENT_ROW_DOUBLE_CLICKED = 'rowDoubleClicked';\n /** Gets called once after the grid has finished initialising. */\n Events.EVENT_GRID_READY = 'gridReady';\n /** Width of height of the main grid div has changed. Grid listens for this and does layout of grid if it's\n * changed, so always filling the space it was given. */\n Events.EVENT_GRID_SIZE_CHANGED = 'gridSizeChanged';\n /** The indexes of the rows rendered has changed, eg user has scrolled to a new vertical position. */\n Events.EVENT_VIEWPORT_CHANGED = 'viewportChanged';\n /* The width of the scrollbar has been calculated */\n Events.EVENT_SCROLLBAR_WIDTH_CHANGED = 'scrollbarWidthChanged';\n /** Rows were rendered for the first time (ie on async data load). */\n Events.EVENT_FIRST_DATA_RENDERED = 'firstDataRendered';\n /** A column drag has started, either resizing a column or moving a column. */\n Events.EVENT_DRAG_STARTED = 'dragStarted';\n /** A column drag has stopped */\n Events.EVENT_DRAG_STOPPED = 'dragStopped';\n Events.EVENT_CHECKBOX_CHANGED = 'checkboxChanged';\n Events.EVENT_ROW_EDITING_STARTED = 'rowEditingStarted';\n Events.EVENT_ROW_EDITING_STOPPED = 'rowEditingStopped';\n Events.EVENT_CELL_EDITING_STARTED = 'cellEditingStarted';\n Events.EVENT_CELL_EDITING_STOPPED = 'cellEditingStopped';\n /** Main body of grid has scrolled, either horizontally or vertically */\n Events.EVENT_BODY_SCROLL = 'bodyScroll';\n /** Main body of the grid has stopped scrolling, either horizontally or vertically */\n Events.EVENT_BODY_SCROLL_END = 'bodyScrollEnd';\n Events.EVENT_HEIGHT_SCALE_CHANGED = 'heightScaleChanged';\n /** The displayed page for pagination has changed. For example the data was filtered or sorted,\n * or the user has moved to a different page. */\n Events.EVENT_PAGINATION_CHANGED = 'paginationChanged';\n /** Only used by React, Angular, Web Components and VueJS AG Grid components\n * (not used if doing plain JavaScript). If the grid receives changes due\n * to bound properties, this event fires after the grid has finished processing the change. */\n Events.EVENT_COMPONENT_STATE_CHANGED = 'componentStateChanged';\n /***************************** INTERNAL EVENTS: START ******************************************* */\n /** Please remember to add to ComponentUtil.EXCLUDED_INTERNAL_EVENTS to not have these events exposed to framework components. */\n /** All items from here down are used internally by the grid, not intended for external use. */\n // not documented, either experimental, or we just don't want users using an depending on them\n Events.EVENT_BODY_HEIGHT_CHANGED = 'bodyHeightChanged';\n Events.EVENT_DISPLAYED_COLUMNS_WIDTH_CHANGED = 'displayedColumnsWidthChanged';\n Events.EVENT_SCROLL_VISIBILITY_CHANGED = 'scrollVisibilityChanged';\n Events.EVENT_COLUMN_HOVER_CHANGED = 'columnHoverChanged';\n Events.EVENT_FLASH_CELLS = 'flashCells';\n Events.EVENT_PAGINATION_PIXEL_OFFSET_CHANGED = 'paginationPixelOffsetChanged';\n Events.EVENT_DISPLAYED_ROWS_CHANGED = 'displayedRowsChanged';\n Events.EVENT_LEFT_PINNED_WIDTH_CHANGED = 'leftPinnedWidthChanged';\n Events.EVENT_RIGHT_PINNED_WIDTH_CHANGED = 'rightPinnedWidthChanged';\n Events.EVENT_ROW_CONTAINER_HEIGHT_CHANGED = 'rowContainerHeightChanged';\n Events.EVENT_HEADER_HEIGHT_CHANGED = 'headerHeightChanged';\n Events.EVENT_COLUMN_HEADER_HEIGHT_CHANGED = 'columnHeaderHeightChanged';\n Events.EVENT_ROW_DRAG_ENTER = 'rowDragEnter';\n Events.EVENT_ROW_DRAG_MOVE = 'rowDragMove';\n Events.EVENT_ROW_DRAG_LEAVE = 'rowDragLeave';\n Events.EVENT_ROW_DRAG_END = 'rowDragEnd';\n // primarily for charts\n Events.EVENT_POPUP_TO_FRONT = 'popupToFront';\n // these are used for server side group and agg - only used by CS with Viewport Row Model - intention is\n // to design these better around server side functions and then release to general public when fully working with\n // all the row models.\n Events.EVENT_COLUMN_ROW_GROUP_CHANGE_REQUEST = 'columnRowGroupChangeRequest';\n Events.EVENT_COLUMN_PIVOT_CHANGE_REQUEST = 'columnPivotChangeRequest';\n Events.EVENT_COLUMN_VALUE_CHANGE_REQUEST = 'columnValueChangeRequest';\n Events.EVENT_COLUMN_AGG_FUNC_CHANGE_REQUEST = 'columnAggFuncChangeRequest';\n Events.EVENT_KEYBOARD_FOCUS = 'keyboardFocus';\n Events.EVENT_MOUSE_FOCUS = 'mouseFocus';\n Events.EVENT_STORE_UPDATED = 'storeUpdated';\n return Events;\n}();\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue\n * @version v28.2.1\n * @link https://www.ag-grid.com/\n * @license MIT\n */\n// class returns unique instance id's for columns.\n// eg, the following calls (in this order) will result in:\n//\n// getInstanceIdForKey('country') => 0\n// getInstanceIdForKey('country') => 1\n// getInstanceIdForKey('country') => 2\n// getInstanceIdForKey('country') => 3\n// getInstanceIdForKey('age') => 0\n// getInstanceIdForKey('age') => 1\n// getInstanceIdForKey('country') => 4\nvar GroupInstanceIdCreator = /** @class */function () {\n function GroupInstanceIdCreator() {\n // this map contains keys to numbers, so we remember what the last call was\n this.existingIds = {};\n }\n GroupInstanceIdCreator.prototype.getInstanceIdForKey = function (key) {\n var lastResult = this.existingIds[key];\n var result;\n if (typeof lastResult !== 'number') {\n // first time this key\n result = 0;\n } else {\n result = lastResult + 1;\n }\n this.existingIds[key] = result;\n return result;\n };\n return GroupInstanceIdCreator;\n}();\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue\n * @version v28.2.1\n * @link https://www.ag-grid.com/\n * @license MIT\n */\nvar reUnescapedHtml = /[&<>\"']/g;\n/**\n * HTML Escapes.\n */\nvar HTML_ESCAPES = {\n '&': '&',\n '<': '<',\n '>': '>',\n '\"': '"',\n \"'\": '''\n};\n/**\n * It encodes any string in UTF-8 format\n * taken from https://github.com/mathiasbynens/utf8.js\n * @param {string} s\n * @returns {string}\n */\nfunction utf8_encode(s) {\n var stringFromCharCode = String.fromCharCode;\n function ucs2decode(string) {\n var output = [];\n if (!string) {\n return [];\n }\n var len = string.length;\n var counter = 0;\n var value;\n var extra;\n while (counter < len) {\n value = string.charCodeAt(counter++);\n if (value >= 0xD800 && value <= 0xDBFF && counter < len) {\n // high surrogate, and there is a next character\n extra = string.charCodeAt(counter++);\n if ((extra & 0xFC00) == 0xDC00) {\n // low surrogate\n output.push(((value & 0x3FF) << 10) + (extra & 0x3FF) + 0x10000);\n } else {\n // unmatched surrogate; only append this code unit, in case the next\n // code unit is the high surrogate of a surrogate pair\n output.push(value);\n counter--;\n }\n } else {\n output.push(value);\n }\n }\n return output;\n }\n function checkScalarValue(point) {\n if (point >= 0xD800 && point <= 0xDFFF) {\n throw Error('Lone surrogate U+' + point.toString(16).toUpperCase() + ' is not a scalar value');\n }\n }\n function createByte(point, shift) {\n return stringFromCharCode(point >> shift & 0x3F | 0x80);\n }\n function encodeCodePoint(point) {\n if (point >= 0 && point <= 31 && point !== 10) {\n var convertedCode = point.toString(16).toUpperCase();\n var paddedCode = convertedCode.padStart(4, '0');\n return \"_x\" + paddedCode + \"_\";\n }\n if ((point & 0xFFFFFF80) == 0) {\n // 1-byte sequence\n return stringFromCharCode(point);\n }\n var symbol = '';\n if ((point & 0xFFFFF800) == 0) {\n // 2-byte sequence\n symbol = stringFromCharCode(point >> 6 & 0x1F | 0xC0);\n } else if ((point & 0xFFFF0000) == 0) {\n // 3-byte sequence\n checkScalarValue(point);\n symbol = stringFromCharCode(point >> 12 & 0x0F | 0xE0);\n symbol += createByte(point, 6);\n } else if ((point & 0xFFE00000) == 0) {\n // 4-byte sequence\n symbol = stringFromCharCode(point >> 18 & 0x07 | 0xF0);\n symbol += createByte(point, 12);\n symbol += createByte(point, 6);\n }\n symbol += stringFromCharCode(point & 0x3F | 0x80);\n return symbol;\n }\n var codePoints = ucs2decode(s);\n var length = codePoints.length;\n var index = -1;\n var codePoint;\n var byteString = '';\n while (++index < length) {\n codePoint = codePoints[index];\n byteString += encodeCodePoint(codePoint);\n }\n return byteString;\n}\n/**\n * Converts a camelCase string into hyphenated string\n * from https://gist.github.com/youssman/745578062609e8acac9f\n * @param {string} str\n * @return {string}\n */\nfunction camelCaseToHyphen(str) {\n if (str === null || str === undefined) {\n return null;\n }\n return str.replace(/([A-Z])/g, function (g) {\n return '-' + g[0].toLowerCase();\n });\n}\n/**\n * Converts a hyphenated string into camelCase string\n * from https://stackoverflow.com/questions/6660977/convert-hyphens-to-camel-case-camelcase\n * @param {string} str\n * @return {string}\n */\nfunction hyphenToCamelCase(str) {\n if (str === null || str === undefined) {\n return null;\n }\n return str.replace(/-([a-z])/g, function (g) {\n return g[1].toUpperCase();\n });\n}\nfunction capitalise(str) {\n return str[0].toUpperCase() + str.substr(1).toLowerCase();\n}\nfunction escapeString(toEscape, skipEscapingHtmlChars) {\n if (toEscape == null) {\n return null;\n }\n // we call toString() twice, in case value is an object, where user provides\n // a toString() method, and first call to toString() returns back something other\n // than a string (eg a number to render)\n var stringResult = toEscape.toString().toString();\n if (skipEscapingHtmlChars) {\n return stringResult;\n }\n // in react we don't need to escape html characters, as it's done by the framework\n return stringResult.replace(reUnescapedHtml, function (chr) {\n return HTML_ESCAPES[chr];\n });\n}\n/**\n * Converts a camelCase string into regular text\n * from: https://stackoverflow.com/questions/15369566/putting-space-in-camel-case-string-using-regular-expression\n * @param {string} camelCase\n * @return {string}\n */\nfunction camelCaseToHumanText(camelCase) {\n if (!camelCase || camelCase == null) {\n return null;\n }\n var rex = /([A-Z])([A-Z])([a-z])|([a-z])([A-Z])/g;\n var words = camelCase.replace(rex, '$1$4 $2$3$5').replace('.', ' ').split(' ');\n return words.map(function (word) {\n return word.substring(0, 1).toUpperCase() + (word.length > 1 ? word.substring(1, word.length) : '');\n }).join(' ');\n}\nvar StringUtils = /*#__PURE__*/Object.freeze({\n __proto__: null,\n utf8_encode: utf8_encode,\n camelCaseToHyphen: camelCaseToHyphen,\n hyphenToCamelCase: hyphenToCamelCase,\n capitalise: capitalise,\n escapeString: escapeString,\n camelCaseToHumanText: camelCaseToHumanText\n});\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue\n * @version v28.2.1\n * @link https://www.ag-grid.com/\n * @license MIT\n */\nfunction convertToMap(arr) {\n var map = new Map();\n arr.forEach(function (pair) {\n return map.set(pair[0], pair[1]);\n });\n return map;\n}\n// handy for organising a list into a map, where each item is mapped by an attribute, eg mapping Columns by ID\nfunction mapById(arr, callback) {\n var map = new Map();\n arr.forEach(function (item) {\n return map.set(callback(item), item);\n });\n return map;\n}\nfunction keys(map) {\n var arr = [];\n map.forEach(function (_, key) {\n return arr.push(key);\n });\n return arr;\n}\nvar MapUtils = /*#__PURE__*/Object.freeze({\n __proto__: null,\n convertToMap: convertToMap,\n mapById: mapById,\n keys: keys\n});\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue\n * @version v28.2.1\n * @link https://www.ag-grid.com/\n * @license MIT\n */\nvar __read$p = undefined && undefined.__read || function (o, n) {\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\n if (!m) return o;\n var i = m.call(o),\n r,\n ar = [],\n e;\n try {\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\n } catch (error) {\n e = {\n error: error\n };\n } finally {\n try {\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\n } finally {\n if (e) throw e.error;\n }\n }\n return ar;\n};\nvar __spread$j = undefined && undefined.__spread || function () {\n for (var ar = [], i = 0; i < arguments.length; i++) ar = ar.concat(__read$p(arguments[i]));\n return ar;\n};\nvar ColDefUtil = /** @class */function () {\n function ColDefUtil() {}\n ColDefUtil.STRING_PROPERTIES = ['headerName', 'columnGroupShow', 'headerClass', 'toolPanelClass', 'headerValueGetter', 'pivotKeys', 'groupId', 'colId', 'sort', 'initialSort', 'field', 'type', 'tooltipComponent', 'tooltipField', 'headerTooltip', 'cellClass', 'showRowGroup', 'filter', 'initialAggFunc', 'defaultAggFunc', 'aggFunc', 'pinned', 'initialPinned', 'chartDataType', 'cellEditorPopupPosition'];\n ColDefUtil.OBJECT_PROPERTIES = ['headerGroupComponent', 'headerGroupComponentFramework', 'headerGroupComponentParams', 'cellStyle', 'cellRenderer', 'cellRendererParams', 'cellRendererFramework', 'cellEditor', 'cellEditorFramework', 'cellEditorParams', 'pinnedRowCellRendererFramework', 'pinnedRowCellRendererParams', 'filterFramework', 'filterParams', 'pivotValueColumn', 'headerComponent', 'headerComponentFramework', 'headerComponentParams', 'floatingFilterComponent', 'floatingFilterComponentParams', 'floatingFilterComponentFramework', 'tooltipComponent', 'tooltipComponentParams', 'tooltipComponentFramework', 'refData', 'columnsMenuParams'];\n ColDefUtil.ARRAY_PROPERTIES = ['children', 'sortingOrder', 'allowedAggFuncs', 'menuTabs', 'pivotTotalColumnIds', 'cellClassRules', 'icons'];\n ColDefUtil.NUMBER_PROPERTIES = ['sortedAt', 'sortIndex', 'initialSortIndex', 'flex', 'initialFlex', 'width', 'initialWidth', 'minWidth', 'maxWidth', 'rowGroupIndex', 'initialRowGroupIndex', 'pivotIndex', 'initialPivotIndex'];\n ColDefUtil.BOOLEAN_PROPERTIES = ['suppressCellFlash', 'suppressColumnsToolPanel', 'suppressFiltersToolPanel', 'openByDefault', 'marryChildren', 'hide', 'initialHide', 'rowGroup', 'initialRowGroup', 'pivot', 'initialPivot', 'checkboxSelection', 'showDisabledCheckboxes', 'headerCheckboxSelection', 'headerCheckboxSelectionFilteredOnly', 'suppressMenu', 'suppressMovable', 'lockPosition', 'lockVisible', 'lockPinned', 'unSortIcon', 'suppressSizeToFit', 'suppressAutoSize', 'enableRowGroup', 'enablePivot', 'enableValue', 'editable', 'suppressPaste', 'suppressNavigable', 'enableCellChangeFlash', 'rowDrag', 'dndSource', 'autoHeight', 'wrapText', 'sortable', 'resizable', 'singleClickEdit', 'floatingFilter', 'cellEditorPopup', 'suppressFillHandle', 'wrapHeaderText', 'autoHeaderHeight'];\n ColDefUtil.FUNCTION_PROPERTIES = ['dndSourceOnRowDrag', 'valueGetter', 'valueSetter', 'filterValueGetter', 'keyCreator', 'pinnedRowCellRenderer', 'valueFormatter', 'pinnedRowValueFormatter', 'valueParser', 'comparator', 'equals', 'pivotComparator', 'suppressKeyboardEvent', 'suppressHeaderKeyboardEvent', 'colSpan', 'rowSpan', 'getQuickFilterText', 'newValueHandler', 'onCellValueChanged', 'onCellClicked', 'onCellDoubleClicked', 'onCellContextMenu', 'rowDragText', 'tooltipValueGetter', 'tooltipComponent', 'tooltipComponentFramework', 'cellRendererSelector', 'cellEditorSelector'];\n ColDefUtil.ALL_PROPERTIES = __spread$j(ColDefUtil.ARRAY_PROPERTIES, ColDefUtil.OBJECT_PROPERTIES, ColDefUtil.STRING_PROPERTIES, ColDefUtil.NUMBER_PROPERTIES, ColDefUtil.FUNCTION_PROPERTIES, ColDefUtil.BOOLEAN_PROPERTIES);\n // used when doing property checks - this causes noise when using frameworks which can add their own fw specific\n // properties to colDefs, gridOptions etc\n ColDefUtil.FRAMEWORK_PROPERTIES = ['__ob__', '__v_skip', '__metadata__', 'mappedColumnProperties', 'hasChildColumns', 'toColDef', 'createColDefFromGridColumn'];\n return ColDefUtil;\n}();\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue\n * @version v28.2.1\n * @link https://www.ag-grid.com/\n * @license MIT\n */\nvar __read$o = undefined && undefined.__read || function (o, n) {\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\n if (!m) return o;\n var i = m.call(o),\n r,\n ar = [],\n e;\n try {\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\n } catch (error) {\n e = {\n error: error\n };\n } finally {\n try {\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\n } finally {\n if (e) throw e.error;\n }\n }\n return ar;\n};\nvar __spread$i = undefined && undefined.__spread || function () {\n for (var ar = [], i = 0; i < arguments.length; i++) ar = ar.concat(__read$o(arguments[i]));\n return ar;\n};\n/**\n * These keys are used for validating properties supplied on a gridOptions object, and for code generation.\n * If you change the properties on the gridOptions interface, you *must* update this file as well to be consistent.\n */\nvar PropertyKeys = /** @class */function () {\n function PropertyKeys() {}\n PropertyKeys.STRING_PROPERTIES = ['rowSelection', 'overlayLoadingTemplate', 'overlayNoRowsTemplate', 'quickFilterText', 'rowModelType', 'editType', 'domLayout', 'clipboardDelimiter', 'rowGroupPanelShow', 'multiSortKey', 'pivotColumnGroupTotals', 'pivotRowTotals', 'pivotPanelShow', 'fillHandleDirection', 'serverSideStoreType', 'groupDisplayType', 'treeDataDisplayType', 'colResizeDefault'];\n PropertyKeys.OBJECT_PROPERTIES = ['components', 'frameworkComponents', 'rowStyle', 'context', 'autoGroupColumnDef', 'localeText', 'icons', 'datasource', 'serverSideDatasource', 'viewportDatasource', 'groupRowRendererParams', 'aggFuncs', 'fullWidthCellRendererParams', 'defaultColGroupDef', 'defaultColDef', 'defaultExportParams', 'defaultCsvExportParams', 'defaultExcelExportParams', 'columnTypes', 'rowClassRules', 'detailCellRendererParams', 'loadingCellRendererParams', 'loadingOverlayComponentParams', 'noRowsOverlayComponentParams', 'popupParent', 'statusBar', 'sideBar', 'chartThemeOverrides', 'customChartThemes', 'chartToolPanelsDef'];\n PropertyKeys.ARRAY_PROPERTIES = ['sortingOrder', 'alignedGrids', 'rowData', 'columnDefs', 'excelStyles', 'pinnedTopRowData', 'pinnedBottomRowData', 'chartThemes', 'rowClass'];\n PropertyKeys.NUMBER_PROPERTIES = ['rowHeight', 'detailRowHeight', 'rowBuffer', 'colWidth', 'headerHeight', 'groupHeaderHeight', 'floatingFiltersHeight', 'pivotHeaderHeight', 'pivotGroupHeaderHeight', 'groupDefaultExpanded', 'minColWidth', 'maxColWidth', 'viewportRowModelPageSize', 'viewportRowModelBufferSize', 'autoSizePadding', 'maxBlocksInCache', 'maxConcurrentDatasourceRequests', 'tooltipShowDelay', 'tooltipHideDelay', 'cacheOverflowSize', 'paginationPageSize', 'cacheBlockSize', 'infiniteInitialRowCount', 'serverSideInitialRowCount', 'scrollbarWidth', 'batchUpdateWaitMillis', 'asyncTransactionWaitMillis', 'blockLoadDebounceMillis', 'keepDetailRowsCount', 'undoRedoCellEditingLimit', 'cellFlashDelay', 'cellFadeDelay', 'tabIndex'];\n PropertyKeys.BOOLEAN_PROPERTIES = ['suppressMakeColumnVisibleAfterUnGroup', 'suppressRowClickSelection', 'suppressCellSelection', 'suppressCellFocus', 'suppressHorizontalScroll', 'alwaysShowHorizontalScroll', 'alwaysShowVerticalScroll', 'debug', 'enableBrowserTooltips', 'enableCellExpressions', 'angularCompileRows', 'angularCompileFilters', 'groupSuppressAutoColumn', 'groupSelectsChildren', 'groupIncludeFooter', 'groupIncludeTotalFooter', 'groupUseEntireRow', 'groupSuppressBlankHeader', 'suppressMenuHide', 'suppressRowDeselection', 'unSortIcon', 'suppressMultiSort', 'alwaysMultiSort', 'singleClickEdit', 'suppressLoadingOverlay', 'suppressNoRowsOverlay', 'suppressAutoSize', 'skipHeaderOnAutoSize', 'suppressParentsInRowNodes', 'suppressColumnMoveAnimation', 'suppressMovableColumns', 'suppressFieldDotNotation', 'enableRangeSelection', 'enableRangeHandle', 'enableFillHandle', 'suppressClearOnFillReduction', 'deltaSort', 'suppressTouch', 'suppressAsyncEvents', 'allowContextMenuWithControlKey', 'suppressContextMenu', 'rememberGroupStateWhenNewData', 'enableCellChangeFlash', 'suppressDragLeaveHidesColumns', 'suppressRowGroupHidesColumns', 'suppressMiddleClickScrolls', 'suppressPreventDefaultOnMouseWheel', 'suppressCopyRowsToClipboard', 'copyHeadersToClipboard', 'copyGroupHeadersToClipboard', 'pivotMode', 'suppressAggFuncInHeader', 'suppressColumnVirtualisation', 'suppressAggAtRootLevel', 'suppressFocusAfterRefresh', 'functionsPassive', 'functionsReadOnly', 'animateRows', 'groupSelectsFiltered', 'groupRemoveSingleChildren', 'groupRemoveLowestSingleChildren', 'enableRtl', 'suppressClickEdit', 'rowDragEntireRow', 'rowDragManaged', 'suppressRowDrag', 'suppressMoveWhenRowDragging', 'rowDragMultiRow', 'enableGroupEdit', 'embedFullWidthRows', 'deprecatedEmbedFullWidthRows', 'suppressPaginationPanel', 'groupHideOpenParents', 'groupMultiAutoColumn', 'pagination', 'stopEditingWhenGridLosesFocus', 'paginationAutoPageSize', 'suppressScrollOnNewData', 'suppressScrollWhenPopupsAreOpen', 'purgeClosedRowNodes', 'cacheQuickFilter', 'deltaRowDataMode', 'ensureDomOrder', 'accentedSort', 'suppressChangeDetection', 'valueCache', 'valueCacheNeverExpires', 'aggregateOnlyChangedColumns', 'suppressAnimationFrame', 'suppressExcelExport', 'suppressCsvExport', 'treeData', 'masterDetail', 'suppressMultiRangeSelection', 'enterMovesDownAfterEdit', 'enterMovesDown', 'suppressPropertyNamesCheck', 'rowMultiSelectWithClick', 'suppressEnterpriseResetOnNewColumns', 'suppressRowHoverHighlight', 'suppressRowTransform', 'suppressClipboardPaste', 'suppressLastEmptyLineOnPaste', 'suppressSetColumnStateEvents', 'suppressColumnStateEvents', 'enableCharts', 'enableChartToolPanelsButton', 'deltaColumnMode', 'suppressMaintainUnsortedOrder', 'enableCellTextSelection', 'suppressBrowserResizeObserver', 'suppressMaxRenderedRowRestriction', 'excludeChildrenWhenTreeDataFiltering', 'tooltipMouseTrack', 'keepDetailRows', 'paginateChildRows', 'preventDefaultOnContextMenu', 'undoRedoCellEditing', 'allowDragFromColumnsToolPanel', 'immutableData', 'immutableColumns', 'pivotSuppressAutoColumn', 'suppressExpandablePivotGroups', 'applyColumnDefOrder', 'debounceVerticalScrollbar', 'detailRowAutoHeight', 'serverSideFilteringAlwaysResets', 'serverSideSortingAlwaysResets', 'serverSideSortAllLevels', 'serverSideFilterAllLevels', 'serverSideSortOnServer', 'serverSideFilterOnServer', 'suppressAggFilteredOnly', 'showOpenedGroup', 'suppressClipboardApi', 'suppressModelUpdateAfterUpdateTransaction', 'stopEditingWhenCellsLoseFocus', 'maintainColumnOrder', 'groupMaintainOrder', 'columnHoverHighlight', 'reactUi', 'suppressReactUi', 'readOnlyEdit', 'suppressRowVirtualisation', 'enableCellEditingOnBackspace', 'resetRowDataOnUpdate', 'removePivotHeaderRowWhenSingleValueColumn', 'suppressCopySingleCellRanges', 'groupRowsSticky', 'serverSideInfiniteScroll', 'rowGroupPanelSuppressSort', 'allowShowChangeAfterFilter'];\n /** You do not need to include event callbacks in this list, as they are generated automatically. */\n PropertyKeys.FUNCTIONAL_PROPERTIES = ['localeTextFunc', 'doesExternalFilterPass', 'groupRowAggNodes', 'isFullWidthCell', 'processSecondaryColDef', 'processSecondaryColGroupDef', 'processPivotResultColDef', 'processPivotResultColGroupDef', 'getBusinessKeyForNode', 'isRowSelectable', 'postSort', 'defaultGroupSortComparator', 'defaultGroupOrderComparator', 'rowDragText', 'groupRowInnerRenderer', 'groupRowInnerRendererFramework', 'groupRowRenderer', 'groupRowRendererFramework', 'fullWidthCellRenderer', 'fullWidthCellRendererFramework', 'loadingCellRenderer', 'loadingCellRendererFramework', 'loadingOverlayComponent', 'loadingOverlayComponentFramework', 'noRowsOverlayComponent', 'noRowsOverlayComponentFramework', 'detailCellRenderer', 'detailCellRendererFramework'];\n PropertyKeys.CALLBACK_PROPERTIES = ['getLocaleText', 'isExternalFilterPresent', 'getRowHeight', 'getRowClass', 'getRowStyle', 'getContextMenuItems', 'getMainMenuItems', 'processRowPostCreate', 'processCellForClipboard', 'getGroupRowAgg', 'getRowNodeId', 'isFullWidthRow', 'sendToClipboard', 'navigateToNextHeader', 'tabToNextHeader', 'navigateToNextCell', 'tabToNextCell', 'processCellFromClipboard', 'getDocument', 'postProcessPopup', 'getChildCount', 'getDataPath', 'isRowMaster', 'postSortRows', 'processHeaderForClipboard', 'processGroupHeaderForClipboard', 'paginationNumberFormatter', 'processDataFromClipboard', 'getServerSideGroupKey', 'isServerSideGroup', 'suppressKeyboardEvent', 'createChartContainer', 'getChartToolbarItems', 'fillOperation', 'isApplyServerSideTransaction', 'getServerSideStoreParams', 'getServerSideGroupLevelParams', 'isServerSideGroupOpenByDefault', 'isGroupOpenByDefault', 'initialGroupOrderComparator', 'loadingCellRendererSelector', 'getRowId', 'groupAggFiltering'];\n PropertyKeys.FUNCTION_PROPERTIES = __spread$i(PropertyKeys.FUNCTIONAL_PROPERTIES, PropertyKeys.CALLBACK_PROPERTIES);\n PropertyKeys.ALL_PROPERTIES = __spread$i(PropertyKeys.ARRAY_PROPERTIES, PropertyKeys.OBJECT_PROPERTIES, PropertyKeys.STRING_PROPERTIES, PropertyKeys.NUMBER_PROPERTIES, PropertyKeys.FUNCTION_PROPERTIES, PropertyKeys.BOOLEAN_PROPERTIES);\n /**\n * Used when performing property checks. This avoids noise caused when using frameworks, which can add their own\n * framework-specific properties to colDefs, gridOptions etc.\n */\n PropertyKeys.FRAMEWORK_PROPERTIES = ['__ob__', '__v_skip', '__metadata__', 'mappedColumnProperties', 'hasChildColumns', 'toColDef', 'createColDefFromGridColumn'];\n return PropertyKeys;\n}();\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue\n * @version v28.2.1\n * @link https://www.ag-grid.com/\n * @license MIT\n */\nvar __assign$h = undefined && undefined.__assign || function () {\n __assign$h = Object.assign || function (t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\n }\n return t;\n };\n return __assign$h.apply(this, arguments);\n};\nvar __read$n = undefined && undefined.__read || function (o, n) {\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\n if (!m) return o;\n var i = m.call(o),\n r,\n ar = [],\n e;\n try {\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\n } catch (error) {\n e = {\n error: error\n };\n } finally {\n try {\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\n } finally {\n if (e) throw e.error;\n }\n }\n return ar;\n};\nvar __spread$h = undefined && undefined.__spread || function () {\n for (var ar = [], i = 0; i < arguments.length; i++) ar = ar.concat(__read$n(arguments[i]));\n return ar;\n};\nvar ComponentUtil = /** @class */function () {\n function ComponentUtil() {}\n ComponentUtil.getEventCallbacks = function () {\n if (!ComponentUtil.EVENT_CALLBACKS) {\n ComponentUtil.EVENT_CALLBACKS = ComponentUtil.EVENTS.map(function (event) {\n return ComponentUtil.getCallbackForEvent(event);\n });\n }\n return ComponentUtil.EVENT_CALLBACKS;\n };\n ComponentUtil.copyAttributesToGridOptions = function (gridOptions, component, skipEventDeprecationCheck) {\n // create empty grid options if none were passed\n if (typeof gridOptions !== 'object') {\n gridOptions = {};\n }\n // to allow array style lookup in TypeScript, take type away from 'this' and 'gridOptions'\n var pGridOptions = gridOptions;\n var keyExists = function (key) {\n return typeof component[key] !== 'undefined';\n };\n // if groupAggFiltering exists and isn't a function, handle as a boolean.\n if (keyExists('groupAggFiltering') && typeof component.groupAggFiltering !== 'function') {\n pGridOptions.groupAggFiltering = ComponentUtil.toBoolean(component.groupAggFiltering);\n delete component.groupAggFiltering;\n }\n // add in all the simple properties\n __spread$h(ComponentUtil.ARRAY_PROPERTIES, ComponentUtil.STRING_PROPERTIES, ComponentUtil.OBJECT_PROPERTIES, ComponentUtil.FUNCTION_PROPERTIES, ComponentUtil.getEventCallbacks()).filter(keyExists).forEach(function (key) {\n return pGridOptions[key] = component[key];\n });\n ComponentUtil.BOOLEAN_PROPERTIES.filter(keyExists).forEach(function (key) {\n return pGridOptions[key] = ComponentUtil.toBoolean(component[key]);\n });\n ComponentUtil.NUMBER_PROPERTIES.filter(keyExists).forEach(function (key) {\n return pGridOptions[key] = ComponentUtil.toNumber(component[key]);\n });\n return gridOptions;\n };\n ComponentUtil.getCallbackForEvent = function (eventName) {\n if (!eventName || eventName.length < 2) {\n return eventName;\n }\n return 'on' + eventName[0].toUpperCase() + eventName.substr(1);\n };\n ComponentUtil.processOnChange = function (changes, gridOptions, api, columnApi) {\n if (!changes) {\n return;\n }\n var changesToApply = __assign$h({}, changes);\n // to allow array style lookup in TypeScript, take type away from 'this' and 'gridOptions'\n var pGridOptions = gridOptions;\n var keyExists = function (key) {\n return changesToApply[key];\n };\n // if groupAggFiltering exists and isn't a function, handle as a boolean.\n if (keyExists('groupAggFiltering')) {\n if (typeof changesToApply.groupAggFiltering === 'function') {\n pGridOptions.groupAggFiltering = changesToApply.groupAggFiltering;\n } else {\n pGridOptions.groupAggFiltering = ComponentUtil.toBoolean(changesToApply.groupAggFiltering);\n }\n delete changesToApply.groupAggFiltering;\n }\n if (keyExists('groupDisplayType')) {\n if (typeof changesToApply.groupDisplayType.currentValue === 'string') {\n api.setGroupDisplayType(changesToApply.groupDisplayType.currentValue);\n delete changesToApply.groupDisplayType;\n }\n }\n // ********* CODE ORDER TO AVOID BUGS *************** //\n // If you want to call an update method that just calls through to gridOptionsWrapper.setProperty then it needs to be\n // called before the values get copied across otherwise the change will not fire an event because the method\n // gridOptionsWrapper.setProperty does a diff check first.\n // All these manual calls are required in the current setup as changes to these properties are being listened to in the \n // rest of the code base which can be found by searching for: \"addManagedListener(this.gridOptionsWrapper\"\n if (changesToApply.domLayout) {\n api.setDomLayout(changesToApply.domLayout.currentValue);\n delete changesToApply.domLayout;\n }\n if (changesToApply.rowClass) {\n api.setRowClass(changesToApply.rowClass.currentValue);\n delete changesToApply.rowClass;\n }\n if (changesToApply.paginationPageSize) {\n api.paginationSetPageSize(ComponentUtil.toNumber(changesToApply.paginationPageSize.currentValue));\n delete changesToApply.paginationPageSize;\n }\n if (changesToApply.rowGroupPanelShow) {\n api.setRowGroupPanelShow(changesToApply.rowGroupPanelShow.currentValue);\n delete changesToApply.rowGroupPanelShow;\n }\n if (changesToApply.groupRemoveSingleChildren) {\n api.setGroupRemoveSingleChildren(ComponentUtil.toBoolean(changesToApply.groupRemoveSingleChildren.currentValue));\n delete changesToApply.groupRemoveSingleChildren;\n }\n if (changesToApply.groupRemoveLowestSingleChildren) {\n api.setGroupRemoveLowestSingleChildren(ComponentUtil.toBoolean(changesToApply.groupRemoveLowestSingleChildren.currentValue));\n delete changesToApply.groupRemoveLowestSingleChildren;\n }\n if (changesToApply.suppressRowDrag) {\n api.setSuppressRowDrag(ComponentUtil.toBoolean(changesToApply.suppressRowDrag.currentValue));\n delete changesToApply.suppressRowDrag;\n }\n if (changesToApply.suppressMoveWhenRowDragging) {\n api.setSuppressMoveWhenRowDragging(ComponentUtil.toBoolean(changesToApply.suppressMoveWhenRowDragging.currentValue));\n delete changesToApply.suppressMoveWhenRowDragging;\n }\n if (changesToApply.suppressRowClickSelection) {\n api.setSuppressRowClickSelection(ComponentUtil.toBoolean(changesToApply.suppressRowClickSelection.currentValue));\n delete changesToApply.suppressRowClickSelection;\n }\n if (changesToApply.suppressClipboardPaste) {\n api.setSuppressClipboardPaste(ComponentUtil.toBoolean(changesToApply.suppressClipboardPaste.currentValue));\n delete changesToApply.suppressClipboardPaste;\n }\n if (changesToApply.headerHeight) {\n api.setHeaderHeight(ComponentUtil.toNumber(changesToApply.headerHeight.currentValue));\n delete changesToApply.headerHeight;\n }\n if (changesToApply.pivotHeaderHeight) {\n api.setPivotHeaderHeight(ComponentUtil.toNumber(changesToApply.pivotHeaderHeight.currentValue));\n delete changesToApply.pivotHeaderHeight;\n }\n if (changesToApply.groupHeaderHeight) {\n api.setGroupHeaderHeight(ComponentUtil.toNumber(changesToApply.groupHeaderHeight.currentValue));\n delete changesToApply.groupHeaderHeight;\n }\n if (changesToApply.pivotGroupHeaderHeight) {\n api.setPivotGroupHeaderHeight(ComponentUtil.toNumber(changesToApply.pivotGroupHeaderHeight.currentValue));\n delete changesToApply.pivotGroupHeaderHeight;\n }\n if (changesToApply.floatingFiltersHeight) {\n api.setFloatingFiltersHeight(ComponentUtil.toNumber(changesToApply.floatingFiltersHeight.currentValue));\n delete changesToApply.floatingFiltersHeight;\n }\n if (changesToApply.functionsReadOnly) {\n api.setFunctionsReadOnly(ComponentUtil.toBoolean(changesToApply.functionsReadOnly.currentValue));\n delete changesToApply.functionsReadOnly;\n }\n // ********* CODE ORDER TO AVOID BUGS *************** //\n // check if any change for the simple types, and if so, then just copy in the new value\n __spread$h(ComponentUtil.ARRAY_PROPERTIES, ComponentUtil.OBJECT_PROPERTIES, ComponentUtil.STRING_PROPERTIES, ComponentUtil.getEventCallbacks()).filter(keyExists).forEach(function (key) {\n return pGridOptions[key] = changesToApply[key].currentValue;\n });\n ComponentUtil.BOOLEAN_PROPERTIES.filter(keyExists).forEach(function (key) {\n return pGridOptions[key] = ComponentUtil.toBoolean(changesToApply[key].currentValue);\n });\n ComponentUtil.NUMBER_PROPERTIES.filter(keyExists).forEach(function (key) {\n return pGridOptions[key] = ComponentUtil.toNumber(changesToApply[key].currentValue);\n });\n // ********* CODE ORDER TO AVOID BUGS *************** //\n // The following manual updates call directly into code models and rely on the simple copy being made by the\n // code above to keep gridOptions in sync with the change.\n if (changesToApply.enableCellTextSelection) {\n api.setEnableCellTextSelection(ComponentUtil.toBoolean(changesToApply.enableCellTextSelection.currentValue));\n delete changesToApply.enableCellTextSelection;\n }\n if (changesToApply.quickFilterText) {\n api.setQuickFilter(changesToApply.quickFilterText.currentValue);\n delete changesToApply.quickFilterText;\n }\n if (changesToApply.autoGroupColumnDef) {\n api.setAutoGroupColumnDef(changesToApply.autoGroupColumnDef.currentValue, \"gridOptionsChanged\");\n delete changesToApply.autoGroupColumnDef;\n }\n if (changesToApply.columnDefs) {\n api.setColumnDefs(changesToApply.columnDefs.currentValue, \"gridOptionsChanged\");\n delete changesToApply.columnDefs;\n }\n if (changesToApply.defaultColDef) {\n api.setDefaultColDef(changesToApply.defaultColDef.currentValue, \"gridOptionsChanged\");\n delete changesToApply.defaultColDef;\n }\n if (changesToApply.pivotMode) {\n columnApi.setPivotMode(ComponentUtil.toBoolean(changesToApply.pivotMode.currentValue));\n delete changesToApply.pivotMode;\n }\n // any remaining properties can be set in a generic way\n // ie the setter takes the form of setXXX and the argument requires no formatting/translation first\n var dynamicApi = api;\n Object.keys(changesToApply).forEach(function (property) {\n var setterName = \"set\" + property.charAt(0).toUpperCase() + property.substring(1);\n if (dynamicApi[setterName]) {\n dynamicApi[setterName](changes[property].currentValue);\n }\n });\n // copy changes into an event for dispatch\n var event = {\n type: Events.EVENT_COMPONENT_STATE_CHANGED\n };\n iterateObject(changes, function (key, value) {\n event[key] = value;\n });\n api.dispatchEvent(event);\n };\n ComponentUtil.toBoolean = function (value) {\n if (typeof value === 'boolean') {\n return value;\n }\n if (typeof value === 'string') {\n // for boolean, compare to empty String to allow attributes appearing with\n // no value to be treated as 'true'\n return value.toUpperCase() === 'TRUE' || value == '';\n }\n return false;\n };\n ComponentUtil.toNumber = function (value) {\n if (typeof value === 'number') {\n return value;\n }\n if (typeof value === 'string') {\n return Number(value);\n }\n };\n // all the events are populated in here AFTER this class (at the bottom of the file).\n ComponentUtil.EVENTS = [];\n // events that are available for use by users of AG Grid and so should be documented\n ComponentUtil.PUBLIC_EVENTS = [];\n // events that are internal to AG Grid and should not be exposed to users via documentation or generated framework components\n ComponentUtil.EXCLUDED_INTERNAL_EVENTS = [];\n ComponentUtil.STRING_PROPERTIES = PropertyKeys.STRING_PROPERTIES;\n ComponentUtil.OBJECT_PROPERTIES = PropertyKeys.OBJECT_PROPERTIES;\n ComponentUtil.ARRAY_PROPERTIES = PropertyKeys.ARRAY_PROPERTIES;\n ComponentUtil.NUMBER_PROPERTIES = PropertyKeys.NUMBER_PROPERTIES;\n ComponentUtil.BOOLEAN_PROPERTIES = PropertyKeys.BOOLEAN_PROPERTIES;\n ComponentUtil.FUNCTION_PROPERTIES = PropertyKeys.FUNCTION_PROPERTIES;\n ComponentUtil.ALL_PROPERTIES = PropertyKeys.ALL_PROPERTIES;\n return ComponentUtil;\n}();\nComponentUtil.EVENTS = values(Events);\n/** Exclude the following internal events from code generation to prevent exposing these events via framework components */\nComponentUtil.EXCLUDED_INTERNAL_EVENTS = [Events.EVENT_SCROLLBAR_WIDTH_CHANGED, Events.EVENT_CHECKBOX_CHANGED, Events.EVENT_HEIGHT_SCALE_CHANGED, Events.EVENT_BODY_HEIGHT_CHANGED, Events.EVENT_DISPLAYED_COLUMNS_WIDTH_CHANGED, Events.EVENT_SCROLL_VISIBILITY_CHANGED, Events.EVENT_COLUMN_HOVER_CHANGED, Events.EVENT_FLASH_CELLS, Events.EVENT_PAGINATION_PIXEL_OFFSET_CHANGED, Events.EVENT_DISPLAYED_ROWS_CHANGED, Events.EVENT_LEFT_PINNED_WIDTH_CHANGED, Events.EVENT_RIGHT_PINNED_WIDTH_CHANGED, Events.EVENT_ROW_CONTAINER_HEIGHT_CHANGED, Events.EVENT_POPUP_TO_FRONT, Events.EVENT_KEYBOARD_FOCUS, Events.EVENT_MOUSE_FOCUS, Events.EVENT_STORE_UPDATED, Events.EVENT_COLUMN_PANEL_ITEM_DRAG_START, Events.EVENT_COLUMN_PANEL_ITEM_DRAG_END, Events.EVENT_FILL_START, Events.EVENT_FILL_END, Events.EVENT_KEY_SHORTCUT_CHANGED_CELL_START, Events.EVENT_KEY_SHORTCUT_CHANGED_CELL_END, Events.EVENT_FULL_WIDTH_ROW_FOCUSED, Events.EVENT_HEADER_HEIGHT_CHANGED, Events.EVENT_COLUMN_HEADER_HEIGHT_CHANGED];\n/** EVENTS that should be exposed via code generation for the framework components. */\nComponentUtil.PUBLIC_EVENTS = ComponentUtil.EVENTS.filter(function (e) {\n return !includes(ComponentUtil.EXCLUDED_INTERNAL_EVENTS, e);\n});\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue\n * @version v28.2.1\n * @link https://www.ag-grid.com/\n * @license MIT\n */\nvar SideBarDefParser = /** @class */function () {\n function SideBarDefParser() {}\n SideBarDefParser.parse = function (toParse) {\n if (!toParse) {\n return null;\n }\n if (toParse === true) {\n return {\n toolPanels: [SideBarDefParser.DEFAULT_COLUMN_COMP, SideBarDefParser.DEFAULT_FILTER_COMP],\n defaultToolPanel: 'columns'\n };\n }\n if (typeof toParse === 'string') {\n return SideBarDefParser.parse([toParse]);\n }\n if (Array.isArray(toParse)) {\n var comps_1 = [];\n toParse.forEach(function (key) {\n var lookupResult = SideBarDefParser.DEFAULT_BY_KEY[key];\n if (!lookupResult) {\n console.warn(\"AG Grid: the key \" + key + \" is not a valid key for specifying a tool panel, valid keys are: \" + Object.keys(SideBarDefParser.DEFAULT_BY_KEY).join(','));\n return;\n }\n comps_1.push(lookupResult);\n });\n if (comps_1.length === 0) {\n return null;\n }\n return {\n toolPanels: comps_1,\n defaultToolPanel: comps_1[0].id\n };\n }\n var result = {\n toolPanels: SideBarDefParser.parseComponents(toParse.toolPanels),\n defaultToolPanel: toParse.defaultToolPanel,\n hiddenByDefault: toParse.hiddenByDefault,\n position: toParse.position\n };\n return result;\n };\n SideBarDefParser.parseComponents = function (from) {\n var result = [];\n if (!from) {\n return result;\n }\n from.forEach(function (it) {\n var toAdd = null;\n if (typeof it === 'string') {\n var lookupResult = SideBarDefParser.DEFAULT_BY_KEY[it];\n if (!lookupResult) {\n console.warn(\"AG Grid: the key \" + it + \" is not a valid key for specifying a tool panel, valid keys are: \" + Object.keys(SideBarDefParser.DEFAULT_BY_KEY).join(','));\n return;\n }\n toAdd = lookupResult;\n } else {\n toAdd = it;\n }\n result.push(toAdd);\n });\n return result;\n };\n SideBarDefParser.DEFAULT_COLUMN_COMP = {\n id: 'columns',\n labelDefault: 'Columns',\n labelKey: 'columns',\n iconKey: 'columns',\n toolPanel: 'agColumnsToolPanel'\n };\n SideBarDefParser.DEFAULT_FILTER_COMP = {\n id: 'filters',\n labelDefault: 'Filters',\n labelKey: 'filters',\n iconKey: 'filter',\n toolPanel: 'agFiltersToolPanel'\n };\n SideBarDefParser.DEFAULT_BY_KEY = {\n columns: SideBarDefParser.DEFAULT_COLUMN_COMP,\n filters: SideBarDefParser.DEFAULT_FILTER_COMP\n };\n return SideBarDefParser;\n}();\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue\n * @version v28.2.1\n * @link https://www.ag-grid.com/\n * @license MIT\n */\nvar __values$5 = undefined && undefined.__values || function (o) {\n var s = typeof Symbol === \"function\" && Symbol.iterator,\n m = s && o[s],\n i = 0;\n if (m) return m.call(o);\n if (o && typeof o.length === \"number\") return {\n next: function () {\n if (o && i >= o.length) o = void 0;\n return {\n value: o && o[i++],\n done: !o\n };\n }\n };\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\n};\n/**\n * These variables are lazy loaded, as otherwise they try and get initialised when we are loading\n * unit tests and we don't have references to window or document in the unit tests\n * from http://stackoverflow.com/questions/9847580/how-to-detect-safari-chrome-ie-firefox-and-opera-browser\n */\nvar isSafari;\nvar isIE;\nvar isEdge;\nvar isChrome;\nvar isFirefox;\nvar isMacOs;\nvar isIOS;\nvar invisibleScrollbar;\nvar browserScrollbarWidth;\nvar browserInfo;\n/**\n * from https://stackoverflow.com/a/16938481/1388233\n */\nfunction getBrowserInfo() {\n if (browserInfo) {\n return browserInfo;\n }\n var userAgent = navigator.userAgent;\n var match = userAgent.match(/(opera|chrome|safari|firefox|msie|trident(?=\\/))\\/?\\s*(\\d+)/i) || [];\n var tem;\n var version;\n if (/trident/i.test(match[1])) {\n tem = /\\brv[ :]+(\\d+)/g.exec(userAgent) || [];\n version = tem[1] != null ? parseFloat(tem[1]) : 0;\n return {\n name: 'IE',\n version: version\n };\n }\n if (match[1] === 'Chrome') {\n tem = userAgent.match(/\\bOPR|Edge\\/(\\d+)/);\n if (tem != null) {\n version = tem[1] != null ? parseFloat(tem[1]) : 0;\n return {\n name: 'Opera',\n version: version\n };\n }\n }\n match = match[2] ? [match[1], match[2]] : [navigator.appName, navigator.appVersion, '-?'];\n tem = userAgent.match(/version\\/(\\d+)/i);\n if (tem != null) {\n match.splice(1, 1, tem[1]);\n }\n var name = match[0];\n version = match[1] != null ? parseFloat(match[1]) : 0;\n browserInfo = {\n name: name,\n version: version\n };\n return browserInfo;\n}\nfunction isBrowserIE() {\n if (isIE === undefined) {\n isIE = /*@cc_on!@*/!!document.documentMode; // At least IE6\n }\n return isIE;\n}\nfunction isBrowserEdge() {\n if (isEdge === undefined) {\n isEdge = !isBrowserIE() && !!window.StyleMedia;\n }\n return isEdge;\n}\nfunction isBrowserSafari() {\n if (isSafari === undefined) {\n // taken from https://stackoverflow.com/a/23522755/1388233\n isSafari = /^((?!chrome|android).)*safari/i.test(navigator.userAgent);\n }\n return isSafari;\n}\nfunction isBrowserChrome() {\n if (isChrome === undefined) {\n var win = window;\n isChrome = !!win.chrome && (!!win.chrome.webstore || !!win.chrome.runtime) || /Chrome/.test(navigator.userAgent) && /Google Inc/.test(navigator.vendor);\n }\n return isChrome;\n}\nfunction isBrowserFirefox() {\n if (isFirefox === undefined) {\n var win = window;\n isFirefox = typeof win.InstallTrigger !== 'undefined';\n }\n return isFirefox;\n}\nfunction isMacOsUserAgent() {\n if (isMacOs === undefined) {\n isMacOs = /(Mac|iPhone|iPod|iPad)/i.test(navigator.platform);\n }\n return isMacOs;\n}\nfunction isIOSUserAgent() {\n if (isIOS === undefined) {\n // taken from https://stackoverflow.com/a/58064481/1388233\n isIOS = (/iPad|iPhone|iPod/.test(navigator.platform) ||\n // eslint-disable-next-line\n navigator.platform === 'MacIntel' && navigator.maxTouchPoints > 1) &&\n // @ts-ignore\n !window.MSStream;\n }\n return isIOS;\n}\nfunction browserSupportsPreventScroll() {\n // all browsers except safari support focus({ preventScroll: true }).\n // this feature was added on Safari 15+\n return !isBrowserSafari() || getBrowserInfo().version >= 15;\n}\nfunction getTabIndex(el) {\n if (!el) {\n return null;\n }\n var numberTabIndex = el.tabIndex;\n var tabIndex = el.getAttribute('tabIndex');\n if (numberTabIndex === -1 && (tabIndex === null || tabIndex === '' && !isBrowserFirefox())) {\n return null;\n }\n return numberTabIndex.toString();\n}\nfunction getMaxDivHeight() {\n if (!document.body) {\n return -1;\n }\n var res = 1000000;\n // FF reports the height back but still renders blank after ~6M px\n var testUpTo = navigator.userAgent.toLowerCase().match(/firefox/) ? 6000000 : 1000000000;\n var div = document.createElement('div');\n document.body.appendChild(div);\n while (true) {\n var test = res * 2;\n div.style.height = test + 'px';\n if (test > testUpTo || div.clientHeight !== test) {\n break;\n } else {\n res = test;\n }\n }\n document.body.removeChild(div);\n return res;\n}\nfunction getScrollbarWidth() {\n if (browserScrollbarWidth == null) {\n initScrollbarWidthAndVisibility();\n }\n return browserScrollbarWidth;\n}\nfunction initScrollbarWidthAndVisibility() {\n var body = document.body;\n var div = document.createElement('div');\n div.style.width = div.style.height = '100px';\n div.style.opacity = '0';\n div.style.overflow = 'scroll';\n div.style.msOverflowStyle = 'scrollbar'; // needed for WinJS apps\n div.style.position = 'absolute';\n body.appendChild(div);\n var width = div.offsetWidth - div.clientWidth;\n // if width is 0 and client width is 0, means the DOM isn't ready\n if (width === 0 && div.clientWidth === 0) {\n width = null;\n }\n // remove div\n if (div.parentNode) {\n div.parentNode.removeChild(div);\n }\n if (width != null) {\n browserScrollbarWidth = width;\n invisibleScrollbar = width === 0;\n }\n}\nfunction isInvisibleScrollbar() {\n if (invisibleScrollbar == null) {\n initScrollbarWidthAndVisibility();\n }\n return invisibleScrollbar;\n}\n/** @deprecated */\nfunction hasOverflowScrolling() {\n var e_1, _a;\n var prefixes = ['webkit', 'moz', 'o', 'ms'];\n var div = document.createElement('div');\n var body = document.getElementsByTagName('body')[0];\n var found = false;\n var p;\n body.appendChild(div);\n div.setAttribute('style', prefixes.map(function (prefix) {\n return \"-\" + prefix + \"-overflow-scrolling: touch\";\n }).concat('overflow-scrolling: touch').join(';'));\n var computedStyle = window.getComputedStyle(div);\n if (computedStyle.overflowScrolling === 'touch') {\n found = true;\n }\n if (!found) {\n try {\n for (var prefixes_1 = __values$5(prefixes), prefixes_1_1 = prefixes_1.next(); !prefixes_1_1.done; prefixes_1_1 = prefixes_1.next()) {\n p = prefixes_1_1.value;\n if (computedStyle[p + \"OverflowScrolling\"] === 'touch') {\n found = true;\n break;\n }\n }\n } catch (e_1_1) {\n e_1 = {\n error: e_1_1\n };\n } finally {\n try {\n if (prefixes_1_1 && !prefixes_1_1.done && (_a = prefixes_1.return)) _a.call(prefixes_1);\n } finally {\n if (e_1) throw e_1.error;\n }\n }\n }\n if (div.parentNode) {\n div.parentNode.removeChild(div);\n }\n return found;\n}\n/**\n * Gets the document body width\n * from: http://stackoverflow.com/questions/1038727/how-to-get-browser-width-using-javascript-code\n * @returns {number}\n */\nfunction getBodyWidth() {\n if (document.body) {\n return document.body.clientWidth;\n }\n if (window.innerHeight) {\n return window.innerWidth;\n }\n if (document.documentElement && document.documentElement.clientWidth) {\n return document.documentElement.clientWidth;\n }\n return -1;\n}\n/**\n * Gets the body height\n * from: http://stackoverflow.com/questions/1038727/how-to-get-browser-width-using-javascript-code\n * @returns {number}\n */\nfunction getBodyHeight() {\n if (document.body) {\n return document.body.clientHeight;\n }\n if (window.innerHeight) {\n return window.innerHeight;\n }\n if (document.documentElement && document.documentElement.clientHeight) {\n return document.documentElement.clientHeight;\n }\n return -1;\n}\nvar BrowserUtils = /*#__PURE__*/Object.freeze({\n __proto__: null,\n getBrowserInfo: getBrowserInfo,\n isBrowserEdge: isBrowserEdge,\n isBrowserSafari: isBrowserSafari,\n isBrowserChrome: isBrowserChrome,\n isBrowserFirefox: isBrowserFirefox,\n isMacOsUserAgent: isMacOsUserAgent,\n isIOSUserAgent: isIOSUserAgent,\n browserSupportsPreventScroll: browserSupportsPreventScroll,\n getTabIndex: getTabIndex,\n getMaxDivHeight: getMaxDivHeight,\n getScrollbarWidth: getScrollbarWidth,\n isInvisibleScrollbar: isInvisibleScrollbar,\n hasOverflowScrolling: hasOverflowScrolling,\n getBodyWidth: getBodyWidth,\n getBodyHeight: getBodyHeight\n});\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue\n * @version v28.2.1\n * @link https://www.ag-grid.com/\n * @license MIT\n */\nfunction fuzzyCheckStrings(inputValues, validValues, allSuggestions) {\n var fuzzyMatches = {};\n var invalidInputs = inputValues.filter(function (inputValue) {\n return !validValues.some(function (validValue) {\n return validValue === inputValue;\n });\n });\n if (invalidInputs.length > 0) {\n invalidInputs.forEach(function (invalidInput) {\n return fuzzyMatches[invalidInput] = fuzzySuggestions(invalidInput, allSuggestions);\n });\n }\n return fuzzyMatches;\n}\n/**\n *\n * @param {String} inputValue The value to be compared against a list of strings\n * @param allSuggestions The list of strings to be compared against\n * @param hideIrrelevant By default, fuzzy suggestions will just sort the allSuggestions list, set this to true\n * to filter out the irrelevant values\n * @param weighted Set this to true, to make letters matched in the order they were typed have priority in the results.\n */\nfunction fuzzySuggestions(inputValue, allSuggestions, hideIrrelevant, weighted) {\n var search = weighted ? string_weighted_distances : string_distances;\n var thisSuggestions = allSuggestions.map(function (text) {\n return {\n value: text,\n relevance: search(inputValue.toLowerCase(), text.toLocaleLowerCase())\n };\n });\n thisSuggestions.sort(function (a, b) {\n return b.relevance - a.relevance;\n });\n if (hideIrrelevant) {\n thisSuggestions = thisSuggestions.filter(function (suggestion) {\n return suggestion.relevance !== 0;\n });\n }\n return thisSuggestions.map(function (suggestion) {\n return suggestion.value;\n });\n}\n/**\n * Algorithm to do fuzzy search\n * from https://stackoverflow.com/questions/23305000/javascript-fuzzy-search-that-makes-sense\n * @param {string} from\n * @return {[]}\n */\nfunction get_bigrams(from) {\n var s = from.toLowerCase();\n var v = new Array(s.length - 1);\n var i;\n var j;\n var ref;\n for (i = j = 0, ref = v.length; j <= ref; i = j += 1) {\n v[i] = s.slice(i, i + 2);\n }\n return v;\n}\nfunction string_distances(str1, str2) {\n if (str1.length === 0 && str2.length === 0) {\n return 0;\n }\n var pairs1 = get_bigrams(str1);\n var pairs2 = get_bigrams(str2);\n var union = pairs1.length + pairs2.length;\n var hit_count = 0;\n var j;\n var len;\n for (j = 0, len = pairs1.length; j < len; j++) {\n var x = pairs1[j];\n var k = void 0;\n var len1 = void 0;\n for (k = 0, len1 = pairs2.length; k < len1; k++) {\n var y = pairs2[k];\n if (x === y) {\n hit_count++;\n }\n }\n }\n return hit_count > 0 ? 2 * hit_count / union : 0;\n}\nfunction string_weighted_distances(str1, str2) {\n var a = str1.replace(/\\s/g, '');\n var b = str2.replace(/\\s/g, '');\n var weight = 0;\n var lastIndex = 0;\n for (var i = 0; i < a.length; i++) {\n var idx = b.indexOf(a[i], lastIndex);\n if (idx === -1) {\n continue;\n }\n lastIndex = idx;\n weight += 100 - lastIndex * 100 / 10000 * 100;\n }\n return weight;\n}\nvar FuzzyMatchUtils = /*#__PURE__*/Object.freeze({\n __proto__: null,\n fuzzyCheckStrings: fuzzyCheckStrings,\n fuzzySuggestions: fuzzySuggestions,\n get_bigrams: get_bigrams,\n string_distances: string_distances,\n string_weighted_distances: string_weighted_distances\n});\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue\n * @version v28.2.1\n * @link https://www.ag-grid.com/\n * @license MIT\n */\nfunction padStartWidthZeros(value, totalStringSize) {\n return value.toString().padStart(totalStringSize, '0');\n}\nfunction createArrayOfNumbers(first, last) {\n var result = [];\n for (var i = first; i <= last; i++) {\n result.push(i);\n }\n return result;\n}\n/**\n * Check if a value is numeric\n * from http://stackoverflow.com/questions/9716468/is-there-any-function-like-isnumeric-in-javascript-to-validate-numbers\n * @param {any} value\n * @return {boolean}\n */\nfunction isNumeric(value) {\n return value !== '' && !isNaN(parseFloat(value)) && isFinite(value);\n}\nfunction cleanNumber(value) {\n if (typeof value === 'string') {\n value = parseInt(value, 10);\n }\n if (typeof value === 'number') {\n return Math.floor(value);\n }\n return null;\n}\nfunction decToHex(number, bytes) {\n var hex = '';\n for (var i = 0; i < bytes; i++) {\n hex += String.fromCharCode(number & 0xff);\n number >>>= 8;\n }\n return hex;\n}\nfunction formatNumberTwoDecimalPlacesAndCommas(value, thousandSeparator, decimalSeparator) {\n if (typeof value !== 'number') {\n return '';\n }\n return formatNumberCommas(Math.round(value * 100) / 100, thousandSeparator, decimalSeparator);\n}\n/**\n * the native method number.toLocaleString(undefined, {minimumFractionDigits: 0})\n * puts in decimal places in IE, so we use this method instead\n * from: http://blog.tompawlak.org/number-currency-formatting-javascript\n * @param {number} value\n * @returns {string}\n */\nfunction formatNumberCommas(value, thousandSeparator, decimalSeparator) {\n if (typeof value !== 'number') {\n return '';\n }\n return value.toString().replace('.', decimalSeparator).replace(/(\\d)(?=(\\d{3})+(?!\\d))/g, \"$1\" + thousandSeparator);\n}\nfunction sum(values) {\n return values == null ? null : values.reduce(function (total, value) {\n return total + value;\n }, 0);\n}\nvar NumberUtils = /*#__PURE__*/Object.freeze({\n __proto__: null,\n padStartWidthZeros: padStartWidthZeros,\n createArrayOfNumbers: createArrayOfNumbers,\n isNumeric: isNumeric,\n cleanNumber: cleanNumber,\n decToHex: decToHex,\n formatNumberTwoDecimalPlacesAndCommas: formatNumberTwoDecimalPlacesAndCommas,\n formatNumberCommas: formatNumberCommas,\n sum: sum\n});\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue\n * @version v28.2.1\n * @link https://www.ag-grid.com/\n * @license MIT\n */\nvar __assign$g = undefined && undefined.__assign || function () {\n __assign$g = Object.assign || function (t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\n }\n return t;\n };\n return __assign$g.apply(this, arguments);\n};\nvar __decorate$2v = undefined && undefined.__decorate || function (decorators, target, key, desc) {\n var c = arguments.length,\n r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc,\n d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nvar __param$8 = undefined && undefined.__param || function (paramIndex, decorator) {\n return function (target, key) {\n decorator(target, key, paramIndex);\n };\n};\nvar __read$m = undefined && undefined.__read || function (o, n) {\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\n if (!m) return o;\n var i = m.call(o),\n r,\n ar = [],\n e;\n try {\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\n } catch (error) {\n e = {\n error: error\n };\n } finally {\n try {\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\n } finally {\n if (e) throw e.error;\n }\n }\n return ar;\n};\nvar __spread$g = undefined && undefined.__spread || function () {\n for (var ar = [], i = 0; i < arguments.length; i++) ar = ar.concat(__read$m(arguments[i]));\n return ar;\n};\nvar DEFAULT_ROW_HEIGHT = 25;\nvar DEFAULT_DETAIL_ROW_HEIGHT = 300;\nvar DEFAULT_VIEWPORT_ROW_MODEL_PAGE_SIZE = 5;\nvar DEFAULT_VIEWPORT_ROW_MODEL_BUFFER_SIZE = 5;\nvar DEFAULT_KEEP_DETAIL_ROW_COUNT = 10;\nfunction isTrue(value) {\n return value === true || value === 'true';\n}\nfunction toNumber(value) {\n if (typeof value == 'number') {\n return value;\n }\n if (typeof value == 'string') {\n return parseInt(value, 10);\n }\n}\nfunction zeroOrGreater(value, defaultValue) {\n if (value >= 0) {\n return value;\n }\n // zero gets returned if number is missing or the wrong type\n return defaultValue;\n}\nfunction oneOrGreater(value, defaultValue) {\n var valueNumber = parseInt(value, 10);\n if (isNumeric(valueNumber) && valueNumber > 0) {\n return valueNumber;\n }\n return defaultValue;\n}\nvar GridOptionsWrapper = /** @class */function () {\n function GridOptionsWrapper() {\n this.propertyEventService = new EventService();\n this.domDataKey = '__AG_' + Math.random().toString();\n this.destroyed = false;\n }\n GridOptionsWrapper_1 = GridOptionsWrapper;\n GridOptionsWrapper.prototype.agWire = function (gridApi, columnApi) {\n this.gridOptions.api = gridApi;\n this.gridOptions.columnApi = columnApi;\n this.checkForDeprecated();\n this.checkForViolations();\n };\n GridOptionsWrapper.prototype.destroy = function () {\n // need to remove these, as we don't own the lifecycle of the gridOptions, we need to\n // remove the references in case the user keeps the grid options, we want the rest\n // of the grid to be picked up by the garbage collector\n this.gridOptions.api = null;\n this.gridOptions.columnApi = null;\n this.destroyed = true;\n };\n GridOptionsWrapper.prototype.init = function () {\n var _this = this;\n if (this.gridOptions.suppressPropertyNamesCheck !== true) {\n this.checkGridOptionsProperties();\n this.checkColumnDefProperties();\n }\n // parse side bar options into correct format\n if (this.gridOptions.sideBar != null) {\n this.gridOptions.sideBar = SideBarDefParser.parse(this.gridOptions.sideBar);\n }\n var async = this.useAsyncEvents();\n this.eventService.addGlobalListener(this.globalEventHandler.bind(this), async);\n if (this.isGroupSelectsChildren() && this.isSuppressParentsInRowNodes()) {\n console.warn(\"AG Grid: 'groupSelectsChildren' does not work with 'suppressParentsInRowNodes', this selection method needs the part in rowNode to work\");\n }\n if (this.isGroupSelectsChildren()) {\n if (!this.isRowSelectionMulti()) {\n console.warn(\"AG Grid: rowSelection must be 'multiple' for groupSelectsChildren to make sense\");\n }\n if (this.isRowModelServerSide()) {\n console.warn('AG Grid: group selects children is NOT support for Server Side Row Model. ' + 'This is because the rows are lazy loaded, so selecting a group is not possible as' + 'the grid has no way of knowing what the children are.');\n }\n }\n if (this.isGroupRemoveSingleChildren() && this.isGroupHideOpenParents()) {\n console.warn(\"AG Grid: groupRemoveSingleChildren and groupHideOpenParents do not work with each other, you need to pick one. And don't ask us how to use these together on our support forum either, you will get the same answer!\");\n }\n if (this.isRowModelServerSide()) {\n var msg = function (prop) {\n return \"AG Grid: '\" + prop + \"' is not supported on the Server-Side Row Model\";\n };\n if (exists(this.gridOptions.groupDefaultExpanded)) {\n console.warn(msg('groupDefaultExpanded'));\n }\n if (exists(this.gridOptions.groupDefaultExpanded)) {\n console.warn(msg('groupIncludeFooter'));\n }\n if (exists(this.gridOptions.groupDefaultExpanded)) {\n console.warn(msg('groupIncludeTotalFooter'));\n }\n }\n if (isTrue(this.gridOptions.enableRangeSelection)) {\n ModuleRegistry.assertRegistered(ModuleNames.RangeSelectionModule, 'enableRangeSelection');\n } else if (this.isEnableRangeHandle() || this.isEnableFillHandle()) {\n console.warn(\"AG Grid: 'enableRangeHandle' or 'enableFillHandle' will not work unless 'enableRangeSelection' is set to true\");\n }\n if (this.isGroupRowsSticky()) {\n if (this.isGroupHideOpenParents()) {\n console.warn(\"AG Grid: groupRowsSticky and groupHideOpenParents do not work with each other, you need to pick one.\");\n }\n if (this.isMasterDetail()) {\n console.warn(\"AG Grid: groupRowsSticky and masterDetail do not work with each other, you need to pick one.\");\n }\n if (this.isPagination()) {\n console.warn(\"AG Grid: groupRowsSticky and pagination do not work with each other, you need to pick one.\");\n }\n }\n var warnOfDeprecaredIcon = function (name) {\n if (_this.gridOptions.icons && _this.gridOptions.icons[name]) {\n console.warn(\"gridOptions.icons.\" + name + \" is no longer supported. For information on how to style checkboxes and radio buttons, see https://www.ag-grid.com/javascript-grid-icons/\");\n }\n };\n warnOfDeprecaredIcon('radioButtonOff');\n warnOfDeprecaredIcon('radioButtonOn');\n warnOfDeprecaredIcon('checkboxChecked');\n warnOfDeprecaredIcon('checkboxUnchecked');\n warnOfDeprecaredIcon('checkboxIndeterminate');\n // sets an initial calculation for the scrollbar width\n this.getScrollbarWidth();\n };\n GridOptionsWrapper.prototype.checkColumnDefProperties = function () {\n var _this = this;\n if (this.gridOptions.columnDefs == null) {\n return;\n }\n this.gridOptions.columnDefs.forEach(function (colDef) {\n var userProperties = Object.getOwnPropertyNames(colDef);\n var validProperties = __spread$g(ColDefUtil.ALL_PROPERTIES, ColDefUtil.FRAMEWORK_PROPERTIES);\n _this.checkProperties(userProperties, validProperties, validProperties, 'colDef', 'https://www.ag-grid.com/javascript-grid-column-properties/');\n });\n };\n GridOptionsWrapper.prototype.checkGridOptionsProperties = function () {\n var userProperties = Object.getOwnPropertyNames(this.gridOptions);\n var validProperties = __spread$g(PropertyKeys.ALL_PROPERTIES, PropertyKeys.FRAMEWORK_PROPERTIES, values(Events).map(function (event) {\n return ComponentUtil.getCallbackForEvent(event);\n }));\n var validPropertiesAndExceptions = __spread$g(validProperties, ['api', 'columnApi']);\n this.checkProperties(userProperties, validPropertiesAndExceptions, validProperties, 'gridOptions', 'https://www.ag-grid.com/javascript-data-grid/grid-options/');\n };\n GridOptionsWrapper.prototype.checkProperties = function (userProperties, validPropertiesAndExceptions, validProperties, containerName, docsUrl) {\n var invalidProperties = fuzzyCheckStrings(userProperties, validPropertiesAndExceptions, validProperties);\n iterateObject(invalidProperties, function (key, value) {\n console.warn(\"ag-grid: invalid \" + containerName + \" property '\" + key + \"' did you mean any of these: \" + value.slice(0, 8).join(\", \"));\n });\n if (Object.keys(invalidProperties).length > 0) {\n console.warn(\"ag-grid: to see all the valid \" + containerName + \" properties please check: \" + docsUrl);\n }\n };\n /**\n * Wrap the user callback and attach the api, columnApi and context to the params object on the way through.\n * @param callback User provided callback\n * @returns Wrapped callback where the params object not require api, columnApi and context\n */\n GridOptionsWrapper.prototype.mergeGridCommonParams = function (callback) {\n var _this = this;\n if (callback) {\n var wrapped = function (callbackParams) {\n var mergedParams = __assign$g(__assign$g({}, callbackParams), {\n api: _this.getApi(),\n columnApi: _this.getColumnApi(),\n context: _this.getContext()\n });\n return callback(mergedParams);\n };\n return wrapped;\n }\n return callback;\n };\n GridOptionsWrapper.prototype.getDomDataKey = function () {\n return this.domDataKey;\n };\n // returns the dom data, or undefined if not found\n GridOptionsWrapper.prototype.getDomData = function (element, key) {\n var domData = element[this.getDomDataKey()];\n return domData ? domData[key] : undefined;\n };\n GridOptionsWrapper.prototype.setDomData = function (element, key, value) {\n var domDataKey = this.getDomDataKey();\n var domData = element[domDataKey];\n if (missing(domData)) {\n domData = {};\n element[domDataKey] = domData;\n }\n domData[key] = value;\n };\n GridOptionsWrapper.prototype.isRowSelection = function () {\n return this.gridOptions.rowSelection === 'single' || this.gridOptions.rowSelection === 'multiple';\n };\n GridOptionsWrapper.prototype.isSuppressRowDeselection = function () {\n return isTrue(this.gridOptions.suppressRowDeselection);\n };\n GridOptionsWrapper.prototype.isRowSelectionMulti = function () {\n return this.gridOptions.rowSelection === 'multiple';\n };\n GridOptionsWrapper.prototype.isRowMultiSelectWithClick = function () {\n return isTrue(this.gridOptions.rowMultiSelectWithClick);\n };\n GridOptionsWrapper.prototype.getContext = function () {\n return this.gridOptions.context;\n };\n GridOptionsWrapper.prototype.isPivotMode = function () {\n return isTrue(this.gridOptions.pivotMode);\n };\n GridOptionsWrapper.prototype.isSuppressExpandablePivotGroups = function () {\n return isTrue(this.gridOptions.suppressExpandablePivotGroups);\n };\n GridOptionsWrapper.prototype.getPivotColumnGroupTotals = function () {\n return this.gridOptions.pivotColumnGroupTotals;\n };\n GridOptionsWrapper.prototype.getPivotRowTotals = function () {\n return this.gridOptions.pivotRowTotals;\n };\n GridOptionsWrapper.prototype.isRowModelInfinite = function () {\n return this.gridOptions.rowModelType === Constants.ROW_MODEL_TYPE_INFINITE;\n };\n GridOptionsWrapper.prototype.isRowModelViewport = function () {\n return this.gridOptions.rowModelType === Constants.ROW_MODEL_TYPE_VIEWPORT;\n };\n GridOptionsWrapper.prototype.isRowModelServerSide = function () {\n return this.gridOptions.rowModelType === Constants.ROW_MODEL_TYPE_SERVER_SIDE;\n };\n GridOptionsWrapper.prototype.isRowModelDefault = function () {\n return missing(this.gridOptions.rowModelType) || this.gridOptions.rowModelType === Constants.ROW_MODEL_TYPE_CLIENT_SIDE;\n };\n GridOptionsWrapper.prototype.isFullRowEdit = function () {\n return this.gridOptions.editType === 'fullRow';\n };\n GridOptionsWrapper.prototype.isSuppressFocusAfterRefresh = function () {\n return isTrue(this.gridOptions.suppressFocusAfterRefresh);\n };\n GridOptionsWrapper.prototype.isSuppressBrowserResizeObserver = function () {\n return isTrue(this.gridOptions.suppressBrowserResizeObserver);\n };\n GridOptionsWrapper.prototype.isSuppressMaintainUnsortedOrder = function () {\n return isTrue(this.gridOptions.suppressMaintainUnsortedOrder);\n };\n GridOptionsWrapper.prototype.isSuppressClearOnFillReduction = function () {\n return isTrue(this.gridOptions.suppressClearOnFillReduction);\n };\n GridOptionsWrapper.prototype.isShowToolPanel = function () {\n return isTrue(this.gridOptions.sideBar && Array.isArray(this.getSideBar().toolPanels));\n };\n GridOptionsWrapper.prototype.getSideBar = function () {\n return this.gridOptions.sideBar;\n };\n GridOptionsWrapper.prototype.isSuppressTouch = function () {\n return isTrue(this.gridOptions.suppressTouch);\n };\n GridOptionsWrapper.prototype.isMaintainColumnOrder = function () {\n return isTrue(this.gridOptions.maintainColumnOrder);\n };\n GridOptionsWrapper.prototype.isSuppressRowTransform = function () {\n return isTrue(this.gridOptions.suppressRowTransform);\n };\n GridOptionsWrapper.prototype.isSuppressColumnStateEvents = function () {\n return isTrue(this.gridOptions.suppressColumnStateEvents);\n };\n GridOptionsWrapper.prototype.isAllowDragFromColumnsToolPanel = function () {\n return isTrue(this.gridOptions.allowDragFromColumnsToolPanel);\n };\n GridOptionsWrapper.prototype.useAsyncEvents = function () {\n return !isTrue(this.gridOptions.suppressAsyncEvents);\n };\n GridOptionsWrapper.prototype.isEnableCellChangeFlash = function () {\n return isTrue(this.gridOptions.enableCellChangeFlash);\n };\n GridOptionsWrapper.prototype.getCellFlashDelay = function () {\n return this.gridOptions.cellFlashDelay || 500;\n };\n GridOptionsWrapper.prototype.getCellFadeDelay = function () {\n return this.gridOptions.cellFadeDelay || 1000;\n };\n GridOptionsWrapper.prototype.isGroupSelectsChildren = function () {\n return isTrue(this.gridOptions.groupSelectsChildren);\n };\n GridOptionsWrapper.prototype.isSuppressRowHoverHighlight = function () {\n return isTrue(this.gridOptions.suppressRowHoverHighlight);\n };\n GridOptionsWrapper.prototype.isColumnHoverHighlight = function () {\n return isTrue(this.gridOptions.columnHoverHighlight);\n };\n GridOptionsWrapper.prototype.isGroupSelectsFiltered = function () {\n return isTrue(this.gridOptions.groupSelectsFiltered);\n };\n GridOptionsWrapper.prototype.isGroupHideOpenParents = function () {\n return isTrue(this.gridOptions.groupHideOpenParents);\n };\n GridOptionsWrapper.prototype.isGroupMaintainOrder = function () {\n return isTrue(this.gridOptions.groupMaintainOrder);\n };\n GridOptionsWrapper.prototype.getAutoGroupColumnDef = function () {\n return this.gridOptions.autoGroupColumnDef;\n };\n GridOptionsWrapper.prototype.isColumnsSortingCoupledToGroup = function () {\n var _a;\n var autoGroupColumnDef = this.getAutoGroupColumnDef();\n var isClientSideRowModel = this.isRowModelDefault();\n return isClientSideRowModel && !((_a = autoGroupColumnDef) === null || _a === void 0 ? void 0 : _a.comparator);\n };\n GridOptionsWrapper.prototype.isGroupMultiAutoColumn = function () {\n if (this.gridOptions.groupDisplayType) {\n return this.matchesGroupDisplayType('multipleColumns', this.gridOptions.groupDisplayType);\n }\n // if we are doing hideOpenParents we also show multiple columns, otherwise hideOpenParents would not work\n return isTrue(this.gridOptions.groupHideOpenParents);\n };\n GridOptionsWrapper.prototype.isGroupUseEntireRow = function (pivotMode) {\n // we never allow groupUseEntireRow if in pivot mode, otherwise we won't see the pivot values.\n if (pivotMode) {\n return false;\n }\n return this.gridOptions.groupDisplayType ? this.matchesGroupDisplayType('groupRows', this.gridOptions.groupDisplayType) : false;\n };\n GridOptionsWrapper.prototype.isRowGroupPanelSuppressSort = function () {\n return isTrue(this.gridOptions.rowGroupPanelSuppressSort);\n };\n GridOptionsWrapper.prototype.isGroupRowsSticky = function () {\n return isTrue(this.gridOptions.groupRowsSticky);\n };\n GridOptionsWrapper.prototype.isGroupSuppressAutoColumn = function () {\n var isCustomRowGroups = this.gridOptions.groupDisplayType ? this.matchesGroupDisplayType('custom', this.gridOptions.groupDisplayType) : false;\n if (isCustomRowGroups) {\n return true;\n }\n return this.gridOptions.treeDataDisplayType ? this.matchesTreeDataDisplayType('custom', this.gridOptions.treeDataDisplayType) : false;\n };\n GridOptionsWrapper.prototype.isGroupRemoveSingleChildren = function () {\n return isTrue(this.gridOptions.groupRemoveSingleChildren);\n };\n GridOptionsWrapper.prototype.isGroupRemoveLowestSingleChildren = function () {\n return isTrue(this.gridOptions.groupRemoveLowestSingleChildren);\n };\n GridOptionsWrapper.prototype.isGroupIncludeFooter = function () {\n return isTrue(this.gridOptions.groupIncludeFooter);\n };\n GridOptionsWrapper.prototype.isGroupIncludeTotalFooter = function () {\n return isTrue(this.gridOptions.groupIncludeTotalFooter);\n };\n GridOptionsWrapper.prototype.isGroupSuppressBlankHeader = function () {\n return isTrue(this.gridOptions.groupSuppressBlankHeader);\n };\n GridOptionsWrapper.prototype.isSuppressRowClickSelection = function () {\n return isTrue(this.gridOptions.suppressRowClickSelection);\n };\n GridOptionsWrapper.prototype.isSuppressCellFocus = function () {\n return isTrue(this.gridOptions.suppressCellFocus);\n };\n GridOptionsWrapper.prototype.isSuppressMultiSort = function () {\n return isTrue(this.gridOptions.suppressMultiSort);\n };\n GridOptionsWrapper.prototype.isAlwaysMultiSort = function () {\n return isTrue(this.gridOptions.alwaysMultiSort);\n };\n GridOptionsWrapper.prototype.isMultiSortKeyCtrl = function () {\n return this.gridOptions.multiSortKey === 'ctrl';\n };\n GridOptionsWrapper.prototype.isPivotSuppressAutoColumn = function () {\n return isTrue(this.gridOptions.pivotSuppressAutoColumn);\n };\n GridOptionsWrapper.prototype.isSuppressDragLeaveHidesColumns = function () {\n return isTrue(this.gridOptions.suppressDragLeaveHidesColumns);\n };\n GridOptionsWrapper.prototype.isSuppressRowGroupHidesColumns = function () {\n return isTrue(this.gridOptions.suppressRowGroupHidesColumns);\n };\n GridOptionsWrapper.prototype.isSuppressScrollOnNewData = function () {\n return isTrue(this.gridOptions.suppressScrollOnNewData);\n };\n GridOptionsWrapper.prototype.isSuppressScrollWhenPopupsAreOpen = function () {\n return isTrue(this.gridOptions.suppressScrollWhenPopupsAreOpen);\n };\n GridOptionsWrapper.prototype.isRowDragEntireRow = function () {\n return isTrue(this.gridOptions.rowDragEntireRow);\n };\n GridOptionsWrapper.prototype.getRowDragText = function (column) {\n if (column) {\n var colDef = column.getColDef();\n if (colDef.rowDragText) {\n return colDef.rowDragText;\n }\n }\n return this.gridOptions.rowDragText;\n };\n GridOptionsWrapper.prototype.isSuppressRowDrag = function () {\n return isTrue(this.gridOptions.suppressRowDrag);\n };\n GridOptionsWrapper.prototype.isRowDragManaged = function () {\n return isTrue(this.gridOptions.rowDragManaged);\n };\n GridOptionsWrapper.prototype.isSuppressMoveWhenRowDragging = function () {\n return isTrue(this.gridOptions.suppressMoveWhenRowDragging);\n };\n GridOptionsWrapper.prototype.isRowDragMultiRow = function () {\n return isTrue(this.gridOptions.rowDragMultiRow);\n };\n // returns either 'print', 'autoHeight' or 'normal' (normal is the default)\n GridOptionsWrapper.prototype.getDomLayout = function () {\n var domLayout = this.gridOptions.domLayout || Constants.DOM_LAYOUT_NORMAL;\n var validLayouts = [Constants.DOM_LAYOUT_PRINT, Constants.DOM_LAYOUT_AUTO_HEIGHT, Constants.DOM_LAYOUT_NORMAL];\n if (validLayouts.indexOf(domLayout) === -1) {\n doOnce(function () {\n return console.warn(\"AG Grid: \" + domLayout + \" is not valid for DOM Layout, valid values are \" + Constants.DOM_LAYOUT_NORMAL + \", \" + Constants.DOM_LAYOUT_AUTO_HEIGHT + \" and \" + Constants.DOM_LAYOUT_PRINT);\n }, 'warn about dom layout values');\n return Constants.DOM_LAYOUT_NORMAL;\n }\n return domLayout;\n };\n GridOptionsWrapper.prototype.isSuppressHorizontalScroll = function () {\n return isTrue(this.gridOptions.suppressHorizontalScroll);\n };\n GridOptionsWrapper.prototype.isSuppressMaxRenderedRowRestriction = function () {\n return isTrue(this.gridOptions.suppressMaxRenderedRowRestriction);\n };\n GridOptionsWrapper.prototype.isExcludeChildrenWhenTreeDataFiltering = function () {\n return isTrue(this.gridOptions.excludeChildrenWhenTreeDataFiltering);\n };\n GridOptionsWrapper.prototype.isAlwaysShowHorizontalScroll = function () {\n return isTrue(this.gridOptions.alwaysShowHorizontalScroll);\n };\n GridOptionsWrapper.prototype.isAlwaysShowVerticalScroll = function () {\n return isTrue(this.gridOptions.alwaysShowVerticalScroll);\n };\n GridOptionsWrapper.prototype.isDebounceVerticalScrollbar = function () {\n return isTrue(this.gridOptions.debounceVerticalScrollbar);\n };\n GridOptionsWrapper.prototype.isSuppressLoadingOverlay = function () {\n return isTrue(this.gridOptions.suppressLoadingOverlay);\n };\n GridOptionsWrapper.prototype.isSuppressNoRowsOverlay = function () {\n return isTrue(this.gridOptions.suppressNoRowsOverlay);\n };\n GridOptionsWrapper.prototype.isSuppressFieldDotNotation = function () {\n return isTrue(this.gridOptions.suppressFieldDotNotation);\n };\n GridOptionsWrapper.prototype.getPinnedTopRowData = function () {\n return this.gridOptions.pinnedTopRowData;\n };\n GridOptionsWrapper.prototype.getPinnedBottomRowData = function () {\n return this.gridOptions.pinnedBottomRowData;\n };\n GridOptionsWrapper.prototype.isFunctionsPassive = function () {\n return isTrue(this.gridOptions.functionsPassive);\n };\n GridOptionsWrapper.prototype.isSuppressChangeDetection = function () {\n return isTrue(this.gridOptions.suppressChangeDetection);\n };\n GridOptionsWrapper.prototype.isSuppressAnimationFrame = function () {\n return isTrue(this.gridOptions.suppressAnimationFrame);\n };\n GridOptionsWrapper.prototype.getQuickFilterText = function () {\n return this.gridOptions.quickFilterText;\n };\n GridOptionsWrapper.prototype.isCacheQuickFilter = function () {\n return isTrue(this.gridOptions.cacheQuickFilter);\n };\n GridOptionsWrapper.prototype.isUnSortIcon = function () {\n return isTrue(this.gridOptions.unSortIcon);\n };\n GridOptionsWrapper.prototype.isSuppressMenuHide = function () {\n return isTrue(this.gridOptions.suppressMenuHide);\n };\n GridOptionsWrapper.prototype.isEnterMovesDownAfterEdit = function () {\n return isTrue(this.gridOptions.enterMovesDownAfterEdit);\n };\n GridOptionsWrapper.prototype.isEnterMovesDown = function () {\n return isTrue(this.gridOptions.enterMovesDown);\n };\n GridOptionsWrapper.prototype.isUndoRedoCellEditing = function () {\n return isTrue(this.gridOptions.undoRedoCellEditing);\n };\n GridOptionsWrapper.prototype.getUndoRedoCellEditingLimit = function () {\n return toNumber(this.gridOptions.undoRedoCellEditingLimit);\n };\n GridOptionsWrapper.prototype.isEnableCellEditingOnBackspace = function () {\n return isTrue(this.gridOptions.enableCellEditingOnBackspace);\n };\n GridOptionsWrapper.prototype.getRowStyle = function () {\n return this.gridOptions.rowStyle;\n };\n GridOptionsWrapper.prototype.getRowClass = function () {\n return this.gridOptions.rowClass;\n };\n GridOptionsWrapper.prototype.getRowStyleFunc = function () {\n return this.mergeGridCommonParams(this.gridOptions.getRowStyle);\n };\n GridOptionsWrapper.prototype.getRowClassFunc = function () {\n return this.mergeGridCommonParams(this.gridOptions.getRowClass);\n };\n GridOptionsWrapper.prototype.rowClassRules = function () {\n return this.gridOptions.rowClassRules;\n };\n GridOptionsWrapper.prototype.isServerSideInfiniteScroll = function () {\n return isTrue(this.gridOptions.serverSideInfiniteScroll);\n };\n GridOptionsWrapper.prototype.getServerSideGroupLevelParamsFunc = function () {\n return this.mergeGridCommonParams(this.gridOptions.getServerSideGroupLevelParams);\n };\n GridOptionsWrapper.prototype.getCreateChartContainerFunc = function () {\n return this.mergeGridCommonParams(this.gridOptions.createChartContainer);\n };\n GridOptionsWrapper.prototype.getPopupParent = function () {\n return this.gridOptions.popupParent;\n };\n GridOptionsWrapper.prototype.getBlockLoadDebounceMillis = function () {\n return this.gridOptions.blockLoadDebounceMillis;\n };\n GridOptionsWrapper.prototype.getPostProcessPopupFunc = function () {\n return this.mergeGridCommonParams(this.gridOptions.postProcessPopup);\n };\n GridOptionsWrapper.prototype.getPaginationNumberFormatterFunc = function () {\n return this.mergeGridCommonParams(this.gridOptions.paginationNumberFormatter);\n };\n GridOptionsWrapper.prototype.getChildCountFunc = function () {\n return this.gridOptions.getChildCount;\n };\n GridOptionsWrapper.prototype.getIsApplyServerSideTransactionFunc = function () {\n return this.mergeGridCommonParams(this.gridOptions.isApplyServerSideTransaction);\n };\n GridOptionsWrapper.prototype.getInitialGroupOrderComparator = function () {\n var _a = this.gridOptions,\n initialGroupOrderComparator = _a.initialGroupOrderComparator,\n defaultGroupOrderComparator = _a.defaultGroupOrderComparator;\n if (initialGroupOrderComparator) {\n return this.mergeGridCommonParams(initialGroupOrderComparator);\n }\n // this is the deprecated way, so provide a proxy to make it compatible\n if (defaultGroupOrderComparator) {\n return function (params) {\n return defaultGroupOrderComparator(params.nodeA, params.nodeB);\n };\n }\n };\n GridOptionsWrapper.prototype.getIsFullWidthCellFunc = function () {\n var _a = this.gridOptions,\n isFullWidthRow = _a.isFullWidthRow,\n isFullWidthCell = _a.isFullWidthCell;\n if (isFullWidthRow) {\n return this.mergeGridCommonParams(isFullWidthRow);\n }\n // this is the deprecated way, so provide a proxy to make it compatible\n if (isFullWidthCell) {\n return function (params) {\n return isFullWidthCell(params.rowNode);\n };\n }\n };\n GridOptionsWrapper.prototype.getFullWidthCellRendererParams = function () {\n return this.gridOptions.fullWidthCellRendererParams;\n };\n GridOptionsWrapper.prototype.isEmbedFullWidthRows = function () {\n return isTrue(this.gridOptions.embedFullWidthRows) || isTrue(this.gridOptions.deprecatedEmbedFullWidthRows);\n };\n GridOptionsWrapper.prototype.isDetailRowAutoHeight = function () {\n return isTrue(this.gridOptions.detailRowAutoHeight);\n };\n GridOptionsWrapper.prototype.getSuppressKeyboardEventFunc = function () {\n return this.gridOptions.suppressKeyboardEvent;\n };\n GridOptionsWrapper.prototype.getBusinessKeyForNodeFunc = function () {\n return this.gridOptions.getBusinessKeyForNode;\n };\n GridOptionsWrapper.prototype.getApi = function () {\n return this.gridOptions.api;\n };\n GridOptionsWrapper.prototype.getColumnApi = function () {\n return this.gridOptions.columnApi;\n };\n GridOptionsWrapper.prototype.isReadOnlyEdit = function () {\n return isTrue(this.gridOptions.readOnlyEdit);\n };\n GridOptionsWrapper.prototype.isImmutableData = function () {\n // we used to have a property immutableData for this. however this was deprecated\n // in favour of having Immutable Data on by default when getRowId is provided\n var getRowIdProvided = this.gridOptions.getRowId != null;\n var immutableData = isTrue(this.gridOptions.immutableData);\n // this property is a backwards compatibility property, for those who want\n // the old behaviour of Row ID's but NOT Immutable Data.\n var resetRowDataOnUpdate = isTrue(this.gridOptions.resetRowDataOnUpdate);\n if (resetRowDataOnUpdate) {\n return false;\n }\n return getRowIdProvided || immutableData;\n };\n GridOptionsWrapper.prototype.isEnsureDomOrder = function () {\n return isTrue(this.gridOptions.ensureDomOrder);\n };\n GridOptionsWrapper.prototype.isEnableCharts = function () {\n if (isTrue(this.gridOptions.enableCharts)) {\n return ModuleRegistry.assertRegistered(ModuleNames.GridChartsModule, 'enableCharts');\n }\n return false;\n };\n GridOptionsWrapper.prototype.isEnableChartToolPanelsButton = function () {\n return isTrue(this.gridOptions.enableChartToolPanelsButton);\n };\n GridOptionsWrapper.prototype.getColResizeDefault = function () {\n return this.gridOptions.colResizeDefault;\n };\n GridOptionsWrapper.prototype.isSingleClickEdit = function () {\n return isTrue(this.gridOptions.singleClickEdit);\n };\n GridOptionsWrapper.prototype.isSuppressClickEdit = function () {\n return isTrue(this.gridOptions.suppressClickEdit);\n };\n GridOptionsWrapper.prototype.isStopEditingWhenCellsLoseFocus = function () {\n return isTrue(this.gridOptions.stopEditingWhenCellsLoseFocus);\n };\n GridOptionsWrapper.prototype.getGroupDefaultExpanded = function () {\n return this.gridOptions.groupDefaultExpanded;\n };\n GridOptionsWrapper.prototype.getMaxConcurrentDatasourceRequests = function () {\n var res = toNumber(this.gridOptions.maxConcurrentDatasourceRequests);\n if (res == null) {\n return 2;\n } // 2 is the default\n if (res <= 0) {\n return;\n } // negative number, eg -1, means no max restriction\n return res;\n };\n GridOptionsWrapper.prototype.getMaxBlocksInCache = function () {\n return this.gridOptions.maxBlocksInCache;\n };\n GridOptionsWrapper.prototype.getCacheOverflowSize = function () {\n return this.gridOptions.cacheOverflowSize;\n };\n GridOptionsWrapper.prototype.getPaginationPageSize = function () {\n return toNumber(this.gridOptions.paginationPageSize);\n };\n GridOptionsWrapper.prototype.isPaginateChildRows = function () {\n var shouldPaginate = this.isGroupRemoveSingleChildren() || this.isGroupRemoveLowestSingleChildren();\n if (shouldPaginate) {\n return true;\n }\n return isTrue(this.gridOptions.paginateChildRows);\n };\n GridOptionsWrapper.prototype.getCacheBlockSize = function () {\n return oneOrGreater(this.gridOptions.cacheBlockSize);\n };\n GridOptionsWrapper.prototype.getInfiniteInitialRowCount = function () {\n return this.gridOptions.infiniteInitialRowCount;\n };\n GridOptionsWrapper.prototype.getServerSideInitialRowCount = function () {\n var rowCount = this.gridOptions.serverSideInitialRowCount;\n if (typeof rowCount === 'number' && rowCount > 0) {\n return rowCount;\n }\n return 1;\n };\n GridOptionsWrapper.prototype.isPurgeClosedRowNodes = function () {\n return isTrue(this.gridOptions.purgeClosedRowNodes);\n };\n GridOptionsWrapper.prototype.isSuppressPaginationPanel = function () {\n return isTrue(this.gridOptions.suppressPaginationPanel);\n };\n GridOptionsWrapper.prototype.getRowData = function () {\n return this.gridOptions.rowData;\n };\n GridOptionsWrapper.prototype.isEnableRtl = function () {\n return isTrue(this.gridOptions.enableRtl);\n };\n GridOptionsWrapper.prototype.getRowGroupPanelShow = function () {\n return this.gridOptions.rowGroupPanelShow;\n };\n GridOptionsWrapper.prototype.getPivotPanelShow = function () {\n return this.gridOptions.pivotPanelShow;\n };\n GridOptionsWrapper.prototype.isAngularCompileRows = function () {\n return isTrue(this.gridOptions.angularCompileRows);\n };\n GridOptionsWrapper.prototype.isAngularCompileFilters = function () {\n return isTrue(this.gridOptions.angularCompileFilters);\n };\n GridOptionsWrapper.prototype.isDebug = function () {\n return isTrue(this.gridOptions.debug);\n };\n GridOptionsWrapper.prototype.getColumnDefs = function () {\n return this.gridOptions.columnDefs;\n };\n GridOptionsWrapper.prototype.getColumnTypes = function () {\n return this.gridOptions.columnTypes;\n };\n GridOptionsWrapper.prototype.getDatasource = function () {\n return this.gridOptions.datasource;\n };\n GridOptionsWrapper.prototype.getViewportDatasource = function () {\n return this.gridOptions.viewportDatasource;\n };\n GridOptionsWrapper.prototype.getServerSideDatasource = function () {\n return this.gridOptions.serverSideDatasource;\n };\n GridOptionsWrapper.prototype.isAccentedSort = function () {\n return isTrue(this.gridOptions.accentedSort);\n };\n GridOptionsWrapper.prototype.isEnableBrowserTooltips = function () {\n return isTrue(this.gridOptions.enableBrowserTooltips);\n };\n GridOptionsWrapper.prototype.isEnableCellExpressions = function () {\n return isTrue(this.gridOptions.enableCellExpressions);\n };\n GridOptionsWrapper.prototype.isEnableGroupEdit = function () {\n return isTrue(this.gridOptions.enableGroupEdit);\n };\n GridOptionsWrapper.prototype.isSuppressMiddleClickScrolls = function () {\n return isTrue(this.gridOptions.suppressMiddleClickScrolls);\n };\n GridOptionsWrapper.prototype.isPreventDefaultOnContextMenu = function () {\n return isTrue(this.gridOptions.preventDefaultOnContextMenu);\n };\n GridOptionsWrapper.prototype.isSuppressPreventDefaultOnMouseWheel = function () {\n return isTrue(this.gridOptions.suppressPreventDefaultOnMouseWheel);\n };\n GridOptionsWrapper.prototype.isSuppressColumnVirtualisation = function () {\n return isTrue(this.gridOptions.suppressColumnVirtualisation);\n };\n GridOptionsWrapper.prototype.isSuppressRowVirtualisation = function () {\n return isTrue(this.gridOptions.suppressRowVirtualisation);\n };\n GridOptionsWrapper.prototype.isSuppressContextMenu = function () {\n return isTrue(this.gridOptions.suppressContextMenu);\n };\n GridOptionsWrapper.prototype.isAllowContextMenuWithControlKey = function () {\n return isTrue(this.gridOptions.allowContextMenuWithControlKey);\n };\n GridOptionsWrapper.prototype.isSuppressCopyRowsToClipboard = function () {\n return isTrue(this.gridOptions.suppressCopyRowsToClipboard);\n };\n GridOptionsWrapper.prototype.isSuppressCopySingleCellRanges = function () {\n return isTrue(this.gridOptions.suppressCopySingleCellRanges);\n };\n GridOptionsWrapper.prototype.isCopyHeadersToClipboard = function () {\n return isTrue(this.gridOptions.copyHeadersToClipboard);\n };\n GridOptionsWrapper.prototype.isCopyGroupHeadersToClipboard = function () {\n return isTrue(this.gridOptions.copyGroupHeadersToClipboard);\n };\n GridOptionsWrapper.prototype.isSuppressClipboardPaste = function () {\n return isTrue(this.gridOptions.suppressClipboardPaste);\n };\n GridOptionsWrapper.prototype.isSuppressLastEmptyLineOnPaste = function () {\n return isTrue(this.gridOptions.suppressLastEmptyLineOnPaste);\n };\n GridOptionsWrapper.prototype.isPagination = function () {\n return isTrue(this.gridOptions.pagination);\n };\n GridOptionsWrapper.prototype.isSuppressEnterpriseResetOnNewColumns = function () {\n return isTrue(this.gridOptions.suppressEnterpriseResetOnNewColumns);\n };\n GridOptionsWrapper.prototype.getProcessDataFromClipboardFunc = function () {\n return this.mergeGridCommonParams(this.gridOptions.processDataFromClipboard);\n };\n GridOptionsWrapper.prototype.getAsyncTransactionWaitMillis = function () {\n return exists(this.gridOptions.asyncTransactionWaitMillis) ? this.gridOptions.asyncTransactionWaitMillis : Constants.BATCH_WAIT_MILLIS;\n };\n GridOptionsWrapper.prototype.isSuppressMovableColumns = function () {\n return isTrue(this.gridOptions.suppressMovableColumns);\n };\n GridOptionsWrapper.prototype.isAnimateRows = function () {\n // never allow animating if enforcing the row order\n if (this.isEnsureDomOrder()) {\n return false;\n }\n return isTrue(this.gridOptions.animateRows);\n };\n GridOptionsWrapper.prototype.isSuppressColumnMoveAnimation = function () {\n return isTrue(this.gridOptions.suppressColumnMoveAnimation);\n };\n GridOptionsWrapper.prototype.isSuppressAggFuncInHeader = function () {\n return isTrue(this.gridOptions.suppressAggFuncInHeader);\n };\n GridOptionsWrapper.prototype.isSuppressAggAtRootLevel = function () {\n return isTrue(this.gridOptions.suppressAggAtRootLevel);\n };\n GridOptionsWrapper.prototype.isSuppressAggFilteredOnly = function () {\n var isGroupAggFiltering = this.getGroupAggFiltering() !== undefined;\n return isGroupAggFiltering || isTrue(this.gridOptions.suppressAggFilteredOnly);\n };\n GridOptionsWrapper.prototype.isRemovePivotHeaderRowWhenSingleValueColumn = function () {\n return isTrue(this.gridOptions.removePivotHeaderRowWhenSingleValueColumn);\n };\n GridOptionsWrapper.prototype.isShowOpenedGroup = function () {\n return isTrue(this.gridOptions.showOpenedGroup);\n };\n GridOptionsWrapper.prototype.isReactUi = function () {\n return isTrue(this.gridOptions.reactUi);\n };\n GridOptionsWrapper.prototype.isSuppressReactUi = function () {\n return isTrue(this.gridOptions.suppressReactUi);\n };\n GridOptionsWrapper.prototype.isEnableRangeSelection = function () {\n return ModuleRegistry.isRegistered(ModuleNames.RangeSelectionModule) && isTrue(this.gridOptions.enableRangeSelection);\n };\n GridOptionsWrapper.prototype.isEnableRangeHandle = function () {\n return isTrue(this.gridOptions.enableRangeHandle);\n };\n GridOptionsWrapper.prototype.isEnableFillHandle = function () {\n return isTrue(this.gridOptions.enableFillHandle);\n };\n GridOptionsWrapper.prototype.getFillHandleDirection = function () {\n var direction = this.gridOptions.fillHandleDirection;\n if (!direction) {\n return 'xy';\n }\n if (direction !== 'x' && direction !== 'y' && direction !== 'xy') {\n doOnce(function () {\n return console.warn(\"AG Grid: valid values for fillHandleDirection are 'x', 'y' and 'xy'. Default to 'xy'.\");\n }, 'warn invalid fill direction');\n return 'xy';\n }\n return direction;\n };\n GridOptionsWrapper.prototype.getFillOperation = function () {\n return this.mergeGridCommonParams(this.gridOptions.fillOperation);\n };\n GridOptionsWrapper.prototype.isSuppressMultiRangeSelection = function () {\n return isTrue(this.gridOptions.suppressMultiRangeSelection);\n };\n GridOptionsWrapper.prototype.isPaginationAutoPageSize = function () {\n return isTrue(this.gridOptions.paginationAutoPageSize);\n };\n GridOptionsWrapper.prototype.isRememberGroupStateWhenNewData = function () {\n return isTrue(this.gridOptions.rememberGroupStateWhenNewData);\n };\n GridOptionsWrapper.prototype.getIcons = function () {\n return this.gridOptions.icons;\n };\n GridOptionsWrapper.prototype.getGroupAggFiltering = function () {\n var userValue = this.gridOptions.groupAggFiltering;\n if (typeof userValue === 'function') {\n return this.mergeGridCommonParams(userValue);\n }\n if (isTrue(userValue)) {\n return function () {\n return true;\n };\n }\n return undefined;\n };\n GridOptionsWrapper.prototype.getAggFuncs = function () {\n return this.gridOptions.aggFuncs;\n };\n GridOptionsWrapper.prototype.getSortingOrder = function () {\n return this.gridOptions.sortingOrder;\n };\n GridOptionsWrapper.prototype.getAlignedGrids = function () {\n return this.gridOptions.alignedGrids;\n };\n GridOptionsWrapper.prototype.isMasterDetail = function () {\n var masterDetail = isTrue(this.gridOptions.masterDetail);\n if (masterDetail) {\n return ModuleRegistry.assertRegistered(ModuleNames.MasterDetailModule, 'masterDetail');\n } else {\n return false;\n }\n };\n GridOptionsWrapper.prototype.isKeepDetailRows = function () {\n return isTrue(this.gridOptions.keepDetailRows);\n };\n GridOptionsWrapper.prototype.getKeepDetailRowsCount = function () {\n var keepDetailRowsCount = this.gridOptions.keepDetailRowsCount;\n if (exists(keepDetailRowsCount) && keepDetailRowsCount > 0) {\n return this.gridOptions.keepDetailRowsCount;\n }\n return DEFAULT_KEEP_DETAIL_ROW_COUNT;\n };\n GridOptionsWrapper.prototype.getIsRowMasterFunc = function () {\n return this.gridOptions.isRowMaster;\n };\n GridOptionsWrapper.prototype.getIsRowSelectableFunc = function () {\n return this.gridOptions.isRowSelectable;\n };\n GridOptionsWrapper.prototype.getGroupRowRendererParams = function () {\n return this.gridOptions.groupRowRendererParams;\n };\n GridOptionsWrapper.prototype.getOverlayLoadingTemplate = function () {\n return this.gridOptions.overlayLoadingTemplate;\n };\n GridOptionsWrapper.prototype.getOverlayNoRowsTemplate = function () {\n return this.gridOptions.overlayNoRowsTemplate;\n };\n GridOptionsWrapper.prototype.isSuppressAutoSize = function () {\n return isTrue(this.gridOptions.suppressAutoSize);\n };\n GridOptionsWrapper.prototype.isEnableCellTextSelection = function () {\n return isTrue(this.gridOptions.enableCellTextSelection);\n };\n GridOptionsWrapper.prototype.isSuppressParentsInRowNodes = function () {\n return isTrue(this.gridOptions.suppressParentsInRowNodes);\n };\n GridOptionsWrapper.prototype.isSuppressClipboardApi = function () {\n return isTrue(this.gridOptions.suppressClipboardApi);\n };\n GridOptionsWrapper.prototype.isFunctionsReadOnly = function () {\n return isTrue(this.gridOptions.functionsReadOnly);\n };\n GridOptionsWrapper.prototype.isEnableCellTextSelect = function () {\n return isTrue(this.gridOptions.enableCellTextSelection);\n };\n GridOptionsWrapper.prototype.getDefaultColDef = function () {\n return this.gridOptions.defaultColDef;\n };\n GridOptionsWrapper.prototype.getDefaultColGroupDef = function () {\n return this.gridOptions.defaultColGroupDef;\n };\n GridOptionsWrapper.prototype.getDefaultExportParams = function (type) {\n if (this.gridOptions.defaultExportParams) {\n console.warn(\"AG Grid: Since v25.2 `defaultExportParams` has been replaced by `default\" + capitalise(type) + \"ExportParams`'\");\n if (type === 'csv') {\n return this.gridOptions.defaultExportParams;\n }\n return this.gridOptions.defaultExportParams;\n }\n if (type === 'csv' && this.gridOptions.defaultCsvExportParams) {\n return this.gridOptions.defaultCsvExportParams;\n }\n if (type === 'excel' && this.gridOptions.defaultExcelExportParams) {\n return this.gridOptions.defaultExcelExportParams;\n }\n };\n GridOptionsWrapper.prototype.isSuppressCsvExport = function () {\n return isTrue(this.gridOptions.suppressCsvExport);\n };\n GridOptionsWrapper.prototype.isAllowShowChangeAfterFilter = function () {\n return isTrue(this.gridOptions.allowShowChangeAfterFilter);\n };\n GridOptionsWrapper.prototype.isSuppressExcelExport = function () {\n return isTrue(this.gridOptions.suppressExcelExport);\n };\n GridOptionsWrapper.prototype.isSuppressMakeColumnVisibleAfterUnGroup = function () {\n return isTrue(this.gridOptions.suppressMakeColumnVisibleAfterUnGroup);\n };\n GridOptionsWrapper.prototype.getDataPathFunc = function () {\n return this.gridOptions.getDataPath;\n };\n GridOptionsWrapper.prototype.getIsServerSideGroupFunc = function () {\n return this.gridOptions.isServerSideGroup;\n };\n GridOptionsWrapper.prototype.getIsServerSideGroupOpenByDefaultFunc = function () {\n return this.mergeGridCommonParams(this.gridOptions.isServerSideGroupOpenByDefault);\n };\n GridOptionsWrapper.prototype.getIsGroupOpenByDefaultFunc = function () {\n return this.mergeGridCommonParams(this.gridOptions.isGroupOpenByDefault);\n };\n GridOptionsWrapper.prototype.getServerSideGroupKeyFunc = function () {\n return this.gridOptions.getServerSideGroupKey;\n };\n GridOptionsWrapper.prototype.getGroupRowAggFunc = function () {\n var _a = this.gridOptions,\n getGroupRowAgg = _a.getGroupRowAgg,\n groupRowAggNodes = _a.groupRowAggNodes;\n if (getGroupRowAgg) {\n return this.mergeGridCommonParams(getGroupRowAgg);\n }\n // this is the deprecated way, so provide a proxy to make it compatible\n if (groupRowAggNodes) {\n return function (params) {\n return groupRowAggNodes(params.nodes);\n };\n }\n };\n GridOptionsWrapper.prototype.getContextMenuItemsFunc = function () {\n return this.mergeGridCommonParams(this.gridOptions.getContextMenuItems);\n };\n GridOptionsWrapper.prototype.getMainMenuItemsFunc = function () {\n return this.mergeGridCommonParams(this.gridOptions.getMainMenuItems);\n };\n GridOptionsWrapper.prototype.getRowIdFunc = function () {\n var _a = this.gridOptions,\n getRowId = _a.getRowId,\n getRowNodeId = _a.getRowNodeId;\n if (getRowId) {\n return this.mergeGridCommonParams(getRowId);\n }\n // this is the deprecated way, so provide a proxy to make it compatible\n if (getRowNodeId) {\n return function (params) {\n return getRowNodeId(params.data);\n };\n }\n };\n GridOptionsWrapper.prototype.getNavigateToNextHeaderFunc = function () {\n return this.mergeGridCommonParams(this.gridOptions.navigateToNextHeader);\n };\n GridOptionsWrapper.prototype.getTabToNextHeaderFunc = function () {\n return this.mergeGridCommonParams(this.gridOptions.tabToNextHeader);\n };\n GridOptionsWrapper.prototype.getNavigateToNextCellFunc = function () {\n return this.mergeGridCommonParams(this.gridOptions.navigateToNextCell);\n };\n GridOptionsWrapper.prototype.getTabToNextCellFunc = function () {\n return this.mergeGridCommonParams(this.gridOptions.tabToNextCell);\n };\n GridOptionsWrapper.prototype.getGridTabIndex = function () {\n return (this.gridOptions.tabIndex || 0).toString();\n };\n GridOptionsWrapper.prototype.isTreeData = function () {\n var usingTreeData = isTrue(this.gridOptions.treeData);\n if (usingTreeData) {\n return ModuleRegistry.assertRegistered(ModuleNames.RowGroupingModule, 'Tree Data');\n }\n return false;\n };\n GridOptionsWrapper.prototype.isValueCache = function () {\n return isTrue(this.gridOptions.valueCache);\n };\n GridOptionsWrapper.prototype.isValueCacheNeverExpires = function () {\n return isTrue(this.gridOptions.valueCacheNeverExpires);\n };\n GridOptionsWrapper.prototype.isDeltaSort = function () {\n return isTrue(this.gridOptions.deltaSort);\n };\n GridOptionsWrapper.prototype.isAggregateOnlyChangedColumns = function () {\n return isTrue(this.gridOptions.aggregateOnlyChangedColumns);\n };\n GridOptionsWrapper.prototype.getProcessPivotResultColDefFunc = function () {\n return this.gridOptions.processPivotResultColDef || this.gridOptions.processSecondaryColDef;\n };\n GridOptionsWrapper.prototype.getProcessPivotResultColGroupDefFunc = function () {\n return this.gridOptions.processPivotResultColGroupDef || this.gridOptions.processSecondaryColGroupDef;\n };\n GridOptionsWrapper.prototype.getSendToClipboardFunc = function () {\n return this.mergeGridCommonParams(this.gridOptions.sendToClipboard);\n };\n GridOptionsWrapper.prototype.getProcessRowPostCreateFunc = function () {\n return this.mergeGridCommonParams(this.gridOptions.processRowPostCreate);\n };\n GridOptionsWrapper.prototype.getProcessCellForClipboardFunc = function () {\n return this.mergeGridCommonParams(this.gridOptions.processCellForClipboard);\n };\n GridOptionsWrapper.prototype.getProcessHeaderForClipboardFunc = function () {\n return this.mergeGridCommonParams(this.gridOptions.processHeaderForClipboard);\n };\n GridOptionsWrapper.prototype.getProcessGroupHeaderForClipboardFunc = function () {\n return this.mergeGridCommonParams(this.gridOptions.processGroupHeaderForClipboard);\n };\n GridOptionsWrapper.prototype.getProcessCellFromClipboardFunc = function () {\n return this.mergeGridCommonParams(this.gridOptions.processCellFromClipboard);\n };\n GridOptionsWrapper.prototype.getViewportRowModelPageSize = function () {\n return oneOrGreater(this.gridOptions.viewportRowModelPageSize, DEFAULT_VIEWPORT_ROW_MODEL_PAGE_SIZE);\n };\n GridOptionsWrapper.prototype.getViewportRowModelBufferSize = function () {\n return zeroOrGreater(this.gridOptions.viewportRowModelBufferSize, DEFAULT_VIEWPORT_ROW_MODEL_BUFFER_SIZE);\n };\n GridOptionsWrapper.prototype.isServerSideSortAllLevels = function () {\n var isEnabled = isTrue(this.gridOptions.serverSideSortAllLevels);\n if (!this.isRowModelServerSide() && isEnabled) {\n doOnce(function () {\n return console.warn('AG Grid: The `serverSideSortAllLevels` property can only be used with the server side row model.');\n }, 'serverSideSortAllLevels');\n return false;\n }\n return isEnabled;\n };\n GridOptionsWrapper.prototype.isServerSideFilterAllLevels = function () {\n var isEnabled = isTrue(this.gridOptions.serverSideFilterAllLevels);\n if (!this.isRowModelServerSide() && isEnabled) {\n doOnce(function () {\n return console.warn('AG Grid: The `serverSideFilterAllLevels` property can only be used with the server side row model.');\n }, 'serverSideFilterAllLevels');\n return false;\n }\n return isEnabled;\n };\n GridOptionsWrapper.prototype.isServerSideSortOnServer = function () {\n var isEnabled = isTrue(this.gridOptions.serverSideSortOnServer);\n if (!this.isRowModelServerSide() && isEnabled) {\n doOnce(function () {\n return console.warn('AG Grid: The `serverSideSortOnServer` property can only be used with the server side row model.');\n }, 'serverSideSortOnServerRowModel');\n return false;\n }\n if (this.isTreeData() && isEnabled) {\n doOnce(function () {\n return console.warn('AG Grid: The `serverSideSortOnServer` property cannot be used while using tree data.');\n }, 'serverSideSortOnServerTreeData');\n return false;\n }\n return isEnabled;\n };\n GridOptionsWrapper.prototype.isServerSideFilterOnServer = function () {\n var isEnabled = isTrue(this.gridOptions.serverSideFilterOnServer);\n if (!this.isRowModelServerSide() && isEnabled) {\n doOnce(function () {\n return console.warn('AG Grid: The `serverSideFilterOnServer` property can only be used with the server side row model.');\n }, 'serverSideFilterOnServerRowModel');\n return false;\n }\n if (this.isTreeData() && isEnabled) {\n doOnce(function () {\n return console.warn('AG Grid: The `serverSideFilterOnServer` property cannot be used while using tree data.');\n }, 'serverSideFilterOnServerTreeData');\n return false;\n }\n return isEnabled;\n };\n GridOptionsWrapper.prototype.getPostSortFunc = function () {\n var _a = this.gridOptions,\n postSortRows = _a.postSortRows,\n postSort = _a.postSort;\n if (postSortRows) {\n return this.mergeGridCommonParams(postSortRows);\n }\n // this is the deprecated way, so provide a proxy to make it compatible\n if (postSort) {\n return function (params) {\n return postSort(params.nodes);\n };\n }\n };\n GridOptionsWrapper.prototype.getChartToolbarItemsFunc = function () {\n return this.mergeGridCommonParams(this.gridOptions.getChartToolbarItems);\n };\n GridOptionsWrapper.prototype.getChartThemeOverrides = function () {\n return this.gridOptions.chartThemeOverrides;\n };\n GridOptionsWrapper.prototype.getCustomChartThemes = function () {\n return this.gridOptions.customChartThemes;\n };\n GridOptionsWrapper.prototype.getChartThemes = function () {\n // return default themes if user hasn't supplied any\n return this.gridOptions.chartThemes || ['ag-default', 'ag-material', 'ag-pastel', 'ag-vivid', 'ag-solar'];\n };\n GridOptionsWrapper.prototype.getChartToolPanelsDef = function () {\n return this.gridOptions.chartToolPanelsDef;\n };\n GridOptionsWrapper.prototype.getClipboardDelimiter = function () {\n return exists(this.gridOptions.clipboardDelimiter) ? this.gridOptions.clipboardDelimiter : '\\t';\n };\n GridOptionsWrapper.prototype.setProperty = function (key, value, force) {\n if (force === void 0) {\n force = false;\n }\n var previousValue = this.gridOptions[key];\n if (force || previousValue !== value) {\n this.gridOptions[key] = value;\n var event_1 = {\n type: key,\n currentValue: value,\n previousValue: previousValue\n };\n this.propertyEventService.dispatchEvent(event_1);\n }\n };\n GridOptionsWrapper.prototype.addEventListener = function (key, listener) {\n this.propertyEventService.addEventListener(key, listener);\n };\n GridOptionsWrapper.prototype.removeEventListener = function (key, listener) {\n this.propertyEventService.removeEventListener(key, listener);\n };\n GridOptionsWrapper.prototype.isSkipHeaderOnAutoSize = function () {\n return !!this.gridOptions.skipHeaderOnAutoSize;\n };\n GridOptionsWrapper.prototype.getAutoSizePadding = function () {\n var value = this.gridOptions.autoSizePadding;\n return value != null && value >= 0 ? value : 20;\n };\n // properties\n GridOptionsWrapper.prototype.getHeaderHeight = function () {\n if (typeof this.gridOptions.headerHeight === 'number') {\n return this.gridOptions.headerHeight;\n }\n return this.getFromTheme(25, 'headerHeight');\n };\n GridOptionsWrapper.prototype.getFloatingFiltersHeight = function () {\n if (typeof this.gridOptions.floatingFiltersHeight === 'number') {\n return this.gridOptions.floatingFiltersHeight;\n }\n return this.getFromTheme(25, 'headerHeight');\n };\n GridOptionsWrapper.prototype.getGroupHeaderHeight = function () {\n if (typeof this.gridOptions.groupHeaderHeight === 'number') {\n return this.gridOptions.groupHeaderHeight;\n }\n return this.getHeaderHeight();\n };\n GridOptionsWrapper.prototype.getPivotHeaderHeight = function () {\n if (typeof this.gridOptions.pivotHeaderHeight === 'number') {\n return this.gridOptions.pivotHeaderHeight;\n }\n return this.getHeaderHeight();\n };\n GridOptionsWrapper.prototype.getPivotGroupHeaderHeight = function () {\n if (typeof this.gridOptions.pivotGroupHeaderHeight === 'number') {\n return this.gridOptions.pivotGroupHeaderHeight;\n }\n return this.getGroupHeaderHeight();\n };\n GridOptionsWrapper.prototype.isExternalFilterPresent = function () {\n if (typeof this.gridOptions.isExternalFilterPresent === 'function') {\n return this.gridOptions.isExternalFilterPresent({\n api: this.getApi(),\n columnApi: this.getColumnApi(),\n context: this.getContext()\n });\n }\n return false;\n };\n GridOptionsWrapper.prototype.doesExternalFilterPass = function (node) {\n if (typeof this.gridOptions.doesExternalFilterPass === 'function') {\n return this.gridOptions.doesExternalFilterPass(node);\n }\n return false;\n };\n GridOptionsWrapper.prototype.getTooltipDelay = function (type) {\n var _a = this.gridOptions,\n tooltipShowDelay = _a.tooltipShowDelay,\n tooltipHideDelay = _a.tooltipHideDelay;\n var delay = type === 'show' ? tooltipShowDelay : tooltipHideDelay;\n var capitalisedType = capitalise(type);\n if (exists(delay)) {\n if (delay < 0) {\n doOnce(function () {\n return console.warn(\"ag-grid: tooltip\" + capitalisedType + \"Delay should not be lower than 0\");\n }, \"tooltip\" + capitalisedType + \"DelayWarn\");\n }\n return Math.max(200, delay);\n }\n return null;\n };\n GridOptionsWrapper.prototype.isTooltipMouseTrack = function () {\n return isTrue(this.gridOptions.tooltipMouseTrack);\n };\n GridOptionsWrapper.prototype.isSuppressModelUpdateAfterUpdateTransaction = function () {\n return isTrue(this.gridOptions.suppressModelUpdateAfterUpdateTransaction);\n };\n GridOptionsWrapper.prototype.getDocument = function () {\n // if user is providing document, we use the users one,\n // otherwise we use the document on the global namespace.\n var result = null;\n if (this.gridOptions.getDocument && exists(this.gridOptions.getDocument)) {\n result = this.gridOptions.getDocument();\n } else if (this.eGridDiv) {\n result = this.eGridDiv.ownerDocument;\n }\n if (result && exists(result)) {\n return result;\n }\n return document;\n };\n GridOptionsWrapper.prototype.getMinColWidth = function () {\n var minColWidth = this.gridOptions.minColWidth;\n if (exists(minColWidth) && minColWidth > GridOptionsWrapper_1.MIN_COL_WIDTH) {\n return this.gridOptions.minColWidth;\n }\n var measuredMin = this.getFromTheme(null, 'headerCellMinWidth');\n return exists(measuredMin) ? Math.max(measuredMin, GridOptionsWrapper_1.MIN_COL_WIDTH) : GridOptionsWrapper_1.MIN_COL_WIDTH;\n };\n GridOptionsWrapper.prototype.getMaxColWidth = function () {\n if (this.gridOptions.maxColWidth && this.gridOptions.maxColWidth > GridOptionsWrapper_1.MIN_COL_WIDTH) {\n return this.gridOptions.maxColWidth;\n }\n return null;\n };\n GridOptionsWrapper.prototype.getColWidth = function () {\n if (typeof this.gridOptions.colWidth !== 'number' || this.gridOptions.colWidth < GridOptionsWrapper_1.MIN_COL_WIDTH) {\n return 200;\n }\n return this.gridOptions.colWidth;\n };\n GridOptionsWrapper.prototype.getRowBuffer = function () {\n var rowBuffer = this.gridOptions.rowBuffer;\n if (typeof rowBuffer === 'number') {\n if (rowBuffer < 0) {\n doOnce(function () {\n return console.warn(\"AG Grid: rowBuffer should not be negative\");\n }, 'warn rowBuffer negative');\n this.gridOptions.rowBuffer = rowBuffer = 0;\n }\n } else {\n rowBuffer = Constants.ROW_BUFFER_SIZE;\n }\n return rowBuffer;\n };\n GridOptionsWrapper.prototype.getRowBufferInPixels = function () {\n var rowsToBuffer = this.getRowBuffer();\n var defaultRowHeight = this.getRowHeightAsNumber();\n return rowsToBuffer * defaultRowHeight;\n };\n // the user might be using some non-standard scrollbar, eg a scrollbar that has zero\n // width and overlays (like the Safari scrollbar, but presented in Chrome). so we\n // allow the user to provide the scroll width before we work it out.\n GridOptionsWrapper.prototype.getScrollbarWidth = function () {\n if (this.scrollbarWidth == null) {\n var useGridOptions = typeof this.gridOptions.scrollbarWidth === 'number' && this.gridOptions.scrollbarWidth >= 0;\n var scrollbarWidth = useGridOptions ? this.gridOptions.scrollbarWidth : getScrollbarWidth();\n if (scrollbarWidth != null) {\n this.scrollbarWidth = scrollbarWidth;\n this.eventService.dispatchEvent({\n type: Events.EVENT_SCROLLBAR_WIDTH_CHANGED\n });\n }\n }\n return this.scrollbarWidth;\n };\n GridOptionsWrapper.prototype.checkForDeprecated = function () {\n // casting to generic object, so typescript compiles even though\n // we are looking for attributes that don't exist\n var options = this.gridOptions;\n if (options.deprecatedEmbedFullWidthRows) {\n console.warn(\"AG Grid: since v21.2, deprecatedEmbedFullWidthRows has been replaced with embedFullWidthRows.\");\n }\n if (options.rowDeselection) {\n console.warn('AG Grid: since v24.x, rowDeselection is deprecated and the behaviour is true by default. Please use `suppressRowDeselection` to prevent rows from being deselected.');\n }\n if (options.enableMultiRowDragging) {\n options.rowDragMultiRow = true;\n delete options.enableMultiRowDragging;\n console.warn('AG Grid: since v26.1, `enableMultiRowDragging` is deprecated. Please use `rowDragMultiRow`.');\n }\n var checkRenamedProperty = function (oldProp, newProp, version) {\n if (options[oldProp] != null) {\n console.warn(\"AG Grid: since version \" + version + \", '\" + oldProp + \"' is deprecated / renamed, please use the new property name '\" + newProp + \"' instead.\");\n if (options[newProp] == null) {\n options[newProp] = options[oldProp];\n }\n }\n };\n checkRenamedProperty('batchUpdateWaitMillis', 'asyncTransactionWaitMillis', '23.1.x');\n checkRenamedProperty('deltaRowDataMode', 'immutableData', '23.1.x');\n checkRenamedProperty('serverSideFilteringAlwaysResets', 'serverSideFilterAllLevels', '28.0.0');\n checkRenamedProperty('serverSideSortingAlwaysResets', 'serverSideSortAllLevels', '28.0.0');\n if (options.immutableColumns || options.deltaColumnMode) {\n console.warn('AG Grid: since v24.0, immutableColumns and deltaColumnMode properties are gone. The grid now works like this as default. To keep column order maintained, set grid property applyColumnDefOrder=true');\n }\n checkRenamedProperty('suppressSetColumnStateEvents', 'suppressColumnStateEvents', '24.0.x');\n if (options.groupRowInnerRenderer || options.groupRowInnerRendererParams || options.groupRowInnerRendererFramework) {\n console.warn('AG Grid: since v24.0, grid properties groupRowInnerRenderer, groupRowInnerRendererFramework and groupRowInnerRendererParams are no longer used.');\n console.warn(' Instead use the grid properties groupRowRendererParams.innerRenderer, groupRowRendererParams.innerRendererFramework and groupRowRendererParams.innerRendererParams.');\n console.warn(' For example instead of this:');\n console.warn(' groupRowInnerRenderer: \"myRenderer\"');\n console.warn(' groupRowInnerRendererParams: {x: a}');\n console.warn(' Replace with this:');\n console.warn(' groupRowRendererParams: {');\n console.warn(' innerRenderer: \"myRenderer\",');\n console.warn(' innerRendererParams: {x: a}');\n console.warn(' }');\n console.warn(' We have copied the properties over for you. However to stop this error message, please change your application code.');\n if (!options.groupRowRendererParams) {\n options.groupRowRendererParams = {};\n }\n var params = options.groupRowRendererParams;\n if (options.groupRowInnerRenderer) {\n params.innerRenderer = options.groupRowInnerRenderer;\n }\n if (options.groupRowInnerRendererParams) {\n params.innerRendererParams = options.groupRowInnerRendererParams;\n }\n if (options.groupRowInnerRendererFramework) {\n params.innerRendererFramework = options.groupRowInnerRendererFramework;\n }\n }\n if (options.rememberGroupStateWhenNewData) {\n console.warn('AG Grid: since v24.0, grid property rememberGroupStateWhenNewData is deprecated. This feature was provided before Transaction Updates worked (which keep group state). Now that transaction updates are possible and they keep group state, this feature is no longer needed.');\n }\n if (options.detailCellRendererParams && options.detailCellRendererParams.autoHeight) {\n console.warn('AG Grid: since v24.1, grid property detailCellRendererParams.autoHeight is replaced with grid property detailRowAutoHeight. This allows this feature to work when you provide a custom DetailCellRenderer');\n options.detailRowAutoHeight = true;\n }\n if (options.suppressKeyboardEvent) {\n console.warn(\"AG Grid: since v24.1 suppressKeyboardEvent in the gridOptions has been deprecated and will be removed in\\n future versions of AG Grid. If you need this to be set for every column use the defaultColDef property.\");\n }\n if (options.suppressEnterpriseResetOnNewColumns) {\n console.warn('AG Grid: since v25, grid property suppressEnterpriseResetOnNewColumns is deprecated. This was a temporary property to allow changing columns in Server Side Row Model without triggering a reload. Now that it is possible to dynamically change columns in the grid, this is no longer needed.');\n }\n if (options.suppressColumnStateEvents) {\n console.warn('AG Grid: since v25, grid property suppressColumnStateEvents no longer works due to a refactor that we did. It should be possible to achieve similar using event.source, which would be \"api\" if the event was due to setting column state via the API');\n }\n if (options.defaultExportParams) {\n console.warn('AG Grid: since v25.2, the grid property `defaultExportParams` has been replaced by `defaultCsvExportParams` and `defaultExcelExportParams`.');\n }\n if (options.stopEditingWhenGridLosesFocus) {\n console.warn('AG Grid: since v25.2.2, the grid property `stopEditingWhenGridLosesFocus` has been replaced by `stopEditingWhenCellsLoseFocus`.');\n options.stopEditingWhenCellsLoseFocus = true;\n }\n if (options.applyColumnDefOrder) {\n console.warn('AG Grid: since v26.0, the grid property `applyColumnDefOrder` is no longer needed, as this is the default behaviour. To turn this behaviour off, set maintainColumnOrder=true');\n }\n if (options.groupMultiAutoColumn) {\n console.warn(\"AG Grid: since v26.0, the grid property `groupMultiAutoColumn` has been replaced by `groupDisplayType = 'multipleColumns'`\");\n options.groupDisplayType = 'multipleColumns';\n }\n if (options.groupUseEntireRow) {\n console.warn(\"AG Grid: since v26.0, the grid property `groupUseEntireRow` has been replaced by `groupDisplayType = 'groupRows'`\");\n options.groupDisplayType = 'groupRows';\n }\n if (options.groupSuppressAutoColumn) {\n var propName = options.treeData ? 'treeDataDisplayType' : 'groupDisplayType';\n console.warn(\"AG Grid: since v26.0, the grid property `groupSuppressAutoColumn` has been replaced by `\" + propName + \" = 'custom'`\");\n options.groupDisplayType = 'custom';\n }\n if (options.defaultGroupOrderComparator) {\n console.warn(\"AG Grid: since v27.2, the grid property `defaultGroupOrderComparator` is deprecated and has been replaced by `initialGroupOrderComparator` and now receives a single params object.\");\n }\n if (options.defaultGroupSortComparator) {\n console.warn(\"AG Grid: since v26.0, the grid property `defaultGroupSortComparator` has been replaced by `initialGroupOrderComparator`\");\n options.defaultGroupOrderComparator = options.defaultGroupSortComparator;\n }\n if (options.groupRowAggNodes) {\n console.warn(\"AG Grid: since v27.2, the grid property `groupRowAggNodes` is deprecated and has been replaced by `getGroupRowAgg` and now receives a single params object.\");\n }\n if (options.postSort) {\n console.warn(\"AG Grid: since v27.2, the grid property `postSort` is deprecated and has been replaced by `postSortRows` and now receives a single params object.\");\n }\n if (options.isFullWidthCell) {\n console.warn(\"AG Grid: since v27.2, the grid property `isFullWidthCell` is deprecated and has been replaced by `isFullWidthRow` and now receives a single params object.\");\n }\n if (options.localeTextFunc) {\n console.warn(\"AG Grid: since v27.2, the grid property `localeTextFunc` is deprecated and has been replaced by `getLocaleText` and now receives a single params object.\");\n }\n if (options.colWidth) {\n console.warn('AG Grid: since v26.1, the grid property `colWidth` is deprecated and should be set via `defaultColDef.width`.');\n }\n if (options.minColWidth) {\n console.warn('AG Grid: since v26.1, the grid property `minColWidth` is deprecated and should be set via `defaultColDef.minWidth`.');\n }\n if (options.maxColWidth) {\n console.warn('AG Grid: since v26.1, the grid property `maxColWidth` is deprecated and should be set via `defaultColDef.maxWidth`.');\n }\n if (options.reactUi) {\n console.warn('AG Grid: since v27.0, React UI is on by default, so no need for reactUi=true. To turn it off, set suppressReactUi=true.');\n }\n if (options.suppressReactUi) {\n console.warn('AG Grid: The legacy React rendering engine is deprecated and will be removed in the next major version of the grid.');\n }\n if (options.suppressCellSelection) {\n console.warn('AG Grid: since v27.0, `suppressCellSelection` has been replaced by `suppressCellFocus`.');\n options.suppressCellFocus = options.suppressCellSelection;\n }\n if (options.getRowNodeId) {\n console.warn('AG Grid: since v27.1, `getRowNodeId` is deprecated and has been replaced by `getRowId`. The difference: if getRowId() is implemented then immutable data is enabled by default.');\n }\n if (options.immutableData) {\n if (options.getRowId) {\n console.warn('AG Grid: since v27.1, `immutableData` is deprecated. With the `getRowId` callback implemented, immutable data is enabled by default so you can remove `immutableData=true`.');\n } else {\n console.warn('AG Grid: since v27.1, `immutableData` is deprecated. To enable immutable data you must implement the `getRowId()` callback.');\n }\n }\n if (options.clipboardDeliminator) {\n console.warn('AG Grid: since v27.1, `clipboardDeliminator` has been replaced by `clipboardDelimiter`.');\n options.clipboardDelimiter = options.clipboardDeliminator;\n }\n checkRenamedProperty('processSecondaryColDef', 'processPivotResultColDef', '28.0.x');\n checkRenamedProperty('processSecondaryColGroupDef', 'processPivotResultColGroupDef', '28.0.x');\n if (options.serverSideStoreType) {\n console.warn('AG Grid: since v28.0, `serverSideStoreType` has been replaced by `serverSideInfiniteScroll`. Set to true to use Partial Store, and false to use Full Store.');\n options.serverSideInfiniteScroll = options.serverSideStoreType === 'partial';\n }\n checkRenamedProperty('getServerSideStoreParams', 'getServerSideGroupLevelParams', '28.0.x');\n };\n GridOptionsWrapper.prototype.checkForViolations = function () {\n if (this.isTreeData()) {\n this.treeDataViolations();\n }\n };\n GridOptionsWrapper.prototype.treeDataViolations = function () {\n if (this.isRowModelDefault()) {\n if (missing(this.getDataPathFunc())) {\n 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.');\n }\n }\n if (this.isRowModelServerSide()) {\n if (missing(this.getIsServerSideGroupFunc())) {\n 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.');\n }\n if (missing(this.getServerSideGroupKeyFunc())) {\n 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.');\n }\n }\n };\n GridOptionsWrapper.prototype.getLocaleTextFunc = function () {\n var _this = this;\n var _a = this.gridOptions,\n localeText = _a.localeText,\n getLocaleText = _a.getLocaleText,\n localeTextFunc = _a.localeTextFunc;\n if (getLocaleText) {\n //key: string, defaultValue: string, variableValues?: string[]\n return function (key, defaultValue, variableValues) {\n var params = {\n key: key,\n defaultValue: defaultValue,\n variableValues: variableValues,\n api: _this.getApi(),\n columnApi: _this.getColumnApi(),\n context: _this.getContext()\n };\n return getLocaleText(params);\n };\n }\n if (localeTextFunc) {\n return localeTextFunc;\n }\n return function (key, defaultValue, variableValues) {\n var localisedText = localeText && localeText[key];\n if (localisedText && variableValues && variableValues.length) {\n var found = 0;\n while (true) {\n if (found >= variableValues.length) {\n break;\n }\n var idx = localisedText.indexOf('${variable}');\n if (idx === -1) {\n break;\n }\n localisedText = localisedText.replace('${variable}', variableValues[found++]);\n }\n }\n return localisedText !== null && localisedText !== void 0 ? localisedText : defaultValue;\n };\n };\n // responsible for calling the onXXX functions on gridOptions\n GridOptionsWrapper.prototype.globalEventHandler = function (eventName, event) {\n // prevent events from being fired _after_ the grid has been destroyed\n if (this.destroyed) {\n return;\n }\n var callbackMethodName = ComponentUtil.getCallbackForEvent(eventName);\n if (typeof this.gridOptions[callbackMethodName] === 'function') {\n this.gridOptions[callbackMethodName](event);\n }\n };\n GridOptionsWrapper.prototype.setRowHeightVariable = function (height) {\n var oldRowHeight = this.eGridDiv.style.getPropertyValue('--ag-line-height').trim();\n var newRowHeight = height + \"px\";\n if (oldRowHeight != newRowHeight) {\n this.eGridDiv.style.setProperty('--ag-line-height', newRowHeight);\n }\n };\n // we don't allow dynamic row height for virtual paging\n GridOptionsWrapper.prototype.getRowHeightAsNumber = function () {\n if (!this.gridOptions.rowHeight || missing(this.gridOptions.rowHeight)) {\n return this.getDefaultRowHeight();\n }\n var rowHeight = this.gridOptions.rowHeight;\n if (rowHeight && this.isNumeric(rowHeight)) {\n this.setRowHeightVariable(rowHeight);\n return rowHeight;\n }\n console.warn('AG Grid row height must be a number if not using standard row model');\n return this.getDefaultRowHeight();\n };\n GridOptionsWrapper.prototype.isGetRowHeightFunction = function () {\n return typeof this.gridOptions.getRowHeight === 'function';\n };\n GridOptionsWrapper.prototype.getRowHeightForNode = function (rowNode, allowEstimate, defaultRowHeight) {\n if (allowEstimate === void 0) {\n allowEstimate = false;\n }\n if (defaultRowHeight == null) {\n defaultRowHeight = this.getDefaultRowHeight();\n }\n // check the function first, in case use set both function and\n // number, when using virtual pagination then function can be\n // used for pinned rows and the number for the body rows.\n if (this.isGetRowHeightFunction()) {\n if (allowEstimate) {\n return {\n height: defaultRowHeight,\n estimated: true\n };\n }\n var params = {\n node: rowNode,\n data: rowNode.data\n };\n var height = this.mergeGridCommonParams(this.gridOptions.getRowHeight)(params);\n if (this.isNumeric(height)) {\n if (height === 0) {\n doOnce(function () {\n return console.warn('AG Grid: The return of `getRowHeight` cannot be zero. If the intention is to hide rows, use a filter instead.');\n }, 'invalidRowHeight');\n }\n return {\n height: Math.max(1, height),\n estimated: false\n };\n }\n }\n if (rowNode.detail && this.isMasterDetail()) {\n // if autoHeight, we want the height to grow to the new height starting at 1, as otherwise a flicker would happen,\n // as the detail goes to the default (eg 200px) and then immediately shrink up/down to the new measured height\n // (due to auto height) which looks bad, especially if doing row animation.\n if (this.isDetailRowAutoHeight()) {\n return {\n height: 1,\n estimated: false\n };\n }\n if (this.isNumeric(this.gridOptions.detailRowHeight)) {\n return {\n height: this.gridOptions.detailRowHeight,\n estimated: false\n };\n }\n return {\n height: DEFAULT_DETAIL_ROW_HEIGHT,\n estimated: false\n };\n }\n var rowHeight = this.gridOptions.rowHeight && this.isNumeric(this.gridOptions.rowHeight) ? this.gridOptions.rowHeight : defaultRowHeight;\n return {\n height: rowHeight,\n estimated: false\n };\n };\n GridOptionsWrapper.prototype.isDynamicRowHeight = function () {\n return typeof this.gridOptions.getRowHeight === 'function';\n };\n GridOptionsWrapper.prototype.getListItemHeight = function () {\n return this.getFromTheme(20, 'listItemHeight');\n };\n GridOptionsWrapper.prototype.chartMenuPanelWidth = function () {\n return this.environment.chartMenuPanelWidth();\n };\n GridOptionsWrapper.prototype.isNumeric = function (value) {\n return !isNaN(value) && typeof value === 'number' && isFinite(value);\n };\n GridOptionsWrapper.prototype.getFromTheme = function (defaultValue, sassVariableName) {\n var theme = this.environment.getTheme().theme;\n if (theme && theme.indexOf('ag-theme') === 0) {\n return this.environment.getSassVariable(theme, sassVariableName);\n }\n return defaultValue;\n };\n GridOptionsWrapper.prototype.getDefaultRowHeight = function () {\n return this.getFromTheme(DEFAULT_ROW_HEIGHT, 'rowHeight');\n };\n GridOptionsWrapper.prototype.matchesGroupDisplayType = function (toMatch, supplied) {\n var groupDisplayTypeValues = ['groupRows', 'multipleColumns', 'custom', 'singleColumn'];\n if (groupDisplayTypeValues.indexOf(supplied) < 0) {\n console.warn(\"AG Grid: '\" + supplied + \"' is not a valid groupDisplayType value - possible values are: '\" + groupDisplayTypeValues.join(\"', '\") + \"'\");\n return false;\n }\n return supplied === toMatch;\n };\n GridOptionsWrapper.prototype.matchesTreeDataDisplayType = function (toMatch, supplied) {\n var treeDataDisplayTypeValues = ['auto', 'custom'];\n if (treeDataDisplayTypeValues.indexOf(supplied) < 0) {\n console.warn(\"AG Grid: '\" + supplied + \"' is not a valid treeDataDisplayType value - possible values are: '\" + treeDataDisplayTypeValues.join(\"', '\") + \"'\");\n return false;\n }\n return supplied === toMatch;\n };\n var GridOptionsWrapper_1;\n GridOptionsWrapper.MIN_COL_WIDTH = 10;\n GridOptionsWrapper.PROP_HEADER_HEIGHT = 'headerHeight';\n GridOptionsWrapper.PROP_GROUP_REMOVE_SINGLE_CHILDREN = 'groupRemoveSingleChildren';\n GridOptionsWrapper.PROP_GROUP_REMOVE_LOWEST_SINGLE_CHILDREN = 'groupRemoveLowestSingleChildren';\n GridOptionsWrapper.PROP_GROUP_DISPLAY_TYPE = 'groupDisplayType';\n GridOptionsWrapper.PROP_PIVOT_HEADER_HEIGHT = 'pivotHeaderHeight';\n GridOptionsWrapper.PROP_SUPPRESS_CLIPBOARD_PASTE = 'suppressClipboardPaste';\n GridOptionsWrapper.PROP_GROUP_HEADER_HEIGHT = 'groupHeaderHeight';\n GridOptionsWrapper.PROP_PIVOT_GROUP_HEADER_HEIGHT = 'pivotGroupHeaderHeight';\n GridOptionsWrapper.PROP_NAVIGATE_TO_NEXT_CELL = 'navigateToNextCell';\n GridOptionsWrapper.PROP_TAB_TO_NEXT_CELL = 'tabToNextCell';\n GridOptionsWrapper.PROP_NAVIGATE_TO_NEXT_HEADER = 'navigateToNextHeader';\n GridOptionsWrapper.PROP_TAB_TO_NEXT_HEADER = 'tabToNextHeader';\n GridOptionsWrapper.PROP_IS_EXTERNAL_FILTER_PRESENT = 'isExternalFilterPresent';\n GridOptionsWrapper.PROP_DOES_EXTERNAL_FILTER_PASS = 'doesExternalFilterPass';\n GridOptionsWrapper.PROP_FLOATING_FILTERS_HEIGHT = 'floatingFiltersHeight';\n GridOptionsWrapper.PROP_SUPPRESS_ROW_CLICK_SELECTION = 'suppressRowClickSelection';\n GridOptionsWrapper.PROP_SUPPRESS_ROW_DRAG = 'suppressRowDrag';\n GridOptionsWrapper.PROP_SUPPRESS_MOVE_WHEN_ROW_DRAG = 'suppressMoveWhenRowDragging';\n GridOptionsWrapper.PROP_GET_ROW_CLASS = 'getRowClass';\n GridOptionsWrapper.PROP_GET_ROW_STYLE = 'getRowStyle';\n GridOptionsWrapper.PROP_GET_ROW_HEIGHT = 'getRowHeight';\n GridOptionsWrapper.PROP_POPUP_PARENT = 'popupParent';\n GridOptionsWrapper.PROP_DOM_LAYOUT = 'domLayout';\n GridOptionsWrapper.PROP_ROW_CLASS = 'rowClass';\n GridOptionsWrapper.PROP_FILL_HANDLE_DIRECTION = 'fillHandleDirection';\n GridOptionsWrapper.PROP_GROUP_ROW_AGG_NODES = 'groupRowAggNodes';\n GridOptionsWrapper.PROP_GET_GROUP_ROW_AGG = 'getGroupRowAgg';\n GridOptionsWrapper.PROP_GET_BUSINESS_KEY_FOR_NODE = 'getBusinessKeyForNode';\n GridOptionsWrapper.PROP_GET_CHILD_COUNT = 'getChildCount';\n GridOptionsWrapper.PROP_PROCESS_ROW_POST_CREATE = 'processRowPostCreate';\n GridOptionsWrapper.PROP_GET_ROW_NODE_ID = 'getRowNodeId';\n GridOptionsWrapper.PROP_GET_ROW_ID = 'getRowId';\n GridOptionsWrapper.PROP_IS_FULL_WIDTH_CELL = 'isFullWidthCell';\n GridOptionsWrapper.PROP_IS_FULL_WIDTH_ROW = 'isFullWidthRow';\n GridOptionsWrapper.PROP_IS_ROW_SELECTABLE = 'isRowSelectable';\n GridOptionsWrapper.PROP_IS_ROW_MASTER = 'isRowMaster';\n GridOptionsWrapper.PROP_POST_SORT = 'postSort';\n GridOptionsWrapper.PROP_POST_SORT_ROWS = 'postSortRows';\n GridOptionsWrapper.PROP_GET_DOCUMENT = 'getDocument';\n GridOptionsWrapper.PROP_POST_PROCESS_POPUP = 'postProcessPopup';\n GridOptionsWrapper.PROP_DEFAULT_GROUP_ORDER_COMPARATOR = 'defaultGroupOrderComparator';\n GridOptionsWrapper.PROP_INITIAL_GROUP_ORDER_COMPARATOR = 'initialGroupOrderComparator';\n GridOptionsWrapper.PROP_PAGINATION_NUMBER_FORMATTER = 'paginationNumberFormatter';\n GridOptionsWrapper.PROP_GET_CONTEXT_MENU_ITEMS = 'getContextMenuItems';\n GridOptionsWrapper.PROP_GET_MAIN_MENU_ITEMS = 'getMainMenuItems';\n GridOptionsWrapper.PROP_PROCESS_CELL_FOR_CLIPBOARD = 'processCellForClipboard';\n GridOptionsWrapper.PROP_PROCESS_CELL_FROM_CLIPBOARD = 'processCellFromClipboard';\n GridOptionsWrapper.PROP_SEND_TO_CLIPBOARD = 'sendToClipboard';\n GridOptionsWrapper.PROP_PROCESS_PIVOT_RESULT_COL_DEF = 'processPivotResultColDef';\n GridOptionsWrapper.PROP_PROCESS_PIVOT_RESULT_COL_GROUP_DEF = 'processPivotResultColGroupDef';\n GridOptionsWrapper.PROP_GET_CHART_TOOLBAR_ITEMS = 'getChartToolbarItems';\n GridOptionsWrapper.PROP_GET_SERVER_SIDE_GROUP_PARAMS = 'getServerSideGroupLevelParams';\n GridOptionsWrapper.PROP_IS_SERVER_SIDE_GROUPS_OPEN_BY_DEFAULT = 'isServerSideGroupOpenByDefault';\n GridOptionsWrapper.PROP_IS_APPLY_SERVER_SIDE_TRANSACTION = 'isApplyServerSideTransaction';\n GridOptionsWrapper.PROP_IS_SERVER_SIDE_GROUP = 'isServerSideGroup';\n GridOptionsWrapper.PROP_GET_SERVER_SIDE_GROUP_KEY = 'getServerSideGroupKey';\n GridOptionsWrapper.PROP_AUTO_GROUP_COLUMN_DEF = 'autoGroupColumnDef';\n GridOptionsWrapper.PROP_DEFAULT_COL_DEF = 'defaultColDef';\n __decorate$2v([Autowired('gridOptions')], GridOptionsWrapper.prototype, \"gridOptions\", void 0);\n __decorate$2v([Autowired('eventService')], GridOptionsWrapper.prototype, \"eventService\", void 0);\n __decorate$2v([Autowired('environment')], GridOptionsWrapper.prototype, \"environment\", void 0);\n __decorate$2v([Autowired('eGridDiv')], GridOptionsWrapper.prototype, \"eGridDiv\", void 0);\n __decorate$2v([__param$8(0, Qualifier('gridApi')), __param$8(1, Qualifier('columnApi'))], GridOptionsWrapper.prototype, \"agWire\", null);\n __decorate$2v([PreDestroy], GridOptionsWrapper.prototype, \"destroy\", null);\n __decorate$2v([PostConstruct], GridOptionsWrapper.prototype, \"init\", null);\n GridOptionsWrapper = GridOptionsWrapper_1 = __decorate$2v([Bean('gridOptionsWrapper')], GridOptionsWrapper);\n return GridOptionsWrapper;\n}();\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue\n * @version v28.2.1\n * @link https://www.ag-grid.com/\n * @license MIT\n */\nvar __extends$2T = undefined && undefined.__extends || function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf || {\n __proto__: []\n } instanceof Array && function (d, b) {\n d.__proto__ = b;\n } || function (d, b) {\n for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];\n };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() {\n this.constructor = d;\n }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n}();\nvar __decorate$2u = undefined && undefined.__decorate || function (decorators, target, key, desc) {\n var c = arguments.length,\n r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc,\n d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nvar __param$7 = undefined && undefined.__param || function (paramIndex, decorator) {\n return function (target, key) {\n decorator(target, key, paramIndex);\n };\n};\nvar __rest = undefined && undefined.__rest || function (s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];\n }\n return t;\n};\nvar __values$4 = undefined && undefined.__values || function (o) {\n var s = typeof Symbol === \"function\" && Symbol.iterator,\n m = s && o[s],\n i = 0;\n if (m) return m.call(o);\n if (o && typeof o.length === \"number\") return {\n next: function () {\n if (o && i >= o.length) o = void 0;\n return {\n value: o && o[i++],\n done: !o\n };\n }\n };\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\n};\nvar __read$l = undefined && undefined.__read || function (o, n) {\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\n if (!m) return o;\n var i = m.call(o),\n r,\n ar = [],\n e;\n try {\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\n } catch (error) {\n e = {\n error: error\n };\n } finally {\n try {\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\n } finally {\n if (e) throw e.error;\n }\n }\n return ar;\n};\nvar __spread$f = undefined && undefined.__spread || function () {\n for (var ar = [], i = 0; i < arguments.length; i++) ar = ar.concat(__read$l(arguments[i]));\n return ar;\n};\nvar ColumnModel = /** @class */function (_super) {\n __extends$2T(ColumnModel, _super);\n function ColumnModel() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n // header row count, based on user provided columns\n _this.primaryHeaderRowCount = 0;\n _this.secondaryHeaderRowCount = 0;\n // header row count, either above, or based on pivoting if we are pivoting\n _this.gridHeaderRowCount = 0;\n // leave level columns of the displayed trees\n _this.displayedColumnsLeft = [];\n _this.displayedColumnsRight = [];\n _this.displayedColumnsCenter = [];\n // all three lists above combined\n _this.displayedColumns = [];\n // for fast lookup, to see if a column or group is still displayed\n _this.displayedColumnsAndGroupsMap = {};\n // all columns to be rendered\n _this.viewportColumns = [];\n // A hash key to keep track of changes in viewport columns\n _this.viewportColumnsHash = '';\n // same as viewportColumns, except we always include columns with headerAutoHeight\n _this.headerViewportColumns = [];\n // all columns to be rendered in the centre\n _this.viewportColumnsCenter = [];\n // same as viewportColumnsCenter, except we always include columns with headerAutoHeight\n _this.headerViewportColumnsCenter = [];\n _this.autoHeightActiveAtLeastOnce = false;\n _this.rowGroupColumns = [];\n _this.valueColumns = [];\n _this.pivotColumns = [];\n _this.ready = false;\n _this.autoGroupsNeedBuilding = false;\n _this.forceRecreateAutoGroups = false;\n _this.pivotMode = false;\n _this.bodyWidth = 0;\n _this.leftWidth = 0;\n _this.rightWidth = 0;\n _this.bodyWidthDirty = true;\n _this.flexColsCalculatedAtLestOnce = false;\n return _this;\n }\n ColumnModel.prototype.init = function () {\n var _this = this;\n this.suppressColumnVirtualisation = this.gridOptionsWrapper.isSuppressColumnVirtualisation();\n var pivotMode = this.gridOptionsWrapper.isPivotMode();\n if (this.isPivotSettingAllowed(pivotMode)) {\n this.pivotMode = pivotMode;\n }\n this.usingTreeData = this.gridOptionsWrapper.isTreeData();\n this.addManagedListener(this.gridOptionsWrapper, GridOptionsWrapper.PROP_GROUP_DISPLAY_TYPE, function () {\n return _this.onAutoGroupColumnDefChanged();\n });\n this.addManagedListener(this.gridOptionsWrapper, GridOptionsWrapper.PROP_AUTO_GROUP_COLUMN_DEF, function () {\n return _this.onAutoGroupColumnDefChanged();\n });\n this.addManagedListener(this.gridOptionsWrapper, GridOptionsWrapper.PROP_DEFAULT_COL_DEF, function () {\n return _this.onDefaultColDefChanged();\n });\n };\n ColumnModel.prototype.onAutoGroupColumnDefChanged = function () {\n this.autoGroupsNeedBuilding = true;\n this.forceRecreateAutoGroups = true;\n this.updateGridColumns();\n this.updateDisplayedColumns('gridOptionsChanged');\n };\n ColumnModel.prototype.onDefaultColDefChanged = function () {\n // likewise for autoGroupCol, the default col def impacts this\n this.forceRecreateAutoGroups = true;\n this.createColumnsFromColumnDefs(true);\n };\n ColumnModel.prototype.setColumnDefs = function (columnDefs, source) {\n if (source === void 0) {\n source = 'api';\n }\n var colsPreviouslyExisted = !!this.columnDefs;\n this.columnDefs = columnDefs;\n this.createColumnsFromColumnDefs(colsPreviouslyExisted, source);\n };\n ColumnModel.prototype.createColumnsFromColumnDefs = function (colsPreviouslyExisted, source) {\n var _this = this;\n if (source === void 0) {\n source = 'api';\n }\n // only need to raise before/after events if updating columns, never if setting columns for first time\n var raiseEventsFunc = colsPreviouslyExisted ? this.compareColumnStatesAndRaiseEvents(source) : undefined;\n // always invalidate cache on changing columns, as the column id's for the new columns\n // could overlap with the old id's, so the cache would return old values for new columns.\n this.valueCache.expire();\n // NOTE ==================\n // we should be destroying the existing columns and groups if they exist, for example, the original column\n // group adds a listener to the columns, it should be also removing the listeners\n this.autoGroupsNeedBuilding = true;\n var oldPrimaryColumns = this.primaryColumns;\n var oldPrimaryTree = this.primaryColumnTree;\n var balancedTreeResult = this.columnFactory.createColumnTree(this.columnDefs, true, oldPrimaryTree);\n this.primaryColumnTree = balancedTreeResult.columnTree;\n this.primaryHeaderRowCount = balancedTreeResult.treeDept + 1;\n this.primaryColumns = this.getColumnsFromTree(this.primaryColumnTree);\n this.primaryColumnsMap = {};\n this.primaryColumns.forEach(function (col) {\n return _this.primaryColumnsMap[col.getId()] = col;\n });\n this.extractRowGroupColumns(source, oldPrimaryColumns);\n this.extractPivotColumns(source, oldPrimaryColumns);\n this.extractValueColumns(source, oldPrimaryColumns);\n this.ready = true;\n // if we are showing secondary columns, then no need to update grid columns\n // at this point, as it's the pivot service responsibility to change these\n // if we are no longer pivoting (ie and need to revert back to primary, otherwise\n // we shouldn't be touching the primary).\n var gridColsNotProcessed = this.gridColsArePrimary === undefined;\n var processGridCols = this.gridColsArePrimary || gridColsNotProcessed;\n if (processGridCols) {\n this.updateGridColumns();\n if (colsPreviouslyExisted && !this.gridOptionsWrapper.isMaintainColumnOrder()) {\n this.orderGridColumnsLikePrimary();\n }\n this.updateDisplayedColumns(source);\n this.checkViewportColumns();\n }\n // this event is not used by AG Grid, but left here for backwards compatibility,\n // in case applications use it\n this.dispatchEverythingChanged(source);\n if (raiseEventsFunc) {\n raiseEventsFunc();\n }\n this.dispatchNewColumnsLoaded();\n };\n ColumnModel.prototype.dispatchNewColumnsLoaded = function () {\n var newColumnsLoadedEvent = {\n type: Events.EVENT_NEW_COLUMNS_LOADED\n };\n this.eventService.dispatchEvent(newColumnsLoadedEvent);\n };\n // this event is legacy, no grid code listens to it. instead the grid listens to New Columns Loaded\n ColumnModel.prototype.dispatchEverythingChanged = function (source) {\n if (source === void 0) {\n source = 'api';\n }\n var eventEverythingChanged = {\n type: Events.EVENT_COLUMN_EVERYTHING_CHANGED,\n source: source\n };\n this.eventService.dispatchEvent(eventEverythingChanged);\n };\n ColumnModel.prototype.orderGridColumnsLikePrimary = function () {\n var _this = this;\n var primaryColumns = this.primaryColumns;\n if (!primaryColumns) {\n return;\n }\n this.gridColumns.sort(function (colA, colB) {\n var primaryIndexA = primaryColumns.indexOf(colA);\n var primaryIndexB = primaryColumns.indexOf(colB);\n // if both cols are present in primary, then we just return the position,\n // so position is maintained.\n var indexAPresent = primaryIndexA >= 0;\n var indexBPresent = primaryIndexB >= 0;\n if (indexAPresent && indexBPresent) {\n return primaryIndexA - primaryIndexB;\n }\n if (indexAPresent) {\n // B is auto group column, so put B first\n return 1;\n }\n if (indexBPresent) {\n // A is auto group column, so put A first\n return -1;\n }\n // otherwise both A and B are auto-group columns. so we just keep the order\n // as they were already in.\n var gridIndexA = _this.gridColumns.indexOf(colA);\n var gridIndexB = _this.gridColumns.indexOf(colB);\n return gridIndexA - gridIndexB;\n });\n this.gridColumns = this.placeLockedColumns(this.gridColumns);\n };\n ColumnModel.prototype.getAllDisplayedAutoHeightCols = function () {\n return this.displayedAutoHeightCols;\n };\n ColumnModel.prototype.setViewport = function () {\n if (this.gridOptionsWrapper.isEnableRtl()) {\n this.viewportLeft = this.bodyWidth - this.scrollPosition - this.scrollWidth;\n this.viewportRight = this.bodyWidth - this.scrollPosition;\n } else {\n this.viewportLeft = this.scrollPosition;\n this.viewportRight = this.scrollWidth + this.scrollPosition;\n }\n };\n // used by clipboard service, to know what columns to paste into\n ColumnModel.prototype.getDisplayedColumnsStartingAt = function (column) {\n var currentColumn = column;\n var columns = [];\n while (currentColumn != null) {\n columns.push(currentColumn);\n currentColumn = this.getDisplayedColAfter(currentColumn);\n }\n return columns;\n };\n // checks what columns are currently displayed due to column virtualisation. fires an event\n // if the list of columns has changed.\n // + setColumnWidth(), setViewportPosition(), setColumnDefs(), sizeColumnsToFit()\n ColumnModel.prototype.checkViewportColumns = function () {\n // check displayCenterColumnTree exists first, as it won't exist when grid is initialising\n if (this.displayedColumnsCenter == null) {\n return;\n }\n var viewportColumnsChanged = this.extractViewport();\n if (!viewportColumnsChanged) {\n return;\n }\n var event = {\n type: Events.EVENT_VIRTUAL_COLUMNS_CHANGED\n };\n this.eventService.dispatchEvent(event);\n };\n ColumnModel.prototype.setViewportPosition = function (scrollWidth, scrollPosition) {\n if (scrollWidth !== this.scrollWidth || scrollPosition !== this.scrollPosition || this.bodyWidthDirty) {\n this.scrollWidth = scrollWidth;\n this.scrollPosition = scrollPosition;\n // we need to call setVirtualViewportLeftAndRight() at least once after the body width changes,\n // as the viewport can stay the same, but in RTL, if body width changes, we need to work out the\n // virtual columns again\n this.bodyWidthDirty = true;\n this.setViewport();\n if (this.ready) {\n this.checkViewportColumns();\n }\n }\n };\n ColumnModel.prototype.isPivotMode = function () {\n return this.pivotMode;\n };\n ColumnModel.prototype.isPivotSettingAllowed = function (pivot) {\n if (pivot && this.gridOptionsWrapper.isTreeData()) {\n console.warn(\"AG Grid: Pivot mode not available in conjunction Tree Data i.e. 'gridOptions.treeData: true'\");\n return false;\n }\n return true;\n };\n ColumnModel.prototype.setPivotMode = function (pivotMode, source) {\n if (source === void 0) {\n source = 'api';\n }\n if (pivotMode === this.pivotMode || !this.isPivotSettingAllowed(this.pivotMode)) {\n return;\n }\n this.pivotMode = pivotMode;\n // we need to update grid columns to cover the scenario where user has groupSuppressAutoColumn=true, as\n // this means we don't use auto group column UNLESS we are in pivot mode (it's mandatory in pivot mode),\n // so need to updateGridColumn() to check it autoGroupCol needs to be added / removed\n this.autoGroupsNeedBuilding = true;\n this.updateGridColumns();\n this.updateDisplayedColumns(source);\n var event = {\n type: Events.EVENT_COLUMN_PIVOT_MODE_CHANGED\n };\n this.eventService.dispatchEvent(event);\n };\n ColumnModel.prototype.getSecondaryPivotColumn = function (pivotKeys, valueColKey) {\n if (missing(this.secondaryColumns)) {\n return null;\n }\n var valueColumnToFind = this.getPrimaryColumn(valueColKey);\n var foundColumn = null;\n this.secondaryColumns.forEach(function (column) {\n var thisPivotKeys = column.getColDef().pivotKeys;\n var pivotValueColumn = column.getColDef().pivotValueColumn;\n var pivotKeyMatches = areEqual(thisPivotKeys, pivotKeys);\n var pivotValueMatches = pivotValueColumn === valueColumnToFind;\n if (pivotKeyMatches && pivotValueMatches) {\n foundColumn = column;\n }\n });\n return foundColumn;\n };\n ColumnModel.prototype.setBeans = function (loggerFactory) {\n this.logger = loggerFactory.create('columnModel');\n };\n ColumnModel.prototype.setFirstRightAndLastLeftPinned = function (source) {\n var lastLeft;\n var firstRight;\n if (this.gridOptionsWrapper.isEnableRtl()) {\n lastLeft = this.displayedColumnsLeft ? this.displayedColumnsLeft[0] : null;\n firstRight = this.displayedColumnsRight ? last(this.displayedColumnsRight) : null;\n } else {\n lastLeft = this.displayedColumnsLeft ? last(this.displayedColumnsLeft) : null;\n firstRight = this.displayedColumnsRight ? this.displayedColumnsRight[0] : null;\n }\n this.gridColumns.forEach(function (column) {\n column.setLastLeftPinned(column === lastLeft, source);\n column.setFirstRightPinned(column === firstRight, source);\n });\n };\n ColumnModel.prototype.autoSizeColumns = function (params) {\n var _this = this;\n var columns = params.columns,\n skipHeader = params.skipHeader,\n skipHeaderGroups = params.skipHeaderGroups,\n stopAtGroup = params.stopAtGroup,\n _a = params.source,\n source = _a === void 0 ? 'api' : _a;\n // because of column virtualisation, we can only do this function on columns that are\n // actually rendered, as non-rendered columns (outside the viewport and not rendered\n // due to column virtualisation) are not present. this can result in all rendered columns\n // getting narrowed, which in turn introduces more rendered columns on the RHS which\n // did not get autosized in the original run, leaving the visible grid with columns on\n // the LHS sized, but RHS no. so we keep looping through the visible columns until\n // no more cols are available (rendered) to be resized\n // we autosize after animation frames finish in case any cell renderers need to complete first. this can\n // happen eg if client code is calling api.autoSizeAllColumns() straight after grid is initialised, but grid\n // hasn't fully drawn out all the cells yet (due to cell renderers in animation frames).\n this.animationFrameService.flushAllFrames();\n // keep track of which cols we have resized in here\n var columnsAutosized = [];\n // initialise with anything except 0 so that while loop executes at least once\n var changesThisTimeAround = -1;\n var shouldSkipHeader = skipHeader != null ? skipHeader : this.gridOptionsWrapper.isSkipHeaderOnAutoSize();\n var shouldSkipHeaderGroups = skipHeaderGroups != null ? skipHeaderGroups : shouldSkipHeader;\n while (changesThisTimeAround !== 0) {\n changesThisTimeAround = 0;\n this.actionOnGridColumns(columns, function (column) {\n // if already autosized, skip it\n if (columnsAutosized.indexOf(column) >= 0) {\n return false;\n }\n // get how wide this col should be\n var preferredWidth = _this.autoWidthCalculator.getPreferredWidthForColumn(column, shouldSkipHeader);\n // preferredWidth = -1 if this col is not on the screen\n if (preferredWidth > 0) {\n var newWidth = _this.normaliseColumnWidth(column, preferredWidth);\n column.setActualWidth(newWidth, source);\n columnsAutosized.push(column);\n changesThisTimeAround++;\n }\n return true;\n }, source);\n }\n if (!shouldSkipHeaderGroups) {\n this.autoSizeColumnGroupsByColumns(columns, stopAtGroup);\n }\n this.fireColumnResizedEvent(columnsAutosized, true, 'autosizeColumns');\n };\n ColumnModel.prototype.fireColumnResizedEvent = function (columns, finished, source, flexColumns) {\n if (flexColumns === void 0) {\n flexColumns = null;\n }\n if (columns && columns.length) {\n var event_1 = {\n type: Events.EVENT_COLUMN_RESIZED,\n columns: columns,\n column: columns.length === 1 ? columns[0] : null,\n flexColumns: flexColumns,\n finished: finished,\n source: source\n };\n this.eventService.dispatchEvent(event_1);\n }\n };\n ColumnModel.prototype.autoSizeColumn = function (key, skipHeader, source) {\n if (source === void 0) {\n source = \"api\";\n }\n if (key) {\n this.autoSizeColumns({\n columns: [key],\n skipHeader: skipHeader,\n skipHeaderGroups: true,\n source: source\n });\n }\n };\n ColumnModel.prototype.autoSizeColumnGroupsByColumns = function (keys, stopAtGroup) {\n var e_1, _a, e_2, _b;\n var columnGroups = new Set();\n var columns = this.getGridColumns(keys);\n columns.forEach(function (col) {\n var parent = col.getParent();\n while (parent && parent != stopAtGroup) {\n if (!parent.isPadding()) {\n columnGroups.add(parent);\n }\n parent = parent.getParent();\n }\n });\n var headerGroupCtrl;\n var resizedColumns = [];\n try {\n for (var columnGroups_1 = __values$4(columnGroups), columnGroups_1_1 = columnGroups_1.next(); !columnGroups_1_1.done; columnGroups_1_1 = columnGroups_1.next()) {\n var columnGroup = columnGroups_1_1.value;\n try {\n for (var _c = (e_2 = void 0, __values$4(this.ctrlsService.getHeaderRowContainerCtrls())), _d = _c.next(); !_d.done; _d = _c.next()) {\n var headerContainerCtrl = _d.value;\n headerGroupCtrl = headerContainerCtrl.getHeaderCtrlForColumn(columnGroup);\n if (headerGroupCtrl) {\n break;\n }\n }\n } catch (e_2_1) {\n e_2 = {\n error: e_2_1\n };\n } finally {\n try {\n if (_d && !_d.done && (_b = _c.return)) _b.call(_c);\n } finally {\n if (e_2) throw e_2.error;\n }\n }\n if (headerGroupCtrl) {\n headerGroupCtrl.resizeLeafColumnsToFit();\n }\n }\n } catch (e_1_1) {\n e_1 = {\n error: e_1_1\n };\n } finally {\n try {\n if (columnGroups_1_1 && !columnGroups_1_1.done && (_a = columnGroups_1.return)) _a.call(columnGroups_1);\n } finally {\n if (e_1) throw e_1.error;\n }\n }\n return resizedColumns;\n };\n ColumnModel.prototype.autoSizeAllColumns = function (skipHeader, source) {\n if (source === void 0) {\n source = \"api\";\n }\n var allDisplayedColumns = this.getAllDisplayedColumns();\n this.autoSizeColumns({\n columns: allDisplayedColumns,\n skipHeader: skipHeader,\n source: source\n });\n };\n // Possible candidate for reuse (alot of recursive traversal duplication)\n ColumnModel.prototype.getColumnsFromTree = function (rootColumns) {\n var result = [];\n var recursiveFindColumns = function (childColumns) {\n for (var i = 0; i < childColumns.length; i++) {\n var child = childColumns[i];\n if (child instanceof Column) {\n result.push(child);\n } else if (child instanceof ProvidedColumnGroup) {\n recursiveFindColumns(child.getChildren());\n }\n }\n };\n recursiveFindColumns(rootColumns);\n return result;\n };\n ColumnModel.prototype.getAllDisplayedTrees = function () {\n if (this.displayedTreeLeft && this.displayedTreeRight && this.displayedTreeCentre) {\n return this.displayedTreeLeft.concat(this.displayedTreeCentre).concat(this.displayedTreeRight);\n }\n return null;\n };\n // + columnSelectPanel\n ColumnModel.prototype.getPrimaryColumnTree = function () {\n return this.primaryColumnTree;\n };\n // + gridPanel -> for resizing the body and setting top margin\n ColumnModel.prototype.getHeaderRowCount = function () {\n return this.gridHeaderRowCount;\n };\n // + headerRenderer -> setting pinned body width\n ColumnModel.prototype.getDisplayedTreeLeft = function () {\n return this.displayedTreeLeft;\n };\n // + headerRenderer -> setting pinned body width\n ColumnModel.prototype.getDisplayedTreeRight = function () {\n return this.displayedTreeRight;\n };\n // + headerRenderer -> setting pinned body width\n ColumnModel.prototype.getDisplayedTreeCentre = function () {\n return this.displayedTreeCentre;\n };\n // gridPanel -> ensureColumnVisible\n ColumnModel.prototype.isColumnDisplayed = function (column) {\n return this.getAllDisplayedColumns().indexOf(column) >= 0;\n };\n // + csvCreator\n ColumnModel.prototype.getAllDisplayedColumns = function () {\n return this.displayedColumns;\n };\n ColumnModel.prototype.getViewportColumns = function () {\n return this.viewportColumns;\n };\n ColumnModel.prototype.getDisplayedLeftColumnsForRow = function (rowNode) {\n if (!this.colSpanActive) {\n return this.displayedColumnsLeft;\n }\n return this.getDisplayedColumnsForRow(rowNode, this.displayedColumnsLeft);\n };\n ColumnModel.prototype.getDisplayedRightColumnsForRow = function (rowNode) {\n if (!this.colSpanActive) {\n return this.displayedColumnsRight;\n }\n return this.getDisplayedColumnsForRow(rowNode, this.displayedColumnsRight);\n };\n ColumnModel.prototype.getDisplayedColumnsForRow = function (rowNode, displayedColumns, filterCallback, emptySpaceBeforeColumn) {\n var result = [];\n var lastConsideredCol = null;\n var _loop_1 = function (i) {\n var col = displayedColumns[i];\n var maxAllowedColSpan = displayedColumns.length - i;\n var colSpan = Math.min(col.getColSpan(rowNode), maxAllowedColSpan);\n var columnsToCheckFilter = [col];\n if (colSpan > 1) {\n var colsToRemove = colSpan - 1;\n for (var j = 1; j <= colsToRemove; j++) {\n columnsToCheckFilter.push(displayedColumns[i + j]);\n }\n i += colsToRemove;\n }\n // see which cols we should take out for column virtualisation\n var filterPasses;\n if (filterCallback) {\n // if user provided a callback, means some columns may not be in the viewport.\n // the user will NOT provide a callback if we are talking about pinned areas,\n // as pinned areas have no horizontal scroll and do not virtualise the columns.\n // if lots of columns, that means column spanning, and we set filterPasses = true\n // if one or more of the columns spanned pass the filter.\n filterPasses = false;\n columnsToCheckFilter.forEach(function (colForFilter) {\n if (filterCallback(colForFilter)) {\n filterPasses = true;\n }\n });\n } else {\n filterPasses = true;\n }\n if (filterPasses) {\n if (result.length === 0 && lastConsideredCol) {\n var gapBeforeColumn = emptySpaceBeforeColumn ? emptySpaceBeforeColumn(col) : false;\n if (gapBeforeColumn) {\n result.push(lastConsideredCol);\n }\n }\n result.push(col);\n }\n lastConsideredCol = col;\n out_i_1 = i;\n };\n var out_i_1;\n for (var i = 0; i < displayedColumns.length; i++) {\n _loop_1(i);\n i = out_i_1;\n }\n return result;\n };\n // + rowRenderer\n // if we are not column spanning, this just returns back the virtual centre columns,\n // however if we are column spanning, then different rows can have different virtual\n // columns, so we have to work out the list for each individual row.\n ColumnModel.prototype.getViewportCenterColumnsForRow = function (rowNode) {\n var _this = this;\n if (!this.colSpanActive) {\n return this.viewportColumnsCenter;\n }\n var emptySpaceBeforeColumn = function (col) {\n var left = col.getLeft();\n return exists(left) && left > _this.viewportLeft;\n };\n // if doing column virtualisation, then we filter based on the viewport.\n var filterCallback = this.suppressColumnVirtualisation ? null : this.isColumnInRowViewport.bind(this);\n return this.getDisplayedColumnsForRow(rowNode, this.displayedColumnsCenter, filterCallback, emptySpaceBeforeColumn);\n };\n ColumnModel.prototype.getAriaColumnIndex = function (col) {\n return this.getAllGridColumns().indexOf(col) + 1;\n };\n ColumnModel.prototype.isColumnInHeaderViewport = function (col) {\n // for headers, we never filter out autoHeaderHeight columns, if calculating\n if (col.isAutoHeaderHeight()) {\n return true;\n }\n return this.isColumnInRowViewport(col);\n };\n ColumnModel.prototype.isColumnInRowViewport = function (col) {\n // we never filter out autoHeight columns, as we need them in the DOM for calculating Auto Height\n if (col.isAutoHeight()) {\n return true;\n }\n var columnLeft = col.getLeft() || 0;\n var columnRight = columnLeft + col.getActualWidth();\n // adding 200 for buffer size, so some cols off viewport are rendered.\n // this helps horizontal scrolling so user rarely sees white space (unless\n // they scroll horizontally fast). however we are conservative, as the more\n // buffer the slower the vertical redraw speed\n var leftBounds = this.viewportLeft - 200;\n var rightBounds = this.viewportRight + 200;\n var columnToMuchLeft = columnLeft < leftBounds && columnRight < leftBounds;\n var columnToMuchRight = columnLeft > rightBounds && columnRight > rightBounds;\n return !columnToMuchLeft && !columnToMuchRight;\n };\n // used by:\n // + angularGrid -> setting pinned body width\n // note: this should be cached\n ColumnModel.prototype.getDisplayedColumnsLeftWidth = function () {\n return this.getWidthOfColsInList(this.displayedColumnsLeft);\n };\n // note: this should be cached\n ColumnModel.prototype.getDisplayedColumnsRightWidth = function () {\n return this.getWidthOfColsInList(this.displayedColumnsRight);\n };\n ColumnModel.prototype.updatePrimaryColumnList = function (keys, masterList, actionIsAdd, columnCallback, eventType, source) {\n var _this = this;\n if (source === void 0) {\n source = \"api\";\n }\n if (!keys || missingOrEmpty(keys)) {\n return;\n }\n var atLeastOne = false;\n keys.forEach(function (key) {\n var columnToAdd = _this.getPrimaryColumn(key);\n if (!columnToAdd) {\n return;\n }\n if (actionIsAdd) {\n if (masterList.indexOf(columnToAdd) >= 0) {\n return;\n }\n masterList.push(columnToAdd);\n } else {\n if (masterList.indexOf(columnToAdd) < 0) {\n return;\n }\n removeFromArray(masterList, columnToAdd);\n }\n columnCallback(columnToAdd);\n atLeastOne = true;\n });\n if (!atLeastOne) {\n return;\n }\n if (this.autoGroupsNeedBuilding) {\n this.updateGridColumns();\n }\n this.updateDisplayedColumns(source);\n var event = {\n type: eventType,\n columns: masterList,\n column: masterList.length === 1 ? masterList[0] : null,\n source: source\n };\n this.eventService.dispatchEvent(event);\n };\n ColumnModel.prototype.setRowGroupColumns = function (colKeys, source) {\n if (source === void 0) {\n source = \"api\";\n }\n this.autoGroupsNeedBuilding = true;\n this.setPrimaryColumnList(colKeys, this.rowGroupColumns, Events.EVENT_COLUMN_ROW_GROUP_CHANGED, this.setRowGroupActive.bind(this), source);\n };\n ColumnModel.prototype.setRowGroupActive = function (active, column, source) {\n if (active === column.isRowGroupActive()) {\n return;\n }\n column.setRowGroupActive(active, source);\n if (active && !this.gridOptionsWrapper.isSuppressRowGroupHidesColumns()) {\n this.setColumnVisible(column, false, source);\n }\n if (!active && !this.gridOptionsWrapper.isSuppressMakeColumnVisibleAfterUnGroup()) {\n this.setColumnVisible(column, true, source);\n }\n };\n ColumnModel.prototype.addRowGroupColumn = function (key, source) {\n if (source === void 0) {\n source = \"api\";\n }\n if (key) {\n this.addRowGroupColumns([key], source);\n }\n };\n ColumnModel.prototype.addRowGroupColumns = function (keys, source) {\n if (source === void 0) {\n source = \"api\";\n }\n this.autoGroupsNeedBuilding = true;\n this.updatePrimaryColumnList(keys, this.rowGroupColumns, true, this.setRowGroupActive.bind(this, true), Events.EVENT_COLUMN_ROW_GROUP_CHANGED, source);\n };\n ColumnModel.prototype.removeRowGroupColumns = function (keys, source) {\n if (source === void 0) {\n source = \"api\";\n }\n this.autoGroupsNeedBuilding = true;\n this.updatePrimaryColumnList(keys, this.rowGroupColumns, false, this.setRowGroupActive.bind(this, false), Events.EVENT_COLUMN_ROW_GROUP_CHANGED, source);\n };\n ColumnModel.prototype.removeRowGroupColumn = function (key, source) {\n if (source === void 0) {\n source = \"api\";\n }\n if (key) {\n this.removeRowGroupColumns([key], source);\n }\n };\n ColumnModel.prototype.addPivotColumns = function (keys, source) {\n if (source === void 0) {\n source = \"api\";\n }\n this.updatePrimaryColumnList(keys, this.pivotColumns, true, function (column) {\n return column.setPivotActive(true, source);\n }, Events.EVENT_COLUMN_PIVOT_CHANGED, source);\n };\n ColumnModel.prototype.setPivotColumns = function (colKeys, source) {\n if (source === void 0) {\n source = \"api\";\n }\n this.setPrimaryColumnList(colKeys, this.pivotColumns, Events.EVENT_COLUMN_PIVOT_CHANGED, function (added, column) {\n column.setPivotActive(added, source);\n }, source);\n };\n ColumnModel.prototype.addPivotColumn = function (key, source) {\n if (source === void 0) {\n source = \"api\";\n }\n this.addPivotColumns([key], source);\n };\n ColumnModel.prototype.removePivotColumns = function (keys, source) {\n if (source === void 0) {\n source = \"api\";\n }\n this.updatePrimaryColumnList(keys, this.pivotColumns, false, function (column) {\n return column.setPivotActive(false, source);\n }, Events.EVENT_COLUMN_PIVOT_CHANGED, source);\n };\n ColumnModel.prototype.removePivotColumn = function (key, source) {\n if (source === void 0) {\n source = \"api\";\n }\n this.removePivotColumns([key], source);\n };\n ColumnModel.prototype.setPrimaryColumnList = function (colKeys, masterList, eventName, columnCallback, source) {\n var _this = this;\n masterList.length = 0;\n if (exists(colKeys)) {\n colKeys.forEach(function (key) {\n var column = _this.getPrimaryColumn(key);\n if (column) {\n masterList.push(column);\n }\n });\n }\n (this.primaryColumns || []).forEach(function (column) {\n var added = masterList.indexOf(column) >= 0;\n columnCallback(added, column);\n });\n if (this.autoGroupsNeedBuilding) {\n this.updateGridColumns();\n }\n this.updateDisplayedColumns(source);\n this.fireColumnEvent(eventName, masterList, source);\n };\n ColumnModel.prototype.setValueColumns = function (colKeys, source) {\n if (source === void 0) {\n source = \"api\";\n }\n this.setPrimaryColumnList(colKeys, this.valueColumns, Events.EVENT_COLUMN_VALUE_CHANGED, this.setValueActive.bind(this), source);\n };\n ColumnModel.prototype.setValueActive = function (active, column, source) {\n if (active === column.isValueActive()) {\n return;\n }\n column.setValueActive(active, source);\n if (active && !column.getAggFunc()) {\n var initialAggFunc = this.aggFuncService.getDefaultAggFunc(column);\n column.setAggFunc(initialAggFunc);\n }\n };\n ColumnModel.prototype.addValueColumns = function (keys, source) {\n if (source === void 0) {\n source = \"api\";\n }\n this.updatePrimaryColumnList(keys, this.valueColumns, true, this.setValueActive.bind(this, true), Events.EVENT_COLUMN_VALUE_CHANGED, source);\n };\n ColumnModel.prototype.addValueColumn = function (colKey, source) {\n if (source === void 0) {\n source = \"api\";\n }\n if (colKey) {\n this.addValueColumns([colKey], source);\n }\n };\n ColumnModel.prototype.removeValueColumn = function (colKey, source) {\n if (source === void 0) {\n source = \"api\";\n }\n this.removeValueColumns([colKey], source);\n };\n ColumnModel.prototype.removeValueColumns = function (keys, source) {\n if (source === void 0) {\n source = \"api\";\n }\n this.updatePrimaryColumnList(keys, this.valueColumns, false, this.setValueActive.bind(this, false), Events.EVENT_COLUMN_VALUE_CHANGED, source);\n };\n // returns the width we can set to this col, taking into consideration min and max widths\n ColumnModel.prototype.normaliseColumnWidth = function (column, newWidth) {\n var minWidth = column.getMinWidth();\n if (exists(minWidth) && newWidth < minWidth) {\n newWidth = minWidth;\n }\n var maxWidth = column.getMaxWidth();\n if (exists(maxWidth) && column.isGreaterThanMax(newWidth)) {\n newWidth = maxWidth;\n }\n return newWidth;\n };\n ColumnModel.prototype.getPrimaryOrGridColumn = function (key) {\n var column = this.getPrimaryColumn(key);\n return column || this.getGridColumn(key);\n };\n ColumnModel.prototype.setColumnWidths = function (columnWidths, shiftKey,\n // @takeFromAdjacent - if user has 'shift' pressed, then pixels are taken from adjacent column\n finished,\n // @finished - ends up in the event, tells the user if more events are to come\n source) {\n var _this = this;\n if (source === void 0) {\n source = \"api\";\n }\n var sets = [];\n columnWidths.forEach(function (columnWidth) {\n var col = _this.getPrimaryOrGridColumn(columnWidth.key);\n if (!col) {\n return;\n }\n sets.push({\n width: columnWidth.newWidth,\n ratios: [1],\n columns: [col]\n });\n // if user wants to do shift resize by default, then we invert the shift operation\n var defaultIsShift = _this.gridOptionsWrapper.getColResizeDefault() === 'shift';\n if (defaultIsShift) {\n shiftKey = !shiftKey;\n }\n if (shiftKey) {\n var otherCol = _this.getDisplayedColAfter(col);\n if (!otherCol) {\n return;\n }\n var widthDiff = col.getActualWidth() - columnWidth.newWidth;\n var otherColWidth = otherCol.getActualWidth() + widthDiff;\n sets.push({\n width: otherColWidth,\n ratios: [1],\n columns: [otherCol]\n });\n }\n });\n if (sets.length === 0) {\n return;\n }\n this.resizeColumnSets({\n resizeSets: sets,\n finished: finished,\n source: source\n });\n };\n ColumnModel.prototype.checkMinAndMaxWidthsForSet = function (columnResizeSet) {\n var columns = columnResizeSet.columns,\n width = columnResizeSet.width;\n // every col has a min width, so sum them all up and see if we have enough room\n // for all the min widths\n var minWidthAccumulated = 0;\n var maxWidthAccumulated = 0;\n var maxWidthActive = true;\n columns.forEach(function (col) {\n var minWidth = col.getMinWidth();\n minWidthAccumulated += minWidth || 0;\n var maxWidth = col.getMaxWidth();\n if (exists(maxWidth) && maxWidth > 0) {\n maxWidthAccumulated += maxWidth;\n } else {\n // if at least one columns has no max width, it means the group of columns\n // then has no max width, as at least one column can take as much width as possible\n maxWidthActive = false;\n }\n });\n var minWidthPasses = width >= minWidthAccumulated;\n var maxWidthPasses = !maxWidthActive || width <= maxWidthAccumulated;\n return minWidthPasses && maxWidthPasses;\n };\n // method takes sets of columns and resizes them. either all sets will be resized, or nothing\n // be resized. this is used for example when user tries to resize a group and holds shift key,\n // then both the current group (grows), and the adjacent group (shrinks), will get resized,\n // so that's two sets for this method.\n ColumnModel.prototype.resizeColumnSets = function (params) {\n var _this = this;\n var resizeSets = params.resizeSets,\n finished = params.finished,\n source = params.source;\n var passMinMaxCheck = !resizeSets || resizeSets.every(function (columnResizeSet) {\n return _this.checkMinAndMaxWidthsForSet(columnResizeSet);\n });\n if (!passMinMaxCheck) {\n // even though we are not going to resize beyond min/max size, we still need to raise event when finished\n if (finished) {\n var columns = resizeSets && resizeSets.length > 0 ? resizeSets[0].columns : null;\n this.fireColumnResizedEvent(columns, finished, source);\n }\n return; // don't resize!\n }\n var changedCols = [];\n var allResizedCols = [];\n resizeSets.forEach(function (set) {\n var width = set.width,\n columns = set.columns,\n ratios = set.ratios;\n // keep track of pixels used, and last column gets the remaining,\n // to cater for rounding errors, and min width adjustments\n var newWidths = {};\n var finishedCols = {};\n columns.forEach(function (col) {\n return allResizedCols.push(col);\n });\n // the loop below goes through each col. if a col exceeds it's min/max width,\n // it then gets set to its min/max width and the column is removed marked as 'finished'\n // and the calculation is done again leaving this column out. take for example columns\n // {A, width: 50, maxWidth: 100}\n // {B, width: 50}\n // {C, width: 50}\n // and then the set is set to width 600 - on the first pass the grid tries to set each column\n // to 200. it checks A and sees 200 > 100 and so sets the width to 100. col A is then marked\n // as 'finished' and the calculation is done again with the remaining cols B and C, which end up\n // splitting the remaining 500 pixels.\n var finishedColsGrew = true;\n var loopCount = 0;\n var _loop_2 = function () {\n loopCount++;\n if (loopCount > 1000) {\n // this should never happen, but in the future, someone might introduce a bug here,\n // so we stop the browser from hanging and report bug properly\n console.error('AG Grid: infinite loop in resizeColumnSets');\n return \"break\";\n }\n finishedColsGrew = false;\n var subsetCols = [];\n var subsetRatioTotal = 0;\n var pixelsToDistribute = width;\n columns.forEach(function (col, index) {\n var thisColFinished = finishedCols[col.getId()];\n if (thisColFinished) {\n pixelsToDistribute -= newWidths[col.getId()];\n } else {\n subsetCols.push(col);\n var ratioThisCol = ratios[index];\n subsetRatioTotal += ratioThisCol;\n }\n });\n // because we are not using all of the ratios (cols can be missing),\n // we scale the ratio. if all columns are included, then subsetRatioTotal=1,\n // and so the ratioScale will be 1.\n var ratioScale = 1 / subsetRatioTotal;\n subsetCols.forEach(function (col, index) {\n var lastCol = index === subsetCols.length - 1;\n var colNewWidth;\n if (lastCol) {\n colNewWidth = pixelsToDistribute;\n } else {\n colNewWidth = Math.round(ratios[index] * width * ratioScale);\n pixelsToDistribute -= colNewWidth;\n }\n var minWidth = col.getMinWidth();\n var maxWidth = col.getMaxWidth();\n if (exists(minWidth) && colNewWidth < minWidth) {\n colNewWidth = minWidth;\n finishedCols[col.getId()] = true;\n finishedColsGrew = true;\n } else if (exists(maxWidth) && maxWidth > 0 && colNewWidth > maxWidth) {\n colNewWidth = maxWidth;\n finishedCols[col.getId()] = true;\n finishedColsGrew = true;\n }\n newWidths[col.getId()] = colNewWidth;\n });\n };\n while (finishedColsGrew) {\n var state_1 = _loop_2();\n if (state_1 === \"break\") break;\n }\n columns.forEach(function (col) {\n var newWidth = newWidths[col.getId()];\n var actualWidth = col.getActualWidth();\n if (actualWidth !== newWidth) {\n col.setActualWidth(newWidth, source);\n changedCols.push(col);\n }\n });\n });\n // if no cols changed, then no need to update more or send event.\n var atLeastOneColChanged = changedCols.length > 0;\n var flexedCols = [];\n if (atLeastOneColChanged) {\n flexedCols = this.refreshFlexedColumns({\n resizingCols: allResizedCols,\n skipSetLeft: true\n });\n this.setLeftValues(source);\n this.updateBodyWidths();\n this.checkViewportColumns();\n }\n // check for change first, to avoid unnecessary firing of events\n // however we always fire 'finished' events. this is important\n // when groups are resized, as if the group is changing slowly,\n // eg 1 pixel at a time, then each change will fire change events\n // in all the columns in the group, but only one with get the pixel.\n var colsForEvent = allResizedCols.concat(flexedCols);\n if (atLeastOneColChanged || finished) {\n this.fireColumnResizedEvent(colsForEvent, finished, source, flexedCols);\n }\n };\n ColumnModel.prototype.setColumnAggFunc = function (key, aggFunc, source) {\n if (source === void 0) {\n source = \"api\";\n }\n if (!key) {\n return;\n }\n var column = this.getPrimaryColumn(key);\n if (!column) {\n return;\n }\n column.setAggFunc(aggFunc);\n this.fireColumnEvent(Events.EVENT_COLUMN_VALUE_CHANGED, [column], source);\n };\n ColumnModel.prototype.fireColumnEvent = function (type, columns, source) {\n var event = {\n type: type,\n columns: columns,\n column: columns && columns.length == 1 ? columns[0] : null,\n source: source\n };\n this.eventService.dispatchEvent(event);\n };\n ColumnModel.prototype.moveRowGroupColumn = function (fromIndex, toIndex, source) {\n if (source === void 0) {\n source = \"api\";\n }\n var column = this.rowGroupColumns[fromIndex];\n this.rowGroupColumns.splice(fromIndex, 1);\n this.rowGroupColumns.splice(toIndex, 0, column);\n var event = {\n type: Events.EVENT_COLUMN_ROW_GROUP_CHANGED,\n columns: this.rowGroupColumns,\n column: this.rowGroupColumns.length === 1 ? this.rowGroupColumns[0] : null,\n source: source\n };\n this.eventService.dispatchEvent(event);\n };\n ColumnModel.prototype.moveColumns = function (columnsToMoveKeys, toIndex, source) {\n if (source === void 0) {\n source = \"api\";\n }\n this.columnAnimationService.start();\n if (toIndex > this.gridColumns.length - columnsToMoveKeys.length) {\n console.warn('AG Grid: tried to insert columns in invalid location, toIndex = ' + toIndex);\n console.warn('AG Grid: remember that you should not count the moving columns when calculating the new index');\n return;\n }\n // we want to pull all the columns out first and put them into an ordered list\n var columnsToMove = this.getGridColumns(columnsToMoveKeys);\n var failedRules = !this.doesMovePassRules(columnsToMove, toIndex);\n if (failedRules) {\n return;\n }\n moveInArray(this.gridColumns, columnsToMove, toIndex);\n this.updateDisplayedColumns(source);\n var event = {\n type: Events.EVENT_COLUMN_MOVED,\n columns: columnsToMove,\n column: columnsToMove.length === 1 ? columnsToMove[0] : null,\n toIndex: toIndex,\n source: source\n };\n this.eventService.dispatchEvent(event);\n this.columnAnimationService.finish();\n };\n ColumnModel.prototype.doesMovePassRules = function (columnsToMove, toIndex) {\n // make a copy of what the grid columns would look like after the move\n var proposedColumnOrder = this.getProposedColumnOrder(columnsToMove, toIndex);\n return this.doesOrderPassRules(proposedColumnOrder);\n };\n ColumnModel.prototype.doesOrderPassRules = function (gridOrder) {\n if (!this.doesMovePassMarryChildren(gridOrder)) {\n return false;\n }\n if (!this.doesMovePassLockedPositions(gridOrder)) {\n return false;\n }\n return true;\n };\n ColumnModel.prototype.getProposedColumnOrder = function (columnsToMove, toIndex) {\n var proposedColumnOrder = this.gridColumns.slice();\n moveInArray(proposedColumnOrder, columnsToMove, toIndex);\n return proposedColumnOrder;\n };\n // returns the provided cols sorted in same order as they appear in grid columns. eg if grid columns\n // contains [a,b,c,d,e] and col passed is [e,a] then the passed cols are sorted into [a,e]\n ColumnModel.prototype.sortColumnsLikeGridColumns = function (cols) {\n var _this = this;\n if (!cols || cols.length <= 1) {\n return;\n }\n var notAllColsInGridColumns = cols.filter(function (c) {\n return _this.gridColumns.indexOf(c) < 0;\n }).length > 0;\n if (notAllColsInGridColumns) {\n return;\n }\n cols.sort(function (a, b) {\n var indexA = _this.gridColumns.indexOf(a);\n var indexB = _this.gridColumns.indexOf(b);\n return indexA - indexB;\n });\n };\n ColumnModel.prototype.doesMovePassLockedPositions = function (proposedColumnOrder) {\n // Placement is a number indicating 'left' 'center' or 'right' as 0 1 2\n var lastPlacement = 0;\n var rulePassed = true;\n var lockPositionToPlacement = function (position) {\n if (!position) {\n // false or undefined\n return 1;\n }\n if (position === true) {\n return 0;\n }\n return position === 'left' ? 0 : 2; // Otherwise 'right'\n };\n proposedColumnOrder.forEach(function (col) {\n var placement = lockPositionToPlacement(col.getColDef().lockPosition);\n if (placement < lastPlacement) {\n // If placement goes down, we're not in the correct order\n rulePassed = false;\n }\n lastPlacement = placement;\n });\n return rulePassed;\n };\n ColumnModel.prototype.doesMovePassMarryChildren = function (allColumnsCopy) {\n var rulePassed = true;\n this.columnUtils.depthFirstOriginalTreeSearch(null, this.gridBalancedTree, function (child) {\n if (!(child instanceof ProvidedColumnGroup)) {\n return;\n }\n var columnGroup = child;\n var colGroupDef = columnGroup.getColGroupDef();\n var marryChildren = colGroupDef && colGroupDef.marryChildren;\n if (!marryChildren) {\n return;\n }\n var newIndexes = [];\n columnGroup.getLeafColumns().forEach(function (col) {\n var newColIndex = allColumnsCopy.indexOf(col);\n newIndexes.push(newColIndex);\n });\n var maxIndex = Math.max.apply(Math, newIndexes);\n var minIndex = Math.min.apply(Math, newIndexes);\n // spread is how far the first column in this group is away from the last column\n var spread = maxIndex - minIndex;\n var maxSpread = columnGroup.getLeafColumns().length - 1;\n // if the columns\n if (spread > maxSpread) {\n rulePassed = false;\n }\n // console.log(`maxIndex = ${maxIndex}, minIndex = ${minIndex}, spread = ${spread}, maxSpread = ${maxSpread}, fail = ${spread > (count-1)}`)\n // console.log(allColumnsCopy.map( col => col.getColDef().field).join(','));\n });\n return rulePassed;\n };\n ColumnModel.prototype.moveColumn = function (key, toIndex, source) {\n if (source === void 0) {\n source = \"api\";\n }\n this.moveColumns([key], toIndex, source);\n };\n ColumnModel.prototype.moveColumnByIndex = function (fromIndex, toIndex, source) {\n if (source === void 0) {\n source = \"api\";\n }\n var column = this.gridColumns[fromIndex];\n this.moveColumn(column, toIndex, source);\n };\n ColumnModel.prototype.getColumnDefs = function () {\n var _this = this;\n if (!this.primaryColumns) {\n return;\n }\n var cols = this.primaryColumns.slice();\n if (this.gridColsArePrimary) {\n cols.sort(function (a, b) {\n return _this.gridColumns.indexOf(a) - _this.gridColumns.indexOf(b);\n });\n } else if (this.lastPrimaryOrder) {\n cols.sort(function (a, b) {\n return _this.lastPrimaryOrder.indexOf(a) - _this.lastPrimaryOrder.indexOf(b);\n });\n }\n return this.columnDefFactory.buildColumnDefs(cols, this.rowGroupColumns, this.pivotColumns);\n };\n // used by:\n // + angularGrid -> for setting body width\n // + rowController -> setting main row widths (when inserting and resizing)\n // need to cache this\n ColumnModel.prototype.getBodyContainerWidth = function () {\n return this.bodyWidth;\n };\n ColumnModel.prototype.getContainerWidth = function (pinned) {\n switch (pinned) {\n case Constants.PINNED_LEFT:\n return this.leftWidth;\n case Constants.PINNED_RIGHT:\n return this.rightWidth;\n default:\n return this.bodyWidth;\n }\n };\n // after setColumnWidth or updateGroupsAndDisplayedColumns\n ColumnModel.prototype.updateBodyWidths = function () {\n var newBodyWidth = this.getWidthOfColsInList(this.displayedColumnsCenter);\n var newLeftWidth = this.getWidthOfColsInList(this.displayedColumnsLeft);\n var newRightWidth = this.getWidthOfColsInList(this.displayedColumnsRight);\n // this is used by virtual col calculation, for RTL only, as a change to body width can impact displayed\n // columns, due to RTL inverting the y coordinates\n this.bodyWidthDirty = this.bodyWidth !== newBodyWidth;\n var atLeastOneChanged = this.bodyWidth !== newBodyWidth || this.leftWidth !== newLeftWidth || this.rightWidth !== newRightWidth;\n if (atLeastOneChanged) {\n this.bodyWidth = newBodyWidth;\n this.leftWidth = newLeftWidth;\n this.rightWidth = newRightWidth;\n // when this fires, it is picked up by the gridPanel, which ends up in\n // gridPanel calling setWidthAndScrollPosition(), which in turn calls setViewportPosition()\n var event_2 = {\n type: Events.EVENT_DISPLAYED_COLUMNS_WIDTH_CHANGED\n };\n this.eventService.dispatchEvent(event_2);\n }\n };\n // + rowController\n ColumnModel.prototype.getValueColumns = function () {\n return this.valueColumns ? this.valueColumns : [];\n };\n // + rowController\n ColumnModel.prototype.getPivotColumns = function () {\n return this.pivotColumns ? this.pivotColumns : [];\n };\n // + clientSideRowModel\n ColumnModel.prototype.isPivotActive = function () {\n return this.pivotColumns && this.pivotColumns.length > 0 && this.pivotMode;\n };\n // + toolPanel\n ColumnModel.prototype.getRowGroupColumns = function () {\n return this.rowGroupColumns ? this.rowGroupColumns : [];\n };\n // + rowController -> while inserting rows\n ColumnModel.prototype.getDisplayedCenterColumns = function () {\n return this.displayedColumnsCenter;\n };\n // + rowController -> while inserting rows\n ColumnModel.prototype.getDisplayedLeftColumns = function () {\n return this.displayedColumnsLeft;\n };\n ColumnModel.prototype.getDisplayedRightColumns = function () {\n return this.displayedColumnsRight;\n };\n ColumnModel.prototype.getDisplayedColumns = function (type) {\n switch (type) {\n case Constants.PINNED_LEFT:\n return this.getDisplayedLeftColumns();\n case Constants.PINNED_RIGHT:\n return this.getDisplayedRightColumns();\n default:\n return this.getDisplayedCenterColumns();\n }\n };\n // used by:\n // + clientSideRowController -> sorting, building quick filter text\n // + headerRenderer -> sorting (clearing icon)\n ColumnModel.prototype.getAllPrimaryColumns = function () {\n return this.primaryColumns ? this.primaryColumns.slice() : null;\n };\n ColumnModel.prototype.getSecondaryColumns = function () {\n return this.secondaryColumns ? this.secondaryColumns.slice() : null;\n };\n ColumnModel.prototype.getAllColumnsForQuickFilter = function () {\n return this.columnsForQuickFilter;\n };\n // + moveColumnController\n ColumnModel.prototype.getAllGridColumns = function () {\n return this.gridColumns;\n };\n ColumnModel.prototype.isEmpty = function () {\n return missingOrEmpty(this.gridColumns);\n };\n ColumnModel.prototype.isRowGroupEmpty = function () {\n return missingOrEmpty(this.rowGroupColumns);\n };\n ColumnModel.prototype.setColumnVisible = function (key, visible, source) {\n if (source === void 0) {\n source = \"api\";\n }\n this.setColumnsVisible([key], visible, source);\n };\n ColumnModel.prototype.setColumnsVisible = function (keys, visible, source) {\n if (visible === void 0) {\n visible = false;\n }\n if (source === void 0) {\n source = \"api\";\n }\n this.applyColumnState({\n state: keys.map(function (key) {\n return {\n colId: typeof key === 'string' ? key : key.getColId(),\n hide: !visible\n };\n })\n }, source);\n };\n ColumnModel.prototype.setColumnPinned = function (key, pinned, source) {\n if (source === void 0) {\n source = \"api\";\n }\n if (key) {\n this.setColumnsPinned([key], pinned, source);\n }\n };\n ColumnModel.prototype.setColumnsPinned = function (keys, pinned, source) {\n if (source === void 0) {\n source = \"api\";\n }\n if (this.gridOptionsWrapper.getDomLayout() === 'print') {\n console.warn(\"Changing the column pinning status is not allowed with domLayout='print'\");\n return;\n }\n this.columnAnimationService.start();\n var actualPinned;\n if (pinned === true || pinned === Constants.PINNED_LEFT) {\n actualPinned = Constants.PINNED_LEFT;\n } else if (pinned === Constants.PINNED_RIGHT) {\n actualPinned = Constants.PINNED_RIGHT;\n } else {\n actualPinned = null;\n }\n this.actionOnGridColumns(keys, function (col) {\n if (col.getPinned() !== actualPinned) {\n col.setPinned(actualPinned);\n return true;\n }\n return false;\n }, source, function () {\n var event = {\n type: Events.EVENT_COLUMN_PINNED,\n pinned: actualPinned,\n column: null,\n columns: null,\n source: source\n };\n return event;\n });\n this.columnAnimationService.finish();\n };\n // does an action on a set of columns. provides common functionality for looking up the\n // columns based on key, getting a list of effected columns, and then updated the event\n // with either one column (if it was just one col) or a list of columns\n // used by: autoResize, setVisible, setPinned\n ColumnModel.prototype.actionOnGridColumns = function (\n // the column keys this action will be on\n keys,\n // the action to do - if this returns false, the column was skipped\n // and won't be included in the event\n action,\n // should return back a column event of the right type\n source, createEvent) {\n var _this = this;\n if (missingOrEmpty(keys)) {\n return;\n }\n var updatedColumns = [];\n keys.forEach(function (key) {\n var column = _this.getGridColumn(key);\n if (!column) {\n return;\n }\n // need to check for false with type (ie !== instead of !=)\n // as not returning anything (undefined) would also be false\n var resultOfAction = action(column);\n if (resultOfAction !== false) {\n updatedColumns.push(column);\n }\n });\n if (!updatedColumns.length) {\n return;\n }\n this.updateDisplayedColumns(source);\n if (exists(createEvent) && createEvent) {\n var event_3 = createEvent();\n event_3.columns = updatedColumns;\n event_3.column = updatedColumns.length === 1 ? updatedColumns[0] : null;\n this.eventService.dispatchEvent(event_3);\n }\n };\n ColumnModel.prototype.getDisplayedColBefore = function (col) {\n var allDisplayedColumns = this.getAllDisplayedColumns();\n var oldIndex = allDisplayedColumns.indexOf(col);\n if (oldIndex > 0) {\n return allDisplayedColumns[oldIndex - 1];\n }\n return null;\n };\n // used by:\n // + rowRenderer -> for navigation\n ColumnModel.prototype.getDisplayedColAfter = function (col) {\n var allDisplayedColumns = this.getAllDisplayedColumns();\n var oldIndex = allDisplayedColumns.indexOf(col);\n if (oldIndex < allDisplayedColumns.length - 1) {\n return allDisplayedColumns[oldIndex + 1];\n }\n return null;\n };\n ColumnModel.prototype.getDisplayedGroupAfter = function (columnGroup) {\n return this.getDisplayedGroupAtDirection(columnGroup, 'After');\n };\n ColumnModel.prototype.getDisplayedGroupBefore = function (columnGroup) {\n return this.getDisplayedGroupAtDirection(columnGroup, 'Before');\n };\n ColumnModel.prototype.getDisplayedGroupAtDirection = function (columnGroup, direction) {\n // pick the last displayed column in this group\n var requiredLevel = columnGroup.getProvidedColumnGroup().getLevel() + columnGroup.getPaddingLevel();\n var colGroupLeafColumns = columnGroup.getDisplayedLeafColumns();\n var col = direction === 'After' ? last(colGroupLeafColumns) : colGroupLeafColumns[0];\n var getDisplayColMethod = \"getDisplayedCol\" + direction;\n while (true) {\n // keep moving to the next col, until we get to another group\n var column = this[getDisplayColMethod](col);\n if (!column) {\n return null;\n }\n var groupPointer = this.getColumnGroupAtLevel(column, requiredLevel);\n if (groupPointer !== columnGroup) {\n return groupPointer;\n }\n }\n };\n ColumnModel.prototype.getColumnGroupAtLevel = function (column, level) {\n // get group at same level as the one we are looking for\n var groupPointer = column.getParent();\n var originalGroupLevel;\n var groupPointerLevel;\n while (true) {\n var groupPointerProvidedColumnGroup = groupPointer.getProvidedColumnGroup();\n originalGroupLevel = groupPointerProvidedColumnGroup.getLevel();\n groupPointerLevel = groupPointer.getPaddingLevel();\n if (originalGroupLevel + groupPointerLevel <= level) {\n break;\n }\n groupPointer = groupPointer.getParent();\n }\n return groupPointer;\n };\n ColumnModel.prototype.isPinningLeft = function () {\n return this.displayedColumnsLeft.length > 0;\n };\n ColumnModel.prototype.isPinningRight = function () {\n return this.displayedColumnsRight.length > 0;\n };\n ColumnModel.prototype.getPrimaryAndSecondaryAndAutoColumns = function () {\n var _a;\n return (_a = []).concat.apply(_a, __spread$f([this.primaryColumns || [], this.groupAutoColumns || [], this.secondaryColumns || []]));\n };\n ColumnModel.prototype.getPrimaryAndAutoGroupCols = function () {\n var _a;\n return (_a = []).concat.apply(_a, __spread$f([this.primaryColumns || [], this.groupAutoColumns || []]));\n };\n ColumnModel.prototype.getPrimaryAndSecondaryColumns = function () {\n var _a;\n return (_a = []).concat.apply(_a, __spread$f([this.primaryColumns || [], this.secondaryColumns || []]));\n };\n ColumnModel.prototype.createStateItemFromColumn = function (column) {\n var rowGroupIndex = column.isRowGroupActive() ? this.rowGroupColumns.indexOf(column) : null;\n var pivotIndex = column.isPivotActive() ? this.pivotColumns.indexOf(column) : null;\n var aggFunc = column.isValueActive() ? column.getAggFunc() : null;\n var sort = column.getSort() != null ? column.getSort() : null;\n var sortIndex = column.getSortIndex() != null ? column.getSortIndex() : null;\n var flex = column.getFlex() != null && column.getFlex() > 0 ? column.getFlex() : null;\n var res = {\n colId: column.getColId(),\n width: column.getActualWidth(),\n hide: !column.isVisible(),\n pinned: column.getPinned(),\n sort: sort,\n sortIndex: sortIndex,\n aggFunc: aggFunc,\n rowGroup: column.isRowGroupActive(),\n rowGroupIndex: rowGroupIndex,\n pivot: column.isPivotActive(),\n pivotIndex: pivotIndex,\n flex: flex\n };\n return res;\n };\n ColumnModel.prototype.getColumnState = function () {\n if (missing(this.primaryColumns) || !this.isAlive()) {\n return [];\n }\n var colsForState = this.getPrimaryAndSecondaryAndAutoColumns();\n var res = colsForState.map(this.createStateItemFromColumn.bind(this));\n this.orderColumnStateList(res);\n return res;\n };\n ColumnModel.prototype.orderColumnStateList = function (columnStateList) {\n // for fast looking, store the index of each column\n var colIdToGridIndexMap = convertToMap(this.gridColumns.map(function (col, index) {\n return [col.getColId(), index];\n }));\n columnStateList.sort(function (itemA, itemB) {\n var posA = colIdToGridIndexMap.has(itemA.colId) ? colIdToGridIndexMap.get(itemA.colId) : -1;\n var posB = colIdToGridIndexMap.has(itemB.colId) ? colIdToGridIndexMap.get(itemB.colId) : -1;\n return posA - posB;\n });\n };\n ColumnModel.prototype.resetColumnState = function (source) {\n // NOTE = there is one bug here that no customer has noticed - if a column has colDef.lockPosition,\n // this is ignored below when ordering the cols. to work, we should always put lockPosition cols first.\n // As a work around, developers should just put lockPosition columns first in their colDef list.\n if (source === void 0) {\n source = \"api\";\n }\n // we can't use 'allColumns' as the order might of messed up, so get the primary ordered list\n var primaryColumns = this.getColumnsFromTree(this.primaryColumnTree);\n var columnStates = [];\n // we start at 1000, so if user has mix of rowGroup and group specified, it will work with both.\n // eg IF user has ColA.rowGroupIndex=0, ColB.rowGroupIndex=1, ColC.rowGroup=true,\n // THEN result will be ColA.rowGroupIndex=0, ColB.rowGroupIndex=1, ColC.rowGroup=1000\n var letRowGroupIndex = 1000;\n var letPivotIndex = 1000;\n var colsToProcess = [];\n if (this.groupAutoColumns) {\n colsToProcess = colsToProcess.concat(this.groupAutoColumns);\n }\n if (primaryColumns) {\n colsToProcess = colsToProcess.concat(primaryColumns);\n }\n colsToProcess.forEach(function (column) {\n var getValueOrNull = function (a, b) {\n return a != null ? a : b != null ? b : null;\n };\n var colDef = column.getColDef();\n var sort = getValueOrNull(colDef.sort, colDef.initialSort);\n var sortIndex = getValueOrNull(colDef.sortIndex, colDef.initialSortIndex);\n var hide = getValueOrNull(colDef.hide, colDef.initialHide);\n var pinned = getValueOrNull(colDef.pinned, colDef.initialPinned);\n var width = getValueOrNull(colDef.width, colDef.initialWidth);\n var flex = getValueOrNull(colDef.flex, colDef.initialFlex);\n var rowGroupIndex = getValueOrNull(colDef.rowGroupIndex, colDef.initialRowGroupIndex);\n var rowGroup = getValueOrNull(colDef.rowGroup, colDef.initialRowGroup);\n if (rowGroupIndex == null && (rowGroup == null || rowGroup == false)) {\n rowGroupIndex = null;\n rowGroup = null;\n }\n var pivotIndex = getValueOrNull(colDef.pivotIndex, colDef.initialPivotIndex);\n var pivot = getValueOrNull(colDef.pivot, colDef.initialPivot);\n if (pivotIndex == null && (pivot == null || pivot == false)) {\n pivotIndex = null;\n pivot = null;\n }\n var aggFunc = getValueOrNull(colDef.aggFunc, colDef.initialAggFunc);\n var stateItem = {\n colId: column.getColId(),\n sort: sort,\n sortIndex: sortIndex,\n hide: hide,\n pinned: pinned,\n width: width,\n flex: flex,\n rowGroup: rowGroup,\n rowGroupIndex: rowGroupIndex,\n pivot: pivot,\n pivotIndex: pivotIndex,\n aggFunc: aggFunc\n };\n if (missing(rowGroupIndex) && rowGroup) {\n stateItem.rowGroupIndex = letRowGroupIndex++;\n }\n if (missing(pivotIndex) && pivot) {\n stateItem.pivotIndex = letPivotIndex++;\n }\n columnStates.push(stateItem);\n });\n this.applyColumnState({\n state: columnStates,\n applyOrder: true\n }, source);\n };\n ColumnModel.prototype.applyColumnState = function (params, source) {\n var _this = this;\n if (missingOrEmpty(this.primaryColumns)) {\n return false;\n }\n if (params && params.state && !params.state.forEach) {\n 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.');\n return false;\n }\n var applyStates = function (states, existingColumns, getById) {\n var raiseEventsFunc = _this.compareColumnStatesAndRaiseEvents(source);\n _this.autoGroupsNeedBuilding = true;\n // at the end below, this list will have all columns we got no state for\n var columnsWithNoState = existingColumns.slice();\n var rowGroupIndexes = {};\n var pivotIndexes = {};\n var autoGroupColumnStates = [];\n // If pivoting is modified, these are the states we try to reapply after\n // the secondary columns are re-generated\n var unmatchedAndAutoStates = [];\n var unmatchedCount = 0;\n var previousRowGroupCols = _this.rowGroupColumns.slice();\n var previousPivotCols = _this.pivotColumns.slice();\n states.forEach(function (state) {\n var colId = state.colId || '';\n // auto group columns are re-created so deferring syncing with ColumnState\n var isAutoGroupColumn = colId.startsWith(Constants.GROUP_AUTO_COLUMN_ID);\n if (isAutoGroupColumn) {\n autoGroupColumnStates.push(state);\n unmatchedAndAutoStates.push(state);\n return;\n }\n var column = getById(colId);\n if (!column) {\n unmatchedAndAutoStates.push(state);\n unmatchedCount += 1;\n } else {\n _this.syncColumnWithStateItem(column, state, params.defaultState, rowGroupIndexes, pivotIndexes, false, source);\n removeFromArray(columnsWithNoState, column);\n }\n });\n // anything left over, we got no data for, so add in the column as non-value, non-rowGroup and hidden\n var applyDefaultsFunc = function (col) {\n return _this.syncColumnWithStateItem(col, null, params.defaultState, rowGroupIndexes, pivotIndexes, false, source);\n };\n columnsWithNoState.forEach(applyDefaultsFunc);\n // sort the lists according to the indexes that were provided\n var comparator = function (indexes, oldList, colA, colB) {\n var indexA = indexes[colA.getId()];\n var indexB = indexes[colB.getId()];\n var aHasIndex = indexA != null;\n var bHasIndex = indexB != null;\n if (aHasIndex && bHasIndex) {\n // both a and b are new cols with index, so sort on index\n return indexA - indexB;\n }\n if (aHasIndex) {\n // a has an index, so it should be before a\n return -1;\n }\n if (bHasIndex) {\n // b has an index, so it should be before a\n return 1;\n }\n var oldIndexA = oldList.indexOf(colA);\n var oldIndexB = oldList.indexOf(colB);\n var aHasOldIndex = oldIndexA >= 0;\n var bHasOldIndex = oldIndexB >= 0;\n if (aHasOldIndex && bHasOldIndex) {\n // both a and b are old cols, so sort based on last order\n return oldIndexA - oldIndexB;\n }\n if (aHasOldIndex) {\n // a is old, b is new, so b is first\n return -1;\n }\n // this bit does matter, means both are new cols\n // but without index or that b is old and a is new\n return 1;\n };\n _this.rowGroupColumns.sort(comparator.bind(_this, rowGroupIndexes, previousRowGroupCols));\n _this.pivotColumns.sort(comparator.bind(_this, pivotIndexes, previousPivotCols));\n _this.updateGridColumns();\n // sync newly created auto group columns with ColumnState\n var autoGroupColsCopy = _this.groupAutoColumns ? _this.groupAutoColumns.slice() : [];\n autoGroupColumnStates.forEach(function (stateItem) {\n var autoCol = _this.getAutoColumn(stateItem.colId);\n removeFromArray(autoGroupColsCopy, autoCol);\n _this.syncColumnWithStateItem(autoCol, stateItem, params.defaultState, null, null, true, source);\n });\n // autogroup cols with nothing else, apply the default\n autoGroupColsCopy.forEach(applyDefaultsFunc);\n _this.applyOrderAfterApplyState(params);\n _this.updateDisplayedColumns(source);\n _this.dispatchEverythingChanged(source);\n raiseEventsFunc(); // Will trigger secondary column changes if pivoting modified\n return {\n unmatchedAndAutoStates: unmatchedAndAutoStates,\n unmatchedCount: unmatchedCount\n };\n };\n this.columnAnimationService.start();\n var _a = applyStates(params.state || [], this.primaryColumns || [], function (id) {\n return _this.getPrimaryColumn(id);\n }),\n unmatchedAndAutoStates = _a.unmatchedAndAutoStates,\n unmatchedCount = _a.unmatchedCount;\n // If there are still states left over, see if we can apply them to newly generated\n // secondary or auto columns. Also if defaults exist, ensure they are applied to secondary cols\n if (unmatchedAndAutoStates.length > 0 || exists(params.defaultState)) {\n unmatchedCount = applyStates(unmatchedAndAutoStates, this.secondaryColumns || [], function (id) {\n return _this.getSecondaryColumn(id);\n }).unmatchedCount;\n }\n this.columnAnimationService.finish();\n return unmatchedCount === 0; // Successful if no states unaccounted for\n };\n ColumnModel.prototype.applyOrderAfterApplyState = function (params) {\n var _this = this;\n if (!params.applyOrder || !params.state) {\n return;\n }\n var newOrder = [];\n var processedColIds = {};\n params.state.forEach(function (item) {\n if (!item.colId || processedColIds[item.colId]) {\n return;\n }\n var col = _this.gridColumnsMap[item.colId];\n if (col) {\n newOrder.push(col);\n processedColIds[item.colId] = true;\n }\n });\n // add in all other columns\n var autoGroupInsertIndex = 0;\n this.gridColumns.forEach(function (col) {\n var colId = col.getColId();\n var alreadyProcessed = processedColIds[colId] != null;\n if (alreadyProcessed) {\n return;\n }\n var isAutoGroupCol = colId.startsWith(Constants.GROUP_AUTO_COLUMN_ID);\n if (isAutoGroupCol) {\n // auto group columns, if missing from state list, are added to the start.\n // it's common to have autoGroup missing, as grouping could be on by default\n // on a column, but the user could of since removed the grouping via the UI.\n // if we don't inc the insert index, autoGroups will be inserted in reverse order\n insertIntoArray(newOrder, col, autoGroupInsertIndex++);\n } else {\n // normal columns, if missing from state list, are added at the end\n newOrder.push(col);\n }\n });\n // this is already done in updateGridColumns, however we changed the order above (to match the order of the state\n // columns) so we need to do it again. we could of put logic into the order above to take into account fixed\n // columns, however if we did then we would have logic for updating fixed columns twice. reusing the logic here\n // is less sexy for the code here, but it keeps consistency.\n newOrder = this.placeLockedColumns(newOrder);\n if (!this.doesMovePassMarryChildren(newOrder)) {\n console.warn('AG Grid: Applying column order broke a group where columns should be married together. Applying new order has been discarded.');\n return;\n }\n this.gridColumns = newOrder;\n };\n ColumnModel.prototype.compareColumnStatesAndRaiseEvents = function (source) {\n var _this = this;\n var startState = {\n rowGroupColumns: this.rowGroupColumns.slice(),\n pivotColumns: this.pivotColumns.slice(),\n valueColumns: this.valueColumns.slice()\n };\n var columnStateBefore = this.getColumnState();\n var columnStateBeforeMap = {};\n columnStateBefore.forEach(function (col) {\n columnStateBeforeMap[col.colId] = col;\n });\n return function () {\n if (_this.gridOptionsWrapper.isSuppressColumnStateEvents()) {\n return;\n }\n var colsForState = _this.getPrimaryAndSecondaryAndAutoColumns();\n // raises generic ColumnEvents where all columns are returned rather than what has changed\n var raiseWhenListsDifferent = function (eventType, colsBefore, colsAfter, idMapper) {\n var beforeList = colsBefore.map(idMapper);\n var afterList = colsAfter.map(idMapper);\n var unchanged = areEqual(beforeList, afterList);\n if (unchanged) {\n return;\n }\n // returning all columns rather than what has changed!\n var event = {\n type: eventType,\n columns: colsAfter,\n column: colsAfter.length === 1 ? colsAfter[0] : null,\n source: source\n };\n _this.eventService.dispatchEvent(event);\n };\n // determines which columns have changed according to supplied predicate\n var getChangedColumns = function (changedPredicate) {\n var changedColumns = [];\n colsForState.forEach(function (column) {\n var colStateBefore = columnStateBeforeMap[column.getColId()];\n if (colStateBefore && changedPredicate(colStateBefore, column)) {\n changedColumns.push(column);\n }\n });\n return changedColumns;\n };\n var columnIdMapper = function (c) {\n return c.getColId();\n };\n raiseWhenListsDifferent(Events.EVENT_COLUMN_ROW_GROUP_CHANGED, startState.rowGroupColumns, _this.rowGroupColumns, columnIdMapper);\n raiseWhenListsDifferent(Events.EVENT_COLUMN_PIVOT_CHANGED, startState.pivotColumns, _this.pivotColumns, columnIdMapper);\n var valueChangePredicate = function (cs, c) {\n var oldActive = cs.aggFunc != null;\n var activeChanged = oldActive != c.isValueActive();\n // we only check aggFunc if the agg is active\n var aggFuncChanged = oldActive && cs.aggFunc != c.getAggFunc();\n return activeChanged || aggFuncChanged;\n };\n var changedValues = getChangedColumns(valueChangePredicate);\n if (changedValues.length > 0) {\n // we pass all value columns, now the ones that changed. this is the same\n // as pivot and rowGroup cols, but different to all other properties below.\n // this is more for backwards compatibility, as it's always been this way.\n // really it should be the other way, as the order of the cols makes no difference\n // for valueColumns (apart from displaying them in the tool panel).\n _this.fireColumnEvent(Events.EVENT_COLUMN_VALUE_CHANGED, _this.valueColumns, source);\n }\n var resizeChangePredicate = function (cs, c) {\n return cs.width != c.getActualWidth();\n };\n _this.fireColumnResizedEvent(getChangedColumns(resizeChangePredicate), true, source);\n var pinnedChangePredicate = function (cs, c) {\n return cs.pinned != c.getPinned();\n };\n _this.raiseColumnPinnedEvent(getChangedColumns(pinnedChangePredicate), source);\n var visibilityChangePredicate = function (cs, c) {\n return cs.hide == c.isVisible();\n };\n _this.raiseColumnVisibleEvent(getChangedColumns(visibilityChangePredicate), source);\n var sortChangePredicate = function (cs, c) {\n return cs.sort != c.getSort() || cs.sortIndex != c.getSortIndex();\n };\n if (getChangedColumns(sortChangePredicate).length > 0) {\n _this.sortController.dispatchSortChangedEvents(source);\n }\n // special handling for moved column events\n _this.raiseColumnMovedEvent(columnStateBefore, source);\n };\n };\n ColumnModel.prototype.raiseColumnPinnedEvent = function (changedColumns, source) {\n if (!changedColumns.length) {\n return;\n }\n // if just one column, we use this, otherwise we don't include the col\n var column = changedColumns.length === 1 ? changedColumns[0] : null;\n // only include visible if it's common in all columns\n var pinned = this.getCommonValue(changedColumns, function (col) {\n return col.getPinned();\n });\n var event = {\n type: Events.EVENT_COLUMN_PINNED,\n // mistake in typing, 'undefined' should be allowed, as 'null' means 'not pinned'\n pinned: pinned != null ? pinned : null,\n columns: changedColumns,\n column: column,\n source: source\n };\n this.eventService.dispatchEvent(event);\n };\n ColumnModel.prototype.getCommonValue = function (cols, valueGetter) {\n if (!cols || cols.length == 0) {\n return undefined;\n }\n // compare each value to the first value. if nothing differs, then value is common so return it.\n var firstValue = valueGetter(cols[0]);\n for (var i = 1; i < cols.length; i++) {\n if (firstValue !== valueGetter(cols[i])) {\n // values differ, no common value\n return undefined;\n }\n }\n return firstValue;\n };\n ColumnModel.prototype.raiseColumnVisibleEvent = function (changedColumns, source) {\n if (!changedColumns.length) {\n return;\n }\n // if just one column, we use this, otherwise we don't include the col\n var column = changedColumns.length === 1 ? changedColumns[0] : null;\n // only include visible if it's common in all columns\n var visible = this.getCommonValue(changedColumns, function (col) {\n return col.isVisible();\n });\n var event = {\n type: Events.EVENT_COLUMN_VISIBLE,\n visible: visible,\n columns: changedColumns,\n column: column,\n source: source\n };\n this.eventService.dispatchEvent(event);\n };\n ColumnModel.prototype.raiseColumnMovedEvent = function (colStateBefore, source) {\n // we are only interested in columns that were both present and visible before and after\n var _this = this;\n var colStateAfter = this.getColumnState();\n var colStateAfterMapped = {};\n colStateAfter.forEach(function (s) {\n return colStateAfterMapped[s.colId] = s;\n });\n // get id's of cols in both before and after lists\n var colsIntersectIds = {};\n colStateBefore.forEach(function (s) {\n if (colStateAfterMapped[s.colId]) {\n colsIntersectIds[s.colId] = true;\n }\n });\n // filter state lists, so we only have cols that were present before and after\n var beforeFiltered = colStateBefore.filter(function (c) {\n return colsIntersectIds[c.colId];\n });\n var afterFiltered = colStateAfter.filter(function (c) {\n return colsIntersectIds[c.colId];\n });\n // see if any cols are in a different location\n var movedColumns = [];\n afterFiltered.forEach(function (csAfter, index) {\n var csBefore = beforeFiltered && beforeFiltered[index];\n if (csBefore && csBefore.colId !== csAfter.colId) {\n var gridCol = _this.getGridColumn(csBefore.colId);\n if (gridCol) {\n movedColumns.push(gridCol);\n }\n }\n });\n if (!movedColumns.length) {\n return;\n }\n var event = {\n type: Events.EVENT_COLUMN_MOVED,\n columns: movedColumns,\n column: null,\n source: source\n };\n this.eventService.dispatchEvent(event);\n };\n ColumnModel.prototype.syncColumnWithStateItem = function (column, stateItem, defaultState, rowGroupIndexes, pivotIndexes, autoCol, source) {\n if (!column) {\n return;\n }\n var getValue = function (key1, key2) {\n var obj = {\n value1: undefined,\n value2: undefined\n };\n var calculated = false;\n if (stateItem) {\n if (stateItem[key1] !== undefined) {\n obj.value1 = stateItem[key1];\n calculated = true;\n }\n if (exists(key2) && stateItem[key2] !== undefined) {\n obj.value2 = stateItem[key2];\n calculated = true;\n }\n }\n if (!calculated && defaultState) {\n if (defaultState[key1] !== undefined) {\n obj.value1 = defaultState[key1];\n }\n if (exists(key2) && defaultState[key2] !== undefined) {\n obj.value2 = defaultState[key2];\n }\n }\n return obj;\n };\n // following ensures we are left with boolean true or false, eg converts (null, undefined, 0) all to true\n var hide = getValue('hide').value1;\n if (hide !== undefined) {\n column.setVisible(!hide, source);\n }\n // sets pinned to 'left' or 'right'\n var pinned = getValue('pinned').value1;\n if (pinned !== undefined) {\n column.setPinned(pinned);\n }\n // if width provided and valid, use it, otherwise stick with the old width\n var minColWidth = this.columnUtils.calculateColMinWidth(column.getColDef());\n // flex\n var flex = getValue('flex').value1;\n if (flex !== undefined) {\n column.setFlex(flex);\n }\n // width - we only set width if column is not flexing\n var noFlexThisCol = column.getFlex() <= 0;\n if (noFlexThisCol) {\n // both null and undefined means we skip, as it's not possible to 'clear' width (a column must have a width)\n var width = getValue('width').value1;\n if (width != null) {\n if (minColWidth != null && width >= minColWidth) {\n column.setActualWidth(width, source);\n }\n }\n }\n var sort = getValue('sort').value1;\n if (sort !== undefined) {\n if (sort === Constants.SORT_DESC || sort === Constants.SORT_ASC) {\n column.setSort(sort, source);\n } else {\n column.setSort(undefined, source);\n }\n }\n var sortIndex = getValue('sortIndex').value1;\n if (sortIndex !== undefined) {\n column.setSortIndex(sortIndex);\n }\n // we do not do aggFunc, rowGroup or pivot for auto cols or secondary cols\n if (autoCol || !column.isPrimary()) {\n return;\n }\n var aggFunc = getValue('aggFunc').value1;\n if (aggFunc !== undefined) {\n if (typeof aggFunc === 'string') {\n column.setAggFunc(aggFunc);\n if (!column.isValueActive()) {\n column.setValueActive(true, source);\n this.valueColumns.push(column);\n }\n } else {\n if (exists(aggFunc)) {\n 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.');\n }\n // Note: we do not call column.setAggFunc(null), so that next time we aggregate\n // by this column (eg drag the column to the agg section int he toolpanel) it will\n // default to the last aggregation function.\n if (column.isValueActive()) {\n column.setValueActive(false, source);\n removeFromArray(this.valueColumns, column);\n }\n }\n }\n var _a = getValue('rowGroup', 'rowGroupIndex'),\n rowGroup = _a.value1,\n rowGroupIndex = _a.value2;\n if (rowGroup !== undefined || rowGroupIndex !== undefined) {\n if (typeof rowGroupIndex === 'number' || rowGroup) {\n if (!column.isRowGroupActive()) {\n column.setRowGroupActive(true, source);\n this.rowGroupColumns.push(column);\n }\n if (rowGroupIndexes && typeof rowGroupIndex === 'number') {\n rowGroupIndexes[column.getId()] = rowGroupIndex;\n }\n } else {\n if (column.isRowGroupActive()) {\n column.setRowGroupActive(false, source);\n removeFromArray(this.rowGroupColumns, column);\n }\n }\n }\n var _b = getValue('pivot', 'pivotIndex'),\n pivot = _b.value1,\n pivotIndex = _b.value2;\n if (pivot !== undefined || pivotIndex !== undefined) {\n if (typeof pivotIndex === 'number' || pivot) {\n if (!column.isPivotActive()) {\n column.setPivotActive(true, source);\n this.pivotColumns.push(column);\n }\n if (pivotIndexes && typeof pivotIndex === 'number') {\n pivotIndexes[column.getId()] = pivotIndex;\n }\n } else {\n if (column.isPivotActive()) {\n column.setPivotActive(false, source);\n removeFromArray(this.pivotColumns, column);\n }\n }\n }\n };\n ColumnModel.prototype.getGridColumns = function (keys) {\n return this.getColumns(keys, this.getGridColumn.bind(this));\n };\n ColumnModel.prototype.getColumns = function (keys, columnLookupCallback) {\n var foundColumns = [];\n if (keys) {\n keys.forEach(function (key) {\n var column = columnLookupCallback(key);\n if (column) {\n foundColumns.push(column);\n }\n });\n }\n return foundColumns;\n };\n // used by growGroupPanel\n ColumnModel.prototype.getColumnWithValidation = function (key) {\n if (key == null) {\n return null;\n }\n var column = this.getGridColumn(key);\n if (!column) {\n console.warn('AG Grid: could not find column ' + key);\n }\n return column;\n };\n ColumnModel.prototype.getPrimaryColumn = function (key) {\n if (!this.primaryColumns) {\n return null;\n }\n return this.getColumn(key, this.primaryColumns, this.primaryColumnsMap);\n };\n ColumnModel.prototype.getGridColumn = function (key) {\n return this.getColumn(key, this.gridColumns, this.gridColumnsMap);\n };\n ColumnModel.prototype.getSecondaryColumn = function (key) {\n if (!this.secondaryColumns) {\n return null;\n }\n return this.getColumn(key, this.secondaryColumns, this.secondaryColumnsMap);\n };\n ColumnModel.prototype.getColumn = function (key, columnList, columnMap) {\n if (!key) {\n return null;\n }\n // most of the time this method gets called the key is a string, so we put this shortcut in\n // for performance reasons, to see if we can match for ID (it doesn't do auto columns, that's done below)\n if (typeof key == 'string' && columnMap[key]) {\n return columnMap[key];\n }\n for (var i = 0; i < columnList.length; i++) {\n if (this.columnsMatch(columnList[i], key)) {\n return columnList[i];\n }\n }\n return this.getAutoColumn(key);\n };\n ColumnModel.prototype.getSourceColumnsForGroupColumn = function (groupCol) {\n var sourceColumnId = groupCol.getColDef().showRowGroup;\n if (!sourceColumnId) {\n return null;\n }\n if (sourceColumnId === true) {\n return this.rowGroupColumns.slice(0);\n }\n var column = this.getPrimaryColumn(sourceColumnId);\n return column ? [column] : null;\n };\n ColumnModel.prototype.getAutoColumn = function (key) {\n var _this = this;\n if (!this.groupAutoColumns || !exists(this.groupAutoColumns) || missing(this.groupAutoColumns)) {\n return null;\n }\n return this.groupAutoColumns.find(function (groupCol) {\n return _this.columnsMatch(groupCol, key);\n }) || null;\n };\n ColumnModel.prototype.columnsMatch = function (column, key) {\n var columnMatches = column === key;\n var colDefMatches = column.getColDef() === key;\n var idMatches = column.getColId() == key;\n return columnMatches || colDefMatches || idMatches;\n };\n ColumnModel.prototype.getDisplayNameForColumn = function (column, location, includeAggFunc) {\n if (includeAggFunc === void 0) {\n includeAggFunc = false;\n }\n if (!column) {\n return null;\n }\n var headerName = this.getHeaderName(column.getColDef(), column, null, null, location);\n if (includeAggFunc) {\n return this.wrapHeaderNameWithAggFunc(column, headerName);\n }\n return headerName;\n };\n ColumnModel.prototype.getDisplayNameForProvidedColumnGroup = function (columnGroup, providedColumnGroup, location) {\n var colGroupDef = providedColumnGroup ? providedColumnGroup.getColGroupDef() : null;\n if (colGroupDef) {\n return this.getHeaderName(colGroupDef, null, columnGroup, providedColumnGroup, location);\n }\n return null;\n };\n ColumnModel.prototype.getDisplayNameForColumnGroup = function (columnGroup, location) {\n return this.getDisplayNameForProvidedColumnGroup(columnGroup, columnGroup.getProvidedColumnGroup(), location);\n };\n // location is where the column is going to appear, ie who is calling us\n ColumnModel.prototype.getHeaderName = function (colDef, column, columnGroup, providedColumnGroup, location) {\n var headerValueGetter = colDef.headerValueGetter;\n if (headerValueGetter) {\n var params = {\n colDef: colDef,\n column: column,\n columnGroup: columnGroup,\n providedColumnGroup: providedColumnGroup,\n location: location,\n api: this.gridOptionsWrapper.getApi(),\n columnApi: this.gridOptionsWrapper.getColumnApi(),\n context: this.gridOptionsWrapper.getContext()\n };\n if (typeof headerValueGetter === 'function') {\n // valueGetter is a function, so just call it\n return headerValueGetter(params);\n } else if (typeof headerValueGetter === 'string') {\n // valueGetter is an expression, so execute the expression\n return this.expressionService.evaluate(headerValueGetter, params);\n }\n console.warn('ag-grid: headerValueGetter must be a function or a string');\n return '';\n } else if (colDef.headerName != null) {\n return colDef.headerName;\n } else if (colDef.field) {\n return camelCaseToHumanText(colDef.field);\n }\n return '';\n };\n ColumnModel.prototype.wrapHeaderNameWithAggFunc = function (column, headerName) {\n if (this.gridOptionsWrapper.isSuppressAggFuncInHeader()) {\n return headerName;\n }\n // only columns with aggregation active can have aggregations\n var pivotValueColumn = column.getColDef().pivotValueColumn;\n var pivotActiveOnThisColumn = exists(pivotValueColumn);\n var aggFunc = null;\n var aggFuncFound;\n // otherwise we have a measure that is active, and we are doing aggregation on it\n if (pivotActiveOnThisColumn) {\n var isCollapsedHeaderEnabled = this.gridOptionsWrapper.isRemovePivotHeaderRowWhenSingleValueColumn() && this.valueColumns.length === 1;\n var isTotalColumn = column.getColDef().pivotTotalColumnIds !== undefined;\n if (isCollapsedHeaderEnabled && !isTotalColumn) {\n return headerName; // Skip decorating the header - in this case the label is the pivot key, not the value col\n }\n aggFunc = pivotValueColumn ? pivotValueColumn.getAggFunc() : null;\n aggFuncFound = true;\n } else {\n var measureActive = column.isValueActive();\n var aggregationPresent = this.pivotMode || !this.isRowGroupEmpty();\n if (measureActive && aggregationPresent) {\n aggFunc = column.getAggFunc();\n aggFuncFound = true;\n } else {\n aggFuncFound = false;\n }\n }\n if (aggFuncFound) {\n var aggFuncString = typeof aggFunc === 'string' ? aggFunc : 'func';\n var localeTextFunc = this.gridOptionsWrapper.getLocaleTextFunc();\n var aggFuncStringTranslated = localeTextFunc(aggFuncString, aggFuncString);\n return aggFuncStringTranslated + \"(\" + headerName + \")\";\n }\n return headerName;\n };\n // returns the group with matching colId and instanceId. If instanceId is missing,\n // matches only on the colId.\n ColumnModel.prototype.getColumnGroup = function (colId, instanceId) {\n if (!colId) {\n return null;\n }\n if (colId instanceof ColumnGroup) {\n return colId;\n }\n var allColumnGroups = this.getAllDisplayedTrees();\n var checkInstanceId = typeof instanceId === 'number';\n var result = null;\n this.columnUtils.depthFirstAllColumnTreeSearch(allColumnGroups, function (child) {\n if (child instanceof ColumnGroup) {\n var columnGroup = child;\n var matched = void 0;\n if (checkInstanceId) {\n matched = colId === columnGroup.getGroupId() && instanceId === columnGroup.getInstanceId();\n } else {\n matched = colId === columnGroup.getGroupId();\n }\n if (matched) {\n result = columnGroup;\n }\n }\n });\n return result;\n };\n ColumnModel.prototype.isReady = function () {\n return this.ready;\n };\n ColumnModel.prototype.extractValueColumns = function (source, oldPrimaryColumns) {\n this.valueColumns = this.extractColumns(oldPrimaryColumns, this.valueColumns, function (col, flag) {\n return col.setValueActive(flag, source);\n },\n // aggFunc doesn't have index variant, cos order of value cols doesn't matter, so always return null\n function () {\n return undefined;\n }, function () {\n return undefined;\n },\n // aggFunc is a string, so return it's existence\n function (colDef) {\n var aggFunc = colDef.aggFunc;\n // null or empty string means clear\n if (aggFunc === null || aggFunc === '') {\n return null;\n }\n if (aggFunc === undefined) {\n return;\n }\n return !!aggFunc;\n }, function (colDef) {\n // return false if any of the following: null, undefined, empty string\n return colDef.initialAggFunc != null && colDef.initialAggFunc != '';\n });\n // all new columns added will have aggFunc missing, so set it to what is in the colDef\n this.valueColumns.forEach(function (col) {\n var colDef = col.getColDef();\n // if aggFunc provided, we always override, as reactive property\n if (colDef.aggFunc != null && colDef.aggFunc != '') {\n col.setAggFunc(colDef.aggFunc);\n } else {\n // otherwise we use initialAggFunc only if no agg func set - which happens when new column only\n if (!col.getAggFunc()) {\n col.setAggFunc(colDef.initialAggFunc);\n }\n }\n });\n };\n ColumnModel.prototype.extractRowGroupColumns = function (source, oldPrimaryColumns) {\n this.rowGroupColumns = this.extractColumns(oldPrimaryColumns, this.rowGroupColumns, function (col, flag) {\n return col.setRowGroupActive(flag, source);\n }, function (colDef) {\n return colDef.rowGroupIndex;\n }, function (colDef) {\n return colDef.initialRowGroupIndex;\n }, function (colDef) {\n return colDef.rowGroup;\n }, function (colDef) {\n return colDef.initialRowGroup;\n });\n };\n ColumnModel.prototype.extractColumns = function (oldPrimaryColumns, previousCols, setFlagFunc, getIndexFunc, getInitialIndexFunc, getValueFunc, getInitialValueFunc) {\n if (oldPrimaryColumns === void 0) {\n oldPrimaryColumns = [];\n }\n if (previousCols === void 0) {\n previousCols = [];\n }\n var colsWithIndex = [];\n var colsWithValue = [];\n // go though all cols.\n // if value, change\n // if default only, change only if new\n (this.primaryColumns || []).forEach(function (col) {\n var colIsNew = oldPrimaryColumns.indexOf(col) < 0;\n var colDef = col.getColDef();\n var value = attrToBoolean(getValueFunc(colDef));\n var initialValue = attrToBoolean(getInitialValueFunc(colDef));\n var index = attrToNumber(getIndexFunc(colDef));\n var initialIndex = attrToNumber(getInitialIndexFunc(colDef));\n var include;\n var valuePresent = value !== undefined;\n var indexPresent = index !== undefined;\n var initialValuePresent = initialValue !== undefined;\n var initialIndexPresent = initialIndex !== undefined;\n if (valuePresent) {\n include = value; // boolean value is guaranteed as attrToBoolean() is used above\n } else if (indexPresent) {\n if (index === null) {\n // if col is new we don't want to use the default / initial if index is set to null. Similarly,\n // we don't want to include the property for existing columns, i.e. we want to 'clear' it.\n include = false;\n } else {\n // note that 'null >= 0' evaluates to true which means 'rowGroupIndex = null' would enable row\n // grouping if the null check didn't exist above.\n include = index >= 0;\n }\n } else {\n if (colIsNew) {\n // as no value or index is 'present' we use the default / initial when col is new\n if (initialValuePresent) {\n include = initialValue;\n } else if (initialIndexPresent) {\n include = initialIndex != null && initialIndex >= 0;\n } else {\n include = false;\n }\n } else {\n // otherwise include it if included last time, e.g. if we are extracting row group cols and this col\n // is an existing row group col (i.e. it exists in 'previousCols') then we should include it.\n include = previousCols.indexOf(col) >= 0;\n }\n }\n if (include) {\n var useIndex = colIsNew ? index != null || initialIndex != null : index != null;\n useIndex ? colsWithIndex.push(col) : colsWithValue.push(col);\n }\n });\n var getIndexForCol = function (col) {\n var index = getIndexFunc(col.getColDef());\n var defaultIndex = getInitialIndexFunc(col.getColDef());\n return index != null ? index : defaultIndex;\n };\n // sort cols with index, and add these first\n colsWithIndex.sort(function (colA, colB) {\n var indexA = getIndexForCol(colA);\n var indexB = getIndexForCol(colB);\n if (indexA === indexB) {\n return 0;\n }\n if (indexA < indexB) {\n return -1;\n }\n return 1;\n });\n var res = [].concat(colsWithIndex);\n // second add columns that were there before and in the same order as they were before,\n // so we are preserving order of current grouping of columns that simply have rowGroup=true\n previousCols.forEach(function (col) {\n if (colsWithValue.indexOf(col) >= 0) {\n res.push(col);\n }\n });\n // lastly put in all remaining cols\n colsWithValue.forEach(function (col) {\n if (res.indexOf(col) < 0) {\n res.push(col);\n }\n });\n // set flag=false for removed cols\n previousCols.forEach(function (col) {\n if (res.indexOf(col) < 0) {\n setFlagFunc(col, false);\n }\n });\n // set flag=true for newly added cols\n res.forEach(function (col) {\n if (previousCols.indexOf(col) < 0) {\n setFlagFunc(col, true);\n }\n });\n return res;\n };\n ColumnModel.prototype.extractPivotColumns = function (source, oldPrimaryColumns) {\n this.pivotColumns = this.extractColumns(oldPrimaryColumns, this.pivotColumns, function (col, flag) {\n return col.setPivotActive(flag, source);\n }, function (colDef) {\n return colDef.pivotIndex;\n }, function (colDef) {\n return colDef.initialPivotIndex;\n }, function (colDef) {\n return colDef.pivot;\n }, function (colDef) {\n return colDef.initialPivot;\n });\n };\n ColumnModel.prototype.resetColumnGroupState = function (source) {\n if (source === void 0) {\n source = \"api\";\n }\n var stateItems = [];\n this.columnUtils.depthFirstOriginalTreeSearch(null, this.primaryColumnTree, function (child) {\n if (child instanceof ProvidedColumnGroup) {\n var colGroupDef = child.getColGroupDef();\n var groupState = {\n groupId: child.getGroupId(),\n open: !colGroupDef ? undefined : colGroupDef.openByDefault\n };\n stateItems.push(groupState);\n }\n });\n this.setColumnGroupState(stateItems, source);\n };\n ColumnModel.prototype.getColumnGroupState = function () {\n var columnGroupState = [];\n this.columnUtils.depthFirstOriginalTreeSearch(null, this.gridBalancedTree, function (node) {\n if (node instanceof ProvidedColumnGroup) {\n columnGroupState.push({\n groupId: node.getGroupId(),\n open: node.isExpanded()\n });\n }\n });\n return columnGroupState;\n };\n ColumnModel.prototype.setColumnGroupState = function (stateItems, source) {\n var _this = this;\n if (source === void 0) {\n source = \"api\";\n }\n this.columnAnimationService.start();\n var impactedGroups = [];\n stateItems.forEach(function (stateItem) {\n var groupKey = stateItem.groupId;\n var newValue = stateItem.open;\n var providedColumnGroup = _this.getProvidedColumnGroup(groupKey);\n if (!providedColumnGroup) {\n return;\n }\n if (providedColumnGroup.isExpanded() === newValue) {\n return;\n }\n _this.logger.log('columnGroupOpened(' + providedColumnGroup.getGroupId() + ',' + newValue + ')');\n providedColumnGroup.setExpanded(newValue);\n impactedGroups.push(providedColumnGroup);\n });\n this.updateGroupsAndDisplayedColumns(source);\n this.setFirstRightAndLastLeftPinned(source);\n impactedGroups.forEach(function (providedColumnGroup) {\n var event = {\n type: Events.EVENT_COLUMN_GROUP_OPENED,\n columnGroup: providedColumnGroup\n };\n _this.eventService.dispatchEvent(event);\n });\n this.columnAnimationService.finish();\n };\n // called by headerRenderer - when a header is opened or closed\n ColumnModel.prototype.setColumnGroupOpened = function (key, newValue, source) {\n if (source === void 0) {\n source = \"api\";\n }\n var keyAsString;\n if (key instanceof ProvidedColumnGroup) {\n keyAsString = key.getId();\n } else {\n keyAsString = key || '';\n }\n this.setColumnGroupState([{\n groupId: keyAsString,\n open: newValue\n }], source);\n };\n ColumnModel.prototype.getProvidedColumnGroup = function (key) {\n // if (key instanceof ProvidedColumnGroup) { return key; }\n if (typeof key !== 'string') {\n console.error('AG Grid: group key must be a string');\n }\n // otherwise, search for the column group by id\n var res = null;\n this.columnUtils.depthFirstOriginalTreeSearch(null, this.gridBalancedTree, function (node) {\n if (node instanceof ProvidedColumnGroup) {\n if (node.getId() === key) {\n res = node;\n }\n }\n });\n return res;\n };\n ColumnModel.prototype.calculateColumnsForDisplay = function () {\n var _this = this;\n var columnsForDisplay;\n if (this.pivotMode && missing(this.secondaryColumns)) {\n // pivot mode is on, but we are not pivoting, so we only\n // show columns we are aggregating on\n columnsForDisplay = this.gridColumns.filter(function (column) {\n var isAutoGroupCol = _this.groupAutoColumns && includes(_this.groupAutoColumns, column);\n var isValueCol = _this.valueColumns && includes(_this.valueColumns, column);\n return isAutoGroupCol || isValueCol;\n });\n } else {\n // otherwise continue as normal. this can be working on the primary\n // or secondary columns, whatever the gridColumns are set to\n columnsForDisplay = this.gridColumns.filter(function (column) {\n // keep col if a) it's auto-group or b) it's visible\n var isAutoGroupCol = _this.groupAutoColumns && includes(_this.groupAutoColumns, column);\n return isAutoGroupCol || column.isVisible();\n });\n }\n return columnsForDisplay;\n };\n ColumnModel.prototype.checkColSpanActiveInCols = function (columns) {\n var result = false;\n columns.forEach(function (col) {\n if (exists(col.getColDef().colSpan)) {\n result = true;\n }\n });\n return result;\n };\n ColumnModel.prototype.calculateColumnsForGroupDisplay = function () {\n var _this = this;\n this.groupDisplayColumns = [];\n this.groupDisplayColumnsMap = {};\n var checkFunc = function (col) {\n var colDef = col.getColDef();\n var underlyingColumn = colDef.showRowGroup;\n if (colDef && exists(underlyingColumn)) {\n _this.groupDisplayColumns.push(col);\n if (typeof underlyingColumn === 'string') {\n _this.groupDisplayColumnsMap[underlyingColumn] = col;\n } else if (underlyingColumn === true) {\n _this.getRowGroupColumns().forEach(function (rowGroupCol) {\n _this.groupDisplayColumnsMap[rowGroupCol.getId()] = col;\n });\n }\n }\n };\n this.gridColumns.forEach(checkFunc);\n if (this.groupAutoColumns) {\n this.groupAutoColumns.forEach(checkFunc);\n }\n };\n ColumnModel.prototype.getGroupDisplayColumns = function () {\n return this.groupDisplayColumns;\n };\n ColumnModel.prototype.getGroupDisplayColumnForGroup = function (rowGroupColumnId) {\n return this.groupDisplayColumnsMap[rowGroupColumnId];\n };\n ColumnModel.prototype.updateDisplayedColumns = function (source) {\n var columnsForDisplay = this.calculateColumnsForDisplay();\n this.buildDisplayedTrees(columnsForDisplay);\n this.calculateColumnsForGroupDisplay();\n // also called when group opened/closed\n this.updateGroupsAndDisplayedColumns(source);\n // also called when group opened/closed\n this.setFirstRightAndLastLeftPinned(source);\n };\n ColumnModel.prototype.isSecondaryColumnsPresent = function () {\n return exists(this.secondaryColumns);\n };\n ColumnModel.prototype.setSecondaryColumns = function (colDefs, source) {\n var _this = this;\n if (source === void 0) {\n source = \"api\";\n }\n var newColsPresent = colDefs && colDefs.length > 0;\n // if not cols passed, and we had no cols anyway, then do nothing\n if (!newColsPresent && missing(this.secondaryColumns)) {\n return;\n }\n if (newColsPresent) {\n this.processSecondaryColumnDefinitions(colDefs);\n var balancedTreeResult = this.columnFactory.createColumnTree(colDefs, false, this.secondaryBalancedTree || this.previousSecondaryColumns || undefined);\n this.secondaryBalancedTree = balancedTreeResult.columnTree;\n this.secondaryHeaderRowCount = balancedTreeResult.treeDept + 1;\n this.secondaryColumns = this.getColumnsFromTree(this.secondaryBalancedTree);\n this.secondaryColumnsMap = {};\n this.secondaryColumns.forEach(function (col) {\n return _this.secondaryColumnsMap[col.getId()] = col;\n });\n this.previousSecondaryColumns = null;\n } else {\n this.previousSecondaryColumns = this.secondaryBalancedTree;\n this.secondaryBalancedTree = null;\n this.secondaryHeaderRowCount = -1;\n this.secondaryColumns = null;\n this.secondaryColumnsMap = {};\n }\n this.updateGridColumns();\n this.updateDisplayedColumns(source);\n };\n ColumnModel.prototype.processSecondaryColumnDefinitions = function (colDefs) {\n var columnCallback = this.gridOptionsWrapper.getProcessPivotResultColDefFunc();\n var groupCallback = this.gridOptionsWrapper.getProcessPivotResultColGroupDefFunc();\n if (!columnCallback && !groupCallback) {\n return undefined;\n }\n var searchForColDefs = function (colDefs2) {\n colDefs2.forEach(function (abstractColDef) {\n var isGroup = exists(abstractColDef.children);\n if (isGroup) {\n var colGroupDef = abstractColDef;\n if (groupCallback) {\n groupCallback(colGroupDef);\n }\n searchForColDefs(colGroupDef.children);\n } else {\n var colDef = abstractColDef;\n if (columnCallback) {\n columnCallback(colDef);\n }\n }\n });\n };\n if (colDefs) {\n searchForColDefs(colDefs);\n }\n };\n // called from: setColumnState, setColumnDefs, setSecondaryColumns\n ColumnModel.prototype.updateGridColumns = function () {\n var _this = this;\n var prevGridCols = this.gridBalancedTree;\n if (this.gridColsArePrimary) {\n this.lastPrimaryOrder = this.gridColumns;\n } else {\n this.lastSecondaryOrder = this.gridColumns;\n }\n var sortOrderToRecover = undefined;\n if (this.secondaryColumns && this.secondaryBalancedTree) {\n var hasSameColumns = this.secondaryColumns.every(function (col) {\n return _this.gridColumnsMap[col.getColId()] !== undefined;\n });\n this.gridBalancedTree = this.secondaryBalancedTree.slice();\n this.gridHeaderRowCount = this.secondaryHeaderRowCount;\n this.gridColumns = this.secondaryColumns.slice();\n this.gridColsArePrimary = false;\n // If the current columns are the same or a subset of the previous\n // we keep the previous order, otherwise we go back to the order the pivot\n // cols are generated in\n if (hasSameColumns) {\n sortOrderToRecover = this.lastSecondaryOrder;\n }\n } else if (this.primaryColumns) {\n this.gridBalancedTree = this.primaryColumnTree.slice();\n this.gridHeaderRowCount = this.primaryHeaderRowCount;\n this.gridColumns = this.primaryColumns.slice();\n this.gridColsArePrimary = true;\n // updateGridColumns gets called after user adds a row group. we want to maintain the order of the columns\n // when this happens (eg if user moved a column) rather than revert back to the original column order.\n // likewise if changing in/out of pivot mode, we want to maintain the order of the cols\n sortOrderToRecover = this.lastPrimaryOrder;\n }\n // create the new auto columns\n var areAutoColsChanged = this.createGroupAutoColumnsIfNeeded();\n // if auto group cols have changed, and we have a sort order, we need to move auto cols to the start\n if (areAutoColsChanged && sortOrderToRecover) {\n var groupAutoColsMap_1 = convertToMap(this.groupAutoColumns.map(function (col) {\n return [col, true];\n }));\n // if group columns has changed, we don't preserve the group column order, so remove them from the old order\n sortOrderToRecover = sortOrderToRecover.filter(function (col) {\n return !groupAutoColsMap_1.has(col);\n });\n // and add them to the start of the order\n sortOrderToRecover = __spread$f(this.groupAutoColumns, sortOrderToRecover);\n }\n this.addAutoGroupToGridColumns();\n this.orderGridColsLike(sortOrderToRecover);\n this.gridColumns = this.placeLockedColumns(this.gridColumns);\n this.setupQuickFilterColumns();\n this.clearDisplayedAndViewportColumns();\n this.colSpanActive = this.checkColSpanActiveInCols(this.gridColumns);\n this.gridColumnsMap = {};\n this.gridColumns.forEach(function (col) {\n return _this.gridColumnsMap[col.getId()] = col;\n });\n this.setAutoHeightActive();\n if (!areEqual(prevGridCols, this.gridBalancedTree)) {\n var event_4 = {\n type: Events.EVENT_GRID_COLUMNS_CHANGED\n };\n this.eventService.dispatchEvent(event_4);\n }\n };\n ColumnModel.prototype.setAutoHeightActive = function () {\n this.autoHeightActive = this.gridColumns.filter(function (col) {\n return col.isAutoHeight();\n }).length > 0;\n if (this.autoHeightActive) {\n this.autoHeightActiveAtLeastOnce = true;\n var rowModelType = this.rowModel.getType();\n var supportedRowModel = rowModelType === Constants.ROW_MODEL_TYPE_CLIENT_SIDE || rowModelType === Constants.ROW_MODEL_TYPE_SERVER_SIDE;\n if (!supportedRowModel) {\n var message_1 = 'AG Grid - autoHeight columns only work with Client Side Row Model and Server Side Row Model.';\n doOnce(function () {\n return console.warn(message_1);\n }, 'autoHeightActive.wrongRowModel');\n }\n }\n };\n ColumnModel.prototype.orderGridColsLike = function (colsOrder) {\n if (missing(colsOrder)) {\n return;\n }\n var lastOrderMapped = convertToMap(colsOrder.map(function (col, index) {\n return [col, index];\n }));\n // only do the sort if at least one column is accounted for. columns will be not accounted for\n // if changing from secondary to primary columns\n var noColsFound = true;\n this.gridColumns.forEach(function (col) {\n if (lastOrderMapped.has(col)) {\n noColsFound = false;\n }\n });\n if (noColsFound) {\n return;\n }\n // order cols in the same order as before. we need to make sure that all\n // cols still exists, so filter out any that no longer exist.\n var gridColsMap = convertToMap(this.gridColumns.map(function (col) {\n return [col, true];\n }));\n var oldColsOrdered = colsOrder.filter(function (col) {\n return gridColsMap.has(col);\n });\n var oldColsMap = convertToMap(oldColsOrdered.map(function (col) {\n return [col, true];\n }));\n var newColsOrdered = this.gridColumns.filter(function (col) {\n return !oldColsMap.has(col);\n });\n // add in the new columns, at the end (if no group), or at the end of the group (if a group)\n var newGridColumns = oldColsOrdered.slice();\n newColsOrdered.forEach(function (newCol) {\n var parent = newCol.getOriginalParent();\n // if no parent, means we are not grouping, so just add the column to the end\n if (!parent) {\n newGridColumns.push(newCol);\n return;\n }\n // find the group the column belongs to. if no siblings at the current level (eg col in group on it's\n // own) then go up one level and look for siblings there.\n var siblings = [];\n while (!siblings.length && parent) {\n var leafCols = parent.getLeafColumns();\n leafCols.forEach(function (leafCol) {\n var presentInNewGriColumns = newGridColumns.indexOf(leafCol) >= 0;\n var noYetInSiblings = siblings.indexOf(leafCol) < 0;\n if (presentInNewGriColumns && noYetInSiblings) {\n siblings.push(leafCol);\n }\n });\n parent = parent.getOriginalParent();\n }\n // if no siblings exist at any level, this means the col is in a group (or parent groups) on it's own\n if (!siblings.length) {\n newGridColumns.push(newCol);\n return;\n }\n // find index of last column in the group\n var indexes = siblings.map(function (col) {\n return newGridColumns.indexOf(col);\n });\n var lastIndex = Math.max.apply(Math, __spread$f(indexes));\n insertIntoArray(newGridColumns, newCol, lastIndex + 1);\n });\n this.gridColumns = newGridColumns;\n };\n ColumnModel.prototype.isPrimaryColumnGroupsPresent = function () {\n return this.primaryHeaderRowCount > 1;\n };\n // if we are using autoGroupCols, then they should be included for quick filter. this covers the\n // following scenarios:\n // a) user provides 'field' into autoGroupCol of normal grid, so now because a valid col to filter leafs on\n // b) using tree data and user depends on autoGroupCol for first col, and we also want to filter on this\n // (tree data is a bit different, as parent rows can be filtered on, unlike row grouping)\n ColumnModel.prototype.setupQuickFilterColumns = function () {\n if (this.groupAutoColumns) {\n this.columnsForQuickFilter = (this.primaryColumns || []).concat(this.groupAutoColumns);\n } else if (this.primaryColumns) {\n this.columnsForQuickFilter = this.primaryColumns;\n }\n };\n ColumnModel.prototype.placeLockedColumns = function (cols) {\n var left = [];\n var normal = [];\n var right = [];\n cols.forEach(function (col) {\n var position = col.getColDef().lockPosition;\n if (position === 'right') {\n right.push(col);\n } else if (position === 'left' || position === true) {\n left.push(col);\n } else {\n normal.push(col);\n }\n });\n return __spread$f(left, normal, right);\n };\n ColumnModel.prototype.addAutoGroupToGridColumns = function () {\n if (missing(this.groupAutoColumns)) {\n return;\n }\n this.gridColumns = this.groupAutoColumns ? this.groupAutoColumns.concat(this.gridColumns) : this.gridColumns;\n var autoColBalancedTree = this.columnFactory.createForAutoGroups(this.groupAutoColumns, this.gridBalancedTree);\n this.gridBalancedTree = autoColBalancedTree.concat(this.gridBalancedTree);\n };\n // gets called after we copy down grid columns, to make sure any part of the gui\n // that tries to draw, eg the header, it will get empty lists of columns rather\n // than stale columns. for example, the header will received gridColumnsChanged\n // event, so will try and draw, but it will draw successfully when it acts on the\n // virtualColumnsChanged event\n ColumnModel.prototype.clearDisplayedAndViewportColumns = function () {\n this.viewportRowLeft = {};\n this.viewportRowRight = {};\n this.viewportRowCenter = {};\n this.displayedColumnsLeft = [];\n this.displayedColumnsRight = [];\n this.displayedColumnsCenter = [];\n this.displayedColumns = [];\n this.viewportColumns = [];\n this.headerViewportColumns = [];\n this.viewportColumnsHash = '';\n };\n ColumnModel.prototype.updateGroupsAndDisplayedColumns = function (source) {\n this.updateOpenClosedVisibilityInColumnGroups();\n this.deriveDisplayedColumns(source);\n this.refreshFlexedColumns();\n this.extractViewport();\n this.updateBodyWidths();\n // this event is picked up by the gui, headerRenderer and rowRenderer, to recalculate what columns to display\n var event = {\n type: Events.EVENT_DISPLAYED_COLUMNS_CHANGED\n };\n this.eventService.dispatchEvent(event);\n };\n ColumnModel.prototype.deriveDisplayedColumns = function (source) {\n this.derivedDisplayedColumnsFromDisplayedTree(this.displayedTreeLeft, this.displayedColumnsLeft);\n this.derivedDisplayedColumnsFromDisplayedTree(this.displayedTreeCentre, this.displayedColumnsCenter);\n this.derivedDisplayedColumnsFromDisplayedTree(this.displayedTreeRight, this.displayedColumnsRight);\n this.joinDisplayedColumns();\n this.setLeftValues(source);\n this.displayedAutoHeightCols = this.displayedColumns.filter(function (col) {\n return col.isAutoHeight();\n });\n };\n ColumnModel.prototype.isAutoRowHeightActive = function () {\n return this.autoHeightActive;\n };\n ColumnModel.prototype.wasAutoRowHeightEverActive = function () {\n return this.autoHeightActiveAtLeastOnce;\n };\n ColumnModel.prototype.joinDisplayedColumns = function () {\n if (this.gridOptionsWrapper.isEnableRtl()) {\n this.displayedColumns = this.displayedColumnsRight.concat(this.displayedColumnsCenter).concat(this.displayedColumnsLeft);\n } else {\n this.displayedColumns = this.displayedColumnsLeft.concat(this.displayedColumnsCenter).concat(this.displayedColumnsRight);\n }\n };\n // sets the left pixel position of each column\n ColumnModel.prototype.setLeftValues = function (source) {\n this.setLeftValuesOfColumns(source);\n this.setLeftValuesOfGroups();\n };\n ColumnModel.prototype.setLeftValuesOfColumns = function (source) {\n var _this = this;\n if (!this.primaryColumns) {\n return;\n }\n // go through each list of displayed columns\n var allColumns = this.primaryColumns.slice(0);\n // let totalColumnWidth = this.getWidthOfColsInList()\n var doingRtl = this.gridOptionsWrapper.isEnableRtl();\n [this.displayedColumnsLeft, this.displayedColumnsRight, this.displayedColumnsCenter].forEach(function (columns) {\n if (doingRtl) {\n // when doing RTL, we start at the top most pixel (ie RHS) and work backwards\n var left_1 = _this.getWidthOfColsInList(columns);\n columns.forEach(function (column) {\n left_1 -= column.getActualWidth();\n column.setLeft(left_1, source);\n });\n } else {\n // otherwise normal LTR, we start at zero\n var left_2 = 0;\n columns.forEach(function (column) {\n column.setLeft(left_2, source);\n left_2 += column.getActualWidth();\n });\n }\n removeAllFromArray(allColumns, columns);\n });\n // items left in allColumns are columns not displayed, so remove the left position. this is\n // important for the rows, as if a col is made visible, then taken out, then made visible again,\n // we don't want the animation of the cell floating in from the old position, whatever that was.\n allColumns.forEach(function (column) {\n column.setLeft(null, source);\n });\n };\n ColumnModel.prototype.setLeftValuesOfGroups = function () {\n // a groups left value is the lest left value of it's children\n [this.displayedTreeLeft, this.displayedTreeRight, this.displayedTreeCentre].forEach(function (columns) {\n columns.forEach(function (column) {\n if (column instanceof ColumnGroup) {\n var columnGroup = column;\n columnGroup.checkLeft();\n }\n });\n });\n };\n ColumnModel.prototype.derivedDisplayedColumnsFromDisplayedTree = function (tree, columns) {\n columns.length = 0;\n this.columnUtils.depthFirstDisplayedColumnTreeSearch(tree, function (child) {\n if (child instanceof Column) {\n columns.push(child);\n }\n });\n };\n ColumnModel.prototype.extractViewportColumns = function () {\n if (this.suppressColumnVirtualisation) {\n // no virtualisation, so don't filter\n this.viewportColumnsCenter = this.displayedColumnsCenter;\n this.headerViewportColumnsCenter = this.displayedColumnsCenter;\n } else {\n // filter out what should be visible\n this.viewportColumnsCenter = this.displayedColumnsCenter.filter(this.isColumnInRowViewport.bind(this));\n this.headerViewportColumnsCenter = this.displayedColumnsCenter.filter(this.isColumnInHeaderViewport.bind(this));\n }\n this.viewportColumns = this.viewportColumnsCenter.concat(this.displayedColumnsLeft).concat(this.displayedColumnsRight);\n this.headerViewportColumns = this.headerViewportColumnsCenter.concat(this.displayedColumnsLeft).concat(this.displayedColumnsRight);\n };\n ColumnModel.prototype.getVirtualHeaderGroupRow = function (type, dept) {\n var result;\n switch (type) {\n case Constants.PINNED_LEFT:\n result = this.viewportRowLeft[dept];\n break;\n case Constants.PINNED_RIGHT:\n result = this.viewportRowRight[dept];\n break;\n default:\n result = this.viewportRowCenter[dept];\n break;\n }\n if (missing(result)) {\n result = [];\n }\n return result;\n };\n ColumnModel.prototype.calculateHeaderRows = function () {\n // go through each group, see if any of it's cols are displayed, and if yes,\n // then this group is included\n this.viewportRowLeft = {};\n this.viewportRowRight = {};\n this.viewportRowCenter = {};\n // for easy lookup when building the groups.\n var virtualColIds = {};\n this.headerViewportColumns.forEach(function (col) {\n return virtualColIds[col.getId()] = true;\n });\n var testGroup = function (children, result, dept) {\n var returnValue = false;\n for (var i = 0; i < children.length; i++) {\n // see if this item is within viewport\n var child = children[i];\n var addThisItem = false;\n if (child instanceof Column) {\n // for column, test if column is included\n addThisItem = virtualColIds[child.getId()] === true;\n } else {\n // if group, base decision on children\n var columnGroup = child;\n var displayedChildren = columnGroup.getDisplayedChildren();\n if (displayedChildren) {\n addThisItem = testGroup(displayedChildren, result, dept + 1);\n }\n }\n if (addThisItem) {\n returnValue = true;\n if (!result[dept]) {\n result[dept] = [];\n }\n result[dept].push(child);\n }\n }\n return returnValue;\n };\n testGroup(this.displayedTreeLeft, this.viewportRowLeft, 0);\n testGroup(this.displayedTreeRight, this.viewportRowRight, 0);\n testGroup(this.displayedTreeCentre, this.viewportRowCenter, 0);\n };\n ColumnModel.prototype.extractViewport = function () {\n var hashColumn = function (c) {\n return c.getId() + \"-\" + (c.getPinned() || 'normal');\n };\n this.extractViewportColumns();\n var newHash = this.viewportColumns.map(hashColumn).join('#');\n var changed = this.viewportColumnsHash !== newHash;\n if (changed) {\n this.viewportColumnsHash = newHash;\n this.calculateHeaderRows();\n }\n return changed;\n };\n ColumnModel.prototype.refreshFlexedColumns = function (params) {\n var _this = this;\n if (params === void 0) {\n params = {};\n }\n var source = params.source ? params.source : 'flex';\n if (params.viewportWidth != null) {\n this.flexViewportWidth = params.viewportWidth;\n }\n if (!this.flexViewportWidth) {\n return [];\n }\n // If the grid has left-over space, divide it between flexing columns in proportion to their flex value.\n // A \"flexing column\" is one that has a 'flex' value set and is not currently being constrained by its\n // minWidth or maxWidth rules.\n var flexAfterDisplayIndex = -1;\n if (params.resizingCols) {\n params.resizingCols.forEach(function (col) {\n var indexOfCol = _this.displayedColumnsCenter.indexOf(col);\n if (flexAfterDisplayIndex < indexOfCol) {\n flexAfterDisplayIndex = indexOfCol;\n }\n });\n }\n var isColFlex = function (col) {\n var afterResizingCols = _this.displayedColumnsCenter.indexOf(col) > flexAfterDisplayIndex;\n return col.getFlex() && afterResizingCols;\n };\n var knownWidthColumns = this.displayedColumnsCenter.filter(function (col) {\n return !isColFlex(col);\n });\n var flexingColumns = this.displayedColumnsCenter.filter(function (col) {\n return isColFlex(col);\n });\n var changedColumns = [];\n if (!flexingColumns.length) {\n return [];\n }\n var flexingColumnSizes = [];\n var spaceForFlexingColumns;\n outer: while (true) {\n var totalFlex = flexingColumns.reduce(function (count, col) {\n return count + col.getFlex();\n }, 0);\n spaceForFlexingColumns = this.flexViewportWidth - this.getWidthOfColsInList(knownWidthColumns);\n for (var i = 0; i < flexingColumns.length; i++) {\n var col = flexingColumns[i];\n var widthByFlexRule = spaceForFlexingColumns * col.getFlex() / totalFlex;\n var constrainedWidth = 0;\n var minWidth = col.getMinWidth();\n var maxWidth = col.getMaxWidth();\n if (exists(minWidth) && widthByFlexRule < minWidth) {\n constrainedWidth = minWidth;\n } else if (exists(maxWidth) && widthByFlexRule > maxWidth) {\n constrainedWidth = maxWidth;\n }\n if (constrainedWidth) {\n // This column is not in fact flexing as it is being constrained to a specific size\n // so remove it from the list of flexing columns and start again\n col.setActualWidth(constrainedWidth, source);\n removeFromArray(flexingColumns, col);\n changedColumns.push(col);\n knownWidthColumns.push(col);\n continue outer;\n }\n flexingColumnSizes[i] = Math.round(widthByFlexRule);\n }\n break;\n }\n var remainingSpace = spaceForFlexingColumns;\n flexingColumns.forEach(function (col, i) {\n col.setActualWidth(Math.min(flexingColumnSizes[i], remainingSpace), source);\n changedColumns.push(col);\n remainingSpace -= flexingColumnSizes[i];\n });\n if (!params.skipSetLeft) {\n this.setLeftValues(source);\n }\n if (params.updateBodyWidths) {\n this.updateBodyWidths();\n }\n if (params.fireResizedEvent) {\n this.fireColumnResizedEvent(changedColumns, true, source, flexingColumns);\n }\n // if the user sets rowData directly into GridOptions, then the row data is set before\n // grid is attached to the DOM. this means the columns are not flexed, and then the rows\n // have the wrong height (as they depend on column widths). so once the columns have\n // been flexed for the first time (only happens once grid is attached to DOM, as dependency\n // on getting the grid width, which only happens after attached after ResizeObserver fires)\n // we get get rows to re-calc their heights.\n if (!this.flexColsCalculatedAtLestOnce) {\n if (this.gridOptionsWrapper.isRowModelDefault()) {\n this.rowModel.resetRowHeights();\n }\n this.flexColsCalculatedAtLestOnce = true;\n }\n return flexingColumns;\n };\n // called from api\n ColumnModel.prototype.sizeColumnsToFit = function (gridWidth, source, silent, params) {\n if (source === void 0) {\n source = \"sizeColumnsToFit\";\n }\n var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;\n var limitsMap = {};\n if (params) {\n (_b = (_a = params) === null || _a === void 0 ? void 0 : _a.columnLimits) === null || _b === void 0 ? void 0 : _b.forEach(function (_a) {\n var key = _a.key,\n dimensions = __rest(_a, [\"key\"]);\n limitsMap[typeof key === 'string' ? key : key.getColId()] = dimensions;\n });\n }\n // avoid divide by zero\n var allDisplayedColumns = this.getAllDisplayedColumns();\n var doColumnsAlreadyFit = gridWidth === this.getWidthOfColsInList(allDisplayedColumns);\n if (gridWidth <= 0 || !allDisplayedColumns.length || doColumnsAlreadyFit) {\n return;\n }\n var colsToSpread = [];\n var colsToNotSpread = [];\n allDisplayedColumns.forEach(function (column) {\n if (column.getColDef().suppressSizeToFit === true) {\n colsToNotSpread.push(column);\n } else {\n colsToSpread.push(column);\n }\n });\n // make a copy of the cols that are going to be resized\n var colsToFireEventFor = colsToSpread.slice(0);\n var finishedResizing = false;\n var moveToNotSpread = function (column) {\n removeFromArray(colsToSpread, column);\n colsToNotSpread.push(column);\n };\n // resetting cols to their original width makes the sizeColumnsToFit more deterministic,\n // rather than depending on the current size of the columns. most users call sizeColumnsToFit\n // immediately after grid is created, so will make no difference. however if application is calling\n // sizeColumnsToFit repeatedly (eg after column group is opened / closed repeatedly) we don't want\n // the columns to start shrinking / growing over time.\n //\n // NOTE: the process below will assign values to `this.actualWidth` of each column without firing events\n // for this reason we need to manually fire resize events after the resize has been done for each column.\n colsToSpread.forEach(function (column) {\n return column.resetActualWidth(source);\n });\n while (!finishedResizing) {\n finishedResizing = true;\n var availablePixels = gridWidth - this.getWidthOfColsInList(colsToNotSpread);\n if (availablePixels <= 0) {\n // no width, set everything to minimum\n colsToSpread.forEach(function (column) {\n var _a, _b, _c, _d;\n var widthOverride = (_c = (_b = (_a = limitsMap) === null || _a === void 0 ? void 0 : _a[column.getId()]) === null || _b === void 0 ? void 0 : _b.minWidth, _c !== null && _c !== void 0 ? _c : (_d = params) === null || _d === void 0 ? void 0 : _d.defaultMinWidth);\n if (typeof widthOverride === 'number') {\n column.setActualWidth(widthOverride);\n return;\n }\n column.setMinimum(source);\n });\n } else {\n var scale = availablePixels / this.getWidthOfColsInList(colsToSpread);\n // we set the pixels for the last col based on what's left, as otherwise\n // we could be a pixel or two short or extra because of rounding errors.\n var pixelsForLastCol = availablePixels;\n // backwards through loop, as we are removing items as we go\n for (var i = colsToSpread.length - 1; i >= 0; i--) {\n var column = colsToSpread[i];\n var widthOverride = (_c = limitsMap) === null || _c === void 0 ? void 0 : _c[column.getId()];\n var minOverride = (_e = (_d = widthOverride) === null || _d === void 0 ? void 0 : _d.minWidth, _e !== null && _e !== void 0 ? _e : (_f = params) === null || _f === void 0 ? void 0 : _f.defaultMinWidth);\n var maxOverride = (_h = (_g = widthOverride) === null || _g === void 0 ? void 0 : _g.maxWidth, _h !== null && _h !== void 0 ? _h : (_j = params) === null || _j === void 0 ? void 0 : _j.defaultMaxWidth);\n var colMinWidth = (_k = column.getMinWidth(), _k !== null && _k !== void 0 ? _k : 0);\n var colMaxWidth = (_l = column.getMaxWidth(), _l !== null && _l !== void 0 ? _l : Number.MAX_VALUE);\n var minWidth = typeof minOverride === 'number' && minOverride > colMinWidth ? minOverride : column.getMinWidth();\n var maxWidth = typeof maxOverride === 'number' && maxOverride < colMaxWidth ? maxOverride : column.getMaxWidth();\n var newWidth = Math.round(column.getActualWidth() * scale);\n if (exists(minWidth) && newWidth < minWidth) {\n newWidth = minWidth;\n moveToNotSpread(column);\n finishedResizing = false;\n } else if (exists(maxWidth) && newWidth > maxWidth) {\n newWidth = maxWidth;\n moveToNotSpread(column);\n finishedResizing = false;\n } else if (i === 0) {\n // if this is the last column\n newWidth = pixelsForLastCol;\n }\n column.setActualWidth(newWidth, source, true);\n pixelsForLastCol -= newWidth;\n }\n }\n }\n // see notes above\n colsToFireEventFor.forEach(function (col) {\n col.fireColumnWidthChangedEvent(source);\n });\n this.setLeftValues(source);\n this.updateBodyWidths();\n if (silent) {\n return;\n }\n this.fireColumnResizedEvent(colsToFireEventFor, true, source);\n };\n ColumnModel.prototype.buildDisplayedTrees = function (visibleColumns) {\n var leftVisibleColumns = [];\n var rightVisibleColumns = [];\n var centerVisibleColumns = [];\n visibleColumns.forEach(function (column) {\n switch (column.getPinned()) {\n case \"left\":\n leftVisibleColumns.push(column);\n break;\n case \"right\":\n rightVisibleColumns.push(column);\n break;\n default:\n centerVisibleColumns.push(column);\n break;\n }\n });\n var groupInstanceIdCreator = new GroupInstanceIdCreator();\n this.displayedTreeLeft = this.displayedGroupCreator.createDisplayedGroups(leftVisibleColumns, this.gridBalancedTree, groupInstanceIdCreator, Constants.PINNED_LEFT, this.displayedTreeLeft);\n this.displayedTreeRight = this.displayedGroupCreator.createDisplayedGroups(rightVisibleColumns, this.gridBalancedTree, groupInstanceIdCreator, Constants.PINNED_RIGHT, this.displayedTreeRight);\n this.displayedTreeCentre = this.displayedGroupCreator.createDisplayedGroups(centerVisibleColumns, this.gridBalancedTree, groupInstanceIdCreator, null, this.displayedTreeCentre);\n this.updateDisplayedMap();\n };\n ColumnModel.prototype.updateDisplayedMap = function () {\n var _this = this;\n this.displayedColumnsAndGroupsMap = {};\n var func = function (child) {\n _this.displayedColumnsAndGroupsMap[child.getUniqueId()] = child;\n };\n this.columnUtils.depthFirstAllColumnTreeSearch(this.displayedTreeCentre, func);\n this.columnUtils.depthFirstAllColumnTreeSearch(this.displayedTreeLeft, func);\n this.columnUtils.depthFirstAllColumnTreeSearch(this.displayedTreeRight, func);\n };\n ColumnModel.prototype.isDisplayed = function (item) {\n var fromMap = this.displayedColumnsAndGroupsMap[item.getUniqueId()];\n // check for reference, in case new column / group with same id is now present\n return fromMap === item;\n };\n ColumnModel.prototype.updateOpenClosedVisibilityInColumnGroups = function () {\n var allColumnGroups = this.getAllDisplayedTrees();\n this.columnUtils.depthFirstAllColumnTreeSearch(allColumnGroups, function (child) {\n if (child instanceof ColumnGroup) {\n var columnGroup = child;\n columnGroup.calculateDisplayedColumns();\n }\n });\n };\n ColumnModel.prototype.getGroupAutoColumns = function () {\n return this.groupAutoColumns;\n };\n /**\n * Creates new auto group columns if required\n * @returns whether auto cols have changed\n */\n ColumnModel.prototype.createGroupAutoColumnsIfNeeded = function () {\n if (!this.autoGroupsNeedBuilding) {\n return false;\n }\n this.autoGroupsNeedBuilding = false;\n var groupFullWidthRow = this.gridOptionsWrapper.isGroupUseEntireRow(this.pivotMode);\n // we need to allow suppressing auto-column separately for group and pivot as the normal situation\n // is CSRM and user provides group column themselves for normal view, but when they go into pivot the\n // columns are generated by the grid so no opportunity for user to provide group column. so need a way\n // to suppress auto-col for grouping only, and not pivot.\n // however if using Viewport RM or SSRM and user is providing the columns, the user may wish full control\n // of the group column in this instance.\n var suppressAutoColumn = this.pivotMode ? this.gridOptionsWrapper.isPivotSuppressAutoColumn() : this.gridOptionsWrapper.isGroupSuppressAutoColumn();\n var groupingActive = this.rowGroupColumns.length > 0 || this.usingTreeData;\n var needAutoColumns = groupingActive && !suppressAutoColumn && !groupFullWidthRow;\n if (needAutoColumns) {\n var existingCols = this.groupAutoColumns || [];\n var newAutoGroupCols = this.autoGroupColService.createAutoGroupColumns(existingCols, this.rowGroupColumns);\n var autoColsDifferent = !this.autoColsEqual(newAutoGroupCols, this.groupAutoColumns);\n // we force recreate when suppressColumnStateEvents changes, so new group cols pick up the new\n // definitions. otherwise we could ignore the new cols because they appear to be the same.\n if (autoColsDifferent || this.forceRecreateAutoGroups) {\n this.groupAutoColumns = newAutoGroupCols;\n return true;\n }\n } else {\n this.groupAutoColumns = null;\n }\n return false;\n };\n ColumnModel.prototype.autoColsEqual = function (colsA, colsB) {\n return areEqual(colsA, colsB, function (a, b) {\n return a.getColId() === b.getColId();\n });\n };\n ColumnModel.prototype.getWidthOfColsInList = function (columnList) {\n return columnList.reduce(function (width, col) {\n return width + col.getActualWidth();\n }, 0);\n };\n ColumnModel.prototype.getGridBalancedTree = function () {\n return this.gridBalancedTree;\n };\n ColumnModel.prototype.hasFloatingFilters = function () {\n if (!this.gridColumns) {\n return false;\n }\n var res = this.gridColumns.some(function (col) {\n return col.getColDef().floatingFilter;\n });\n return res;\n };\n ColumnModel.prototype.getFirstDisplayedColumn = function () {\n var isRtl = this.gridOptionsWrapper.isEnableRtl();\n var queryOrder = ['getDisplayedLeftColumns', 'getDisplayedCenterColumns', 'getDisplayedRightColumns'];\n if (isRtl) {\n queryOrder.reverse();\n }\n for (var i = 0; i < queryOrder.length; i++) {\n var container = this[queryOrder[i]]();\n if (container.length) {\n return isRtl ? last(container) : container[0];\n }\n }\n return null;\n };\n ColumnModel.prototype.setColumnHeaderHeight = function (col, height) {\n var changed = col.setAutoHeaderHeight(height);\n if (changed) {\n var event_5 = {\n type: Events.EVENT_COLUMN_HEADER_HEIGHT_CHANGED,\n column: col,\n columns: [col],\n source: 'autosizeColumnHeaderHeight'\n };\n this.eventService.dispatchEvent(event_5);\n }\n };\n ColumnModel.prototype.getColumnGroupHeaderRowHeight = function () {\n if (this.isPivotMode()) {\n return this.gridOptionsWrapper.getPivotGroupHeaderHeight();\n } else {\n return this.gridOptionsWrapper.getGroupHeaderHeight();\n }\n };\n ColumnModel.prototype.getColumnHeaderRowHeight = function () {\n var defaultHeight = this.isPivotMode() ? this.gridOptionsWrapper.getPivotHeaderHeight() : this.gridOptionsWrapper.getHeaderHeight();\n var displayedHeights = this.getAllDisplayedColumns().filter(function (col) {\n return col.isAutoHeaderHeight();\n }).map(function (col) {\n return col.getAutoHeaderHeight() || 0;\n });\n return Math.max.apply(Math, __spread$f([defaultHeight], displayedHeights));\n };\n __decorate$2u([Autowired('expressionService')], ColumnModel.prototype, \"expressionService\", void 0);\n __decorate$2u([Autowired('columnFactory')], ColumnModel.prototype, \"columnFactory\", void 0);\n __decorate$2u([Autowired('displayedGroupCreator')], ColumnModel.prototype, \"displayedGroupCreator\", void 0);\n __decorate$2u([Autowired('ctrlsService')], ColumnModel.prototype, \"ctrlsService\", void 0);\n __decorate$2u([Autowired('autoWidthCalculator')], ColumnModel.prototype, \"autoWidthCalculator\", void 0);\n __decorate$2u([Autowired('columnUtils')], ColumnModel.prototype, \"columnUtils\", void 0);\n __decorate$2u([Autowired('columnAnimationService')], ColumnModel.prototype, \"columnAnimationService\", void 0);\n __decorate$2u([Autowired('autoGroupColService')], ColumnModel.prototype, \"autoGroupColService\", void 0);\n __decorate$2u([Optional('aggFuncService')], ColumnModel.prototype, \"aggFuncService\", void 0);\n __decorate$2u([Optional('valueCache')], ColumnModel.prototype, \"valueCache\", void 0);\n __decorate$2u([Optional('animationFrameService')], ColumnModel.prototype, \"animationFrameService\", void 0);\n __decorate$2u([Autowired('rowModel')], ColumnModel.prototype, \"rowModel\", void 0);\n __decorate$2u([Autowired('sortController')], ColumnModel.prototype, \"sortController\", void 0);\n __decorate$2u([Autowired('columnDefFactory')], ColumnModel.prototype, \"columnDefFactory\", void 0);\n __decorate$2u([PostConstruct], ColumnModel.prototype, \"init\", null);\n __decorate$2u([__param$7(0, Qualifier('loggerFactory'))], ColumnModel.prototype, \"setBeans\", null);\n ColumnModel = __decorate$2u([Bean('columnModel')], ColumnModel);\n return ColumnModel;\n}(BeanStub);\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue\n * @version v28.2.1\n * @link https://www.ag-grid.com/\n * @license MIT\n */\nvar __extends$2S = undefined && undefined.__extends || function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf || {\n __proto__: []\n } instanceof Array && function (d, b) {\n d.__proto__ = b;\n } || function (d, b) {\n for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];\n };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() {\n this.constructor = d;\n }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n}();\nvar __decorate$2t = undefined && undefined.__decorate || function (decorators, target, key, desc) {\n var c = arguments.length,\n r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc,\n d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\n// takes in a list of columns, as specified by the column definitions, and returns column groups\nvar ColumnUtils = /** @class */function (_super) {\n __extends$2S(ColumnUtils, _super);\n function ColumnUtils() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n ColumnUtils.prototype.calculateColMinWidth = function (colDef) {\n return colDef.minWidth != null ? colDef.minWidth : this.gridOptionsWrapper.getMinColWidth();\n };\n ColumnUtils.prototype.calculateColMaxWidth = function (colDef) {\n return colDef.maxWidth != null ? colDef.maxWidth : this.gridOptionsWrapper.getMaxColWidth() || Number.MAX_SAFE_INTEGER;\n };\n ColumnUtils.prototype.calculateColInitialWidth = function (colDef) {\n var minColWidth = this.calculateColMinWidth(colDef);\n var maxColWidth = this.calculateColMaxWidth(colDef);\n var width;\n var colDefWidth = attrToNumber(colDef.width);\n var colDefInitialWidth = attrToNumber(colDef.initialWidth);\n if (colDefWidth != null) {\n width = colDefWidth;\n } else if (colDefInitialWidth != null) {\n width = colDefInitialWidth;\n } else {\n width = this.gridOptionsWrapper.getColWidth();\n }\n return Math.max(Math.min(width, maxColWidth), minColWidth);\n };\n ColumnUtils.prototype.getOriginalPathForColumn = function (column, originalBalancedTree) {\n var result = [];\n var found = false;\n var recursePath = function (balancedColumnTree, dept) {\n for (var i = 0; i < balancedColumnTree.length; i++) {\n if (found) {\n return;\n }\n // quit the search, so 'result' is kept with the found result\n var node = balancedColumnTree[i];\n if (node instanceof ProvidedColumnGroup) {\n var nextNode = node;\n recursePath(nextNode.getChildren(), dept + 1);\n result[dept] = node;\n } else if (node === column) {\n found = true;\n }\n }\n };\n recursePath(originalBalancedTree, 0);\n // we should always find the path, but in case there is a bug somewhere, returning null\n // will make it fail rather than provide a 'hard to track down' bug\n return found ? result : null;\n };\n ColumnUtils.prototype.depthFirstOriginalTreeSearch = function (parent, tree, callback) {\n var _this = this;\n if (!tree) {\n return;\n }\n tree.forEach(function (child) {\n if (child instanceof ProvidedColumnGroup) {\n _this.depthFirstOriginalTreeSearch(child, child.getChildren(), callback);\n }\n callback(child, parent);\n });\n };\n ColumnUtils.prototype.depthFirstAllColumnTreeSearch = function (tree, callback) {\n var _this = this;\n if (!tree) {\n return;\n }\n tree.forEach(function (child) {\n if (child instanceof ColumnGroup) {\n _this.depthFirstAllColumnTreeSearch(child.getChildren(), callback);\n }\n callback(child);\n });\n };\n ColumnUtils.prototype.depthFirstDisplayedColumnTreeSearch = function (tree, callback) {\n var _this = this;\n if (!tree) {\n return;\n }\n tree.forEach(function (child) {\n if (child instanceof ColumnGroup) {\n _this.depthFirstDisplayedColumnTreeSearch(child.getDisplayedChildren(), callback);\n }\n callback(child);\n });\n };\n ColumnUtils = __decorate$2t([Bean('columnUtils')], ColumnUtils);\n return ColumnUtils;\n}(BeanStub);\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue\n * @version v28.2.1\n * @link https://www.ag-grid.com/\n * @license MIT\n */\nvar __extends$2R = undefined && undefined.__extends || function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf || {\n __proto__: []\n } instanceof Array && function (d, b) {\n d.__proto__ = b;\n } || function (d, b) {\n for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];\n };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() {\n this.constructor = d;\n }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n}();\nvar __decorate$2s = undefined && undefined.__decorate || function (decorators, target, key, desc) {\n var c = arguments.length,\n r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc,\n d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\n// takes in a list of columns, as specified by the column definitions, and returns column groups\nvar DisplayedGroupCreator = /** @class */function (_super) {\n __extends$2R(DisplayedGroupCreator, _super);\n function DisplayedGroupCreator() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n DisplayedGroupCreator.prototype.createDisplayedGroups = function (\n // all displayed columns sorted - this is the columns the grid should show\n sortedVisibleColumns,\n // the tree of columns, as provided by the users, used to know what groups columns roll up into\n balancedColumnTree,\n // creates unique id's for the group\n groupInstanceIdCreator,\n // whether it's left, right or center col\n pinned,\n // we try to reuse old groups if we can, to allow gui to do animation\n oldDisplayedGroups) {\n var _this = this;\n var result = [];\n var previousRealPath;\n var previousOriginalPath;\n var oldColumnsMapped = this.mapOldGroupsById(oldDisplayedGroups);\n // go through each column, then do a bottom up comparison to the previous column, and start\n // to share groups if they converge at any point.\n sortedVisibleColumns.forEach(function (currentColumn) {\n var currentOriginalPath = _this.getOriginalPathForColumn(balancedColumnTree, currentColumn);\n var currentRealPath = [];\n var firstColumn = !previousOriginalPath;\n for (var i = 0; i < currentOriginalPath.length; i++) {\n if (firstColumn || currentOriginalPath[i] !== previousOriginalPath[i]) {\n // new group needed\n var newGroup = _this.createColumnGroup(currentOriginalPath[i], groupInstanceIdCreator, oldColumnsMapped, pinned);\n currentRealPath[i] = newGroup;\n // if top level, add to result, otherwise add to parent\n if (i == 0) {\n result.push(newGroup);\n } else {\n currentRealPath[i - 1].addChild(newGroup);\n }\n } else {\n // reuse old group\n currentRealPath[i] = previousRealPath[i];\n }\n }\n var noColumnGroups = currentRealPath.length === 0;\n if (noColumnGroups) {\n // if we are not grouping, then the result of the above is an empty\n // path (no groups), and we just add the column to the root list.\n result.push(currentColumn);\n } else {\n var leafGroup = last(currentRealPath);\n leafGroup.addChild(currentColumn);\n }\n previousRealPath = currentRealPath;\n previousOriginalPath = currentOriginalPath;\n });\n this.setupParentsIntoColumns(result, null);\n return result;\n };\n DisplayedGroupCreator.prototype.createColumnGroup = function (providedGroup, groupInstanceIdCreator, oldColumnsMapped, pinned) {\n var groupId = providedGroup.getGroupId();\n var instanceId = groupInstanceIdCreator.getInstanceIdForKey(groupId);\n var uniqueId = ColumnGroup.createUniqueId(groupId, instanceId);\n var columnGroup = oldColumnsMapped[uniqueId];\n // if the user is setting new colDefs, it is possible that the id's overlap, and we\n // would have a false match from above. so we double check we are talking about the\n // same original column group.\n if (columnGroup && columnGroup.getProvidedColumnGroup() !== providedGroup) {\n columnGroup = null;\n }\n if (exists(columnGroup)) {\n // clean out the old column group here, as we will be adding children into it again\n columnGroup.reset();\n } else {\n columnGroup = new ColumnGroup(providedGroup, groupId, instanceId, pinned);\n this.context.createBean(columnGroup);\n }\n return columnGroup;\n };\n // returns back a 2d map of ColumnGroup as follows: groupId -> instanceId -> ColumnGroup\n DisplayedGroupCreator.prototype.mapOldGroupsById = function (displayedGroups) {\n var result = {};\n var recursive = function (columnsOrGroups) {\n columnsOrGroups.forEach(function (columnOrGroup) {\n if (columnOrGroup instanceof ColumnGroup) {\n var columnGroup = columnOrGroup;\n result[columnOrGroup.getUniqueId()] = columnGroup;\n recursive(columnGroup.getChildren());\n }\n });\n };\n if (displayedGroups) {\n recursive(displayedGroups);\n }\n return result;\n };\n DisplayedGroupCreator.prototype.setupParentsIntoColumns = function (columnsOrGroups, parent) {\n var _this = this;\n columnsOrGroups.forEach(function (columnsOrGroup) {\n columnsOrGroup.setParent(parent);\n if (columnsOrGroup instanceof ColumnGroup) {\n var columnGroup = columnsOrGroup;\n _this.setupParentsIntoColumns(columnGroup.getChildren(), columnGroup);\n }\n });\n };\n DisplayedGroupCreator.prototype.getOriginalPathForColumn = function (balancedColumnTree, column) {\n var result = [];\n var found = false;\n var recursePath = function (columnTree, dept) {\n for (var i = 0; i < columnTree.length; i++) {\n // quit the search, so 'result' is kept with the found result\n if (found) {\n return;\n }\n var node = columnTree[i];\n if (node instanceof ProvidedColumnGroup) {\n recursePath(node.getChildren(), dept + 1);\n result[dept] = node;\n } else if (node === column) {\n found = true;\n }\n }\n };\n recursePath(balancedColumnTree, 0);\n // it's possible we didn't find a path. this happens if the column is generated\n // by the grid (auto-group), in that the definition didn't come from the client. in this case,\n // we create a fake original path.\n if (found) {\n return result;\n }\n console.warn('AG Grid: could not get path');\n return null;\n };\n DisplayedGroupCreator = __decorate$2s([Bean('displayedGroupCreator')], DisplayedGroupCreator);\n return DisplayedGroupCreator;\n}(BeanStub);\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue\n * @version v28.2.1\n * @link https://www.ag-grid.com/\n * @license MIT\n */\nvar __extends$2Q = undefined && undefined.__extends || function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf || {\n __proto__: []\n } instanceof Array && function (d, b) {\n d.__proto__ = b;\n } || function (d, b) {\n for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];\n };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() {\n this.constructor = d;\n }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n}();\nvar __decorate$2r = undefined && undefined.__decorate || function (decorators, target, key, desc) {\n var c = arguments.length,\n r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc,\n d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nvar AgStackComponentsRegistry = /** @class */function (_super) {\n __extends$2Q(AgStackComponentsRegistry, _super);\n function AgStackComponentsRegistry() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.componentsMappedByName = {};\n return _this;\n }\n AgStackComponentsRegistry.prototype.setupComponents = function (components) {\n var _this = this;\n if (components) {\n components.forEach(function (componentMeta) {\n return _this.addComponent(componentMeta);\n });\n }\n };\n AgStackComponentsRegistry.prototype.addComponent = function (componentMeta) {\n // get name of the class as a string\n // let className = getNameOfClass(ComponentClass);\n // insert a dash after every capital letter\n // let classEscaped = className.replace(/([A-Z])/g, \"-$1\").toLowerCase();\n var classEscaped = componentMeta.componentName.replace(/([a-z])([A-Z])/g, \"$1-$2\").toLowerCase();\n // put all to upper case\n var classUpperCase = classEscaped.toUpperCase();\n // finally store\n this.componentsMappedByName[classUpperCase] = componentMeta.componentClass;\n };\n AgStackComponentsRegistry.prototype.getComponentClass = function (htmlTag) {\n return this.componentsMappedByName[htmlTag];\n };\n AgStackComponentsRegistry = __decorate$2r([Bean('agStackComponentsRegistry')], AgStackComponentsRegistry);\n return AgStackComponentsRegistry;\n}(BeanStub);\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue\n * @version v28.2.1\n * @link https://www.ag-grid.com/\n * @license MIT\n */\nvar __read$k = undefined && undefined.__read || function (o, n) {\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\n if (!m) return o;\n var i = m.call(o),\n r,\n ar = [],\n e;\n try {\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\n } catch (error) {\n e = {\n error: error\n };\n } finally {\n try {\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\n } finally {\n if (e) throw e.error;\n }\n }\n return ar;\n};\nvar Color = /** @class */function () {\n /**\n * Every color component should be in the [0, 1] range.\n * Some easing functions (such as elastic easing) can overshoot the target value by some amount.\n * So, when animating colors, if the source or target color components are already near\n * or at the edge of the allowed [0, 1] range, it is possible for the intermediate color\n * component value to end up outside of that range mid-animation. For this reason the constructor\n * performs range checking/constraining.\n * @param r Red component.\n * @param g Green component.\n * @param b Blue component.\n * @param a Alpha (opacity) component.\n */\n function Color(r, g, b, a) {\n if (a === void 0) {\n a = 1;\n }\n // NaN is treated as 0.\n this.r = Math.min(1, Math.max(0, r || 0));\n this.g = Math.min(1, Math.max(0, g || 0));\n this.b = Math.min(1, Math.max(0, b || 0));\n this.a = Math.min(1, Math.max(0, a || 0));\n }\n /**\n * The given string can be in one of the following formats:\n * - #rgb\n * - #rrggbb\n * - rgb(r, g, b)\n * - rgba(r, g, b, a)\n * - CSS color name such as 'white', 'orange', 'cyan', etc.\n * @param str\n */\n Color.fromString = function (str) {\n // hexadecimal notation\n if (str.indexOf('#') >= 0) {\n // there can be some leading whitespace\n return Color.fromHexString(str);\n }\n // color name\n var hex = Color.nameToHex[str];\n if (hex) {\n return Color.fromHexString(hex);\n }\n // rgb(a) notation\n if (str.indexOf('rgb') >= 0) {\n return Color.fromRgbaString(str);\n }\n throw new Error(\"Invalid color string: '\" + str + \"'\");\n };\n // See https://drafts.csswg.org/css-color/#hex-notation\n Color.parseHex = function (input) {\n input = input.replace(/ /g, '').slice(1);\n var parts;\n switch (input.length) {\n case 6:\n case 8:\n parts = [];\n for (var i = 0; i < input.length; i += 2) {\n parts.push(parseInt(\"\" + input[i] + input[i + 1], 16));\n }\n break;\n case 3:\n case 4:\n parts = input.split('').map(function (p) {\n return parseInt(p, 16);\n }).map(function (p) {\n return p + p * 16;\n });\n break;\n }\n if (parts.length >= 3) {\n if (parts.every(function (p) {\n return p >= 0;\n })) {\n if (parts.length === 3) {\n parts.push(255);\n }\n return parts;\n }\n }\n };\n Color.fromHexString = function (str) {\n var values = Color.parseHex(str);\n if (values) {\n var _a = __read$k(values, 4),\n r = _a[0],\n g = _a[1],\n b = _a[2],\n a = _a[3];\n return new Color(r / 255, g / 255, b / 255, a / 255);\n }\n throw new Error(\"Malformed hexadecimal color string: '\" + str + \"'\");\n };\n Color.stringToRgba = function (str) {\n // Find positions of opening and closing parentheses.\n var _a = __read$k([NaN, NaN], 2),\n po = _a[0],\n pc = _a[1];\n for (var i = 0; i < str.length; i++) {\n var c = str[i];\n if (!po && c === '(') {\n po = i;\n } else if (c === ')') {\n pc = i;\n break;\n }\n }\n var contents = po && pc && str.substring(po + 1, pc);\n if (!contents) {\n return;\n }\n var parts = contents.split(',');\n var rgba = [];\n for (var i = 0; i < parts.length; i++) {\n var part = parts[i];\n var value = parseFloat(part);\n if (isNaN(value)) {\n return;\n }\n if (part.indexOf('%') >= 0) {\n // percentage r, g, or b value\n value = Math.max(0, Math.min(100, value));\n value /= 100;\n } else {\n if (i === 3) {\n // alpha component\n value = Math.max(0, Math.min(1, value));\n } else {\n // absolute r, g, or b value\n value = Math.max(0, Math.min(255, value));\n value /= 255;\n }\n }\n rgba.push(value);\n }\n return rgba;\n };\n Color.fromRgbaString = function (str) {\n var rgba = Color.stringToRgba(str);\n if (rgba) {\n if (rgba.length === 3) {\n return new Color(rgba[0], rgba[1], rgba[2]);\n } else if (rgba.length === 4) {\n return new Color(rgba[0], rgba[1], rgba[2], rgba[3]);\n }\n }\n throw new Error(\"Malformed rgb/rgba color string: '\" + str + \"'\");\n };\n Color.fromArray = function (arr) {\n if (arr.length === 4) {\n return new Color(arr[0], arr[1], arr[2], arr[3]);\n }\n if (arr.length === 3) {\n return new Color(arr[0], arr[1], arr[2]);\n }\n throw new Error('The given array should contain 3 or 4 color components (numbers).');\n };\n Color.fromHSB = function (h, s, b, alpha) {\n if (alpha === void 0) {\n alpha = 1;\n }\n var rgb = Color.HSBtoRGB(h, s, b);\n return new Color(rgb[0], rgb[1], rgb[2], alpha);\n };\n Color.padHex = function (str) {\n // Can't use `padStart(2, '0')` here because of IE.\n return str.length === 1 ? '0' + str : str;\n };\n Color.prototype.toHexString = function () {\n var hex = '#' + Color.padHex(Math.round(this.r * 255).toString(16)) + Color.padHex(Math.round(this.g * 255).toString(16)) + Color.padHex(Math.round(this.b * 255).toString(16));\n if (this.a < 1) {\n hex += Color.padHex(Math.round(this.a * 255).toString(16));\n }\n return hex;\n };\n Color.prototype.toRgbaString = function (fractionDigits) {\n if (fractionDigits === void 0) {\n fractionDigits = 3;\n }\n var components = [Math.round(this.r * 255), Math.round(this.g * 255), Math.round(this.b * 255)];\n var k = Math.pow(10, fractionDigits);\n if (this.a !== 1) {\n components.push(Math.round(this.a * k) / k);\n return \"rgba(\" + components.join(', ') + \")\";\n }\n return \"rgb(\" + components.join(', ') + \")\";\n };\n Color.prototype.toString = function () {\n if (this.a === 1) {\n return this.toHexString();\n }\n return this.toRgbaString();\n };\n Color.prototype.toHSB = function () {\n return Color.RGBtoHSB(this.r, this.g, this.b);\n };\n /**\n * Converts the given RGB triple to an array of HSB (HSV) components.\n * The hue component will be `NaN` for achromatic colors.\n */\n Color.RGBtoHSB = function (r, g, b) {\n var min = Math.min(r, g, b);\n var max = Math.max(r, g, b);\n var S = max !== 0 ? (max - min) / max : 0;\n var H = NaN;\n // min == max, means all components are the same\n // and the color is a shade of gray with no hue (H is NaN)\n if (min !== max) {\n var delta = max - min;\n var rc = (max - r) / delta;\n var gc = (max - g) / delta;\n var bc = (max - b) / delta;\n if (r === max) {\n H = bc - gc;\n } else if (g === max) {\n H = 2.0 + rc - bc;\n } else {\n H = 4.0 + gc - rc;\n }\n H /= 6.0;\n if (H < 0) {\n H = H + 1.0;\n }\n }\n return [H * 360, S, max];\n };\n /**\n * Converts the given HSB (HSV) triple to an array of RGB components.\n */\n Color.HSBtoRGB = function (H, S, B) {\n if (isNaN(H)) {\n H = 0;\n }\n H = (H % 360 + 360) % 360 / 360; // normalize hue to [0, 360] interval, then scale to [0, 1]\n var r = 0;\n var g = 0;\n var b = 0;\n if (S === 0) {\n r = g = b = B;\n } else {\n var h = (H - Math.floor(H)) * 6;\n var f = h - Math.floor(h);\n var p = B * (1 - S);\n var q = B * (1 - S * f);\n var t = B * (1 - S * (1 - f));\n switch (h >> 0) {\n // discard the floating point part of the number\n case 0:\n r = B;\n g = t;\n b = p;\n break;\n case 1:\n r = q;\n g = B;\n b = p;\n break;\n case 2:\n r = p;\n g = B;\n b = t;\n break;\n case 3:\n r = p;\n g = q;\n b = B;\n break;\n case 4:\n r = t;\n g = p;\n b = B;\n break;\n case 5:\n r = B;\n g = p;\n b = q;\n break;\n }\n }\n return [r, g, b];\n };\n Color.prototype.derive = function (hueShift, saturationFactor, brightnessFactor, opacityFactor) {\n var hsb = Color.RGBtoHSB(this.r, this.g, this.b);\n var b = hsb[2];\n if (b == 0 && brightnessFactor > 1.0) {\n b = 0.05;\n }\n var h = ((hsb[0] + hueShift) % 360 + 360) % 360;\n var s = Math.max(Math.min(hsb[1] * saturationFactor, 1.0), 0.0);\n b = Math.max(Math.min(b * brightnessFactor, 1.0), 0.0);\n var a = Math.max(Math.min(this.a * opacityFactor, 1.0), 0.0);\n var rgba = Color.HSBtoRGB(h, s, b);\n rgba.push(a);\n return Color.fromArray(rgba);\n };\n Color.prototype.brighter = function () {\n return this.derive(0, 1.0, 1.0 / 0.7, 1.0);\n };\n Color.prototype.darker = function () {\n return this.derive(0, 1.0, 0.7, 1.0);\n };\n /**\n * CSS Color Module Level 4:\n * https://drafts.csswg.org/css-color/#named-colors\n */\n Color.nameToHex = Object.freeze({\n aliceblue: '#F0F8FF',\n antiquewhite: '#FAEBD7',\n aqua: '#00FFFF',\n aquamarine: '#7FFFD4',\n azure: '#F0FFFF',\n beige: '#F5F5DC',\n bisque: '#FFE4C4',\n black: '#000000',\n blanchedalmond: '#FFEBCD',\n blue: '#0000FF',\n blueviolet: '#8A2BE2',\n brown: '#A52A2A',\n burlywood: '#DEB887',\n cadetblue: '#5F9EA0',\n chartreuse: '#7FFF00',\n chocolate: '#D2691E',\n coral: '#FF7F50',\n cornflowerblue: '#6495ED',\n cornsilk: '#FFF8DC',\n crimson: '#DC143C',\n cyan: '#00FFFF',\n darkblue: '#00008B',\n darkcyan: '#008B8B',\n darkgoldenrod: '#B8860B',\n darkgray: '#A9A9A9',\n darkgreen: '#006400',\n darkgrey: '#A9A9A9',\n darkkhaki: '#BDB76B',\n darkmagenta: '#8B008B',\n darkolivegreen: '#556B2F',\n darkorange: '#FF8C00',\n darkorchid: '#9932CC',\n darkred: '#8B0000',\n darksalmon: '#E9967A',\n darkseagreen: '#8FBC8F',\n darkslateblue: '#483D8B',\n darkslategray: '#2F4F4F',\n darkslategrey: '#2F4F4F',\n darkturquoise: '#00CED1',\n darkviolet: '#9400D3',\n deeppink: '#FF1493',\n deepskyblue: '#00BFFF',\n dimgray: '#696969',\n dimgrey: '#696969',\n dodgerblue: '#1E90FF',\n firebrick: '#B22222',\n floralwhite: '#FFFAF0',\n forestgreen: '#228B22',\n fuchsia: '#FF00FF',\n gainsboro: '#DCDCDC',\n ghostwhite: '#F8F8FF',\n gold: '#FFD700',\n goldenrod: '#DAA520',\n gray: '#808080',\n green: '#008000',\n greenyellow: '#ADFF2F',\n grey: '#808080',\n honeydew: '#F0FFF0',\n hotpink: '#FF69B4',\n indianred: '#CD5C5C',\n indigo: '#4B0082',\n ivory: '#FFFFF0',\n khaki: '#F0E68C',\n lavender: '#E6E6FA',\n lavenderblush: '#FFF0F5',\n lawngreen: '#7CFC00',\n lemonchiffon: '#FFFACD',\n lightblue: '#ADD8E6',\n lightcoral: '#F08080',\n lightcyan: '#E0FFFF',\n lightgoldenrodyellow: '#FAFAD2',\n lightgray: '#D3D3D3',\n lightgreen: '#90EE90',\n lightgrey: '#D3D3D3',\n lightpink: '#FFB6C1',\n lightsalmon: '#FFA07A',\n lightseagreen: '#20B2AA',\n lightskyblue: '#87CEFA',\n lightslategray: '#778899',\n lightslategrey: '#778899',\n lightsteelblue: '#B0C4DE',\n lightyellow: '#FFFFE0',\n lime: '#00FF00',\n limegreen: '#32CD32',\n linen: '#FAF0E6',\n magenta: '#FF00FF',\n maroon: '#800000',\n mediumaquamarine: '#66CDAA',\n mediumblue: '#0000CD',\n mediumorchid: '#BA55D3',\n mediumpurple: '#9370DB',\n mediumseagreen: '#3CB371',\n mediumslateblue: '#7B68EE',\n mediumspringgreen: '#00FA9A',\n mediumturquoise: '#48D1CC',\n mediumvioletred: '#C71585',\n midnightblue: '#191970',\n mintcream: '#F5FFFA',\n mistyrose: '#FFE4E1',\n moccasin: '#FFE4B5',\n navajowhite: '#FFDEAD',\n navy: '#000080',\n oldlace: '#FDF5E6',\n olive: '#808000',\n olivedrab: '#6B8E23',\n orange: '#FFA500',\n orangered: '#FF4500',\n orchid: '#DA70D6',\n palegoldenrod: '#EEE8AA',\n palegreen: '#98FB98',\n paleturquoise: '#AFEEEE',\n palevioletred: '#DB7093',\n papayawhip: '#FFEFD5',\n peachpuff: '#FFDAB9',\n peru: '#CD853F',\n pink: '#FFC0CB',\n plum: '#DDA0DD',\n powderblue: '#B0E0E6',\n purple: '#800080',\n rebeccapurple: '#663399',\n red: '#FF0000',\n rosybrown: '#BC8F8F',\n royalblue: '#4169E1',\n saddlebrown: '#8B4513',\n salmon: '#FA8072',\n sandybrown: '#F4A460',\n seagreen: '#2E8B57',\n seashell: '#FFF5EE',\n sienna: '#A0522D',\n silver: '#C0C0C0',\n skyblue: '#87CEEB',\n slateblue: '#6A5ACD',\n slategray: '#708090',\n slategrey: '#708090',\n snow: '#FFFAFA',\n springgreen: '#00FF7F',\n steelblue: '#4682B4',\n tan: '#D2B48C',\n teal: '#008080',\n thistle: '#D8BFD8',\n tomato: '#FF6347',\n turquoise: '#40E0D0',\n violet: '#EE82EE',\n wheat: '#F5DEB3',\n white: '#FFFFFF',\n whitesmoke: '#F5F5F5',\n yellow: '#FFFF00',\n yellowgreen: '#9ACD32'\n });\n return Color;\n}();\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue\n * @version v28.2.1\n * @link https://www.ag-grid.com/\n * @license MIT\n */\n// Based on https://stackoverflow.com/a/14991797\n// This will parse a delimited string into an array of arrays.\nfunction stringToArray(strData, delimiter) {\n if (delimiter === void 0) {\n delimiter = ',';\n }\n var data = [];\n var isNewline = function (char) {\n return char === '\\r' || char === '\\n';\n };\n var insideQuotedField = false;\n if (strData === '') {\n return [['']];\n }\n var _loop_1 = function (row, column, position) {\n var previousChar = strData[position - 1];\n var currentChar = strData[position];\n var nextChar = strData[position + 1];\n var ensureDataExists = function () {\n if (!data[row]) {\n // create row if it doesn't exist\n data[row] = [];\n }\n if (!data[row][column]) {\n // create column if it doesn't exist\n data[row][column] = '';\n }\n };\n ensureDataExists();\n if (currentChar === '\"') {\n if (insideQuotedField) {\n if (nextChar === '\"') {\n // unescape double quote\n data[row][column] += '\"';\n position++;\n } else {\n // exit quoted field\n insideQuotedField = false;\n }\n return out_row_1 = row, out_column_1 = column, out_position_1 = position, \"continue\";\n } else if (previousChar === undefined || previousChar === delimiter || isNewline(previousChar)) {\n // enter quoted field\n insideQuotedField = true;\n return out_row_1 = row, out_column_1 = column, out_position_1 = position, \"continue\";\n }\n }\n if (!insideQuotedField) {\n if (currentChar === delimiter) {\n // move to next column\n column++;\n ensureDataExists();\n return out_row_1 = row, out_column_1 = column, out_position_1 = position, \"continue\";\n } else if (isNewline(currentChar)) {\n // move to next row\n column = 0;\n row++;\n ensureDataExists();\n if (currentChar === '\\r' && nextChar === '\\n') {\n // skip over second newline character if it exists\n position++;\n }\n return out_row_1 = row, out_column_1 = column, out_position_1 = position, \"continue\";\n }\n }\n // add current character to current column\n data[row][column] += currentChar;\n out_row_1 = row;\n out_column_1 = column;\n out_position_1 = position;\n };\n var out_row_1, out_column_1, out_position_1;\n // iterate over each character, keep track of current row and column (of the returned array)\n for (var row = 0, column = 0, position = 0; position < strData.length; position++) {\n _loop_1(row, column, position);\n row = out_row_1;\n column = out_column_1;\n position = out_position_1;\n }\n return data;\n}\nvar CsvUtils = /*#__PURE__*/Object.freeze({\n __proto__: null,\n stringToArray: stringToArray\n});\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue\n * @version v28.2.1\n * @link https://www.ag-grid.com/\n * @license MIT\n */\nvar rtlNegativeScroll;\n/**\n * This method adds a class to an element and remove that class from all siblings.\n * Useful for toggling state.\n * @param {HTMLElement} element The element to receive the class\n * @param {string} elementClass The class to be assigned to the element\n * @param {boolean} otherElementClass The class to be assigned to siblings of the element, but not the element itself\n */\nfunction radioCssClass(element, elementClass, otherElementClass) {\n var parent = element.parentElement;\n var sibling = parent && parent.firstChild;\n while (sibling) {\n if (elementClass) {\n sibling.classList.toggle(elementClass, sibling === element);\n }\n if (otherElementClass) {\n sibling.classList.toggle(otherElementClass, sibling !== element);\n }\n sibling = sibling.nextSibling;\n }\n}\nfunction isFocusableFormField(element) {\n var matches = Element.prototype.matches || Element.prototype.msMatchesSelector;\n var isFocusable = matches.call(element, Constants.INPUT_SELECTOR);\n var isNotFocusable = matches.call(element, Constants.FOCUSABLE_EXCLUDE);\n var isElementVisible = isVisible(element);\n var focusable = isFocusable && !isNotFocusable && isElementVisible;\n return focusable;\n}\nfunction setDisplayed(element, displayed) {\n element.classList.toggle('ag-hidden', !displayed);\n}\nfunction setVisible(element, visible) {\n element.classList.toggle('ag-invisible', !visible);\n}\nfunction setDisabled(element, disabled) {\n var attributeName = 'disabled';\n var addOrRemoveDisabledAttribute = disabled ? function (e) {\n return e.setAttribute(attributeName, '');\n } : function (e) {\n return e.removeAttribute(attributeName);\n };\n addOrRemoveDisabledAttribute(element);\n nodeListForEach(element.querySelectorAll('input'), function (input) {\n return addOrRemoveDisabledAttribute(input);\n });\n}\nfunction isElementChildOfClass(element, cls, maxNest) {\n var counter = 0;\n while (element) {\n if (element.classList.contains(cls)) {\n return true;\n }\n element = element.parentElement;\n if (typeof maxNest == 'number') {\n if (++counter > maxNest) {\n break;\n }\n } else if (element === maxNest) {\n break;\n }\n }\n return false;\n}\n// returns back sizes as doubles instead of strings. similar to\n// getBoundingClientRect, however getBoundingClientRect does not:\n// a) work with fractions (eg browser is zooming)\n// b) has CSS transitions applied (eg CSS scale, browser zoom), which we don't want, we want the un-transitioned values\nfunction getElementSize(el) {\n var _a = window.getComputedStyle(el),\n height = _a.height,\n width = _a.width,\n paddingTop = _a.paddingTop,\n paddingRight = _a.paddingRight,\n paddingBottom = _a.paddingBottom,\n paddingLeft = _a.paddingLeft,\n marginTop = _a.marginTop,\n marginRight = _a.marginRight,\n marginBottom = _a.marginBottom,\n marginLeft = _a.marginLeft,\n boxSizing = _a.boxSizing;\n return {\n height: parseFloat(height),\n width: parseFloat(width),\n paddingTop: parseFloat(paddingTop),\n paddingRight: parseFloat(paddingRight),\n paddingBottom: parseFloat(paddingBottom),\n paddingLeft: parseFloat(paddingLeft),\n marginTop: parseFloat(marginTop),\n marginRight: parseFloat(marginRight),\n marginBottom: parseFloat(marginBottom),\n marginLeft: parseFloat(marginLeft),\n boxSizing: boxSizing\n };\n}\nfunction getInnerHeight(el) {\n var size = getElementSize(el);\n if (size.boxSizing === 'border-box') {\n return size.height - size.paddingTop - size.paddingBottom;\n }\n return size.height;\n}\nfunction getInnerWidth(el) {\n var size = getElementSize(el);\n if (size.boxSizing === 'border-box') {\n return size.width - size.paddingLeft - size.paddingRight;\n }\n return size.width;\n}\nfunction getAbsoluteHeight(el) {\n var size = getElementSize(el);\n var marginRight = size.marginBottom + size.marginTop;\n return Math.ceil(el.offsetHeight + marginRight);\n}\nfunction getAbsoluteWidth(el) {\n var size = getElementSize(el);\n var marginWidth = size.marginLeft + size.marginRight;\n return Math.ceil(el.offsetWidth + marginWidth);\n}\nfunction isRtlNegativeScroll() {\n if (typeof rtlNegativeScroll === \"boolean\") {\n return rtlNegativeScroll;\n }\n var template = document.createElement('div');\n template.style.direction = 'rtl';\n template.style.width = '1px';\n template.style.height = '1px';\n template.style.position = 'fixed';\n template.style.top = '0px';\n template.style.overflow = 'hidden';\n template.dir = 'rtl';\n template.innerHTML = /* html */\n \"