`\n inheritAttrs: false,\n props: props,\n computed: {\n // Layout related computed props\n isResponsive: function isResponsive() {\n var responsive = this.responsive;\n responsive = responsive === '' ? true : responsive;\n return this.isStacked ? false : responsive;\n },\n isStickyHeader: function isStickyHeader() {\n var stickyHeader = this.stickyHeader;\n stickyHeader = stickyHeader === '' ? true : stickyHeader;\n return this.isStacked ? false : stickyHeader;\n },\n wrapperClasses: function wrapperClasses() {\n var isResponsive = this.isResponsive;\n return [this.isStickyHeader ? 'b-table-sticky-header' : '', isResponsive === true ? 'table-responsive' : isResponsive ? \"table-responsive-\".concat(this.responsive) : ''].filter(identity);\n },\n wrapperStyles: function wrapperStyles() {\n var isStickyHeader = this.isStickyHeader;\n return isStickyHeader && !isBoolean(isStickyHeader) ? {\n maxHeight: isStickyHeader\n } : {};\n },\n tableClasses: function tableClasses() {\n var hover = this.hover,\n tableVariant = this.tableVariant;\n hover = this.isTableSimple ? hover : hover && this.computedItems.length > 0 && !this.computedBusy;\n return [// User supplied classes\n this.tableClass, // Styling classes\n {\n 'table-striped': this.striped,\n 'table-hover': hover,\n 'table-dark': this.dark,\n 'table-bordered': this.bordered,\n 'table-borderless': this.borderless,\n 'table-sm': this.small,\n // The following are b-table custom styles\n border: this.outlined,\n 'b-table-fixed': this.fixed,\n 'b-table-caption-top': this.captionTop,\n 'b-table-no-border-collapse': this.noBorderCollapse\n }, tableVariant ? \"\".concat(this.dark ? 'bg' : 'table', \"-\").concat(tableVariant) : '', // Stacked table classes\n this.stackedTableClasses, // Selectable classes\n this.selectableTableClasses];\n },\n tableAttrs: function tableAttrs() {\n var items = this.computedItems,\n filteredItems = this.filteredItems,\n fields = this.computedFields,\n selectableTableAttrs = this.selectableTableAttrs; // Preserve user supplied aria-describedby, if provided in `$attrs`\n\n var adb = [(this.bvAttrs || {})['aria-describedby'], this.captionId].filter(identity).join(' ') || null;\n var ariaAttrs = this.isTableSimple ? {} : {\n 'aria-busy': this.computedBusy ? 'true' : 'false',\n 'aria-colcount': toString(fields.length),\n 'aria-describedby': adb\n };\n var rowCount = items && filteredItems && filteredItems.length > items.length ? toString(filteredItems.length) : null;\n return _objectSpread(_objectSpread(_objectSpread({\n // We set `aria-rowcount` before merging in `$attrs`,\n // in case user has supplied their own\n 'aria-rowcount': rowCount\n }, this.bvAttrs), {}, {\n // Now we can override any `$attrs` here\n id: this.safeId(),\n role: 'table'\n }, ariaAttrs), selectableTableAttrs);\n }\n },\n render: function render(h) {\n var wrapperClasses = this.wrapperClasses,\n renderCaption = this.renderCaption,\n renderColgroup = this.renderColgroup,\n renderThead = this.renderThead,\n renderTbody = this.renderTbody,\n renderTfoot = this.renderTfoot;\n var $content = [];\n\n if (this.isTableSimple) {\n $content.push(this.normalizeSlot());\n } else {\n // Build the `
` (from caption mixin)\n $content.push(renderCaption ? renderCaption() : null); // Build the ` `\n\n $content.push(renderColgroup ? renderColgroup() : null); // Build the ` `\n\n $content.push(renderThead ? renderThead() : null); // Build the ` `\n\n $content.push(renderTbody ? renderTbody() : null); // Build the ` `\n\n $content.push(renderTfoot ? renderTfoot() : null);\n } // Assemble ``\n\n\n var $table = h('table', {\n staticClass: 'table b-table',\n class: this.tableClasses,\n attrs: this.tableAttrs,\n key: 'b-table'\n }, $content.filter(identity)); // Add responsive/sticky wrapper if needed and return table\n\n return wrapperClasses.length > 0 ? h('div', {\n class: wrapperClasses,\n style: this.wrapperStyles,\n key: 'wrap'\n }, [$table]) : $table;\n }\n});","function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nimport { Vue } from '../../vue';\nimport { NAME_TBODY } from '../../constants/components';\nimport { PROP_TYPE_OBJECT } from '../../constants/props';\nimport { makeProp, makePropsConfigurable } from '../../utils/props';\nimport { attrsMixin } from '../../mixins/attrs';\nimport { listenersMixin } from '../../mixins/listeners';\nimport { normalizeSlotMixin } from '../../mixins/normalize-slot'; // --- Props ---\n\nexport var props = makePropsConfigurable({\n tbodyTransitionHandlers: makeProp(PROP_TYPE_OBJECT),\n tbodyTransitionProps: makeProp(PROP_TYPE_OBJECT)\n}, NAME_TBODY); // --- Main component ---\n// TODO:\n// In Bootstrap v5, we won't need \"sniffing\" as table element variants properly inherit\n// to the child elements, so this can be converted to a functional component\n// @vue/component\n\nexport var BTbody = /*#__PURE__*/Vue.extend({\n name: NAME_TBODY,\n mixins: [attrsMixin, listenersMixin, normalizeSlotMixin],\n provide: function provide() {\n return {\n bvTableRowGroup: this\n };\n },\n inject: {\n // Sniffed by `` / `` / ``\n bvTable: {\n default:\n /* istanbul ignore next */\n function _default() {\n return {};\n }\n }\n },\n inheritAttrs: false,\n props: props,\n computed: {\n // Sniffed by `` / `` / ``\n isTbody: function isTbody() {\n return true;\n },\n // Sniffed by `` / `` / ``\n isDark: function isDark() {\n return this.bvTable.dark;\n },\n // Sniffed by `` / `` / ``\n isStacked: function isStacked() {\n return this.bvTable.isStacked;\n },\n // Sniffed by `` / `` / ``\n isResponsive: function isResponsive() {\n return this.bvTable.isResponsive;\n },\n // Sniffed by `` / `` / ``\n // Sticky headers are only supported in thead\n isStickyHeader: function isStickyHeader() {\n return false;\n },\n // Sniffed by `` / `` / ``\n // Needed to handle header background classes, due to lack of\n // background color inheritance with Bootstrap v4 table CSS\n hasStickyHeader: function hasStickyHeader() {\n return !this.isStacked && this.bvTable.stickyHeader;\n },\n // Sniffed by `` / `` / ``\n tableVariant: function tableVariant() {\n return this.bvTable.tableVariant;\n },\n isTransitionGroup: function isTransitionGroup() {\n return this.tbodyTransitionProps || this.tbodyTransitionHandlers;\n },\n tbodyAttrs: function tbodyAttrs() {\n return _objectSpread({\n role: 'rowgroup'\n }, this.bvAttrs);\n },\n tbodyProps: function tbodyProps() {\n var tbodyTransitionProps = this.tbodyTransitionProps;\n return tbodyTransitionProps ? _objectSpread(_objectSpread({}, tbodyTransitionProps), {}, {\n tag: 'tbody'\n }) : {};\n }\n },\n render: function render(h) {\n var data = {\n props: this.tbodyProps,\n attrs: this.tbodyAttrs\n };\n\n if (this.isTransitionGroup) {\n // We use native listeners if a transition group for any delegated events\n data.on = this.tbodyTransitionHandlers || {};\n data.nativeOn = this.bvListeners;\n } else {\n // Otherwise we place any listeners on the tbody element\n data.on = this.bvListeners;\n }\n\n return h(this.isTransitionGroup ? 'transition-group' : 'tbody', data, this.normalizeSlot());\n }\n});","import { closest, getAttr, getById, matches, select } from '../../../utils/dom';\nimport { EVENT_FILTER } from './constants';\nvar TABLE_TAG_NAMES = ['TD', 'TH', 'TR']; // Returns `true` if we should ignore the click/double-click/keypress event\n// Avoids having the user need to use `@click.stop` on the form control\n\nexport var filterEvent = function filterEvent(event) {\n // Exit early when we don't have a target element\n if (!event || !event.target) {\n /* istanbul ignore next */\n return false;\n }\n\n var el = event.target; // Exit early when element is disabled or a table element\n\n if (el.disabled || TABLE_TAG_NAMES.indexOf(el.tagName) !== -1) {\n return false;\n } // Ignore the click when it was inside a dropdown menu\n\n\n if (closest('.dropdown-menu', el)) {\n return true;\n }\n\n var label = el.tagName === 'LABEL' ? el : closest('label', el); // If the label's form control is not disabled then we don't propagate event\n // Modern browsers have `label.control` that references the associated input, but IE 11\n // does not have this property on the label element, so we resort to DOM lookups\n\n if (label) {\n var labelFor = getAttr(label, 'for');\n var input = labelFor ? getById(labelFor) : select('input, select, textarea', label);\n\n if (input && !input.disabled) {\n return true;\n }\n } // Otherwise check if the event target matches one of the selectors in the\n // event filter (i.e. anchors, non disabled inputs, etc.)\n // Return `true` if we should ignore the event\n\n\n return matches(el, EVENT_FILTER);\n};","import { getSel, isElement } from '../../../utils/dom'; // Helper to determine if a there is an active text selection on the document page\n// Used to filter out click events caused by the mouse up at end of selection\n//\n// Accepts an element as only argument to test to see if selection overlaps or is\n// contained within the element\n\nexport var textSelectionActive = function textSelectionActive() {\n var el = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : document;\n var sel = getSel();\n return sel && sel.toString().trim() !== '' && sel.containsNode && isElement(el) ?\n /* istanbul ignore next */\n sel.containsNode(el, true) : false;\n};","import { Vue } from '../../vue';\nimport { NAME_TH } from '../../constants/components';\nimport { makePropsConfigurable } from '../../utils/props';\nimport { BTd, props as BTdProps } from './td'; // --- Props ---\n\nexport var props = makePropsConfigurable(BTdProps, NAME_TH); // --- Main component ---\n// TODO:\n// In Bootstrap v5, we won't need \"sniffing\" as table element variants properly inherit\n// to the child elements, so this can be converted to a functional component\n// @vue/component\n\nexport var BTh = /*#__PURE__*/Vue.extend({\n name: NAME_TH,\n extends: BTd,\n props: props,\n computed: {\n tag: function tag() {\n return 'th';\n }\n }\n});","function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nfunction _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }\n\nfunction _nonIterableSpread() { throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\n\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\n\nfunction _iterableToArray(iter) { if (typeof Symbol !== \"undefined\" && Symbol.iterator in Object(iter)) return Array.from(iter); }\n\nfunction _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }\n\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }\n\nimport { Vue } from '../../../vue';\nimport { EVENT_NAME_ROW_CLICKED, EVENT_NAME_ROW_HOVERED, EVENT_NAME_ROW_UNHOVERED } from '../../../constants/events';\nimport { PROP_TYPE_ARRAY_OBJECT_STRING, PROP_TYPE_FUNCTION, PROP_TYPE_OBJECT_FUNCTION } from '../../../constants/props';\nimport { SLOT_NAME_ROW_DETAILS } from '../../../constants/slots';\nimport { get } from '../../../utils/get';\nimport { isFunction, isString, isUndefinedOrNull } from '../../../utils/inspect';\nimport { makeProp } from '../../../utils/props';\nimport { toString } from '../../../utils/string';\nimport { BTr } from '../tr';\nimport { BTd } from '../td';\nimport { BTh } from '../th';\nimport { FIELD_KEY_CELL_VARIANT, FIELD_KEY_ROW_VARIANT, FIELD_KEY_SHOW_DETAILS } from './constants'; // --- Props ---\n\nexport var props = {\n detailsTdClass: makeProp(PROP_TYPE_ARRAY_OBJECT_STRING),\n tbodyTrAttr: makeProp(PROP_TYPE_OBJECT_FUNCTION),\n tbodyTrClass: makeProp([].concat(_toConsumableArray(PROP_TYPE_ARRAY_OBJECT_STRING), [PROP_TYPE_FUNCTION]))\n}; // --- Mixin ---\n// @vue/component\n\nexport var tbodyRowMixin = Vue.extend({\n props: props,\n methods: {\n // Methods for computing classes, attributes and styles for table cells\n getTdValues: function getTdValues(item, key, tdValue, defaultValue) {\n var $parent = this.$parent;\n\n if (tdValue) {\n var value = get(item, key, '');\n\n if (isFunction(tdValue)) {\n return tdValue(value, key, item);\n } else if (isString(tdValue) && isFunction($parent[tdValue])) {\n return $parent[tdValue](value, key, item);\n }\n\n return tdValue;\n }\n\n return defaultValue;\n },\n getThValues: function getThValues(item, key, thValue, type, defaultValue) {\n var $parent = this.$parent;\n\n if (thValue) {\n var value = get(item, key, '');\n\n if (isFunction(thValue)) {\n return thValue(value, key, item, type);\n } else if (isString(thValue) && isFunction($parent[thValue])) {\n return $parent[thValue](value, key, item, type);\n }\n\n return thValue;\n }\n\n return defaultValue;\n },\n // Method to get the value for a field\n getFormattedValue: function getFormattedValue(item, field) {\n var key = field.key;\n var formatter = this.getFieldFormatter(key);\n var value = get(item, key, null);\n\n if (isFunction(formatter)) {\n value = formatter(value, key, item);\n }\n\n return isUndefinedOrNull(value) ? '' : value;\n },\n // Factory function methods\n toggleDetailsFactory: function toggleDetailsFactory(hasDetailsSlot, item) {\n var _this = this;\n\n // Returns a function to toggle a row's details slot\n return function () {\n if (hasDetailsSlot) {\n _this.$set(item, FIELD_KEY_SHOW_DETAILS, !item[FIELD_KEY_SHOW_DETAILS]);\n }\n };\n },\n // Row event handlers\n rowHovered: function rowHovered(event) {\n // `mouseenter` handler (non-bubbling)\n // `this.tbodyRowEvtStopped` from tbody mixin\n if (!this.tbodyRowEvtStopped(event)) {\n // `this.emitTbodyRowEvent` from tbody mixin\n this.emitTbodyRowEvent(EVENT_NAME_ROW_HOVERED, event);\n }\n },\n rowUnhovered: function rowUnhovered(event) {\n // `mouseleave` handler (non-bubbling)\n // `this.tbodyRowEvtStopped` from tbody mixin\n if (!this.tbodyRowEvtStopped(event)) {\n // `this.emitTbodyRowEvent` from tbody mixin\n this.emitTbodyRowEvent(EVENT_NAME_ROW_UNHOVERED, event);\n }\n },\n // Renders a TD or TH for a row's field\n renderTbodyRowCell: function renderTbodyRowCell(field, colIndex, item, rowIndex) {\n var _this2 = this;\n\n var isStacked = this.isStacked;\n var key = field.key,\n label = field.label,\n isRowHeader = field.isRowHeader;\n var h = this.$createElement;\n var hasDetailsSlot = this.hasNormalizedSlot(SLOT_NAME_ROW_DETAILS);\n var formatted = this.getFormattedValue(item, field);\n var stickyColumn = !isStacked && (this.isResponsive || this.stickyHeader) && field.stickyColumn; // We only uses the helper components for sticky columns to\n // improve performance of BTable/BTableLite by reducing the\n // total number of vue instances created during render\n\n var cellTag = stickyColumn ? isRowHeader ? BTh : BTd : isRowHeader ? 'th' : 'td';\n var cellVariant = item[FIELD_KEY_CELL_VARIANT] && item[FIELD_KEY_CELL_VARIANT][key] ? item[FIELD_KEY_CELL_VARIANT][key] : field.variant || null;\n var data = {\n // For the Vue key, we concatenate the column index and\n // field key (as field keys could be duplicated)\n // TODO: Although we do prevent duplicate field keys...\n // So we could change this to: `row-${rowIndex}-cell-${key}`\n class: [field.class ? field.class : '', this.getTdValues(item, key, field.tdClass, '')],\n props: {},\n attrs: _objectSpread({\n 'aria-colindex': String(colIndex + 1)\n }, isRowHeader ? this.getThValues(item, key, field.thAttr, 'row', {}) : this.getTdValues(item, key, field.tdAttr, {})),\n key: \"row-\".concat(rowIndex, \"-cell-\").concat(colIndex, \"-\").concat(key)\n };\n\n if (stickyColumn) {\n // We are using the helper BTd or BTh\n data.props = {\n stackedHeading: isStacked ? label : null,\n stickyColumn: true,\n variant: cellVariant\n };\n } else {\n // Using native TD or TH element, so we need to\n // add in the attributes and variant class\n data.attrs['data-label'] = isStacked && !isUndefinedOrNull(label) ? toString(label) : null;\n data.attrs.role = isRowHeader ? 'rowheader' : 'cell';\n data.attrs.scope = isRowHeader ? 'row' : null; // Add in the variant class\n\n if (cellVariant) {\n data.class.push(\"\".concat(this.dark ? 'bg' : 'table', \"-\").concat(cellVariant));\n }\n }\n\n var slotScope = {\n item: item,\n index: rowIndex,\n field: field,\n unformatted: get(item, key, ''),\n value: formatted,\n toggleDetails: this.toggleDetailsFactory(hasDetailsSlot, item),\n detailsShowing: Boolean(item[FIELD_KEY_SHOW_DETAILS])\n }; // If table supports selectable mode, then add in the following scope\n // this.supportsSelectableRows will be undefined if mixin isn't loaded\n\n if (this.supportsSelectableRows) {\n slotScope.rowSelected = this.isRowSelected(rowIndex);\n\n slotScope.selectRow = function () {\n return _this2.selectRow(rowIndex);\n };\n\n slotScope.unselectRow = function () {\n return _this2.unselectRow(rowIndex);\n };\n } // The new `v-slot` syntax doesn't like a slot name starting with\n // a square bracket and if using in-document HTML templates, the\n // v-slot attributes are lower-cased by the browser.\n // Switched to round bracket syntax to prevent confusion with\n // dynamic slot name syntax.\n // We look for slots in this order: `cell(${key})`, `cell(${key.toLowerCase()})`, 'cell()'\n // Slot names are now cached by mixin tbody in `this.$_bodyFieldSlotNameCache`\n // Will be `null` if no slot (or fallback slot) exists\n\n\n var slotName = this.$_bodyFieldSlotNameCache[key];\n var $childNodes = slotName ? this.normalizeSlot(slotName, slotScope) : toString(formatted);\n\n if (this.isStacked) {\n // We wrap in a DIV to ensure rendered as a single cell when visually stacked!\n $childNodes = [h('div', [$childNodes])];\n } // Render either a td or th cell\n\n\n return h(cellTag, data, [$childNodes]);\n },\n // Renders an item's row (or rows if details supported)\n renderTbodyRow: function renderTbodyRow(item, rowIndex) {\n var _this3 = this;\n\n var fields = this.computedFields,\n striped = this.striped,\n primaryKey = this.primaryKey,\n currentPage = this.currentPage,\n perPage = this.perPage,\n tbodyTrClass = this.tbodyTrClass,\n tbodyTrAttr = this.tbodyTrAttr;\n var h = this.$createElement;\n var hasDetailsSlot = this.hasNormalizedSlot(SLOT_NAME_ROW_DETAILS);\n var rowShowDetails = item[FIELD_KEY_SHOW_DETAILS] && hasDetailsSlot;\n var hasRowClickHandler = this.$listeners[EVENT_NAME_ROW_CLICKED] || this.hasSelectableRowClick; // We can return more than one TR if rowDetails enabled\n\n var $rows = []; // Details ID needed for `aria-details` when details showing\n // We set it to `null` when not showing so that attribute\n // does not appear on the element\n\n var detailsId = rowShowDetails ? this.safeId(\"_details_\".concat(rowIndex, \"_\")) : null; // For each item data field in row\n\n var $tds = fields.map(function (field, colIndex) {\n return _this3.renderTbodyRowCell(field, colIndex, item, rowIndex);\n }); // Calculate the row number in the dataset (indexed from 1)\n\n var ariaRowIndex = null;\n\n if (currentPage && perPage && perPage > 0) {\n ariaRowIndex = String((currentPage - 1) * perPage + rowIndex + 1);\n } // Create a unique :key to help ensure that sub components are re-rendered rather than\n // re-used, which can cause issues. If a primary key is not provided we use the rendered\n // rows index within the tbody.\n // See: https://github.com/bootstrap-vue/bootstrap-vue/issues/2410\n\n\n var primaryKeyValue = toString(get(item, primaryKey)) || null;\n var rowKey = primaryKeyValue || toString(rowIndex); // If primary key is provided, use it to generate a unique ID on each tbody > tr\n // In the format of '{tableId}__row_{primaryKeyValue}'\n\n var rowId = primaryKeyValue ? this.safeId(\"_row_\".concat(primaryKeyValue)) : null; // Selectable classes and attributes\n\n var selectableClasses = this.selectableRowClasses ? this.selectableRowClasses(rowIndex) : {};\n var selectableAttrs = this.selectableRowAttrs ? this.selectableRowAttrs(rowIndex) : {}; // Additional classes and attributes\n\n var userTrClasses = isFunction(tbodyTrClass) ? tbodyTrClass(item, 'row') : tbodyTrClass;\n var userTrAttrs = isFunction(tbodyTrAttr) ?\n /* istanbul ignore next */\n tbodyTrAttr(item, 'row') : tbodyTrAttr; // Add the item row\n\n $rows.push(h(BTr, {\n class: [userTrClasses, selectableClasses, rowShowDetails ? 'b-table-has-details' : ''],\n props: {\n variant: item[FIELD_KEY_ROW_VARIANT] || null\n },\n attrs: _objectSpread(_objectSpread({\n id: rowId\n }, userTrAttrs), {}, {\n // Users cannot override the following attributes\n tabindex: hasRowClickHandler ? '0' : null,\n 'data-pk': primaryKeyValue || null,\n 'aria-details': detailsId,\n 'aria-owns': detailsId,\n 'aria-rowindex': ariaRowIndex\n }, selectableAttrs),\n on: {\n // Note: These events are not A11Y friendly!\n mouseenter: this.rowHovered,\n mouseleave: this.rowUnhovered\n },\n key: \"__b-table-row-\".concat(rowKey, \"__\"),\n ref: 'item-rows',\n refInFor: true\n }, $tds)); // Row Details slot\n\n if (rowShowDetails) {\n var detailsScope = {\n item: item,\n index: rowIndex,\n fields: fields,\n toggleDetails: this.toggleDetailsFactory(hasDetailsSlot, item)\n }; // If table supports selectable mode, then add in the following scope\n // this.supportsSelectableRows will be undefined if mixin isn't loaded\n\n if (this.supportsSelectableRows) {\n detailsScope.rowSelected = this.isRowSelected(rowIndex);\n\n detailsScope.selectRow = function () {\n return _this3.selectRow(rowIndex);\n };\n\n detailsScope.unselectRow = function () {\n return _this3.unselectRow(rowIndex);\n };\n } // Render the details slot in a TD\n\n\n var $details = h(BTd, {\n props: {\n colspan: fields.length\n },\n class: this.detailsTdClass\n }, [this.normalizeSlot(SLOT_NAME_ROW_DETAILS, detailsScope)]); // Add a hidden row to keep table row striping consistent when details showing\n // Only added if the table is striped\n\n if (striped) {\n $rows.push( // We don't use `BTr` here as we don't need the extra functionality\n h('tr', {\n staticClass: 'd-none',\n attrs: {\n 'aria-hidden': 'true',\n role: 'presentation'\n },\n key: \"__b-table-details-stripe__\".concat(rowKey)\n }));\n } // Add the actual details row\n\n\n var userDetailsTrClasses = isFunction(this.tbodyTrClass) ?\n /* istanbul ignore next */\n this.tbodyTrClass(item, SLOT_NAME_ROW_DETAILS) : this.tbodyTrClass;\n var userDetailsTrAttrs = isFunction(this.tbodyTrAttr) ?\n /* istanbul ignore next */\n this.tbodyTrAttr(item, SLOT_NAME_ROW_DETAILS) : this.tbodyTrAttr;\n $rows.push(h(BTr, {\n staticClass: 'b-table-details',\n class: [userDetailsTrClasses],\n props: {\n variant: item[FIELD_KEY_ROW_VARIANT] || null\n },\n attrs: _objectSpread(_objectSpread({}, userDetailsTrAttrs), {}, {\n // Users cannot override the following attributes\n id: detailsId,\n tabindex: '-1'\n }),\n key: \"__b-table-details__\".concat(rowKey)\n }, [$details]));\n } else if (hasDetailsSlot) {\n // Only add the placeholder if a the table has a row-details slot defined (but not shown)\n $rows.push(h());\n\n if (striped) {\n // Add extra placeholder if table is striped\n $rows.push(h());\n }\n } // Return the row(s)\n\n\n return $rows;\n }\n }\n});","function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nimport { Vue } from '../../../vue';\nimport { EVENT_NAME_ROW_CLICKED, EVENT_NAME_ROW_CONTEXTMENU, EVENT_NAME_ROW_DBLCLICKED, EVENT_NAME_ROW_MIDDLE_CLICKED } from '../../../constants/events';\nimport { CODE_DOWN, CODE_END, CODE_ENTER, CODE_HOME, CODE_SPACE, CODE_UP } from '../../../constants/key-codes';\nimport { PROP_TYPE_ARRAY_OBJECT_STRING } from '../../../constants/props';\nimport { arrayIncludes, from as arrayFrom } from '../../../utils/array';\nimport { attemptFocus, closest, isActiveElement, isElement } from '../../../utils/dom';\nimport { stopEvent } from '../../../utils/events';\nimport { sortKeys } from '../../../utils/object';\nimport { makeProp, pluckProps } from '../../../utils/props';\nimport { BTbody, props as BTbodyProps } from '../tbody';\nimport { filterEvent } from './filter-event';\nimport { textSelectionActive } from './text-selection-active';\nimport { tbodyRowMixin, props as tbodyRowProps } from './mixin-tbody-row'; // --- Helper methods ---\n\nvar getCellSlotName = function getCellSlotName(value) {\n return \"cell(\".concat(value || '', \")\");\n}; // --- Props ---\n\n\nexport var props = sortKeys(_objectSpread(_objectSpread(_objectSpread({}, BTbodyProps), tbodyRowProps), {}, {\n tbodyClass: makeProp(PROP_TYPE_ARRAY_OBJECT_STRING)\n})); // --- Mixin ---\n// @vue/component\n\nexport var tbodyMixin = Vue.extend({\n mixins: [tbodyRowMixin],\n props: props,\n beforeDestroy: function beforeDestroy() {\n this.$_bodyFieldSlotNameCache = null;\n },\n methods: {\n // Returns all the item TR elements (excludes detail and spacer rows)\n // `this.$refs['item-rows']` is an array of item TR components/elements\n // Rows should all be `` components, but we map to TR elements\n // Also note that `this.$refs['item-rows']` may not always be in document order\n getTbodyTrs: function getTbodyTrs() {\n var $refs = this.$refs;\n var tbody = $refs.tbody ? $refs.tbody.$el || $refs.tbody : null;\n var trs = ($refs['item-rows'] || []).map(function (tr) {\n return tr.$el || tr;\n });\n return tbody && tbody.children && tbody.children.length > 0 && trs && trs.length > 0 ? arrayFrom(tbody.children).filter(function (tr) {\n return arrayIncludes(trs, tr);\n }) :\n /* istanbul ignore next */\n [];\n },\n // Returns index of a particular TBODY item TR\n // We set `true` on closest to include self in result\n getTbodyTrIndex: function getTbodyTrIndex(el) {\n /* istanbul ignore next: should not normally happen */\n if (!isElement(el)) {\n return -1;\n }\n\n var tr = el.tagName === 'TR' ? el : closest('tr', el, true);\n return tr ? this.getTbodyTrs().indexOf(tr) : -1;\n },\n // Emits a row event, with the item object, row index and original event\n emitTbodyRowEvent: function emitTbodyRowEvent(type, event) {\n if (type && this.hasListener(type) && event && event.target) {\n var rowIndex = this.getTbodyTrIndex(event.target);\n\n if (rowIndex > -1) {\n // The array of TRs correlate to the `computedItems` array\n var item = this.computedItems[rowIndex];\n this.$emit(type, item, rowIndex, event);\n }\n }\n },\n tbodyRowEvtStopped: function tbodyRowEvtStopped(event) {\n return this.stopIfBusy && this.stopIfBusy(event);\n },\n // Delegated row event handlers\n onTbodyRowKeydown: function onTbodyRowKeydown(event) {\n // Keyboard navigation and row click emulation\n var target = event.target,\n keyCode = event.keyCode;\n\n if (this.tbodyRowEvtStopped(event) || target.tagName !== 'TR' || !isActiveElement(target) || target.tabIndex !== 0) {\n // Early exit if not an item row TR\n return;\n }\n\n if (arrayIncludes([CODE_ENTER, CODE_SPACE], keyCode)) {\n // Emulated click for keyboard users, transfer to click handler\n stopEvent(event);\n this.onTBodyRowClicked(event);\n } else if (arrayIncludes([CODE_UP, CODE_DOWN, CODE_HOME, CODE_END], keyCode)) {\n // Keyboard navigation\n var rowIndex = this.getTbodyTrIndex(target);\n\n if (rowIndex > -1) {\n stopEvent(event);\n var trs = this.getTbodyTrs();\n var shift = event.shiftKey;\n\n if (keyCode === CODE_HOME || shift && keyCode === CODE_UP) {\n // Focus first row\n attemptFocus(trs[0]);\n } else if (keyCode === CODE_END || shift && keyCode === CODE_DOWN) {\n // Focus last row\n attemptFocus(trs[trs.length - 1]);\n } else if (keyCode === CODE_UP && rowIndex > 0) {\n // Focus previous row\n attemptFocus(trs[rowIndex - 1]);\n } else if (keyCode === CODE_DOWN && rowIndex < trs.length - 1) {\n // Focus next row\n attemptFocus(trs[rowIndex + 1]);\n }\n }\n }\n },\n onTBodyRowClicked: function onTBodyRowClicked(event) {\n // Don't emit event when the table is busy, the user clicked\n // on a non-disabled control or is selecting text\n if (this.tbodyRowEvtStopped(event) || filterEvent(event) || textSelectionActive(this.$el)) {\n return;\n }\n\n this.emitTbodyRowEvent(EVENT_NAME_ROW_CLICKED, event);\n },\n onTbodyRowMiddleMouseRowClicked: function onTbodyRowMiddleMouseRowClicked(event) {\n if (!this.tbodyRowEvtStopped(event) && event.which === 2) {\n this.emitTbodyRowEvent(EVENT_NAME_ROW_MIDDLE_CLICKED, event);\n }\n },\n onTbodyRowContextmenu: function onTbodyRowContextmenu(event) {\n if (!this.tbodyRowEvtStopped(event)) {\n this.emitTbodyRowEvent(EVENT_NAME_ROW_CONTEXTMENU, event);\n }\n },\n onTbodyRowDblClicked: function onTbodyRowDblClicked(event) {\n if (!this.tbodyRowEvtStopped(event) && !filterEvent(event)) {\n this.emitTbodyRowEvent(EVENT_NAME_ROW_DBLCLICKED, event);\n }\n },\n // Render the tbody element and children\n // Note:\n // Row hover handlers are handled by the tbody-row mixin\n // As mouseenter/mouseleave events do not bubble\n renderTbody: function renderTbody() {\n var _this = this;\n\n var items = this.computedItems,\n renderBusy = this.renderBusy,\n renderTopRow = this.renderTopRow,\n renderEmpty = this.renderEmpty,\n renderBottomRow = this.renderBottomRow;\n var h = this.$createElement;\n var hasRowClickHandler = this.hasListener(EVENT_NAME_ROW_CLICKED) || this.hasSelectableRowClick; // Prepare the tbody rows\n\n var $rows = []; // Add the item data rows or the busy slot\n\n var $busy = renderBusy ? renderBusy() : null;\n\n if ($busy) {\n // If table is busy and a busy slot, then return only the busy \"row\" indicator\n $rows.push($busy);\n } else {\n // Table isn't busy, or we don't have a busy slot\n // Create a slot cache for improved performance when looking up cell slot names\n // Values will be keyed by the field's `key` and will store the slot's name\n // Slots could be dynamic (i.e. `v-if`), so we must compute on each render\n // Used by tbody-row mixin render helper\n var cache = {};\n var defaultSlotName = getCellSlotName();\n defaultSlotName = this.hasNormalizedSlot(defaultSlotName) ? defaultSlotName : null;\n this.computedFields.forEach(function (field) {\n var key = field.key;\n var slotName = getCellSlotName(key);\n var lowercaseSlotName = getCellSlotName(key.toLowerCase());\n cache[key] = _this.hasNormalizedSlot(slotName) ? slotName : _this.hasNormalizedSlot(lowercaseSlotName) ?\n /* istanbul ignore next */\n lowercaseSlotName : defaultSlotName;\n }); // Created as a non-reactive property so to not trigger component updates\n // Must be a fresh object each render\n\n this.$_bodyFieldSlotNameCache = cache; // Add static top row slot (hidden in visibly stacked mode\n // as we can't control `data-label` attr)\n\n $rows.push(renderTopRow ? renderTopRow() : h()); // Render the rows\n\n items.forEach(function (item, rowIndex) {\n // Render the individual item row (rows if details slot)\n $rows.push(_this.renderTbodyRow(item, rowIndex));\n }); // Empty items / empty filtered row slot (only shows if `items.length < 1`)\n\n $rows.push(renderEmpty ? renderEmpty() : h()); // Static bottom row slot (hidden in visibly stacked mode\n // as we can't control `data-label` attr)\n\n $rows.push(renderBottomRow ? renderBottomRow() : h());\n } // Note: these events will only emit if a listener is registered\n\n\n var handlers = {\n auxclick: this.onTbodyRowMiddleMouseRowClicked,\n // TODO:\n // Perhaps we do want to automatically prevent the\n // default context menu from showing if there is a\n // `row-contextmenu` listener registered\n contextmenu: this.onTbodyRowContextmenu,\n // The following event(s) is not considered A11Y friendly\n dblclick: this.onTbodyRowDblClicked // Hover events (`mouseenter`/`mouseleave`) are handled by `tbody-row` mixin\n\n }; // Add in click/keydown listeners if needed\n\n if (hasRowClickHandler) {\n handlers.click = this.onTBodyRowClicked;\n handlers.keydown = this.onTbodyRowKeydown;\n } // Assemble rows into the tbody\n\n\n var $tbody = h(BTbody, {\n class: this.tbodyClass || null,\n props: pluckProps(BTbodyProps, this.$props),\n // BTbody transfers all native event listeners to the root element\n // TODO: Only set the handlers if the table is not busy\n on: handlers,\n ref: 'tbody'\n }, $rows); // Return the assembled tbody\n\n return $tbody;\n }\n }\n});","function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nimport { Vue } from '../../vue';\nimport { NAME_TFOOT } from '../../constants/components';\nimport { PROP_TYPE_STRING } from '../../constants/props';\nimport { makeProp, makePropsConfigurable } from '../../utils/props';\nimport { attrsMixin } from '../../mixins/attrs';\nimport { listenersMixin } from '../../mixins/listeners';\nimport { normalizeSlotMixin } from '../../mixins/normalize-slot'; // --- Props ---\n\nexport var props = makePropsConfigurable({\n // Supported values: 'lite', 'dark', or null\n footVariant: makeProp(PROP_TYPE_STRING)\n}, NAME_TFOOT); // --- Main component ---\n// TODO:\n// In Bootstrap v5, we won't need \"sniffing\" as table element variants properly inherit\n// to the child elements, so this can be converted to a functional component\n// @vue/component\n\nexport var BTfoot = /*#__PURE__*/Vue.extend({\n name: NAME_TFOOT,\n mixins: [attrsMixin, listenersMixin, normalizeSlotMixin],\n provide: function provide() {\n return {\n bvTableRowGroup: this\n };\n },\n inject: {\n // Sniffed by `` / `` / ``\n bvTable: {\n default:\n /* istanbul ignore next */\n function _default() {\n return {};\n }\n }\n },\n inheritAttrs: false,\n props: props,\n computed: {\n // Sniffed by `` / `` / ``\n isTfoot: function isTfoot() {\n return true;\n },\n // Sniffed by `` / `` / ``\n isDark: function isDark() {\n return this.bvTable.dark;\n },\n // Sniffed by `` / `` / ``\n isStacked: function isStacked() {\n return this.bvTable.isStacked;\n },\n // Sniffed by `` / `` / ``\n isResponsive: function isResponsive() {\n return this.bvTable.isResponsive;\n },\n // Sniffed by `` / `` / ``\n // Sticky headers are only supported in thead\n isStickyHeader: function isStickyHeader() {\n return false;\n },\n // Sniffed by `` / `` / ``\n // Needed to handle header background classes, due to lack of\n // background color inheritance with Bootstrap v4 table CSS\n hasStickyHeader: function hasStickyHeader() {\n return !this.isStacked && this.bvTable.stickyHeader;\n },\n // Sniffed by `` / `` / ``\n tableVariant: function tableVariant() {\n return this.bvTable.tableVariant;\n },\n tfootClasses: function tfootClasses() {\n return [this.footVariant ? \"thead-\".concat(this.footVariant) : null];\n },\n tfootAttrs: function tfootAttrs() {\n return _objectSpread(_objectSpread({}, this.bvAttrs), {}, {\n role: 'rowgroup'\n });\n }\n },\n render: function render(h) {\n return h('tfoot', {\n class: this.tfootClasses,\n attrs: this.tfootAttrs,\n // Pass down any native listeners\n on: this.bvListeners\n }, this.normalizeSlot());\n }\n});","import { Vue } from '../../../vue';\nimport { PROP_TYPE_ARRAY_OBJECT_STRING, PROP_TYPE_BOOLEAN, PROP_TYPE_STRING } from '../../../constants/props';\nimport { SLOT_NAME_CUSTOM_FOOT } from '../../../constants/slots';\nimport { makeProp } from '../../../utils/props';\nimport { BTfoot } from '../tfoot'; // --- Props ---\n\nexport var props = {\n footClone: makeProp(PROP_TYPE_BOOLEAN, false),\n // Any Bootstrap theme variant (or custom)\n // Falls back to `headRowVariant`\n footRowVariant: makeProp(PROP_TYPE_STRING),\n // 'dark', 'light', or `null` (or custom)\n footVariant: makeProp(PROP_TYPE_STRING),\n tfootClass: makeProp(PROP_TYPE_ARRAY_OBJECT_STRING),\n tfootTrClass: makeProp(PROP_TYPE_ARRAY_OBJECT_STRING)\n}; // --- Mixin ---\n// @vue/component\n\nexport var tfootMixin = Vue.extend({\n props: props,\n methods: {\n renderTFootCustom: function renderTFootCustom() {\n var h = this.$createElement;\n\n if (this.hasNormalizedSlot(SLOT_NAME_CUSTOM_FOOT)) {\n return h(BTfoot, {\n class: this.tfootClass || null,\n props: {\n footVariant: this.footVariant || this.headVariant || null\n },\n key: 'bv-tfoot-custom'\n }, this.normalizeSlot(SLOT_NAME_CUSTOM_FOOT, {\n items: this.computedItems.slice(),\n fields: this.computedFields.slice(),\n columns: this.computedFields.length\n }));\n }\n\n return h();\n },\n renderTfoot: function renderTfoot() {\n // Passing true to renderThead will make it render a tfoot\n return this.footClone ? this.renderThead(true) : this.renderTFootCustom();\n }\n }\n});","function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nimport { Vue } from '../../vue';\nimport { NAME_THEAD } from '../../constants/components';\nimport { PROP_TYPE_STRING } from '../../constants/props';\nimport { makeProp, makePropsConfigurable } from '../../utils/props';\nimport { attrsMixin } from '../../mixins/attrs';\nimport { listenersMixin } from '../../mixins/listeners';\nimport { normalizeSlotMixin } from '../../mixins/normalize-slot'; // --- Props ---\n\nexport var props = makePropsConfigurable({\n // Also sniffed by `` / `` / ``\n // Supported values: 'lite', 'dark', or `null`\n headVariant: makeProp(PROP_TYPE_STRING)\n}, NAME_THEAD); // --- Main component ---\n// TODO:\n// In Bootstrap v5, we won't need \"sniffing\" as table element variants properly inherit\n// to the child elements, so this can be converted to a functional component\n// @vue/component\n\nexport var BThead = /*#__PURE__*/Vue.extend({\n name: NAME_THEAD,\n mixins: [attrsMixin, listenersMixin, normalizeSlotMixin],\n provide: function provide() {\n return {\n bvTableRowGroup: this\n };\n },\n inject: {\n // Sniffed by `` / `` / ``\n bvTable: {\n default:\n /* istanbul ignore next */\n function _default() {\n return {};\n }\n }\n },\n inheritAttrs: false,\n props: props,\n computed: {\n // Sniffed by `` / `` / ``\n isThead: function isThead() {\n return true;\n },\n // Sniffed by `` / `` / ``\n isDark: function isDark() {\n return this.bvTable.dark;\n },\n // Sniffed by `` / `` / ``\n isStacked: function isStacked() {\n return this.bvTable.isStacked;\n },\n // Sniffed by `` / `` / ``\n isResponsive: function isResponsive() {\n return this.bvTable.isResponsive;\n },\n // Sniffed by `` / `` / ``\n // Needed to handle header background classes, due to lack of\n // background color inheritance with Bootstrap v4 table CSS\n // Sticky headers only apply to cells in table `thead`\n isStickyHeader: function isStickyHeader() {\n return !this.isStacked && this.bvTable.stickyHeader;\n },\n // Sniffed by `` / `` / ``\n // Needed to handle header background classes, due to lack of\n // background color inheritance with Bootstrap v4 table CSS\n hasStickyHeader: function hasStickyHeader() {\n return !this.isStacked && this.bvTable.stickyHeader;\n },\n // Sniffed by `` / `` / ``\n tableVariant: function tableVariant() {\n return this.bvTable.tableVariant;\n },\n theadClasses: function theadClasses() {\n return [this.headVariant ? \"thead-\".concat(this.headVariant) : null];\n },\n theadAttrs: function theadAttrs() {\n return _objectSpread({\n role: 'rowgroup'\n }, this.bvAttrs);\n }\n },\n render: function render(h) {\n return h('thead', {\n class: this.theadClasses,\n attrs: this.theadAttrs,\n // Pass down any native listeners\n on: this.bvListeners\n }, this.normalizeSlot());\n }\n});","function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }\n\nfunction _nonIterableSpread() { throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\n\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\n\nfunction _iterableToArray(iter) { if (typeof Symbol !== \"undefined\" && Symbol.iterator in Object(iter)) return Array.from(iter); }\n\nfunction _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }\n\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nimport { Vue } from '../../../vue';\nimport { EVENT_NAME_HEAD_CLICKED } from '../../../constants/events';\nimport { CODE_ENTER, CODE_SPACE } from '../../../constants/key-codes';\nimport { PROP_TYPE_ARRAY_OBJECT_STRING, PROP_TYPE_STRING } from '../../../constants/props';\nimport { SLOT_NAME_THEAD_TOP } from '../../../constants/slots';\nimport { stopEvent } from '../../../utils/events';\nimport { htmlOrText } from '../../../utils/html';\nimport { identity } from '../../../utils/identity';\nimport { isUndefinedOrNull } from '../../../utils/inspect';\nimport { noop } from '../../../utils/noop';\nimport { makeProp } from '../../../utils/props';\nimport { startCase } from '../../../utils/string';\nimport { BThead } from '../thead';\nimport { BTfoot } from '../tfoot';\nimport { BTr } from '../tr';\nimport { BTh } from '../th';\nimport { filterEvent } from './filter-event';\nimport { textSelectionActive } from './text-selection-active'; // --- Helper methods ---\n\nvar getHeadSlotName = function getHeadSlotName(value) {\n return \"head(\".concat(value || '', \")\");\n};\n\nvar getFootSlotName = function getFootSlotName(value) {\n return \"foot(\".concat(value || '', \")\");\n}; // --- Props ---\n\n\nexport var props = {\n // Any Bootstrap theme variant (or custom)\n headRowVariant: makeProp(PROP_TYPE_STRING),\n // 'light', 'dark' or `null` (or custom)\n headVariant: makeProp(PROP_TYPE_STRING),\n theadClass: makeProp(PROP_TYPE_ARRAY_OBJECT_STRING),\n theadTrClass: makeProp(PROP_TYPE_ARRAY_OBJECT_STRING)\n}; // --- Mixin ---\n// @vue/component\n\nexport var theadMixin = Vue.extend({\n props: props,\n methods: {\n fieldClasses: function fieldClasses(field) {\n // Header field () classes\n return [field.class ? field.class : '', field.thClass ? field.thClass : ''];\n },\n headClicked: function headClicked(event, field, isFoot) {\n if (this.stopIfBusy && this.stopIfBusy(event)) {\n // If table is busy (via provider) then don't propagate\n return;\n } else if (filterEvent(event)) {\n // Clicked on a non-disabled control so ignore\n return;\n } else if (textSelectionActive(this.$el)) {\n // User is selecting text, so ignore\n\n /* istanbul ignore next: JSDOM doesn't support getSelection() */\n return;\n }\n\n stopEvent(event);\n this.$emit(EVENT_NAME_HEAD_CLICKED, field.key, field, event, isFoot);\n },\n renderThead: function renderThead() {\n var _this = this;\n\n var isFoot = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;\n var fields = this.computedFields,\n isSortable = this.isSortable,\n isSelectable = this.isSelectable,\n headVariant = this.headVariant,\n footVariant = this.footVariant,\n headRowVariant = this.headRowVariant,\n footRowVariant = this.footRowVariant;\n var h = this.$createElement; // In always stacked mode, we don't bother rendering the head/foot\n // Or if no field headings (empty table)\n\n if (this.isStackedAlways || fields.length === 0) {\n return h();\n }\n\n var hasHeadClickListener = isSortable || this.hasListener(EVENT_NAME_HEAD_CLICKED); // Reference to `selectAllRows` and `clearSelected()`, if table is selectable\n\n var selectAllRows = isSelectable ? this.selectAllRows : noop;\n var clearSelected = isSelectable ? this.clearSelected : noop; // Helper function to generate a field cell\n\n var makeCell = function makeCell(field, colIndex) {\n var label = field.label,\n labelHtml = field.labelHtml,\n variant = field.variant,\n stickyColumn = field.stickyColumn,\n key = field.key;\n var ariaLabel = null;\n\n if (!field.label.trim() && !field.headerTitle) {\n // In case field's label and title are empty/blank\n // We need to add a hint about what the column is about for non-sighted users\n\n /* istanbul ignore next */\n ariaLabel = startCase(field.key);\n }\n\n var on = {};\n\n if (hasHeadClickListener) {\n on.click = function (event) {\n _this.headClicked(event, field, isFoot);\n };\n\n on.keydown = function (event) {\n var keyCode = event.keyCode;\n\n if (keyCode === CODE_ENTER || keyCode === CODE_SPACE) {\n _this.headClicked(event, field, isFoot);\n }\n };\n }\n\n var sortAttrs = isSortable ? _this.sortTheadThAttrs(key, field, isFoot) : {};\n var sortClass = isSortable ? _this.sortTheadThClasses(key, field, isFoot) : null;\n var sortLabel = isSortable ? _this.sortTheadThLabel(key, field, isFoot) : null;\n var data = {\n class: [_this.fieldClasses(field), sortClass],\n props: {\n variant: variant,\n stickyColumn: stickyColumn\n },\n style: field.thStyle || {},\n attrs: _objectSpread(_objectSpread({\n // We only add a `tabindex` of `0` if there is a head-clicked listener\n // and the current field is sortable\n tabindex: hasHeadClickListener && field.sortable ? '0' : null,\n abbr: field.headerAbbr || null,\n title: field.headerTitle || null,\n 'aria-colindex': colIndex + 1,\n 'aria-label': ariaLabel\n }, _this.getThValues(null, key, field.thAttr, isFoot ? 'foot' : 'head', {})), sortAttrs),\n on: on,\n key: key\n }; // Handle edge case where in-document templates are used with new\n // `v-slot:name` syntax where the browser lower-cases the v-slot's\n // name (attributes become lower cased when parsed by the browser)\n // We have replaced the square bracket syntax with round brackets\n // to prevent confusion with dynamic slot names\n\n var slotNames = [getHeadSlotName(key), getHeadSlotName(key.toLowerCase()), getHeadSlotName()]; // Footer will fallback to header slot names\n\n if (isFoot) {\n slotNames = [getFootSlotName(key), getFootSlotName(key.toLowerCase()), getFootSlotName()].concat(_toConsumableArray(slotNames));\n }\n\n var scope = {\n label: label,\n column: key,\n field: field,\n isFoot: isFoot,\n // Add in row select methods\n selectAllRows: selectAllRows,\n clearSelected: clearSelected\n };\n var $content = _this.normalizeSlot(slotNames, scope) || h('div', {\n domProps: htmlOrText(labelHtml, label)\n });\n var $srLabel = sortLabel ? h('span', {\n staticClass: 'sr-only'\n }, \" (\".concat(sortLabel, \")\")) : null; // Return the header cell\n\n return h(BTh, data, [$content, $srLabel].filter(identity));\n }; // Generate the array of cells\n\n\n var $cells = fields.map(makeCell).filter(identity); // Generate the row(s)\n\n var $trs = [];\n\n if (isFoot) {\n $trs.push(h(BTr, {\n class: this.tfootTrClass,\n props: {\n variant: isUndefinedOrNull(footRowVariant) ? headRowVariant :\n /* istanbul ignore next */\n footRowVariant\n }\n }, $cells));\n } else {\n var scope = {\n columns: fields.length,\n fields: fields,\n // Add in row select methods\n selectAllRows: selectAllRows,\n clearSelected: clearSelected\n };\n $trs.push(this.normalizeSlot(SLOT_NAME_THEAD_TOP, scope) || h());\n $trs.push(h(BTr, {\n class: this.theadTrClass,\n props: {\n variant: headRowVariant\n }\n }, $cells));\n }\n\n return h(isFoot ? BTfoot : BThead, {\n class: (isFoot ? this.tfootClass : this.theadClass) || null,\n props: isFoot ? {\n footVariant: footVariant || headVariant || null\n } : {\n headVariant: headVariant || null\n },\n key: isFoot ? 'bv-tfoot' : 'bv-thead'\n }, $trs);\n }\n }\n});","import { Vue } from '../../../vue';\nimport { SLOT_NAME_TOP_ROW } from '../../../constants/slots';\nimport { isFunction } from '../../../utils/inspect';\nimport { BTr } from '../tr'; // --- Props ---\n\nexport var props = {}; // --- Mixin ---\n// @vue/component\n\nexport var topRowMixin = Vue.extend({\n methods: {\n renderTopRow: function renderTopRow() {\n var fields = this.computedFields,\n stacked = this.stacked,\n tbodyTrClass = this.tbodyTrClass,\n tbodyTrAttr = this.tbodyTrAttr;\n var h = this.$createElement; // Add static Top Row slot (hidden in visibly stacked mode as we can't control the data-label)\n // If in *always* stacked mode, we don't bother rendering the row\n\n if (!this.hasNormalizedSlot(SLOT_NAME_TOP_ROW) || stacked === true || stacked === '') {\n return h();\n }\n\n return h(BTr, {\n staticClass: 'b-table-top-row',\n class: [isFunction(tbodyTrClass) ? tbodyTrClass(null, 'row-top') : tbodyTrClass],\n attrs: isFunction(tbodyTrAttr) ? tbodyTrAttr(null, 'row-top') : tbodyTrAttr,\n key: 'b-top-row'\n }, [this.normalizeSlot(SLOT_NAME_TOP_ROW, {\n columns: fields.length,\n fields: fields\n })]);\n }\n }\n});","function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nimport { Vue } from '../../vue';\nimport { NAME_TABLE } from '../../constants/components';\nimport { sortKeys } from '../../utils/object';\nimport { makePropsConfigurable } from '../../utils/props';\nimport { attrsMixin } from '../../mixins/attrs';\nimport { hasListenerMixin } from '../../mixins/has-listener';\nimport { idMixin, props as idProps } from '../../mixins/id';\nimport { normalizeSlotMixin } from '../../mixins/normalize-slot';\nimport { bottomRowMixin, props as bottomRowProps } from './helpers/mixin-bottom-row';\nimport { busyMixin, props as busyProps } from './helpers/mixin-busy';\nimport { captionMixin, props as captionProps } from './helpers/mixin-caption';\nimport { colgroupMixin, props as colgroupProps } from './helpers/mixin-colgroup';\nimport { emptyMixin, props as emptyProps } from './helpers/mixin-empty';\nimport { filteringMixin, props as filteringProps } from './helpers/mixin-filtering';\nimport { itemsMixin, props as itemsProps } from './helpers/mixin-items';\nimport { paginationMixin, props as paginationProps } from './helpers/mixin-pagination';\nimport { providerMixin, props as providerProps } from './helpers/mixin-provider';\nimport { selectableMixin, props as selectableProps } from './helpers/mixin-selectable';\nimport { sortingMixin, props as sortingProps } from './helpers/mixin-sorting';\nimport { stackedMixin, props as stackedProps } from './helpers/mixin-stacked';\nimport { tableRendererMixin, props as tableRendererProps } from './helpers/mixin-table-renderer';\nimport { tbodyMixin, props as tbodyProps } from './helpers/mixin-tbody';\nimport { tfootMixin, props as tfootProps } from './helpers/mixin-tfoot';\nimport { theadMixin, props as theadProps } from './helpers/mixin-thead';\nimport { topRowMixin, props as topRowProps } from './helpers/mixin-top-row'; // --- Props ---\n\nexport var props = makePropsConfigurable(sortKeys(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread({}, idProps), bottomRowProps), busyProps), captionProps), colgroupProps), emptyProps), filteringProps), itemsProps), paginationProps), providerProps), selectableProps), sortingProps), stackedProps), tableRendererProps), tbodyProps), tfootProps), theadProps), topRowProps)), NAME_TABLE); // --- Main component ---\n// @vue/component\n\nexport var BTable = /*#__PURE__*/Vue.extend({\n name: NAME_TABLE,\n // Order of mixins is important!\n // They are merged from first to last, followed by this component\n mixins: [// General mixins\n attrsMixin, hasListenerMixin, idMixin, normalizeSlotMixin, // Required table mixins\n itemsMixin, tableRendererMixin, stackedMixin, theadMixin, tfootMixin, tbodyMixin, // Table features mixins\n stackedMixin, filteringMixin, sortingMixin, paginationMixin, captionMixin, colgroupMixin, selectableMixin, emptyMixin, topRowMixin, bottomRowMixin, busyMixin, providerMixin],\n props: props // Render function is provided by `tableRendererMixin`\n\n});","export const countDecimals = function(number) {\n if (Math.floor(number) === number) return 0\n\n const str = number.toString()\n if (str.lastIndexOf('.') !== -1) {\n return str.split('.').pop().length || 0\n }\n return 0\n}","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:\"ag-input-wrapper zindex-4\"},[(_vm.params.type === 'select')?_c('v-select',{ref:\"select\",staticClass:\"w-100\",class:[_vm.open ? 'display-open' : 'display-close'],attrs:{\"id\":\"table-select-filter\",\"appendToBody\":\"\",\"label\":_vm.label,\"multiple\":_vm.params.multiple ? true : false,\"options\":_vm.arrayOfData,\"reduce\":_vm.params.selectValue && _vm.params.selectValue !== '' ? function (item) { return item[_vm.params.selectValue]; } : function (item) { return item.id; }},on:{\"open\":_vm.isOpen,\"close\":_vm.isClosed,\"input\":_vm.onInputBoxChanged},model:{value:(_vm.value),callback:function ($$v) {_vm.value=$$v},expression:\"value\"}}):(_vm.params.type === 'number' || _vm.params.type === 'percentage')?_c('b-form-input',{staticClass:\"w-100\",attrs:{\"type\":\"number\",\"min\":\"0\",\"step\":\"0.01\"},on:{\"input\":_vm.onInputBoxChanged,\"keydown\":_vm.keydown},model:{value:(_vm.value),callback:function ($$v) {_vm.value=$$v},expression:\"value\"}}):(_vm.params.type === 'date')?_c('date-picker',{staticClass:\"relative w-100\",class:[_vm.open ? 'display-open':'display-close'],attrs:{\"locale\":_vm.currentLocale,\"first-day-of-week\":2,\"popover-direction\":\"top\",\"is-range\":\"\",\"masks\":{input: ['DD. MM. YYYY'], data: ['DD. MM. YYYY']}},on:{\"input\":_vm.onInputBoxChanged},scopedSlots:_vm._u([{key:\"default\",fn:function(ref){\nvar inputValue = ref.inputValue;\nvar inputEvents = ref.inputEvents;\nreturn [_c('div',{staticClass:\"flex justify-center items-center\"},[_c('b-input-group',{scopedSlots:_vm._u([(inputValue.start !== null)?{key:\"append\",fn:function(){return [_c('b-button',{staticClass:\"not-disabled form-control\",attrs:{\"size\":\"sm\"}},[_c('feather-icon',{staticClass:\"cart-item-remove cursor-pointer\",attrs:{\"icon\":\"XIcon\"},on:{\"click\":_vm.resetDates}})],1)]},proxy:true}:null],null,true)},[_c('b-form-input',_vm._g({staticClass:\"not-disabled\",attrs:{\"value\":inputValue.start !== null ? ((inputValue.start) + \" - \" + (inputValue.end)) : '',\"disabled\":\"\"},on:{\"click\":_vm.isOpen}},inputEvents.start))],1)],1)]}}]),model:{value:(_vm.dates),callback:function ($$v) {_vm.dates=$$v},expression:\"dates\"}}):(_vm.params.type === 'number' || _vm.params.type === 'percentage' || _vm.params.type === 'decimal')?_c('b-form-input',{staticClass:\"w-100\",attrs:{\"type\":\"number\",\"min\":\"0\",\"step\":\"0.01\"},on:{\"input\":_vm.onInputBoxChanged,\"keydown\":_vm.keydown},model:{value:(_vm.dates),callback:function ($$v) {_vm.dates=$$v},expression:\"dates\"}}):_c('b-form-input',{staticClass:\"w-100\",attrs:{\"type\":\"text\"},on:{\"input\":_vm.onInputBoxChanged,\"keydown\":_vm.keydown},model:{value:(_vm.value),callback:function ($$v) {_vm.value=$$v},expression:\"value\"}})],1)}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","\n \n \n\n\n\n","import mod from \"-!../../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../../node_modules/thread-loader/dist/cjs.js!../../../../node_modules/babel-loader/lib/index.js!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./FloatingFilter.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../../node_modules/thread-loader/dist/cjs.js!../../../../node_modules/babel-loader/lib/index.js!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./FloatingFilter.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./FloatingFilter.vue?vue&type=template&id=5b95f85a&\"\nimport script from \"./FloatingFilter.vue?vue&type=script&lang=js&\"\nexport * from \"./FloatingFilter.vue?vue&type=script&lang=js&\"\nimport style0 from \"./FloatingFilter.vue?vue&type=style&index=0&lang=css&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\nexport default component.exports","export * from \"-!../../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../../../../node_modules/css-loader/dist/cjs.js??ref--6-oneOf-1-1!../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../node_modules/postcss-loader/src/index.js??ref--6-oneOf-1-2!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./DateEditor.vue?vue&type=style&index=0&lang=css&\"","export * from \"-!../../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../../../../node_modules/css-loader/dist/cjs.js??ref--6-oneOf-1-1!../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../node_modules/postcss-loader/src/index.js??ref--6-oneOf-1-2!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./FloatingFilter.vue?vue&type=style&index=0&lang=css&\"","export * from \"-!../../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../../../../node_modules/css-loader/dist/cjs.js??ref--6-oneOf-1-1!../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../node_modules/postcss-loader/src/index.js??ref--6-oneOf-1-2!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./CustomTooltip.vue?vue&type=style&index=0&lang=css&\"","\"use strict\";\nfunction __export(m) {\n for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];\n}\nObject.defineProperty(exports, \"__esModule\", { value: true });\n__export(require(\"./lib/AgGridVue\"));\n\n","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('b-overlay',{attrs:{\"show\":_vm.showLoader}},[_c('b-card',{attrs:{\"title\":_vm.$t('invoices.unissued_invoices')}},[(_vm.$hasPermission(_vm.$permissions.InvoicesWrite))?_c('b-row',{staticClass:\"d-flex justify-content-between\"},[_c('div',{staticClass:\"pb-1 pl-1\"},[_c('b-button',{attrs:{\"variant\":\"primary\"},on:{\"click\":_vm.issueInvoices}},[_vm._v(\" \"+_vm._s(_vm.$t('invoices.issue_invoices'))+\" \")])],1),_c('div',{staticClass:\"pb-1 pr-1\"},[_c('b-button',{attrs:{\"variant\":\"primary\"},on:{\"click\":_vm.redirectTo}},[_vm._v(\" \"+_vm._s(_vm.$t('invoices.issue_invoice'))+\" \")])],1)]):_vm._e(),_c('b-row',[_c('b-col',[_c('b-form-group',{attrs:{\"label\":_vm.$t('general.date_from')}},[_c('date-picker',{attrs:{\"locale\":_vm.currentLocale,\"first-day-of-week\":2,\"max-date\":_vm.dateTo,\"disabled-dates\":\"\",\"is24hr\":\"\",\"model-config\":_vm.modelConfig,\"masks\":{ input: ['DD. MM. YYYY'], data: ['DD. MM. YYYY'] },\"is-required\":true},on:{\"input\":_vm.trackDateChange},scopedSlots:_vm._u([{key:\"default\",fn:function(ref){\nvar inputValue = ref.inputValue;\nvar inputEvents = ref.inputEvents;\nreturn [_c('input',_vm._g({staticClass:\"form-control\",domProps:{\"value\":inputValue}},inputEvents))]}}]),model:{value:(_vm.dateFrom),callback:function ($$v) {_vm.dateFrom=$$v},expression:\"dateFrom\"}})],1)],1),_c('b-col',[_c('b-form-group',{attrs:{\"label\":_vm.$t('general.date_to')}},[_c('date-picker',{attrs:{\"locale\":_vm.currentLocale,\"first-day-of-week\":2,\"min-date\":_vm.dateFrom,\"model-config\":_vm.modelConfig,\"disabled-dates\":\"\",\"is24hr\":\"\",\"masks\":{ input: ['DD. MM. YYYY'], data: ['DD. MM. YYYY'] },\"is-required\":true},on:{\"input\":_vm.trackDateChange},scopedSlots:_vm._u([{key:\"default\",fn:function(ref){\nvar inputValue = ref.inputValue;\nvar inputEvents = ref.inputEvents;\nreturn [_c('input',_vm._g({staticClass:\"form-control\",domProps:{\"value\":inputValue}},inputEvents))]}}]),model:{value:(_vm.dateTo),callback:function ($$v) {_vm.dateTo=$$v},expression:\"dateTo\"}})],1)],1)],1)],1),_c('InvoiceStatistics',{attrs:{\"date-from\":_vm.dateFrom,\"date-to\":_vm.dateTo,\"invoice-type\":\"unissued\"}}),_c('b-card',{staticClass:\"my-1 d-flex align-center\"},[(!this.showLoader)?_c('CustomTable',{ref:\"unissuedInvoicesTable\",attrs:{\"additionalFilters\":_vm.filters,\"fields\":_vm.computedColumnDefs,\"api-url\":\"/api/client/v1/invoices/\"},scopedSlots:_vm._u([{key:\"actions\",fn:function(ref){\nvar item = ref.item;\nreturn [_c('BButton',{staticStyle:{\"min-width\":\"120px\",\"padding\":\"5px 10px\"},attrs:{\"size\":\"sm\"},on:{\"click\":function($event){return _vm.previewBill(item.id)}}},[_vm._v(\" \"+_vm._s(_vm.$t('general.view_bill'))+\" \")])]}}],null,false,2171364894)}):_vm._e()],1),_c('issue-invoices',{ref:\"issueInvoices\"})],1)}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","import mod from \"-!../../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../../node_modules/thread-loader/dist/cjs.js!../../../../node_modules/babel-loader/lib/index.js!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Invoices.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../../node_modules/thread-loader/dist/cjs.js!../../../../node_modules/babel-loader/lib/index.js!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Invoices.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./Invoices.vue?vue&type=template&id=a9cce580&scoped=true&\"\nimport script from \"./Invoices.vue?vue&type=script&lang=js&\"\nexport * from \"./Invoices.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"a9cce580\",\n null\n \n)\n\nexport default component.exports","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:\"h-100 d-flex align-items-center\"},[_c('b-form-input',{ref:\"input\",staticClass:\"w-100 h-100\",attrs:{\"type\":\"number\",\"min\":\"0\",\"step\":\"0.01\"},on:{\"keydown\":function (evt) { return ['e', 'E', '+'].includes(evt.key) && evt.preventDefault(); }},model:{value:(_vm.value),callback:function ($$v) {_vm.value=_vm._n($$v)},expression:\"value\"}})],1)}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","\n \n ['e', 'E', '+'].includes(evt.key) && evt.preventDefault()\"/>\n
\n \n","import mod from \"-!../../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../../node_modules/thread-loader/dist/cjs.js!../../../../node_modules/babel-loader/lib/index.js!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./PriceAndPercentageEditor.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../../node_modules/thread-loader/dist/cjs.js!../../../../node_modules/babel-loader/lib/index.js!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./PriceAndPercentageEditor.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./PriceAndPercentageEditor.vue?vue&type=template&id=23e123e9&\"\nimport script from \"./PriceAndPercentageEditor.vue?vue&type=script&lang=js&\"\nexport * from \"./PriceAndPercentageEditor.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\nexport default component.exports","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('b-modal',{ref:\"issueInvoices\",attrs:{\"title\":_vm.$t('invoices.issuing_invoices'),\"size\":\"lg\",\"content-class\":\"bModalExpand\"},on:{\"hide\":_vm.clearData},scopedSlots:_vm._u([{key:\"default\",fn:function(){return [_c('div',[_c('div',{staticStyle:{\"padding-bottom\":\"10px\"}},[_c('validation-observer',{ref:\"validation\"},[_c('b-form-group',{attrs:{\"label\":_vm.$t('invoices.period')}},[_c('validation-provider',{attrs:{\"name\":_vm.$t('invoices.period'),\"rules\":\"required\"},scopedSlots:_vm._u([{key:\"default\",fn:function(ref){\nvar errors = ref.errors;\nreturn [_c('date-picker',{attrs:{\"locale\":_vm.currentLocale,\"first-day-of-week\":2,\"masks\":{ input: 'DD.MM.YYYY'},\"update-on-input\":false,\"model-config\":_vm.modelConfig,\"is-range\":\"\",\"is-required\":true},on:{\"input\":_vm.dateChanged},scopedSlots:_vm._u([{key:\"default\",fn:function(ref){\nvar inputValue = ref.inputValue;\nvar inputEvents = ref.inputEvents;\nreturn [_c('input',_vm._g({staticClass:\"form-control\",attrs:{\"disabled\":true},domProps:{\"value\":_vm.formatDate(inputValue)}},inputEvents.start))]}}],null,true),model:{value:(_vm.addObject.range),callback:function ($$v) {_vm.$set(_vm.addObject, \"range\", $$v)},expression:\"addObject.range\"}}),_c('small',{staticClass:\"text-danger\"},[_vm._v(_vm._s(errors[0]))])]}}])})],1)],1)],1),_c('b-form-group',{attrs:{\"label\":_vm.$t('invoices.unissued_invoices')}},[_c('TableWithCheckBox',{ref:\"tableWithInvoices\",attrs:{\"columnDefs\":_vm.columnDefs,\"rowData\":_vm.buyers,\"selected\":_vm.selectedBuyers,\"selectValue\":\"buyer.id\",\"findValueInArray\":true},on:{\"selectionChanged\":_vm.selectionChanged}})],1)],1)]},proxy:true},{key:\"modal-footer\",fn:function(){return [_c('b-button',{attrs:{\"variant\":\"primary\",\"disabled\":_vm.selectedBuyers.length === 0},on:{\"click\":_vm.finishIssuingInvoices}},[_c('span',{staticClass:\"align-middle\"},[_vm._v(_vm._s(_vm.$t('general.accept')))])])]},proxy:true}])})}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","\n \n \n \n
\n \n \n \n \n \n \n \n \n {{errors[0]}} \n \n \n \n
\n
\n \n \n
\n \n \n \n {{ $t('general.accept') }} \n \n \n \n \n\n\n\n\n\n\n\n","import mod from \"-!../../../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../../../node_modules/thread-loader/dist/cjs.js!../../../../../node_modules/babel-loader/lib/index.js!../../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./IssueInvoices.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../../../node_modules/thread-loader/dist/cjs.js!../../../../../node_modules/babel-loader/lib/index.js!../../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./IssueInvoices.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./IssueInvoices.vue?vue&type=template&id=90e44c66&scoped=true&\"\nimport script from \"./IssueInvoices.vue?vue&type=script&lang=js&\"\nexport * from \"./IssueInvoices.vue?vue&type=script&lang=js&\"\nimport style0 from \"./IssueInvoices.vue?vue&type=style&index=0&id=90e44c66&scoped=true&lang=css&\"\nimport style1 from \"./IssueInvoices.vue?vue&type=style&index=1&lang=css&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"90e44c66\",\n null\n \n)\n\nexport default component.exports","var DESCRIPTORS = require('../internals/descriptors');\nvar global = require('../internals/global');\nvar isForced = require('../internals/is-forced');\nvar inheritIfRequired = require('../internals/inherit-if-required');\nvar defineProperty = require('../internals/object-define-property').f;\nvar getOwnPropertyNames = require('../internals/object-get-own-property-names').f;\nvar isRegExp = require('../internals/is-regexp');\nvar getFlags = require('../internals/regexp-flags');\nvar stickyHelpers = require('../internals/regexp-sticky-helpers');\nvar redefine = require('../internals/redefine');\nvar fails = require('../internals/fails');\nvar setInternalState = require('../internals/internal-state').set;\nvar setSpecies = require('../internals/set-species');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\n\nvar MATCH = wellKnownSymbol('match');\nvar NativeRegExp = global.RegExp;\nvar RegExpPrototype = NativeRegExp.prototype;\nvar re1 = /a/g;\nvar re2 = /a/g;\n\n// \"new\" should create a new object, old webkit bug\nvar CORRECT_NEW = new NativeRegExp(re1) !== re1;\n\nvar UNSUPPORTED_Y = stickyHelpers.UNSUPPORTED_Y;\n\nvar FORCED = DESCRIPTORS && isForced('RegExp', (!CORRECT_NEW || UNSUPPORTED_Y || fails(function () {\n re2[MATCH] = false;\n // RegExp constructor can alter flags and IsRegExp works correct with @@match\n return NativeRegExp(re1) != re1 || NativeRegExp(re2) == re2 || NativeRegExp(re1, 'i') != '/a/i';\n})));\n\n// `RegExp` constructor\n// https://tc39.github.io/ecma262/#sec-regexp-constructor\nif (FORCED) {\n var RegExpWrapper = function RegExp(pattern, flags) {\n var thisIsRegExp = this instanceof RegExpWrapper;\n var patternIsRegExp = isRegExp(pattern);\n var flagsAreUndefined = flags === undefined;\n var sticky;\n\n if (!thisIsRegExp && patternIsRegExp && pattern.constructor === RegExpWrapper && flagsAreUndefined) {\n return pattern;\n }\n\n if (CORRECT_NEW) {\n if (patternIsRegExp && !flagsAreUndefined) pattern = pattern.source;\n } else if (pattern instanceof RegExpWrapper) {\n if (flagsAreUndefined) flags = getFlags.call(pattern);\n pattern = pattern.source;\n }\n\n if (UNSUPPORTED_Y) {\n sticky = !!flags && flags.indexOf('y') > -1;\n if (sticky) flags = flags.replace(/y/g, '');\n }\n\n var result = inheritIfRequired(\n CORRECT_NEW ? new NativeRegExp(pattern, flags) : NativeRegExp(pattern, flags),\n thisIsRegExp ? this : RegExpPrototype,\n RegExpWrapper\n );\n\n if (UNSUPPORTED_Y && sticky) setInternalState(result, { sticky: sticky });\n\n return result;\n };\n var proxy = function (key) {\n key in RegExpWrapper || defineProperty(RegExpWrapper, key, {\n configurable: true,\n get: function () { return NativeRegExp[key]; },\n set: function (it) { NativeRegExp[key] = it; }\n });\n };\n var keys = getOwnPropertyNames(NativeRegExp);\n var index = 0;\n while (keys.length > index) proxy(keys[index++]);\n RegExpPrototype.constructor = RegExpWrapper;\n RegExpWrapper.prototype = RegExpPrototype;\n redefine(global, 'RegExp', RegExpWrapper);\n}\n\n// https://tc39.github.io/ecma262/#sec-get-regexp-@@species\nsetSpecies('RegExp');\n","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('b-modal',{attrs:{\"title\":_vm.params.column.colDef.headerName,\"no-close-on-backdrop\":\"\"},scopedSlots:_vm._u([{key:\"default\",fn:function(){return [_c('fa',{attrs:{\"id\":\"message\",\"icon\":['fa','info-circle']}}),_c('b-form-textarea',{ref:\"input\",attrs:{\"autofocus\":\"\",\"rows\":\"5\",\"max-rows\":\"6\",\"no-resize\":\"\"},model:{value:(_vm.value),callback:function ($$v) {_vm.value=$$v},expression:\"value\"}}),_c('b-tooltip',{attrs:{\"target\":\"message\"}},[_vm._v(_vm._s(_vm.$t('general.max_rows')))])]},proxy:true},{key:\"modal-footer\",fn:function(){return [_c('b-button',{attrs:{\"variant\":\"primary\"},on:{\"click\":function($event){return _vm.params.api.stopEditing()}}},[_c('feather-icon',{staticClass:\"mr-50\",attrs:{\"icon\":\"EditIcon\"}}),_c('span',{staticClass:\"align-middle\"},[_vm._v(_vm._s(_vm.$t('general.edit')))])],1)]},proxy:true}]),model:{value:(_vm.modalActive),callback:function ($$v) {_vm.modalActive=$$v},expression:\"modalActive\"}})}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","\n \n \n \n \n {{$t('general.max_rows')}} \n \n \n \n \n {{ $t('general.edit') }} \n \n \n \n \n","import mod from \"-!../../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../../node_modules/thread-loader/dist/cjs.js!../../../../node_modules/babel-loader/lib/index.js!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./TextAreaEditor.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../../node_modules/thread-loader/dist/cjs.js!../../../../node_modules/babel-loader/lib/index.js!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./TextAreaEditor.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./TextAreaEditor.vue?vue&type=template&id=2b4e8f73&\"\nimport script from \"./TextAreaEditor.vue?vue&type=script&lang=js&\"\nexport * from \"./TextAreaEditor.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\nexport default component.exports","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',[(_vm.params.multiple)?_c('div',[_c('b-modal',{attrs:{\"title\":_vm.params.column.colDef.headerName,\"scrollable\":false,\"centered\":\"\",\"no-close-on-backdrop\":\"\"},on:{\"hide\":function($event){return _vm.params.api.stopEditing(true)}},scopedSlots:_vm._u([{key:\"default\",fn:function(){return [_c('TableWithCheckBox',{attrs:{\"columnDefs\":_vm.columnDefs,\"rowData\":_vm.arrayOfData,\"selected\":_vm.value,\"selectValue\":_vm.params.selectValue,\"findValueInArray\":_vm.params.findValueInArray},on:{\"selectionChanged\":_vm.selectionChanged}})]},proxy:true},{key:\"modal-footer\",fn:function(){return [_c('b-button',{attrs:{\"variant\":\"primary\"},on:{\"click\":function($event){return _vm.params.api.stopEditing()}}},[_c('feather-icon',{staticClass:\"mr-50\",attrs:{\"icon\":\"EditIcon\"}}),_c('span',{staticClass:\"align-middle\"},[_vm._v(_vm._s(_vm.$t('general.edit')))])],1)]},proxy:true}],null,false,395257842),model:{value:(_vm.modalActive),callback:function ($$v) {_vm.modalActive=$$v},expression:\"modalActive\"}})],1):_c('div',{staticClass:\"outer\"},[_c('v-select',{ref:\"select\",class:[_vm.open ? 'display-open':'display-close'],staticStyle:{\"height\":\"42px\"},attrs:{\"id\":\"table-select\",\"appendToBody\":\"\",\"calculatePosition\":_vm.calculatePosition,\"closeOnSelect\":true,\"label\":\"name\",\"multiple\":_vm.params.multiple ? true:false,\"options\":_vm.arrayOfData,\"reduce\":function (item) { return item.id; }},on:{\"open\":_vm.isOpen,\"close\":_vm.onChange,\"input\":_vm.onChange},scopedSlots:_vm._u([{key:\"selected-option\",fn:function(ref){\nvar name = ref.name;\nvar img = ref.img;\nreturn [_c('div',[(img)?_c('b-img',{attrs:{\"height\":\"14px\",\"width\":\"22px\",\"src\":img}}):_vm._e(),_vm._v(\" \"+_vm._s(name ? name :'')+\" \")],1)]}},{key:\"option\",fn:function(option){return [(option.img)?_c('b-img',{attrs:{\"height\":\"14px\",\"width\":\"22px\",\"src\":option.img}}):_vm._e(),_vm._v(\" \"+_vm._s(option.name)+\" \")]}}]),model:{value:(_vm.value),callback:function ($$v) {_vm.value=$$v},expression:\"value\"}})],1)])}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","\n \n
\n
\n \n \n \n \n \n \n {{ $t('general.edit') }} \n \n \n \n
\n
\n
item.id\">\n \n \n \n {{name ? name :''}}\n
\n \n \n \n {{option.name}}\n \n\n \n
\n
\n \n\n\n","import mod from \"-!../../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../../node_modules/thread-loader/dist/cjs.js!../../../../node_modules/babel-loader/lib/index.js!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./SelectEditor.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../../node_modules/thread-loader/dist/cjs.js!../../../../node_modules/babel-loader/lib/index.js!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./SelectEditor.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./SelectEditor.vue?vue&type=template&id=08a8aee0&scoped=true&\"\nimport script from \"./SelectEditor.vue?vue&type=script&lang=js&\"\nexport * from \"./SelectEditor.vue?vue&type=script&lang=js&\"\nimport style0 from \"./SelectEditor.vue?vue&type=style&index=0&id=08a8aee0&scoped=true&lang=css&\"\nimport style1 from \"./SelectEditor.vue?vue&type=style&index=1&lang=css&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"08a8aee0\",\n null\n \n)\n\nexport default component.exports","export const HOOKS = [\n \"onChange\",\n \"onClose\",\n \"onDayCreate\",\n \"onDestroy\",\n \"onKeyDown\",\n \"onMonthChange\",\n \"onOpen\",\n \"onParseConfig\",\n \"onReady\",\n \"onValueUpdate\",\n \"onYearChange\",\n \"onPreCalendarPosition\",\n];\nexport const defaults = {\n _disable: [],\n allowInput: false,\n allowInvalidPreload: false,\n altFormat: \"F j, Y\",\n altInput: false,\n altInputClass: \"form-control input\",\n animate: typeof window === \"object\" &&\n window.navigator.userAgent.indexOf(\"MSIE\") === -1,\n ariaDateFormat: \"F j, Y\",\n autoFillDefaultTime: true,\n clickOpens: true,\n closeOnSelect: true,\n conjunction: \", \",\n dateFormat: \"Y-m-d\",\n defaultHour: 12,\n defaultMinute: 0,\n defaultSeconds: 0,\n disable: [],\n disableMobile: false,\n enableSeconds: false,\n enableTime: false,\n errorHandler: (err) => typeof console !== \"undefined\" && console.warn(err),\n getWeek: (givenDate) => {\n const date = new Date(givenDate.getTime());\n date.setHours(0, 0, 0, 0);\n date.setDate(date.getDate() + 3 - ((date.getDay() + 6) % 7));\n var week1 = new Date(date.getFullYear(), 0, 4);\n return (1 +\n Math.round(((date.getTime() - week1.getTime()) / 86400000 -\n 3 +\n ((week1.getDay() + 6) % 7)) /\n 7));\n },\n hourIncrement: 1,\n ignoredFocusElements: [],\n inline: false,\n locale: \"default\",\n minuteIncrement: 5,\n mode: \"single\",\n monthSelectorType: \"dropdown\",\n nextArrow: \" \",\n noCalendar: false,\n now: new Date(),\n onChange: [],\n onClose: [],\n onDayCreate: [],\n onDestroy: [],\n onKeyDown: [],\n onMonthChange: [],\n onOpen: [],\n onParseConfig: [],\n onReady: [],\n onValueUpdate: [],\n onYearChange: [],\n onPreCalendarPosition: [],\n plugins: [],\n position: \"auto\",\n positionElement: undefined,\n prevArrow: \" \",\n shorthandCurrentMonth: false,\n showMonths: 1,\n static: false,\n time_24hr: false,\n weekNumbers: false,\n wrap: false,\n};\n","export const english = {\n weekdays: {\n shorthand: [\"Sun\", \"Mon\", \"Tue\", \"Wed\", \"Thu\", \"Fri\", \"Sat\"],\n longhand: [\n \"Sunday\",\n \"Monday\",\n \"Tuesday\",\n \"Wednesday\",\n \"Thursday\",\n \"Friday\",\n \"Saturday\",\n ],\n },\n months: {\n shorthand: [\n \"Jan\",\n \"Feb\",\n \"Mar\",\n \"Apr\",\n \"May\",\n \"Jun\",\n \"Jul\",\n \"Aug\",\n \"Sep\",\n \"Oct\",\n \"Nov\",\n \"Dec\",\n ],\n longhand: [\n \"January\",\n \"February\",\n \"March\",\n \"April\",\n \"May\",\n \"June\",\n \"July\",\n \"August\",\n \"September\",\n \"October\",\n \"November\",\n \"December\",\n ],\n },\n daysInMonth: [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31],\n firstDayOfWeek: 0,\n ordinal: (nth) => {\n const s = nth % 100;\n if (s > 3 && s < 21)\n return \"th\";\n switch (s % 10) {\n case 1:\n return \"st\";\n case 2:\n return \"nd\";\n case 3:\n return \"rd\";\n default:\n return \"th\";\n }\n },\n rangeSeparator: \" to \",\n weekAbbreviation: \"Wk\",\n scrollTitle: \"Scroll to increment\",\n toggleTitle: \"Click to toggle\",\n amPM: [\"AM\", \"PM\"],\n yearAriaLabel: \"Year\",\n monthAriaLabel: \"Month\",\n hourAriaLabel: \"Hour\",\n minuteAriaLabel: \"Minute\",\n time_24hr: false,\n};\nexport default english;\n","export const pad = (number, length = 2) => `000${number}`.slice(length * -1);\nexport const int = (bool) => (bool === true ? 1 : 0);\nexport function debounce(fn, wait) {\n let t;\n return function () {\n clearTimeout(t);\n t = setTimeout(() => fn.apply(this, arguments), wait);\n };\n}\nexport const arrayify = (obj) => obj instanceof Array ? obj : [obj];\n","export function toggleClass(elem, className, bool) {\n if (bool === true)\n return elem.classList.add(className);\n elem.classList.remove(className);\n}\nexport function createElement(tag, className, content) {\n const e = window.document.createElement(tag);\n className = className || \"\";\n content = content || \"\";\n e.className = className;\n if (content !== undefined)\n e.textContent = content;\n return e;\n}\nexport function clearNode(node) {\n while (node.firstChild)\n node.removeChild(node.firstChild);\n}\nexport function findParent(node, condition) {\n if (condition(node))\n return node;\n else if (node.parentNode)\n return findParent(node.parentNode, condition);\n return undefined;\n}\nexport function createNumberInput(inputClassName, opts) {\n const wrapper = createElement(\"div\", \"numInputWrapper\"), numInput = createElement(\"input\", \"numInput \" + inputClassName), arrowUp = createElement(\"span\", \"arrowUp\"), arrowDown = createElement(\"span\", \"arrowDown\");\n if (navigator.userAgent.indexOf(\"MSIE 9.0\") === -1) {\n numInput.type = \"number\";\n }\n else {\n numInput.type = \"text\";\n numInput.pattern = \"\\\\d*\";\n }\n if (opts !== undefined)\n for (const key in opts)\n numInput.setAttribute(key, opts[key]);\n wrapper.appendChild(numInput);\n wrapper.appendChild(arrowUp);\n wrapper.appendChild(arrowDown);\n return wrapper;\n}\nexport function getEventTarget(event) {\n try {\n if (typeof event.composedPath === \"function\") {\n const path = event.composedPath();\n return path[0];\n }\n return event.target;\n }\n catch (error) {\n return event.target;\n }\n}\n","import { int, pad } from \"../utils\";\nconst doNothing = () => undefined;\nexport const monthToStr = (monthNumber, shorthand, locale) => locale.months[shorthand ? \"shorthand\" : \"longhand\"][monthNumber];\nexport const revFormat = {\n D: doNothing,\n F: function (dateObj, monthName, locale) {\n dateObj.setMonth(locale.months.longhand.indexOf(monthName));\n },\n G: (dateObj, hour) => {\n dateObj.setHours(parseFloat(hour));\n },\n H: (dateObj, hour) => {\n dateObj.setHours(parseFloat(hour));\n },\n J: (dateObj, day) => {\n dateObj.setDate(parseFloat(day));\n },\n K: (dateObj, amPM, locale) => {\n dateObj.setHours((dateObj.getHours() % 12) +\n 12 * int(new RegExp(locale.amPM[1], \"i\").test(amPM)));\n },\n M: function (dateObj, shortMonth, locale) {\n dateObj.setMonth(locale.months.shorthand.indexOf(shortMonth));\n },\n S: (dateObj, seconds) => {\n dateObj.setSeconds(parseFloat(seconds));\n },\n U: (_, unixSeconds) => new Date(parseFloat(unixSeconds) * 1000),\n W: function (dateObj, weekNum, locale) {\n const weekNumber = parseInt(weekNum);\n const date = new Date(dateObj.getFullYear(), 0, 2 + (weekNumber - 1) * 7, 0, 0, 0, 0);\n date.setDate(date.getDate() - date.getDay() + locale.firstDayOfWeek);\n return date;\n },\n Y: (dateObj, year) => {\n dateObj.setFullYear(parseFloat(year));\n },\n Z: (_, ISODate) => new Date(ISODate),\n d: (dateObj, day) => {\n dateObj.setDate(parseFloat(day));\n },\n h: (dateObj, hour) => {\n dateObj.setHours(parseFloat(hour));\n },\n i: (dateObj, minutes) => {\n dateObj.setMinutes(parseFloat(minutes));\n },\n j: (dateObj, day) => {\n dateObj.setDate(parseFloat(day));\n },\n l: doNothing,\n m: (dateObj, month) => {\n dateObj.setMonth(parseFloat(month) - 1);\n },\n n: (dateObj, month) => {\n dateObj.setMonth(parseFloat(month) - 1);\n },\n s: (dateObj, seconds) => {\n dateObj.setSeconds(parseFloat(seconds));\n },\n u: (_, unixMillSeconds) => new Date(parseFloat(unixMillSeconds)),\n w: doNothing,\n y: (dateObj, year) => {\n dateObj.setFullYear(2000 + parseFloat(year));\n },\n};\nexport const tokenRegex = {\n D: \"(\\\\w+)\",\n F: \"(\\\\w+)\",\n G: \"(\\\\d\\\\d|\\\\d)\",\n H: \"(\\\\d\\\\d|\\\\d)\",\n J: \"(\\\\d\\\\d|\\\\d)\\\\w+\",\n K: \"\",\n M: \"(\\\\w+)\",\n S: \"(\\\\d\\\\d|\\\\d)\",\n U: \"(.+)\",\n W: \"(\\\\d\\\\d|\\\\d)\",\n Y: \"(\\\\d{4})\",\n Z: \"(.+)\",\n d: \"(\\\\d\\\\d|\\\\d)\",\n h: \"(\\\\d\\\\d|\\\\d)\",\n i: \"(\\\\d\\\\d|\\\\d)\",\n j: \"(\\\\d\\\\d|\\\\d)\",\n l: \"(\\\\w+)\",\n m: \"(\\\\d\\\\d|\\\\d)\",\n n: \"(\\\\d\\\\d|\\\\d)\",\n s: \"(\\\\d\\\\d|\\\\d)\",\n u: \"(.+)\",\n w: \"(\\\\d\\\\d|\\\\d)\",\n y: \"(\\\\d{2})\",\n};\nexport const formats = {\n Z: (date) => date.toISOString(),\n D: function (date, locale, options) {\n return locale.weekdays.shorthand[formats.w(date, locale, options)];\n },\n F: function (date, locale, options) {\n return monthToStr(formats.n(date, locale, options) - 1, false, locale);\n },\n G: function (date, locale, options) {\n return pad(formats.h(date, locale, options));\n },\n H: (date) => pad(date.getHours()),\n J: function (date, locale) {\n return locale.ordinal !== undefined\n ? date.getDate() + locale.ordinal(date.getDate())\n : date.getDate();\n },\n K: (date, locale) => locale.amPM[int(date.getHours() > 11)],\n M: function (date, locale) {\n return monthToStr(date.getMonth(), true, locale);\n },\n S: (date) => pad(date.getSeconds()),\n U: (date) => date.getTime() / 1000,\n W: function (date, _, options) {\n return options.getWeek(date);\n },\n Y: (date) => pad(date.getFullYear(), 4),\n d: (date) => pad(date.getDate()),\n h: (date) => (date.getHours() % 12 ? date.getHours() % 12 : 12),\n i: (date) => pad(date.getMinutes()),\n j: (date) => date.getDate(),\n l: function (date, locale) {\n return locale.weekdays.longhand[date.getDay()];\n },\n m: (date) => pad(date.getMonth() + 1),\n n: (date) => date.getMonth() + 1,\n s: (date) => date.getSeconds(),\n u: (date) => date.getTime(),\n w: (date) => date.getDay(),\n y: (date) => String(date.getFullYear()).substring(2),\n};\n","import { tokenRegex, revFormat, formats, } from \"./formatting\";\nimport { defaults } from \"../types/options\";\nimport { english } from \"../l10n/default\";\nexport const createDateFormatter = ({ config = defaults, l10n = english, isMobile = false, }) => (dateObj, frmt, overrideLocale) => {\n const locale = overrideLocale || l10n;\n if (config.formatDate !== undefined && !isMobile) {\n return config.formatDate(dateObj, frmt, locale);\n }\n return frmt\n .split(\"\")\n .map((c, i, arr) => formats[c] && arr[i - 1] !== \"\\\\\"\n ? formats[c](dateObj, locale, config)\n : c !== \"\\\\\"\n ? c\n : \"\")\n .join(\"\");\n};\nexport const createDateParser = ({ config = defaults, l10n = english }) => (date, givenFormat, timeless, customLocale) => {\n if (date !== 0 && !date)\n return undefined;\n const locale = customLocale || l10n;\n let parsedDate;\n const dateOrig = date;\n if (date instanceof Date)\n parsedDate = new Date(date.getTime());\n else if (typeof date !== \"string\" &&\n date.toFixed !== undefined)\n parsedDate = new Date(date);\n else if (typeof date === \"string\") {\n const format = givenFormat || (config || defaults).dateFormat;\n const datestr = String(date).trim();\n if (datestr === \"today\") {\n parsedDate = new Date();\n timeless = true;\n }\n else if (/Z$/.test(datestr) ||\n /GMT$/.test(datestr))\n parsedDate = new Date(date);\n else if (config && config.parseDate)\n parsedDate = config.parseDate(date, format);\n else {\n parsedDate =\n !config || !config.noCalendar\n ? new Date(new Date().getFullYear(), 0, 1, 0, 0, 0, 0)\n : new Date(new Date().setHours(0, 0, 0, 0));\n let matched, ops = [];\n for (let i = 0, matchIndex = 0, regexStr = \"\"; i < format.length; i++) {\n const token = format[i];\n const isBackSlash = token === \"\\\\\";\n const escaped = format[i - 1] === \"\\\\\" || isBackSlash;\n if (tokenRegex[token] && !escaped) {\n regexStr += tokenRegex[token];\n const match = new RegExp(regexStr).exec(date);\n if (match && (matched = true)) {\n ops[token !== \"Y\" ? \"push\" : \"unshift\"]({\n fn: revFormat[token],\n val: match[++matchIndex],\n });\n }\n }\n else if (!isBackSlash)\n regexStr += \".\";\n ops.forEach(({ fn, val }) => (parsedDate = fn(parsedDate, val, locale) || parsedDate));\n }\n parsedDate = matched ? parsedDate : undefined;\n }\n }\n if (!(parsedDate instanceof Date && !isNaN(parsedDate.getTime()))) {\n config.errorHandler(new Error(`Invalid date provided: ${dateOrig}`));\n return undefined;\n }\n if (timeless === true)\n parsedDate.setHours(0, 0, 0, 0);\n return parsedDate;\n};\nexport function compareDates(date1, date2, timeless = true) {\n if (timeless !== false) {\n return (new Date(date1.getTime()).setHours(0, 0, 0, 0) -\n new Date(date2.getTime()).setHours(0, 0, 0, 0));\n }\n return date1.getTime() - date2.getTime();\n}\nexport function compareTimes(date1, date2) {\n return (3600 * (date1.getHours() - date2.getHours()) +\n 60 * (date1.getMinutes() - date2.getMinutes()) +\n date1.getSeconds() -\n date2.getSeconds());\n}\nexport const isBetween = (ts, ts1, ts2) => {\n return ts > Math.min(ts1, ts2) && ts < Math.max(ts1, ts2);\n};\nexport const duration = {\n DAY: 86400000,\n};\nexport function getDefaultHours(config) {\n let hours = config.defaultHour;\n let minutes = config.defaultMinute;\n let seconds = config.defaultSeconds;\n if (config.minDate !== undefined) {\n const minHour = config.minDate.getHours();\n const minMinutes = config.minDate.getMinutes();\n const minSeconds = config.minDate.getSeconds();\n if (hours < minHour) {\n hours = minHour;\n }\n if (hours === minHour && minutes < minMinutes) {\n minutes = minMinutes;\n }\n if (hours === minHour && minutes === minMinutes && seconds < minSeconds)\n seconds = config.minDate.getSeconds();\n }\n if (config.maxDate !== undefined) {\n const maxHr = config.maxDate.getHours();\n const maxMinutes = config.maxDate.getMinutes();\n hours = Math.min(hours, maxHr);\n if (hours === maxHr)\n minutes = Math.min(maxMinutes, minutes);\n if (hours === maxHr && minutes === maxMinutes)\n seconds = config.maxDate.getSeconds();\n }\n return { hours, minutes, seconds };\n}\n","import { defaults as defaultOptions, HOOKS, } from \"./types/options\";\nimport English from \"./l10n/default\";\nimport { arrayify, debounce, int, pad } from \"./utils\";\nimport { clearNode, createElement, createNumberInput, findParent, toggleClass, getEventTarget, } from \"./utils/dom\";\nimport { compareDates, createDateParser, createDateFormatter, duration, isBetween, getDefaultHours, } from \"./utils/dates\";\nimport { tokenRegex, monthToStr } from \"./utils/formatting\";\nimport \"./utils/polyfills\";\nconst DEBOUNCED_CHANGE_MS = 300;\nfunction FlatpickrInstance(element, instanceConfig) {\n const self = {\n config: Object.assign(Object.assign({}, defaultOptions), flatpickr.defaultConfig),\n l10n: English,\n };\n self.parseDate = createDateParser({ config: self.config, l10n: self.l10n });\n self._handlers = [];\n self.pluginElements = [];\n self.loadedPlugins = [];\n self._bind = bind;\n self._setHoursFromDate = setHoursFromDate;\n self._positionCalendar = positionCalendar;\n self.changeMonth = changeMonth;\n self.changeYear = changeYear;\n self.clear = clear;\n self.close = close;\n self._createElement = createElement;\n self.destroy = destroy;\n self.isEnabled = isEnabled;\n self.jumpToDate = jumpToDate;\n self.open = open;\n self.redraw = redraw;\n self.set = set;\n self.setDate = setDate;\n self.toggle = toggle;\n function setupHelperFunctions() {\n self.utils = {\n getDaysInMonth(month = self.currentMonth, yr = self.currentYear) {\n if (month === 1 && ((yr % 4 === 0 && yr % 100 !== 0) || yr % 400 === 0))\n return 29;\n return self.l10n.daysInMonth[month];\n },\n };\n }\n function init() {\n self.element = self.input = element;\n self.isOpen = false;\n parseConfig();\n setupLocale();\n setupInputs();\n setupDates();\n setupHelperFunctions();\n if (!self.isMobile)\n build();\n bindEvents();\n if (self.selectedDates.length || self.config.noCalendar) {\n if (self.config.enableTime) {\n setHoursFromDate(self.config.noCalendar ? self.latestSelectedDateObj : undefined);\n }\n updateValue(false);\n }\n setCalendarWidth();\n const isSafari = /^((?!chrome|android).)*safari/i.test(navigator.userAgent);\n if (!self.isMobile && isSafari) {\n positionCalendar();\n }\n triggerEvent(\"onReady\");\n }\n function bindToInstance(fn) {\n return fn.bind(self);\n }\n function setCalendarWidth() {\n const config = self.config;\n if (config.weekNumbers === false && config.showMonths === 1) {\n return;\n }\n else if (config.noCalendar !== true) {\n window.requestAnimationFrame(function () {\n if (self.calendarContainer !== undefined) {\n self.calendarContainer.style.visibility = \"hidden\";\n self.calendarContainer.style.display = \"block\";\n }\n if (self.daysContainer !== undefined) {\n const daysWidth = (self.days.offsetWidth + 1) * config.showMonths;\n self.daysContainer.style.width = daysWidth + \"px\";\n self.calendarContainer.style.width =\n daysWidth +\n (self.weekWrapper !== undefined\n ? self.weekWrapper.offsetWidth\n : 0) +\n \"px\";\n self.calendarContainer.style.removeProperty(\"visibility\");\n self.calendarContainer.style.removeProperty(\"display\");\n }\n });\n }\n }\n function updateTime(e) {\n if (self.selectedDates.length === 0) {\n const defaultDate = self.config.minDate === undefined ||\n compareDates(new Date(), self.config.minDate) >= 0\n ? new Date()\n : new Date(self.config.minDate.getTime());\n const defaults = getDefaultHours(self.config);\n defaultDate.setHours(defaults.hours, defaults.minutes, defaults.seconds, defaultDate.getMilliseconds());\n self.selectedDates = [defaultDate];\n self.latestSelectedDateObj = defaultDate;\n }\n if (e !== undefined && e.type !== \"blur\") {\n timeWrapper(e);\n }\n const prevValue = self._input.value;\n setHoursFromInputs();\n updateValue();\n if (self._input.value !== prevValue) {\n self._debouncedChange();\n }\n }\n function ampm2military(hour, amPM) {\n return (hour % 12) + 12 * int(amPM === self.l10n.amPM[1]);\n }\n function military2ampm(hour) {\n switch (hour % 24) {\n case 0:\n case 12:\n return 12;\n default:\n return hour % 12;\n }\n }\n function setHoursFromInputs() {\n if (self.hourElement === undefined || self.minuteElement === undefined)\n return;\n let hours = (parseInt(self.hourElement.value.slice(-2), 10) || 0) % 24, minutes = (parseInt(self.minuteElement.value, 10) || 0) % 60, seconds = self.secondElement !== undefined\n ? (parseInt(self.secondElement.value, 10) || 0) % 60\n : 0;\n if (self.amPM !== undefined) {\n hours = ampm2military(hours, self.amPM.textContent);\n }\n const limitMinHours = self.config.minTime !== undefined ||\n (self.config.minDate &&\n self.minDateHasTime &&\n self.latestSelectedDateObj &&\n compareDates(self.latestSelectedDateObj, self.config.minDate, true) ===\n 0);\n const limitMaxHours = self.config.maxTime !== undefined ||\n (self.config.maxDate &&\n self.maxDateHasTime &&\n self.latestSelectedDateObj &&\n compareDates(self.latestSelectedDateObj, self.config.maxDate, true) ===\n 0);\n if (limitMaxHours) {\n const maxTime = self.config.maxTime !== undefined\n ? self.config.maxTime\n : self.config.maxDate;\n hours = Math.min(hours, maxTime.getHours());\n if (hours === maxTime.getHours())\n minutes = Math.min(minutes, maxTime.getMinutes());\n if (minutes === maxTime.getMinutes())\n seconds = Math.min(seconds, maxTime.getSeconds());\n }\n if (limitMinHours) {\n const minTime = self.config.minTime !== undefined\n ? self.config.minTime\n : self.config.minDate;\n hours = Math.max(hours, minTime.getHours());\n if (hours === minTime.getHours() && minutes < minTime.getMinutes())\n minutes = minTime.getMinutes();\n if (minutes === minTime.getMinutes())\n seconds = Math.max(seconds, minTime.getSeconds());\n }\n setHours(hours, minutes, seconds);\n }\n function setHoursFromDate(dateObj) {\n const date = dateObj || self.latestSelectedDateObj;\n if (date) {\n setHours(date.getHours(), date.getMinutes(), date.getSeconds());\n }\n }\n function setHours(hours, minutes, seconds) {\n if (self.latestSelectedDateObj !== undefined) {\n self.latestSelectedDateObj.setHours(hours % 24, minutes, seconds || 0, 0);\n }\n if (!self.hourElement || !self.minuteElement || self.isMobile)\n return;\n self.hourElement.value = pad(!self.config.time_24hr\n ? ((12 + hours) % 12) + 12 * int(hours % 12 === 0)\n : hours);\n self.minuteElement.value = pad(minutes);\n if (self.amPM !== undefined)\n self.amPM.textContent = self.l10n.amPM[int(hours >= 12)];\n if (self.secondElement !== undefined)\n self.secondElement.value = pad(seconds);\n }\n function onYearInput(event) {\n const eventTarget = getEventTarget(event);\n const year = parseInt(eventTarget.value) + (event.delta || 0);\n if (year / 1000 > 1 ||\n (event.key === \"Enter\" && !/[^\\d]/.test(year.toString()))) {\n changeYear(year);\n }\n }\n function bind(element, event, handler, options) {\n if (event instanceof Array)\n return event.forEach((ev) => bind(element, ev, handler, options));\n if (element instanceof Array)\n return element.forEach((el) => bind(el, event, handler, options));\n element.addEventListener(event, handler, options);\n self._handlers.push({\n remove: () => element.removeEventListener(event, handler),\n });\n }\n function triggerChange() {\n triggerEvent(\"onChange\");\n }\n function bindEvents() {\n if (self.config.wrap) {\n [\"open\", \"close\", \"toggle\", \"clear\"].forEach((evt) => {\n Array.prototype.forEach.call(self.element.querySelectorAll(`[data-${evt}]`), (el) => bind(el, \"click\", self[evt]));\n });\n }\n if (self.isMobile) {\n setupMobile();\n return;\n }\n const debouncedResize = debounce(onResize, 50);\n self._debouncedChange = debounce(triggerChange, DEBOUNCED_CHANGE_MS);\n if (self.daysContainer && !/iPhone|iPad|iPod/i.test(navigator.userAgent))\n bind(self.daysContainer, \"mouseover\", (e) => {\n if (self.config.mode === \"range\")\n onMouseOver(getEventTarget(e));\n });\n bind(window.document.body, \"keydown\", onKeyDown);\n if (!self.config.inline && !self.config.static)\n bind(window, \"resize\", debouncedResize);\n if (window.ontouchstart !== undefined)\n bind(window.document, \"touchstart\", documentClick);\n else\n bind(window.document, \"mousedown\", documentClick);\n bind(window.document, \"focus\", documentClick, { capture: true });\n if (self.config.clickOpens === true) {\n bind(self._input, \"focus\", self.open);\n bind(self._input, \"click\", self.open);\n }\n if (self.daysContainer !== undefined) {\n bind(self.monthNav, \"click\", onMonthNavClick);\n bind(self.monthNav, [\"keyup\", \"increment\"], onYearInput);\n bind(self.daysContainer, \"click\", selectDate);\n }\n if (self.timeContainer !== undefined &&\n self.minuteElement !== undefined &&\n self.hourElement !== undefined) {\n const selText = (e) => getEventTarget(e).select();\n bind(self.timeContainer, [\"increment\"], updateTime);\n bind(self.timeContainer, \"blur\", updateTime, { capture: true });\n bind(self.timeContainer, \"click\", timeIncrement);\n bind([self.hourElement, self.minuteElement], [\"focus\", \"click\"], selText);\n if (self.secondElement !== undefined)\n bind(self.secondElement, \"focus\", () => self.secondElement && self.secondElement.select());\n if (self.amPM !== undefined) {\n bind(self.amPM, \"click\", (e) => {\n updateTime(e);\n triggerChange();\n });\n }\n }\n if (self.config.allowInput) {\n bind(self._input, \"blur\", onBlur);\n }\n }\n function jumpToDate(jumpDate, triggerChange) {\n const jumpTo = jumpDate !== undefined\n ? self.parseDate(jumpDate)\n : self.latestSelectedDateObj ||\n (self.config.minDate && self.config.minDate > self.now\n ? self.config.minDate\n : self.config.maxDate && self.config.maxDate < self.now\n ? self.config.maxDate\n : self.now);\n const oldYear = self.currentYear;\n const oldMonth = self.currentMonth;\n try {\n if (jumpTo !== undefined) {\n self.currentYear = jumpTo.getFullYear();\n self.currentMonth = jumpTo.getMonth();\n }\n }\n catch (e) {\n e.message = \"Invalid date supplied: \" + jumpTo;\n self.config.errorHandler(e);\n }\n if (triggerChange && self.currentYear !== oldYear) {\n triggerEvent(\"onYearChange\");\n buildMonthSwitch();\n }\n if (triggerChange &&\n (self.currentYear !== oldYear || self.currentMonth !== oldMonth)) {\n triggerEvent(\"onMonthChange\");\n }\n self.redraw();\n }\n function timeIncrement(e) {\n const eventTarget = getEventTarget(e);\n if (~eventTarget.className.indexOf(\"arrow\"))\n incrementNumInput(e, eventTarget.classList.contains(\"arrowUp\") ? 1 : -1);\n }\n function incrementNumInput(e, delta, inputElem) {\n const target = e && getEventTarget(e);\n const input = inputElem ||\n (target && target.parentNode && target.parentNode.firstChild);\n const event = createEvent(\"increment\");\n event.delta = delta;\n input && input.dispatchEvent(event);\n }\n function build() {\n const fragment = window.document.createDocumentFragment();\n self.calendarContainer = createElement(\"div\", \"flatpickr-calendar\");\n self.calendarContainer.tabIndex = -1;\n if (!self.config.noCalendar) {\n fragment.appendChild(buildMonthNav());\n self.innerContainer = createElement(\"div\", \"flatpickr-innerContainer\");\n if (self.config.weekNumbers) {\n const { weekWrapper, weekNumbers } = buildWeeks();\n self.innerContainer.appendChild(weekWrapper);\n self.weekNumbers = weekNumbers;\n self.weekWrapper = weekWrapper;\n }\n self.rContainer = createElement(\"div\", \"flatpickr-rContainer\");\n self.rContainer.appendChild(buildWeekdays());\n if (!self.daysContainer) {\n self.daysContainer = createElement(\"div\", \"flatpickr-days\");\n self.daysContainer.tabIndex = -1;\n }\n buildDays();\n self.rContainer.appendChild(self.daysContainer);\n self.innerContainer.appendChild(self.rContainer);\n fragment.appendChild(self.innerContainer);\n }\n if (self.config.enableTime) {\n fragment.appendChild(buildTime());\n }\n toggleClass(self.calendarContainer, \"rangeMode\", self.config.mode === \"range\");\n toggleClass(self.calendarContainer, \"animate\", self.config.animate === true);\n toggleClass(self.calendarContainer, \"multiMonth\", self.config.showMonths > 1);\n self.calendarContainer.appendChild(fragment);\n const customAppend = self.config.appendTo !== undefined &&\n self.config.appendTo.nodeType !== undefined;\n if (self.config.inline || self.config.static) {\n self.calendarContainer.classList.add(self.config.inline ? \"inline\" : \"static\");\n if (self.config.inline) {\n if (!customAppend && self.element.parentNode)\n self.element.parentNode.insertBefore(self.calendarContainer, self._input.nextSibling);\n else if (self.config.appendTo !== undefined)\n self.config.appendTo.appendChild(self.calendarContainer);\n }\n if (self.config.static) {\n const wrapper = createElement(\"div\", \"flatpickr-wrapper\");\n if (self.element.parentNode)\n self.element.parentNode.insertBefore(wrapper, self.element);\n wrapper.appendChild(self.element);\n if (self.altInput)\n wrapper.appendChild(self.altInput);\n wrapper.appendChild(self.calendarContainer);\n }\n }\n if (!self.config.static && !self.config.inline)\n (self.config.appendTo !== undefined\n ? self.config.appendTo\n : window.document.body).appendChild(self.calendarContainer);\n }\n function createDay(className, date, dayNumber, i) {\n const dateIsEnabled = isEnabled(date, true), dayElement = createElement(\"span\", \"flatpickr-day \" + className, date.getDate().toString());\n dayElement.dateObj = date;\n dayElement.$i = i;\n dayElement.setAttribute(\"aria-label\", self.formatDate(date, self.config.ariaDateFormat));\n if (className.indexOf(\"hidden\") === -1 &&\n compareDates(date, self.now) === 0) {\n self.todayDateElem = dayElement;\n dayElement.classList.add(\"today\");\n dayElement.setAttribute(\"aria-current\", \"date\");\n }\n if (dateIsEnabled) {\n dayElement.tabIndex = -1;\n if (isDateSelected(date)) {\n dayElement.classList.add(\"selected\");\n self.selectedDateElem = dayElement;\n if (self.config.mode === \"range\") {\n toggleClass(dayElement, \"startRange\", self.selectedDates[0] &&\n compareDates(date, self.selectedDates[0], true) === 0);\n toggleClass(dayElement, \"endRange\", self.selectedDates[1] &&\n compareDates(date, self.selectedDates[1], true) === 0);\n if (className === \"nextMonthDay\")\n dayElement.classList.add(\"inRange\");\n }\n }\n }\n else {\n dayElement.classList.add(\"flatpickr-disabled\");\n }\n if (self.config.mode === \"range\") {\n if (isDateInRange(date) && !isDateSelected(date))\n dayElement.classList.add(\"inRange\");\n }\n if (self.weekNumbers &&\n self.config.showMonths === 1 &&\n className !== \"prevMonthDay\" &&\n dayNumber % 7 === 1) {\n self.weekNumbers.insertAdjacentHTML(\"beforeend\", \"\" + self.config.getWeek(date) + \" \");\n }\n triggerEvent(\"onDayCreate\", dayElement);\n return dayElement;\n }\n function focusOnDayElem(targetNode) {\n targetNode.focus();\n if (self.config.mode === \"range\")\n onMouseOver(targetNode);\n }\n function getFirstAvailableDay(delta) {\n const startMonth = delta > 0 ? 0 : self.config.showMonths - 1;\n const endMonth = delta > 0 ? self.config.showMonths : -1;\n for (let m = startMonth; m != endMonth; m += delta) {\n const month = self.daysContainer.children[m];\n const startIndex = delta > 0 ? 0 : month.children.length - 1;\n const endIndex = delta > 0 ? month.children.length : -1;\n for (let i = startIndex; i != endIndex; i += delta) {\n const c = month.children[i];\n if (c.className.indexOf(\"hidden\") === -1 && isEnabled(c.dateObj))\n return c;\n }\n }\n return undefined;\n }\n function getNextAvailableDay(current, delta) {\n const givenMonth = current.className.indexOf(\"Month\") === -1\n ? current.dateObj.getMonth()\n : self.currentMonth;\n const endMonth = delta > 0 ? self.config.showMonths : -1;\n const loopDelta = delta > 0 ? 1 : -1;\n for (let m = givenMonth - self.currentMonth; m != endMonth; m += loopDelta) {\n const month = self.daysContainer.children[m];\n const startIndex = givenMonth - self.currentMonth === m\n ? current.$i + delta\n : delta < 0\n ? month.children.length - 1\n : 0;\n const numMonthDays = month.children.length;\n for (let i = startIndex; i >= 0 && i < numMonthDays && i != (delta > 0 ? numMonthDays : -1); i += loopDelta) {\n const c = month.children[i];\n if (c.className.indexOf(\"hidden\") === -1 &&\n isEnabled(c.dateObj) &&\n Math.abs(current.$i - i) >= Math.abs(delta))\n return focusOnDayElem(c);\n }\n }\n self.changeMonth(loopDelta);\n focusOnDay(getFirstAvailableDay(loopDelta), 0);\n return undefined;\n }\n function focusOnDay(current, offset) {\n const dayFocused = isInView(document.activeElement || document.body);\n const startElem = current !== undefined\n ? current\n : dayFocused\n ? document.activeElement\n : self.selectedDateElem !== undefined && isInView(self.selectedDateElem)\n ? self.selectedDateElem\n : self.todayDateElem !== undefined && isInView(self.todayDateElem)\n ? self.todayDateElem\n : getFirstAvailableDay(offset > 0 ? 1 : -1);\n if (startElem === undefined) {\n self._input.focus();\n }\n else if (!dayFocused) {\n focusOnDayElem(startElem);\n }\n else {\n getNextAvailableDay(startElem, offset);\n }\n }\n function buildMonthDays(year, month) {\n const firstOfMonth = (new Date(year, month, 1).getDay() - self.l10n.firstDayOfWeek + 7) % 7;\n const prevMonthDays = self.utils.getDaysInMonth((month - 1 + 12) % 12, year);\n const daysInMonth = self.utils.getDaysInMonth(month, year), days = window.document.createDocumentFragment(), isMultiMonth = self.config.showMonths > 1, prevMonthDayClass = isMultiMonth ? \"prevMonthDay hidden\" : \"prevMonthDay\", nextMonthDayClass = isMultiMonth ? \"nextMonthDay hidden\" : \"nextMonthDay\";\n let dayNumber = prevMonthDays + 1 - firstOfMonth, dayIndex = 0;\n for (; dayNumber <= prevMonthDays; dayNumber++, dayIndex++) {\n days.appendChild(createDay(prevMonthDayClass, new Date(year, month - 1, dayNumber), dayNumber, dayIndex));\n }\n for (dayNumber = 1; dayNumber <= daysInMonth; dayNumber++, dayIndex++) {\n days.appendChild(createDay(\"\", new Date(year, month, dayNumber), dayNumber, dayIndex));\n }\n for (let dayNum = daysInMonth + 1; dayNum <= 42 - firstOfMonth &&\n (self.config.showMonths === 1 || dayIndex % 7 !== 0); dayNum++, dayIndex++) {\n days.appendChild(createDay(nextMonthDayClass, new Date(year, month + 1, dayNum % daysInMonth), dayNum, dayIndex));\n }\n const dayContainer = createElement(\"div\", \"dayContainer\");\n dayContainer.appendChild(days);\n return dayContainer;\n }\n function buildDays() {\n if (self.daysContainer === undefined) {\n return;\n }\n clearNode(self.daysContainer);\n if (self.weekNumbers)\n clearNode(self.weekNumbers);\n const frag = document.createDocumentFragment();\n for (let i = 0; i < self.config.showMonths; i++) {\n const d = new Date(self.currentYear, self.currentMonth, 1);\n d.setMonth(self.currentMonth + i);\n frag.appendChild(buildMonthDays(d.getFullYear(), d.getMonth()));\n }\n self.daysContainer.appendChild(frag);\n self.days = self.daysContainer.firstChild;\n if (self.config.mode === \"range\" && self.selectedDates.length === 1) {\n onMouseOver();\n }\n }\n function buildMonthSwitch() {\n if (self.config.showMonths > 1 ||\n self.config.monthSelectorType !== \"dropdown\")\n return;\n const shouldBuildMonth = function (month) {\n if (self.config.minDate !== undefined &&\n self.currentYear === self.config.minDate.getFullYear() &&\n month < self.config.minDate.getMonth()) {\n return false;\n }\n return !(self.config.maxDate !== undefined &&\n self.currentYear === self.config.maxDate.getFullYear() &&\n month > self.config.maxDate.getMonth());\n };\n self.monthsDropdownContainer.tabIndex = -1;\n self.monthsDropdownContainer.innerHTML = \"\";\n for (let i = 0; i < 12; i++) {\n if (!shouldBuildMonth(i))\n continue;\n const month = createElement(\"option\", \"flatpickr-monthDropdown-month\");\n month.value = new Date(self.currentYear, i).getMonth().toString();\n month.textContent = monthToStr(i, self.config.shorthandCurrentMonth, self.l10n);\n month.tabIndex = -1;\n if (self.currentMonth === i) {\n month.selected = true;\n }\n self.monthsDropdownContainer.appendChild(month);\n }\n }\n function buildMonth() {\n const container = createElement(\"div\", \"flatpickr-month\");\n const monthNavFragment = window.document.createDocumentFragment();\n let monthElement;\n if (self.config.showMonths > 1 ||\n self.config.monthSelectorType === \"static\") {\n monthElement = createElement(\"span\", \"cur-month\");\n }\n else {\n self.monthsDropdownContainer = createElement(\"select\", \"flatpickr-monthDropdown-months\");\n self.monthsDropdownContainer.setAttribute(\"aria-label\", self.l10n.monthAriaLabel);\n bind(self.monthsDropdownContainer, \"change\", (e) => {\n const target = getEventTarget(e);\n const selectedMonth = parseInt(target.value, 10);\n self.changeMonth(selectedMonth - self.currentMonth);\n triggerEvent(\"onMonthChange\");\n });\n buildMonthSwitch();\n monthElement = self.monthsDropdownContainer;\n }\n const yearInput = createNumberInput(\"cur-year\", { tabindex: \"-1\" });\n const yearElement = yearInput.getElementsByTagName(\"input\")[0];\n yearElement.setAttribute(\"aria-label\", self.l10n.yearAriaLabel);\n if (self.config.minDate) {\n yearElement.setAttribute(\"min\", self.config.minDate.getFullYear().toString());\n }\n if (self.config.maxDate) {\n yearElement.setAttribute(\"max\", self.config.maxDate.getFullYear().toString());\n yearElement.disabled =\n !!self.config.minDate &&\n self.config.minDate.getFullYear() === self.config.maxDate.getFullYear();\n }\n const currentMonth = createElement(\"div\", \"flatpickr-current-month\");\n currentMonth.appendChild(monthElement);\n currentMonth.appendChild(yearInput);\n monthNavFragment.appendChild(currentMonth);\n container.appendChild(monthNavFragment);\n return {\n container,\n yearElement,\n monthElement,\n };\n }\n function buildMonths() {\n clearNode(self.monthNav);\n self.monthNav.appendChild(self.prevMonthNav);\n if (self.config.showMonths) {\n self.yearElements = [];\n self.monthElements = [];\n }\n for (let m = self.config.showMonths; m--;) {\n const month = buildMonth();\n self.yearElements.push(month.yearElement);\n self.monthElements.push(month.monthElement);\n self.monthNav.appendChild(month.container);\n }\n self.monthNav.appendChild(self.nextMonthNav);\n }\n function buildMonthNav() {\n self.monthNav = createElement(\"div\", \"flatpickr-months\");\n self.yearElements = [];\n self.monthElements = [];\n self.prevMonthNav = createElement(\"span\", \"flatpickr-prev-month\");\n self.prevMonthNav.innerHTML = self.config.prevArrow;\n self.nextMonthNav = createElement(\"span\", \"flatpickr-next-month\");\n self.nextMonthNav.innerHTML = self.config.nextArrow;\n buildMonths();\n Object.defineProperty(self, \"_hidePrevMonthArrow\", {\n get: () => self.__hidePrevMonthArrow,\n set(bool) {\n if (self.__hidePrevMonthArrow !== bool) {\n toggleClass(self.prevMonthNav, \"flatpickr-disabled\", bool);\n self.__hidePrevMonthArrow = bool;\n }\n },\n });\n Object.defineProperty(self, \"_hideNextMonthArrow\", {\n get: () => self.__hideNextMonthArrow,\n set(bool) {\n if (self.__hideNextMonthArrow !== bool) {\n toggleClass(self.nextMonthNav, \"flatpickr-disabled\", bool);\n self.__hideNextMonthArrow = bool;\n }\n },\n });\n self.currentYearElement = self.yearElements[0];\n updateNavigationCurrentMonth();\n return self.monthNav;\n }\n function buildTime() {\n self.calendarContainer.classList.add(\"hasTime\");\n if (self.config.noCalendar)\n self.calendarContainer.classList.add(\"noCalendar\");\n const defaults = getDefaultHours(self.config);\n self.timeContainer = createElement(\"div\", \"flatpickr-time\");\n self.timeContainer.tabIndex = -1;\n const separator = createElement(\"span\", \"flatpickr-time-separator\", \":\");\n const hourInput = createNumberInput(\"flatpickr-hour\", {\n \"aria-label\": self.l10n.hourAriaLabel,\n });\n self.hourElement = hourInput.getElementsByTagName(\"input\")[0];\n const minuteInput = createNumberInput(\"flatpickr-minute\", {\n \"aria-label\": self.l10n.minuteAriaLabel,\n });\n self.minuteElement = minuteInput.getElementsByTagName(\"input\")[0];\n self.hourElement.tabIndex = self.minuteElement.tabIndex = -1;\n self.hourElement.value = pad(self.latestSelectedDateObj\n ? self.latestSelectedDateObj.getHours()\n : self.config.time_24hr\n ? defaults.hours\n : military2ampm(defaults.hours));\n self.minuteElement.value = pad(self.latestSelectedDateObj\n ? self.latestSelectedDateObj.getMinutes()\n : defaults.minutes);\n self.hourElement.setAttribute(\"step\", self.config.hourIncrement.toString());\n self.minuteElement.setAttribute(\"step\", self.config.minuteIncrement.toString());\n self.hourElement.setAttribute(\"min\", self.config.time_24hr ? \"0\" : \"1\");\n self.hourElement.setAttribute(\"max\", self.config.time_24hr ? \"23\" : \"12\");\n self.hourElement.setAttribute(\"maxlength\", \"2\");\n self.minuteElement.setAttribute(\"min\", \"0\");\n self.minuteElement.setAttribute(\"max\", \"59\");\n self.minuteElement.setAttribute(\"maxlength\", \"2\");\n self.timeContainer.appendChild(hourInput);\n self.timeContainer.appendChild(separator);\n self.timeContainer.appendChild(minuteInput);\n if (self.config.time_24hr)\n self.timeContainer.classList.add(\"time24hr\");\n if (self.config.enableSeconds) {\n self.timeContainer.classList.add(\"hasSeconds\");\n const secondInput = createNumberInput(\"flatpickr-second\");\n self.secondElement = secondInput.getElementsByTagName(\"input\")[0];\n self.secondElement.value = pad(self.latestSelectedDateObj\n ? self.latestSelectedDateObj.getSeconds()\n : defaults.seconds);\n self.secondElement.setAttribute(\"step\", self.minuteElement.getAttribute(\"step\"));\n self.secondElement.setAttribute(\"min\", \"0\");\n self.secondElement.setAttribute(\"max\", \"59\");\n self.secondElement.setAttribute(\"maxlength\", \"2\");\n self.timeContainer.appendChild(createElement(\"span\", \"flatpickr-time-separator\", \":\"));\n self.timeContainer.appendChild(secondInput);\n }\n if (!self.config.time_24hr) {\n self.amPM = createElement(\"span\", \"flatpickr-am-pm\", self.l10n.amPM[int((self.latestSelectedDateObj\n ? self.hourElement.value\n : self.config.defaultHour) > 11)]);\n self.amPM.title = self.l10n.toggleTitle;\n self.amPM.tabIndex = -1;\n self.timeContainer.appendChild(self.amPM);\n }\n return self.timeContainer;\n }\n function buildWeekdays() {\n if (!self.weekdayContainer)\n self.weekdayContainer = createElement(\"div\", \"flatpickr-weekdays\");\n else\n clearNode(self.weekdayContainer);\n for (let i = self.config.showMonths; i--;) {\n const container = createElement(\"div\", \"flatpickr-weekdaycontainer\");\n self.weekdayContainer.appendChild(container);\n }\n updateWeekdays();\n return self.weekdayContainer;\n }\n function updateWeekdays() {\n if (!self.weekdayContainer) {\n return;\n }\n const firstDayOfWeek = self.l10n.firstDayOfWeek;\n let weekdays = [...self.l10n.weekdays.shorthand];\n if (firstDayOfWeek > 0 && firstDayOfWeek < weekdays.length) {\n weekdays = [\n ...weekdays.splice(firstDayOfWeek, weekdays.length),\n ...weekdays.splice(0, firstDayOfWeek),\n ];\n }\n for (let i = self.config.showMonths; i--;) {\n self.weekdayContainer.children[i].innerHTML = `\n \n ${weekdays.join(\" \")}\n \n `;\n }\n }\n function buildWeeks() {\n self.calendarContainer.classList.add(\"hasWeeks\");\n const weekWrapper = createElement(\"div\", \"flatpickr-weekwrapper\");\n weekWrapper.appendChild(createElement(\"span\", \"flatpickr-weekday\", self.l10n.weekAbbreviation));\n const weekNumbers = createElement(\"div\", \"flatpickr-weeks\");\n weekWrapper.appendChild(weekNumbers);\n return {\n weekWrapper,\n weekNumbers,\n };\n }\n function changeMonth(value, isOffset = true) {\n const delta = isOffset ? value : value - self.currentMonth;\n if ((delta < 0 && self._hidePrevMonthArrow === true) ||\n (delta > 0 && self._hideNextMonthArrow === true))\n return;\n self.currentMonth += delta;\n if (self.currentMonth < 0 || self.currentMonth > 11) {\n self.currentYear += self.currentMonth > 11 ? 1 : -1;\n self.currentMonth = (self.currentMonth + 12) % 12;\n triggerEvent(\"onYearChange\");\n buildMonthSwitch();\n }\n buildDays();\n triggerEvent(\"onMonthChange\");\n updateNavigationCurrentMonth();\n }\n function clear(triggerChangeEvent = true, toInitial = true) {\n self.input.value = \"\";\n if (self.altInput !== undefined)\n self.altInput.value = \"\";\n if (self.mobileInput !== undefined)\n self.mobileInput.value = \"\";\n self.selectedDates = [];\n self.latestSelectedDateObj = undefined;\n if (toInitial === true) {\n self.currentYear = self._initialDate.getFullYear();\n self.currentMonth = self._initialDate.getMonth();\n }\n if (self.config.enableTime === true) {\n const { hours, minutes, seconds } = getDefaultHours(self.config);\n setHours(hours, minutes, seconds);\n }\n self.redraw();\n if (triggerChangeEvent)\n triggerEvent(\"onChange\");\n }\n function close() {\n self.isOpen = false;\n if (!self.isMobile) {\n if (self.calendarContainer !== undefined) {\n self.calendarContainer.classList.remove(\"open\");\n }\n if (self._input !== undefined) {\n self._input.classList.remove(\"active\");\n }\n }\n triggerEvent(\"onClose\");\n }\n function destroy() {\n if (self.config !== undefined)\n triggerEvent(\"onDestroy\");\n for (let i = self._handlers.length; i--;) {\n self._handlers[i].remove();\n }\n self._handlers = [];\n if (self.mobileInput) {\n if (self.mobileInput.parentNode)\n self.mobileInput.parentNode.removeChild(self.mobileInput);\n self.mobileInput = undefined;\n }\n else if (self.calendarContainer && self.calendarContainer.parentNode) {\n if (self.config.static && self.calendarContainer.parentNode) {\n const wrapper = self.calendarContainer.parentNode;\n wrapper.lastChild && wrapper.removeChild(wrapper.lastChild);\n if (wrapper.parentNode) {\n while (wrapper.firstChild)\n wrapper.parentNode.insertBefore(wrapper.firstChild, wrapper);\n wrapper.parentNode.removeChild(wrapper);\n }\n }\n else\n self.calendarContainer.parentNode.removeChild(self.calendarContainer);\n }\n if (self.altInput) {\n self.input.type = \"text\";\n if (self.altInput.parentNode)\n self.altInput.parentNode.removeChild(self.altInput);\n delete self.altInput;\n }\n if (self.input) {\n self.input.type = self.input._type;\n self.input.classList.remove(\"flatpickr-input\");\n self.input.removeAttribute(\"readonly\");\n }\n [\n \"_showTimeInput\",\n \"latestSelectedDateObj\",\n \"_hideNextMonthArrow\",\n \"_hidePrevMonthArrow\",\n \"__hideNextMonthArrow\",\n \"__hidePrevMonthArrow\",\n \"isMobile\",\n \"isOpen\",\n \"selectedDateElem\",\n \"minDateHasTime\",\n \"maxDateHasTime\",\n \"days\",\n \"daysContainer\",\n \"_input\",\n \"_positionElement\",\n \"innerContainer\",\n \"rContainer\",\n \"monthNav\",\n \"todayDateElem\",\n \"calendarContainer\",\n \"weekdayContainer\",\n \"prevMonthNav\",\n \"nextMonthNav\",\n \"monthsDropdownContainer\",\n \"currentMonthElement\",\n \"currentYearElement\",\n \"navigationCurrentMonth\",\n \"selectedDateElem\",\n \"config\",\n ].forEach((k) => {\n try {\n delete self[k];\n }\n catch (_) { }\n });\n }\n function isCalendarElem(elem) {\n if (self.config.appendTo && self.config.appendTo.contains(elem))\n return true;\n return self.calendarContainer.contains(elem);\n }\n function documentClick(e) {\n if (self.isOpen && !self.config.inline) {\n const eventTarget = getEventTarget(e);\n const isCalendarElement = isCalendarElem(eventTarget);\n const isInput = eventTarget === self.input ||\n eventTarget === self.altInput ||\n self.element.contains(eventTarget) ||\n (e.path &&\n e.path.indexOf &&\n (~e.path.indexOf(self.input) ||\n ~e.path.indexOf(self.altInput)));\n const lostFocus = e.type === \"blur\"\n ? isInput &&\n e.relatedTarget &&\n !isCalendarElem(e.relatedTarget)\n : !isInput &&\n !isCalendarElement &&\n !isCalendarElem(e.relatedTarget);\n const isIgnored = !self.config.ignoredFocusElements.some((elem) => elem.contains(eventTarget));\n if (lostFocus && isIgnored) {\n if (self.timeContainer !== undefined &&\n self.minuteElement !== undefined &&\n self.hourElement !== undefined &&\n self.input.value !== \"\" &&\n self.input.value !== undefined) {\n updateTime();\n }\n self.close();\n if (self.config &&\n self.config.mode === \"range\" &&\n self.selectedDates.length === 1) {\n self.clear(false);\n self.redraw();\n }\n }\n }\n }\n function changeYear(newYear) {\n if (!newYear ||\n (self.config.minDate && newYear < self.config.minDate.getFullYear()) ||\n (self.config.maxDate && newYear > self.config.maxDate.getFullYear()))\n return;\n const newYearNum = newYear, isNewYear = self.currentYear !== newYearNum;\n self.currentYear = newYearNum || self.currentYear;\n if (self.config.maxDate &&\n self.currentYear === self.config.maxDate.getFullYear()) {\n self.currentMonth = Math.min(self.config.maxDate.getMonth(), self.currentMonth);\n }\n else if (self.config.minDate &&\n self.currentYear === self.config.minDate.getFullYear()) {\n self.currentMonth = Math.max(self.config.minDate.getMonth(), self.currentMonth);\n }\n if (isNewYear) {\n self.redraw();\n triggerEvent(\"onYearChange\");\n buildMonthSwitch();\n }\n }\n function isEnabled(date, timeless = true) {\n var _a;\n const dateToCheck = self.parseDate(date, undefined, timeless);\n if ((self.config.minDate &&\n dateToCheck &&\n compareDates(dateToCheck, self.config.minDate, timeless !== undefined ? timeless : !self.minDateHasTime) < 0) ||\n (self.config.maxDate &&\n dateToCheck &&\n compareDates(dateToCheck, self.config.maxDate, timeless !== undefined ? timeless : !self.maxDateHasTime) > 0))\n return false;\n if (!self.config.enable && self.config.disable.length === 0)\n return true;\n if (dateToCheck === undefined)\n return false;\n const bool = !!self.config.enable, array = (_a = self.config.enable) !== null && _a !== void 0 ? _a : self.config.disable;\n for (let i = 0, d; i < array.length; i++) {\n d = array[i];\n if (typeof d === \"function\" &&\n d(dateToCheck))\n return bool;\n else if (d instanceof Date &&\n dateToCheck !== undefined &&\n d.getTime() === dateToCheck.getTime())\n return bool;\n else if (typeof d === \"string\") {\n const parsed = self.parseDate(d, undefined, true);\n return parsed && parsed.getTime() === dateToCheck.getTime()\n ? bool\n : !bool;\n }\n else if (typeof d === \"object\" &&\n dateToCheck !== undefined &&\n d.from &&\n d.to &&\n dateToCheck.getTime() >= d.from.getTime() &&\n dateToCheck.getTime() <= d.to.getTime())\n return bool;\n }\n return !bool;\n }\n function isInView(elem) {\n if (self.daysContainer !== undefined)\n return (elem.className.indexOf(\"hidden\") === -1 &&\n elem.className.indexOf(\"flatpickr-disabled\") === -1 &&\n self.daysContainer.contains(elem));\n return false;\n }\n function onBlur(e) {\n const isInput = e.target === self._input;\n if (isInput &&\n (self.selectedDates.length > 0 || self._input.value.length > 0) &&\n !(e.relatedTarget && isCalendarElem(e.relatedTarget))) {\n self.setDate(self._input.value, true, e.target === self.altInput\n ? self.config.altFormat\n : self.config.dateFormat);\n }\n }\n function onKeyDown(e) {\n const eventTarget = getEventTarget(e);\n const isInput = self.config.wrap\n ? element.contains(eventTarget)\n : eventTarget === self._input;\n const allowInput = self.config.allowInput;\n const allowKeydown = self.isOpen && (!allowInput || !isInput);\n const allowInlineKeydown = self.config.inline && isInput && !allowInput;\n if (e.keyCode === 13 && isInput) {\n if (allowInput) {\n self.setDate(self._input.value, true, eventTarget === self.altInput\n ? self.config.altFormat\n : self.config.dateFormat);\n return eventTarget.blur();\n }\n else {\n self.open();\n }\n }\n else if (isCalendarElem(eventTarget) ||\n allowKeydown ||\n allowInlineKeydown) {\n const isTimeObj = !!self.timeContainer &&\n self.timeContainer.contains(eventTarget);\n switch (e.keyCode) {\n case 13:\n if (isTimeObj) {\n e.preventDefault();\n updateTime();\n focusAndClose();\n }\n else\n selectDate(e);\n break;\n case 27:\n e.preventDefault();\n focusAndClose();\n break;\n case 8:\n case 46:\n if (isInput && !self.config.allowInput) {\n e.preventDefault();\n self.clear();\n }\n break;\n case 37:\n case 39:\n if (!isTimeObj && !isInput) {\n e.preventDefault();\n if (self.daysContainer !== undefined &&\n (allowInput === false ||\n (document.activeElement && isInView(document.activeElement)))) {\n const delta = e.keyCode === 39 ? 1 : -1;\n if (!e.ctrlKey)\n focusOnDay(undefined, delta);\n else {\n e.stopPropagation();\n changeMonth(delta);\n focusOnDay(getFirstAvailableDay(1), 0);\n }\n }\n }\n else if (self.hourElement)\n self.hourElement.focus();\n break;\n case 38:\n case 40:\n e.preventDefault();\n const delta = e.keyCode === 40 ? 1 : -1;\n if ((self.daysContainer &&\n eventTarget.$i !== undefined) ||\n eventTarget === self.input ||\n eventTarget === self.altInput) {\n if (e.ctrlKey) {\n e.stopPropagation();\n changeYear(self.currentYear - delta);\n focusOnDay(getFirstAvailableDay(1), 0);\n }\n else if (!isTimeObj)\n focusOnDay(undefined, delta * 7);\n }\n else if (eventTarget === self.currentYearElement) {\n changeYear(self.currentYear - delta);\n }\n else if (self.config.enableTime) {\n if (!isTimeObj && self.hourElement)\n self.hourElement.focus();\n updateTime(e);\n self._debouncedChange();\n }\n break;\n case 9:\n if (isTimeObj) {\n const elems = [\n self.hourElement,\n self.minuteElement,\n self.secondElement,\n self.amPM,\n ]\n .concat(self.pluginElements)\n .filter((x) => x);\n const i = elems.indexOf(eventTarget);\n if (i !== -1) {\n const target = elems[i + (e.shiftKey ? -1 : 1)];\n e.preventDefault();\n (target || self._input).focus();\n }\n }\n else if (!self.config.noCalendar &&\n self.daysContainer &&\n self.daysContainer.contains(eventTarget) &&\n e.shiftKey) {\n e.preventDefault();\n self._input.focus();\n }\n break;\n default:\n break;\n }\n }\n if (self.amPM !== undefined && eventTarget === self.amPM) {\n switch (e.key) {\n case self.l10n.amPM[0].charAt(0):\n case self.l10n.amPM[0].charAt(0).toLowerCase():\n self.amPM.textContent = self.l10n.amPM[0];\n setHoursFromInputs();\n updateValue();\n break;\n case self.l10n.amPM[1].charAt(0):\n case self.l10n.amPM[1].charAt(0).toLowerCase():\n self.amPM.textContent = self.l10n.amPM[1];\n setHoursFromInputs();\n updateValue();\n break;\n }\n }\n if (isInput || isCalendarElem(eventTarget)) {\n triggerEvent(\"onKeyDown\", e);\n }\n }\n function onMouseOver(elem) {\n if (self.selectedDates.length !== 1 ||\n (elem &&\n (!elem.classList.contains(\"flatpickr-day\") ||\n elem.classList.contains(\"flatpickr-disabled\"))))\n return;\n const hoverDate = elem\n ? elem.dateObj.getTime()\n : self.days.firstElementChild.dateObj.getTime(), initialDate = self.parseDate(self.selectedDates[0], undefined, true).getTime(), rangeStartDate = Math.min(hoverDate, self.selectedDates[0].getTime()), rangeEndDate = Math.max(hoverDate, self.selectedDates[0].getTime());\n let containsDisabled = false;\n let minRange = 0, maxRange = 0;\n for (let t = rangeStartDate; t < rangeEndDate; t += duration.DAY) {\n if (!isEnabled(new Date(t), true)) {\n containsDisabled =\n containsDisabled || (t > rangeStartDate && t < rangeEndDate);\n if (t < initialDate && (!minRange || t > minRange))\n minRange = t;\n else if (t > initialDate && (!maxRange || t < maxRange))\n maxRange = t;\n }\n }\n for (let m = 0; m < self.config.showMonths; m++) {\n const month = self.daysContainer.children[m];\n for (let i = 0, l = month.children.length; i < l; i++) {\n const dayElem = month.children[i], date = dayElem.dateObj;\n const timestamp = date.getTime();\n const outOfRange = (minRange > 0 && timestamp < minRange) ||\n (maxRange > 0 && timestamp > maxRange);\n if (outOfRange) {\n dayElem.classList.add(\"notAllowed\");\n [\"inRange\", \"startRange\", \"endRange\"].forEach((c) => {\n dayElem.classList.remove(c);\n });\n continue;\n }\n else if (containsDisabled && !outOfRange)\n continue;\n [\"startRange\", \"inRange\", \"endRange\", \"notAllowed\"].forEach((c) => {\n dayElem.classList.remove(c);\n });\n if (elem !== undefined) {\n elem.classList.add(hoverDate <= self.selectedDates[0].getTime()\n ? \"startRange\"\n : \"endRange\");\n if (initialDate < hoverDate && timestamp === initialDate)\n dayElem.classList.add(\"startRange\");\n else if (initialDate > hoverDate && timestamp === initialDate)\n dayElem.classList.add(\"endRange\");\n if (timestamp >= minRange &&\n (maxRange === 0 || timestamp <= maxRange) &&\n isBetween(timestamp, initialDate, hoverDate))\n dayElem.classList.add(\"inRange\");\n }\n }\n }\n }\n function onResize() {\n if (self.isOpen && !self.config.static && !self.config.inline)\n positionCalendar();\n }\n function open(e, positionElement = self._positionElement) {\n if (self.isMobile === true) {\n if (e) {\n e.preventDefault();\n const eventTarget = getEventTarget(e);\n if (eventTarget) {\n eventTarget.blur();\n }\n }\n if (self.mobileInput !== undefined) {\n self.mobileInput.focus();\n self.mobileInput.click();\n }\n triggerEvent(\"onOpen\");\n return;\n }\n else if (self._input.disabled || self.config.inline) {\n return;\n }\n const wasOpen = self.isOpen;\n self.isOpen = true;\n if (!wasOpen) {\n self.calendarContainer.classList.add(\"open\");\n self._input.classList.add(\"active\");\n triggerEvent(\"onOpen\");\n positionCalendar(positionElement);\n }\n if (self.config.enableTime === true && self.config.noCalendar === true) {\n if (self.config.allowInput === false &&\n (e === undefined ||\n !self.timeContainer.contains(e.relatedTarget))) {\n setTimeout(() => self.hourElement.select(), 50);\n }\n }\n }\n function minMaxDateSetter(type) {\n return (date) => {\n const dateObj = (self.config[`_${type}Date`] = self.parseDate(date, self.config.dateFormat));\n const inverseDateObj = self.config[`_${type === \"min\" ? \"max\" : \"min\"}Date`];\n if (dateObj !== undefined) {\n self[type === \"min\" ? \"minDateHasTime\" : \"maxDateHasTime\"] =\n dateObj.getHours() > 0 ||\n dateObj.getMinutes() > 0 ||\n dateObj.getSeconds() > 0;\n }\n if (self.selectedDates) {\n self.selectedDates = self.selectedDates.filter((d) => isEnabled(d));\n if (!self.selectedDates.length && type === \"min\")\n setHoursFromDate(dateObj);\n updateValue();\n }\n if (self.daysContainer) {\n redraw();\n if (dateObj !== undefined)\n self.currentYearElement[type] = dateObj.getFullYear().toString();\n else\n self.currentYearElement.removeAttribute(type);\n self.currentYearElement.disabled =\n !!inverseDateObj &&\n dateObj !== undefined &&\n inverseDateObj.getFullYear() === dateObj.getFullYear();\n }\n };\n }\n function parseConfig() {\n const boolOpts = [\n \"wrap\",\n \"weekNumbers\",\n \"allowInput\",\n \"allowInvalidPreload\",\n \"clickOpens\",\n \"time_24hr\",\n \"enableTime\",\n \"noCalendar\",\n \"altInput\",\n \"shorthandCurrentMonth\",\n \"inline\",\n \"static\",\n \"enableSeconds\",\n \"disableMobile\",\n ];\n const userConfig = Object.assign(Object.assign({}, JSON.parse(JSON.stringify(element.dataset || {}))), instanceConfig);\n const formats = {};\n self.config.parseDate = userConfig.parseDate;\n self.config.formatDate = userConfig.formatDate;\n Object.defineProperty(self.config, \"enable\", {\n get: () => self.config._enable,\n set: (dates) => {\n self.config._enable = parseDateRules(dates);\n },\n });\n Object.defineProperty(self.config, \"disable\", {\n get: () => self.config._disable,\n set: (dates) => {\n self.config._disable = parseDateRules(dates);\n },\n });\n const timeMode = userConfig.mode === \"time\";\n if (!userConfig.dateFormat && (userConfig.enableTime || timeMode)) {\n const defaultDateFormat = flatpickr.defaultConfig.dateFormat || defaultOptions.dateFormat;\n formats.dateFormat =\n userConfig.noCalendar || timeMode\n ? \"H:i\" + (userConfig.enableSeconds ? \":S\" : \"\")\n : defaultDateFormat + \" H:i\" + (userConfig.enableSeconds ? \":S\" : \"\");\n }\n if (userConfig.altInput &&\n (userConfig.enableTime || timeMode) &&\n !userConfig.altFormat) {\n const defaultAltFormat = flatpickr.defaultConfig.altFormat || defaultOptions.altFormat;\n formats.altFormat =\n userConfig.noCalendar || timeMode\n ? \"h:i\" + (userConfig.enableSeconds ? \":S K\" : \" K\")\n : defaultAltFormat + ` h:i${userConfig.enableSeconds ? \":S\" : \"\"} K`;\n }\n Object.defineProperty(self.config, \"minDate\", {\n get: () => self.config._minDate,\n set: minMaxDateSetter(\"min\"),\n });\n Object.defineProperty(self.config, \"maxDate\", {\n get: () => self.config._maxDate,\n set: minMaxDateSetter(\"max\"),\n });\n const minMaxTimeSetter = (type) => (val) => {\n self.config[type === \"min\" ? \"_minTime\" : \"_maxTime\"] = self.parseDate(val, \"H:i:S\");\n };\n Object.defineProperty(self.config, \"minTime\", {\n get: () => self.config._minTime,\n set: minMaxTimeSetter(\"min\"),\n });\n Object.defineProperty(self.config, \"maxTime\", {\n get: () => self.config._maxTime,\n set: minMaxTimeSetter(\"max\"),\n });\n if (userConfig.mode === \"time\") {\n self.config.noCalendar = true;\n self.config.enableTime = true;\n }\n Object.assign(self.config, formats, userConfig);\n for (let i = 0; i < boolOpts.length; i++)\n self.config[boolOpts[i]] =\n self.config[boolOpts[i]] === true ||\n self.config[boolOpts[i]] === \"true\";\n HOOKS.filter((hook) => self.config[hook] !== undefined).forEach((hook) => {\n self.config[hook] = arrayify(self.config[hook] || []).map(bindToInstance);\n });\n self.isMobile =\n !self.config.disableMobile &&\n !self.config.inline &&\n self.config.mode === \"single\" &&\n !self.config.disable.length &&\n !self.config.enable &&\n !self.config.weekNumbers &&\n /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);\n for (let i = 0; i < self.config.plugins.length; i++) {\n const pluginConf = self.config.plugins[i](self) || {};\n for (const key in pluginConf) {\n if (HOOKS.indexOf(key) > -1) {\n self.config[key] = arrayify(pluginConf[key])\n .map(bindToInstance)\n .concat(self.config[key]);\n }\n else if (typeof userConfig[key] === \"undefined\")\n self.config[key] = pluginConf[key];\n }\n }\n if (!userConfig.altInputClass) {\n self.config.altInputClass =\n getInputElem().className + \" \" + self.config.altInputClass;\n }\n triggerEvent(\"onParseConfig\");\n }\n function getInputElem() {\n return self.config.wrap\n ? element.querySelector(\"[data-input]\")\n : element;\n }\n function setupLocale() {\n if (typeof self.config.locale !== \"object\" &&\n typeof flatpickr.l10ns[self.config.locale] === \"undefined\")\n self.config.errorHandler(new Error(`flatpickr: invalid locale ${self.config.locale}`));\n self.l10n = Object.assign(Object.assign({}, flatpickr.l10ns.default), (typeof self.config.locale === \"object\"\n ? self.config.locale\n : self.config.locale !== \"default\"\n ? flatpickr.l10ns[self.config.locale]\n : undefined));\n tokenRegex.K = `(${self.l10n.amPM[0]}|${self.l10n.amPM[1]}|${self.l10n.amPM[0].toLowerCase()}|${self.l10n.amPM[1].toLowerCase()})`;\n const userConfig = Object.assign(Object.assign({}, instanceConfig), JSON.parse(JSON.stringify(element.dataset || {})));\n if (userConfig.time_24hr === undefined &&\n flatpickr.defaultConfig.time_24hr === undefined) {\n self.config.time_24hr = self.l10n.time_24hr;\n }\n self.formatDate = createDateFormatter(self);\n self.parseDate = createDateParser({ config: self.config, l10n: self.l10n });\n }\n function positionCalendar(customPositionElement) {\n if (typeof self.config.position === \"function\") {\n return void self.config.position(self, customPositionElement);\n }\n if (self.calendarContainer === undefined)\n return;\n triggerEvent(\"onPreCalendarPosition\");\n const positionElement = customPositionElement || self._positionElement;\n const calendarHeight = Array.prototype.reduce.call(self.calendarContainer.children, ((acc, child) => acc + child.offsetHeight), 0), calendarWidth = self.calendarContainer.offsetWidth, configPos = self.config.position.split(\" \"), configPosVertical = configPos[0], configPosHorizontal = configPos.length > 1 ? configPos[1] : null, inputBounds = positionElement.getBoundingClientRect(), distanceFromBottom = window.innerHeight - inputBounds.bottom, showOnTop = configPosVertical === \"above\" ||\n (configPosVertical !== \"below\" &&\n distanceFromBottom < calendarHeight &&\n inputBounds.top > calendarHeight);\n const top = window.pageYOffset +\n inputBounds.top +\n (!showOnTop ? positionElement.offsetHeight + 2 : -calendarHeight - 2);\n toggleClass(self.calendarContainer, \"arrowTop\", !showOnTop);\n toggleClass(self.calendarContainer, \"arrowBottom\", showOnTop);\n if (self.config.inline)\n return;\n let left = window.pageXOffset + inputBounds.left;\n let isCenter = false;\n let isRight = false;\n if (configPosHorizontal === \"center\") {\n left -= (calendarWidth - inputBounds.width) / 2;\n isCenter = true;\n }\n else if (configPosHorizontal === \"right\") {\n left -= calendarWidth - inputBounds.width;\n isRight = true;\n }\n toggleClass(self.calendarContainer, \"arrowLeft\", !isCenter && !isRight);\n toggleClass(self.calendarContainer, \"arrowCenter\", isCenter);\n toggleClass(self.calendarContainer, \"arrowRight\", isRight);\n const right = window.document.body.offsetWidth -\n (window.pageXOffset + inputBounds.right);\n const rightMost = left + calendarWidth > window.document.body.offsetWidth;\n const centerMost = right + calendarWidth > window.document.body.offsetWidth;\n toggleClass(self.calendarContainer, \"rightMost\", rightMost);\n if (self.config.static)\n return;\n self.calendarContainer.style.top = `${top}px`;\n if (!rightMost) {\n self.calendarContainer.style.left = `${left}px`;\n self.calendarContainer.style.right = \"auto\";\n }\n else if (!centerMost) {\n self.calendarContainer.style.left = \"auto\";\n self.calendarContainer.style.right = `${right}px`;\n }\n else {\n const doc = getDocumentStyleSheet();\n if (doc === undefined)\n return;\n const bodyWidth = window.document.body.offsetWidth;\n const centerLeft = Math.max(0, bodyWidth / 2 - calendarWidth / 2);\n const centerBefore = \".flatpickr-calendar.centerMost:before\";\n const centerAfter = \".flatpickr-calendar.centerMost:after\";\n const centerIndex = doc.cssRules.length;\n const centerStyle = `{left:${inputBounds.left}px;right:auto;}`;\n toggleClass(self.calendarContainer, \"rightMost\", false);\n toggleClass(self.calendarContainer, \"centerMost\", true);\n doc.insertRule(`${centerBefore},${centerAfter}${centerStyle}`, centerIndex);\n self.calendarContainer.style.left = `${centerLeft}px`;\n self.calendarContainer.style.right = \"auto\";\n }\n }\n function getDocumentStyleSheet() {\n let editableSheet = null;\n for (let i = 0; i < document.styleSheets.length; i++) {\n const sheet = document.styleSheets[i];\n try {\n sheet.cssRules;\n }\n catch (err) {\n continue;\n }\n editableSheet = sheet;\n break;\n }\n return editableSheet != null ? editableSheet : createStyleSheet();\n }\n function createStyleSheet() {\n const style = document.createElement(\"style\");\n document.head.appendChild(style);\n return style.sheet;\n }\n function redraw() {\n if (self.config.noCalendar || self.isMobile)\n return;\n buildMonthSwitch();\n updateNavigationCurrentMonth();\n buildDays();\n }\n function focusAndClose() {\n self._input.focus();\n if (window.navigator.userAgent.indexOf(\"MSIE\") !== -1 ||\n navigator.msMaxTouchPoints !== undefined) {\n setTimeout(self.close, 0);\n }\n else {\n self.close();\n }\n }\n function selectDate(e) {\n e.preventDefault();\n e.stopPropagation();\n const isSelectable = (day) => day.classList &&\n day.classList.contains(\"flatpickr-day\") &&\n !day.classList.contains(\"flatpickr-disabled\") &&\n !day.classList.contains(\"notAllowed\");\n const t = findParent(getEventTarget(e), isSelectable);\n if (t === undefined)\n return;\n const target = t;\n const selectedDate = (self.latestSelectedDateObj = new Date(target.dateObj.getTime()));\n const shouldChangeMonth = (selectedDate.getMonth() < self.currentMonth ||\n selectedDate.getMonth() >\n self.currentMonth + self.config.showMonths - 1) &&\n self.config.mode !== \"range\";\n self.selectedDateElem = target;\n if (self.config.mode === \"single\")\n self.selectedDates = [selectedDate];\n else if (self.config.mode === \"multiple\") {\n const selectedIndex = isDateSelected(selectedDate);\n if (selectedIndex)\n self.selectedDates.splice(parseInt(selectedIndex), 1);\n else\n self.selectedDates.push(selectedDate);\n }\n else if (self.config.mode === \"range\") {\n if (self.selectedDates.length === 2) {\n self.clear(false, false);\n }\n self.latestSelectedDateObj = selectedDate;\n self.selectedDates.push(selectedDate);\n if (compareDates(selectedDate, self.selectedDates[0], true) !== 0)\n self.selectedDates.sort((a, b) => a.getTime() - b.getTime());\n }\n setHoursFromInputs();\n if (shouldChangeMonth) {\n const isNewYear = self.currentYear !== selectedDate.getFullYear();\n self.currentYear = selectedDate.getFullYear();\n self.currentMonth = selectedDate.getMonth();\n if (isNewYear) {\n triggerEvent(\"onYearChange\");\n buildMonthSwitch();\n }\n triggerEvent(\"onMonthChange\");\n }\n updateNavigationCurrentMonth();\n buildDays();\n updateValue();\n if (!shouldChangeMonth &&\n self.config.mode !== \"range\" &&\n self.config.showMonths === 1)\n focusOnDayElem(target);\n else if (self.selectedDateElem !== undefined &&\n self.hourElement === undefined) {\n self.selectedDateElem && self.selectedDateElem.focus();\n }\n if (self.hourElement !== undefined)\n self.hourElement !== undefined && self.hourElement.focus();\n if (self.config.closeOnSelect) {\n const single = self.config.mode === \"single\" && !self.config.enableTime;\n const range = self.config.mode === \"range\" &&\n self.selectedDates.length === 2 &&\n !self.config.enableTime;\n if (single || range) {\n focusAndClose();\n }\n }\n triggerChange();\n }\n const CALLBACKS = {\n locale: [setupLocale, updateWeekdays],\n showMonths: [buildMonths, setCalendarWidth, buildWeekdays],\n minDate: [jumpToDate],\n maxDate: [jumpToDate],\n clickOpens: [\n () => {\n if (self.config.clickOpens === true) {\n bind(self._input, \"focus\", self.open);\n bind(self._input, \"click\", self.open);\n }\n else {\n self._input.removeEventListener(\"focus\", self.open);\n self._input.removeEventListener(\"click\", self.open);\n }\n },\n ],\n };\n function set(option, value) {\n if (option !== null && typeof option === \"object\") {\n Object.assign(self.config, option);\n for (const key in option) {\n if (CALLBACKS[key] !== undefined)\n CALLBACKS[key].forEach((x) => x());\n }\n }\n else {\n self.config[option] = value;\n if (CALLBACKS[option] !== undefined)\n CALLBACKS[option].forEach((x) => x());\n else if (HOOKS.indexOf(option) > -1)\n self.config[option] = arrayify(value);\n }\n self.redraw();\n updateValue(true);\n }\n function setSelectedDate(inputDate, format) {\n let dates = [];\n if (inputDate instanceof Array)\n dates = inputDate.map((d) => self.parseDate(d, format));\n else if (inputDate instanceof Date || typeof inputDate === \"number\")\n dates = [self.parseDate(inputDate, format)];\n else if (typeof inputDate === \"string\") {\n switch (self.config.mode) {\n case \"single\":\n case \"time\":\n dates = [self.parseDate(inputDate, format)];\n break;\n case \"multiple\":\n dates = inputDate\n .split(self.config.conjunction)\n .map((date) => self.parseDate(date, format));\n break;\n case \"range\":\n dates = inputDate\n .split(self.l10n.rangeSeparator)\n .map((date) => self.parseDate(date, format));\n break;\n default:\n break;\n }\n }\n else\n self.config.errorHandler(new Error(`Invalid date supplied: ${JSON.stringify(inputDate)}`));\n self.selectedDates = (self.config.allowInvalidPreload\n ? dates\n : dates.filter((d) => d instanceof Date && isEnabled(d, false)));\n if (self.config.mode === \"range\")\n self.selectedDates.sort((a, b) => a.getTime() - b.getTime());\n }\n function setDate(date, triggerChange = false, format = self.config.dateFormat) {\n if ((date !== 0 && !date) || (date instanceof Array && date.length === 0))\n return self.clear(triggerChange);\n setSelectedDate(date, format);\n self.latestSelectedDateObj =\n self.selectedDates[self.selectedDates.length - 1];\n self.redraw();\n jumpToDate(undefined, triggerChange);\n setHoursFromDate();\n if (self.selectedDates.length === 0) {\n self.clear(false);\n }\n updateValue(triggerChange);\n if (triggerChange)\n triggerEvent(\"onChange\");\n }\n function parseDateRules(arr) {\n return arr\n .slice()\n .map((rule) => {\n if (typeof rule === \"string\" ||\n typeof rule === \"number\" ||\n rule instanceof Date) {\n return self.parseDate(rule, undefined, true);\n }\n else if (rule &&\n typeof rule === \"object\" &&\n rule.from &&\n rule.to)\n return {\n from: self.parseDate(rule.from, undefined),\n to: self.parseDate(rule.to, undefined),\n };\n return rule;\n })\n .filter((x) => x);\n }\n function setupDates() {\n self.selectedDates = [];\n self.now = self.parseDate(self.config.now) || new Date();\n const preloadedDate = self.config.defaultDate ||\n ((self.input.nodeName === \"INPUT\" ||\n self.input.nodeName === \"TEXTAREA\") &&\n self.input.placeholder &&\n self.input.value === self.input.placeholder\n ? null\n : self.input.value);\n if (preloadedDate)\n setSelectedDate(preloadedDate, self.config.dateFormat);\n self._initialDate =\n self.selectedDates.length > 0\n ? self.selectedDates[0]\n : self.config.minDate &&\n self.config.minDate.getTime() > self.now.getTime()\n ? self.config.minDate\n : self.config.maxDate &&\n self.config.maxDate.getTime() < self.now.getTime()\n ? self.config.maxDate\n : self.now;\n self.currentYear = self._initialDate.getFullYear();\n self.currentMonth = self._initialDate.getMonth();\n if (self.selectedDates.length > 0)\n self.latestSelectedDateObj = self.selectedDates[0];\n if (self.config.minTime !== undefined)\n self.config.minTime = self.parseDate(self.config.minTime, \"H:i\");\n if (self.config.maxTime !== undefined)\n self.config.maxTime = self.parseDate(self.config.maxTime, \"H:i\");\n self.minDateHasTime =\n !!self.config.minDate &&\n (self.config.minDate.getHours() > 0 ||\n self.config.minDate.getMinutes() > 0 ||\n self.config.minDate.getSeconds() > 0);\n self.maxDateHasTime =\n !!self.config.maxDate &&\n (self.config.maxDate.getHours() > 0 ||\n self.config.maxDate.getMinutes() > 0 ||\n self.config.maxDate.getSeconds() > 0);\n }\n function setupInputs() {\n self.input = getInputElem();\n if (!self.input) {\n self.config.errorHandler(new Error(\"Invalid input element specified\"));\n return;\n }\n self.input._type = self.input.type;\n self.input.type = \"text\";\n self.input.classList.add(\"flatpickr-input\");\n self._input = self.input;\n if (self.config.altInput) {\n self.altInput = createElement(self.input.nodeName, self.config.altInputClass);\n self._input = self.altInput;\n self.altInput.placeholder = self.input.placeholder;\n self.altInput.disabled = self.input.disabled;\n self.altInput.required = self.input.required;\n self.altInput.tabIndex = self.input.tabIndex;\n self.altInput.type = \"text\";\n self.input.setAttribute(\"type\", \"hidden\");\n if (!self.config.static && self.input.parentNode)\n self.input.parentNode.insertBefore(self.altInput, self.input.nextSibling);\n }\n if (!self.config.allowInput)\n self._input.setAttribute(\"readonly\", \"readonly\");\n self._positionElement = self.config.positionElement || self._input;\n }\n function setupMobile() {\n const inputType = self.config.enableTime\n ? self.config.noCalendar\n ? \"time\"\n : \"datetime-local\"\n : \"date\";\n self.mobileInput = createElement(\"input\", self.input.className + \" flatpickr-mobile\");\n self.mobileInput.tabIndex = 1;\n self.mobileInput.type = inputType;\n self.mobileInput.disabled = self.input.disabled;\n self.mobileInput.required = self.input.required;\n self.mobileInput.placeholder = self.input.placeholder;\n self.mobileFormatStr =\n inputType === \"datetime-local\"\n ? \"Y-m-d\\\\TH:i:S\"\n : inputType === \"date\"\n ? \"Y-m-d\"\n : \"H:i:S\";\n if (self.selectedDates.length > 0) {\n self.mobileInput.defaultValue = self.mobileInput.value = self.formatDate(self.selectedDates[0], self.mobileFormatStr);\n }\n if (self.config.minDate)\n self.mobileInput.min = self.formatDate(self.config.minDate, \"Y-m-d\");\n if (self.config.maxDate)\n self.mobileInput.max = self.formatDate(self.config.maxDate, \"Y-m-d\");\n if (self.input.getAttribute(\"step\"))\n self.mobileInput.step = String(self.input.getAttribute(\"step\"));\n self.input.type = \"hidden\";\n if (self.altInput !== undefined)\n self.altInput.type = \"hidden\";\n try {\n if (self.input.parentNode)\n self.input.parentNode.insertBefore(self.mobileInput, self.input.nextSibling);\n }\n catch (_a) { }\n bind(self.mobileInput, \"change\", (e) => {\n self.setDate(getEventTarget(e).value, false, self.mobileFormatStr);\n triggerEvent(\"onChange\");\n triggerEvent(\"onClose\");\n });\n }\n function toggle(e) {\n if (self.isOpen === true)\n return self.close();\n self.open(e);\n }\n function triggerEvent(event, data) {\n if (self.config === undefined)\n return;\n const hooks = self.config[event];\n if (hooks !== undefined && hooks.length > 0) {\n for (let i = 0; hooks[i] && i < hooks.length; i++)\n hooks[i](self.selectedDates, self.input.value, self, data);\n }\n if (event === \"onChange\") {\n self.input.dispatchEvent(createEvent(\"change\"));\n self.input.dispatchEvent(createEvent(\"input\"));\n }\n }\n function createEvent(name) {\n const e = document.createEvent(\"Event\");\n e.initEvent(name, true, true);\n return e;\n }\n function isDateSelected(date) {\n for (let i = 0; i < self.selectedDates.length; i++) {\n if (compareDates(self.selectedDates[i], date) === 0)\n return \"\" + i;\n }\n return false;\n }\n function isDateInRange(date) {\n if (self.config.mode !== \"range\" || self.selectedDates.length < 2)\n return false;\n return (compareDates(date, self.selectedDates[0]) >= 0 &&\n compareDates(date, self.selectedDates[1]) <= 0);\n }\n function updateNavigationCurrentMonth() {\n if (self.config.noCalendar || self.isMobile || !self.monthNav)\n return;\n self.yearElements.forEach((yearElement, i) => {\n const d = new Date(self.currentYear, self.currentMonth, 1);\n d.setMonth(self.currentMonth + i);\n if (self.config.showMonths > 1 ||\n self.config.monthSelectorType === \"static\") {\n self.monthElements[i].textContent =\n monthToStr(d.getMonth(), self.config.shorthandCurrentMonth, self.l10n) + \" \";\n }\n else {\n self.monthsDropdownContainer.value = d.getMonth().toString();\n }\n yearElement.value = d.getFullYear().toString();\n });\n self._hidePrevMonthArrow =\n self.config.minDate !== undefined &&\n (self.currentYear === self.config.minDate.getFullYear()\n ? self.currentMonth <= self.config.minDate.getMonth()\n : self.currentYear < self.config.minDate.getFullYear());\n self._hideNextMonthArrow =\n self.config.maxDate !== undefined &&\n (self.currentYear === self.config.maxDate.getFullYear()\n ? self.currentMonth + 1 > self.config.maxDate.getMonth()\n : self.currentYear > self.config.maxDate.getFullYear());\n }\n function getDateStr(format) {\n return self.selectedDates\n .map((dObj) => self.formatDate(dObj, format))\n .filter((d, i, arr) => self.config.mode !== \"range\" ||\n self.config.enableTime ||\n arr.indexOf(d) === i)\n .join(self.config.mode !== \"range\"\n ? self.config.conjunction\n : self.l10n.rangeSeparator);\n }\n function updateValue(triggerChange = true) {\n if (self.mobileInput !== undefined && self.mobileFormatStr) {\n self.mobileInput.value =\n self.latestSelectedDateObj !== undefined\n ? self.formatDate(self.latestSelectedDateObj, self.mobileFormatStr)\n : \"\";\n }\n self.input.value = getDateStr(self.config.dateFormat);\n if (self.altInput !== undefined) {\n self.altInput.value = getDateStr(self.config.altFormat);\n }\n if (triggerChange !== false)\n triggerEvent(\"onValueUpdate\");\n }\n function onMonthNavClick(e) {\n const eventTarget = getEventTarget(e);\n const isPrevMonth = self.prevMonthNav.contains(eventTarget);\n const isNextMonth = self.nextMonthNav.contains(eventTarget);\n if (isPrevMonth || isNextMonth) {\n changeMonth(isPrevMonth ? -1 : 1);\n }\n else if (self.yearElements.indexOf(eventTarget) >= 0) {\n eventTarget.select();\n }\n else if (eventTarget.classList.contains(\"arrowUp\")) {\n self.changeYear(self.currentYear + 1);\n }\n else if (eventTarget.classList.contains(\"arrowDown\")) {\n self.changeYear(self.currentYear - 1);\n }\n }\n function timeWrapper(e) {\n e.preventDefault();\n const isKeyDown = e.type === \"keydown\", eventTarget = getEventTarget(e), input = eventTarget;\n if (self.amPM !== undefined && eventTarget === self.amPM) {\n self.amPM.textContent =\n self.l10n.amPM[int(self.amPM.textContent === self.l10n.amPM[0])];\n }\n const min = parseFloat(input.getAttribute(\"min\")), max = parseFloat(input.getAttribute(\"max\")), step = parseFloat(input.getAttribute(\"step\")), curValue = parseInt(input.value, 10), delta = e.delta ||\n (isKeyDown ? (e.which === 38 ? 1 : -1) : 0);\n let newValue = curValue + step * delta;\n if (typeof input.value !== \"undefined\" && input.value.length === 2) {\n const isHourElem = input === self.hourElement, isMinuteElem = input === self.minuteElement;\n if (newValue < min) {\n newValue =\n max +\n newValue +\n int(!isHourElem) +\n (int(isHourElem) && int(!self.amPM));\n if (isMinuteElem)\n incrementNumInput(undefined, -1, self.hourElement);\n }\n else if (newValue > max) {\n newValue =\n input === self.hourElement ? newValue - max - int(!self.amPM) : min;\n if (isMinuteElem)\n incrementNumInput(undefined, 1, self.hourElement);\n }\n if (self.amPM &&\n isHourElem &&\n (step === 1\n ? newValue + curValue === 23\n : Math.abs(newValue - curValue) > step)) {\n self.amPM.textContent =\n self.l10n.amPM[int(self.amPM.textContent === self.l10n.amPM[0])];\n }\n input.value = pad(newValue);\n }\n }\n init();\n return self;\n}\nfunction _flatpickr(nodeList, config) {\n const nodes = Array.prototype.slice\n .call(nodeList)\n .filter((x) => x instanceof HTMLElement);\n const instances = [];\n for (let i = 0; i < nodes.length; i++) {\n const node = nodes[i];\n try {\n if (node.getAttribute(\"data-fp-omit\") !== null)\n continue;\n if (node._flatpickr !== undefined) {\n node._flatpickr.destroy();\n node._flatpickr = undefined;\n }\n node._flatpickr = FlatpickrInstance(node, config || {});\n instances.push(node._flatpickr);\n }\n catch (e) {\n console.error(e);\n }\n }\n return instances.length === 1 ? instances[0] : instances;\n}\nif (typeof HTMLElement !== \"undefined\" &&\n typeof HTMLCollection !== \"undefined\" &&\n typeof NodeList !== \"undefined\") {\n HTMLCollection.prototype.flatpickr = NodeList.prototype.flatpickr = function (config) {\n return _flatpickr(this, config);\n };\n HTMLElement.prototype.flatpickr = function (config) {\n return _flatpickr([this], config);\n };\n}\nvar flatpickr = function (selector, config) {\n if (typeof selector === \"string\") {\n return _flatpickr(window.document.querySelectorAll(selector), config);\n }\n else if (selector instanceof Node) {\n return _flatpickr([selector], config);\n }\n else {\n return _flatpickr(selector, config);\n }\n};\nflatpickr.defaultConfig = {};\nflatpickr.l10ns = {\n en: Object.assign({}, English),\n default: Object.assign({}, English),\n};\nflatpickr.localize = (l10n) => {\n flatpickr.l10ns.default = Object.assign(Object.assign({}, flatpickr.l10ns.default), l10n);\n};\nflatpickr.setDefaults = (config) => {\n flatpickr.defaultConfig = Object.assign(Object.assign({}, flatpickr.defaultConfig), config);\n};\nflatpickr.parseDate = createDateParser({});\nflatpickr.formatDate = createDateFormatter({});\nflatpickr.compareDates = compareDates;\nif (typeof jQuery !== \"undefined\" && typeof jQuery.fn !== \"undefined\") {\n jQuery.fn.flatpickr = function (config) {\n return _flatpickr(this, config);\n };\n}\nDate.prototype.fp_incr = function (days) {\n return new Date(this.getFullYear(), this.getMonth(), this.getDate() + (typeof days === \"string\" ? parseInt(days, 10) : days));\n};\nif (typeof window !== \"undefined\") {\n window.flatpickr = flatpickr;\n}\nexport default flatpickr;\n","/**\n * Fuse.js v6.6.2 - Lightweight fuzzy-search (http://fusejs.io)\n *\n * Copyright (c) 2022 Kiro Risk (http://kiro.me)\n * All Rights Reserved. Apache Software License 2.0\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n */\n\nfunction isArray(value) {\n return !Array.isArray\n ? getTag(value) === '[object Array]'\n : Array.isArray(value)\n}\n\n// Adapted from: https://github.com/lodash/lodash/blob/master/.internal/baseToString.js\nconst INFINITY = 1 / 0;\nfunction baseToString(value) {\n // Exit early for strings to avoid a performance hit in some environments.\n if (typeof value == 'string') {\n return value\n }\n let result = value + '';\n return result == '0' && 1 / value == -INFINITY ? '-0' : result\n}\n\nfunction toString(value) {\n return value == null ? '' : baseToString(value)\n}\n\nfunction isString(value) {\n return typeof value === 'string'\n}\n\nfunction isNumber(value) {\n return typeof value === 'number'\n}\n\n// Adapted from: https://github.com/lodash/lodash/blob/master/isBoolean.js\nfunction isBoolean(value) {\n return (\n value === true ||\n value === false ||\n (isObjectLike(value) && getTag(value) == '[object Boolean]')\n )\n}\n\nfunction isObject(value) {\n return typeof value === 'object'\n}\n\n// Checks if `value` is object-like.\nfunction isObjectLike(value) {\n return isObject(value) && value !== null\n}\n\nfunction isDefined(value) {\n return value !== undefined && value !== null\n}\n\nfunction isBlank(value) {\n return !value.trim().length\n}\n\n// Gets the `toStringTag` of `value`.\n// Adapted from: https://github.com/lodash/lodash/blob/master/.internal/getTag.js\nfunction getTag(value) {\n return value == null\n ? value === undefined\n ? '[object Undefined]'\n : '[object Null]'\n : Object.prototype.toString.call(value)\n}\n\nconst EXTENDED_SEARCH_UNAVAILABLE = 'Extended search is not available';\n\nconst INCORRECT_INDEX_TYPE = \"Incorrect 'index' type\";\n\nconst LOGICAL_SEARCH_INVALID_QUERY_FOR_KEY = (key) =>\n `Invalid value for key ${key}`;\n\nconst PATTERN_LENGTH_TOO_LARGE = (max) =>\n `Pattern length exceeds max of ${max}.`;\n\nconst MISSING_KEY_PROPERTY = (name) => `Missing ${name} property in key`;\n\nconst INVALID_KEY_WEIGHT_VALUE = (key) =>\n `Property 'weight' in key '${key}' must be a positive integer`;\n\nconst hasOwn = Object.prototype.hasOwnProperty;\n\nclass KeyStore {\n constructor(keys) {\n this._keys = [];\n this._keyMap = {};\n\n let totalWeight = 0;\n\n keys.forEach((key) => {\n let obj = createKey(key);\n\n totalWeight += obj.weight;\n\n this._keys.push(obj);\n this._keyMap[obj.id] = obj;\n\n totalWeight += obj.weight;\n });\n\n // Normalize weights so that their sum is equal to 1\n this._keys.forEach((key) => {\n key.weight /= totalWeight;\n });\n }\n get(keyId) {\n return this._keyMap[keyId]\n }\n keys() {\n return this._keys\n }\n toJSON() {\n return JSON.stringify(this._keys)\n }\n}\n\nfunction createKey(key) {\n let path = null;\n let id = null;\n let src = null;\n let weight = 1;\n let getFn = null;\n\n if (isString(key) || isArray(key)) {\n src = key;\n path = createKeyPath(key);\n id = createKeyId(key);\n } else {\n if (!hasOwn.call(key, 'name')) {\n throw new Error(MISSING_KEY_PROPERTY('name'))\n }\n\n const name = key.name;\n src = name;\n\n if (hasOwn.call(key, 'weight')) {\n weight = key.weight;\n\n if (weight <= 0) {\n throw new Error(INVALID_KEY_WEIGHT_VALUE(name))\n }\n }\n\n path = createKeyPath(name);\n id = createKeyId(name);\n getFn = key.getFn;\n }\n\n return { path, id, weight, src, getFn }\n}\n\nfunction createKeyPath(key) {\n return isArray(key) ? key : key.split('.')\n}\n\nfunction createKeyId(key) {\n return isArray(key) ? key.join('.') : key\n}\n\nfunction get(obj, path) {\n let list = [];\n let arr = false;\n\n const deepGet = (obj, path, index) => {\n if (!isDefined(obj)) {\n return\n }\n if (!path[index]) {\n // If there's no path left, we've arrived at the object we care about.\n list.push(obj);\n } else {\n let key = path[index];\n\n const value = obj[key];\n\n if (!isDefined(value)) {\n return\n }\n\n // If we're at the last value in the path, and if it's a string/number/bool,\n // add it to the list\n if (\n index === path.length - 1 &&\n (isString(value) || isNumber(value) || isBoolean(value))\n ) {\n list.push(toString(value));\n } else if (isArray(value)) {\n arr = true;\n // Search each item in the array.\n for (let i = 0, len = value.length; i < len; i += 1) {\n deepGet(value[i], path, index + 1);\n }\n } else if (path.length) {\n // An object. Recurse further.\n deepGet(value, path, index + 1);\n }\n }\n };\n\n // Backwards compatibility (since path used to be a string)\n deepGet(obj, isString(path) ? path.split('.') : path, 0);\n\n return arr ? list : list[0]\n}\n\nconst MatchOptions = {\n // Whether the matches should be included in the result set. When `true`, each record in the result\n // set will include the indices of the matched characters.\n // These can consequently be used for highlighting purposes.\n includeMatches: false,\n // When `true`, the matching function will continue to the end of a search pattern even if\n // a perfect match has already been located in the string.\n findAllMatches: false,\n // Minimum number of characters that must be matched before a result is considered a match\n minMatchCharLength: 1\n};\n\nconst BasicOptions = {\n // When `true`, the algorithm continues searching to the end of the input even if a perfect\n // match is found before the end of the same input.\n isCaseSensitive: false,\n // When true, the matching function will continue to the end of a search pattern even if\n includeScore: false,\n // List of properties that will be searched. This also supports nested properties.\n keys: [],\n // Whether to sort the result list, by score\n shouldSort: true,\n // Default sort function: sort by ascending score, ascending index\n sortFn: (a, b) =>\n a.score === b.score ? (a.idx < b.idx ? -1 : 1) : a.score < b.score ? -1 : 1\n};\n\nconst FuzzyOptions = {\n // Approximately where in the text is the pattern expected to be found?\n location: 0,\n // At what point does the match algorithm give up. A threshold of '0.0' requires a perfect match\n // (of both letters and location), a threshold of '1.0' would match anything.\n threshold: 0.6,\n // Determines how close the match must be to the fuzzy location (specified above).\n // An exact letter match which is 'distance' characters away from the fuzzy location\n // would score as a complete mismatch. A distance of '0' requires the match be at\n // the exact location specified, a threshold of '1000' would require a perfect match\n // to be within 800 characters of the fuzzy location to be found using a 0.8 threshold.\n distance: 100\n};\n\nconst AdvancedOptions = {\n // When `true`, it enables the use of unix-like search commands\n useExtendedSearch: false,\n // The get function to use when fetching an object's properties.\n // The default will search nested paths *ie foo.bar.baz*\n getFn: get,\n // When `true`, search will ignore `location` and `distance`, so it won't matter\n // where in the string the pattern appears.\n // More info: https://fusejs.io/concepts/scoring-theory.html#fuzziness-score\n ignoreLocation: false,\n // When `true`, the calculation for the relevance score (used for sorting) will\n // ignore the field-length norm.\n // More info: https://fusejs.io/concepts/scoring-theory.html#field-length-norm\n ignoreFieldNorm: false,\n // The weight to determine how much field length norm effects scoring.\n fieldNormWeight: 1\n};\n\nvar Config = {\n ...BasicOptions,\n ...MatchOptions,\n ...FuzzyOptions,\n ...AdvancedOptions\n};\n\nconst SPACE = /[^ ]+/g;\n\n// Field-length norm: the shorter the field, the higher the weight.\n// Set to 3 decimals to reduce index size.\nfunction norm(weight = 1, mantissa = 3) {\n const cache = new Map();\n const m = Math.pow(10, mantissa);\n\n return {\n get(value) {\n const numTokens = value.match(SPACE).length;\n\n if (cache.has(numTokens)) {\n return cache.get(numTokens)\n }\n\n // Default function is 1/sqrt(x), weight makes that variable\n const norm = 1 / Math.pow(numTokens, 0.5 * weight);\n\n // In place of `toFixed(mantissa)`, for faster computation\n const n = parseFloat(Math.round(norm * m) / m);\n\n cache.set(numTokens, n);\n\n return n\n },\n clear() {\n cache.clear();\n }\n }\n}\n\nclass FuseIndex {\n constructor({\n getFn = Config.getFn,\n fieldNormWeight = Config.fieldNormWeight\n } = {}) {\n this.norm = norm(fieldNormWeight, 3);\n this.getFn = getFn;\n this.isCreated = false;\n\n this.setIndexRecords();\n }\n setSources(docs = []) {\n this.docs = docs;\n }\n setIndexRecords(records = []) {\n this.records = records;\n }\n setKeys(keys = []) {\n this.keys = keys;\n this._keysMap = {};\n keys.forEach((key, idx) => {\n this._keysMap[key.id] = idx;\n });\n }\n create() {\n if (this.isCreated || !this.docs.length) {\n return\n }\n\n this.isCreated = true;\n\n // List is Array\n if (isString(this.docs[0])) {\n this.docs.forEach((doc, docIndex) => {\n this._addString(doc, docIndex);\n });\n } else {\n // List is Array\n this.docs.forEach((doc, docIndex) => {\n this._addObject(doc, docIndex);\n });\n }\n\n this.norm.clear();\n }\n // Adds a doc to the end of the index\n add(doc) {\n const idx = this.size();\n\n if (isString(doc)) {\n this._addString(doc, idx);\n } else {\n this._addObject(doc, idx);\n }\n }\n // Removes the doc at the specified index of the index\n removeAt(idx) {\n this.records.splice(idx, 1);\n\n // Change ref index of every subsquent doc\n for (let i = idx, len = this.size(); i < len; i += 1) {\n this.records[i].i -= 1;\n }\n }\n getValueForItemAtKeyId(item, keyId) {\n return item[this._keysMap[keyId]]\n }\n size() {\n return this.records.length\n }\n _addString(doc, docIndex) {\n if (!isDefined(doc) || isBlank(doc)) {\n return\n }\n\n let record = {\n v: doc,\n i: docIndex,\n n: this.norm.get(doc)\n };\n\n this.records.push(record);\n }\n _addObject(doc, docIndex) {\n let record = { i: docIndex, $: {} };\n\n // Iterate over every key (i.e, path), and fetch the value at that key\n this.keys.forEach((key, keyIndex) => {\n let value = key.getFn ? key.getFn(doc) : this.getFn(doc, key.path);\n\n if (!isDefined(value)) {\n return\n }\n\n if (isArray(value)) {\n let subRecords = [];\n const stack = [{ nestedArrIndex: -1, value }];\n\n while (stack.length) {\n const { nestedArrIndex, value } = stack.pop();\n\n if (!isDefined(value)) {\n continue\n }\n\n if (isString(value) && !isBlank(value)) {\n let subRecord = {\n v: value,\n i: nestedArrIndex,\n n: this.norm.get(value)\n };\n\n subRecords.push(subRecord);\n } else if (isArray(value)) {\n value.forEach((item, k) => {\n stack.push({\n nestedArrIndex: k,\n value: item\n });\n });\n } else ;\n }\n record.$[keyIndex] = subRecords;\n } else if (isString(value) && !isBlank(value)) {\n let subRecord = {\n v: value,\n n: this.norm.get(value)\n };\n\n record.$[keyIndex] = subRecord;\n }\n });\n\n this.records.push(record);\n }\n toJSON() {\n return {\n keys: this.keys,\n records: this.records\n }\n }\n}\n\nfunction createIndex(\n keys,\n docs,\n { getFn = Config.getFn, fieldNormWeight = Config.fieldNormWeight } = {}\n) {\n const myIndex = new FuseIndex({ getFn, fieldNormWeight });\n myIndex.setKeys(keys.map(createKey));\n myIndex.setSources(docs);\n myIndex.create();\n return myIndex\n}\n\nfunction parseIndex(\n data,\n { getFn = Config.getFn, fieldNormWeight = Config.fieldNormWeight } = {}\n) {\n const { keys, records } = data;\n const myIndex = new FuseIndex({ getFn, fieldNormWeight });\n myIndex.setKeys(keys);\n myIndex.setIndexRecords(records);\n return myIndex\n}\n\nfunction computeScore$1(\n pattern,\n {\n errors = 0,\n currentLocation = 0,\n expectedLocation = 0,\n distance = Config.distance,\n ignoreLocation = Config.ignoreLocation\n } = {}\n) {\n const accuracy = errors / pattern.length;\n\n if (ignoreLocation) {\n return accuracy\n }\n\n const proximity = Math.abs(expectedLocation - currentLocation);\n\n if (!distance) {\n // Dodge divide by zero error.\n return proximity ? 1.0 : accuracy\n }\n\n return accuracy + proximity / distance\n}\n\nfunction convertMaskToIndices(\n matchmask = [],\n minMatchCharLength = Config.minMatchCharLength\n) {\n let indices = [];\n let start = -1;\n let end = -1;\n let i = 0;\n\n for (let len = matchmask.length; i < len; i += 1) {\n let match = matchmask[i];\n if (match && start === -1) {\n start = i;\n } else if (!match && start !== -1) {\n end = i - 1;\n if (end - start + 1 >= minMatchCharLength) {\n indices.push([start, end]);\n }\n start = -1;\n }\n }\n\n // (i-1 - start) + 1 => i - start\n if (matchmask[i - 1] && i - start >= minMatchCharLength) {\n indices.push([start, i - 1]);\n }\n\n return indices\n}\n\n// Machine word size\nconst MAX_BITS = 32;\n\nfunction search(\n text,\n pattern,\n patternAlphabet,\n {\n location = Config.location,\n distance = Config.distance,\n threshold = Config.threshold,\n findAllMatches = Config.findAllMatches,\n minMatchCharLength = Config.minMatchCharLength,\n includeMatches = Config.includeMatches,\n ignoreLocation = Config.ignoreLocation\n } = {}\n) {\n if (pattern.length > MAX_BITS) {\n throw new Error(PATTERN_LENGTH_TOO_LARGE(MAX_BITS))\n }\n\n const patternLen = pattern.length;\n // Set starting location at beginning text and initialize the alphabet.\n const textLen = text.length;\n // Handle the case when location > text.length\n const expectedLocation = Math.max(0, Math.min(location, textLen));\n // Highest score beyond which we give up.\n let currentThreshold = threshold;\n // Is there a nearby exact match? (speedup)\n let bestLocation = expectedLocation;\n\n // Performance: only computer matches when the minMatchCharLength > 1\n // OR if `includeMatches` is true.\n const computeMatches = minMatchCharLength > 1 || includeMatches;\n // A mask of the matches, used for building the indices\n const matchMask = computeMatches ? Array(textLen) : [];\n\n let index;\n\n // Get all exact matches, here for speed up\n while ((index = text.indexOf(pattern, bestLocation)) > -1) {\n let score = computeScore$1(pattern, {\n currentLocation: index,\n expectedLocation,\n distance,\n ignoreLocation\n });\n\n currentThreshold = Math.min(score, currentThreshold);\n bestLocation = index + patternLen;\n\n if (computeMatches) {\n let i = 0;\n while (i < patternLen) {\n matchMask[index + i] = 1;\n i += 1;\n }\n }\n }\n\n // Reset the best location\n bestLocation = -1;\n\n let lastBitArr = [];\n let finalScore = 1;\n let binMax = patternLen + textLen;\n\n const mask = 1 << (patternLen - 1);\n\n for (let i = 0; i < patternLen; i += 1) {\n // Scan for the best match; each iteration allows for one more error.\n // Run a binary search to determine how far from the match location we can stray\n // at this error level.\n let binMin = 0;\n let binMid = binMax;\n\n while (binMin < binMid) {\n const score = computeScore$1(pattern, {\n errors: i,\n currentLocation: expectedLocation + binMid,\n expectedLocation,\n distance,\n ignoreLocation\n });\n\n if (score <= currentThreshold) {\n binMin = binMid;\n } else {\n binMax = binMid;\n }\n\n binMid = Math.floor((binMax - binMin) / 2 + binMin);\n }\n\n // Use the result from this iteration as the maximum for the next.\n binMax = binMid;\n\n let start = Math.max(1, expectedLocation - binMid + 1);\n let finish = findAllMatches\n ? textLen\n : Math.min(expectedLocation + binMid, textLen) + patternLen;\n\n // Initialize the bit array\n let bitArr = Array(finish + 2);\n\n bitArr[finish + 1] = (1 << i) - 1;\n\n for (let j = finish; j >= start; j -= 1) {\n let currentLocation = j - 1;\n let charMatch = patternAlphabet[text.charAt(currentLocation)];\n\n if (computeMatches) {\n // Speed up: quick bool to int conversion (i.e, `charMatch ? 1 : 0`)\n matchMask[currentLocation] = +!!charMatch;\n }\n\n // First pass: exact match\n bitArr[j] = ((bitArr[j + 1] << 1) | 1) & charMatch;\n\n // Subsequent passes: fuzzy match\n if (i) {\n bitArr[j] |=\n ((lastBitArr[j + 1] | lastBitArr[j]) << 1) | 1 | lastBitArr[j + 1];\n }\n\n if (bitArr[j] & mask) {\n finalScore = computeScore$1(pattern, {\n errors: i,\n currentLocation,\n expectedLocation,\n distance,\n ignoreLocation\n });\n\n // This match will almost certainly be better than any existing match.\n // But check anyway.\n if (finalScore <= currentThreshold) {\n // Indeed it is\n currentThreshold = finalScore;\n bestLocation = currentLocation;\n\n // Already passed `loc`, downhill from here on in.\n if (bestLocation <= expectedLocation) {\n break\n }\n\n // When passing `bestLocation`, don't exceed our current distance from `expectedLocation`.\n start = Math.max(1, 2 * expectedLocation - bestLocation);\n }\n }\n }\n\n // No hope for a (better) match at greater error levels.\n const score = computeScore$1(pattern, {\n errors: i + 1,\n currentLocation: expectedLocation,\n expectedLocation,\n distance,\n ignoreLocation\n });\n\n if (score > currentThreshold) {\n break\n }\n\n lastBitArr = bitArr;\n }\n\n const result = {\n isMatch: bestLocation >= 0,\n // Count exact matches (those with a score of 0) to be \"almost\" exact\n score: Math.max(0.001, finalScore)\n };\n\n if (computeMatches) {\n const indices = convertMaskToIndices(matchMask, minMatchCharLength);\n if (!indices.length) {\n result.isMatch = false;\n } else if (includeMatches) {\n result.indices = indices;\n }\n }\n\n return result\n}\n\nfunction createPatternAlphabet(pattern) {\n let mask = {};\n\n for (let i = 0, len = pattern.length; i < len; i += 1) {\n const char = pattern.charAt(i);\n mask[char] = (mask[char] || 0) | (1 << (len - i - 1));\n }\n\n return mask\n}\n\nclass BitapSearch {\n constructor(\n pattern,\n {\n location = Config.location,\n threshold = Config.threshold,\n distance = Config.distance,\n includeMatches = Config.includeMatches,\n findAllMatches = Config.findAllMatches,\n minMatchCharLength = Config.minMatchCharLength,\n isCaseSensitive = Config.isCaseSensitive,\n ignoreLocation = Config.ignoreLocation\n } = {}\n ) {\n this.options = {\n location,\n threshold,\n distance,\n includeMatches,\n findAllMatches,\n minMatchCharLength,\n isCaseSensitive,\n ignoreLocation\n };\n\n this.pattern = isCaseSensitive ? pattern : pattern.toLowerCase();\n\n this.chunks = [];\n\n if (!this.pattern.length) {\n return\n }\n\n const addChunk = (pattern, startIndex) => {\n this.chunks.push({\n pattern,\n alphabet: createPatternAlphabet(pattern),\n startIndex\n });\n };\n\n const len = this.pattern.length;\n\n if (len > MAX_BITS) {\n let i = 0;\n const remainder = len % MAX_BITS;\n const end = len - remainder;\n\n while (i < end) {\n addChunk(this.pattern.substr(i, MAX_BITS), i);\n i += MAX_BITS;\n }\n\n if (remainder) {\n const startIndex = len - MAX_BITS;\n addChunk(this.pattern.substr(startIndex), startIndex);\n }\n } else {\n addChunk(this.pattern, 0);\n }\n }\n\n searchIn(text) {\n const { isCaseSensitive, includeMatches } = this.options;\n\n if (!isCaseSensitive) {\n text = text.toLowerCase();\n }\n\n // Exact match\n if (this.pattern === text) {\n let result = {\n isMatch: true,\n score: 0\n };\n\n if (includeMatches) {\n result.indices = [[0, text.length - 1]];\n }\n\n return result\n }\n\n // Otherwise, use Bitap algorithm\n const {\n location,\n distance,\n threshold,\n findAllMatches,\n minMatchCharLength,\n ignoreLocation\n } = this.options;\n\n let allIndices = [];\n let totalScore = 0;\n let hasMatches = false;\n\n this.chunks.forEach(({ pattern, alphabet, startIndex }) => {\n const { isMatch, score, indices } = search(text, pattern, alphabet, {\n location: location + startIndex,\n distance,\n threshold,\n findAllMatches,\n minMatchCharLength,\n includeMatches,\n ignoreLocation\n });\n\n if (isMatch) {\n hasMatches = true;\n }\n\n totalScore += score;\n\n if (isMatch && indices) {\n allIndices = [...allIndices, ...indices];\n }\n });\n\n let result = {\n isMatch: hasMatches,\n score: hasMatches ? totalScore / this.chunks.length : 1\n };\n\n if (hasMatches && includeMatches) {\n result.indices = allIndices;\n }\n\n return result\n }\n}\n\nclass BaseMatch {\n constructor(pattern) {\n this.pattern = pattern;\n }\n static isMultiMatch(pattern) {\n return getMatch(pattern, this.multiRegex)\n }\n static isSingleMatch(pattern) {\n return getMatch(pattern, this.singleRegex)\n }\n search(/*text*/) {}\n}\n\nfunction getMatch(pattern, exp) {\n const matches = pattern.match(exp);\n return matches ? matches[1] : null\n}\n\n// Token: 'file\n\nclass ExactMatch extends BaseMatch {\n constructor(pattern) {\n super(pattern);\n }\n static get type() {\n return 'exact'\n }\n static get multiRegex() {\n return /^=\"(.*)\"$/\n }\n static get singleRegex() {\n return /^=(.*)$/\n }\n search(text) {\n const isMatch = text === this.pattern;\n\n return {\n isMatch,\n score: isMatch ? 0 : 1,\n indices: [0, this.pattern.length - 1]\n }\n }\n}\n\n// Token: !fire\n\nclass InverseExactMatch extends BaseMatch {\n constructor(pattern) {\n super(pattern);\n }\n static get type() {\n return 'inverse-exact'\n }\n static get multiRegex() {\n return /^!\"(.*)\"$/\n }\n static get singleRegex() {\n return /^!(.*)$/\n }\n search(text) {\n const index = text.indexOf(this.pattern);\n const isMatch = index === -1;\n\n return {\n isMatch,\n score: isMatch ? 0 : 1,\n indices: [0, text.length - 1]\n }\n }\n}\n\n// Token: ^file\n\nclass PrefixExactMatch extends BaseMatch {\n constructor(pattern) {\n super(pattern);\n }\n static get type() {\n return 'prefix-exact'\n }\n static get multiRegex() {\n return /^\\^\"(.*)\"$/\n }\n static get singleRegex() {\n return /^\\^(.*)$/\n }\n search(text) {\n const isMatch = text.startsWith(this.pattern);\n\n return {\n isMatch,\n score: isMatch ? 0 : 1,\n indices: [0, this.pattern.length - 1]\n }\n }\n}\n\n// Token: !^fire\n\nclass InversePrefixExactMatch extends BaseMatch {\n constructor(pattern) {\n super(pattern);\n }\n static get type() {\n return 'inverse-prefix-exact'\n }\n static get multiRegex() {\n return /^!\\^\"(.*)\"$/\n }\n static get singleRegex() {\n return /^!\\^(.*)$/\n }\n search(text) {\n const isMatch = !text.startsWith(this.pattern);\n\n return {\n isMatch,\n score: isMatch ? 0 : 1,\n indices: [0, text.length - 1]\n }\n }\n}\n\n// Token: .file$\n\nclass SuffixExactMatch extends BaseMatch {\n constructor(pattern) {\n super(pattern);\n }\n static get type() {\n return 'suffix-exact'\n }\n static get multiRegex() {\n return /^\"(.*)\"\\$$/\n }\n static get singleRegex() {\n return /^(.*)\\$$/\n }\n search(text) {\n const isMatch = text.endsWith(this.pattern);\n\n return {\n isMatch,\n score: isMatch ? 0 : 1,\n indices: [text.length - this.pattern.length, text.length - 1]\n }\n }\n}\n\n// Token: !.file$\n\nclass InverseSuffixExactMatch extends BaseMatch {\n constructor(pattern) {\n super(pattern);\n }\n static get type() {\n return 'inverse-suffix-exact'\n }\n static get multiRegex() {\n return /^!\"(.*)\"\\$$/\n }\n static get singleRegex() {\n return /^!(.*)\\$$/\n }\n search(text) {\n const isMatch = !text.endsWith(this.pattern);\n return {\n isMatch,\n score: isMatch ? 0 : 1,\n indices: [0, text.length - 1]\n }\n }\n}\n\nclass FuzzyMatch extends BaseMatch {\n constructor(\n pattern,\n {\n location = Config.location,\n threshold = Config.threshold,\n distance = Config.distance,\n includeMatches = Config.includeMatches,\n findAllMatches = Config.findAllMatches,\n minMatchCharLength = Config.minMatchCharLength,\n isCaseSensitive = Config.isCaseSensitive,\n ignoreLocation = Config.ignoreLocation\n } = {}\n ) {\n super(pattern);\n this._bitapSearch = new BitapSearch(pattern, {\n location,\n threshold,\n distance,\n includeMatches,\n findAllMatches,\n minMatchCharLength,\n isCaseSensitive,\n ignoreLocation\n });\n }\n static get type() {\n return 'fuzzy'\n }\n static get multiRegex() {\n return /^\"(.*)\"$/\n }\n static get singleRegex() {\n return /^(.*)$/\n }\n search(text) {\n return this._bitapSearch.searchIn(text)\n }\n}\n\n// Token: 'file\n\nclass IncludeMatch extends BaseMatch {\n constructor(pattern) {\n super(pattern);\n }\n static get type() {\n return 'include'\n }\n static get multiRegex() {\n return /^'\"(.*)\"$/\n }\n static get singleRegex() {\n return /^'(.*)$/\n }\n search(text) {\n let location = 0;\n let index;\n\n const indices = [];\n const patternLen = this.pattern.length;\n\n // Get all exact matches\n while ((index = text.indexOf(this.pattern, location)) > -1) {\n location = index + patternLen;\n indices.push([index, location - 1]);\n }\n\n const isMatch = !!indices.length;\n\n return {\n isMatch,\n score: isMatch ? 0 : 1,\n indices\n }\n }\n}\n\n// ❗Order is important. DO NOT CHANGE.\nconst searchers = [\n ExactMatch,\n IncludeMatch,\n PrefixExactMatch,\n InversePrefixExactMatch,\n InverseSuffixExactMatch,\n SuffixExactMatch,\n InverseExactMatch,\n FuzzyMatch\n];\n\nconst searchersLen = searchers.length;\n\n// Regex to split by spaces, but keep anything in quotes together\nconst SPACE_RE = / +(?=(?:[^\\\"]*\\\"[^\\\"]*\\\")*[^\\\"]*$)/;\nconst OR_TOKEN = '|';\n\n// Return a 2D array representation of the query, for simpler parsing.\n// Example:\n// \"^core go$ | rb$ | py$ xy$\" => [[\"^core\", \"go$\"], [\"rb$\"], [\"py$\", \"xy$\"]]\nfunction parseQuery(pattern, options = {}) {\n return pattern.split(OR_TOKEN).map((item) => {\n let query = item\n .trim()\n .split(SPACE_RE)\n .filter((item) => item && !!item.trim());\n\n let results = [];\n for (let i = 0, len = query.length; i < len; i += 1) {\n const queryItem = query[i];\n\n // 1. Handle multiple query match (i.e, once that are quoted, like `\"hello world\"`)\n let found = false;\n let idx = -1;\n while (!found && ++idx < searchersLen) {\n const searcher = searchers[idx];\n let token = searcher.isMultiMatch(queryItem);\n if (token) {\n results.push(new searcher(token, options));\n found = true;\n }\n }\n\n if (found) {\n continue\n }\n\n // 2. Handle single query matches (i.e, once that are *not* quoted)\n idx = -1;\n while (++idx < searchersLen) {\n const searcher = searchers[idx];\n let token = searcher.isSingleMatch(queryItem);\n if (token) {\n results.push(new searcher(token, options));\n break\n }\n }\n }\n\n return results\n })\n}\n\n// These extended matchers can return an array of matches, as opposed\n// to a singl match\nconst MultiMatchSet = new Set([FuzzyMatch.type, IncludeMatch.type]);\n\n/**\n * Command-like searching\n * ======================\n *\n * Given multiple search terms delimited by spaces.e.g. `^jscript .python$ ruby !java`,\n * search in a given text.\n *\n * Search syntax:\n *\n * | Token | Match type | Description |\n * | ----------- | -------------------------- | -------------------------------------- |\n * | `jscript` | fuzzy-match | Items that fuzzy match `jscript` |\n * | `=scheme` | exact-match | Items that are `scheme` |\n * | `'python` | include-match | Items that include `python` |\n * | `!ruby` | inverse-exact-match | Items that do not include `ruby` |\n * | `^java` | prefix-exact-match | Items that start with `java` |\n * | `!^earlang` | inverse-prefix-exact-match | Items that do not start with `earlang` |\n * | `.js$` | suffix-exact-match | Items that end with `.js` |\n * | `!.go$` | inverse-suffix-exact-match | Items that do not end with `.go` |\n *\n * A single pipe character acts as an OR operator. For example, the following\n * query matches entries that start with `core` and end with either`go`, `rb`,\n * or`py`.\n *\n * ```\n * ^core go$ | rb$ | py$\n * ```\n */\nclass ExtendedSearch {\n constructor(\n pattern,\n {\n isCaseSensitive = Config.isCaseSensitive,\n includeMatches = Config.includeMatches,\n minMatchCharLength = Config.minMatchCharLength,\n ignoreLocation = Config.ignoreLocation,\n findAllMatches = Config.findAllMatches,\n location = Config.location,\n threshold = Config.threshold,\n distance = Config.distance\n } = {}\n ) {\n this.query = null;\n this.options = {\n isCaseSensitive,\n includeMatches,\n minMatchCharLength,\n findAllMatches,\n ignoreLocation,\n location,\n threshold,\n distance\n };\n\n this.pattern = isCaseSensitive ? pattern : pattern.toLowerCase();\n this.query = parseQuery(this.pattern, this.options);\n }\n\n static condition(_, options) {\n return options.useExtendedSearch\n }\n\n searchIn(text) {\n const query = this.query;\n\n if (!query) {\n return {\n isMatch: false,\n score: 1\n }\n }\n\n const { includeMatches, isCaseSensitive } = this.options;\n\n text = isCaseSensitive ? text : text.toLowerCase();\n\n let numMatches = 0;\n let allIndices = [];\n let totalScore = 0;\n\n // ORs\n for (let i = 0, qLen = query.length; i < qLen; i += 1) {\n const searchers = query[i];\n\n // Reset indices\n allIndices.length = 0;\n numMatches = 0;\n\n // ANDs\n for (let j = 0, pLen = searchers.length; j < pLen; j += 1) {\n const searcher = searchers[j];\n const { isMatch, indices, score } = searcher.search(text);\n\n if (isMatch) {\n numMatches += 1;\n totalScore += score;\n if (includeMatches) {\n const type = searcher.constructor.type;\n if (MultiMatchSet.has(type)) {\n allIndices = [...allIndices, ...indices];\n } else {\n allIndices.push(indices);\n }\n }\n } else {\n totalScore = 0;\n numMatches = 0;\n allIndices.length = 0;\n break\n }\n }\n\n // OR condition, so if TRUE, return\n if (numMatches) {\n let result = {\n isMatch: true,\n score: totalScore / numMatches\n };\n\n if (includeMatches) {\n result.indices = allIndices;\n }\n\n return result\n }\n }\n\n // Nothing was matched\n return {\n isMatch: false,\n score: 1\n }\n }\n}\n\nconst registeredSearchers = [];\n\nfunction register(...args) {\n registeredSearchers.push(...args);\n}\n\nfunction createSearcher(pattern, options) {\n for (let i = 0, len = registeredSearchers.length; i < len; i += 1) {\n let searcherClass = registeredSearchers[i];\n if (searcherClass.condition(pattern, options)) {\n return new searcherClass(pattern, options)\n }\n }\n\n return new BitapSearch(pattern, options)\n}\n\nconst LogicalOperator = {\n AND: '$and',\n OR: '$or'\n};\n\nconst KeyType = {\n PATH: '$path',\n PATTERN: '$val'\n};\n\nconst isExpression = (query) =>\n !!(query[LogicalOperator.AND] || query[LogicalOperator.OR]);\n\nconst isPath = (query) => !!query[KeyType.PATH];\n\nconst isLeaf = (query) =>\n !isArray(query) && isObject(query) && !isExpression(query);\n\nconst convertToExplicit = (query) => ({\n [LogicalOperator.AND]: Object.keys(query).map((key) => ({\n [key]: query[key]\n }))\n});\n\n// When `auto` is `true`, the parse function will infer and initialize and add\n// the appropriate `Searcher` instance\nfunction parse(query, options, { auto = true } = {}) {\n const next = (query) => {\n let keys = Object.keys(query);\n\n const isQueryPath = isPath(query);\n\n if (!isQueryPath && keys.length > 1 && !isExpression(query)) {\n return next(convertToExplicit(query))\n }\n\n if (isLeaf(query)) {\n const key = isQueryPath ? query[KeyType.PATH] : keys[0];\n\n const pattern = isQueryPath ? query[KeyType.PATTERN] : query[key];\n\n if (!isString(pattern)) {\n throw new Error(LOGICAL_SEARCH_INVALID_QUERY_FOR_KEY(key))\n }\n\n const obj = {\n keyId: createKeyId(key),\n pattern\n };\n\n if (auto) {\n obj.searcher = createSearcher(pattern, options);\n }\n\n return obj\n }\n\n let node = {\n children: [],\n operator: keys[0]\n };\n\n keys.forEach((key) => {\n const value = query[key];\n\n if (isArray(value)) {\n value.forEach((item) => {\n node.children.push(next(item));\n });\n }\n });\n\n return node\n };\n\n if (!isExpression(query)) {\n query = convertToExplicit(query);\n }\n\n return next(query)\n}\n\n// Practical scoring function\nfunction computeScore(\n results,\n { ignoreFieldNorm = Config.ignoreFieldNorm }\n) {\n results.forEach((result) => {\n let totalScore = 1;\n\n result.matches.forEach(({ key, norm, score }) => {\n const weight = key ? key.weight : null;\n\n totalScore *= Math.pow(\n score === 0 && weight ? Number.EPSILON : score,\n (weight || 1) * (ignoreFieldNorm ? 1 : norm)\n );\n });\n\n result.score = totalScore;\n });\n}\n\nfunction transformMatches(result, data) {\n const matches = result.matches;\n data.matches = [];\n\n if (!isDefined(matches)) {\n return\n }\n\n matches.forEach((match) => {\n if (!isDefined(match.indices) || !match.indices.length) {\n return\n }\n\n const { indices, value } = match;\n\n let obj = {\n indices,\n value\n };\n\n if (match.key) {\n obj.key = match.key.src;\n }\n\n if (match.idx > -1) {\n obj.refIndex = match.idx;\n }\n\n data.matches.push(obj);\n });\n}\n\nfunction transformScore(result, data) {\n data.score = result.score;\n}\n\nfunction format(\n results,\n docs,\n {\n includeMatches = Config.includeMatches,\n includeScore = Config.includeScore\n } = {}\n) {\n const transformers = [];\n\n if (includeMatches) transformers.push(transformMatches);\n if (includeScore) transformers.push(transformScore);\n\n return results.map((result) => {\n const { idx } = result;\n\n const data = {\n item: docs[idx],\n refIndex: idx\n };\n\n if (transformers.length) {\n transformers.forEach((transformer) => {\n transformer(result, data);\n });\n }\n\n return data\n })\n}\n\nclass Fuse {\n constructor(docs, options = {}, index) {\n this.options = { ...Config, ...options };\n\n if (\n this.options.useExtendedSearch &&\n !true\n ) {\n throw new Error(EXTENDED_SEARCH_UNAVAILABLE)\n }\n\n this._keyStore = new KeyStore(this.options.keys);\n\n this.setCollection(docs, index);\n }\n\n setCollection(docs, index) {\n this._docs = docs;\n\n if (index && !(index instanceof FuseIndex)) {\n throw new Error(INCORRECT_INDEX_TYPE)\n }\n\n this._myIndex =\n index ||\n createIndex(this.options.keys, this._docs, {\n getFn: this.options.getFn,\n fieldNormWeight: this.options.fieldNormWeight\n });\n }\n\n add(doc) {\n if (!isDefined(doc)) {\n return\n }\n\n this._docs.push(doc);\n this._myIndex.add(doc);\n }\n\n remove(predicate = (/* doc, idx */) => false) {\n const results = [];\n\n for (let i = 0, len = this._docs.length; i < len; i += 1) {\n const doc = this._docs[i];\n if (predicate(doc, i)) {\n this.removeAt(i);\n i -= 1;\n len -= 1;\n\n results.push(doc);\n }\n }\n\n return results\n }\n\n removeAt(idx) {\n this._docs.splice(idx, 1);\n this._myIndex.removeAt(idx);\n }\n\n getIndex() {\n return this._myIndex\n }\n\n search(query, { limit = -1 } = {}) {\n const {\n includeMatches,\n includeScore,\n shouldSort,\n sortFn,\n ignoreFieldNorm\n } = this.options;\n\n let results = isString(query)\n ? isString(this._docs[0])\n ? this._searchStringList(query)\n : this._searchObjectList(query)\n : this._searchLogical(query);\n\n computeScore(results, { ignoreFieldNorm });\n\n if (shouldSort) {\n results.sort(sortFn);\n }\n\n if (isNumber(limit) && limit > -1) {\n results = results.slice(0, limit);\n }\n\n return format(results, this._docs, {\n includeMatches,\n includeScore\n })\n }\n\n _searchStringList(query) {\n const searcher = createSearcher(query, this.options);\n const { records } = this._myIndex;\n const results = [];\n\n // Iterate over every string in the index\n records.forEach(({ v: text, i: idx, n: norm }) => {\n if (!isDefined(text)) {\n return\n }\n\n const { isMatch, score, indices } = searcher.searchIn(text);\n\n if (isMatch) {\n results.push({\n item: text,\n idx,\n matches: [{ score, value: text, norm, indices }]\n });\n }\n });\n\n return results\n }\n\n _searchLogical(query) {\n\n const expression = parse(query, this.options);\n\n const evaluate = (node, item, idx) => {\n if (!node.children) {\n const { keyId, searcher } = node;\n\n const matches = this._findMatches({\n key: this._keyStore.get(keyId),\n value: this._myIndex.getValueForItemAtKeyId(item, keyId),\n searcher\n });\n\n if (matches && matches.length) {\n return [\n {\n idx,\n item,\n matches\n }\n ]\n }\n\n return []\n }\n\n const res = [];\n for (let i = 0, len = node.children.length; i < len; i += 1) {\n const child = node.children[i];\n const result = evaluate(child, item, idx);\n if (result.length) {\n res.push(...result);\n } else if (node.operator === LogicalOperator.AND) {\n return []\n }\n }\n return res\n };\n\n const records = this._myIndex.records;\n const resultMap = {};\n const results = [];\n\n records.forEach(({ $: item, i: idx }) => {\n if (isDefined(item)) {\n let expResults = evaluate(expression, item, idx);\n\n if (expResults.length) {\n // Dedupe when adding\n if (!resultMap[idx]) {\n resultMap[idx] = { idx, item, matches: [] };\n results.push(resultMap[idx]);\n }\n expResults.forEach(({ matches }) => {\n resultMap[idx].matches.push(...matches);\n });\n }\n }\n });\n\n return results\n }\n\n _searchObjectList(query) {\n const searcher = createSearcher(query, this.options);\n const { keys, records } = this._myIndex;\n const results = [];\n\n // List is Array\n records.forEach(({ $: item, i: idx }) => {\n if (!isDefined(item)) {\n return\n }\n\n let matches = [];\n\n // Iterate over every key (i.e, path), and fetch the value at that key\n keys.forEach((key, keyIndex) => {\n matches.push(\n ...this._findMatches({\n key,\n value: item[keyIndex],\n searcher\n })\n );\n });\n\n if (matches.length) {\n results.push({\n idx,\n item,\n matches\n });\n }\n });\n\n return results\n }\n _findMatches({ key, value, searcher }) {\n if (!isDefined(value)) {\n return []\n }\n\n let matches = [];\n\n if (isArray(value)) {\n value.forEach(({ v: text, i: idx, n: norm }) => {\n if (!isDefined(text)) {\n return\n }\n\n const { isMatch, score, indices } = searcher.searchIn(text);\n\n if (isMatch) {\n matches.push({\n score,\n key,\n value: text,\n idx,\n norm,\n indices\n });\n }\n });\n } else {\n const { v: text, n: norm } = value;\n\n const { isMatch, score, indices } = searcher.searchIn(text);\n\n if (isMatch) {\n matches.push({ score, key, value: text, norm, indices });\n }\n }\n\n return matches\n }\n}\n\nFuse.version = '6.6.2';\nFuse.createIndex = createIndex;\nFuse.parseIndex = parseIndex;\nFuse.config = Config;\n\n{\n Fuse.parseQuery = parse;\n}\n\n{\n register(ExtendedSearch);\n}\n\nexport { Fuse as default };\n","var $ = require('../internals/export');\n\nvar log = Math.log;\nvar LOG10E = Math.LOG10E;\n\n// `Math.log10` method\n// https://tc39.github.io/ecma262/#sec-math.log10\n$({ target: 'Math', stat: true }, {\n log10: function log10(x) {\n return log(x) * LOG10E;\n }\n});\n","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',[_vm._v(\" \"+_vm._s(_vm.value)+\" \")])}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","\n \n {{ value }}\n
\n \n\n","import mod from \"-!../../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../../node_modules/thread-loader/dist/cjs.js!../../../../node_modules/babel-loader/lib/index.js!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./DisplayTimeStamp.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../../node_modules/thread-loader/dist/cjs.js!../../../../node_modules/babel-loader/lib/index.js!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./DisplayTimeStamp.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./DisplayTimeStamp.vue?vue&type=template&id=7ba8bd32&\"\nimport script from \"./DisplayTimeStamp.vue?vue&type=script&lang=js&\"\nexport * from \"./DisplayTimeStamp.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\nexport default component.exports","\"use strict\";\nif (typeof Object.assign !== \"function\") {\n Object.assign = function (target, ...args) {\n if (!target) {\n throw TypeError(\"Cannot convert undefined or null to object\");\n }\n for (const source of args) {\n if (source) {\n Object.keys(source).forEach((key) => (target[key] = source[key]));\n }\n }\n return target;\n };\n}\n","export * from \"-!../../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../../../../node_modules/css-loader/dist/cjs.js??ref--6-oneOf-1-1!../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../node_modules/postcss-loader/src/index.js??ref--6-oneOf-1-2!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./TableWithCheckBox.vue?vue&type=style&index=0&lang=css&\"","\n \n
\n \n
\n
\n \n \n \n \n \n \n \n
\n
\n\n \n\n \n \n
\n \n\n
\n
\n \n
\n\n
\n
\n \n \n \n \n \n
\n \n \n
\n\n
\n \n \n \n {{ selectedOption[scope.field.filterParamsName] }}\n \n \n \n
\n
\n \n
\n
\n
\n
\n\n \n\n \n \n \n {{ $t('table_fields.no_data') }}.\n
\n \n \n\n \n \n
\n \n
\n {{item.field.formatter(item.item[item.field.key])}}\n
\n
\n {{item.field.formatterItem(item.item)}}\n
\n
\n
-1\" :class=\"themeSkin === 'dark' ? 'invert' : ''\">\n
\n \n \n
\n
\n
\n {{getItem(item.item, item.field.key)}}\n \n
\n \n \n \n
\n \n
\n \n \n\n\n pagination.per_page\">\n \n \n
0 && pagination\" class=\"d-flex align-items-center\">\n
\n {{ ((pagination.current_page -1) * pagination.per_page) + 1 }} -\n \n {{ pagination.current_page * pagination.per_page}}\n \n \n {{pagination.total_items}}\n \n {{ $t('pagination.of') }} {{ pagination.total_items }}\n
\n
\n \n \n \n \n {{ label }} {{$t('pagination.per_page')}}\n \n \n \n \n
\n
\n
\n \n \n \n \n \n \n \n
\n \n\n\n\n\n","/**\n * ag-grid-community - Advanced Data Grid / Data Table supporting Javascript / React / AngularJS / Web Components * @version v26.1.0\n * @link http://www.ag-grid.com/\n' * @license MIT\n */\n\n'use strict';\n\nObject.defineProperty(exports, '__esModule', { value: true });\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / React / AngularJS / Web Components\n * @version v26.1.0\n * @link http://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) { allowEmptyString = false; }\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) { accentedCompare = false; }\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 }\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 find(collection, predicate, value) {\n if (collection === null || collection === undefined) {\n return null;\n }\n if (!Array.isArray(collection)) {\n var objToArray = values(collection);\n return find(objToArray, predicate, value);\n }\n var collectionAsArray = collection;\n var firstMatchingItem = null;\n for (var i = 0; i < collectionAsArray.length; i++) {\n var item = collectionAsArray[i];\n if (typeof predicate === 'string') {\n if (item[predicate] === value) {\n firstMatchingItem = item;\n break;\n }\n }\n else {\n var callback = predicate;\n if (callback(item)) {\n firstMatchingItem = item;\n break;\n }\n }\n }\n return firstMatchingItem;\n}\nfunction values(object) {\n if (object instanceof Set || object instanceof Map) {\n var arr_1 = [];\n object.forEach(function (value) { return arr_1.push(value); });\n return arr_1;\n }\n return Object.keys(object).map(function (key) { return object[key]; });\n}\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 find: find,\n values: values\n});\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / React / AngularJS / Web Components\n * @version v26.1.0\n * @link http://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 }\n else if (colField) {\n idToTry = colField;\n if (count !== 0) {\n idToTry += '_' + count;\n }\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 / React / AngularJS / Web Components\n * @version v26.1.0\n * @link http://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}\n/** @deprecated */\nfunction anyExists(values) {\n return values && firstExistingValue(values) != 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 &&\n b != null &&\n a.length === b.length &&\n every(a, function (value, index) { return comparator ? comparator(value, b[index]) : b[index] === value; });\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) { return a - b; });\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 forEach(toRemove, function (item) { return removeFromArray(array, item); });\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 forEach(objectsToMove.slice().reverse(), function (obj) { return insertIntoArray(array, obj, toIndex); });\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 forEach(source, function (value) { return target.push(value); });\n}\nfunction toStrings(array) {\n return map(array, toStringOrNull);\n}\nfunction findIndex(collection, predicate) {\n for (var i = 0; i < collection.length; i++) {\n if (predicate(collection[i], i, collection)) {\n return i;\n }\n }\n return -1;\n}\nfunction fill(collection, value, start, end) {\n if (value === void 0) { value = null; }\n if (start === void 0) { start = 0; }\n if (end === void 0) { end = collection.length; }\n for (var i = start; i < end; i++) {\n collection[i] = value;\n }\n return collection;\n}\n/**\n * The implementation of Array.prototype.every in browsers is always slower than just using a simple for loop, so\n * use this for improved performance.\n * https://jsbench.me/bek91dtit8/\n */\nfunction every(list, predicate) {\n if (list == null) {\n return true;\n }\n for (var i = 0; i < list.length; i++) {\n if (!predicate(list[i], i)) {\n return false;\n }\n }\n return true;\n}\n/**\n * The implementation of Array.prototype.some in browsers is always slower than just using a simple for loop, so\n * use this for improved performance.\n * https://jsbench.me/5dk91e4tmt/\n */\nfunction some(list, predicate) {\n if (list == null) {\n return false;\n }\n for (var i = 0; i < list.length; i++) {\n if (predicate(list[i], i)) {\n return true;\n }\n }\n return false;\n}\n/**\n * The implementation of Array.prototype.forEach in browsers is often slower than just using a simple for loop, so\n * use this for improved performance.\n * https://jsbench.me/apk91elt8a/\n */\nfunction forEach(list, action) {\n if (list == null) {\n return;\n }\n for (var i = 0; i < list.length; i++) {\n action(list[i], i);\n }\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}\n/**\n * The implementation of Array.prototype.map in browsers is generally the same as just using a simple for loop. However,\n * Firefox does exhibit some difference, and this performs no worse in other browsers, so use this if you want improved\n * performance.\n * https://jsbench.me/njk91ez8pc/\n */\nfunction map(list, process) {\n if (list == null) {\n return null;\n }\n var mapped = [];\n for (var i = 0; i < list.length; i++) {\n mapped.push(process(list[i], i));\n }\n return mapped;\n}\n/**\n * The implementation of Array.prototype.filter in browsers is always slower than just using a simple for loop, so\n * use this for improved performance.\n * https://jsbench.me/7bk91fk08c/\n */\nfunction filter(list, predicate) {\n if (list == null) {\n return null;\n }\n var filtered = [];\n for (var i = 0; i < list.length; i++) {\n if (predicate(list[i], i)) {\n filtered.push(list[i]);\n }\n }\n return filtered;\n}\n/**\n * The implementation of Array.prototype.reduce in browsers is generally the same as just using a simple for loop. However,\n * Chrome does exhibit some difference, and this performs no worse in other browsers, so use this if you want improved\n * performance.\n * https://jsbench.me/7vk92n6u1f/\n */\nfunction reduce(list, step, initial) {\n if (list == null || initial == null) {\n return null;\n }\n var result = initial;\n for (var i = 0; i < list.length; i++) {\n result = step(result, list[i], i);\n }\n return result;\n}\n/** @deprecated */\nfunction forEachSnapshotFirst(list, callback) {\n if (!list) {\n return;\n }\n var arrayCopy = list.slice(0);\n arrayCopy.forEach(callback);\n}\n\nvar ArrayUtils = /*#__PURE__*/Object.freeze({\n __proto__: null,\n firstExistingValue: firstExistingValue,\n anyExists: anyExists,\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 findIndex: findIndex,\n fill: fill,\n every: every,\n some: some,\n forEach: forEach,\n forEachReverse: forEachReverse,\n map: map,\n filter: filter,\n reduce: reduce,\n forEachSnapshotFirst: forEachSnapshotFirst\n});\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / React / AngularJS / Web Components\n * @version v26.1.0\n * @link http://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 forEach(object, function (value, index) { return callback(\"\" + index, value); });\n }\n else {\n forEach(Object.keys(object), function (key) { return callback(key, object[key]); });\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 }\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 forEach(properties, function (p) { return copyPropertyIfPresent(source, target, p); });\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) { return obj != null; }).forEach(function (obj) {\n forEach(Object.keys(obj), function (key) { return allValues[key] = null; });\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) { copyUndefined = true; }\n if (makeCopyOfSimpleObjects === void 0) { makeCopyOfSimpleObjects = false; }\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 }\n else if (copyUndefined || sourceValue !== undefined) {\n dest[key] = sourceValue;\n }\n });\n}\nfunction assign(object) {\n var sources = [];\n for (var _i = 1; _i < arguments.length; _i++) {\n sources[_i - 1] = arguments[_i];\n }\n forEach(sources, function (source) { return iterateObject(source, function (key, value) { return object[key] = value; }); });\n return object;\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 forEach(values(object), 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] = { value: func, writable: true };\n }\n });\n Object.defineProperties(obj, properties);\n}\nfunction isNonNullObject(value) {\n return typeof value === 'object' && value !== null;\n}\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 assign: assign,\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 / React / AngularJS / Web Components\n * @version v26.1.0\n * @link http://www.ag-grid.com/\n * @license MIT\n */\nvar FUNCTION_STRIP_COMMENTS = /((\\/\\/.*$)|(\\/\\*[\\s\\S]*?\\*\\/))/mg;\nvar FUNCTION_ARGUMENT_NAMES = /([^\\s,]+)/g;\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}\n/** @deprecated */\nfunction getFunctionParameters(func) {\n var fnStr = func.toString().replace(FUNCTION_STRIP_COMMENTS, '');\n return fnStr.slice(fnStr.indexOf('(') + 1, fnStr.indexOf(')')).match(FUNCTION_ARGUMENT_NAMES) || [];\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) { return func(); });\n }, 0);\n}\nfunction executeAfter(funcs, milliseconds) {\n if (milliseconds === void 0) { milliseconds = 0; }\n if (funcs.length > 0) {\n window.setTimeout(function () { return funcs.forEach(function (func) { return func(); }); }, 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) { immediate = false; }\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}\nfunction waitUntil(condition, callback, timeout, timeoutMessage) {\n if (timeout === void 0) { timeout = 100; }\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) { return fns.reduce(function (composed, f) { return f(composed); }, arg); };\n}\nfunction callIfPresent(func) {\n if (func) {\n func();\n }\n}\n\nvar FunctionUtils = /*#__PURE__*/Object.freeze({\n __proto__: null,\n doOnce: doOnce,\n getFunctionName: getFunctionName,\n getFunctionParameters: getFunctionParameters,\n isFunction: isFunction,\n executeInAWhile: executeInAWhile,\n executeNextVMTurn: executeNextVMTurn,\n executeAfter: executeAfter,\n debounce: debounce,\n waitUntil: waitUntil,\n compose: compose,\n callIfPresent: callIfPresent\n});\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / React / AngularJS / Web Components\n * @version v26.1.0\n * @link http://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) { return beanEntry.beanInstance; });\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 }\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) { optional = false; }\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) { return _this.callLifeCycleMethodsOnBean(beanInstance, lifeCycleMethod); });\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) { return beanInstance[methodName](); });\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(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(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(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(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(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(constructor);\n methodName = methodOrAttributeName;\n }\n else {\n props = getOrCreateProps(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(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 / React / AngularJS / Web Components\n * @version v26.1.0\n * @link http://www.ag-grid.com/\n * @license MIT\n */\nvar __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n 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 = (undefined && undefined.__param) || function (paramIndex, decorator) {\n return function (target, key) { decorator(target, key, paramIndex); }\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) { globalEventListener = null; }\n this.frameworkOverrides = frameworkOverrides;\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 &&\n this.globalSyncListeners.size === 0 && this.globalAsyncListeners.size === 0;\n };\n EventService.prototype.addEventListener = function (eventType, listener, async) {\n if (async === void 0) { async = false; }\n this.getListeners(eventType, async, true).add(listener);\n };\n EventService.prototype.removeEventListener = function (eventType, listener, async) {\n if (async === void 0) { async = false; }\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) { async = false; }\n (async ? this.globalAsyncListeners : this.globalSyncListeners).add(listener);\n };\n EventService.prototype.removeGlobalListener = function (listener, async) {\n if (async === void 0) { async = false; }\n (async ? this.globalAsyncListeners : this.globalSyncListeners).delete(listener);\n };\n EventService.prototype.dispatchEvent = function (event) {\n this.dispatchToListeners(event, true);\n this.dispatchToListeners(event, false);\n this.firedEvents[event.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) { return listeners.forEach(function (listener) {\n if (async) {\n _this.dispatchAsync(function () { return listener(event); });\n }\n else {\n listener(event);\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 () { return _this.frameworkOverrides.dispatchEvent(eventType, function () { return listener(eventType, event); }, true); });\n }\n else {\n _this.frameworkOverrides.dispatchEvent(eventType, function () { return listener(eventType, event); }, 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) { return func(); });\n };\n __decorate([\n __param(0, Qualifier('loggerFactory')),\n __param(1, Qualifier('gridOptionsWrapper')),\n __param(2, Qualifier('frameworkOverrides')),\n __param(3, Qualifier('globalEventListener'))\n ], EventService.prototype, \"setBeans\", null);\n EventService = __decorate([\n Bean('eventService')\n ], EventService);\n return EventService;\n}());\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / React / AngularJS / Web Components\n * @version v26.1.0\n * @link http://www.ag-grid.com/\n * @license MIT\n */\nvar Constants = /** @class */ (function () {\n function Constants() {\n }\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 / React / AngularJS / Web Components\n * @version v26.1.0\n * @link http://www.ag-grid.com/\n * @license MIT\n */\n(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})(exports.ModuleNames || (exports.ModuleNames = {}));\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / React / AngularJS / Web Components\n * @version v26.1.0\n * @link http://www.ag-grid.com/\n * @license MIT\n */\nvar ModuleRegistry = /** @class */ (function () {\n function ModuleRegistry() {\n }\n ModuleRegistry.register = function (module, moduleBased) {\n if (moduleBased === void 0) { moduleBased = true; }\n ModuleRegistry.modulesMap[module.moduleName] = module;\n if (ModuleRegistry.moduleBased === undefined) {\n ModuleRegistry.moduleBased = moduleBased;\n }\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) { moduleBased = true; }\n if (!modules) {\n return;\n }\n modules.forEach(function (module) { return ModuleRegistry.register(module, moduleBased); });\n };\n ModuleRegistry.assertRegistered = function (moduleName, reason) {\n if (this.isRegistered(moduleName)) {\n return true;\n }\n var warningKey = reason + moduleName;\n var warningMessage = \"AG Grid: unable to use \" + reason + \" as module \" + moduleName + \" is not present. Please see: https://www.ag-grid.com/javascript-grid/modules/\";\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 / React / AngularJS / Web Components\n * @version v26.1.0\n * @link http://www.ag-grid.com/\n * @license MIT\n */\nvar __decorate$1 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n 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 = 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 OriginalColumnGroupChild 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 OriginalColumnGroup\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++;\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 }\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 }\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 }\n else {\n this.visible = !initialHide;\n }\n // pinned\n if (colDef.pinned !== undefined) {\n this.setPinned(colDef.pinned);\n }\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 }\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 };\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 minColWidth = this.gridOptionsWrapper.getMinColWidth();\n var maxColWidth = this.gridOptionsWrapper.getMaxColWidth();\n if (this.colDef.minWidth != null) {\n // we force min width to be at least one pixel, otherwise column will disappear\n this.minWidth = Math.max(this.colDef.minWidth, 1);\n }\n else {\n this.minWidth = minColWidth;\n }\n if (this.colDef.maxWidth != null) {\n this.maxWidth = this.colDef.maxWidth;\n }\n else {\n this.maxWidth = maxColWidth;\n }\n };\n Column.prototype.resetActualWidth = function (source) {\n if (source === void 0) { source = 'api'; }\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 this.primary && 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 }\n else {\n doOnce(function () { return console.warn(msg); }, key);\n }\n }, key);\n }\n var usingCSRM = this.gridOptionsWrapper.isRowModelDefault();\n if (usingCSRM && !ModuleRegistry.isRegistered(exports.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 }\n else {\n warnOnce(\"AG Grid: \" + item + \" is only valid with AG Grid Enterprise Module \" + exports.ModuleNames.RowGroupingModule + \" - your column definition should not have \" + item, 'ColumnRowGroupingMissing' + item);\n }\n }\n });\n }\n if (!ModuleRegistry.isRegistered(exports.ModuleNames.RichSelectModule)) {\n if (this.colDef.cellEditor === 'agRichSelect') {\n if (ModuleRegistry.isPackageBased()) {\n warnOnce(\"AG Grid: \" + this.colDef.cellEditor + \" can only be used with ag-grid-enterprise\", 'ColumnRichSelectMissing');\n }\n else {\n warnOnce(\"AG Grid: \" + this.colDef.cellEditor + \" can only be used with AG Grid Enterprise Module \" + exports.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 !!this.colDef.suppressFillHandle;\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 this.colDef.resizable === true;\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) { source = \"api\"; }\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 api: this.gridApi,\n columnApi: this.columnApi,\n type: type,\n column: this,\n columns: [this],\n source: source\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) { source = \"api\"; }\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) { source = \"api\"; }\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) { source = \"api\"; }\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) { source = \"api\"; }\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 }\n else if (pinned === Constants.PINNED_RIGHT) {\n this.pinned = Constants.PINNED_RIGHT;\n }\n else {\n this.pinned = null;\n }\n };\n Column.prototype.setFirstRightPinned = function (firstRightPinned, source) {\n if (source === void 0) { source = \"api\"; }\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) { source = \"api\"; }\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) { source = \"api\"; }\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.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) { source = \"api\"; }\n if (silent === void 0) { silent = false; }\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) { source = \"api\"; }\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) { source = \"api\"; }\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) { source = \"api\"; }\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) { source = \"api\"; }\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 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$1([\n Autowired('gridOptionsWrapper')\n ], Column.prototype, \"gridOptionsWrapper\", void 0);\n __decorate$1([\n Autowired('columnUtils')\n ], Column.prototype, \"columnUtils\", void 0);\n __decorate$1([\n Autowired('columnApi')\n ], Column.prototype, \"columnApi\", void 0);\n __decorate$1([\n Autowired('gridApi')\n ], Column.prototype, \"gridApi\", void 0);\n __decorate$1([\n Autowired('context')\n ], Column.prototype, \"context\", void 0);\n __decorate$1([\n PostConstruct\n ], Column.prototype, \"initialise\", null);\n return Column;\n}());\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / React / AngularJS / Web Components\n * @version v26.1.0\n * @link http://www.ag-grid.com/\n * @license MIT\n */\nvar __decorate$2 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n 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(originalColumnGroup, 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.originalColumnGroup = originalColumnGroup;\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.getOriginalColumnGroup().getLeafColumns();\n if (!allLeafColumns || allLeafColumns.length === 0) {\n return false;\n }\n return allLeafColumns.every(function (col) { return col.isMoving(); });\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 }\n else {\n var firstChildLeft = this.displayedChildren[0].getLeft();\n this.setLeft(firstChildLeft);\n }\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 { type: type };\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.originalColumnGroup.getColGroupDef();\n };\n ColumnGroup.prototype.getColGroupDef = function () {\n return this.originalColumnGroup.getColGroupDef();\n };\n ColumnGroup.prototype.isPadding = function () {\n return this.originalColumnGroup.isPadding();\n };\n ColumnGroup.prototype.isExpandable = function () {\n return this.originalColumnGroup.isExpandable();\n };\n ColumnGroup.prototype.isExpanded = function () {\n return this.originalColumnGroup.isExpanded();\n };\n ColumnGroup.prototype.setExpanded = function (expanded) {\n this.originalColumnGroup.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 }\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 }\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.originalColumnGroup.getColumnGroupShow();\n };\n ColumnGroup.prototype.getOriginalColumnGroup = function () {\n return this.originalColumnGroup;\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.originalColumnGroup.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.originalColumnGroup.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.originalColumnGroup.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$2([\n Autowired('gridOptionsWrapper')\n ], ColumnGroup.prototype, \"gridOptionsWrapper\", void 0);\n return ColumnGroup;\n}());\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / React / AngularJS / Web Components\n * @version v26.1.0\n * @link http://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.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) { return child.isVisible(); });\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 }\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) { return col.addEventListener(Column.EVENT_VISIBLE_CHANGED, _this.onColumnVisibilityChanged.bind(_this)); });\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 }\n else if (headerGroupShow === ColumnGroup.HEADER_GROUP_SHOW_CLOSED) {\n atLeastOneShowingWhenClosed = true;\n atLeastOneChangeable = true;\n }\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 }\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 / React / AngularJS / Web Components\n * @version v26.1.0\n * @link http://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 / React / AngularJS / Web Components\n * @version v26.1.0\n * @link http://www.ag-grid.com/\n * @license MIT\n */\nvar AG_GRID_STOP_PROPAGATION = '__ag_Grid_Stop_Propagation';\nvar PASSIVE_EVENTS = ['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 var isSupported = (eventName in el);\n if (!isSupported) {\n el.setAttribute(eventName, 'return;');\n isSupported = typeof el[eventName] == 'function';\n }\n return supports[eventName] = isSupported;\n };\n return eventChecker;\n})();\nfunction getCtrlForEvent(gridOptionsWrapper, event, type) {\n var sourceElement = getTarget(event);\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 // IE doesn't fire changed for special keys (eg delete, backspace), so need to\n // listen for this further ones\n element.addEventListener('keydown', listener);\n element.addEventListener('keyup', listener);\n}\n/**\n * srcElement is only available in IE. In all other browsers it is target\n * http://stackoverflow.com/questions/5301643/how-can-i-make-event-srcelement-work-in-firefox-and-what-does-it-mean\n * @param {Event} event\n * @returns {Element}\n */\nfunction getTarget(event) {\n var eventNoType = event;\n return eventNoType.target || eventNoType.srcElement;\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 = getTarget(event);\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.deepPath) {\n // IE supports deep path\n return eventNoType.deepPath();\n }\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, event);\n var options = isPassive ? { passive: true } : 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}\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 getTarget: getTarget,\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 / React / AngularJS / Web Components\n * @version v26.1.0\n * @link http://www.ag-grid.com/\n * @license MIT\n */\nvar __decorate$3 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n 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 () { return !_this.destroyed; };\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) { return func(); });\n this.destroyFunctions.length = 0;\n this.destroyed = true;\n this.dispatchEvent({ type: BeanStub.EVENT_DESTROYED });\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 () { return _this.dispatchEvent(event); }, 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 }\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) { return fn !== destroyFunc; });\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 }\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 forEach(beans, function (bean) { return _this.destroyBean(bean, context); });\n }\n return [];\n };\n BeanStub.EVENT_DESTROYED = 'destroyed';\n __decorate$3([\n Autowired('frameworkOverrides')\n ], BeanStub.prototype, \"frameworkOverrides\", void 0);\n __decorate$3([\n Autowired('context')\n ], BeanStub.prototype, \"context\", void 0);\n __decorate$3([\n Autowired('eventService')\n ], BeanStub.prototype, \"eventService\", void 0);\n __decorate$3([\n Autowired('gridOptionsWrapper')\n ], BeanStub.prototype, \"gridOptionsWrapper\", void 0);\n __decorate$3([\n PreDestroy\n ], BeanStub.prototype, \"destroy\", null);\n return BeanStub;\n}());\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / React / AngularJS / Web Components\n * @version v26.1.0\n * @link http://www.ag-grid.com/\n * @license MIT\n */\nvar __extends = (undefined && undefined.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate$4 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n 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$1 = (undefined && undefined.__param) || function (paramIndex, decorator) {\n return function (target, key) { decorator(target, key, paramIndex); }\n};\n// takes ColDefs and ColGroupDefs and turns them into Columns and OriginalGroups\nvar ColumnFactory = /** @class */ (function (_super) {\n __extends(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), existingCols = _a.existingCols, existingGroups = _a.existingGroups, 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 }\n else {\n var col = item;\n existingColKeys.push(col.getId());\n existingCols.push(col);\n }\n });\n }\n return { existingCols: existingCols, existingGroups: existingGroups, existingColKeys: existingColKeys };\n };\n ColumnFactory.prototype.createForAutoGroups = function (autoGroupCols, gridBalancedTree) {\n var _this = this;\n var autoColBalancedTree = [];\n autoGroupCols.forEach(function (col) {\n var fakeTreeItem = _this.createAutoGroupTreeItem(gridBalancedTree, col);\n autoColBalancedTree.push(fakeTreeItem);\n });\n return autoColBalancedTree;\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 }\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) { return leaf instanceof ProvidedColumnGroup; });\n if (hasGroups) {\n currentPaddedGroup.setChildren([child]);\n continue;\n }\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 var result = [];\n if (!defs) {\n return result;\n }\n defs.forEach(function (def) {\n var newGroupOrColumn;\n if (_this.isColumnGroup(def)) {\n newGroupOrColumn = _this.createColumnGroup(primaryColumns, def, level, existingColsCopy, columnKeyCreator, existingGroups);\n }\n else {\n newGroupOrColumn = _this.createColumn(primaryColumns, def, existingColsCopy, columnKeyCreator);\n }\n result.push(newGroupOrColumn);\n });\n return result;\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 originalGroup = new ProvidedColumnGroup(colGroupDefMerged, groupId, false, level);\n this.context.createBean(originalGroup);\n var existingGroup = this.findExistingGroup(colGroupDef, existingGroups);\n if (existingGroup && existingGroup.isExpanded()) {\n originalGroup.setExpanded(true);\n }\n var children = this.recursivelyCreateColumns(colGroupDefMerged.children, level + 1, primaryColumns, existingColumns, columnKeyCreator, existingGroups);\n originalGroup.setChildren(children);\n return originalGroup;\n };\n ColumnFactory.prototype.createMergedColGroupDef = function (colGroupDef) {\n var colGroupDefMerged = {};\n assign(colGroupDefMerged, this.gridOptionsWrapper.getDefaultColGroupDef());\n 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 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 }\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 }\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 }\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 var res = find(existingColsCopy, 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 // 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 && res) {\n removeFromArray(existingColsCopy, res);\n }\n return res;\n };\n ColumnFactory.prototype.findExistingGroup = function (newGroupDef, existingGroups) {\n var res = find(existingGroups, 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 // 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 (res) {\n removeFromArray(existingGroups, res);\n }\n return res;\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, true, 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, true, true);\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) { return typeof a !== 'string'; });\n if (invalidArray) {\n console.warn(\"ag-grid: if colDef.type is supplied an array it should be of type 'string[]'\");\n }\n else {\n typeKeys = type;\n }\n }\n else if (typeof type === 'string') {\n typeKeys = type.split(',');\n }\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 = 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 }\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, true, true);\n }\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$4([\n Autowired('columnUtils')\n ], ColumnFactory.prototype, \"columnUtils\", void 0);\n __decorate$4([\n __param$1(0, Qualifier('loggerFactory'))\n ], ColumnFactory.prototype, \"setBeans\", null);\n ColumnFactory = __decorate$4([\n Bean('columnFactory')\n ], ColumnFactory);\n return ColumnFactory;\n}(BeanStub));\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / React / AngularJS / Web Components\n * @version v26.1.0\n * @link http://www.ag-grid.com/\n * @license MIT\n */\nvar Events = /** @class */ (function () {\n function Events() {\n }\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 /** The client has set new data into the grid */\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_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_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_ROW_VALUE_CHANGED = 'rowValueChanged';\n Events.EVENT_CELL_FOCUSED = 'cellFocused';\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 2+, Web Components and VueJS AG Grid components\n * (not used if doing plain JavaScript or Angular 1.x). 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_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 / React / AngularJS / Web Components\n * @version v26.1.0\n * @link http://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 }\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 / React / AngularJS / Web Components\n * @version v26.1.0\n * @link http://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) { // low surrogate\n output.push(((value & 0x3FF) << 10) + (extra & 0x3FF) + 0x10000);\n }\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 }\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() +\n ' 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 = padStart(convertedCode, 4, '0');\n return \"_x\" + paddedCode + \"_\";\n }\n if ((point & 0xFFFFFF80) == 0) { // 1-byte sequence\n return stringFromCharCode(point);\n }\n var symbol = '';\n if ((point & 0xFFFFF800) == 0) { // 2-byte sequence\n symbol = stringFromCharCode(((point >> 6) & 0x1F) | 0xC0);\n }\n else if ((point & 0xFFFF0000) == 0) { // 3-byte sequence\n checkScalarValue(point);\n symbol = stringFromCharCode(((point >> 12) & 0x0F) | 0xE0);\n symbol += createByte(point, 6);\n }\n else if ((point & 0xFFE00000) == 0) { // 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 * @param str The string to be repeated\n * @param len The size of the output string\n * @returns A string with size len created from repeated `str`.\n */\nfunction stringRepeat(str, len) {\n len = Math.floor(len);\n if (str.length === 0 || len === 0) {\n return '';\n }\n var maxCount = str.length * len;\n len = Math.floor(Math.log(len) / Math.log(2));\n while (len) {\n str += str;\n len--;\n }\n str += str.substring(0, maxCount - str.length);\n return str;\n}\n/**\n * @param str The string to be padded\n * @param totalLength The final length needed\n * @param padStr The string to generate the padding\n * @returns The padded string\n */\nfunction padStart(str, totalLength, padStr) {\n if (str.length > totalLength) {\n return str;\n }\n totalLength -= str.length;\n if (totalLength > padStr.length) {\n padStr += stringRepeat(padStr, totalLength / padStr.length);\n }\n return padStr.slice(0, totalLength) + str;\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) { return '-' + g[0].toLowerCase(); });\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) { return g[1].toUpperCase(); });\n}\nfunction capitalise(str) {\n return str[0].toUpperCase() + str.substr(1).toLowerCase();\n}\nfunction escapeString(toEscape) {\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 return toEscape == null ? null : toEscape.toString().toString().replace(reUnescapedHtml, function (chr) { return HTML_ESCAPES[chr]; });\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) { return word.substring(0, 1).toUpperCase() + ((word.length > 1) ? word.substring(1, word.length) : ''); }).join(' ');\n}\nfunction startsWith(str, matchStart) {\n if (str === matchStart) {\n return true;\n }\n return str != null && str.slice(0, matchStart.length) === matchStart;\n}\n\nvar StringUtils = /*#__PURE__*/Object.freeze({\n __proto__: null,\n utf8_encode: utf8_encode,\n stringRepeat: stringRepeat,\n padStart: padStart,\n camelCaseToHyphen: camelCaseToHyphen,\n hyphenToCamelCase: hyphenToCamelCase,\n capitalise: capitalise,\n escapeString: escapeString,\n camelCaseToHumanText: camelCaseToHumanText,\n startsWith: startsWith\n});\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / React / AngularJS / Web Components\n * @version v26.1.0\n * @link http://www.ag-grid.com/\n * @license MIT\n */\nfunction convertToMap(arr) {\n var map = new Map();\n arr.forEach(function (pair) { return map.set(pair[0], pair[1]); });\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) { return map.set(callback(item), item); });\n return map;\n}\nfunction keys(map) {\n var arr = [];\n map.forEach(function (_, key) { return arr.push(key); });\n return arr;\n}\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 / React / AngularJS / Web Components\n * @version v26.1.0\n * @link http://www.ag-grid.com/\n * @license MIT\n */\nvar __extends$1 = (undefined && undefined.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate$5 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n 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$2 = (undefined && undefined.__param) || function (paramIndex, decorator) {\n return function (target, key) { decorator(target, key, paramIndex); }\n};\nvar __spreadArrays = (undefined && undefined.__spreadArrays) || function () {\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\n r[k] = a[j];\n return r;\n};\nvar ColumnModel = /** @class */ (function (_super) {\n __extends$1(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 _this.secondaryColumnsPresent = false;\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 // all columns to be rendered in the centre\n _this.viewportColumnsCenter = [];\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.colDefVersion = 0;\n _this.flexColsCalculatedAtLestOnce = false;\n return _this;\n }\n ColumnModel.prototype.init = function () {\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, 'autoGroupColumnDef', this.onAutoGroupColumnDefChanged.bind(this));\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.getColDefVersion = function () {\n return this.colDefVersion;\n };\n ColumnModel.prototype.setColumnDefs = function (columnDefs, source) {\n var _this = this;\n if (source === void 0) { source = 'api'; }\n var colsPreviouslyExisted = !!this.columnDefs;\n this.colDefVersion++;\n var raiseEventsFunc = this.compareColumnStatesAndRaiseEvents(source);\n this.columnDefs = columnDefs;\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(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) { return _this.primaryColumnsMap[col.getId()] = col; });\n this.extractRowGroupColumns(source, oldPrimaryColumns);\n this.extractPivotColumns(source, oldPrimaryColumns);\n this.extractValueColumns(source, oldPrimaryColumns);\n this.ready = true;\n this.updateGridColumns();\n if (colsPreviouslyExisted && this.gridColsArePrimary && !this.gridOptionsWrapper.isMaintainColumnOrder()) {\n this.orderGridColumnsLikePrimary();\n }\n this.updateDisplayedColumns(source);\n this.checkViewportColumns();\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 raiseEventsFunc();\n this.dispatchNewColumnsLoaded();\n };\n ColumnModel.prototype.dispatchNewColumnsLoaded = function () {\n var newColumnsLoadedEvent = {\n type: Events.EVENT_NEW_COLUMNS_LOADED,\n api: this.gridApi,\n columnApi: this.columnApi\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) { source = 'api'; }\n var eventEverythingChanged = {\n type: Events.EVENT_COLUMN_EVERYTHING_CHANGED,\n api: this.gridApi,\n columnApi: this.columnApi,\n source: source\n };\n this.eventService.dispatchEvent(eventEverythingChanged);\n };\n ColumnModel.prototype.orderGridColumnsLikePrimary = function () {\n var _this = this;\n this.gridColumns.sort(function (colA, colB) {\n var primaryIndexA = _this.primaryColumns.indexOf(colA);\n var primaryIndexB = _this.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 };\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 }\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 hashBefore = this.viewportColumns.map(function (column) { return column.getId(); }).join('#');\n this.extractViewport();\n var hashAfter = this.viewportColumns.map(function (column) { return column.getId(); }).join('#');\n if (hashBefore !== hashAfter) {\n var event_1 = {\n type: Events.EVENT_VIRTUAL_COLUMNS_CHANGED,\n api: this.gridApi,\n columnApi: this.columnApi\n };\n this.eventService.dispatchEvent(event_1);\n }\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) { source = 'api'; }\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 api: this.gridApi,\n columnApi: this.columnApi\n };\n this.eventService.dispatchEvent(event);\n };\n ColumnModel.prototype.getSecondaryPivotColumn = function (pivotKeys, valueColKey) {\n if (!this.secondaryColumnsPresent || !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 }\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 (keys, skipHeader, source) {\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 var _this = this;\n if (source === void 0) { source = \"api\"; }\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 if (skipHeader == null) {\n skipHeader = this.gridOptionsWrapper.isSkipHeaderOnAutoSize();\n }\n while (changesThisTimeAround !== 0) {\n changesThisTimeAround = 0;\n this.actionOnGridColumns(keys, 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, skipHeader);\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 this.fireColumnResizedEvent(columnsAutosized, true, 'autosizeColumns');\n };\n ColumnModel.prototype.fireColumnResizedEvent = function (columns, finished, source, flexColumns) {\n if (flexColumns === void 0) { flexColumns = null; }\n if (columns && columns.length) {\n var event_2 = {\n type: Events.EVENT_COLUMN_RESIZED,\n columns: columns,\n column: columns.length === 1 ? columns[0] : null,\n flexColumns: flexColumns,\n finished: finished,\n api: this.gridApi,\n columnApi: this.columnApi,\n source: source\n };\n this.eventService.dispatchEvent(event_2);\n }\n };\n ColumnModel.prototype.autoSizeColumn = function (key, skipHeader, source) {\n if (source === void 0) { source = \"api\"; }\n if (key) {\n this.autoSizeColumns([key], skipHeader, source);\n }\n };\n ColumnModel.prototype.autoSizeAllColumns = function (skipHeader, source) {\n if (source === void 0) { source = \"api\"; }\n var allDisplayedColumns = this.getAllDisplayedColumns();\n this.autoSizeColumns(allDisplayedColumns, skipHeader, source);\n };\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 }\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\n .concat(this.displayedTreeCentre)\n .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 }\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.isColumnInViewport.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.isColumnInViewport = function (col) {\n // we never filter out autoHeight columns, as we need them in the DOM for calculating Auto Height\n if (col.getColDef().autoHeight) {\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) { source = \"api\"; }\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 }\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 api: this.gridApi,\n columnApi: this.columnApi,\n source: source\n };\n this.eventService.dispatchEvent(event);\n };\n ColumnModel.prototype.setRowGroupColumns = function (colKeys, source) {\n if (source === void 0) { source = \"api\"; }\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.isSuppressMakeColumnVisibleAfterUnGroup()) {\n column.setVisible(true, source);\n }\n };\n ColumnModel.prototype.addRowGroupColumn = function (key, source) {\n if (source === void 0) { source = \"api\"; }\n if (key) {\n this.addRowGroupColumns([key], source);\n }\n };\n ColumnModel.prototype.addRowGroupColumns = function (keys, source) {\n if (source === void 0) { source = \"api\"; }\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) { source = \"api\"; }\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) { source = \"api\"; }\n if (key) {\n this.removeRowGroupColumns([key], source);\n }\n };\n ColumnModel.prototype.addPivotColumns = function (keys, source) {\n if (source === void 0) { source = \"api\"; }\n this.updatePrimaryColumnList(keys, this.pivotColumns, true, function (column) { return column.setPivotActive(true, source); }, Events.EVENT_COLUMN_PIVOT_CHANGED, source);\n };\n ColumnModel.prototype.setPivotColumns = function (colKeys, source) {\n if (source === void 0) { source = \"api\"; }\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) { source = \"api\"; }\n this.addPivotColumns([key], source);\n };\n ColumnModel.prototype.removePivotColumns = function (keys, source) {\n if (source === void 0) { source = \"api\"; }\n this.updatePrimaryColumnList(keys, this.pivotColumns, false, function (column) { return column.setPivotActive(false, source); }, Events.EVENT_COLUMN_PIVOT_CHANGED, source);\n };\n ColumnModel.prototype.removePivotColumn = function (key, source) {\n if (source === void 0) { source = \"api\"; }\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) { source = \"api\"; }\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) { source = \"api\"; }\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) { source = \"api\"; }\n if (colKey) {\n this.addValueColumns([colKey], source);\n }\n };\n ColumnModel.prototype.removeValueColumn = function (colKey, source) {\n if (source === void 0) { source = \"api\"; }\n this.removeValueColumns([colKey], source);\n };\n ColumnModel.prototype.removeValueColumns = function (keys, source) {\n if (source === void 0) { source = \"api\"; }\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, // @takeFromAdjacent - if user has 'shift' pressed, then pixels are taken from adjacent column\n finished, // @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) { source = \"api\"; }\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(sets, finished, source);\n };\n ColumnModel.prototype.checkMinAndMaxWidthsForSet = function (columnResizeSet) {\n var columns = columnResizeSet.columns, 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 }\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 (resizeSets, finished, source) {\n var _this = this;\n var passMinMaxCheck = !resizeSets || resizeSets.every(function (columnResizeSet) { return _this.checkMinAndMaxWidthsForSet(columnResizeSet); });\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, columns = set.columns, 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) { return allResizedCols.push(col); });\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 }\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 }\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 }\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\")\n break;\n }\n columns.forEach(function (col) {\n var newWidth = newWidths[col.getId()];\n if (col.getActualWidth() !== 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 = this.refreshFlexedColumns({ resizingCols: allResizedCols, skipSetLeft: true });\n if (atLeastOneColChanged) {\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) { source = \"api\"; }\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 api: this.gridApi,\n columnApi: this.columnApi,\n source: source\n };\n this.eventService.dispatchEvent(event);\n };\n ColumnModel.prototype.moveRowGroupColumn = function (fromIndex, toIndex, source) {\n if (source === void 0) { source = \"api\"; }\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 api: this.gridApi,\n columnApi: this.columnApi,\n source: source\n };\n this.eventService.dispatchEvent(event);\n };\n ColumnModel.prototype.moveColumns = function (columnsToMoveKeys, toIndex, source) {\n if (source === void 0) { source = \"api\"; }\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 api: this.gridApi,\n columnApi: this.columnApi,\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.gridColumns.slice();\n moveInArray(proposedColumnOrder, columnsToMove, toIndex);\n // then check that the new proposed order of the columns passes all rules\n if (!this.doesMovePassMarryChildren(proposedColumnOrder)) {\n return false;\n }\n if (!this.doesMovePassLockedPositions(proposedColumnOrder)) {\n return false;\n }\n return true;\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) { return _this.gridColumns.indexOf(c) < 0; }).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 var foundNonLocked = false;\n var rulePassed = true;\n // go though the cols, see if any non-locked appear before any locked\n proposedColumnOrder.forEach(function (col) {\n if (col.getColDef().lockPosition) {\n if (foundNonLocked) {\n rulePassed = false;\n }\n }\n else {\n foundNonLocked = true;\n }\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) { source = \"api\"; }\n this.moveColumns([key], toIndex, source);\n };\n ColumnModel.prototype.moveColumnByIndex = function (fromIndex, toIndex, source) {\n if (source === void 0) { source = \"api\"; }\n var column = this.gridColumns[fromIndex];\n this.moveColumn(column, toIndex, source);\n };\n ColumnModel.prototype.getColumnDefs = function () {\n var _this = this;\n var cols = this.primaryColumns.slice();\n if (this.gridColsArePrimary) {\n cols.sort(function (a, b) { return _this.gridColumns.indexOf(a) - _this.gridColumns.indexOf(b); });\n }\n else if (this.lastPrimaryOrder) {\n cols.sort(function (a, b) { return _this.lastPrimaryOrder.indexOf(a) - _this.lastPrimaryOrder.indexOf(b); });\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_3 = {\n type: Events.EVENT_DISPLAYED_COLUMNS_WIDTH_CHANGED,\n api: this.gridApi,\n columnApi: this.columnApi\n };\n this.eventService.dispatchEvent(event_3);\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) { source = \"api\"; }\n this.setColumnsVisible([key], visible, source);\n };\n ColumnModel.prototype.setColumnsVisible = function (keys, visible, source) {\n var _this = this;\n if (visible === void 0) { visible = false; }\n if (source === void 0) { source = \"api\"; }\n this.columnAnimationService.start();\n this.actionOnGridColumns(keys, function (column) {\n if (column.isVisible() !== visible) {\n column.setVisible(visible, source);\n return true;\n }\n return false;\n }, source, function () {\n var event = {\n type: Events.EVENT_COLUMN_VISIBLE,\n visible: visible,\n column: null,\n columns: null,\n api: _this.gridApi,\n columnApi: _this.columnApi,\n source: source\n };\n return event;\n });\n this.columnAnimationService.finish();\n };\n ColumnModel.prototype.setColumnPinned = function (key, pinned, source) {\n if (source === void 0) { source = \"api\"; }\n if (key) {\n this.setColumnsPinned([key], pinned, source);\n }\n };\n ColumnModel.prototype.setColumnsPinned = function (keys, pinned, source) {\n var _this = this;\n if (source === void 0) { source = \"api\"; }\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 }\n else if (pinned === Constants.PINNED_RIGHT) {\n actualPinned = Constants.PINNED_RIGHT;\n }\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 api: _this.gridApi,\n columnApi: _this.columnApi,\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 (// 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_4 = createEvent();\n event_4.columns = updatedColumns;\n event_4.column = updatedColumns.length === 1 ? updatedColumns[0] : null;\n this.eventService.dispatchEvent(event_4);\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.getOriginalColumnGroup().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 groupPointerOriginalColumnGroup = groupPointer.getOriginalColumnGroup();\n originalGroupLevel = groupPointerOriginalColumnGroup.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 result = this.primaryColumns ? this.primaryColumns.slice(0) : [];\n if (this.groupAutoColumns && exists(this.groupAutoColumns)) {\n this.groupAutoColumns.forEach(function (col) { return result.push(col); });\n }\n if (this.secondaryColumnsPresent && this.secondaryColumns) {\n this.secondaryColumns.forEach(function (column) { return result.push(column); });\n }\n return result;\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 if (!this.pivotMode) {\n this.orderColumnStateList(res);\n }\n return res;\n };\n ColumnModel.prototype.getPrimaryAndAutoGroupCols = function () {\n if (!this.groupAutoColumns) {\n return this.primaryColumns;\n }\n else {\n return __spreadArrays(this.primaryColumns, this.groupAutoColumns);\n }\n };\n ColumnModel.prototype.orderColumnStateList = function (columnStateList) {\n // for fast looking, store the index of each column\n var gridColumnIdMap = convertToMap(this.gridColumns.map(function (col, index) { return [col.getColId(), index]; }));\n columnStateList.sort(function (itemA, itemB) {\n var posA = gridColumnIdMap.has(itemA.colId) ? gridColumnIdMap.get(itemA.colId) : -1;\n var posB = gridColumnIdMap.has(itemB.colId) ? gridColumnIdMap.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) { source = \"api\"; }\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) { return a != null ? a : b != null ? b : null; };\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({ state: columnStates, applyOrder: true }, source);\n };\n ColumnModel.prototype.applyColumnState = function (params, source) {\n var _this = this;\n if (source === void 0) { source = \"api\"; }\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 this.columnAnimationService.start();\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 = this.primaryColumns.slice();\n var success = true;\n var rowGroupIndexes = {};\n var pivotIndexes = {};\n var autoGroupColumnStates = [];\n var previousRowGroupCols = this.rowGroupColumns.slice();\n var previousPivotCols = this.pivotColumns.slice();\n if (params.state) {\n params.state.forEach(function (state) {\n var groupAutoColumnId = Constants.GROUP_AUTO_COLUMN_ID;\n var colId = state.colId || '';\n // auto group columns are re-created so deferring syncing with ColumnState\n var isAutoGroupColumn = startsWith(colId, groupAutoColumnId);\n if (isAutoGroupColumn) {\n autoGroupColumnStates.push(state);\n return;\n }\n var column = _this.getPrimaryColumn(colId);\n if (!column) {\n // we don't log the failure, as it's possible the user is applying that has extra\n // cols in it. for example they could of save while row-grouping (so state includes\n // auto-group column) and then applied state when not grouping (so the auto-group\n // column would be in the state but no used).\n success = false;\n }\n else {\n _this.syncColumnWithStateItem(column, state, params.defaultState, rowGroupIndexes, pivotIndexes, false, source);\n removeFromArray(columnsWithNoState, column);\n }\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();\n this.columnAnimationService.finish();\n return success;\n };\n ColumnModel.prototype.applyOrderAfterApplyState = function (params) {\n if (!this.gridColsArePrimary || !params.applyOrder || !params.state) {\n return;\n }\n var newOrder = [];\n var processedColIds = {};\n var gridColumnsMap = {};\n this.gridColumns.forEach(function (col) { return gridColumnsMap[col.getId()] = col; });\n params.state.forEach(function (item) {\n if (!item.colId || processedColIds[item.colId]) {\n return;\n }\n var col = gridColumnsMap[item.colId];\n if (col) {\n newOrder.push(col);\n processedColIds[item.colId] = true;\n }\n });\n // add in all other columns\n this.gridColumns.forEach(function (col) {\n if (!processedColIds[col.getColId()]) {\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.putFixedColumnsFirst(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 // if no columns to begin with, then it means we are setting columns for the first time, so\n // there should be no events fired to show differences in columns.\n var colsPreviouslyExisted = !!this.columnDefs;\n if (!colsPreviouslyExisted) {\n return function () { };\n }\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.getPrimaryAndAutoGroupCols();\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 api: _this.gridApi,\n columnApi: _this.columnApi,\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) { return c.getColId(); };\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) { return cs.width != c.getActualWidth(); };\n _this.fireColumnResizedEvent(getChangedColumns(resizeChangePredicate), true, source);\n var pinnedChangePredicate = function (cs, c) { return cs.pinned != c.getPinned(); };\n _this.raiseColumnPinnedEvent(getChangedColumns(pinnedChangePredicate), source);\n var visibilityChangePredicate = function (cs, c) { return cs.hide == c.isVisible(); };\n _this.raiseColumnVisibleEvent(getChangedColumns(visibilityChangePredicate), source);\n var sortChangePredicate = function (cs, c) { return cs.sort != c.getSort() || cs.sortIndex != c.getSortIndex(); };\n if (getChangedColumns(sortChangePredicate).length > 0) {\n _this.sortController.dispatchSortChangedEvents();\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) { return col.getPinned(); });\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 api: this.gridApi,\n columnApi: this.columnApi,\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) { return col.isVisible(); });\n var event = {\n type: Events.EVENT_COLUMN_VISIBLE,\n visible: visible,\n columns: changedColumns,\n column: column,\n api: this.gridApi,\n columnApi: this.columnApi,\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) { return colStateAfterMapped[s.colId] = s; });\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 = filter(colStateBefore, function (c) { return colsIntersectIds[c.colId]; });\n var afterFiltered = filter(colStateAfter, function (c) { return colsIntersectIds[c.colId]; });\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 api: this.gridApi,\n columnApi: this.columnApi,\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 stateAny = stateItem;\n var defaultAny = defaultState;\n var obj = { value1: undefined, value2: undefined };\n var calculated = false;\n if (stateAny) {\n if (stateAny[key1] !== undefined) {\n obj.value1 = stateAny[key1];\n calculated = true;\n }\n if (exists(key2) && stateAny[key2] !== undefined) {\n obj.value2 = stateAny[key2];\n calculated = true;\n }\n }\n if (!calculated && defaultAny) {\n if (defaultAny[key1] !== undefined) {\n obj.value1 = defaultAny[key1];\n }\n if (exists(key2) && defaultAny[key2] !== undefined) {\n obj.value2 = defaultAny[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.gridOptionsWrapper.getMinColWidth();\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 &&\n (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);\n }\n else {\n column.setSort(undefined);\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, as you can't do these with auto col\n if (autoCol) {\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 }\n else {\n if (exists(aggFunc)) {\n console.warn('AG Grid: stateItem.aggFunc must be a string. if using your own aggregation ' +\n 'functions, register the functions first before using them in get/set state. This is because it is ' +\n '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 teh 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'), rowGroup = _a.value1, 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 }\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'), pivot = _b.value1, 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 }\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 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.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.getAutoColumn = function (key) {\n var _this = this;\n if (!this.groupAutoColumns ||\n !exists(this.groupAutoColumns) ||\n missing(this.groupAutoColumns)) {\n return null;\n }\n return find(this.groupAutoColumns, function (groupCol) { return _this.columnsMatch(groupCol, key); });\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) { includeAggFunc = false; }\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.getDisplayNameForOriginalColumnGroup = function (columnGroup, originalColumnGroup, location) {\n var colGroupDef = originalColumnGroup ? originalColumnGroup.getColGroupDef() : null;\n if (colGroupDef) {\n return this.getHeaderName(colGroupDef, null, columnGroup, originalColumnGroup, location);\n }\n return null;\n };\n ColumnModel.prototype.getDisplayNameForColumnGroup = function (columnGroup, location) {\n return this.getDisplayNameForOriginalColumnGroup(columnGroup, columnGroup.getOriginalColumnGroup(), 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, originalColumnGroup, location) {\n var headerValueGetter = colDef.headerValueGetter;\n if (headerValueGetter) {\n var params = {\n colDef: colDef,\n column: column,\n columnGroup: columnGroup,\n originalColumnGroup: originalColumnGroup,\n location: location,\n api: this.gridOptionsWrapper.getApi(),\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 }\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 }\n else if (colDef.headerName != null) {\n return colDef.headerName;\n }\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 aggFunc = pivotValueColumn ? pivotValueColumn.getAggFunc() : null;\n aggFuncFound = true;\n }\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 }\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 }\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) { return col.setValueActive(flag, source); }, \n // aggFunc doesn't have index variant, cos order of value cols doesn't matter, so always return null\n function () { return undefined; }, function () { return undefined; }, \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 }\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) { return col.setRowGroupActive(flag, source); }, function (colDef) { return colDef.rowGroupIndex; }, function (colDef) { return colDef.initialRowGroupIndex; }, function (colDef) { return colDef.rowGroup; }, function (colDef) { return colDef.initialRowGroup; });\n };\n ColumnModel.prototype.extractColumns = function (oldPrimaryColumns, previousCols, setFlagFunc, getIndexFunc, getInitialIndexFunc, getValueFunc, getInitialValueFunc) {\n if (oldPrimaryColumns === void 0) { oldPrimaryColumns = []; }\n if (previousCols === void 0) { previousCols = []; }\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 }\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 }\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 }\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 }\n else if (initialIndexPresent) {\n include = initialIndex != null && initialIndex >= 0;\n }\n else {\n include = false;\n }\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) { return col.setPivotActive(flag, source); }, function (colDef) { return colDef.pivotIndex; }, function (colDef) { return colDef.initialPivotIndex; }, function (colDef) { return colDef.pivot; }, function (colDef) { return colDef.initialPivot; });\n };\n ColumnModel.prototype.resetColumnGroupState = function (source) {\n if (source === void 0) { source = \"api\"; }\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 var originalColumnGroup = node;\n columnGroupState.push({\n groupId: originalColumnGroup.getGroupId(),\n open: originalColumnGroup.isExpanded()\n });\n }\n });\n return columnGroupState;\n };\n ColumnModel.prototype.setColumnGroupState = function (stateItems, source) {\n var _this = this;\n if (source === void 0) { source = \"api\"; }\n this.columnAnimationService.start();\n var impactedGroups = [];\n stateItems.forEach(function (stateItem) {\n var groupKey = stateItem.groupId;\n var newValue = stateItem.open;\n var originalColumnGroup = _this.getOriginalColumnGroup(groupKey);\n if (!originalColumnGroup) {\n return;\n }\n if (originalColumnGroup.isExpanded() === newValue) {\n return;\n }\n _this.logger.log('columnGroupOpened(' + originalColumnGroup.getGroupId() + ',' + newValue + ')');\n originalColumnGroup.setExpanded(newValue);\n impactedGroups.push(originalColumnGroup);\n });\n this.updateGroupsAndDisplayedColumns(source);\n this.setFirstRightAndLastLeftPinned(source);\n impactedGroups.forEach(function (originalColumnGroup) {\n var event = {\n type: Events.EVENT_COLUMN_GROUP_OPENED,\n columnGroup: originalColumnGroup,\n api: _this.gridApi,\n columnApi: _this.columnApi\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) { source = \"api\"; }\n var keyAsString;\n if (key instanceof ProvidedColumnGroup) {\n keyAsString = key.getId();\n }\n else {\n keyAsString = key || '';\n }\n this.setColumnGroupState([{ groupId: keyAsString, open: newValue }], source);\n };\n ColumnModel.prototype.getOriginalColumnGroup = function (key) {\n if (key instanceof ProvidedColumnGroup) {\n return key;\n }\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 var originalColumnGroup = node;\n if (originalColumnGroup.getId() === key) {\n res = originalColumnGroup;\n }\n }\n });\n return res;\n };\n ColumnModel.prototype.calculateColumnsForDisplay = function () {\n var _this = this;\n var columnsForDisplay;\n if (this.pivotMode && !this.secondaryColumnsPresent) {\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 }\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 var checkFunc = function (col) {\n var colDef = col.getColDef();\n if (colDef && exists(colDef.showRowGroup)) {\n _this.groupDisplayColumns.push(col);\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.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 this.secondaryColumnsPresent;\n };\n ColumnModel.prototype.setSecondaryColumns = function (colDefs, source) {\n if (source === void 0) { source = \"api\"; }\n var newColsPresent = colDefs && colDefs.length > 0;\n // if not cols passed, and we had to cols anyway, then do nothing\n if (!newColsPresent && !this.secondaryColumnsPresent) {\n return;\n }\n if (newColsPresent) {\n this.processSecondaryColumnDefinitions(colDefs);\n var balancedTreeResult = this.columnFactory.createColumnTree(colDefs, false);\n this.secondaryBalancedTree = balancedTreeResult.columnTree;\n this.secondaryHeaderRowCount = balancedTreeResult.treeDept + 1;\n this.secondaryColumns = this.getColumnsFromTree(this.secondaryBalancedTree);\n this.secondaryColumnsPresent = true;\n }\n else {\n this.secondaryBalancedTree = null;\n this.secondaryHeaderRowCount = -1;\n this.secondaryColumns = null;\n this.secondaryColumnsPresent = false;\n }\n this.updateGridColumns();\n this.updateDisplayedColumns(source);\n };\n ColumnModel.prototype.processSecondaryColumnDefinitions = function (colDefs) {\n var columnCallback = this.gridOptionsWrapper.getProcessSecondaryColDefFunc();\n var groupCallback = this.gridOptionsWrapper.getProcessSecondaryColGroupDefFunc();\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 }\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 if (this.gridColsArePrimary) {\n this.lastPrimaryOrder = this.gridColumns;\n }\n if (this.secondaryColumns && this.secondaryBalancedTree) {\n this.gridBalancedTree = this.secondaryBalancedTree.slice();\n this.gridHeaderRowCount = this.secondaryHeaderRowCount;\n this.gridColumns = this.secondaryColumns.slice();\n this.gridColsArePrimary = false;\n }\n else {\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 primary cols\n this.orderGridColsLikeLastPrimary();\n }\n this.addAutoGroupToGridColumns();\n this.gridColumns = this.putFixedColumnsFirst(this.gridColumns);\n this.setupQuickFilterColumns();\n this.clearDisplayedAndViewportColumns();\n this.colSpanActive = this.checkColSpanActiveInCols(this.gridColumns);\n this.gridColumnsMap = {};\n this.gridColumns.forEach(function (col) { return _this.gridColumnsMap[col.getId()] = col; });\n this.setAutoHeightActive();\n var event = {\n type: Events.EVENT_GRID_COLUMNS_CHANGED,\n api: this.gridApi,\n columnApi: this.columnApi\n };\n this.eventService.dispatchEvent(event);\n };\n ColumnModel.prototype.setAutoHeightActive = function () {\n this.autoHeightActive = this.gridColumns.filter(function (col) { return col.getColDef().autoHeight; }).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 () { return console.warn(message_1); }, 'autoHeightActive.wrongRowModel');\n }\n }\n };\n ColumnModel.prototype.orderGridColsLikeLastPrimary = function () {\n if (missing(this.lastPrimaryOrder)) {\n return;\n }\n var lastPrimaryOrderMapped = convertToMap(this.lastPrimaryOrder.map(function (col, index) { return [col, index]; }));\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 (lastPrimaryOrderMapped.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) { return [col, true]; }));\n var oldColsOrdered = this.lastPrimaryOrder.filter(function (col) { return gridColsMap.has(col); });\n var oldColsMap = convertToMap(oldColsOrdered.map(function (col) { return [col, true]; }));\n var newColsOrdered = this.gridColumns.filter(function (col) { return !oldColsMap.has(col); });\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) { return newGridColumns.indexOf(col); });\n var lastIndex = Math.max.apply(Math, 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 }\n else {\n this.columnsForQuickFilter = this.primaryColumns;\n }\n };\n ColumnModel.prototype.putFixedColumnsFirst = function (cols) {\n var locked = cols.filter(function (c) { return c.getColDef().lockPosition; });\n var unlocked = cols.filter(function (c) { return !c.getColDef().lockPosition; });\n return locked.concat(unlocked);\n };\n ColumnModel.prototype.addAutoGroupToGridColumns = function () {\n // add in auto-group here\n this.createGroupAutoColumnsIfNeeded();\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.displayedTreeLeft = [];\n this.displayedTreeRight = [];\n this.displayedTreeCentre = [];\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 };\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 api: this.gridApi,\n columnApi: this.columnApi\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) { return col.getColDef().autoHeight; });\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\n .concat(this.displayedColumnsCenter)\n .concat(this.displayedColumnsLeft);\n }\n else {\n this.displayedColumns = this.displayedColumnsLeft\n .concat(this.displayedColumnsCenter)\n .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 // 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 [\n this.displayedColumnsLeft,\n this.displayedColumnsRight,\n this.displayedColumnsCenter\n ].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 }\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 [\n this.displayedTreeLeft,\n this.displayedTreeRight,\n this.displayedTreeCentre\n ].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 }\n else {\n // filter out what should be visible\n this.viewportColumnsCenter = this.filterOutColumnsWithinViewport();\n }\n this.viewportColumns = this.viewportColumnsCenter\n .concat(this.displayedColumnsLeft)\n .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.extractViewportRows = 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.viewportColumns.forEach(function (col) { return virtualColIds[col.getId()] = true; });\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 }\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 this.extractViewportColumns();\n this.extractViewportRows();\n };\n ColumnModel.prototype.filterOutColumnsWithinViewport = function () {\n return this.displayedColumnsCenter.filter(this.isColumnInViewport.bind(this));\n };\n ColumnModel.prototype.refreshFlexedColumns = function (params) {\n var _this = this;\n if (params === void 0) { params = {}; }\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) { return !isColFlex(col); });\n var flexingColumns = this.displayedColumnsCenter.filter(function (col) { return isColFlex(col); });\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) { return count + col.getFlex(); }, 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 }\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) {\n if (source === void 0) { source = \"sizeColumnsToFit\"; }\n // avoid divide by zero\n var allDisplayedColumns = this.getAllDisplayedColumns();\n if (gridWidth <= 0 || !allDisplayedColumns.length) {\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 }\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) { return column.resetActualWidth(source); });\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 column.setMinimum(source);\n });\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 minWidth = column.getMinWidth();\n var maxWidth = 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 }\n else if (exists(maxWidth) && column.isGreaterThanMax(newWidth)) {\n newWidth = maxWidth;\n moveToNotSpread(column);\n finishedResizing = false;\n }\n else if (i === 0) { // 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 ColumnModel.prototype.createGroupAutoColumnsIfNeeded = function () {\n if (!this.autoGroupsNeedBuilding) {\n return;\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 ?\n 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 newAutoGroupCols = this.autoGroupColService.createAutoGroupColumns(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 }\n }\n else {\n this.groupAutoColumns = null;\n }\n };\n ColumnModel.prototype.autoColsEqual = function (colsA, colsB) {\n return areEqual(colsA, colsB, function (a, b) { return a.getColId() === b.getColId(); });\n };\n ColumnModel.prototype.getWidthOfColsInList = function (columnList) {\n return columnList.reduce(function (width, col) { return width + col.getActualWidth(); }, 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) { return col.getColDef().floatingFilter; });\n return res;\n };\n ColumnModel.prototype.getFirstDisplayedColumn = function () {\n var isRtl = this.gridOptionsWrapper.isEnableRtl();\n var queryOrder = [\n 'getDisplayedLeftColumns',\n 'getDisplayedCenterColumns',\n 'getDisplayedRightColumns'\n ];\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 __decorate$5([\n Autowired('expressionService')\n ], ColumnModel.prototype, \"expressionService\", void 0);\n __decorate$5([\n Autowired('columnFactory')\n ], ColumnModel.prototype, \"columnFactory\", void 0);\n __decorate$5([\n Autowired('displayedGroupCreator')\n ], ColumnModel.prototype, \"displayedGroupCreator\", void 0);\n __decorate$5([\n Autowired('autoWidthCalculator')\n ], ColumnModel.prototype, \"autoWidthCalculator\", void 0);\n __decorate$5([\n Autowired('columnUtils')\n ], ColumnModel.prototype, \"columnUtils\", void 0);\n __decorate$5([\n Autowired('columnAnimationService')\n ], ColumnModel.prototype, \"columnAnimationService\", void 0);\n __decorate$5([\n Autowired('autoGroupColService')\n ], ColumnModel.prototype, \"autoGroupColService\", void 0);\n __decorate$5([\n Optional('aggFuncService')\n ], ColumnModel.prototype, \"aggFuncService\", void 0);\n __decorate$5([\n Optional('valueCache')\n ], ColumnModel.prototype, \"valueCache\", void 0);\n __decorate$5([\n Optional('animationFrameService')\n ], ColumnModel.prototype, \"animationFrameService\", void 0);\n __decorate$5([\n Autowired('rowModel')\n ], ColumnModel.prototype, \"rowModel\", void 0);\n __decorate$5([\n Autowired('columnApi')\n ], ColumnModel.prototype, \"columnApi\", void 0);\n __decorate$5([\n Autowired('gridApi')\n ], ColumnModel.prototype, \"gridApi\", void 0);\n __decorate$5([\n Autowired('sortController')\n ], ColumnModel.prototype, \"sortController\", void 0);\n __decorate$5([\n Autowired('columnDefFactory')\n ], ColumnModel.prototype, \"columnDefFactory\", void 0);\n __decorate$5([\n PostConstruct\n ], ColumnModel.prototype, \"init\", null);\n __decorate$5([\n __param$2(0, Qualifier('loggerFactory'))\n ], ColumnModel.prototype, \"setBeans\", null);\n ColumnModel = __decorate$5([\n Bean('columnModel')\n ], ColumnModel);\n return ColumnModel;\n}(BeanStub));\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / React / AngularJS / Web Components\n * @version v26.1.0\n * @link http://www.ag-grid.com/\n * @license MIT\n */\nfunction padStartWidthZeros(value, totalStringSize) {\n return padStart(value.toString(), 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 getMaxSafeInteger() {\n // @ts-ignore\n return Number.MAX_SAFE_INTEGER || 9007199254740991;\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) {\n if (typeof value !== 'number') {\n return '';\n }\n return formatNumberCommas(Math.round(value * 100) / 100);\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) {\n if (typeof value !== 'number') {\n return '';\n }\n return value.toString().replace(/(\\d)(?=(\\d{3})+(?!\\d))/g, \"$1,\");\n}\nfunction sum(values) {\n return values == null ? null : values.reduce(function (total, value) { return total + value; }, 0);\n}\n\nvar NumberUtils = /*#__PURE__*/Object.freeze({\n __proto__: null,\n padStartWidthZeros: padStartWidthZeros,\n createArrayOfNumbers: createArrayOfNumbers,\n isNumeric: isNumeric,\n getMaxSafeInteger: getMaxSafeInteger,\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 / React / AngularJS / Web Components\n * @version v26.1.0\n * @link http://www.ag-grid.com/\n * @license MIT\n */\nvar __extends$2 = (undefined && undefined.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate$6 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n 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$2(ColumnUtils, _super);\n function ColumnUtils() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n ColumnUtils.prototype.calculateColInitialWidth = function (colDef) {\n var optionsWrapper = this.gridOptionsWrapper;\n var minColWidth = colDef.minWidth != null ? colDef.minWidth : optionsWrapper.getMinColWidth();\n var maxColWidth = colDef.maxWidth != null ? colDef.maxWidth : (optionsWrapper.getMaxColWidth() || getMaxSafeInteger());\n var width;\n var colDefWidth = attrToNumber(colDef.width);\n var colDefInitialWidth = attrToNumber(colDef.initialWidth);\n if (colDefWidth != null) {\n width = colDefWidth;\n }\n else if (colDefInitialWidth != null) {\n width = colDefInitialWidth;\n }\n else {\n width = optionsWrapper.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 }\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$6([\n Bean('columnUtils')\n ], ColumnUtils);\n return ColumnUtils;\n}(BeanStub));\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / React / AngularJS / Web Components\n * @version v26.1.0\n * @link http://www.ag-grid.com/\n * @license MIT\n */\nvar __extends$3 = (undefined && undefined.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate$7 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n 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$3(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 }\n else {\n currentRealPath[i - 1].addChild(newGroup);\n }\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 }\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 (originalGroup, groupInstanceIdCreator, oldColumnsMapped, pinned) {\n var groupId = originalGroup.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.getOriginalColumnGroup() !== originalGroup) {\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 }\n else {\n columnGroup = new ColumnGroup(originalGroup, 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 var nextNode = node;\n recursePath(nextNode.getChildren(), dept + 1);\n result[dept] = node;\n }\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('could not get path');\n return null;\n };\n DisplayedGroupCreator = __decorate$7([\n Bean('displayedGroupCreator')\n ], DisplayedGroupCreator);\n return DisplayedGroupCreator;\n}(BeanStub));\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / React / AngularJS / Web Components\n * @version v26.1.0\n * @link http://www.ag-grid.com/\n * @license MIT\n */\nvar __spreadArrays$1 = (undefined && undefined.__spreadArrays) || function () {\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\n r[k] = a[j];\n return r;\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 }\n PropertyKeys.STRING_PROPERTIES = [\n 'sortingOrder', 'rowClass', 'rowSelection', 'overlayLoadingTemplate', 'overlayNoRowsTemplate',\n 'quickFilterText', 'rowModelType', 'editType', 'domLayout', 'clipboardDeliminator', 'rowGroupPanelShow',\n 'multiSortKey', 'pivotColumnGroupTotals', 'pivotRowTotals', 'pivotPanelShow', 'fillHandleDirection',\n 'serverSideStoreType', 'groupDisplayType', 'treeDataDisplayType'\n ];\n PropertyKeys.OBJECT_PROPERTIES = [\n 'components', 'frameworkComponents', 'rowStyle', 'context', 'autoGroupColumnDef', 'localeText', 'icons',\n 'datasource', 'serverSideDatasource', 'viewportDatasource', 'groupRowRendererParams', 'aggFuncs', 'fullWidthCellRendererParams',\n 'defaultColGroupDef', 'defaultColDef', 'defaultExportParams', 'defaultCsvExportParams', 'defaultExcelExportParams', 'columnTypes',\n 'rowClassRules', 'detailCellRendererParams', 'loadingCellRendererParams', 'loadingOverlayComponentParams',\n 'noRowsOverlayComponentParams', 'popupParent', 'colResizeDefault', 'statusBar', 'sideBar', 'chartThemeOverrides',\n 'customChartThemes'\n ];\n PropertyKeys.ARRAY_PROPERTIES = [\n 'alignedGrids', 'rowData', 'columnDefs', 'excelStyles', 'pinnedTopRowData', 'pinnedBottomRowData', 'chartThemes'\n ];\n PropertyKeys.NUMBER_PROPERTIES = [\n 'rowHeight', 'detailRowHeight', 'rowBuffer', 'colWidth', 'headerHeight', 'groupHeaderHeight', 'floatingFiltersHeight',\n 'pivotHeaderHeight', 'pivotGroupHeaderHeight', 'groupDefaultExpanded', 'minColWidth', 'maxColWidth', 'viewportRowModelPageSize',\n 'viewportRowModelBufferSize', 'autoSizePadding', 'maxBlocksInCache', 'maxConcurrentDatasourceRequests', 'tooltipShowDelay',\n 'cacheOverflowSize', 'paginationPageSize', 'cacheBlockSize', 'infiniteInitialRowCount', 'scrollbarWidth',\n 'batchUpdateWaitMillis', 'asyncTransactionWaitMillis', 'blockLoadDebounceMillis', 'keepDetailRowsCount',\n 'undoRedoCellEditingLimit', 'cellFlashDelay', 'cellFadeDelay', 'tabIndex'\n ];\n PropertyKeys.BOOLEAN_PROPERTIES = [\n 'suppressMakeColumnVisibleAfterUnGroup', 'suppressRowClickSelection', 'suppressCellSelection', 'suppressHorizontalScroll',\n 'alwaysShowHorizontalScroll', 'alwaysShowVerticalScroll', 'debug', 'enableBrowserTooltips', 'enableCellExpressions',\n 'angularCompileRows', 'angularCompileFilters', 'groupSuppressAutoColumn', 'groupSelectsChildren', 'groupIncludeFooter',\n 'groupIncludeTotalFooter', 'groupUseEntireRow', 'groupSuppressBlankHeader', 'suppressMenuHide', 'suppressRowDeselection',\n 'unSortIcon', 'suppressMultiSort', 'singleClickEdit', 'suppressLoadingOverlay', 'suppressNoRowsOverlay', 'suppressAutoSize',\n 'skipHeaderOnAutoSize', 'suppressParentsInRowNodes', 'suppressColumnMoveAnimation', 'suppressMovableColumns',\n 'suppressFieldDotNotation', 'enableRangeSelection', 'enableRangeHandle', 'enableFillHandle', 'suppressClearOnFillReduction',\n 'deltaSort', 'suppressTouch', 'suppressAsyncEvents', 'allowContextMenuWithControlKey', 'suppressContextMenu',\n 'rememberGroupStateWhenNewData', 'enableCellChangeFlash', 'suppressDragLeaveHidesColumns', 'suppressMiddleClickScrolls',\n 'suppressPreventDefaultOnMouseWheel', 'suppressCopyRowsToClipboard', 'copyHeadersToClipboard', 'pivotMode',\n 'suppressAggFuncInHeader', 'suppressColumnVirtualisation', 'suppressAggAtRootLevel', 'suppressFocusAfterRefresh',\n 'functionsPassive', 'functionsReadOnly', 'animateRows', 'groupSelectsFiltered', 'groupRemoveSingleChildren',\n 'groupRemoveLowestSingleChildren', 'enableRtl', 'suppressClickEdit', 'rowDragEntireRow', 'rowDragManaged', 'suppressRowDrag',\n 'suppressMoveWhenRowDragging', 'rowDragMultiRow', 'enableGroupEdit', 'embedFullWidthRows', 'deprecatedEmbedFullWidthRows',\n 'suppressPaginationPanel', 'floatingFilter', 'groupHideOpenParents', 'groupMultiAutoColumn', 'pagination',\n 'stopEditingWhenGridLosesFocus', 'paginationAutoPageSize', 'suppressScrollOnNewData', 'suppressScrollWhenPopupsAreOpen',\n 'purgeClosedRowNodes', 'cacheQuickFilter', 'deltaRowDataMode', 'ensureDomOrder', 'accentedSort', 'suppressChangeDetection',\n 'valueCache', 'valueCacheNeverExpires', 'aggregateOnlyChangedColumns', 'suppressAnimationFrame', 'suppressExcelExport',\n 'suppressCsvExport', 'treeData', 'masterDetail', 'suppressMultiRangeSelection', 'enterMovesDownAfterEdit', 'enterMovesDown',\n 'suppressPropertyNamesCheck', 'rowMultiSelectWithClick', 'suppressEnterpriseResetOnNewColumns', 'enableOldSetFilterModel',\n 'suppressRowHoverHighlight', 'suppressRowTransform', 'suppressClipboardPaste', 'suppressLastEmptyLineOnPaste',\n 'serverSideSortingAlwaysResets', 'suppressSetColumnStateEvents', 'suppressColumnStateEvents', 'enableCharts', 'deltaColumnMode',\n 'suppressMaintainUnsortedOrder', 'enableCellTextSelection', 'suppressBrowserResizeObserver', 'suppressMaxRenderedRowRestriction',\n 'excludeChildrenWhenTreeDataFiltering', 'tooltipMouseTrack', 'keepDetailRows', 'paginateChildRows', 'preventDefaultOnContextMenu',\n 'undoRedoCellEditing', 'allowDragFromColumnsToolPanel', 'immutableData', 'immutableColumns', 'pivotSuppressAutoColumn',\n 'suppressExpandablePivotGroups', 'applyColumnDefOrder', 'debounceVerticalScrollbar', 'detailRowAutoHeight',\n 'serverSideFilteringAlwaysResets', 'suppressAggFilteredOnly', 'showOpenedGroup', 'suppressClipboardApi',\n 'suppressModelUpdateAfterUpdateTransaction', 'stopEditingWhenCellsLoseFocus', 'maintainColumnOrder', 'groupMaintainOrder',\n 'columnHoverHighlight', 'allowProcessChartOptions'\n ];\n /** You do not need to include event callbacks in this list, as they are generated automatically. */\n PropertyKeys.FUNCTION_PROPERTIES = [\n 'localeTextFunc', 'groupRowInnerRenderer', 'groupRowInnerRendererFramework',\n 'groupRowRenderer', 'groupRowRendererFramework', 'isExternalFilterPresent', 'getRowHeight', 'doesExternalFilterPass',\n 'getRowClass', 'getRowStyle', 'getContextMenuItems', 'getMainMenuItems', 'processRowPostCreate', 'processCellForClipboard',\n 'groupRowAggNodes', 'getRowNodeId', 'isFullWidthCell', 'fullWidthCellRenderer', 'fullWidthCellRendererFramework',\n 'processSecondaryColDef', 'processSecondaryColGroupDef', 'getBusinessKeyForNode', 'sendToClipboard', 'navigateToNextHeader',\n 'tabToNextHeader', 'navigateToNextCell', 'tabToNextCell', 'processCellFromClipboard', 'getDocument', 'postProcessPopup',\n 'getChildCount', 'getDataPath', 'loadingCellRenderer', 'loadingCellRendererFramework', 'loadingOverlayComponent',\n 'loadingOverlayComponentFramework', 'noRowsOverlayComponent', 'noRowsOverlayComponentFramework', 'detailCellRenderer',\n 'detailCellRendererFramework', 'isRowMaster', 'isRowSelectable', 'postSort', 'processHeaderForClipboard', 'paginationNumberFormatter',\n 'processDataFromClipboard', 'getServerSideGroupKey', 'isServerSideGroup', 'suppressKeyboardEvent', 'createChartContainer',\n 'processChartOptions', 'getChartToolbarItems', 'fillOperation', 'isApplyServerSideTransaction', 'getServerSideStoreParams',\n 'isServerSideGroupOpenByDefault', 'isGroupOpenByDefault', 'defaultGroupSortComparator', 'defaultGroupOrderComparator', 'loadingCellRendererSelector'\n ];\n PropertyKeys.ALL_PROPERTIES = __spreadArrays$1(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 = [\n '__ob__', '__v_skip', '__metadata__', 'mappedColumnProperties', 'hasChildColumns', 'toColDef', 'createColDefFromGridColumn'\n ];\n return PropertyKeys;\n}());\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / React / AngularJS / Web Components\n * @version v26.1.0\n * @link http://www.ag-grid.com/\n * @license MIT\n */\nvar __assign = (undefined && undefined.__assign) || function () {\n __assign = 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))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nvar __spreadArrays$2 = (undefined && undefined.__spreadArrays) || function () {\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\n r[k] = a[j];\n return r;\n};\nvar ComponentUtil = /** @class */ (function () {\n function ComponentUtil() {\n }\n ComponentUtil.getEventCallbacks = function () {\n if (!ComponentUtil.EVENT_CALLBACKS) {\n ComponentUtil.EVENT_CALLBACKS = ComponentUtil.EVENTS.map(function (event) { return ComponentUtil.getCallbackForEvent(event); });\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) { return typeof component[key] !== 'undefined'; };\n // add in all the simple properties\n __spreadArrays$2(ComponentUtil.ARRAY_PROPERTIES, ComponentUtil.STRING_PROPERTIES, ComponentUtil.OBJECT_PROPERTIES, ComponentUtil.FUNCTION_PROPERTIES, ComponentUtil.getEventCallbacks()).filter(keyExists)\n .forEach(function (key) { return pGridOptions[key] = component[key]; });\n ComponentUtil.BOOLEAN_PROPERTIES\n .filter(keyExists)\n .forEach(function (key) { return pGridOptions[key] = ComponentUtil.toBoolean(component[key]); });\n ComponentUtil.NUMBER_PROPERTIES\n .filter(keyExists)\n .forEach(function (key) { return pGridOptions[key] = ComponentUtil.toNumber(component[key]); });\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({}, 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) { return changesToApply[key]; };\n // check if any change for the simple types, and if so, then just copy in the new value\n __spreadArrays$2(ComponentUtil.ARRAY_PROPERTIES, ComponentUtil.OBJECT_PROPERTIES, ComponentUtil.STRING_PROPERTIES, ComponentUtil.getEventCallbacks()).filter(keyExists)\n .forEach(function (key) { return pGridOptions[key] = changesToApply[key].currentValue; });\n ComponentUtil.BOOLEAN_PROPERTIES\n .filter(keyExists)\n .forEach(function (key) { return pGridOptions[key] = ComponentUtil.toBoolean(changesToApply[key].currentValue); });\n ComponentUtil.NUMBER_PROPERTIES\n .filter(keyExists)\n .forEach(function (key) { return pGridOptions[key] = ComponentUtil.toNumber(changesToApply[key].currentValue); });\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.paginationPageSize) {\n api.paginationSetPageSize(ComponentUtil.toNumber(changesToApply.paginationPageSize.currentValue));\n delete changesToApply.paginationPageSize;\n }\n if (changesToApply.pivotMode) {\n columnApi.setPivotMode(ComponentUtil.toBoolean(changesToApply.pivotMode.currentValue));\n delete changesToApply.pivotMode;\n }\n if (changesToApply.groupRemoveSingleChildren) {\n api.setGroupRemoveSingleChildren(ComponentUtil.toBoolean(changesToApply.groupRemoveSingleChildren.currentValue));\n delete changesToApply.groupRemoveSingleChildren;\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 // 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)\n .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 api: gridOptions.api,\n columnApi: gridOptions.columnApi\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 = [\n Events.EVENT_SCROLLBAR_WIDTH_CHANGED,\n Events.EVENT_CHECKBOX_CHANGED,\n Events.EVENT_HEIGHT_SCALE_CHANGED,\n Events.EVENT_BODY_HEIGHT_CHANGED,\n Events.EVENT_DISPLAYED_COLUMNS_WIDTH_CHANGED,\n Events.EVENT_SCROLL_VISIBILITY_CHANGED,\n Events.EVENT_COLUMN_HOVER_CHANGED,\n Events.EVENT_FLASH_CELLS,\n Events.EVENT_PAGINATION_PIXEL_OFFSET_CHANGED,\n Events.EVENT_DISPLAYED_ROWS_CHANGED,\n Events.EVENT_LEFT_PINNED_WIDTH_CHANGED,\n Events.EVENT_RIGHT_PINNED_WIDTH_CHANGED,\n Events.EVENT_ROW_CONTAINER_HEIGHT_CHANGED,\n Events.EVENT_POPUP_TO_FRONT,\n Events.EVENT_KEYBOARD_FOCUS,\n Events.EVENT_MOUSE_FOCUS,\n Events.EVENT_STORE_UPDATED,\n Events.EVENT_COLUMN_PANEL_ITEM_DRAG_START,\n Events.EVENT_COLUMN_PANEL_ITEM_DRAG_END,\n Events.EVENT_FILL_START,\n Events.EVENT_FILL_END,\n];\n/** EVENTS that should be exposed via code generation for the framework components. */\nComponentUtil.PUBLIC_EVENTS = ComponentUtil.EVENTS.filter(function (e) { return !includes(ComponentUtil.EXCLUDED_INTERNAL_EVENTS, e); });\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / React / AngularJS / Web Components\n * @version v26.1.0\n * @link http://www.ag-grid.com/\n * @license MIT\n */\nvar __extends$4 = (undefined && undefined.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate$8 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n 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$4(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) { return _this.addComponent(componentMeta); });\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$8([\n Bean('agStackComponentsRegistry')\n ], AgStackComponentsRegistry);\n return AgStackComponentsRegistry;\n}(BeanStub));\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / React / AngularJS / Web Components\n * @version v26.1.0\n * @link http://www.ag-grid.com/\n * @license MIT\n */\nvar __spreadArrays$3 = (undefined && undefined.__spreadArrays) || function () {\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\n r[k] = a[j];\n return r;\n};\nvar ColDefUtil = /** @class */ (function () {\n function ColDefUtil() {\n }\n ColDefUtil.STRING_PROPERTIES = [\n 'headerName',\n 'columnGroupShow',\n 'headerClass',\n 'toolPanelClass',\n 'headerValueGetter',\n 'pivotKeys',\n 'groupId',\n 'colId',\n 'sort',\n 'initialSort',\n 'field',\n 'type',\n 'tooltipComponent',\n 'tooltipField',\n 'headerTooltip',\n 'cellClass',\n 'showRowGroup',\n 'template',\n 'templateUrl',\n 'filter',\n 'initialAggFunc',\n 'aggFunc',\n 'cellRenderer',\n 'cellEditor',\n 'pinned',\n 'initialPinned',\n 'chartDataType',\n 'cellEditorPopupPosition'\n ];\n ColDefUtil.OBJECT_PROPERTIES = [\n 'headerGroupComponent',\n 'headerGroupComponentFramework',\n 'headerGroupComponentParams',\n 'cellStyle',\n 'cellRendererParams',\n 'cellEditorFramework',\n 'cellEditorParams',\n 'pinnedRowCellRendererFramework',\n 'pinnedRowCellRendererParams',\n 'filterFramework',\n 'filterParams',\n 'pivotValueColumn',\n 'headerComponent',\n 'headerComponentFramework',\n 'headerComponentParams',\n 'floatingFilterComponent',\n 'floatingFilterComponentParams',\n 'floatingFilterComponentFramework',\n 'tooltipComponent',\n 'tooltipComponentParams',\n 'tooltipComponentFramework',\n 'refData',\n 'columnsMenuParams'\n ];\n ColDefUtil.ARRAY_PROPERTIES = [\n 'children',\n 'sortingOrder',\n 'allowedAggFuncs',\n 'menuTabs',\n 'pivotTotalColumnIds',\n 'cellClassRules',\n 'icons'\n ];\n ColDefUtil.NUMBER_PROPERTIES = [\n 'sortedAt',\n 'sortIndex',\n 'initialSortIndex',\n 'flex',\n 'initialFlex',\n 'width',\n 'initialWidth',\n 'minWidth',\n 'maxWidth',\n 'rowGroupIndex',\n 'initialRowGroupIndex',\n 'pivotIndex',\n 'initialPivotIndex'\n ];\n ColDefUtil.BOOLEAN_PROPERTIES = [\n 'suppressCellFlash',\n 'suppressColumnsToolPanel',\n 'suppressFiltersToolPanel',\n 'openByDefault',\n 'marryChildren',\n 'hide',\n 'initialHide',\n 'rowGroup',\n 'initialRowGroup',\n 'pivot',\n 'initialPivot',\n 'checkboxSelection',\n 'headerCheckboxSelection',\n 'headerCheckboxSelectionFilteredOnly',\n 'suppressMenu',\n 'suppressMovable',\n 'lockPosition',\n 'lockVisible',\n 'lockPinned',\n 'unSortIcon',\n 'suppressSizeToFit',\n 'suppressAutoSize',\n 'enableRowGroup',\n 'enablePivot',\n 'enableValue',\n 'editable',\n 'suppressPaste',\n 'suppressNavigable',\n 'enableCellChangeFlash',\n 'rowDrag',\n 'dndSource',\n 'autoHeight',\n 'wrapText',\n 'sortable',\n 'resizable',\n 'singleClickEdit',\n 'floatingFilter',\n 'cellEditorPopup',\n 'suppressFillHandle'\n ];\n ColDefUtil.FUNCTION_PROPERTIES = [\n 'dndSourceOnRowDrag',\n 'valueGetter',\n 'valueSetter',\n 'filterValueGetter',\n 'keyCreator',\n 'cellRenderer',\n 'cellRendererFramework',\n 'pinnedRowCellRenderer',\n 'valueFormatter',\n 'pinnedRowValueFormatter',\n 'valueParser',\n 'comparator',\n 'equals',\n 'pivotComparator',\n 'suppressKeyboardEvent',\n 'suppressHeaderKeyboardEvent',\n 'colSpan',\n 'rowSpan',\n 'getQuickFilterText',\n 'newValueHandler',\n 'onCellValueChanged',\n 'onCellClicked',\n 'onCellDoubleClicked',\n 'onCellContextMenu',\n 'rowDragText',\n 'tooltipValueGetter',\n 'tooltipComponent',\n 'tooltipComponentFramework',\n 'cellRendererSelector',\n 'cellEditorSelector'\n ];\n ColDefUtil.ALL_PROPERTIES = __spreadArrays$3(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 = [\n '__ob__',\n '__v_skip',\n '__metadata__',\n 'mappedColumnProperties',\n 'hasChildColumns',\n 'toColDef',\n 'createColDefFromGridColumn'\n ];\n return ColDefUtil;\n}());\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / React / AngularJS / Web Components\n * @version v26.1.0\n * @link http://www.ag-grid.com/\n * @license MIT\n */\nfunction QuerySelector(selector) {\n return querySelectorFunc.bind(this, selector, undefined);\n}\nfunction RefSelector(ref) {\n return querySelectorFunc.bind(this, \"[ref=\" + ref + \"]\", ref);\n}\nfunction querySelectorFunc(selector, refSelector, classPrototype, methodOrAttributeName, index) {\n if (selector === null) {\n console.error('AG Grid: QuerySelector selector should not be null');\n return;\n }\n if (typeof index === 'number') {\n console.error('AG Grid: QuerySelector should be on an attribute');\n return;\n }\n addToObjectProps(classPrototype, 'querySelectors', {\n attributeName: methodOrAttributeName,\n querySelector: selector,\n refSelector: refSelector\n });\n}\n// // think we should take this out, put property bindings on the\n// export function Method(eventName?: string): Function {\n// return methodFunc.bind(this, eventName);\n// }\n//\n// function methodFunc(alias: string, target: Object, methodName: string) {\n// if (alias === null) {\n// console.error(\"AG Grid: EventListener eventName should not be null\");\n// return;\n// }\n//\n// addToObjectProps(target, 'methods', {\n// methodName: methodName,\n// alias: alias\n// });\n// }\nfunction addToObjectProps(target, key, value) {\n // it's an attribute on the class\n var props = getOrCreateProps$1(target, getFunctionName(target.constructor));\n if (!props[key]) {\n props[key] = [];\n }\n props[key].push(value);\n}\nfunction getOrCreateProps$1(target, instanceName) {\n if (!target.__agComponentMetaData) {\n target.__agComponentMetaData = {};\n }\n if (!target.__agComponentMetaData[instanceName]) {\n target.__agComponentMetaData[instanceName] = {};\n }\n return target.__agComponentMetaData[instanceName];\n}\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / React / AngularJS / Web Components\n * @version v26.1.0\n * @link http://www.ag-grid.com/\n * @license MIT\n */\n/** Provides sync access to async component. Date component can be lazy created - this class encapsulates\n * this by keeping value locally until DateComp has loaded, then passing DateComp the value. */\nvar DateCompWrapper = /** @class */ (function () {\n function DateCompWrapper(context, userComponentFactory, dateComponentParams, eParent) {\n var _this = this;\n this.alive = true;\n this.context = context;\n userComponentFactory.newDateComponent(dateComponentParams).then(function (dateComp) {\n // because async, check the filter still exists after component comes back\n if (!_this.alive) {\n context.destroyBean(dateComp);\n return;\n }\n _this.dateComp = dateComp;\n if (!dateComp) {\n return;\n }\n eParent.appendChild(dateComp.getGui());\n if (dateComp.afterGuiAttached) {\n dateComp.afterGuiAttached();\n }\n if (_this.tempValue) {\n dateComp.setDate(_this.tempValue);\n }\n });\n }\n DateCompWrapper.prototype.destroy = function () {\n this.alive = false;\n this.dateComp = this.context.destroyBean(this.dateComp);\n };\n DateCompWrapper.prototype.getDate = function () {\n return this.dateComp ? this.dateComp.getDate() : this.tempValue;\n };\n DateCompWrapper.prototype.setDate = function (value) {\n if (this.dateComp) {\n this.dateComp.setDate(value);\n }\n else {\n this.tempValue = value;\n }\n };\n DateCompWrapper.prototype.setInputPlaceholder = function (placeholder) {\n if (this.dateComp && this.dateComp.setInputPlaceholder) {\n this.dateComp.setInputPlaceholder(placeholder);\n }\n };\n DateCompWrapper.prototype.setInputAriaLabel = function (label) {\n if (this.dateComp && this.dateComp.setInputAriaLabel) {\n this.dateComp.setInputAriaLabel(label);\n }\n };\n DateCompWrapper.prototype.afterGuiAttached = function (params) {\n if (this.dateComp && typeof this.dateComp.afterGuiAttached === 'function') {\n this.dateComp.afterGuiAttached(params);\n }\n };\n return DateCompWrapper;\n}());\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / React / AngularJS / Web Components\n * @version v26.1.0\n * @link http://www.ag-grid.com/\n * @license MIT\n */\n/* Common logic for options, used by both filters and floating filters. */\nvar OptionsFactory = /** @class */ (function () {\n function OptionsFactory() {\n this.customFilterOptions = {};\n }\n OptionsFactory.prototype.init = function (params, defaultOptions) {\n this.filterOptions = params.filterOptions || defaultOptions;\n this.mapCustomOptions();\n this.selectDefaultItem(params);\n };\n OptionsFactory.prototype.getFilterOptions = function () {\n return this.filterOptions;\n };\n OptionsFactory.prototype.mapCustomOptions = function () {\n var _this = this;\n if (!this.filterOptions) {\n return;\n }\n this.filterOptions.forEach(function (filterOption) {\n if (typeof filterOption === 'string') {\n return;\n }\n var requiredProperties = ['displayKey', 'displayName', 'test'];\n if (every(requiredProperties, function (key) {\n if (!filterOption[key]) {\n console.warn(\"AG Grid: ignoring FilterOptionDef as it doesn't contain a '\" + key + \"'\");\n return false;\n }\n return true;\n })) {\n _this.customFilterOptions[filterOption.displayKey] = filterOption;\n }\n });\n };\n OptionsFactory.prototype.selectDefaultItem = function (params) {\n if (params.defaultOption) {\n this.defaultOption = params.defaultOption;\n }\n else if (this.filterOptions.length >= 1) {\n var firstFilterOption = this.filterOptions[0];\n if (typeof firstFilterOption === 'string') {\n this.defaultOption = firstFilterOption;\n }\n else if (firstFilterOption.displayKey) {\n this.defaultOption = firstFilterOption.displayKey;\n }\n else {\n console.warn(\"AG Grid: invalid FilterOptionDef supplied as it doesn't contain a 'displayKey'\");\n }\n }\n else {\n console.warn('AG Grid: no filter options for filter');\n }\n };\n OptionsFactory.prototype.getDefaultOption = function () {\n return this.defaultOption;\n };\n OptionsFactory.prototype.getCustomOption = function (name) {\n return this.customFilterOptions[name];\n };\n return OptionsFactory;\n}());\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / React / AngularJS / Web Components\n * @version v26.1.0\n * @link http://www.ag-grid.com/\n * @license MIT\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 isIOS;\nvar invisibleScrollbar;\nvar browserScrollbarWidth;\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)) ||\n (/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 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 getTabIndex(el) {\n if (!el) {\n return null;\n }\n var numberTabIndex = el.tabIndex;\n var tabIndex = el.getAttribute('tabIndex');\n if (isBrowserIE() && numberTabIndex === 0 && tabIndex === null) {\n var map = {\n a: true,\n body: true,\n button: true,\n frame: true,\n iframe: true,\n img: true,\n input: true,\n isindex: true,\n object: true,\n select: true,\n textarea: true\n };\n return map[el.nodeName.toLowerCase()] === true ? '0' : null;\n }\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 }\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 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) { return \"-\" + prefix + \"-overflow-scrolling: touch\"; }).concat('overflow-scrolling: touch').join(';'));\n var computedStyle = window.getComputedStyle(div);\n if (computedStyle.overflowScrolling === 'touch') {\n found = true;\n }\n if (!found) {\n for (var _i = 0, prefixes_1 = prefixes; _i < prefixes_1.length; _i++) {\n p = prefixes_1[_i];\n if (computedStyle[p + \"OverflowScrolling\"] === 'touch') {\n found = true;\n break;\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}\n\nvar BrowserUtils = /*#__PURE__*/Object.freeze({\n __proto__: null,\n isBrowserIE: isBrowserIE,\n isBrowserEdge: isBrowserEdge,\n isBrowserSafari: isBrowserSafari,\n isBrowserChrome: isBrowserChrome,\n isBrowserFirefox: isBrowserFirefox,\n isIOSUserAgent: isIOSUserAgent,\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 / React / AngularJS / Web Components\n * @version v26.1.0\n * @link http://www.ag-grid.com/\n * @license MIT\n */\nvar rtlNegativeScroll;\nfunction addCssClass(element, className) {\n if (!element || !className || className.length === 0) {\n return;\n }\n if (className.indexOf(' ') >= 0) {\n className.split(' ').forEach(function (value) { return addCssClass(element, value); });\n return;\n }\n if (element.classList) {\n element.classList.add(className);\n }\n else if (element.className && element.className.length > 0) {\n var cssClasses = element.className.split(' ');\n if (cssClasses.indexOf(className) < 0) {\n cssClasses.push(className);\n element.setAttribute('class', cssClasses.join(' '));\n }\n }\n else {\n // do not use element.classList = className here, it will cause\n // a read-only assignment error on some browsers (IE/Edge).\n element.setAttribute('class', className);\n }\n return element;\n}\nfunction removeCssClass(element, className) {\n if (!element || !className || className.length === 0) {\n return;\n }\n if (className.indexOf(' ') >= 0) {\n className.split(' ').forEach(function (value) { return removeCssClass(element, value); });\n return;\n }\n if (element.classList) {\n element.classList.remove(className);\n }\n else if (element.className && element.className.length > 0) {\n var newClassName = element.className.split(' ').filter(function (c) { return c !== className; }).join(' ');\n element.setAttribute('class', newClassName);\n }\n}\nfunction addOrRemoveCssClass(element, className, addOrRemove) {\n if (addOrRemove) {\n addCssClass(element, className);\n }\n else {\n removeCssClass(element, className);\n }\n}\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 addOrRemoveCssClass(sibling, elementClass, sibling === element);\n }\n if (otherElementClass) {\n addOrRemoveCssClass(sibling, otherElementClass, sibling !== element);\n }\n sibling = sibling.nextSibling;\n }\n}\nfunction containsClass(element, className) {\n if (element.classList) {\n // for modern browsers\n return element.classList.contains(className);\n }\n if (element.className) {\n // for older browsers, check against the string of class names\n // if only one class, can check for exact match\n var onlyClass = element.className === className;\n // if many classes, check for class name, we have to pad with ' ' to stop other\n // class names that are a substring of this class\n var contains = element.className.indexOf(' ' + className + ' ') >= 0;\n // the padding above then breaks when it's the first or last class names\n var startsWithClass = element.className.indexOf(className + ' ') === 0;\n var endsWithClass = element.className.lastIndexOf(' ' + className) === (element.className.length - className.length - 1);\n return onlyClass || contains || startsWithClass || endsWithClass;\n }\n // if item is not a node\n return false;\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 addOrRemoveCssClass(element, 'ag-hidden', !displayed);\n}\nfunction setVisible(element, visible) {\n addOrRemoveCssClass(element, 'ag-invisible', !visible);\n}\nfunction setDisabled(element, disabled) {\n var attributeName = 'disabled';\n var addOrRemoveDisabledAttribute = disabled ?\n function (e) { return e.setAttribute(attributeName, ''); } :\n function (e) { return e.removeAttribute(attributeName); };\n addOrRemoveDisabledAttribute(element);\n nodeListForEach(element.querySelectorAll('input'), function (input) { return addOrRemoveDisabledAttribute(input); });\n}\nfunction isElementChildOfClass(element, cls, maxNest) {\n var counter = 0;\n while (element) {\n if (containsClass(element, cls)) {\n return true;\n }\n element = element.parentElement;\n if (maxNest && ++counter > 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), height = _a.height, width = _a.width, paddingTop = _a.paddingTop, paddingRight = _a.paddingRight, paddingBottom = _a.paddingBottom, paddingLeft = _a.paddingLeft, marginTop = _a.marginTop, marginRight = _a.marginRight, marginBottom = _a.marginBottom, marginLeft = _a.marginLeft, 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 \"\\n \\n \\n
\";\n document.body.appendChild(template);\n template.scrollLeft = 1;\n rtlNegativeScroll = Math.floor(template.scrollLeft) === 0;\n document.body.removeChild(template);\n return rtlNegativeScroll;\n}\nfunction getScrollLeft(element, rtl) {\n var scrollLeft = element.scrollLeft;\n if (rtl) {\n // Absolute value - for FF that reports RTL scrolls in negative numbers\n scrollLeft = Math.abs(scrollLeft);\n if (isBrowserChrome() && !isRtlNegativeScroll()) {\n scrollLeft = element.scrollWidth - element.clientWidth - scrollLeft;\n }\n }\n return scrollLeft;\n}\nfunction setScrollLeft(element, value, rtl) {\n if (rtl) {\n // Chrome and Safari when doing RTL have the END position of the scroll as zero, not the start\n if (isRtlNegativeScroll()) {\n value *= -1;\n }\n else if (isBrowserSafari() || isBrowserChrome()) {\n value = element.scrollWidth - element.clientWidth - value;\n }\n }\n element.scrollLeft = value;\n}\nfunction clearElement(el) {\n while (el && el.firstChild) {\n el.removeChild(el.firstChild);\n }\n}\n/** @deprecated */\nfunction removeElement(parent, cssSelector) {\n removeFromParent(parent.querySelector(cssSelector));\n}\nfunction removeFromParent(node) {\n if (node && node.parentNode) {\n node.parentNode.removeChild(node);\n }\n}\nfunction isVisible(element) {\n return element.offsetParent !== null;\n}\n/**\n * Loads the template and returns it as an element. makes up for no simple way in\n * the dom api to load html directly, eg we cannot do this: document.createElement(template)\n * @param {string} template\n * @returns {HTMLElement}\n */\nfunction loadTemplate(template) {\n var tempDiv = document.createElement('div');\n tempDiv.innerHTML = (template || '').trim();\n return tempDiv.firstChild;\n}\nfunction appendHtml(eContainer, htmlTemplate) {\n if (eContainer.lastChild) {\n // https://developer.mozilla.org/en-US/docs/Web/API/Element/insertAdjacentHTML\n // we put the items at the start, so new items appear underneath old items,\n // so when expanding/collapsing groups, the new rows don't go on top of the\n // rows below that are moving our of the way\n eContainer.insertAdjacentHTML('afterbegin', htmlTemplate);\n }\n else {\n eContainer.innerHTML = htmlTemplate;\n }\n}\n/** @deprecated */\nfunction getElementAttribute(element, attributeName) {\n if (element.attributes && element.attributes[attributeName]) {\n var attribute = element.attributes[attributeName];\n return attribute.value;\n }\n return null;\n}\nfunction offsetHeight(element) {\n return element && element.clientHeight ? element.clientHeight : 0;\n}\nfunction offsetWidth(element) {\n return element && element.clientWidth ? element.clientWidth : 0;\n}\nfunction ensureDomOrder(eContainer, eChild, eChildBefore) {\n // if already in right order, do nothing\n if (eChildBefore && eChildBefore.nextSibling === eChild) {\n return;\n }\n if (eChildBefore) {\n if (eChildBefore.nextSibling) {\n // insert between the eRowBefore and the row after it\n eContainer.insertBefore(eChild, eChildBefore.nextSibling);\n }\n else {\n // if nextSibling is missing, means other row is at end, so just append new row at the end\n eContainer.appendChild(eChild);\n }\n }\n else {\n // otherwise put at start\n if (eContainer.firstChild && eContainer.firstChild !== eChild) {\n // insert it at the first location\n eContainer.insertAdjacentElement('afterbegin', eChild);\n }\n }\n}\nfunction setDomChildOrder(eContainer, orderedChildren) {\n for (var i = 0; i < orderedChildren.length; i++) {\n var correctCellAtIndex = orderedChildren[i];\n var actualCellAtIndex = eContainer.children[i];\n if (actualCellAtIndex !== correctCellAtIndex) {\n eContainer.insertBefore(correctCellAtIndex, actualCellAtIndex);\n }\n }\n}\nfunction insertWithDomOrder(eContainer, eToInsert, eChildBefore) {\n if (eChildBefore) {\n // if previous element exists, just slot in after the previous element\n eChildBefore.insertAdjacentElement('afterend', eToInsert);\n }\n else {\n if (eContainer.firstChild) {\n // insert it at the first location\n eContainer.insertAdjacentElement('afterbegin', eToInsert);\n }\n else {\n // otherwise eContainer is empty, so just append it\n eContainer.appendChild(eToInsert);\n }\n }\n}\n/** @deprecated */\nfunction prependDC(parent, documentFragment) {\n if (exists(parent.firstChild)) {\n parent.insertBefore(documentFragment, parent.firstChild);\n }\n else {\n parent.appendChild(documentFragment);\n }\n}\nfunction addStylesToElement(eElement, styles) {\n if (!styles) {\n return;\n }\n Object.keys(styles).forEach(function (key) {\n var keyCamelCase = hyphenToCamelCase(key);\n if (keyCamelCase) {\n eElement.style[keyCamelCase] = styles[key];\n }\n });\n}\nfunction isHorizontalScrollShowing(element) {\n return element.clientWidth < element.scrollWidth;\n}\nfunction isVerticalScrollShowing(element) {\n return element.clientHeight < element.scrollHeight;\n}\nfunction setElementWidth(element, width) {\n if (width === 'flex') {\n element.style.removeProperty('width');\n element.style.removeProperty('minWidth');\n element.style.removeProperty('maxWidth');\n element.style.flex = '1 1 auto';\n }\n else {\n setFixedWidth(element, width);\n }\n}\nfunction setFixedWidth(element, width) {\n width = formatSize(width);\n element.style.width = width.toString();\n element.style.maxWidth = width.toString();\n element.style.minWidth = width.toString();\n}\nfunction setElementHeight(element, height) {\n if (height === 'flex') {\n element.style.removeProperty('height');\n element.style.removeProperty('minHeight');\n element.style.removeProperty('maxHeight');\n element.style.flex = '1 1 auto';\n }\n else {\n setFixedHeight(element, height);\n }\n}\nfunction setFixedHeight(element, height) {\n height = formatSize(height);\n element.style.height = height.toString();\n element.style.maxHeight = height.toString();\n element.style.minHeight = height.toString();\n}\nfunction formatSize(size) {\n if (typeof size === 'number') {\n return size + \"px\";\n }\n return size;\n}\n/**\n * Returns true if it is a DOM node\n * taken from: http://stackoverflow.com/questions/384286/javascript-isdom-how-do-you-check-if-a-javascript-object-is-a-dom-object\n * @param {any} o\n * @return {boolean}\n */\nfunction isNode(o) {\n return (typeof Node === 'function'\n ? o instanceof Node\n : o && typeof o === 'object' && typeof o.nodeType === 'number' && typeof o.nodeName === 'string');\n}\n//\n/**\n * Returns true if it is a DOM element\n * taken from: http://stackoverflow.com/questions/384286/javascript-isdom-how-do-you-check-if-a-javascript-object-is-a-dom-object\n * @param {any} o\n * @returns {boolean}\n */\nfunction isElement(o) {\n return (typeof HTMLElement === 'function'\n ? o instanceof HTMLElement //DOM2\n : o && isNonNullObject(o) && o.nodeType === 1 && typeof o.nodeName === 'string');\n}\nfunction isNodeOrElement(o) {\n return isNode(o) || isElement(o);\n}\n/**\n * Makes a copy of a node list into a list\n * @param {NodeList} nodeList\n * @returns {Node[]}\n */\nfunction copyNodeList(nodeList) {\n if (nodeList == null) {\n return [];\n }\n var result = [];\n nodeListForEach(nodeList, function (node) { return result.push(node); });\n return result;\n}\nfunction iterateNamedNodeMap(map, callback) {\n if (!map) {\n return;\n }\n for (var i = 0; i < map.length; i++) {\n var attr = map[i];\n callback(attr.name, attr.value);\n }\n}\n/** @deprecated */\nfunction setCheckboxState(eCheckbox, state) {\n if (typeof state === 'boolean') {\n eCheckbox.checked = state;\n eCheckbox.indeterminate = false;\n }\n else {\n // isNodeSelected returns back undefined if it's a group and the children\n // are a mix of selected and unselected\n eCheckbox.indeterminate = true;\n }\n}\nfunction addOrRemoveAttribute(element, name, value) {\n if (value == null) {\n element.removeAttribute(name);\n }\n else {\n element.setAttribute(name, value.toString());\n }\n}\nfunction nodeListForEach(nodeList, action) {\n if (nodeList == null) {\n return;\n }\n for (var i = 0; i < nodeList.length; i++) {\n action(nodeList[i]);\n }\n}\n\nvar DomUtils = /*#__PURE__*/Object.freeze({\n __proto__: null,\n addCssClass: addCssClass,\n removeCssClass: removeCssClass,\n addOrRemoveCssClass: addOrRemoveCssClass,\n radioCssClass: radioCssClass,\n containsClass: containsClass,\n isFocusableFormField: isFocusableFormField,\n setDisplayed: setDisplayed,\n setVisible: setVisible,\n setDisabled: setDisabled,\n isElementChildOfClass: isElementChildOfClass,\n getElementSize: getElementSize,\n getInnerHeight: getInnerHeight,\n getInnerWidth: getInnerWidth,\n getAbsoluteHeight: getAbsoluteHeight,\n getAbsoluteWidth: getAbsoluteWidth,\n isRtlNegativeScroll: isRtlNegativeScroll,\n getScrollLeft: getScrollLeft,\n setScrollLeft: setScrollLeft,\n clearElement: clearElement,\n removeElement: removeElement,\n removeFromParent: removeFromParent,\n isVisible: isVisible,\n loadTemplate: loadTemplate,\n appendHtml: appendHtml,\n getElementAttribute: getElementAttribute,\n offsetHeight: offsetHeight,\n offsetWidth: offsetWidth,\n ensureDomOrder: ensureDomOrder,\n setDomChildOrder: setDomChildOrder,\n insertWithDomOrder: insertWithDomOrder,\n prependDC: prependDC,\n addStylesToElement: addStylesToElement,\n isHorizontalScrollShowing: isHorizontalScrollShowing,\n isVerticalScrollShowing: isVerticalScrollShowing,\n setElementWidth: setElementWidth,\n setFixedWidth: setFixedWidth,\n setElementHeight: setElementHeight,\n setFixedHeight: setFixedHeight,\n formatSize: formatSize,\n isNode: isNode,\n isElement: isElement,\n isNodeOrElement: isNodeOrElement,\n copyNodeList: copyNodeList,\n iterateNamedNodeMap: iterateNamedNodeMap,\n setCheckboxState: setCheckboxState,\n addOrRemoveAttribute: addOrRemoveAttribute,\n nodeListForEach: nodeListForEach\n});\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / React / AngularJS / Web Components\n * @version v26.1.0\n * @link http://www.ag-grid.com/\n * @license MIT\n */\nvar DEFAULT_FILTER_LOCALE_TEXT = {\n applyFilter: 'Apply',\n clearFilter: 'Clear',\n resetFilter: 'Reset',\n cancelFilter: 'Cancel',\n textFilter: 'Text Filter',\n numberFilter: 'Number Filter',\n dateFilter: 'Date Filter',\n setFilter: 'Set Filter',\n filterOoo: 'Filter...',\n empty: 'Choose One',\n equals: 'Equals',\n notEqual: 'Not equal',\n lessThan: 'Less than',\n greaterThan: 'Greater than',\n inRange: 'In range',\n inRangeStart: 'From',\n inRangeEnd: 'To',\n lessThanOrEqual: 'Less than or equals',\n greaterThanOrEqual: 'Greater than or equals',\n contains: 'Contains',\n notContains: 'Not contains',\n startsWith: 'Starts with',\n endsWith: 'Ends with',\n andCondition: 'AND',\n orCondition: 'OR',\n dateFormatOoo: 'yyyy-mm-dd',\n};\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / React / AngularJS / Web Components\n * @version v26.1.0\n * @link http://www.ag-grid.com/\n * @license MIT\n */\nvar KeyCode = /** @class */ (function () {\n function KeyCode() {\n }\n KeyCode.BACKSPACE = 8;\n KeyCode.TAB = 9;\n KeyCode.ENTER = 13;\n KeyCode.SHIFT = 16;\n KeyCode.ESCAPE = 27;\n KeyCode.SPACE = 32;\n KeyCode.LEFT = 37;\n KeyCode.UP = 38;\n KeyCode.RIGHT = 39;\n KeyCode.DOWN = 40;\n KeyCode.DELETE = 46;\n KeyCode.A = 65;\n KeyCode.C = 67;\n KeyCode.V = 86;\n KeyCode.D = 68;\n KeyCode.Z = 90;\n KeyCode.Y = 89;\n KeyCode.F2 = 113;\n KeyCode.PAGE_UP = 33;\n KeyCode.PAGE_DOWN = 34;\n KeyCode.PAGE_HOME = 36;\n KeyCode.PAGE_END = 35;\n return KeyCode;\n}());\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / React / AngularJS / Web Components\n * @version v26.1.0\n * @link http://www.ag-grid.com/\n * @license MIT\n */\nvar __extends$5 = (undefined && undefined.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __assign$1 = (undefined && undefined.__assign) || function () {\n __assign$1 = 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))\n t[p] = s[p];\n }\n return t;\n };\n return __assign$1.apply(this, arguments);\n};\nvar __decorate$9 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n 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 ManagedFocusFeature = /** @class */ (function (_super) {\n __extends$5(ManagedFocusFeature, _super);\n function ManagedFocusFeature(eFocusableElement, callbacks) {\n if (callbacks === void 0) { callbacks = {}; }\n var _this = _super.call(this) || this;\n _this.eFocusableElement = eFocusableElement;\n _this.callbacks = callbacks;\n _this.callbacks = __assign$1({ shouldStopEventPropagation: function () { return false; }, onTabKeyDown: function (e) {\n if (e.defaultPrevented) {\n return;\n }\n var nextRoot = _this.focusService.findNextFocusableElement(_this.eFocusableElement, false, e.shiftKey);\n if (!nextRoot) {\n return;\n }\n nextRoot.focus();\n e.preventDefault();\n } }, callbacks);\n return _this;\n }\n ManagedFocusFeature.prototype.postConstruct = function () {\n addCssClass(this.eFocusableElement, ManagedFocusFeature.FOCUS_MANAGED_CLASS);\n this.addKeyDownListeners(this.eFocusableElement);\n if (this.callbacks.onFocusIn) {\n this.addManagedListener(this.eFocusableElement, 'focusin', this.callbacks.onFocusIn);\n }\n if (this.callbacks.onFocusOut) {\n this.addManagedListener(this.eFocusableElement, 'focusout', this.callbacks.onFocusOut);\n }\n };\n ManagedFocusFeature.prototype.addKeyDownListeners = function (eGui) {\n var _this = this;\n this.addManagedListener(eGui, 'keydown', function (e) {\n if (e.defaultPrevented || isStopPropagationForAgGrid(e)) {\n return;\n }\n if (_this.callbacks.shouldStopEventPropagation(e)) {\n stopPropagationForAgGrid(e);\n return;\n }\n if (e.keyCode === KeyCode.TAB) {\n _this.callbacks.onTabKeyDown(e);\n }\n else if (_this.callbacks.handleKeyDown) {\n _this.callbacks.handleKeyDown(e);\n }\n });\n };\n ManagedFocusFeature.FOCUS_MANAGED_CLASS = 'ag-focus-managed';\n __decorate$9([\n Autowired('focusService')\n ], ManagedFocusFeature.prototype, \"focusService\", void 0);\n __decorate$9([\n PostConstruct\n ], ManagedFocusFeature.prototype, \"postConstruct\", null);\n return ManagedFocusFeature;\n}(BeanStub));\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / React / AngularJS / Web Components\n * @version v26.1.0\n * @link http://www.ag-grid.com/\n * @license MIT\n */\nfunction convertToSet(list) {\n var set = new Set();\n list.forEach(function (x) { return set.add(x); });\n return set;\n}\n\nvar SetUtils = /*#__PURE__*/Object.freeze({\n __proto__: null,\n convertToSet: convertToSet\n});\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / React / AngularJS / Web Components\n * @version v26.1.0\n * @link http://www.ag-grid.com/\n * @license MIT\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) { a = 1; }\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) { // 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) { return parseInt(p, 16); }).map(function (p) { return p + p * 16; });\n break;\n }\n if (parts.length >= 3) {\n if (parts.every(function (p) { return p >= 0; })) {\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 r = values[0], g = values[1], b = values[2], a = values[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 = [NaN, NaN], po = _a[0], 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 }\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) { // percentage r, g, or b value\n value = Math.max(0, Math.min(100, value));\n value /= 100;\n }\n else {\n if (i === 3) { // alpha component\n value = Math.max(0, Math.min(1, value));\n }\n else { // 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 }\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) { alpha = 1; }\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 = '#'\n + Color.padHex(Math.round(this.r * 255).toString(16))\n + Color.padHex(Math.round(this.g * 255).toString(16))\n + 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) { fractionDigits = 3; }\n var components = [\n Math.round(this.r * 255),\n Math.round(this.g * 255),\n Math.round(this.b * 255)\n ];\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 }\n else if (g === max) {\n H = 2.0 + rc - bc;\n }\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 }\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) { // 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 / React / AngularJS / Web Components\n * @version v26.1.0\n * @link http://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) { delimiter = ','; }\n var data = [];\n var isNewline = function (char) { return char === '\\r' || char === '\\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 }\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 }\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 }\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}\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 / React / AngularJS / Web Components\n * @version v26.1.0\n * @link http://www.ag-grid.com/\n * @license MIT\n */\n/** @deprecated */\nfunction getNameOfClass(theClass) {\n var funcNameRegex = /function (.{1,})\\(/;\n var funcAsString = theClass.toString();\n var results = funcNameRegex.exec(funcAsString);\n return results && results.length > 1 ? results[1] : \"\";\n}\nfunction findLineByLeastSquares(values) {\n var len = values.length;\n var maxDecimals = 0;\n if (len <= 1) {\n return values;\n }\n for (var i = 0; i < values.length; i++) {\n var value = values[i];\n var splitExponent = value.toString().split('e-');\n if (splitExponent.length > 1) {\n maxDecimals = Math.max(maxDecimals, parseInt(splitExponent[1], 10));\n continue;\n }\n if (Math.floor(value) === value) {\n continue;\n }\n maxDecimals = Math.max(maxDecimals, value.toString().split('.')[1].length);\n }\n var sum_x = 0;\n var sum_y = 0;\n var sum_xy = 0;\n var sum_xx = 0;\n var y = 0;\n for (var x = 0; x < len; x++) {\n y = values[x];\n sum_x += x;\n sum_y += y;\n sum_xx += x * x;\n sum_xy += x * y;\n }\n var m = (len * sum_xy - sum_x * sum_y) / (len * sum_xx - sum_x * sum_x);\n var b = (sum_y / len) - (m * sum_x) / len;\n var result = [];\n for (var x = 0; x <= len; x++) {\n result.push(parseFloat((x * m + b).toFixed(maxDecimals)));\n }\n return result;\n}\n/**\n * Converts a CSS object into string\n * @param {Object} stylesToUse an object eg: {color: 'black', top: '25px'}\n * @return {string} A string like \"color: black; top: 25px;\" for html\n */\nfunction cssStyleObjectToMarkup(stylesToUse) {\n if (!stylesToUse) {\n return '';\n }\n var resParts = [];\n iterateObject(stylesToUse, function (styleKey, styleValue) {\n var styleKeyDashed = camelCaseToHyphen(styleKey);\n resParts.push(styleKeyDashed + \": \" + styleValue + \";\");\n });\n return resParts.join(' ');\n}\n/**\n * Displays a message to the browser. this is useful in iPad, where you can't easily see the console.\n * so the javascript code can use this to give feedback. this is NOT intended to be called in production.\n * it is intended the AG Grid developer calls this to troubleshoot, but then takes out the calls before\n * checking in.\n * @param {string} msg\n */\nfunction message(msg) {\n var eMessage = document.createElement('div');\n var eBox = document.querySelector('#__ag__message');\n eMessage.innerHTML = msg;\n if (!eBox) {\n var template = \"
\";\n eBox = loadTemplate(template);\n if (document.body) {\n document.body.appendChild(eBox);\n }\n }\n eBox.insertBefore(eMessage, eBox.children[0]);\n}\n/**\n * cell renderers are used in a few places. they bind to dom slightly differently to other cell renderes as they\n * can return back strings (instead of html elemnt) in the getGui() method. common code placed here to handle that.\n * @param {AgPromise} cellRendererPromise\n * @param {HTMLElement} eTarget\n */\nfunction bindCellRendererToHtmlElement(cellRendererPromise, eTarget) {\n cellRendererPromise.then(function (cellRenderer) {\n var gui = cellRenderer.getGui();\n if (gui != null) {\n if (typeof gui === 'object') {\n eTarget.appendChild(gui);\n }\n else {\n eTarget.innerHTML = gui;\n }\n }\n });\n}\n\nvar GeneralUtils = /*#__PURE__*/Object.freeze({\n __proto__: null,\n getNameOfClass: getNameOfClass,\n findLineByLeastSquares: findLineByLeastSquares,\n cssStyleObjectToMarkup: cssStyleObjectToMarkup,\n message: message,\n bindCellRendererToHtmlElement: bindCellRendererToHtmlElement\n});\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / React / AngularJS / Web Components\n * @version v26.1.0\n * @link http://www.ag-grid.com/\n * @license MIT\n */\n// ARIA HELPER FUNCTIONS\nfunction setAriaAttribute(element, attribute, value) {\n element.setAttribute(ariaAttributeName(attribute), value.toString());\n}\nfunction removeAriaAttribute(element, attribute) {\n element.removeAttribute(ariaAttributeName(attribute));\n}\nfunction ariaAttributeName(attribute) {\n return \"aria-\" + attribute;\n}\nfunction setAriaRole(element, role) {\n if (role) {\n element.setAttribute('role', role);\n }\n else {\n element.removeAttribute('role');\n }\n}\nfunction getAriaSortState(column) {\n var sort;\n if (column.isSortAscending()) {\n sort = 'ascending';\n }\n else if (column.isSortDescending()) {\n sort = 'descending';\n }\n else {\n sort = 'none';\n }\n return sort;\n}\n// ARIA ATTRIBUTE GETTERS\nfunction getAriaLevel(element) {\n return parseInt(element.getAttribute('aria-level'), 10);\n}\nfunction getAriaPosInSet(element) {\n return parseInt(element.getAttribute('aria-posinset'), 10);\n}\nfunction getAriaDescribedBy(element) {\n return element.getAttribute('aria-describedby') || '';\n}\n// ARIA ATTRIBUTE SETTERS\nfunction setAriaLabel(element, label) {\n var key = 'label';\n if (label) {\n setAriaAttribute(element, key, label);\n }\n else {\n removeAriaAttribute(element, key);\n }\n}\nfunction setAriaLabelledBy(element, labelledBy) {\n var key = 'labelledby';\n if (labelledBy) {\n setAriaAttribute(element, key, labelledBy);\n }\n else {\n removeAriaAttribute(element, key);\n }\n}\nfunction setAriaDescribedBy(element, describedby) {\n var key = 'describedby';\n if (describedby) {\n setAriaAttribute(element, key, describedby);\n }\n else {\n removeAriaAttribute(element, key);\n }\n}\nfunction setAriaLevel(element, level) {\n setAriaAttribute(element, 'level', level);\n}\nfunction setAriaDisabled(element, disabled) {\n setAriaAttribute(element, 'disabled', disabled);\n}\nfunction setAriaExpanded(element, expanded) {\n setAriaAttribute(element, 'expanded', expanded);\n}\nfunction removeAriaExpanded(element) {\n removeAriaAttribute(element, 'expanded');\n}\nfunction setAriaSetSize(element, setsize) {\n setAriaAttribute(element, 'setsize', setsize);\n}\nfunction setAriaPosInSet(element, position) {\n setAriaAttribute(element, 'posinset', position);\n}\nfunction setAriaMultiSelectable(element, multiSelectable) {\n setAriaAttribute(element, 'multiselectable', multiSelectable);\n}\nfunction setAriaRowCount(element, rowCount) {\n setAriaAttribute(element, 'rowcount', rowCount);\n}\nfunction setAriaRowIndex(element, rowIndex) {\n setAriaAttribute(element, 'rowindex', rowIndex);\n}\nfunction setAriaColCount(element, colCount) {\n setAriaAttribute(element, 'colcount', colCount);\n}\nfunction setAriaColIndex(element, colIndex) {\n setAriaAttribute(element, 'colindex', colIndex);\n}\nfunction setAriaColSpan(element, colSpan) {\n setAriaAttribute(element, 'colspan', colSpan);\n}\nfunction setAriaSort(element, sort) {\n setAriaAttribute(element, 'sort', sort);\n}\nfunction removeAriaSort(element) {\n removeAriaAttribute(element, 'sort');\n}\nfunction setAriaSelected(element, selected) {\n var attributeName = 'selected';\n if (selected) {\n setAriaAttribute(element, attributeName, selected);\n }\n else {\n removeAriaAttribute(element, attributeName);\n }\n}\nfunction setAriaChecked(element, checked) {\n setAriaAttribute(element, 'checked', checked === undefined ? 'mixed' : checked);\n}\n\nvar AriaUtils = /*#__PURE__*/Object.freeze({\n __proto__: null,\n setAriaRole: setAriaRole,\n getAriaSortState: getAriaSortState,\n getAriaLevel: getAriaLevel,\n getAriaPosInSet: getAriaPosInSet,\n getAriaDescribedBy: getAriaDescribedBy,\n setAriaLabel: setAriaLabel,\n setAriaLabelledBy: setAriaLabelledBy,\n setAriaDescribedBy: setAriaDescribedBy,\n setAriaLevel: setAriaLevel,\n setAriaDisabled: setAriaDisabled,\n setAriaExpanded: setAriaExpanded,\n removeAriaExpanded: removeAriaExpanded,\n setAriaSetSize: setAriaSetSize,\n setAriaPosInSet: setAriaPosInSet,\n setAriaMultiSelectable: setAriaMultiSelectable,\n setAriaRowCount: setAriaRowCount,\n setAriaRowIndex: setAriaRowIndex,\n setAriaColCount: setAriaColCount,\n setAriaColIndex: setAriaColIndex,\n setAriaColSpan: setAriaColSpan,\n setAriaSort: setAriaSort,\n removeAriaSort: removeAriaSort,\n setAriaSelected: setAriaSelected,\n setAriaChecked: setAriaChecked\n});\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / React / AngularJS / Web Components\n * @version v26.1.0\n * @link http://www.ag-grid.com/\n * @license MIT\n */\n/**\n * Serialises a Date to a string of format `yyyy-MM-dd HH:mm:ss`.\n * An alternative separator can be provided to be used instead of hyphens.\n * @param date The date to serialise\n * @param includeTime Whether to include the time in the serialised string\n * @param separator The separator to use between date parts\n */\nfunction serialiseDate(date, includeTime, separator) {\n if (includeTime === void 0) { includeTime = true; }\n if (separator === void 0) { separator = '-'; }\n if (!date) {\n return null;\n }\n var serialised = [date.getFullYear(), date.getMonth() + 1, date.getDate()].map(function (part) { return padStartWidthZeros(part, 2); }).join(separator);\n if (includeTime) {\n serialised += ' ' + [date.getHours(), date.getMinutes(), date.getSeconds()].map(function (part) { return padStartWidthZeros(part, 2); }).join(':');\n }\n return serialised;\n}\n/**\n * Parses a date and time from a string in the format `yyyy-MM-dd HH:mm:ss`\n */\nfunction parseDateTimeFromString(value) {\n if (!value) {\n return null;\n }\n var _a = value.split(' '), dateStr = _a[0], timeStr = _a[1];\n if (!dateStr) {\n return null;\n }\n var fields = dateStr.split('-').map(function (f) { return parseInt(f, 10); });\n if (fields.filter(function (f) { return !isNaN(f); }).length !== 3) {\n return null;\n }\n var year = fields[0], month = fields[1], day = fields[2];\n var date = new Date(year, month - 1, day);\n if (date.getFullYear() !== year ||\n date.getMonth() !== month - 1 ||\n date.getDate() !== day) {\n // date was not parsed as expected so must have been invalid\n return null;\n }\n if (!timeStr || timeStr === '00:00:00') {\n return date;\n }\n var _b = timeStr.split(':').map(function (part) { return parseInt(part, 10); }), hours = _b[0], minutes = _b[1], seconds = _b[2];\n if (hours >= 0 && hours < 24) {\n date.setHours(hours);\n }\n if (minutes >= 0 && minutes < 60) {\n date.setMinutes(minutes);\n }\n if (seconds >= 0 && seconds < 60) {\n date.setSeconds(seconds);\n }\n return date;\n}\n\nvar DateUtils = /*#__PURE__*/Object.freeze({\n __proto__: null,\n serialiseDate: serialiseDate,\n parseDateTimeFromString: parseDateTimeFromString\n});\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / React / AngularJS / Web Components\n * @version v26.1.0\n * @link http://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) { return validValue === inputValue; });\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) { return ({\n value: text,\n relevance: search(inputValue.toLowerCase(), text.toLocaleLowerCase())\n }); });\n thisSuggestions.sort(function (a, b) { return b.relevance - a.relevance; });\n if (hideIrrelevant) {\n thisSuggestions = thisSuggestions.filter(function (suggestion) { return suggestion.relevance !== 0; });\n }\n return thisSuggestions.map(function (suggestion) { return suggestion.value; });\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}\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 / React / AngularJS / Web Components\n * @version v26.1.0\n * @link http://www.ag-grid.com/\n * @license MIT\n */\n//\n// IMPORTANT NOTE!\n//\n// If you change the list below, copy/paste the new content into the docs page javascript-grid-icons\n//\nvar iconNameClassMap = {\n // header column group shown when expanded (click to contract)\n columnGroupOpened: 'expanded',\n // header column group shown when contracted (click to expand)\n columnGroupClosed: 'contracted',\n // tool panel column group contracted (click to expand)\n columnSelectClosed: 'tree-closed',\n // tool panel column group expanded (click to contract)\n columnSelectOpen: 'tree-open',\n // column tool panel header expand/collapse all button, shown when some children are expanded and\n // others are collapsed\n columnSelectIndeterminate: 'tree-indeterminate',\n // shown on ghost icon while dragging column to the side of the grid to pin\n columnMovePin: 'pin',\n // shown on ghost icon while dragging over part of the page that is not a drop zone\n columnMoveHide: 'eye-slash',\n // shown on ghost icon while dragging columns to reorder\n columnMoveMove: 'arrows',\n // animating icon shown when dragging a column to the right of the grid causes horizontal scrolling\n columnMoveLeft: 'left',\n // animating icon shown when dragging a column to the left of the grid causes horizontal scrolling\n columnMoveRight: 'right',\n // shown on ghost icon while dragging over Row Groups drop zone\n columnMoveGroup: 'group',\n // shown on ghost icon while dragging over Values drop zone\n columnMoveValue: 'aggregation',\n // shown on ghost icon while dragging over pivot drop zone\n columnMovePivot: 'pivot',\n // shown on ghost icon while dragging over drop zone that doesn't support it, e.g.\n // string column over aggregation drop zone\n dropNotAllowed: 'not-allowed',\n // shown on row group when contracted (click to expand)\n groupContracted: 'tree-closed',\n // shown on row group when expanded (click to contract)\n groupExpanded: 'tree-open',\n // context menu chart item\n chart: 'chart',\n // chart window title bar\n close: 'cross',\n // X (remove) on column 'pill' after adding it to a drop zone list\n cancel: 'cancel',\n // indicates the currently active pin state in the \"Pin column\" sub-menu of the column menu\n check: 'tick',\n // \"go to first\" button in pagination controls\n first: 'first',\n // \"go to previous\" button in pagination controls\n previous: 'previous',\n // \"go to next\" button in pagination controls\n next: 'next',\n // \"go to last\" button in pagination controls\n last: 'last',\n // shown on top right of chart when chart is linked to range data (click to unlink)\n linked: 'linked',\n // shown on top right of chart when chart is not linked to range data (click to link)\n unlinked: 'unlinked',\n // \"Choose colour\" button on chart settings tab\n colorPicker: 'color-picker',\n // rotating spinner shown by the loading cell renderer\n groupLoading: 'loading',\n // button to launch enterprise column menu\n menu: 'menu',\n // filter tool panel tab\n filter: 'filter',\n // column tool panel tab\n columns: 'columns',\n // button in chart regular size window title bar (click to maximise)\n maximize: 'maximize',\n // button in chart maximised window title bar (click to make regular size)\n minimize: 'minimize',\n // \"Pin column\" item in column header menu\n menuPin: 'pin',\n // \"Value aggregation\" column menu item (shown on numeric columns when grouping is active)\"\n menuValue: 'aggregation',\n // \"Group by {column-name}\" item in column header menu\n menuAddRowGroup: 'group',\n // \"Un-Group by {column-name}\" item in column header menu\n menuRemoveRowGroup: 'group',\n // context menu copy item\n clipboardCopy: 'copy',\n // context menu paste item\n clipboardPaste: 'paste',\n // identifies the pivot drop zone\n pivotPanel: 'pivot',\n // \"Row groups\" drop zone in column tool panel\n rowGroupPanel: 'group',\n // columns tool panel Values drop zone\n valuePanel: 'aggregation',\n // drag handle used to pick up draggable columns\n columnDrag: 'grip',\n // drag handle used to pick up draggable rows\n rowDrag: 'grip',\n // context menu export item\n save: 'save',\n // csv export\n csvExport: 'csv',\n // excel export,\n excelExport: 'excel',\n // icon on dropdown editors\n smallDown: 'small-down',\n // version of small-right used in RTL mode\n smallLeft: 'small-left',\n // separater between column 'pills' when you add multiple columns to the header drop zone\n smallRight: 'small-right',\n smallUp: 'small-up',\n // show on column header when column is sorted ascending\n sortAscending: 'asc',\n // show on column header when column is sorted descending\n sortDescending: 'desc',\n // show on column header when column has no sort, only when enabled with gridOptions.unSortIcon=true\n sortUnSort: 'none'\n};\n/**\n * If icon provided, use this (either a string, or a function callback).\n * if not, then use the default icon from the theme\n * @param {string} iconName\n * @param {GridOptionsWrapper} gridOptionsWrapper\n * @param {Column | null} [column]\n * @returns {HTMLElement}\n */\nfunction createIcon(iconName, gridOptionsWrapper, column) {\n var iconContents = createIconNoSpan(iconName, gridOptionsWrapper, column);\n if (iconContents && iconContents.className.indexOf('ag-icon') > -1) {\n return iconContents;\n }\n var eResult = document.createElement('span');\n eResult.appendChild(iconContents);\n return eResult;\n}\nfunction createIconNoSpan(iconName, gridOptionsWrapper, column, forceCreate) {\n var userProvidedIcon = null;\n // check col for icon first\n var icons = column && column.getColDef().icons;\n if (icons) {\n userProvidedIcon = icons[iconName];\n }\n // if not in col, try grid options\n if (gridOptionsWrapper && !userProvidedIcon) {\n var optionsIcons = gridOptionsWrapper.getIcons();\n if (optionsIcons) {\n userProvidedIcon = optionsIcons[iconName];\n }\n }\n // now if user provided, use it\n if (userProvidedIcon) {\n var rendererResult = void 0;\n if (typeof userProvidedIcon === 'function') {\n rendererResult = userProvidedIcon();\n }\n else if (typeof userProvidedIcon === 'string') {\n rendererResult = userProvidedIcon;\n }\n else {\n throw new Error('icon from grid options needs to be a string or a function');\n }\n if (typeof rendererResult === 'string') {\n return loadTemplate(rendererResult);\n }\n if (isNodeOrElement(rendererResult)) {\n return rendererResult;\n }\n console.warn('AG Grid: iconRenderer should return back a string or a dom object');\n }\n else {\n var span = document.createElement('span');\n var cssClass = iconNameClassMap[iconName];\n if (!cssClass) {\n if (!forceCreate) {\n console.warn(\"AG Grid: Did not find icon \" + iconName);\n cssClass = '';\n }\n else {\n cssClass = iconName;\n }\n }\n span.setAttribute('class', \"ag-icon ag-icon-\" + cssClass);\n span.setAttribute('unselectable', 'on');\n setAriaRole(span, 'presentation');\n return span;\n }\n}\n\nvar IconUtils = /*#__PURE__*/Object.freeze({\n __proto__: null,\n iconNameClassMap: iconNameClassMap,\n createIcon: createIcon,\n createIconNoSpan: createIconNoSpan\n});\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / React / AngularJS / Web Components\n * @version v26.1.0\n * @link http://www.ag-grid.com/\n * @license MIT\n */\nvar NUMPAD_DEL_NUMLOCK_ON_KEY = 'Del';\nvar NUMPAD_DEL_NUMLOCK_ON_CHARCODE = 46;\nfunction isKeyPressed(event, keyToCheck) {\n return (event.which || event.keyCode) === keyToCheck;\n}\nfunction isEventFromPrintableCharacter(event) {\n // no allowed printable chars have alt or ctrl key combinations\n if (event.altKey || event.ctrlKey || event.metaKey) {\n return false;\n }\n // if key is length 1, eg if it is 'a' for the a key, or '2' for the '2' key.\n // non-printable characters have names, eg 'Enter' or 'Backspace'.\n var printableCharacter = event.key.length === 1;\n // IE11 & Edge treat the numpad del key differently - with numlock on we get \"Del\" for key,\n // so this addition checks if its IE11/Edge and handles that specific case the same was as all other browsers\n var numpadDelWithNumlockOnForEdgeOrIe = isNumpadDelWithNumlockOnForEdgeOrIe(event);\n return printableCharacter || numpadDelWithNumlockOnForEdgeOrIe;\n}\n/**\n * Allows user to tell the grid to skip specific keyboard events\n * @param {GridOptionsWrapper} gridOptionsWrapper\n * @param {KeyboardEvent} keyboardEvent\n * @param {RowNode} rowNode\n * @param {Column} column\n * @param {boolean} editing\n * @returns {boolean}\n */\nfunction isUserSuppressingKeyboardEvent(gridOptionsWrapper, keyboardEvent, rowNode, column, editing) {\n var gridOptionsFunc = gridOptionsWrapper.getSuppressKeyboardEventFunc();\n var colDefFunc = column ? column.getColDef().suppressKeyboardEvent : undefined;\n // if no callbacks provided by user, then do nothing\n if (!gridOptionsFunc && !colDefFunc) {\n return false;\n }\n var params = {\n event: keyboardEvent,\n editing: editing,\n column: column,\n api: gridOptionsWrapper.getApi(),\n node: rowNode,\n data: rowNode.data,\n colDef: column.getColDef(),\n context: gridOptionsWrapper.getContext(),\n columnApi: gridOptionsWrapper.getColumnApi()\n };\n // colDef get first preference on suppressing events\n if (colDefFunc) {\n var colDefFuncResult = colDefFunc(params);\n // if colDef func suppressed, then return now, no need to call gridOption func\n if (colDefFuncResult) {\n return true;\n }\n }\n if (gridOptionsFunc) {\n // if gridOption func, return the result\n return gridOptionsFunc(params);\n }\n // otherwise return false, don't suppress, as colDef didn't suppress and no func on gridOptions\n return false;\n}\nfunction isUserSuppressingHeaderKeyboardEvent(gridOptionsWrapper, keyboardEvent, headerRowIndex, column) {\n var colDef = column.getDefinition();\n var colDefFunc = colDef && colDef.suppressHeaderKeyboardEvent;\n if (!exists(colDefFunc)) {\n return false;\n }\n var params = {\n api: gridOptionsWrapper.getApi(),\n columnApi: gridOptionsWrapper.getColumnApi(),\n context: gridOptionsWrapper.getContext(),\n colDef: colDef,\n column: column,\n headerRowIndex: headerRowIndex,\n event: keyboardEvent\n };\n return !!colDefFunc(params);\n}\nfunction isNumpadDelWithNumlockOnForEdgeOrIe(event) {\n return (isBrowserEdge() || isBrowserIE()) &&\n event.key === NUMPAD_DEL_NUMLOCK_ON_KEY &&\n event.charCode === NUMPAD_DEL_NUMLOCK_ON_CHARCODE;\n}\n\nvar KeyboardUtils = /*#__PURE__*/Object.freeze({\n __proto__: null,\n isKeyPressed: isKeyPressed,\n isEventFromPrintableCharacter: isEventFromPrintableCharacter,\n isUserSuppressingKeyboardEvent: isUserSuppressingKeyboardEvent,\n isUserSuppressingHeaderKeyboardEvent: isUserSuppressingHeaderKeyboardEvent\n});\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / React / AngularJS / Web Components\n * @version v26.1.0\n * @link http://www.ag-grid.com/\n * @license MIT\n */\n/**\n * @deprecated\n * Mouse wheel (and 2-finger trackpad) support on the web sucks. It is\n * complicated, thus this doc is long and (hopefully) detailed enough to answer\n * your questions.\n *\n * If you need to react to the mouse wheel in a predictable way, this code is\n * like your bestest friend. * hugs *\n *\n * As of today, there are 4 DOM event types you can listen to:\n *\n * 'wheel' -- Chrome(31+), FF(17+), IE(9+)\n * 'mousewheel' -- Chrome, IE(6+), Opera, Safari\n * 'MozMousePixelScroll' -- FF(3.5 only!) (2010-2013) -- don't bother!\n * 'DOMMouseScroll' -- FF(0.9.7+) since 2003\n *\n * So what to do? The is the best:\n *\n * normalizeWheel.getEventType();\n *\n * In your event callback, use this code to get sane interpretation of the\n * deltas. This code will return an object with properties:\n *\n * spinX -- normalized spin speed (use for zoom) - x plane\n * spinY -- \" - y plane\n * pixelX -- normalized distance (to pixels) - x plane\n * pixelY -- \" - y plane\n *\n * Wheel values are provided by the browser assuming you are using the wheel to\n * scroll a web page by a number of lines or pixels (or pages). Values can vary\n * significantly on different platforms and browsers, forgetting that you can\n * scroll at different speeds. Some devices (like trackpads) emit more events\n * at smaller increments with fine granularity, and some emit massive jumps with\n * linear speed or acceleration.\n *\n * This code does its best to normalize the deltas for you:\n *\n * - spin is trying to normalize how far the wheel was spun (or trackpad\n * dragged). This is super useful for zoom support where you want to\n * throw away the chunky scroll steps on the PC and make those equal to\n * the slow and smooth tiny steps on the Mac. Key data: This code tries to\n * resolve a single slow step on a wheel to 1.\n *\n * - pixel is normalizing the desired scroll delta in pixel units. You'll\n * get the crazy differences between browsers, but at least it'll be in\n * pixels!\n *\n * - positive value indicates scrolling DOWN/RIGHT, negative UP/LEFT. This\n * should translate to positive value zooming IN, negative zooming OUT.\n * This matches the newer 'wheel' event.\n *\n * Why are there spinX, spinY (or pixels)?\n *\n * - spinX is a 2-finger side drag on the trackpad, and a shift + wheel turn\n * with a mouse. It results in side-scrolling in the browser by default.\n *\n * - spinY is what you expect -- it's the classic axis of a mouse wheel.\n *\n * - I dropped spinZ/pixelZ. It is supported by the DOM 3 'wheel' event and\n * probably is by browsers in conjunction with fancy 3D controllers .. but\n * you know.\n *\n * Implementation info:\n *\n * Examples of 'wheel' event if you scroll slowly (down) by one step with an\n * average mouse:\n *\n * OS X + Chrome (mouse) - 4 pixel delta (wheelDelta -120)\n * OS X + Safari (mouse) - N/A pixel delta (wheelDelta -12)\n * OS X + Firefox (mouse) - 0.1 line delta (wheelDelta N/A)\n * Win8 + Chrome (mouse) - 100 pixel delta (wheelDelta -120)\n * Win8 + Firefox (mouse) - 3 line delta (wheelDelta -120)\n *\n * On the trackpad:\n *\n * OS X + Chrome (trackpad) - 2 pixel delta (wheelDelta -6)\n * OS X + Firefox (trackpad) - 1 pixel delta (wheelDelta N/A)\n *\n * On other/older browsers.. it's more complicated as there can be multiple and\n * also missing delta values.\n *\n * The 'wheel' event is more standard:\n *\n * http://www.w3.org/TR/DOM-Level-3-Events/#events-wheelevents\n *\n * The basics is that it includes a unit, deltaMode (pixels, lines, pages), and\n * deltaX, deltaY and deltaZ. Some browsers provide other values to maintain\n * backward compatibility with older events. Those other values help us\n * better normalize spin speed. Example of what the browsers provide:\n *\n * | event.wheelDelta | event.detail\n * ------------------+------------------+--------------\n * Safari v5/OS X | -120 | 0\n * Safari v5/Win7 | -120 | 0\n * Chrome v17/OS X | -120 | 0\n * Chrome v17/Win7 | -120 | 0\n * IE9/Win7 | -120 | undefined\n * Firefox v4/OS X | undefined | 1\n * Firefox v4/Win7 | undefined | 3\n *\n * from: https://github.com/facebook/fixed-data-table/blob/master/src/vendor_upstream/dom/normalizeWheel.js\n * @param {any} event\n * @return {any}\n */\nfunction normalizeWheel(event) {\n var PIXEL_STEP = 10;\n var LINE_HEIGHT = 40;\n var PAGE_HEIGHT = 800;\n // spinX, spinY\n var sX = 0;\n var sY = 0;\n // pixelX, pixelY\n var pX = 0;\n var pY = 0;\n // Legacy\n if ('detail' in event) {\n sY = event.detail;\n }\n if ('wheelDelta' in event) {\n sY = -event.wheelDelta / 120;\n }\n if ('wheelDeltaY' in event) {\n sY = -event.wheelDeltaY / 120;\n }\n if ('wheelDeltaX' in event) {\n sX = -event.wheelDeltaX / 120;\n }\n // side scrolling on FF with DOMMouseScroll\n if ('axis' in event && event.axis === event.HORIZONTAL_AXIS) {\n sX = sY;\n sY = 0;\n }\n pX = sX * PIXEL_STEP;\n pY = sY * PIXEL_STEP;\n if ('deltaY' in event) {\n pY = event.deltaY;\n }\n if ('deltaX' in event) {\n pX = event.deltaX;\n }\n if ((pX || pY) && event.deltaMode) {\n if (event.deltaMode == 1) { // delta in LINE units\n pX *= LINE_HEIGHT;\n pY *= LINE_HEIGHT;\n }\n else { // delta in PAGE units\n pX *= PAGE_HEIGHT;\n pY *= PAGE_HEIGHT;\n }\n }\n // Fall-back if spin cannot be determined\n if (pX && !sX) {\n sX = (pX < 1) ? -1 : 1;\n }\n if (pY && !sY) {\n sY = (pY < 1) ? -1 : 1;\n }\n return {\n spinX: sX,\n spinY: sY,\n pixelX: pX,\n pixelY: pY\n };\n}\n/**\n * @deprecated\n * Checks if event was issued by a left click\n * from https://stackoverflow.com/questions/3944122/detect-left-mouse-button-press\n * @param {MouseEvent} mouseEvent\n * @returns {boolean}\n */\nfunction isLeftClick(mouseEvent) {\n if ('buttons' in mouseEvent) {\n return mouseEvent.buttons == 1;\n }\n var button = mouseEvent.which || mouseEvent.button;\n return button == 1;\n}\n/**\n * `True` if the event is close to the original event by X pixels either vertically or horizontally.\n * we only start dragging after X pixels so this allows us to know if we should start dragging yet.\n * @param {MouseEvent | TouchEvent} e1\n * @param {MouseEvent | TouchEvent} e2\n * @param {number} pixelCount\n * @returns {boolean}\n */\nfunction areEventsNear(e1, e2, pixelCount) {\n // by default, we wait 4 pixels before starting the drag\n if (pixelCount === 0) {\n return false;\n }\n var diffX = Math.abs(e1.clientX - e2.clientX);\n var diffY = Math.abs(e1.clientY - e2.clientY);\n return Math.max(diffX, diffY) <= pixelCount;\n}\n\nvar MouseUtils = /*#__PURE__*/Object.freeze({\n __proto__: null,\n normalizeWheel: normalizeWheel,\n isLeftClick: isLeftClick,\n areEventsNear: areEventsNear\n});\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / React / AngularJS / Web Components\n * @version v26.1.0\n * @link http://www.ag-grid.com/\n * @license MIT\n */\n/**\n * Gets called by: a) ClientSideNodeManager and b) GroupStage to do sorting.\n * when in ClientSideNodeManager we always have indexes (as this sorts the items the\n * user provided) but when in GroupStage, the nodes can contain filler nodes that\n * don't have order id's\n * @param {RowNode[]} rowNodes\n * @param {Object} rowNodeOrder\n */\nfunction sortRowNodesByOrder(rowNodes, rowNodeOrder) {\n if (!rowNodes) {\n return;\n }\n var comparator = function (nodeA, nodeB) {\n var positionA = rowNodeOrder[nodeA.id];\n var positionB = rowNodeOrder[nodeB.id];\n var aHasIndex = positionA !== undefined;\n var bHasIndex = positionB !== undefined;\n var bothNodesAreUserNodes = aHasIndex && bHasIndex;\n var bothNodesAreFillerNodes = !aHasIndex && !bHasIndex;\n if (bothNodesAreUserNodes) {\n // when comparing two nodes the user has provided, they always\n // have indexes\n return positionA - positionB;\n }\n if (bothNodesAreFillerNodes) {\n // when comparing two filler nodes, we have no index to compare them\n // against, however we want this sorting to be deterministic, so that\n // the rows don't jump around as the user does delta updates. so we\n // want the same sort result. so we use the __objectId - which doesn't make sense\n // from a sorting point of view, but does give consistent behaviour between\n // calls. otherwise groups jump around as delta updates are done.\n // note: previously here we used nodeId, however this gave a strange order\n // as string ordering of numbers is wrong, so using id based on creation order\n // as least gives better looking order.\n return nodeA.__objectId - nodeB.__objectId;\n }\n if (aHasIndex) {\n return 1;\n }\n return -1;\n };\n // check if the list first needs sorting\n var rowNodeA;\n var rowNodeB;\n var atLeastOneOutOfOrder = false;\n for (var i = 0; i < rowNodes.length - 1; i++) {\n rowNodeA = rowNodes[i];\n rowNodeB = rowNodes[i + 1];\n if (comparator(rowNodeA, rowNodeB) > 0) {\n atLeastOneOutOfOrder = true;\n break;\n }\n }\n if (atLeastOneOutOfOrder) {\n rowNodes.sort(comparator);\n }\n}\nfunction traverseNodesWithKey(nodes, callback) {\n var keyParts = [];\n recursiveSearchNodes(nodes);\n function recursiveSearchNodes(currentNodes) {\n if (!currentNodes) {\n return;\n }\n currentNodes.forEach(function (node) {\n // also checking for children for tree data\n if (node.group || node.hasChildren()) {\n keyParts.push(node.key);\n var key = keyParts.join('|');\n callback(node, key);\n recursiveSearchNodes(node.childrenAfterGroup);\n keyParts.pop();\n }\n });\n }\n}\n\nvar RowNodeUtils = /*#__PURE__*/Object.freeze({\n __proto__: null,\n sortRowNodesByOrder: sortRowNodesByOrder,\n traverseNodesWithKey: traverseNodesWithKey\n});\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / React / AngularJS / Web Components\n * @version v26.1.0\n * @link http://www.ag-grid.com/\n * @license MIT\n */\nvar __assign$2 = (undefined && undefined.__assign) || function () {\n __assign$2 = 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))\n t[p] = s[p];\n }\n return t;\n };\n return __assign$2.apply(this, arguments);\n};\nvar utils = __assign$2(__assign$2(__assign$2(__assign$2(__assign$2(__assign$2(__assign$2(__assign$2(__assign$2(__assign$2(__assign$2(__assign$2(__assign$2(__assign$2(__assign$2(__assign$2(__assign$2(__assign$2(__assign$2(__assign$2({}, GeneralUtils), AriaUtils), ArrayUtils), BrowserUtils), CsvUtils), DateUtils), DomUtils), EventUtils), FunctionUtils), FuzzyMatchUtils), GenericUtils), IconUtils), KeyboardUtils), MapUtils), MouseUtils), NumberUtils), ObjectUtils), RowNodeUtils), SetUtils), StringUtils);\nvar _ = utils;\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / React / AngularJS / Web Components\n * @version v26.1.0\n * @link http://www.ag-grid.com/\n * @license MIT\n */\nvar NumberSequence = /** @class */ (function () {\n function NumberSequence(initValue, step) {\n if (initValue === void 0) { initValue = 0; }\n if (step === void 0) { step = 1; }\n this.nextValue = initValue;\n this.step = step;\n }\n NumberSequence.prototype.next = function () {\n var valToReturn = this.nextValue;\n this.nextValue += this.step;\n return valToReturn;\n };\n NumberSequence.prototype.peek = function () {\n return this.nextValue;\n };\n NumberSequence.prototype.skip = function (count) {\n this.nextValue += count;\n };\n return NumberSequence;\n}());\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / React / AngularJS / Web Components\n * @version v26.1.0\n * @link http://www.ag-grid.com/\n * @license MIT\n */\n(function (AgPromiseStatus) {\n AgPromiseStatus[AgPromiseStatus[\"IN_PROGRESS\"] = 0] = \"IN_PROGRESS\";\n AgPromiseStatus[AgPromiseStatus[\"RESOLVED\"] = 1] = \"RESOLVED\";\n})(exports.AgPromiseStatus || (exports.AgPromiseStatus = {}));\nvar AgPromise = /** @class */ (function () {\n function AgPromise(callback) {\n var _this = this;\n this.status = exports.AgPromiseStatus.IN_PROGRESS;\n this.resolution = null;\n this.waiters = [];\n callback(function (value) { return _this.onDone(value); }, function (params) { return _this.onReject(params); });\n }\n AgPromise.all = function (promises) {\n return new AgPromise(function (resolve) {\n var remainingToResolve = promises.length;\n var combinedValues = new Array(remainingToResolve);\n forEach(promises, function (promise, index) {\n promise.then(function (value) {\n combinedValues[index] = value;\n remainingToResolve--;\n if (remainingToResolve === 0) {\n resolve(combinedValues);\n }\n });\n });\n });\n };\n AgPromise.resolve = function (value) {\n if (value === void 0) { value = null; }\n return new AgPromise(function (resolve) { return resolve(value); });\n };\n AgPromise.prototype.then = function (func) {\n var _this = this;\n return new AgPromise(function (resolve) {\n if (_this.status === exports.AgPromiseStatus.RESOLVED) {\n resolve(func(_this.resolution));\n }\n else {\n _this.waiters.push(function (value) { return resolve(func(value)); });\n }\n });\n };\n AgPromise.prototype.resolveNow = function (ifNotResolvedValue, ifResolved) {\n return this.status === exports.AgPromiseStatus.RESOLVED ? ifResolved(this.resolution) : ifNotResolvedValue;\n };\n AgPromise.prototype.onDone = function (value) {\n this.status = exports.AgPromiseStatus.RESOLVED;\n this.resolution = value;\n forEach(this.waiters, function (waiter) { return waiter(value); });\n };\n AgPromise.prototype.onReject = function (params) {\n console.warn('TBI');\n };\n return AgPromise;\n}());\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / React / AngularJS / Web Components\n * @version v26.1.0\n * @link http://www.ag-grid.com/\n * @license MIT\n */\n/**\n * A Util Class only used when debugging for printing time to console\n */\nvar Timer = /** @class */ (function () {\n function Timer() {\n this.timestamp = new Date().getTime();\n }\n Timer.prototype.print = function (msg) {\n var duration = (new Date().getTime()) - this.timestamp;\n console.info(msg + \" = \" + duration);\n this.timestamp = new Date().getTime();\n };\n return Timer;\n}());\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / React / AngularJS / Web Components\n * @version v26.1.0\n * @link http://www.ag-grid.com/\n * @license MIT\n */\nvar __extends$6 = (undefined && undefined.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __assign$3 = (undefined && undefined.__assign) || function () {\n __assign$3 = 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))\n t[p] = s[p];\n }\n return t;\n };\n return __assign$3.apply(this, arguments);\n};\nvar __decorate$a = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n 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 TooltipStates;\n(function (TooltipStates) {\n TooltipStates[TooltipStates[\"NOTHING\"] = 0] = \"NOTHING\";\n TooltipStates[TooltipStates[\"WAITING_TO_SHOW\"] = 1] = \"WAITING_TO_SHOW\";\n TooltipStates[TooltipStates[\"SHOWING\"] = 2] = \"SHOWING\";\n})(TooltipStates || (TooltipStates = {}));\nvar CustomTooltipFeature = /** @class */ (function (_super) {\n __extends$6(CustomTooltipFeature, _super);\n function CustomTooltipFeature(parentComp) {\n var _this = _super.call(this) || this;\n _this.DEFAULT_HIDE_TOOLTIP_TIMEOUT = 10000;\n _this.SHOW_QUICK_TOOLTIP_DIFF = 1000;\n _this.FADE_OUT_TOOLTIP_TIMEOUT = 1000;\n _this.state = TooltipStates.NOTHING;\n // when showing the tooltip, we need to make sure it's the most recent instance we request, as due to\n // async we could request two tooltips before the first instance returns, in which case we should\n // disregard the second instance.\n _this.tooltipInstanceCount = 0;\n _this.tooltipMouseTrack = false;\n _this.parentComp = parentComp;\n return _this;\n }\n CustomTooltipFeature.prototype.postConstruct = function () {\n this.tooltipShowDelay = this.gridOptionsWrapper.getTooltipShowDelay() || 2000;\n this.tooltipMouseTrack = this.gridOptionsWrapper.isTooltipMouseTrack();\n var el = this.parentComp.getGui();\n this.addManagedListener(el, 'mouseenter', this.onMouseEnter.bind(this));\n this.addManagedListener(el, 'mouseleave', this.onMouseLeave.bind(this));\n this.addManagedListener(el, 'mousemove', this.onMouseMove.bind(this));\n this.addManagedListener(el, 'mousedown', this.onMouseDown.bind(this));\n this.addManagedListener(el, 'keydown', this.onKeyDown.bind(this));\n };\n CustomTooltipFeature.prototype.destroy = function () {\n // if this component gets destroyed while tooltip is showing, need to make sure\n // we don't end with no mouseLeave event resulting in zombie tooltip\n this.setToDoNothing();\n _super.prototype.destroy.call(this);\n };\n CustomTooltipFeature.prototype.onMouseEnter = function (e) {\n // every mouseenter should be following by a mouseleave, however for some unkonwn, it's possible for\n // mouseenter to be called twice in a row, which can happen if editing the cell. this was reported\n // in https://ag-grid.atlassian.net/browse/AG-4422. to get around this, we check the state, and if\n // state is !=nothing, then we know mouseenter was already received.\n if (this.state != TooltipStates.NOTHING) {\n return;\n }\n // if another tooltip was hidden very recently, we only wait 200ms to show, not the normal waiting time\n var delay = this.isLastTooltipHiddenRecently() ? 200 : this.tooltipShowDelay;\n this.showTooltipTimeoutId = window.setTimeout(this.showTooltip.bind(this), delay);\n this.lastMouseEvent = e;\n this.state = TooltipStates.WAITING_TO_SHOW;\n };\n CustomTooltipFeature.prototype.onMouseLeave = function () {\n this.setToDoNothing();\n };\n CustomTooltipFeature.prototype.onKeyDown = function () {\n this.setToDoNothing();\n };\n CustomTooltipFeature.prototype.setToDoNothing = function () {\n if (this.state === TooltipStates.SHOWING) {\n this.hideTooltip();\n }\n this.clearTimeouts();\n this.state = TooltipStates.NOTHING;\n };\n CustomTooltipFeature.prototype.onMouseMove = function (e) {\n // there is a delay from the time we mouseOver a component and the time the\n // tooltip is displayed, so we need to track mousemove to be able to correctly\n // position the tooltip when showTooltip is called.\n this.lastMouseEvent = e;\n if (this.tooltipMouseTrack &&\n this.state === TooltipStates.SHOWING &&\n this.tooltipComp) {\n this.positionTooltipUnderLastMouseEvent();\n }\n };\n CustomTooltipFeature.prototype.onMouseDown = function () {\n this.setToDoNothing();\n };\n CustomTooltipFeature.prototype.hideTooltip = function () {\n // check if comp exists - due to async, although we asked for\n // one, the instance may not be back yet\n if (this.tooltipComp) {\n this.destroyTooltipComp();\n CustomTooltipFeature.lastTooltipHideTime = new Date().getTime();\n }\n this.state = TooltipStates.NOTHING;\n };\n CustomTooltipFeature.prototype.destroyTooltipComp = function () {\n var _this = this;\n // add class to fade out the tooltip\n addCssClass(this.tooltipComp.getGui(), 'ag-tooltip-hiding');\n // make local copies of these variables, as we use them in the async function below,\n // and we clear then to 'undefined' later, so need to take a copy before they are undefined.\n var tooltipPopupDestroyFunc = this.tooltipPopupDestroyFunc;\n var tooltipComp = this.tooltipComp;\n window.setTimeout(function () {\n tooltipPopupDestroyFunc();\n _this.getContext().destroyBean(tooltipComp);\n }, this.FADE_OUT_TOOLTIP_TIMEOUT);\n this.tooltipPopupDestroyFunc = undefined;\n this.tooltipComp = undefined;\n };\n CustomTooltipFeature.prototype.isLastTooltipHiddenRecently = function () {\n // return true if <1000ms since last time we hid a tooltip\n var now = new Date().getTime();\n var then = CustomTooltipFeature.lastTooltipHideTime;\n return (now - then) < this.SHOW_QUICK_TOOLTIP_DIFF;\n };\n CustomTooltipFeature.prototype.showTooltip = function () {\n var params = __assign$3({ api: this.gridApi, columnApi: this.columnApi, context: this.gridOptionsWrapper.getContext() }, this.parentComp.getTooltipParams());\n if (!exists(params.value)) {\n this.setToDoNothing();\n return;\n }\n this.state = TooltipStates.SHOWING;\n this.tooltipInstanceCount++;\n // we pass in tooltipInstanceCount so the callback knows what the count was when\n // we requested the tooltip, so if another tooltip was requested in the mean time\n // we disregard it\n var callback = this.newTooltipComponentCallback.bind(this, this.tooltipInstanceCount);\n this.userComponentFactory.newTooltipComponent(params).then(callback);\n };\n CustomTooltipFeature.prototype.newTooltipComponentCallback = function (tooltipInstanceCopy, tooltipComp) {\n var compNoLongerNeeded = this.state !== TooltipStates.SHOWING || this.tooltipInstanceCount !== tooltipInstanceCopy;\n if (compNoLongerNeeded) {\n this.getContext().destroyBean(tooltipComp);\n return;\n }\n var eGui = tooltipComp.getGui();\n this.tooltipComp = tooltipComp;\n if (!containsClass(eGui, 'ag-tooltip')) {\n addCssClass(eGui, 'ag-tooltip-custom');\n }\n var translate = this.gridOptionsWrapper.getLocaleTextFunc();\n var addPopupRes = this.popupService.addPopup({\n eChild: eGui,\n ariaLabel: translate('ariaLabelTooltip', 'Tooltip')\n });\n if (addPopupRes) {\n this.tooltipPopupDestroyFunc = addPopupRes.hideFunc;\n }\n // this.tooltipPopupDestroyFunc = this.popupService.addPopup(false, eGui, false);\n this.positionTooltipUnderLastMouseEvent();\n this.hideTooltipTimeoutId = window.setTimeout(this.hideTooltip.bind(this), this.DEFAULT_HIDE_TOOLTIP_TIMEOUT);\n };\n CustomTooltipFeature.prototype.positionTooltipUnderLastMouseEvent = function () {\n this.popupService.positionPopupUnderMouseEvent({\n type: 'tooltip',\n mouseEvent: this.lastMouseEvent,\n ePopup: this.tooltipComp.getGui(),\n nudgeY: 18\n });\n };\n CustomTooltipFeature.prototype.clearTimeouts = function () {\n if (this.showTooltipTimeoutId) {\n window.clearTimeout(this.showTooltipTimeoutId);\n this.showTooltipTimeoutId = undefined;\n }\n if (this.hideTooltipTimeoutId) {\n window.clearTimeout(this.hideTooltipTimeoutId);\n this.hideTooltipTimeoutId = undefined;\n }\n };\n __decorate$a([\n Autowired('popupService')\n ], CustomTooltipFeature.prototype, \"popupService\", void 0);\n __decorate$a([\n Autowired('userComponentFactory')\n ], CustomTooltipFeature.prototype, \"userComponentFactory\", void 0);\n __decorate$a([\n Autowired('columnApi')\n ], CustomTooltipFeature.prototype, \"columnApi\", void 0);\n __decorate$a([\n Autowired('gridApi')\n ], CustomTooltipFeature.prototype, \"gridApi\", void 0);\n __decorate$a([\n PostConstruct\n ], CustomTooltipFeature.prototype, \"postConstruct\", null);\n return CustomTooltipFeature;\n}(BeanStub));\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / React / AngularJS / Web Components\n * @version v26.1.0\n * @link http://www.ag-grid.com/\n * @license MIT\n */\nvar __extends$7 = (undefined && undefined.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate$b = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n 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 compIdSequence = new NumberSequence();\nvar Component = /** @class */ (function (_super) {\n __extends$7(Component, _super);\n function Component(template) {\n var _this = _super.call(this) || this;\n // if false, then CSS class \"ag-hidden\" is applied, which sets \"display: none\"\n _this.displayed = true;\n // if false, then CSS class \"ag-invisible\" is applied, which sets \"visibility: hidden\"\n _this.visible = true;\n // unique id for this row component. this is used for getting a reference to the HTML dom.\n // we cannot use the RowNode id as this is not unique (due to animation, old rows can be lying\n // around as we create a new rowComp instance for the same row node).\n _this.compId = compIdSequence.next();\n // to minimise DOM hits, we only apply CSS classes if they have changed. as addding a CSS class that is already\n // there, or removing one that wasn't present, all takes CPU.\n _this.cssClassStates = {};\n if (template) {\n _this.setTemplate(template);\n }\n return _this;\n }\n Component.prototype.preConstructOnComponent = function () {\n this.usingBrowserTooltips = this.gridOptionsWrapper.isEnableBrowserTooltips();\n };\n Component.prototype.getCompId = function () {\n return this.compId;\n };\n Component.prototype.getTooltipParams = function () {\n return {\n value: this.tooltipText,\n location: 'UNKNOWN'\n };\n };\n Component.prototype.setTooltip = function (newTooltipText) {\n var _this = this;\n var removeTooltip = function () {\n if (_this.usingBrowserTooltips) {\n _this.getGui().removeAttribute('title');\n }\n else {\n _this.tooltipFeature = _this.destroyBean(_this.tooltipFeature);\n }\n };\n var addTooltip = function () {\n if (_this.usingBrowserTooltips) {\n _this.getGui().setAttribute('title', _this.tooltipText);\n }\n else {\n _this.tooltipFeature = _this.createBean(new CustomTooltipFeature(_this));\n }\n };\n if (this.tooltipText != newTooltipText) {\n if (this.tooltipText) {\n removeTooltip();\n }\n if (newTooltipText != null) {\n this.tooltipText = newTooltipText;\n if (this.tooltipText) {\n addTooltip();\n }\n }\n }\n };\n // for registered components only, eg creates AgCheckbox instance from ag-checkbox HTML tag\n Component.prototype.createChildComponentsFromTags = function (parentNode, paramsMap) {\n var _this = this;\n // we MUST take a copy of the list first, as the 'swapComponentForNode' adds comments into the DOM\n // which messes up the traversal order of the children.\n var childNodeList = copyNodeList(parentNode.childNodes);\n forEach(childNodeList, function (childNode) {\n if (!(childNode instanceof HTMLElement)) {\n return;\n }\n var childComp = _this.createComponentFromElement(childNode, function (childComp) {\n // copy over all attributes, including css classes, so any attributes user put on the tag\n // wll be carried across\n var childGui = childComp.getGui();\n if (childGui) {\n _this.copyAttributesFromNode(childNode, childComp.getGui());\n }\n }, paramsMap);\n if (childComp) {\n if (childComp.addItems && childNode.children.length) {\n _this.createChildComponentsFromTags(childNode, paramsMap);\n // converting from HTMLCollection to Array\n var items = Array.prototype.slice.call(childNode.children);\n childComp.addItems(items);\n }\n // replace the tag (eg ag-checkbox) with the proper HTMLElement (eg 'div') in the dom\n _this.swapComponentForNode(childComp, parentNode, childNode);\n }\n else if (childNode.childNodes) {\n _this.createChildComponentsFromTags(childNode, paramsMap);\n }\n });\n };\n Component.prototype.createComponentFromElement = function (element, afterPreCreateCallback, paramsMap) {\n var key = element.nodeName;\n var componentParams = paramsMap ? paramsMap[element.getAttribute('ref')] : undefined;\n var ComponentClass = this.agStackComponentsRegistry.getComponentClass(key);\n if (ComponentClass) {\n Component.elementGettingCreated = element;\n var newComponent = new ComponentClass(componentParams);\n newComponent.setParentComponent(this);\n this.createBean(newComponent, null, afterPreCreateCallback);\n return newComponent;\n }\n return null;\n };\n Component.prototype.copyAttributesFromNode = function (source, dest) {\n iterateNamedNodeMap(source.attributes, function (name, value) { return dest.setAttribute(name, value); });\n };\n Component.prototype.swapComponentForNode = function (newComponent, parentNode, childNode) {\n var eComponent = newComponent.getGui();\n parentNode.replaceChild(eComponent, childNode);\n parentNode.insertBefore(document.createComment(childNode.nodeName), eComponent);\n this.addDestroyFunc(this.destroyBean.bind(this, newComponent));\n this.swapInComponentForQuerySelectors(newComponent, childNode);\n };\n Component.prototype.swapInComponentForQuerySelectors = function (newComponent, childNode) {\n var thisNoType = this;\n this.iterateOverQuerySelectors(function (querySelector) {\n if (thisNoType[querySelector.attributeName] === childNode) {\n thisNoType[querySelector.attributeName] = newComponent;\n }\n });\n };\n Component.prototype.iterateOverQuerySelectors = function (action) {\n var thisPrototype = Object.getPrototypeOf(this);\n while (thisPrototype != null) {\n var metaData = thisPrototype.__agComponentMetaData;\n var currentProtoName = getFunctionName(thisPrototype.constructor);\n if (metaData && metaData[currentProtoName] && metaData[currentProtoName].querySelectors) {\n forEach(metaData[currentProtoName].querySelectors, function (querySelector) { return action(querySelector); });\n }\n thisPrototype = Object.getPrototypeOf(thisPrototype);\n }\n };\n Component.prototype.setTemplate = function (template, paramsMap) {\n var eGui = loadTemplate(template);\n this.setTemplateFromElement(eGui, paramsMap);\n };\n Component.prototype.setTemplateFromElement = function (element, paramsMap) {\n this.eGui = element;\n this.eGui.__agComponent = this;\n this.wireQuerySelectors();\n // context will not be available when user sets template in constructor\n if (!!this.getContext()) {\n this.createChildComponentsFromTags(this.getGui(), paramsMap);\n }\n };\n Component.prototype.createChildComponentsPreConstruct = function () {\n // ui exists if user sets template in constructor. when this happens, we have to wait for the context\n // to be autoWired first before we can create child components.\n if (!!this.getGui()) {\n this.createChildComponentsFromTags(this.getGui());\n }\n };\n Component.prototype.wireQuerySelectors = function () {\n var _this = this;\n if (!this.eGui) {\n return;\n }\n var thisNoType = this;\n this.iterateOverQuerySelectors(function (querySelector) {\n var setResult = function (result) { return thisNoType[querySelector.attributeName] = result; };\n // if it's a ref selector, and match is on top level component, we return\n // the element. otherwise no way of components putting ref=xxx on the top\n // level element as querySelector only looks at children.\n var topLevelRefMatch = querySelector.refSelector\n && _this.eGui.getAttribute('ref') === querySelector.refSelector;\n if (topLevelRefMatch) {\n setResult(_this.eGui);\n }\n else {\n // otherwise use querySelector, which looks at children\n var resultOfQuery = _this.eGui.querySelector(querySelector.querySelector);\n if (resultOfQuery) {\n setResult(resultOfQuery.__agComponent || resultOfQuery);\n }\n }\n });\n };\n Component.prototype.getGui = function () {\n return this.eGui;\n };\n Component.prototype.getFocusableElement = function () {\n return this.eGui;\n };\n Component.prototype.setParentComponent = function (component) {\n this.parentComponent = component;\n };\n Component.prototype.getParentComponent = function () {\n return this.parentComponent;\n };\n // this method is for older code, that wants to provide the gui element,\n // it is not intended for this to be in ag-Stack\n Component.prototype.setGui = function (eGui) {\n this.eGui = eGui;\n };\n Component.prototype.queryForHtmlElement = function (cssSelector) {\n return this.eGui.querySelector(cssSelector);\n };\n Component.prototype.queryForHtmlInputElement = function (cssSelector) {\n return this.eGui.querySelector(cssSelector);\n };\n Component.prototype.appendChild = function (newChild, container) {\n if (!container) {\n container = this.eGui;\n }\n if (newChild == null) {\n return;\n }\n if (isNodeOrElement(newChild)) {\n container.appendChild(newChild);\n }\n else {\n var childComponent = newChild;\n container.appendChild(childComponent.getGui());\n this.addDestroyFunc(this.destroyBean.bind(this, childComponent));\n }\n };\n Component.prototype.isDisplayed = function () {\n return this.displayed;\n };\n Component.prototype.setVisible = function (visible) {\n if (visible !== this.visible) {\n this.visible = visible;\n setVisible(this.eGui, visible);\n }\n };\n Component.prototype.setDisplayed = function (displayed) {\n if (displayed !== this.displayed) {\n this.displayed = displayed;\n setDisplayed(this.eGui, displayed);\n var event_1 = {\n type: Component.EVENT_DISPLAYED_CHANGED,\n visible: this.displayed\n };\n this.dispatchEvent(event_1);\n }\n };\n Component.prototype.destroy = function () {\n if (this.tooltipFeature) {\n this.tooltipFeature = this.destroyBean(this.tooltipFeature);\n }\n _super.prototype.destroy.call(this);\n };\n Component.prototype.addGuiEventListener = function (event, listener) {\n var _this = this;\n this.eGui.addEventListener(event, listener);\n this.addDestroyFunc(function () { return _this.eGui.removeEventListener(event, listener); });\n };\n Component.prototype.addCssClass = function (className) {\n var updateNeeded = this.cssClassStates[className] !== true;\n if (updateNeeded) {\n addCssClass(this.eGui, className);\n this.cssClassStates[className] = true;\n }\n };\n Component.prototype.removeCssClass = function (className) {\n var updateNeeded = this.cssClassStates[className] !== false;\n if (updateNeeded) {\n removeCssClass(this.eGui, className);\n this.cssClassStates[className] = false;\n }\n };\n Component.prototype.addOrRemoveCssClass = function (className, addOrRemove) {\n var updateNeeded = this.cssClassStates[className] !== addOrRemove;\n if (updateNeeded) {\n addOrRemoveCssClass(this.eGui, className, addOrRemove);\n this.cssClassStates[className] = addOrRemove;\n }\n };\n Component.prototype.getAttribute = function (key) {\n var eGui = this.eGui;\n return eGui ? eGui.getAttribute(key) : null;\n };\n Component.prototype.getRefElement = function (refName) {\n return this.queryForHtmlElement(\"[ref=\\\"\" + refName + \"\\\"]\");\n };\n Component.EVENT_DISPLAYED_CHANGED = 'displayedChanged';\n __decorate$b([\n Autowired('agStackComponentsRegistry')\n ], Component.prototype, \"agStackComponentsRegistry\", void 0);\n __decorate$b([\n PreConstruct\n ], Component.prototype, \"preConstructOnComponent\", null);\n __decorate$b([\n PreConstruct\n ], Component.prototype, \"createChildComponentsPreConstruct\", null);\n return Component;\n}(BeanStub));\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / React / AngularJS / Web Components\n * @version v26.1.0\n * @link http://www.ag-grid.com/\n * @license MIT\n */\nvar __extends$8 = (undefined && undefined.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate$c = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n 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/**\n * Contains common logic to all provided filters (apply button, clear button, etc).\n * All the filters that come with AG Grid extend this class. User filters do not\n * extend this class.\n */\nvar ProvidedFilter = /** @class */ (function (_super) {\n __extends$8(ProvidedFilter, _super);\n function ProvidedFilter(filterNameKey) {\n var _this = _super.call(this) || this;\n _this.filterNameKey = filterNameKey;\n _this.applyActive = false;\n _this.hidePopup = null;\n // after the user hits 'apply' the model gets copied to here. this is then the model that we use for\n // all filtering. so if user changes UI but doesn't hit apply, then the UI will be out of sync with this model.\n // this is what we want, as the UI should only become the 'active' filter once it's applied. when apply is\n // inactive, this model will be in sync (following the debounce ms). if the UI is not a valid filter\n // (eg the value is missing so nothing to filter on, or for set filter all checkboxes are checked so filter\n // not active) then this appliedModel will be null/undefined.\n _this.appliedModel = null;\n return _this;\n }\n ProvidedFilter.prototype.postConstruct = function () {\n this.resetTemplate(); // do this first to create the DOM\n this.createManagedBean(new ManagedFocusFeature(this.getFocusableElement(), {\n handleKeyDown: this.handleKeyDown.bind(this)\n }));\n };\n // override\n ProvidedFilter.prototype.handleKeyDown = function (e) { };\n ProvidedFilter.prototype.getFilterTitle = function () {\n return this.translate(this.filterNameKey);\n };\n /** @deprecated */\n ProvidedFilter.prototype.onFilterChanged = function () {\n console.warn(\"AG Grid: you should not call onFilterChanged() directly on the filter, please call\\n gridApi.onFilterChanged() instead. onFilterChanged is not part of the exposed filter interface (it was\\n a method that existed on an old version of the filters that was not intended for public use.\");\n this.providedFilterParams.filterChangedCallback();\n };\n ProvidedFilter.prototype.isFilterActive = function () {\n // filter is active if we have a valid applied model\n return !!this.appliedModel;\n };\n ProvidedFilter.prototype.resetTemplate = function (paramsMap) {\n var templateString = /* html */ \"\\n \\n
\\n \" + this.createBodyTemplate() + \"\\n
\\n
\";\n this.setTemplate(templateString, paramsMap);\n };\n ProvidedFilter.prototype.init = function (params) {\n var _this = this;\n this.setParams(params);\n this.resetUiToDefaults(true).then(function () {\n _this.updateUiVisibility();\n _this.setupOnBtApplyDebounce();\n });\n };\n ProvidedFilter.prototype.setParams = function (params) {\n ProvidedFilter.checkForDeprecatedParams(params);\n this.providedFilterParams = params;\n if (params.newRowsAction === 'keep') {\n this.newRowsActionKeep = true;\n }\n else if (params.newRowsAction === 'clear') {\n this.newRowsActionKeep = false;\n }\n else {\n // the default for SSRM and IRM is 'keep', for CSRM and VRM the default is 'clear'\n var modelsForKeep = [Constants.ROW_MODEL_TYPE_SERVER_SIDE, Constants.ROW_MODEL_TYPE_INFINITE];\n this.newRowsActionKeep = modelsForKeep.indexOf(this.rowModel.getType()) >= 0;\n }\n this.applyActive = ProvidedFilter.isUseApplyButton(params);\n this.createButtonPanel();\n };\n ProvidedFilter.prototype.createButtonPanel = function () {\n var _this = this;\n var buttons = this.providedFilterParams.buttons;\n if (!buttons || buttons.length < 1) {\n return;\n }\n var eButtonsPanel = document.createElement('div');\n addCssClass(eButtonsPanel, 'ag-filter-apply-panel');\n var addButton = function (type) {\n var text;\n var clickListener;\n switch (type) {\n case 'apply':\n text = _this.translate('applyFilter');\n clickListener = function (e) { return _this.onBtApply(false, false, e); };\n break;\n case 'clear':\n text = _this.translate('clearFilter');\n clickListener = function () { return _this.onBtClear(); };\n break;\n case 'reset':\n text = _this.translate('resetFilter');\n clickListener = function () { return _this.onBtReset(); };\n break;\n case 'cancel':\n text = _this.translate('cancelFilter');\n clickListener = function (e) { _this.onBtCancel(e); };\n break;\n default:\n console.warn('Unknown button type specified');\n return;\n }\n var button = loadTemplate(\n /* html */\n \"\" + text + \"\\n \");\n eButtonsPanel.appendChild(button);\n _this.addManagedListener(button, 'click', clickListener);\n };\n convertToSet(buttons).forEach(function (type) { return addButton(type); });\n this.getGui().appendChild(eButtonsPanel);\n };\n ProvidedFilter.checkForDeprecatedParams = function (params) {\n var buttons = params.buttons || [];\n if (buttons.length > 0) {\n return;\n }\n var applyButton = params.applyButton, resetButton = params.resetButton, clearButton = params.clearButton;\n if (clearButton) {\n console.warn('AG Grid: as of AG Grid v23.2, filterParams.clearButton is deprecated. Please use filterParams.buttons instead');\n buttons.push('clear');\n }\n if (resetButton) {\n console.warn('AG Grid: as of AG Grid v23.2, filterParams.resetButton is deprecated. Please use filterParams.buttons instead');\n buttons.push('reset');\n }\n if (applyButton) {\n console.warn('AG Grid: as of AG Grid v23.2, filterParams.applyButton is deprecated. Please use filterParams.buttons instead');\n buttons.push('apply');\n }\n if (params.apply) {\n console.warn('AG Grid: as of AG Grid v21, filterParams.apply is deprecated. Please use filterParams.buttons instead');\n buttons.push('apply');\n }\n params.buttons = buttons;\n };\n // subclasses can override this to provide alternative debounce defaults\n ProvidedFilter.prototype.getDefaultDebounceMs = function () {\n return 0;\n };\n ProvidedFilter.prototype.setupOnBtApplyDebounce = function () {\n var debounceMs = ProvidedFilter.getDebounceMs(this.providedFilterParams, this.getDefaultDebounceMs());\n this.onBtApplyDebounce = debounce(this.onBtApply.bind(this), debounceMs);\n };\n ProvidedFilter.prototype.getModel = function () {\n return this.appliedModel;\n };\n ProvidedFilter.prototype.setModel = function (model) {\n var _this = this;\n var promise = model ? this.setModelIntoUi(model) : this.resetUiToDefaults();\n return promise.then(function () {\n _this.updateUiVisibility();\n // we set the model from the GUI, rather than the provided model,\n // so the model is consistent, e.g. handling of null/undefined will be the same,\n // or if model is case insensitive, then casing is removed.\n _this.applyModel();\n });\n };\n ProvidedFilter.prototype.onBtCancel = function (e) {\n var _this = this;\n var currentModel = this.getModel();\n var afterAppliedFunc = function () {\n _this.onUiChanged(false, 'prevent');\n if (_this.providedFilterParams.closeOnApply) {\n _this.close(e);\n }\n };\n if (currentModel != null) {\n this.setModelIntoUi(currentModel).then(afterAppliedFunc);\n }\n else {\n this.resetUiToDefaults().then(afterAppliedFunc);\n }\n };\n ProvidedFilter.prototype.onBtClear = function () {\n var _this = this;\n this.resetUiToDefaults().then(function () { return _this.onUiChanged(); });\n };\n ProvidedFilter.prototype.onBtReset = function () {\n this.onBtClear();\n this.onBtApply();\n };\n /**\n * Applies changes made in the UI to the filter, and returns true if the model has changed.\n */\n ProvidedFilter.prototype.applyModel = function () {\n var newModel = this.getModelFromUi();\n if (!this.isModelValid(newModel)) {\n return false;\n }\n var previousModel = this.appliedModel;\n this.appliedModel = newModel;\n // models can be same if user pasted same content into text field, or maybe just changed the case\n // and it's a case insensitive filter\n return !this.areModelsEqual(previousModel, newModel);\n };\n ProvidedFilter.prototype.isModelValid = function (model) {\n return true;\n };\n ProvidedFilter.prototype.onBtApply = function (afterFloatingFilter, afterDataChange, e) {\n if (afterFloatingFilter === void 0) { afterFloatingFilter = false; }\n if (afterDataChange === void 0) { afterDataChange = false; }\n if (this.applyModel()) {\n // the floating filter uses 'afterFloatingFilter' info, so it doesn't refresh after filter changed if change\n // came from floating filter\n this.providedFilterParams.filterChangedCallback({ afterFloatingFilter: afterFloatingFilter, afterDataChange: afterDataChange });\n }\n var closeOnApply = this.providedFilterParams.closeOnApply;\n // only close if an apply button is visible, otherwise we'd be closing every time a change was made!\n if (closeOnApply && this.applyActive && !afterFloatingFilter && !afterDataChange) {\n this.close(e);\n }\n };\n ProvidedFilter.prototype.onNewRowsLoaded = function () {\n var _this = this;\n if (!this.newRowsActionKeep) {\n this.resetUiToDefaults().then(function () { return _this.appliedModel = null; });\n }\n };\n ProvidedFilter.prototype.close = function (e) {\n if (!this.hidePopup) {\n return;\n }\n var keyboardEvent = e;\n var key = keyboardEvent && keyboardEvent.key;\n var params;\n if (key === 'Enter' || key === 'Space') {\n params = { keyboardEvent: keyboardEvent };\n }\n this.hidePopup(params);\n this.hidePopup = null;\n };\n // called by set filter\n ProvidedFilter.prototype.isNewRowsActionKeep = function () {\n return this.newRowsActionKeep;\n };\n /**\n * By default, if the change came from a floating filter it will be applied immediately, otherwise if there is no\n * apply button it will be applied after a debounce, otherwise it will not be applied at all. This behaviour can\n * be adjusted by using the apply parameter.\n */\n ProvidedFilter.prototype.onUiChanged = function (fromFloatingFilter, apply) {\n if (fromFloatingFilter === void 0) { fromFloatingFilter = false; }\n this.updateUiVisibility();\n this.providedFilterParams.filterModifiedCallback();\n if (this.applyActive) {\n var isValid = this.isModelValid(this.getModelFromUi());\n setDisabled(this.getRefElement('applyFilterButton'), !isValid);\n }\n if ((fromFloatingFilter && !apply) || apply === 'immediately') {\n this.onBtApply(fromFloatingFilter);\n }\n else if ((!this.applyActive && !apply) || apply === 'debounce') {\n this.onBtApplyDebounce();\n }\n };\n ProvidedFilter.prototype.afterGuiAttached = function (params) {\n if (params == null) {\n return;\n }\n this.hidePopup = params.hidePopup;\n };\n // static, as used by floating filter also\n ProvidedFilter.getDebounceMs = function (params, debounceDefault) {\n if (ProvidedFilter.isUseApplyButton(params)) {\n if (params.debounceMs != null) {\n console.warn('AG Grid: debounceMs is ignored when apply button is present');\n }\n return 0;\n }\n return params.debounceMs != null ? params.debounceMs : debounceDefault;\n };\n // static, as used by floating filter also\n ProvidedFilter.isUseApplyButton = function (params) {\n ProvidedFilter.checkForDeprecatedParams(params);\n return !!params.buttons && params.buttons.indexOf('apply') >= 0;\n };\n ProvidedFilter.prototype.destroy = function () {\n this.hidePopup = null;\n _super.prototype.destroy.call(this);\n };\n ProvidedFilter.prototype.translate = function (key) {\n var translate = this.gridOptionsWrapper.getLocaleTextFunc();\n return translate(key, DEFAULT_FILTER_LOCALE_TEXT[key]);\n };\n __decorate$c([\n Autowired('rowModel')\n ], ProvidedFilter.prototype, \"rowModel\", void 0);\n __decorate$c([\n PostConstruct\n ], ProvidedFilter.prototype, \"postConstruct\", null);\n return ProvidedFilter;\n}(Component));\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / React / AngularJS / Web Components\n * @version v26.1.0\n * @link http://www.ag-grid.com/\n * @license MIT\n */\nvar __extends$9 = (undefined && undefined.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate$d = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n 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 ConditionPosition;\n(function (ConditionPosition) {\n ConditionPosition[ConditionPosition[\"One\"] = 0] = \"One\";\n ConditionPosition[ConditionPosition[\"Two\"] = 1] = \"Two\";\n})(ConditionPosition || (ConditionPosition = {}));\n/**\n * Every filter with a dropdown where the user can specify a comparing type against the filter values\n */\nvar SimpleFilter = /** @class */ (function (_super) {\n __extends$9(SimpleFilter, _super);\n function SimpleFilter() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n // returns true if this type requires a 'from' field, eg any filter that requires at least one text value\n SimpleFilter.prototype.showValueFrom = function (type) {\n return !this.doesFilterHaveHiddenInput(type) && type !== SimpleFilter.EMPTY;\n };\n // returns true if this type requires a 'to' field, currently only 'range' returns true\n SimpleFilter.prototype.showValueTo = function (type) {\n return type === SimpleFilter.IN_RANGE;\n };\n // floating filter calls this when user applies filter from floating filter\n SimpleFilter.prototype.onFloatingFilterChanged = function (type, value) {\n this.setTypeFromFloatingFilter(type);\n this.setValueFromFloatingFilter(value);\n this.onUiChanged(true);\n };\n SimpleFilter.prototype.setTypeFromFloatingFilter = function (type) {\n this.eType1.setValue(type);\n this.eType2.setValue(this.optionsFactory.getDefaultOption());\n (this.isDefaultOperator('AND') ? this.eJoinOperatorAnd : this.eJoinOperatorOr).setValue(true);\n };\n SimpleFilter.prototype.getModelFromUi = function () {\n if (!this.isConditionUiComplete(ConditionPosition.One)) {\n return null;\n }\n if (this.isAllowTwoConditions() && this.isConditionUiComplete(ConditionPosition.Two)) {\n return {\n filterType: this.getFilterType(),\n operator: this.getJoinOperator(),\n condition1: this.createCondition(ConditionPosition.One),\n condition2: this.createCondition(ConditionPosition.Two)\n };\n }\n return this.createCondition(ConditionPosition.One);\n };\n SimpleFilter.prototype.getCondition1Type = function () {\n return this.eType1.getValue();\n };\n SimpleFilter.prototype.getCondition2Type = function () {\n return this.eType2.getValue();\n };\n SimpleFilter.prototype.getJoinOperator = function () {\n return this.eJoinOperatorOr.getValue() === true ? 'OR' : 'AND';\n };\n SimpleFilter.prototype.areModelsEqual = function (a, b) {\n // both are missing\n if (!a && !b) {\n return true;\n }\n // one is missing, other present\n if ((!a && b) || (a && !b)) {\n return false;\n }\n // one is combined, the other is not\n var aIsSimple = !a.operator;\n var bIsSimple = !b.operator;\n var oneSimpleOneCombined = (!aIsSimple && bIsSimple) || (aIsSimple && !bIsSimple);\n if (oneSimpleOneCombined) {\n return false;\n }\n var res;\n // otherwise both present, so compare\n if (aIsSimple) {\n var aSimple = a;\n var bSimple = b;\n res = this.areSimpleModelsEqual(aSimple, bSimple);\n }\n else {\n var aCombined = a;\n var bCombined = b;\n res = aCombined.operator === bCombined.operator\n && this.areSimpleModelsEqual(aCombined.condition1, bCombined.condition1)\n && this.areSimpleModelsEqual(aCombined.condition2, bCombined.condition2);\n }\n return res;\n };\n SimpleFilter.prototype.setModelIntoUi = function (model) {\n var isCombined = model.operator;\n if (isCombined) {\n var combinedModel = model;\n var orChecked = combinedModel.operator === 'OR';\n this.eJoinOperatorAnd.setValue(!orChecked);\n this.eJoinOperatorOr.setValue(orChecked);\n this.eType1.setValue(combinedModel.condition1.type);\n this.eType2.setValue(combinedModel.condition2.type);\n this.setConditionIntoUi(combinedModel.condition1, ConditionPosition.One);\n this.setConditionIntoUi(combinedModel.condition2, ConditionPosition.Two);\n }\n else {\n var simpleModel = model;\n this.eJoinOperatorAnd.setValue(this.isDefaultOperator('AND'));\n this.eJoinOperatorOr.setValue(this.isDefaultOperator('OR'));\n this.eType1.setValue(simpleModel.type);\n this.eType2.setValue(this.optionsFactory.getDefaultOption());\n this.setConditionIntoUi(simpleModel, ConditionPosition.One);\n this.setConditionIntoUi(null, ConditionPosition.Two);\n }\n return AgPromise.resolve();\n };\n SimpleFilter.prototype.doesFilterPass = function (params) {\n var _this = this;\n var model = this.getModel();\n if (model == null) {\n return true;\n }\n var operator = model.operator;\n var models = [];\n if (operator) {\n var combinedModel = model;\n models.push(combinedModel.condition1, combinedModel.condition2);\n }\n else {\n models.push(model);\n }\n var combineFunction = operator && operator === 'OR' ? some : every;\n return combineFunction(models, function (m) { return _this.individualConditionPasses(params, m); });\n };\n SimpleFilter.prototype.setParams = function (params) {\n _super.prototype.setParams.call(this, params);\n this.optionsFactory = new OptionsFactory();\n this.optionsFactory.init(params, this.getDefaultFilterOptions());\n this.allowTwoConditions = !params.suppressAndOrCondition;\n this.alwaysShowBothConditions = !!params.alwaysShowBothConditions;\n this.defaultJoinOperator = this.getDefaultJoinOperator(params.defaultJoinOperator);\n this.putOptionsIntoDropdown();\n this.addChangedListeners();\n };\n SimpleFilter.prototype.getDefaultJoinOperator = function (defaultJoinOperator) {\n return includes(['AND', 'OR'], defaultJoinOperator) ? defaultJoinOperator : 'AND';\n };\n SimpleFilter.prototype.putOptionsIntoDropdown = function () {\n var _this = this;\n var filterOptions = this.optionsFactory.getFilterOptions();\n forEach(filterOptions, function (option) {\n var value;\n var text;\n if (typeof option === 'string') {\n value = option;\n text = _this.translate(value);\n }\n else {\n value = option.displayKey;\n var customOption = _this.optionsFactory.getCustomOption(value);\n text = customOption ?\n _this.gridOptionsWrapper.getLocaleTextFunc()(customOption.displayKey, customOption.displayName) :\n _this.translate(value);\n }\n var createOption = function () { return ({ value: value, text: text }); };\n _this.eType1.addOption(createOption());\n _this.eType2.addOption(createOption());\n });\n var readOnly = filterOptions.length <= 1;\n this.eType1.setDisabled(readOnly);\n this.eType2.setDisabled(readOnly);\n };\n SimpleFilter.prototype.isAllowTwoConditions = function () {\n return this.allowTwoConditions;\n };\n SimpleFilter.prototype.createBodyTemplate = function () {\n return /* html */ \"\\n \\n \" + this.createValueTemplate(ConditionPosition.One) + \"\\n \\n \\n \" + this.createValueTemplate(ConditionPosition.Two);\n };\n SimpleFilter.prototype.getCssIdentifier = function () {\n return 'simple-filter';\n };\n SimpleFilter.prototype.updateUiVisibility = function () {\n var isCondition2Enabled = this.isCondition2Enabled();\n if (this.alwaysShowBothConditions) {\n this.eJoinOperatorAnd.setDisabled(!isCondition2Enabled);\n this.eJoinOperatorOr.setDisabled(!isCondition2Enabled);\n this.eType2.setDisabled(!isCondition2Enabled);\n setDisabled(this.eCondition2Body, !isCondition2Enabled);\n }\n else {\n setDisplayed(this.eJoinOperatorPanel, isCondition2Enabled);\n setDisplayed(this.eType2.getGui(), isCondition2Enabled);\n setDisplayed(this.eCondition2Body, isCondition2Enabled);\n }\n };\n SimpleFilter.prototype.isCondition2Enabled = function () {\n return this.allowTwoConditions && this.isConditionUiComplete(ConditionPosition.One);\n };\n SimpleFilter.prototype.resetUiToDefaults = function (silent) {\n var translate = this.gridOptionsWrapper.getLocaleTextFunc();\n var filteringLabel = translate('ariaFilteringOperator', 'Filtering operator');\n var uniqueGroupId = 'ag-simple-filter-and-or-' + this.getCompId();\n var defaultOption = this.optionsFactory.getDefaultOption();\n this.eType1.setValue(defaultOption, silent).setAriaLabel(filteringLabel);\n this.eType2.setValue(defaultOption, silent).setAriaLabel(filteringLabel);\n this.eJoinOperatorAnd\n .setValue(this.isDefaultOperator('AND'), silent)\n .setName(uniqueGroupId)\n .setLabel(this.translate('andCondition'));\n this.eJoinOperatorOr\n .setValue(this.isDefaultOperator('OR'), silent)\n .setName(uniqueGroupId)\n .setLabel(this.translate('orCondition'));\n return AgPromise.resolve();\n };\n SimpleFilter.prototype.isDefaultOperator = function (operator) {\n return operator === this.defaultJoinOperator;\n };\n SimpleFilter.prototype.addChangedListeners = function () {\n var _this = this;\n var listener = function () { return _this.onUiChanged(); };\n this.eType1.onValueChange(listener);\n this.eType2.onValueChange(listener);\n this.eJoinOperatorOr.onValueChange(listener);\n this.eJoinOperatorAnd.onValueChange(listener);\n };\n SimpleFilter.prototype.doesFilterHaveHiddenInput = function (filterType) {\n var customFilterOption = this.optionsFactory.getCustomOption(filterType);\n return customFilterOption && customFilterOption.hideFilterInput;\n };\n SimpleFilter.EMPTY = 'empty';\n SimpleFilter.EQUALS = 'equals';\n SimpleFilter.NOT_EQUAL = 'notEqual';\n SimpleFilter.LESS_THAN = 'lessThan';\n SimpleFilter.LESS_THAN_OR_EQUAL = 'lessThanOrEqual';\n SimpleFilter.GREATER_THAN = 'greaterThan';\n SimpleFilter.GREATER_THAN_OR_EQUAL = 'greaterThanOrEqual';\n SimpleFilter.IN_RANGE = 'inRange';\n SimpleFilter.CONTAINS = 'contains';\n SimpleFilter.NOT_CONTAINS = 'notContains';\n SimpleFilter.STARTS_WITH = 'startsWith';\n SimpleFilter.ENDS_WITH = 'endsWith';\n __decorate$d([\n RefSelector('eOptions1')\n ], SimpleFilter.prototype, \"eType1\", void 0);\n __decorate$d([\n RefSelector('eOptions2')\n ], SimpleFilter.prototype, \"eType2\", void 0);\n __decorate$d([\n RefSelector('eJoinOperatorPanel')\n ], SimpleFilter.prototype, \"eJoinOperatorPanel\", void 0);\n __decorate$d([\n RefSelector('eJoinOperatorAnd')\n ], SimpleFilter.prototype, \"eJoinOperatorAnd\", void 0);\n __decorate$d([\n RefSelector('eJoinOperatorOr')\n ], SimpleFilter.prototype, \"eJoinOperatorOr\", void 0);\n __decorate$d([\n RefSelector('eCondition1Body')\n ], SimpleFilter.prototype, \"eCondition1Body\", void 0);\n __decorate$d([\n RefSelector('eCondition2Body')\n ], SimpleFilter.prototype, \"eCondition2Body\", void 0);\n return SimpleFilter;\n}(ProvidedFilter));\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / React / AngularJS / Web Components\n * @version v26.1.0\n * @link http://www.ag-grid.com/\n * @license MIT\n */\nvar __extends$a = (undefined && undefined.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar ScalarFilter = /** @class */ (function (_super) {\n __extends$a(ScalarFilter, _super);\n function ScalarFilter() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n ScalarFilter.prototype.setParams = function (params) {\n _super.prototype.setParams.call(this, params);\n this.scalarFilterParams = params;\n this.checkDeprecatedParams();\n };\n ScalarFilter.prototype.checkDeprecatedParams = function () {\n if (this.scalarFilterParams.nullComparator) {\n console.warn('AG Grid: Since v21.0, the property filterParams.nullComparator is deprecated. ' +\n 'Please use filterParams.includeBlanksInEquals, filterParams.includeBlanksInLessThan and ' +\n 'filterParams.includeBlanksInGreaterThan instead.');\n this.scalarFilterParams.includeBlanksInEquals = this.scalarFilterParams.nullComparator.equals;\n this.scalarFilterParams.includeBlanksInLessThan = this.scalarFilterParams.nullComparator.lessThan;\n this.scalarFilterParams.includeBlanksInGreaterThan = this.scalarFilterParams.nullComparator.greaterThan;\n }\n };\n ScalarFilter.prototype.individualConditionPasses = function (params, filterModel) {\n var cellValue = this.scalarFilterParams.valueGetter(params.node);\n var range = this.mapRangeFromModel(filterModel);\n var filterValue = range.from;\n var filterValueTo = range.to;\n var filterType = filterModel.type;\n var customFilterOption = this.optionsFactory.getCustomOption(filterType);\n if (customFilterOption) {\n // only execute the custom filter if a value exists or a value isn't required, i.e. input is hidden\n if (filterValue != null || customFilterOption.hideFilterInput) {\n return customFilterOption.test(filterValue, cellValue);\n }\n }\n if (cellValue == null) {\n switch (filterType) {\n case ScalarFilter.EQUALS:\n case ScalarFilter.NOT_EQUAL:\n if (this.scalarFilterParams.includeBlanksInEquals) {\n return true;\n }\n break;\n case ScalarFilter.GREATER_THAN:\n case ScalarFilter.GREATER_THAN_OR_EQUAL:\n if (this.scalarFilterParams.includeBlanksInGreaterThan) {\n return true;\n }\n break;\n case ScalarFilter.LESS_THAN:\n case ScalarFilter.LESS_THAN_OR_EQUAL:\n if (this.scalarFilterParams.includeBlanksInLessThan) {\n return true;\n }\n break;\n case ScalarFilter.IN_RANGE:\n if (this.scalarFilterParams.includeBlanksInRange) {\n return true;\n }\n break;\n }\n return false;\n }\n var comparator = this.comparator();\n var compareResult = comparator(filterValue, cellValue);\n switch (filterType) {\n case ScalarFilter.EQUALS:\n return compareResult === 0;\n case ScalarFilter.NOT_EQUAL:\n return compareResult !== 0;\n case ScalarFilter.GREATER_THAN:\n return compareResult > 0;\n case ScalarFilter.GREATER_THAN_OR_EQUAL:\n return compareResult >= 0;\n case ScalarFilter.LESS_THAN:\n return compareResult < 0;\n case ScalarFilter.LESS_THAN_OR_EQUAL:\n return compareResult <= 0;\n case ScalarFilter.IN_RANGE: {\n var compareToResult = comparator(filterValueTo, cellValue);\n return this.scalarFilterParams.inRangeInclusive ?\n compareResult >= 0 && compareToResult <= 0 :\n compareResult > 0 && compareToResult < 0;\n }\n default:\n console.warn('AG Grid: Unexpected type of filter \"' + filterType + '\", it looks like the filter was configured with incorrect Filter Options');\n return true;\n }\n };\n return ScalarFilter;\n}(SimpleFilter));\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / React / AngularJS / Web Components\n * @version v26.1.0\n * @link http://www.ag-grid.com/\n * @license MIT\n */\nvar __extends$b = (undefined && undefined.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate$e = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n 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 DateFilter = /** @class */ (function (_super) {\n __extends$b(DateFilter, _super);\n function DateFilter() {\n return _super.call(this, 'dateFilter') || this;\n }\n DateFilter.prototype.afterGuiAttached = function (params) {\n _super.prototype.afterGuiAttached.call(this, params);\n this.dateCondition1FromComp.afterGuiAttached(params);\n };\n DateFilter.prototype.mapRangeFromModel = function (filterModel) {\n // unlike the other filters, we do two things here:\n // 1) allow for different attribute names (same as done for other filters) (eg the 'from' and 'to'\n // are in different locations in Date and Number filter models)\n // 2) convert the type (because Date filter uses Dates, however model is 'string')\n //\n // NOTE: The conversion of string to date also removes the timezone - i.e. when user picks\n // a date from the UI, it will have timezone info in it. This is lost when creating\n // the model. When we recreate the date again here, it's without a timezone.\n return {\n from: parseDateTimeFromString(filterModel.dateFrom),\n to: parseDateTimeFromString(filterModel.dateTo)\n };\n };\n DateFilter.prototype.setValueFromFloatingFilter = function (value) {\n this.dateCondition1FromComp.setDate(value == null ? null : parseDateTimeFromString(value));\n this.dateCondition1ToComp.setDate(null);\n this.dateCondition2FromComp.setDate(null);\n this.dateCondition2ToComp.setDate(null);\n };\n DateFilter.prototype.setConditionIntoUi = function (model, position) {\n var _a = model ?\n [parseDateTimeFromString(model.dateFrom), parseDateTimeFromString(model.dateTo)] :\n [null, null], dateFrom = _a[0], dateTo = _a[1];\n var _b = this.getFromToComponents(position), compFrom = _b[0], compTo = _b[1];\n compFrom.setDate(dateFrom);\n compTo.setDate(dateTo);\n };\n DateFilter.prototype.resetUiToDefaults = function (silent) {\n var _this = this;\n return _super.prototype.resetUiToDefaults.call(this, silent).then(function () {\n _this.dateCondition1FromComp.setDate(null);\n _this.dateCondition1ToComp.setDate(null);\n _this.dateCondition2FromComp.setDate(null);\n _this.dateCondition2ToComp.setDate(null);\n });\n };\n DateFilter.prototype.comparator = function () {\n return this.dateFilterParams.comparator ? this.dateFilterParams.comparator : this.defaultComparator.bind(this);\n };\n DateFilter.prototype.defaultComparator = function (filterDate, cellValue) {\n // The default comparator assumes that the cellValue is a date\n var cellAsDate = cellValue;\n if (cellValue == null || cellAsDate < filterDate) {\n return -1;\n }\n if (cellAsDate > filterDate) {\n return 1;\n }\n return 0;\n };\n DateFilter.prototype.setParams = function (params) {\n _super.prototype.setParams.call(this, params);\n this.dateFilterParams = params;\n this.createDateComponents();\n };\n DateFilter.prototype.createDateComponents = function () {\n var _this = this;\n var createDateCompWrapper = function (element) {\n return new DateCompWrapper(_this.getContext(), _this.userComponentFactory, {\n onDateChanged: function () { return _this.onUiChanged(); },\n filterParams: _this.dateFilterParams\n }, element);\n };\n this.dateCondition1FromComp = createDateCompWrapper(this.eCondition1PanelFrom);\n this.dateCondition1ToComp = createDateCompWrapper(this.eCondition1PanelTo);\n this.dateCondition2FromComp = createDateCompWrapper(this.eCondition2PanelFrom);\n this.dateCondition2ToComp = createDateCompWrapper(this.eCondition2PanelTo);\n this.addDestroyFunc(function () {\n _this.dateCondition1FromComp.destroy();\n _this.dateCondition1ToComp.destroy();\n _this.dateCondition2FromComp.destroy();\n _this.dateCondition2ToComp.destroy();\n });\n };\n DateFilter.prototype.getDefaultFilterOptions = function () {\n return DateFilter.DEFAULT_FILTER_OPTIONS;\n };\n DateFilter.prototype.createValueTemplate = function (position) {\n var pos = position === ConditionPosition.One ? '1' : '2';\n return /* html */ \"\\n \";\n };\n DateFilter.prototype.isConditionUiComplete = function (position) {\n var positionOne = position === ConditionPosition.One;\n var option = positionOne ? this.getCondition1Type() : this.getCondition2Type();\n if (option === SimpleFilter.EMPTY) {\n return false;\n }\n if (this.doesFilterHaveHiddenInput(option)) {\n return true;\n }\n var _a = this.getFromToComponents(position), compFrom = _a[0], compTo = _a[1];\n var minValidYear = this.dateFilterParams.minValidYear == null ? 1000 : this.dateFilterParams.minValidYear;\n var isValidDate = function (value) { return value != null && value.getUTCFullYear() > minValidYear; };\n return isValidDate(compFrom.getDate()) && (!this.showValueTo(option) || isValidDate(compTo.getDate()));\n };\n DateFilter.prototype.areSimpleModelsEqual = function (aSimple, bSimple) {\n return aSimple.dateFrom === bSimple.dateFrom\n && aSimple.dateTo === bSimple.dateTo\n && aSimple.type === bSimple.type;\n };\n DateFilter.prototype.getFilterType = function () {\n return 'date';\n };\n DateFilter.prototype.createCondition = function (position) {\n var positionOne = position === ConditionPosition.One;\n var type = positionOne ? this.getCondition1Type() : this.getCondition2Type();\n var _a = this.getFromToComponents(position), compFrom = _a[0], compTo = _a[1];\n return {\n dateFrom: serialiseDate(compFrom.getDate()),\n dateTo: serialiseDate(compTo.getDate()),\n type: type,\n filterType: this.getFilterType()\n };\n };\n DateFilter.prototype.resetPlaceholder = function () {\n var globalTranslate = this.gridOptionsWrapper.getLocaleTextFunc();\n var placeholder = this.translate('dateFormatOoo');\n var ariaLabel = globalTranslate('ariaFilterValue', 'Filter Value');\n this.dateCondition1FromComp.setInputPlaceholder(placeholder);\n this.dateCondition1FromComp.setInputAriaLabel(ariaLabel);\n this.dateCondition1ToComp.setInputPlaceholder(placeholder);\n this.dateCondition1ToComp.setInputAriaLabel(ariaLabel);\n this.dateCondition2FromComp.setInputPlaceholder(placeholder);\n this.dateCondition2FromComp.setInputAriaLabel(ariaLabel);\n this.dateCondition2ToComp.setInputPlaceholder(placeholder);\n this.dateCondition2ToComp.setInputAriaLabel(ariaLabel);\n };\n DateFilter.prototype.updateUiVisibility = function () {\n _super.prototype.updateUiVisibility.call(this);\n this.resetPlaceholder();\n var condition1Type = this.getCondition1Type();\n setDisplayed(this.eCondition1PanelFrom, this.showValueFrom(condition1Type));\n setDisplayed(this.eCondition1PanelTo, this.showValueTo(condition1Type));\n var condition2Type = this.getCondition2Type();\n setDisplayed(this.eCondition2PanelFrom, this.showValueFrom(condition2Type));\n setDisplayed(this.eCondition2PanelTo, this.showValueTo(condition2Type));\n };\n DateFilter.prototype.getFromToComponents = function (position) {\n return position === ConditionPosition.One ?\n [this.dateCondition1FromComp, this.dateCondition1ToComp] :\n [this.dateCondition2FromComp, this.dateCondition2ToComp];\n };\n DateFilter.DEFAULT_FILTER_OPTIONS = [\n ScalarFilter.EQUALS,\n ScalarFilter.GREATER_THAN,\n ScalarFilter.LESS_THAN,\n ScalarFilter.NOT_EQUAL,\n ScalarFilter.IN_RANGE\n ];\n __decorate$e([\n RefSelector('eCondition1PanelFrom')\n ], DateFilter.prototype, \"eCondition1PanelFrom\", void 0);\n __decorate$e([\n RefSelector('eCondition1PanelTo')\n ], DateFilter.prototype, \"eCondition1PanelTo\", void 0);\n __decorate$e([\n RefSelector('eCondition2PanelFrom')\n ], DateFilter.prototype, \"eCondition2PanelFrom\", void 0);\n __decorate$e([\n RefSelector('eCondition2PanelTo')\n ], DateFilter.prototype, \"eCondition2PanelTo\", void 0);\n __decorate$e([\n Autowired('userComponentFactory')\n ], DateFilter.prototype, \"userComponentFactory\", void 0);\n return DateFilter;\n}(ScalarFilter));\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / React / AngularJS / Web Components\n * @version v26.1.0\n * @link http://www.ag-grid.com/\n * @license MIT\n */\nvar __extends$c = (undefined && undefined.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar SimpleFloatingFilter = /** @class */ (function (_super) {\n __extends$c(SimpleFloatingFilter, _super);\n function SimpleFloatingFilter() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n SimpleFloatingFilter.prototype.getDefaultDebounceMs = function () {\n return 0;\n };\n // this is a user component, and IComponent has \"public destroy()\" as part of the interface.\n // so we need to override destroy() just to make the method public.\n SimpleFloatingFilter.prototype.destroy = function () {\n _super.prototype.destroy.call(this);\n };\n // used by:\n // 1) NumberFloatingFilter & TextFloatingFilter: Always, for both when editable and read only.\n // 2) DateFloatingFilter: Only when read only (as we show text rather than a date picker when read only)\n SimpleFloatingFilter.prototype.getTextFromModel = function (model) {\n if (!model) {\n return null;\n }\n var isCombined = model.operator;\n if (isCombined) {\n var combinedModel = model;\n var con1Str = this.conditionToString(combinedModel.condition1);\n var con2Str = this.conditionToString(combinedModel.condition2);\n return con1Str + \" \" + combinedModel.operator + \" \" + con2Str;\n }\n else {\n var condition = model;\n var customOption = this.optionsFactory.getCustomOption(condition.type);\n // For custom filter options we display the Name of the filter instead\n // of displaying the `from` value, as it wouldn't be relevant\n if (customOption && customOption.hideFilterInput) {\n this.gridOptionsWrapper.getLocaleTextFunc()(customOption.displayKey, customOption.displayName);\n return customOption.displayName;\n }\n return this.conditionToString(condition);\n }\n };\n SimpleFloatingFilter.prototype.isEventFromFloatingFilter = function (event) {\n return event && event.afterFloatingFilter;\n };\n SimpleFloatingFilter.prototype.getLastType = function () {\n return this.lastType;\n };\n SimpleFloatingFilter.prototype.setLastTypeFromModel = function (model) {\n // if no model provided by the parent filter use default\n if (!model) {\n this.lastType = this.optionsFactory.getDefaultOption();\n return;\n }\n var isCombined = model.operator;\n var condition;\n if (isCombined) {\n var combinedModel = model;\n condition = combinedModel.condition1;\n }\n else {\n condition = model;\n }\n this.lastType = condition.type;\n };\n SimpleFloatingFilter.prototype.canWeEditAfterModelFromParentFilter = function (model) {\n if (!model) {\n // if no model, then we can edit as long as the lastType is something we can edit, as this\n // is the type we will provide to the parent filter if the user decides to use the floating filter.\n return this.isTypeEditable(this.lastType);\n }\n // never allow editing if the filter is combined (ie has two parts)\n var isCombined = model.operator;\n if (isCombined) {\n return false;\n }\n var simpleModel = model;\n return this.isTypeEditable(simpleModel.type);\n };\n SimpleFloatingFilter.prototype.init = function (params) {\n this.optionsFactory = new OptionsFactory();\n this.optionsFactory.init(params.filterParams, this.getDefaultFilterOptions());\n this.lastType = this.optionsFactory.getDefaultOption();\n // we are editable if:\n // 1) there is a type (user has configured filter wrong if not type)\n // AND\n // 2) the default type is not 'in range'\n var editable = this.isTypeEditable(this.lastType);\n this.setEditable(editable);\n };\n SimpleFloatingFilter.prototype.doesFilterHaveHiddenInput = function (filterType) {\n var customFilterOption = this.optionsFactory.getCustomOption(filterType);\n return customFilterOption && customFilterOption.hideFilterInput;\n };\n SimpleFloatingFilter.prototype.isTypeEditable = function (type) {\n return !!type && !this.doesFilterHaveHiddenInput(type) &&\n type !== SimpleFilter.IN_RANGE\n && type !== SimpleFilter.EMPTY;\n };\n return SimpleFloatingFilter;\n}(Component));\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / React / AngularJS / Web Components\n * @version v26.1.0\n * @link http://www.ag-grid.com/\n * @license MIT\n */\nvar __extends$d = (undefined && undefined.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate$f = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n 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 DateFloatingFilter = /** @class */ (function (_super) {\n __extends$d(DateFloatingFilter, _super);\n function DateFloatingFilter() {\n return _super.call(this, /* html */ \"\\n \") || this;\n }\n DateFloatingFilter.prototype.getDefaultFilterOptions = function () {\n return DateFilter.DEFAULT_FILTER_OPTIONS;\n };\n DateFloatingFilter.prototype.conditionToString = function (condition) {\n var type = condition.type;\n var dateFrom = parseDateTimeFromString(condition.dateFrom);\n if (type === SimpleFilter.IN_RANGE) {\n var dateTo = parseDateTimeFromString(condition.dateTo);\n return serialiseDate(dateFrom, false) + \"-\" + serialiseDate(dateTo, false);\n }\n // cater for when the type doesn't need a value\n return dateFrom == null ? \"\" + type : \"\" + serialiseDate(dateFrom, false);\n };\n DateFloatingFilter.prototype.init = function (params) {\n _super.prototype.init.call(this, params);\n this.params = params;\n this.createDateComponent();\n var translate = this.gridOptionsWrapper.getLocaleTextFunc();\n this.eReadOnlyText\n .setDisabled(true)\n .setInputAriaLabel(translate('ariaDateFilterInput', 'Date Filter Input'));\n };\n DateFloatingFilter.prototype.setEditable = function (editable) {\n setDisplayed(this.eDateWrapper, editable);\n setDisplayed(this.eReadOnlyText.getGui(), !editable);\n };\n DateFloatingFilter.prototype.onParentModelChanged = function (model, event) {\n // We don't want to update the floating filter if the floating filter caused the change,\n // because the UI is already in sync. if we didn't do this, the UI would behave strangely\n // as it would be updating as the user is typing\n if (this.isEventFromFloatingFilter(event)) {\n return;\n }\n _super.prototype.setLastTypeFromModel.call(this, model);\n var allowEditing = this.canWeEditAfterModelFromParentFilter(model);\n this.setEditable(allowEditing);\n if (allowEditing) {\n if (model) {\n var dateModel = model;\n this.dateComp.setDate(parseDateTimeFromString(dateModel.dateFrom));\n }\n else {\n this.dateComp.setDate(null);\n }\n this.eReadOnlyText.setValue('');\n }\n else {\n this.eReadOnlyText.setValue(this.getTextFromModel(model));\n this.dateComp.setDate(null);\n }\n };\n DateFloatingFilter.prototype.onDateChanged = function () {\n var _this = this;\n var filterValueDate = this.dateComp.getDate();\n var filterValueText = serialiseDate(filterValueDate);\n this.params.parentFilterInstance(function (filterInstance) {\n if (filterInstance) {\n var simpleFilter = filterInstance;\n simpleFilter.onFloatingFilterChanged(_this.getLastType(), filterValueText);\n }\n });\n };\n DateFloatingFilter.prototype.createDateComponent = function () {\n var _this = this;\n var debounceMs = ProvidedFilter.getDebounceMs(this.params.filterParams, this.getDefaultDebounceMs());\n var dateComponentParams = {\n onDateChanged: debounce(this.onDateChanged.bind(this), debounceMs),\n filterParams: this.params.column.getColDef().filterParams\n };\n this.dateComp = new DateCompWrapper(this.getContext(), this.userComponentFactory, dateComponentParams, this.eDateWrapper);\n this.addDestroyFunc(function () { return _this.dateComp.destroy(); });\n };\n __decorate$f([\n Autowired('userComponentFactory')\n ], DateFloatingFilter.prototype, \"userComponentFactory\", void 0);\n __decorate$f([\n RefSelector('eReadOnlyText')\n ], DateFloatingFilter.prototype, \"eReadOnlyText\", void 0);\n __decorate$f([\n RefSelector('eDateWrapper')\n ], DateFloatingFilter.prototype, \"eDateWrapper\", void 0);\n return DateFloatingFilter;\n}(SimpleFloatingFilter));\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / React / AngularJS / Web Components\n * @version v26.1.0\n * @link http://www.ag-grid.com/\n * @license MIT\n */\nvar __extends$e = (undefined && undefined.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate$g = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n 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 DefaultDateComponent = /** @class */ (function (_super) {\n __extends$e(DefaultDateComponent, _super);\n function DefaultDateComponent() {\n return _super.call(this, /* html */ \"\\n \") || this;\n }\n // this is a user component, and IComponent has \"public destroy()\" as part of the interface.\n // so we need to override destroy() just to make the method public.\n DefaultDateComponent.prototype.destroy = function () {\n _super.prototype.destroy.call(this);\n };\n DefaultDateComponent.prototype.init = function (params) {\n var inputElement = this.eDateInput.getInputElement();\n if (this.shouldUseBrowserDatePicker(params)) {\n if (isBrowserIE()) {\n console.warn('ag-grid: browserDatePicker is specified to true, but it is not supported in IE 11; reverting to text date picker');\n }\n else {\n inputElement.type = 'date';\n }\n }\n // ensures that the input element is focussed when a clear button is clicked\n this.addManagedListener(inputElement, 'mousedown', function () { return inputElement.focus(); });\n this.addManagedListener(this.eDateInput.getInputElement(), 'input', function (e) {\n if (e.target !== document.activeElement) {\n return;\n }\n params.onDateChanged();\n });\n };\n DefaultDateComponent.prototype.getDate = function () {\n return parseDateTimeFromString(this.eDateInput.getValue());\n };\n DefaultDateComponent.prototype.setDate = function (date) {\n this.eDateInput.setValue(serialiseDate(date, false));\n };\n DefaultDateComponent.prototype.setInputPlaceholder = function (placeholder) {\n this.eDateInput.setInputPlaceholder(placeholder);\n };\n DefaultDateComponent.prototype.afterGuiAttached = function (params) {\n if (!params || !params.suppressFocus) {\n this.eDateInput.getInputElement().focus();\n }\n };\n DefaultDateComponent.prototype.shouldUseBrowserDatePicker = function (params) {\n if (params.filterParams && params.filterParams.browserDatePicker != null) {\n return params.filterParams.browserDatePicker;\n }\n return isBrowserChrome() || isBrowserFirefox();\n };\n __decorate$g([\n RefSelector('eDateInput')\n ], DefaultDateComponent.prototype, \"eDateInput\", void 0);\n return DefaultDateComponent;\n}(Component));\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / React / AngularJS / Web Components\n * @version v26.1.0\n * @link http://www.ag-grid.com/\n * @license MIT\n */\nvar __extends$f = (undefined && undefined.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate$h = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n 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 NumberFilter = /** @class */ (function (_super) {\n __extends$f(NumberFilter, _super);\n function NumberFilter() {\n return _super.call(this, 'numberFilter') || this;\n }\n NumberFilter.prototype.mapRangeFromModel = function (filterModel) {\n return {\n from: filterModel.filter,\n to: filterModel.filterTo\n };\n };\n NumberFilter.prototype.getDefaultDebounceMs = function () {\n return 500;\n };\n NumberFilter.prototype.resetUiToDefaults = function (silent) {\n var _this = this;\n return _super.prototype.resetUiToDefaults.call(this, silent).then(function () {\n var fields = [_this.eValueFrom1, _this.eValueFrom2, _this.eValueTo1, _this.eValueTo2];\n fields.forEach(function (field) { return field.setValue(null, silent); });\n _this.resetPlaceholder();\n });\n };\n NumberFilter.prototype.setConditionIntoUi = function (model, position) {\n var positionOne = position === ConditionPosition.One;\n var eValueFrom = positionOne ? this.eValueFrom1 : this.eValueFrom2;\n var eValueTo = positionOne ? this.eValueTo1 : this.eValueTo2;\n eValueFrom.setValue(model ? ('' + model.filter) : null);\n eValueTo.setValue(model ? ('' + model.filterTo) : null);\n };\n NumberFilter.prototype.setValueFromFloatingFilter = function (value) {\n this.eValueFrom1.setValue(value);\n this.eValueTo1.setValue(null);\n this.eValueFrom2.setValue(null);\n this.eValueTo2.setValue(null);\n };\n NumberFilter.prototype.comparator = function () {\n return function (left, right) {\n if (left === right) {\n return 0;\n }\n return left < right ? 1 : -1;\n };\n };\n NumberFilter.prototype.setParams = function (params) {\n this.numberFilterParams = params;\n var allowedCharPattern = this.getAllowedCharPattern();\n if (allowedCharPattern) {\n var config = { allowedCharPattern: allowedCharPattern };\n this.resetTemplate({\n eValueFrom1: config,\n eValueTo1: config,\n eValueFrom2: config,\n eValueTo2: config,\n });\n }\n _super.prototype.setParams.call(this, params);\n this.addValueChangedListeners();\n };\n NumberFilter.prototype.addValueChangedListeners = function () {\n var _this = this;\n var listener = function () { return _this.onUiChanged(); };\n this.eValueFrom1.onValueChange(listener);\n this.eValueTo1.onValueChange(listener);\n this.eValueFrom2.onValueChange(listener);\n this.eValueTo2.onValueChange(listener);\n };\n NumberFilter.prototype.resetPlaceholder = function () {\n var globalTranslate = this.gridOptionsWrapper.getLocaleTextFunc();\n var isRange1 = this.showValueTo(this.getCondition1Type());\n var isRange2 = this.showValueTo(this.getCondition2Type());\n this.eValueFrom1.setInputPlaceholder(this.translate(isRange1 ? 'inRangeStart' : 'filterOoo'));\n this.eValueFrom1.setInputAriaLabel(isRange1\n ? globalTranslate('ariaFilterFromValue', 'Filter from value')\n : globalTranslate('ariaFilterValue', 'Filter Value'));\n this.eValueTo1.setInputPlaceholder(this.translate('inRangeEnd'));\n this.eValueTo1.setInputAriaLabel(globalTranslate('ariaFilterToValue', 'Filter to Value'));\n this.eValueFrom2.setInputPlaceholder(this.translate(isRange2 ? 'inRangeStart' : 'filterOoo'));\n this.eValueFrom2.setInputAriaLabel(isRange2\n ? globalTranslate('ariaFilterFromValue', 'Filter from value')\n : globalTranslate('ariaFilterValue', 'Filter Value'));\n this.eValueTo2.setInputPlaceholder(this.translate('inRangeEnd'));\n this.eValueTo2.setInputAriaLabel(globalTranslate('ariaFilterToValue', 'Filter to Value'));\n };\n NumberFilter.prototype.afterGuiAttached = function (params) {\n _super.prototype.afterGuiAttached.call(this, params);\n this.resetPlaceholder();\n if (!params || !params.suppressFocus) {\n this.eValueFrom1.getInputElement().focus();\n }\n };\n NumberFilter.prototype.getDefaultFilterOptions = function () {\n return NumberFilter.DEFAULT_FILTER_OPTIONS;\n };\n NumberFilter.prototype.createValueTemplate = function (position) {\n var pos = position === ConditionPosition.One ? '1' : '2';\n var allowedCharPattern = this.getAllowedCharPattern();\n var agElementTag = allowedCharPattern ? 'ag-input-text-field' : 'ag-input-number-field';\n return /* html */ \"\\n \\n <\" + agElementTag + \" class=\\\"ag-filter-from ag-filter-filter\\\" ref=\\\"eValueFrom\" + pos + \"\\\">\" + agElementTag + \">\\n <\" + agElementTag + \" class=\\\"ag-filter-to ag-filter-filter\\\" ref=\\\"eValueTo\" + pos + \"\\\">\" + agElementTag + \">\\n
\";\n };\n NumberFilter.prototype.isConditionUiComplete = function (position) {\n var positionOne = position === ConditionPosition.One;\n var option = positionOne ? this.getCondition1Type() : this.getCondition2Type();\n if (option === SimpleFilter.EMPTY) {\n return false;\n }\n if (this.doesFilterHaveHiddenInput(option)) {\n return true;\n }\n var eValue = positionOne ? this.eValueFrom1 : this.eValueFrom2;\n var eValueTo = positionOne ? this.eValueTo1 : this.eValueTo2;\n var value = this.stringToFloat(eValue.getValue());\n return value != null && (!this.showValueTo(option) || this.stringToFloat(eValueTo.getValue()) != null);\n };\n NumberFilter.prototype.areSimpleModelsEqual = function (aSimple, bSimple) {\n return aSimple.filter === bSimple.filter\n && aSimple.filterTo === bSimple.filterTo\n && aSimple.type === bSimple.type;\n };\n NumberFilter.prototype.getFilterType = function () {\n return 'number';\n };\n NumberFilter.prototype.stringToFloat = function (value) {\n if (typeof value === 'number') {\n return value;\n }\n var filterText = makeNull(value);\n if (filterText != null && filterText.trim() === '') {\n filterText = null;\n }\n if (this.numberFilterParams.numberParser) {\n return this.numberFilterParams.numberParser(filterText);\n }\n return filterText == null || filterText.trim() === '-' ? null : parseFloat(filterText);\n };\n NumberFilter.prototype.createCondition = function (position) {\n var positionOne = position === ConditionPosition.One;\n var type = positionOne ? this.getCondition1Type() : this.getCondition2Type();\n var eValue = positionOne ? this.eValueFrom1 : this.eValueFrom2;\n var value = this.stringToFloat(eValue.getValue());\n var model = {\n filterType: this.getFilterType(),\n type: type\n };\n if (!this.doesFilterHaveHiddenInput(type)) {\n model.filter = value;\n if (this.showValueTo(type)) {\n var eValueTo = positionOne ? this.eValueTo1 : this.eValueTo2;\n var valueTo = this.stringToFloat(eValueTo.getValue());\n model.filterTo = valueTo;\n }\n }\n return model;\n };\n NumberFilter.prototype.updateUiVisibility = function () {\n _super.prototype.updateUiVisibility.call(this);\n this.resetPlaceholder();\n var condition1Type = this.getCondition1Type();\n var condition2Type = this.getCondition2Type();\n setDisplayed(this.eValueFrom1.getGui(), this.showValueFrom(condition1Type));\n setDisplayed(this.eValueTo1.getGui(), this.showValueTo(condition1Type));\n setDisplayed(this.eValueFrom2.getGui(), this.showValueFrom(condition2Type));\n setDisplayed(this.eValueTo2.getGui(), this.showValueTo(condition2Type));\n };\n NumberFilter.prototype.getAllowedCharPattern = function () {\n var allowedCharPattern = (this.numberFilterParams || {}).allowedCharPattern;\n if (allowedCharPattern) {\n return allowedCharPattern;\n }\n if (!isBrowserChrome() && !isBrowserEdge()) {\n // only Chrome and Edge support the HTML5 number field, so for other browsers we provide an equivalent\n // constraint instead\n return '\\\\d\\\\-\\\\.';\n }\n return null;\n };\n NumberFilter.DEFAULT_FILTER_OPTIONS = [\n ScalarFilter.EQUALS,\n ScalarFilter.NOT_EQUAL,\n ScalarFilter.LESS_THAN,\n ScalarFilter.LESS_THAN_OR_EQUAL,\n ScalarFilter.GREATER_THAN,\n ScalarFilter.GREATER_THAN_OR_EQUAL,\n ScalarFilter.IN_RANGE\n ];\n __decorate$h([\n RefSelector('eValueFrom1')\n ], NumberFilter.prototype, \"eValueFrom1\", void 0);\n __decorate$h([\n RefSelector('eValueTo1')\n ], NumberFilter.prototype, \"eValueTo1\", void 0);\n __decorate$h([\n RefSelector('eValueFrom2')\n ], NumberFilter.prototype, \"eValueFrom2\", void 0);\n __decorate$h([\n RefSelector('eValueTo2')\n ], NumberFilter.prototype, \"eValueTo2\", void 0);\n return NumberFilter;\n}(ScalarFilter));\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / React / AngularJS / Web Components\n * @version v26.1.0\n * @link http://www.ag-grid.com/\n * @license MIT\n */\nvar __extends$g = (undefined && undefined.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate$i = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n 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 TextFilter = /** @class */ (function (_super) {\n __extends$g(TextFilter, _super);\n function TextFilter() {\n return _super.call(this, 'textFilter') || this;\n }\n TextFilter.trimInput = function (value) {\n var trimmedInput = value && value.trim();\n // trim the input, unless it is all whitespace (this is consistent with Excel behaviour)\n return trimmedInput === '' ? value : trimmedInput;\n };\n TextFilter.prototype.getDefaultDebounceMs = function () {\n return 500;\n };\n TextFilter.prototype.getCleanValue = function (inputField) {\n var value = makeNull(inputField.getValue());\n return this.textFilterParams.trimInput ? TextFilter.trimInput(value) : value;\n };\n TextFilter.prototype.addValueChangedListeners = function () {\n var _this = this;\n var listener = function () { return _this.onUiChanged(); };\n this.eValue1.onValueChange(listener);\n this.eValue2.onValueChange(listener);\n };\n TextFilter.prototype.setParams = function (params) {\n _super.prototype.setParams.call(this, params);\n this.textFilterParams = params;\n this.comparator = this.textFilterParams.textCustomComparator || TextFilter.DEFAULT_COMPARATOR;\n this.formatter = this.textFilterParams.textFormatter ||\n (this.textFilterParams.caseSensitive ? TextFilter.DEFAULT_FORMATTER : TextFilter.DEFAULT_LOWERCASE_FORMATTER);\n this.addValueChangedListeners();\n };\n TextFilter.prototype.setConditionIntoUi = function (model, position) {\n var positionOne = position === ConditionPosition.One;\n var eValue = positionOne ? this.eValue1 : this.eValue2;\n eValue.setValue(model ? model.filter : null);\n };\n TextFilter.prototype.createCondition = function (position) {\n var positionOne = position === ConditionPosition.One;\n var type = positionOne ? this.getCondition1Type() : this.getCondition2Type();\n var eValue = positionOne ? this.eValue1 : this.eValue2;\n var value = this.getCleanValue(eValue);\n eValue.setValue(value, true); // ensure clean value is visible\n var model = {\n filterType: this.getFilterType(),\n type: type\n };\n if (!this.doesFilterHaveHiddenInput(type)) {\n model.filter = value;\n }\n return model;\n };\n TextFilter.prototype.getFilterType = function () {\n return 'text';\n };\n TextFilter.prototype.areSimpleModelsEqual = function (aSimple, bSimple) {\n return aSimple.filter === bSimple.filter && aSimple.type === bSimple.type;\n };\n TextFilter.prototype.resetUiToDefaults = function (silent) {\n var _this = this;\n return _super.prototype.resetUiToDefaults.call(this, silent).then(function () {\n _this.forEachInput(function (field) { return field.setValue(null, silent); });\n _this.resetPlaceholder();\n });\n };\n TextFilter.prototype.resetPlaceholder = function () {\n var globalTranslate = this.gridOptionsWrapper.getLocaleTextFunc();\n var placeholder = this.translate('filterOoo');\n this.forEachInput(function (field) {\n field.setInputPlaceholder(placeholder);\n field.setInputAriaLabel(globalTranslate('ariaFilterValue', 'Filter Value'));\n });\n };\n TextFilter.prototype.forEachInput = function (action) {\n forEach([this.eValue1, this.eValue2], action);\n };\n TextFilter.prototype.setValueFromFloatingFilter = function (value) {\n this.eValue1.setValue(value);\n this.eValue2.setValue(null);\n };\n TextFilter.prototype.getDefaultFilterOptions = function () {\n return TextFilter.DEFAULT_FILTER_OPTIONS;\n };\n TextFilter.prototype.createValueTemplate = function (position) {\n var pos = position === ConditionPosition.One ? '1' : '2';\n return /* html */ \"\\n \";\n };\n TextFilter.prototype.updateUiVisibility = function () {\n _super.prototype.updateUiVisibility.call(this);\n setDisplayed(this.eCondition1Body, this.showValueFrom(this.getCondition1Type()));\n setDisplayed(this.eCondition2Body, this.isCondition2Enabled() && this.showValueFrom(this.getCondition2Type()));\n };\n TextFilter.prototype.afterGuiAttached = function (params) {\n _super.prototype.afterGuiAttached.call(this, params);\n this.resetPlaceholder();\n if (!params || !params.suppressFocus) {\n this.eValue1.getInputElement().focus();\n }\n };\n TextFilter.prototype.isConditionUiComplete = function (position) {\n var positionOne = position === ConditionPosition.One;\n var option = positionOne ? this.getCondition1Type() : this.getCondition2Type();\n if (option === SimpleFilter.EMPTY) {\n return false;\n }\n if (this.doesFilterHaveHiddenInput(option)) {\n return true;\n }\n return this.getCleanValue(positionOne ? this.eValue1 : this.eValue2) != null;\n };\n TextFilter.prototype.individualConditionPasses = function (params, filterModel) {\n var filterText = filterModel.filter;\n var filterOption = filterModel.type;\n var cellValue = this.textFilterParams.valueGetter(params.node);\n var cellValueFormatted = this.formatter(cellValue);\n var customFilterOption = this.optionsFactory.getCustomOption(filterOption);\n if (customFilterOption) {\n // only execute the custom filter if a value exists or a value isn't required, i.e. input is hidden\n if (filterText != null || customFilterOption.hideFilterInput) {\n return customFilterOption.test(filterText, cellValueFormatted);\n }\n }\n if (cellValue == null) {\n return filterOption === SimpleFilter.NOT_EQUAL || filterOption === SimpleFilter.NOT_CONTAINS;\n }\n var filterTextFormatted = this.formatter(filterText);\n return this.comparator(filterOption, cellValueFormatted, filterTextFormatted);\n };\n TextFilter.DEFAULT_FILTER_OPTIONS = [\n SimpleFilter.CONTAINS,\n SimpleFilter.NOT_CONTAINS,\n SimpleFilter.EQUALS,\n SimpleFilter.NOT_EQUAL,\n SimpleFilter.STARTS_WITH,\n SimpleFilter.ENDS_WITH\n ];\n TextFilter.DEFAULT_FORMATTER = function (from) { return from; };\n TextFilter.DEFAULT_LOWERCASE_FORMATTER = function (from) { return from == null ? null : from.toString().toLowerCase(); };\n TextFilter.DEFAULT_COMPARATOR = function (filter, value, filterText) {\n switch (filter) {\n case TextFilter.CONTAINS:\n return value.indexOf(filterText) >= 0;\n case TextFilter.NOT_CONTAINS:\n return value.indexOf(filterText) < 0;\n case TextFilter.EQUALS:\n return value === filterText;\n case TextFilter.NOT_EQUAL:\n return value != filterText;\n case TextFilter.STARTS_WITH:\n return value.indexOf(filterText) === 0;\n case TextFilter.ENDS_WITH:\n var index = value.lastIndexOf(filterText);\n return index >= 0 && index === (value.length - filterText.length);\n default:\n // should never happen\n console.warn('AG Grid: Unexpected type of filter \"' + filter + '\", it looks like the filter was configured with incorrect Filter Options');\n return false;\n }\n };\n __decorate$i([\n RefSelector('eValue1')\n ], TextFilter.prototype, \"eValue1\", void 0);\n __decorate$i([\n RefSelector('eValue2')\n ], TextFilter.prototype, \"eValue2\", void 0);\n return TextFilter;\n}(SimpleFilter));\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / React / AngularJS / Web Components\n * @version v26.1.0\n * @link http://www.ag-grid.com/\n * @license MIT\n */\nvar __extends$h = (undefined && undefined.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate$j = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n 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 TextInputFloatingFilter = /** @class */ (function (_super) {\n __extends$h(TextInputFloatingFilter, _super);\n function TextInputFloatingFilter() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n TextInputFloatingFilter.prototype.postConstruct = function () {\n this.setTemplate(/* html */ \"\\n \");\n };\n TextInputFloatingFilter.prototype.getDefaultDebounceMs = function () {\n return 500;\n };\n TextInputFloatingFilter.prototype.onParentModelChanged = function (model, event) {\n if (this.isEventFromFloatingFilter(event)) {\n // if the floating filter triggered the change, it is already in sync\n return;\n }\n this.setLastTypeFromModel(model);\n this.eFloatingFilterInput.setValue(this.getTextFromModel(model));\n this.setEditable(this.canWeEditAfterModelFromParentFilter(model));\n };\n TextInputFloatingFilter.prototype.init = function (params) {\n _super.prototype.init.call(this, params);\n this.params = params;\n this.applyActive = ProvidedFilter.isUseApplyButton(this.params.filterParams);\n var debounceMs = ProvidedFilter.getDebounceMs(this.params.filterParams, this.getDefaultDebounceMs());\n var toDebounce = debounce(this.syncUpWithParentFilter.bind(this), debounceMs);\n var filterGui = this.eFloatingFilterInput.getGui();\n this.addManagedListener(filterGui, 'input', toDebounce);\n this.addManagedListener(filterGui, 'keypress', toDebounce);\n this.addManagedListener(filterGui, 'keydown', toDebounce);\n var columnDef = params.column.getDefinition();\n if (columnDef.filterParams &&\n columnDef.filterParams.filterOptions &&\n columnDef.filterParams.filterOptions.length === 1 &&\n columnDef.filterParams.filterOptions[0] === 'inRange') {\n this.eFloatingFilterInput.setDisabled(true);\n }\n var displayName = this.columnModel.getDisplayNameForColumn(params.column, 'header', true);\n var translate = this.gridOptionsWrapper.getLocaleTextFunc();\n this.eFloatingFilterInput.setInputAriaLabel(displayName + \" \" + translate('ariaFilterInput', 'Filter Input'));\n };\n TextInputFloatingFilter.prototype.syncUpWithParentFilter = function (e) {\n var _this = this;\n var enterKeyPressed = isKeyPressed(e, KeyCode.ENTER);\n if (this.applyActive && !enterKeyPressed) {\n return;\n }\n var value = this.eFloatingFilterInput.getValue();\n if (this.params.filterParams.trimInput) {\n value = TextFilter.trimInput(value);\n this.eFloatingFilterInput.setValue(value, true); // ensure visible value is trimmed\n }\n this.params.parentFilterInstance(function (filterInstance) {\n if (filterInstance) {\n var simpleFilter = filterInstance;\n simpleFilter.onFloatingFilterChanged(_this.getLastType(), value);\n }\n });\n };\n TextInputFloatingFilter.prototype.setEditable = function (editable) {\n this.eFloatingFilterInput.setDisabled(!editable);\n };\n __decorate$j([\n Autowired('columnModel')\n ], TextInputFloatingFilter.prototype, \"columnModel\", void 0);\n __decorate$j([\n RefSelector('eFloatingFilterInput')\n ], TextInputFloatingFilter.prototype, \"eFloatingFilterInput\", void 0);\n __decorate$j([\n PostConstruct\n ], TextInputFloatingFilter.prototype, \"postConstruct\", null);\n return TextInputFloatingFilter;\n}(SimpleFloatingFilter));\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / React / AngularJS / Web Components\n * @version v26.1.0\n * @link http://www.ag-grid.com/\n * @license MIT\n */\nvar __extends$i = (undefined && undefined.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar NumberFloatingFilter = /** @class */ (function (_super) {\n __extends$i(NumberFloatingFilter, _super);\n function NumberFloatingFilter() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n NumberFloatingFilter.prototype.getDefaultFilterOptions = function () {\n return NumberFilter.DEFAULT_FILTER_OPTIONS;\n };\n NumberFloatingFilter.prototype.conditionToString = function (condition) {\n var isRange = condition.type == SimpleFilter.IN_RANGE;\n if (isRange) {\n return condition.filter + \"-\" + condition.filterTo;\n }\n // cater for when the type doesn't need a value\n if (condition.filter != null) {\n return \"\" + condition.filter;\n }\n return \"\" + condition.type;\n };\n return NumberFloatingFilter;\n}(TextInputFloatingFilter));\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / React / AngularJS / Web Components\n * @version v26.1.0\n * @link http://www.ag-grid.com/\n * @license MIT\n */\nvar __extends$j = (undefined && undefined.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar TextFloatingFilter = /** @class */ (function (_super) {\n __extends$j(TextFloatingFilter, _super);\n function TextFloatingFilter() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n TextFloatingFilter.prototype.conditionToString = function (condition) {\n // it's not possible to have 'in range' for string, so no need to check for it.\n // also cater for when the type doesn't need a value\n if (condition.filter != null) {\n return \"\" + condition.filter;\n }\n else {\n return \"\" + condition.type;\n }\n };\n TextFloatingFilter.prototype.getDefaultFilterOptions = function () {\n return TextFilter.DEFAULT_FILTER_OPTIONS;\n };\n return TextFloatingFilter;\n}(TextInputFloatingFilter));\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / React / AngularJS / Web Components\n * @version v26.1.0\n * @link http://www.ag-grid.com/\n * @license MIT\n */\nvar TouchListener = /** @class */ (function () {\n function TouchListener(eElement, preventMouseClick) {\n var _this = this;\n if (preventMouseClick === void 0) { preventMouseClick = false; }\n this.destroyFuncs = [];\n this.touching = false;\n this.eventService = new EventService();\n this.eElement = eElement;\n this.preventMouseClick = preventMouseClick;\n var startListener = this.onTouchStart.bind(this);\n var moveListener = this.onTouchMove.bind(this);\n var endListener = this.onTouchEnd.bind(this);\n this.eElement.addEventListener(\"touchstart\", startListener, { passive: true });\n this.eElement.addEventListener(\"touchmove\", moveListener, { passive: true });\n // we set passive=false, as we want to prevent default on this event\n this.eElement.addEventListener(\"touchend\", endListener, { passive: false });\n this.destroyFuncs.push(function () {\n _this.eElement.removeEventListener(\"touchstart\", startListener, { passive: true });\n _this.eElement.removeEventListener(\"touchmove\", moveListener, { passive: true });\n _this.eElement.removeEventListener(\"touchend\", endListener, { passive: false });\n });\n }\n TouchListener.prototype.getActiveTouch = function (touchList) {\n for (var i = 0; i < touchList.length; i++) {\n var matches = touchList[i].identifier === this.touchStart.identifier;\n if (matches) {\n return touchList[i];\n }\n }\n return null;\n };\n TouchListener.prototype.addEventListener = function (eventType, listener) {\n this.eventService.addEventListener(eventType, listener);\n };\n TouchListener.prototype.removeEventListener = function (eventType, listener) {\n this.eventService.removeEventListener(eventType, listener);\n };\n TouchListener.prototype.onTouchStart = function (touchEvent) {\n var _this = this;\n // only looking at one touch point at any time\n if (this.touching) {\n return;\n }\n this.touchStart = touchEvent.touches[0];\n this.touching = true;\n this.moved = false;\n var touchStartCopy = this.touchStart;\n window.setTimeout(function () {\n var touchesMatch = _this.touchStart === touchStartCopy;\n if (_this.touching && touchesMatch && !_this.moved) {\n _this.moved = true;\n var event_1 = {\n type: TouchListener.EVENT_LONG_TAP,\n touchStart: _this.touchStart,\n touchEvent: touchEvent\n };\n _this.eventService.dispatchEvent(event_1);\n }\n }, 500);\n };\n TouchListener.prototype.onTouchMove = function (touchEvent) {\n if (!this.touching) {\n return;\n }\n var touch = this.getActiveTouch(touchEvent.touches);\n if (!touch) {\n return;\n }\n var eventIsFarAway = !areEventsNear(touch, this.touchStart, 4);\n if (eventIsFarAway) {\n this.moved = true;\n }\n };\n TouchListener.prototype.onTouchEnd = function (touchEvent) {\n if (!this.touching) {\n return;\n }\n if (!this.moved) {\n var event_2 = {\n type: TouchListener.EVENT_TAP,\n touchStart: this.touchStart\n };\n this.eventService.dispatchEvent(event_2);\n this.checkForDoubleTap();\n }\n // stops the tap from also been processed as a mouse click\n if (this.preventMouseClick) {\n touchEvent.preventDefault();\n }\n this.touching = false;\n };\n TouchListener.prototype.checkForDoubleTap = function () {\n var now = new Date().getTime();\n if (this.lastTapTime && this.lastTapTime > 0) {\n // if previous tap, see if duration is short enough to be considered double tap\n var interval = now - this.lastTapTime;\n if (interval > TouchListener.DOUBLE_TAP_MILLIS) {\n // dispatch double tap event\n var event_3 = {\n type: TouchListener.EVENT_DOUBLE_TAP,\n touchStart: this.touchStart\n };\n this.eventService.dispatchEvent(event_3);\n // this stops a tripple tap ending up as two double taps\n this.lastTapTime = null;\n }\n else {\n this.lastTapTime = now;\n }\n }\n else {\n this.lastTapTime = now;\n }\n };\n TouchListener.prototype.destroy = function () {\n this.destroyFuncs.forEach(function (func) { return func(); });\n };\n TouchListener.EVENT_TAP = \"tap\";\n TouchListener.EVENT_DOUBLE_TAP = \"doubleTap\";\n TouchListener.EVENT_LONG_TAP = \"longTap\";\n TouchListener.DOUBLE_TAP_MILLIS = 500;\n return TouchListener;\n}());\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / React / AngularJS / Web Components\n * @version v26.1.0\n * @link http://www.ag-grid.com/\n * @license MIT\n */\nvar __extends$k = (undefined && undefined.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate$k = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n 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 HeaderComp = /** @class */ (function (_super) {\n __extends$k(HeaderComp, _super);\n function HeaderComp() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.lastMovingChanged = 0;\n return _this;\n }\n // this is a user component, and IComponent has \"public destroy()\" as part of the interface.\n // so we need to override destroy() just to make the method public.\n HeaderComp.prototype.destroy = function () {\n _super.prototype.destroy.call(this);\n };\n HeaderComp.prototype.refresh = function (params) {\n this.params = params;\n // if template changed, then recreate the whole comp, the code required to manage\n // a changing template is to difficult for what it's worth.\n if (this.workOutTemplate() != this.currentTemplate) {\n return false;\n }\n if (this.workOutShowMenu() != this.currentShowMenu) {\n return false;\n }\n if (this.workOutSort() != this.currentSort) {\n return false;\n }\n this.setDisplayName(params);\n return true;\n };\n HeaderComp.prototype.workOutTemplate = function () {\n var template = firstExistingValue(this.params.template, HeaderComp.TEMPLATE);\n // take account of any newlines & whitespace before/after the actual template\n template = template && template.trim ? template.trim() : template;\n return template;\n };\n HeaderComp.prototype.init = function (params) {\n this.params = params;\n this.currentTemplate = this.workOutTemplate();\n this.setTemplate(this.currentTemplate);\n this.setupTap();\n this.setupIcons(params.column);\n this.setMenu();\n this.setupSort();\n this.setupFilterIcon();\n this.setDisplayName(params);\n };\n HeaderComp.prototype.setDisplayName = function (params) {\n if (this.currentDisplayName != params.displayName) {\n this.currentDisplayName = params.displayName;\n var displayNameSanitised = escapeString(this.currentDisplayName);\n if (this.eText) {\n this.eText.innerHTML = displayNameSanitised;\n }\n }\n };\n HeaderComp.prototype.setupIcons = function (column) {\n this.addInIcon('sortAscending', this.eSortAsc, column);\n this.addInIcon('sortDescending', this.eSortDesc, column);\n this.addInIcon('sortUnSort', this.eSortNone, column);\n this.addInIcon('menu', this.eMenu, column);\n this.addInIcon('filter', this.eFilter, column);\n };\n HeaderComp.prototype.addInIcon = function (iconName, eParent, column) {\n if (eParent == null) {\n return;\n }\n var eIcon = createIconNoSpan(iconName, this.gridOptionsWrapper, column);\n if (eIcon) {\n eParent.appendChild(eIcon);\n }\n };\n HeaderComp.prototype.setupTap = function () {\n var _this = this;\n var options = this.gridOptionsWrapper;\n if (options.isSuppressTouch()) {\n return;\n }\n var touchListener = new TouchListener(this.getGui(), true);\n var suppressMenuHide = options.isSuppressMenuHide();\n var tapMenuButton = suppressMenuHide && exists(this.eMenu);\n var menuTouchListener = tapMenuButton ? new TouchListener(this.eMenu, true) : touchListener;\n if (this.params.enableMenu) {\n var eventType = tapMenuButton ? 'EVENT_TAP' : 'EVENT_LONG_TAP';\n var showMenuFn = function (event) {\n options.getApi().showColumnMenuAfterMouseClick(_this.params.column, event.touchStart);\n };\n this.addManagedListener(menuTouchListener, TouchListener[eventType], showMenuFn);\n }\n if (this.params.enableSorting) {\n var tapListener = function (event) {\n var target = event.touchStart.target;\n // When suppressMenuHide is true, a tap on the menu icon will bubble up\n // to the header container, in that case we should not sort\n if (suppressMenuHide && _this.eMenu.contains(target)) {\n return;\n }\n _this.sortController.progressSort(_this.params.column, false, \"uiColumnSorted\");\n };\n this.addManagedListener(touchListener, TouchListener.EVENT_TAP, tapListener);\n }\n // if tapMenuButton is true `touchListener` and `menuTouchListener` are different\n // so we need to make sure to destroy both listeners here\n this.addDestroyFunc(function () { return touchListener.destroy(); });\n if (tapMenuButton) {\n this.addDestroyFunc(function () { return menuTouchListener.destroy(); });\n }\n };\n HeaderComp.prototype.workOutShowMenu = function () {\n // we don't show the menu if on an iPad/iPhone, as the user cannot have a pointer device/\n // However if suppressMenuHide is set to true the menu will be displayed alwasys, so it's ok\n // to show it on iPad in this case (as hover isn't needed). If suppressMenuHide\n // is false (default) user will need to use longpress to display the menu.\n var menuHides = !this.gridOptionsWrapper.isSuppressMenuHide();\n var onIpadAndMenuHides = isIOSUserAgent() && menuHides;\n var showMenu = this.params.enableMenu && !onIpadAndMenuHides;\n return showMenu;\n };\n HeaderComp.prototype.setMenu = function () {\n var _this = this;\n // if no menu provided in template, do nothing\n if (!this.eMenu) {\n return;\n }\n this.currentShowMenu = this.workOutShowMenu();\n if (!this.currentShowMenu) {\n removeFromParent(this.eMenu);\n return;\n }\n var suppressMenuHide = this.gridOptionsWrapper.isSuppressMenuHide();\n this.addManagedListener(this.eMenu, 'click', function () { return _this.showMenu(_this.eMenu); });\n addOrRemoveCssClass(this.eMenu, 'ag-header-menu-always-show', suppressMenuHide);\n };\n HeaderComp.prototype.showMenu = function (eventSource) {\n if (!eventSource) {\n eventSource = this.eMenu;\n }\n this.menuFactory.showMenuAfterButtonClick(this.params.column, eventSource, 'columnMenu');\n };\n HeaderComp.prototype.removeSortIcons = function () {\n removeFromParent(this.eSortAsc);\n removeFromParent(this.eSortDesc);\n removeFromParent(this.eSortNone);\n removeFromParent(this.eSortOrder);\n };\n HeaderComp.prototype.workOutSort = function () {\n return this.params.enableSorting;\n };\n HeaderComp.prototype.setupSort = function () {\n var _this = this;\n this.currentSort = this.params.enableSorting;\n if (!this.currentSort) {\n this.removeSortIcons();\n return;\n }\n var sortUsingCtrl = this.gridOptionsWrapper.isMultiSortKeyCtrl();\n // keep track of last time the moving changed flag was set\n this.addManagedListener(this.params.column, Column.EVENT_MOVING_CHANGED, function () {\n _this.lastMovingChanged = new Date().getTime();\n });\n // add the event on the header, so when clicked, we do sorting\n if (this.eLabel) {\n this.addManagedListener(this.eLabel, 'click', function (event) {\n // sometimes when moving a column via dragging, this was also firing a clicked event.\n // here is issue raised by user: https://ag-grid.zendesk.com/agent/tickets/1076\n // this check stops sort if a) column is moving or b) column moved less than 200ms ago (so caters for race condition)\n var moving = _this.params.column.isMoving();\n var nowTime = new Date().getTime();\n // typically there is <2ms if moving flag was set recently, as it would be done in same VM turn\n var movedRecently = (nowTime - _this.lastMovingChanged) < 50;\n var columnMoving = moving || movedRecently;\n if (!columnMoving) {\n var multiSort = sortUsingCtrl ? (event.ctrlKey || event.metaKey) : event.shiftKey;\n _this.params.progressSort(multiSort);\n }\n });\n }\n this.addManagedListener(this.params.column, Column.EVENT_SORT_CHANGED, this.onSortChanged.bind(this));\n this.onSortChanged();\n this.addManagedListener(this.eventService, Events.EVENT_SORT_CHANGED, this.setMultiSortOrder.bind(this));\n this.setMultiSortOrder();\n };\n HeaderComp.prototype.onSortChanged = function () {\n addOrRemoveCssClass(this.getGui(), 'ag-header-cell-sorted-asc', this.params.column.isSortAscending());\n addOrRemoveCssClass(this.getGui(), 'ag-header-cell-sorted-desc', this.params.column.isSortDescending());\n addOrRemoveCssClass(this.getGui(), 'ag-header-cell-sorted-none', this.params.column.isSortNone());\n if (this.eSortAsc) {\n addOrRemoveCssClass(this.eSortAsc, 'ag-hidden', !this.params.column.isSortAscending());\n }\n if (this.eSortDesc) {\n addOrRemoveCssClass(this.eSortDesc, 'ag-hidden', !this.params.column.isSortDescending());\n }\n if (this.eSortNone) {\n var alwaysHideNoSort = !this.params.column.getColDef().unSortIcon && !this.gridOptionsWrapper.isUnSortIcon();\n addOrRemoveCssClass(this.eSortNone, 'ag-hidden', alwaysHideNoSort || !this.params.column.isSortNone());\n }\n };\n // we listen here for global sort events, NOT column sort events, as we want to do this\n // when sorting has been set on all column (if we listened just for our col (where we\n // set the asc / desc icons) then it's possible other cols are yet to get their sorting state.\n HeaderComp.prototype.setMultiSortOrder = function () {\n if (!this.eSortOrder) {\n return;\n }\n var col = this.params.column;\n var allColumnsWithSorting = this.sortController.getColumnsWithSortingOrdered();\n var indexThisCol = allColumnsWithSorting.indexOf(col);\n var moreThanOneColSorting = allColumnsWithSorting.length > 1;\n var showIndex = col.isSorting() && moreThanOneColSorting;\n setDisplayed(this.eSortOrder, showIndex);\n if (indexThisCol >= 0) {\n this.eSortOrder.innerHTML = (indexThisCol + 1).toString();\n }\n else {\n clearElement(this.eSortOrder);\n }\n };\n HeaderComp.prototype.setupFilterIcon = function () {\n if (!this.eFilter) {\n return;\n }\n this.addManagedListener(this.params.column, Column.EVENT_FILTER_CHANGED, this.onFilterChanged.bind(this));\n this.onFilterChanged();\n };\n HeaderComp.prototype.onFilterChanged = function () {\n var filterPresent = this.params.column.isFilterActive();\n addOrRemoveCssClass(this.eFilter, 'ag-hidden', !filterPresent);\n };\n HeaderComp.TEMPLATE = \"\\n \\n \\n
\";\n __decorate$k([\n Autowired('sortController')\n ], HeaderComp.prototype, \"sortController\", void 0);\n __decorate$k([\n Autowired('menuFactory')\n ], HeaderComp.prototype, \"menuFactory\", void 0);\n __decorate$k([\n RefSelector('eFilter')\n ], HeaderComp.prototype, \"eFilter\", void 0);\n __decorate$k([\n RefSelector('eSortAsc')\n ], HeaderComp.prototype, \"eSortAsc\", void 0);\n __decorate$k([\n RefSelector('eSortDesc')\n ], HeaderComp.prototype, \"eSortDesc\", void 0);\n __decorate$k([\n RefSelector('eSortNone')\n ], HeaderComp.prototype, \"eSortNone\", void 0);\n __decorate$k([\n RefSelector('eSortOrder')\n ], HeaderComp.prototype, \"eSortOrder\", void 0);\n __decorate$k([\n RefSelector('eMenu')\n ], HeaderComp.prototype, \"eMenu\", void 0);\n __decorate$k([\n RefSelector('eLabel')\n ], HeaderComp.prototype, \"eLabel\", void 0);\n __decorate$k([\n RefSelector('eText')\n ], HeaderComp.prototype, \"eText\", void 0);\n return HeaderComp;\n}(Component));\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / React / AngularJS / Web Components\n * @version v26.1.0\n * @link http://www.ag-grid.com/\n * @license MIT\n */\nvar __extends$l = (undefined && undefined.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate$l = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n 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 HeaderGroupComp = /** @class */ (function (_super) {\n __extends$l(HeaderGroupComp, _super);\n function HeaderGroupComp() {\n return _super.call(this, HeaderGroupComp.TEMPLATE) || this;\n }\n // this is a user component, and IComponent has \"public destroy()\" as part of the interface.\n // so we need to override destroy() just to make the method public.\n HeaderGroupComp.prototype.destroy = function () {\n _super.prototype.destroy.call(this);\n };\n HeaderGroupComp.prototype.init = function (params) {\n this.params = params;\n this.checkWarnings();\n this.setupLabel();\n this.addGroupExpandIcon();\n this.setupExpandIcons();\n };\n HeaderGroupComp.prototype.checkWarnings = function () {\n var paramsAny = this.params;\n if (paramsAny.template) {\n var message_1 = \"A template was provided for Header Group Comp - templates are only supported for Header Comps (not groups)\";\n doOnce(function () { return console.warn(message_1); }, 'HeaderGroupComp.templateNotSupported');\n }\n };\n HeaderGroupComp.prototype.setupExpandIcons = function () {\n var _this = this;\n this.addInIcon(\"columnGroupOpened\", \"agOpened\");\n this.addInIcon(\"columnGroupClosed\", \"agClosed\");\n var expandAction = function (event) {\n if (isStopPropagationForAgGrid(event)) {\n return;\n }\n var newExpandedValue = !_this.params.columnGroup.isExpanded();\n _this.columnModel.setColumnGroupOpened(_this.params.columnGroup.getOriginalColumnGroup(), newExpandedValue, \"uiColumnExpanded\");\n };\n this.addTouchAndClickListeners(this.eCloseIcon, expandAction);\n this.addTouchAndClickListeners(this.eOpenIcon, expandAction);\n var stopPropagationAction = function (event) {\n stopPropagationForAgGrid(event);\n };\n // adding stopPropagation to the double click for the icons prevents double click action happening\n // when the icons are clicked. if the icons are double clicked, then the groups should open and\n // then close again straight away. if we also listened to double click, then the group would open,\n // close, then open, which is not what we want. double click should only action if the user double\n // clicks outside of the icons.\n this.addManagedListener(this.eCloseIcon, \"dblclick\", stopPropagationAction);\n this.addManagedListener(this.eOpenIcon, \"dblclick\", stopPropagationAction);\n this.addManagedListener(this.getGui(), \"dblclick\", expandAction);\n this.updateIconVisibility();\n var originalColumnGroup = this.params.columnGroup.getOriginalColumnGroup();\n this.addManagedListener(originalColumnGroup, ProvidedColumnGroup.EVENT_EXPANDED_CHANGED, this.updateIconVisibility.bind(this));\n this.addManagedListener(originalColumnGroup, ProvidedColumnGroup.EVENT_EXPANDABLE_CHANGED, this.updateIconVisibility.bind(this));\n };\n HeaderGroupComp.prototype.addTouchAndClickListeners = function (eElement, action) {\n var touchListener = new TouchListener(eElement, true);\n this.addManagedListener(touchListener, TouchListener.EVENT_TAP, action);\n this.addDestroyFunc(function () { return touchListener.destroy(); });\n this.addManagedListener(eElement, \"click\", action);\n };\n HeaderGroupComp.prototype.updateIconVisibility = function () {\n var columnGroup = this.params.columnGroup;\n if (columnGroup.isExpandable()) {\n var expanded = this.params.columnGroup.isExpanded();\n setDisplayed(this.eOpenIcon, expanded);\n setDisplayed(this.eCloseIcon, !expanded);\n }\n else {\n setDisplayed(this.eOpenIcon, false);\n setDisplayed(this.eCloseIcon, false);\n }\n };\n HeaderGroupComp.prototype.addInIcon = function (iconName, refName) {\n var eIcon = createIconNoSpan(iconName, this.gridOptionsWrapper, null);\n if (eIcon) {\n this.getRefElement(refName).appendChild(eIcon);\n }\n };\n HeaderGroupComp.prototype.addGroupExpandIcon = function () {\n if (!this.params.columnGroup.isExpandable()) {\n setDisplayed(this.eOpenIcon, false);\n setDisplayed(this.eCloseIcon, false);\n return;\n }\n };\n HeaderGroupComp.prototype.setupLabel = function () {\n // no renderer, default text render\n var displayName = this.params.displayName;\n if (exists(displayName)) {\n var displayNameSanitised = escapeString(displayName);\n this.getRefElement('agLabel').innerHTML = displayNameSanitised;\n }\n };\n HeaderGroupComp.TEMPLATE = \"\";\n __decorate$l([\n Autowired(\"columnModel\")\n ], HeaderGroupComp.prototype, \"columnModel\", void 0);\n __decorate$l([\n RefSelector(\"agOpened\")\n ], HeaderGroupComp.prototype, \"eOpenIcon\", void 0);\n __decorate$l([\n RefSelector(\"agClosed\")\n ], HeaderGroupComp.prototype, \"eCloseIcon\", void 0);\n return HeaderGroupComp;\n}(Component));\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / React / AngularJS / Web Components\n * @version v26.1.0\n * @link http://www.ag-grid.com/\n * @license MIT\n */\nvar __extends$m = (undefined && undefined.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar PopupComponent = /** @class */ (function (_super) {\n __extends$m(PopupComponent, _super);\n function PopupComponent() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n PopupComponent.prototype.isPopup = function () {\n return true;\n };\n PopupComponent.prototype.setParentComponent = function (container) {\n addCssClass(container.getGui(), 'ag-has-popup');\n _super.prototype.setParentComponent.call(this, container);\n };\n PopupComponent.prototype.destroy = function () {\n var parentComp = this.parentComponent;\n var hasParent = parentComp && parentComp.isAlive();\n if (hasParent) {\n removeCssClass(parentComp.getGui(), 'ag-has-popup');\n }\n _super.prototype.destroy.call(this);\n };\n return PopupComponent;\n}(Component));\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / React / AngularJS / Web Components\n * @version v26.1.0\n * @link http://www.ag-grid.com/\n * @license MIT\n */\nvar __extends$n = (undefined && undefined.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate$m = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n 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 LargeTextCellEditor = /** @class */ (function (_super) {\n __extends$n(LargeTextCellEditor, _super);\n function LargeTextCellEditor() {\n return _super.call(this, LargeTextCellEditor.TEMPLATE) || this;\n }\n LargeTextCellEditor.prototype.init = function (params) {\n this.params = params;\n this.focusAfterAttached = params.cellStartedEdit;\n this.eTextArea\n .setMaxLength(params.maxLength || 200)\n .setCols(params.cols || 60)\n .setRows(params.rows || 10);\n if (exists(params.value)) {\n this.eTextArea.setValue(params.value.toString(), true);\n }\n this.addGuiEventListener('keydown', this.onKeyDown.bind(this));\n };\n LargeTextCellEditor.prototype.onKeyDown = function (event) {\n var key = event.which || event.keyCode;\n if (key === KeyCode.LEFT ||\n key === KeyCode.UP ||\n key === KeyCode.RIGHT ||\n key === KeyCode.DOWN ||\n (event.shiftKey && key === KeyCode.ENTER)) { // shift+enter allows for newlines\n event.stopPropagation();\n }\n };\n LargeTextCellEditor.prototype.afterGuiAttached = function () {\n var translate = this.gridOptionsWrapper.getLocaleTextFunc();\n this.eTextArea.setInputAriaLabel(translate('ariaInputEditor', 'Input Editor'));\n if (this.focusAfterAttached) {\n this.eTextArea.getFocusableElement().focus();\n }\n };\n LargeTextCellEditor.prototype.getValue = function () {\n return this.params.parseValue(this.eTextArea.getValue());\n };\n LargeTextCellEditor.TEMPLATE = \"\";\n __decorate$m([\n RefSelector(\"eTextArea\")\n ], LargeTextCellEditor.prototype, \"eTextArea\", void 0);\n return LargeTextCellEditor;\n}(PopupComponent));\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / React / AngularJS / Web Components\n * @version v26.1.0\n * @link http://www.ag-grid.com/\n * @license MIT\n */\nvar __extends$o = (undefined && undefined.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate$n = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n 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 SelectCellEditor = /** @class */ (function (_super) {\n __extends$o(SelectCellEditor, _super);\n function SelectCellEditor() {\n var _this = _super.call(this, '') || this;\n _this.startedByEnter = false;\n return _this;\n }\n SelectCellEditor.prototype.init = function (params) {\n var _this = this;\n this.focusAfterAttached = params.cellStartedEdit;\n if (missing(params.values)) {\n console.warn('AG Grid: no values found for select cellEditor');\n return;\n }\n this.startedByEnter = params.keyPress === KeyCode.ENTER;\n var hasValue = false;\n params.values.forEach(function (value) {\n var option = { value: value };\n var valueFormatted = _this.valueFormatterService.formatValue(params.column, null, null, value);\n var valueFormattedExits = valueFormatted !== null && valueFormatted !== undefined;\n option.text = valueFormattedExits ? valueFormatted : value;\n _this.eSelect.addOption(option);\n hasValue = hasValue || params.value === value;\n });\n if (hasValue) {\n this.eSelect.setValue(params.value, true);\n }\n else if (params.values.length) {\n this.eSelect.setValue(params.values[0], true);\n }\n // we don't want to add this if full row editing, otherwise selecting will stop the\n // full row editing.\n if (!this.gridOptionsWrapper.isFullRowEdit()) {\n this.eSelect.onValueChange(function () { return params.stopEditing(); });\n }\n };\n SelectCellEditor.prototype.afterGuiAttached = function () {\n if (this.focusAfterAttached) {\n this.eSelect.getFocusableElement().focus();\n }\n if (this.startedByEnter) {\n this.eSelect.showPicker();\n }\n };\n SelectCellEditor.prototype.focusIn = function () {\n this.eSelect.getFocusableElement().focus();\n };\n SelectCellEditor.prototype.getValue = function () {\n return this.eSelect.getValue();\n };\n SelectCellEditor.prototype.isPopup = function () {\n return false;\n };\n __decorate$n([\n Autowired('valueFormatterService')\n ], SelectCellEditor.prototype, \"valueFormatterService\", void 0);\n __decorate$n([\n RefSelector('eSelect')\n ], SelectCellEditor.prototype, \"eSelect\", void 0);\n return SelectCellEditor;\n}(PopupComponent));\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / React / AngularJS / Web Components\n * @version v26.1.0\n * @link http://www.ag-grid.com/\n * @license MIT\n */\nvar __extends$p = (undefined && undefined.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar PopupSelectCellEditor = /** @class */ (function (_super) {\n __extends$p(PopupSelectCellEditor, _super);\n function PopupSelectCellEditor() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n PopupSelectCellEditor.prototype.isPopup = function () {\n return true;\n };\n return PopupSelectCellEditor;\n}(SelectCellEditor));\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / React / AngularJS / Web Components\n * @version v26.1.0\n * @link http://www.ag-grid.com/\n * @license MIT\n */\nvar __extends$q = (undefined && undefined.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate$o = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n 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 TextCellEditor = /** @class */ (function (_super) {\n __extends$q(TextCellEditor, _super);\n function TextCellEditor() {\n return _super.call(this, TextCellEditor.TEMPLATE) || this;\n }\n TextCellEditor.prototype.init = function (params) {\n this.params = params;\n var eInput = this.eInput;\n var startValue;\n // cellStartedEdit is only false if we are doing fullRow editing\n if (params.cellStartedEdit) {\n this.focusAfterAttached = true;\n if (params.keyPress === KeyCode.BACKSPACE || params.keyPress === KeyCode.DELETE) {\n startValue = '';\n }\n else if (params.charPress) {\n startValue = params.charPress;\n }\n else {\n startValue = this.getStartValue(params);\n if (params.keyPress !== KeyCode.F2) {\n this.highlightAllOnFocus = true;\n }\n }\n }\n else {\n this.focusAfterAttached = false;\n startValue = this.getStartValue(params);\n }\n if (startValue != null) {\n eInput.setValue(startValue, true);\n }\n this.addManagedListener(eInput.getGui(), 'keydown', function (event) {\n var keyCode = event.keyCode;\n if (keyCode === KeyCode.PAGE_UP || keyCode === KeyCode.PAGE_DOWN) {\n event.preventDefault();\n }\n });\n };\n TextCellEditor.prototype.afterGuiAttached = function () {\n var translate = this.gridOptionsWrapper.getLocaleTextFunc();\n var eInput = this.eInput;\n eInput.setInputAriaLabel(translate('ariaInputEditor', 'Input Editor'));\n if (!this.focusAfterAttached) {\n return;\n }\n // Added for AG-3238. We can't remove this explicit focus() because Chrome requires an input\n // to be focused before setSelectionRange will work. But it triggers a bug in Safari where\n // explicitly focusing then blurring an empty field will cause the parent container to scroll.\n if (!isBrowserSafari()) {\n eInput.getFocusableElement().focus();\n }\n var inputEl = eInput.getInputElement();\n if (this.highlightAllOnFocus) {\n inputEl.select();\n }\n else {\n // when we started editing, we want the caret at the end, not the start.\n // this comes into play in two scenarios: a) when user hits F2 and b)\n // when user hits a printable character, then on IE (and only IE) the caret\n // was placed after the first character, thus 'apply' would end up as 'pplea'\n var value = eInput.getValue();\n var len = (exists(value) && value.length) || 0;\n if (len) {\n inputEl.setSelectionRange(len, len);\n }\n }\n };\n // gets called when tabbing trough cells and in full row edit mode\n TextCellEditor.prototype.focusIn = function () {\n var eInput = this.eInput;\n var focusEl = eInput.getFocusableElement();\n var inputEl = eInput.getInputElement();\n focusEl.focus();\n inputEl.select();\n };\n TextCellEditor.prototype.focusOut = function () {\n var inputEl = this.eInput.getInputElement();\n if (isBrowserIE()) {\n inputEl.setSelectionRange(0, 0);\n }\n };\n TextCellEditor.prototype.getValue = function () {\n var eInput = this.eInput;\n return this.params.parseValue(eInput.getValue());\n };\n TextCellEditor.prototype.getStartValue = function (params) {\n var formatValue = params.useFormatter || params.column.getColDef().refData;\n return formatValue ? params.formatValue(params.value) : params.value;\n };\n TextCellEditor.prototype.isPopup = function () {\n return false;\n };\n TextCellEditor.TEMPLATE = '';\n __decorate$o([\n RefSelector('eInput')\n ], TextCellEditor.prototype, \"eInput\", void 0);\n return TextCellEditor;\n}(PopupComponent));\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / React / AngularJS / Web Components\n * @version v26.1.0\n * @link http://www.ag-grid.com/\n * @license MIT\n */\nvar __extends$r = (undefined && undefined.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar PopupTextCellEditor = /** @class */ (function (_super) {\n __extends$r(PopupTextCellEditor, _super);\n function PopupTextCellEditor() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n PopupTextCellEditor.prototype.isPopup = function () {\n return true;\n };\n return PopupTextCellEditor;\n}(TextCellEditor));\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / React / AngularJS / Web Components\n * @version v26.1.0\n * @link http://www.ag-grid.com/\n * @license MIT\n */\nvar __extends$s = (undefined && undefined.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate$p = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n 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 ARROW_UP = '\\u2191';\nvar ARROW_DOWN = '\\u2193';\nvar AnimateShowChangeCellRenderer = /** @class */ (function (_super) {\n __extends$s(AnimateShowChangeCellRenderer, _super);\n function AnimateShowChangeCellRenderer() {\n var _this = _super.call(this, AnimateShowChangeCellRenderer.TEMPLATE) || this;\n _this.refreshCount = 0;\n return _this;\n }\n AnimateShowChangeCellRenderer.prototype.init = function (params) {\n // this.params = params;\n this.eValue = this.queryForHtmlElement('.ag-value-change-value');\n this.eDelta = this.queryForHtmlElement('.ag-value-change-delta');\n this.refresh(params);\n };\n AnimateShowChangeCellRenderer.prototype.showDelta = function (params, delta) {\n var absDelta = Math.abs(delta);\n var valueFormatted = params.formatValue(absDelta);\n var valueToUse = exists(valueFormatted) ? valueFormatted : absDelta;\n var deltaUp = (delta >= 0);\n if (deltaUp) {\n this.eDelta.innerHTML = ARROW_UP + valueToUse;\n }\n else {\n // because negative, use ABS to remove sign\n this.eDelta.innerHTML = ARROW_DOWN + valueToUse;\n }\n addOrRemoveCssClass(this.eDelta, 'ag-value-change-delta-up', deltaUp);\n addOrRemoveCssClass(this.eDelta, 'ag-value-change-delta-down', !deltaUp);\n };\n AnimateShowChangeCellRenderer.prototype.setTimerToRemoveDelta = function () {\n var _this = this;\n // the refreshCount makes sure that if the value updates again while\n // the below timer is waiting, then the below timer will realise it\n // is not the most recent and will not try to remove the delta value.\n this.refreshCount++;\n var refreshCountCopy = this.refreshCount;\n window.setTimeout(function () {\n if (refreshCountCopy === _this.refreshCount) {\n _this.hideDeltaValue();\n }\n }, 2000);\n };\n AnimateShowChangeCellRenderer.prototype.hideDeltaValue = function () {\n removeCssClass(this.eValue, 'ag-value-change-value-highlight');\n clearElement(this.eDelta);\n };\n AnimateShowChangeCellRenderer.prototype.refresh = function (params) {\n var value = params.value;\n if (value === this.lastValue) {\n return false;\n }\n if (exists(params.valueFormatted)) {\n this.eValue.innerHTML = params.valueFormatted;\n }\n else if (exists(params.value)) {\n this.eValue.innerHTML = value;\n }\n else {\n clearElement(this.eValue);\n }\n // we don't show the delta if we are in the middle of a filter. see comment on FilterManager\n // with regards processingFilterChange\n if (this.filterManager.isSuppressFlashingCellsBecauseFiltering()) {\n return false;\n }\n if (typeof value === 'number' && typeof this.lastValue === 'number') {\n var delta = value - this.lastValue;\n this.showDelta(params, delta);\n }\n // highlight the current value, but only if it's not new, otherwise it\n // would get highlighted first time the value is shown\n if (this.lastValue) {\n addCssClass(this.eValue, 'ag-value-change-value-highlight');\n }\n this.setTimerToRemoveDelta();\n this.lastValue = value;\n return true;\n };\n AnimateShowChangeCellRenderer.TEMPLATE = '' +\n ' ' +\n ' ' +\n ' ';\n __decorate$p([\n Autowired('filterManager')\n ], AnimateShowChangeCellRenderer.prototype, \"filterManager\", void 0);\n return AnimateShowChangeCellRenderer;\n}(Component));\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / React / AngularJS / Web Components\n * @version v26.1.0\n * @link http://www.ag-grid.com/\n * @license MIT\n */\nvar __extends$t = (undefined && undefined.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate$q = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n 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 AnimateSlideCellRenderer = /** @class */ (function (_super) {\n __extends$t(AnimateSlideCellRenderer, _super);\n function AnimateSlideCellRenderer() {\n var _this = _super.call(this, AnimateSlideCellRenderer.TEMPLATE) || this;\n _this.refreshCount = 0;\n _this.eCurrent = _this.queryForHtmlElement('.ag-value-slide-current');\n return _this;\n }\n AnimateSlideCellRenderer.prototype.init = function (params) {\n this.refresh(params);\n };\n AnimateSlideCellRenderer.prototype.addSlideAnimation = function () {\n var _this = this;\n this.refreshCount++;\n // below we keep checking this, and stop working on the animation\n // if it no longer matches - this means another animation has started\n // and this one is stale.\n var refreshCountCopy = this.refreshCount;\n // if old animation, remove it\n if (this.ePrevious) {\n this.getGui().removeChild(this.ePrevious);\n }\n this.ePrevious = loadTemplate(' ');\n this.ePrevious.innerHTML = this.eCurrent.innerHTML;\n this.getGui().insertBefore(this.ePrevious, this.eCurrent);\n // having timeout of 0 allows use to skip to the next css turn,\n // so we know the previous css classes have been applied. so the\n // complex set of setTimeout below creates the animation\n window.setTimeout(function () {\n if (refreshCountCopy !== _this.refreshCount) {\n return;\n }\n addCssClass(_this.ePrevious, 'ag-value-slide-out-end');\n }, 50);\n window.setTimeout(function () {\n if (refreshCountCopy !== _this.refreshCount) {\n return;\n }\n _this.getGui().removeChild(_this.ePrevious);\n _this.ePrevious = null;\n }, 3000);\n };\n AnimateSlideCellRenderer.prototype.refresh = function (params) {\n var value = params.value;\n if (missing(value)) {\n value = '';\n }\n if (value === this.lastValue) {\n return false;\n }\n // we don't show the delta if we are in the middle of a filter. see comment on FilterManager\n // with regards processingFilterChange\n if (this.filterManager.isSuppressFlashingCellsBecauseFiltering()) {\n return false;\n }\n this.addSlideAnimation();\n this.lastValue = value;\n if (exists(params.valueFormatted)) {\n this.eCurrent.innerHTML = params.valueFormatted;\n }\n else if (exists(params.value)) {\n this.eCurrent.innerHTML = value;\n }\n else {\n clearElement(this.eCurrent);\n }\n return true;\n };\n AnimateSlideCellRenderer.TEMPLATE = \"\\n \\n \";\n __decorate$q([\n Autowired('filterManager')\n ], AnimateSlideCellRenderer.prototype, \"filterManager\", void 0);\n return AnimateSlideCellRenderer;\n}(Component));\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / React / AngularJS / Web Components\n * @version v26.1.0\n * @link http://www.ag-grid.com/\n * @license MIT\n */\n(function (RowHighlightPosition) {\n RowHighlightPosition[RowHighlightPosition[\"Above\"] = 0] = \"Above\";\n RowHighlightPosition[RowHighlightPosition[\"Below\"] = 1] = \"Below\";\n})(exports.RowHighlightPosition || (exports.RowHighlightPosition = {}));\nvar RowNode = /** @class */ (function () {\n function RowNode(beans) {\n /** The current row index. If the row is filtered out or in a collapsed group, this value will be `null`. */\n this.rowIndex = null;\n /** The key for the group eg Ireland, UK, USA */\n this.key = null;\n /** Children mapped by the pivot columns. */\n this.childrenMapped = {};\n /**\n * This will be `true` if it has a rowIndex assigned, otherwise `false`.\n */\n this.displayed = false;\n /** The row top position in pixels. */\n this.rowTop = null;\n /** The top pixel for this row last time, makes sense if data set was ordered or filtered,\n * it is used so new rows can animate in from their old position. */\n this.oldRowTop = null;\n /** `true` by default - can be overridden via gridOptions.isRowSelectable(rowNode) */\n this.selectable = true;\n /** Used by sorting service - to give deterministic sort to groups. Previously we\n * just id for this, however id is a string and had slower sorting compared to numbers. */\n this.__objectId = RowNode.OBJECT_ID_SEQUENCE++;\n /** When one or more Columns are using autoHeight, this keeps track of height of each autoHeight Cell,\n * indexed by the Column ID. */\n this.__autoHeights = {};\n /** `true` when nodes with the same id are being removed and added as part of the same batch transaction */\n this.alreadyRendered = false;\n this.highlighted = null;\n this.selected = false;\n this.beans = beans;\n }\n /** Replaces the data on the `rowNode`. When complete, the grid will refresh the the entire rendered row if it is showing. */\n RowNode.prototype.setData = function (data) {\n this.setDataCommon(data, false);\n };\n // similar to setRowData, however it is expected that the data is the same data item. this\n // is intended to be used with Redux type stores, where the whole data can be changed. we are\n // guaranteed that the data is the same entity (so grid doesn't need to worry about the id of the\n // underlying data changing, hence doesn't need to worry about selection). the grid, upon receiving\n // dataChanged event, will refresh the cells rather than rip them all out (so user can show transitions).\n RowNode.prototype.updateData = function (data) {\n this.setDataCommon(data, true);\n };\n RowNode.prototype.setDataCommon = function (data, update) {\n var oldData = this.data;\n this.data = data;\n this.beans.valueCache.onDataChanged();\n this.updateDataOnDetailNode();\n this.checkRowSelectable();\n var event = this.createDataChangedEvent(data, oldData, update);\n this.dispatchLocalEvent(event);\n };\n // when we are doing master / detail, the detail node is lazy created, but then kept around.\n // so if we show / hide the detail, the same detail rowNode is used. so we need to keep the data\n // in sync, otherwise expand/collapse of the detail would still show the old values.\n RowNode.prototype.updateDataOnDetailNode = function () {\n if (this.detailNode) {\n this.detailNode.data = this.data;\n }\n };\n RowNode.prototype.createDataChangedEvent = function (newData, oldData, update) {\n return {\n type: RowNode.EVENT_DATA_CHANGED,\n node: this,\n oldData: oldData,\n newData: newData,\n update: update\n };\n };\n RowNode.prototype.createLocalRowEvent = function (type) {\n return {\n type: type,\n node: this\n };\n };\n RowNode.prototype.getRowIndexString = function () {\n if (this.rowPinned === Constants.PINNED_TOP) {\n return 't-' + this.rowIndex;\n }\n if (this.rowPinned === Constants.PINNED_BOTTOM) {\n return 'b-' + this.rowIndex;\n }\n return this.rowIndex.toString();\n };\n RowNode.prototype.createDaemonNode = function () {\n var oldNode = new RowNode(this.beans);\n // just copy the id and data, this is enough for the node to be used\n // in the selection controller (the selection controller is the only\n // place where daemon nodes can live).\n oldNode.id = this.id;\n oldNode.data = this.data;\n oldNode.daemon = true;\n oldNode.selected = this.selected;\n oldNode.level = this.level;\n return oldNode;\n };\n RowNode.prototype.setDataAndId = function (data, id) {\n var oldNode = exists(this.id) ? this.createDaemonNode() : null;\n var oldData = this.data;\n this.data = data;\n this.updateDataOnDetailNode();\n this.setId(id);\n this.beans.selectionService.syncInRowNode(this, oldNode);\n this.checkRowSelectable();\n var event = this.createDataChangedEvent(data, oldData, false);\n this.dispatchLocalEvent(event);\n };\n RowNode.prototype.checkRowSelectable = function () {\n var isRowSelectableFunc = this.beans.gridOptionsWrapper.getIsRowSelectableFunc();\n this.setRowSelectable(isRowSelectableFunc ? isRowSelectableFunc(this) : true);\n };\n RowNode.prototype.setRowSelectable = function (newVal) {\n if (this.selectable !== newVal) {\n this.selectable = newVal;\n if (this.eventService) {\n this.eventService.dispatchEvent(this.createLocalRowEvent(RowNode.EVENT_SELECTABLE_CHANGED));\n }\n }\n };\n RowNode.prototype.setId = function (id) {\n // see if user is providing the id's\n var getRowNodeId = this.beans.gridOptionsWrapper.getRowNodeIdFunc();\n if (getRowNodeId) {\n // if user is providing the id's, then we set the id only after the data has been set.\n // this is important for virtual pagination and viewport, where empty rows exist.\n if (this.data) {\n this.id = getRowNodeId(this.data);\n // make sure id provided doesn't start with 'row-group-' as this is reserved. also check that\n // it has 'startsWith' in case the user provided a number.\n if (this.id && typeof this.id === 'string' && startsWith(this.id, RowNode.ID_PREFIX_ROW_GROUP)) {\n console.error(\"AG Grid: Row ID's cannot start with \" + RowNode.ID_PREFIX_ROW_GROUP + \", this is a reserved prefix for AG Grid's row grouping feature.\");\n }\n // force id to be a string\n if (this.id && typeof this.id !== 'string') {\n this.id = '' + this.id;\n }\n }\n else {\n // this can happen if user has set blank into the rowNode after the row previously\n // having data. this happens in virtual page row model, when data is delete and\n // the page is refreshed.\n this.id = undefined;\n }\n }\n else {\n this.id = id;\n }\n };\n RowNode.prototype.isPixelInRange = function (pixel) {\n if (!exists(this.rowTop) || !exists(this.rowHeight)) {\n return false;\n }\n return pixel >= this.rowTop && pixel < (this.rowTop + this.rowHeight);\n };\n RowNode.prototype.setFirstChild = function (firstChild) {\n if (this.firstChild === firstChild) {\n return;\n }\n this.firstChild = firstChild;\n if (this.eventService) {\n this.eventService.dispatchEvent(this.createLocalRowEvent(RowNode.EVENT_FIRST_CHILD_CHANGED));\n }\n };\n RowNode.prototype.setLastChild = function (lastChild) {\n if (this.lastChild === lastChild) {\n return;\n }\n this.lastChild = lastChild;\n if (this.eventService) {\n this.eventService.dispatchEvent(this.createLocalRowEvent(RowNode.EVENT_LAST_CHILD_CHANGED));\n }\n };\n RowNode.prototype.setChildIndex = function (childIndex) {\n if (this.childIndex === childIndex) {\n return;\n }\n this.childIndex = childIndex;\n if (this.eventService) {\n this.eventService.dispatchEvent(this.createLocalRowEvent(RowNode.EVENT_CHILD_INDEX_CHANGED));\n }\n };\n RowNode.prototype.setRowTop = function (rowTop) {\n this.oldRowTop = this.rowTop;\n if (this.rowTop === rowTop) {\n return;\n }\n this.rowTop = rowTop;\n if (this.eventService) {\n this.eventService.dispatchEvent(this.createLocalRowEvent(RowNode.EVENT_TOP_CHANGED));\n }\n this.setDisplayed(rowTop !== null);\n };\n RowNode.prototype.clearRowTopAndRowIndex = function () {\n this.oldRowTop = null;\n this.setRowTop(null);\n this.setRowIndex(null);\n };\n RowNode.prototype.setDisplayed = function (displayed) {\n if (this.displayed === displayed) {\n return;\n }\n this.displayed = displayed;\n if (this.eventService) {\n this.eventService.dispatchEvent(this.createLocalRowEvent(RowNode.EVENT_DISPLAYED_CHANGED));\n }\n };\n RowNode.prototype.setDragging = function (dragging) {\n if (this.dragging === dragging) {\n return;\n }\n this.dragging = dragging;\n if (this.eventService) {\n this.eventService.dispatchEvent(this.createLocalRowEvent(RowNode.EVENT_DRAGGING_CHANGED));\n }\n };\n RowNode.prototype.setHighlighted = function (highlighted) {\n if (highlighted === this.highlighted) {\n return;\n }\n this.highlighted = highlighted;\n if (this.eventService) {\n this.eventService.dispatchEvent(this.createLocalRowEvent(RowNode.EVENT_HIGHLIGHT_CHANGED));\n }\n };\n RowNode.prototype.setAllChildrenCount = function (allChildrenCount) {\n if (this.allChildrenCount === allChildrenCount) {\n return;\n }\n this.allChildrenCount = allChildrenCount;\n if (this.eventService) {\n this.eventService.dispatchEvent(this.createLocalRowEvent(RowNode.EVENT_ALL_CHILDREN_COUNT_CHANGED));\n }\n };\n RowNode.prototype.setMaster = function (master) {\n if (this.master === master) {\n return;\n }\n // if changing AWAY from master, then unexpand, otherwise\n // next time it's shown it is expanded again\n if (this.master && !master) {\n this.expanded = false;\n }\n this.master = master;\n if (this.eventService) {\n this.eventService.dispatchEvent(this.createLocalRowEvent(RowNode.EVENT_MASTER_CHANGED));\n }\n };\n /**\n * Sets the row height.\n * Call if you want to change the height initially assigned to the row.\n * After calling, you must call `api.onRowHeightChanged()` so the grid knows it needs to work out the placement of the rows. */\n RowNode.prototype.setRowHeight = function (rowHeight, estimated) {\n if (estimated === void 0) { estimated = false; }\n this.rowHeight = rowHeight;\n this.rowHeightEstimated = estimated;\n if (this.eventService) {\n this.eventService.dispatchEvent(this.createLocalRowEvent(RowNode.EVENT_HEIGHT_CHANGED));\n }\n };\n RowNode.prototype.setRowAutoHeight = function (cellHeight, column) {\n if (!this.__autoHeights) {\n this.__autoHeights = {};\n }\n var autoHeights = this.__autoHeights;\n autoHeights[column.getId()] = cellHeight;\n if (cellHeight != null) {\n if (this.checkAutoHeightsDebounced == null) {\n this.checkAutoHeightsDebounced = debounce(this.checkAutoHeights.bind(this), 1);\n }\n this.checkAutoHeightsDebounced();\n }\n };\n RowNode.prototype.checkAutoHeights = function () {\n var notAllPresent = false;\n var nonePresent = true;\n var newRowHeight = 0;\n var autoHeights = this.__autoHeights;\n if (autoHeights == null) {\n return;\n }\n var displayedAutoHeightCols = this.beans.columnModel.getAllDisplayedAutoHeightCols();\n displayedAutoHeightCols.forEach(function (col) {\n var cellHeight = autoHeights[col.getId()];\n if (cellHeight == null) {\n notAllPresent = true;\n return;\n }\n nonePresent = false;\n if (cellHeight > newRowHeight) {\n newRowHeight = cellHeight;\n }\n });\n if (notAllPresent) {\n return;\n }\n // we take min of 10, so we don't adjust for empty rows. if <10, we put to default.\n // this prevents the row starting very small when waiting for async components, \n // which would then mean the grid squashes in far to many rows (as small heights\n // means more rows fit in) which looks crap. so best ignore small values and assume \n // we are still waiting for values to render.\n if (nonePresent || newRowHeight < 10) {\n newRowHeight = this.beans.gridOptionsWrapper.getRowHeightForNode(this).height;\n }\n if (newRowHeight == this.rowHeight) {\n return;\n }\n this.setRowHeight(newRowHeight);\n var rowModel = this.beans.rowModel;\n rowModel.onRowHeightChanged && rowModel.onRowHeightChanged();\n };\n RowNode.prototype.setRowIndex = function (rowIndex) {\n if (this.rowIndex === rowIndex) {\n return;\n }\n this.rowIndex = rowIndex;\n if (this.eventService) {\n this.eventService.dispatchEvent(this.createLocalRowEvent(RowNode.EVENT_ROW_INDEX_CHANGED));\n }\n };\n RowNode.prototype.setUiLevel = function (uiLevel) {\n if (this.uiLevel === uiLevel) {\n return;\n }\n this.uiLevel = uiLevel;\n if (this.eventService) {\n this.eventService.dispatchEvent(this.createLocalRowEvent(RowNode.EVENT_UI_LEVEL_CHANGED));\n }\n };\n RowNode.prototype.setExpanded = function (expanded) {\n if (this.expanded === expanded) {\n return;\n }\n this.expanded = expanded;\n if (this.eventService) {\n this.eventService.dispatchEvent(this.createLocalRowEvent(RowNode.EVENT_EXPANDED_CHANGED));\n }\n var event = assign({}, this.createGlobalRowEvent(Events.EVENT_ROW_GROUP_OPENED), {\n expanded: expanded\n });\n this.beans.rowNodeEventThrottle.dispatchExpanded(event);\n // when using footers we need to refresh the group row, as the aggregation\n // values jump between group and footer\n if (this.beans.gridOptionsWrapper.isGroupIncludeFooter()) {\n this.beans.rowRenderer.refreshCells({ rowNodes: [this] });\n }\n };\n RowNode.prototype.createGlobalRowEvent = function (type) {\n return {\n type: type,\n node: this,\n data: this.data,\n rowIndex: this.rowIndex,\n rowPinned: this.rowPinned,\n context: this.beans.gridOptionsWrapper.getContext(),\n api: this.beans.gridOptionsWrapper.getApi(),\n columnApi: this.beans.gridOptionsWrapper.getColumnApi()\n };\n };\n RowNode.prototype.dispatchLocalEvent = function (event) {\n if (this.eventService) {\n this.eventService.dispatchEvent(event);\n }\n };\n // we also allow editing the value via the editors. when it is done via\n // the editors, no 'cell changed' event gets fired, as it's assumed that\n // the cell knows about the change given it's in charge of the editing.\n // this method is for the client to call, so the cell listens for the change\n // event, and also flashes the cell when the change occurs.\n /** Replaces the value on the `rowNode` for the specified column. When complete, the grid will refresh the rendered cell on the required row only. */\n RowNode.prototype.setDataValue = function (colKey, newValue, eventSource) {\n var column = this.beans.columnModel.getPrimaryColumn(colKey);\n var oldValue = this.beans.valueService.getValue(column, this);\n this.beans.valueService.setValue(this, column, newValue, eventSource);\n this.dispatchCellChangedEvent(column, newValue, oldValue);\n };\n RowNode.prototype.setGroupValue = function (colKey, newValue) {\n var column = this.beans.columnModel.getGridColumn(colKey);\n if (missing(this.groupData)) {\n this.groupData = {};\n }\n var columnId = column.getColId();\n var oldValue = this.groupData[columnId];\n if (oldValue === newValue) {\n return;\n }\n this.groupData[columnId] = newValue;\n this.dispatchCellChangedEvent(column, newValue, oldValue);\n };\n // sets the data for an aggregation\n RowNode.prototype.setAggData = function (newAggData) {\n var _this = this;\n // find out all keys that could potentially change\n var colIds = getAllKeysInObjects([this.aggData, newAggData]);\n var oldAggData = this.aggData;\n this.aggData = newAggData;\n // if no event service, nobody has registered for events, so no need fire event\n if (this.eventService) {\n colIds.forEach(function (colId) {\n var column = _this.beans.columnModel.getGridColumn(colId);\n var value = _this.aggData ? _this.aggData[colId] : undefined;\n var oldValue = oldAggData ? oldAggData[colId] : undefined;\n _this.dispatchCellChangedEvent(column, value, oldValue);\n });\n }\n };\n RowNode.prototype.updateHasChildren = function () {\n // we need to return true when this.group=true, as this is used by server side row model\n // (as children are lazy loaded and stored in a cache anyway). otherwise we return true\n // if children exist.\n var newValue = (this.group && !this.footer) || (this.childrenAfterGroup && this.childrenAfterGroup.length > 0);\n if (newValue !== this.__hasChildren) {\n this.__hasChildren = !!newValue;\n if (this.eventService) {\n this.eventService.dispatchEvent(this.createLocalRowEvent(RowNode.EVENT_HAS_CHILDREN_CHANGED));\n }\n }\n };\n RowNode.prototype.hasChildren = function () {\n if (this.__hasChildren == null) {\n this.updateHasChildren();\n }\n return this.__hasChildren;\n };\n RowNode.prototype.isEmptyRowGroupNode = function () {\n return this.group && missingOrEmpty(this.childrenAfterGroup);\n };\n RowNode.prototype.dispatchCellChangedEvent = function (column, newValue, oldValue) {\n var cellChangedEvent = {\n type: RowNode.EVENT_CELL_CHANGED,\n node: this,\n column: column,\n newValue: newValue,\n oldValue: oldValue\n };\n this.dispatchLocalEvent(cellChangedEvent);\n };\n /**\n * The first time `quickFilter` runs, the grid creates a one-off string representation of the row.\n * This string is then used for the quick filter instead of hitting each column separately.\n * When you edit, using grid editing, this string gets cleared down.\n * However if you edit without using grid editing, you will need to clear this string down for the row to be updated with the new values.\n * Otherwise new values will not work with the `quickFilter`. */\n RowNode.prototype.resetQuickFilterAggregateText = function () {\n this.quickFilterAggregateText = null;\n };\n RowNode.prototype.isExpandable = function () {\n return (this.hasChildren() && !this.footer) || this.master ? true : false;\n };\n /** Returns:\n * - `true` if node is selected,\n * - `false` if the node isn't selected\n * - `undefined` if it's partially selected (group where not all children are selected). */\n RowNode.prototype.isSelected = function () {\n // for footers, we just return what our sibling selected state is, as cannot select a footer\n if (this.footer) {\n return this.sibling.isSelected();\n }\n return this.selected;\n };\n /** Perform a depth-first search of this node and its children. */\n RowNode.prototype.depthFirstSearch = function (callback) {\n if (this.childrenAfterGroup) {\n this.childrenAfterGroup.forEach(function (child) { return child.depthFirstSearch(callback); });\n }\n callback(this);\n };\n // + rowController.updateGroupsInSelection()\n // + selectionController.calculatedSelectedForAllGroupNodes()\n RowNode.prototype.calculateSelectedFromChildren = function () {\n var atLeastOneSelected = false;\n var atLeastOneDeSelected = false;\n var atLeastOneMixed = false;\n var newSelectedValue;\n if (this.childrenAfterGroup) {\n for (var i = 0; i < this.childrenAfterGroup.length; i++) {\n var child = this.childrenAfterGroup[i];\n // skip non-selectable nodes to prevent inconsistent selection values\n if (!child.selectable) {\n continue;\n }\n var childState = child.isSelected();\n switch (childState) {\n case true:\n atLeastOneSelected = true;\n break;\n case false:\n atLeastOneDeSelected = true;\n break;\n default:\n atLeastOneMixed = true;\n break;\n }\n }\n }\n if (atLeastOneMixed) {\n newSelectedValue = undefined;\n }\n else if (atLeastOneSelected && !atLeastOneDeSelected) {\n newSelectedValue = true;\n }\n else if (!atLeastOneSelected && atLeastOneDeSelected) {\n newSelectedValue = false;\n }\n else {\n newSelectedValue = undefined;\n }\n this.selectThisNode(newSelectedValue);\n };\n RowNode.prototype.setSelectedInitialValue = function (selected) {\n this.selected = selected;\n };\n /**\n * Select (or deselect) the node.\n * @param newValue -`true` for selection, `false` for deselection.\n * @param clearSelection - If selecting, then passing `true` for `clearSelection` will select the node exclusively (i.e. NOT do multi select). If doing deselection, `clearSelection` has no impact.\n * @param suppressFinishActions\n */\n RowNode.prototype.setSelected = function (newValue, clearSelection, suppressFinishActions) {\n if (clearSelection === void 0) { clearSelection = false; }\n if (suppressFinishActions === void 0) { suppressFinishActions = false; }\n this.setSelectedParams({\n newValue: newValue,\n clearSelection: clearSelection,\n suppressFinishActions: suppressFinishActions,\n rangeSelect: false\n });\n };\n RowNode.prototype.isRowPinned = function () {\n return this.rowPinned === Constants.PINNED_TOP || this.rowPinned === Constants.PINNED_BOTTOM;\n };\n // to make calling code more readable, this is the same method as setSelected except it takes names parameters\n RowNode.prototype.setSelectedParams = function (params) {\n var groupSelectsChildren = this.beans.gridOptionsWrapper.isGroupSelectsChildren();\n var newValue = params.newValue === true;\n var clearSelection = params.clearSelection === true;\n var suppressFinishActions = params.suppressFinishActions === true;\n var rangeSelect = params.rangeSelect === true;\n // groupSelectsFiltered only makes sense when group selects children\n var groupSelectsFiltered = groupSelectsChildren && (params.groupSelectsFiltered === true);\n if (this.id === undefined) {\n console.warn('AG Grid: cannot select node until id for node is known');\n return 0;\n }\n if (this.rowPinned) {\n console.warn('AG Grid: cannot select pinned rows');\n return 0;\n }\n // if we are a footer, we don't do selection, just pass the info\n // to the sibling (the parent of the group)\n if (this.footer) {\n return this.sibling.setSelectedParams(params);\n }\n if (rangeSelect && this.beans.selectionService.getLastSelectedNode()) {\n var newRowClicked = this.beans.selectionService.getLastSelectedNode() !== this;\n var allowMultiSelect = this.beans.gridOptionsWrapper.isRowSelectionMulti();\n if (newRowClicked && allowMultiSelect) {\n var nodesChanged = this.doRowRangeSelection(params.newValue);\n this.beans.selectionService.setLastSelectedNode(this);\n return nodesChanged;\n }\n }\n var updatedCount = 0;\n // when groupSelectsFiltered, then this node may end up intermediate despite\n // trying to set it to true / false. this group will be calculated further on\n // down when we call calculatedSelectedForAllGroupNodes(). we need to skip it\n // here, otherwise the updatedCount would include it.\n var skipThisNode = groupSelectsFiltered && this.group;\n if (!skipThisNode) {\n var thisNodeWasSelected = this.selectThisNode(newValue);\n if (thisNodeWasSelected) {\n updatedCount++;\n }\n }\n if (groupSelectsChildren && this.group) {\n updatedCount += this.selectChildNodes(newValue, groupSelectsFiltered);\n }\n // clear other nodes if not doing multi select\n if (!suppressFinishActions) {\n var clearOtherNodes = newValue && (clearSelection || !this.beans.gridOptionsWrapper.isRowSelectionMulti());\n if (clearOtherNodes) {\n updatedCount += this.beans.selectionService.clearOtherNodes(this);\n }\n // only if we selected something, then update groups and fire events\n if (updatedCount > 0) {\n this.beans.selectionService.updateGroupsFromChildrenSelections();\n // this is the very end of the 'action node', so we are finished all the updates,\n // include any parent / child changes that this method caused\n var event_1 = {\n type: Events.EVENT_SELECTION_CHANGED,\n api: this.beans.gridApi,\n columnApi: this.beans.columnApi\n };\n this.beans.eventService.dispatchEvent(event_1);\n }\n // so if user next does shift-select, we know where to start the selection from\n if (newValue) {\n this.beans.selectionService.setLastSelectedNode(this);\n }\n }\n return updatedCount;\n };\n // selects all rows between this node and the last selected node (or the top if this is the first selection).\n // not to be mixed up with 'cell range selection' where you drag the mouse, this is row range selection, by\n // holding down 'shift'.\n RowNode.prototype.doRowRangeSelection = function (value) {\n var _this = this;\n if (value === void 0) { value = true; }\n var groupsSelectChildren = this.beans.gridOptionsWrapper.isGroupSelectsChildren();\n var lastSelectedNode = this.beans.selectionService.getLastSelectedNode();\n var nodesToSelect = this.beans.rowModel.getNodesInRangeForSelection(this, lastSelectedNode);\n var updatedCount = 0;\n nodesToSelect.forEach(function (rowNode) {\n if (rowNode.group && groupsSelectChildren || (value === false && _this === rowNode)) {\n return;\n }\n var nodeWasSelected = rowNode.selectThisNode(value);\n if (nodeWasSelected) {\n updatedCount++;\n }\n });\n this.beans.selectionService.updateGroupsFromChildrenSelections();\n var event = {\n type: Events.EVENT_SELECTION_CHANGED,\n api: this.beans.gridApi,\n columnApi: this.beans.columnApi\n };\n this.beans.eventService.dispatchEvent(event);\n return updatedCount;\n };\n RowNode.prototype.isParentOfNode = function (potentialParent) {\n var parentNode = this.parent;\n while (parentNode) {\n if (parentNode === potentialParent) {\n return true;\n }\n parentNode = parentNode.parent;\n }\n return false;\n };\n RowNode.prototype.selectThisNode = function (newValue) {\n // we only check selectable when newValue=true (ie selecting) to allow unselecting values,\n // as selectable is dynamic, need a way to unselect rows when selectable becomes false.\n var selectionNotAllowed = !this.selectable && newValue;\n var selectionNotChanged = this.selected === newValue;\n if (selectionNotAllowed || selectionNotChanged) {\n return false;\n }\n this.selected = newValue;\n if (this.eventService) {\n this.dispatchLocalEvent(this.createLocalRowEvent(RowNode.EVENT_ROW_SELECTED));\n }\n var event = this.createGlobalRowEvent(Events.EVENT_ROW_SELECTED);\n this.beans.eventService.dispatchEvent(event);\n return true;\n };\n RowNode.prototype.selectChildNodes = function (newValue, groupSelectsFiltered) {\n var children = groupSelectsFiltered ? this.childrenAfterFilter : this.childrenAfterGroup;\n if (missing(children)) {\n return 0;\n }\n var updatedCount = 0;\n for (var i = 0; i < children.length; i++) {\n updatedCount += children[i].setSelectedParams({\n newValue: newValue,\n clearSelection: false,\n suppressFinishActions: true,\n groupSelectsFiltered: groupSelectsFiltered\n });\n }\n return updatedCount;\n };\n /** Add an event listener. */\n RowNode.prototype.addEventListener = function (eventType, listener) {\n if (!this.eventService) {\n this.eventService = new EventService();\n }\n this.eventService.addEventListener(eventType, listener);\n };\n /** Remove event listener. */\n RowNode.prototype.removeEventListener = function (eventType, listener) {\n if (!this.eventService) {\n return;\n }\n this.eventService.removeEventListener(eventType, listener);\n if (this.eventService.noRegisteredListenersExist()) {\n this.eventService = null;\n }\n };\n RowNode.prototype.onMouseEnter = function () {\n this.dispatchLocalEvent(this.createLocalRowEvent(RowNode.EVENT_MOUSE_ENTER));\n };\n RowNode.prototype.onMouseLeave = function () {\n this.dispatchLocalEvent(this.createLocalRowEvent(RowNode.EVENT_MOUSE_LEAVE));\n };\n RowNode.prototype.getFirstChildOfFirstChild = function (rowGroupColumn) {\n var currentRowNode = this;\n var isCandidate = true;\n var foundFirstChildPath = false;\n var nodeToSwapIn = null;\n // if we are hiding groups, then if we are the first child, of the first child,\n // all the way up to the column we are interested in, then we show the group cell.\n while (isCandidate && !foundFirstChildPath) {\n var parentRowNode = currentRowNode.parent;\n var firstChild = exists(parentRowNode) && currentRowNode.firstChild;\n if (firstChild) {\n if (parentRowNode.rowGroupColumn === rowGroupColumn) {\n foundFirstChildPath = true;\n nodeToSwapIn = parentRowNode;\n }\n }\n else {\n isCandidate = false;\n }\n currentRowNode = parentRowNode;\n }\n return foundFirstChildPath ? nodeToSwapIn : null;\n };\n RowNode.prototype.isFullWidthCell = function () {\n var isFullWidthCellFunc = this.beans.gridOptionsWrapper.getIsFullWidthCellFunc();\n return isFullWidthCellFunc ? isFullWidthCellFunc(this) : false;\n };\n /**\n * Returns the route of the row node. If the Row Node is a group, it returns the route to that Row Node.\n * If the Row Node is not a group, it returns `undefined`.\n */\n RowNode.prototype.getRoute = function () {\n if (this.key == null) {\n return;\n }\n var res = [];\n var pointer = this;\n while (pointer.key != null) {\n res.push(pointer.key);\n pointer = pointer.parent;\n }\n return res.reverse();\n };\n RowNode.ID_PREFIX_ROW_GROUP = 'row-group-';\n RowNode.ID_PREFIX_TOP_PINNED = 't-';\n RowNode.ID_PREFIX_BOTTOM_PINNED = 'b-';\n RowNode.OBJECT_ID_SEQUENCE = 0;\n RowNode.EVENT_ROW_SELECTED = 'rowSelected';\n RowNode.EVENT_DATA_CHANGED = 'dataChanged';\n RowNode.EVENT_CELL_CHANGED = 'cellChanged';\n RowNode.EVENT_ALL_CHILDREN_COUNT_CHANGED = 'allChildrenCountChanged';\n RowNode.EVENT_MASTER_CHANGED = 'masterChanged';\n RowNode.EVENT_MOUSE_ENTER = 'mouseEnter';\n RowNode.EVENT_MOUSE_LEAVE = 'mouseLeave';\n RowNode.EVENT_HEIGHT_CHANGED = 'heightChanged';\n RowNode.EVENT_TOP_CHANGED = 'topChanged';\n RowNode.EVENT_DISPLAYED_CHANGED = 'displayedChanged';\n RowNode.EVENT_FIRST_CHILD_CHANGED = 'firstChildChanged';\n RowNode.EVENT_LAST_CHILD_CHANGED = 'lastChildChanged';\n RowNode.EVENT_CHILD_INDEX_CHANGED = 'childIndexChanged';\n RowNode.EVENT_ROW_INDEX_CHANGED = 'rowIndexChanged';\n RowNode.EVENT_EXPANDED_CHANGED = 'expandedChanged';\n RowNode.EVENT_HAS_CHILDREN_CHANGED = 'hasChildrenChanged';\n RowNode.EVENT_SELECTABLE_CHANGED = 'selectableChanged';\n RowNode.EVENT_UI_LEVEL_CHANGED = 'uiLevelChanged';\n RowNode.EVENT_HIGHLIGHT_CHANGED = 'rowHighlightChanged';\n RowNode.EVENT_DRAGGING_CHANGED = 'draggingChanged';\n return RowNode;\n}());\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / React / AngularJS / Web Components\n * @version v26.1.0\n * @link http://www.ag-grid.com/\n * @license MIT\n */\nvar __extends$u = (undefined && undefined.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate$r = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n 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 CheckboxSelectionComponent = /** @class */ (function (_super) {\n __extends$u(CheckboxSelectionComponent, _super);\n function CheckboxSelectionComponent() {\n return _super.call(this, /* html*/ \"\\n \") || this;\n }\n CheckboxSelectionComponent.prototype.postConstruct = function () {\n this.eCheckbox.setPassive(true);\n };\n CheckboxSelectionComponent.prototype.getCheckboxId = function () {\n return this.eCheckbox.getInputElement().id;\n };\n CheckboxSelectionComponent.prototype.onDataChanged = function () {\n // when rows are loaded for the second time, this can impact the selection, as a row\n // could be loaded as already selected (if user scrolls down, and then up again).\n this.onSelectionChanged();\n };\n CheckboxSelectionComponent.prototype.onSelectableChanged = function () {\n this.showOrHideSelect();\n };\n CheckboxSelectionComponent.prototype.onSelectionChanged = function () {\n var translate = this.gridOptionsWrapper.getLocaleTextFunc();\n var state = this.rowNode.isSelected();\n var stateName = state === undefined\n ? translate('ariaIndeterminate', 'indeterminate')\n : (state === true\n ? translate('ariaChecked', 'checked')\n : translate('ariaUnchecked', 'unchecked'));\n var ariaLabel = translate('ariaRowToggleSelection', 'Press Space to toggle row selection');\n this.eCheckbox.setValue(state, true);\n this.eCheckbox.setInputAriaLabel(ariaLabel + \" (\" + stateName + \")\");\n };\n CheckboxSelectionComponent.prototype.onCheckedClicked = function (event) {\n var groupSelectsFiltered = this.gridOptionsWrapper.isGroupSelectsFiltered();\n var updatedCount = this.rowNode.setSelectedParams({ newValue: false, rangeSelect: event.shiftKey, groupSelectsFiltered: groupSelectsFiltered });\n return updatedCount;\n };\n CheckboxSelectionComponent.prototype.onUncheckedClicked = function (event) {\n var groupSelectsFiltered = this.gridOptionsWrapper.isGroupSelectsFiltered();\n var updatedCount = this.rowNode.setSelectedParams({ newValue: true, rangeSelect: event.shiftKey, groupSelectsFiltered: groupSelectsFiltered });\n return updatedCount;\n };\n CheckboxSelectionComponent.prototype.init = function (params) {\n var _this = this;\n this.rowNode = params.rowNode;\n this.column = params.column;\n this.onSelectionChanged();\n // we don't want the row clicked event to fire when selecting the checkbox, otherwise the row\n // would possibly get selected twice\n this.addGuiEventListener('click', function (event) { return stopPropagationForAgGrid(event); });\n // likewise we don't want double click on this icon to open a group\n this.addGuiEventListener('dblclick', function (event) { return stopPropagationForAgGrid(event); });\n this.addManagedListener(this.eCheckbox.getInputElement(), 'click', function (event) {\n var isSelected = _this.eCheckbox.getValue();\n var previousValue = _this.eCheckbox.getPreviousValue();\n if (previousValue === undefined) { // indeterminate\n var result = _this.onUncheckedClicked(event || {});\n if (result === 0) {\n _this.onCheckedClicked(event);\n }\n }\n else if (isSelected) {\n _this.onCheckedClicked(event);\n }\n else {\n _this.onUncheckedClicked(event || {});\n }\n });\n this.addManagedListener(this.rowNode, RowNode.EVENT_ROW_SELECTED, this.onSelectionChanged.bind(this));\n this.addManagedListener(this.rowNode, RowNode.EVENT_DATA_CHANGED, this.onDataChanged.bind(this));\n this.addManagedListener(this.rowNode, RowNode.EVENT_SELECTABLE_CHANGED, this.onSelectableChanged.bind(this));\n var isRowSelectableFunc = this.gridOptionsWrapper.getIsRowSelectableFunc();\n var checkboxVisibleIsDynamic = isRowSelectableFunc || this.checkboxCallbackExists();\n if (checkboxVisibleIsDynamic) {\n var showOrHideSelectListener = this.showOrHideSelect.bind(this);\n this.addManagedListener(this.eventService, Events.EVENT_DISPLAYED_COLUMNS_CHANGED, showOrHideSelectListener);\n this.addManagedListener(this.rowNode, RowNode.EVENT_DATA_CHANGED, showOrHideSelectListener);\n this.addManagedListener(this.rowNode, RowNode.EVENT_CELL_CHANGED, showOrHideSelectListener);\n this.showOrHideSelect();\n }\n this.eCheckbox.getInputElement().setAttribute('tabindex', '-1');\n };\n CheckboxSelectionComponent.prototype.showOrHideSelect = function () {\n // if the isRowSelectable() is not provided the row node is selectable by default\n var selectable = this.rowNode.selectable;\n // checkboxSelection callback is deemed a legacy solution however we will still consider it's result.\n // If selectable, then also check the colDef callback. if not selectable, this it short circuits - no need\n // to call the colDef callback.\n if (selectable && this.checkboxCallbackExists()) {\n selectable = this.column.isCellCheckboxSelection(this.rowNode);\n }\n // show checkbox if both conditions are true\n this.setVisible(selectable);\n };\n CheckboxSelectionComponent.prototype.checkboxCallbackExists = function () {\n // column will be missing if groupUseEntireRow=true\n var colDef = this.column ? this.column.getColDef() : null;\n return !!colDef && typeof colDef.checkboxSelection === 'function';\n };\n __decorate$r([\n RefSelector('eCheckbox')\n ], CheckboxSelectionComponent.prototype, \"eCheckbox\", void 0);\n __decorate$r([\n PostConstruct\n ], CheckboxSelectionComponent.prototype, \"postConstruct\", null);\n return CheckboxSelectionComponent;\n}(Component));\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / React / AngularJS / Web Components\n * @version v26.1.0\n * @link http://www.ag-grid.com/\n * @license MIT\n */\nvar __extends$v = (undefined && undefined.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate$s = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n 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(function (DragSourceType) {\n DragSourceType[DragSourceType[\"ToolPanel\"] = 0] = \"ToolPanel\";\n DragSourceType[DragSourceType[\"HeaderCell\"] = 1] = \"HeaderCell\";\n DragSourceType[DragSourceType[\"RowDrag\"] = 2] = \"RowDrag\";\n DragSourceType[DragSourceType[\"ChartPanel\"] = 3] = \"ChartPanel\";\n})(exports.DragSourceType || (exports.DragSourceType = {}));\n(function (VerticalDirection) {\n VerticalDirection[VerticalDirection[\"Up\"] = 0] = \"Up\";\n VerticalDirection[VerticalDirection[\"Down\"] = 1] = \"Down\";\n})(exports.VerticalDirection || (exports.VerticalDirection = {}));\n(function (HorizontalDirection) {\n HorizontalDirection[HorizontalDirection[\"Left\"] = 0] = \"Left\";\n HorizontalDirection[HorizontalDirection[\"Right\"] = 1] = \"Right\";\n})(exports.HorizontalDirection || (exports.HorizontalDirection = {}));\nvar DragAndDropService = /** @class */ (function (_super) {\n __extends$v(DragAndDropService, _super);\n function DragAndDropService() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.dragSourceAndParamsList = [];\n _this.dropTargets = [];\n return _this;\n }\n DragAndDropService_1 = DragAndDropService;\n DragAndDropService.prototype.init = function () {\n this.ePinnedIcon = createIcon('columnMovePin', this.gridOptionsWrapper, null);\n this.eHideIcon = createIcon('columnMoveHide', this.gridOptionsWrapper, null);\n this.eMoveIcon = createIcon('columnMoveMove', this.gridOptionsWrapper, null);\n this.eLeftIcon = createIcon('columnMoveLeft', this.gridOptionsWrapper, null);\n this.eRightIcon = createIcon('columnMoveRight', this.gridOptionsWrapper, null);\n this.eGroupIcon = createIcon('columnMoveGroup', this.gridOptionsWrapper, null);\n this.eAggregateIcon = createIcon('columnMoveValue', this.gridOptionsWrapper, null);\n this.ePivotIcon = createIcon('columnMovePivot', this.gridOptionsWrapper, null);\n this.eDropNotAllowedIcon = createIcon('dropNotAllowed', this.gridOptionsWrapper, null);\n };\n DragAndDropService.prototype.addDragSource = function (dragSource, allowTouch) {\n if (allowTouch === void 0) { allowTouch = false; }\n var params = {\n eElement: dragSource.eElement,\n dragStartPixels: dragSource.dragStartPixels,\n onDragStart: this.onDragStart.bind(this, dragSource),\n onDragStop: this.onDragStop.bind(this),\n onDragging: this.onDragging.bind(this)\n };\n this.dragSourceAndParamsList.push({ params: params, dragSource: dragSource });\n this.dragService.addDragSource(params, allowTouch);\n };\n DragAndDropService.prototype.removeDragSource = function (dragSource) {\n var sourceAndParams = find(this.dragSourceAndParamsList, function (item) { return item.dragSource === dragSource; });\n if (sourceAndParams) {\n this.dragService.removeDragSource(sourceAndParams.params);\n removeFromArray(this.dragSourceAndParamsList, sourceAndParams);\n }\n };\n DragAndDropService.prototype.clearDragSourceParamsList = function () {\n var _this = this;\n this.dragSourceAndParamsList.forEach(function (sourceAndParams) { return _this.dragService.removeDragSource(sourceAndParams.params); });\n this.dragSourceAndParamsList.length = 0;\n };\n DragAndDropService.prototype.nudge = function () {\n if (this.dragging) {\n this.onDragging(this.eventLastTime, true);\n }\n };\n DragAndDropService.prototype.onDragStart = function (dragSource, mouseEvent) {\n this.dragging = true;\n this.dragSource = dragSource;\n this.eventLastTime = mouseEvent;\n this.dragItem = this.dragSource.getDragItem();\n this.lastDropTarget = this.dragSource.dragSourceDropTarget;\n if (this.dragSource.onDragStarted) {\n this.dragSource.onDragStarted();\n }\n this.createGhost();\n };\n DragAndDropService.prototype.onDragStop = function (mouseEvent) {\n this.eventLastTime = null;\n this.dragging = false;\n if (this.dragSource.onDragStopped) {\n this.dragSource.onDragStopped();\n }\n if (this.lastDropTarget && this.lastDropTarget.onDragStop) {\n var draggingEvent = this.createDropTargetEvent(this.lastDropTarget, mouseEvent, null, null, false);\n this.lastDropTarget.onDragStop(draggingEvent);\n }\n this.lastDropTarget = null;\n this.dragItem = null;\n this.removeGhost();\n };\n DragAndDropService.prototype.onDragging = function (mouseEvent, fromNudge) {\n var _this = this;\n var hDirection = this.getHorizontalDirection(mouseEvent);\n var vDirection = this.getVerticalDirection(mouseEvent);\n this.eventLastTime = mouseEvent;\n this.positionGhost(mouseEvent);\n // check if mouseEvent intersects with any of the drop targets\n var validDropTargets = this.dropTargets.filter(function (target) { return _this.isMouseOnDropTarget(mouseEvent, target); });\n var len = validDropTargets.length;\n var dropTarget = null;\n if (len > 0) {\n dropTarget = len === 1\n ? validDropTargets[0]\n // the current mouse position could intersect with more than 1 element\n // if they are nested. In that case we need to get the most specific\n // container, which is the one that does not contain any other targets.\n : validDropTargets.reduce(function (prevTarget, currTarget) {\n if (!prevTarget) {\n return currTarget;\n }\n var prevContainer = prevTarget.getContainer();\n var currContainer = currTarget.getContainer();\n if (prevContainer.contains(currContainer)) {\n return currTarget;\n }\n return prevTarget;\n });\n }\n if (dropTarget !== this.lastDropTarget) {\n this.leaveLastTargetIfExists(mouseEvent, hDirection, vDirection, fromNudge);\n this.enterDragTargetIfExists(dropTarget, mouseEvent, hDirection, vDirection, fromNudge);\n this.lastDropTarget = dropTarget;\n }\n else if (dropTarget && dropTarget.onDragging) {\n var draggingEvent = this.createDropTargetEvent(dropTarget, mouseEvent, hDirection, vDirection, fromNudge);\n dropTarget.onDragging(draggingEvent);\n }\n };\n DragAndDropService.prototype.enterDragTargetIfExists = function (dropTarget, mouseEvent, hDirection, vDirection, fromNudge) {\n if (!dropTarget) {\n return;\n }\n if (dropTarget.onDragEnter) {\n var dragEnterEvent = this.createDropTargetEvent(dropTarget, mouseEvent, hDirection, vDirection, fromNudge);\n dropTarget.onDragEnter(dragEnterEvent);\n }\n this.setGhostIcon(dropTarget.getIconName ? dropTarget.getIconName() : null);\n };\n DragAndDropService.prototype.leaveLastTargetIfExists = function (mouseEvent, hDirection, vDirection, fromNudge) {\n if (!this.lastDropTarget) {\n return;\n }\n if (this.lastDropTarget.onDragLeave) {\n var dragLeaveEvent = this.createDropTargetEvent(this.lastDropTarget, mouseEvent, hDirection, vDirection, fromNudge);\n this.lastDropTarget.onDragLeave(dragLeaveEvent);\n }\n this.setGhostIcon(null);\n };\n DragAndDropService.prototype.getAllContainersFromDropTarget = function (dropTarget) {\n var secondaryContainers = dropTarget.getSecondaryContainers ? dropTarget.getSecondaryContainers() : null;\n var containers = [[dropTarget.getContainer()]];\n return secondaryContainers ? containers.concat(secondaryContainers) : containers;\n };\n DragAndDropService.prototype.allContainersIntersect = function (mouseEvent, containers) {\n for (var _i = 0, containers_1 = containers; _i < containers_1.length; _i++) {\n var container = containers_1[_i];\n var rect = container.getBoundingClientRect();\n // if element is not visible, then width and height are zero\n if (rect.width === 0 || rect.height === 0) {\n return false;\n }\n var horizontalFit = mouseEvent.clientX >= rect.left && mouseEvent.clientX < rect.right;\n var verticalFit = mouseEvent.clientY >= rect.top && mouseEvent.clientY < rect.bottom;\n if (!horizontalFit || !verticalFit) {\n return false;\n }\n }\n return true;\n };\n // checks if the mouse is on the drop target. it checks eContainer and eSecondaryContainers\n DragAndDropService.prototype.isMouseOnDropTarget = function (mouseEvent, dropTarget) {\n var allContainersFromDropTarget = this.getAllContainersFromDropTarget(dropTarget);\n var mouseOverTarget = false;\n for (var _i = 0, allContainersFromDropTarget_1 = allContainersFromDropTarget; _i < allContainersFromDropTarget_1.length; _i++) {\n var currentContainers = allContainersFromDropTarget_1[_i];\n if (this.allContainersIntersect(mouseEvent, currentContainers)) {\n mouseOverTarget = true;\n break;\n }\n }\n return mouseOverTarget && dropTarget.isInterestedIn(this.dragSource.type);\n };\n DragAndDropService.prototype.addDropTarget = function (dropTarget) {\n this.dropTargets.push(dropTarget);\n };\n DragAndDropService.prototype.removeDropTarget = function (dropTarget) {\n this.dropTargets = this.dropTargets.filter(function (target) { return target.getContainer() !== dropTarget.getContainer(); });\n };\n DragAndDropService.prototype.hasExternalDropZones = function () {\n return this.dropTargets.some(function (zones) { return zones.external; });\n };\n DragAndDropService.prototype.findExternalZone = function (params) {\n var externalTargets = this.dropTargets.filter(function (target) { return target.external; });\n return find(externalTargets, function (zone) { return zone.getContainer() === params.getContainer(); });\n };\n DragAndDropService.prototype.getHorizontalDirection = function (event) {\n var clientX = this.eventLastTime && this.eventLastTime.clientX;\n var eClientX = event.clientX;\n if (clientX === eClientX) {\n return null;\n }\n return clientX > eClientX ? exports.HorizontalDirection.Left : exports.HorizontalDirection.Right;\n };\n DragAndDropService.prototype.getVerticalDirection = function (event) {\n var clientY = this.eventLastTime && this.eventLastTime.clientY;\n var eClientY = event.clientY;\n if (clientY === eClientY) {\n return null;\n }\n return clientY > eClientY ? exports.VerticalDirection.Up : exports.VerticalDirection.Down;\n };\n DragAndDropService.prototype.createDropTargetEvent = function (dropTarget, event, hDirection, vDirection, fromNudge) {\n // localise x and y to the target\n var dropZoneTarget = dropTarget.getContainer();\n var rect = dropZoneTarget.getBoundingClientRect();\n var _a = this, api = _a.gridApi, columnApi = _a.columnApi, dragItem = _a.dragItem, dragSource = _a.dragSource;\n var x = event.clientX - rect.left;\n var y = event.clientY - rect.top;\n return { event: event, x: x, y: y, vDirection: vDirection, hDirection: hDirection, dragSource: dragSource, fromNudge: fromNudge, dragItem: dragItem, api: api, columnApi: columnApi, dropZoneTarget: dropZoneTarget };\n };\n DragAndDropService.prototype.positionGhost = function (event) {\n var ghost = this.eGhost;\n if (!ghost) {\n return;\n }\n var ghostRect = ghost.getBoundingClientRect();\n var ghostHeight = ghostRect.height;\n // for some reason, without the '-2', it still overlapped by 1 or 2 pixels, which\n // then brought in scrollbars to the browser. no idea why, but putting in -2 here\n // works around it which is good enough for me.\n var browserWidth = getBodyWidth() - 2;\n var browserHeight = getBodyHeight() - 2;\n var top = event.pageY - (ghostHeight / 2);\n var left = event.pageX - 10;\n var usrDocument = this.gridOptionsWrapper.getDocument();\n var windowScrollY = window.pageYOffset || usrDocument.documentElement.scrollTop;\n var windowScrollX = window.pageXOffset || usrDocument.documentElement.scrollLeft;\n // check ghost is not positioned outside of the browser\n if (browserWidth > 0 && ((left + ghost.clientWidth) > (browserWidth + windowScrollX))) {\n left = browserWidth + windowScrollX - ghost.clientWidth;\n }\n if (left < 0) {\n left = 0;\n }\n if (browserHeight > 0 && ((top + ghost.clientHeight) > (browserHeight + windowScrollY))) {\n top = browserHeight + windowScrollY - ghost.clientHeight;\n }\n if (top < 0) {\n top = 0;\n }\n ghost.style.left = left + \"px\";\n ghost.style.top = top + \"px\";\n };\n DragAndDropService.prototype.removeGhost = function () {\n if (this.eGhost && this.eGhostParent) {\n this.eGhostParent.removeChild(this.eGhost);\n }\n this.eGhost = null;\n };\n DragAndDropService.prototype.createGhost = function () {\n this.eGhost = loadTemplate(DragAndDropService_1.GHOST_TEMPLATE);\n var theme = this.environment.getTheme().theme;\n if (theme) {\n addCssClass(this.eGhost, theme);\n }\n this.eGhostIcon = this.eGhost.querySelector('.ag-dnd-ghost-icon');\n this.setGhostIcon(null);\n var eText = this.eGhost.querySelector('.ag-dnd-ghost-label');\n var dragItemName = this.dragSource.dragItemName;\n if (isFunction(dragItemName)) {\n dragItemName = dragItemName();\n }\n eText.innerHTML = escapeString(dragItemName) || '';\n this.eGhost.style.height = '25px';\n this.eGhost.style.top = '20px';\n this.eGhost.style.left = '20px';\n var usrDocument = this.gridOptionsWrapper.getDocument();\n var targetEl = usrDocument.fullscreenElement || usrDocument.querySelector('body');\n this.eGhostParent = targetEl;\n if (!this.eGhostParent) {\n console.warn('AG Grid: could not find document body, it is needed for dragging columns');\n }\n else {\n this.eGhostParent.appendChild(this.eGhost);\n }\n };\n DragAndDropService.prototype.setGhostIcon = function (iconName, shake) {\n if (shake === void 0) { shake = false; }\n clearElement(this.eGhostIcon);\n var eIcon = null;\n if (!iconName) {\n iconName = this.dragSource.defaultIconName || DragAndDropService_1.ICON_NOT_ALLOWED;\n }\n switch (iconName) {\n case DragAndDropService_1.ICON_PINNED:\n eIcon = this.ePinnedIcon;\n break;\n case DragAndDropService_1.ICON_MOVE:\n eIcon = this.eMoveIcon;\n break;\n case DragAndDropService_1.ICON_LEFT:\n eIcon = this.eLeftIcon;\n break;\n case DragAndDropService_1.ICON_RIGHT:\n eIcon = this.eRightIcon;\n break;\n case DragAndDropService_1.ICON_GROUP:\n eIcon = this.eGroupIcon;\n break;\n case DragAndDropService_1.ICON_AGGREGATE:\n eIcon = this.eAggregateIcon;\n break;\n case DragAndDropService_1.ICON_PIVOT:\n eIcon = this.ePivotIcon;\n break;\n case DragAndDropService_1.ICON_NOT_ALLOWED:\n eIcon = this.eDropNotAllowedIcon;\n break;\n case DragAndDropService_1.ICON_HIDE:\n eIcon = this.eHideIcon;\n break;\n }\n addOrRemoveCssClass(this.eGhostIcon, 'ag-shake-left-to-right', shake);\n if (eIcon === this.eHideIcon && this.gridOptionsWrapper.isSuppressDragLeaveHidesColumns()) {\n return;\n }\n if (eIcon) {\n this.eGhostIcon.appendChild(eIcon);\n }\n };\n var DragAndDropService_1;\n DragAndDropService.ICON_PINNED = 'pinned';\n DragAndDropService.ICON_MOVE = 'move';\n DragAndDropService.ICON_LEFT = 'left';\n DragAndDropService.ICON_RIGHT = 'right';\n DragAndDropService.ICON_GROUP = 'group';\n DragAndDropService.ICON_AGGREGATE = 'aggregate';\n DragAndDropService.ICON_PIVOT = 'pivot';\n DragAndDropService.ICON_NOT_ALLOWED = 'notAllowed';\n DragAndDropService.ICON_HIDE = 'hide';\n DragAndDropService.GHOST_TEMPLATE = \"\";\n __decorate$s([\n Autowired('dragService')\n ], DragAndDropService.prototype, \"dragService\", void 0);\n __decorate$s([\n Autowired('environment')\n ], DragAndDropService.prototype, \"environment\", void 0);\n __decorate$s([\n Autowired('columnApi')\n ], DragAndDropService.prototype, \"columnApi\", void 0);\n __decorate$s([\n Autowired('gridApi')\n ], DragAndDropService.prototype, \"gridApi\", void 0);\n __decorate$s([\n PostConstruct\n ], DragAndDropService.prototype, \"init\", null);\n __decorate$s([\n PreDestroy\n ], DragAndDropService.prototype, \"clearDragSourceParamsList\", null);\n DragAndDropService = DragAndDropService_1 = __decorate$s([\n Bean('dragAndDropService')\n ], DragAndDropService);\n return DragAndDropService;\n}(BeanStub));\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / React / AngularJS / Web Components\n * @version v26.1.0\n * @link http://www.ag-grid.com/\n * @license MIT\n */\nvar __extends$w = (undefined && undefined.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate$t = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n 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 RowDragComp = /** @class */ (function (_super) {\n __extends$w(RowDragComp, _super);\n function RowDragComp(cellValueFn, rowNode, column, customGui, dragStartPixels, suppressVisibilityChange) {\n var _this = _super.call(this) || this;\n _this.cellValueFn = cellValueFn;\n _this.rowNode = rowNode;\n _this.column = column;\n _this.customGui = customGui;\n _this.dragStartPixels = dragStartPixels;\n _this.suppressVisibilityChange = suppressVisibilityChange;\n _this.dragSource = null;\n return _this;\n }\n RowDragComp.prototype.isCustomGui = function () {\n return this.customGui != null;\n };\n RowDragComp.prototype.postConstruct = function () {\n if (!this.customGui) {\n this.setTemplate(/* html */ \"
\");\n this.getGui().appendChild(createIconNoSpan('rowDrag', this.beans.gridOptionsWrapper, null));\n this.addDragSource();\n }\n else {\n this.setDragElement(this.customGui, this.dragStartPixels);\n }\n this.checkCompatibility();\n if (!this.suppressVisibilityChange) {\n var strategy = this.beans.gridOptionsWrapper.isRowDragManaged() ?\n new ManagedVisibilityStrategy(this, this.beans, this.rowNode, this.column) :\n new NonManagedVisibilityStrategy(this, this.beans, this.rowNode, this.column);\n this.createManagedBean(strategy, this.beans.context);\n }\n };\n RowDragComp.prototype.setDragElement = function (dragElement, dragStartPixels) {\n this.setTemplateFromElement(dragElement);\n this.addDragSource(dragStartPixels);\n };\n RowDragComp.prototype.getSelectedCount = function () {\n var isRowDragMultiRow = this.beans.gridOptionsWrapper.isRowDragMultiRow();\n if (!isRowDragMultiRow) {\n return 1;\n }\n var selection = this.beans.selectionService.getSelectedNodes();\n return selection.indexOf(this.rowNode) !== -1 ? selection.length : 1;\n };\n // returns true if all compatibility items work out\n RowDragComp.prototype.checkCompatibility = function () {\n var managed = this.beans.gridOptionsWrapper.isRowDragManaged();\n var treeData = this.beans.gridOptionsWrapper.isTreeData();\n if (treeData && managed) {\n doOnce(function () {\n return console.warn('AG Grid: If using row drag with tree data, you cannot have rowDragManaged=true');\n }, 'RowDragComp.managedAndTreeData');\n }\n };\n RowDragComp.prototype.addDragSource = function (dragStartPixels) {\n var _this = this;\n if (dragStartPixels === void 0) { dragStartPixels = 4; }\n // if this is changing the drag element, delete the previous dragSource\n if (this.dragSource) {\n this.removeDragSource();\n }\n var dragItem = {\n rowNode: this.rowNode,\n columns: this.column ? [this.column] : undefined,\n defaultTextValue: this.cellValueFn(),\n };\n var rowDragText = this.column && this.column.getColDef().rowDragText;\n this.dragSource = {\n type: exports.DragSourceType.RowDrag,\n eElement: this.getGui(),\n dragItemName: function () {\n var dragItemCount = _this.getSelectedCount();\n if (rowDragText) {\n return rowDragText(dragItem, dragItemCount);\n }\n return dragItemCount === 1 ? _this.cellValueFn() : dragItemCount + \" rows\";\n },\n getDragItem: function () { return dragItem; },\n dragStartPixels: dragStartPixels,\n dragSourceDomDataKey: this.beans.gridOptionsWrapper.getDomDataKey()\n };\n this.addMouseDownListenerIfNeeded();\n this.beans.dragAndDropService.addDragSource(this.dragSource, true);\n };\n RowDragComp.prototype.addMouseDownListenerIfNeeded = function () {\n var _this = this;\n if (this.customGui || !this.column || !this.gridOptionsWrapper.isEnableCellTextSelect()) {\n return;\n }\n // mouse down needs to be prevented when enableCellTextSelect\n // is true so text doesn't get selected while dragging rows\n this.addManagedListener(this.getGui(), 'mousedown', function (e) {\n e.preventDefault();\n _this.beans.focusService.setFocusedCell(_this.rowNode.rowIndex, _this.column, _this.rowNode.rowPinned, true);\n });\n };\n RowDragComp.prototype.removeDragSource = function () {\n if (this.dragSource) {\n this.beans.dragAndDropService.removeDragSource(this.dragSource);\n }\n this.dragSource = null;\n };\n __decorate$t([\n Autowired('beans')\n ], RowDragComp.prototype, \"beans\", void 0);\n __decorate$t([\n PostConstruct\n ], RowDragComp.prototype, \"postConstruct\", null);\n __decorate$t([\n PreDestroy\n ], RowDragComp.prototype, \"removeDragSource\", null);\n return RowDragComp;\n}(Component));\nvar VisibilityStrategy = /** @class */ (function (_super) {\n __extends$w(VisibilityStrategy, _super);\n function VisibilityStrategy(parent, rowNode, column) {\n var _this = _super.call(this) || this;\n _this.parent = parent;\n _this.rowNode = rowNode;\n _this.column = column;\n return _this;\n }\n VisibilityStrategy.prototype.setDisplayedOrVisible = function (neverDisplayed) {\n if (neverDisplayed) {\n this.parent.setDisplayed(false);\n }\n else {\n var shown = true;\n var isShownSometimes = false;\n if (this.column) {\n shown = this.column.isRowDrag(this.rowNode) || this.parent.isCustomGui();\n isShownSometimes = isFunction(this.column.getColDef().rowDrag);\n }\n // if shown sometimes, them some rows can have drag handle while other don't,\n // so we use setVisible to keep the handles horizontally aligned (as setVisible\n // keeps the empty space, whereas setDisplayed looses the space)\n if (isShownSometimes) {\n this.parent.setDisplayed(true);\n this.parent.setVisible(shown);\n }\n else {\n this.parent.setDisplayed(shown);\n this.parent.setVisible(true);\n }\n }\n };\n return VisibilityStrategy;\n}(BeanStub));\n// when non managed, the visibility depends on suppressRowDrag property only\nvar NonManagedVisibilityStrategy = /** @class */ (function (_super) {\n __extends$w(NonManagedVisibilityStrategy, _super);\n function NonManagedVisibilityStrategy(parent, beans, rowNode, column) {\n var _this = _super.call(this, parent, rowNode, column) || this;\n _this.beans = beans;\n return _this;\n }\n NonManagedVisibilityStrategy.prototype.postConstruct = function () {\n this.addManagedListener(this.beans.gridOptionsWrapper, 'suppressRowDrag', this.onSuppressRowDrag.bind(this));\n // in case data changes, then we need to update visibility of drag item\n this.addManagedListener(this.rowNode, RowNode.EVENT_DATA_CHANGED, this.workOutVisibility.bind(this));\n this.addManagedListener(this.rowNode, RowNode.EVENT_CELL_CHANGED, this.workOutVisibility.bind(this));\n this.addManagedListener(this.rowNode, RowNode.EVENT_CELL_CHANGED, this.workOutVisibility.bind(this));\n this.addManagedListener(this.beans.eventService, Events.EVENT_NEW_COLUMNS_LOADED, this.workOutVisibility.bind(this));\n this.workOutVisibility();\n };\n NonManagedVisibilityStrategy.prototype.onSuppressRowDrag = function () {\n this.workOutVisibility();\n };\n NonManagedVisibilityStrategy.prototype.workOutVisibility = function () {\n // only show the drag if both sort and filter are not present\n var neverDisplayed = this.beans.gridOptionsWrapper.isSuppressRowDrag();\n this.setDisplayedOrVisible(neverDisplayed);\n };\n __decorate$t([\n PostConstruct\n ], NonManagedVisibilityStrategy.prototype, \"postConstruct\", null);\n return NonManagedVisibilityStrategy;\n}(VisibilityStrategy));\n// when managed, the visibility depends on sort, filter and row group, as well as suppressRowDrag property\nvar ManagedVisibilityStrategy = /** @class */ (function (_super) {\n __extends$w(ManagedVisibilityStrategy, _super);\n function ManagedVisibilityStrategy(parent, beans, rowNode, column) {\n var _this = _super.call(this, parent, rowNode, column) || this;\n _this.beans = beans;\n return _this;\n }\n ManagedVisibilityStrategy.prototype.postConstruct = function () {\n // we do not show the component if sort, filter or grouping is active\n this.addManagedListener(this.beans.eventService, Events.EVENT_SORT_CHANGED, this.workOutVisibility.bind(this));\n this.addManagedListener(this.beans.eventService, Events.EVENT_FILTER_CHANGED, this.workOutVisibility.bind(this));\n this.addManagedListener(this.beans.eventService, Events.EVENT_COLUMN_ROW_GROUP_CHANGED, this.workOutVisibility.bind(this));\n this.addManagedListener(this.beans.eventService, Events.EVENT_NEW_COLUMNS_LOADED, this.workOutVisibility.bind(this));\n // in case data changes, then we need to update visibility of drag item\n this.addManagedListener(this.rowNode, RowNode.EVENT_DATA_CHANGED, this.workOutVisibility.bind(this));\n this.addManagedListener(this.rowNode, RowNode.EVENT_CELL_CHANGED, this.workOutVisibility.bind(this));\n this.addManagedListener(this.beans.gridOptionsWrapper, 'suppressRowDrag', this.onSuppressRowDrag.bind(this));\n this.workOutVisibility();\n };\n ManagedVisibilityStrategy.prototype.onSuppressRowDrag = function () {\n this.workOutVisibility();\n };\n ManagedVisibilityStrategy.prototype.workOutVisibility = function () {\n // only show the drag if both sort and filter are not present\n var gridBodyCon = this.beans.ctrlsService.getGridBodyCtrl();\n var rowDragFeature = gridBodyCon.getRowDragFeature();\n var shouldPreventRowMove = rowDragFeature && rowDragFeature.shouldPreventRowMove();\n var suppressRowDrag = this.beans.gridOptionsWrapper.isSuppressRowDrag();\n var hasExternalDropZones = this.beans.dragAndDropService.hasExternalDropZones();\n var neverDisplayed = (shouldPreventRowMove && !hasExternalDropZones) || suppressRowDrag;\n this.setDisplayedOrVisible(neverDisplayed);\n };\n __decorate$t([\n PostConstruct\n ], ManagedVisibilityStrategy.prototype, \"postConstruct\", null);\n return ManagedVisibilityStrategy;\n}(VisibilityStrategy));\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / React / AngularJS / Web Components\n * @version v26.1.0\n * @link http://www.ag-grid.com/\n * @license MIT\n */\nvar __extends$x = (undefined && undefined.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __assign$4 = (undefined && undefined.__assign) || function () {\n __assign$4 = 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))\n t[p] = s[p];\n }\n return t;\n };\n return __assign$4.apply(this, arguments);\n};\nvar __decorate$u = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n 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 GroupCellRendererCtrl = /** @class */ (function (_super) {\n __extends$x(GroupCellRendererCtrl, _super);\n function GroupCellRendererCtrl() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n GroupCellRendererCtrl.prototype.init = function (comp, eGui, eCheckbox, eExpanded, eContracted, compClass, params) {\n this.params = params;\n this.eGui = eGui;\n this.eCheckbox = eCheckbox;\n this.eExpanded = eExpanded;\n this.eContracted = eContracted;\n this.comp = comp;\n this.compClass = compClass;\n var topLevelFooter = this.isTopLevelFooter();\n var embeddedRowMismatch = this.isEmbeddedRowMismatch();\n // This allows for empty strings to appear as groups since\n // it will only return for null or undefined.\n var nullValue = params.value == null;\n var skipCell = false;\n // if the groupCellRenderer is inside of a footer and groupHideOpenParents is true\n // we should only display the groupCellRenderer if the current column is the rowGroupedColumn\n if (this.gridOptionsWrapper.isGroupIncludeFooter() && this.gridOptionsWrapper.isGroupHideOpenParents()) {\n var node = params.node;\n if (node.footer) {\n var showRowGroup = params.colDef && params.colDef.showRowGroup;\n var rowGroupColumnId = node.rowGroupColumn && node.rowGroupColumn.getColId();\n skipCell = showRowGroup !== rowGroupColumnId;\n }\n }\n this.cellIsBlank = topLevelFooter ? false : (embeddedRowMismatch || nullValue || skipCell);\n if (this.cellIsBlank) {\n return;\n }\n this.setupShowingValueForOpenedParent();\n this.findDisplayedGroupNode();\n this.addFullWidthRowDraggerIfNeeded();\n this.addExpandAndContract();\n this.addCheckboxIfNeeded();\n this.addValueElement();\n this.setupIndent();\n };\n GroupCellRendererCtrl.prototype.isTopLevelFooter = function () {\n if (!this.gridOptionsWrapper.isGroupIncludeTotalFooter()) {\n return false;\n }\n if (this.params.value != null || this.params.node.level != -1) {\n return false;\n }\n // at this point, we know it's the root node and there is no value present, so it's a footer cell.\n // the only thing to work out is if we are displaying groups across multiple\n // columns (groupMultiAutoColumn=true), we only want 'total' to appear in the first column.\n var colDef = this.params.colDef;\n var doingFullWidth = colDef == null;\n if (doingFullWidth) {\n return true;\n }\n if (colDef.showRowGroup === true) {\n return true;\n }\n var rowGroupCols = this.columnModel.getRowGroupColumns();\n // this is a sanity check, rowGroupCols should always be present\n if (!rowGroupCols || rowGroupCols.length === 0) {\n return true;\n }\n var firstRowGroupCol = rowGroupCols[0];\n return firstRowGroupCol.getId() === colDef.showRowGroup;\n };\n // if we are doing embedded full width rows, we only show the renderer when\n // in the body, or if pinning in the pinned section, or if pinning and RTL,\n // in the right section. otherwise we would have the cell repeated in each section.\n GroupCellRendererCtrl.prototype.isEmbeddedRowMismatch = function () {\n if (!this.params.fullWidth || !this.gridOptionsWrapper.isEmbedFullWidthRows()) {\n return false;\n }\n var pinnedLeftCell = this.params.pinned === Constants.PINNED_LEFT;\n var pinnedRightCell = this.params.pinned === Constants.PINNED_RIGHT;\n var bodyCell = !pinnedLeftCell && !pinnedRightCell;\n if (this.gridOptionsWrapper.isEnableRtl()) {\n if (this.columnModel.isPinningLeft()) {\n return !pinnedRightCell;\n }\n return !bodyCell;\n }\n if (this.columnModel.isPinningLeft()) {\n return !pinnedLeftCell;\n }\n return !bodyCell;\n };\n GroupCellRendererCtrl.prototype.findDisplayedGroupNode = function () {\n var column = this.params.column;\n var rowNode = this.params.node;\n if (this.showingValueForOpenedParent) {\n var pointer = rowNode.parent;\n while (pointer != null) {\n if (pointer.rowGroupColumn && column.isRowGroupDisplayed(pointer.rowGroupColumn.getId())) {\n this.displayedGroupNode = pointer;\n break;\n }\n pointer = pointer.parent;\n }\n }\n // if we didn't find a displayed group, set it to the row node\n if (missing(this.displayedGroupNode)) {\n this.displayedGroupNode = rowNode;\n }\n };\n GroupCellRendererCtrl.prototype.setupShowingValueForOpenedParent = function () {\n // note - this code depends on sortService.updateGroupDataForHiddenOpenParents, where group data\n // is updated to reflect the dragged down parents\n var rowNode = this.params.node;\n var column = this.params.column;\n if (!this.gridOptionsWrapper.isGroupHideOpenParents()) {\n this.showingValueForOpenedParent = false;\n return;\n }\n // hideOpenParents means rowNode.groupData can have data for the group this column is displaying, even though\n // this rowNode isn't grouping by the column we are displaying\n // if no groupData at all, we are not showing a parent value\n if (!rowNode.groupData) {\n this.showingValueForOpenedParent = false;\n return;\n }\n // this is the normal case, in that we are showing a group for which this column is configured. note that\n // this means the Row Group is closed (if it was open, we would not be displaying it)\n var showingGroupNode = rowNode.rowGroupColumn != null;\n if (showingGroupNode) {\n var keyOfGroupingColumn = rowNode.rowGroupColumn.getId();\n var configuredToShowThisGroupLevel = column.isRowGroupDisplayed(keyOfGroupingColumn);\n // if showing group as normal, we didn't take group info from parent\n if (configuredToShowThisGroupLevel) {\n this.showingValueForOpenedParent = false;\n return;\n }\n }\n // see if we are showing a Group Value for the Displayed Group. if we are showing a group value, and this Row Node\n // is not grouping by this Displayed Group, we must of gotten the value from a parent node\n var valPresent = rowNode.groupData[column.getId()] != null;\n this.showingValueForOpenedParent = valPresent;\n };\n GroupCellRendererCtrl.prototype.addValueElement = function () {\n if (this.displayedGroupNode.footer) {\n this.addFooterValue();\n }\n else {\n this.addGroupValue();\n this.addChildCount();\n }\n };\n GroupCellRendererCtrl.prototype.addGroupValue = function () {\n // we try and use the cellRenderer of the column used for the grouping if we can\n var paramsAdjusted = this.adjustParamsWithDetailsFromRelatedColumn();\n var innerCompDetails = this.getInnerCompDetails(paramsAdjusted);\n var valueFormatted = paramsAdjusted.valueFormatted, value = paramsAdjusted.value;\n var valueWhenNoRenderer = valueFormatted != null ? valueFormatted : value;\n this.comp.setInnerRenderer(innerCompDetails, valueWhenNoRenderer);\n };\n GroupCellRendererCtrl.prototype.adjustParamsWithDetailsFromRelatedColumn = function () {\n var relatedColumn = this.displayedGroupNode.rowGroupColumn;\n var column = this.params.column;\n if (!relatedColumn) {\n return this.params;\n }\n var notFullWidth = column != null;\n if (notFullWidth) {\n var showingThisRowGroup = column.isRowGroupDisplayed(relatedColumn.getId());\n if (!showingThisRowGroup) {\n return this.params;\n }\n }\n var params = this.params;\n var _a = this.params, value = _a.value, scope = _a.scope, node = _a.node;\n var valueFormatted = this.valueFormatterService.formatValue(relatedColumn, node, scope, value);\n // we don't update the original params, as they could of come through React,\n // as react has RowGroupCellRenderer, which means the params could be props which\n // would be read only\n var paramsAdjusted = __assign$4(__assign$4({}, params), { valueFormatted: valueFormatted });\n return paramsAdjusted;\n };\n GroupCellRendererCtrl.prototype.addFooterValue = function () {\n var footerValueGetter = this.params.footerValueGetter;\n var footerValue = '';\n if (footerValueGetter) {\n // params is same as we were given, except we set the value as the item to display\n var paramsClone = cloneObject(this.params);\n paramsClone.value = this.params.value;\n if (typeof footerValueGetter === 'function') {\n footerValue = footerValueGetter(paramsClone);\n }\n else if (typeof footerValueGetter === 'string') {\n footerValue = this.expressionService.evaluate(footerValueGetter, paramsClone);\n }\n else {\n console.warn('AG Grid: footerValueGetter should be either a function or a string (expression)');\n }\n }\n else {\n footerValue = 'Total ' + (this.params.value != null ? this.params.value : '');\n }\n var innerCompDetails = this.getInnerCompDetails(this.params);\n this.comp.setInnerRenderer(innerCompDetails, footerValue);\n };\n GroupCellRendererCtrl.prototype.getInnerCompDetails = function (params) {\n var _this = this;\n // for full width rows, we don't do any of the below\n if (params.fullWidth) {\n return this.userComponentFactory.getFullWidthGroupRowInnerCellRenderer(this.gridOptions.groupRowRendererParams, params);\n }\n // when grouping, the normal case is we use the cell renderer of the grouped column. eg if grouping by country\n // and then rating, we will use the country cell renderer for each country group row and likewise the rating\n // cell renderer for each rating group row.\n //\n // however if the user has innerCellRenderer defined, this gets preference and we don't use cell renderers\n // of the grouped columns.\n //\n // so we check and use in the following order:\n //\n // 1) thisColDef.cellRendererParams.innerRenderer of the column showing the groups (eg auto group column)\n // 2) groupedColDef.cellRenderer of the grouped column\n // 3) groupedColDef.cellRendererParams.innerRenderer\n // we check if cell renderer provided for the group cell renderer, eg colDef.cellRendererParams.innerRenderer\n var innerCompDetails = this.userComponentFactory\n .getInnerRendererDetails(params, params);\n // avoid using GroupCellRenderer again, otherwise stack overflow, as we insert same renderer again and again.\n // this covers off chance user is grouping by a column that is also configured with GroupCellRenderer\n var isGroupRowRenderer = function (details) { return details && details.componentClass == _this.compClass; };\n if (innerCompDetails && !isGroupRowRenderer(innerCompDetails)) {\n // use the renderer defined in cellRendererParams.innerRenderer\n return innerCompDetails;\n }\n var relatedColumn = this.displayedGroupNode.rowGroupColumn;\n var relatedColDef = relatedColumn ? relatedColumn.getColDef() : undefined;\n if (!relatedColDef) {\n return;\n }\n // otherwise see if we can use the cellRenderer of the column we are grouping by\n var relatedCompDetails = this.userComponentFactory\n .getCellRendererDetails(relatedColDef, params);\n if (relatedCompDetails && !isGroupRowRenderer(relatedCompDetails)) {\n // Only if the original column is using a specific renderer, it it is a using a DEFAULT one ignore it\n return relatedCompDetails;\n }\n if (isGroupRowRenderer(relatedCompDetails) &&\n relatedColDef.cellRendererParams &&\n relatedColDef.cellRendererParams.innerRenderer) {\n // edge case - this comes from a column which has been grouped dynamically, that has a renderer 'group'\n // and has an inner cell renderer\n var res = this.userComponentFactory.getInnerRendererDetails(relatedColDef.cellRendererParams, params);\n return res;\n }\n };\n GroupCellRendererCtrl.prototype.addChildCount = function () {\n // only include the child count if it's included, eg if user doing custom aggregation,\n // then this could be left out, or set to -1, ie no child count\n if (this.params.suppressCount) {\n return;\n }\n this.addManagedListener(this.displayedGroupNode, RowNode.EVENT_ALL_CHILDREN_COUNT_CHANGED, this.updateChildCount.bind(this));\n // filtering changes the child count, so need to cater for it\n this.updateChildCount();\n };\n GroupCellRendererCtrl.prototype.updateChildCount = function () {\n var allChildrenCount = this.displayedGroupNode.allChildrenCount;\n var showingGroupForThisNode = this.isShowRowGroupForThisRow();\n var showCount = showingGroupForThisNode && allChildrenCount != null && allChildrenCount >= 0;\n var countString = showCount ? \"(\" + allChildrenCount + \")\" : \"\";\n this.comp.setChildCount(countString);\n };\n GroupCellRendererCtrl.prototype.isShowRowGroupForThisRow = function () {\n if (this.gridOptionsWrapper.isTreeData()) {\n return true;\n }\n var rowGroupColumn = this.displayedGroupNode.rowGroupColumn;\n if (!rowGroupColumn) {\n return false;\n }\n // column is null for fullWidthRows\n var column = this.params.column;\n var thisColumnIsInterested = column == null || column.isRowGroupDisplayed(rowGroupColumn.getId());\n return thisColumnIsInterested;\n };\n GroupCellRendererCtrl.prototype.addExpandAndContract = function () {\n var params = this.params;\n var eExpandedIcon = createIconNoSpan('groupExpanded', this.gridOptionsWrapper, null);\n var eContractedIcon = createIconNoSpan('groupContracted', this.gridOptionsWrapper, null);\n if (eExpandedIcon) {\n this.eExpanded.appendChild(eExpandedIcon);\n }\n if (eContractedIcon) {\n this.eContracted.appendChild(eContractedIcon);\n }\n var eGroupCell = params.eGridCell;\n // if editing groups, then double click is to start editing\n if (!this.gridOptionsWrapper.isEnableGroupEdit() && this.isExpandable() && !params.suppressDoubleClickExpand) {\n this.addManagedListener(eGroupCell, 'dblclick', this.onCellDblClicked.bind(this));\n }\n this.addManagedListener(this.eExpanded, 'click', this.onExpandClicked.bind(this));\n this.addManagedListener(this.eContracted, 'click', this.onExpandClicked.bind(this));\n // expand / contract as the user hits enter\n this.addManagedListener(eGroupCell, 'keydown', this.onKeyDown.bind(this));\n this.addManagedListener(params.node, RowNode.EVENT_EXPANDED_CHANGED, this.showExpandAndContractIcons.bind(this));\n this.showExpandAndContractIcons();\n // because we don't show the expand / contract when there are no children, we need to check every time\n // the number of children change.\n var expandableChangedListener = this.onRowNodeIsExpandableChanged.bind(this);\n this.addManagedListener(this.displayedGroupNode, RowNode.EVENT_ALL_CHILDREN_COUNT_CHANGED, expandableChangedListener);\n this.addManagedListener(this.displayedGroupNode, RowNode.EVENT_MASTER_CHANGED, expandableChangedListener);\n this.addManagedListener(this.displayedGroupNode, RowNode.EVENT_HAS_CHILDREN_CHANGED, expandableChangedListener);\n };\n GroupCellRendererCtrl.prototype.onExpandClicked = function (mouseEvent) {\n if (isStopPropagationForAgGrid(mouseEvent)) {\n return;\n }\n // so if we expand a node, it does not also get selected.\n stopPropagationForAgGrid(mouseEvent);\n this.onExpandOrContract();\n };\n GroupCellRendererCtrl.prototype.onExpandOrContract = function () {\n // must use the displayedGroup, so if data was dragged down, we expand the parent, not this row\n var rowNode = this.displayedGroupNode;\n var nextExpandState = !rowNode.expanded;\n rowNode.setExpanded(nextExpandState);\n };\n GroupCellRendererCtrl.prototype.isExpandable = function () {\n if (this.showingValueForOpenedParent) {\n return true;\n }\n var rowNode = this.displayedGroupNode;\n var reducedLeafNode = this.columnModel.isPivotMode() && rowNode.leafGroup;\n var expandableGroup = rowNode.isExpandable() && !rowNode.footer && !reducedLeafNode;\n if (!expandableGroup) {\n return false;\n }\n // column is null for fullWidthRows\n var column = this.params.column;\n var displayingForOneColumnOnly = column != null && typeof column.getColDef().showRowGroup === 'string';\n if (displayingForOneColumnOnly) {\n var showing = this.isShowRowGroupForThisRow();\n return showing;\n }\n return true;\n };\n GroupCellRendererCtrl.prototype.showExpandAndContractIcons = function () {\n var _a = this, params = _a.params, displayedGroup = _a.displayedGroupNode, columnModel = _a.columnModel;\n var node = params.node;\n var isExpandable = this.isExpandable();\n if (isExpandable) {\n // if expandable, show one based on expand state.\n // if we were dragged down, means our parent is always expanded\n var expanded = this.showingValueForOpenedParent ? true : node.expanded;\n this.comp.setExpandedDisplayed(expanded);\n this.comp.setContractedDisplayed(!expanded);\n }\n else {\n // it not expandable, show neither\n this.comp.setExpandedDisplayed(false);\n this.comp.setContractedDisplayed(false);\n }\n // compensation padding for leaf nodes, so there is blank space instead of the expand icon\n var pivotMode = columnModel.isPivotMode();\n var pivotModeAndLeafGroup = pivotMode && displayedGroup.leafGroup;\n var addExpandableCss = isExpandable && !pivotModeAndLeafGroup;\n var isTotalFooterNode = node.footer && node.level === -1;\n this.comp.addOrRemoveCssClass('ag-cell-expandable', addExpandableCss);\n this.comp.addOrRemoveCssClass('ag-row-group', addExpandableCss);\n if (pivotMode) {\n this.comp.addOrRemoveCssClass('ag-pivot-leaf-group', pivotModeAndLeafGroup);\n }\n else if (!isTotalFooterNode) {\n this.comp.addOrRemoveCssClass('ag-row-group-leaf-indent', !addExpandableCss);\n }\n };\n GroupCellRendererCtrl.prototype.onRowNodeIsExpandableChanged = function () {\n // maybe if no children now, we should hide the expand / contract icons\n this.showExpandAndContractIcons();\n // if we have no children, this impacts the indent\n this.setIndent();\n };\n GroupCellRendererCtrl.prototype.setupIndent = function () {\n // only do this if an indent - as this overwrites the padding that\n // the theme set, which will make things look 'not aligned' for the\n // first group level.\n var node = this.params.node;\n var suppressPadding = this.params.suppressPadding;\n if (!suppressPadding) {\n this.addManagedListener(node, RowNode.EVENT_UI_LEVEL_CHANGED, this.setIndent.bind(this));\n this.setIndent();\n }\n };\n GroupCellRendererCtrl.prototype.setIndent = function () {\n if (this.gridOptionsWrapper.isGroupHideOpenParents()) {\n return;\n }\n var params = this.params;\n var rowNode = params.node;\n // if we are only showing one group column, we don't want to be indenting based on level\n var fullWithRow = !!params.colDef;\n var treeData = this.gridOptionsWrapper.isTreeData();\n var manyDimensionThisColumn = !fullWithRow || treeData || params.colDef.showRowGroup === true;\n var paddingCount = manyDimensionThisColumn ? rowNode.uiLevel : 0;\n var userProvidedPaddingPixelsTheDeprecatedWay = params.padding >= 0;\n if (userProvidedPaddingPixelsTheDeprecatedWay) {\n doOnce(function () { return console.warn('AG Grid: cellRendererParams.padding no longer works, it was deprecated in since v14.2 and removed in v26, configuring padding for groupCellRenderer should be done with Sass variables and themes. Please see the AG Grid documentation page for Themes, in particular the property $row-group-indent-size.'); }, 'groupCellRenderer->doDeprecatedWay');\n }\n if (this.indentClass) {\n this.comp.addOrRemoveCssClass(this.indentClass, false);\n }\n this.indentClass = 'ag-row-group-indent-' + paddingCount;\n this.comp.addOrRemoveCssClass(this.indentClass, true);\n };\n GroupCellRendererCtrl.prototype.addFullWidthRowDraggerIfNeeded = function () {\n var _this = this;\n if (!this.params.fullWidth || !this.params.rowDrag) {\n return;\n }\n var rowDragComp = new RowDragComp(function () { return _this.params.value; }, this.params.node);\n this.createManagedBean(rowDragComp, this.context);\n this.eGui.insertAdjacentElement('afterbegin', rowDragComp.getGui());\n };\n GroupCellRendererCtrl.prototype.isUserWantsSelected = function () {\n var paramsCheckbox = this.params.checkbox;\n if (typeof paramsCheckbox === 'function') {\n return paramsCheckbox(this.params);\n }\n return paramsCheckbox === true;\n };\n GroupCellRendererCtrl.prototype.addCheckboxIfNeeded = function () {\n var _this = this;\n var rowNode = this.displayedGroupNode;\n var checkboxNeeded = this.isUserWantsSelected() &&\n // footers cannot be selected\n !rowNode.footer &&\n // pinned rows cannot be selected\n !rowNode.rowPinned &&\n // details cannot be selected\n !rowNode.detail;\n if (checkboxNeeded) {\n var cbSelectionComponent_1 = new CheckboxSelectionComponent();\n this.getContext().createBean(cbSelectionComponent_1);\n cbSelectionComponent_1.init({ rowNode: rowNode, column: this.params.column });\n this.eCheckbox.appendChild(cbSelectionComponent_1.getGui());\n this.addDestroyFunc(function () { return _this.getContext().destroyBean(cbSelectionComponent_1); });\n }\n this.comp.setCheckboxVisible(checkboxNeeded);\n };\n GroupCellRendererCtrl.prototype.onKeyDown = function (event) {\n var enterKeyPressed = isKeyPressed(event, KeyCode.ENTER);\n if (!enterKeyPressed || this.params.suppressEnterExpand) {\n return;\n }\n var cellEditable = this.params.column && this.params.column.isCellEditable(this.params.node);\n if (cellEditable) {\n return;\n }\n this.onExpandOrContract();\n };\n GroupCellRendererCtrl.prototype.onCellDblClicked = function (mouseEvent) {\n if (isStopPropagationForAgGrid(mouseEvent)) {\n return;\n }\n // we want to avoid acting on double click events on the expand / contract icon,\n // as that icons already has expand / collapse functionality on it. otherwise if\n // the icon was double clicked, we would get 'click', 'click', 'dblclick' which\n // is open->close->open, however double click should be open->close only.\n var targetIsExpandIcon = isElementInEventPath(this.eExpanded, mouseEvent)\n || isElementInEventPath(this.eContracted, mouseEvent);\n if (!targetIsExpandIcon) {\n this.onExpandOrContract();\n }\n };\n __decorate$u([\n Autowired('expressionService')\n ], GroupCellRendererCtrl.prototype, \"expressionService\", void 0);\n __decorate$u([\n Autowired('valueFormatterService')\n ], GroupCellRendererCtrl.prototype, \"valueFormatterService\", void 0);\n __decorate$u([\n Autowired('columnModel')\n ], GroupCellRendererCtrl.prototype, \"columnModel\", void 0);\n __decorate$u([\n Autowired('userComponentFactory')\n ], GroupCellRendererCtrl.prototype, \"userComponentFactory\", void 0);\n __decorate$u([\n Autowired('gridOptions')\n ], GroupCellRendererCtrl.prototype, \"gridOptions\", void 0);\n return GroupCellRendererCtrl;\n}(BeanStub));\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / React / AngularJS / Web Components\n * @version v26.1.0\n * @link http://www.ag-grid.com/\n * @license MIT\n */\nvar __extends$y = (undefined && undefined.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate$v = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n 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 GroupCellRenderer = /** @class */ (function (_super) {\n __extends$y(GroupCellRenderer, _super);\n function GroupCellRenderer() {\n return _super.call(this, GroupCellRenderer.TEMPLATE) || this;\n }\n GroupCellRenderer.prototype.init = function (params) {\n var _this = this;\n var compProxy = {\n setInnerRenderer: function (compDetails, valueToDisplay) { return _this.setRenderDetails(compDetails, valueToDisplay); },\n setChildCount: function (count) { return _this.eChildCount.innerHTML = count; },\n addOrRemoveCssClass: function (cssClass, value) { return _this.addOrRemoveCssClass(cssClass, value); },\n setContractedDisplayed: function (expanded) { return setDisplayed(_this.eContracted, expanded); },\n setExpandedDisplayed: function (expanded) { return setDisplayed(_this.eExpanded, expanded); },\n setCheckboxVisible: function (visible) { return addOrRemoveCssClass(_this.eCheckbox, 'ag-invisible', !visible); }\n };\n var ctrl = this.createManagedBean(new GroupCellRendererCtrl());\n ctrl.init(compProxy, this.getGui(), this.eCheckbox, this.eExpanded, this.eContracted, this.constructor, params);\n };\n GroupCellRenderer.prototype.setRenderDetails = function (compDetails, valueToDisplay) {\n var _this = this;\n if (compDetails) {\n var componentPromise = this.userComponentFactory.createInstanceFromCompDetails(compDetails);\n if (!componentPromise) {\n return;\n }\n componentPromise.then(function (comp) {\n if (!comp) {\n return;\n }\n var destroyComp = function () { return _this.context.destroyBean(comp); };\n if (_this.isAlive()) {\n _this.eValue.appendChild(comp.getGui());\n _this.addDestroyFunc(destroyComp);\n }\n else {\n destroyComp();\n }\n });\n }\n else {\n this.eValue.innerText = valueToDisplay;\n }\n };\n // this is a user component, and IComponent has \"public destroy()\" as part of the interface.\n // so we need to have public here instead of private or protected\n GroupCellRenderer.prototype.destroy = function () {\n this.getContext().destroyBean(this.innerCellRenderer);\n _super.prototype.destroy.call(this);\n };\n GroupCellRenderer.prototype.refresh = function () {\n return false;\n };\n GroupCellRenderer.TEMPLATE = \"\\n \\n \\n \\n \\n \\n \";\n __decorate$v([\n Autowired('userComponentFactory')\n ], GroupCellRenderer.prototype, \"userComponentFactory\", void 0);\n __decorate$v([\n RefSelector('eExpanded')\n ], GroupCellRenderer.prototype, \"eExpanded\", void 0);\n __decorate$v([\n RefSelector('eContracted')\n ], GroupCellRenderer.prototype, \"eContracted\", void 0);\n __decorate$v([\n RefSelector('eCheckbox')\n ], GroupCellRenderer.prototype, \"eCheckbox\", void 0);\n __decorate$v([\n RefSelector('eValue')\n ], GroupCellRenderer.prototype, \"eValue\", void 0);\n __decorate$v([\n RefSelector('eChildCount')\n ], GroupCellRenderer.prototype, \"eChildCount\", void 0);\n return GroupCellRenderer;\n}(Component));\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / React / AngularJS / Web Components\n * @version v26.1.0\n * @link http://www.ag-grid.com/\n * @license MIT\n */\nvar __extends$z = (undefined && undefined.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate$w = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n 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 LoadingCellRenderer = /** @class */ (function (_super) {\n __extends$z(LoadingCellRenderer, _super);\n function LoadingCellRenderer() {\n return _super.call(this, LoadingCellRenderer.TEMPLATE) || this;\n }\n LoadingCellRenderer.prototype.init = function (params) {\n params.node.failedLoad ? this.setupFailed() : this.setupLoading();\n };\n LoadingCellRenderer.prototype.setupFailed = function () {\n this.eLoadingText.innerText = 'ERR';\n };\n LoadingCellRenderer.prototype.setupLoading = function () {\n var eLoadingIcon = createIconNoSpan('groupLoading', this.gridOptionsWrapper, null);\n if (eLoadingIcon) {\n this.eLoadingIcon.appendChild(eLoadingIcon);\n }\n var localeTextFunc = this.gridOptionsWrapper.getLocaleTextFunc();\n this.eLoadingText.innerText = localeTextFunc('loadingOoo', 'Loading');\n };\n LoadingCellRenderer.prototype.refresh = function (params) {\n return false;\n };\n LoadingCellRenderer.TEMPLATE = \"\\n \\n \\n
\";\n __decorate$w([\n RefSelector('eLoadingIcon')\n ], LoadingCellRenderer.prototype, \"eLoadingIcon\", void 0);\n __decorate$w([\n RefSelector('eLoadingText')\n ], LoadingCellRenderer.prototype, \"eLoadingText\", void 0);\n return LoadingCellRenderer;\n}(Component));\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / React / AngularJS / Web Components\n * @version v26.1.0\n * @link http://www.ag-grid.com/\n * @license MIT\n */\nvar __extends$A = (undefined && undefined.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar LoadingOverlayComponent = /** @class */ (function (_super) {\n __extends$A(LoadingOverlayComponent, _super);\n function LoadingOverlayComponent() {\n return _super.call(this) || this;\n }\n // this is a user component, and IComponent has \"public destroy()\" as part of the interface.\n // so we need to override destroy() just to make the method public.\n LoadingOverlayComponent.prototype.destroy = function () {\n _super.prototype.destroy.call(this);\n };\n LoadingOverlayComponent.prototype.init = function (params) {\n var template = this.gridOptionsWrapper.getOverlayLoadingTemplate() ?\n this.gridOptionsWrapper.getOverlayLoadingTemplate() : LoadingOverlayComponent.DEFAULT_LOADING_OVERLAY_TEMPLATE;\n var localeTextFunc = this.gridOptionsWrapper.getLocaleTextFunc();\n var localisedTemplate = template.replace('[LOADING...]', localeTextFunc('loadingOoo', 'Loading...'));\n this.setTemplate(localisedTemplate);\n };\n LoadingOverlayComponent.DEFAULT_LOADING_OVERLAY_TEMPLATE = '[LOADING...] ';\n return LoadingOverlayComponent;\n}(Component));\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / React / AngularJS / Web Components\n * @version v26.1.0\n * @link http://www.ag-grid.com/\n * @license MIT\n */\nvar __extends$B = (undefined && undefined.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar NoRowsOverlayComponent = /** @class */ (function (_super) {\n __extends$B(NoRowsOverlayComponent, _super);\n function NoRowsOverlayComponent() {\n return _super.call(this) || this;\n }\n // this is a user component, and IComponent has \"public destroy()\" as part of the interface.\n // so we need to override destroy() just to make the method public.\n NoRowsOverlayComponent.prototype.destroy = function () {\n _super.prototype.destroy.call(this);\n };\n NoRowsOverlayComponent.prototype.init = function (params) {\n var template = this.gridOptionsWrapper.getOverlayNoRowsTemplate() ?\n this.gridOptionsWrapper.getOverlayNoRowsTemplate() : NoRowsOverlayComponent.DEFAULT_NO_ROWS_TEMPLATE;\n var localeTextFunc = this.gridOptionsWrapper.getLocaleTextFunc();\n var localisedTemplate = template.replace('[NO_ROWS_TO_SHOW]', localeTextFunc('noRowsToShow', 'No Rows To Show'));\n this.setTemplate(localisedTemplate);\n };\n NoRowsOverlayComponent.DEFAULT_NO_ROWS_TEMPLATE = '[NO_ROWS_TO_SHOW] ';\n return NoRowsOverlayComponent;\n}(Component));\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / React / AngularJS / Web Components\n * @version v26.1.0\n * @link http://www.ag-grid.com/\n * @license MIT\n */\nvar __extends$C = (undefined && undefined.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar TooltipComponent = /** @class */ (function (_super) {\n __extends$C(TooltipComponent, _super);\n function TooltipComponent() {\n return _super.call(this, /* html */ \"
\") || this;\n }\n // will need to type params\n TooltipComponent.prototype.init = function (params) {\n var value = params.value;\n this.getGui().innerHTML = escapeString(value);\n };\n return TooltipComponent;\n}(PopupComponent));\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / React / AngularJS / Web Components\n * @version v26.1.0\n * @link http://www.ag-grid.com/\n * @license MIT\n */\nvar __extends$D = (undefined && undefined.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate$x = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n 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 UserComponentRegistry = /** @class */ (function (_super) {\n __extends$D(UserComponentRegistry, _super);\n function UserComponentRegistry() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.agGridDefaults = {\n //date\n agDateInput: DefaultDateComponent,\n //header\n agColumnHeader: HeaderComp,\n agColumnGroupHeader: HeaderGroupComp,\n //floating filters\n agTextColumnFloatingFilter: TextFloatingFilter,\n agNumberColumnFloatingFilter: NumberFloatingFilter,\n agDateColumnFloatingFilter: DateFloatingFilter,\n // renderers\n agAnimateShowChangeCellRenderer: AnimateShowChangeCellRenderer,\n agAnimateSlideCellRenderer: AnimateSlideCellRenderer,\n agGroupCellRenderer: GroupCellRenderer,\n agGroupRowRenderer: GroupCellRenderer,\n agLoadingCellRenderer: LoadingCellRenderer,\n //editors\n agCellEditor: TextCellEditor,\n agTextCellEditor: TextCellEditor,\n agSelectCellEditor: SelectCellEditor,\n agPopupTextCellEditor: PopupTextCellEditor,\n agPopupSelectCellEditor: PopupSelectCellEditor,\n agLargeTextCellEditor: LargeTextCellEditor,\n //filter\n agTextColumnFilter: TextFilter,\n agNumberColumnFilter: NumberFilter,\n agDateColumnFilter: DateFilter,\n //overlays\n agLoadingOverlay: LoadingOverlayComponent,\n agNoRowsOverlay: NoRowsOverlayComponent,\n // tooltips\n agTooltipComponent: TooltipComponent\n };\n _this.agDeprecatedNames = {\n set: {\n newComponentName: 'agSetColumnFilter',\n propertyHolder: 'filter'\n },\n text: {\n newComponentName: 'agTextColumnFilter',\n propertyHolder: 'filter'\n },\n number: {\n newComponentName: 'agNumberColumnFilter',\n propertyHolder: 'filter'\n },\n date: {\n newComponentName: 'agDateColumnFilter',\n propertyHolder: 'filter'\n },\n group: {\n newComponentName: 'agGroupCellRenderer',\n propertyHolder: 'cellRenderer'\n },\n animateShowChange: {\n newComponentName: 'agAnimateShowChangeCellRenderer',\n propertyHolder: 'cellRenderer'\n },\n animateSlide: {\n newComponentName: 'agAnimateSlideCellRenderer',\n propertyHolder: 'cellRenderer'\n },\n select: {\n newComponentName: 'agSelectCellEditor',\n propertyHolder: 'cellEditor'\n },\n largeText: {\n newComponentName: 'agLargeTextCellEditor',\n propertyHolder: 'cellEditor'\n },\n popupSelect: {\n newComponentName: 'agPopupSelectCellEditor',\n propertyHolder: 'cellEditor'\n },\n popupText: {\n newComponentName: 'agPopupTextCellEditor',\n propertyHolder: 'cellEditor'\n },\n richSelect: {\n newComponentName: 'agRichSelectCellEditor',\n propertyHolder: 'cellEditor'\n },\n headerComponent: {\n newComponentName: 'agColumnHeader',\n propertyHolder: 'headerComponent'\n }\n };\n _this.jsComponents = {};\n _this.frameworkComponents = {};\n return _this;\n }\n UserComponentRegistry.prototype.init = function () {\n var _this = this;\n if (this.gridOptions.components != null) {\n iterateObject(this.gridOptions.components, function (key, component) { return _this.registerComponent(key, component); });\n }\n if (this.gridOptions.frameworkComponents != null) {\n iterateObject(this.gridOptions.frameworkComponents, function (key, component) { return _this.registerFwComponent(key, component); });\n }\n };\n UserComponentRegistry.prototype.registerDefaultComponent = function (rawName, component) {\n var name = this.translateIfDeprecated(rawName);\n if (this.agGridDefaults[name]) {\n console.error(\"Trying to overwrite a default component. You should call registerComponent\");\n return;\n }\n this.agGridDefaults[name] = component;\n };\n UserComponentRegistry.prototype.registerComponent = function (rawName, component) {\n var name = this.translateIfDeprecated(rawName);\n if (this.frameworkComponents[name]) {\n console.error(\"Trying to register a component that you have already registered for frameworks: \" + name);\n return;\n }\n this.jsComponents[name] = component;\n };\n /**\n * B the business interface (ie IHeader)\n * A the agGridComponent interface (ie IHeaderComp). The final object acceptable by ag-grid\n */\n UserComponentRegistry.prototype.registerFwComponent = function (rawName, component) {\n var name = this.translateIfDeprecated(rawName);\n if (this.jsComponents[name]) {\n console.error(\"Trying to register a component that you have already registered for plain javascript: \" + name);\n return;\n }\n this.frameworkComponents[name] = component;\n };\n UserComponentRegistry.prototype.retrieve = function (rawName) {\n var name = this.translateIfDeprecated(rawName);\n var frameworkComponent = this.frameworkComponents[name] || this.getFrameworkOverrides().frameworkComponent(name);\n if (frameworkComponent) {\n return {\n componentFromFramework: true,\n component: frameworkComponent\n };\n }\n var jsComponent = this.jsComponents[name];\n if (jsComponent) {\n return {\n componentFromFramework: false,\n component: jsComponent\n };\n }\n var defaultComponent = this.agGridDefaults[name];\n if (defaultComponent) {\n return {\n componentFromFramework: false,\n component: defaultComponent\n };\n }\n if (Object.keys(this.agGridDefaults).indexOf(name) < 0) {\n console.warn(\"AG Grid: Looking for component [\" + name + \"] but it wasn't found.\");\n }\n return null;\n };\n UserComponentRegistry.prototype.translateIfDeprecated = function (raw) {\n var deprecatedInfo = this.agDeprecatedNames[raw];\n if (deprecatedInfo != null) {\n doOnce(function () {\n console.warn(\"ag-grid. Since v15.0 component names have been renamed to be namespaced. You should rename \" + deprecatedInfo.propertyHolder + \":\" + raw + \" to \" + deprecatedInfo.propertyHolder + \":\" + deprecatedInfo.newComponentName);\n }, 'DEPRECATE_COMPONENT_' + raw);\n return deprecatedInfo.newComponentName;\n }\n return raw;\n };\n __decorate$x([\n Autowired('gridOptions')\n ], UserComponentRegistry.prototype, \"gridOptions\", void 0);\n __decorate$x([\n PostConstruct\n ], UserComponentRegistry.prototype, \"init\", null);\n UserComponentRegistry = __decorate$x([\n Bean('userComponentRegistry')\n ], UserComponentRegistry);\n return UserComponentRegistry;\n}(BeanStub));\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / React / AngularJS / Web Components\n * @version v26.1.0\n * @link http://www.ag-grid.com/\n * @license MIT\n */\nvar DateComponent = {\n propertyName: 'dateComponent',\n isCellRenderer: function () { return false; }\n};\nvar HeaderComponent = {\n propertyName: 'headerComponent',\n isCellRenderer: function () { return false; },\n};\nvar HeaderGroupComponent = {\n propertyName: 'headerGroupComponent',\n isCellRenderer: function () { return false; },\n};\nvar CellRendererComponent = {\n propertyName: 'cellRenderer',\n isCellRenderer: function () { return true; },\n};\nvar CellEditorComponent = {\n propertyName: 'cellEditor',\n isCellRenderer: function () { return false; },\n};\nvar InnerRendererComponent = {\n propertyName: 'innerRenderer',\n isCellRenderer: function () { return true; },\n};\nvar LoadingOverlayComponent$1 = {\n propertyName: 'loadingOverlayComponent',\n isCellRenderer: function () { return false; },\n};\nvar NoRowsOverlayComponent$1 = {\n propertyName: 'noRowsOverlayComponent',\n isCellRenderer: function () { return false; },\n};\nvar TooltipComponent$1 = {\n propertyName: 'tooltipComponent',\n isCellRenderer: function () { return false; },\n};\nvar FilterComponent = {\n propertyName: 'filter',\n isCellRenderer: function () { return false; },\n};\nvar FloatingFilterComponent = {\n propertyName: 'floatingFilterComponent',\n isCellRenderer: function () { return false; },\n};\nvar ToolPanelComponent = {\n propertyName: 'toolPanel',\n isCellRenderer: function () { return false; },\n};\nvar StatusPanelComponent = {\n propertyName: 'statusPanel',\n isCellRenderer: function () { return false; },\n};\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / React / AngularJS / Web Components\n * @version v26.1.0\n * @link http://www.ag-grid.com/\n * @license MIT\n */\nvar __extends$E = (undefined && undefined.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __assign$5 = (undefined && undefined.__assign) || function () {\n __assign$5 = 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))\n t[p] = s[p];\n }\n return t;\n };\n return __assign$5.apply(this, arguments);\n};\nvar __decorate$y = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n 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 UserComponentFactory = /** @class */ (function (_super) {\n __extends$E(UserComponentFactory, _super);\n function UserComponentFactory() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n //////// NEW (after React UI)\n UserComponentFactory.prototype.getHeaderCompDetails = function (colDef, params) {\n return this.getCompDetails(colDef, HeaderComponent, 'agColumnHeader', params);\n };\n UserComponentFactory.prototype.getHeaderGroupCompDetails = function (params) {\n var colGroupDef = params.columnGroup.getColGroupDef();\n return this.getCompDetails(colGroupDef, HeaderGroupComponent, 'agColumnGroupHeader', params);\n };\n // this one is unusual, as it can be LoadingCellRenderer, DetailCellRenderer, FullWidthCellRenderer or GroupRowRenderer.\n // so we have to pass the type in.\n UserComponentFactory.prototype.getFullWidthCellRendererDetails = function (params, cellRendererType, cellRendererName) {\n return this.getCompDetails(this.gridOptions, { propertyName: cellRendererType, isCellRenderer: function () { return true; } }, cellRendererName, params);\n };\n // CELL RENDERER\n UserComponentFactory.prototype.getInnerRendererDetails = function (def, params) {\n return this.getCompDetails(def, InnerRendererComponent, null, params);\n };\n UserComponentFactory.prototype.getFullWidthGroupRowInnerCellRenderer = function (def, params) {\n return this.getCompDetails(def, InnerRendererComponent, null, params);\n };\n UserComponentFactory.prototype.getCellRendererDetails = function (def, params) {\n return this.getCompDetails(def, CellRendererComponent, null, params);\n };\n // CELL EDITOR\n UserComponentFactory.prototype.getCellEditorDetails = function (def, params) {\n return this.getCompDetails(def, CellEditorComponent, 'agCellEditor', params, true);\n };\n //////// OLD (before React UI)\n UserComponentFactory.prototype.newCellRenderer = function (def, params) {\n return this.lookupAndCreateComponent(def, params, CellRendererComponent, null, true);\n };\n UserComponentFactory.prototype.newDateComponent = function (params) {\n return this.lookupAndCreateComponent(this.gridOptions, params, DateComponent, 'agDateInput');\n };\n UserComponentFactory.prototype.newLoadingOverlayComponent = function (params) {\n return this.lookupAndCreateComponent(this.gridOptions, params, LoadingOverlayComponent$1, 'agLoadingOverlay');\n };\n UserComponentFactory.prototype.newNoRowsOverlayComponent = function (params) {\n return this.lookupAndCreateComponent(this.gridOptions, params, NoRowsOverlayComponent$1, 'agNoRowsOverlay');\n };\n UserComponentFactory.prototype.newTooltipComponent = function (params) {\n return this.lookupAndCreateComponent(params.colDef, params, TooltipComponent$1, 'agTooltipComponent');\n };\n UserComponentFactory.prototype.newFilterComponent = function (def, params, defaultFilter) {\n return this.lookupAndCreateComponent(def, params, FilterComponent, defaultFilter, false);\n };\n UserComponentFactory.prototype.newSetFilterCellRenderer = function (def, params) {\n return this.lookupAndCreateComponent(def, params, CellRendererComponent, null, true);\n };\n UserComponentFactory.prototype.newFloatingFilterComponent = function (def, params, defaultFloatingFilter) {\n return this.lookupAndCreateComponent(def, params, FloatingFilterComponent, defaultFloatingFilter, true);\n };\n UserComponentFactory.prototype.newToolPanelComponent = function (toolPanelDef, params) {\n return this.lookupAndCreateComponent(toolPanelDef, params, ToolPanelComponent);\n };\n UserComponentFactory.prototype.newStatusPanelComponent = function (def, params) {\n return this.lookupAndCreateComponent(def, params, StatusPanelComponent);\n };\n UserComponentFactory.prototype.lookupComponent = function (defObject, type, params, defaultComponentName) {\n var _this = this;\n if (params === void 0) { params = null; }\n var propertyName = type.propertyName;\n var paramsFromSelector;\n var comp;\n var frameworkComp;\n // pull from defObject if available\n if (defObject) {\n var defObjectAny = defObject;\n // if selector, use this\n var selectorFunc = defObjectAny[propertyName + 'Selector'];\n var selectorRes = selectorFunc ? selectorFunc(params) : null;\n if (selectorRes) {\n comp = selectorRes.component;\n frameworkComp = selectorRes.frameworkComponent;\n paramsFromSelector = selectorRes.params;\n }\n else {\n // if no selector, or result of selector is empty, take from defObject\n comp = defObjectAny[propertyName];\n frameworkComp = defObjectAny[propertyName + 'Framework'];\n }\n // for filters only, we allow 'true' for the component, which means default filter to be used\n if (comp === true) {\n comp = undefined;\n }\n }\n var lookupFromRegistry = function (key) {\n var item = _this.userComponentRegistry.retrieve(key);\n if (item) {\n comp = !item.componentFromFramework ? item.component : undefined;\n frameworkComp = item.componentFromFramework ? item.component : undefined;\n }\n else {\n comp = undefined;\n frameworkComp = undefined;\n }\n };\n // if compOption is a string, means we need to look the item up\n if (typeof comp === 'string') {\n lookupFromRegistry(comp);\n }\n // if lookup brought nothing back, and we have a default, lookup the default\n if (comp == null && frameworkComp == null && defaultComponentName != null) {\n lookupFromRegistry(defaultComponentName);\n }\n // if we have a comp option, and it's a function, replace it with an object equivalent adaptor\n if (comp && !this.agComponentUtils.doesImplementIComponent(comp)) {\n comp = this.agComponentUtils.adaptFunction(propertyName, comp);\n }\n if (!comp && !frameworkComp) {\n return null;\n }\n return {\n componentFromFramework: comp == null,\n componentClass: comp ? comp : frameworkComp,\n params: paramsFromSelector,\n type: type\n };\n };\n UserComponentFactory.prototype.createInstanceFromCompDetails = function (compDetails, defaultComponentName) {\n if (!compDetails) {\n return null;\n }\n var params = compDetails.params, componentClass = compDetails.componentClass, componentFromFramework = compDetails.componentFromFramework;\n // Create the component instance\n var instance = this.createComponentInstance(compDetails.type, defaultComponentName, componentClass, componentFromFramework);\n if (!instance) {\n return null;\n }\n this.addReactHacks(params);\n var deferredInit = this.initComponent(instance, params);\n if (deferredInit == null) {\n return AgPromise.resolve(instance);\n }\n return deferredInit.then(function () { return instance; });\n };\n /**\n * This method creates a component given everything needed to guess what sort of component needs to be instantiated\n * It takes\n * @param CompClass: The class to instantiate,\n * @param agGridParams: Params to be passed to the component and passed by AG Grid. This will get merged with any params\n * specified by the user in the configuration\n * @param modifyParamsCallback: A chance to customise the params passed to the init method. It receives what the current\n * params are and the component that init is about to get called for\n */\n UserComponentFactory.prototype.createUserComponentFromConcreteClass = function (CompClass, agGridParams) {\n var internalComponent = new CompClass();\n this.initComponent(internalComponent, agGridParams);\n return internalComponent;\n };\n /**\n * Useful to check what would be the resultant params for a given object\n * @param definitionObject: This is the context for which this component needs to be created, it can be gridOptions\n * (global) or columnDef mostly.\n * @param propertyName: The name of the property used in ag-grid as a convention to refer to the component, it can be:\n * 'floatingFilter', 'cellRenderer', is used to find if the user is specifying a custom component\n * @param paramsFromGrid: Params to be passed to the component and passed by AG Grid. This will get merged with any params\n * specified by the user in the configuration\n * @returns {TParams} It merges the user agGridParams with the actual params specified by the user.\n */\n UserComponentFactory.prototype.mergeParamsWithApplicationProvidedParams = function (definitionObject, propertyName, paramsFromGrid, paramsFromSelector) {\n if (paramsFromSelector === void 0) { paramsFromSelector = null; }\n var params = {};\n mergeDeep(params, paramsFromGrid);\n var userParams = definitionObject ? definitionObject[propertyName + \"Params\"] : null;\n if (userParams != null) {\n if (typeof userParams === 'function') {\n var userParamsFromFunc = userParams(paramsFromGrid);\n mergeDeep(params, userParamsFromFunc);\n }\n else if (typeof userParams === 'object') {\n mergeDeep(params, userParams);\n }\n }\n mergeDeep(params, paramsFromSelector);\n return params;\n };\n UserComponentFactory.prototype.getCompDetails = function (defObject, type, defaultName, params, mandatory) {\n if (mandatory === void 0) { mandatory = false; }\n var propName = type.propertyName;\n var compDetails = this.lookupComponent(defObject, type, params, defaultName);\n if (!compDetails || !compDetails.componentClass) {\n if (mandatory) {\n this.logComponentMissing(defObject, propName);\n }\n return undefined;\n }\n var paramsMerged = this.mergeParamsWithApplicationProvidedParams(defObject, propName, params, compDetails.params);\n return __assign$5(__assign$5({}, compDetails), { params: paramsMerged });\n };\n /**\n * This method creates a component given everything needed to guess what sort of component needs to be instantiated\n * It takes\n * @param definitionObject: This is the context for which this component needs to be created, it can be gridOptions\n * (global) or columnDef mostly.\n * @param paramsFromGrid: Params to be passed to the component and passed by AG Grid. This will get merged with any params\n * specified by the user in the configuration\n * @param propertyName: The name of the property used in ag-grid as a convention to refer to the component, it can be:\n * 'floatingFilter', 'cellRenderer', is used to find if the user is specifying a custom component\n * @param defaultComponentName: The actual name of the component to instantiate, this is usually the same as propertyName, but in\n * some cases is not, like floatingFilter, if it is the same is not necessary to specify\n * @param optional: Handy method to tell if this should return a component ALWAYS. if that is the case, but there is no\n * component found, it throws an error, by default all components are MANDATORY\n */\n UserComponentFactory.prototype.lookupAndCreateComponent = function (def, paramsFromGrid, componentType, defaultComponentName, \n // optional items are: FloatingFilter, CellComp (for cellRenderer)\n optional) {\n if (optional === void 0) { optional = false; }\n var compDetails = this.getCompDetails(def, componentType, defaultComponentName, paramsFromGrid, !optional);\n if (!compDetails) {\n return null;\n }\n return this.createInstanceFromCompDetails(compDetails, defaultComponentName);\n };\n UserComponentFactory.prototype.addReactHacks = function (params) {\n // a temporary fix for AG-1574\n // AG-1715 raised to do a wider ranging refactor to improve this\n var agGridReact = this.context.getBean('agGridReact');\n if (agGridReact) {\n params.agGridReact = cloneObject(agGridReact);\n }\n // AG-1716 - directly related to AG-1574 and AG-1715\n var frameworkComponentWrapper = this.context.getBean('frameworkComponentWrapper');\n if (frameworkComponentWrapper) {\n params.frameworkComponentWrapper = frameworkComponentWrapper;\n }\n };\n UserComponentFactory.prototype.logComponentMissing = function (holder, propertyName, defaultComponentName) {\n // to help the user, we print out the name they are looking for, rather than the default name.\n // i don't know why the default name was originally printed out (that doesn't help the user)\n var overrideName = holder ? holder[propertyName] : defaultComponentName;\n var nameToReport = overrideName ? overrideName : defaultComponentName;\n console.error(\"Could not find component \" + nameToReport + \", did you forget to configure this component?\");\n };\n UserComponentFactory.prototype.createComponentInstance = function (componentType, defaultComponentName, component, componentFromFramework) {\n var propertyName = componentType.propertyName;\n // using javascript component\n var jsComponent = !componentFromFramework;\n if (jsComponent) {\n return new component();\n }\n if (!this.frameworkComponentWrapper) {\n console.warn(\"AG Grid - Because you are using our new React UI (property reactUi=true), it is not possible to use a React Component for \" + componentType.propertyName + \". This is work in progress and we plan to support this soon. In the meantime, please either set reactUi=false, or replace this component with one written in JavaScript.\");\n return null;\n }\n // Using framework component\n var FrameworkComponentRaw = component;\n var thisComponentConfig = this.componentMetadataProvider.retrieve(propertyName);\n return this.frameworkComponentWrapper.wrap(FrameworkComponentRaw, thisComponentConfig.mandatoryMethodList, thisComponentConfig.optionalMethodList, componentType, defaultComponentName);\n };\n UserComponentFactory.prototype.initComponent = function (component, params) {\n this.context.createBean(component);\n if (component.init == null) {\n return;\n }\n return component.init(params);\n };\n __decorate$y([\n Autowired('gridOptions')\n ], UserComponentFactory.prototype, \"gridOptions\", void 0);\n __decorate$y([\n Autowired('agComponentUtils')\n ], UserComponentFactory.prototype, \"agComponentUtils\", void 0);\n __decorate$y([\n Autowired('componentMetadataProvider')\n ], UserComponentFactory.prototype, \"componentMetadataProvider\", void 0);\n __decorate$y([\n Autowired('userComponentRegistry')\n ], UserComponentFactory.prototype, \"userComponentRegistry\", void 0);\n __decorate$y([\n Optional('frameworkComponentWrapper')\n ], UserComponentFactory.prototype, \"frameworkComponentWrapper\", void 0);\n UserComponentFactory = __decorate$y([\n Bean('userComponentFactory')\n ], UserComponentFactory);\n return UserComponentFactory;\n}(BeanStub));\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / React / AngularJS / Web Components\n * @version v26.1.0\n * @link http://www.ag-grid.com/\n * @license MIT\n */\nvar SideBarDefParser = /** @class */ (function () {\n function SideBarDefParser() {\n }\n SideBarDefParser.parse = function (toParse) {\n if (!toParse) {\n return null;\n }\n if (toParse === true) {\n return {\n toolPanels: [\n SideBarDefParser.DEFAULT_COLUMN_COMP,\n SideBarDefParser.DEFAULT_FILTER_COMP,\n ],\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 }\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 / React / AngularJS / Web Components\n * @version v26.1.0\n * @link http://www.ag-grid.com/\n * @license MIT\n */\nvar __decorate$z = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n 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$3 = (undefined && undefined.__param) || function (paramIndex, decorator) {\n return function (target, key) { decorator(target, key, paramIndex); }\n};\nvar __spreadArrays$4 = (undefined && undefined.__spreadArrays) || function () {\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\n r[k] = a[j];\n return r;\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. ' +\n 'This is because the rows are lazy loaded, so selecting a group is not possible as' +\n '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 us these together on our support forum either you will get the same answer!\");\n }\n if (this.isRowModelServerSide()) {\n var msg = function (prop) { return \"AG Grid: '\" + prop + \"' is not supported on the Server-Side Row Model\"; };\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 (this.isEnableRangeSelection()) {\n ModuleRegistry.assertRegistered(exports.ModuleNames.RangeSelectionModule, 'enableRangeSelection');\n }\n if (!this.isEnableRangeSelection() && (this.isEnableRangeHandle() || this.isEnableFillHandle())) {\n console.warn(\"AG Grid: 'enableRangeHandle' and 'enableFillHandle' will not work unless 'enableRangeSelection' is set to true\");\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 = __spreadArrays$4(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 = __spreadArrays$4(PropertyKeys.ALL_PROPERTIES, PropertyKeys.FRAMEWORK_PROPERTIES, values(Events).map(function (event) { return ComponentUtil.getCallbackForEvent(event); }));\n var validPropertiesAndExceptions = __spreadArrays$4(validProperties, ['api', 'columnApi']);\n this.checkProperties(userProperties, validPropertiesAndExceptions, validProperties, 'gridOptions', 'https://www.ag-grid.com/javascript-grid-properties/');\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 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) ||\n 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 var result = isTrue(this.gridOptions.groupSelectsChildren);\n if (result && this.isTreeData()) {\n console.warn('AG Grid: groupSelectsChildren does not work with tree data');\n return false;\n }\n return result;\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.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 ?\n this.matchesGroupDisplayType('groupRows', this.gridOptions.groupDisplayType) : false;\n };\n GridOptionsWrapper.prototype.isGroupSuppressAutoColumn = function () {\n var isCustomRowGroups = this.gridOptions.groupDisplayType ?\n this.matchesGroupDisplayType('custom', this.gridOptions.groupDisplayType) : false;\n if (isCustomRowGroups) {\n return true;\n }\n return this.gridOptions.treeDataDisplayType ?\n 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.isSuppressCellSelection = function () {\n return isTrue(this.gridOptions.suppressCellSelection);\n };\n GridOptionsWrapper.prototype.isSuppressMultiSort = function () {\n return isTrue(this.gridOptions.suppressMultiSort);\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.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.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 = [\n Constants.DOM_LAYOUT_PRINT,\n Constants.DOM_LAYOUT_AUTO_HEIGHT,\n Constants.DOM_LAYOUT_NORMAL\n ];\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.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.gridOptions.getRowStyle;\n };\n GridOptionsWrapper.prototype.getRowClassFunc = function () {\n return this.gridOptions.getRowClass;\n };\n GridOptionsWrapper.prototype.rowClassRules = function () {\n return this.gridOptions.rowClassRules;\n };\n GridOptionsWrapper.prototype.getServerSideStoreType = function () {\n return this.gridOptions.serverSideStoreType;\n };\n GridOptionsWrapper.prototype.getServerSideStoreParamsFunc = function () {\n return this.gridOptions.getServerSideStoreParams;\n };\n GridOptionsWrapper.prototype.getCreateChartContainerFunc = function () {\n return 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.gridOptions.postProcessPopup;\n };\n GridOptionsWrapper.prototype.getPaginationNumberFormatterFunc = function () {\n return this.gridOptions.paginationNumberFormatter;\n };\n GridOptionsWrapper.prototype.getChildCountFunc = function () {\n return this.gridOptions.getChildCount;\n };\n GridOptionsWrapper.prototype.getIsApplyServerSideTransactionFunc = function () {\n return this.gridOptions.isApplyServerSideTransaction;\n };\n GridOptionsWrapper.prototype.getDefaultGroupOrderComparator = function () {\n return this.gridOptions.defaultGroupOrderComparator;\n };\n GridOptionsWrapper.prototype.getIsFullWidthCellFunc = function () {\n return this.gridOptions.isFullWidthCell;\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.isImmutableData = function () {\n return isTrue(this.gridOptions.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(exports.ModuleNames.GridChartsModule, 'enableCharts');\n }\n return false;\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 return this.gridOptions.maxConcurrentDatasourceRequests;\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.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.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.isCopyHeadersToClipboard = function () {\n return isTrue(this.gridOptions.copyHeadersToClipboard);\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.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 return isTrue(this.gridOptions.suppressAggFilteredOnly);\n };\n GridOptionsWrapper.prototype.isShowOpenedGroup = function () {\n return isTrue(this.gridOptions.showOpenedGroup);\n };\n GridOptionsWrapper.prototype.isEnableRangeSelection = function () {\n return ModuleRegistry.isRegistered(exports.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 () { return console.warn(\"AG Grid: valid values for fillHandleDirection are 'x', 'y' and 'xy'. Default to 'xy'.\"); }, 'warn invalid fill direction');\n return 'xy';\n }\n return direction;\n };\n GridOptionsWrapper.prototype.getFillOperation = function () {\n return 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.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(exports.ModuleNames.MasterDetailModule, 'masterDetail');\n }\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.isFloatingFilter = function () {\n return this.gridOptions.floatingFilter;\n };\n GridOptionsWrapper.prototype.isEnableCellTextSelect = function () {\n return isTrue(this.gridOptions.enableCellTextSelection);\n };\n GridOptionsWrapper.prototype.isEnableOldSetFilterModel = function () {\n return isTrue(this.gridOptions.enableOldSetFilterModel);\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.gridOptions.isServerSideGroupOpenByDefault;\n };\n GridOptionsWrapper.prototype.getIsGroupOpenByDefaultFunc = function () {\n return this.gridOptions.isGroupOpenByDefault;\n };\n GridOptionsWrapper.prototype.getServerSideGroupKeyFunc = function () {\n return this.gridOptions.getServerSideGroupKey;\n };\n GridOptionsWrapper.prototype.getGroupRowAggNodesFunc = function () {\n return this.gridOptions.groupRowAggNodes;\n };\n GridOptionsWrapper.prototype.getContextMenuItemsFunc = function () {\n return this.gridOptions.getContextMenuItems;\n };\n GridOptionsWrapper.prototype.getMainMenuItemsFunc = function () {\n return this.gridOptions.getMainMenuItems;\n };\n GridOptionsWrapper.prototype.getRowNodeIdFunc = function () {\n return this.gridOptions.getRowNodeId;\n };\n GridOptionsWrapper.prototype.getNavigateToNextHeaderFunc = function () {\n return this.gridOptions.navigateToNextHeader;\n };\n GridOptionsWrapper.prototype.getTabToNextHeaderFunc = function () {\n return this.gridOptions.tabToNextHeader;\n };\n GridOptionsWrapper.prototype.getNavigateToNextCellFunc = function () {\n return this.gridOptions.navigateToNextCell;\n };\n GridOptionsWrapper.prototype.getTabToNextCellFunc = function () {\n return 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(exports.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.getProcessSecondaryColDefFunc = function () {\n return this.gridOptions.processSecondaryColDef;\n };\n GridOptionsWrapper.prototype.getProcessSecondaryColGroupDefFunc = function () {\n return this.gridOptions.processSecondaryColGroupDef;\n };\n GridOptionsWrapper.prototype.getSendToClipboardFunc = function () {\n return this.gridOptions.sendToClipboard;\n };\n GridOptionsWrapper.prototype.getProcessRowPostCreateFunc = function () {\n return this.gridOptions.processRowPostCreate;\n };\n GridOptionsWrapper.prototype.getProcessCellForClipboardFunc = function () {\n return this.gridOptions.processCellForClipboard;\n };\n GridOptionsWrapper.prototype.getProcessHeaderForClipboardFunc = function () {\n return this.gridOptions.processHeaderForClipboard;\n };\n GridOptionsWrapper.prototype.getProcessCellFromClipboardFunc = function () {\n return 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.isServerSideSortingAlwaysResets = function () {\n return isTrue(this.gridOptions.serverSideSortingAlwaysResets);\n };\n GridOptionsWrapper.prototype.isServerSideFilteringAlwaysResets = function () {\n return isTrue(this.gridOptions.serverSideFilteringAlwaysResets);\n };\n GridOptionsWrapper.prototype.getPostSortFunc = function () {\n return this.gridOptions.postSort;\n };\n GridOptionsWrapper.prototype.getChartToolbarItemsFunc = function () {\n return 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.getAllowProcessChartOptions = function () {\n return this.gridOptions.allowProcessChartOptions;\n };\n GridOptionsWrapper.prototype.getProcessChartOptionsFunc = function () {\n return this.gridOptions.processChartOptions;\n };\n GridOptionsWrapper.prototype.getClipboardDeliminator = function () {\n return exists(this.gridOptions.clipboardDeliminator) ? this.gridOptions.clipboardDeliminator : '\\t';\n };\n GridOptionsWrapper.prototype.setProperty = function (key, value, force) {\n if (force === void 0) { force = false; }\n var gridOptionsNoType = this.gridOptions;\n var previousValue = gridOptionsNoType[key];\n if (force || previousValue !== value) {\n gridOptionsNoType[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 }\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.getTooltipShowDelay = function () {\n var tooltipShowDelay = this.gridOptions.tooltipShowDelay;\n if (exists(tooltipShowDelay)) {\n if (tooltipShowDelay < 0) {\n console.warn('ag-grid: tooltipShowDelay should not be lower than 0');\n }\n return Math.max(200, tooltipShowDelay);\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 }\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 () { return console.warn(\"AG Grid: rowBuffer should not be negative\"); }, 'warn rowBuffer negative');\n this.gridOptions.rowBuffer = rowBuffer = 0;\n }\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.enableOldSetFilterModel) {\n console.warn('AG Grid: since v22.x, enableOldSetFilterModel is deprecated. Please move to the new Set Filter Model as the old one may not be supported in v23 onwards.');\n }\n if (options.floatingFilter) {\n console.warn('AG Grid: since v23.1, floatingFilter on the gridOptions is deprecated. Please use floatingFilter on the colDef instead.');\n if (!options.defaultColDef) {\n options.defaultColDef = {};\n }\n if (options.defaultColDef.floatingFilter == null) {\n options.defaultColDef.floatingFilter = true;\n }\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 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.defaultGroupSortComparator) {\n console.warn(\"AG Grid: since v26.0, the grid property `defaultGroupSortComparator` has been replaced by `defaultGroupOrderComparator`\");\n options.defaultGroupOrderComparator = options.defaultGroupSortComparator;\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 };\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 ' +\n '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 ' +\n '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 ' +\n 'provide getServerSideGroupKey function, please provide getServerSideGroupKey function if using tree data.');\n }\n }\n };\n GridOptionsWrapper.prototype.getLocaleTextFunc = function () {\n if (this.gridOptions.localeTextFunc) {\n return this.gridOptions.localeTextFunc;\n }\n var localeText = this.gridOptions.localeText;\n return function (key, defaultValue) {\n return localeText && localeText[key] ? localeText[key] : 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 // 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 if (this.gridOptions.rowHeight && this.isNumeric(this.gridOptions.rowHeight)) {\n return this.gridOptions.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.getRowHeightForNode = function (rowNode, allowEstimate, defaultRowHeight) {\n if (allowEstimate === void 0) { allowEstimate = false; }\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 (typeof this.gridOptions.getRowHeight === 'function') {\n if (allowEstimate) {\n return { height: this.getDefaultRowHeight(), estimated: true };\n }\n var params = {\n node: rowNode,\n data: rowNode.data,\n api: this.gridOptions.api,\n context: this.gridOptions.context\n };\n var height = this.gridOptions.getRowHeight(params);\n if (this.isNumeric(height)) {\n if (height === 0) {\n doOnce(function () { return console.warn('AG Grid: The return of `getRowHeight` cannot be zero. If the intention is to hide rows, use a filter instead.'); }, 'invalidRowHeight');\n }\n return { height: Math.max(1, height), estimated: false };\n }\n }\n if (rowNode.detail && this.isMasterDetail()) {\n if (this.isNumeric(this.gridOptions.detailRowHeight)) {\n return { height: this.gridOptions.detailRowHeight, estimated: false };\n }\n return { height: DEFAULT_DETAIL_ROW_HEIGHT, estimated: false };\n }\n var rowHeight = this.gridOptions.rowHeight && this.isNumeric(this.gridOptions.rowHeight) ? this.gridOptions.rowHeight : defaultRowHeight;\n return { height: rowHeight, estimated: false };\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_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 = 'isExternalFilterPresentFunc';\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_FILL_HANDLE_DIRECTION = 'fillHandleDirection';\n GridOptionsWrapper.PROP_GROUP_ROW_AGG_NODES = 'groupRowAggNodes';\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_IS_FULL_WIDTH_CELL = 'isFullWidthCell';\n GridOptionsWrapper.PROP_IS_ROW_SELECTABLE = 'isRowSelectable';\n GridOptionsWrapper.PROP_IS_ROW_MASTER = 'isRowMaster';\n GridOptionsWrapper.PROP_POST_SORT = 'postSort';\n GridOptionsWrapper.PROP_GET_DOCUMENT = 'getDocument';\n GridOptionsWrapper.PROP_POST_PROCESS_POPUP = 'postProcessPopup';\n GridOptionsWrapper.PROP_DEFAULT_GROUP_ORDER_COMPARATOR = 'defaultGroupOrderComparator';\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_TO_SECONDARY_COLDEF = 'processSecondaryColDef';\n GridOptionsWrapper.PROP_PROCESS_SECONDARY_COL_GROUP_DEF = 'processSecondaryColGroupDef';\n GridOptionsWrapper.PROP_PROCESS_CHART_OPTIONS = 'processChartOptions';\n GridOptionsWrapper.PROP_GET_CHART_TOOLBAR_ITEMS = 'getChartToolbarItems';\n GridOptionsWrapper.PROP_GET_SERVER_SIDE_STORE_PARAMS = 'getServerSideStoreParams';\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 __decorate$z([\n Autowired('gridOptions')\n ], GridOptionsWrapper.prototype, \"gridOptions\", void 0);\n __decorate$z([\n Autowired('eventService')\n ], GridOptionsWrapper.prototype, \"eventService\", void 0);\n __decorate$z([\n Autowired('environment')\n ], GridOptionsWrapper.prototype, \"environment\", void 0);\n __decorate$z([\n __param$3(0, Qualifier('gridApi')), __param$3(1, Qualifier('columnApi'))\n ], GridOptionsWrapper.prototype, \"agWire\", null);\n __decorate$z([\n PreDestroy\n ], GridOptionsWrapper.prototype, \"destroy\", null);\n __decorate$z([\n PostConstruct\n ], GridOptionsWrapper.prototype, \"init\", null);\n GridOptionsWrapper = GridOptionsWrapper_1 = __decorate$z([\n Bean('gridOptionsWrapper')\n ], GridOptionsWrapper);\n return GridOptionsWrapper;\n}());\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / React / AngularJS / Web Components\n * @version v26.1.0\n * @link http://www.ag-grid.com/\n * @license MIT\n */\n// when doing transactions, or change detection, and grouping is present\n// in the data, there is no need for the ClientSideRowModel to update each\n// group after an update, ony parts that were impacted by the change.\n// this class keeps track of all groups that were impacted by a transaction.\n// the the different CSRM operations (filter, sort etc) use the forEach method\n// to visit each group that was changed.\nvar ChangedPath = /** @class */ (function () {\n function ChangedPath(keepingColumns, rootNode) {\n // whether changed path is active of not. it is active when a) doing\n // a transaction update or b) doing change detection. if we are doing\n // a CSRM refresh for other reasons (after sort or filter, or user calling\n // setRowData() without delta mode) then we are not active. we are also\n // marked as not active if secondary columns change in pivot (as this impacts\n // aggregations)\n this.active = true;\n // for each node in the change path, we also store which columns need\n // to be re-aggregated.\n this.nodeIdsToColumns = {};\n // for quick lookup, all items in the change path are mapped by nodeId\n this.mapToItems = {};\n this.keepingColumns = keepingColumns;\n this.pathRoot = {\n rowNode: rootNode,\n children: null\n };\n this.mapToItems[rootNode.id] = this.pathRoot;\n }\n // can be set inactive by:\n // a) ClientSideRowModel, if no transactions or\n // b) PivotService, if secondary columns changed\n ChangedPath.prototype.setInactive = function () {\n this.active = false;\n };\n ChangedPath.prototype.isActive = function () {\n return this.active;\n };\n ChangedPath.prototype.depthFirstSearchChangedPath = function (pathItem, callback) {\n if (pathItem.children) {\n for (var i = 0; i < pathItem.children.length; i++) {\n this.depthFirstSearchChangedPath(pathItem.children[i], callback);\n }\n }\n callback(pathItem.rowNode);\n };\n ChangedPath.prototype.depthFirstSearchEverything = function (rowNode, callback, traverseEverything) {\n if (rowNode.childrenAfterGroup) {\n for (var i = 0; i < rowNode.childrenAfterGroup.length; i++) {\n var childNode = rowNode.childrenAfterGroup[i];\n if (childNode.childrenAfterGroup) {\n this.depthFirstSearchEverything(rowNode.childrenAfterGroup[i], callback, traverseEverything);\n }\n else if (traverseEverything) {\n callback(childNode);\n }\n }\n }\n callback(rowNode);\n };\n // traverseLeafNodes -> used when NOT doing changed path, ie traversing everything. the callback\n // will be called for child nodes in addition to parent nodes.\n ChangedPath.prototype.forEachChangedNodeDepthFirst = function (callback, traverseLeafNodes) {\n if (traverseLeafNodes === void 0) { traverseLeafNodes = false; }\n if (this.active) {\n // if we are active, then use the change path to callback\n // only for updated groups\n this.depthFirstSearchChangedPath(this.pathRoot, callback);\n }\n else {\n // we are not active, so callback for everything, walk the entire path\n this.depthFirstSearchEverything(this.pathRoot.rowNode, callback, traverseLeafNodes);\n }\n };\n ChangedPath.prototype.executeFromRootNode = function (callback) {\n callback(this.pathRoot.rowNode);\n };\n ChangedPath.prototype.createPathItems = function (rowNode) {\n var pointer = rowNode;\n var newEntryCount = 0;\n while (!this.mapToItems[pointer.id]) {\n var newEntry = {\n rowNode: pointer,\n children: null\n };\n this.mapToItems[pointer.id] = newEntry;\n newEntryCount++;\n pointer = pointer.parent;\n }\n return newEntryCount;\n };\n ChangedPath.prototype.populateColumnsMap = function (rowNode, columns) {\n var _this = this;\n if (!this.keepingColumns || !columns) {\n return;\n }\n var pointer = rowNode;\n while (pointer) {\n // if columns, add the columns in all the way to parent, merging\n // in any other columns that might be there already\n if (!this.nodeIdsToColumns[pointer.id]) {\n this.nodeIdsToColumns[pointer.id] = {};\n }\n columns.forEach(function (col) { return _this.nodeIdsToColumns[pointer.id][col.getId()] = true; });\n pointer = pointer.parent;\n }\n };\n ChangedPath.prototype.linkPathItems = function (rowNode, newEntryCount) {\n var pointer = rowNode;\n for (var i = 0; i < newEntryCount; i++) {\n var thisItem = this.mapToItems[pointer.id];\n var parentItem = this.mapToItems[pointer.parent.id];\n if (!parentItem.children) {\n parentItem.children = [];\n }\n parentItem.children.push(thisItem);\n pointer = pointer.parent;\n }\n };\n // called by\n // 1) change detection (provides cols) and\n // 2) groupStage if doing transaction update (doesn't provide cols)\n ChangedPath.prototype.addParentNode = function (rowNode, columns) {\n if (!rowNode || rowNode.isRowPinned()) {\n return;\n }\n // we cannot do both steps below in the same loop as\n // the second loop has a dependency on the first loop.\n // ie the hierarchy cannot be stitched up yet because\n // we don't have it built yet\n // create the new PathItem objects.\n var newEntryCount = this.createPathItems(rowNode);\n // link in the node items\n this.linkPathItems(rowNode, newEntryCount);\n // update columns\n this.populateColumnsMap(rowNode, columns);\n };\n ChangedPath.prototype.canSkip = function (rowNode) {\n return this.active && !this.mapToItems[rowNode.id];\n };\n ChangedPath.prototype.getValueColumnsForNode = function (rowNode, valueColumns) {\n if (!this.keepingColumns) {\n return valueColumns;\n }\n var colsForThisNode = this.nodeIdsToColumns[rowNode.id];\n var result = valueColumns.filter(function (col) { return colsForThisNode[col.getId()]; });\n return result;\n };\n ChangedPath.prototype.getNotValueColumnsForNode = function (rowNode, valueColumns) {\n if (!this.keepingColumns) {\n return null;\n }\n var colsForThisNode = this.nodeIdsToColumns[rowNode.id];\n var result = valueColumns.filter(function (col) { return !colsForThisNode[col.getId()]; });\n return result;\n };\n return ChangedPath;\n}());\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / React / AngularJS / Web Components\n * @version v26.1.0\n * @link http://www.ag-grid.com/\n * @license MIT\n */\nvar __extends$F = (undefined && undefined.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate$A = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n 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$4 = (undefined && undefined.__param) || function (paramIndex, decorator) {\n return function (target, key) { decorator(target, key, paramIndex); }\n};\nvar SelectionService = /** @class */ (function (_super) {\n __extends$F(SelectionService, _super);\n function SelectionService() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n SelectionService.prototype.setBeans = function (loggerFactory) {\n this.logger = loggerFactory.create('selectionService');\n this.reset();\n if (this.gridOptionsWrapper.isRowModelDefault()) {\n this.addManagedListener(this.eventService, Events.EVENT_ROW_DATA_CHANGED, this.reset.bind(this));\n }\n };\n SelectionService.prototype.init = function () {\n this.groupSelectsChildren = this.gridOptionsWrapper.isGroupSelectsChildren();\n this.addManagedListener(this.eventService, Events.EVENT_ROW_SELECTED, this.onRowSelected.bind(this));\n };\n SelectionService.prototype.setLastSelectedNode = function (rowNode) {\n this.lastSelectedNode = rowNode;\n };\n SelectionService.prototype.getLastSelectedNode = function () {\n return this.lastSelectedNode;\n };\n SelectionService.prototype.getSelectedNodes = function () {\n var selectedNodes = [];\n iterateObject(this.selectedNodes, function (key, rowNode) {\n if (rowNode) {\n selectedNodes.push(rowNode);\n }\n });\n return selectedNodes;\n };\n SelectionService.prototype.getSelectedRows = function () {\n var selectedRows = [];\n iterateObject(this.selectedNodes, function (key, rowNode) {\n if (rowNode && rowNode.data) {\n selectedRows.push(rowNode.data);\n }\n });\n return selectedRows;\n };\n SelectionService.prototype.removeGroupsFromSelection = function () {\n var _this = this;\n iterateObject(this.selectedNodes, function (key, rowNode) {\n if (rowNode && rowNode.group) {\n _this.selectedNodes[rowNode.id] = undefined;\n }\n });\n };\n // should only be called if groupSelectsChildren=true\n SelectionService.prototype.updateGroupsFromChildrenSelections = function (changedPath) {\n // we only do this when group selection state depends on selected children\n if (!this.gridOptionsWrapper.isGroupSelectsChildren()) {\n return;\n }\n // also only do it if CSRM (code should never allow this anyway)\n if (this.rowModel.getType() !== Constants.ROW_MODEL_TYPE_CLIENT_SIDE) {\n return;\n }\n var clientSideRowModel = this.rowModel;\n var rootNode = clientSideRowModel.getRootNode();\n if (!changedPath) {\n changedPath = new ChangedPath(true, rootNode);\n changedPath.setInactive();\n }\n changedPath.forEachChangedNodeDepthFirst(function (rowNode) {\n if (rowNode !== rootNode) {\n rowNode.calculateSelectedFromChildren();\n }\n });\n // clientSideRowModel.getTopLevelNodes()!.forEach((rowNode: RowNode) => {\n // rowNode.depthFirstSearch((node) => {\n // if (node.group) {\n // }\n // });\n // });\n };\n SelectionService.prototype.getNodeForIdIfSelected = function (id) {\n return this.selectedNodes[id];\n };\n SelectionService.prototype.clearOtherNodes = function (rowNodeToKeepSelected) {\n var _this = this;\n var groupsToRefresh = {};\n var updatedCount = 0;\n iterateObject(this.selectedNodes, function (key, otherRowNode) {\n if (otherRowNode && otherRowNode.id !== rowNodeToKeepSelected.id) {\n var rowNode = _this.selectedNodes[otherRowNode.id];\n updatedCount += rowNode.setSelectedParams({\n newValue: false,\n clearSelection: false,\n suppressFinishActions: true\n });\n if (_this.groupSelectsChildren && otherRowNode.parent) {\n groupsToRefresh[otherRowNode.parent.id] = otherRowNode.parent;\n }\n }\n });\n iterateObject(groupsToRefresh, function (key, group) {\n group.calculateSelectedFromChildren();\n });\n return updatedCount;\n };\n SelectionService.prototype.onRowSelected = function (event) {\n var rowNode = event.node;\n // we do not store the group rows when the groups select children\n if (this.groupSelectsChildren && rowNode.group) {\n return;\n }\n if (rowNode.isSelected()) {\n this.selectedNodes[rowNode.id] = rowNode;\n }\n else {\n this.selectedNodes[rowNode.id] = undefined;\n }\n };\n SelectionService.prototype.syncInRowNode = function (rowNode, oldNode) {\n this.syncInOldRowNode(rowNode, oldNode);\n this.syncInNewRowNode(rowNode);\n };\n // if the id has changed for the node, then this means the rowNode\n // is getting used for a different data item, which breaks\n // our selectedNodes, as the node now is mapped by the old id\n // which is inconsistent. so to keep the old node as selected,\n // we swap in the clone (with the old id and old data). this means\n // the oldNode is effectively a daemon we keep a reference to,\n // so if client calls api.getSelectedNodes(), it gets the daemon\n // in the result. when the client un-selects, the reference to the\n // daemon is removed. the daemon, because it's an oldNode, is not\n // used by the grid for rendering, it's a copy of what the node used\n // to be like before the id was changed.\n SelectionService.prototype.syncInOldRowNode = function (rowNode, oldNode) {\n var oldNodeHasDifferentId = exists(oldNode) && (rowNode.id !== oldNode.id);\n if (oldNodeHasDifferentId && oldNode) {\n var id = oldNode.id;\n var oldNodeSelected = this.selectedNodes[id] == rowNode;\n if (oldNodeSelected) {\n this.selectedNodes[oldNode.id] = oldNode;\n }\n }\n };\n SelectionService.prototype.syncInNewRowNode = function (rowNode) {\n if (exists(this.selectedNodes[rowNode.id])) {\n rowNode.setSelectedInitialValue(true);\n this.selectedNodes[rowNode.id] = rowNode;\n }\n else {\n rowNode.setSelectedInitialValue(false);\n }\n };\n SelectionService.prototype.reset = function () {\n this.logger.log('reset');\n this.selectedNodes = {};\n this.lastSelectedNode = null;\n };\n // returns a list of all nodes at 'best cost' - a feature to be used\n // with groups / trees. if a group has all it's children selected,\n // then the group appears in the result, but not the children.\n // Designed for use with 'children' as the group selection type,\n // where groups don't actually appear in the selection normally.\n SelectionService.prototype.getBestCostNodeSelection = function () {\n if (this.rowModel.getType() !== Constants.ROW_MODEL_TYPE_CLIENT_SIDE) {\n console.warn('getBestCostNodeSelection is only available when using normal row model');\n return;\n }\n var clientSideRowModel = this.rowModel;\n var topLevelNodes = clientSideRowModel.getTopLevelNodes();\n if (topLevelNodes === null) {\n console.warn('selectAll not available doing rowModel=virtual');\n return;\n }\n var result = [];\n // recursive function, to find the selected nodes\n function traverse(nodes) {\n for (var i = 0, l = nodes.length; i < l; i++) {\n var node = nodes[i];\n if (node.isSelected()) {\n result.push(node);\n }\n else {\n // if not selected, then if it's a group, and the group\n // has children, continue to search for selections\n var maybeGroup = node;\n if (maybeGroup.group && maybeGroup.children) {\n traverse(maybeGroup.children);\n }\n }\n }\n }\n traverse(topLevelNodes);\n return result;\n };\n SelectionService.prototype.setRowModel = function (rowModel) {\n this.rowModel = rowModel;\n };\n SelectionService.prototype.isEmpty = function () {\n var count = 0;\n iterateObject(this.selectedNodes, function (nodeId, rowNode) {\n if (rowNode) {\n count++;\n }\n });\n return count === 0;\n };\n SelectionService.prototype.deselectAllRowNodes = function (justFiltered) {\n if (justFiltered === void 0) { justFiltered = false; }\n var callback = function (rowNode) { return rowNode.selectThisNode(false); };\n var rowModelClientSide = this.rowModel.getType() === Constants.ROW_MODEL_TYPE_CLIENT_SIDE;\n if (justFiltered) {\n if (!rowModelClientSide) {\n console.error('AG Grid: selecting just filtered only works with In Memory Row Model');\n return;\n }\n var clientSideRowModel = this.rowModel;\n clientSideRowModel.forEachNodeAfterFilter(callback);\n }\n else {\n iterateObject(this.selectedNodes, function (id, rowNode) {\n // remember the reference can be to null, as we never 'delete' from the map\n if (rowNode) {\n callback(rowNode);\n }\n });\n // this clears down the map (whereas above only sets the items in map to 'undefined')\n this.reset();\n }\n // the above does not clean up the parent rows if they are selected\n if (rowModelClientSide && this.groupSelectsChildren) {\n this.updateGroupsFromChildrenSelections();\n }\n var event = {\n type: Events.EVENT_SELECTION_CHANGED,\n api: this.gridApi,\n columnApi: this.columnApi\n };\n this.eventService.dispatchEvent(event);\n };\n SelectionService.prototype.selectAllRowNodes = function (justFiltered) {\n if (justFiltered === void 0) { justFiltered = false; }\n if (this.rowModel.getType() !== Constants.ROW_MODEL_TYPE_CLIENT_SIDE) {\n throw new Error(\"selectAll only available with normal row model, ie not \" + this.rowModel.getType());\n }\n var clientSideRowModel = this.rowModel;\n var callback = function (rowNode) { return rowNode.selectThisNode(true); };\n if (justFiltered) {\n clientSideRowModel.forEachNodeAfterFilter(callback);\n }\n else {\n clientSideRowModel.forEachNode(callback);\n }\n // the above does not clean up the parent rows if they are selected\n if (this.rowModel.getType() === Constants.ROW_MODEL_TYPE_CLIENT_SIDE && this.groupSelectsChildren) {\n this.updateGroupsFromChildrenSelections();\n }\n var event = {\n type: Events.EVENT_SELECTION_CHANGED,\n api: this.gridApi,\n columnApi: this.columnApi\n };\n this.eventService.dispatchEvent(event);\n };\n /**\n * @method\n * @deprecated\n */\n SelectionService.prototype.selectNode = function (rowNode, tryMulti) {\n if (rowNode) {\n rowNode.setSelectedParams({ newValue: true, clearSelection: !tryMulti });\n }\n };\n /**\n * @method\n * @deprecated\n */\n SelectionService.prototype.deselectIndex = function (rowIndex) {\n var node = this.rowModel.getRow(rowIndex);\n this.deselectNode(node);\n };\n /**\n * @method\n * @deprecated\n */\n SelectionService.prototype.deselectNode = function (rowNode) {\n if (rowNode) {\n rowNode.setSelectedParams({ newValue: false, clearSelection: false });\n }\n };\n /**\n * @method\n * @deprecated\n */\n SelectionService.prototype.selectIndex = function (index, tryMulti) {\n var node = this.rowModel.getRow(index);\n this.selectNode(node, tryMulti);\n };\n __decorate$A([\n Autowired('rowModel')\n ], SelectionService.prototype, \"rowModel\", void 0);\n __decorate$A([\n Autowired('columnApi')\n ], SelectionService.prototype, \"columnApi\", void 0);\n __decorate$A([\n Autowired('gridApi')\n ], SelectionService.prototype, \"gridApi\", void 0);\n __decorate$A([\n __param$4(0, Qualifier('loggerFactory'))\n ], SelectionService.prototype, \"setBeans\", null);\n __decorate$A([\n PostConstruct\n ], SelectionService.prototype, \"init\", null);\n SelectionService = __decorate$A([\n Bean('selectionService')\n ], SelectionService);\n return SelectionService;\n}(BeanStub));\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / React / AngularJS / Web Components\n * @version v26.1.0\n * @link http://www.ag-grid.com/\n * @license MIT\n */\nvar __decorate$B = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n 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 ColumnApi = /** @class */ (function () {\n function ColumnApi() {\n }\n /** Gets the grid to size the columns to the specified width in pixels, e.g. `sizeColumnsToFit(900)`. To have the grid fit the columns to the grid's width, use the Grid API `gridApi.sizeColumnsToFit()` instead. */\n ColumnApi.prototype.sizeColumnsToFit = function (gridWidth) {\n // AG-3403 validate that gridWidth is provided because this method has the same name as\n // a method on the grid API that takes no arguments, and it's easy to confuse the two\n if (typeof gridWidth === \"undefined\") {\n console.error('AG Grid: missing parameter to columnApi.sizeColumnsToFit(gridWidth)');\n }\n this.columnModel.sizeColumnsToFit(gridWidth, 'api');\n };\n /** Call this if you want to open or close a column group. */\n ColumnApi.prototype.setColumnGroupOpened = function (group, newValue) { this.columnModel.setColumnGroupOpened(group, newValue, 'api'); };\n /** Returns the column group with the given name. */\n ColumnApi.prototype.getColumnGroup = function (name, instanceId) { return this.columnModel.getColumnGroup(name, instanceId); };\n ColumnApi.prototype.getOriginalColumnGroup = function (name) { return this.columnModel.getOriginalColumnGroup(name); };\n /** Returns the display name for a column. Useful if you are doing your own header rendering and want the grid to work out if `headerValueGetter` is used, or if you are doing your own column management GUI, to know what to show as the column name. */\n ColumnApi.prototype.getDisplayNameForColumn = function (column, location) { return this.columnModel.getDisplayNameForColumn(column, location) || ''; };\n /** Returns the display name for a column group (when grouping columns). */\n ColumnApi.prototype.getDisplayNameForColumnGroup = function (columnGroup, location) { return this.columnModel.getDisplayNameForColumnGroup(columnGroup, location) || ''; };\n /** Returns the column with the given `colKey`, which can either be the `colId` (a string) or the `colDef` (an object). */\n ColumnApi.prototype.getColumn = function (key) { return this.columnModel.getPrimaryColumn(key); };\n /** Applies the state of the columns from a previous state. Returns `false` if one or more columns could not be found. */\n ColumnApi.prototype.applyColumnState = function (params) { return this.columnModel.applyColumnState(params, 'api'); };\n /** Gets the state of the columns. Typically used when saving column state. */\n ColumnApi.prototype.getColumnState = function () { return this.columnModel.getColumnState(); };\n /** Sets the state back to match the originally provided column definitions. */\n ColumnApi.prototype.resetColumnState = function () { this.columnModel.resetColumnState('api'); };\n /** Gets the state of the column groups. Typically used when saving column group state. */\n ColumnApi.prototype.getColumnGroupState = function () { return this.columnModel.getColumnGroupState(); };\n /** Sets the state of the column group state from a previous state. */\n ColumnApi.prototype.setColumnGroupState = function (stateItems) { this.columnModel.setColumnGroupState(stateItems, 'api'); };\n /** Sets the state back to match the originally provided column definitions. */\n ColumnApi.prototype.resetColumnGroupState = function () { this.columnModel.resetColumnGroupState('api'); };\n /** Returns `true` if pinning left or right, otherwise `false`. */\n ColumnApi.prototype.isPinning = function () { return this.columnModel.isPinningLeft() || this.columnModel.isPinningRight(); };\n /** Returns `true` if pinning left, otherwise `false`. */\n ColumnApi.prototype.isPinningLeft = function () { return this.columnModel.isPinningLeft(); };\n /** Returns `true` if pinning right, otherwise `false`. */\n ColumnApi.prototype.isPinningRight = function () { return this.columnModel.isPinningRight(); };\n /** Returns the column to the right of the provided column, taking into consideration open / closed column groups and visible columns. This is useful if you need to know what column is beside yours e.g. if implementing your own cell navigation. */\n ColumnApi.prototype.getDisplayedColAfter = function (col) { return this.columnModel.getDisplayedColAfter(col); };\n /** Same as `getVisibleColAfter` except gives column to the left. */\n ColumnApi.prototype.getDisplayedColBefore = function (col) { return this.columnModel.getDisplayedColBefore(col); };\n /** Sets the visibility of a column. Key can be the column ID or `Column` object. */\n ColumnApi.prototype.setColumnVisible = function (key, visible) { this.columnModel.setColumnVisible(key, visible, 'api'); };\n /** Same as `setColumnVisible`, but provide a list of column keys. */\n ColumnApi.prototype.setColumnsVisible = function (keys, visible) { this.columnModel.setColumnsVisible(keys, visible, 'api'); };\n /** Sets the column pinned / unpinned. Key can be the column ID, field, `ColDef` object or `Column` object. */\n ColumnApi.prototype.setColumnPinned = function (key, pinned) { this.columnModel.setColumnPinned(key, pinned, 'api'); };\n /** Same as `setColumnPinned`, but provide a list of column keys. */\n ColumnApi.prototype.setColumnsPinned = function (keys, pinned) { this.columnModel.setColumnsPinned(keys, pinned, 'api'); };\n /** Returns all the columns, regardless of visible or not. */\n ColumnApi.prototype.getAllColumns = function () { return this.columnModel.getAllPrimaryColumns(); };\n /**\n * Returns all the grid columns, same as `getAllColumns()`, except\n *\n * a) it has the order of the columns that are presented in the grid\n *\n * b) it's after the 'pivot' step, so if pivoting, has the value columns for the pivot.\n */\n ColumnApi.prototype.getAllGridColumns = function () { return this.columnModel.getAllGridColumns(); };\n /** Same as `getAllDisplayedColumns` but just for the pinned left portion of the grid. */\n ColumnApi.prototype.getDisplayedLeftColumns = function () { return this.columnModel.getDisplayedLeftColumns(); };\n /** Same as `getAllDisplayedColumns` but just for the center portion of the grid. */\n ColumnApi.prototype.getDisplayedCenterColumns = function () { return this.columnModel.getDisplayedCenterColumns(); };\n /** Same as `getAllDisplayedColumns` but just for the pinned right portion of the grid. */\n ColumnApi.prototype.getDisplayedRightColumns = function () { return this.columnModel.getDisplayedRightColumns(); };\n /** Returns all columns currently displayed (e.g. are visible and if in a group, the group is showing the columns) for the pinned left, centre and pinned right portions of the grid. */\n ColumnApi.prototype.getAllDisplayedColumns = function () { return this.columnModel.getAllDisplayedColumns(); };\n /** Same as `getAllGridColumns()`, except only returns rendered columns, i.e. columns that are not within the viewport and therefore not rendered, due to column virtualisation, are not displayed. */\n ColumnApi.prototype.getAllDisplayedVirtualColumns = function () { return this.columnModel.getViewportColumns(); };\n /** Moves a column to `toIndex`. The column is first removed, then added at the `toIndex` location, thus index locations will change to the right of the column after the removal. */\n ColumnApi.prototype.moveColumn = function (key, toIndex) {\n if (typeof key === 'number') {\n // moveColumn used to take indexes, so this is advising user who hasn't moved to new method name\n console.warn('AG Grid: you are using moveColumn(fromIndex, toIndex) - moveColumn takes a column key and a destination index, not two indexes, to move with indexes use moveColumnByIndex(from,to) instead');\n this.columnModel.moveColumnByIndex(key, toIndex, 'api');\n }\n else {\n this.columnModel.moveColumn(key, toIndex, 'api');\n }\n };\n /** Same as `moveColumn` but works on index locations. */\n ColumnApi.prototype.moveColumnByIndex = function (fromIndex, toIndex) { this.columnModel.moveColumnByIndex(fromIndex, toIndex, 'api'); };\n /** Same as `moveColumn` but works on list. */\n ColumnApi.prototype.moveColumns = function (columnsToMoveKeys, toIndex) { this.columnModel.moveColumns(columnsToMoveKeys, toIndex, 'api'); };\n /** Move the column to a new position in the row grouping order. */\n ColumnApi.prototype.moveRowGroupColumn = function (fromIndex, toIndex) { this.columnModel.moveRowGroupColumn(fromIndex, toIndex); };\n /** Sets the agg function for a column. `aggFunc` can be one of `'min' | 'max' | 'sum'`. */\n ColumnApi.prototype.setColumnAggFunc = function (key, aggFunc) { this.columnModel.setColumnAggFunc(key, aggFunc); };\n /** Sets the column width on a single column. The finished flag gets included in the resulting event and not used internally by the grid. The finished flag is intended for dragging, where a dragging action will produce many `columnWidth` events, so the consumer of events knows when it receives the last event in a stream. The finished parameter is optional, and defaults to `true`. */\n ColumnApi.prototype.setColumnWidth = function (key, newWidth, finished, source) {\n if (finished === void 0) { finished = true; }\n this.columnModel.setColumnWidths([{ key: key, newWidth: newWidth }], false, finished, source);\n };\n /** Sets the column widths on multiple columns. This method offers better performance than calling `setColumnWidth` multiple times. The finished flag gets included in the resulting event and not used internally by the grid. The finished flag is intended for dragging, where a dragging action will produce many `columnWidth` events, so the consumer of events knows when it receives the last event in a stream. The finished parameter is optional, and defaults to `true`. */\n ColumnApi.prototype.setColumnWidths = function (columnWidths, finished, source) {\n if (finished === void 0) { finished = true; }\n this.columnModel.setColumnWidths(columnWidths, false, finished, source);\n };\n /** Set the pivot mode. */\n ColumnApi.prototype.setPivotMode = function (pivotMode) { this.columnModel.setPivotMode(pivotMode); };\n /** Get the pivot mode. */\n ColumnApi.prototype.isPivotMode = function () { return this.columnModel.isPivotMode(); };\n /** Returns the pivot column for the given `pivotKeys` and `valueColId`. Useful to then call operations on the pivot column. */\n ColumnApi.prototype.getSecondaryPivotColumn = function (pivotKeys, valueColKey) { return this.columnModel.getSecondaryPivotColumn(pivotKeys, valueColKey); };\n ColumnApi.prototype.setValueColumns = function (colKeys) { this.columnModel.setValueColumns(colKeys, 'api'); };\n /** Get value columns. */\n ColumnApi.prototype.getValueColumns = function () { return this.columnModel.getValueColumns(); };\n /** Remove a value column. */\n ColumnApi.prototype.removeValueColumn = function (colKey) { this.columnModel.removeValueColumn(colKey, 'api'); };\n /** Same as `removeValueColumns` but provide a list. */\n ColumnApi.prototype.removeValueColumns = function (colKeys) { this.columnModel.removeValueColumns(colKeys, 'api'); };\n /** Add a value column. */\n ColumnApi.prototype.addValueColumn = function (colKey) { this.columnModel.addValueColumn(colKey, 'api'); };\n /** Same as `addValueColumn` but provide a list. */\n ColumnApi.prototype.addValueColumns = function (colKeys) { this.columnModel.addValueColumns(colKeys, 'api'); };\n /** Set the row group columns. */\n ColumnApi.prototype.setRowGroupColumns = function (colKeys) { this.columnModel.setRowGroupColumns(colKeys, 'api'); };\n /** Remove a column from the row groups. */\n ColumnApi.prototype.removeRowGroupColumn = function (colKey) { this.columnModel.removeRowGroupColumn(colKey, 'api'); };\n /** Same as `removeRowGroupColumn` but provide a list of columns. */\n ColumnApi.prototype.removeRowGroupColumns = function (colKeys) { this.columnModel.removeRowGroupColumns(colKeys, 'api'); };\n /** Add a column to the row groups. */\n ColumnApi.prototype.addRowGroupColumn = function (colKey) { this.columnModel.addRowGroupColumn(colKey, 'api'); };\n /** Same as `addRowGroupColumn` but provide a list of columns. */\n ColumnApi.prototype.addRowGroupColumns = function (colKeys) { this.columnModel.addRowGroupColumns(colKeys, 'api'); };\n /** Get row group columns. */\n ColumnApi.prototype.getRowGroupColumns = function () { return this.columnModel.getRowGroupColumns(); };\n /** Set the pivot columns. */\n ColumnApi.prototype.setPivotColumns = function (colKeys) { this.columnModel.setPivotColumns(colKeys, 'api'); };\n /** Remove a pivot column. */\n ColumnApi.prototype.removePivotColumn = function (colKey) { this.columnModel.removePivotColumn(colKey, 'api'); };\n /** Same as `removePivotColumn` but provide a list of columns. */\n ColumnApi.prototype.removePivotColumns = function (colKeys) { this.columnModel.removePivotColumns(colKeys, 'api'); };\n /** Add a pivot column. */\n ColumnApi.prototype.addPivotColumn = function (colKey) { this.columnModel.addPivotColumn(colKey, 'api'); };\n /** Same as `addPivotColumn` but provide a list of columns. */\n ColumnApi.prototype.addPivotColumns = function (colKeys) { this.columnModel.addPivotColumns(colKeys, 'api'); };\n /** Get the pivot columns. */\n ColumnApi.prototype.getPivotColumns = function () { return this.columnModel.getPivotColumns(); };\n /** Same as `getAllDisplayedColumnGroups` but just for the pinned left portion of the grid. */\n ColumnApi.prototype.getLeftDisplayedColumnGroups = function () { return this.columnModel.getDisplayedTreeLeft(); };\n /** Same as `getAllDisplayedColumnGroups` but just for the center portion of the grid. */\n ColumnApi.prototype.getCenterDisplayedColumnGroups = function () { return this.columnModel.getDisplayedTreeCentre(); };\n /** Same as `getAllDisplayedColumnGroups` but just for the pinned right portion of the grid. */\n ColumnApi.prototype.getRightDisplayedColumnGroups = function () { return this.columnModel.getDisplayedTreeRight(); };\n /** Returns all 'root' column headers. If you are not grouping columns, these return the columns. If you are grouping, these return the top level groups - you can navigate down through each one to get the other lower level headers and finally the columns at the bottom. */\n ColumnApi.prototype.getAllDisplayedColumnGroups = function () { return this.columnModel.getAllDisplayedTrees(); };\n /** Auto-sizes a column based on its contents. */\n ColumnApi.prototype.autoSizeColumn = function (key, skipHeader) { return this.columnModel.autoSizeColumn(key, skipHeader, 'api'); };\n /** Same as `autoSizeColumn`, but provide a list of column keys. */\n ColumnApi.prototype.autoSizeColumns = function (keys, skipHeader) { return this.columnModel.autoSizeColumns(keys, skipHeader, 'api'); };\n /** Calls `autoSizeColumns` on all displayed columns. */\n ColumnApi.prototype.autoSizeAllColumns = function (skipHeader) { this.columnModel.autoSizeAllColumns(skipHeader, 'api'); };\n /** Set the secondary pivot columns. */\n ColumnApi.prototype.setSecondaryColumns = function (colDefs) { this.columnModel.setSecondaryColumns(colDefs, 'api'); };\n /** Returns the grid's secondary columns. */\n ColumnApi.prototype.getSecondaryColumns = function () { return this.columnModel.getSecondaryColumns(); };\n /** Returns the grid's primary columns. */\n ColumnApi.prototype.getPrimaryColumns = function () { return this.columnModel.getAllPrimaryColumns(); };\n ColumnApi.prototype.cleanDownReferencesToAvoidMemoryLeakInCaseApplicationIsKeepingReferenceToDestroyedGrid = function () {\n // some users were raising support issues with regards memory leaks. the problem was the customers applications\n // were keeping references to the API. trying to educate them all would be difficult, easier to just remove\n // all references in teh API so at least the core grid can be garbage collected.\n //\n // wait about 100ms before clearing down the references, in case user has some cleanup to do,\n // and needs to deference the API first\n setTimeout(_.removeAllReferences.bind(window, this, 'Column API'), 100);\n };\n // below goes through deprecated items, prints message to user, then calls the new version of the same method\n // public getColumnDefs(): (ColDef | ColGroupDef)[] {\n // this.setColumnGroupOpened(group, newValue);\n // return null;\n // }\n /** @deprecated columnGroupOpened no longer exists, use setColumnGroupOpened */\n ColumnApi.prototype.columnGroupOpened = function (group, newValue) {\n console.error('AG Grid: columnGroupOpened no longer exists, use setColumnGroupOpened');\n this.setColumnGroupOpened(group, newValue);\n };\n /** @deprecated hideColumns is deprecated, use setColumnsVisible */\n ColumnApi.prototype.hideColumns = function (colIds, hide) {\n console.error('AG Grid: hideColumns is deprecated, use setColumnsVisible');\n this.columnModel.setColumnsVisible(colIds, !hide, 'api');\n };\n /** @deprecated hideColumn is deprecated, use setColumnVisible */\n ColumnApi.prototype.hideColumn = function (colId, hide) {\n console.error('AG Grid: hideColumn is deprecated, use setColumnVisible');\n this.columnModel.setColumnVisible(colId, !hide, 'api');\n };\n /** @deprecated setState is deprecated, use setColumnState */\n ColumnApi.prototype.setState = function (columnState) {\n console.error('AG Grid: setState is deprecated, use setColumnState');\n return this.setColumnState(columnState);\n };\n /** @deprecated getState is deprecated, use getColumnState */\n ColumnApi.prototype.getState = function () {\n console.error('AG Grid: getState is deprecated, use getColumnState');\n return this.getColumnState();\n };\n /** @deprecated resetState is deprecated, use resetColumnState */\n ColumnApi.prototype.resetState = function () {\n console.error('AG Grid: resetState is deprecated, use resetColumnState');\n this.resetColumnState();\n };\n /** @deprecated getAggregationColumns is deprecated, use getValueColumns */\n ColumnApi.prototype.getAggregationColumns = function () {\n console.error('AG Grid: getAggregationColumns is deprecated, use getValueColumns');\n return this.columnModel.getValueColumns();\n };\n /** @deprecated removeAggregationColumn is deprecated, use removeValueColumn */\n ColumnApi.prototype.removeAggregationColumn = function (colKey) {\n console.error('AG Grid: removeAggregationColumn is deprecated, use removeValueColumn');\n this.columnModel.removeValueColumn(colKey, 'api');\n };\n /** @deprecated removeAggregationColumns is deprecated, use removeValueColumns */\n ColumnApi.prototype.removeAggregationColumns = function (colKeys) {\n console.error('AG Grid: removeAggregationColumns is deprecated, use removeValueColumns');\n this.columnModel.removeValueColumns(colKeys, 'api');\n };\n /** @deprecated addAggregationColumn is deprecated, use addValueColumn */\n ColumnApi.prototype.addAggregationColumn = function (colKey) {\n console.error('AG Grid: addAggregationColumn is deprecated, use addValueColumn');\n this.columnModel.addValueColumn(colKey, 'api');\n };\n /** @deprecated addAggregationColumns is deprecated, use addValueColumns */\n ColumnApi.prototype.addAggregationColumns = function (colKeys) {\n console.error('AG Grid: addAggregationColumns is deprecated, use addValueColumns');\n this.columnModel.addValueColumns(colKeys, 'api');\n };\n /** @deprecated setColumnAggFunction is deprecated, use setColumnAggFunc */\n ColumnApi.prototype.setColumnAggFunction = function (column, aggFunc) {\n console.error('AG Grid: setColumnAggFunction is deprecated, use setColumnAggFunc');\n this.columnModel.setColumnAggFunc(column, aggFunc, 'api');\n };\n /** @deprecated getDisplayNameForCol is deprecated, use getDisplayNameForColumn */\n ColumnApi.prototype.getDisplayNameForCol = function (column) {\n console.error('AG Grid: getDisplayNameForCol is deprecated, use getDisplayNameForColumn');\n return this.getDisplayNameForColumn(column, null);\n };\n /** @deprecated setColumnState is deprecated, use applyColumnState. */\n ColumnApi.prototype.setColumnState = function (columnState) {\n console.error('AG Grid: setColumnState is deprecated, use applyColumnState');\n return this.columnModel.applyColumnState({ state: columnState, applyOrder: true }, 'api');\n };\n __decorate$B([\n Autowired('columnModel')\n ], ColumnApi.prototype, \"columnModel\", void 0);\n __decorate$B([\n PreDestroy\n ], ColumnApi.prototype, \"cleanDownReferencesToAvoidMemoryLeakInCaseApplicationIsKeepingReferenceToDestroyedGrid\", null);\n ColumnApi = __decorate$B([\n Bean('columnApi')\n ], ColumnApi);\n return ColumnApi;\n}());\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / React / AngularJS / Web Components\n * @version v26.1.0\n * @link http://www.ag-grid.com/\n * @license MIT\n */\n(function (SelectionHandleType) {\n SelectionHandleType[SelectionHandleType[\"FILL\"] = 0] = \"FILL\";\n SelectionHandleType[SelectionHandleType[\"RANGE\"] = 1] = \"RANGE\";\n})(exports.SelectionHandleType || (exports.SelectionHandleType = {}));\n(function (CellRangeType) {\n CellRangeType[CellRangeType[\"VALUE\"] = 0] = \"VALUE\";\n CellRangeType[CellRangeType[\"DIMENSION\"] = 1] = \"DIMENSION\";\n})(exports.CellRangeType || (exports.CellRangeType = {}));\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / React / AngularJS / Web Components\n * @version v26.1.0\n * @link http://www.ag-grid.com/\n * @license MIT\n */\nvar CSS_CELL_RANGE_SELECTED = 'ag-cell-range-selected';\nvar CSS_CELL_RANGE_CHART = 'ag-cell-range-chart';\nvar CSS_CELL_RANGE_SINGLE_CELL = 'ag-cell-range-single-cell';\nvar CSS_CELL_RANGE_CHART_CATEGORY = 'ag-cell-range-chart-category';\nvar CSS_CELL_RANGE_HANDLE = 'ag-cell-range-handle';\nvar CSS_CELL_RANGE_TOP = 'ag-cell-range-top';\nvar CSS_CELL_RANGE_RIGHT = 'ag-cell-range-right';\nvar CSS_CELL_RANGE_BOTTOM = 'ag-cell-range-bottom';\nvar CSS_CELL_RANGE_LEFT = 'ag-cell-range-left';\nvar CellRangeFeature = /** @class */ (function () {\n function CellRangeFeature(beans, ctrl) {\n this.beans = beans;\n this.cellCtrl = ctrl;\n }\n CellRangeFeature.prototype.setComp = function (cellComp) {\n this.cellComp = cellComp;\n this.onRangeSelectionChanged();\n };\n CellRangeFeature.prototype.onRangeSelectionChanged = function () {\n this.rangeCount = this.beans.rangeService.getCellRangeCount(this.cellCtrl.getCellPosition());\n this.hasChartRange = this.getHasChartRange();\n this.cellComp.addOrRemoveCssClass(CSS_CELL_RANGE_SELECTED, this.rangeCount !== 0);\n this.cellComp.addOrRemoveCssClass(CSS_CELL_RANGE_SELECTED + \"-1\", this.rangeCount === 1);\n this.cellComp.addOrRemoveCssClass(CSS_CELL_RANGE_SELECTED + \"-2\", this.rangeCount === 2);\n this.cellComp.addOrRemoveCssClass(CSS_CELL_RANGE_SELECTED + \"-3\", this.rangeCount === 3);\n this.cellComp.addOrRemoveCssClass(CSS_CELL_RANGE_SELECTED + \"-4\", this.rangeCount >= 4);\n this.cellComp.addOrRemoveCssClass(CSS_CELL_RANGE_CHART, this.hasChartRange);\n this.cellComp.setAriaSelected(this.rangeCount > 0 ? true : undefined);\n this.cellComp.addOrRemoveCssClass(CSS_CELL_RANGE_SINGLE_CELL, this.isSingleCell());\n this.updateRangeBorders();\n this.refreshHandle();\n };\n CellRangeFeature.prototype.updateRangeBorders = function () {\n var rangeBorders = this.getRangeBorders();\n var isSingleCell = this.isSingleCell();\n var isTop = !isSingleCell && rangeBorders.top;\n var isRight = !isSingleCell && rangeBorders.right;\n var isBottom = !isSingleCell && rangeBorders.bottom;\n var isLeft = !isSingleCell && rangeBorders.left;\n this.cellComp.addOrRemoveCssClass(CSS_CELL_RANGE_TOP, isTop);\n this.cellComp.addOrRemoveCssClass(CSS_CELL_RANGE_RIGHT, isRight);\n this.cellComp.addOrRemoveCssClass(CSS_CELL_RANGE_BOTTOM, isBottom);\n this.cellComp.addOrRemoveCssClass(CSS_CELL_RANGE_LEFT, isLeft);\n };\n CellRangeFeature.prototype.isSingleCell = function () {\n var rangeService = this.beans.rangeService;\n return this.rangeCount === 1 && rangeService && !rangeService.isMoreThanOneCell();\n };\n CellRangeFeature.prototype.getHasChartRange = function () {\n var rangeService = this.beans.rangeService;\n if (!this.rangeCount || !rangeService) {\n return false;\n }\n var cellRanges = rangeService.getCellRanges();\n return cellRanges.length > 0 && cellRanges.every(function (range) { return includes([exports.CellRangeType.DIMENSION, exports.CellRangeType.VALUE], range.type); });\n };\n CellRangeFeature.prototype.updateRangeBordersIfRangeCount = function () {\n // we only need to update range borders if we are in a range\n if (this.rangeCount > 0) {\n this.updateRangeBorders();\n this.refreshHandle();\n }\n };\n CellRangeFeature.prototype.getRangeBorders = function () {\n var _this = this;\n var isRtl = this.beans.gridOptionsWrapper.isEnableRtl();\n var top = false;\n var right = false;\n var bottom = false;\n var left = false;\n var thisCol = this.cellCtrl.getCellPosition().column;\n var _a = this.beans, rangeService = _a.rangeService, columnModel = _a.columnModel;\n var leftCol;\n var rightCol;\n if (isRtl) {\n leftCol = columnModel.getDisplayedColAfter(thisCol);\n rightCol = columnModel.getDisplayedColBefore(thisCol);\n }\n else {\n leftCol = columnModel.getDisplayedColBefore(thisCol);\n rightCol = columnModel.getDisplayedColAfter(thisCol);\n }\n var ranges = rangeService.getCellRanges().filter(function (range) { return rangeService.isCellInSpecificRange(_this.cellCtrl.getCellPosition(), range); });\n // this means we are the first column in the grid\n if (!leftCol) {\n left = true;\n }\n // this means we are the last column in the grid\n if (!rightCol) {\n right = true;\n }\n for (var i = 0; i < ranges.length; i++) {\n if (top && right && bottom && left) {\n break;\n }\n var range = ranges[i];\n var startRow = rangeService.getRangeStartRow(range);\n var endRow = rangeService.getRangeEndRow(range);\n if (!top && this.beans.rowPositionUtils.sameRow(startRow, this.cellCtrl.getCellPosition())) {\n top = true;\n }\n if (!bottom && this.beans.rowPositionUtils.sameRow(endRow, this.cellCtrl.getCellPosition())) {\n bottom = true;\n }\n if (!left && leftCol && range.columns.indexOf(leftCol) < 0) {\n left = true;\n }\n if (!right && rightCol && range.columns.indexOf(rightCol) < 0) {\n right = true;\n }\n }\n return { top: top, right: right, bottom: bottom, left: left };\n };\n CellRangeFeature.prototype.refreshHandle = function () {\n if (!this.beans.rangeService) {\n return;\n }\n var shouldHaveSelectionHandle = this.shouldHaveSelectionHandle();\n if (this.selectionHandle && !shouldHaveSelectionHandle) {\n this.selectionHandle = this.beans.context.destroyBean(this.selectionHandle);\n }\n if (shouldHaveSelectionHandle) {\n this.addSelectionHandle();\n }\n this.cellComp.addOrRemoveCssClass(CSS_CELL_RANGE_HANDLE, !!this.selectionHandle);\n };\n CellRangeFeature.prototype.shouldHaveSelectionHandle = function () {\n var _a = this.beans, gridOptionsWrapper = _a.gridOptionsWrapper, rangeService = _a.rangeService;\n var cellRanges = rangeService.getCellRanges();\n var rangesLen = cellRanges.length;\n if (this.rangeCount < 1 || rangesLen < 1) {\n return false;\n }\n var cellRange = last(cellRanges);\n var cellPosition = this.cellCtrl.getCellPosition();\n var isFillHandleAvailable = gridOptionsWrapper.isEnableFillHandle() && !this.cellCtrl.isSuppressFillHandle();\n var isRangeHandleAvailable = gridOptionsWrapper.isEnableRangeHandle();\n var handleIsAvailable = rangesLen === 1 && !this.cellCtrl.isEditing() && (isFillHandleAvailable || isRangeHandleAvailable);\n if (this.hasChartRange) {\n var hasCategoryRange = cellRanges[0].type === exports.CellRangeType.DIMENSION;\n var isCategoryCell = hasCategoryRange && rangeService.isCellInSpecificRange(cellPosition, cellRanges[0]);\n this.cellComp.addOrRemoveCssClass(CSS_CELL_RANGE_CHART_CATEGORY, isCategoryCell);\n handleIsAvailable = cellRange.type === exports.CellRangeType.VALUE;\n }\n return handleIsAvailable &&\n cellRange.endRow != null &&\n rangeService.isContiguousRange(cellRange) &&\n rangeService.isBottomRightCell(cellRange, cellPosition);\n };\n CellRangeFeature.prototype.addSelectionHandle = function () {\n var _a = this.beans, gridOptionsWrapper = _a.gridOptionsWrapper, rangeService = _a.rangeService;\n var cellRangeType = last(rangeService.getCellRanges()).type;\n var selectionHandleFill = gridOptionsWrapper.isEnableFillHandle() && missing(cellRangeType);\n var type = selectionHandleFill ? exports.SelectionHandleType.FILL : exports.SelectionHandleType.RANGE;\n if (this.selectionHandle && this.selectionHandle.getType() !== type) {\n this.selectionHandle = this.beans.context.destroyBean(this.selectionHandle);\n }\n if (!this.selectionHandle) {\n this.selectionHandle = this.beans.selectionHandleFactory.createSelectionHandle(type);\n }\n this.selectionHandle.refresh(this.cellCtrl);\n };\n CellRangeFeature.prototype.destroy = function () {\n this.beans.context.destroyBean(this.selectionHandle);\n };\n return CellRangeFeature;\n}());\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / React / AngularJS / Web Components\n * @version v26.1.0\n * @link http://www.ag-grid.com/\n * @license MIT\n */\nvar __extends$G = (undefined && undefined.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\n/**\n * Takes care of:\n * #) Cell Width (including when doing cell spanning, which makes width cover many columns)\n * #) Cell Height (when doing row span, otherwise we don't touch the height as it's just row height)\n * #) Cell Left (the horizontal positioning of the cell, the vertical positioning is on the row)\n */\nvar CellPositionFeature = /** @class */ (function (_super) {\n __extends$G(CellPositionFeature, _super);\n function CellPositionFeature(ctrl, beans) {\n var _this = _super.call(this) || this;\n _this.cellCtrl = ctrl;\n _this.beans = beans;\n _this.column = ctrl.getColumn();\n _this.rowNode = ctrl.getRowNode();\n _this.setupColSpan();\n _this.setupRowSpan();\n return _this;\n }\n CellPositionFeature.prototype.setupRowSpan = function () {\n this.rowSpan = this.column.getRowSpan(this.rowNode);\n };\n CellPositionFeature.prototype.setComp = function (comp) {\n this.cellComp = comp;\n this.onLeftChanged();\n this.onWidthChanged();\n this.applyRowSpan();\n };\n CellPositionFeature.prototype.onDisplayColumnsChanged = function () {\n var colsSpanning = this.getColSpanningList();\n if (!areEqual(this.colsSpanning, colsSpanning)) {\n this.colsSpanning = colsSpanning;\n this.onWidthChanged();\n this.onLeftChanged(); // left changes when doing RTL\n }\n };\n CellPositionFeature.prototype.setupColSpan = function () {\n // if no col span is active, then we don't set it up, as it would be wasteful of CPU\n if (this.column.getColDef().colSpan == null) {\n return;\n }\n this.colsSpanning = this.getColSpanningList();\n // because we are col spanning, a reorder of the cols can change what cols we are spanning over\n this.addManagedListener(this.beans.eventService, Events.EVENT_DISPLAYED_COLUMNS_CHANGED, this.onDisplayColumnsChanged.bind(this));\n // because we are spanning over multiple cols, we check for width any time any cols width changes.\n // this is expensive - really we should be explicitly checking only the cols we are spanning over\n // instead of every col, however it would be tricky code to track the cols we are spanning over, so\n // because hardly anyone will be using colSpan, am favouring this easier way for more maintainable code.\n this.addManagedListener(this.beans.eventService, Events.EVENT_DISPLAYED_COLUMNS_WIDTH_CHANGED, this.onWidthChanged.bind(this));\n };\n CellPositionFeature.prototype.onWidthChanged = function () {\n if (!this.cellComp) {\n return;\n }\n var width = this.getCellWidth();\n this.cellComp.setWidth(width + \"px\");\n };\n CellPositionFeature.prototype.getCellWidth = function () {\n if (!this.colsSpanning) {\n return this.column.getActualWidth();\n }\n return this.colsSpanning.reduce(function (width, col) { return width + col.getActualWidth(); }, 0);\n };\n CellPositionFeature.prototype.getColSpanningList = function () {\n var colSpan = this.column.getColSpan(this.rowNode);\n var colsSpanning = [];\n // if just one col, the col span is just the column we are in\n if (colSpan === 1) {\n colsSpanning.push(this.column);\n }\n else {\n var pointer = this.column;\n var pinned = this.column.getPinned();\n for (var i = 0; pointer && i < colSpan; i++) {\n colsSpanning.push(pointer);\n pointer = this.beans.columnModel.getDisplayedColAfter(pointer);\n if (!pointer || missing(pointer)) {\n break;\n }\n // we do not allow col spanning to span outside of pinned areas\n if (pinned !== pointer.getPinned()) {\n break;\n }\n }\n }\n return colsSpanning;\n };\n CellPositionFeature.prototype.onLeftChanged = function () {\n if (!this.cellComp) {\n return;\n }\n var left = this.modifyLeftForPrintLayout(this.getCellLeft());\n this.cellComp.setLeft(left + 'px');\n };\n CellPositionFeature.prototype.getCellLeft = function () {\n var mostLeftCol;\n if (this.beans.gridOptionsWrapper.isEnableRtl() && this.colsSpanning) {\n mostLeftCol = last(this.colsSpanning);\n }\n else {\n mostLeftCol = this.column;\n }\n return mostLeftCol.getLeft();\n };\n CellPositionFeature.prototype.modifyLeftForPrintLayout = function (leftPosition) {\n if (!this.cellCtrl.isPrintLayout() || this.column.getPinned() === Constants.PINNED_LEFT) {\n return leftPosition;\n }\n var leftWidth = this.beans.columnModel.getDisplayedColumnsLeftWidth();\n if (this.column.getPinned() === Constants.PINNED_RIGHT) {\n var bodyWidth = this.beans.columnModel.getBodyContainerWidth();\n return leftWidth + bodyWidth + (leftPosition || 0);\n }\n // is in body\n return leftWidth + (leftPosition || 0);\n };\n CellPositionFeature.prototype.applyRowSpan = function () {\n if (this.rowSpan === 1) {\n return;\n }\n var singleRowHeight = this.beans.gridOptionsWrapper.getRowHeightAsNumber();\n var totalRowHeight = singleRowHeight * this.rowSpan;\n this.cellComp.setHeight(totalRowHeight + \"px\");\n this.cellComp.setZIndex('1');\n };\n // overriding to make public, as we don't dispose this bean via context\n CellPositionFeature.prototype.destroy = function () {\n _super.prototype.destroy.call(this);\n };\n return CellPositionFeature;\n}(BeanStub));\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / React / AngularJS / Web Components\n * @version v26.1.0\n * @link http://www.ag-grid.com/\n * @license MIT\n */\nvar __extends$H = (undefined && undefined.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar CellCustomStyleFeature = /** @class */ (function (_super) {\n __extends$H(CellCustomStyleFeature, _super);\n function CellCustomStyleFeature(ctrl, beans) {\n var _this = _super.call(this) || this;\n _this.cellCtrl = ctrl;\n _this.beans = beans;\n _this.column = ctrl.getColumn();\n _this.rowNode = ctrl.getRowNode();\n return _this;\n }\n CellCustomStyleFeature.prototype.setComp = function (comp, scope) {\n this.cellComp = comp;\n this.scope = scope;\n this.applyUserStyles();\n this.applyCellClassRules();\n this.applyClassesFromColDef();\n };\n CellCustomStyleFeature.prototype.applyCellClassRules = function () {\n var _this = this;\n var colDef = this.column.getColDef();\n var cellClassParams = {\n value: this.cellCtrl.getValue(),\n data: this.rowNode.data,\n node: this.rowNode,\n colDef: colDef,\n rowIndex: this.rowNode.rowIndex,\n api: this.beans.gridOptionsWrapper.getApi(),\n columnApi: this.beans.gridOptionsWrapper.getColumnApi(),\n $scope: this.scope,\n context: this.beans.gridOptionsWrapper.getContext()\n };\n this.beans.stylingService.processClassRules(colDef.cellClassRules, cellClassParams, function (className) { return _this.cellComp.addOrRemoveCssClass(className, true); }, function (className) { return _this.cellComp.addOrRemoveCssClass(className, false); });\n };\n CellCustomStyleFeature.prototype.applyUserStyles = function () {\n var colDef = this.column.getColDef();\n if (!colDef.cellStyle) {\n return;\n }\n var styles;\n if (typeof colDef.cellStyle === 'function') {\n var cellStyleParams = {\n column: this.column,\n value: this.cellCtrl.getValue(),\n colDef: colDef,\n data: this.rowNode.data,\n node: this.rowNode,\n rowIndex: this.rowNode.rowIndex,\n $scope: this.scope,\n api: this.beans.gridOptionsWrapper.getApi(),\n columnApi: this.beans.gridOptionsWrapper.getColumnApi(),\n context: this.beans.gridOptionsWrapper.getContext(),\n };\n var cellStyleFunc = colDef.cellStyle;\n styles = cellStyleFunc(cellStyleParams);\n }\n else {\n styles = colDef.cellStyle;\n }\n this.cellComp.setUserStyles(styles);\n };\n CellCustomStyleFeature.prototype.applyClassesFromColDef = function () {\n var _this = this;\n var colDef = this.column.getColDef();\n var cellClassParams = {\n value: this.cellCtrl.getValue(),\n data: this.rowNode.data,\n node: this.rowNode,\n colDef: colDef,\n rowIndex: this.rowNode.rowIndex,\n $scope: this.scope,\n api: this.beans.gridOptionsWrapper.getApi(),\n columnApi: this.beans.gridOptionsWrapper.getColumnApi(),\n context: this.beans.gridOptionsWrapper.getContext()\n };\n this.beans.stylingService.processStaticCellClasses(colDef, cellClassParams, function (className) { return _this.cellComp.addOrRemoveCssClass(className, true); });\n };\n // overriding to make public, as we don't dispose this bean via context\n CellCustomStyleFeature.prototype.destroy = function () {\n _super.prototype.destroy.call(this);\n };\n return CellCustomStyleFeature;\n}(BeanStub));\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / React / AngularJS / Web Components\n * @version v26.1.0\n * @link http://www.ag-grid.com/\n * @license MIT\n */\nvar __extends$I = (undefined && undefined.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar TooltipFeature = /** @class */ (function (_super) {\n __extends$I(TooltipFeature, _super);\n function TooltipFeature(ctrl, beans) {\n var _this = _super.call(this) || this;\n _this.ctrl = ctrl;\n _this.beans = beans;\n return _this;\n }\n TooltipFeature.prototype.setComp = function (comp) {\n this.comp = comp;\n this.setupTooltip();\n };\n TooltipFeature.prototype.setupTooltip = function () {\n this.browserTooltips = this.beans.gridOptionsWrapper.isEnableBrowserTooltips();\n this.updateTooltipText();\n if (this.browserTooltips) {\n this.comp.setTitle(this.tooltipSanatised != null ? this.tooltipSanatised : undefined);\n }\n else {\n this.createTooltipFeatureIfNeeded();\n }\n };\n TooltipFeature.prototype.updateTooltipText = function () {\n this.tooltip = this.ctrl.getTooltipValue();\n this.tooltipSanatised = escapeString(this.tooltip);\n };\n TooltipFeature.prototype.createTooltipFeatureIfNeeded = function () {\n var _this = this;\n if (this.genericTooltipFeature != null) {\n return;\n }\n var parent = {\n getTooltipParams: function () { return _this.getTooltipParams(); },\n getGui: function () { return _this.ctrl.getGui(); }\n };\n this.genericTooltipFeature = this.createManagedBean(new CustomTooltipFeature(parent), this.beans.context);\n };\n TooltipFeature.prototype.refreshToolTip = function () {\n this.updateTooltipText();\n if (this.browserTooltips) {\n this.comp.setTitle(this.tooltipSanatised != null ? this.tooltipSanatised : undefined);\n }\n };\n TooltipFeature.prototype.getTooltipParams = function () {\n var ctrl = this.ctrl;\n var column = ctrl.getColumn ? ctrl.getColumn() : undefined;\n var colDef = ctrl.getColDef ? ctrl.getColDef() : undefined;\n var rowNode = ctrl.getRowNode ? ctrl.getRowNode() : undefined;\n return {\n location: ctrl.getLocation(),\n colDef: colDef,\n column: column,\n rowIndex: ctrl.getRowIndex ? ctrl.getRowIndex() : undefined,\n node: rowNode,\n data: rowNode ? rowNode.data : undefined,\n value: this.getTooltipText(),\n valueFormatted: ctrl.getValueFormatted ? ctrl.getValueFormatted() : undefined\n };\n };\n TooltipFeature.prototype.getTooltipText = function () {\n return this.tooltip;\n };\n // overriding to make public, as we don't dispose this bean via context\n TooltipFeature.prototype.destroy = function () {\n _super.prototype.destroy.call(this);\n };\n return TooltipFeature;\n}(BeanStub));\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / React / AngularJS / Web Components\n * @version v26.1.0\n * @link http://www.ag-grid.com/\n * @license MIT\n */\nvar __decorate$C = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n 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/** Using the IoC has a slight performance consideration, which is no problem most of the\n * time, unless we are trashing objects - which is the case when scrolling and rowComp\n * and cellComp. So for performance reasons, RowComp and CellComp do not get autowired\n * with the IoC. Instead they get passed this object which is all the beans the RowComp\n * and CellComp need. Not autowiring all the cells gives performance improvement. */\nvar Beans = /** @class */ (function () {\n function Beans() {\n }\n Beans.prototype.postConstruct = function () {\n this.doingMasterDetail = this.gridOptionsWrapper.isMasterDetail();\n if (this.gridOptionsWrapper.isRowModelDefault()) {\n this.clientSideRowModel = this.rowModel;\n }\n if (this.gridOptionsWrapper.isRowModelServerSide()) {\n this.serverSideRowModel = this.rowModel;\n }\n };\n __decorate$C([\n Autowired('resizeObserverService')\n ], Beans.prototype, \"resizeObserverService\", void 0);\n __decorate$C([\n Autowired('paginationProxy')\n ], Beans.prototype, \"paginationProxy\", void 0);\n __decorate$C([\n Autowired('context')\n ], Beans.prototype, \"context\", void 0);\n __decorate$C([\n Autowired('columnApi')\n ], Beans.prototype, \"columnApi\", void 0);\n __decorate$C([\n Autowired('gridApi')\n ], Beans.prototype, \"gridApi\", void 0);\n __decorate$C([\n Autowired('gridOptionsWrapper')\n ], Beans.prototype, \"gridOptionsWrapper\", void 0);\n __decorate$C([\n Autowired('expressionService')\n ], Beans.prototype, \"expressionService\", void 0);\n __decorate$C([\n Autowired('rowRenderer')\n ], Beans.prototype, \"rowRenderer\", void 0);\n __decorate$C([\n Autowired('$compile')\n ], Beans.prototype, \"$compile\", void 0);\n __decorate$C([\n Autowired('templateService')\n ], Beans.prototype, \"templateService\", void 0);\n __decorate$C([\n Autowired('valueService')\n ], Beans.prototype, \"valueService\", void 0);\n __decorate$C([\n Autowired('eventService')\n ], Beans.prototype, \"eventService\", void 0);\n __decorate$C([\n Autowired('columnModel')\n ], Beans.prototype, \"columnModel\", void 0);\n __decorate$C([\n Autowired('headerNavigationService')\n ], Beans.prototype, \"headerNavigationService\", void 0);\n __decorate$C([\n Autowired('navigationService')\n ], Beans.prototype, \"navigationService\", void 0);\n __decorate$C([\n Autowired('columnAnimationService')\n ], Beans.prototype, \"columnAnimationService\", void 0);\n __decorate$C([\n Optional('rangeService')\n ], Beans.prototype, \"rangeService\", void 0);\n __decorate$C([\n Autowired('focusService')\n ], Beans.prototype, \"focusService\", void 0);\n __decorate$C([\n Optional('contextMenuFactory')\n ], Beans.prototype, \"contextMenuFactory\", void 0);\n __decorate$C([\n Autowired('popupService')\n ], Beans.prototype, \"popupService\", void 0);\n __decorate$C([\n Autowired('valueFormatterService')\n ], Beans.prototype, \"valueFormatterService\", void 0);\n __decorate$C([\n Autowired('stylingService')\n ], Beans.prototype, \"stylingService\", void 0);\n __decorate$C([\n Autowired('columnHoverService')\n ], Beans.prototype, \"columnHoverService\", void 0);\n __decorate$C([\n Autowired('userComponentFactory')\n ], Beans.prototype, \"userComponentFactory\", void 0);\n __decorate$C([\n Autowired('userComponentRegistry')\n ], Beans.prototype, \"userComponentRegistry\", void 0);\n __decorate$C([\n Autowired('animationFrameService')\n ], Beans.prototype, \"animationFrameService\", void 0);\n __decorate$C([\n Autowired('dragAndDropService')\n ], Beans.prototype, \"dragAndDropService\", void 0);\n __decorate$C([\n Autowired('sortController')\n ], Beans.prototype, \"sortController\", void 0);\n __decorate$C([\n Autowired('filterManager')\n ], Beans.prototype, \"filterManager\", void 0);\n __decorate$C([\n Autowired('rowContainerHeightService')\n ], Beans.prototype, \"rowContainerHeightService\", void 0);\n __decorate$C([\n Autowired('frameworkOverrides')\n ], Beans.prototype, \"frameworkOverrides\", void 0);\n __decorate$C([\n Autowired('cellPositionUtils')\n ], Beans.prototype, \"cellPositionUtils\", void 0);\n __decorate$C([\n Autowired('rowPositionUtils')\n ], Beans.prototype, \"rowPositionUtils\", void 0);\n __decorate$C([\n Autowired('selectionService')\n ], Beans.prototype, \"selectionService\", void 0);\n __decorate$C([\n Optional('selectionHandleFactory')\n ], Beans.prototype, \"selectionHandleFactory\", void 0);\n __decorate$C([\n Autowired('rowCssClassCalculator')\n ], Beans.prototype, \"rowCssClassCalculator\", void 0);\n __decorate$C([\n Autowired('rowModel')\n ], Beans.prototype, \"rowModel\", void 0);\n __decorate$C([\n Autowired('ctrlsService')\n ], Beans.prototype, \"ctrlsService\", void 0);\n __decorate$C([\n Autowired('ctrlsFactory')\n ], Beans.prototype, \"ctrlsFactory\", void 0);\n __decorate$C([\n Autowired('agStackComponentsRegistry')\n ], Beans.prototype, \"agStackComponentsRegistry\", void 0);\n __decorate$C([\n Autowired('valueCache')\n ], Beans.prototype, \"valueCache\", void 0);\n __decorate$C([\n Autowired('rowNodeEventThrottle')\n ], Beans.prototype, \"rowNodeEventThrottle\", void 0);\n __decorate$C([\n PostConstruct\n ], Beans.prototype, \"postConstruct\", null);\n Beans = __decorate$C([\n Bean('beans')\n ], Beans);\n return Beans;\n}());\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / React / AngularJS / Web Components\n * @version v26.1.0\n * @link http://www.ag-grid.com/\n * @license MIT\n */\nvar __extends$J = (undefined && undefined.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar CellMouseListenerFeature = /** @class */ (function (_super) {\n __extends$J(CellMouseListenerFeature, _super);\n function CellMouseListenerFeature(ctrl, beans, column) {\n var _this = _super.call(this) || this;\n _this.cellCtrl = ctrl;\n _this.beans = beans;\n _this.column = column;\n return _this;\n }\n CellMouseListenerFeature.prototype.onMouseEvent = function (eventName, mouseEvent) {\n if (isStopPropagationForAgGrid(mouseEvent)) {\n return;\n }\n switch (eventName) {\n case 'click':\n this.onCellClicked(mouseEvent);\n break;\n case 'mousedown':\n case 'touchstart':\n this.onMouseDown(mouseEvent);\n break;\n case 'dblclick':\n this.onCellDoubleClicked(mouseEvent);\n break;\n case 'mouseout':\n this.onMouseOut(mouseEvent);\n break;\n case 'mouseover':\n this.onMouseOver(mouseEvent);\n break;\n }\n };\n CellMouseListenerFeature.prototype.onCellClicked = function (mouseEvent) {\n // iPad doesn't have double click - so we need to mimic it to enable editing for iPad.\n if (this.isDoubleClickOnIPad()) {\n this.onCellDoubleClicked(mouseEvent);\n mouseEvent.preventDefault(); // if we don't do this, then iPad zooms in\n return;\n }\n var _a = this.beans, eventService = _a.eventService, gridOptionsWrapper = _a.gridOptionsWrapper;\n var cellClickedEvent = this.cellCtrl.createEvent(mouseEvent, Events.EVENT_CELL_CLICKED);\n eventService.dispatchEvent(cellClickedEvent);\n var colDef = this.column.getColDef();\n if (colDef.onCellClicked) {\n // to make callback async, do in a timeout\n window.setTimeout(function () { return colDef.onCellClicked(cellClickedEvent); }, 0);\n }\n var editOnSingleClick = (gridOptionsWrapper.isSingleClickEdit() || colDef.singleClickEdit)\n && !gridOptionsWrapper.isSuppressClickEdit();\n if (editOnSingleClick) {\n this.cellCtrl.startRowOrCellEdit();\n }\n };\n // returns true if on iPad and this is second 'click' event in 200ms\n CellMouseListenerFeature.prototype.isDoubleClickOnIPad = function () {\n if (!isIOSUserAgent() || isEventSupported('dblclick')) {\n return false;\n }\n var nowMillis = new Date().getTime();\n var res = nowMillis - this.lastIPadMouseClickEvent < 200;\n this.lastIPadMouseClickEvent = nowMillis;\n return res;\n };\n CellMouseListenerFeature.prototype.onCellDoubleClicked = function (mouseEvent) {\n var colDef = this.column.getColDef();\n // always dispatch event to eventService\n var cellDoubleClickedEvent = this.cellCtrl.createEvent(mouseEvent, Events.EVENT_CELL_DOUBLE_CLICKED);\n this.beans.eventService.dispatchEvent(cellDoubleClickedEvent);\n // check if colDef also wants to handle event\n if (typeof colDef.onCellDoubleClicked === 'function') {\n // to make the callback async, do in a timeout\n window.setTimeout(function () { return colDef.onCellDoubleClicked(cellDoubleClickedEvent); }, 0);\n }\n var editOnDoubleClick = !this.beans.gridOptionsWrapper.isSingleClickEdit()\n && !this.beans.gridOptionsWrapper.isSuppressClickEdit();\n if (editOnDoubleClick) {\n this.cellCtrl.startRowOrCellEdit();\n }\n };\n CellMouseListenerFeature.prototype.onMouseDown = function (mouseEvent) {\n var ctrlKey = mouseEvent.ctrlKey, metaKey = mouseEvent.metaKey, shiftKey = mouseEvent.shiftKey;\n var target = mouseEvent.target;\n var _a = this.beans, eventService = _a.eventService, rangeService = _a.rangeService;\n // do not change the range for right-clicks inside an existing range\n if (this.isRightClickInExistingRange(mouseEvent)) {\n return;\n }\n var ranges = rangeService && rangeService.getCellRanges().length != 0;\n if (!shiftKey || !ranges) {\n // We only need to pass true to focusCell when the browser is IE/Edge and we are trying\n // to focus the cell itself. This should never be true if the mousedown was triggered\n // due to a click on a cell editor for example.\n var forceBrowserFocus = (isBrowserIE() || isBrowserEdge()) && !this.cellCtrl.isEditing() && !isFocusableFormField(target);\n this.cellCtrl.focusCell(forceBrowserFocus);\n }\n // if shift clicking, and a range exists, we keep the focus on the cell that started the\n // range as the user then changes the range selection.\n if (shiftKey && ranges) {\n // this stops the cell from getting focused\n mouseEvent.preventDefault();\n }\n // if we are clicking on a checkbox, we need to make sure the cell wrapping that checkbox\n // is focused but we don't want to change the range selection, so return here.\n if (this.containsWidget(target)) {\n return;\n }\n if (rangeService) {\n var thisCell = this.cellCtrl.getCellPosition();\n if (shiftKey) {\n rangeService.extendLatestRangeToCell(thisCell);\n }\n else {\n var ctrlKeyPressed = ctrlKey || metaKey;\n rangeService.setRangeToCell(thisCell, ctrlKeyPressed);\n }\n }\n eventService.dispatchEvent(this.cellCtrl.createEvent(mouseEvent, Events.EVENT_CELL_MOUSE_DOWN));\n };\n CellMouseListenerFeature.prototype.isRightClickInExistingRange = function (mouseEvent) {\n var rangeService = this.beans.rangeService;\n if (rangeService) {\n var cellInRange = rangeService.isCellInAnyRange(this.cellCtrl.getCellPosition());\n if (cellInRange && mouseEvent.button === 2) {\n return true;\n }\n }\n return false;\n };\n CellMouseListenerFeature.prototype.containsWidget = function (target) {\n return isElementChildOfClass(target, 'ag-selection-checkbox', 3);\n };\n CellMouseListenerFeature.prototype.onMouseOut = function (mouseEvent) {\n if (this.mouseStayingInsideCell(mouseEvent)) {\n return;\n }\n var cellMouseOutEvent = this.cellCtrl.createEvent(mouseEvent, Events.EVENT_CELL_MOUSE_OUT);\n this.beans.eventService.dispatchEvent(cellMouseOutEvent);\n this.beans.columnHoverService.clearMouseOver();\n };\n CellMouseListenerFeature.prototype.onMouseOver = function (mouseEvent) {\n if (this.mouseStayingInsideCell(mouseEvent)) {\n return;\n }\n var cellMouseOverEvent = this.cellCtrl.createEvent(mouseEvent, Events.EVENT_CELL_MOUSE_OVER);\n this.beans.eventService.dispatchEvent(cellMouseOverEvent);\n this.beans.columnHoverService.setMouseOver([this.column]);\n };\n CellMouseListenerFeature.prototype.mouseStayingInsideCell = function (e) {\n if (!e.target || !e.relatedTarget) {\n return false;\n }\n var eGui = this.cellCtrl.getGui();\n var cellContainsTarget = eGui.contains(e.target);\n var cellContainsRelatedTarget = eGui.contains(e.relatedTarget);\n return cellContainsTarget && cellContainsRelatedTarget;\n };\n CellMouseListenerFeature.prototype.destroy = function () {\n };\n return CellMouseListenerFeature;\n}(Beans));\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / React / AngularJS / Web Components\n * @version v26.1.0\n * @link http://www.ag-grid.com/\n * @license MIT\n */\nvar __extends$K = (undefined && undefined.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar CellKeyboardListenerFeature = /** @class */ (function (_super) {\n __extends$K(CellKeyboardListenerFeature, _super);\n function CellKeyboardListenerFeature(ctrl, beans, column, rowNode, scope, rowCtrl) {\n var _this = _super.call(this) || this;\n _this.cellCtrl = ctrl;\n _this.beans = beans;\n _this.column = column;\n _this.rowNode = rowNode;\n _this.rowCtrl = rowCtrl;\n return _this;\n }\n CellKeyboardListenerFeature.prototype.setComp = function (eGui) {\n this.eGui = eGui;\n };\n CellKeyboardListenerFeature.prototype.onKeyDown = function (event) {\n var key = event.which || event.keyCode;\n switch (key) {\n case KeyCode.ENTER:\n this.onEnterKeyDown(event);\n break;\n case KeyCode.F2:\n this.onF2KeyDown();\n break;\n case KeyCode.ESCAPE:\n this.onEscapeKeyDown();\n break;\n case KeyCode.TAB:\n this.onTabKeyDown(event);\n break;\n case KeyCode.BACKSPACE:\n case KeyCode.DELETE:\n this.onBackspaceOrDeleteKeyPressed(key);\n break;\n case KeyCode.DOWN:\n case KeyCode.UP:\n case KeyCode.RIGHT:\n case KeyCode.LEFT:\n this.onNavigationKeyPressed(event, key);\n break;\n }\n };\n CellKeyboardListenerFeature.prototype.onNavigationKeyPressed = function (event, key) {\n if (this.cellCtrl.isEditing()) {\n return;\n }\n if (event.shiftKey && this.cellCtrl.isRangeSelectionEnabled()) {\n this.onShiftRangeSelect(key);\n }\n else {\n this.beans.navigationService.navigateToNextCell(event, key, this.cellCtrl.getCellPosition(), true);\n }\n // if we don't prevent default, the grid will scroll with the navigation keys\n event.preventDefault();\n };\n CellKeyboardListenerFeature.prototype.onShiftRangeSelect = function (key) {\n if (!this.beans.rangeService) {\n return;\n }\n var endCell = this.beans.rangeService.extendLatestRangeInDirection(key);\n if (endCell) {\n this.beans.navigationService.ensureCellVisible(endCell);\n }\n };\n CellKeyboardListenerFeature.prototype.onTabKeyDown = function (event) {\n this.beans.navigationService.onTabKeyDown(this.cellCtrl, event);\n };\n CellKeyboardListenerFeature.prototype.onBackspaceOrDeleteKeyPressed = function (key) {\n if (!this.cellCtrl.isEditing()) {\n this.cellCtrl.startRowOrCellEdit(key);\n }\n };\n CellKeyboardListenerFeature.prototype.onEnterKeyDown = function (e) {\n if (this.cellCtrl.isEditing() || this.rowCtrl.isEditing()) {\n this.cellCtrl.stopEditingAndFocus();\n }\n else {\n if (this.beans.gridOptionsWrapper.isEnterMovesDown()) {\n this.beans.navigationService.navigateToNextCell(null, KeyCode.DOWN, this.cellCtrl.getCellPosition(), false);\n }\n else {\n this.cellCtrl.startRowOrCellEdit(KeyCode.ENTER);\n if (this.cellCtrl.isEditing()) {\n // if we started editing, then we need to prevent default, otherwise the Enter action can get\n // applied to the cell editor. this happened, for example, with largeTextCellEditor where not\n // preventing default results in a 'new line' character getting inserted in the text area\n // when the editing was started\n e.preventDefault();\n }\n }\n }\n };\n CellKeyboardListenerFeature.prototype.onF2KeyDown = function () {\n if (!this.cellCtrl.isEditing()) {\n this.cellCtrl.startRowOrCellEdit(KeyCode.F2);\n }\n };\n CellKeyboardListenerFeature.prototype.onEscapeKeyDown = function () {\n if (this.cellCtrl.isEditing()) {\n this.cellCtrl.stopRowOrCellEdit(true);\n this.cellCtrl.focusCell(true);\n }\n };\n CellKeyboardListenerFeature.prototype.onKeyPress = function (event) {\n // check this, in case focus is on a (for example) a text field inside the cell,\n // in which cse we should not be listening for these key pressed\n var eventTarget = getTarget(event);\n var eventOnChildComponent = eventTarget !== this.eGui;\n if (eventOnChildComponent || this.cellCtrl.isEditing()) {\n return;\n }\n var pressedChar = String.fromCharCode(event.charCode);\n if (pressedChar === ' ') {\n this.onSpaceKeyPressed(event);\n }\n else if (isEventFromPrintableCharacter(event)) {\n this.cellCtrl.startRowOrCellEdit(null, pressedChar);\n // if we don't prevent default, then the keypress also gets applied to the text field\n // (at least when doing the default editor), but we need to allow the editor to decide\n // what it wants to do. we only do this IF editing was started - otherwise it messes\n // up when the use is not doing editing, but using rendering with text fields in cellRenderer\n // (as it would block the the user from typing into text fields).\n event.preventDefault();\n }\n };\n CellKeyboardListenerFeature.prototype.onSpaceKeyPressed = function (event) {\n var gridOptionsWrapper = this.beans.gridOptionsWrapper;\n if (!this.cellCtrl.isEditing() && gridOptionsWrapper.isRowSelection()) {\n var currentSelection = this.rowNode.isSelected();\n var newSelection = !currentSelection;\n if (newSelection || !gridOptionsWrapper.isSuppressRowDeselection()) {\n var groupSelectsFiltered = this.beans.gridOptionsWrapper.isGroupSelectsFiltered();\n var updatedCount = this.rowNode.setSelectedParams({\n newValue: newSelection,\n rangeSelect: event.shiftKey,\n groupSelectsFiltered: groupSelectsFiltered\n });\n if (currentSelection === undefined && updatedCount === 0) {\n this.rowNode.setSelectedParams({\n newValue: false,\n rangeSelect: event.shiftKey,\n groupSelectsFiltered: groupSelectsFiltered\n });\n }\n }\n }\n // prevent default as space key, by default, moves browser scroll down\n event.preventDefault();\n };\n CellKeyboardListenerFeature.prototype.destroy = function () {\n };\n return CellKeyboardListenerFeature;\n}(BeanStub));\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / React / AngularJS / Web Components\n * @version v26.1.0\n * @link http://www.ag-grid.com/\n * @license MIT\n */\nvar __extends$L = (undefined && undefined.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate$D = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n 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 DndSourceComp = /** @class */ (function (_super) {\n __extends$L(DndSourceComp, _super);\n function DndSourceComp(rowNode, column, beans, eCell) {\n var _this = _super.call(this, \"
\") || this;\n _this.rowNode = rowNode;\n _this.column = column;\n _this.beans = beans;\n _this.eCell = eCell;\n return _this;\n }\n DndSourceComp.prototype.postConstruct = function () {\n var eGui = this.getGui();\n eGui.appendChild(createIconNoSpan('rowDrag', this.beans.gridOptionsWrapper, null));\n // we need to stop the event propagation here to avoid starting a range selection while dragging\n this.addGuiEventListener('mousedown', function (e) {\n e.stopPropagation();\n });\n this.addDragSource();\n this.checkVisibility();\n };\n DndSourceComp.prototype.addDragSource = function () {\n this.addGuiEventListener('dragstart', this.onDragStart.bind(this));\n };\n DndSourceComp.prototype.onDragStart = function (dragEvent) {\n var _this = this;\n var providedOnRowDrag = this.column.getColDef().dndSourceOnRowDrag;\n var isIE = isBrowserIE();\n if (!isIE) {\n dragEvent.dataTransfer.setDragImage(this.eCell, 0, 0);\n }\n // default behaviour is to convert data to json and set into drag component\n var defaultOnRowDrag = function () {\n try {\n var jsonData = JSON.stringify(_this.rowNode.data);\n if (isIE) {\n dragEvent.dataTransfer.setData('text', jsonData);\n }\n else {\n dragEvent.dataTransfer.setData('application/json', jsonData);\n dragEvent.dataTransfer.setData('text/plain', jsonData);\n }\n }\n catch (e) {\n // if we cannot convert the data to json, then we do not set the type\n }\n };\n if (providedOnRowDrag) {\n providedOnRowDrag({ rowNode: this.rowNode, dragEvent: dragEvent });\n }\n else {\n defaultOnRowDrag();\n }\n };\n DndSourceComp.prototype.checkVisibility = function () {\n var visible = this.column.isDndSource(this.rowNode);\n this.setDisplayed(visible);\n };\n __decorate$D([\n PostConstruct\n ], DndSourceComp.prototype, \"postConstruct\", null);\n return DndSourceComp;\n}(Component));\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / React / AngularJS / Web Components\n * @version v26.1.0\n * @link http://www.ag-grid.com/\n * @license MIT\n */\nvar __extends$M = (undefined && undefined.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __assign$6 = (undefined && undefined.__assign) || function () {\n __assign$6 = 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))\n t[p] = s[p];\n }\n return t;\n };\n return __assign$6.apply(this, arguments);\n};\nvar CSS_CELL = 'ag-cell';\nvar CSS_NORMAL_HEIGHT = 'ag-cell-normal-height';\nvar CSS_CELL_FOCUS = 'ag-cell-focus';\nvar CSS_CELL_FIRST_RIGHT_PINNED = 'ag-cell-first-right-pinned';\nvar CSS_CELL_LAST_LEFT_PINNED = 'ag-cell-last-left-pinned';\nvar CSS_CELL_NOT_INLINE_EDITING = 'ag-cell-not-inline-editing';\nvar CSS_CELL_INLINE_EDITING = 'ag-cell-inline-editing';\nvar CSS_CELL_POPUP_EDITING = 'ag-cell-popup-editing';\nvar CSS_COLUMN_HOVER = 'ag-column-hover';\nvar CSS_CELL_WRAP_TEXT = 'ag-cell-wrap-text';\nvar instanceIdSequence$1 = 0;\nvar CellCtrl = /** @class */ (function (_super) {\n __extends$M(CellCtrl, _super);\n function CellCtrl(column, rowNode, beans, rowCtrl) {\n var _this = _super.call(this) || this;\n _this.suppressRefreshCell = false;\n _this.column = column;\n _this.rowNode = rowNode;\n _this.beans = beans;\n _this.rowCtrl = rowCtrl;\n // unique id to this instance, including the column ID to help with debugging in React as it's used in 'key'\n _this.instanceId = column.getId() + '-' + instanceIdSequence$1++;\n _this.createCellPosition();\n _this.addFeatures();\n return _this;\n }\n CellCtrl.prototype.addFeatures = function () {\n var _this = this;\n this.cellPositionFeature = new CellPositionFeature(this, this.beans);\n this.addDestroyFunc(function () { return _this.cellPositionFeature.destroy(); });\n this.cellCustomStyleFeature = new CellCustomStyleFeature(this, this.beans);\n this.addDestroyFunc(function () { return _this.cellCustomStyleFeature.destroy(); });\n this.cellMouseListenerFeature = new CellMouseListenerFeature(this, this.beans, this.column);\n this.addDestroyFunc(function () { return _this.cellMouseListenerFeature.destroy(); });\n this.cellKeyboardListenerFeature = new CellKeyboardListenerFeature(this, this.beans, this.column, this.rowNode, this.scope, this.rowCtrl);\n this.addDestroyFunc(function () { return _this.cellKeyboardListenerFeature.destroy(); });\n var rangeSelectionEnabled = this.beans.rangeService && this.beans.gridOptionsWrapper.isEnableRangeSelection();\n if (rangeSelectionEnabled) {\n this.cellRangeFeature = new CellRangeFeature(this.beans, this);\n this.addDestroyFunc(function () { return _this.cellRangeFeature.destroy(); });\n }\n this.addTooltipFeature();\n };\n CellCtrl.prototype.addTooltipFeature = function () {\n var _this = this;\n var getTooltipValue = function () {\n var colDef = _this.column.getColDef();\n var data = _this.rowNode.data;\n if (colDef.tooltipField && exists(data)) {\n return getValueUsingField(data, colDef.tooltipField, _this.column.isTooltipFieldContainsDots());\n }\n var valueGetter = colDef.tooltipValueGetter;\n if (valueGetter) {\n return valueGetter({\n location: 'cell',\n api: _this.beans.gridOptionsWrapper.getApi(),\n columnApi: _this.beans.gridOptionsWrapper.getColumnApi(),\n context: _this.beans.gridOptionsWrapper.getContext(),\n colDef: _this.column.getColDef(),\n column: _this.column,\n rowIndex: _this.cellPosition.rowIndex,\n node: _this.rowNode,\n data: _this.rowNode.data,\n value: _this.value,\n valueFormatted: _this.valueFormatted,\n });\n }\n return null;\n };\n var tooltipCtrl = {\n getColumn: function () { return _this.column; },\n getColDef: function () { return _this.column.getColDef(); },\n getRowIndex: function () { return _this.cellPosition.rowIndex; },\n getRowNode: function () { return _this.rowNode; },\n getGui: function () { return _this.getGui(); },\n getLocation: function () { return 'cell'; },\n getTooltipValue: getTooltipValue,\n // this makes no sense, why is the cell formatted value passed to the tooltip???\n getValueFormatted: function () { return _this.valueFormatted; }\n };\n this.tooltipFeature = new TooltipFeature(tooltipCtrl, this.beans);\n this.addDestroyFunc(function () { return _this.tooltipFeature.destroy(); });\n };\n CellCtrl.prototype.setComp = function (comp, scope, eGui, printLayout, startEditing) {\n var _this = this;\n this.cellComp = comp;\n this.gow = this.beans.gridOptionsWrapper;\n this.scope = scope;\n this.eGui = eGui;\n this.printLayout = printLayout;\n // we force to make sure formatter gets called at least once,\n // even if value has not changed (is is undefined)\n this.updateAndFormatValue(true);\n this.addDomData();\n this.onCellFocused();\n this.applyStaticCssClasses();\n this.setWrapText();\n this.onFirstRightPinnedChanged();\n this.onLastLeftPinnedChanged();\n this.onColumnHover();\n this.setupControlComps();\n this.setupAriaExpanded();\n var colIdSanitised = escapeString(this.column.getId());\n var ariaColIndex = this.beans.columnModel.getAriaColumnIndex(this.column);\n this.cellComp.setTabIndex(-1);\n this.cellComp.setRole('gridcell');\n this.cellComp.setAriaColIndex(ariaColIndex);\n this.cellComp.setColId(colIdSanitised);\n this.cellComp.setUnselectable(!this.beans.gridOptionsWrapper.isEnableCellTextSelection() ? 'on' : null);\n this.cellPositionFeature.setComp(comp);\n this.cellCustomStyleFeature.setComp(comp, scope);\n this.tooltipFeature.setComp(comp);\n this.cellKeyboardListenerFeature.setComp(this.eGui);\n if (this.cellRangeFeature) {\n this.cellRangeFeature.setComp(comp);\n }\n if (startEditing && this.isCellEditable()) {\n this.startEditing();\n }\n else {\n this.showValue();\n }\n this.addDestroyFunc(function () {\n _this.destroyAutoHeight && _this.destroyAutoHeight();\n });\n };\n CellCtrl.prototype.setupAutoHeight = function (eParentOfValue) {\n var _this = this;\n if (!this.column.getColDef().autoHeight) {\n return;\n }\n if (this.autoHeightElement == eParentOfValue) {\n return;\n }\n if (this.destroyAutoHeight) {\n this.destroyAutoHeight();\n }\n this.autoHeightElement = eParentOfValue;\n if (!eParentOfValue) {\n return;\n }\n var measureHeight = function (timesCalled) {\n // if not in doc yet, means framework not yet inserted, so wait for next VM turn,\n // maybe it will be ready next VM turn\n var doc = _this.beans.gridOptionsWrapper.getDocument();\n if (!doc || !doc.contains(eParentOfValue)) {\n if (timesCalled < 5) {\n _this.beans.frameworkOverrides.setTimeout(function () { return measureHeight(timesCalled++); }, 0);\n return;\n }\n }\n var newHeight = eParentOfValue.offsetHeight;\n _this.rowNode.setRowAutoHeight(newHeight, _this.column);\n };\n var listener = function () {\n measureHeight(0);\n };\n // do once to set size in case size doesn't change, common when cell is blank\n listener();\n var destroyResizeObserver = this.beans.resizeObserverService.observeResize(eParentOfValue, listener);\n // const destroyMutationObserver = this.beans.mutationObserverService.observeMutation(eParentOfValue, listener);\n this.destroyAutoHeight = function () {\n destroyResizeObserver();\n // destroyMutationObserver();\n _this.rowNode.setRowAutoHeight(undefined, _this.column);\n };\n };\n CellCtrl.prototype.getInstanceId = function () {\n return this.instanceId;\n };\n CellCtrl.prototype.showValue = function (forceNewCellRendererInstance) {\n if (forceNewCellRendererInstance === void 0) { forceNewCellRendererInstance = false; }\n var valueToDisplay = this.valueFormatted != null ? this.valueFormatted : this.value;\n var params = this.createCellRendererParams();\n var compDetails = this.beans.userComponentFactory.getCellRendererDetails(this.column.getColDef(), params);\n this.cellComp.setRenderDetails(compDetails, valueToDisplay, forceNewCellRendererInstance);\n this.refreshHandle();\n };\n CellCtrl.prototype.setupControlComps = function () {\n var colDef = this.column.getColDef();\n this.includeSelection = this.isIncludeControl(colDef.checkboxSelection);\n this.includeRowDrag = this.isIncludeControl(colDef.rowDrag);\n this.includeDndSource = this.isIncludeControl(colDef.dndSource);\n // text selection requires the value to be wrapped in another element\n var forceWrapper = this.beans.gridOptionsWrapper.isEnableCellTextSelection() || this.column.getColDef().autoHeight == true;\n this.cellComp.setIncludeSelection(this.includeSelection);\n this.cellComp.setIncludeDndSource(this.includeDndSource);\n this.cellComp.setIncludeRowDrag(this.includeRowDrag);\n this.cellComp.setForceWrapper(forceWrapper);\n };\n CellCtrl.prototype.isIncludeControl = function (value) {\n var rowNodePinned = this.rowNode.rowPinned != null;\n var isFunc = typeof value === 'function';\n var res = rowNodePinned ? false : isFunc || value === true;\n return res;\n };\n CellCtrl.prototype.setupAriaExpanded = function () {\n var _this = this;\n var colDef = this.column.getColDef();\n if (!this.rowNode.isExpandable()) {\n return;\n }\n var showRowGroup = colDef.showRowGroup;\n var rowGroupColumn = this.rowNode.rowGroupColumn;\n var showingAllGroups = showRowGroup === true;\n var showingThisGroup = rowGroupColumn && rowGroupColumn.getColId() === showRowGroup;\n var colMatches = showingAllGroups || showingThisGroup;\n if (!colMatches) {\n return;\n }\n var listener = function () {\n _this.cellComp.setAriaExpanded(!!_this.rowNode.expanded);\n };\n this.addManagedListener(this.rowNode, RowNode.EVENT_EXPANDED_CHANGED, listener);\n listener();\n };\n CellCtrl.prototype.refreshShouldDestroy = function () {\n var colDef = this.column.getColDef();\n var selectionChanged = this.includeSelection != this.isIncludeControl(colDef.checkboxSelection);\n var rowDragChanged = this.includeRowDrag != this.isIncludeControl(colDef.rowDrag);\n var dndSourceChanged = this.includeDndSource != this.isIncludeControl(colDef.dndSource);\n return selectionChanged || rowDragChanged || dndSourceChanged;\n };\n // either called internally if single cell editing, or called by rowRenderer if row editing\n CellCtrl.prototype.startEditing = function (keyPress, charPress, cellStartedEdit) {\n if (keyPress === void 0) { keyPress = null; }\n if (charPress === void 0) { charPress = null; }\n if (cellStartedEdit === void 0) { cellStartedEdit = false; }\n if (!this.isCellEditable() || this.editing) {\n return;\n }\n var editorParams = this.createCellEditorParams(keyPress, charPress, cellStartedEdit);\n var colDef = this.column.getColDef();\n var compDetails = this.beans.userComponentFactory.getCellEditorDetails(colDef, editorParams);\n var popup = !!colDef.cellEditorPopup;\n var position = colDef.cellEditorPopupPosition;\n this.setEditing(true, popup);\n this.cellComp.setEditDetails(compDetails, popup, position);\n var event = this.createEvent(null, Events.EVENT_CELL_EDITING_STARTED);\n this.beans.eventService.dispatchEvent(event);\n };\n CellCtrl.prototype.setEditing = function (editing, inPopup) {\n if (inPopup === void 0) { inPopup = false; }\n if (this.editing === editing) {\n return;\n }\n this.editing = editing;\n this.editingInPopup = inPopup;\n this.setInlineEditingClass();\n if (!editing) {\n this.cellComp.setEditDetails();\n }\n };\n // pass in 'true' to cancel the editing.\n CellCtrl.prototype.stopRowOrCellEdit = function (cancel) {\n if (cancel === void 0) { cancel = false; }\n if (this.beans.gridOptionsWrapper.isFullRowEdit()) {\n this.rowCtrl.stopRowEditing(cancel);\n }\n else {\n this.stopEditing(cancel);\n }\n };\n CellCtrl.prototype.onPopupEditorClosed = function () {\n if (!this.isEditing()) {\n return;\n }\n // note: this happens because of a click outside of the grid or if the popupEditor\n // is closed with `Escape` key. if another cell was clicked, then the editing will \n // have already stopped and returned on the conditional above.\n this.stopEditingAndFocus();\n };\n CellCtrl.prototype.takeValueFromCellEditor = function (cancel) {\n var noValueResult = { newValueExists: false };\n if (cancel) {\n return noValueResult;\n }\n var cellEditor = this.cellComp.getCellEditor();\n if (!cellEditor) {\n return noValueResult;\n }\n var userWantsToCancel = cellEditor.isCancelAfterEnd && cellEditor.isCancelAfterEnd();\n if (userWantsToCancel) {\n return noValueResult;\n }\n var newValue = cellEditor.getValue();\n return {\n newValue: newValue,\n newValueExists: true\n };\n };\n CellCtrl.prototype.saveNewValue = function (oldValue, newValue) {\n if (newValue !== oldValue) {\n // we suppressRefreshCell because the call to rowNode.setDataValue() results in change detection\n // getting triggered, which results in all cells getting refreshed. we do not want this refresh\n // to happen on this call as we want to call it explicitly below. otherwise refresh gets called twice.\n // if we only did this refresh (and not the one below) then the cell would flash and not be forced.\n this.suppressRefreshCell = true;\n this.rowNode.setDataValue(this.column, newValue);\n this.suppressRefreshCell = false;\n }\n };\n CellCtrl.prototype.stopEditing = function (cancel) {\n if (cancel === void 0) { cancel = false; }\n if (!this.editing) {\n return;\n }\n var _a = this.takeValueFromCellEditor(cancel), newValue = _a.newValue, newValueExists = _a.newValueExists;\n var oldValue = this.getValueFromValueService();\n if (newValueExists) {\n this.saveNewValue(oldValue, newValue);\n }\n this.setEditing(false);\n this.updateAndFormatValue();\n this.refreshCell({ forceRefresh: true, suppressFlash: true });\n this.dispatchEditingStoppedEvent(oldValue, newValue);\n };\n CellCtrl.prototype.dispatchEditingStoppedEvent = function (oldValue, newValue) {\n var editingStoppedEvent = __assign$6(__assign$6({}, this.createEvent(null, Events.EVENT_CELL_EDITING_STOPPED)), { oldValue: oldValue,\n newValue: newValue });\n this.beans.eventService.dispatchEvent(editingStoppedEvent);\n };\n // if we are editing inline, then we don't have the padding in the cell (set in the themes)\n // to allow the text editor full access to the entire cell\n CellCtrl.prototype.setInlineEditingClass = function () {\n if (!this.isAlive()) {\n return;\n }\n // ag-cell-inline-editing - appears when user is inline editing\n // ag-cell-not-inline-editing - appears when user is no inline editing\n // ag-cell-popup-editing - appears when user is editing cell in popup (appears on the cell, not on the popup)\n // note: one of {ag-cell-inline-editing, ag-cell-not-inline-editing} is always present, they toggle.\n // however {ag-cell-popup-editing} shows when popup, so you have both {ag-cell-popup-editing}\n // and {ag-cell-not-inline-editing} showing at the same time.\n var editingInline = this.editing && !this.editingInPopup;\n var popupEditorShowing = this.editing && this.editingInPopup;\n this.cellComp.addOrRemoveCssClass(CSS_CELL_INLINE_EDITING, editingInline);\n this.cellComp.addOrRemoveCssClass(CSS_CELL_NOT_INLINE_EDITING, !editingInline);\n this.cellComp.addOrRemoveCssClass(CSS_CELL_POPUP_EDITING, popupEditorShowing);\n this.rowCtrl.setInlineEditingCss(this.editing);\n };\n // this is needed as the JS CellComp still allows isPopup() on the CellEditor class, so\n // it's possible the editor is in a popup even though it's not configured via the colDef as so\n CellCtrl.prototype.hackSayEditingInPopup = function () {\n if (this.editingInPopup) {\n return;\n }\n this.editingInPopup = true;\n this.setInlineEditingClass();\n };\n CellCtrl.prototype.createCellEditorParams = function (keyPress, charPress, cellStartedEdit) {\n var res = {\n value: this.getValueFromValueService(),\n keyPress: keyPress,\n charPress: charPress,\n column: this.column,\n colDef: this.column.getColDef(),\n rowIndex: this.getCellPosition().rowIndex,\n node: this.rowNode,\n data: this.rowNode.data,\n api: this.beans.gridOptionsWrapper.getApi(),\n cellStartedEdit: cellStartedEdit,\n columnApi: this.beans.gridOptionsWrapper.getColumnApi(),\n context: this.beans.gridOptionsWrapper.getContext(),\n onKeyDown: this.onKeyDown.bind(this),\n stopEditing: this.stopEditingAndFocus.bind(this),\n eGridCell: this.getGui(),\n parseValue: this.parseValue.bind(this),\n formatValue: this.formatValue.bind(this)\n };\n if (this.scope) {\n res.$scope = this.scope;\n }\n return res;\n };\n CellCtrl.prototype.createCellRendererParams = function () {\n var _this = this;\n var addRowCompListener = function (eventType, listener) {\n console.warn('AG Grid: since AG Grid v26, params.addRowCompListener() is deprecated. If you need this functionality, please contact AG Grid support and advise why so that we can revert with an appropriate workaround, as we dont have any valid use cases for it. This method was originally provided as a work around to know when cells were destroyed in AG Grid before custom Cell Renderers could be provided.');\n _this.rowCtrl.addEventListener(eventType, listener);\n };\n var res = {\n value: this.value,\n valueFormatted: this.valueFormatted,\n getValue: this.getValueFromValueService.bind(this),\n setValue: function (value) { return _this.beans.valueService.setValue(_this.rowNode, _this.column, value); },\n formatValue: this.formatValue.bind(this),\n data: this.rowNode.data,\n node: this.rowNode,\n colDef: this.column.getColDef(),\n column: this.column,\n rowIndex: this.getCellPosition().rowIndex,\n api: this.beans.gridOptionsWrapper.getApi(),\n columnApi: this.beans.gridOptionsWrapper.getColumnApi(),\n context: this.beans.gridOptionsWrapper.getContext(),\n refreshCell: this.refreshCell.bind(this),\n eGridCell: this.getGui(),\n eParentOfValue: this.cellComp.getParentOfValue(),\n registerRowDragger: function (rowDraggerElement, dragStartPixels, value, suppressVisibilityChange) { return _this.registerRowDragger(rowDraggerElement, dragStartPixels, suppressVisibilityChange); },\n // this function is not documented anywhere, so we could drop it\n // it was in the olden days to allow user to register for when rendered\n // row was removed (the row comp was removed), however now that the user\n // can provide components for cells, the destroy method gets call when this\n // happens so no longer need to fire event.\n addRowCompListener: addRowCompListener\n };\n if (this.scope) {\n res.$scope = this.scope;\n }\n return res;\n };\n CellCtrl.prototype.parseValue = function (newValue) {\n var colDef = this.column.getColDef();\n var params = {\n node: this.rowNode,\n data: this.rowNode.data,\n oldValue: this.getValue(),\n newValue: newValue,\n colDef: colDef,\n column: this.column,\n api: this.beans.gridOptionsWrapper.getApi(),\n columnApi: this.beans.gridOptionsWrapper.getColumnApi(),\n context: this.beans.gridOptionsWrapper.getContext()\n };\n var valueParser = colDef.valueParser;\n return exists(valueParser) ? this.beans.expressionService.evaluate(valueParser, params) : newValue;\n };\n CellCtrl.prototype.setFocusOutOnEditor = function () {\n if (!this.editing) {\n return;\n }\n var cellEditor = this.cellComp.getCellEditor();\n if (cellEditor && cellEditor.focusOut) {\n cellEditor.focusOut();\n }\n };\n CellCtrl.prototype.setFocusInOnEditor = function () {\n if (!this.editing) {\n return;\n }\n var cellEditor = this.cellComp.getCellEditor();\n if (cellEditor && cellEditor.focusIn) {\n // if the editor is present, then we just focus it\n cellEditor.focusIn();\n }\n else {\n // if the editor is not present, it means async cell editor (eg React fibre)\n // and we are trying to set focus before the cell editor is present, so we\n // focus the cell instead\n this.focusCell(true);\n }\n };\n CellCtrl.prototype.onCellChanged = function (event) {\n var eventImpactsThisCell = event.column === this.column;\n if (eventImpactsThisCell) {\n this.refreshCell({});\n }\n };\n // + stop editing {forceRefresh: true, suppressFlash: true}\n // + event cellChanged {}\n // + cellRenderer.params.refresh() {} -> method passes 'as is' to the cellRenderer, so params could be anything\n // + rowCtrl: event dataChanged {suppressFlash: !update, newData: !update}\n // + rowCtrl: api refreshCells() {animate: true/false}\n // + rowRenderer: api softRefreshView() {}\n CellCtrl.prototype.refreshCell = function (params) {\n // if we are in the middle of 'stopEditing', then we don't refresh here, as refresh gets called explicitly\n if (this.suppressRefreshCell || this.editing) {\n return;\n }\n var colDef = this.column.getColDef();\n var newData = params != null && !!params.newData;\n var suppressFlash = (params != null && !!params.suppressFlash) || !!colDef.suppressCellFlash;\n // we always refresh if cell has no value - this can happen when user provides Cell Renderer and the\n // cell renderer doesn't rely on a value, instead it could be looking directly at the data, or maybe\n // printing the current time (which would be silly)???. Generally speaking\n // non of {field, valueGetter, showRowGroup} is bad in the users application, however for this edge case, it's\n // best always refresh and take the performance hit rather than never refresh and users complaining in support\n // that cells are not updating.\n var noValueProvided = colDef.field == null && colDef.valueGetter == null && colDef.showRowGroup == null;\n var forceRefresh = (params && params.forceRefresh) || noValueProvided || newData;\n var valuesDifferent = this.updateAndFormatValue();\n var dataNeedsUpdating = forceRefresh || valuesDifferent;\n if (dataNeedsUpdating) {\n // if it's 'new data', then we don't refresh the cellRenderer, even if refresh method is available.\n // this is because if the whole data is new (ie we are showing stock price 'BBA' now and not 'SSD')\n // then we are not showing a movement in the stock price, rather we are showing different stock.\n this.showValue(newData);\n // we don't want to flash the cells when processing a filter change, as otherwise the UI would\n // be to busy. see comment in FilterManager with regards processingFilterChange\n var processingFilterChange = this.beans.filterManager.isSuppressFlashingCellsBecauseFiltering();\n var flashCell = !suppressFlash && !processingFilterChange &&\n (this.beans.gridOptionsWrapper.isEnableCellChangeFlash() || colDef.enableCellChangeFlash);\n if (flashCell) {\n this.flashCell();\n }\n this.cellCustomStyleFeature.applyUserStyles();\n this.cellCustomStyleFeature.applyClassesFromColDef();\n }\n // we can't readily determine if the data in an angularjs template has changed, so here we just update\n // and recompile (if applicable)\n this.refreshToolTip();\n // we do cellClassRules even if the value has not changed, so that users who have rules that\n // look at other parts of the row (where the other part of the row might of changed) will work.\n this.cellCustomStyleFeature.applyCellClassRules();\n };\n // cell editors call this, when they want to stop for reasons other\n // than what we pick up on. eg selecting from a dropdown ends editing.\n CellCtrl.prototype.stopEditingAndFocus = function (suppressNavigateAfterEdit) {\n if (suppressNavigateAfterEdit === void 0) { suppressNavigateAfterEdit = false; }\n this.stopRowOrCellEdit();\n this.focusCell(true);\n if (!suppressNavigateAfterEdit) {\n this.navigateAfterEdit();\n }\n };\n CellCtrl.prototype.navigateAfterEdit = function () {\n var fullRowEdit = this.beans.gridOptionsWrapper.isFullRowEdit();\n if (fullRowEdit) {\n return;\n }\n var enterMovesDownAfterEdit = this.beans.gridOptionsWrapper.isEnterMovesDownAfterEdit();\n if (enterMovesDownAfterEdit) {\n this.beans.navigationService.navigateToNextCell(null, KeyCode.DOWN, this.getCellPosition(), false);\n }\n };\n // user can also call this via API\n CellCtrl.prototype.flashCell = function (delays) {\n var flashDelay = delays && delays.flashDelay;\n var fadeDelay = delays && delays.fadeDelay;\n this.animateCell('data-changed', flashDelay, fadeDelay);\n };\n CellCtrl.prototype.animateCell = function (cssName, flashDelay, fadeDelay) {\n var _this = this;\n var fullName = \"ag-cell-\" + cssName;\n var animationFullName = \"ag-cell-\" + cssName + \"-animation\";\n var gridOptionsWrapper = this.beans.gridOptionsWrapper;\n if (!flashDelay) {\n flashDelay = gridOptionsWrapper.getCellFlashDelay();\n }\n if (!exists(fadeDelay)) {\n fadeDelay = gridOptionsWrapper.getCellFadeDelay();\n }\n // we want to highlight the cells, without any animation\n this.cellComp.addOrRemoveCssClass(fullName, true);\n this.cellComp.addOrRemoveCssClass(animationFullName, false);\n // then once that is applied, we remove the highlight with animation\n window.setTimeout(function () {\n _this.cellComp.addOrRemoveCssClass(fullName, false);\n _this.cellComp.addOrRemoveCssClass(animationFullName, true);\n _this.cellComp.setTransition(\"background-color \" + fadeDelay + \"ms\");\n window.setTimeout(function () {\n // and then to leave things as we got them, we remove the animation\n _this.cellComp.addOrRemoveCssClass(animationFullName, false);\n _this.cellComp.setTransition('transition');\n }, fadeDelay);\n }, flashDelay);\n };\n CellCtrl.prototype.onFlashCells = function (event) {\n var cellId = this.beans.cellPositionUtils.createId(this.getCellPosition());\n var shouldFlash = event.cells[cellId];\n if (shouldFlash) {\n this.animateCell('highlight');\n }\n };\n CellCtrl.prototype.isCellEditable = function () {\n return this.column.isCellEditable(this.rowNode);\n };\n CellCtrl.prototype.isSuppressFillHandle = function () {\n return this.column.isSuppressFillHandle();\n };\n CellCtrl.prototype.formatValue = function (value) {\n var res = this.callValueFormatter(value);\n return res != null ? res : value;\n };\n CellCtrl.prototype.callValueFormatter = function (value) {\n return this.beans.valueFormatterService.formatValue(this.column, this.rowNode, this.scope, value);\n };\n CellCtrl.prototype.updateAndFormatValue = function (force) {\n if (force === void 0) { force = false; }\n var oldValue = this.value;\n var oldValueFormatted = this.valueFormatted;\n this.value = this.getValueFromValueService();\n this.valueFormatted = this.callValueFormatter(this.value);\n var valuesDifferent = force ? true :\n !this.valuesAreEqual(oldValue, this.value) || this.valueFormatted != oldValueFormatted;\n return valuesDifferent;\n };\n CellCtrl.prototype.valuesAreEqual = function (val1, val2) {\n // if the user provided an equals method, use that, otherwise do simple comparison\n var colDef = this.column.getColDef();\n return colDef.equals ? colDef.equals(val1, val2) : val1 === val2;\n };\n CellCtrl.prototype.getComp = function () {\n return this.cellComp;\n };\n CellCtrl.prototype.getValueFromValueService = function () {\n // if we don't check this, then the grid will render leaf groups as open even if we are not\n // allowing the user to open leaf groups. confused? remember for pivot mode we don't allow\n // opening leaf groups, so we have to force leafGroups to be closed in case the user expanded\n // them via the API, or user user expanded them in the UI before turning on pivot mode\n var lockedClosedGroup = this.rowNode.leafGroup && this.beans.columnModel.isPivotMode();\n var isOpenGroup = this.rowNode.group && this.rowNode.expanded && !this.rowNode.footer && !lockedClosedGroup;\n // are we showing group footers\n var groupFootersEnabled = this.beans.gridOptionsWrapper.isGroupIncludeFooter();\n // if doing footers, we normally don't show agg data at group level when group is open\n var groupAlwaysShowAggData = this.beans.gridOptionsWrapper.isGroupSuppressBlankHeader();\n // if doing grouping and footers, we don't want to include the agg value\n // in the header when the group is open\n var ignoreAggData = (isOpenGroup && groupFootersEnabled) && !groupAlwaysShowAggData;\n var value = this.beans.valueService.getValue(this.column, this.rowNode, false, ignoreAggData);\n return value;\n };\n CellCtrl.prototype.getValue = function () {\n return this.value;\n };\n CellCtrl.prototype.getValueFormatted = function () {\n return this.valueFormatted;\n };\n CellCtrl.prototype.addDomData = function () {\n var _this = this;\n var element = this.getGui();\n this.beans.gridOptionsWrapper.setDomData(element, CellCtrl.DOM_DATA_KEY_CELL_CTRL, this);\n this.addDestroyFunc(function () { return _this.beans.gridOptionsWrapper.setDomData(element, CellCtrl.DOM_DATA_KEY_CELL_CTRL, null); });\n };\n CellCtrl.prototype.createEvent = function (domEvent, eventType) {\n var event = {\n type: eventType,\n node: this.rowNode,\n data: this.rowNode.data,\n value: this.value,\n column: this.column,\n colDef: this.column.getColDef(),\n context: this.beans.gridOptionsWrapper.getContext(),\n api: this.beans.gridApi,\n columnApi: this.beans.columnApi,\n rowPinned: this.rowNode.rowPinned,\n event: domEvent,\n rowIndex: this.rowNode.rowIndex\n };\n // because we are hacking in $scope for angular 1, we have to de-reference\n if (this.scope) {\n event.$scope = this.scope;\n }\n return event;\n };\n CellCtrl.prototype.onKeyPress = function (event) {\n this.cellKeyboardListenerFeature.onKeyPress(event);\n };\n CellCtrl.prototype.onKeyDown = function (event) {\n this.cellKeyboardListenerFeature.onKeyDown(event);\n };\n CellCtrl.prototype.onMouseEvent = function (eventName, mouseEvent) {\n this.cellMouseListenerFeature.onMouseEvent(eventName, mouseEvent);\n };\n CellCtrl.prototype.getGui = function () {\n return this.eGui;\n };\n CellCtrl.prototype.refreshToolTip = function () {\n this.tooltipFeature.refreshToolTip();\n };\n CellCtrl.prototype.getColSpanningList = function () {\n return this.cellPositionFeature.getColSpanningList();\n };\n CellCtrl.prototype.onLeftChanged = function () {\n this.cellPositionFeature.onLeftChanged();\n this.refreshAriaIndex(); // should change this to listen for when column order changes\n };\n CellCtrl.prototype.refreshAriaIndex = function () {\n var colIdx = this.beans.columnModel.getAriaColumnIndex(this.column);\n this.cellComp.setAriaColIndex(colIdx);\n };\n CellCtrl.prototype.isSuppressNavigable = function () {\n return this.column.isSuppressNavigable(this.rowNode);\n };\n CellCtrl.prototype.onWidthChanged = function () {\n return this.cellPositionFeature.onWidthChanged();\n };\n CellCtrl.prototype.getColumn = function () {\n return this.column;\n };\n CellCtrl.prototype.getRowNode = function () {\n return this.rowNode;\n };\n CellCtrl.prototype.getBeans = function () {\n return this.beans;\n };\n CellCtrl.prototype.isPrintLayout = function () {\n return this.printLayout;\n };\n CellCtrl.prototype.appendChild = function (htmlElement) {\n this.eGui.appendChild(htmlElement);\n };\n CellCtrl.prototype.refreshHandle = function () {\n if (this.editing) {\n return;\n }\n if (this.cellRangeFeature) {\n this.cellRangeFeature.refreshHandle();\n }\n };\n CellCtrl.prototype.getCellPosition = function () {\n return this.cellPosition;\n };\n CellCtrl.prototype.isEditing = function () {\n return this.editing;\n };\n // called by rowRenderer when user navigates via tab key\n CellCtrl.prototype.startRowOrCellEdit = function (keyPress, charPress) {\n if (this.beans.gridOptionsWrapper.isFullRowEdit()) {\n this.rowCtrl.startRowEditing(keyPress, charPress, this);\n }\n else {\n this.startEditing(keyPress, charPress, true);\n }\n };\n CellCtrl.prototype.getRowCtrl = function () {\n return this.rowCtrl;\n };\n CellCtrl.prototype.getRowPosition = function () {\n return {\n rowIndex: this.cellPosition.rowIndex,\n rowPinned: this.cellPosition.rowPinned\n };\n };\n CellCtrl.prototype.updateRangeBordersIfRangeCount = function () {\n if (this.cellRangeFeature) {\n this.cellRangeFeature.updateRangeBordersIfRangeCount();\n }\n };\n CellCtrl.prototype.onRangeSelectionChanged = function () {\n if (this.cellRangeFeature) {\n this.cellRangeFeature.onRangeSelectionChanged();\n }\n };\n CellCtrl.prototype.isRangeSelectionEnabled = function () {\n return this.cellRangeFeature != null;\n };\n CellCtrl.prototype.focusCell = function (forceBrowserFocus) {\n if (forceBrowserFocus === void 0) { forceBrowserFocus = false; }\n this.beans.focusService.setFocusedCell(this.getCellPosition().rowIndex, this.column, this.rowNode.rowPinned, forceBrowserFocus);\n };\n CellCtrl.prototype.onRowIndexChanged = function () {\n // when index changes, this influences items that need the index, so we update the\n // grid cell so they are working off the new index.\n this.createCellPosition();\n // when the index of the row changes, ie means the cell may have lost or gained focus\n this.onCellFocused();\n // check range selection\n if (this.cellRangeFeature) {\n this.cellRangeFeature.onRangeSelectionChanged();\n }\n };\n CellCtrl.prototype.onFirstRightPinnedChanged = function () {\n if (!this.cellComp) {\n return;\n }\n var firstRightPinned = this.column.isFirstRightPinned();\n this.cellComp.addOrRemoveCssClass(CSS_CELL_FIRST_RIGHT_PINNED, firstRightPinned);\n };\n CellCtrl.prototype.onLastLeftPinnedChanged = function () {\n if (!this.cellComp) {\n return;\n }\n var lastLeftPinned = this.column.isLastLeftPinned();\n this.cellComp.addOrRemoveCssClass(CSS_CELL_LAST_LEFT_PINNED, lastLeftPinned);\n };\n CellCtrl.prototype.onCellFocused = function (event) {\n if (!this.cellComp) {\n return;\n }\n var cellFocused = this.beans.focusService.isCellFocused(this.cellPosition);\n if (!this.gow.isSuppressCellSelection()) {\n this.cellComp.addOrRemoveCssClass(CSS_CELL_FOCUS, cellFocused);\n }\n // see if we need to force browser focus - this can happen if focus is programmatically set\n if (cellFocused && event && event.forceBrowserFocus) {\n var focusEl = this.cellComp.getFocusableElement();\n focusEl.focus();\n // Fix for AG-3465 \"IE11 - After editing cell's content, selection doesn't go one cell below on enter\"\n // IE can fail to focus the cell after the first call to focus(), and needs a second call\n if (!document.activeElement || document.activeElement === document.body) {\n focusEl.focus();\n }\n }\n // if another cell was focused, and we are editing, then stop editing\n var fullRowEdit = this.beans.gridOptionsWrapper.isFullRowEdit();\n if (!cellFocused && !fullRowEdit && this.editing) {\n this.stopRowOrCellEdit();\n }\n };\n CellCtrl.prototype.createCellPosition = function () {\n this.cellPosition = {\n rowIndex: this.rowNode.rowIndex,\n rowPinned: this.rowNode.rowPinned,\n column: this.column\n };\n };\n // CSS Classes that only get applied once, they never change\n CellCtrl.prototype.applyStaticCssClasses = function () {\n this.cellComp.addOrRemoveCssClass(CSS_CELL, true);\n this.cellComp.addOrRemoveCssClass(CSS_CELL_NOT_INLINE_EDITING, true);\n // normal cells fill the height of the row. autoHeight cells have no height to let them\n // fit the height of content.\n // const autoHeight = this.column.getColDef().autoHeight == true;\n // this.cellComp.addOrRemoveCssClass(CSS_AUTO_HEIGHT, autoHeight);\n // this.cellComp.addOrRemoveCssClass(CSS_NORMAL_HEIGHT, !autoHeight);\n this.cellComp.addOrRemoveCssClass(CSS_NORMAL_HEIGHT, true);\n };\n CellCtrl.prototype.onColumnHover = function () {\n if (!this.cellComp) {\n return;\n }\n if (!this.beans.gridOptionsWrapper.isColumnHoverHighlight()) {\n return;\n }\n var isHovered = this.beans.columnHoverService.isHovered(this.column);\n this.cellComp.addOrRemoveCssClass(CSS_COLUMN_HOVER, isHovered);\n };\n CellCtrl.prototype.onNewColumnsLoaded = function () {\n if (!this.cellComp) {\n return;\n }\n this.setWrapText();\n if (!this.editing) {\n this.refreshCell({ forceRefresh: true, suppressFlash: true });\n }\n };\n CellCtrl.prototype.setWrapText = function () {\n var value = this.column.getColDef().wrapText == true;\n this.cellComp.addOrRemoveCssClass(CSS_CELL_WRAP_TEXT, value);\n };\n CellCtrl.prototype.dispatchCellContextMenuEvent = function (event) {\n var colDef = this.column.getColDef();\n var cellContextMenuEvent = this.createEvent(event, Events.EVENT_CELL_CONTEXT_MENU);\n this.beans.eventService.dispatchEvent(cellContextMenuEvent);\n if (colDef.onCellContextMenu) {\n // to make the callback async, do in a timeout\n window.setTimeout(function () { return colDef.onCellContextMenu(cellContextMenuEvent); }, 0);\n }\n };\n CellCtrl.prototype.getCellRenderer = function () {\n return this.cellComp ? this.cellComp.getCellRenderer() : null;\n };\n CellCtrl.prototype.getCellEditor = function () {\n return this.cellComp ? this.cellComp.getCellEditor() : null;\n };\n CellCtrl.prototype.destroy = function () {\n _super.prototype.destroy.call(this);\n };\n CellCtrl.prototype.createSelectionCheckbox = function () {\n var cbSelectionComponent = new CheckboxSelectionComponent();\n this.beans.context.createBean(cbSelectionComponent);\n cbSelectionComponent.init({ rowNode: this.rowNode, column: this.column });\n // put the checkbox in before the value\n return cbSelectionComponent;\n };\n CellCtrl.prototype.createDndSource = function () {\n var dndSourceComp = new DndSourceComp(this.rowNode, this.column, this.beans, this.eGui);\n this.beans.context.createBean(dndSourceComp);\n return dndSourceComp;\n };\n CellCtrl.prototype.registerRowDragger = function (customElement, dragStartPixels, suppressVisibilityChange) {\n var _this = this;\n // if previously existed, then we are only updating\n if (this.customRowDragComp) {\n this.customRowDragComp.setDragElement(customElement, dragStartPixels);\n return;\n }\n var newComp = this.createRowDragComp(customElement, dragStartPixels, suppressVisibilityChange);\n if (newComp) {\n this.customRowDragComp = newComp;\n this.addDestroyFunc(function () { return _this.beans.context.destroyBean(newComp); });\n }\n };\n CellCtrl.prototype.createRowDragComp = function (customElement, dragStartPixels, suppressVisibilityChange) {\n var _this = this;\n var pagination = this.beans.gridOptionsWrapper.isPagination();\n var rowDragManaged = this.beans.gridOptionsWrapper.isRowDragManaged();\n var clientSideRowModelActive = this.beans.gridOptionsWrapper.isRowModelDefault();\n if (rowDragManaged) {\n // row dragging only available in default row model\n if (!clientSideRowModelActive) {\n doOnce(function () { return console.warn('AG Grid: managed row dragging is only allowed in the Client Side Row Model'); }, 'CellComp.addRowDragging');\n return;\n }\n if (pagination) {\n doOnce(function () { return console.warn('AG Grid: managed row dragging is not possible when doing pagination'); }, 'CellComp.addRowDragging');\n return;\n }\n }\n // otherwise (normal case) we are creating a RowDraggingComp for the first time\n var rowDragComp = new RowDragComp(function () { return _this.value; }, this.rowNode, this.column, customElement, dragStartPixels, suppressVisibilityChange);\n this.beans.context.createBean(rowDragComp);\n return rowDragComp;\n };\n CellCtrl.DOM_DATA_KEY_CELL_CTRL = 'cellCtrl';\n return CellCtrl;\n}(BeanStub));\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / React / AngularJS / Web Components\n * @version v26.1.0\n * @link http://www.ag-grid.com/\n * @license MIT\n */\nvar __assign$7 = (undefined && undefined.__assign) || function () {\n __assign$7 = 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))\n t[p] = s[p];\n }\n return t;\n };\n return __assign$7.apply(this, arguments);\n};\nvar AngularRowUtils = /** @class */ (function () {\n function AngularRowUtils() {\n }\n AngularRowUtils.createChildScopeOrNull = function (rowNode, parentScope, gridOptionsWrapper) {\n var isAngularCompileRows = gridOptionsWrapper.isAngularCompileRows();\n if (!isAngularCompileRows) {\n return null;\n }\n var newChildScope = parentScope.$new();\n newChildScope.data = __assign$7({}, rowNode.data);\n newChildScope.rowNode = rowNode;\n newChildScope.context = gridOptionsWrapper.getContext();\n var destroyFunc = function () {\n newChildScope.$destroy();\n newChildScope.data = null;\n newChildScope.rowNode = null;\n newChildScope.context = null;\n };\n return {\n scope: newChildScope,\n scopeDestroyFunc: destroyFunc\n };\n };\n return AngularRowUtils;\n}());\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / React / AngularJS / Web Components\n * @version v26.1.0\n * @link http://www.ag-grid.com/\n * @license MIT\n */\nvar __extends$N = (undefined && undefined.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __spreadArrays$5 = (undefined && undefined.__spreadArrays) || function () {\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\n r[k] = a[j];\n return r;\n};\nvar RowType;\n(function (RowType) {\n RowType[\"Normal\"] = \"Normal\";\n RowType[\"FullWidth\"] = \"FullWidth\";\n RowType[\"FullWidthLoading\"] = \"FullWidthLoading\";\n RowType[\"FullWidthGroup\"] = \"FullWidthGroup\";\n RowType[\"FullWidthDetail\"] = \"FullWidthDetail\";\n})(RowType || (RowType = {}));\nvar FullWidthRenderers = convertToMap([\n [RowType.FullWidthLoading, 'agLoadingCellRenderer'],\n [RowType.FullWidthGroup, 'agGroupRowRenderer'],\n [RowType.FullWidthDetail, 'agDetailCellRenderer']\n]);\nvar FullWidthKeys = convertToMap([\n [RowType.FullWidth, 'fullWidthCellRenderer'],\n [RowType.FullWidthLoading, 'loadingCellRenderer'],\n [RowType.FullWidthGroup, 'groupRowRenderer'],\n [RowType.FullWidthDetail, 'detailCellRenderer']\n]);\nvar instanceIdSequence$2 = 0;\nvar RowCtrl = /** @class */ (function (_super) {\n __extends$N(RowCtrl, _super);\n function RowCtrl(parentScope, rowNode, beans, animateIn, useAnimationFrameForCreate, printLayout) {\n var _this = _super.call(this) || this;\n _this.allRowGuis = [];\n _this.active = true;\n _this.centerCellCtrls = { list: [], map: {} };\n _this.leftCellCtrls = { list: [], map: {} };\n _this.rightCellCtrls = { list: [], map: {} };\n _this.lastMouseDownOnDragger = false;\n _this.updateColumnListsPending = false;\n _this.parentScope = parentScope;\n _this.beans = beans;\n _this.rowNode = rowNode;\n _this.paginationPage = _this.beans.paginationProxy.getCurrentPage();\n _this.useAnimationFrameForCreate = useAnimationFrameForCreate;\n _this.printLayout = printLayout;\n _this.instanceId = rowNode.id + '-' + instanceIdSequence$2++;\n _this.setAnimateFlags(animateIn);\n _this.rowFocused = _this.beans.focusService.isRowFocused(_this.rowNode.rowIndex, _this.rowNode.rowPinned);\n _this.setupAngular1Scope();\n _this.rowLevel = _this.beans.rowCssClassCalculator.calculateRowLevel(_this.rowNode);\n _this.setRowType();\n _this.addListeners();\n _this.setInitialRowTop();\n return _this;\n }\n RowCtrl.prototype.getBeans = function () {\n return this.beans;\n };\n RowCtrl.prototype.getInstanceId = function () {\n return this.instanceId;\n };\n RowCtrl.prototype.setComp = function (rowComp, element, pinned) {\n var gui = { rowComp: rowComp, element: element, pinned: pinned };\n this.allRowGuis.push(gui);\n if (pinned === Constants.PINNED_LEFT) {\n this.leftGui = gui;\n }\n else if (pinned === Constants.PINNED_RIGHT) {\n this.rightGui = gui;\n }\n else if (this.isFullWidth() && !this.beans.gridOptionsWrapper.isEmbedFullWidthRows()) {\n this.fullWidthGui = gui;\n }\n else {\n this.centerGui = gui;\n }\n var allNormalPresent = this.leftGui != null && this.rightGui != null && this.centerGui != null;\n var fullWidthPresent = this.fullWidthGui != null;\n if (allNormalPresent || fullWidthPresent) {\n this.initialiseRowComps();\n }\n };\n RowCtrl.prototype.isCacheable = function () {\n return this.rowType === RowType.FullWidthDetail\n && this.beans.gridOptionsWrapper.isKeepDetailRows();\n };\n RowCtrl.prototype.setCached = function (cached) {\n var displayValue = cached ? 'none' : undefined;\n this.allRowGuis.forEach(function (rg) { return rg.rowComp.setDisplay(displayValue); });\n };\n RowCtrl.prototype.initialiseRowComps = function () {\n var _this = this;\n var gow = this.beans.gridOptionsWrapper;\n this.onRowHeightChanged();\n this.updateRowIndexes();\n this.setFocusedClasses();\n this.setStylesFromGridOptions();\n if (gow.isRowSelection() && this.rowNode.selectable) {\n this.onRowSelected();\n }\n this.updateColumnLists(!this.useAnimationFrameForCreate);\n if (this.slideRowIn) {\n executeNextVMTurn(this.onTopChanged.bind(this));\n }\n if (this.fadeRowIn) {\n executeNextVMTurn(function () {\n _this.allRowGuis.forEach(function (gui) { return gui.rowComp.addOrRemoveCssClass('ag-opacity-zero', false); });\n });\n }\n var businessKey = this.getRowBusinessKey();\n var rowIdSanitised = escapeString(this.rowNode.id);\n var businessKeySanitised = escapeString(businessKey);\n this.allRowGuis.forEach(function (gui) {\n var comp = gui.rowComp;\n comp.setRole('row');\n var initialRowClasses = _this.getInitialRowClasses(gui.pinned);\n initialRowClasses.forEach(function (name) { return comp.addOrRemoveCssClass(name, true); });\n if (_this.rowNode.group) {\n comp.setAriaExpanded(_this.rowNode.expanded == true);\n }\n if (rowIdSanitised != null) {\n comp.setRowId(rowIdSanitised);\n }\n if (businessKeySanitised != null) {\n comp.setRowBusinessKey(businessKeySanitised);\n }\n if (_this.isFullWidth()) {\n comp.setTabIndex(-1);\n }\n // DOM DATA\n gow.setDomData(gui.element, RowCtrl.DOM_DATA_KEY_RENDERED_ROW, _this);\n _this.addDestroyFunc(function () { return gow.setDomData(gui.element, RowCtrl.DOM_DATA_KEY_RENDERED_ROW, null); });\n // adding hover functionality adds listener to this row, so we\n // do it lazily in an animation frame\n if (_this.useAnimationFrameForCreate) {\n _this.beans.animationFrameService.createTask(_this.addHoverFunctionality.bind(_this, gui.element), _this.rowNode.rowIndex, 'createTasksP2');\n }\n else {\n _this.addHoverFunctionality(gui.element);\n }\n if (_this.isFullWidth()) {\n _this.setupFullWidth(gui);\n }\n if (gow.isRowDragEntireRow()) {\n _this.addRowDraggerToRow(gui);\n }\n // the height animation we only want active after the row is alive for 1 second.\n // this stops the row animation working when rows are initially crated. otherwise\n // auto-height rows get inserted into the dom and resized immediately, which gives\n // very bad UX (eg 10 rows get inserted, then all 10 expand, look particularly bad\n // when scrolling). so this makes sure when rows are shown for the first time, they\n // are resized immediately without animation.\n _this.beans.animationFrameService.addDestroyTask(function () {\n if (_this.isAlive()) {\n gui.rowComp.addOrRemoveCssClass('ag-after-created', true);\n }\n });\n });\n this.executeProcessRowPostCreateFunc();\n };\n RowCtrl.prototype.addRowDraggerToRow = function (gui) {\n var gow = this.beans.gridOptionsWrapper;\n if (gow.isEnableRangeSelection()) {\n doOnce(function () {\n console.warn('AG Grid: Setting `rowDragEntireRow: true` in the gridOptions doesn\\'t work with `enableRangeSelection: true`');\n }, 'rowDragAndRangeSelectionEnabled');\n return;\n }\n var rowDragComp = new RowDragComp(function () { return '1 row'; }, this.rowNode, undefined, gui.element, undefined, true);\n this.createManagedBean(rowDragComp, this.beans.context);\n };\n RowCtrl.prototype.getFullWidthCellRendererType = function () {\n return FullWidthKeys.get(this.rowType);\n };\n RowCtrl.prototype.getFullWidthCellRendererName = function () {\n return FullWidthRenderers.get(this.rowType);\n };\n RowCtrl.prototype.setupFullWidth = function (gui) {\n var params = this.createFullWidthParams(gui.element, gui.pinned);\n var cellRendererType = this.getFullWidthCellRendererType();\n var cellRendererName = this.getFullWidthCellRendererName();\n var compDetails = this.beans.userComponentFactory.getFullWidthCellRendererDetails(params, cellRendererType, cellRendererName);\n if (compDetails) {\n gui.rowComp.showFullWidth(compDetails);\n }\n else {\n var masterDetailModuleLoaded = ModuleRegistry.isRegistered(exports.ModuleNames.MasterDetailModule);\n if (cellRendererName === 'agDetailCellRenderer' && !masterDetailModuleLoaded) {\n console.warn(\"AG Grid: cell renderer agDetailCellRenderer (for master detail) not found. Did you forget to include the master detail module?\");\n }\n else {\n console.error(\"AG Grid: fullWidthCellRenderer \" + cellRendererName + \" not found\");\n }\n }\n };\n RowCtrl.prototype.getScope = function () {\n return this.scope;\n };\n RowCtrl.prototype.isPrintLayout = function () {\n return this.printLayout;\n };\n RowCtrl.prototype.setupAngular1Scope = function () {\n var scopeResult = AngularRowUtils.createChildScopeOrNull(this.rowNode, this.parentScope, this.beans.gridOptionsWrapper);\n if (scopeResult) {\n this.scope = scopeResult.scope;\n this.addDestroyFunc(scopeResult.scopeDestroyFunc);\n }\n };\n // use by autoWidthCalculator, as it clones the elements\n RowCtrl.prototype.getCellElement = function (column) {\n var cellCtrl = this.getCellCtrl(column);\n return cellCtrl ? cellCtrl.getGui() : null;\n };\n RowCtrl.prototype.executeProcessRowPostCreateFunc = function () {\n var func = this.beans.gridOptionsWrapper.getProcessRowPostCreateFunc();\n if (!func) {\n return;\n }\n var params = {\n eRow: this.centerGui ? this.centerGui.element : undefined,\n ePinnedLeftRow: this.leftGui ? this.leftGui.element : undefined,\n ePinnedRightRow: this.rightGui ? this.rightGui.element : undefined,\n node: this.rowNode,\n api: this.beans.gridOptionsWrapper.getApi(),\n rowIndex: this.rowNode.rowIndex,\n addRenderedRowListener: this.addEventListener.bind(this),\n columnApi: this.beans.gridOptionsWrapper.getColumnApi(),\n context: this.beans.gridOptionsWrapper.getContext()\n };\n func(params);\n };\n RowCtrl.prototype.setRowType = function () {\n var isStub = this.rowNode.stub;\n var isFullWidthCell = this.rowNode.isFullWidthCell();\n var isDetailCell = this.beans.doingMasterDetail && this.rowNode.detail;\n var pivotMode = this.beans.columnModel.isPivotMode();\n // we only use full width for groups, not footers. it wouldn't make sense to include footers if not looking\n // for totals. if users complain about this, then we should introduce a new property 'footerUseEntireRow'\n // so each can be set independently (as a customer complained about footers getting full width, hence\n // introducing this logic)\n var isGroupRow = !!this.rowNode.group && !this.rowNode.footer;\n var isFullWidthGroup = isGroupRow && this.beans.gridOptionsWrapper.isGroupUseEntireRow(pivotMode);\n if (isStub) {\n this.rowType = RowType.FullWidthLoading;\n }\n else if (isDetailCell) {\n this.rowType = RowType.FullWidthDetail;\n }\n else if (isFullWidthCell) {\n this.rowType = RowType.FullWidth;\n }\n else if (isFullWidthGroup) {\n this.rowType = RowType.FullWidthGroup;\n }\n else {\n this.rowType = RowType.Normal;\n }\n };\n RowCtrl.prototype.updateColumnLists = function (suppressAnimationFrame) {\n var _this = this;\n if (suppressAnimationFrame === void 0) { suppressAnimationFrame = false; }\n if (this.isFullWidth()) {\n return;\n }\n var noAnimation = suppressAnimationFrame\n || this.beans.gridOptionsWrapper.isSuppressAnimationFrame()\n || this.printLayout;\n if (noAnimation) {\n this.updateColumnListsImpl();\n return;\n }\n if (this.updateColumnListsPending) {\n return;\n }\n this.beans.animationFrameService.createTask(function () {\n if (!_this.active) {\n return;\n }\n _this.updateColumnListsImpl();\n }, this.rowNode.rowIndex, 'createTasksP1');\n this.updateColumnListsPending = true;\n };\n RowCtrl.prototype.createCellCtrls = function (prev, cols, pinned) {\n var _this = this;\n if (pinned === void 0) { pinned = null; }\n var res = {\n list: [],\n map: {}\n };\n var addCell = function (colInstanceId, cellCtrl) {\n res.list.push(cellCtrl);\n res.map[colInstanceId] = cellCtrl;\n };\n cols.forEach(function (col) {\n // we use instanceId's rather than colId as it's possible there is a Column with same Id,\n // but it's referring to a different column instance. Happens a lot with pivot, as pivot col id's are\n // reused eg pivot_0, pivot_1 etc\n var colInstanceId = col.getInstanceId();\n var cellCtrl = prev.map[colInstanceId];\n if (!cellCtrl) {\n cellCtrl = new CellCtrl(col, _this.rowNode, _this.beans, _this);\n }\n addCell(colInstanceId, cellCtrl);\n });\n prev.list.forEach(function (prevCellCtrl) {\n var cellInResult = res.map[prevCellCtrl.getColumn().getInstanceId()] != null;\n if (cellInResult) {\n return;\n }\n var keepCell = !_this.isCellEligibleToBeRemoved(prevCellCtrl, pinned);\n if (keepCell) {\n addCell(prevCellCtrl.getColumn().getInstanceId(), prevCellCtrl);\n return;\n }\n prevCellCtrl.destroy();\n });\n return res;\n };\n RowCtrl.prototype.updateColumnListsImpl = function () {\n var _this = this;\n this.updateColumnListsPending = false;\n var columnModel = this.beans.columnModel;\n if (this.printLayout) {\n this.centerCellCtrls = this.createCellCtrls(this.centerCellCtrls, columnModel.getAllDisplayedColumns());\n this.leftCellCtrls = { list: [], map: {} };\n this.rightCellCtrls = { list: [], map: {} };\n }\n else {\n var centerCols = columnModel.getViewportCenterColumnsForRow(this.rowNode);\n this.centerCellCtrls = this.createCellCtrls(this.centerCellCtrls, centerCols);\n var leftCols = columnModel.getDisplayedLeftColumnsForRow(this.rowNode);\n this.leftCellCtrls = this.createCellCtrls(this.leftCellCtrls, leftCols, Constants.PINNED_LEFT);\n var rightCols = columnModel.getDisplayedRightColumnsForRow(this.rowNode);\n this.rightCellCtrls = this.createCellCtrls(this.rightCellCtrls, rightCols, Constants.PINNED_RIGHT);\n }\n this.allRowGuis.forEach(function (item) {\n var cellControls = item.pinned === Constants.PINNED_LEFT ? _this.leftCellCtrls :\n item.pinned === Constants.PINNED_RIGHT ? _this.rightCellCtrls : _this.centerCellCtrls;\n item.rowComp.setCellCtrls(cellControls.list);\n });\n };\n RowCtrl.prototype.isCellEligibleToBeRemoved = function (cellCtrl, nextContainerPinned) {\n var REMOVE_CELL = true;\n var KEEP_CELL = false;\n // always remove the cell if it's not rendered or if it's in the wrong pinned location\n var column = cellCtrl.getColumn();\n if (column.getPinned() != nextContainerPinned) {\n return REMOVE_CELL;\n }\n // we want to try and keep editing and focused cells\n var editing = cellCtrl.isEditing();\n var focused = this.beans.focusService.isCellFocused(cellCtrl.getCellPosition());\n var mightWantToKeepCell = editing || focused;\n if (mightWantToKeepCell) {\n var column_1 = cellCtrl.getColumn();\n var displayedColumns = this.beans.columnModel.getAllDisplayedColumns();\n var cellStillDisplayed = displayedColumns.indexOf(column_1) >= 0;\n return cellStillDisplayed ? KEEP_CELL : REMOVE_CELL;\n }\n return REMOVE_CELL;\n };\n RowCtrl.prototype.setAnimateFlags = function (animateIn) {\n if (animateIn) {\n var oldRowTopExists = exists(this.rowNode.oldRowTop);\n // if the row had a previous position, we slide it in (animate row top)\n this.slideRowIn = oldRowTopExists;\n // if the row had no previous position, we fade it in (animate\n this.fadeRowIn = !oldRowTopExists;\n }\n else {\n this.slideRowIn = false;\n this.fadeRowIn = false;\n }\n };\n RowCtrl.prototype.isEditing = function () {\n return this.editingRow;\n };\n RowCtrl.prototype.stopRowEditing = function (cancel) {\n this.stopEditing(cancel);\n };\n RowCtrl.prototype.isFullWidth = function () {\n return this.rowType !== RowType.Normal;\n };\n RowCtrl.prototype.getRowType = function () {\n return this.rowType;\n };\n RowCtrl.prototype.refreshFullWidth = function () {\n var _this = this;\n // returns 'true' if refresh succeeded\n var tryRefresh = function (gui, pinned) {\n if (!gui) {\n return true;\n } // no refresh needed\n var cellRenderer = gui.rowComp.getFullWidthCellRenderer();\n // no cell renderer, either means comp not yet ready, or comp ready but now reference\n // to it (happens in react when comp is stateless). if comp not ready, we don't need to\n // refresh, however we don't know which one, so we refresh to cover the case where it's\n // react comp without reference so need to force a refresh\n if (!cellRenderer) {\n return false;\n }\n // no refresh method present, so can't refresh, hard refresh needed\n if (!cellRenderer.refresh) {\n return false;\n }\n var params = _this.createFullWidthParams(gui.element, pinned);\n var refreshSucceeded = cellRenderer.refresh(params);\n return refreshSucceeded;\n };\n var fullWidthSuccess = tryRefresh(this.fullWidthGui, null);\n var centerSuccess = tryRefresh(this.centerGui, null);\n var leftSuccess = tryRefresh(this.leftGui, Constants.PINNED_LEFT);\n var rightSuccess = tryRefresh(this.rightGui, Constants.PINNED_RIGHT);\n var allFullWidthRowsRefreshed = fullWidthSuccess && centerSuccess && leftSuccess && rightSuccess;\n return allFullWidthRowsRefreshed;\n };\n RowCtrl.prototype.addListeners = function () {\n this.addManagedListener(this.rowNode, RowNode.EVENT_HEIGHT_CHANGED, this.onRowHeightChanged.bind(this));\n this.addManagedListener(this.rowNode, RowNode.EVENT_ROW_SELECTED, this.onRowSelected.bind(this));\n this.addManagedListener(this.rowNode, RowNode.EVENT_ROW_INDEX_CHANGED, this.onRowIndexChanged.bind(this));\n this.addManagedListener(this.rowNode, RowNode.EVENT_TOP_CHANGED, this.onTopChanged.bind(this));\n this.addManagedListener(this.rowNode, RowNode.EVENT_EXPANDED_CHANGED, this.updateExpandedCss.bind(this));\n this.addManagedListener(this.rowNode, RowNode.EVENT_HAS_CHILDREN_CHANGED, this.updateExpandedCss.bind(this));\n this.addManagedListener(this.rowNode, RowNode.EVENT_DATA_CHANGED, this.onRowNodeDataChanged.bind(this));\n this.addManagedListener(this.rowNode, RowNode.EVENT_CELL_CHANGED, this.onRowNodeCellChanged.bind(this));\n this.addManagedListener(this.rowNode, RowNode.EVENT_HIGHLIGHT_CHANGED, this.onRowNodeHighlightChanged.bind(this));\n this.addManagedListener(this.rowNode, RowNode.EVENT_DRAGGING_CHANGED, this.onRowNodeDraggingChanged.bind(this));\n this.addManagedListener(this.rowNode, RowNode.EVENT_UI_LEVEL_CHANGED, this.onUiLevelChanged.bind(this));\n var eventService = this.beans.eventService;\n this.addManagedListener(eventService, Events.EVENT_PAGINATION_PIXEL_OFFSET_CHANGED, this.onPaginationPixelOffsetChanged.bind(this));\n this.addManagedListener(eventService, Events.EVENT_HEIGHT_SCALE_CHANGED, this.onTopChanged.bind(this));\n this.addManagedListener(eventService, Events.EVENT_DISPLAYED_COLUMNS_CHANGED, this.onDisplayedColumnsChanged.bind(this));\n this.addManagedListener(eventService, Events.EVENT_VIRTUAL_COLUMNS_CHANGED, this.onVirtualColumnsChanged.bind(this));\n this.addManagedListener(eventService, Events.EVENT_CELL_FOCUSED, this.onCellFocusChanged.bind(this));\n this.addManagedListener(eventService, Events.EVENT_PAGINATION_CHANGED, this.onPaginationChanged.bind(this));\n this.addManagedListener(eventService, Events.EVENT_MODEL_UPDATED, this.onModelUpdated.bind(this));\n this.addManagedListener(eventService, Events.EVENT_COLUMN_MOVED, this.onColumnMoved.bind(this));\n this.addListenersForCellComps();\n };\n RowCtrl.prototype.onColumnMoved = function () {\n this.updateColumnLists();\n };\n RowCtrl.prototype.addListenersForCellComps = function () {\n var _this = this;\n this.addManagedListener(this.rowNode, RowNode.EVENT_ROW_INDEX_CHANGED, function () {\n _this.getAllCellCtrls().forEach(function (cellCtrl) { return cellCtrl.onRowIndexChanged(); });\n });\n this.addManagedListener(this.rowNode, RowNode.EVENT_CELL_CHANGED, function (event) {\n _this.getAllCellCtrls().forEach(function (cellCtrl) { return cellCtrl.onCellChanged(event); });\n });\n };\n RowCtrl.prototype.onRowNodeDataChanged = function (event) {\n // if this is an update, we want to refresh, as this will allow the user to put in a transition\n // into the cellRenderer refresh method. otherwise this might be completely new data, in which case\n // we will want to completely replace the cells\n this.getAllCellCtrls().forEach(function (cellCtrl) {\n return cellCtrl.refreshCell({\n suppressFlash: !event.update,\n newData: !event.update\n });\n });\n // check for selected also, as this could be after lazy loading of the row data, in which case\n // the id might of just gotten set inside the row and the row selected state may of changed\n // as a result. this is what happens when selected rows are loaded in virtual pagination.\n // - niall note - since moving to the stub component, this may no longer be true, as replacing\n // the stub component now replaces the entire row\n this.onRowSelected();\n // as data has changed, then the style and class needs to be recomputed\n this.postProcessCss();\n };\n RowCtrl.prototype.onRowNodeCellChanged = function () {\n // as data has changed, then the style and class needs to be recomputed\n this.postProcessCss();\n };\n RowCtrl.prototype.postProcessCss = function () {\n this.setStylesFromGridOptions();\n this.postProcessClassesFromGridOptions();\n this.postProcessRowClassRules();\n this.postProcessRowDragging();\n };\n RowCtrl.prototype.onRowNodeHighlightChanged = function () {\n var highlighted = this.rowNode.highlighted;\n this.allRowGuis.forEach(function (gui) {\n var aboveOn = highlighted === exports.RowHighlightPosition.Above;\n var belowOn = highlighted === exports.RowHighlightPosition.Below;\n gui.rowComp.addOrRemoveCssClass('ag-row-highlight-above', aboveOn);\n gui.rowComp.addOrRemoveCssClass('ag-row-highlight-below', belowOn);\n });\n };\n RowCtrl.prototype.onRowNodeDraggingChanged = function () {\n this.postProcessRowDragging();\n };\n RowCtrl.prototype.postProcessRowDragging = function () {\n var dragging = this.rowNode.dragging;\n this.allRowGuis.forEach(function (gui) { return gui.rowComp.addOrRemoveCssClass('ag-row-dragging', dragging); });\n };\n RowCtrl.prototype.updateExpandedCss = function () {\n var expandable = this.rowNode.isExpandable();\n var expanded = this.rowNode.expanded == true;\n this.allRowGuis.forEach(function (gui) {\n gui.rowComp.addOrRemoveCssClass('ag-row-group', expandable);\n gui.rowComp.addOrRemoveCssClass('ag-row-group-expanded', expandable && expanded);\n gui.rowComp.addOrRemoveCssClass('ag-row-group-contracted', expandable && !expanded);\n gui.rowComp.setAriaExpanded(expandable && expanded);\n });\n };\n RowCtrl.prototype.onDisplayedColumnsChanged = function () {\n // we skip animations for onDisplayedColumnChanged, as otherwise the client could remove columns and\n // then set data, and any old valueGetter's (ie from cols that were removed) would still get called.\n this.updateColumnLists(true);\n if (this.beans.columnModel.wasAutoRowHeightEverActive()) {\n this.rowNode.checkAutoHeights();\n }\n };\n RowCtrl.prototype.onVirtualColumnsChanged = function () {\n this.updateColumnLists();\n };\n RowCtrl.prototype.getRowPosition = function () {\n return {\n rowPinned: this.rowNode.rowPinned,\n rowIndex: this.rowNode.rowIndex\n };\n };\n RowCtrl.prototype.onKeyboardNavigate = function (keyboardEvent) {\n var currentFullWidthComp = find(this.allRowGuis, function (c) { return c.element.contains(keyboardEvent.target); });\n var currentFullWidthContainer = currentFullWidthComp ? currentFullWidthComp.element : null;\n var isFullWidthContainerFocused = currentFullWidthContainer === keyboardEvent.target;\n if (!isFullWidthContainerFocused) {\n return;\n }\n var node = this.rowNode;\n var lastFocusedCell = this.beans.focusService.getFocusedCell();\n var cellPosition = {\n rowIndex: node.rowIndex,\n rowPinned: node.rowPinned,\n column: (lastFocusedCell && lastFocusedCell.column)\n };\n this.beans.navigationService.navigateToNextCell(keyboardEvent, keyboardEvent.keyCode, cellPosition, true);\n keyboardEvent.preventDefault();\n };\n RowCtrl.prototype.onTabKeyDown = function (keyboardEvent) {\n if (keyboardEvent.defaultPrevented || isStopPropagationForAgGrid(keyboardEvent)) {\n return;\n }\n var currentFullWidthComp = find(this.allRowGuis, function (c) { return c.element.contains(keyboardEvent.target); });\n var currentFullWidthContainer = currentFullWidthComp ? currentFullWidthComp.element : null;\n var isFullWidthContainerFocused = currentFullWidthContainer === keyboardEvent.target;\n var nextEl = null;\n if (!isFullWidthContainerFocused) {\n nextEl = this.beans.focusService.findNextFocusableElement(currentFullWidthContainer, false, keyboardEvent.shiftKey);\n }\n if ((this.isFullWidth() && isFullWidthContainerFocused) || !nextEl) {\n this.beans.navigationService.onTabKeyDown(this, keyboardEvent);\n }\n };\n RowCtrl.prototype.onFullWidthRowFocused = function (event) {\n var node = this.rowNode;\n var isFocused = this.isFullWidth() && event.rowIndex === node.rowIndex && event.rowPinned == node.rowPinned;\n var element = this.fullWidthGui ? this.fullWidthGui.element : this.centerGui.element;\n addOrRemoveCssClass(element, 'ag-full-width-focus', isFocused);\n if (isFocused) {\n // we don't scroll normal rows into view when we focus them, so we don't want\n // to scroll Full Width rows either.\n element.focus({ preventScroll: true });\n }\n };\n RowCtrl.prototype.refreshCell = function (cellCtrl) {\n this.centerCellCtrls = this.removeCellCtrl(this.centerCellCtrls, cellCtrl);\n this.leftCellCtrls = this.removeCellCtrl(this.leftCellCtrls, cellCtrl);\n this.rightCellCtrls = this.removeCellCtrl(this.rightCellCtrls, cellCtrl);\n this.updateColumnLists();\n };\n RowCtrl.prototype.removeCellCtrl = function (prev, cellCtrlToRemove) {\n var res = {\n list: [],\n map: {}\n };\n prev.list.forEach(function (cellCtrl) {\n if (cellCtrl === cellCtrlToRemove) {\n return;\n }\n res.list.push(cellCtrl);\n res.map[cellCtrl.getInstanceId()] = cellCtrl;\n });\n return res;\n };\n RowCtrl.prototype.onMouseEvent = function (eventName, mouseEvent) {\n switch (eventName) {\n case 'dblclick':\n this.onRowDblClick(mouseEvent);\n break;\n case 'click':\n this.onRowClick(mouseEvent);\n break;\n case 'touchstart':\n case 'mousedown':\n this.onRowMouseDown(mouseEvent);\n break;\n }\n };\n RowCtrl.prototype.createRowEvent = function (type, domEvent) {\n return {\n type: type,\n node: this.rowNode,\n data: this.rowNode.data,\n rowIndex: this.rowNode.rowIndex,\n rowPinned: this.rowNode.rowPinned,\n context: this.beans.gridOptionsWrapper.getContext(),\n api: this.beans.gridOptionsWrapper.getApi(),\n columnApi: this.beans.gridOptionsWrapper.getColumnApi(),\n event: domEvent\n };\n };\n RowCtrl.prototype.createRowEventWithSource = function (type, domEvent) {\n var event = this.createRowEvent(type, domEvent);\n // when first developing this, we included the rowComp in the event.\n // this seems very weird. so when introducing the event types, i left the 'source'\n // out of the type, and just include the source in the two places where this event\n // was fired (rowClicked and rowDoubleClicked). it doesn't make sense for any\n // users to be using this, as the rowComp isn't an object we expose, so would be\n // very surprising if a user was using it.\n event.source = this;\n return event;\n };\n RowCtrl.prototype.onRowDblClick = function (mouseEvent) {\n if (isStopPropagationForAgGrid(mouseEvent)) {\n return;\n }\n var agEvent = this.createRowEventWithSource(Events.EVENT_ROW_DOUBLE_CLICKED, mouseEvent);\n this.beans.eventService.dispatchEvent(agEvent);\n };\n RowCtrl.prototype.onRowMouseDown = function (mouseEvent) {\n this.lastMouseDownOnDragger = isElementChildOfClass(mouseEvent.target, 'ag-row-drag', 3);\n if (!this.isFullWidth()) {\n return;\n }\n var node = this.rowNode;\n var columnModel = this.beans.columnModel;\n this.beans.focusService.setFocusedCell(node.rowIndex, columnModel.getAllDisplayedColumns()[0], node.rowPinned, true);\n };\n RowCtrl.prototype.onRowClick = function (mouseEvent) {\n var stop = isStopPropagationForAgGrid(mouseEvent) || this.lastMouseDownOnDragger;\n if (stop) {\n return;\n }\n var agEvent = this.createRowEventWithSource(Events.EVENT_ROW_CLICKED, mouseEvent);\n this.beans.eventService.dispatchEvent(agEvent);\n // ctrlKey for windows, metaKey for Apple\n var multiSelectKeyPressed = mouseEvent.ctrlKey || mouseEvent.metaKey;\n var shiftKeyPressed = mouseEvent.shiftKey;\n // we do not allow selecting the group by clicking, when groupSelectChildren, as the logic to\n // handle this is broken. to observe, change the logic below and allow groups to be selected.\n // you will see the group gets selected, then all children get selected, then the grid unselects\n // the children (as the default behaviour when clicking is to unselect other rows) which results\n // in the group getting unselected (as all children are unselected). the correct thing would be\n // to change this, so that children of the selected group are not then subsequenly un-selected.\n var groupSelectsChildren = this.beans.gridOptionsWrapper.isGroupSelectsChildren();\n if (\n // we do not allow selecting groups by clicking (as the click here expands the group), or if it's a detail row,\n // so return if it's a group row\n (groupSelectsChildren && this.rowNode.group) ||\n // this is needed so we don't unselect other rows when we click this row, eg if this row is not selectable,\n // and we click it, the selection should not change (ie any currently selected row should stay selected)\n !this.rowNode.selectable ||\n // we also don't allow selection of pinned rows\n this.rowNode.rowPinned ||\n // if no selection method enabled, do nothing\n !this.beans.gridOptionsWrapper.isRowSelection() ||\n // if click selection suppressed, do nothing\n this.beans.gridOptionsWrapper.isSuppressRowClickSelection()) {\n return;\n }\n var multiSelectOnClick = this.beans.gridOptionsWrapper.isRowMultiSelectWithClick();\n var rowDeselectionWithCtrl = !this.beans.gridOptionsWrapper.isSuppressRowDeselection();\n if (this.rowNode.isSelected()) {\n if (multiSelectOnClick) {\n this.rowNode.setSelectedParams({ newValue: false });\n }\n else if (multiSelectKeyPressed) {\n if (rowDeselectionWithCtrl) {\n this.rowNode.setSelectedParams({ newValue: false });\n }\n }\n else {\n // selected with no multi key, must make sure anything else is unselected\n this.rowNode.setSelectedParams({ newValue: !shiftKeyPressed, clearSelection: !shiftKeyPressed, rangeSelect: shiftKeyPressed });\n }\n }\n else {\n var clearSelection = multiSelectOnClick ? false : !multiSelectKeyPressed;\n this.rowNode.setSelectedParams({ newValue: true, clearSelection: clearSelection, rangeSelect: shiftKeyPressed });\n }\n };\n RowCtrl.prototype.setupDetailRowAutoHeight = function (eDetailGui) {\n var _this = this;\n if (!this.beans.gridOptionsWrapper.isDetailRowAutoHeight()) {\n return;\n }\n var checkRowSizeFunc = function () {\n var clientHeight = eDetailGui.clientHeight;\n // if the UI is not ready, the height can be 0, which we ignore, as otherwise a flicker will occur\n // as UI goes from the default height, to 0, then to the real height as UI becomes ready. this means\n // it's not possible for have 0 as auto-height, however this is an improbable use case, as even an\n // empty detail grid would still have some styling around it giving at least a few pixels.\n if (clientHeight != null && clientHeight > 0) {\n // we do the update in a timeout, to make sure we are not calling from inside the grid\n // doing another update\n var updateRowHeightFunc = function () {\n _this.rowNode.setRowHeight(clientHeight);\n if (_this.beans.clientSideRowModel) {\n _this.beans.clientSideRowModel.onRowHeightChanged();\n }\n else if (_this.beans.serverSideRowModel) {\n _this.beans.serverSideRowModel.onRowHeightChanged();\n }\n };\n _this.beans.frameworkOverrides.setTimeout(updateRowHeightFunc, 0);\n }\n };\n var resizeObserverDestroyFunc = this.beans.resizeObserverService.observeResize(eDetailGui, checkRowSizeFunc);\n this.addDestroyFunc(resizeObserverDestroyFunc);\n checkRowSizeFunc();\n };\n RowCtrl.prototype.createFullWidthParams = function (eRow, pinned) {\n var _this = this;\n var params = {\n fullWidth: true,\n data: this.rowNode.data,\n node: this.rowNode,\n value: this.rowNode.key,\n valueFormatted: this.rowNode.key,\n $scope: this.scope ? this.scope : this.parentScope,\n $compile: this.beans.$compile,\n rowIndex: this.rowNode.rowIndex,\n api: this.beans.gridOptionsWrapper.getApi(),\n columnApi: this.beans.gridOptionsWrapper.getColumnApi(),\n context: this.beans.gridOptionsWrapper.getContext(),\n // these need to be taken out, as part of 'afterAttached' now\n eGridCell: eRow,\n eParentOfValue: eRow,\n pinned: pinned,\n addRenderedRowListener: this.addEventListener.bind(this),\n registerRowDragger: function (rowDraggerElement, dragStartPixels, value, suppressVisibilityChange) { return _this.addFullWidthRowDragging(rowDraggerElement, dragStartPixels, value, suppressVisibilityChange); }\n };\n return params;\n };\n RowCtrl.prototype.addFullWidthRowDragging = function (rowDraggerElement, dragStartPixels, value, suppressVisibilityChange) {\n if (value === void 0) { value = ''; }\n if (!this.isFullWidth()) {\n return;\n }\n var rowDragComp = new RowDragComp(function () { return value; }, this.rowNode, undefined, rowDraggerElement, dragStartPixels, suppressVisibilityChange);\n this.createManagedBean(rowDragComp, this.beans.context);\n };\n RowCtrl.prototype.onUiLevelChanged = function () {\n var newLevel = this.beans.rowCssClassCalculator.calculateRowLevel(this.rowNode);\n if (this.rowLevel != newLevel) {\n var classToAdd_1 = 'ag-row-level-' + newLevel;\n var classToRemove_1 = 'ag-row-level-' + this.rowLevel;\n this.allRowGuis.forEach(function (gui) {\n gui.rowComp.addOrRemoveCssClass(classToAdd_1, true);\n gui.rowComp.addOrRemoveCssClass(classToRemove_1, false);\n });\n }\n this.rowLevel = newLevel;\n };\n RowCtrl.prototype.isFirstRowOnPage = function () {\n return this.rowNode.rowIndex === this.beans.paginationProxy.getPageFirstRow();\n };\n RowCtrl.prototype.isLastRowOnPage = function () {\n return this.rowNode.rowIndex === this.beans.paginationProxy.getPageLastRow();\n };\n RowCtrl.prototype.onModelUpdated = function () {\n var newFirst = this.isFirstRowOnPage();\n var newLast = this.isLastRowOnPage();\n if (this.firstRowOnPage !== newFirst) {\n this.firstRowOnPage = newFirst;\n this.allRowGuis.forEach(function (gui) { return gui.rowComp.addOrRemoveCssClass('ag-row-first', newFirst); });\n }\n if (this.lastRowOnPage !== newLast) {\n this.lastRowOnPage = newLast;\n this.allRowGuis.forEach(function (gui) { return gui.rowComp.addOrRemoveCssClass('ag-row-last', newLast); });\n }\n };\n RowCtrl.prototype.stopEditing = function (cancel) {\n if (cancel === void 0) { cancel = false; }\n this.getAllCellCtrls().forEach(function (cellCtrl) { return cellCtrl.stopEditing(cancel); });\n if (!this.editingRow) {\n return;\n }\n if (!cancel) {\n var event_1 = this.createRowEvent(Events.EVENT_ROW_VALUE_CHANGED);\n this.beans.eventService.dispatchEvent(event_1);\n }\n this.setEditingRow(false);\n };\n RowCtrl.prototype.setInlineEditingCss = function (editing) {\n this.allRowGuis.forEach(function (gui) {\n gui.rowComp.addOrRemoveCssClass(\"ag-row-inline-editing\", editing);\n gui.rowComp.addOrRemoveCssClass(\"ag-row-not-inline-editing\", !editing);\n });\n };\n RowCtrl.prototype.setEditingRow = function (value) {\n this.editingRow = value;\n this.allRowGuis.forEach(function (gui) { return gui.rowComp.addOrRemoveCssClass('ag-row-editing', value); });\n var event = value ?\n this.createRowEvent(Events.EVENT_ROW_EDITING_STARTED)\n : this.createRowEvent(Events.EVENT_ROW_EDITING_STOPPED);\n this.beans.eventService.dispatchEvent(event);\n };\n RowCtrl.prototype.startRowEditing = function (keyPress, charPress, sourceRenderedCell) {\n if (keyPress === void 0) { keyPress = null; }\n if (charPress === void 0) { charPress = null; }\n if (sourceRenderedCell === void 0) { sourceRenderedCell = null; }\n // don't do it if already editing\n if (this.editingRow) {\n return;\n }\n this.getAllCellCtrls().forEach(function (cellCtrl) {\n var cellStartedEdit = cellCtrl === sourceRenderedCell;\n if (cellStartedEdit) {\n cellCtrl.startEditing(keyPress, charPress, cellStartedEdit);\n }\n else {\n cellCtrl.startEditing(null, null, cellStartedEdit);\n }\n });\n this.setEditingRow(true);\n };\n RowCtrl.prototype.getAllCellCtrls = function () {\n var res = __spreadArrays$5(this.centerCellCtrls.list, this.leftCellCtrls.list, this.rightCellCtrls.list);\n return res;\n };\n RowCtrl.prototype.postProcessClassesFromGridOptions = function () {\n var _this = this;\n var cssClasses = this.beans.rowCssClassCalculator.processClassesFromGridOptions(this.rowNode, this.scope);\n if (!cssClasses || !cssClasses.length) {\n return;\n }\n cssClasses.forEach(function (classStr) {\n _this.allRowGuis.forEach(function (c) { return c.rowComp.addOrRemoveCssClass(classStr, true); });\n });\n };\n RowCtrl.prototype.postProcessRowClassRules = function () {\n var _this = this;\n this.beans.rowCssClassCalculator.processRowClassRules(this.rowNode, this.scope, function (className) {\n _this.allRowGuis.forEach(function (gui) { return gui.rowComp.addOrRemoveCssClass(className, true); });\n }, function (className) {\n _this.allRowGuis.forEach(function (gui) { return gui.rowComp.addOrRemoveCssClass(className, false); });\n });\n };\n RowCtrl.prototype.setStylesFromGridOptions = function () {\n var rowStyles = this.processStylesFromGridOptions();\n this.allRowGuis.forEach(function (gui) { return gui.rowComp.setUserStyles(rowStyles); });\n };\n RowCtrl.prototype.getRowBusinessKey = function () {\n var businessKeyForNodeFunc = this.beans.gridOptionsWrapper.getBusinessKeyForNodeFunc();\n if (typeof businessKeyForNodeFunc !== 'function') {\n return;\n }\n return businessKeyForNodeFunc(this.rowNode);\n };\n RowCtrl.prototype.getInitialRowClasses = function (pinned) {\n var params = {\n rowNode: this.rowNode,\n rowFocused: this.rowFocused,\n fadeRowIn: this.fadeRowIn,\n rowIsEven: this.rowNode.rowIndex % 2 === 0,\n rowLevel: this.rowLevel,\n fullWidthRow: this.isFullWidth(),\n firstRowOnPage: this.isFirstRowOnPage(),\n lastRowOnPage: this.isLastRowOnPage(),\n printLayout: this.printLayout,\n expandable: this.rowNode.isExpandable(),\n scope: this.scope,\n pinned: pinned\n };\n return this.beans.rowCssClassCalculator.getInitialRowClasses(params);\n };\n RowCtrl.prototype.processStylesFromGridOptions = function () {\n // part 1 - rowStyle\n var rowStyle = this.beans.gridOptionsWrapper.getRowStyle();\n if (rowStyle && typeof rowStyle === 'function') {\n console.warn('AG Grid: rowStyle should be an object of key/value styles, not be a function, use getRowStyle() instead');\n return;\n }\n // part 1 - rowStyleFunc\n var rowStyleFunc = this.beans.gridOptionsWrapper.getRowStyleFunc();\n var rowStyleFuncResult;\n if (rowStyleFunc) {\n var params = {\n data: this.rowNode.data,\n node: this.rowNode,\n rowIndex: this.rowNode.rowIndex,\n $scope: this.scope,\n api: this.beans.gridOptionsWrapper.getApi(),\n columnApi: this.beans.gridOptionsWrapper.getColumnApi(),\n context: this.beans.gridOptionsWrapper.getContext()\n };\n rowStyleFuncResult = rowStyleFunc(params);\n }\n return assign({}, rowStyle, rowStyleFuncResult);\n };\n RowCtrl.prototype.onRowSelected = function () {\n var _this = this;\n var selected = this.rowNode.isSelected();\n this.allRowGuis.forEach(function (gui) {\n gui.rowComp.setAriaSelected(selected ? true : undefined);\n gui.rowComp.addOrRemoveCssClass('ag-row-selected', selected);\n gui.rowComp.setAriaLabel(_this.createAriaLabel());\n });\n };\n RowCtrl.prototype.createAriaLabel = function () {\n var selected = this.rowNode.isSelected();\n if (selected && this.beans.gridOptionsWrapper.isSuppressRowDeselection()) {\n return undefined;\n }\n var translate = this.beans.gridOptionsWrapper.getLocaleTextFunc();\n var label = translate(selected ? 'ariaRowDeselect' : 'ariaRowSelect', \"Press SPACE to \" + (selected ? 'deselect' : 'select') + \" this row.\");\n return label;\n };\n RowCtrl.prototype.isUseAnimationFrameForCreate = function () {\n return this.useAnimationFrameForCreate;\n };\n RowCtrl.prototype.addHoverFunctionality = function (eRow) {\n var _this = this;\n // because we use animation frames to do this, it's possible the row no longer exists\n // by the time we get to add it\n if (!this.active) {\n return;\n }\n // because mouseenter and mouseleave do not propagate, we cannot listen on the gridPanel\n // like we do for all the other mouse events.\n // because of the pinning, we cannot simply add / remove the class based on the eRow. we\n // have to check all eRow's (body & pinned). so the trick is if any of the rows gets a\n // mouse hover, it sets such in the rowNode, and then all three reflect the change as\n // all are listening for event on the row node.\n // step 1 - add listener, to set flag on row node\n this.addManagedListener(eRow, 'mouseenter', function () { return _this.rowNode.onMouseEnter(); });\n this.addManagedListener(eRow, 'mouseleave', function () { return _this.rowNode.onMouseLeave(); });\n // step 2 - listen for changes on row node (which any eRow can trigger)\n this.addManagedListener(this.rowNode, RowNode.EVENT_MOUSE_ENTER, function () {\n // if hover turned off, we don't add the class. we do this here so that if the application\n // toggles this property mid way, we remove the hover form the last row, but we stop\n // adding hovers from that point onwards.\n if (!_this.beans.gridOptionsWrapper.isSuppressRowHoverHighlight()) {\n addCssClass(eRow, 'ag-row-hover');\n }\n });\n this.addManagedListener(this.rowNode, RowNode.EVENT_MOUSE_LEAVE, function () {\n removeCssClass(eRow, 'ag-row-hover');\n });\n };\n // for animation, we don't want to animate entry or exit to a very far away pixel,\n // otherwise the row would move so fast, it would appear to disappear. so this method\n // moves the row closer to the viewport if it is far away, so the row slide in / out\n // at a speed the user can see.\n RowCtrl.prototype.roundRowTopToBounds = function (rowTop) {\n var gridBodyCon = this.beans.ctrlsService.getGridBodyCtrl();\n var range = gridBodyCon.getScrollFeature().getVScrollPosition();\n var minPixel = this.applyPaginationOffset(range.top, true) - 100;\n var maxPixel = this.applyPaginationOffset(range.bottom, true) + 100;\n return Math.min(Math.max(minPixel, rowTop), maxPixel);\n };\n RowCtrl.prototype.getFrameworkOverrides = function () {\n return this.beans.frameworkOverrides;\n };\n RowCtrl.prototype.onRowHeightChanged = function () {\n // check for exists first - if the user is resetting the row height, then\n // it will be null (or undefined) momentarily until the next time the flatten\n // stage is called where the row will then update again with a new height\n if (exists(this.rowNode.rowHeight)) {\n var heightPx_1 = this.rowNode.rowHeight + \"px\";\n this.allRowGuis.forEach(function (gui) { return gui.rowComp.setHeight(heightPx_1); });\n }\n };\n RowCtrl.prototype.addEventListener = function (eventType, listener) {\n if (eventType === 'renderedRowRemoved' || eventType === 'rowRemoved') {\n eventType = Events.EVENT_VIRTUAL_ROW_REMOVED;\n console.warn('AG Grid: Since version 11, event renderedRowRemoved is now called ' + Events.EVENT_VIRTUAL_ROW_REMOVED);\n }\n _super.prototype.addEventListener.call(this, eventType, listener);\n };\n RowCtrl.prototype.removeEventListener = function (eventType, listener) {\n if (eventType === 'renderedRowRemoved' || eventType === 'rowRemoved') {\n eventType = Events.EVENT_VIRTUAL_ROW_REMOVED;\n console.warn('AG Grid: Since version 11, event renderedRowRemoved and rowRemoved is now called ' + Events.EVENT_VIRTUAL_ROW_REMOVED);\n }\n _super.prototype.removeEventListener.call(this, eventType, listener);\n };\n // note - this is NOT called by context, as we don't wire / unwire the CellComp for performance reasons.\n RowCtrl.prototype.destroyFirstPass = function () {\n this.active = false;\n // why do we have this method? shouldn't everything below be added as a destroy func beside\n // the corresponding create logic?\n this.setupRemoveAnimation();\n var event = this.createRowEvent(Events.EVENT_VIRTUAL_ROW_REMOVED);\n this.dispatchEvent(event);\n this.beans.eventService.dispatchEvent(event);\n _super.prototype.destroy.call(this);\n };\n RowCtrl.prototype.setupRemoveAnimation = function () {\n var rowStillVisibleJustNotInViewport = this.rowNode.rowTop != null;\n if (rowStillVisibleJustNotInViewport) {\n // if the row is not rendered, but in viewport, it means it has moved,\n // so we animate the row out. if the new location is very far away,\n // the animation will be so fast the row will look like it's just disappeared,\n // so instead we animate to a position just outside the viewport.\n var rowTop = this.roundRowTopToBounds(this.rowNode.rowTop);\n this.setRowTop(rowTop);\n }\n else {\n this.allRowGuis.forEach(function (gui) { return gui.rowComp.addOrRemoveCssClass('ag-opacity-zero', true); });\n }\n };\n RowCtrl.prototype.destroySecondPass = function () {\n this.allRowGuis.length = 0;\n var destroyCellCtrls = function (ctrls) {\n ctrls.list.forEach(function (c) { return c.destroy(); });\n return { list: [], map: {} };\n };\n this.centerCellCtrls = destroyCellCtrls(this.centerCellCtrls);\n this.leftCellCtrls = destroyCellCtrls(this.leftCellCtrls);\n this.rightCellCtrls = destroyCellCtrls(this.rightCellCtrls);\n };\n RowCtrl.prototype.setFocusedClasses = function () {\n var _this = this;\n this.allRowGuis.forEach(function (gui) {\n gui.rowComp.addOrRemoveCssClass('ag-row-focus', _this.rowFocused);\n gui.rowComp.addOrRemoveCssClass('ag-row-no-focus', !_this.rowFocused);\n });\n };\n RowCtrl.prototype.onCellFocusChanged = function () {\n var rowFocused = this.beans.focusService.isRowFocused(this.rowNode.rowIndex, this.rowNode.rowPinned);\n if (rowFocused !== this.rowFocused) {\n this.rowFocused = rowFocused;\n this.setFocusedClasses();\n }\n // if we are editing, then moving the focus out of a row will stop editing\n if (!rowFocused && this.editingRow) {\n this.stopEditing(false);\n }\n };\n RowCtrl.prototype.onPaginationChanged = function () {\n var currentPage = this.beans.paginationProxy.getCurrentPage();\n // it is possible this row is in the new page, but the page number has changed, which means\n // it needs to reposition itself relative to the new page\n if (this.paginationPage !== currentPage) {\n this.paginationPage = currentPage;\n this.onTopChanged();\n }\n };\n RowCtrl.prototype.onTopChanged = function () {\n this.setRowTop(this.rowNode.rowTop);\n };\n RowCtrl.prototype.onPaginationPixelOffsetChanged = function () {\n // the pixel offset is used when calculating rowTop to set on the row DIV\n this.onTopChanged();\n };\n // applies pagination offset, eg if on second page, and page height is 500px, then removes\n // 500px from the top position, so a row with rowTop 600px is displayed at location 100px.\n // reverse will take the offset away rather than add.\n RowCtrl.prototype.applyPaginationOffset = function (topPx, reverse) {\n if (reverse === void 0) { reverse = false; }\n if (this.rowNode.isRowPinned()) {\n return topPx;\n }\n var pixelOffset = this.beans.paginationProxy.getPixelOffset();\n var multiplier = reverse ? 1 : -1;\n return topPx + (pixelOffset * multiplier);\n };\n RowCtrl.prototype.setRowTop = function (pixels) {\n // print layout uses normal flow layout for row positioning\n if (this.printLayout) {\n return;\n }\n // need to make sure rowTop is not null, as this can happen if the node was once\n // visible (ie parent group was expanded) but is now not visible\n if (exists(pixels)) {\n var afterPaginationPixels = this.applyPaginationOffset(pixels);\n var afterScalingPixels = this.rowNode.isRowPinned() ? afterPaginationPixels : this.beans.rowContainerHeightService.getRealPixelPosition(afterPaginationPixels);\n var topPx = afterScalingPixels + \"px\";\n this.setRowTopStyle(topPx);\n }\n };\n RowCtrl.prototype.getInitialRowTop = function () {\n return this.initialTop;\n };\n RowCtrl.prototype.getInitialTransform = function () {\n return this.initialTransform;\n };\n RowCtrl.prototype.setInitialRowTop = function () {\n // print layout uses normal flow layout for row positioning\n if (this.printLayout) {\n return '';\n }\n // if sliding in, we take the old row top. otherwise we just set the current row top.\n var pixels = this.slideRowIn ? this.roundRowTopToBounds(this.rowNode.oldRowTop) : this.rowNode.rowTop;\n var afterPaginationPixels = this.applyPaginationOffset(pixels);\n // we don't apply scaling if row is pinned\n var afterScalingPixels = this.rowNode.isRowPinned() ? afterPaginationPixels : this.beans.rowContainerHeightService.getRealPixelPosition(afterPaginationPixels);\n var res = afterScalingPixels + 'px';\n var suppressRowTransform = this.beans.gridOptionsWrapper.isSuppressRowTransform();\n if (suppressRowTransform) {\n this.initialTop = res;\n }\n else {\n this.initialTransform = \"translateY(\" + res + \")\";\n }\n };\n RowCtrl.prototype.setRowTopStyle = function (topPx) {\n var suppressRowTransform = this.beans.gridOptionsWrapper.isSuppressRowTransform();\n this.allRowGuis.forEach(function (gui) { return suppressRowTransform ?\n gui.rowComp.setTop(topPx) :\n gui.rowComp.setTransform(\"translateY(\" + topPx + \")\"); });\n };\n RowCtrl.prototype.getRowNode = function () {\n return this.rowNode;\n };\n RowCtrl.prototype.getCellCtrl = function (column) {\n // first up, check for cell directly linked to this column\n var res = null;\n this.getAllCellCtrls().forEach(function (cellCtrl) {\n if (cellCtrl.getColumn() == column) {\n res = cellCtrl;\n }\n });\n if (res != null) {\n return res;\n }\n // second up, if not found, then check for spanned cols.\n // we do this second (and not at the same time) as this is\n // more expensive, as spanning cols is a\n // infrequently used feature so we don't need to do this most\n // of the time\n this.getAllCellCtrls().forEach(function (cellCtrl) {\n if (cellCtrl.getColSpanningList().indexOf(column) >= 0) {\n res = cellCtrl;\n }\n });\n return res;\n };\n RowCtrl.prototype.onRowIndexChanged = function () {\n // we only bother updating if the rowIndex is present. if it is not present, it means this row\n // is child of a group node, and the group node was closed, it's the only way to have no row index.\n // when this happens, row is about to be de-rendered, so we don't care, rowComp is about to die!\n if (this.rowNode.rowIndex != null) {\n this.onCellFocusChanged();\n this.updateRowIndexes();\n }\n };\n RowCtrl.prototype.updateRowIndexes = function () {\n var _this = this;\n var rowIndexStr = this.rowNode.getRowIndexString();\n var headerRowCount = this.beans.headerNavigationService.getHeaderRowCount();\n var rowIsEven = this.rowNode.rowIndex % 2 === 0;\n this.allRowGuis.forEach(function (c) {\n c.rowComp.setRowIndex(rowIndexStr);\n c.rowComp.setAriaRowIndex(headerRowCount + _this.rowNode.rowIndex + 1);\n c.rowComp.addOrRemoveCssClass('ag-row-even', rowIsEven);\n c.rowComp.addOrRemoveCssClass('ag-row-odd', !rowIsEven);\n });\n };\n // returns the pinned left container, either the normal one, or the embedded full with one if exists\n RowCtrl.prototype.getPinnedLeftRowElement = function () {\n return this.leftGui ? this.leftGui.element : undefined;\n };\n // returns the pinned right container, either the normal one, or the embedded full with one if exists\n RowCtrl.prototype.getPinnedRightRowElement = function () {\n return this.rightGui ? this.rightGui.element : undefined;\n };\n // returns the body container, either the normal one, or the embedded full with one if exists\n RowCtrl.prototype.getBodyRowElement = function () {\n return this.centerGui ? this.centerGui.element : undefined;\n };\n // returns the full width container\n RowCtrl.prototype.getFullWidthRowElement = function () {\n return this.fullWidthGui ? this.fullWidthGui.element : undefined;\n };\n RowCtrl.DOM_DATA_KEY_RENDERED_ROW = 'renderedRow';\n return RowCtrl;\n}(BeanStub));\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / React / AngularJS / Web Components\n * @version v26.1.0\n * @link http://www.ag-grid.com/\n * @license MIT\n */\nvar __extends$O = (undefined && undefined.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate$E = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n 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 __spreadArrays$6 = (undefined && undefined.__spreadArrays) || function () {\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\n r[k] = a[j];\n return r;\n};\nvar RowRenderer = /** @class */ (function (_super) {\n __extends$O(RowRenderer, _super);\n function RowRenderer() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.destroyFuncsForColumnListeners = [];\n // map of row ids to row objects. keeps track of which elements\n // are rendered for which rows in the dom.\n _this.rowCtrlsByRowIndex = {};\n _this.zombieRowCtrls = {};\n _this.allRowCtrls = [];\n _this.topRowCtrls = [];\n _this.bottomRowCtrls = [];\n // we only allow one refresh at a time, otherwise the internal memory structure here\n // will get messed up. this can happen if the user has a cellRenderer, and inside the\n // renderer they call an API method that results in another pass of the refresh,\n // then it will be trying to draw rows in the middle of a refresh.\n _this.refreshInProgress = false;\n return _this;\n }\n RowRenderer.prototype.postConstruct = function () {\n var _this = this;\n this.ctrlsService.whenReady(function () {\n _this.gridBodyCtrl = _this.ctrlsService.getGridBodyCtrl();\n _this.initialise();\n });\n };\n RowRenderer.prototype.initialise = function () {\n this.addManagedListener(this.eventService, Events.EVENT_PAGINATION_CHANGED, this.onPageLoaded.bind(this));\n this.addManagedListener(this.eventService, Events.EVENT_PINNED_ROW_DATA_CHANGED, this.onPinnedRowDataChanged.bind(this));\n this.addManagedListener(this.eventService, Events.EVENT_DISPLAYED_COLUMNS_CHANGED, this.onDisplayedColumnsChanged.bind(this));\n this.addManagedListener(this.eventService, Events.EVENT_BODY_SCROLL, this.redrawAfterScroll.bind(this));\n this.addManagedListener(this.eventService, Events.EVENT_BODY_HEIGHT_CHANGED, this.redrawAfterScroll.bind(this));\n this.addManagedListener(this.gridOptionsWrapper, GridOptionsWrapper.PROP_DOM_LAYOUT, this.onDomLayoutChanged.bind(this));\n this.addManagedListener(this.eventService, Events.EVENT_NEW_COLUMNS_LOADED, this.onNewColumnsLoaded.bind(this));\n this.registerCellEventListeners();\n this.initialiseCache();\n this.printLayout = this.gridOptionsWrapper.getDomLayout() === Constants.DOM_LAYOUT_PRINT;\n this.embedFullWidthRows = this.printLayout || this.gridOptionsWrapper.isEmbedFullWidthRows();\n this.redrawAfterModelUpdate();\n };\n RowRenderer.prototype.initialiseCache = function () {\n if (this.gridOptionsWrapper.isKeepDetailRows()) {\n var countProp = this.gridOptionsWrapper.getKeepDetailRowsCount();\n var count = countProp != null ? countProp : 3;\n this.cachedRowCtrls = new RowCtrlCache(count);\n }\n };\n RowRenderer.prototype.getRowCtrls = function () {\n return this.allRowCtrls;\n };\n RowRenderer.prototype.updateAllRowCtrls = function () {\n var liveList = getAllValuesInObject(this.rowCtrlsByRowIndex);\n if (this.beans.gridOptionsWrapper.isEnsureDomOrder()) {\n liveList.sort(function (a, b) { return a.getRowNode().rowIndex - b.getRowNode.rowIndex; });\n }\n var zombieList = getAllValuesInObject(this.zombieRowCtrls);\n var cachedList = this.cachedRowCtrls ? this.cachedRowCtrls.getEntries() : [];\n this.allRowCtrls = __spreadArrays$6(liveList, zombieList, cachedList);\n };\n // in a clean design, each cell would register for each of these events. however when scrolling, all the cells\n // registering and de-registering for events is a performance bottleneck. so we register here once and inform\n // all active cells.\n RowRenderer.prototype.registerCellEventListeners = function () {\n var _this = this;\n this.addManagedListener(this.eventService, Events.EVENT_CELL_FOCUSED, function (event) {\n _this.getAllCellCtrls().forEach(function (cellCtrl) { return cellCtrl.onCellFocused(event); });\n _this.getAllRowCtrls().forEach(function (rowCtrl) {\n if (rowCtrl.isFullWidth()) {\n rowCtrl.onFullWidthRowFocused(event);\n }\n });\n });\n this.addManagedListener(this.eventService, Events.EVENT_FLASH_CELLS, function (event) {\n _this.getAllCellCtrls().forEach(function (cellCtrl) { return cellCtrl.onFlashCells(event); });\n });\n this.addManagedListener(this.eventService, Events.EVENT_COLUMN_HOVER_CHANGED, function () {\n _this.getAllCellCtrls().forEach(function (cellCtrl) { return cellCtrl.onColumnHover(); });\n });\n // only for printLayout - because we are rendering all the cells in the same row, regardless of pinned state,\n // then changing the width of the containers will impact left position. eg the center cols all have their\n // left position adjusted by the width of the left pinned column, so if the pinned left column width changes,\n // all the center cols need to be shifted to accommodate this. when in normal layout, the pinned cols are\n // in different containers so doesn't impact.\n this.addManagedListener(this.eventService, Events.EVENT_DISPLAYED_COLUMNS_WIDTH_CHANGED, function () {\n if (_this.printLayout) {\n _this.getAllCellCtrls().forEach(function (cellCtrl) { return cellCtrl.onLeftChanged(); });\n }\n });\n var rangeSelectionEnabled = this.gridOptionsWrapper.isEnableRangeSelection();\n if (rangeSelectionEnabled) {\n this.addManagedListener(this.eventService, Events.EVENT_RANGE_SELECTION_CHANGED, function () {\n _this.getAllCellCtrls().forEach(function (cellCtrl) { return cellCtrl.onRangeSelectionChanged(); });\n });\n this.addManagedListener(this.eventService, Events.EVENT_COLUMN_MOVED, function () {\n _this.getAllCellCtrls().forEach(function (cellCtrl) { return cellCtrl.updateRangeBordersIfRangeCount(); });\n });\n this.addManagedListener(this.eventService, Events.EVENT_COLUMN_PINNED, function () {\n _this.getAllCellCtrls().forEach(function (cellCtrl) { return cellCtrl.updateRangeBordersIfRangeCount(); });\n });\n this.addManagedListener(this.eventService, Events.EVENT_COLUMN_VISIBLE, function () {\n _this.getAllCellCtrls().forEach(function (cellCtrl) { return cellCtrl.updateRangeBordersIfRangeCount(); });\n });\n }\n // add listeners to the grid columns\n this.refreshListenersToColumnsForCellComps();\n // if the grid columns change, then refresh the listeners again\n this.addManagedListener(this.eventService, Events.EVENT_GRID_COLUMNS_CHANGED, this.refreshListenersToColumnsForCellComps.bind(this));\n this.addDestroyFunc(this.removeGridColumnListeners.bind(this));\n };\n // executes all functions in destroyFuncsForColumnListeners and then clears the list\n RowRenderer.prototype.removeGridColumnListeners = function () {\n this.destroyFuncsForColumnListeners.forEach(function (func) { return func(); });\n this.destroyFuncsForColumnListeners.length = 0;\n };\n // this function adds listeners onto all the grid columns, which are the column that we could have cellComps for.\n // when the grid columns change, we add listeners again. in an ideal design, each CellComp would just register to\n // the column it belongs to on creation, however this was a bottleneck with the number of cells, so do it here\n // once instead.\n RowRenderer.prototype.refreshListenersToColumnsForCellComps = function () {\n var _this = this;\n this.removeGridColumnListeners();\n var cols = this.columnModel.getAllGridColumns();\n if (!cols) {\n return;\n }\n cols.forEach(function (col) {\n var forEachCellWithThisCol = function (callback) {\n _this.getAllCellCtrls().forEach(function (cellCtrl) {\n if (cellCtrl.getColumn() === col) {\n callback(cellCtrl);\n }\n });\n };\n var leftChangedListener = function () {\n forEachCellWithThisCol(function (cellCtrl) { return cellCtrl.onLeftChanged(); });\n };\n var widthChangedListener = function () {\n forEachCellWithThisCol(function (cellCtrl) { return cellCtrl.onWidthChanged(); });\n };\n var firstRightPinnedChangedListener = function () {\n forEachCellWithThisCol(function (cellCtrl) { return cellCtrl.onFirstRightPinnedChanged(); });\n };\n var lastLeftPinnedChangedListener = function () {\n forEachCellWithThisCol(function (cellCtrl) { return cellCtrl.onLastLeftPinnedChanged(); });\n };\n col.addEventListener(Column.EVENT_LEFT_CHANGED, leftChangedListener);\n col.addEventListener(Column.EVENT_WIDTH_CHANGED, widthChangedListener);\n col.addEventListener(Column.EVENT_FIRST_RIGHT_PINNED_CHANGED, firstRightPinnedChangedListener);\n col.addEventListener(Column.EVENT_LAST_LEFT_PINNED_CHANGED, lastLeftPinnedChangedListener);\n _this.destroyFuncsForColumnListeners.push(function () {\n col.removeEventListener(Column.EVENT_LEFT_CHANGED, leftChangedListener);\n col.removeEventListener(Column.EVENT_WIDTH_CHANGED, widthChangedListener);\n col.removeEventListener(Column.EVENT_FIRST_RIGHT_PINNED_CHANGED, firstRightPinnedChangedListener);\n col.removeEventListener(Column.EVENT_LAST_LEFT_PINNED_CHANGED, lastLeftPinnedChangedListener);\n });\n });\n };\n RowRenderer.prototype.onDomLayoutChanged = function () {\n var printLayout = this.gridOptionsWrapper.getDomLayout() === Constants.DOM_LAYOUT_PRINT;\n var embedFullWidthRows = printLayout || this.gridOptionsWrapper.isEmbedFullWidthRows();\n // if moving towards or away from print layout, means we need to destroy all rows, as rows are not laid\n // out using absolute positioning when doing print layout\n var destroyRows = embedFullWidthRows !== this.embedFullWidthRows || this.printLayout !== printLayout;\n this.printLayout = printLayout;\n this.embedFullWidthRows = embedFullWidthRows;\n if (destroyRows) {\n this.redrawAfterModelUpdate();\n }\n };\n // for row models that have datasources, when we update the datasource, we need to force the rowRenderer\n // to redraw all rows. otherwise the old rows from the old datasource will stay displayed.\n RowRenderer.prototype.datasourceChanged = function () {\n this.firstRenderedRow = 0;\n this.lastRenderedRow = -1;\n var rowIndexesToRemove = Object.keys(this.rowCtrlsByRowIndex);\n this.removeRowCtrls(rowIndexesToRemove);\n };\n RowRenderer.prototype.onPageLoaded = function (event) {\n var params = {\n recycleRows: event.keepRenderedRows,\n animate: event.animate,\n newData: event.newData,\n newPage: event.newPage,\n // because this is a model updated event (not pinned rows), we\n // can skip updating the pinned rows. this is needed so that if user\n // is doing transaction updates, the pinned rows are not getting constantly\n // trashed - or editing cells in pinned rows are not refreshed and put into read mode\n onlyBody: true\n };\n this.redrawAfterModelUpdate(params);\n };\n RowRenderer.prototype.getAllCellsForColumn = function (column) {\n var res = [];\n this.getAllRowCtrls().forEach(function (rowCtrl) {\n var eCell = rowCtrl.getCellElement(column);\n if (eCell) {\n res.push(eCell);\n }\n });\n return res;\n };\n RowRenderer.prototype.refreshFloatingRowComps = function () {\n this.refreshFloatingRows(this.topRowCtrls, this.pinnedRowModel.getPinnedTopRowData());\n this.refreshFloatingRows(this.bottomRowCtrls, this.pinnedRowModel.getPinnedBottomRowData());\n };\n RowRenderer.prototype.getTopRowCtrls = function () {\n return this.topRowCtrls;\n };\n RowRenderer.prototype.getBottomRowCtrls = function () {\n return this.bottomRowCtrls;\n };\n RowRenderer.prototype.refreshFloatingRows = function (rowComps, rowNodes) {\n var _this = this;\n rowComps.forEach(function (row) {\n row.destroyFirstPass();\n row.destroySecondPass();\n });\n rowComps.length = 0;\n if (!rowNodes) {\n return;\n }\n rowNodes.forEach(function (rowNode) {\n var rowCon = new RowCtrl(_this.$scope, rowNode, _this.beans, false, false, _this.printLayout);\n rowComps.push(rowCon);\n });\n };\n RowRenderer.prototype.onPinnedRowDataChanged = function () {\n // recycling rows in order to ensure cell editing is not cancelled\n var params = {\n recycleRows: true\n };\n this.redrawAfterModelUpdate(params);\n };\n // if the row nodes are not rendered, no index is returned\n RowRenderer.prototype.getRenderedIndexesForRowNodes = function (rowNodes) {\n var result = [];\n if (missing(rowNodes)) {\n return result;\n }\n iterateObject(this.rowCtrlsByRowIndex, function (index, renderedRow) {\n var rowNode = renderedRow.getRowNode();\n if (rowNodes.indexOf(rowNode) >= 0) {\n result.push(index);\n }\n });\n return result;\n };\n RowRenderer.prototype.redrawRows = function (rowNodes) {\n // if no row nodes provided, then refresh everything\n var partialRefresh = rowNodes != null && rowNodes.length > 0;\n if (partialRefresh) {\n var indexesToRemove = this.getRenderedIndexesForRowNodes(rowNodes);\n // remove the rows\n this.removeRowCtrls(indexesToRemove);\n }\n // add draw them again\n this.redrawAfterModelUpdate({\n recycleRows: partialRefresh\n });\n };\n RowRenderer.prototype.getCellToRestoreFocusToAfterRefresh = function (params) {\n var focusedCell = params.suppressKeepFocus ? null : this.focusService.getFocusCellToUseAfterRefresh();\n if (missing(focusedCell)) {\n return null;\n }\n // if the dom is not actually focused on a cell, then we don't try to refocus. the problem this\n // solves is with editing - if the user is editing, eg focus is on a text field, and not on the\n // cell itself, then the cell can be registered as having focus, however it's the text field that\n // has the focus and not the cell div. therefore, when the refresh is finished, the grid will focus\n // the cell, and not the textfield. that means if the user is in a text field, and the grid refreshes,\n // the focus is lost from the text field. we do not want this.\n var activeElement = document.activeElement;\n var domData = this.gridOptionsWrapper.getDomData(activeElement, CellCtrl.DOM_DATA_KEY_CELL_CTRL);\n var elementIsNotACellDev = missing(domData);\n return elementIsNotACellDev ? null : focusedCell;\n };\n // gets called from:\n // +) initialisation (in registerGridComp) params = null\n // +) onDomLayoutChanged, params = null\n // +) onPageLoaded, recycleRows, animate, newData, newPage from event, onlyBody=true\n // +) onPinnedRowDataChanged, recycleRows = true\n // +) redrawRows (from Grid API), recycleRows = true/false\n RowRenderer.prototype.redrawAfterModelUpdate = function (params) {\n if (params === void 0) { params = {}; }\n this.getLockOnRefresh();\n var focusedCell = this.getCellToRestoreFocusToAfterRefresh(params);\n this.updateContainerHeights();\n this.scrollToTopIfNewData(params);\n // never recycle rows when print layout, we draw each row again from scratch. this is because print layout\n // uses normal dom layout to put cells into dom - it doesn't allow reordering rows.\n var recycleRows = !this.printLayout && !!params.recycleRows;\n var animate = params.animate && this.gridOptionsWrapper.isAnimateRows();\n // after modelUpdate, row indexes can change, so we clear out the rowsByIndex map,\n // however we can reuse the rows, so we keep them but index by rowNode.id\n var rowsToRecycle = recycleRows ? this.recycleRows() : null;\n if (!recycleRows) {\n this.removeAllRowComps();\n }\n var isFocusedCellGettingRecycled = function () {\n if (focusedCell == null || rowsToRecycle == null) {\n return false;\n }\n var res = false;\n iterateObject(rowsToRecycle, function (key, rowComp) {\n var rowNode = rowComp.getRowNode();\n var rowIndexEqual = rowNode.rowIndex == focusedCell.rowIndex;\n var pinnedEqual = rowNode.rowPinned == focusedCell.rowPinned;\n if (rowIndexEqual && pinnedEqual) {\n res = true;\n }\n });\n return res;\n };\n var focusedCellRecycled = isFocusedCellGettingRecycled();\n this.redraw(rowsToRecycle, animate);\n if (!params.onlyBody) {\n this.refreshFloatingRowComps();\n }\n this.dispatchDisplayedRowsChanged();\n // if we focus a cell that's already focused, then we get an unnecessary 'cellFocused' event fired.\n // this was happening when user clicked 'expand' on a rowGroup, then cellFocused was getting fired twice.\n if (!focusedCellRecycled) {\n this.restoreFocusedCell(focusedCell);\n }\n this.releaseLockOnRefresh();\n };\n RowRenderer.prototype.scrollToTopIfNewData = function (params) {\n var scrollToTop = params.newData || params.newPage;\n var suppressScrollToTop = this.gridOptionsWrapper.isSuppressScrollOnNewData();\n if (scrollToTop && !suppressScrollToTop) {\n this.gridBodyCtrl.getScrollFeature().scrollToTop();\n }\n };\n RowRenderer.prototype.updateContainerHeights = function () {\n // when doing print layout, we don't explicitly set height on the containers\n if (this.printLayout) {\n this.rowContainerHeightService.setModelHeight(null);\n return;\n }\n var containerHeight = this.paginationProxy.getCurrentPageHeight();\n // we need at least 1 pixel for the horizontal scroll to work. so if there are now rows,\n // we still want the scroll to be present, otherwise there would be no way to scroll the header\n // which might be needed us user wants to access columns\n // on the RHS - and if that was where the filter was that cause no rows to be presented, there\n // is no way to remove the filter.\n if (containerHeight === 0) {\n containerHeight = 1;\n }\n this.rowContainerHeightService.setModelHeight(containerHeight);\n };\n RowRenderer.prototype.getLockOnRefresh = function () {\n if (this.refreshInProgress) {\n throw new Error(\"AG Grid: cannot get grid to draw rows when it is in the middle of drawing rows. \" +\n \"Your code probably called a grid API method while the grid was in the render stage. To overcome \" +\n \"this, put the API call into a timeout, e.g. instead of api.refreshView(), \" +\n \"call setTimeout(function() { api.refreshView(); }, 0). To see what part of your code \" +\n \"that caused the refresh check this stacktrace.\");\n }\n this.refreshInProgress = true;\n };\n RowRenderer.prototype.releaseLockOnRefresh = function () {\n this.refreshInProgress = false;\n };\n // sets the focus to the provided cell, if the cell is provided. this way, the user can call refresh without\n // worry about the focus been lost. this is important when the user is using keyboard navigation to do edits\n // and the cellEditor is calling 'refresh' to get other cells to update (as other cells might depend on the\n // edited cell).\n RowRenderer.prototype.restoreFocusedCell = function (cellPosition) {\n if (cellPosition) {\n this.focusService.setFocusedCell(cellPosition.rowIndex, cellPosition.column, cellPosition.rowPinned, true);\n }\n };\n RowRenderer.prototype.stopEditing = function (cancel) {\n if (cancel === void 0) { cancel = false; }\n this.getAllRowCtrls().forEach(function (rowCtrl) {\n rowCtrl.stopEditing(cancel);\n });\n };\n RowRenderer.prototype.onNewColumnsLoaded = function () {\n // we don't want each cellComp to register for events, as would increase rendering time.\n // so for newColumnsLoaded, we register once here (in rowRenderer) and then inform\n // each cell if / when event was fired.\n this.getAllCellCtrls().forEach(function (cellCtrl) { return cellCtrl.onNewColumnsLoaded(); });\n };\n RowRenderer.prototype.getAllCellCtrls = function () {\n var res = [];\n this.getAllRowCtrls().forEach(function (rowCtrl) { return res = res.concat(rowCtrl.getAllCellCtrls()); });\n return res;\n };\n RowRenderer.prototype.getAllRowCtrls = function () {\n var _this = this;\n var res = __spreadArrays$6(this.topRowCtrls, this.bottomRowCtrls);\n Object.keys(this.rowCtrlsByRowIndex).forEach(function (key) { return res.push(_this.rowCtrlsByRowIndex[key]); });\n return res;\n };\n RowRenderer.prototype.addRenderedRowListener = function (eventName, rowIndex, callback) {\n var rowComp = this.rowCtrlsByRowIndex[rowIndex];\n if (rowComp) {\n rowComp.addEventListener(eventName, callback);\n }\n };\n RowRenderer.prototype.flashCells = function (params) {\n if (params === void 0) { params = {}; }\n var flashDelay = params.flashDelay, fadeDelay = params.fadeDelay;\n this.getCellCtrls(params.rowNodes, params.columns)\n .forEach(function (cellCtrl) { return cellCtrl.flashCell({ flashDelay: flashDelay, fadeDelay: fadeDelay }); });\n };\n RowRenderer.prototype.refreshCells = function (params) {\n if (params === void 0) { params = {}; }\n var refreshCellParams = {\n forceRefresh: params.force,\n newData: false,\n suppressFlash: params.suppressFlash\n };\n this.getCellCtrls(params.rowNodes, params.columns)\n .forEach(function (cellCtrl) {\n if (cellCtrl.refreshShouldDestroy()) {\n var rowCtrl = cellCtrl.getRowCtrl();\n if (rowCtrl) {\n rowCtrl.refreshCell(cellCtrl);\n }\n }\n else {\n cellCtrl.refreshCell(refreshCellParams);\n }\n });\n };\n RowRenderer.prototype.getCellRendererInstances = function (params) {\n var res = this.getCellCtrls(params.rowNodes, params.columns)\n .map(function (cellCtrl) { return cellCtrl.getCellRenderer(); })\n .filter(function (renderer) { return renderer != null; });\n return res;\n };\n RowRenderer.prototype.getCellEditorInstances = function (params) {\n var res = [];\n this.getCellCtrls(params.rowNodes, params.columns).forEach(function (cellCtrl) {\n var cellEditor = cellCtrl.getCellEditor();\n if (cellEditor) {\n res.push(cellEditor);\n }\n });\n return res;\n };\n RowRenderer.prototype.getEditingCells = function () {\n var res = [];\n this.getAllCellCtrls().forEach(function (cellCtrl) {\n if (cellCtrl.isEditing()) {\n var cellPosition = cellCtrl.getCellPosition();\n res.push(cellPosition);\n }\n });\n return res;\n };\n // returns CellCtrl's that match the provided rowNodes and columns. eg if one row node\n // and two columns provided, that identifies 4 cells, so 4 CellCtrl's returned.\n RowRenderer.prototype.getCellCtrls = function (rowNodes, columns) {\n var _this = this;\n var rowIdsMap;\n var res = [];\n if (exists(rowNodes)) {\n rowIdsMap = {\n top: {},\n bottom: {},\n normal: {}\n };\n rowNodes.forEach(function (rowNode) {\n var id = rowNode.id;\n if (rowNode.rowPinned === Constants.PINNED_TOP) {\n rowIdsMap.top[id] = true;\n }\n else if (rowNode.rowPinned === Constants.PINNED_BOTTOM) {\n rowIdsMap.bottom[id] = true;\n }\n else {\n rowIdsMap.normal[id] = true;\n }\n });\n }\n var colIdsMap;\n if (exists(columns)) {\n colIdsMap = {};\n columns.forEach(function (colKey) {\n var column = _this.columnModel.getGridColumn(colKey);\n if (exists(column)) {\n colIdsMap[column.getId()] = true;\n }\n });\n }\n var processRow = function (rowComp) {\n var rowNode = rowComp.getRowNode();\n var id = rowNode.id;\n var floating = rowNode.rowPinned;\n // skip this row if it is missing from the provided list\n if (exists(rowIdsMap)) {\n if (floating === Constants.PINNED_BOTTOM) {\n if (!rowIdsMap.bottom[id]) {\n return;\n }\n }\n else if (floating === Constants.PINNED_TOP) {\n if (!rowIdsMap.top[id]) {\n return;\n }\n }\n else {\n if (!rowIdsMap.normal[id]) {\n return;\n }\n }\n }\n rowComp.getAllCellCtrls().forEach(function (cellCtrl) {\n var colId = cellCtrl.getColumn().getId();\n var excludeColFromRefresh = colIdsMap && !colIdsMap[colId];\n if (excludeColFromRefresh) {\n return;\n }\n res.push(cellCtrl);\n });\n };\n iterateObject(this.rowCtrlsByRowIndex, function (index, rowComp) {\n processRow(rowComp);\n });\n if (this.topRowCtrls) {\n this.topRowCtrls.forEach(processRow);\n }\n if (this.bottomRowCtrls) {\n this.bottomRowCtrls.forEach(processRow);\n }\n return res;\n };\n RowRenderer.prototype.destroy = function () {\n this.removeAllRowComps();\n _super.prototype.destroy.call(this);\n };\n RowRenderer.prototype.removeAllRowComps = function () {\n var rowIndexesToRemove = Object.keys(this.rowCtrlsByRowIndex);\n this.removeRowCtrls(rowIndexesToRemove);\n };\n RowRenderer.prototype.recycleRows = function () {\n // remove all stub nodes, they can't be reused, as no rowNode id\n var stubNodeIndexes = [];\n iterateObject(this.rowCtrlsByRowIndex, function (index, rowComp) {\n var stubNode = rowComp.getRowNode().id == null;\n if (stubNode) {\n stubNodeIndexes.push(index);\n }\n });\n this.removeRowCtrls(stubNodeIndexes);\n // then clear out rowCompsByIndex, but before that take a copy, but index by id, not rowIndex\n var nodesByIdMap = {};\n iterateObject(this.rowCtrlsByRowIndex, function (index, rowComp) {\n var rowNode = rowComp.getRowNode();\n nodesByIdMap[rowNode.id] = rowComp;\n });\n this.rowCtrlsByRowIndex = {};\n return nodesByIdMap;\n };\n // takes array of row indexes\n RowRenderer.prototype.removeRowCtrls = function (rowsToRemove) {\n var _this = this;\n // if no fromIndex then set to -1, which will refresh everything\n // let realFromIndex = -1;\n rowsToRemove.forEach(function (indexToRemove) {\n var rowCtrl = _this.rowCtrlsByRowIndex[indexToRemove];\n if (rowCtrl) {\n rowCtrl.destroyFirstPass();\n rowCtrl.destroySecondPass();\n }\n delete _this.rowCtrlsByRowIndex[indexToRemove];\n });\n };\n // gets called when rows don't change, but viewport does, so after:\n // 1) height of grid body changes, ie number of displayed rows has changed\n // 2) grid scrolled to new position\n // 3) ensure index visible (which is a scroll)\n RowRenderer.prototype.redrawAfterScroll = function () {\n this.getLockOnRefresh();\n this.redraw(null, false, true);\n this.releaseLockOnRefresh();\n this.dispatchDisplayedRowsChanged();\n };\n RowRenderer.prototype.removeRowCompsNotToDraw = function (indexesToDraw) {\n // for speedy lookup, dump into map\n var indexesToDrawMap = {};\n indexesToDraw.forEach(function (index) { return (indexesToDrawMap[index] = true); });\n var existingIndexes = Object.keys(this.rowCtrlsByRowIndex);\n var indexesNotToDraw = existingIndexes.filter(function (index) { return !indexesToDrawMap[index]; });\n this.removeRowCtrls(indexesNotToDraw);\n };\n RowRenderer.prototype.calculateIndexesToDraw = function (rowsToRecycle) {\n var _this = this;\n // all in all indexes in the viewport\n var indexesToDraw = createArrayOfNumbers(this.firstRenderedRow, this.lastRenderedRow);\n var checkRowToDraw = function (indexStr, rowComp) {\n var index = rowComp.getRowNode().rowIndex;\n if (index == null) {\n return;\n }\n if (index < _this.firstRenderedRow || index > _this.lastRenderedRow) {\n if (_this.doNotUnVirtualiseRow(rowComp)) {\n indexesToDraw.push(index);\n }\n }\n };\n // if we are redrawing due to scrolling change, then old rows are in this.rowCompsByIndex\n iterateObject(this.rowCtrlsByRowIndex, checkRowToDraw);\n // if we are redrawing due to model update, then old rows are in rowsToRecycle\n iterateObject(rowsToRecycle, checkRowToDraw);\n indexesToDraw.sort(function (a, b) { return a - b; });\n return indexesToDraw;\n };\n RowRenderer.prototype.redraw = function (rowsToRecycle, animate, afterScroll) {\n var _this = this;\n if (animate === void 0) { animate = false; }\n if (afterScroll === void 0) { afterScroll = false; }\n this.rowContainerHeightService.updateOffset();\n this.workOutFirstAndLastRowsToRender();\n // the row can already exist and be in the following:\n // rowsToRecycle -> if model change, then the index may be different, however row may\n // exist here from previous time (mapped by id).\n // this.rowCompsByIndex -> if just a scroll, then this will contain what is currently in the viewport\n // this is all the indexes we want, including those that already exist, so this method\n // will end up going through each index and drawing only if the row doesn't already exist\n var indexesToDraw = this.calculateIndexesToDraw(rowsToRecycle);\n this.removeRowCompsNotToDraw(indexesToDraw);\n // never animate when doing print layout - as we want to get things ready to print as quickly as possible,\n // otherwise we risk the printer printing a row that's half faded (half way through fading in)\n if (this.printLayout) {\n animate = false;\n }\n indexesToDraw.forEach(function (rowIndex) {\n var rowCtrl = _this.createOrUpdateRowCtrl(rowIndex, rowsToRecycle, animate, afterScroll);\n if (exists(rowCtrl)) ;\n });\n if (rowsToRecycle) {\n var useAnimationFrame = afterScroll && !this.gridOptionsWrapper.isSuppressAnimationFrame() && !this.printLayout;\n if (useAnimationFrame) {\n this.beans.animationFrameService.addDestroyTask(function () {\n _this.destroyRowCtrls(rowsToRecycle, animate);\n _this.updateAllRowCtrls();\n _this.dispatchDisplayedRowsChanged();\n });\n }\n else {\n this.destroyRowCtrls(rowsToRecycle, animate);\n }\n }\n this.updateAllRowCtrls();\n this.checkAngularCompile();\n this.gridBodyCtrl.updateRowCount();\n };\n RowRenderer.prototype.dispatchDisplayedRowsChanged = function () {\n var event = { type: Events.EVENT_DISPLAYED_ROWS_CHANGED };\n this.eventService.dispatchEvent(event);\n };\n RowRenderer.prototype.onDisplayedColumnsChanged = function () {\n var pinningLeft = this.columnModel.isPinningLeft();\n var pinningRight = this.columnModel.isPinningRight();\n var atLeastOneChanged = this.pinningLeft !== pinningLeft || pinningRight !== this.pinningRight;\n if (atLeastOneChanged) {\n this.pinningLeft = pinningLeft;\n this.pinningRight = pinningRight;\n if (this.embedFullWidthRows) {\n this.redrawFullWidthEmbeddedRows();\n }\n }\n };\n // when embedding, what gets showed in each section depends on what is pinned. eg if embedding group expand / collapse,\n // then it should go into the pinned left area if pinning left, or the center area if not pinning.\n RowRenderer.prototype.redrawFullWidthEmbeddedRows = function () {\n // if either of the pinned panels has shown / hidden, then need to redraw the fullWidth bits when\n // embedded, as what appears in each section depends on whether we are pinned or not\n var rowsToRemove = [];\n iterateObject(this.rowCtrlsByRowIndex, function (id, rowComp) {\n if (rowComp.isFullWidth()) {\n var rowIndex = rowComp.getRowNode().rowIndex;\n rowsToRemove.push(rowIndex.toString());\n }\n });\n this.refreshFloatingRowComps();\n this.removeRowCtrls(rowsToRemove);\n this.redrawAfterScroll();\n };\n RowRenderer.prototype.refreshFullWidthRows = function (rowNodesToRefresh) {\n var rowsToRemove = [];\n var selectivelyRefreshing = !!rowNodesToRefresh;\n var idsToRefresh = selectivelyRefreshing ? {} : undefined;\n if (selectivelyRefreshing && idsToRefresh) {\n rowNodesToRefresh.forEach(function (r) { return idsToRefresh[r.id] = true; });\n }\n iterateObject(this.rowCtrlsByRowIndex, function (id, rowCtrl) {\n if (!rowCtrl.isFullWidth()) {\n return;\n }\n var rowNode = rowCtrl.getRowNode();\n if (selectivelyRefreshing && idsToRefresh) {\n // we refresh if a) this node is present or b) this parents nodes is present. checking parent\n // node is important for master/detail, as we want detail to refresh on changes to parent node.\n // it's also possible, if user is provider their own fullWidth, that details panels contain\n // some info on the parent, eg if in tree data and child row shows some data from parent row also.\n var parentId = (rowNode.level > 0 && rowNode.parent) ? rowNode.parent.id : undefined;\n var skipThisNode = !idsToRefresh[rowNode.id] && !idsToRefresh[parentId];\n if (skipThisNode) {\n return;\n }\n }\n var fullWidthRowsRefreshed = rowCtrl.refreshFullWidth();\n if (!fullWidthRowsRefreshed) {\n var rowIndex = rowCtrl.getRowNode().rowIndex;\n rowsToRemove.push(rowIndex.toString());\n }\n });\n this.removeRowCtrls(rowsToRemove);\n this.redrawAfterScroll();\n };\n RowRenderer.prototype.createOrUpdateRowCtrl = function (rowIndex, rowsToRecycle, animate, afterScroll) {\n var rowNode;\n var rowCon = this.rowCtrlsByRowIndex[rowIndex];\n // if no row comp, see if we can get it from the previous rowComps\n if (!rowCon) {\n rowNode = this.paginationProxy.getRow(rowIndex);\n if (exists(rowNode) && exists(rowsToRecycle) && rowsToRecycle[rowNode.id] && rowNode.alreadyRendered) {\n rowCon = rowsToRecycle[rowNode.id];\n rowsToRecycle[rowNode.id] = null;\n }\n }\n var creatingNewRowCon = !rowCon;\n if (creatingNewRowCon) {\n // create a new one\n if (!rowNode) {\n rowNode = this.paginationProxy.getRow(rowIndex);\n }\n if (exists(rowNode)) {\n rowCon = this.createRowCon(rowNode, animate, afterScroll);\n }\n else {\n // this should never happen - if somehow we are trying to create\n // a row for a rowNode that does not exist.\n return;\n }\n }\n if (rowNode) {\n // set node as 'alreadyRendered' to ensure we only recycle rowComps that have been rendered, this ensures\n // we don't reuse rowComps that have been removed and then re-added in the same batch transaction.\n rowNode.alreadyRendered = true;\n }\n this.rowCtrlsByRowIndex[rowIndex] = rowCon;\n return rowCon;\n };\n RowRenderer.prototype.destroyRowCtrls = function (rowCtrlsMap, animate) {\n var _this = this;\n var executeInAWhileFuncs = [];\n iterateObject(rowCtrlsMap, function (nodeId, rowCtrl) {\n // if row was used, then it's null\n if (!rowCtrl) {\n return;\n }\n if (_this.cachedRowCtrls && rowCtrl.isCacheable()) {\n _this.cachedRowCtrls.addRow(rowCtrl);\n return;\n }\n rowCtrl.destroyFirstPass();\n if (animate) {\n _this.zombieRowCtrls[rowCtrl.getInstanceId()] = rowCtrl;\n executeInAWhileFuncs.push(function () {\n rowCtrl.destroySecondPass();\n delete _this.zombieRowCtrls[rowCtrl.getInstanceId()];\n });\n }\n else {\n rowCtrl.destroySecondPass();\n }\n });\n if (animate) {\n // this ensures we fire displayedRowsChanged AFTER all the 'executeInAWhileFuncs' get\n // executed, as we added it to the end of the list.\n executeInAWhileFuncs.push(function () {\n _this.updateAllRowCtrls();\n _this.dispatchDisplayedRowsChanged();\n });\n executeInAWhile(executeInAWhileFuncs);\n }\n };\n RowRenderer.prototype.checkAngularCompile = function () {\n var _this = this;\n // if we are doing angular compiling, then do digest the scope here\n if (this.gridOptionsWrapper.isAngularCompileRows()) {\n // we do it in a timeout, in case we are already in an apply\n window.setTimeout(function () {\n _this.$scope.$apply();\n }, 0);\n }\n };\n RowRenderer.prototype.workOutFirstAndLastRowsToRender = function () {\n var _this = this;\n var newFirst;\n var newLast;\n if (!this.paginationProxy.isRowsToRender()) {\n newFirst = 0;\n newLast = -1; // setting to -1 means nothing in range\n }\n else if (this.printLayout) {\n newFirst = this.paginationProxy.getPageFirstRow();\n newLast = this.paginationProxy.getPageLastRow();\n }\n else {\n var bufferPixels = this.gridOptionsWrapper.getRowBufferInPixels();\n var gridBodyCon = this.ctrlsService.getGridBodyCtrl();\n var rowHeightsChanged = false;\n var firstPixel = void 0;\n var lastPixel = void 0;\n do {\n var paginationOffset = this.paginationProxy.getPixelOffset();\n var _a = this.paginationProxy.getCurrentPagePixelRange(), pageFirstPixel = _a.pageFirstPixel, pageLastPixel = _a.pageLastPixel;\n var divStretchOffset = this.rowContainerHeightService.getDivStretchOffset();\n var bodyVRange = gridBodyCon.getScrollFeature().getVScrollPosition();\n var bodyTopPixel = bodyVRange.top;\n var bodyBottomPixel = bodyVRange.bottom;\n firstPixel = Math.max(bodyTopPixel + paginationOffset - bufferPixels, pageFirstPixel) + divStretchOffset;\n lastPixel = Math.min(bodyBottomPixel + paginationOffset + bufferPixels, pageLastPixel) + divStretchOffset;\n // if the rows we are about to display get their heights changed, then that upsets the calcs from above.\n rowHeightsChanged = this.ensureAllRowsInRangeHaveHeightsCalculated(firstPixel, lastPixel);\n } while (rowHeightsChanged);\n var firstRowIndex = this.paginationProxy.getRowIndexAtPixel(firstPixel);\n var lastRowIndex = this.paginationProxy.getRowIndexAtPixel(lastPixel);\n var pageFirstRow = this.paginationProxy.getPageFirstRow();\n var pageLastRow = this.paginationProxy.getPageLastRow();\n // adjust, in case buffer extended actual size\n if (firstRowIndex < pageFirstRow) {\n firstRowIndex = pageFirstRow;\n }\n if (lastRowIndex > pageLastRow) {\n lastRowIndex = pageLastRow;\n }\n newFirst = firstRowIndex;\n newLast = lastRowIndex;\n }\n // sometimes user doesn't set CSS right and ends up with grid with no height and grid ends up\n // trying to render all the rows, eg 10,000+ rows. this will kill the browser. so instead of\n // killing the browser, we limit the number of rows. just in case some use case we didn't think\n // of, we also have a property to not do this operation.\n var rowLayoutNormal = this.gridOptionsWrapper.getDomLayout() === Constants.DOM_LAYOUT_NORMAL;\n var suppressRowCountRestriction = this.gridOptionsWrapper.isSuppressMaxRenderedRowRestriction();\n var rowBufferMaxSize = Math.max(this.gridOptionsWrapper.getRowBuffer(), 500);\n if (rowLayoutNormal && !suppressRowCountRestriction) {\n if (newLast - newFirst > rowBufferMaxSize) {\n newLast = newFirst + rowBufferMaxSize;\n }\n }\n var firstDiffers = newFirst !== this.firstRenderedRow;\n var lastDiffers = newLast !== this.lastRenderedRow;\n if (firstDiffers || lastDiffers) {\n this.firstRenderedRow = newFirst;\n this.lastRenderedRow = newLast;\n var event_1 = {\n type: Events.EVENT_VIEWPORT_CHANGED,\n firstRow: newFirst,\n lastRow: newLast,\n api: this.gridApi,\n columnApi: this.columnApi\n };\n this.eventService.dispatchEvent(event_1);\n }\n // only dispatch firstDataRendered if we have actually rendered some data\n if (this.paginationProxy.isRowsToRender()) {\n var event_2 = {\n type: Events.EVENT_FIRST_DATA_RENDERED,\n firstRow: newFirst,\n lastRow: newLast,\n api: this.gridApi,\n columnApi: this.columnApi\n };\n // added a small delay here because in some scenarios this can be fired\n // before the grid is actually rendered, causing component creation\n // on EVENT_FIRST_DATA_RENDERED to fail.\n window.setTimeout(function () { return _this.eventService.dispatchEventOnce(event_2); }, 50);\n }\n };\n RowRenderer.prototype.ensureAllRowsInRangeHaveHeightsCalculated = function (topPixel, bottomPixel) {\n // ensureRowHeightsVisible only works with CSRM, as it's the only row model that allows lazy row height calcs.\n // all the other row models just hard code so the method just returns back false\n var res = this.paginationProxy.ensureRowHeightsValid(topPixel, bottomPixel, -1, -1);\n if (res) {\n this.updateContainerHeights();\n }\n return res;\n };\n RowRenderer.prototype.getFirstVirtualRenderedRow = function () {\n return this.firstRenderedRow;\n };\n RowRenderer.prototype.getLastVirtualRenderedRow = function () {\n return this.lastRenderedRow;\n };\n // check that none of the rows to remove are editing or focused as:\n // a) if editing, we want to keep them, otherwise the user will loose the context of the edit,\n // eg user starts editing, enters some text, then scrolls down and then up, next time row rendered\n // the edit is reset - so we want to keep it rendered.\n // b) if focused, we want ot keep keyboard focus, so if user ctrl+c, it goes to clipboard,\n // otherwise the user can range select and drag (with focus cell going out of the viewport)\n // and then ctrl+c, nothing will happen if cell is removed from dom.\n // c) if detail record of master detail, as users complained that the context of detail rows\n // was getting lost when detail row out of view. eg user expands to show detail row,\n // then manipulates the detail panel (eg sorts the detail grid), then context is lost\n // after detail panel is scrolled out of / into view.\n RowRenderer.prototype.doNotUnVirtualiseRow = function (rowComp) {\n var REMOVE_ROW = false;\n var KEEP_ROW = true;\n var rowNode = rowComp.getRowNode();\n var rowHasFocus = this.focusService.isRowNodeFocused(rowNode);\n var rowIsEditing = rowComp.isEditing();\n var rowIsDetail = rowNode.detail;\n var mightWantToKeepRow = rowHasFocus || rowIsEditing || rowIsDetail;\n // if we deffo don't want to keep it,\n if (!mightWantToKeepRow) {\n return REMOVE_ROW;\n }\n // editing row, only remove if it is no longer rendered, eg filtered out or new data set.\n // the reason we want to keep is if user is scrolling up and down, we don't want to loose\n // the context of the editing in process.\n var rowNodePresent = this.paginationProxy.isRowPresent(rowNode);\n return rowNodePresent ? KEEP_ROW : REMOVE_ROW;\n };\n RowRenderer.prototype.createRowCon = function (rowNode, animate, afterScroll) {\n var rowCtrlFromCache = this.cachedRowCtrls ? this.cachedRowCtrls.getRow(rowNode) : null;\n if (rowCtrlFromCache) {\n return rowCtrlFromCache;\n }\n // we don't use animations frames for printing, so the user can put the grid into print mode\n // and immediately print - otherwise the user would have to wait for the rows to draw in the background\n // (via the animation frames) which is awkward to do from code.\n // we only do the animation frames after scrolling, as this is where we want the smooth user experience.\n // having animation frames for other times makes the grid look 'jumpy'.\n var suppressAnimationFrame = this.gridOptionsWrapper.isSuppressAnimationFrame();\n var useAnimationFrameForCreate = afterScroll && !suppressAnimationFrame && !this.printLayout;\n var res = new RowCtrl(this.$scope, rowNode, this.beans, animate, useAnimationFrameForCreate, this.printLayout);\n return res;\n };\n RowRenderer.prototype.getRenderedNodes = function () {\n var renderedRows = this.rowCtrlsByRowIndex;\n return Object.keys(renderedRows).map(function (key) { return renderedRows[key].getRowNode(); });\n };\n RowRenderer.prototype.getRowByPosition = function (rowPosition) {\n var rowComponent;\n switch (rowPosition.rowPinned) {\n case Constants.PINNED_TOP:\n rowComponent = this.topRowCtrls[rowPosition.rowIndex];\n break;\n case Constants.PINNED_BOTTOM:\n rowComponent = this.bottomRowCtrls[rowPosition.rowIndex];\n break;\n default:\n rowComponent = this.rowCtrlsByRowIndex[rowPosition.rowIndex];\n break;\n }\n return rowComponent;\n };\n RowRenderer.prototype.getRowNode = function (gridRow) {\n switch (gridRow.rowPinned) {\n case Constants.PINNED_TOP:\n return this.pinnedRowModel.getPinnedTopRowData()[gridRow.rowIndex];\n case Constants.PINNED_BOTTOM:\n return this.pinnedRowModel.getPinnedBottomRowData()[gridRow.rowIndex];\n default:\n return this.rowModel.getRow(gridRow.rowIndex);\n }\n };\n // returns true if any row between startIndex and endIndex is rendered. used by\n // SSRM or IRM, as they don't want to purge visible blocks from cache.\n RowRenderer.prototype.isRangeInRenderedViewport = function (startIndex, endIndex) {\n // parent closed means the parent node is not expanded, thus these blocks are not visible\n var parentClosed = startIndex == null || endIndex == null;\n if (parentClosed) {\n return false;\n }\n var blockAfterViewport = startIndex > this.lastRenderedRow;\n var blockBeforeViewport = endIndex < this.firstRenderedRow;\n var blockInsideViewport = !blockBeforeViewport && !blockAfterViewport;\n return blockInsideViewport;\n };\n __decorate$E([\n Autowired(\"paginationProxy\")\n ], RowRenderer.prototype, \"paginationProxy\", void 0);\n __decorate$E([\n Autowired(\"columnModel\")\n ], RowRenderer.prototype, \"columnModel\", void 0);\n __decorate$E([\n Autowired(\"$scope\")\n ], RowRenderer.prototype, \"$scope\", void 0);\n __decorate$E([\n Autowired(\"pinnedRowModel\")\n ], RowRenderer.prototype, \"pinnedRowModel\", void 0);\n __decorate$E([\n Autowired(\"rowModel\")\n ], RowRenderer.prototype, \"rowModel\", void 0);\n __decorate$E([\n Autowired(\"focusService\")\n ], RowRenderer.prototype, \"focusService\", void 0);\n __decorate$E([\n Autowired(\"columnApi\")\n ], RowRenderer.prototype, \"columnApi\", void 0);\n __decorate$E([\n Autowired(\"gridApi\")\n ], RowRenderer.prototype, \"gridApi\", void 0);\n __decorate$E([\n Autowired(\"beans\")\n ], RowRenderer.prototype, \"beans\", void 0);\n __decorate$E([\n Autowired(\"rowContainerHeightService\")\n ], RowRenderer.prototype, \"rowContainerHeightService\", void 0);\n __decorate$E([\n Optional(\"ctrlsService\")\n ], RowRenderer.prototype, \"ctrlsService\", void 0);\n __decorate$E([\n PostConstruct\n ], RowRenderer.prototype, \"postConstruct\", null);\n RowRenderer = __decorate$E([\n Bean(\"rowRenderer\")\n ], RowRenderer);\n return RowRenderer;\n}(BeanStub));\nvar RowCtrlCache = /** @class */ (function () {\n function RowCtrlCache(maxCount) {\n // map for fast access\n this.entriesMap = {};\n // list for keeping order\n this.entriesList = [];\n this.maxCount = maxCount;\n }\n RowCtrlCache.prototype.toString = function () {\n return this.entriesList.map(function (item) { return item.getRowNode().data.name; }).join(', ');\n };\n RowCtrlCache.prototype.addRow = function (rowCtrl) {\n this.entriesMap[rowCtrl.getRowNode().id] = rowCtrl;\n this.entriesList.push(rowCtrl);\n rowCtrl.setCached(true);\n if (this.entriesList.length > this.maxCount) {\n var rowCtrlToDestroy = this.entriesList[0];\n rowCtrlToDestroy.destroyFirstPass();\n rowCtrlToDestroy.destroySecondPass();\n this.removeFromCache(rowCtrlToDestroy);\n }\n };\n RowCtrlCache.prototype.getRow = function (rowNode) {\n if (rowNode == null || rowNode.id == null) {\n return null;\n }\n var res = this.entriesMap[rowNode.id];\n if (!res) {\n return null;\n }\n this.removeFromCache(res);\n res.setCached(false);\n // this can happen if user reloads data, and a new RowNode is reusing\n // the same ID as the old one\n var rowNodeMismatch = res.getRowNode() != rowNode;\n return rowNodeMismatch ? null : res;\n };\n RowCtrlCache.prototype.removeFromCache = function (rowCtrl) {\n var rowNodeId = rowCtrl.getRowNode().id;\n delete this.entriesMap[rowNodeId];\n removeFromArray(this.entriesList, rowCtrl);\n };\n RowCtrlCache.prototype.getEntries = function () {\n return this.entriesList;\n };\n return RowCtrlCache;\n}());\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / React / AngularJS / Web Components\n * @version v26.1.0\n * @link http://www.ag-grid.com/\n * @license MIT\n */\nvar __extends$P = (undefined && undefined.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate$F = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n 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 AbstractHeaderCellComp = /** @class */ (function (_super) {\n __extends$P(AbstractHeaderCellComp, _super);\n function AbstractHeaderCellComp(template, ctrl) {\n var _this = _super.call(this, template) || this;\n _this.ctrl = ctrl;\n return _this;\n }\n /// temp - this is in the AbstractHeaderCellCtrl also, once all comps refactored, this can be removed\n AbstractHeaderCellComp.prototype.shouldStopEventPropagation = function (e) {\n var _a = this.focusService.getFocusedHeader(), headerRowIndex = _a.headerRowIndex, column = _a.column;\n return isUserSuppressingHeaderKeyboardEvent(this.gridOptionsWrapper, e, headerRowIndex, column);\n };\n AbstractHeaderCellComp.prototype.getCtrl = function () {\n return this.ctrl;\n };\n __decorate$F([\n Autowired('focusService')\n ], AbstractHeaderCellComp.prototype, \"focusService\", void 0);\n return AbstractHeaderCellComp;\n}(Component));\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / React / AngularJS / Web Components\n * @version v26.1.0\n * @link http://www.ag-grid.com/\n * @license MIT\n */\nvar __extends$Q = (undefined && undefined.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate$G = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n 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 HeaderCellComp = /** @class */ (function (_super) {\n __extends$Q(HeaderCellComp, _super);\n function HeaderCellComp(ctrl) {\n var _this = _super.call(this, HeaderCellComp.TEMPLATE, ctrl) || this;\n _this.headerCompVersion = 0;\n _this.column = ctrl.getColumnGroupChild();\n _this.pinned = ctrl.getPinned();\n return _this;\n }\n HeaderCellComp.prototype.postConstruct = function () {\n var _this = this;\n var eGui = this.getGui();\n var setAttribute = function (name, value, element) {\n var actualElement = element ? element : eGui;\n if (value != null && value != '') {\n actualElement.setAttribute(name, value);\n }\n else {\n actualElement.removeAttribute(name);\n }\n };\n var compProxy = {\n setWidth: function (width) { return eGui.style.width = width; },\n addOrRemoveCssClass: function (cssClassName, on) { return _this.addOrRemoveCssClass(cssClassName, on); },\n setAriaSort: function (sort) { return sort ? setAriaSort(eGui, sort) : removeAriaSort(eGui); },\n setColId: function (id) { return setAttribute('col-id', id); },\n setTitle: function (title) { return setAttribute('title', title); },\n setAriaDescribedBy: function (value) { return setAriaDescribedBy(eGui, value); },\n setUserCompDetails: function (compDetails) { return _this.setUserCompDetails(compDetails); },\n getUserCompInstance: function () { return _this.headerComp; }\n };\n this.ctrl.setComp(compProxy, this.getGui(), this.eResize);\n var selectAllGui = this.ctrl.getSelectAllGui();\n this.eResize.insertAdjacentElement('afterend', selectAllGui);\n };\n HeaderCellComp.prototype.destroyHeaderComp = function () {\n if (this.headerComp) {\n this.getGui().removeChild(this.headerCompGui);\n this.headerComp = this.destroyBean(this.headerComp);\n this.headerCompGui = undefined;\n }\n };\n HeaderCellComp.prototype.setUserCompDetails = function (compDetails) {\n var _this = this;\n this.headerCompVersion++;\n var versionCopy = this.headerCompVersion;\n var callback = this.afterHeaderCompCreated.bind(this, this.headerCompVersion);\n this.userComponentFactory.createInstanceFromCompDetails(compDetails).then(function (comp) {\n _this.afterHeaderCompCreated(versionCopy, comp);\n });\n };\n HeaderCellComp.prototype.afterHeaderCompCreated = function (version, headerComp) {\n if (version != this.headerCompVersion || !this.isAlive()) {\n this.destroyBean(headerComp);\n return;\n }\n this.destroyHeaderComp();\n this.headerComp = headerComp;\n this.headerCompGui = headerComp.getGui();\n this.getGui().appendChild(this.headerCompGui);\n this.ctrl.setDragSource(this.headerCompGui);\n };\n HeaderCellComp.TEMPLATE = \"\";\n __decorate$G([\n Autowired('userComponentFactory')\n ], HeaderCellComp.prototype, \"userComponentFactory\", void 0);\n __decorate$G([\n Autowired('beans')\n ], HeaderCellComp.prototype, \"beans\", void 0);\n __decorate$G([\n RefSelector('eResize')\n ], HeaderCellComp.prototype, \"eResize\", void 0);\n __decorate$G([\n PostConstruct\n ], HeaderCellComp.prototype, \"postConstruct\", null);\n __decorate$G([\n PreDestroy\n ], HeaderCellComp.prototype, \"destroyHeaderComp\", null);\n return HeaderCellComp;\n}(AbstractHeaderCellComp));\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / React / AngularJS / Web Components\n * @version v26.1.0\n * @link http://www.ag-grid.com/\n * @license MIT\n */\nvar __extends$R = (undefined && undefined.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate$H = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n 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 HeaderGroupCellComp = /** @class */ (function (_super) {\n __extends$R(HeaderGroupCellComp, _super);\n function HeaderGroupCellComp(ctrl) {\n return _super.call(this, HeaderGroupCellComp.TEMPLATE, ctrl) || this;\n }\n HeaderGroupCellComp.prototype.postConstruct = function () {\n var _this = this;\n var eGui = this.getGui();\n var setAttribute = function (key, value) {\n return value != undefined ? eGui.setAttribute(key, value) : eGui.removeAttribute(key);\n };\n var compProxy = {\n addOrRemoveCssClass: function (cssClassName, on) { return _this.addOrRemoveCssClass(cssClassName, on); },\n addOrRemoveResizableCssClass: function (cssClassName, on) { return addOrRemoveCssClass(_this.eResize, cssClassName, on); },\n setWidth: function (width) { return eGui.style.width = width; },\n setColId: function (id) { return eGui.setAttribute(\"col-id\", id); },\n setAriaExpanded: function (expanded) { return setAttribute('aria-expanded', expanded); },\n setTitle: function (title) { return setAttribute(\"title\", title); },\n setUserCompDetails: function (details) { return _this.setUserCompDetails(details); }\n };\n this.ctrl.setComp(compProxy, eGui, this.eResize);\n };\n HeaderGroupCellComp.prototype.setUserCompDetails = function (details) {\n var _this = this;\n this.userComponentFactory.createInstanceFromCompDetails(details)\n .then(function (comp) { return _this.afterHeaderCompCreated(comp); });\n };\n HeaderGroupCellComp.prototype.afterHeaderCompCreated = function (headerGroupComp) {\n var _this = this;\n var destroyFunc = function () { return _this.destroyBean(headerGroupComp); };\n if (!this.isAlive()) {\n destroyFunc();\n return;\n }\n this.getGui().appendChild(headerGroupComp.getGui());\n this.addDestroyFunc(destroyFunc);\n this.ctrl.setDragSource(headerGroupComp.getGui());\n };\n HeaderGroupCellComp.TEMPLATE = \"\";\n __decorate$H([\n Autowired('userComponentFactory')\n ], HeaderGroupCellComp.prototype, \"userComponentFactory\", void 0);\n __decorate$H([\n RefSelector('eResize')\n ], HeaderGroupCellComp.prototype, \"eResize\", void 0);\n __decorate$H([\n PostConstruct\n ], HeaderGroupCellComp.prototype, \"postConstruct\", null);\n return HeaderGroupCellComp;\n}(AbstractHeaderCellComp));\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / React / AngularJS / Web Components\n * @version v26.1.0\n * @link http://www.ag-grid.com/\n * @license MIT\n */\nvar FloatingFilterMapper = /** @class */ (function () {\n function FloatingFilterMapper() {\n }\n FloatingFilterMapper.getFloatingFilterType = function (filterType) {\n return this.filterToFloatingFilterMapping[filterType];\n };\n FloatingFilterMapper.filterToFloatingFilterMapping = {\n set: 'agSetColumnFloatingFilter',\n agSetColumnFilter: 'agSetColumnFloatingFilter',\n multi: 'agMultiColumnFloatingFilter',\n agMultiColumnFilter: 'agMultiColumnFloatingFilter',\n number: 'agNumberColumnFloatingFilter',\n agNumberColumnFilter: 'agNumberColumnFloatingFilter',\n date: 'agDateColumnFloatingFilter',\n agDateColumnFilter: 'agDateColumnFloatingFilter',\n text: 'agTextColumnFloatingFilter',\n agTextColumnFilter: 'agTextColumnFloatingFilter'\n };\n return FloatingFilterMapper;\n}());\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / React / AngularJS / Web Components\n * @version v26.1.0\n * @link http://www.ag-grid.com/\n * @license MIT\n */\nvar __extends$S = (undefined && undefined.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate$I = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n 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// optional floating filter for user provided filters - instead of providing a floating filter,\n// they can provide a getModelAsString() method on the filter instead. this class just displays\n// the string returned from getModelAsString()\nvar ReadOnlyFloatingFilter = /** @class */ (function (_super) {\n __extends$S(ReadOnlyFloatingFilter, _super);\n function ReadOnlyFloatingFilter() {\n return _super.call(this, /* html */ \"\\n \") || this;\n }\n // this is a user component, and IComponent has \"public destroy()\" as part of the interface.\n // so we need to override destroy() just to make the method public.\n ReadOnlyFloatingFilter.prototype.destroy = function () {\n _super.prototype.destroy.call(this);\n };\n ReadOnlyFloatingFilter.prototype.init = function (params) {\n this.params = params;\n var displayName = this.columnModel.getDisplayNameForColumn(params.column, 'header', true);\n var translate = this.gridOptionsWrapper.getLocaleTextFunc();\n this.eFloatingFilterText\n .setDisabled(true)\n .setInputAriaLabel(displayName + \" \" + translate('ariaFilterInput', 'Filter Input'));\n };\n ReadOnlyFloatingFilter.prototype.onParentModelChanged = function (parentModel) {\n var _this = this;\n if (!parentModel) {\n this.eFloatingFilterText.setValue('');\n return;\n }\n this.params.parentFilterInstance(function (filterInstance) {\n // it would be nice to check if getModelAsString was present before creating this component,\n // however that is not possible, as React Hooks and VueJS don't attached the methods to the Filter until\n // AFTER the filter is created, not allowing inspection before this (we create floating filters as columns\n // are drawn, but the parent filters are only created when needed).\n if (filterInstance.getModelAsString) {\n var modelAsString = filterInstance.getModelAsString(parentModel);\n _this.eFloatingFilterText.setValue(modelAsString);\n }\n });\n };\n __decorate$I([\n RefSelector('eFloatingFilterText')\n ], ReadOnlyFloatingFilter.prototype, \"eFloatingFilterText\", void 0);\n __decorate$I([\n Autowired('columnModel')\n ], ReadOnlyFloatingFilter.prototype, \"columnModel\", void 0);\n return ReadOnlyFloatingFilter;\n}(Component));\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / React / AngularJS / Web Components\n * @version v26.1.0\n * @link http://www.ag-grid.com/\n * @license MIT\n */\nvar __extends$T = (undefined && undefined.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate$J = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n 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 SetLeftFeature = /** @class */ (function (_super) {\n __extends$T(SetLeftFeature, _super);\n function SetLeftFeature(columnOrGroup, eCell, beans, colsSpanning) {\n var _this = _super.call(this) || this;\n _this.columnOrGroup = columnOrGroup;\n _this.eCell = eCell;\n _this.ariaEl = _this.eCell.querySelector('[role=columnheader]') || _this.eCell;\n _this.colsSpanning = colsSpanning;\n _this.beans = beans;\n return _this;\n }\n SetLeftFeature.prototype.setColsSpanning = function (colsSpanning) {\n this.colsSpanning = colsSpanning;\n this.onLeftChanged();\n };\n SetLeftFeature.prototype.getColumnOrGroup = function () {\n if (this.beans.gridOptionsWrapper.isEnableRtl() && this.colsSpanning) {\n return last(this.colsSpanning);\n }\n return this.columnOrGroup;\n };\n SetLeftFeature.prototype.postConstruct = function () {\n this.addManagedListener(this.columnOrGroup, Column.EVENT_LEFT_CHANGED, this.onLeftChanged.bind(this));\n this.setLeftFirstTime();\n // when in print layout, the left position is also dependent on the width of the pinned sections.\n // so additionally update left if any column width changes.\n this.addManagedListener(this.eventService, Events.EVENT_DISPLAYED_COLUMNS_WIDTH_CHANGED, this.onLeftChanged.bind(this));\n // setting left has a dependency on print layout\n this.addManagedListener(this.beans.gridOptionsWrapper, GridOptionsWrapper.PROP_DOM_LAYOUT, this.onLeftChanged.bind(this));\n };\n SetLeftFeature.prototype.setLeftFirstTime = function () {\n var suppressMoveAnimation = this.beans.gridOptionsWrapper.isSuppressColumnMoveAnimation();\n var oldLeftExists = exists(this.columnOrGroup.getOldLeft());\n var animateColumnMove = this.beans.columnAnimationService.isActive() && oldLeftExists && !suppressMoveAnimation;\n if (animateColumnMove) {\n this.animateInLeft();\n }\n else {\n this.onLeftChanged();\n }\n };\n SetLeftFeature.prototype.animateInLeft = function () {\n var _this = this;\n var colOrGroup = this.getColumnOrGroup();\n var left = colOrGroup.getLeft();\n var oldLeft = colOrGroup.getOldLeft();\n var oldActualLeft = this.modifyLeftForPrintLayout(colOrGroup, oldLeft);\n var actualLeft = this.modifyLeftForPrintLayout(colOrGroup, left);\n this.setLeft(oldActualLeft);\n // we must keep track of the left we want to set to, as this would otherwise lead to a race\n // condition, if the user changed the left value many times in one VM turn, then we want to make\n // make sure the actualLeft we set in the timeout below (in the next VM turn) is the correct left\n // position. eg if user changes column position twice, then setLeft() below executes twice in next\n // VM turn, but only one (the correct one) should get applied.\n this.actualLeft = actualLeft;\n this.beans.columnAnimationService.executeNextVMTurn(function () {\n // test this left value is the latest one to be applied, and if not, do nothing\n if (_this.actualLeft === actualLeft) {\n _this.setLeft(actualLeft);\n }\n });\n };\n SetLeftFeature.prototype.onLeftChanged = function () {\n var colOrGroup = this.getColumnOrGroup();\n var left = colOrGroup.getLeft();\n this.actualLeft = this.modifyLeftForPrintLayout(colOrGroup, left);\n this.setLeft(this.actualLeft);\n };\n SetLeftFeature.prototype.modifyLeftForPrintLayout = function (colOrGroup, leftPosition) {\n var printLayout = this.beans.gridOptionsWrapper.getDomLayout() === Constants.DOM_LAYOUT_PRINT;\n if (!printLayout) {\n return leftPosition;\n }\n if (colOrGroup.getPinned() === Constants.PINNED_LEFT) {\n return leftPosition;\n }\n var leftWidth = this.beans.columnModel.getDisplayedColumnsLeftWidth();\n if (colOrGroup.getPinned() === Constants.PINNED_RIGHT) {\n var bodyWidth = this.beans.columnModel.getBodyContainerWidth();\n return leftWidth + bodyWidth + leftPosition;\n }\n // is in body\n return leftWidth + leftPosition;\n };\n SetLeftFeature.prototype.setLeft = function (value) {\n // if the value is null, then that means the column is no longer\n // displayed. there is logic in the rendering to fade these columns\n // out, so we don't try and change their left positions.\n if (exists(value)) {\n this.eCell.style.left = value + \"px\";\n }\n var indexColumn;\n if (this.columnOrGroup instanceof Column) {\n indexColumn = this.columnOrGroup;\n }\n else {\n var columnGroup = this.columnOrGroup;\n var children = columnGroup.getLeafColumns();\n if (!children.length) {\n return;\n }\n if (children.length > 1) {\n setAriaColSpan(this.ariaEl, children.length);\n }\n indexColumn = children[0];\n }\n var index = this.beans.columnModel.getAriaColumnIndex(indexColumn);\n setAriaColIndex(this.ariaEl, index);\n };\n __decorate$J([\n PostConstruct\n ], SetLeftFeature.prototype, \"postConstruct\", null);\n return SetLeftFeature;\n}(BeanStub));\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / React / AngularJS / Web Components\n * @version v26.1.0\n * @link http://www.ag-grid.com/\n * @license MIT\n */\nvar __extends$U = (undefined && undefined.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate$K = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n 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 HoverFeature = /** @class */ (function (_super) {\n __extends$U(HoverFeature, _super);\n function HoverFeature(columns, element) {\n var _this = _super.call(this) || this;\n _this.columns = columns;\n _this.element = element;\n return _this;\n }\n HoverFeature.prototype.postConstruct = function () {\n if (this.gridOptionsWrapper.isColumnHoverHighlight()) {\n this.addMouseHoverListeners();\n }\n };\n HoverFeature.prototype.addMouseHoverListeners = function () {\n this.addManagedListener(this.element, 'mouseout', this.onMouseOut.bind(this));\n this.addManagedListener(this.element, 'mouseover', this.onMouseOver.bind(this));\n };\n HoverFeature.prototype.onMouseOut = function () {\n this.columnHoverService.clearMouseOver();\n };\n HoverFeature.prototype.onMouseOver = function () {\n this.columnHoverService.setMouseOver(this.columns);\n };\n __decorate$K([\n Autowired('columnHoverService')\n ], HoverFeature.prototype, \"columnHoverService\", void 0);\n __decorate$K([\n PostConstruct\n ], HoverFeature.prototype, \"postConstruct\", null);\n return HoverFeature;\n}(BeanStub));\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / React / AngularJS / Web Components\n * @version v26.1.0\n * @link http://www.ag-grid.com/\n * @license MIT\n */\nvar __extends$V = (undefined && undefined.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate$L = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n 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 HeaderFilterCellComp = /** @class */ (function (_super) {\n __extends$V(HeaderFilterCellComp, _super);\n function HeaderFilterCellComp(ctrl) {\n var _this = _super.call(this, HeaderFilterCellComp.TEMPLATE, ctrl) || this;\n _this.column = ctrl.getColumnGroupChild();\n _this.pinned = ctrl.getPinned();\n return _this;\n }\n HeaderFilterCellComp.prototype.postConstruct = function () {\n this.setupFloatingFilter();\n this.setupWidth();\n this.setupLeftPositioning();\n this.setupColumnHover();\n this.createManagedBean(new HoverFeature([this.column], this.getGui()));\n this.createManagedBean(new ManagedFocusFeature(this.getFocusableElement(), {\n shouldStopEventPropagation: this.shouldStopEventPropagation.bind(this),\n onTabKeyDown: this.onTabKeyDown.bind(this),\n handleKeyDown: this.handleKeyDown.bind(this),\n onFocusIn: this.onFocusIn.bind(this)\n }));\n this.addManagedListener(this.eButtonShowMainFilter, 'click', this.showParentFilter.bind(this));\n var compProxy = {};\n this.ctrl.setComp(compProxy, this.getGui());\n };\n HeaderFilterCellComp.prototype.getColumn = function () {\n return this.column;\n };\n HeaderFilterCellComp.prototype.onTabKeyDown = function (e) {\n var activeEl = document.activeElement;\n var eGui = this.getGui();\n var wrapperHasFocus = activeEl === eGui;\n if (wrapperHasFocus) {\n return;\n }\n e.preventDefault();\n var nextFocusableEl = this.focusService.findNextFocusableElement(eGui, null, e.shiftKey);\n if (nextFocusableEl) {\n nextFocusableEl.focus();\n }\n else {\n eGui.focus();\n }\n };\n HeaderFilterCellComp.prototype.handleKeyDown = function (e) {\n var activeEl = document.activeElement;\n var eGui = this.getGui();\n var wrapperHasFocus = activeEl === eGui;\n switch (e.keyCode) {\n case KeyCode.UP:\n case KeyCode.DOWN:\n if (!wrapperHasFocus) {\n e.preventDefault();\n }\n case KeyCode.LEFT:\n case KeyCode.RIGHT:\n if (wrapperHasFocus) {\n return;\n }\n e.stopPropagation();\n case KeyCode.ENTER:\n if (wrapperHasFocus) {\n if (this.focusService.focusInto(eGui)) {\n e.preventDefault();\n }\n }\n break;\n case KeyCode.ESCAPE:\n if (!wrapperHasFocus) {\n this.getGui().focus();\n }\n }\n };\n HeaderFilterCellComp.prototype.onFocusIn = function (e) {\n var eGui = this.getGui();\n if (!eGui.contains(e.relatedTarget)) {\n var rowIndex = this.ctrl.getRowIndex();\n this.beans.focusService.setFocusedHeader(rowIndex, this.getColumn());\n }\n };\n HeaderFilterCellComp.prototype.setupFloatingFilter = function () {\n var _this = this;\n var colDef = this.column.getColDef();\n if ((!colDef.filter || !colDef.floatingFilter) && (!colDef.filterFramework || !colDef.floatingFilterComponentFramework)) {\n return;\n }\n this.floatingFilterCompPromise = this.getFloatingFilterInstance();\n if (!this.floatingFilterCompPromise) {\n return;\n }\n this.floatingFilterCompPromise.then(function (compInstance) {\n if (compInstance) {\n _this.setupWithFloatingFilter(compInstance);\n _this.setupSyncWithFilter();\n }\n });\n };\n HeaderFilterCellComp.prototype.setupLeftPositioning = function () {\n var setLeftFeature = new SetLeftFeature(this.column, this.getGui(), this.beans);\n this.createManagedBean(setLeftFeature);\n };\n HeaderFilterCellComp.prototype.setupSyncWithFilter = function () {\n var _this = this;\n var syncWithFilter = function (filterChangedEvent) {\n _this.onParentModelChanged(_this.currentParentModel(), filterChangedEvent);\n };\n this.addManagedListener(this.column, Column.EVENT_FILTER_CHANGED, syncWithFilter);\n if (this.filterManager.isFilterActive(this.column)) {\n syncWithFilter(null);\n }\n };\n // linked to event listener in template\n HeaderFilterCellComp.prototype.showParentFilter = function () {\n var eventSource = this.suppressFilterButton ? this.eFloatingFilterBody : this.eButtonShowMainFilter;\n this.menuFactory.showMenuAfterButtonClick(this.column, eventSource, 'floatingFilter', 'filterMenuTab', ['filterMenuTab']);\n };\n HeaderFilterCellComp.prototype.setupColumnHover = function () {\n this.addManagedListener(this.eventService, Events.EVENT_COLUMN_HOVER_CHANGED, this.onColumnHover.bind(this));\n this.onColumnHover();\n };\n HeaderFilterCellComp.prototype.onColumnHover = function () {\n if (!this.gridOptionsWrapper.isColumnHoverHighlight()) {\n return;\n }\n addOrRemoveCssClass(this.getGui(), 'ag-column-hover', this.columnHoverService.isHovered(this.column));\n };\n HeaderFilterCellComp.prototype.setupWidth = function () {\n this.addManagedListener(this.column, Column.EVENT_WIDTH_CHANGED, this.onColumnWidthChanged.bind(this));\n this.onColumnWidthChanged();\n };\n HeaderFilterCellComp.prototype.onColumnWidthChanged = function () {\n this.getGui().style.width = this.column.getActualWidth() + \"px\";\n };\n HeaderFilterCellComp.prototype.setupWithFloatingFilter = function (floatingFilterComp) {\n var _this = this;\n var disposeFunc = function () {\n _this.getContext().destroyBean(floatingFilterComp);\n };\n if (!this.isAlive()) {\n disposeFunc();\n return;\n }\n this.addDestroyFunc(disposeFunc);\n var floatingFilterCompUi = floatingFilterComp.getGui();\n addOrRemoveCssClass(this.eFloatingFilterBody, 'ag-floating-filter-full-body', this.suppressFilterButton);\n addOrRemoveCssClass(this.eFloatingFilterBody, 'ag-floating-filter-body', !this.suppressFilterButton);\n setDisplayed(this.eButtonWrapper, !this.suppressFilterButton);\n var eIcon = createIconNoSpan('filter', this.gridOptionsWrapper, this.column);\n this.eButtonShowMainFilter.appendChild(eIcon);\n this.eFloatingFilterBody.appendChild(floatingFilterCompUi);\n if (floatingFilterComp.afterGuiAttached) {\n floatingFilterComp.afterGuiAttached();\n }\n };\n HeaderFilterCellComp.prototype.parentFilterInstance = function (callback) {\n var filterComponent = this.getFilterComponent();\n if (filterComponent) {\n filterComponent.then(callback);\n }\n };\n HeaderFilterCellComp.prototype.getFilterComponent = function (createIfDoesNotExist) {\n if (createIfDoesNotExist === void 0) { createIfDoesNotExist = true; }\n return this.filterManager.getFilterComponent(this.column, 'NO_UI', createIfDoesNotExist);\n };\n HeaderFilterCellComp.getDefaultFloatingFilterType = function (def) {\n if (def == null) {\n return null;\n }\n var defaultFloatingFilterType = null;\n if (typeof def.filter === 'string') {\n // will be undefined if not in the map\n defaultFloatingFilterType = FloatingFilterMapper.getFloatingFilterType(def.filter);\n }\n else if (def.filterFramework) ;\n else if (def.filter === true) {\n var setFilterModuleLoaded = ModuleRegistry.isRegistered(exports.ModuleNames.SetFilterModule);\n defaultFloatingFilterType = setFilterModuleLoaded ? 'agSetColumnFloatingFilter' : 'agTextColumnFloatingFilter';\n }\n return defaultFloatingFilterType;\n };\n HeaderFilterCellComp.prototype.getFloatingFilterInstance = function () {\n var colDef = this.column.getColDef();\n var defaultFloatingFilterType = HeaderFilterCellComp.getDefaultFloatingFilterType(colDef);\n var filterParams = this.filterManager.createFilterParams(this.column, colDef);\n var finalFilterParams = this.userComponentFactory.mergeParamsWithApplicationProvidedParams(colDef, 'filter', filterParams);\n var params = {\n api: this.gridApi,\n column: this.column,\n filterParams: finalFilterParams,\n currentParentModel: this.currentParentModel.bind(this),\n parentFilterInstance: this.parentFilterInstance.bind(this),\n showParentFilter: this.showParentFilter.bind(this),\n onFloatingFilterChanged: this.onFloatingFilterChanged.bind(this),\n suppressFilterButton: false // This one might be overridden from the colDef\n };\n // this is unusual - we need a params value OUTSIDE the component the params are for.\n // the params are for the floating filter component, but this property is actually for the wrapper.\n this.suppressFilterButton = colDef.floatingFilterComponentParams ? !!colDef.floatingFilterComponentParams.suppressFilterButton : false;\n var promise = this.userComponentFactory.newFloatingFilterComponent(colDef, params, defaultFloatingFilterType);\n if (!promise) {\n var compInstance = this.userComponentFactory.createUserComponentFromConcreteClass(ReadOnlyFloatingFilter, params);\n promise = AgPromise.resolve(compInstance);\n }\n return promise;\n };\n HeaderFilterCellComp.prototype.currentParentModel = function () {\n var filterComponent = this.getFilterComponent(false);\n return filterComponent ? filterComponent.resolveNow(null, function (filter) { return filter && filter.getModel(); }) : null;\n };\n HeaderFilterCellComp.prototype.onParentModelChanged = function (model, filterChangedEvent) {\n if (!this.floatingFilterCompPromise) {\n return;\n }\n this.floatingFilterCompPromise.then(function (comp) { return comp && comp.onParentModelChanged(model, filterChangedEvent); });\n };\n HeaderFilterCellComp.prototype.onFloatingFilterChanged = function () {\n console.warn('AG Grid: since version 21.x, how floating filters are implemented has changed. ' +\n 'Instead of calling params.onFloatingFilterChanged(), get a reference to the main filter via ' +\n 'params.parentFilterInstance() and then set a value on the parent filter directly.');\n };\n HeaderFilterCellComp.TEMPLATE = \"\";\n __decorate$L([\n Autowired('columnHoverService')\n ], HeaderFilterCellComp.prototype, \"columnHoverService\", void 0);\n __decorate$L([\n Autowired('userComponentFactory')\n ], HeaderFilterCellComp.prototype, \"userComponentFactory\", void 0);\n __decorate$L([\n Autowired('gridApi')\n ], HeaderFilterCellComp.prototype, \"gridApi\", void 0);\n __decorate$L([\n Autowired('filterManager')\n ], HeaderFilterCellComp.prototype, \"filterManager\", void 0);\n __decorate$L([\n Autowired('menuFactory')\n ], HeaderFilterCellComp.prototype, \"menuFactory\", void 0);\n __decorate$L([\n Autowired('beans')\n ], HeaderFilterCellComp.prototype, \"beans\", void 0);\n __decorate$L([\n RefSelector('eFloatingFilterBody')\n ], HeaderFilterCellComp.prototype, \"eFloatingFilterBody\", void 0);\n __decorate$L([\n RefSelector('eButtonWrapper')\n ], HeaderFilterCellComp.prototype, \"eButtonWrapper\", void 0);\n __decorate$L([\n RefSelector('eButtonShowMainFilter')\n ], HeaderFilterCellComp.prototype, \"eButtonShowMainFilter\", void 0);\n __decorate$L([\n PostConstruct\n ], HeaderFilterCellComp.prototype, \"postConstruct\", null);\n return HeaderFilterCellComp;\n}(AbstractHeaderCellComp));\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / React / AngularJS / Web Components\n * @version v26.1.0\n * @link http://www.ag-grid.com/\n * @license MIT\n */\nvar __extends$W = (undefined && undefined.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate$M = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n 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(function (HeaderRowType) {\n HeaderRowType[\"COLUMN_GROUP\"] = \"group\";\n HeaderRowType[\"COLUMN\"] = \"column\";\n HeaderRowType[\"FLOATING_FILTER\"] = \"filter\";\n})(exports.HeaderRowType || (exports.HeaderRowType = {}));\nvar HeaderRowComp = /** @class */ (function (_super) {\n __extends$W(HeaderRowComp, _super);\n function HeaderRowComp(ctrl) {\n var _this = _super.call(this) || this;\n _this.headerComps = {};\n var extraClass = ctrl.getType() == exports.HeaderRowType.COLUMN_GROUP ? \"ag-header-row-column-group\" :\n ctrl.getType() == exports.HeaderRowType.FLOATING_FILTER ? \"ag-header-row-column-filter\" : \"ag-header-row-column\";\n _this.setTemplate(/* html */ \"\");\n _this.ctrl = ctrl;\n return _this;\n }\n //noinspection JSUnusedLocalSymbols\n HeaderRowComp.prototype.init = function () {\n var _this = this;\n var compProxy = {\n setTransform: function (transform) { return _this.getGui().style.transform = transform; },\n setHeight: function (height) { return _this.getGui().style.height = height; },\n setTop: function (top) { return _this.getGui().style.top = top; },\n setHeaderCtrls: function (ctrls) { return _this.setHeaderCtrls(ctrls); },\n setWidth: function (width) { return _this.getGui().style.width = width; },\n setAriaRowIndex: function (rowIndex) { return setAriaRowIndex(_this.getGui(), rowIndex); }\n };\n this.ctrl.setComp(compProxy);\n };\n HeaderRowComp.prototype.destroyHeaderCtrls = function () {\n this.setHeaderCtrls([]);\n };\n HeaderRowComp.prototype.setHeaderCtrls = function (ctrls) {\n var _this = this;\n if (!this.isAlive()) {\n return;\n }\n var oldComps = this.headerComps;\n this.headerComps = {};\n ctrls.forEach(function (ctrl) {\n var id = ctrl.getInstanceId();\n var comp = oldComps[id];\n delete oldComps[id];\n if (comp == null) {\n comp = _this.createHeaderComp(ctrl);\n _this.getGui().appendChild(comp.getGui());\n }\n _this.headerComps[id] = comp;\n });\n iterateObject(oldComps, function (id, comp) {\n _this.getGui().removeChild(comp.getGui());\n _this.destroyBean(comp);\n });\n var ensureDomOrder = this.gridOptionsWrapper.isEnsureDomOrder();\n if (ensureDomOrder) {\n var comps = getAllValuesInObject(this.headerComps);\n // ordering the columns by left position orders them in the order they appear on the screen\n comps.sort(function (a, b) {\n var leftA = a.getCtrl().getColumnGroupChild().getLeft();\n var leftB = b.getCtrl().getColumnGroupChild().getLeft();\n return leftA - leftB;\n });\n var elementsInOrder = comps.map(function (c) { return c.getGui(); });\n setDomChildOrder(this.getGui(), elementsInOrder);\n }\n };\n HeaderRowComp.prototype.createHeaderComp = function (headerCtrl) {\n var result;\n switch (this.ctrl.getType()) {\n case exports.HeaderRowType.COLUMN_GROUP:\n result = new HeaderGroupCellComp(headerCtrl);\n break;\n case exports.HeaderRowType.FLOATING_FILTER:\n result = new HeaderFilterCellComp(headerCtrl);\n break;\n default:\n result = new HeaderCellComp(headerCtrl);\n break;\n }\n this.createBean(result);\n result.setParentComponent(this);\n return result;\n };\n __decorate$M([\n PostConstruct\n ], HeaderRowComp.prototype, \"init\", null);\n __decorate$M([\n PreDestroy\n ], HeaderRowComp.prototype, \"destroyHeaderCtrls\", null);\n return HeaderRowComp;\n}(Component));\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / React / AngularJS / Web Components\n * @version v26.1.0\n * @link http://www.ag-grid.com/\n * @license MIT\n */\nvar __extends$X = (undefined && undefined.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate$N = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n 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(function (HeaderNavigationDirection) {\n HeaderNavigationDirection[HeaderNavigationDirection[\"UP\"] = 0] = \"UP\";\n HeaderNavigationDirection[HeaderNavigationDirection[\"DOWN\"] = 1] = \"DOWN\";\n HeaderNavigationDirection[HeaderNavigationDirection[\"LEFT\"] = 2] = \"LEFT\";\n HeaderNavigationDirection[HeaderNavigationDirection[\"RIGHT\"] = 3] = \"RIGHT\";\n})(exports.HeaderNavigationDirection || (exports.HeaderNavigationDirection = {}));\nvar HeaderNavigationService = /** @class */ (function (_super) {\n __extends$X(HeaderNavigationService, _super);\n function HeaderNavigationService() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n HeaderNavigationService.prototype.postConstruct = function () {\n var _this = this;\n this.ctrlsService.whenReady(function (p) {\n _this.gridBodyCon = p.gridBodyCtrl;\n });\n };\n HeaderNavigationService.prototype.getHeaderRowCount = function () {\n var centerHeaderContainer = this.ctrlsService.getHeaderRowContainerCtrl();\n return centerHeaderContainer ? centerHeaderContainer.getRowCount() : 0;\n };\n HeaderNavigationService.prototype.getHeaderRowType = function (rowIndex) {\n var centerHeaderContainer = this.ctrlsService.getHeaderRowContainerCtrl();\n if (centerHeaderContainer) {\n return centerHeaderContainer.getRowType(rowIndex);\n }\n };\n /*\n * This method navigates grid header vertically\n * @return {boolean} true to preventDefault on the event that caused this navigation.\n */\n HeaderNavigationService.prototype.navigateVertically = function (direction, fromHeader, event) {\n if (!fromHeader) {\n fromHeader = this.focusService.getFocusedHeader();\n }\n if (!fromHeader) {\n return false;\n }\n var headerRowIndex = fromHeader.headerRowIndex, column = fromHeader.column;\n var rowLen = this.getHeaderRowCount();\n var isUp = direction === exports.HeaderNavigationDirection.UP;\n var nextRow = isUp ? headerRowIndex - 1 : headerRowIndex + 1;\n var nextFocusColumn = null;\n var skipColumn = false;\n if (nextRow < 0) {\n nextRow = 0;\n nextFocusColumn = column;\n skipColumn = true;\n }\n if (nextRow >= rowLen) {\n nextRow = -1; // -1 indicates the focus should move to grid rows.\n }\n var currentRowType = this.getHeaderRowType(headerRowIndex);\n if (!skipColumn) {\n if (currentRowType === exports.HeaderRowType.COLUMN_GROUP) {\n var currentColumn = column;\n nextFocusColumn = isUp ? column.getParent() : currentColumn.getDisplayedChildren()[0];\n }\n else if (currentRowType === exports.HeaderRowType.FLOATING_FILTER) {\n nextFocusColumn = column;\n }\n else {\n var currentColumn = column;\n nextFocusColumn = isUp ? currentColumn.getParent() : currentColumn;\n }\n if (!nextFocusColumn) {\n return false;\n }\n }\n return this.focusService.focusHeaderPosition({ headerRowIndex: nextRow, column: nextFocusColumn }, undefined, false, true, event);\n };\n /*\n * This method navigates grid header horizontally\n * @return {boolean} true to preventDefault on the event that caused this navigation.\n */\n HeaderNavigationService.prototype.navigateHorizontally = function (direction, fromTab, event) {\n if (fromTab === void 0) { fromTab = false; }\n var focusedHeader = this.focusService.getFocusedHeader();\n var isLeft = direction === exports.HeaderNavigationDirection.LEFT;\n var isRtl = this.gridOptionsWrapper.isEnableRtl();\n var nextHeader;\n var normalisedDirection;\n // either navigating to the left or isRtl (cannot be both)\n if (isLeft !== isRtl) {\n normalisedDirection = 'Before';\n nextHeader = this.headerPositionUtils.findHeader(focusedHeader, normalisedDirection);\n }\n else {\n normalisedDirection = 'After';\n nextHeader = this.headerPositionUtils.findHeader(focusedHeader, normalisedDirection);\n }\n if (nextHeader) {\n return this.focusService.focusHeaderPosition(nextHeader, normalisedDirection, fromTab, true, event);\n }\n if (!fromTab) {\n return true;\n }\n return this.focusNextHeaderRow(focusedHeader, normalisedDirection, event);\n };\n HeaderNavigationService.prototype.focusNextHeaderRow = function (focusedHeader, direction, event) {\n var currentIndex = focusedHeader.headerRowIndex;\n var nextPosition = null;\n var nextRowIndex;\n if (direction === 'Before') {\n if (currentIndex > 0) {\n nextRowIndex = currentIndex - 1;\n nextPosition = this.headerPositionUtils.findColAtEdgeForHeaderRow(nextRowIndex, 'end');\n }\n }\n else {\n nextRowIndex = currentIndex + 1;\n nextPosition = this.headerPositionUtils.findColAtEdgeForHeaderRow(nextRowIndex, 'start');\n }\n return this.focusService.focusHeaderPosition(nextPosition, direction, true, true, event);\n };\n HeaderNavigationService.prototype.scrollToColumn = function (column, direction) {\n if (direction === void 0) { direction = 'After'; }\n if (column.getPinned()) {\n return;\n }\n var columnToScrollTo;\n if (column instanceof ColumnGroup) {\n var columns = column.getDisplayedLeafColumns();\n columnToScrollTo = direction === 'Before' ? last(columns) : columns[0];\n }\n else {\n columnToScrollTo = column;\n }\n this.gridBodyCon.getScrollFeature().ensureColumnVisible(columnToScrollTo);\n // need to nudge the scrolls for the floating items. otherwise when we set focus on a non-visible\n // floating cell, the scrolls get out of sync\n this.gridBodyCon.getScrollFeature().horizontallyScrollHeaderCenterAndFloatingCenter();\n // need to flush frames, to make sure the correct cells are rendered\n this.animationFrameService.flushAllFrames();\n };\n __decorate$N([\n Autowired('focusService')\n ], HeaderNavigationService.prototype, \"focusService\", void 0);\n __decorate$N([\n Autowired('headerPositionUtils')\n ], HeaderNavigationService.prototype, \"headerPositionUtils\", void 0);\n __decorate$N([\n Autowired('animationFrameService')\n ], HeaderNavigationService.prototype, \"animationFrameService\", void 0);\n __decorate$N([\n Autowired('ctrlsService')\n ], HeaderNavigationService.prototype, \"ctrlsService\", void 0);\n __decorate$N([\n PostConstruct\n ], HeaderNavigationService.prototype, \"postConstruct\", null);\n HeaderNavigationService = __decorate$N([\n Bean('headerNavigationService')\n ], HeaderNavigationService);\n return HeaderNavigationService;\n}(BeanStub));\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / React / AngularJS / Web Components\n * @version v26.1.0\n * @link http://www.ag-grid.com/\n * @license MIT\n */\nvar __extends$Y = (undefined && undefined.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate$O = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n 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 GridHeaderCtrl = /** @class */ (function (_super) {\n __extends$Y(GridHeaderCtrl, _super);\n function GridHeaderCtrl() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n GridHeaderCtrl.prototype.setComp = function (comp, eGui, eFocusableElement) {\n this.comp = comp;\n this.eGui = eGui;\n this.createManagedBean(new ManagedFocusFeature(eFocusableElement, {\n onTabKeyDown: this.onTabKeyDown.bind(this),\n handleKeyDown: this.handleKeyDown.bind(this),\n onFocusOut: this.onFocusOut.bind(this)\n }));\n // for setting ag-pivot-on / ag-pivot-off CSS classes\n this.addManagedListener(this.eventService, Events.EVENT_COLUMN_PIVOT_MODE_CHANGED, this.onPivotModeChanged.bind(this));\n this.onPivotModeChanged();\n this.setupHeaderHeight();\n this.ctrlsService.registerGridHeaderCtrl(this);\n };\n GridHeaderCtrl.prototype.setupHeaderHeight = function () {\n var listener = this.setHeaderHeight.bind(this);\n listener();\n this.addManagedListener(this.gridOptionsWrapper, GridOptionsWrapper.PROP_HEADER_HEIGHT, listener);\n this.addManagedListener(this.gridOptionsWrapper, GridOptionsWrapper.PROP_PIVOT_HEADER_HEIGHT, listener);\n this.addManagedListener(this.gridOptionsWrapper, GridOptionsWrapper.PROP_GROUP_HEADER_HEIGHT, listener);\n this.addManagedListener(this.gridOptionsWrapper, GridOptionsWrapper.PROP_PIVOT_GROUP_HEADER_HEIGHT, listener);\n this.addManagedListener(this.gridOptionsWrapper, GridOptionsWrapper.PROP_FLOATING_FILTERS_HEIGHT, listener);\n this.addManagedListener(this.eventService, Events.EVENT_DISPLAYED_COLUMNS_CHANGED, listener);\n };\n GridHeaderCtrl.prototype.setHeaderHeight = function () {\n var _a = this, columnModel = _a.columnModel, gridOptionsWrapper = _a.gridOptionsWrapper;\n var numberOfFloating = 0;\n var headerRowCount = columnModel.getHeaderRowCount();\n var totalHeaderHeight;\n var groupHeight;\n var headerHeight;\n if (columnModel.isPivotMode()) {\n groupHeight = gridOptionsWrapper.getPivotGroupHeaderHeight();\n headerHeight = gridOptionsWrapper.getPivotHeaderHeight();\n }\n else {\n var hasFloatingFilters = columnModel.hasFloatingFilters();\n if (hasFloatingFilters) {\n headerRowCount++;\n numberOfFloating = 1;\n }\n groupHeight = gridOptionsWrapper.getGroupHeaderHeight();\n headerHeight = gridOptionsWrapper.getHeaderHeight();\n }\n var numberOfNonGroups = 1 + numberOfFloating;\n var numberOfGroups = headerRowCount - numberOfNonGroups;\n totalHeaderHeight = numberOfFloating * gridOptionsWrapper.getFloatingFiltersHeight();\n totalHeaderHeight += numberOfGroups * groupHeight;\n totalHeaderHeight += headerHeight;\n // one extra pixel is needed here to account for the\n // height of the border\n var px = totalHeaderHeight + 1 + \"px\";\n this.comp.setHeightAndMinHeight(px);\n };\n GridHeaderCtrl.prototype.onPivotModeChanged = function () {\n var pivotMode = this.columnModel.isPivotMode();\n this.comp.addOrRemoveCssClass('ag-pivot-on', pivotMode);\n this.comp.addOrRemoveCssClass('ag-pivot-off', !pivotMode);\n };\n GridHeaderCtrl.prototype.onTabKeyDown = function (e) {\n var isRtl = this.gridOptionsWrapper.isEnableRtl();\n var direction = e.shiftKey !== isRtl\n ? exports.HeaderNavigationDirection.LEFT\n : exports.HeaderNavigationDirection.RIGHT;\n if (this.headerNavigationService.navigateHorizontally(direction, true, e) ||\n this.focusService.focusNextGridCoreContainer(e.shiftKey)) {\n e.preventDefault();\n }\n };\n GridHeaderCtrl.prototype.handleKeyDown = function (e) {\n var direction = null;\n switch (e.keyCode) {\n case KeyCode.LEFT:\n direction = exports.HeaderNavigationDirection.LEFT;\n case KeyCode.RIGHT:\n if (!exists(direction)) {\n direction = exports.HeaderNavigationDirection.RIGHT;\n }\n this.headerNavigationService.navigateHorizontally(direction, false, e);\n break;\n case KeyCode.UP:\n direction = exports.HeaderNavigationDirection.UP;\n case KeyCode.DOWN:\n if (!exists(direction)) {\n direction = exports.HeaderNavigationDirection.DOWN;\n }\n if (this.headerNavigationService.navigateVertically(direction, null, e)) {\n e.preventDefault();\n }\n break;\n default:\n return;\n }\n };\n GridHeaderCtrl.prototype.onFocusOut = function (e) {\n var relatedTarget = e.relatedTarget;\n if (!relatedTarget && this.eGui.contains(document.activeElement)) {\n return;\n }\n if (!this.eGui.contains(relatedTarget)) {\n this.focusService.clearFocusedHeader();\n }\n };\n __decorate$O([\n Autowired('headerNavigationService')\n ], GridHeaderCtrl.prototype, \"headerNavigationService\", void 0);\n __decorate$O([\n Autowired('focusService')\n ], GridHeaderCtrl.prototype, \"focusService\", void 0);\n __decorate$O([\n Autowired('columnModel')\n ], GridHeaderCtrl.prototype, \"columnModel\", void 0);\n __decorate$O([\n Autowired('ctrlsService')\n ], GridHeaderCtrl.prototype, \"ctrlsService\", void 0);\n return GridHeaderCtrl;\n}(BeanStub));\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / React / AngularJS / Web Components\n * @version v26.1.0\n * @link http://www.ag-grid.com/\n * @license MIT\n */\nvar __extends$Z = (undefined && undefined.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate$P = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n 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 CenterWidthFeature = /** @class */ (function (_super) {\n __extends$Z(CenterWidthFeature, _super);\n function CenterWidthFeature(callback) {\n var _this = _super.call(this) || this;\n _this.callback = callback;\n return _this;\n }\n CenterWidthFeature.prototype.postConstruct = function () {\n var listener = this.setWidth.bind(this);\n this.addManagedListener(this.gridOptionsWrapper, GridOptionsWrapper.PROP_DOM_LAYOUT, listener);\n this.addManagedListener(this.eventService, Events.EVENT_DISPLAYED_COLUMNS_CHANGED, listener);\n this.addManagedListener(this.eventService, Events.EVENT_DISPLAYED_COLUMNS_WIDTH_CHANGED, listener);\n this.setWidth();\n };\n CenterWidthFeature.prototype.setWidth = function () {\n var columnModel = this.columnModel;\n var printLayout = this.gridOptionsWrapper.getDomLayout() === Constants.DOM_LAYOUT_PRINT;\n var centerWidth = columnModel.getBodyContainerWidth();\n var leftWidth = columnModel.getDisplayedColumnsLeftWidth();\n var rightWidth = columnModel.getDisplayedColumnsRightWidth();\n var totalWidth = printLayout ? centerWidth + leftWidth + rightWidth : centerWidth;\n this.callback(totalWidth);\n };\n __decorate$P([\n Autowired('columnModel')\n ], CenterWidthFeature.prototype, \"columnModel\", void 0);\n __decorate$P([\n PostConstruct\n ], CenterWidthFeature.prototype, \"postConstruct\", null);\n return CenterWidthFeature;\n}(BeanStub));\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / React / AngularJS / Web Components\n * @version v26.1.0\n * @link http://www.ag-grid.com/\n * @license MIT\n */\nvar __decorate$Q = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n 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 MoveColumnFeature = /** @class */ (function () {\n function MoveColumnFeature(pinned, eContainer) {\n this.needToMoveLeft = false;\n this.needToMoveRight = false;\n this.pinned = pinned;\n this.eContainer = eContainer;\n this.centerContainer = !exists(pinned);\n }\n MoveColumnFeature.prototype.init = function () {\n var _this = this;\n this.ctrlsService.whenReady(function () {\n _this.gridBodyCon = _this.ctrlsService.getGridBodyCtrl();\n });\n };\n MoveColumnFeature.prototype.getIconName = function () {\n return this.pinned ? DragAndDropService.ICON_PINNED : DragAndDropService.ICON_MOVE;\n };\n MoveColumnFeature.prototype.onDragEnter = function (draggingEvent) {\n // we do dummy drag, so make sure column appears in the right location when first placed\n var columns = draggingEvent.dragItem.columns;\n var dragCameFromToolPanel = draggingEvent.dragSource.type === exports.DragSourceType.ToolPanel;\n if (dragCameFromToolPanel) {\n // the if statement doesn't work if drag leaves grid, then enters again\n this.setColumnsVisible(columns, true, \"uiColumnDragged\");\n }\n else {\n // restore previous state of visible columns upon re-entering. this means if the user drags\n // a group out, and then drags the group back in, only columns that were originally visible\n // will be visible again. otherwise a group with three columns (but only two visible) could\n // be dragged out, then when it's dragged in again, all three are visible. this stops that.\n var visibleState_1 = draggingEvent.dragItem.visibleState;\n var visibleColumns = (columns || []).filter(function (column) { return visibleState_1[column.getId()]; });\n this.setColumnsVisible(visibleColumns, true, \"uiColumnDragged\");\n }\n this.setColumnsPinned(columns, this.pinned, \"uiColumnDragged\");\n this.onDragging(draggingEvent, true);\n };\n MoveColumnFeature.prototype.onDragLeave = function (draggingEvent) {\n var hideColumnOnExit = !this.gridOptionsWrapper.isSuppressDragLeaveHidesColumns() && !draggingEvent.fromNudge;\n if (hideColumnOnExit) {\n var dragItem = draggingEvent.dragSource.getDragItem();\n var columns = dragItem.columns;\n this.setColumnsVisible(columns, false, \"uiColumnDragged\");\n }\n this.ensureIntervalCleared();\n };\n MoveColumnFeature.prototype.setColumnsVisible = function (columns, visible, source) {\n if (source === void 0) { source = \"api\"; }\n if (columns) {\n var allowedCols = columns.filter(function (c) { return !c.getColDef().lockVisible; });\n this.columnModel.setColumnsVisible(allowedCols, visible, source);\n }\n };\n MoveColumnFeature.prototype.setColumnsPinned = function (columns, pinned, source) {\n if (source === void 0) { source = \"api\"; }\n if (columns) {\n var allowedCols = columns.filter(function (c) { return !c.getColDef().lockPinned; });\n this.columnModel.setColumnsPinned(allowedCols, pinned, source);\n }\n };\n MoveColumnFeature.prototype.onDragStop = function () {\n this.ensureIntervalCleared();\n };\n MoveColumnFeature.prototype.normaliseX = function (x) {\n // flip the coordinate if doing RTL\n if (this.gridOptionsWrapper.isEnableRtl()) {\n var clientWidth = this.eContainer.clientWidth;\n x = clientWidth - x;\n }\n // adjust for scroll only if centre container (the pinned containers don't scroll)\n if (this.centerContainer) {\n x += this.ctrlsService.getCenterRowContainerCtrl().getCenterViewportScrollLeft();\n }\n return x;\n };\n MoveColumnFeature.prototype.checkCenterForScrolling = function (xAdjustedForScroll) {\n if (this.centerContainer) {\n // scroll if the mouse has gone outside the grid (or just outside the scrollable part if pinning)\n // putting in 50 buffer, so even if user gets to edge of grid, a scroll will happen\n var firstVisiblePixel = this.ctrlsService.getCenterRowContainerCtrl().getCenterViewportScrollLeft();\n var lastVisiblePixel = firstVisiblePixel + this.ctrlsService.getCenterRowContainerCtrl().getCenterWidth();\n if (this.gridOptionsWrapper.isEnableRtl()) {\n this.needToMoveRight = xAdjustedForScroll < (firstVisiblePixel + 50);\n this.needToMoveLeft = xAdjustedForScroll > (lastVisiblePixel - 50);\n }\n else {\n this.needToMoveLeft = xAdjustedForScroll < (firstVisiblePixel + 50);\n this.needToMoveRight = xAdjustedForScroll > (lastVisiblePixel - 50);\n }\n if (this.needToMoveLeft || this.needToMoveRight) {\n this.ensureIntervalStarted();\n }\n else {\n this.ensureIntervalCleared();\n }\n }\n };\n MoveColumnFeature.prototype.onDragging = function (draggingEvent, fromEnter) {\n var _this = this;\n if (fromEnter === void 0) { fromEnter = false; }\n this.lastDraggingEvent = draggingEvent;\n // if moving up or down (ie not left or right) then do nothing\n if (missing(draggingEvent.hDirection)) {\n return;\n }\n var mouseXNormalised = this.normaliseX(draggingEvent.x);\n // if the user is dragging into the panel, ie coming from the side panel into the main grid,\n // we don't want to scroll the grid this time, it would appear like the table is jumping\n // each time a column is dragged in.\n if (!fromEnter) {\n this.checkCenterForScrolling(mouseXNormalised);\n }\n var hDirectionNormalised = this.normaliseDirection(draggingEvent.hDirection);\n var dragSourceType = draggingEvent.dragSource.type;\n var columnsToMove = draggingEvent.dragSource.getDragItem().columns;\n columnsToMove = columnsToMove.filter(function (col) {\n if (col.getColDef().lockPinned) {\n // if locked return true only if both col and container are same pin type.\n // double equals (==) here on purpose so that null==undefined is true (for not pinned options)\n return col.getPinned() == _this.pinned;\n }\n // if not pin locked, then always allowed to be in this container\n return true;\n });\n this.attemptMoveColumns(dragSourceType, columnsToMove, hDirectionNormalised, mouseXNormalised, fromEnter);\n };\n MoveColumnFeature.prototype.normaliseDirection = function (hDirection) {\n if (this.gridOptionsWrapper.isEnableRtl()) {\n switch (hDirection) {\n case exports.HorizontalDirection.Left: return exports.HorizontalDirection.Right;\n case exports.HorizontalDirection.Right: return exports.HorizontalDirection.Left;\n default: console.error(\"AG Grid: Unknown direction \" + hDirection);\n }\n }\n else {\n return hDirection;\n }\n };\n // returns the index of the first column in the list ONLY if the cols are all beside\n // each other. if the cols are not beside each other, then returns null\n MoveColumnFeature.prototype.calculateOldIndex = function (movingCols) {\n var gridCols = this.columnModel.getAllGridColumns();\n var indexes = sortNumerically(movingCols.map(function (col) { return gridCols.indexOf(col); }));\n var firstIndex = indexes[0];\n var lastIndex = last(indexes);\n var spread = lastIndex - firstIndex;\n var gapsExist = spread !== indexes.length - 1;\n return gapsExist ? null : firstIndex;\n };\n MoveColumnFeature.prototype.attemptMoveColumns = function (dragSourceType, allMovingColumns, hDirection, mouseX, fromEnter) {\n var draggingLeft = hDirection === exports.HorizontalDirection.Left;\n var draggingRight = hDirection === exports.HorizontalDirection.Right;\n // it is important to sort the moving columns as they are in grid columns, as the list of moving columns\n // could themselves be part of 'married children' groups, which means we need to maintain the order within\n // the moving list.\n var allMovingColumnsOrdered = allMovingColumns.slice();\n this.columnModel.sortColumnsLikeGridColumns(allMovingColumnsOrdered);\n var validMoves = this.calculateValidMoves(allMovingColumnsOrdered, draggingRight, mouseX);\n // if cols are not adjacent, then this returns null. when moving, we constrain the direction of the move\n // (ie left or right) to the mouse direction. however\n var oldIndex = this.calculateOldIndex(allMovingColumnsOrdered);\n if (validMoves.length === 0) {\n return;\n }\n var firstValidMove = validMoves[0];\n // the two check below stop an error when the user grabs a group my a middle column, then\n // it is possible the mouse pointer is to the right of a column while been dragged left.\n // so we need to make sure that the mouse pointer is actually left of the left most column\n // if moving left, and right of the right most column if moving right\n // we check 'fromEnter' below so we move the column to the new spot if the mouse is coming from\n // outside the grid, eg if the column is moving from side panel, mouse is moving left, then we should\n // place the column to the RHS even if the mouse is moving left and the column is already on\n // the LHS. otherwise we stick to the rule described above.\n var constrainDirection = oldIndex !== null && !fromEnter;\n // don't consider 'fromEnter' when dragging header cells, otherwise group can jump to opposite direction of drag\n if (dragSourceType == exports.DragSourceType.HeaderCell) {\n constrainDirection = oldIndex !== null;\n }\n if (constrainDirection) {\n // only allow left drag if this column is moving left\n if (draggingLeft && firstValidMove >= oldIndex) {\n return;\n }\n // only allow right drag if this column is moving right\n if (draggingRight && firstValidMove <= oldIndex) {\n return;\n }\n }\n for (var i = 0; i < validMoves.length; i++) {\n var move = validMoves[i];\n if (!this.columnModel.doesMovePassRules(allMovingColumnsOrdered, move)) {\n continue;\n }\n this.columnModel.moveColumns(allMovingColumnsOrdered, move, \"uiColumnDragged\");\n // important to return here, so once we do the first valid move, we don't try do any more\n return;\n }\n };\n MoveColumnFeature.prototype.calculateValidMoves = function (movingCols, draggingRight, mouseX) {\n var isMoveBlocked = this.gridOptionsWrapper.isSuppressMovableColumns() || movingCols.some(function (col) { return col.getColDef().suppressMovable; });\n if (isMoveBlocked) {\n return [];\n }\n // this is the list of cols on the screen, so it's these we use when comparing the x mouse position\n var allDisplayedCols = this.columnModel.getDisplayedColumns(this.pinned);\n // but this list is the list of all cols, when we move a col it's the index within this list that gets used,\n // so the result we return has to be and index location for this list\n var allGridCols = this.columnModel.getAllGridColumns();\n var movingDisplayedCols = allDisplayedCols.filter(function (col) { return includes(movingCols, col); });\n var otherDisplayedCols = allDisplayedCols.filter(function (col) { return !includes(movingCols, col); });\n var otherGridCols = allGridCols.filter(function (col) { return !includes(movingCols, col); });\n // work out how many DISPLAYED columns fit before the 'x' position. this gives us the displayIndex.\n // for example, if cols are a,b,c,d and we find a,b fit before 'x', then we want to place the moving\n // col between b and c (so that it is under the mouse position).\n var displayIndex = 0;\n var availableWidth = mouseX;\n // if we are dragging right, then the columns will be to the left of the mouse, so we also want to\n // include the width of the moving columns\n if (draggingRight) {\n var widthOfMovingDisplayedCols_1 = 0;\n movingDisplayedCols.forEach(function (col) { return widthOfMovingDisplayedCols_1 += col.getActualWidth(); });\n availableWidth -= widthOfMovingDisplayedCols_1;\n }\n if (availableWidth > 0) {\n // now count how many of the displayed columns will fit to the left\n for (var i = 0; i < otherDisplayedCols.length; i++) {\n var col = otherDisplayedCols[i];\n availableWidth -= col.getActualWidth();\n if (availableWidth < 0) {\n break;\n }\n displayIndex++;\n }\n // trial and error, if going right, we adjust by one, i didn't manage to quantify why, but it works\n if (draggingRight) {\n displayIndex++;\n }\n }\n // the display index is with respect to all the showing columns, however when we move, it's with\n // respect to all grid columns, so we need to translate from display index to grid index\n var firstValidMove;\n if (displayIndex > 0) {\n var leftColumn = otherDisplayedCols[displayIndex - 1];\n firstValidMove = otherGridCols.indexOf(leftColumn) + 1;\n }\n else {\n firstValidMove = otherGridCols.indexOf(otherDisplayedCols[0]);\n if (firstValidMove === -1) {\n firstValidMove = 0;\n }\n }\n var validMoves = [firstValidMove];\n var numberComparator = function (a, b) { return a - b; };\n // add in other valid moves due to hidden columns and married children. for example, a particular\n // move might break a group that has married children (so move isn't valid), however there could\n // be hidden columns (not displayed) that we could jump over to make the move valid. because\n // they are hidden, user doesn't see any different, however it allows moves that would otherwise\n // not work. for example imagine a group with 9 columns and all columns are hidden except the\n // middle one (so 4 hidden to left, 4 hidden to right), then when moving 'firstValidMove' will\n // be relative to the not-shown column, however we need to consider the move jumping over all the\n // hidden children. if we didn't do this, then if the group just described was at the end (RHS) of the\n // grid, there would be no way to put a column after it (as the grid would only consider beside the\n // visible column, which would fail valid move rules).\n if (draggingRight) {\n // if dragging right, then we add all the additional moves to the right. so in other words\n // if the next move is not valid, find the next move to the right that is valid.\n var pointer = firstValidMove + 1;\n var lastIndex = allGridCols.length - 1;\n while (pointer <= lastIndex) {\n validMoves.push(pointer);\n pointer++;\n }\n // adding columns here means the order is now messed up\n validMoves.sort(numberComparator);\n }\n else {\n // if dragging left we do the reverse of dragging right, we add in all the valid moves to the\n // left. however we also have to consider moves to the right for all hidden columns first.\n // (this logic is hard to reason with, it was worked out with trial and error,\n // more observation rather than science).\n // add moves to the right\n var pointer = firstValidMove;\n var lastIndex = allGridCols.length - 1;\n var displacedCol = allGridCols[pointer];\n while (pointer <= lastIndex && this.isColumnHidden(allDisplayedCols, displacedCol)) {\n pointer++;\n validMoves.push(pointer);\n displacedCol = allGridCols[pointer];\n }\n // add moves to the left\n pointer = firstValidMove - 1;\n var firstDisplayIndex = 0;\n while (pointer >= firstDisplayIndex) {\n validMoves.push(pointer);\n pointer--;\n }\n // adding columns here means the order is now messed up\n validMoves.sort(numberComparator).reverse();\n }\n return validMoves;\n };\n // isHidden takes into account visible=false and group=closed, ie it is not displayed\n MoveColumnFeature.prototype.isColumnHidden = function (displayedColumns, col) {\n return displayedColumns.indexOf(col) < 0;\n };\n MoveColumnFeature.prototype.ensureIntervalStarted = function () {\n if (!this.movingIntervalId) {\n this.intervalCount = 0;\n this.failedMoveAttempts = 0;\n this.movingIntervalId = window.setInterval(this.moveInterval.bind(this), 100);\n if (this.needToMoveLeft) {\n this.dragAndDropService.setGhostIcon(DragAndDropService.ICON_LEFT, true);\n }\n else {\n this.dragAndDropService.setGhostIcon(DragAndDropService.ICON_RIGHT, true);\n }\n }\n };\n MoveColumnFeature.prototype.ensureIntervalCleared = function () {\n if (this.movingIntervalId) {\n window.clearInterval(this.movingIntervalId);\n this.movingIntervalId = null;\n this.dragAndDropService.setGhostIcon(DragAndDropService.ICON_MOVE);\n }\n };\n MoveColumnFeature.prototype.moveInterval = function () {\n // the amounts we move get bigger at each interval, so the speed accelerates, starting a bit slow\n // and getting faster. this is to give smoother user experience. we max at 100px to limit the speed.\n var pixelsToMove;\n this.intervalCount++;\n pixelsToMove = 10 + (this.intervalCount * 5);\n if (pixelsToMove > 100) {\n pixelsToMove = 100;\n }\n var pixelsMoved = null;\n var scrollFeature = this.gridBodyCon.getScrollFeature();\n if (this.needToMoveLeft) {\n pixelsMoved = scrollFeature.scrollHorizontally(-pixelsToMove);\n }\n else if (this.needToMoveRight) {\n pixelsMoved = scrollFeature.scrollHorizontally(pixelsToMove);\n }\n if (pixelsMoved !== 0) {\n this.onDragging(this.lastDraggingEvent);\n this.failedMoveAttempts = 0;\n }\n else {\n // we count the failed move attempts. if we fail to move 7 times, then we pin the column.\n // this is how we achieve pining by dragging the column to the edge of the grid.\n this.failedMoveAttempts++;\n var columns = this.lastDraggingEvent.dragItem.columns;\n var columnsThatCanPin = columns.filter(function (c) { return !c.getColDef().lockPinned; });\n if (columnsThatCanPin.length > 0) {\n this.dragAndDropService.setGhostIcon(DragAndDropService.ICON_PINNED);\n if (this.failedMoveAttempts > 7) {\n var pinType = this.needToMoveLeft ? Constants.PINNED_LEFT : Constants.PINNED_RIGHT;\n this.setColumnsPinned(columnsThatCanPin, pinType, \"uiColumnDragged\");\n this.dragAndDropService.nudge();\n }\n }\n }\n };\n __decorate$Q([\n Autowired('columnModel')\n ], MoveColumnFeature.prototype, \"columnModel\", void 0);\n __decorate$Q([\n Autowired('dragAndDropService')\n ], MoveColumnFeature.prototype, \"dragAndDropService\", void 0);\n __decorate$Q([\n Autowired('gridOptionsWrapper')\n ], MoveColumnFeature.prototype, \"gridOptionsWrapper\", void 0);\n __decorate$Q([\n Autowired('ctrlsService')\n ], MoveColumnFeature.prototype, \"ctrlsService\", void 0);\n __decorate$Q([\n PostConstruct\n ], MoveColumnFeature.prototype, \"init\", null);\n return MoveColumnFeature;\n}());\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / React / AngularJS / Web Components\n * @version v26.1.0\n * @link http://www.ag-grid.com/\n * @license MIT\n */\nvar __decorate$R = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n 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 BodyDropPivotTarget = /** @class */ (function () {\n function BodyDropPivotTarget(pinned) {\n this.columnsToAggregate = [];\n this.columnsToGroup = [];\n this.columnsToPivot = [];\n this.pinned = pinned;\n }\n /** Callback for when drag enters */\n BodyDropPivotTarget.prototype.onDragEnter = function (draggingEvent) {\n var _this = this;\n this.clearColumnsList();\n // in pivot mode, we don't accept any drops if functions are read only\n if (this.gridOptionsWrapper.isFunctionsReadOnly()) {\n return;\n }\n var dragColumns = draggingEvent.dragItem.columns;\n if (!dragColumns) {\n return;\n }\n dragColumns.forEach(function (column) {\n // we don't allow adding secondary columns\n if (!column.isPrimary()) {\n return;\n }\n if (column.isAnyFunctionActive()) {\n return;\n }\n if (column.isAllowValue()) {\n _this.columnsToAggregate.push(column);\n }\n else if (column.isAllowRowGroup()) {\n _this.columnsToGroup.push(column);\n }\n else if (column.isAllowPivot()) {\n _this.columnsToPivot.push(column);\n }\n });\n };\n BodyDropPivotTarget.prototype.getIconName = function () {\n var totalColumns = this.columnsToAggregate.length + this.columnsToGroup.length + this.columnsToPivot.length;\n if (totalColumns > 0) {\n return this.pinned ? DragAndDropService.ICON_PINNED : DragAndDropService.ICON_MOVE;\n }\n return null;\n };\n /** Callback for when drag leaves */\n BodyDropPivotTarget.prototype.onDragLeave = function (draggingEvent) {\n // if we are taking columns out of the center, then we remove them from the report\n this.clearColumnsList();\n };\n BodyDropPivotTarget.prototype.clearColumnsList = function () {\n this.columnsToAggregate.length = 0;\n this.columnsToGroup.length = 0;\n this.columnsToPivot.length = 0;\n };\n /** Callback for when dragging */\n BodyDropPivotTarget.prototype.onDragging = function (draggingEvent) {\n };\n /** Callback for when drag stops */\n BodyDropPivotTarget.prototype.onDragStop = function (draggingEvent) {\n if (this.columnsToAggregate.length > 0) {\n this.columnModel.addValueColumns(this.columnsToAggregate, \"toolPanelDragAndDrop\");\n }\n if (this.columnsToGroup.length > 0) {\n this.columnModel.addRowGroupColumns(this.columnsToGroup, \"toolPanelDragAndDrop\");\n }\n if (this.columnsToPivot.length > 0) {\n this.columnModel.addPivotColumns(this.columnsToPivot, \"toolPanelDragAndDrop\");\n }\n };\n __decorate$R([\n Autowired('columnModel')\n ], BodyDropPivotTarget.prototype, \"columnModel\", void 0);\n __decorate$R([\n Autowired('gridOptionsWrapper')\n ], BodyDropPivotTarget.prototype, \"gridOptionsWrapper\", void 0);\n return BodyDropPivotTarget;\n}());\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / React / AngularJS / Web Components\n * @version v26.1.0\n * @link http://www.ag-grid.com/\n * @license MIT\n */\nvar __extends$_ = (undefined && undefined.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate$S = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n 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 BodyDropTarget = /** @class */ (function (_super) {\n __extends$_(BodyDropTarget, _super);\n function BodyDropTarget(pinned, eContainer) {\n var _this = _super.call(this) || this;\n _this.pinned = pinned;\n _this.eContainer = eContainer;\n return _this;\n }\n BodyDropTarget.prototype.postConstruct = function () {\n var _this = this;\n this.ctrlsService.whenReady(function (p) {\n switch (_this.pinned) {\n case Constants.PINNED_LEFT:\n _this.eSecondaryContainers = [\n [p.gridBodyCtrl.getBodyViewportElement(), p.leftRowContainerCtrl.getContainerElement()],\n [p.bottomLeftRowContainerCtrl.getContainerElement()],\n [p.topLeftRowContainerCtrl.getContainerElement()]\n ];\n break;\n case Constants.PINNED_RIGHT:\n _this.eSecondaryContainers = [\n [p.gridBodyCtrl.getBodyViewportElement(), p.rightRowContainerCtrl.getContainerElement()],\n [p.bottomRightRowContainerCtrl.getContainerElement()],\n [p.topRightRowContainerCtrl.getContainerElement()]\n ];\n break;\n default:\n _this.eSecondaryContainers = [\n [p.gridBodyCtrl.getBodyViewportElement(), p.centerRowContainerCtrl.getViewportElement()],\n [p.bottomCenterRowContainerCtrl.getViewportElement()],\n [p.topCenterRowContainerCtrl.getViewportElement()]\n ];\n break;\n }\n });\n };\n BodyDropTarget.prototype.isInterestedIn = function (type) {\n return type === exports.DragSourceType.HeaderCell ||\n (type === exports.DragSourceType.ToolPanel && this.gridOptionsWrapper.isAllowDragFromColumnsToolPanel());\n };\n BodyDropTarget.prototype.getSecondaryContainers = function () {\n return this.eSecondaryContainers;\n };\n BodyDropTarget.prototype.getContainer = function () {\n return this.eContainer;\n };\n BodyDropTarget.prototype.init = function () {\n this.moveColumnFeature = this.createManagedBean(new MoveColumnFeature(this.pinned, this.eContainer));\n this.bodyDropPivotTarget = this.createManagedBean(new BodyDropPivotTarget(this.pinned));\n this.dragAndDropService.addDropTarget(this);\n };\n BodyDropTarget.prototype.getIconName = function () {\n return this.currentDropListener.getIconName();\n };\n // we want to use the bodyPivotTarget if the user is dragging columns in from the toolPanel\n // and we are in pivot mode, as it has to logic to set pivot/value/group on the columns when\n // dropped into the grid's body.\n BodyDropTarget.prototype.isDropColumnInPivotMode = function (draggingEvent) {\n // in pivot mode, then if moving a column (ie didn't come from toolpanel) then it's\n // a standard column move, however if it came from the toolpanel, then we are introducing\n // dimensions or values to the grid\n return this.columnModel.isPivotMode() && draggingEvent.dragSource.type === exports.DragSourceType.ToolPanel;\n };\n BodyDropTarget.prototype.onDragEnter = function (draggingEvent) {\n // we pick the drop listener depending on whether we are in pivot mode are not. if we are\n // in pivot mode, then dropping cols changes the row group, pivot, value stats. otherwise\n // we change visibility state and position.\n this.currentDropListener = this.isDropColumnInPivotMode(draggingEvent) ? this.bodyDropPivotTarget : this.moveColumnFeature;\n this.currentDropListener.onDragEnter(draggingEvent);\n };\n BodyDropTarget.prototype.onDragLeave = function (params) {\n this.currentDropListener.onDragLeave(params);\n };\n BodyDropTarget.prototype.onDragging = function (params) {\n this.currentDropListener.onDragging(params);\n };\n BodyDropTarget.prototype.onDragStop = function (params) {\n this.currentDropListener.onDragStop(params);\n };\n __decorate$S([\n Autowired('dragAndDropService')\n ], BodyDropTarget.prototype, \"dragAndDropService\", void 0);\n __decorate$S([\n Autowired('columnModel')\n ], BodyDropTarget.prototype, \"columnModel\", void 0);\n __decorate$S([\n Autowired('ctrlsService')\n ], BodyDropTarget.prototype, \"ctrlsService\", void 0);\n __decorate$S([\n PostConstruct\n ], BodyDropTarget.prototype, \"postConstruct\", null);\n __decorate$S([\n PostConstruct\n ], BodyDropTarget.prototype, \"init\", null);\n return BodyDropTarget;\n}(BeanStub));\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / React / AngularJS / Web Components\n * @version v26.1.0\n * @link http://www.ag-grid.com/\n * @license MIT\n */\nvar __extends$$ = (undefined && undefined.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate$T = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n 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$3 = 0;\nvar AbstractHeaderCellCtrl = /** @class */ (function (_super) {\n __extends$$(AbstractHeaderCellCtrl, _super);\n function AbstractHeaderCellCtrl(columnGroupChild, parentRowCtrl) {\n var _this = _super.call(this) || this;\n _this.columnGroupChild = columnGroupChild;\n _this.parentRowCtrl = parentRowCtrl;\n // unique id to this instance, including the column ID to help with debugging in React as it's used in 'key'\n _this.instanceId = columnGroupChild.getUniqueId() + '-' + instanceIdSequence$3++;\n return _this;\n }\n AbstractHeaderCellCtrl.prototype.shouldStopEventPropagation = function (e) {\n var _a = this.focusService.getFocusedHeader(), headerRowIndex = _a.headerRowIndex, column = _a.column;\n return isUserSuppressingHeaderKeyboardEvent(this.gridOptionsWrapper, e, headerRowIndex, column);\n };\n AbstractHeaderCellCtrl.prototype.setGui = function (eGui) {\n this.eGui = eGui;\n this.addDomData();\n };\n AbstractHeaderCellCtrl.prototype.addDomData = function () {\n var _this = this;\n var key = AbstractHeaderCellCtrl.DOM_DATA_KEY_HEADER_CTRL;\n this.gridOptionsWrapper.setDomData(this.eGui, key, this);\n this.addDestroyFunc(function () { return _this.gridOptionsWrapper.setDomData(_this.eGui, key, null); });\n };\n AbstractHeaderCellCtrl.prototype.focus = function () {\n if (!this.eGui) {\n return false;\n }\n this.eGui.focus();\n return true;\n };\n AbstractHeaderCellCtrl.prototype.getRowIndex = function () {\n return this.parentRowCtrl.getRowIndex();\n };\n AbstractHeaderCellCtrl.prototype.getParentRowCtrl = function () {\n return this.parentRowCtrl;\n };\n AbstractHeaderCellCtrl.prototype.getPinned = function () {\n return this.parentRowCtrl.getPinned();\n };\n AbstractHeaderCellCtrl.prototype.getInstanceId = function () {\n return this.instanceId;\n };\n AbstractHeaderCellCtrl.prototype.getColumnGroupChild = function () {\n return this.columnGroupChild;\n };\n AbstractHeaderCellCtrl.DOM_DATA_KEY_HEADER_CTRL = 'headerCtrl';\n __decorate$T([\n Autowired('focusService')\n ], AbstractHeaderCellCtrl.prototype, \"focusService\", void 0);\n return AbstractHeaderCellCtrl;\n}(BeanStub));\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / React / AngularJS / Web Components\n * @version v26.1.0\n * @link http://www.ag-grid.com/\n * @license MIT\n */\nvar __extends$10 = (undefined && undefined.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar HeaderFilterCellCtrl = /** @class */ (function (_super) {\n __extends$10(HeaderFilterCellCtrl, _super);\n function HeaderFilterCellCtrl(column, parentRowCtrl) {\n return _super.call(this, column, parentRowCtrl) || this;\n }\n HeaderFilterCellCtrl.prototype.setComp = function (comp, eGui) {\n _super.prototype.setGui.call(this, eGui);\n };\n return HeaderFilterCellCtrl;\n}(AbstractHeaderCellCtrl));\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / React / AngularJS / Web Components\n * @version v26.1.0\n * @link http://www.ag-grid.com/\n * @license MIT\n */\nvar CssClassApplier = /** @class */ (function () {\n function CssClassApplier() {\n }\n CssClassApplier.getHeaderClassesFromColDef = function (abstractColDef, gridOptionsWrapper, column, columnGroup) {\n if (missing(abstractColDef)) {\n return [];\n }\n return this.getColumnClassesFromCollDef(abstractColDef.headerClass, abstractColDef, gridOptionsWrapper, column, columnGroup);\n };\n CssClassApplier.getToolPanelClassesFromColDef = function (abstractColDef, gridOptionsWrapper, column, columnGroup) {\n if (missing(abstractColDef)) {\n return [];\n }\n return this.getColumnClassesFromCollDef(abstractColDef.toolPanelClass, abstractColDef, gridOptionsWrapper, column, columnGroup);\n };\n CssClassApplier.getColumnClassesFromCollDef = function (classesOrFunc, abstractColDef, gridOptionsWrapper, column, columnGroup) {\n if (missing(classesOrFunc)) {\n return [];\n }\n var classToUse;\n if (typeof classesOrFunc === 'function') {\n var params = {\n // bad naming, as colDef here can be a group or a column,\n // however most people won't appreciate the difference,\n // so keeping it as colDef to avoid confusion.\n colDef: abstractColDef,\n column: column,\n columnGroup: columnGroup,\n context: gridOptionsWrapper.getContext(),\n api: gridOptionsWrapper.getApi()\n };\n classToUse = classesOrFunc(params);\n }\n else {\n classToUse = classesOrFunc;\n }\n if (typeof classToUse === 'string') {\n return [classToUse];\n }\n else if (Array.isArray(classToUse)) {\n return classToUse;\n }\n else {\n return [];\n }\n };\n return CssClassApplier;\n}());\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / React / AngularJS / Web Components\n * @version v26.1.0\n * @link http://www.ag-grid.com/\n * @license MIT\n */\nvar __extends$11 = (undefined && undefined.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate$U = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n 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 ResizeFeature = /** @class */ (function (_super) {\n __extends$11(ResizeFeature, _super);\n function ResizeFeature(pinned, column, eResize, comp, ctrl) {\n var _this = _super.call(this) || this;\n _this.pinned = pinned;\n _this.column = column;\n _this.eResize = eResize;\n _this.comp = comp;\n _this.ctrl = ctrl;\n return _this;\n }\n ResizeFeature.prototype.postConstruct = function () {\n var _this = this;\n var colDef = this.column.getColDef();\n var destroyResizeFuncs = [];\n var canResize;\n var canAutosize;\n var addResize = function () {\n setDisplayed(_this.eResize, canResize);\n if (!canResize) {\n return;\n }\n var finishedWithResizeFunc = _this.horizontalResizeService.addResizeBar({\n eResizeBar: _this.eResize,\n onResizeStart: _this.onResizeStart.bind(_this),\n onResizing: _this.onResizing.bind(_this, false),\n onResizeEnd: _this.onResizing.bind(_this, true)\n });\n destroyResizeFuncs.push(finishedWithResizeFunc);\n if (canAutosize) {\n var skipHeaderOnAutoSize_1 = _this.gridOptionsWrapper.isSkipHeaderOnAutoSize();\n var autoSizeColListener_1 = function () {\n _this.columnModel.autoSizeColumn(_this.column, skipHeaderOnAutoSize_1, \"uiColumnResized\");\n };\n _this.eResize.addEventListener('dblclick', autoSizeColListener_1);\n var touchListener_1 = new TouchListener(_this.eResize);\n touchListener_1.addEventListener(TouchListener.EVENT_DOUBLE_TAP, autoSizeColListener_1);\n _this.addDestroyFunc(function () {\n _this.eResize.removeEventListener('dblclick', autoSizeColListener_1);\n touchListener_1.removeEventListener(TouchListener.EVENT_DOUBLE_TAP, autoSizeColListener_1);\n touchListener_1.destroy();\n });\n }\n };\n var removeResize = function () {\n destroyResizeFuncs.forEach(function (f) { return f(); });\n destroyResizeFuncs.length = 0;\n };\n var refresh = function () {\n var resize = _this.column.isResizable();\n var autoSize = !_this.gridOptionsWrapper.isSuppressAutoSize() && !colDef.suppressAutoSize;\n var propertyChange = resize !== canResize || autoSize !== canAutosize;\n if (propertyChange) {\n canResize = resize;\n canAutosize = autoSize;\n removeResize();\n addResize();\n }\n };\n refresh();\n this.addDestroyFunc(removeResize);\n this.ctrl.addRefreshFunction(refresh);\n };\n ResizeFeature.prototype.onResizing = function (finished, resizeAmount) {\n var resizeAmountNormalised = this.normaliseResizeAmount(resizeAmount);\n var columnWidths = [{ key: this.column, newWidth: this.resizeStartWidth + resizeAmountNormalised }];\n this.columnModel.setColumnWidths(columnWidths, this.resizeWithShiftKey, finished, \"uiColumnDragged\");\n if (finished) {\n this.comp.addOrRemoveCssClass('ag-column-resizing', false);\n }\n };\n ResizeFeature.prototype.onResizeStart = function (shiftKey) {\n this.resizeStartWidth = this.column.getActualWidth();\n this.resizeWithShiftKey = shiftKey;\n this.comp.addOrRemoveCssClass('ag-column-resizing', true);\n };\n // optionally inverts the drag, depending on pinned and RTL\n // note - this method is duplicated in RenderedHeaderGroupCell - should refactor out?\n ResizeFeature.prototype.normaliseResizeAmount = function (dragChange) {\n var result = dragChange;\n var notPinningLeft = this.pinned !== Constants.PINNED_LEFT;\n var pinningRight = this.pinned === Constants.PINNED_RIGHT;\n if (this.gridOptionsWrapper.isEnableRtl()) {\n // for RTL, dragging left makes the col bigger, except when pinning left\n if (notPinningLeft) {\n result *= -1;\n }\n }\n else {\n // for LTR (ie normal), dragging left makes the col smaller, except when pinning right\n if (pinningRight) {\n result *= -1;\n }\n }\n return result;\n };\n __decorate$U([\n Autowired('horizontalResizeService')\n ], ResizeFeature.prototype, \"horizontalResizeService\", void 0);\n __decorate$U([\n Autowired('columnModel')\n ], ResizeFeature.prototype, \"columnModel\", void 0);\n __decorate$U([\n PostConstruct\n ], ResizeFeature.prototype, \"postConstruct\", null);\n return ResizeFeature;\n}(BeanStub));\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / React / AngularJS / Web Components\n * @version v26.1.0\n * @link http://www.ag-grid.com/\n * @license MIT\n */\nvar __extends$12 = (undefined && undefined.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate$V = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n 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 AgAbstractLabel = /** @class */ (function (_super) {\n __extends$12(AgAbstractLabel, _super);\n function AgAbstractLabel(config, template) {\n var _this = _super.call(this, template) || this;\n _this.labelSeparator = '';\n _this.labelAlignment = 'left';\n _this.label = '';\n _this.config = config || {};\n return _this;\n }\n AgAbstractLabel.prototype.postConstruct = function () {\n addCssClass(this.getGui(), 'ag-labeled');\n addCssClass(this.eLabel, 'ag-label');\n var _a = this.config, labelSeparator = _a.labelSeparator, label = _a.label, labelWidth = _a.labelWidth, labelAlignment = _a.labelAlignment;\n if (labelSeparator != null) {\n this.setLabelSeparator(labelSeparator);\n }\n if (label != null) {\n this.setLabel(label);\n }\n if (labelWidth != null) {\n this.setLabelWidth(labelWidth);\n }\n this.setLabelAlignment(labelAlignment || this.labelAlignment);\n this.refreshLabel();\n };\n AgAbstractLabel.prototype.refreshLabel = function () {\n clearElement(this.eLabel);\n if (typeof this.label === 'string') {\n this.eLabel.innerText = this.label + this.labelSeparator;\n }\n else if (this.label) {\n this.eLabel.appendChild(this.label);\n }\n if (this.label === '') {\n addCssClass(this.eLabel, 'ag-hidden');\n setAriaRole(this.eLabel, 'presentation');\n }\n else {\n removeCssClass(this.eLabel, 'ag-hidden');\n setAriaRole(this.eLabel, null);\n }\n };\n AgAbstractLabel.prototype.setLabelSeparator = function (labelSeparator) {\n if (this.labelSeparator === labelSeparator) {\n return this;\n }\n this.labelSeparator = labelSeparator;\n if (this.label != null) {\n this.refreshLabel();\n }\n return this;\n };\n AgAbstractLabel.prototype.getLabelId = function () {\n this.eLabel.id = this.eLabel.id || \"ag-\" + this.getCompId() + \"-label\";\n return this.eLabel.id;\n };\n AgAbstractLabel.prototype.getLabel = function () {\n return this.label;\n };\n AgAbstractLabel.prototype.setLabel = function (label) {\n if (this.label === label) {\n return this;\n }\n this.label = label;\n this.refreshLabel();\n return this;\n };\n AgAbstractLabel.prototype.setLabelAlignment = function (alignment) {\n var eGui = this.getGui();\n addOrRemoveCssClass(eGui, 'ag-label-align-left', alignment === 'left');\n addOrRemoveCssClass(eGui, 'ag-label-align-right', alignment === 'right');\n addOrRemoveCssClass(eGui, 'ag-label-align-top', alignment === 'top');\n return this;\n };\n AgAbstractLabel.prototype.setLabelWidth = function (width) {\n if (this.label == null) {\n return this;\n }\n setElementWidth(this.eLabel, width);\n return this;\n };\n __decorate$V([\n PostConstruct\n ], AgAbstractLabel.prototype, \"postConstruct\", null);\n return AgAbstractLabel;\n}(Component));\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / React / AngularJS / Web Components\n * @version v26.1.0\n * @link http://www.ag-grid.com/\n * @license MIT\n */\nvar __extends$13 = (undefined && undefined.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar AgAbstractField = /** @class */ (function (_super) {\n __extends$13(AgAbstractField, _super);\n function AgAbstractField(config, template, className) {\n var _this = _super.call(this, config, template) || this;\n _this.className = className;\n _this.disabled = false;\n return _this;\n }\n AgAbstractField.prototype.postConstruct = function () {\n _super.prototype.postConstruct.call(this);\n if (this.className) {\n addCssClass(this.getGui(), this.className);\n }\n };\n AgAbstractField.prototype.onValueChange = function (callbackFn) {\n var _this = this;\n this.addManagedListener(this, AgAbstractField.EVENT_CHANGED, function () { return callbackFn(_this.getValue()); });\n return this;\n };\n AgAbstractField.prototype.getWidth = function () {\n return this.getGui().clientWidth;\n };\n AgAbstractField.prototype.setWidth = function (width) {\n setFixedWidth(this.getGui(), width);\n return this;\n };\n AgAbstractField.prototype.getPreviousValue = function () {\n return this.previousValue;\n };\n AgAbstractField.prototype.getValue = function () {\n return this.value;\n };\n AgAbstractField.prototype.setValue = function (value, silent) {\n if (this.value === value) {\n return this;\n }\n this.previousValue = this.value;\n this.value = value;\n if (!silent) {\n this.dispatchEvent({ type: AgAbstractField.EVENT_CHANGED });\n }\n return this;\n };\n AgAbstractField.prototype.setDisabled = function (disabled) {\n disabled = !!disabled;\n var element = this.getGui();\n setDisabled(element, disabled);\n addOrRemoveCssClass(element, 'ag-disabled', disabled);\n this.disabled = disabled;\n return this;\n };\n AgAbstractField.prototype.isDisabled = function () {\n return !!this.disabled;\n };\n AgAbstractField.EVENT_CHANGED = 'valueChange';\n return AgAbstractField;\n}(AgAbstractLabel));\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / React / AngularJS / Web Components\n * @version v26.1.0\n * @link http://www.ag-grid.com/\n * @license MIT\n */\nvar __extends$14 = (undefined && undefined.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate$W = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n 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 AgAbstractInputField = /** @class */ (function (_super) {\n __extends$14(AgAbstractInputField, _super);\n function AgAbstractInputField(config, className, inputType, displayFieldTag) {\n if (inputType === void 0) { inputType = 'text'; }\n if (displayFieldTag === void 0) { displayFieldTag = 'input'; }\n var _this = _super.call(this, config, /* html */ \"\\n \\n
\\n
\\n <\" + displayFieldTag + \" ref=\\\"eInput\\\" class=\\\"ag-input-field-input\\\">\" + displayFieldTag + \">\\n
\\n
\", className) || this;\n _this.inputType = inputType;\n _this.displayFieldTag = displayFieldTag;\n return _this;\n }\n AgAbstractInputField.prototype.postConstruct = function () {\n _super.prototype.postConstruct.call(this);\n this.setInputType();\n addCssClass(this.eLabel, this.className + \"-label\");\n addCssClass(this.eWrapper, this.className + \"-input-wrapper\");\n addCssClass(this.eInput, this.className + \"-input\");\n addCssClass(this.getGui(), 'ag-input-field');\n this.eInput.id = this.eInput.id || \"ag-\" + this.getCompId() + \"-input\";\n var _a = this.config, width = _a.width, value = _a.value;\n if (width != null) {\n this.setWidth(width);\n }\n if (value != null) {\n this.setValue(value);\n }\n this.addInputListeners();\n };\n AgAbstractInputField.prototype.refreshLabel = function () {\n if (exists(this.getLabel())) {\n setAriaLabelledBy(this.eInput, this.getLabelId());\n }\n else {\n this.eInput.removeAttribute('aria-labelledby');\n }\n _super.prototype.refreshLabel.call(this);\n };\n AgAbstractInputField.prototype.addInputListeners = function () {\n var _this = this;\n this.addManagedListener(this.eInput, 'input', function (e) { return _this.setValue(e.target.value); });\n };\n AgAbstractInputField.prototype.setInputType = function () {\n if (this.displayFieldTag === 'input') {\n this.eInput.setAttribute('type', this.inputType);\n }\n };\n AgAbstractInputField.prototype.getInputElement = function () {\n return this.eInput;\n };\n AgAbstractInputField.prototype.setInputWidth = function (width) {\n setElementWidth(this.eWrapper, width);\n return this;\n };\n AgAbstractInputField.prototype.setInputName = function (name) {\n this.getInputElement().setAttribute('name', name);\n return this;\n };\n AgAbstractInputField.prototype.getFocusableElement = function () {\n return this.eInput;\n };\n AgAbstractInputField.prototype.setMaxLength = function (length) {\n var eInput = this.eInput;\n eInput.maxLength = length;\n return this;\n };\n AgAbstractInputField.prototype.setInputPlaceholder = function (placeholder) {\n addOrRemoveAttribute(this.eInput, 'placeholder', placeholder);\n return this;\n };\n AgAbstractInputField.prototype.setInputAriaLabel = function (label) {\n setAriaLabel(this.eInput, label);\n return this;\n };\n AgAbstractInputField.prototype.setDisabled = function (disabled) {\n setDisabled(this.eInput, disabled);\n return _super.prototype.setDisabled.call(this, disabled);\n };\n __decorate$W([\n RefSelector('eLabel')\n ], AgAbstractInputField.prototype, \"eLabel\", void 0);\n __decorate$W([\n RefSelector('eWrapper')\n ], AgAbstractInputField.prototype, \"eWrapper\", void 0);\n __decorate$W([\n RefSelector('eInput')\n ], AgAbstractInputField.prototype, \"eInput\", void 0);\n return AgAbstractInputField;\n}(AgAbstractField));\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / React / AngularJS / Web Components\n * @version v26.1.0\n * @link http://www.ag-grid.com/\n * @license MIT\n */\nvar __extends$15 = (undefined && undefined.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar AgCheckbox = /** @class */ (function (_super) {\n __extends$15(AgCheckbox, _super);\n function AgCheckbox(config, className, inputType) {\n if (className === void 0) { className = 'ag-checkbox'; }\n if (inputType === void 0) { inputType = 'checkbox'; }\n var _this = _super.call(this, config, className, inputType) || this;\n _this.labelAlignment = 'right';\n _this.selected = false;\n _this.readOnly = false;\n _this.passive = false;\n return _this;\n }\n AgCheckbox.prototype.addInputListeners = function () {\n this.addManagedListener(this.eInput, 'click', this.onCheckboxClick.bind(this));\n this.addManagedListener(this.eLabel, 'click', this.toggle.bind(this));\n };\n AgCheckbox.prototype.getNextValue = function () {\n return this.selected === undefined ? true : !this.selected;\n };\n AgCheckbox.prototype.setPassive = function (passive) {\n this.passive = passive;\n };\n AgCheckbox.prototype.isReadOnly = function () {\n return this.readOnly;\n };\n AgCheckbox.prototype.setReadOnly = function (readOnly) {\n addOrRemoveCssClass(this.eWrapper, 'ag-disabled', readOnly);\n this.eInput.disabled = readOnly;\n this.readOnly = readOnly;\n };\n AgCheckbox.prototype.setDisabled = function (disabled) {\n addOrRemoveCssClass(this.eWrapper, 'ag-disabled', disabled);\n return _super.prototype.setDisabled.call(this, disabled);\n };\n AgCheckbox.prototype.toggle = function () {\n var previousValue = this.isSelected();\n var nextValue = this.getNextValue();\n if (this.passive) {\n this.dispatchChange(nextValue, previousValue);\n }\n else {\n this.setValue(nextValue);\n }\n };\n AgCheckbox.prototype.getValue = function () {\n return this.isSelected();\n };\n AgCheckbox.prototype.setValue = function (value, silent) {\n this.refreshSelectedClass(value);\n this.setSelected(value, silent);\n return this;\n };\n AgCheckbox.prototype.setName = function (name) {\n var input = this.getInputElement();\n input.name = name;\n return this;\n };\n AgCheckbox.prototype.isSelected = function () {\n return this.selected;\n };\n AgCheckbox.prototype.setSelected = function (selected, silent) {\n if (this.isSelected() === selected) {\n return;\n }\n this.previousValue = this.isSelected();\n selected = this.selected = typeof selected === 'boolean' ? selected : undefined;\n this.eInput.checked = selected;\n this.eInput.indeterminate = selected === undefined;\n if (!silent) {\n this.dispatchChange(this.selected, this.previousValue);\n }\n };\n AgCheckbox.prototype.dispatchChange = function (selected, previousValue, event) {\n this.dispatchEvent({ type: AgCheckbox.EVENT_CHANGED, selected: selected, previousValue: previousValue, event: event });\n var input = this.getInputElement();\n var checkboxChangedEvent = {\n type: Events.EVENT_CHECKBOX_CHANGED,\n id: input.id,\n name: input.name,\n selected: selected,\n previousValue: previousValue\n };\n this.eventService.dispatchEvent(checkboxChangedEvent);\n };\n AgCheckbox.prototype.onCheckboxClick = function (e) {\n if (this.passive) {\n return;\n }\n var previousValue = this.isSelected();\n var selected = this.selected = e.target.checked;\n this.refreshSelectedClass(selected);\n this.dispatchChange(selected, previousValue, e);\n };\n AgCheckbox.prototype.refreshSelectedClass = function (value) {\n addOrRemoveCssClass(this.eWrapper, 'ag-checked', value === true);\n addOrRemoveCssClass(this.eWrapper, 'ag-indeterminate', value == null);\n };\n return AgCheckbox;\n}(AgAbstractInputField));\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / React / AngularJS / Web Components\n * @version v26.1.0\n * @link http://www.ag-grid.com/\n * @license MIT\n */\nvar __extends$16 = (undefined && undefined.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate$X = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n 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 SelectAllFeature = /** @class */ (function (_super) {\n __extends$16(SelectAllFeature, _super);\n function SelectAllFeature(column) {\n var _this = _super.call(this) || this;\n _this.cbSelectAllVisible = false;\n _this.processingEventFromCheckbox = false;\n _this.column = column;\n var colDef = column.getColDef();\n _this.filteredOnly = colDef ? !!colDef.headerCheckboxSelectionFilteredOnly : false;\n return _this;\n }\n SelectAllFeature.prototype.onSpaceKeyPressed = function (e) {\n var checkbox = this.cbSelectAll;\n if (checkbox.isDisplayed() && !checkbox.getGui().contains(document.activeElement)) {\n e.preventDefault();\n checkbox.setValue(!checkbox.getValue());\n }\n };\n SelectAllFeature.prototype.getCheckboxGui = function () {\n return this.cbSelectAll.getGui();\n };\n SelectAllFeature.prototype.setComp = function (comp) {\n this.comp = comp;\n this.cbSelectAll = this.createManagedBean(new AgCheckbox());\n this.cbSelectAll.addCssClass('ag-header-select-all');\n setAriaRole(this.cbSelectAll.getGui(), 'presentation');\n this.showOrHideSelectAll();\n this.addManagedListener(this.eventService, Events.EVENT_NEW_COLUMNS_LOADED, this.showOrHideSelectAll.bind(this));\n this.addManagedListener(this.eventService, Events.EVENT_DISPLAYED_COLUMNS_CHANGED, this.showOrHideSelectAll.bind(this));\n this.addManagedListener(this.eventService, Events.EVENT_SELECTION_CHANGED, this.onSelectionChanged.bind(this));\n this.addManagedListener(this.eventService, Events.EVENT_MODEL_UPDATED, this.onModelChanged.bind(this));\n this.addManagedListener(this.cbSelectAll, AgCheckbox.EVENT_CHANGED, this.onCbSelectAll.bind(this));\n this.cbSelectAll.getInputElement().setAttribute('tabindex', '-1');\n this.refreshSelectAllLabel();\n };\n SelectAllFeature.prototype.showOrHideSelectAll = function () {\n this.cbSelectAllVisible = this.isCheckboxSelection();\n this.cbSelectAll.setDisplayed(this.cbSelectAllVisible);\n if (this.cbSelectAllVisible) {\n // in case user is trying this feature with the wrong model type\n this.checkRightRowModelType();\n // make sure checkbox is showing the right state\n this.updateStateOfCheckbox();\n }\n this.refreshHeaderAriaDescribedBy(this.cbSelectAllVisible);\n };\n SelectAllFeature.prototype.refreshHeaderAriaDescribedBy = function (isSelectAllVisible) {\n var describedBy = isSelectAllVisible ? this.cbSelectAll.getInputElement().id : undefined;\n this.comp.setAriaDescribedBy(describedBy);\n };\n SelectAllFeature.prototype.onModelChanged = function () {\n if (!this.cbSelectAllVisible) {\n return;\n }\n this.updateStateOfCheckbox();\n };\n SelectAllFeature.prototype.onSelectionChanged = function () {\n if (!this.cbSelectAllVisible) {\n return;\n }\n this.updateStateOfCheckbox();\n };\n SelectAllFeature.prototype.getNextCheckboxState = function (selectionCount) {\n // if no rows, always have it unselected\n if (selectionCount.selected === 0 && selectionCount.notSelected === 0) {\n return false;\n }\n // if mix of selected and unselected, this is the tri-state\n if (selectionCount.selected > 0 && selectionCount.notSelected > 0) {\n return null;\n }\n // only selected\n if (selectionCount.selected > 0) {\n return true;\n }\n // nothing selected\n return false;\n };\n SelectAllFeature.prototype.updateStateOfCheckbox = function () {\n if (this.processingEventFromCheckbox) {\n return;\n }\n this.processingEventFromCheckbox = true;\n var selectionCount = this.getSelectionCount();\n var allSelected = this.getNextCheckboxState(selectionCount);\n this.cbSelectAll.setValue(allSelected);\n this.refreshSelectAllLabel();\n this.processingEventFromCheckbox = false;\n };\n SelectAllFeature.prototype.refreshSelectAllLabel = function () {\n var translate = this.gridOptionsWrapper.getLocaleTextFunc();\n var checked = this.cbSelectAll.getValue();\n var ariaStatus = checked ? translate('ariaChecked', 'checked') : translate('ariaUnchecked', 'unchecked');\n var ariaLabel = translate('ariaRowSelectAll', 'Press Space to toggle all rows selection');\n this.cbSelectAll.setInputAriaLabel(ariaLabel + \" (\" + ariaStatus + \")\");\n };\n SelectAllFeature.prototype.getSelectionCount = function () {\n var _this = this;\n var selectedCount = 0;\n var notSelectedCount = 0;\n var callback = function (node) {\n if (_this.gridOptionsWrapper.isGroupSelectsChildren() && node.group) {\n return;\n }\n if (node.isSelected()) {\n selectedCount++;\n }\n else if (!node.selectable) ;\n else {\n notSelectedCount++;\n }\n };\n if (this.filteredOnly) {\n this.gridApi.forEachNodeAfterFilter(callback);\n }\n else {\n this.gridApi.forEachNode(callback);\n }\n return {\n notSelected: notSelectedCount,\n selected: selectedCount\n };\n };\n SelectAllFeature.prototype.checkRightRowModelType = function () {\n var rowModelType = this.rowModel.getType();\n var rowModelMatches = rowModelType === Constants.ROW_MODEL_TYPE_CLIENT_SIDE;\n if (!rowModelMatches) {\n console.warn(\"AG Grid: selectAllCheckbox is only available if using normal row model, you are using \" + rowModelType);\n }\n };\n SelectAllFeature.prototype.onCbSelectAll = function () {\n if (this.processingEventFromCheckbox) {\n return;\n }\n if (!this.cbSelectAllVisible) {\n return;\n }\n var value = this.cbSelectAll.getValue();\n if (value) {\n this.selectionService.selectAllRowNodes(this.filteredOnly);\n }\n else {\n this.selectionService.deselectAllRowNodes(this.filteredOnly);\n }\n };\n SelectAllFeature.prototype.isCheckboxSelection = function () {\n var result = this.column.getColDef().headerCheckboxSelection;\n if (typeof result === 'function') {\n var func = result;\n result = func({\n column: this.column,\n colDef: this.column.getColDef(),\n columnApi: this.columnApi,\n api: this.gridApi\n });\n }\n if (result) {\n if (this.gridOptionsWrapper.isRowModelServerSide()) {\n console.warn('headerCheckboxSelection is not supported for Server Side Row Model');\n return false;\n }\n if (this.gridOptionsWrapper.isRowModelInfinite()) {\n console.warn('headerCheckboxSelection is not supported for Infinite Row Model');\n return false;\n }\n if (this.gridOptionsWrapper.isRowModelViewport()) {\n console.warn('headerCheckboxSelection is not supported for Viewport Row Model');\n return false;\n }\n // otherwise the row model is compatible, so return true\n return true;\n }\n return false;\n };\n __decorate$X([\n Autowired('gridApi')\n ], SelectAllFeature.prototype, \"gridApi\", void 0);\n __decorate$X([\n Autowired('columnApi')\n ], SelectAllFeature.prototype, \"columnApi\", void 0);\n __decorate$X([\n Autowired('rowModel')\n ], SelectAllFeature.prototype, \"rowModel\", void 0);\n __decorate$X([\n Autowired('selectionService')\n ], SelectAllFeature.prototype, \"selectionService\", void 0);\n return SelectAllFeature;\n}(BeanStub));\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / React / AngularJS / Web Components\n * @version v26.1.0\n * @link http://www.ag-grid.com/\n * @license MIT\n */\nvar __extends$17 = (undefined && undefined.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate$Y = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n 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 HeaderCellCtrl = /** @class */ (function (_super) {\n __extends$17(HeaderCellCtrl, _super);\n function HeaderCellCtrl(column, parentRowCtrl) {\n var _this = _super.call(this, column, parentRowCtrl) || this;\n _this.refreshFunctions = [];\n _this.userHeaderClasses = new Set();\n _this.column = column;\n return _this;\n }\n HeaderCellCtrl.prototype.setComp = function (comp, eGui, eResize) {\n var _this = this;\n _super.prototype.setGui.call(this, eGui);\n this.comp = comp;\n this.colDefVersion = this.columnModel.getColDefVersion();\n this.updateState();\n this.setupWidth();\n this.setupMovingCss();\n this.setupMenuClass();\n this.setupSortableClass();\n this.addColumnHoverListener();\n this.setupFilterCss();\n this.setupColId();\n this.setupClassesFromColDef();\n this.setupTooltip();\n this.addActiveHeaderMouseListeners();\n this.setupSelectAll();\n this.setupUserComp();\n this.createManagedBean(new ResizeFeature(this.getPinned(), this.column, eResize, comp, this));\n this.createManagedBean(new HoverFeature([this.column], eGui));\n this.createManagedBean(new SetLeftFeature(this.column, eGui, this.beans));\n this.createManagedBean(new ManagedFocusFeature(eGui, {\n shouldStopEventPropagation: function (e) { return _this.shouldStopEventPropagation(e); },\n onTabKeyDown: function () { return null; },\n handleKeyDown: this.handleKeyDown.bind(this),\n onFocusIn: this.onFocusIn.bind(this),\n onFocusOut: this.onFocusOut.bind(this)\n }));\n this.addManagedListener(this.eventService, Events.EVENT_NEW_COLUMNS_LOADED, this.onNewColumnsLoaded.bind(this));\n this.addManagedListener(this.eventService, Events.EVENT_COLUMN_VALUE_CHANGED, this.onColumnValueChanged.bind(this));\n this.addManagedListener(this.eventService, Events.EVENT_COLUMN_ROW_GROUP_CHANGED, this.onColumnRowGroupChanged.bind(this));\n this.addManagedListener(this.eventService, Events.EVENT_COLUMN_PIVOT_CHANGED, this.onColumnPivotChanged.bind(this));\n };\n HeaderCellCtrl.prototype.setupUserComp = function () {\n var compDetails = this.lookupUserCompDetails();\n this.setCompDetails(compDetails);\n };\n HeaderCellCtrl.prototype.setCompDetails = function (compDetails) {\n this.userCompDetails = compDetails;\n this.comp.setUserCompDetails(compDetails);\n };\n HeaderCellCtrl.prototype.lookupUserCompDetails = function () {\n var params = this.createParams();\n var colDef = this.column.getColDef();\n return this.userComponentFactory.getHeaderCompDetails(colDef, params);\n };\n HeaderCellCtrl.prototype.createParams = function () {\n var _this = this;\n var colDef = this.column.getColDef();\n var params = {\n column: this.column,\n displayName: this.displayName,\n enableSorting: colDef.sortable,\n enableMenu: this.menuEnabled,\n showColumnMenu: function (source) {\n _this.gridApi.showColumnMenuAfterButtonClick(_this.column, source);\n },\n progressSort: function (multiSort) {\n _this.sortController.progressSort(_this.column, !!multiSort, \"uiColumnSorted\");\n },\n setSort: function (sort, multiSort) {\n _this.sortController.setSortForColumn(_this.column, sort, !!multiSort, \"uiColumnSorted\");\n },\n api: this.gridApi,\n columnApi: this.columnApi,\n context: this.gridOptionsWrapper.getContext(),\n eGridHeader: this.getGui()\n };\n return params;\n };\n HeaderCellCtrl.prototype.setupSelectAll = function () {\n this.selectAllFeature = this.createManagedBean(new SelectAllFeature(this.column));\n this.selectAllFeature.setComp(this.comp);\n };\n HeaderCellCtrl.prototype.getSelectAllGui = function () {\n return this.selectAllFeature.getCheckboxGui();\n };\n HeaderCellCtrl.prototype.handleKeyDown = function (e) {\n if (e.keyCode === KeyCode.SPACE) {\n this.selectAllFeature.onSpaceKeyPressed(e);\n }\n if (e.keyCode === KeyCode.ENTER) {\n this.onEnterKeyPressed(e);\n }\n };\n HeaderCellCtrl.prototype.onEnterKeyPressed = function (e) {\n /// THIS IS BAD - we are assuming the header is not a user provided comp\n var headerComp = this.comp.getUserCompInstance();\n if (!headerComp) {\n return;\n }\n if (e.ctrlKey || e.metaKey) {\n if (this.menuEnabled && headerComp.showMenu) {\n e.preventDefault();\n headerComp.showMenu();\n }\n }\n else if (this.sortable) {\n var multiSort = e.shiftKey;\n this.sortController.progressSort(this.column, multiSort, \"uiColumnSorted\");\n }\n };\n HeaderCellCtrl.prototype.isMenuEnabled = function () {\n return this.menuEnabled;\n };\n HeaderCellCtrl.prototype.onFocusIn = function (e) {\n if (!this.getGui().contains(e.relatedTarget)) {\n var rowIndex = this.getRowIndex();\n this.focusService.setFocusedHeader(rowIndex, this.column);\n }\n this.setActiveHeader(true);\n };\n HeaderCellCtrl.prototype.onFocusOut = function (e) {\n if (this.getGui().contains(e.relatedTarget)) {\n return;\n }\n this.setActiveHeader(false);\n };\n HeaderCellCtrl.prototype.setupTooltip = function () {\n var _this = this;\n var tooltipCtrl = {\n getColumn: function () { return _this.column; },\n getColDef: function () { return _this.column.getColDef(); },\n getGui: function () { return _this.eGui; },\n getLocation: function () { return 'header'; },\n getTooltipValue: function () {\n var res = _this.column.getColDef().headerTooltip;\n return res;\n },\n };\n var tooltipFeature = this.createManagedBean(new TooltipFeature(tooltipCtrl, this.beans));\n tooltipFeature.setComp(this.comp);\n this.refreshFunctions.push(function () { return tooltipFeature.refreshToolTip(); });\n };\n HeaderCellCtrl.prototype.setupClassesFromColDef = function () {\n var _this = this;\n var refreshHeaderClasses = function () {\n var colDef = _this.column.getColDef();\n var goa = _this.gridOptionsWrapper;\n var classes = CssClassApplier.getHeaderClassesFromColDef(colDef, goa, _this.column, null);\n var oldClasses = _this.userHeaderClasses;\n _this.userHeaderClasses = new Set(classes);\n classes.forEach(function (c) {\n if (oldClasses.has(c)) {\n // class already added, no need to apply it, but remove from old set\n oldClasses.delete(c);\n }\n else {\n // class new since last time, so apply it\n _this.comp.addOrRemoveCssClass(c, true);\n }\n });\n // now old set only has classes that were applied last time, but not this time, so remove them\n oldClasses.forEach(function (c) { return _this.comp.addOrRemoveCssClass(c, false); });\n };\n this.refreshFunctions.push(refreshHeaderClasses);\n refreshHeaderClasses();\n };\n HeaderCellCtrl.prototype.getGui = function () {\n return this.eGui;\n };\n HeaderCellCtrl.prototype.setDragSource = function (eSource) {\n var _this = this;\n this.dragSourceElement = eSource;\n this.removeDragSource();\n if (!eSource) {\n return;\n }\n if (!this.draggable) {\n return;\n }\n this.moveDragSource = {\n type: exports.DragSourceType.HeaderCell,\n eElement: eSource,\n defaultIconName: DragAndDropService.ICON_HIDE,\n getDragItem: function () { return _this.createDragItem(); },\n dragItemName: this.displayName,\n onDragStarted: function () { return _this.column.setMoving(true, \"uiColumnMoved\"); },\n onDragStopped: function () { return _this.column.setMoving(false, \"uiColumnMoved\"); }\n };\n this.dragAndDropService.addDragSource(this.moveDragSource, true);\n };\n HeaderCellCtrl.prototype.createDragItem = function () {\n var visibleState = {};\n visibleState[this.column.getId()] = this.column.isVisible();\n return {\n columns: [this.column],\n visibleState: visibleState\n };\n };\n HeaderCellCtrl.prototype.removeDragSource = function () {\n if (this.moveDragSource) {\n this.dragAndDropService.removeDragSource(this.moveDragSource);\n this.moveDragSource = undefined;\n }\n };\n HeaderCellCtrl.prototype.onNewColumnsLoaded = function () {\n var colDefVersionNow = this.columnModel.getColDefVersion();\n if (colDefVersionNow != this.colDefVersion) {\n this.colDefVersion = colDefVersionNow;\n this.refresh();\n }\n };\n HeaderCellCtrl.prototype.updateState = function () {\n var colDef = this.column.getColDef();\n this.menuEnabled = this.menuFactory.isMenuEnabled(this.column) && !colDef.suppressMenu;\n this.sortable = colDef.sortable;\n this.displayName = this.calculateDisplayName();\n this.draggable = this.workOutDraggable();\n };\n HeaderCellCtrl.prototype.addRefreshFunction = function (func) {\n this.refreshFunctions.push(func);\n };\n HeaderCellCtrl.prototype.refresh = function () {\n this.updateState();\n this.refreshHeaderComp();\n this.refreshFunctions.forEach(function (f) { return f(); });\n };\n HeaderCellCtrl.prototype.refreshHeaderComp = function () {\n var newCompDetails = this.lookupUserCompDetails();\n var compInstance = this.comp.getUserCompInstance();\n // only try refresh if old comp exists adn it is the correct type\n var attemptRefresh = compInstance != null && this.userCompDetails.componentClass == newCompDetails.componentClass;\n var headerCompRefreshed = attemptRefresh ? this.attemptHeaderCompRefresh(newCompDetails.params) : false;\n if (headerCompRefreshed) {\n // we do this as a refresh happens after colDefs change, and it's possible the column has had it's\n // draggable property toggled. no need to call this if not refreshing, as setDragSource is done\n // as part of appendHeaderComp\n this.setDragSource(this.dragSourceElement);\n }\n else {\n this.setCompDetails(newCompDetails);\n }\n };\n HeaderCellCtrl.prototype.attemptHeaderCompRefresh = function (params) {\n var headerComp = this.comp.getUserCompInstance();\n if (!headerComp) {\n return false;\n }\n // if no refresh method, then we want to replace the headerComp\n if (!headerComp.refresh) {\n return false;\n }\n var res = headerComp.refresh(params);\n return res;\n };\n HeaderCellCtrl.prototype.calculateDisplayName = function () {\n return this.columnModel.getDisplayNameForColumn(this.column, 'header', true);\n };\n HeaderCellCtrl.prototype.checkDisplayName = function () {\n // display name can change if aggFunc different, eg sum(Gold) is now max(Gold)\n if (this.displayName !== this.calculateDisplayName()) {\n this.refresh();\n }\n };\n HeaderCellCtrl.prototype.workOutDraggable = function () {\n var colDef = this.column.getColDef();\n var isSuppressMovableColumns = this.gridOptionsWrapper.isSuppressMovableColumns();\n var colCanMove = !isSuppressMovableColumns && !colDef.suppressMovable && !colDef.lockPosition;\n // we should still be allowed drag the column, even if it can't be moved, if the column\n // can be dragged to a rowGroup or pivot drop zone\n return !!colCanMove || !!colDef.enableRowGroup || !!colDef.enablePivot;\n };\n HeaderCellCtrl.prototype.onColumnRowGroupChanged = function () {\n this.checkDisplayName();\n };\n HeaderCellCtrl.prototype.onColumnPivotChanged = function () {\n this.checkDisplayName();\n };\n HeaderCellCtrl.prototype.onColumnValueChanged = function () {\n this.checkDisplayName();\n };\n HeaderCellCtrl.prototype.setupWidth = function () {\n var _this = this;\n var listener = function () {\n _this.comp.setWidth(_this.column.getActualWidth() + 'px');\n };\n this.addManagedListener(this.column, Column.EVENT_WIDTH_CHANGED, listener);\n listener();\n };\n HeaderCellCtrl.prototype.setupMovingCss = function () {\n var _this = this;\n var listener = function () {\n // this is what makes the header go dark when it is been moved (gives impression to\n // user that the column was picked up).\n _this.comp.addOrRemoveCssClass('ag-header-cell-moving', _this.column.isMoving());\n };\n this.addManagedListener(this.column, Column.EVENT_MOVING_CHANGED, listener);\n listener();\n };\n HeaderCellCtrl.prototype.setupMenuClass = function () {\n var _this = this;\n var listener = function () {\n _this.comp.addOrRemoveCssClass('ag-column-menu-visible', _this.column.isMenuVisible());\n };\n this.addManagedListener(this.column, Column.EVENT_MENU_VISIBLE_CHANGED, listener);\n listener();\n };\n HeaderCellCtrl.prototype.setupSortableClass = function () {\n var _this = this;\n var updateSortableCssClass = function () {\n _this.comp.addOrRemoveCssClass('ag-header-cell-sortable', !!_this.sortable);\n };\n var updateAriaSort = function () {\n if (_this.sortable) {\n _this.comp.setAriaSort(getAriaSortState(_this.column));\n }\n else {\n _this.comp.setAriaSort(undefined);\n }\n };\n updateSortableCssClass();\n updateAriaSort();\n this.addRefreshFunction(updateSortableCssClass);\n this.addRefreshFunction(updateAriaSort);\n this.addManagedListener(this.column, Column.EVENT_SORT_CHANGED, updateAriaSort);\n };\n HeaderCellCtrl.prototype.addColumnHoverListener = function () {\n var _this = this;\n var listener = function () {\n if (!_this.gridOptionsWrapper.isColumnHoverHighlight()) {\n return;\n }\n var isHovered = _this.columnHoverService.isHovered(_this.column);\n _this.comp.addOrRemoveCssClass('ag-column-hover', isHovered);\n };\n this.addManagedListener(this.eventService, Events.EVENT_COLUMN_HOVER_CHANGED, listener);\n listener();\n };\n HeaderCellCtrl.prototype.setupFilterCss = function () {\n var _this = this;\n var listener = function () {\n _this.comp.addOrRemoveCssClass('ag-header-cell-filtered', _this.column.isFilterActive());\n };\n this.addManagedListener(this.column, Column.EVENT_FILTER_ACTIVE_CHANGED, listener);\n listener();\n };\n HeaderCellCtrl.prototype.setupColId = function () {\n this.comp.setColId(this.column.getColId());\n };\n HeaderCellCtrl.prototype.addActiveHeaderMouseListeners = function () {\n var _this = this;\n var listener = function (e) { return _this.setActiveHeader(e.type === 'mouseenter'); };\n this.addManagedListener(this.getGui(), 'mouseenter', listener);\n this.addManagedListener(this.getGui(), 'mouseleave', listener);\n };\n HeaderCellCtrl.prototype.setActiveHeader = function (active) {\n this.comp.addOrRemoveCssClass('ag-header-active', active);\n };\n __decorate$Y([\n Autowired('columnModel')\n ], HeaderCellCtrl.prototype, \"columnModel\", void 0);\n __decorate$Y([\n Autowired('columnHoverService')\n ], HeaderCellCtrl.prototype, \"columnHoverService\", void 0);\n __decorate$Y([\n Autowired('beans')\n ], HeaderCellCtrl.prototype, \"beans\", void 0);\n __decorate$Y([\n Autowired('sortController')\n ], HeaderCellCtrl.prototype, \"sortController\", void 0);\n __decorate$Y([\n Autowired('menuFactory')\n ], HeaderCellCtrl.prototype, \"menuFactory\", void 0);\n __decorate$Y([\n Autowired('dragAndDropService')\n ], HeaderCellCtrl.prototype, \"dragAndDropService\", void 0);\n __decorate$Y([\n Autowired('gridApi')\n ], HeaderCellCtrl.prototype, \"gridApi\", void 0);\n __decorate$Y([\n Autowired('columnApi')\n ], HeaderCellCtrl.prototype, \"columnApi\", void 0);\n __decorate$Y([\n Autowired('userComponentFactory')\n ], HeaderCellCtrl.prototype, \"userComponentFactory\", void 0);\n __decorate$Y([\n PreDestroy\n ], HeaderCellCtrl.prototype, \"removeDragSource\", null);\n return HeaderCellCtrl;\n}(AbstractHeaderCellCtrl));\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / React / AngularJS / Web Components\n * @version v26.1.0\n * @link http://www.ag-grid.com/\n * @license MIT\n */\nvar __extends$18 = (undefined && undefined.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate$Z = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n 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 GroupResizeFeature = /** @class */ (function (_super) {\n __extends$18(GroupResizeFeature, _super);\n function GroupResizeFeature(comp, eResize, pinned, columnGroup) {\n var _this = _super.call(this) || this;\n _this.eResize = eResize;\n _this.comp = comp;\n _this.pinned = pinned;\n _this.columnGroup = columnGroup;\n return _this;\n }\n GroupResizeFeature.prototype.postConstruct = function () {\n var _this = this;\n if (!this.columnGroup.isResizable()) {\n this.comp.addOrRemoveResizableCssClass('ag-hidden', true);\n return;\n }\n var finishedWithResizeFunc = this.horizontalResizeService.addResizeBar({\n eResizeBar: this.eResize,\n onResizeStart: this.onResizeStart.bind(this),\n onResizing: this.onResizing.bind(this, false),\n onResizeEnd: this.onResizing.bind(this, true)\n });\n this.addDestroyFunc(finishedWithResizeFunc);\n if (!this.gridOptionsWrapper.isSuppressAutoSize()) {\n var skipHeaderOnAutoSize_1 = this.gridOptionsWrapper.isSkipHeaderOnAutoSize();\n this.eResize.addEventListener('dblclick', function (event) {\n // get list of all the column keys we are responsible for\n var keys = [];\n _this.columnGroup.getDisplayedLeafColumns().forEach(function (column) {\n // not all cols in the group may be participating with auto-resize\n if (!column.getColDef().suppressAutoSize) {\n keys.push(column.getColId());\n }\n });\n if (keys.length > 0) {\n _this.columnModel.autoSizeColumns(keys, skipHeaderOnAutoSize_1, \"uiColumnResized\");\n }\n });\n }\n };\n GroupResizeFeature.prototype.onResizeStart = function (shiftKey) {\n var _this = this;\n var leafCols = this.columnGroup.getDisplayedLeafColumns();\n this.resizeCols = leafCols.filter(function (col) { return col.isResizable(); });\n this.resizeStartWidth = 0;\n this.resizeCols.forEach(function (col) { return _this.resizeStartWidth += col.getActualWidth(); });\n this.resizeRatios = [];\n this.resizeCols.forEach(function (col) { return _this.resizeRatios.push(col.getActualWidth() / _this.resizeStartWidth); });\n var takeFromGroup = null;\n if (shiftKey) {\n takeFromGroup = this.columnModel.getDisplayedGroupAfter(this.columnGroup);\n }\n if (takeFromGroup) {\n var takeFromLeafCols = takeFromGroup.getDisplayedLeafColumns();\n this.resizeTakeFromCols = takeFromLeafCols.filter(function (col) { return col.isResizable(); });\n this.resizeTakeFromStartWidth = 0;\n this.resizeTakeFromCols.forEach(function (col) { return _this.resizeTakeFromStartWidth += col.getActualWidth(); });\n this.resizeTakeFromRatios = [];\n this.resizeTakeFromCols.forEach(function (col) { return _this.resizeTakeFromRatios.push(col.getActualWidth() / _this.resizeTakeFromStartWidth); });\n }\n else {\n this.resizeTakeFromCols = null;\n this.resizeTakeFromStartWidth = null;\n this.resizeTakeFromRatios = null;\n }\n this.comp.addOrRemoveCssClass('ag-column-resizing', true);\n };\n GroupResizeFeature.prototype.onResizing = function (finished, resizeAmount) {\n var resizeSets = [];\n var resizeAmountNormalised = this.normaliseDragChange(resizeAmount);\n resizeSets.push({\n columns: this.resizeCols,\n ratios: this.resizeRatios,\n width: this.resizeStartWidth + resizeAmountNormalised\n });\n if (this.resizeTakeFromCols) {\n resizeSets.push({\n columns: this.resizeTakeFromCols,\n ratios: this.resizeTakeFromRatios,\n width: this.resizeTakeFromStartWidth - resizeAmountNormalised\n });\n }\n this.columnModel.resizeColumnSets(resizeSets, finished, 'uiColumnDragged');\n if (finished) {\n this.comp.addOrRemoveCssClass('ag-column-resizing', false);\n }\n };\n // optionally inverts the drag, depending on pinned and RTL\n // note - this method is duplicated in RenderedHeaderCell - should refactor out?\n GroupResizeFeature.prototype.normaliseDragChange = function (dragChange) {\n var result = dragChange;\n if (this.gridOptionsWrapper.isEnableRtl()) {\n // for RTL, dragging left makes the col bigger, except when pinning left\n if (this.pinned !== Constants.PINNED_LEFT) {\n result *= -1;\n }\n }\n else if (this.pinned === Constants.PINNED_RIGHT) {\n // for LTR (ie normal), dragging left makes the col smaller, except when pinning right\n result *= -1;\n }\n return result;\n };\n __decorate$Z([\n Autowired('horizontalResizeService')\n ], GroupResizeFeature.prototype, \"horizontalResizeService\", void 0);\n __decorate$Z([\n Autowired('columnModel')\n ], GroupResizeFeature.prototype, \"columnModel\", void 0);\n __decorate$Z([\n PostConstruct\n ], GroupResizeFeature.prototype, \"postConstruct\", null);\n return GroupResizeFeature;\n}(BeanStub));\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / React / AngularJS / Web Components\n * @version v26.1.0\n * @link http://www.ag-grid.com/\n * @license MIT\n */\nvar __extends$19 = (undefined && undefined.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate$_ = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n 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 GroupWidthFeature = /** @class */ (function (_super) {\n __extends$19(GroupWidthFeature, _super);\n function GroupWidthFeature(comp, columnGroup) {\n var _this = _super.call(this) || this;\n // the children can change, we keep destroy functions related to listening to the children here\n _this.removeChildListenersFuncs = [];\n _this.columnGroup = columnGroup;\n _this.comp = comp;\n return _this;\n }\n GroupWidthFeature.prototype.postConstruct = function () {\n // we need to listen to changes in child columns, as they impact our width\n this.addListenersToChildrenColumns();\n // the children belonging to this group can change, so we need to add and remove listeners as they change\n this.addManagedListener(this.columnGroup, ColumnGroup.EVENT_DISPLAYED_CHILDREN_CHANGED, this.onDisplayedChildrenChanged.bind(this));\n this.onWidthChanged();\n // the child listeners are not tied to this components life-cycle, as children can get added and removed\n // to the group - hence they are on a different life-cycle. so we must make sure the existing children\n // listeners are removed when we finally get destroyed\n this.addDestroyFunc(this.removeListenersOnChildrenColumns.bind(this));\n };\n GroupWidthFeature.prototype.addListenersToChildrenColumns = function () {\n var _this = this;\n // first destroy any old listeners\n this.removeListenersOnChildrenColumns();\n // now add new listeners to the new set of children\n var widthChangedListener = this.onWidthChanged.bind(this);\n this.columnGroup.getLeafColumns().forEach(function (column) {\n column.addEventListener(Column.EVENT_WIDTH_CHANGED, widthChangedListener);\n column.addEventListener(Column.EVENT_VISIBLE_CHANGED, widthChangedListener);\n _this.removeChildListenersFuncs.push(function () {\n column.removeEventListener(Column.EVENT_WIDTH_CHANGED, widthChangedListener);\n column.removeEventListener(Column.EVENT_VISIBLE_CHANGED, widthChangedListener);\n });\n });\n };\n GroupWidthFeature.prototype.removeListenersOnChildrenColumns = function () {\n this.removeChildListenersFuncs.forEach(function (func) { return func(); });\n this.removeChildListenersFuncs = [];\n };\n GroupWidthFeature.prototype.onDisplayedChildrenChanged = function () {\n this.addListenersToChildrenColumns();\n this.onWidthChanged();\n };\n GroupWidthFeature.prototype.onWidthChanged = function () {\n this.comp.setWidth(this.columnGroup.getActualWidth() + 'px');\n };\n __decorate$_([\n PostConstruct\n ], GroupWidthFeature.prototype, \"postConstruct\", null);\n return GroupWidthFeature;\n}(BeanStub));\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / React / AngularJS / Web Components\n * @version v26.1.0\n * @link http://www.ag-grid.com/\n * @license MIT\n */\nvar __extends$1a = (undefined && undefined.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate$$ = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n 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 HeaderGroupCellCtrl = /** @class */ (function (_super) {\n __extends$1a(HeaderGroupCellCtrl, _super);\n function HeaderGroupCellCtrl(columnGroup, parentRowCtrl) {\n var _this = _super.call(this, columnGroup, parentRowCtrl) || this;\n _this.columnGroup = columnGroup;\n return _this;\n }\n HeaderGroupCellCtrl.prototype.setComp = function (comp, eGui, eResize) {\n _super.prototype.setGui.call(this, eGui);\n this.comp = comp;\n this.displayName = this.columnModel.getDisplayNameForColumnGroup(this.columnGroup, 'header');\n this.addClasses();\n this.addAttributes();\n this.setupMovingCss();\n this.setupExpandable();\n this.setupTooltip();\n this.setupUserComp();\n var pinned = this.getParentRowCtrl().getPinned();\n var leafCols = this.columnGroup.getOriginalColumnGroup().getLeafColumns();\n this.createManagedBean(new HoverFeature(leafCols, eGui));\n this.createManagedBean(new SetLeftFeature(this.columnGroup, eGui, this.beans));\n this.createManagedBean(new GroupResizeFeature(comp, eResize, pinned, this.columnGroup));\n this.createManagedBean(new GroupWidthFeature(comp, this.columnGroup));\n this.createManagedBean(new ManagedFocusFeature(eGui, {\n shouldStopEventPropagation: this.shouldStopEventPropagation.bind(this),\n onTabKeyDown: function () { return undefined; },\n handleKeyDown: this.handleKeyDown.bind(this),\n onFocusIn: this.onFocusIn.bind(this)\n }));\n };\n HeaderGroupCellCtrl.prototype.setupUserComp = function () {\n var _this = this;\n var displayName = this.displayName;\n var params = {\n displayName: this.displayName,\n columnGroup: this.columnGroup,\n setExpanded: function (expanded) {\n _this.columnModel.setColumnGroupOpened(_this.columnGroup.getOriginalColumnGroup(), expanded, \"gridInitializing\");\n },\n api: this.gridApi,\n columnApi: this.columnApi,\n context: this.gridOptionsWrapper.getContext()\n };\n if (!displayName) {\n var columnGroup = this.columnGroup;\n var leafCols = columnGroup.getLeafColumns();\n // find the top most column group that represents the same columns. so if we are dragging a group, we also\n // want to visually show the parent groups dragging for the same column set. for example imaging 5 levels\n // of grouping, with each group only containing the next group, and the last group containing three columns,\n // then when you move any group (even the lowest level group) you are in-fact moving all the groups, as all\n // the groups represent the same column set.\n while (columnGroup.getParent() && columnGroup.getParent().getLeafColumns().length === leafCols.length) {\n columnGroup = columnGroup.getParent();\n }\n var colGroupDef = columnGroup.getColGroupDef();\n if (colGroupDef) {\n displayName = colGroupDef.headerName;\n }\n if (!displayName) {\n displayName = leafCols ? this.columnModel.getDisplayNameForColumn(leafCols[0], 'header', true) : '';\n }\n }\n var compDetails = this.userComponentFactory.getHeaderGroupCompDetails(params);\n this.comp.setUserCompDetails(compDetails);\n };\n HeaderGroupCellCtrl.prototype.setupTooltip = function () {\n var _this = this;\n var colGroupDef = this.columnGroup.getColGroupDef();\n var tooltipCtrl = {\n getColumn: function () { return _this.columnGroup; },\n getGui: function () { return _this.eGui; },\n getLocation: function () { return 'headerGroup'; },\n getTooltipValue: function () { return colGroupDef && colGroupDef.headerTooltip; }\n };\n if (colGroupDef) {\n tooltipCtrl.getColDef = function () { return colGroupDef; };\n }\n var tooltipFeature = this.createManagedBean(new TooltipFeature(tooltipCtrl, this.beans));\n tooltipFeature.setComp(this.comp);\n };\n HeaderGroupCellCtrl.prototype.setupExpandable = function () {\n var providedColGroup = this.columnGroup.getOriginalColumnGroup();\n this.refreshExpanded();\n this.addManagedListener(providedColGroup, ProvidedColumnGroup.EVENT_EXPANDABLE_CHANGED, this.refreshExpanded.bind(this));\n this.addManagedListener(providedColGroup, ProvidedColumnGroup.EVENT_EXPANDED_CHANGED, this.refreshExpanded.bind(this));\n };\n HeaderGroupCellCtrl.prototype.refreshExpanded = function () {\n var column = this.columnGroup;\n this.expandable = column.isExpandable();\n var expanded = column.isExpanded();\n if (this.expandable) {\n this.comp.setAriaExpanded(expanded ? 'true' : 'false');\n }\n else {\n this.comp.setAriaExpanded(undefined);\n }\n };\n HeaderGroupCellCtrl.prototype.addAttributes = function () {\n this.comp.setColId(this.columnGroup.getUniqueId());\n };\n HeaderGroupCellCtrl.prototype.addClasses = function () {\n var _this = this;\n var colGroupDef = this.columnGroup.getColGroupDef();\n var classes = CssClassApplier.getHeaderClassesFromColDef(colGroupDef, this.gridOptionsWrapper, null, this.columnGroup);\n // having different classes below allows the style to not have a bottom border\n // on the group header, if no group is specified\n classes.push(this.columnGroup.isPadding() ? \"ag-header-group-cell-no-group\" : \"ag-header-group-cell-with-group\");\n classes.forEach(function (c) { return _this.comp.addOrRemoveCssClass(c, true); });\n };\n HeaderGroupCellCtrl.prototype.setupMovingCss = function () {\n var _this = this;\n var providedColumnGroup = this.columnGroup.getOriginalColumnGroup();\n var leafColumns = providedColumnGroup.getLeafColumns();\n // this function adds or removes the moving css, based on if the col is moving.\n // this is what makes the header go dark when it is been moved (gives impression to\n // user that the column was picked up).\n var listener = function () { return _this.comp.addOrRemoveCssClass('ag-header-cell-moving', _this.columnGroup.isMoving()); };\n leafColumns.forEach(function (col) {\n _this.addManagedListener(col, Column.EVENT_MOVING_CHANGED, listener);\n });\n listener();\n };\n HeaderGroupCellCtrl.prototype.onFocusIn = function (e) {\n if (!this.eGui.contains(e.relatedTarget)) {\n var rowIndex = this.getRowIndex();\n this.beans.focusService.setFocusedHeader(rowIndex, this.columnGroup);\n }\n };\n HeaderGroupCellCtrl.prototype.handleKeyDown = function (e) {\n var activeEl = document.activeElement;\n var wrapperHasFocus = activeEl === this.eGui;\n if (!this.expandable || !wrapperHasFocus) {\n return;\n }\n if (e.keyCode === KeyCode.ENTER) {\n var column = this.columnGroup;\n var newExpandedValue = !column.isExpanded();\n this.columnModel.setColumnGroupOpened(column.getOriginalColumnGroup(), newExpandedValue, \"uiColumnExpanded\");\n }\n };\n // unlike columns, this will only get called once, as we don't react on props on column groups\n // (we will always destroy and recreate this comp if something changes)\n HeaderGroupCellCtrl.prototype.setDragSource = function (eHeaderGroup) {\n var _this = this;\n if (this.isSuppressMoving()) {\n return;\n }\n var allLeafColumns = this.columnGroup.getOriginalColumnGroup().getLeafColumns();\n var dragSource = {\n type: exports.DragSourceType.HeaderCell,\n eElement: eHeaderGroup,\n defaultIconName: DragAndDropService.ICON_HIDE,\n dragItemName: this.displayName,\n // we add in the original group leaf columns, so we move both visible and non-visible items\n getDragItem: this.getDragItemForGroup.bind(this),\n onDragStarted: function () { return allLeafColumns.forEach(function (col) { return col.setMoving(true, \"uiColumnDragged\"); }); },\n onDragStopped: function () { return allLeafColumns.forEach(function (col) { return col.setMoving(false, \"uiColumnDragged\"); }); }\n };\n this.dragAndDropService.addDragSource(dragSource, true);\n this.addDestroyFunc(function () { return _this.dragAndDropService.removeDragSource(dragSource); });\n };\n // when moving the columns, we want to move all the columns (contained within the DragItem) in this group in one go,\n // and in the order they are currently in the screen.\n HeaderGroupCellCtrl.prototype.getDragItemForGroup = function () {\n var allColumnsOriginalOrder = this.columnGroup.getOriginalColumnGroup().getLeafColumns();\n // capture visible state, used when re-entering grid to dictate which columns should be visible\n var visibleState = {};\n allColumnsOriginalOrder.forEach(function (column) { return visibleState[column.getId()] = column.isVisible(); });\n var allColumnsCurrentOrder = [];\n this.columnModel.getAllDisplayedColumns().forEach(function (column) {\n if (allColumnsOriginalOrder.indexOf(column) >= 0) {\n allColumnsCurrentOrder.push(column);\n removeFromArray(allColumnsOriginalOrder, column);\n }\n });\n // we are left with non-visible columns, stick these in at the end\n allColumnsOriginalOrder.forEach(function (column) { return allColumnsCurrentOrder.push(column); });\n // create and return dragItem\n return {\n columns: allColumnsCurrentOrder,\n visibleState: visibleState\n };\n };\n HeaderGroupCellCtrl.prototype.isSuppressMoving = function () {\n // if any child is fixed, then don't allow moving\n var childSuppressesMoving = false;\n this.columnGroup.getLeafColumns().forEach(function (column) {\n if (column.getColDef().suppressMovable || column.getColDef().lockPosition) {\n childSuppressesMoving = true;\n }\n });\n var result = childSuppressesMoving || this.gridOptionsWrapper.isSuppressMovableColumns();\n return result;\n };\n __decorate$$([\n Autowired('beans')\n ], HeaderGroupCellCtrl.prototype, \"beans\", void 0);\n __decorate$$([\n Autowired('columnModel')\n ], HeaderGroupCellCtrl.prototype, \"columnModel\", void 0);\n __decorate$$([\n Autowired('dragAndDropService')\n ], HeaderGroupCellCtrl.prototype, \"dragAndDropService\", void 0);\n __decorate$$([\n Autowired('userComponentFactory')\n ], HeaderGroupCellCtrl.prototype, \"userComponentFactory\", void 0);\n __decorate$$([\n Autowired('gridApi')\n ], HeaderGroupCellCtrl.prototype, \"gridApi\", void 0);\n __decorate$$([\n Autowired('columnApi')\n ], HeaderGroupCellCtrl.prototype, \"columnApi\", void 0);\n return HeaderGroupCellCtrl;\n}(AbstractHeaderCellCtrl));\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / React / AngularJS / Web Components\n * @version v26.1.0\n * @link http://www.ag-grid.com/\n * @license MIT\n */\nvar __extends$1b = (undefined && undefined.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate$10 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n 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;\nvar HeaderRowCtrl = /** @class */ (function (_super) {\n __extends$1b(HeaderRowCtrl, _super);\n function HeaderRowCtrl(rowIndex, pinned, type) {\n var _this = _super.call(this) || this;\n _this.instanceId = instanceIdSequence$4++;\n _this.headerCellCtrls = {};\n _this.rowIndex = rowIndex;\n _this.pinned = pinned;\n _this.type = type;\n return _this;\n }\n HeaderRowCtrl.prototype.getInstanceId = function () {\n return this.instanceId;\n };\n HeaderRowCtrl.prototype.setComp = function (comp) {\n this.comp = comp;\n this.onRowHeightChanged();\n this.onVirtualColumnsChanged();\n this.setWidth();\n this.addEventListeners();\n if (isBrowserSafari()) {\n // fix for a Safari rendering bug that caused the header to flicker above chart panels\n // as you move the mouse over the header\n this.comp.setTransform('translateZ(0)');\n }\n comp.setAriaRowIndex(this.rowIndex + 1);\n };\n HeaderRowCtrl.prototype.addEventListeners = function () {\n this.addManagedListener(this.eventService, Events.EVENT_COLUMN_RESIZED, this.onColumnResized.bind(this));\n // when print layout changes, it changes what columns are in what section\n this.addManagedListener(this.gridOptionsWrapper, GridOptionsWrapper.PROP_DOM_LAYOUT, this.onDisplayedColumnsChanged.bind(this));\n this.addManagedListener(this.eventService, Events.EVENT_DISPLAYED_COLUMNS_CHANGED, this.onDisplayedColumnsChanged.bind(this));\n this.addManagedListener(this.eventService, Events.EVENT_VIRTUAL_COLUMNS_CHANGED, this.onVirtualColumnsChanged.bind(this));\n this.addManagedListener(this.gridOptionsWrapper, GridOptionsWrapper.PROP_HEADER_HEIGHT, this.onRowHeightChanged.bind(this));\n this.addManagedListener(this.gridOptionsWrapper, GridOptionsWrapper.PROP_PIVOT_HEADER_HEIGHT, this.onRowHeightChanged.bind(this));\n this.addManagedListener(this.gridOptionsWrapper, GridOptionsWrapper.PROP_GROUP_HEADER_HEIGHT, this.onRowHeightChanged.bind(this));\n this.addManagedListener(this.gridOptionsWrapper, GridOptionsWrapper.PROP_PIVOT_GROUP_HEADER_HEIGHT, this.onRowHeightChanged.bind(this));\n this.addManagedListener(this.gridOptionsWrapper, GridOptionsWrapper.PROP_FLOATING_FILTERS_HEIGHT, this.onRowHeightChanged.bind(this));\n };\n HeaderRowCtrl.prototype.getHtmlElementForColumnHeader = function (column) {\n if (this.type != exports.HeaderRowType.COLUMN) {\n return;\n }\n var cellCtrl = find(this.headerCellCtrls, function (cellCtrl) { return cellCtrl.getColumnGroupChild() == column; });\n if (!cellCtrl) {\n return;\n }\n var res = cellCtrl.getGui();\n return res;\n };\n HeaderRowCtrl.prototype.onDisplayedColumnsChanged = function () {\n this.onVirtualColumnsChanged();\n this.setWidth();\n };\n HeaderRowCtrl.prototype.getType = function () {\n return this.type;\n };\n HeaderRowCtrl.prototype.onColumnResized = function () {\n this.setWidth();\n };\n HeaderRowCtrl.prototype.setWidth = function () {\n var width = this.getWidthForRow();\n this.comp.setWidth(width + 'px');\n };\n HeaderRowCtrl.prototype.getWidthForRow = function () {\n var printLayout = this.gridOptionsWrapper.getDomLayout() === Constants.DOM_LAYOUT_PRINT;\n if (printLayout) {\n var pinned = this.pinned != null;\n if (pinned) {\n return 0;\n }\n return this.columnModel.getContainerWidth(Constants.PINNED_RIGHT)\n + this.columnModel.getContainerWidth(Constants.PINNED_LEFT)\n + this.columnModel.getContainerWidth(null);\n }\n // if not printing, just return the width as normal\n return this.columnModel.getContainerWidth(this.pinned);\n };\n HeaderRowCtrl.prototype.onRowHeightChanged = function () {\n var headerRowCount = this.columnModel.getHeaderRowCount();\n var sizes = [];\n var numberOfFloating = 0;\n var groupHeight;\n var headerHeight;\n if (this.columnModel.isPivotMode()) {\n groupHeight = this.gridOptionsWrapper.getPivotGroupHeaderHeight();\n headerHeight = this.gridOptionsWrapper.getPivotHeaderHeight();\n }\n else {\n if (this.columnModel.hasFloatingFilters()) {\n headerRowCount++;\n numberOfFloating = 1;\n }\n groupHeight = this.gridOptionsWrapper.getGroupHeaderHeight();\n headerHeight = this.gridOptionsWrapper.getHeaderHeight();\n }\n var numberOfNonGroups = 1 + numberOfFloating;\n var numberOfGroups = headerRowCount - numberOfNonGroups;\n for (var i = 0; i < numberOfGroups; i++) {\n sizes.push(groupHeight);\n }\n sizes.push(headerHeight);\n for (var i = 0; i < numberOfFloating; i++) {\n sizes.push(this.gridOptionsWrapper.getFloatingFiltersHeight());\n }\n var rowHeight = 0;\n for (var i = 0; i < this.rowIndex; i++) {\n rowHeight += sizes[i];\n }\n this.comp.setTop(rowHeight + 'px');\n this.comp.setHeight(sizes[this.rowIndex] + 'px');\n };\n HeaderRowCtrl.prototype.getPinned = function () {\n return this.pinned;\n };\n HeaderRowCtrl.prototype.getRowIndex = function () {\n return this.rowIndex;\n };\n HeaderRowCtrl.prototype.onVirtualColumnsChanged = function () {\n var _this = this;\n var oldCtrls = this.headerCellCtrls;\n this.headerCellCtrls = {};\n var columns = this.getColumnsInViewport();\n columns.forEach(function (child) {\n // skip groups that have no displayed children. this can happen when the group is broken,\n // and this section happens to have nothing to display for the open / closed state.\n // (a broken group is one that is split, ie columns in the group have a non-group column\n // in between them)\n if (child.isEmptyGroup()) {\n return;\n }\n var idOfChild = child.getUniqueId();\n // if we already have this cell rendered, do nothing\n var headerCtrl = oldCtrls[idOfChild];\n delete oldCtrls[idOfChild];\n // it's possible there is a new Column with the same ID, but it's for a different Column.\n // this is common with pivoting, where the pivot cols change, but the id's are still pivot_0,\n // pivot_1 etc. so if new col but same ID, need to remove the old col here first as we are\n // about to replace it in the this.headerComps map.\n var forOldColumn = headerCtrl && headerCtrl.getColumnGroupChild() != child;\n if (forOldColumn) {\n _this.destroyBean(headerCtrl);\n headerCtrl = undefined;\n }\n if (headerCtrl == null) {\n switch (_this.type) {\n case exports.HeaderRowType.FLOATING_FILTER:\n headerCtrl = _this.createBean(new HeaderFilterCellCtrl(child, _this));\n break;\n case exports.HeaderRowType.COLUMN_GROUP:\n headerCtrl = _this.createBean(new HeaderGroupCellCtrl(child, _this));\n break;\n default:\n headerCtrl = _this.createBean(new HeaderCellCtrl(child, _this));\n break;\n }\n }\n _this.headerCellCtrls[idOfChild] = headerCtrl;\n });\n // we want to keep columns that are focused, otherwise keyboard navigation breaks\n var isFocusedAndDisplayed = function (ctrl) {\n var isFocused = _this.focusService.isHeaderWrapperFocused(ctrl);\n if (!isFocused) {\n return false;\n }\n var isDisplayed = _this.columnModel.isDisplayed(ctrl.getColumnGroupChild());\n return isDisplayed;\n };\n iterateObject(oldCtrls, function (id, oldCtrl) {\n var keepCtrl = isFocusedAndDisplayed(oldCtrl);\n if (keepCtrl) {\n _this.headerCellCtrls[id] = oldCtrl;\n }\n else {\n _this.destroyBean(oldCtrl);\n }\n });\n var ctrlsToDisplay = getAllValuesInObject(this.headerCellCtrls);\n this.comp.setHeaderCtrls(ctrlsToDisplay);\n };\n HeaderRowCtrl.prototype.getColumnsInViewport = function () {\n var printLayout = this.gridOptionsWrapper.getDomLayout() === Constants.DOM_LAYOUT_PRINT;\n return printLayout ? this.getColumnsInViewportPrintLayout() : this.getColumnsInViewportNormalLayout();\n };\n HeaderRowCtrl.prototype.getColumnsInViewportPrintLayout = function () {\n var _this = this;\n // for print layout, we add all columns into the center\n if (this.pinned != null) {\n return [];\n }\n var viewportColumns = [];\n var actualDepth = this.getActualDepth();\n [Constants.PINNED_LEFT, null, Constants.PINNED_RIGHT].forEach(function (pinned) {\n var items = _this.columnModel.getVirtualHeaderGroupRow(pinned, actualDepth);\n viewportColumns = viewportColumns.concat(items);\n });\n return viewportColumns;\n };\n HeaderRowCtrl.prototype.getActualDepth = function () {\n return this.type == exports.HeaderRowType.FLOATING_FILTER ? this.rowIndex - 1 : this.rowIndex;\n };\n HeaderRowCtrl.prototype.getColumnsInViewportNormalLayout = function () {\n // when in normal layout, we add the columns for that container only\n return this.columnModel.getVirtualHeaderGroupRow(this.pinned, this.getActualDepth());\n };\n HeaderRowCtrl.prototype.focusHeader = function (column) {\n var allCtrls = getAllValuesInObject(this.headerCellCtrls);\n var ctrl = find(allCtrls, function (ctrl) { return ctrl.getColumnGroupChild() == column; });\n if (!ctrl) {\n return false;\n }\n ctrl.focus();\n return true;\n };\n __decorate$10([\n Autowired('columnModel')\n ], HeaderRowCtrl.prototype, \"columnModel\", void 0);\n __decorate$10([\n Autowired('focusService')\n ], HeaderRowCtrl.prototype, \"focusService\", void 0);\n return HeaderRowCtrl;\n}(BeanStub));\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / React / AngularJS / Web Components\n * @version v26.1.0\n * @link http://www.ag-grid.com/\n * @license MIT\n */\nvar __extends$1c = (undefined && undefined.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate$11 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n 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 __spreadArrays$7 = (undefined && undefined.__spreadArrays) || function () {\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\n r[k] = a[j];\n return r;\n};\nvar HeaderRowContainerCtrl = /** @class */ (function (_super) {\n __extends$1c(HeaderRowContainerCtrl, _super);\n function HeaderRowContainerCtrl(pinned) {\n var _this = _super.call(this) || this;\n _this.groupsRowCtrls = [];\n _this.pinned = pinned;\n return _this;\n }\n HeaderRowContainerCtrl.prototype.setComp = function (comp, eGui) {\n this.comp = comp;\n this.setupCenterWidth();\n this.setupPinnedWidth();\n this.setupDragAndDrop(eGui);\n this.addManagedListener(this.eventService, Events.EVENT_GRID_COLUMNS_CHANGED, this.onGridColumnsChanged.bind(this));\n this.ctrlsService.registerHeaderContainer(this, this.pinned);\n if (this.columnModel.isReady()) {\n this.refresh();\n }\n };\n HeaderRowContainerCtrl.prototype.setupDragAndDrop = function (dropContainer) {\n var bodyDropTarget = new BodyDropTarget(this.pinned, dropContainer);\n this.createManagedBean(bodyDropTarget);\n };\n HeaderRowContainerCtrl.prototype.refresh = function (keepColumns) {\n var _this = this;\n if (keepColumns === void 0) { keepColumns = false; }\n var sequence = new NumberSequence();\n var focusedHeaderPosition = this.focusService.getFocusHeaderToUseAfterRefresh();\n var refreshColumnGroups = function () {\n var groupRowCount = _this.columnModel.getHeaderRowCount() - 1;\n _this.groupsRowCtrls = _this.destroyBeans(_this.groupsRowCtrls);\n for (var i = 0; i < groupRowCount; i++) {\n var ctrl = _this.createBean(new HeaderRowCtrl(sequence.next(), _this.pinned, exports.HeaderRowType.COLUMN_GROUP));\n _this.groupsRowCtrls.push(ctrl);\n }\n };\n var refreshColumns = function () {\n var rowIndex = sequence.next();\n var needNewInstance = _this.columnsRowCtrl == null || !keepColumns || _this.columnsRowCtrl.getRowIndex() !== rowIndex;\n if (needNewInstance) {\n _this.destroyBean(_this.columnsRowCtrl);\n _this.columnsRowCtrl = _this.createBean(new HeaderRowCtrl(rowIndex, _this.pinned, exports.HeaderRowType.COLUMN));\n }\n };\n var refreshFilters = function () {\n var includeFloatingFilter = !_this.columnModel.isPivotMode() && _this.columnModel.hasFloatingFilters();\n var destroyPreviousComp = function () {\n _this.filtersRowCtrl = _this.destroyBean(_this.filtersRowCtrl);\n };\n if (!includeFloatingFilter) {\n destroyPreviousComp();\n return;\n }\n var rowIndex = sequence.next();\n if (_this.filtersRowCtrl) {\n var rowIndexMismatch = _this.filtersRowCtrl.getRowIndex() !== rowIndex;\n if (!keepColumns || rowIndexMismatch) {\n destroyPreviousComp();\n }\n }\n if (!_this.filtersRowCtrl) {\n _this.filtersRowCtrl = _this.createBean(new HeaderRowCtrl(rowIndex, _this.pinned, exports.HeaderRowType.FLOATING_FILTER));\n }\n };\n refreshColumnGroups();\n refreshColumns();\n refreshFilters();\n var allCtrls = this.getAllCtrls();\n this.comp.setCtrls(allCtrls);\n this.restoreFocusOnHeader(focusedHeaderPosition);\n };\n HeaderRowContainerCtrl.prototype.restoreFocusOnHeader = function (position) {\n if (position == null || position.column.getPinned() != this.pinned) {\n return;\n }\n this.focusService.focusHeaderPosition(position);\n };\n HeaderRowContainerCtrl.prototype.getAllCtrls = function () {\n var res = __spreadArrays$7(this.groupsRowCtrls, [this.columnsRowCtrl]);\n if (this.filtersRowCtrl) {\n res.push(this.filtersRowCtrl);\n }\n return res;\n };\n // grid cols have changed - this also means the number of rows in the header can have\n // changed. so we remove all the old rows and insert new ones for a complete refresh\n HeaderRowContainerCtrl.prototype.onGridColumnsChanged = function () {\n this.refresh(true);\n };\n HeaderRowContainerCtrl.prototype.setupCenterWidth = function () {\n var _this = this;\n if (this.pinned != null) {\n return;\n }\n this.createManagedBean(new CenterWidthFeature(function (width) { return _this.comp.setCenterWidth(width + \"px\"); }));\n };\n HeaderRowContainerCtrl.prototype.setHorizontalScroll = function (offset) {\n this.comp.setContainerTransform(\"translateX(\" + offset + \"px)\");\n };\n HeaderRowContainerCtrl.prototype.setupPinnedWidth = function () {\n var _this = this;\n if (this.pinned == null) {\n return;\n }\n var pinningLeft = this.pinned === Constants.PINNED_LEFT;\n var pinningRight = this.pinned === Constants.PINNED_RIGHT;\n var listener = function () {\n var width = pinningLeft ? _this.pinnedWidthService.getPinnedLeftWidth() : _this.pinnedWidthService.getPinnedRightWidth();\n if (width == null) {\n return;\n } // can happen at initialisation, width not yet set\n var hidden = width == 0;\n var isRtl = _this.gridOptionsWrapper.isEnableRtl();\n var scrollbarWidth = _this.gridOptionsWrapper.getScrollbarWidth();\n // if there is a scroll showing (and taking up space, so Windows, and not iOS)\n // in the body, then we add extra space to keep header aligned with the body,\n // as body width fits the cols and the scrollbar\n var addPaddingForScrollbar = _this.scrollVisibleService.isVerticalScrollShowing() && ((isRtl && pinningLeft) || (!isRtl && pinningRight));\n var widthWithPadding = addPaddingForScrollbar ? width + scrollbarWidth : width;\n _this.comp.setPinnedContainerWidth(widthWithPadding + 'px');\n _this.comp.addOrRemoveCssClass('ag-hidden', hidden);\n };\n this.addManagedListener(this.eventService, Events.EVENT_LEFT_PINNED_WIDTH_CHANGED, listener);\n this.addManagedListener(this.eventService, Events.EVENT_RIGHT_PINNED_WIDTH_CHANGED, listener);\n this.addManagedListener(this.eventService, Events.EVENT_SCROLL_VISIBILITY_CHANGED, listener);\n this.addManagedListener(this.eventService, Events.EVENT_SCROLLBAR_WIDTH_CHANGED, listener);\n };\n HeaderRowContainerCtrl.prototype.getHtmlElementForColumnHeader = function (column) {\n if (this.columnsRowCtrl) {\n return this.columnsRowCtrl.getHtmlElementForColumnHeader(column);\n }\n };\n HeaderRowContainerCtrl.prototype.getRowType = function (rowIndex) {\n var allCtrls = this.getAllCtrls();\n var ctrl = allCtrls[rowIndex];\n return ctrl ? ctrl.getType() : undefined;\n };\n HeaderRowContainerCtrl.prototype.focusHeader = function (rowIndex, column) {\n var allCtrls = this.getAllCtrls();\n var ctrl = allCtrls[rowIndex];\n if (!ctrl) {\n return false;\n }\n return ctrl.focusHeader(column);\n };\n HeaderRowContainerCtrl.prototype.getRowCount = function () {\n return this.getAllCtrls().length;\n };\n __decorate$11([\n Autowired('ctrlsService')\n ], HeaderRowContainerCtrl.prototype, \"ctrlsService\", void 0);\n __decorate$11([\n Autowired('scrollVisibleService')\n ], HeaderRowContainerCtrl.prototype, \"scrollVisibleService\", void 0);\n __decorate$11([\n Autowired('pinnedWidthService')\n ], HeaderRowContainerCtrl.prototype, \"pinnedWidthService\", void 0);\n __decorate$11([\n Autowired('columnModel')\n ], HeaderRowContainerCtrl.prototype, \"columnModel\", void 0);\n __decorate$11([\n Autowired('focusService')\n ], HeaderRowContainerCtrl.prototype, \"focusService\", void 0);\n return HeaderRowContainerCtrl;\n}(BeanStub));\n\n/**\n * @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / React / AngularJS / Web Components\n * @version v26.1.0\n * @link http://www.ag-grid.com/\n * @license MIT\n */\nvar __extends$1d = (undefined && undefined.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __decorate$12 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n 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 HeaderRowContainerComp = /** @class */ (function (_super) {\n __extends$1d(HeaderRowContainerComp, _super);\n function HeaderRowContainerComp(pinned) {\n var _this = _super.call(this) || this;\n _this.headerRowComps = {};\n _this.rowCompsList = [];\n _this.pinned = pinned;\n return _this;\n }\n HeaderRowContainerComp.prototype.init = function () {\n var _this = this;\n this.selectAndSetTemplate();\n var compProxy = {\n addOrRemoveCssClass: function (cssClassName, on) { return _this.addOrRemoveCssClass(cssClassName, on); },\n setCtrls: function (ctrls) { return _this.setCtrls(ctrls); },\n // only gets called for center section\n setCenterWidth: function (width) { return _this.eCenterContainer.style.width = width; },\n setContainerTransform: function (transform) { return _this.eCenterContainer.style.transform = transform; },\n // only gets called for pinned sections\n setPinnedContainerWidth: function (width) {\n var eGui = _this.getGui();\n eGui.style.width = width;\n eGui.style.maxWidth = width;\n eGui.style.minWidth = width;\n }\n };\n var ctrl = this.createManagedBean(new HeaderRowContainerCtrl(this.pinned));\n ctrl.setComp(compProxy, this.getGui());\n };\n HeaderRowContainerComp.prototype.selectAndSetTemplate = function () {\n var pinnedLeft = this.pinned == Constants.PINNED_LEFT;\n var pinnedRight = this.pinned == Constants.PINNED_RIGHT;\n var template = pinnedLeft ? HeaderRowContainerComp.PINNED_LEFT_TEMPLATE :\n pinnedRight ? HeaderRowContainerComp.PINNED_RIGHT_TEMPLATE : HeaderRowContainerComp.CENTER_TEMPLATE;\n this.setTemplate(template);\n // for left and right, we add rows directly to the root element,\n // but for center container we add elements to the child container.\n this.eRowContainer = this.eCenterContainer ? this.eCenterContainer : this.getGui();\n };\n HeaderRowContainerComp.prototype.destroyRowComps = function () {\n this.setCtrls([]);\n };\n HeaderRowContainerComp.prototype.destroyRowComp = function (rowComp) {\n this.destroyBean(rowComp);\n this.eRowContainer.removeChild(rowComp.getGui());\n };\n HeaderRowContainerComp.prototype.setCtrls = function (ctrls) {\n var _this = this;\n var oldRowComps = this.headerRowComps;\n this.headerRowComps = {};\n this.rowCompsList = [];\n var prevGui;\n var appendEnsuringDomOrder = function (rowComp) {\n var eGui = rowComp.getGui();\n var notAlreadyIn = eGui.parentElement != _this.eRowContainer;\n if (notAlreadyIn) {\n _this.eRowContainer.appendChild(eGui);\n }\n if (prevGui) {\n ensureDomOrder(_this.eRowContainer, eGui, prevGui);\n }\n prevGui = eGui;\n };\n ctrls.forEach(function (ctrl) {\n var ctrlId = ctrl.getInstanceId();\n var existingComp = oldRowComps[ctrlId];\n delete oldRowComps[ctrlId];\n var rowComp = existingComp ? existingComp : _this.createBean(new HeaderRowComp(ctrl));\n _this.headerRowComps[ctrlId] = rowComp;\n _this.rowCompsList.push(rowComp);\n appendEnsuringDomOrder(rowComp);\n });\n getAllValuesInObject(oldRowComps).forEach(function (c) { return _this.destroyRowComp(c); });\n };\n HeaderRowContainerComp.PINNED_LEFT_TEMPLATE = \"