Hacked By AnonymousFox
{"version":3,"sources":["<anon>"],"sourcesContent":["/**\n * @license Highcharts JS v12.1.2 (2025-01-09)\n * @module highcharts/modules/data-tools\n * @requires highcharts\n *\n * Highcharts\n *\n * (c) 2010-2024 Highsoft AS\n *\n * License: www.highcharts.com/license\n */\n(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory(root[\"_Highcharts\"]);\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine(\"highcharts/modules/data-tools\", [\"highcharts/highcharts\"], function (amd1) {return factory(amd1);});\n\telse if(typeof exports === 'object')\n\t\texports[\"highcharts/modules/data-tools\"] = factory(root[\"_Highcharts\"]);\n\telse\n\t\troot[\"Highcharts\"] = factory(root[\"Highcharts\"]);\n})(typeof window === 'undefined' ? this : window, (__WEBPACK_EXTERNAL_MODULE__944__) => {\nreturn /******/ (() => { // webpackBootstrap\n/******/ \t\"use strict\";\n/******/ \tvar __webpack_modules__ = ({\n\n/***/ 944:\n/***/ ((module) => {\n\nmodule.exports = __WEBPACK_EXTERNAL_MODULE__944__;\n\n/***/ })\n\n/******/ \t});\n/************************************************************************/\n/******/ \t// The module cache\n/******/ \tvar __webpack_module_cache__ = {};\n/******/ \t\n/******/ \t// The require function\n/******/ \tfunction __webpack_require__(moduleId) {\n/******/ \t\t// Check if module is in cache\n/******/ \t\tvar cachedModule = __webpack_module_cache__[moduleId];\n/******/ \t\tif (cachedModule !== undefined) {\n/******/ \t\t\treturn cachedModule.exports;\n/******/ \t\t}\n/******/ \t\t// Create a new module (and put it into the cache)\n/******/ \t\tvar module = __webpack_module_cache__[moduleId] = {\n/******/ \t\t\t// no module.id needed\n/******/ \t\t\t// no module.loaded needed\n/******/ \t\t\texports: {}\n/******/ \t\t};\n/******/ \t\n/******/ \t\t// Execute the module function\n/******/ \t\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n/******/ \t\n/******/ \t\t// Return the exports of the module\n/******/ \t\treturn module.exports;\n/******/ \t}\n/******/ \t\n/************************************************************************/\n/******/ \t/* webpack/runtime/compat get default export */\n/******/ \t(() => {\n/******/ \t\t// getDefaultExport function for compatibility with non-harmony modules\n/******/ \t\t__webpack_require__.n = (module) => {\n/******/ \t\t\tvar getter = module && module.__esModule ?\n/******/ \t\t\t\t() => (module['default']) :\n/******/ \t\t\t\t() => (module);\n/******/ \t\t\t__webpack_require__.d(getter, { a: getter });\n/******/ \t\t\treturn getter;\n/******/ \t\t};\n/******/ \t})();\n/******/ \t\n/******/ \t/* webpack/runtime/define property getters */\n/******/ \t(() => {\n/******/ \t\t// define getter functions for harmony exports\n/******/ \t\t__webpack_require__.d = (exports, definition) => {\n/******/ \t\t\tfor(var key in definition) {\n/******/ \t\t\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n/******/ \t\t\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n/******/ \t\t\t\t}\n/******/ \t\t\t}\n/******/ \t\t};\n/******/ \t})();\n/******/ \t\n/******/ \t/* webpack/runtime/hasOwnProperty shorthand */\n/******/ \t(() => {\n/******/ \t\t__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))\n/******/ \t})();\n/******/ \t\n/************************************************************************/\nvar __webpack_exports__ = {};\n\n// EXPORTS\n__webpack_require__.d(__webpack_exports__, {\n \"default\": () => (/* binding */ data_tools_src)\n});\n\n// EXTERNAL MODULE: external {\"amd\":[\"highcharts/highcharts\"],\"commonjs\":[\"highcharts\"],\"commonjs2\":[\"highcharts\"],\"root\":[\"Highcharts\"]}\nvar highcharts_commonjs_highcharts_commonjs2_highcharts_root_Highcharts_ = __webpack_require__(944);\nvar highcharts_commonjs_highcharts_commonjs2_highcharts_root_Highcharts_default = /*#__PURE__*/__webpack_require__.n(highcharts_commonjs_highcharts_commonjs2_highcharts_root_Highcharts_);\n;// ./code/es-modules/Data/Modifiers/DataModifier.js\n/* *\n *\n * (c) 2009-2024 Highsoft AS\n *\n * License: www.highcharts.com/license\n *\n * !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!\n *\n * Authors:\n * - Sophie Bremer\n * - Gøran Slettemark\n *\n * */\n\n\nconst { addEvent, fireEvent, merge } = (highcharts_commonjs_highcharts_commonjs2_highcharts_root_Highcharts_default());\n/* *\n *\n * Class\n *\n * */\n/**\n * Abstract class to provide an interface for modifying a table.\n *\n */\nclass DataModifier {\n /* *\n *\n * Functions\n *\n * */\n /**\n * Runs a timed execution of the modifier on the given datatable.\n * Can be configured to run multiple times.\n *\n * @param {DataTable} dataTable\n * The datatable to execute\n *\n * @param {DataModifier.BenchmarkOptions} options\n * Options. Currently supports `iterations` for number of iterations.\n *\n * @return {Array<number>}\n * An array of times in milliseconds\n *\n */\n benchmark(dataTable, options) {\n const results = [];\n const modifier = this;\n const execute = () => {\n modifier.modifyTable(dataTable);\n modifier.emit({\n type: 'afterBenchmarkIteration'\n });\n };\n const defaultOptions = {\n iterations: 1\n };\n const { iterations } = merge(defaultOptions, options);\n modifier.on('afterBenchmarkIteration', () => {\n if (results.length === iterations) {\n modifier.emit({\n type: 'afterBenchmark',\n results\n });\n return;\n }\n // Run again\n execute();\n });\n const times = {\n startTime: 0,\n endTime: 0\n };\n // Add timers\n modifier.on('modify', () => {\n times.startTime = window.performance.now();\n });\n modifier.on('afterModify', () => {\n times.endTime = window.performance.now();\n results.push(times.endTime - times.startTime);\n });\n // Initial run\n execute();\n return results;\n }\n /**\n * Emits an event on the modifier to all registered callbacks of this event.\n *\n * @param {DataModifier.Event} [e]\n * Event object containing additonal event information.\n */\n emit(e) {\n fireEvent(this, e.type, e);\n }\n /**\n * Returns a modified copy of the given table.\n *\n * @param {Highcharts.DataTable} table\n * Table to modify.\n *\n * @param {DataEvent.Detail} [eventDetail]\n * Custom information for pending events.\n *\n * @return {Promise<Highcharts.DataTable>}\n * Table with `modified` property as a reference.\n */\n modify(table, eventDetail) {\n const modifier = this;\n return new Promise((resolve, reject) => {\n if (table.modified === table) {\n table.modified = table.clone(false, eventDetail);\n }\n try {\n resolve(modifier.modifyTable(table, eventDetail));\n }\n catch (e) {\n modifier.emit({\n type: 'error',\n detail: eventDetail,\n table\n });\n reject(e);\n }\n });\n }\n /**\n * Applies partial modifications of a cell change to the property `modified`\n * of the given modified table.\n *\n * @param {Highcharts.DataTable} table\n * Modified table.\n *\n * @param {string} columnName\n * Column name of changed cell.\n *\n * @param {number|undefined} rowIndex\n * Row index of changed cell.\n *\n * @param {Highcharts.DataTableCellType} cellValue\n * Changed cell value.\n *\n * @param {Highcharts.DataTableEventDetail} [eventDetail]\n * Custom information for pending events.\n *\n * @return {Highcharts.DataTable}\n * Table with `modified` property as a reference.\n */\n modifyCell(table, \n /* eslint-disable @typescript-eslint/no-unused-vars */\n columnName, rowIndex, cellValue, eventDetail\n /* eslint-enable @typescript-eslint/no-unused-vars */\n ) {\n return this.modifyTable(table);\n }\n /**\n * Applies partial modifications of column changes to the property\n * `modified` of the given table.\n *\n * @param {Highcharts.DataTable} table\n * Modified table.\n *\n * @param {Highcharts.DataTableColumnCollection} columns\n * Changed columns as a collection, where the keys are the column names.\n *\n * @param {number} [rowIndex=0]\n * Index of the first changed row.\n *\n * @param {Highcharts.DataTableEventDetail} [eventDetail]\n * Custom information for pending events.\n *\n * @return {Highcharts.DataTable}\n * Table with `modified` property as a reference.\n */\n modifyColumns(table, \n /* eslint-disable @typescript-eslint/no-unused-vars */\n columns, rowIndex, eventDetail\n /* eslint-enable @typescript-eslint/no-unused-vars */\n ) {\n return this.modifyTable(table);\n }\n /**\n * Applies partial modifications of row changes to the property `modified`\n * of the given table.\n *\n * @param {Highcharts.DataTable} table\n * Modified table.\n *\n * @param {Array<(Highcharts.DataTableRow|Highcharts.DataTableRowObject)>} rows\n * Changed rows.\n *\n * @param {number} [rowIndex]\n * Index of the first changed row.\n *\n * @param {Highcharts.DataTableEventDetail} [eventDetail]\n * Custom information for pending events.\n *\n * @return {Highcharts.DataTable}\n * Table with `modified` property as a reference.\n */\n modifyRows(table, \n /* eslint-disable @typescript-eslint/no-unused-vars */\n rows, rowIndex, eventDetail\n /* eslint-enable @typescript-eslint/no-unused-vars */\n ) {\n return this.modifyTable(table);\n }\n /**\n * Registers a callback for a specific modifier event.\n *\n * @param {string} type\n * Event type as a string.\n *\n * @param {DataEventEmitter.Callback} callback\n * Function to register for an modifier callback.\n *\n * @return {Function}\n * Function to unregister callback from the modifier event.\n */\n on(type, callback) {\n return addEvent(this, type, callback);\n }\n}\n/* *\n *\n * Class Namespace\n *\n * */\n/**\n * Additionally provided types for modifier events and options.\n */\n(function (DataModifier) {\n /* *\n *\n * Declarations\n *\n * */\n /* *\n *\n * Constants\n *\n * */\n /**\n * Registry as a record object with modifier names and their class\n * constructor.\n */\n DataModifier.types = {};\n /* *\n *\n * Functions\n *\n * */\n /**\n * Adds a modifier class to the registry. The modifier class has to provide\n * the `DataModifier.options` property and the `DataModifier.modifyTable`\n * method to modify the table.\n *\n * @private\n *\n * @param {string} key\n * Registry key of the modifier class.\n *\n * @param {DataModifierType} DataModifierClass\n * Modifier class (aka class constructor) to register.\n *\n * @return {boolean}\n * Returns true, if the registration was successful. False is returned, if\n * their is already a modifier registered with this key.\n */\n function registerType(key, DataModifierClass) {\n return (!!key &&\n !DataModifier.types[key] &&\n !!(DataModifier.types[key] = DataModifierClass));\n }\n DataModifier.registerType = registerType;\n})(DataModifier || (DataModifier = {}));\n/* *\n *\n * Default Export\n *\n * */\n/* harmony default export */ const Modifiers_DataModifier = (DataModifier);\n\n;// ./code/es-modules/Data/DataTableCore.js\n/* *\n *\n * (c) 2009-2024 Highsoft AS\n *\n * License: www.highcharts.com/license\n *\n * !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!\n *\n * Authors:\n * - Sophie Bremer\n * - Gøran Slettemark\n * - Torstein Hønsi\n *\n * */\n\n\nconst { fireEvent: DataTableCore_fireEvent, isArray, objectEach, uniqueKey } = (highcharts_commonjs_highcharts_commonjs2_highcharts_root_Highcharts_default());\n/* *\n *\n * Class\n *\n * */\n/**\n * Class to manage columns and rows in a table structure. It provides methods\n * to add, remove, and manipulate columns and rows, as well as to retrieve data\n * from specific cells.\n *\n * @class\n * @name Highcharts.DataTable\n *\n * @param {Highcharts.DataTableOptions} [options]\n * Options to initialize the new DataTable instance.\n */\nclass DataTableCore {\n /**\n * Constructs an instance of the DataTable class.\n *\n * @example\n * const dataTable = new Highcharts.DataTableCore({\n * columns: {\n * year: [2020, 2021, 2022, 2023],\n * cost: [11, 13, 12, 14],\n * revenue: [12, 15, 14, 18]\n * }\n * });\n\n *\n * @param {Highcharts.DataTableOptions} [options]\n * Options to initialize the new DataTable instance.\n */\n constructor(options = {}) {\n /**\n * Whether the ID was automatic generated or given in the constructor.\n *\n * @name Highcharts.DataTable#autoId\n * @type {boolean}\n */\n this.autoId = !options.id;\n this.columns = {};\n /**\n * ID of the table for indentification purposes.\n *\n * @name Highcharts.DataTable#id\n * @type {string}\n */\n this.id = (options.id || uniqueKey());\n this.modified = this;\n this.rowCount = 0;\n this.versionTag = uniqueKey();\n let rowCount = 0;\n objectEach(options.columns || {}, (column, columnName) => {\n this.columns[columnName] = column.slice();\n rowCount = Math.max(rowCount, column.length);\n });\n this.applyRowCount(rowCount);\n }\n /* *\n *\n * Functions\n *\n * */\n /**\n * Applies a row count to the table by setting the `rowCount` property and\n * adjusting the length of all columns.\n *\n * @private\n * @param {number} rowCount The new row count.\n */\n applyRowCount(rowCount) {\n this.rowCount = rowCount;\n objectEach(this.columns, (column) => {\n if (isArray(column)) { // Not on typed array\n column.length = rowCount;\n }\n });\n }\n /**\n * Fetches the given column by the canonical column name. Simplified version\n * of the full `DataTable.getRow` method, always returning by reference.\n *\n * @param {string} columnName\n * Name of the column to get.\n *\n * @return {Highcharts.DataTableColumn|undefined}\n * A copy of the column, or `undefined` if not found.\n */\n getColumn(columnName, \n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n asReference) {\n return this.columns[columnName];\n }\n /**\n * Retrieves all or the given columns. Simplified version of the full\n * `DataTable.getColumns` method, always returning by reference.\n *\n * @param {Array<string>} [columnNames]\n * Column names to retrieve.\n *\n * @return {Highcharts.DataTableColumnCollection}\n * Collection of columns. If a requested column was not found, it is\n * `undefined`.\n */\n getColumns(columnNames, \n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n asReference) {\n return (columnNames || Object.keys(this.columns)).reduce((columns, columnName) => {\n columns[columnName] = this.columns[columnName];\n return columns;\n }, {});\n }\n /**\n * Retrieves the row at a given index.\n *\n * @param {number} rowIndex\n * Row index to retrieve. First row has index 0.\n *\n * @param {Array<string>} [columnNames]\n * Column names to retrieve.\n *\n * @return {Record<string, number|string|undefined>|undefined}\n * Returns the row values, or `undefined` if not found.\n */\n getRow(rowIndex, columnNames) {\n return (columnNames || Object.keys(this.columns)).map((key) => this.columns[key]?.[rowIndex]);\n }\n /**\n * Sets cell values for a column. Will insert a new column, if not found.\n *\n * @param {string} columnName\n * Column name to set.\n *\n * @param {Highcharts.DataTableColumn} [column]\n * Values to set in the column.\n *\n * @param {number} [rowIndex=0]\n * Index of the first row to change. (Default: 0)\n *\n * @param {Record<string, (boolean|number|string|null|undefined)>} [eventDetail]\n * Custom information for pending events.\n *\n * @emits #setColumns\n * @emits #afterSetColumns\n */\n setColumn(columnName, column = [], rowIndex = 0, eventDetail) {\n this.setColumns({ [columnName]: column }, rowIndex, eventDetail);\n }\n /**\n * * Sets cell values for multiple columns. Will insert new columns, if not\n * found. Simplified version of the full `DataTable.setColumns`, limited to\n * full replacement of the columns (undefined `rowIndex`).\n *\n * @param {Highcharts.DataTableColumnCollection} columns\n * Columns as a collection, where the keys are the column names.\n *\n * @param {number} [rowIndex]\n * Index of the first row to change. Keep undefined to reset.\n *\n * @param {Record<string, (boolean|number|string|null|undefined)>} [eventDetail]\n * Custom information for pending events.\n *\n * @emits #setColumns\n * @emits #afterSetColumns\n */\n setColumns(columns, rowIndex, eventDetail) {\n let rowCount = this.rowCount;\n objectEach(columns, (column, columnName) => {\n this.columns[columnName] = column.slice();\n rowCount = column.length;\n });\n this.applyRowCount(rowCount);\n if (!eventDetail?.silent) {\n DataTableCore_fireEvent(this, 'afterSetColumns');\n this.versionTag = uniqueKey();\n }\n }\n /**\n * Sets cell values of a row. Will insert a new row if no index was\n * provided, or if the index is higher than the total number of table rows.\n * A simplified version of the full `DateTable.setRow`, limited to objects.\n *\n * @param {Record<string, number|string|undefined>} row\n * Cell values to set.\n *\n * @param {number} [rowIndex]\n * Index of the row to set. Leave `undefind` to add as a new row.\n *\n * @param {boolean} [insert]\n * Whether to insert the row at the given index, or to overwrite the row.\n *\n * @param {Record<string, (boolean|number|string|null|undefined)>} [eventDetail]\n * Custom information for pending events.\n *\n * @emits #afterSetRows\n */\n setRow(row, rowIndex = this.rowCount, insert, eventDetail) {\n const { columns } = this, indexRowCount = insert ? this.rowCount + 1 : rowIndex + 1;\n objectEach(row, (cellValue, columnName) => {\n const column = columns[columnName] ||\n eventDetail?.addColumns !== false && new Array(indexRowCount);\n if (column) {\n if (insert) {\n column.splice(rowIndex, 0, cellValue);\n }\n else {\n column[rowIndex] = cellValue;\n }\n columns[columnName] = column;\n }\n });\n if (indexRowCount > this.rowCount) {\n this.applyRowCount(indexRowCount);\n }\n if (!eventDetail?.silent) {\n DataTableCore_fireEvent(this, 'afterSetRows');\n this.versionTag = uniqueKey();\n }\n }\n}\n/* *\n *\n * Default Export\n *\n * */\n/* harmony default export */ const Data_DataTableCore = (DataTableCore);\n/* *\n *\n * API Declarations\n *\n * */\n/**\n * A column of values in a data table.\n * @typedef {Array<boolean|null|number|string|undefined>} Highcharts.DataTableColumn\n */ /**\n* A collection of data table columns defined by a object where the key is the\n* column name and the value is an array of the column values.\n* @typedef {Record<string, Highcharts.DataTableColumn>} Highcharts.DataTableColumnCollection\n*/\n/**\n * Options for the `DataTable` or `DataTableCore` classes.\n * @interface Highcharts.DataTableOptions\n */ /**\n* The column options for the data table. The columns are defined by an object\n* where the key is the column ID and the value is an array of the column\n* values.\n*\n* @name Highcharts.DataTableOptions.columns\n* @type {Highcharts.DataTableColumnCollection|undefined}\n*/ /**\n* Custom ID to identify the new DataTable instance.\n*\n* @name Highcharts.DataTableOptions.id\n* @type {string|undefined}\n*/\n(''); // Keeps doclets above in JS file\n\n;// ./code/es-modules/Data/DataTable.js\n/* *\n *\n * (c) 2009-2024 Highsoft AS\n *\n * License: www.highcharts.com/license\n *\n * !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!\n *\n * Authors:\n * - Sophie Bremer\n * - Gøran Slettemark\n * - Jomar Hønsi\n * - Dawid Dragula\n *\n * */\n\n\n\nconst { addEvent: DataTable_addEvent, defined, fireEvent: DataTable_fireEvent, extend, uniqueKey: DataTable_uniqueKey } = (highcharts_commonjs_highcharts_commonjs2_highcharts_root_Highcharts_default());\n/* *\n *\n * Class\n *\n * */\n/**\n * Class to manage columns and rows in a table structure. It provides methods\n * to add, remove, and manipulate columns and rows, as well as to retrieve data\n * from specific cells.\n *\n * @class\n * @name Highcharts.DataTable\n *\n * @param {Highcharts.DataTableOptions} [options]\n * Options to initialize the new DataTable instance.\n */\nclass DataTable extends Data_DataTableCore {\n /* *\n *\n * Static Functions\n *\n * */\n /**\n * Tests whether a row contains only `null` values or is equal to\n * DataTable.NULL. If all columns have `null` values, the function returns\n * `true`. Otherwise, it returns `false` to indicate that the row contains\n * at least one non-null value.\n *\n * @function Highcharts.DataTable.isNull\n *\n * @param {Highcharts.DataTableRow|Highcharts.DataTableRowObject} row\n * Row to test.\n *\n * @return {boolean}\n * Returns `true`, if the row contains only null, otherwise `false`.\n *\n * @example\n * if (DataTable.isNull(row)) {\n * // handle null row\n * }\n */\n static isNull(row) {\n if (row === DataTable.NULL) {\n return true;\n }\n if (row instanceof Array) {\n if (!row.length) {\n return false;\n }\n for (let i = 0, iEnd = row.length; i < iEnd; ++i) {\n if (row[i] !== null) {\n return false;\n }\n }\n }\n else {\n const columnNames = Object.keys(row);\n if (!columnNames.length) {\n return false;\n }\n for (let i = 0, iEnd = columnNames.length; i < iEnd; ++i) {\n if (row[columnNames[i]] !== null) {\n return false;\n }\n }\n }\n return true;\n }\n /* *\n *\n * Constructor\n *\n * */\n constructor(options = {}) {\n super(options);\n this.modified = this;\n }\n /* *\n *\n * Functions\n *\n * */\n /**\n * Returns a clone of this table. The cloned table is completely independent\n * of the original, and any changes made to the clone will not affect\n * the original table.\n *\n * @function Highcharts.DataTable#clone\n *\n * @param {boolean} [skipColumns]\n * Whether to clone columns or not.\n *\n * @param {Highcharts.DataTableEventDetail} [eventDetail]\n * Custom information for pending events.\n *\n * @return {Highcharts.DataTable}\n * Clone of this data table.\n *\n * @emits #cloneTable\n * @emits #afterCloneTable\n */\n clone(skipColumns, eventDetail) {\n const table = this, tableOptions = {};\n table.emit({ type: 'cloneTable', detail: eventDetail });\n if (!skipColumns) {\n tableOptions.columns = table.columns;\n }\n if (!table.autoId) {\n tableOptions.id = table.id;\n }\n const tableClone = new DataTable(tableOptions);\n if (!skipColumns) {\n tableClone.versionTag = table.versionTag;\n tableClone.originalRowIndexes = table.originalRowIndexes;\n tableClone.localRowIndexes = table.localRowIndexes;\n }\n table.emit({\n type: 'afterCloneTable',\n detail: eventDetail,\n tableClone\n });\n return tableClone;\n }\n /**\n * Deletes columns from the table.\n *\n * @function Highcharts.DataTable#deleteColumns\n *\n * @param {Array<string>} [columnNames]\n * Names of columns to delete. If no array is provided, all\n * columns will be deleted.\n *\n * @param {Highcharts.DataTableEventDetail} [eventDetail]\n * Custom information for pending events.\n *\n * @return {Highcharts.DataTableColumnCollection|undefined}\n * Returns the deleted columns, if found.\n *\n * @emits #deleteColumns\n * @emits #afterDeleteColumns\n */\n deleteColumns(columnNames, eventDetail) {\n const table = this, columns = table.columns, deletedColumns = {}, modifiedColumns = {}, modifier = table.modifier, rowCount = table.rowCount;\n columnNames = (columnNames || Object.keys(columns));\n if (columnNames.length) {\n table.emit({\n type: 'deleteColumns',\n columnNames,\n detail: eventDetail\n });\n for (let i = 0, iEnd = columnNames.length, column, columnName; i < iEnd; ++i) {\n columnName = columnNames[i];\n column = columns[columnName];\n if (column) {\n deletedColumns[columnName] = column;\n modifiedColumns[columnName] = new Array(rowCount);\n }\n delete columns[columnName];\n }\n if (!Object.keys(columns).length) {\n table.rowCount = 0;\n this.deleteRowIndexReferences();\n }\n if (modifier) {\n modifier.modifyColumns(table, modifiedColumns, 0, eventDetail);\n }\n table.emit({\n type: 'afterDeleteColumns',\n columns: deletedColumns,\n columnNames,\n detail: eventDetail\n });\n return deletedColumns;\n }\n }\n /**\n * Deletes the row index references. This is useful when the original table\n * is deleted, and the references are no longer needed. This table is\n * then considered an original table or a table that has the same row's\n * order as the original table.\n */\n deleteRowIndexReferences() {\n delete this.originalRowIndexes;\n delete this.localRowIndexes;\n // Here, in case of future need, can be implemented updating of the\n // modified tables' row indexes references.\n }\n /**\n * Deletes rows in this table.\n *\n * @function Highcharts.DataTable#deleteRows\n *\n * @param {number} [rowIndex]\n * Index to start delete of rows. If not specified, all rows will be\n * deleted.\n *\n * @param {number} [rowCount=1]\n * Number of rows to delete.\n *\n * @param {Highcharts.DataTableEventDetail} [eventDetail]\n * Custom information for pending events.\n *\n * @return {Array<Highcharts.DataTableRow>}\n * Returns the deleted rows, if found.\n *\n * @emits #deleteRows\n * @emits #afterDeleteRows\n */\n deleteRows(rowIndex, rowCount = 1, eventDetail) {\n const table = this, deletedRows = [], modifiedRows = [], modifier = table.modifier;\n table.emit({\n type: 'deleteRows',\n detail: eventDetail,\n rowCount,\n rowIndex: (rowIndex || 0)\n });\n if (typeof rowIndex === 'undefined') {\n rowIndex = 0;\n rowCount = table.rowCount;\n }\n if (rowCount > 0 && rowIndex < table.rowCount) {\n const columns = table.columns, columnNames = Object.keys(columns);\n for (let i = 0, iEnd = columnNames.length, column, deletedCells; i < iEnd; ++i) {\n column = columns[columnNames[i]];\n deletedCells = column.splice(rowIndex, rowCount);\n if (!i) {\n table.rowCount = column.length;\n }\n for (let j = 0, jEnd = deletedCells.length; j < jEnd; ++j) {\n deletedRows[j] = (deletedRows[j] || []);\n deletedRows[j][i] = deletedCells[j];\n }\n modifiedRows.push(new Array(iEnd));\n }\n }\n if (modifier) {\n modifier.modifyRows(table, modifiedRows, (rowIndex || 0), eventDetail);\n }\n table.emit({\n type: 'afterDeleteRows',\n detail: eventDetail,\n rowCount,\n rowIndex: (rowIndex || 0),\n rows: deletedRows\n });\n return deletedRows;\n }\n /**\n * Emits an event on this table to all registered callbacks of the given\n * event.\n * @private\n *\n * @param {DataTable.Event} e\n * Event object with event information.\n */\n emit(e) {\n if ([\n 'afterDeleteColumns',\n 'afterDeleteRows',\n 'afterSetCell',\n 'afterSetColumns',\n 'afterSetRows'\n ].includes(e.type)) {\n this.versionTag = DataTable_uniqueKey();\n }\n DataTable_fireEvent(this, e.type, e);\n }\n /**\n * Fetches a single cell value.\n *\n * @function Highcharts.DataTable#getCell\n *\n * @param {string} columnName\n * Column name of the cell to retrieve.\n *\n * @param {number} rowIndex\n * Row index of the cell to retrieve.\n *\n * @return {Highcharts.DataTableCellType|undefined}\n * Returns the cell value or `undefined`.\n */\n getCell(columnName, rowIndex) {\n const table = this;\n const column = table.columns[columnName];\n if (column) {\n return column[rowIndex];\n }\n }\n /**\n * Fetches a cell value for the given row as a boolean.\n *\n * @function Highcharts.DataTable#getCellAsBoolean\n *\n * @param {string} columnName\n * Column name to fetch.\n *\n * @param {number} rowIndex\n * Row index to fetch.\n *\n * @return {boolean}\n * Returns the cell value of the row as a boolean.\n */\n getCellAsBoolean(columnName, rowIndex) {\n const table = this;\n const column = table.columns[columnName];\n return !!(column && column[rowIndex]);\n }\n /**\n * Fetches a cell value for the given row as a number.\n *\n * @function Highcharts.DataTable#getCellAsNumber\n *\n * @param {string} columnName\n * Column name or to fetch.\n *\n * @param {number} rowIndex\n * Row index to fetch.\n *\n * @param {boolean} [useNaN]\n * Whether to return NaN instead of `null` and `undefined`.\n *\n * @return {number|null}\n * Returns the cell value of the row as a number.\n */\n getCellAsNumber(columnName, rowIndex, useNaN) {\n const table = this;\n const column = table.columns[columnName];\n let cellValue = (column && column[rowIndex]);\n switch (typeof cellValue) {\n case 'boolean':\n return (cellValue ? 1 : 0);\n case 'number':\n return (isNaN(cellValue) && !useNaN ? null : cellValue);\n }\n cellValue = parseFloat(`${cellValue ?? ''}`);\n return (isNaN(cellValue) && !useNaN ? null : cellValue);\n }\n /**\n * Fetches a cell value for the given row as a string.\n *\n * @function Highcharts.DataTable#getCellAsString\n *\n * @param {string} columnName\n * Column name to fetch.\n *\n * @param {number} rowIndex\n * Row index to fetch.\n *\n * @return {string}\n * Returns the cell value of the row as a string.\n */\n getCellAsString(columnName, rowIndex) {\n const table = this;\n const column = table.columns[columnName];\n // eslint-disable-next-line @typescript-eslint/restrict-template-expressions\n return `${(column && column[rowIndex])}`;\n }\n /**\n * Fetches the given column by the canonical column name.\n * This function is a simplified wrap of {@link getColumns}.\n *\n * @function Highcharts.DataTable#getColumn\n *\n * @param {string} columnName\n * Name of the column to get.\n *\n * @param {boolean} [asReference]\n * Whether to return the column as a readonly reference.\n *\n * @return {Highcharts.DataTableColumn|undefined}\n * A copy of the column, or `undefined` if not found.\n */\n getColumn(columnName, asReference) {\n return this.getColumns([columnName], asReference)[columnName];\n }\n /**\n * Fetches the given column by the canonical column name, and\n * validates the type of the first few cells. If the first defined cell is\n * of type number, it assumes for performance reasons, that all cells are of\n * type number or `null`. Otherwise it will convert all cells to number\n * type, except `null`.\n *\n * @function Highcharts.DataTable#getColumnAsNumbers\n *\n * @param {string} columnName\n * Name of the column to get.\n *\n * @param {boolean} [useNaN]\n * Whether to use NaN instead of `null` and `undefined`.\n *\n * @return {Array<(number|null)>}\n * A copy of the column, or an empty array if not found.\n */\n getColumnAsNumbers(columnName, useNaN) {\n const table = this, columns = table.columns;\n const column = columns[columnName], columnAsNumber = [];\n if (column) {\n const columnLength = column.length;\n if (useNaN) {\n for (let i = 0; i < columnLength; ++i) {\n columnAsNumber.push(table.getCellAsNumber(columnName, i, true));\n }\n }\n else {\n for (let i = 0, cellValue; i < columnLength; ++i) {\n cellValue = column[i];\n if (typeof cellValue === 'number') {\n // Assume unmixed data for performance reasons\n return column.slice();\n }\n if (cellValue !== null &&\n typeof cellValue !== 'undefined') {\n break;\n }\n }\n for (let i = 0; i < columnLength; ++i) {\n columnAsNumber.push(table.getCellAsNumber(columnName, i));\n }\n }\n }\n return columnAsNumber;\n }\n /**\n * Fetches all column names.\n *\n * @function Highcharts.DataTable#getColumnNames\n *\n * @return {Array<string>}\n * Returns all column names.\n */\n getColumnNames() {\n const table = this, columnNames = Object.keys(table.columns);\n return columnNames;\n }\n /**\n * Retrieves all or the given columns.\n *\n * @function Highcharts.DataTable#getColumns\n *\n * @param {Array<string>} [columnNames]\n * Column names to retrieve.\n *\n * @param {boolean} [asReference]\n * Whether to return columns as a readonly reference.\n *\n * @return {Highcharts.DataTableColumnCollection}\n * Collection of columns. If a requested column was not found, it is\n * `undefined`.\n */\n getColumns(columnNames, asReference) {\n const table = this, tableColumns = table.columns, columns = {};\n columnNames = (columnNames || Object.keys(tableColumns));\n for (let i = 0, iEnd = columnNames.length, column, columnName; i < iEnd; ++i) {\n columnName = columnNames[i];\n column = tableColumns[columnName];\n if (column) {\n columns[columnName] = (asReference ? column : column.slice());\n }\n }\n return columns;\n }\n /**\n * Takes the original row index and returns the local row index in the\n * modified table for which this function is called.\n *\n * @param {number} originalRowIndex\n * Original row index to get the local row index for.\n *\n * @return {number|undefined}\n * Returns the local row index or `undefined` if not found.\n */\n getLocalRowIndex(originalRowIndex) {\n const { localRowIndexes } = this;\n if (localRowIndexes) {\n return localRowIndexes[originalRowIndex];\n }\n return originalRowIndex;\n }\n /**\n * Retrieves the modifier for the table.\n * @private\n *\n * @return {Highcharts.DataModifier|undefined}\n * Returns the modifier or `undefined`.\n */\n getModifier() {\n return this.modifier;\n }\n /**\n * Takes the local row index and returns the index of the corresponding row\n * in the original table.\n *\n * @param {number} rowIndex\n * Local row index to get the original row index for.\n *\n * @return {number|undefined}\n * Returns the original row index or `undefined` if not found.\n */\n getOriginalRowIndex(rowIndex) {\n const { originalRowIndexes } = this;\n if (originalRowIndexes) {\n return originalRowIndexes[rowIndex];\n }\n return rowIndex;\n }\n /**\n * Retrieves the row at a given index. This function is a simplified wrap of\n * {@link getRows}.\n *\n * @function Highcharts.DataTable#getRow\n *\n * @param {number} rowIndex\n * Row index to retrieve. First row has index 0.\n *\n * @param {Array<string>} [columnNames]\n * Column names in order to retrieve.\n *\n * @return {Highcharts.DataTableRow}\n * Returns the row values, or `undefined` if not found.\n */\n getRow(rowIndex, columnNames) {\n return this.getRows(rowIndex, 1, columnNames)[0];\n }\n /**\n * Returns the number of rows in this table.\n *\n * @function Highcharts.DataTable#getRowCount\n *\n * @return {number}\n * Number of rows in this table.\n */\n getRowCount() {\n // @todo Implement via property getter `.length` browsers supported\n return this.rowCount;\n }\n /**\n * Retrieves the index of the first row matching a specific cell value.\n *\n * @function Highcharts.DataTable#getRowIndexBy\n *\n * @param {string} columnName\n * Column to search in.\n *\n * @param {Highcharts.DataTableCellType} cellValue\n * Cell value to search for. `NaN` and `undefined` are not supported.\n *\n * @param {number} [rowIndexOffset]\n * Index offset to start searching.\n *\n * @return {number|undefined}\n * Index of the first row matching the cell value.\n */\n getRowIndexBy(columnName, cellValue, rowIndexOffset) {\n const table = this;\n const column = table.columns[columnName];\n if (column) {\n const rowIndex = column.indexOf(cellValue, rowIndexOffset);\n if (rowIndex !== -1) {\n return rowIndex;\n }\n }\n }\n /**\n * Retrieves the row at a given index. This function is a simplified wrap of\n * {@link getRowObjects}.\n *\n * @function Highcharts.DataTable#getRowObject\n *\n * @param {number} rowIndex\n * Row index.\n *\n * @param {Array<string>} [columnNames]\n * Column names and their order to retrieve.\n *\n * @return {Highcharts.DataTableRowObject}\n * Returns the row values, or `undefined` if not found.\n */\n getRowObject(rowIndex, columnNames) {\n return this.getRowObjects(rowIndex, 1, columnNames)[0];\n }\n /**\n * Fetches all or a number of rows.\n *\n * @function Highcharts.DataTable#getRowObjects\n *\n * @param {number} [rowIndex]\n * Index of the first row to fetch. Defaults to first row at index `0`.\n *\n * @param {number} [rowCount]\n * Number of rows to fetch. Defaults to maximal number of rows.\n *\n * @param {Array<string>} [columnNames]\n * Column names and their order to retrieve.\n *\n * @return {Highcharts.DataTableRowObject}\n * Returns retrieved rows.\n */\n getRowObjects(rowIndex = 0, rowCount = (this.rowCount - rowIndex), columnNames) {\n const table = this, columns = table.columns, rows = new Array(rowCount);\n columnNames = (columnNames || Object.keys(columns));\n for (let i = rowIndex, i2 = 0, iEnd = Math.min(table.rowCount, (rowIndex + rowCount)), column, row; i < iEnd; ++i, ++i2) {\n row = rows[i2] = {};\n for (const columnName of columnNames) {\n column = columns[columnName];\n row[columnName] = (column ? column[i] : void 0);\n }\n }\n return rows;\n }\n /**\n * Fetches all or a number of rows.\n *\n * @function Highcharts.DataTable#getRows\n *\n * @param {number} [rowIndex]\n * Index of the first row to fetch. Defaults to first row at index `0`.\n *\n * @param {number} [rowCount]\n * Number of rows to fetch. Defaults to maximal number of rows.\n *\n * @param {Array<string>} [columnNames]\n * Column names and their order to retrieve.\n *\n * @return {Highcharts.DataTableRow}\n * Returns retrieved rows.\n */\n getRows(rowIndex = 0, rowCount = (this.rowCount - rowIndex), columnNames) {\n const table = this, columns = table.columns, rows = new Array(rowCount);\n columnNames = (columnNames || Object.keys(columns));\n for (let i = rowIndex, i2 = 0, iEnd = Math.min(table.rowCount, (rowIndex + rowCount)), column, row; i < iEnd; ++i, ++i2) {\n row = rows[i2] = [];\n for (const columnName of columnNames) {\n column = columns[columnName];\n row.push(column ? column[i] : void 0);\n }\n }\n return rows;\n }\n /**\n * Returns the unique version tag of the current state of the table.\n *\n * @function Highcharts.DataTable#getVersionTag\n *\n * @return {string}\n * Unique version tag.\n */\n getVersionTag() {\n return this.versionTag;\n }\n /**\n * Checks for given column names.\n *\n * @function Highcharts.DataTable#hasColumns\n *\n * @param {Array<string>} columnNames\n * Column names to check.\n *\n * @return {boolean}\n * Returns `true` if all columns have been found, otherwise `false`.\n */\n hasColumns(columnNames) {\n const table = this, columns = table.columns;\n for (let i = 0, iEnd = columnNames.length, columnName; i < iEnd; ++i) {\n columnName = columnNames[i];\n if (!columns[columnName]) {\n return false;\n }\n }\n return true;\n }\n /**\n * Searches for a specific cell value.\n *\n * @function Highcharts.DataTable#hasRowWith\n *\n * @param {string} columnName\n * Column to search in.\n *\n * @param {Highcharts.DataTableCellType} cellValue\n * Cell value to search for. `NaN` and `undefined` are not supported.\n *\n * @return {boolean}\n * True, if a row has been found, otherwise false.\n */\n hasRowWith(columnName, cellValue) {\n const table = this;\n const column = table.columns[columnName];\n if (column) {\n return (column.indexOf(cellValue) !== -1);\n }\n return false;\n }\n /**\n * Registers a callback for a specific event.\n *\n * @function Highcharts.DataTable#on\n *\n * @param {string} type\n * Event type as a string.\n *\n * @param {Highcharts.EventCallbackFunction<Highcharts.DataTable>} callback\n * Function to register for an event callback.\n *\n * @return {Function}\n * Function to unregister callback from the event.\n */\n on(type, callback) {\n return DataTable_addEvent(this, type, callback);\n }\n /**\n * Renames a column of cell values.\n *\n * @function Highcharts.DataTable#renameColumn\n *\n * @param {string} columnName\n * Name of the column to be renamed.\n *\n * @param {string} newColumnName\n * New name of the column. An existing column with the same name will be\n * replaced.\n *\n * @return {boolean}\n * Returns `true` if successful, `false` if the column was not found.\n */\n renameColumn(columnName, newColumnName) {\n const table = this, columns = table.columns;\n if (columns[columnName]) {\n if (columnName !== newColumnName) {\n columns[newColumnName] = columns[columnName];\n delete columns[columnName];\n }\n return true;\n }\n return false;\n }\n /**\n * Sets a cell value based on the row index and column. Will\n * insert a new column, if not found.\n *\n * @function Highcharts.DataTable#setCell\n *\n * @param {string} columnName\n * Column name to set.\n *\n * @param {number|undefined} rowIndex\n * Row index to set.\n *\n * @param {Highcharts.DataTableCellType} cellValue\n * Cell value to set.\n *\n * @param {Highcharts.DataTableEventDetail} [eventDetail]\n * Custom information for pending events.\n *\n * @emits #setCell\n * @emits #afterSetCell\n */\n setCell(columnName, rowIndex, cellValue, eventDetail) {\n const table = this, columns = table.columns, modifier = table.modifier;\n let column = columns[columnName];\n if (column && column[rowIndex] === cellValue) {\n return;\n }\n table.emit({\n type: 'setCell',\n cellValue,\n columnName: columnName,\n detail: eventDetail,\n rowIndex\n });\n if (!column) {\n column = columns[columnName] = new Array(table.rowCount);\n }\n if (rowIndex >= table.rowCount) {\n table.rowCount = (rowIndex + 1);\n }\n column[rowIndex] = cellValue;\n if (modifier) {\n modifier.modifyCell(table, columnName, rowIndex, cellValue);\n }\n table.emit({\n type: 'afterSetCell',\n cellValue,\n columnName: columnName,\n detail: eventDetail,\n rowIndex\n });\n }\n /**\n * Sets cell values for multiple columns. Will insert new columns, if not\n * found.\n *\n * @function Highcharts.DataTable#setColumns\n *\n * @param {Highcharts.DataTableColumnCollection} columns\n * Columns as a collection, where the keys are the column names.\n *\n * @param {number} [rowIndex]\n * Index of the first row to change. Keep undefined to reset.\n *\n * @param {Highcharts.DataTableEventDetail} [eventDetail]\n * Custom information for pending events.\n *\n * @emits #setColumns\n * @emits #afterSetColumns\n */\n setColumns(columns, rowIndex, eventDetail) {\n const table = this, tableColumns = table.columns, tableModifier = table.modifier, columnNames = Object.keys(columns);\n let rowCount = table.rowCount;\n table.emit({\n type: 'setColumns',\n columns,\n columnNames,\n detail: eventDetail,\n rowIndex\n });\n if (typeof rowIndex === 'undefined') {\n super.setColumns(columns, rowIndex, extend(eventDetail, { silent: true }));\n }\n else {\n for (let i = 0, iEnd = columnNames.length, column, columnName; i < iEnd; ++i) {\n columnName = columnNames[i];\n column = columns[columnName];\n const tableColumn = (tableColumns[columnName] ?\n tableColumns[columnName] :\n tableColumns[columnName] = new Array(table.rowCount));\n for (let i = (rowIndex || 0), iEnd = column.length; i < iEnd; ++i) {\n tableColumn[i] = column[i];\n }\n rowCount = Math.max(rowCount, tableColumn.length);\n }\n this.applyRowCount(rowCount);\n }\n if (tableModifier) {\n tableModifier.modifyColumns(table, columns, rowIndex || 0);\n }\n table.emit({\n type: 'afterSetColumns',\n columns,\n columnNames,\n detail: eventDetail,\n rowIndex\n });\n }\n /**\n * Sets or unsets the modifier for the table.\n *\n * @param {Highcharts.DataModifier} [modifier]\n * Modifier to set, or `undefined` to unset.\n *\n * @param {Highcharts.DataTableEventDetail} [eventDetail]\n * Custom information for pending events.\n *\n * @return {Promise<Highcharts.DataTable>}\n * Resolves to this table if successful, or rejects on failure.\n *\n * @emits #setModifier\n * @emits #afterSetModifier\n */\n setModifier(modifier, eventDetail) {\n const table = this;\n let promise;\n table.emit({\n type: 'setModifier',\n detail: eventDetail,\n modifier,\n modified: table.modified\n });\n table.modified = table;\n table.modifier = modifier;\n if (modifier) {\n promise = modifier.modify(table);\n }\n else {\n promise = Promise.resolve(table);\n }\n return promise\n .then((table) => {\n table.emit({\n type: 'afterSetModifier',\n detail: eventDetail,\n modifier,\n modified: table.modified\n });\n return table;\n })['catch']((error) => {\n table.emit({\n type: 'setModifierError',\n error,\n modifier,\n modified: table.modified\n });\n throw error;\n });\n }\n /**\n * Sets the original row indexes for the table. It is used to keep the\n * reference to the original rows when modifying the table.\n *\n * @param {Array<number|undefined>} originalRowIndexes\n * Original row indexes array.\n *\n * @param {boolean} omitLocalRowIndexes\n * Whether to omit the local row indexes calculation. Defaults to `false`.\n */\n setOriginalRowIndexes(originalRowIndexes, omitLocalRowIndexes = false) {\n this.originalRowIndexes = originalRowIndexes;\n if (omitLocalRowIndexes) {\n return;\n }\n const modifiedIndexes = this.localRowIndexes = [];\n for (let i = 0, iEnd = originalRowIndexes.length, originalIndex; i < iEnd; ++i) {\n originalIndex = originalRowIndexes[i];\n if (defined(originalIndex)) {\n modifiedIndexes[originalIndex] = i;\n }\n }\n }\n /**\n * Sets cell values of a row. Will insert a new row, if no index was\n * provided, or if the index is higher than the total number of table rows.\n *\n * Note: This function is just a simplified wrap of\n * {@link Highcharts.DataTable#setRows}.\n *\n * @function Highcharts.DataTable#setRow\n *\n * @param {Highcharts.DataTableRow|Highcharts.DataTableRowObject} row\n * Cell values to set.\n *\n * @param {number} [rowIndex]\n * Index of the row to set. Leave `undefind` to add as a new row.\n *\n * @param {boolean} [insert]\n * Whether to insert the row at the given index, or to overwrite the row.\n *\n * @param {Highcharts.DataTableEventDetail} [eventDetail]\n * Custom information for pending events.\n *\n * @emits #setRows\n * @emits #afterSetRows\n */\n setRow(row, rowIndex, insert, eventDetail) {\n this.setRows([row], rowIndex, insert, eventDetail);\n }\n /**\n * Sets cell values for multiple rows. Will insert new rows, if no index was\n * was provided, or if the index is higher than the total number of table\n * rows.\n *\n * @function Highcharts.DataTable#setRows\n *\n * @param {Array<(Highcharts.DataTableRow|Highcharts.DataTableRowObject)>} rows\n * Row values to set.\n *\n * @param {number} [rowIndex]\n * Index of the first row to set. Leave `undefined` to add as new rows.\n *\n * @param {boolean} [insert]\n * Whether to insert the row at the given index, or to overwrite the row.\n *\n * @param {Highcharts.DataTableEventDetail} [eventDetail]\n * Custom information for pending events.\n *\n * @emits #setRows\n * @emits #afterSetRows\n */\n setRows(rows, rowIndex = this.rowCount, insert, eventDetail) {\n const table = this, columns = table.columns, columnNames = Object.keys(columns), modifier = table.modifier, rowCount = rows.length;\n table.emit({\n type: 'setRows',\n detail: eventDetail,\n rowCount,\n rowIndex,\n rows\n });\n for (let i = 0, i2 = rowIndex, row; i < rowCount; ++i, ++i2) {\n row = rows[i];\n if (row === DataTable.NULL) {\n for (let j = 0, jEnd = columnNames.length; j < jEnd; ++j) {\n if (insert) {\n columns[columnNames[j]].splice(i2, 0, null);\n }\n else {\n columns[columnNames[j]][i2] = null;\n }\n }\n }\n else if (row instanceof Array) {\n for (let j = 0, jEnd = columnNames.length; j < jEnd; ++j) {\n columns[columnNames[j]][i2] = row[j];\n }\n }\n else {\n super.setRow(row, i2, void 0, { silent: true });\n }\n }\n const indexRowCount = insert ?\n rowCount + rows.length :\n rowIndex + rowCount;\n if (indexRowCount > table.rowCount) {\n table.rowCount = indexRowCount;\n for (let i = 0, iEnd = columnNames.length; i < iEnd; ++i) {\n columns[columnNames[i]].length = indexRowCount;\n }\n }\n if (modifier) {\n modifier.modifyRows(table, rows, rowIndex);\n }\n table.emit({\n type: 'afterSetRows',\n detail: eventDetail,\n rowCount,\n rowIndex,\n rows\n });\n }\n}\n/* *\n *\n * Static Properties\n *\n * */\n/**\n * Null state for a row record. In some cases, a row in a table may not\n * contain any data or may be invalid. In these cases, a null state can be\n * used to indicate that the row record is empty or invalid.\n *\n * @name Highcharts.DataTable.NULL\n * @type {Highcharts.DataTableRowObject}\n *\n * @see {@link Highcharts.DataTable.isNull} for a null test.\n *\n * @example\n * table.setRows([DataTable.NULL, DataTable.NULL], 10);\n */\nDataTable.NULL = {};\n/**\n * Semantic version string of the DataTable class.\n * @internal\n */\nDataTable.version = '1.0.0';\n/* *\n *\n * Default Export\n *\n * */\n/* harmony default export */ const Data_DataTable = (DataTable);\n\n;// ./code/es-modules/Data/Connectors/DataConnector.js\n/* *\n *\n * (c) 2009-2024 Highsoft AS\n *\n * License: www.highcharts.com/license\n *\n * !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!\n *\n * Authors:\n * - Sophie Bremer\n * - Wojciech Chmiel\n * - Gøran Slettemark\n *\n * */\n\n\n\n\nconst { addEvent: DataConnector_addEvent, fireEvent: DataConnector_fireEvent, merge: DataConnector_merge, pick } = (highcharts_commonjs_highcharts_commonjs2_highcharts_root_Highcharts_default());\n/* *\n *\n * Class\n *\n * */\n/**\n * Abstract class providing an interface for managing a DataConnector.\n *\n * @private\n */\nclass DataConnector {\n /* *\n *\n * Constructor\n *\n * */\n /**\n * Constructor for the connector class.\n *\n * @param {DataConnector.UserOptions} [options]\n * Options to use in the connector.\n */\n constructor(options = {}) {\n this.table = new Data_DataTable(options.dataTable);\n this.metadata = options.metadata || { columns: {} };\n }\n /**\n * Poll timer ID, if active.\n */\n get polling() {\n return !!this.polling;\n }\n /* *\n *\n * Functions\n *\n * */\n /**\n * Method for adding metadata for a single column.\n *\n * @param {string} name\n * The name of the column to be described.\n *\n * @param {DataConnector.MetaColumn} columnMeta\n * The metadata to apply to the column.\n */\n describeColumn(name, columnMeta) {\n const connector = this, columns = connector.metadata.columns;\n columns[name] = DataConnector_merge(columns[name] || {}, columnMeta);\n }\n /**\n * Method for applying columns meta information to the whole DataConnector.\n *\n * @param {Highcharts.Dictionary<DataConnector.MetaColumn>} columns\n * Pairs of column names and MetaColumn objects.\n */\n describeColumns(columns) {\n const connector = this, columnNames = Object.keys(columns);\n let columnName;\n while (typeof (columnName = columnNames.pop()) === 'string') {\n connector.describeColumn(columnName, columns[columnName]);\n }\n }\n /**\n * Emits an event on the connector to all registered callbacks of this\n * event.\n *\n * @param {DataConnector.Event} [e]\n * Event object containing additional event information.\n */\n emit(e) {\n DataConnector_fireEvent(this, e.type, e);\n }\n /**\n * Returns the order of columns.\n *\n * @param {boolean} [usePresentationState]\n * Whether to use the column order of the presentation state of the table.\n *\n * @return {Array<string>|undefined}\n * Order of columns.\n */\n getColumnOrder(\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n usePresentationState) {\n const connector = this, columns = connector.metadata.columns, names = Object.keys(columns || {});\n if (names.length) {\n return names.sort((a, b) => (pick(columns[a].index, 0) - pick(columns[b].index, 0)));\n }\n }\n /**\n * Retrieves the columns of the dataTable,\n * applies column order from meta.\n *\n * @param {boolean} [usePresentationOrder]\n * Whether to use the column order of the presentation state of the table.\n *\n * @return {Highcharts.DataTableColumnCollection}\n * An object with the properties `columnNames` and `columnValues`\n */\n getSortedColumns(usePresentationOrder) {\n return this.table.getColumns(this.getColumnOrder(usePresentationOrder));\n }\n /**\n * The default load method, which fires the `afterLoad` event\n *\n * @return {Promise<DataConnector>}\n * The loaded connector.\n *\n * @emits DataConnector#afterLoad\n */\n load() {\n DataConnector_fireEvent(this, 'afterLoad', { table: this.table });\n return Promise.resolve(this);\n }\n /**\n * Registers a callback for a specific connector event.\n *\n * @param {string} type\n * Event type as a string.\n *\n * @param {DataEventEmitter.Callback} callback\n * Function to register for the connector callback.\n *\n * @return {Function}\n * Function to unregister callback from the connector event.\n */\n on(type, callback) {\n return DataConnector_addEvent(this, type, callback);\n }\n /**\n * The default save method, which fires the `afterSave` event.\n *\n * @return {Promise<DataConnector>}\n * The saved connector.\n *\n * @emits DataConnector#afterSave\n * @emits DataConnector#saveError\n */\n save() {\n DataConnector_fireEvent(this, 'saveError', { table: this.table });\n return Promise.reject(new Error('Not implemented'));\n }\n /**\n * Sets the index and order of columns.\n *\n * @param {Array<string>} columnNames\n * Order of columns.\n */\n setColumnOrder(columnNames) {\n const connector = this;\n for (let i = 0, iEnd = columnNames.length; i < iEnd; ++i) {\n connector.describeColumn(columnNames[i], { index: i });\n }\n }\n setModifierOptions(modifierOptions) {\n const ModifierClass = (modifierOptions &&\n Modifiers_DataModifier.types[modifierOptions.type]);\n return this.table\n .setModifier(ModifierClass ?\n new ModifierClass(modifierOptions) :\n void 0)\n .then(() => this);\n }\n /**\n * Starts polling new data after the specific time span in milliseconds.\n *\n * @param {number} refreshTime\n * Refresh time in milliseconds between polls.\n */\n startPolling(refreshTime = 1000) {\n const connector = this;\n window.clearTimeout(connector._polling);\n connector._polling = window.setTimeout(() => connector\n .load()['catch']((error) => connector.emit({\n type: 'loadError',\n error,\n table: connector.table\n }))\n .then(() => {\n if (connector._polling) {\n connector.startPolling(refreshTime);\n }\n }), refreshTime);\n }\n /**\n * Stops polling data.\n */\n stopPolling() {\n const connector = this;\n window.clearTimeout(connector._polling);\n delete connector._polling;\n }\n /**\n * Retrieves metadata from a single column.\n *\n * @param {string} name\n * The identifier for the column that should be described\n *\n * @return {DataConnector.MetaColumn|undefined}\n * Returns a MetaColumn object if found.\n */\n whatIs(name) {\n return this.metadata.columns[name];\n }\n}\n/* *\n *\n * Class Namespace\n *\n * */\n(function (DataConnector) {\n /* *\n *\n * Declarations\n *\n * */\n /* *\n *\n * Constants\n *\n * */\n /**\n * Registry as a record object with connector names and their class.\n */\n DataConnector.types = {};\n /* *\n *\n * Functions\n *\n * */\n /**\n * Adds a connector class to the registry. The connector has to provide the\n * `DataConnector.options` property and the `DataConnector.load` method to\n * modify the table.\n *\n * @private\n *\n * @param {string} key\n * Registry key of the connector class.\n *\n * @param {DataConnectorType} DataConnectorClass\n * Connector class (aka class constructor) to register.\n *\n * @return {boolean}\n * Returns true, if the registration was successful. False is returned, if\n * their is already a connector registered with this key.\n */\n function registerType(key, DataConnectorClass) {\n return (!!key &&\n !DataConnector.types[key] &&\n !!(DataConnector.types[key] = DataConnectorClass));\n }\n DataConnector.registerType = registerType;\n})(DataConnector || (DataConnector = {}));\n/* *\n *\n * Default Export\n *\n * */\n/* harmony default export */ const Connectors_DataConnector = (DataConnector);\n\n;// ./code/es-modules/Data/Converters/DataConverter.js\n/* *\n *\n * (c) 2009-2024 Highsoft AS\n *\n * License: www.highcharts.com/license\n *\n * !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!\n *\n * Authors:\n * - Sophie Bremer\n * - Sebastian Bochan\n * - Gøran Slettemark\n * - Torstein Hønsi\n * - Wojciech Chmiel\n * - Jomar Hønsi\n *\n * */\n\n\n\nconst { addEvent: DataConverter_addEvent, fireEvent: DataConverter_fireEvent, isNumber, merge: DataConverter_merge } = (highcharts_commonjs_highcharts_commonjs2_highcharts_root_Highcharts_default());\n/* *\n *\n * Class\n *\n * */\n/**\n * Base class providing an interface and basic methods for a DataConverter\n *\n * @private\n */\nclass DataConverter {\n /* *\n *\n * Constructor\n *\n * */\n /**\n * Constructs an instance of the DataConverter.\n *\n * @param {DataConverter.UserOptions} [options]\n * Options for the DataConverter.\n */\n constructor(options) {\n /* *\n *\n * Properties\n *\n * */\n /**\n * A collection of available date formats.\n */\n this.dateFormats = {\n 'YYYY/mm/dd': {\n regex: /^(\\d{4})([\\-\\.\\/])(\\d{1,2})\\2(\\d{1,2})$/,\n parser: function (match) {\n return (match ?\n Date.UTC(+match[1], match[3] - 1, +match[4]) :\n NaN);\n }\n },\n 'dd/mm/YYYY': {\n regex: /^(\\d{1,2})([\\-\\.\\/])(\\d{1,2})\\2(\\d{4})$/,\n parser: function (match) {\n return (match ?\n Date.UTC(+match[4], match[3] - 1, +match[1]) :\n NaN);\n },\n alternative: 'mm/dd/YYYY' // Different format with the same regex\n },\n 'mm/dd/YYYY': {\n regex: /^(\\d{1,2})([\\-\\.\\/])(\\d{1,2})\\2(\\d{4})$/,\n parser: function (match) {\n return (match ?\n Date.UTC(+match[4], match[1] - 1, +match[3]) :\n NaN);\n }\n },\n 'dd/mm/YY': {\n regex: /^(\\d{1,2})([\\-\\.\\/])(\\d{1,2})\\2(\\d{2})$/,\n parser: function (match) {\n const d = new Date();\n if (!match) {\n return NaN;\n }\n let year = +match[4];\n if (year > (d.getFullYear() - 2000)) {\n year += 1900;\n }\n else {\n year += 2000;\n }\n return Date.UTC(year, match[3] - 1, +match[1]);\n },\n alternative: 'mm/dd/YY' // Different format with the same regex\n },\n 'mm/dd/YY': {\n regex: /^(\\d{1,2})([\\-\\.\\/])(\\d{1,2})\\2(\\d{2})$/,\n parser: function (match) {\n return (match ?\n Date.UTC(+match[4] + 2000, match[1] - 1, +match[3]) :\n NaN);\n }\n }\n };\n const mergedOptions = DataConverter_merge(DataConverter.defaultOptions, options);\n let regExpPoint = mergedOptions.decimalPoint;\n if (regExpPoint === '.' || regExpPoint === ',') {\n regExpPoint = regExpPoint === '.' ? '\\\\.' : ',';\n this.decimalRegExp =\n new RegExp('^(-?[0-9]+)' + regExpPoint + '([0-9]+)$');\n }\n this.options = mergedOptions;\n }\n /* *\n *\n * Functions\n *\n * */\n /**\n * Converts a value to a boolean.\n *\n * @param {DataConverter.Type} value\n * Value to convert.\n *\n * @return {boolean}\n * Converted value as a boolean.\n */\n asBoolean(value) {\n if (typeof value === 'boolean') {\n return value;\n }\n if (typeof value === 'string') {\n return value !== '' && value !== '0' && value !== 'false';\n }\n return !!this.asNumber(value);\n }\n /**\n * Converts a value to a Date.\n *\n * @param {DataConverter.Type} value\n * Value to convert.\n *\n * @return {globalThis.Date}\n * Converted value as a Date.\n */\n asDate(value) {\n let timestamp;\n if (typeof value === 'string') {\n timestamp = this.parseDate(value);\n }\n else if (typeof value === 'number') {\n timestamp = value;\n }\n else if (value instanceof Date) {\n return value;\n }\n else {\n timestamp = this.parseDate(this.asString(value));\n }\n return new Date(timestamp);\n }\n /**\n * Casts a string value to it's guessed type\n *\n * @param {*} value\n * The value to examine.\n *\n * @return {number|string|Date}\n * The converted value.\n */\n asGuessedType(value) {\n const converter = this, typeMap = {\n 'number': converter.asNumber,\n 'Date': converter.asDate,\n 'string': converter.asString\n };\n return typeMap[converter.guessType(value)].call(converter, value);\n }\n /**\n * Converts a value to a number.\n *\n * @param {DataConverter.Type} value\n * Value to convert.\n *\n * @return {number}\n * Converted value as a number.\n */\n asNumber(value) {\n if (typeof value === 'number') {\n return value;\n }\n if (typeof value === 'boolean') {\n return value ? 1 : 0;\n }\n if (typeof value === 'string') {\n const decimalRegex = this.decimalRegExp;\n if (value.indexOf(' ') > -1) {\n value = value.replace(/\\s+/g, '');\n }\n if (decimalRegex) {\n if (!decimalRegex.test(value)) {\n return NaN;\n }\n value = value.replace(decimalRegex, '$1.$2');\n }\n return parseFloat(value);\n }\n if (value instanceof Date) {\n return value.getDate();\n }\n if (value) {\n return value.getRowCount();\n }\n return NaN;\n }\n /**\n * Converts a value to a string.\n *\n * @param {DataConverter.Type} value\n * Value to convert.\n *\n * @return {string}\n * Converted value as a string.\n */\n asString(value) {\n return '' + value;\n }\n /**\n * Tries to guess the date format\n * - Check if either month candidate exceeds 12\n * - Check if year is missing (use current year)\n * - Check if a shortened year format is used (e.g. 1/1/99)\n * - If no guess can be made, the user must be prompted\n * data is the data to deduce a format based on\n * @private\n *\n * @param {Array<string>} data\n * Data to check the format.\n *\n * @param {number} limit\n * Max data to check the format.\n *\n * @param {boolean} save\n * Whether to save the date format in the converter options.\n */\n deduceDateFormat(data, limit, save) {\n const parser = this, stable = [], max = [];\n let format = 'YYYY/mm/dd', thing, guessedFormat = [], i = 0, madeDeduction = false, \n /// candidates = {},\n elem, j;\n if (!limit || limit > data.length) {\n limit = data.length;\n }\n for (; i < limit; i++) {\n if (typeof data[i] !== 'undefined' &&\n data[i] && data[i].length) {\n thing = data[i]\n .trim()\n .replace(/[\\-\\.\\/]/g, ' ')\n .split(' ');\n guessedFormat = [\n '',\n '',\n ''\n ];\n for (j = 0; j < thing.length; j++) {\n if (j < guessedFormat.length) {\n elem = parseInt(thing[j], 10);\n if (elem) {\n max[j] = (!max[j] || max[j] < elem) ? elem : max[j];\n if (typeof stable[j] !== 'undefined') {\n if (stable[j] !== elem) {\n stable[j] = false;\n }\n }\n else {\n stable[j] = elem;\n }\n if (elem > 31) {\n if (elem < 100) {\n guessedFormat[j] = 'YY';\n }\n else {\n guessedFormat[j] = 'YYYY';\n }\n /// madeDeduction = true;\n }\n else if (elem > 12 &&\n elem <= 31) {\n guessedFormat[j] = 'dd';\n madeDeduction = true;\n }\n else if (!guessedFormat[j].length) {\n guessedFormat[j] = 'mm';\n }\n }\n }\n }\n }\n }\n if (madeDeduction) {\n // This handles a few edge cases with hard to guess dates\n for (j = 0; j < stable.length; j++) {\n if (stable[j] !== false) {\n if (max[j] > 12 &&\n guessedFormat[j] !== 'YY' &&\n guessedFormat[j] !== 'YYYY') {\n guessedFormat[j] = 'YY';\n }\n }\n else if (max[j] > 12 && guessedFormat[j] === 'mm') {\n guessedFormat[j] = 'dd';\n }\n }\n // If the middle one is dd, and the last one is dd,\n // the last should likely be year.\n if (guessedFormat.length === 3 &&\n guessedFormat[1] === 'dd' &&\n guessedFormat[2] === 'dd') {\n guessedFormat[2] = 'YY';\n }\n format = guessedFormat.join('/');\n // If the caculated format is not valid, we need to present an\n // error.\n }\n // Save the deduced format in the converter options.\n if (save) {\n parser.options.dateFormat = format;\n }\n return format;\n }\n /**\n * Emits an event on the DataConverter instance.\n *\n * @param {DataConverter.Event} [e]\n * Event object containing additional event data\n */\n emit(e) {\n DataConverter_fireEvent(this, e.type, e);\n }\n /**\n * Initiates the data exporting. Should emit `exportError` on failure.\n *\n * @param {DataConnector} connector\n * Connector to export from.\n *\n * @param {DataConverter.Options} [options]\n * Options for the export.\n */\n export(\n /* eslint-disable @typescript-eslint/no-unused-vars */\n connector, options\n /* eslint-enable @typescript-eslint/no-unused-vars */\n ) {\n this.emit({\n type: 'exportError',\n columns: [],\n headers: []\n });\n throw new Error('Not implemented');\n }\n /**\n * Getter for the data table.\n *\n * @return {DataTable}\n * Table of parsed data.\n */\n getTable() {\n throw new Error('Not implemented');\n }\n /**\n * Guesses the potential type of a string value for parsing CSV etc.\n *\n * @param {*} value\n * The value to examine.\n *\n * @return {'number'|'string'|'Date'}\n * Type string, either `string`, `Date`, or `number`.\n */\n guessType(value) {\n const converter = this;\n let result = 'string';\n if (typeof value === 'string') {\n const trimedValue = converter.trim(`${value}`), decimalRegExp = converter.decimalRegExp;\n let innerTrimedValue = converter.trim(trimedValue, true);\n if (decimalRegExp) {\n innerTrimedValue = (decimalRegExp.test(innerTrimedValue) ?\n innerTrimedValue.replace(decimalRegExp, '$1.$2') :\n '');\n }\n const floatValue = parseFloat(innerTrimedValue);\n if (+innerTrimedValue === floatValue) {\n // String is numeric\n value = floatValue;\n }\n else {\n // Determine if a date string\n const dateValue = converter.parseDate(value);\n result = isNumber(dateValue) ? 'Date' : 'string';\n }\n }\n if (typeof value === 'number') {\n // Greater than milliseconds in a year assumed timestamp\n result = value > 365 * 24 * 3600 * 1000 ? 'Date' : 'number';\n }\n return result;\n }\n /**\n * Registers a callback for a specific event.\n *\n * @param {string} type\n * Event type as a string.\n *\n * @param {DataEventEmitter.Callback} callback\n * Function to register for an modifier callback.\n *\n * @return {Function}\n * Function to unregister callback from the modifier event.\n */\n on(type, callback) {\n return DataConverter_addEvent(this, type, callback);\n }\n /**\n * Initiates the data parsing. Should emit `parseError` on failure.\n *\n * @param {DataConverter.UserOptions} options\n * Options of the DataConverter.\n */\n parse(\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n options) {\n this.emit({\n type: 'parseError',\n columns: [],\n headers: []\n });\n throw new Error('Not implemented');\n }\n /**\n * Parse a date and return it as a number.\n *\n * @param {string} value\n * Value to parse.\n *\n * @param {string} dateFormatProp\n * Which of the predefined date formats\n * to use to parse date values.\n */\n parseDate(value, dateFormatProp) {\n const converter = this, options = converter.options;\n let dateFormat = dateFormatProp || options.dateFormat, result = NaN, key, format, match;\n if (options.parseDate) {\n result = options.parseDate(value);\n }\n else {\n // Auto-detect the date format the first time\n if (!dateFormat) {\n for (key in converter.dateFormats) { // eslint-disable-line guard-for-in\n format = converter.dateFormats[key];\n match = value.match(format.regex);\n if (match) {\n // `converter.options.dateFormat` = dateFormat = key;\n dateFormat = key;\n // `converter.options.alternativeFormat` =\n // format.alternative || '';\n result = format.parser(match);\n break;\n }\n }\n // Next time, use the one previously found\n }\n else {\n format = converter.dateFormats[dateFormat];\n if (!format) {\n // The selected format is invalid\n format = converter.dateFormats['YYYY/mm/dd'];\n }\n match = value.match(format.regex);\n if (match) {\n result = format.parser(match);\n }\n }\n // Fall back to Date.parse\n if (!match) {\n match = Date.parse(value);\n // External tools like Date.js and MooTools extend Date object\n // and returns a date.\n if (typeof match === 'object' &&\n match !== null &&\n match.getTime) {\n result = (match.getTime() -\n match.getTimezoneOffset() *\n 60000);\n // Timestamp\n }\n else if (isNumber(match)) {\n result = match - (new Date(match)).getTimezoneOffset() * 60000;\n if ( // Reset dates without year in Chrome\n value.indexOf('2001') === -1 &&\n (new Date(result)).getFullYear() === 2001) {\n result = NaN;\n }\n }\n }\n }\n return result;\n }\n /**\n * Trim a string from whitespaces.\n *\n * @param {string} str\n * String to trim.\n *\n * @param {boolean} [inside=false]\n * Remove all spaces between numbers.\n *\n * @return {string}\n * Trimed string\n */\n trim(str, inside) {\n if (typeof str === 'string') {\n str = str.replace(/^\\s+|\\s+$/g, '');\n // Clear white space insdie the string, like thousands separators\n if (inside && /^[\\d\\s]+$/.test(str)) {\n str = str.replace(/\\s/g, '');\n }\n }\n return str;\n }\n}\n/* *\n *\n * Static Properties\n *\n * */\n/**\n * Default options\n */\nDataConverter.defaultOptions = {\n dateFormat: '',\n alternativeFormat: '',\n startColumn: 0,\n endColumn: Number.MAX_VALUE,\n startRow: 0,\n endRow: Number.MAX_VALUE,\n firstRowAsNames: true,\n switchRowsAndColumns: false\n};\n/* *\n *\n * Class Namespace\n *\n * */\n/**\n * Additionally provided types for events and conversion.\n */\n(function (DataConverter) {\n /* *\n *\n * Declarations\n *\n * */\n /* *\n *\n * Constants\n *\n * */\n /**\n * Registry as a record object with connector names and their class.\n */\n DataConverter.types = {};\n /* *\n *\n * Functions\n *\n * */\n /**\n * Adds a converter class to the registry.\n *\n * @private\n *\n * @param {string} key\n * Registry key of the converter class.\n *\n * @param {DataConverterTypes} DataConverterClass\n * Connector class (aka class constructor) to register.\n *\n * @return {boolean}\n * Returns true, if the registration was successful. False is returned, if\n * their is already a converter registered with this key.\n */\n function registerType(key, DataConverterClass) {\n return (!!key &&\n !DataConverter.types[key] &&\n !!(DataConverter.types[key] = DataConverterClass));\n }\n DataConverter.registerType = registerType;\n /**\n * Converts an array of columns to a table instance. Second dimension of the\n * array are the row cells.\n *\n * @param {Array<DataTable.Column>} [columns]\n * Array to convert.\n *\n * @param {Array<string>} [headers]\n * Column names to use.\n *\n * @return {DataTable}\n * Table instance from the arrays.\n */\n function getTableFromColumns(columns = [], headers = []) {\n const table = new Data_DataTable();\n for (let i = 0, iEnd = Math.max(headers.length, columns.length); i < iEnd; ++i) {\n table.setColumn(headers[i] || `${i}`, columns[i]);\n }\n return table;\n }\n DataConverter.getTableFromColumns = getTableFromColumns;\n})(DataConverter || (DataConverter = {}));\n/* *\n *\n * Default Export\n *\n * */\n/* harmony default export */ const Converters_DataConverter = (DataConverter);\n\n;// ./code/es-modules/Data/DataCursor.js\n/* *\n *\n * (c) 2020-2024 Highsoft AS\n *\n * License: www.highcharts.com/license\n *\n * !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!\n *\n * Authors:\n * - Sophie Bremer\n *\n * */\n\n/* *\n *\n * Class\n *\n * */\n/**\n * This class manages state cursors pointing on {@link Data.DataTable}. It\n * creates a relation between states of the user interface and the table cells,\n * columns, or rows.\n *\n * @class\n * @name Data.DataCursor\n */\nclass DataCursor {\n /* *\n *\n * Constructor\n *\n * */\n constructor(stateMap = {}) {\n this.emittingRegister = [];\n this.listenerMap = {};\n this.stateMap = stateMap;\n }\n /* *\n *\n * Functions\n *\n * */\n /**\n * This function registers a listener for a specific state and table.\n *\n * @example\n * ```TypeScript\n * dataCursor.addListener(myTable.id, 'hover', (e: DataCursor.Event) => {\n * if (e.cursor.type === 'position') {\n * console.log(`Hover over row #${e.cursor.row}.`);\n * }\n * });\n * ```\n *\n * @function #addListener\n *\n * @param {Data.DataCursor.TableId} tableId\n * The ID of the table to listen to.\n *\n * @param {Data.DataCursor.State} state\n * The state on the table to listen to.\n *\n * @param {Data.DataCursor.Listener} listener\n * The listener to register.\n *\n * @return {Data.DataCursor}\n * Returns the DataCursor instance for a call chain.\n */\n addListener(tableId, state, listener) {\n const listenerMap = this.listenerMap[tableId] = (this.listenerMap[tableId] ||\n {});\n const listeners = listenerMap[state] = (listenerMap[state] ||\n []);\n listeners.push(listener);\n return this;\n }\n /**\n * @private\n */\n buildEmittingTag(e) {\n return (e.cursor.type === 'position' ?\n [\n e.table.id,\n e.cursor.column,\n e.cursor.row,\n e.cursor.state,\n e.cursor.type\n ] :\n [\n e.table.id,\n e.cursor.columns,\n e.cursor.firstRow,\n e.cursor.lastRow,\n e.cursor.state,\n e.cursor.type\n ]).join('\\0');\n }\n /**\n * This function emits a state cursor related to a table. It will provide\n * lasting state cursors of the table to listeners.\n *\n * @example\n * ```ts\n * dataCursor.emit(myTable, {\n * type: 'position',\n * column: 'city',\n * row: 4,\n * state: 'hover',\n * });\n * ```\n *\n * @param {Data.DataTable} table\n * The related table of the cursor.\n *\n * @param {Data.DataCursor.Type} cursor\n * The state cursor to emit.\n *\n * @param {Event} [event]\n * Optional event information from a related source.\n *\n * @param {boolean} [lasting]\n * Whether this state cursor should be kept until it is cleared with\n * {@link DataCursor#remitCursor}.\n *\n * @return {Data.DataCursor}\n * Returns the DataCursor instance for a call chain.\n */\n emitCursor(table, cursor, event, lasting) {\n const tableId = table.id, state = cursor.state, listeners = (this.listenerMap[tableId] &&\n this.listenerMap[tableId][state]);\n if (listeners) {\n const stateMap = this.stateMap[tableId] = (this.stateMap[tableId] ?? {});\n const cursors = stateMap[cursor.state] || [];\n if (lasting) {\n if (!cursors.length) {\n stateMap[cursor.state] = cursors;\n }\n if (DataCursor.getIndex(cursor, cursors) === -1) {\n cursors.push(cursor);\n }\n }\n const e = {\n cursor,\n cursors,\n table\n };\n if (event) {\n e.event = event;\n }\n const emittingRegister = this.emittingRegister, emittingTag = this.buildEmittingTag(e);\n if (emittingRegister.indexOf(emittingTag) >= 0) {\n // Break call stack loops\n return this;\n }\n try {\n this.emittingRegister.push(emittingTag);\n for (let i = 0, iEnd = listeners.length; i < iEnd; ++i) {\n listeners[i].call(this, e);\n }\n }\n finally {\n const index = this.emittingRegister.indexOf(emittingTag);\n if (index >= 0) {\n this.emittingRegister.splice(index, 1);\n }\n }\n }\n return this;\n }\n /**\n * Removes a lasting state cursor.\n *\n * @function #remitCursor\n *\n * @param {string} tableId\n * ID of the related cursor table.\n *\n * @param {Data.DataCursor.Type} cursor\n * Copy or reference of the cursor.\n *\n * @return {Data.DataCursor}\n * Returns the DataCursor instance for a call chain.\n */\n remitCursor(tableId, cursor) {\n const cursors = (this.stateMap[tableId] &&\n this.stateMap[tableId][cursor.state]);\n if (cursors) {\n const index = DataCursor.getIndex(cursor, cursors);\n if (index >= 0) {\n cursors.splice(index, 1);\n }\n }\n return this;\n }\n /**\n * This function removes a listener.\n *\n * @function #addListener\n *\n * @param {Data.DataCursor.TableId} tableId\n * The ID of the table the listener is connected to.\n *\n * @param {Data.DataCursor.State} state\n * The state on the table the listener is listening to.\n *\n * @param {Data.DataCursor.Listener} listener\n * The listener to deregister.\n *\n * @return {Data.DataCursor}\n * Returns the DataCursor instance for a call chain.\n */\n removeListener(tableId, state, listener) {\n const listeners = (this.listenerMap[tableId] &&\n this.listenerMap[tableId][state]);\n if (listeners) {\n const index = listeners.indexOf(listener);\n if (index >= 0) {\n listeners.splice(index, 1);\n }\n }\n return this;\n }\n}\n/* *\n *\n * Static Properties\n *\n * */\n/**\n * Semantic version string of the DataCursor class.\n * @internal\n */\nDataCursor.version = '1.0.0';\n/* *\n *\n * Class Namespace\n *\n * */\n/**\n * @class Data.DataCursor\n */\n(function (DataCursor) {\n /* *\n *\n * Declarations\n *\n * */\n /* *\n *\n * Functions\n *\n * */\n /**\n * Finds the index of an cursor in an array.\n * @private\n */\n function getIndex(needle, cursors) {\n if (needle.type === 'position') {\n for (let cursor, i = 0, iEnd = cursors.length; i < iEnd; ++i) {\n cursor = cursors[i];\n if (cursor.type === 'position' &&\n cursor.state === needle.state &&\n cursor.column === needle.column &&\n cursor.row === needle.row) {\n return i;\n }\n }\n }\n else {\n const columnNeedle = JSON.stringify(needle.columns);\n for (let cursor, i = 0, iEnd = cursors.length; i < iEnd; ++i) {\n cursor = cursors[i];\n if (cursor.type === 'range' &&\n cursor.state === needle.state &&\n cursor.firstRow === needle.firstRow &&\n cursor.lastRow === needle.lastRow &&\n JSON.stringify(cursor.columns) === columnNeedle) {\n return i;\n }\n }\n }\n return -1;\n }\n DataCursor.getIndex = getIndex;\n /**\n * Checks whether two cursor share the same properties.\n * @private\n */\n function isEqual(cursorA, cursorB) {\n if (cursorA.type === 'position' && cursorB.type === 'position') {\n return (cursorA.column === cursorB.column &&\n cursorA.row === cursorB.row &&\n cursorA.state === cursorB.state);\n }\n if (cursorA.type === 'range' && cursorB.type === 'range') {\n return (cursorA.firstRow === cursorB.firstRow &&\n cursorA.lastRow === cursorB.lastRow &&\n (JSON.stringify(cursorA.columns) ===\n JSON.stringify(cursorB.columns)));\n }\n return false;\n }\n DataCursor.isEqual = isEqual;\n /**\n * Checks whether a cursor is in a range.\n * @private\n */\n function isInRange(needle, range) {\n if (range.type === 'position') {\n range = toRange(range);\n }\n if (needle.type === 'position') {\n needle = toRange(needle, range);\n }\n const needleColumns = needle.columns;\n const rangeColumns = range.columns;\n return (needle.firstRow >= range.firstRow &&\n needle.lastRow <= range.lastRow &&\n (!needleColumns ||\n !rangeColumns ||\n needleColumns.every((column) => rangeColumns.indexOf(column) >= 0)));\n }\n DataCursor.isInRange = isInRange;\n /**\n * @private\n */\n function toPositions(cursor) {\n if (cursor.type === 'position') {\n return [cursor];\n }\n const columns = (cursor.columns || []);\n const positions = [];\n const state = cursor.state;\n for (let row = cursor.firstRow, rowEnd = cursor.lastRow; row < rowEnd; ++row) {\n if (!columns.length) {\n positions.push({\n type: 'position',\n row,\n state\n });\n continue;\n }\n for (let column = 0, columnEnd = columns.length; column < columnEnd; ++column) {\n positions.push({\n type: 'position',\n column: columns[column],\n row,\n state\n });\n }\n }\n return positions;\n }\n DataCursor.toPositions = toPositions;\n /**\n * @private\n */\n function toRange(cursor, defaultRange) {\n if (cursor.type === 'range') {\n return cursor;\n }\n const range = {\n type: 'range',\n firstRow: (cursor.row ??\n (defaultRange && defaultRange.firstRow) ??\n 0),\n lastRow: (cursor.row ??\n (defaultRange && defaultRange.lastRow) ??\n Number.MAX_VALUE),\n state: cursor.state\n };\n if (typeof cursor.column !== 'undefined') {\n range.columns = [cursor.column];\n }\n return range;\n }\n DataCursor.toRange = toRange;\n})(DataCursor || (DataCursor = {}));\n/* *\n *\n * Default Export\n *\n * */\n/* harmony default export */ const Data_DataCursor = (DataCursor);\n\n;// ./code/es-modules/Data/DataPoolDefaults.js\n/* *\n *\n * (c) 2009-2024 Highsoft AS\n *\n * License: www.highcharts.com/license\n *\n * !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!\n *\n * Authors:\n * - Sophie Bremer\n *\n * */\n\n/* *\n *\n * API Options\n *\n * */\nconst DataPoolDefaults = {\n connectors: []\n};\n/* *\n *\n * Export Defaults\n *\n * */\n/* harmony default export */ const Data_DataPoolDefaults = (DataPoolDefaults);\n\n;// ./code/es-modules/Data/DataPool.js\n/* *\n *\n * (c) 2009-2024 Highsoft AS\n *\n * License: www.highcharts.com/license\n *\n * !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!\n *\n * Authors:\n * - Sophie Bremer\n *\n * */\n\n\n\n\n/* *\n *\n * Class\n *\n * */\n/**\n * Data pool to load connectors on-demand.\n *\n * @class\n * @name Data.DataPool\n *\n * @param {Data.DataPoolOptions} options\n * Pool options with all connectors.\n */\nclass DataPool {\n /* *\n *\n * Constructor\n *\n * */\n constructor(options = Data_DataPoolDefaults) {\n options.connectors = (options.connectors || []);\n this.connectors = {};\n this.options = options;\n this.waiting = {};\n }\n /* *\n *\n * Functions\n *\n * */\n /**\n * Emits an event on this data pool to all registered callbacks of the given\n * event.\n * @private\n *\n * @param {DataTable.Event} e\n * Event object with event information.\n */\n emit(e) {\n highcharts_commonjs_highcharts_commonjs2_highcharts_root_Highcharts_default().fireEvent(this, e.type, e);\n }\n /**\n * Loads the connector.\n *\n * @function Data.DataPool#getConnector\n *\n * @param {string} connectorId\n * ID of the connector.\n *\n * @return {Promise<Data.DataConnector>}\n * Returns the connector.\n */\n getConnector(connectorId) {\n const connector = this.connectors[connectorId];\n // Already loaded\n if (connector) {\n return Promise.resolve(connector);\n }\n let waitingList = this.waiting[connectorId];\n // Start loading\n if (!waitingList) {\n waitingList = this.waiting[connectorId] = [];\n const connectorOptions = this.getConnectorOptions(connectorId);\n if (!connectorOptions) {\n throw new Error(`Connector '${connectorId}' not found.`);\n }\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n this\n .loadConnector(connectorOptions)\n .then((connector) => {\n delete this.waiting[connectorId];\n for (let i = 0, iEnd = waitingList.length; i < iEnd; ++i) {\n waitingList[i][0](connector);\n }\n })['catch']((error) => {\n delete this.waiting[connectorId];\n for (let i = 0, iEnd = waitingList.length; i < iEnd; ++i) {\n waitingList[i][1](error);\n }\n });\n }\n // Add request to waiting list\n return new Promise((resolve, reject) => {\n waitingList.push([resolve, reject]);\n });\n }\n /**\n * Returns the IDs of all connectors.\n *\n * @private\n *\n * @return {Array<string>}\n * Names of all connectors.\n */\n getConnectorIds() {\n const connectors = this.options.connectors, connectorIds = [];\n for (let i = 0, iEnd = connectors.length; i < iEnd; ++i) {\n connectorIds.push(connectors[i].id);\n }\n return connectorIds;\n }\n /**\n * Loads the options of the connector.\n *\n * @private\n *\n * @param {string} connectorId\n * ID of the connector.\n *\n * @return {DataPoolConnectorOptions|undefined}\n * Returns the options of the connector, or `undefined` if not found.\n */\n getConnectorOptions(connectorId) {\n const connectors = this.options.connectors;\n for (let i = 0, iEnd = connectors.length; i < iEnd; ++i) {\n if (connectors[i].id === connectorId) {\n return connectors[i];\n }\n }\n }\n /**\n * Loads the connector table.\n *\n * @function Data.DataPool#getConnectorTable\n *\n * @param {string} connectorId\n * ID of the connector.\n *\n * @return {Promise<Data.DataTable>}\n * Returns the connector table.\n */\n getConnectorTable(connectorId) {\n return this\n .getConnector(connectorId)\n .then((connector) => connector.table);\n }\n /**\n * Tests whether the connector has never been requested.\n *\n * @param {string} connectorId\n * Name of the connector.\n *\n * @return {boolean}\n * Returns `true`, if the connector has never been requested, otherwise\n * `false`.\n */\n isNewConnector(connectorId) {\n return !this.connectors[connectorId];\n }\n /**\n * Creates and loads the connector.\n *\n * @private\n *\n * @param {Data.DataPoolConnectorOptions} options\n * Options of connector.\n *\n * @return {Promise<Data.DataConnector>}\n * Returns the connector.\n */\n loadConnector(options) {\n return new Promise((resolve, reject) => {\n this.emit({\n type: 'load',\n options\n });\n const ConnectorClass = Connectors_DataConnector.types[options.type];\n if (!ConnectorClass) {\n throw new Error(`Connector type not found. (${options.type})`);\n }\n const connector = new ConnectorClass(options.options);\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n connector\n .load()\n .then((connector) => {\n this.connectors[options.id] = connector;\n this.emit({\n type: 'afterLoad',\n options\n });\n resolve(connector);\n })['catch'](reject);\n });\n }\n /**\n * Registers a callback for a specific event.\n *\n * @function Highcharts.DataPool#on\n *\n * @param {string} type\n * Event type as a string.\n *\n * @param {Highcharts.EventCallbackFunction<Highcharts.DataPool>} callback\n * Function to register for an event callback.\n *\n * @return {Function}\n * Function to unregister callback from the event.\n */\n on(type, callback) {\n return highcharts_commonjs_highcharts_commonjs2_highcharts_root_Highcharts_default().addEvent(this, type, callback);\n }\n /**\n * Sets connector options under the specified `options.id`.\n *\n * @param {Data.DataPoolConnectorOptions} options\n * Connector options to set.\n */\n setConnectorOptions(options) {\n const connectors = this.options.connectors, instances = this.connectors;\n this.emit({\n type: 'setConnectorOptions',\n options\n });\n for (let i = 0, iEnd = connectors.length; i < iEnd; ++i) {\n if (connectors[i].id === options.id) {\n connectors.splice(i, 1);\n break;\n }\n }\n if (instances[options.id]) {\n instances[options.id].stopPolling();\n delete instances[options.id];\n }\n connectors.push(options);\n this.emit({\n type: 'afterSetConnectorOptions',\n options\n });\n }\n}\n/* *\n *\n * Static Properties\n *\n * */\n/**\n * Semantic version string of the DataPool class.\n * @internal\n */\nDataPool.version = '1.0.0';\n/* *\n *\n * Default Export\n *\n * */\n/* harmony default export */ const Data_DataPool = (DataPool);\n\n;// ./code/es-modules/Data/Formula/FormulaParser.js\n/* *\n *\n * (c) 2009-2024 Highsoft AS\n *\n * License: www.highcharts.com/license\n *\n * !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!\n *\n * Authors:\n * - Sophie Bremer\n *\n * */\n\n/* *\n *\n * Constants\n *\n * */\n/**\n * @private\n */\nconst booleanRegExp = /^(?:FALSE|TRUE)/;\n/**\n * `.`-separated decimal.\n * @private\n */\nconst decimal1RegExp = /^[+\\-]?\\d+(?:\\.\\d+)?(?:e[+\\-]\\d+)?/;\n/**\n * `,`-separated decimal.\n * @private\n */\nconst decimal2RegExp = /^[+\\-]?\\d+(?:,\\d+)?(?:e[+\\-]\\d+)?/;\n/**\n * - Group 1: Function name\n * @private\n */\nconst functionRegExp = /^([A-Z][A-Z\\d\\.]*)\\(/;\n/**\n * @private\n */\nconst operatorRegExp = /^(?:[+\\-*\\/^<=>]|<=|=>)/;\n/**\n * - Group 1: Start column\n * - Group 2: Start row\n * - Group 3: End column\n * - Group 4: End row\n * @private\n */\nconst rangeA1RegExp = /^(\\$?[A-Z]+)(\\$?\\d+)\\:(\\$?[A-Z]+)(\\$?\\d+)/;\n/**\n * - Group 1: Start row\n * - Group 2: Start column\n * - Group 3: End row\n * - Group 4: End column\n * @private\n */\nconst rangeR1C1RegExp = /^R(\\d*|\\[\\d+\\])C(\\d*|\\[\\d+\\])\\:R(\\d*|\\[\\d+\\])C(\\d*|\\[\\d+\\])/;\n/**\n * - Group 1: Column\n * - Group 2: Row\n * @private\n */\nconst referenceA1RegExp = /^(\\$?[A-Z]+)(\\$?\\d+)(?![\\:C])/;\n/**\n * - Group 1: Row\n * - Group 2: Column\n * @private\n */\nconst referenceR1C1RegExp = /^R(\\d*|\\[\\d+\\])C(\\d*|\\[\\d+\\])(?!\\:)/;\n/* *\n *\n * Functions\n *\n * */\n/**\n * Extracts the inner string of the most outer parantheses.\n *\n * @private\n *\n * @param {string} text\n * Text string to extract from.\n *\n * @return {string}\n * Extracted parantheses. If not found an exception will be thrown.\n */\nfunction extractParantheses(text) {\n let parantheseLevel = 0;\n for (let i = 0, iEnd = text.length, char, parantheseStart = 1; i < iEnd; ++i) {\n char = text[i];\n if (char === '(') {\n if (!parantheseLevel) {\n parantheseStart = i + 1;\n }\n ++parantheseLevel;\n continue;\n }\n if (char === ')') {\n --parantheseLevel;\n if (!parantheseLevel) {\n return text.substring(parantheseStart, i);\n }\n }\n }\n if (parantheseLevel > 0) {\n const error = new Error('Incomplete parantheses.');\n error.name = 'FormulaParseError';\n throw error;\n }\n return '';\n}\n/**\n * Extracts the inner string value.\n *\n * @private\n *\n * @param {string} text\n * Text string to extract from.\n *\n * @return {string}\n * Extracted string. If not found an exception will be thrown.\n */\nfunction extractString(text) {\n let start = -1;\n for (let i = 0, iEnd = text.length, char, escaping = false; i < iEnd; ++i) {\n char = text[i];\n if (char === '\\\\') {\n escaping = !escaping;\n continue;\n }\n if (escaping) {\n escaping = false;\n continue;\n }\n if (char === '\"') {\n if (start < 0) {\n start = i;\n }\n else {\n return text.substring(start + 1, i); // `ì` is excluding\n }\n }\n }\n const error = new Error('Incomplete string.');\n error.name = 'FormulaParseError';\n throw error;\n}\n/**\n * Parses an argument string. Formula arrays with a single term will be\n * simplified to the term.\n *\n * @private\n *\n * @param {string} text\n * Argument string to parse.\n *\n * @param {boolean} alternativeSeparators\n * Whether to expect `;` as argument separator and `,` as decimal separator.\n *\n * @return {Formula|Function|Range|Reference|Value}\n * The recognized term structure.\n */\nfunction parseArgument(text, alternativeSeparators) {\n let match;\n // Check for a R1C1:R1C1 range notation\n match = text.match(rangeR1C1RegExp);\n if (match) {\n const beginColumnRelative = (match[2] === '' || match[2][0] === '[');\n const beginRowRelative = (match[1] === '' || match[1][0] === '[');\n const endColumnRelative = (match[4] === '' || match[4][0] === '[');\n const endRowRelative = (match[3] === '' || match[3][0] === '[');\n const range = {\n type: 'range',\n beginColumn: (beginColumnRelative ?\n parseInt(match[2].substring(1, -1) || '0', 10) :\n parseInt(match[2], 10) - 1),\n beginRow: (beginRowRelative ?\n parseInt(match[1].substring(1, -1) || '0', 10) :\n parseInt(match[1], 10) - 1),\n endColumn: (endColumnRelative ?\n parseInt(match[4].substring(1, -1) || '0', 10) :\n parseInt(match[4], 10) - 1),\n endRow: (endRowRelative ?\n parseInt(match[3].substring(1, -1) || '0', 10) :\n parseInt(match[3], 10) - 1)\n };\n if (beginColumnRelative) {\n range.beginColumnRelative = true;\n }\n if (beginRowRelative) {\n range.beginRowRelative = true;\n }\n if (endColumnRelative) {\n range.endColumnRelative = true;\n }\n if (endRowRelative) {\n range.endRowRelative = true;\n }\n return range;\n }\n // Check for a A1:A1 range notation\n match = text.match(rangeA1RegExp);\n if (match) {\n const beginColumnRelative = match[1][0] !== '$';\n const beginRowRelative = match[2][0] !== '$';\n const endColumnRelative = match[3][0] !== '$';\n const endRowRelative = match[4][0] !== '$';\n const range = {\n type: 'range',\n beginColumn: parseReferenceColumn(beginColumnRelative ?\n match[1] :\n match[1].substring(1)) - 1,\n beginRow: parseInt(beginRowRelative ?\n match[2] :\n match[2].substring(1), 10) - 1,\n endColumn: parseReferenceColumn(endColumnRelative ?\n match[3] :\n match[3].substring(1)) - 1,\n endRow: parseInt(endRowRelative ?\n match[4] :\n match[4].substring(1), 10) - 1\n };\n if (beginColumnRelative) {\n range.beginColumnRelative = true;\n }\n if (beginRowRelative) {\n range.beginRowRelative = true;\n }\n if (endColumnRelative) {\n range.endColumnRelative = true;\n }\n if (endRowRelative) {\n range.endRowRelative = true;\n }\n return range;\n }\n // Fallback to formula processing for other pattern types\n const formula = parseFormula(text, alternativeSeparators);\n return (formula.length === 1 && typeof formula[0] !== 'string' ?\n formula[0] :\n formula);\n}\n/**\n * Parse arguments string inside function parantheses.\n *\n * @private\n *\n * @param {string} text\n * Parantheses string of the function.\n *\n * @param {boolean} alternativeSeparators\n * Whether to expect `;` as argument separator and `,` as decimal separator.\n *\n * @return {Highcharts.FormulaArguments}\n * Parsed arguments array.\n */\nfunction parseArguments(text, alternativeSeparators) {\n const args = [], argumentsSeparator = (alternativeSeparators ? ';' : ',');\n let parantheseLevel = 0, term = '';\n for (let i = 0, iEnd = text.length, char; i < iEnd; ++i) {\n char = text[i];\n // Check for separator\n if (char === argumentsSeparator &&\n !parantheseLevel &&\n term) {\n args.push(parseArgument(term, alternativeSeparators));\n term = '';\n // Check for a quoted string before skip logic\n }\n else if (char === '\"' &&\n !parantheseLevel &&\n !term) {\n const string = extractString(text.substring(i));\n args.push(string);\n i += string.length + 1; // Only +1 to cover ++i in for-loop\n // Skip space and check paranthesis nesting\n }\n else if (char !== ' ') {\n term += char;\n if (char === '(') {\n ++parantheseLevel;\n }\n else if (char === ')') {\n --parantheseLevel;\n }\n }\n }\n // Look for left-overs from last argument\n if (!parantheseLevel && term) {\n args.push(parseArgument(term, alternativeSeparators));\n }\n return args;\n}\n/**\n * Converts a spreadsheet formula string into a formula array. Throws a\n * `FormulaParserError` when the string can not be parsed.\n *\n * @private\n * @function Formula.parseFormula\n *\n * @param {string} text\n * Spreadsheet formula string, without the leading `=`.\n *\n * @param {boolean} alternativeSeparators\n * * `false` to expect `,` between arguments and `.` in decimals.\n * * `true` to expect `;` between arguments and `,` in decimals.\n *\n * @return {Formula.Formula}\n * Formula array representing the string.\n */\nfunction parseFormula(text, alternativeSeparators) {\n const decimalRegExp = (alternativeSeparators ?\n decimal2RegExp :\n decimal1RegExp), formula = [];\n let match, next = (text[0] === '=' ? text.substring(1) : text).trim();\n while (next) {\n // Check for an R1C1 reference notation\n match = next.match(referenceR1C1RegExp);\n if (match) {\n const columnRelative = (match[2] === '' || match[2][0] === '[');\n const rowRelative = (match[1] === '' || match[1][0] === '[');\n const reference = {\n type: 'reference',\n column: (columnRelative ?\n parseInt(match[2].substring(1, -1) || '0', 10) :\n parseInt(match[2], 10) - 1),\n row: (rowRelative ?\n parseInt(match[1].substring(1, -1) || '0', 10) :\n parseInt(match[1], 10) - 1)\n };\n if (columnRelative) {\n reference.columnRelative = true;\n }\n if (rowRelative) {\n reference.rowRelative = true;\n }\n formula.push(reference);\n next = next.substring(match[0].length).trim();\n continue;\n }\n // Check for an A1 reference notation\n match = next.match(referenceA1RegExp);\n if (match) {\n const columnRelative = match[1][0] !== '$';\n const rowRelative = match[2][0] !== '$';\n const reference = {\n type: 'reference',\n column: parseReferenceColumn(columnRelative ?\n match[1] :\n match[1].substring(1)) - 1,\n row: parseInt(rowRelative ?\n match[2] :\n match[2].substring(1), 10) - 1\n };\n if (columnRelative) {\n reference.columnRelative = true;\n }\n if (rowRelative) {\n reference.rowRelative = true;\n }\n formula.push(reference);\n next = next.substring(match[0].length).trim();\n continue;\n }\n // Check for a formula operator\n match = next.match(operatorRegExp);\n if (match) {\n formula.push(match[0]);\n next = next.substring(match[0].length).trim();\n continue;\n }\n // Check for a boolean value\n match = next.match(booleanRegExp);\n if (match) {\n formula.push(match[0] === 'TRUE');\n next = next.substring(match[0].length).trim();\n continue;\n }\n // Check for a number value\n match = next.match(decimalRegExp);\n if (match) {\n formula.push(parseFloat(match[0]));\n next = next.substring(match[0].length).trim();\n continue;\n }\n // Check for a quoted string\n if (next[0] === '\"') {\n const string = extractString(next);\n formula.push(string.substring(1, -1));\n next = next.substring(string.length + 2).trim();\n continue;\n }\n // Check for a function\n match = next.match(functionRegExp);\n if (match) {\n next = next.substring(match[1].length).trim();\n const parantheses = extractParantheses(next);\n formula.push({\n type: 'function',\n name: match[1],\n args: parseArguments(parantheses, alternativeSeparators)\n });\n next = next.substring(parantheses.length + 2).trim();\n continue;\n }\n // Check for a formula in parantheses\n if (next[0] === '(') {\n const paranteses = extractParantheses(next);\n if (paranteses) {\n formula\n .push(parseFormula(paranteses, alternativeSeparators));\n next = next.substring(paranteses.length + 2).trim();\n continue;\n }\n }\n // Something is not right\n const position = text.length - next.length, error = new Error('Unexpected character `' +\n text.substring(position, position + 1) +\n '` at position ' + (position + 1) +\n '. (`...' + text.substring(position - 5, position + 6) + '...`)');\n error.name = 'FormulaParseError';\n throw error;\n }\n return formula;\n}\n/**\n * Converts a reference column `A` of `A1` into a number. Supports endless sizes\n * `ZZZ...`, just limited by integer precision.\n *\n * @private\n *\n * @param {string} text\n * Column string to convert.\n *\n * @return {number}\n * Converted column index.\n */\nfunction parseReferenceColumn(text) {\n let column = 0;\n for (let i = 0, iEnd = text.length, code, factor = text.length - 1; i < iEnd; ++i) {\n code = text.charCodeAt(i);\n if (code >= 65 && code <= 90) {\n column += (code - 64) * Math.pow(26, factor);\n }\n --factor;\n }\n return column;\n}\n/* *\n *\n * Default Export\n *\n * */\nconst FormulaParser = {\n parseFormula\n};\n/* harmony default export */ const Formula_FormulaParser = (FormulaParser);\n\n;// ./code/es-modules/Data/Formula/FormulaTypes.js\n/* *\n *\n * (c) 2009-2024 Highsoft AS\n *\n * License: www.highcharts.com/license\n *\n * !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!\n *\n * Authors:\n * - Sophie Bremer\n *\n * */\n\n/* *\n *\n * Constants\n *\n * */\n/**\n * Array of all possible operators.\n * @private\n */\nconst operators = ['+', '-', '*', '/', '^', '=', '<', '<=', '>', '>='];\n/* *\n *\n * Functions\n *\n * */\n/**\n * Tests an item for a Formula array.\n *\n * @private\n *\n * @param {Highcharts.FormulaItem} item\n * Item to test.\n *\n * @return {boolean}\n * `true`, if the item is a formula (or argument) array.\n */\nfunction isFormula(item) {\n return item instanceof Array;\n}\n/**\n * Tests an item for a Function structure.\n *\n * @private\n *\n * @param {Highcharts.FormulaItem} item\n * Item to test.\n *\n * @return {boolean}\n * `true`, if the item is a formula function.\n */\nfunction isFunction(item) {\n return (typeof item === 'object' &&\n !(item instanceof Array) &&\n item.type === 'function');\n}\n/**\n * Tests an item for an Operator string.\n *\n * @private\n *\n * @param {Highcharts.FormulaItem} item\n * Item to test.\n *\n * @return {boolean}\n * `true`, if the item is an operator string.\n */\nfunction isOperator(item) {\n return (typeof item === 'string' &&\n operators.indexOf(item) >= 0);\n}\n/**\n * Tests an item for a Range structure.\n *\n * @private\n *\n * @param {Highcharts.FormulaItem} item\n * Item to test.\n *\n * @return {boolean}\n * `true`, if the item is a range.\n */\nfunction isRange(item) {\n return (typeof item === 'object' &&\n !(item instanceof Array) &&\n item.type === 'range');\n}\n/**\n * Tests an item for a Reference structure.\n *\n * @private\n *\n * @param {Highcharts.FormulaItem} item\n * Item to test.\n *\n * @return {boolean}\n * `true`, if the item is a reference.\n */\nfunction isReference(item) {\n return (typeof item === 'object' &&\n !(item instanceof Array) &&\n item.type === 'reference');\n}\n/**\n * Tests an item for a Value structure.\n *\n * @private\n *\n * @param {Highcharts.FormulaItem|null|undefined} item\n * Item to test.\n *\n * @return {boolean}\n * `true`, if the item is a value.\n */\nfunction isValue(item) {\n return (typeof item === 'boolean' ||\n typeof item === 'number' ||\n typeof item === 'string');\n}\n/* *\n *\n * Default Export\n *\n * */\nconst MathFormula = {\n isFormula,\n isFunction,\n isOperator,\n isRange,\n isReference,\n isValue\n};\n/* harmony default export */ const FormulaTypes = (MathFormula);\n\n;// ./code/es-modules/Data/Formula/FormulaProcessor.js\n/* *\n *\n * (c) 2009-2024 Highsoft AS\n *\n * License: www.highcharts.com/license\n *\n * !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!\n *\n * Authors:\n * - Sophie Bremer\n *\n * */\n\n\nconst { isFormula: FormulaProcessor_isFormula, isFunction: FormulaProcessor_isFunction, isOperator: FormulaProcessor_isOperator, isRange: FormulaProcessor_isRange, isReference: FormulaProcessor_isReference, isValue: FormulaProcessor_isValue } = FormulaTypes;\n/* *\n *\n * Constants\n *\n * */\nconst asLogicalStringRegExp = / */;\nconst MAX_FALSE = Number.MAX_VALUE / 1.000000000001;\nconst MAX_STRING = Number.MAX_VALUE / 1.000000000002;\nconst MAX_TRUE = Number.MAX_VALUE;\nconst operatorPriority = {\n '^': 3,\n '*': 2,\n '/': 2,\n '+': 1,\n '-': 1,\n '=': 0,\n '<': 0,\n '<=': 0,\n '>': 0,\n '>=': 0\n};\nconst processorFunctions = {};\nconst processorFunctionNameRegExp = /^[A-Z][A-Z\\.]*$/;\n/* *\n *\n * Functions\n *\n * */\n/**\n * Converts non-number types to logical numbers.\n *\n * @param {Highcharts.FormulaValue} value\n * Value to convert.\n *\n * @return {number}\n * Logical number value. `NaN` if not convertable.\n */\nfunction asLogicalNumber(value) {\n switch (typeof value) {\n case 'boolean':\n return value ? MAX_TRUE : MAX_FALSE;\n case 'string':\n return MAX_STRING;\n case 'number':\n return value;\n default:\n return NaN;\n }\n}\n/**\n * Converts strings to logical strings, while other types get passed through. In\n * logical strings the space character is the lowest value and letters are case\n * insensitive.\n *\n * @param {Highcharts.FormulaValue} value\n * Value to convert.\n *\n * @return {Highcharts.FormulaValue}\n * Logical string value or passed through value.\n */\nfunction asLogicalString(value) {\n if (typeof value === 'string') {\n return value.toLowerCase().replace(asLogicalStringRegExp, '\\0');\n }\n return value;\n}\n/**\n * Converts non-number types to a logic number.\n *\n * @param {Highcharts.FormulaValue} value\n * Value to convert.\n *\n * @return {number}\n * Number value. `NaN` if not convertable.\n */\nfunction asNumber(value) {\n switch (typeof value) {\n case 'boolean':\n return value ? 1 : 0;\n case 'string':\n return parseFloat(value.replace(',', '.'));\n case 'number':\n return value;\n default:\n return NaN;\n }\n}\n/**\n * Process a basic operation of two given values.\n *\n * @private\n *\n * @param {Highcharts.FormulaOperator} operator\n * Operator between values.\n *\n * @param {Highcharts.FormulaValue} x\n * First value for operation.\n *\n * @param {Highcharts.FormulaValue} y\n * Second value for operation.\n *\n * @return {Highcharts.FormulaValue}\n * Operation result. `NaN` if operation is not support.\n */\nfunction basicOperation(operator, x, y) {\n switch (operator) {\n case '=':\n return asLogicalString(x) === asLogicalString(y);\n case '<':\n if (typeof x === typeof y) {\n return asLogicalString(x) < asLogicalString(y);\n }\n return asLogicalNumber(x) < asLogicalNumber(y);\n case '<=':\n if (typeof x === typeof y) {\n return asLogicalString(x) <= asLogicalString(y);\n }\n return asLogicalNumber(x) <= asLogicalNumber(y);\n case '>':\n if (typeof x === typeof y) {\n return asLogicalString(x) > asLogicalString(y);\n }\n return asLogicalNumber(x) > asLogicalNumber(y);\n case '>=':\n if (typeof x === typeof y) {\n return asLogicalString(x) >= asLogicalString(y);\n }\n return asLogicalNumber(x) >= asLogicalNumber(y);\n }\n x = asNumber(x);\n y = asNumber(y);\n let result;\n switch (operator) {\n case '+':\n result = x + y;\n break;\n case '-':\n result = x - y;\n break;\n case '*':\n result = x * y;\n break;\n case '/':\n result = x / y;\n break;\n case '^':\n result = Math.pow(x, y);\n break;\n default:\n return NaN;\n }\n // Limit decimal to 9 digits\n return (result % 1 ?\n Math.round(result * 1000000000) / 1000000000 :\n result);\n}\n/**\n * Converts an argument to Value and in case of a range to an array of Values.\n *\n * @function Highcharts.Formula.getArgumentValue\n *\n * @param {Highcharts.FormulaRange|Highcharts.FormulaTerm} arg\n * Formula range or term to convert.\n *\n * @param {Highcharts.DataTable} [table]\n * Table to use for references and ranges.\n *\n * @return {Highcharts.FormulaValue|Array<Highcharts.FormulaValue>}\n * Converted value.\n */\nfunction getArgumentValue(arg, table) {\n // Add value\n if (FormulaProcessor_isValue(arg)) {\n return arg;\n }\n // Add values of a range\n if (FormulaProcessor_isRange(arg)) {\n return (table && getRangeValues(arg, table) || []);\n }\n // Add values of a function\n if (FormulaProcessor_isFunction(arg)) {\n return processFunction(arg, table);\n }\n // Process functions, operations, references with formula processor\n return processFormula((FormulaProcessor_isFormula(arg) ? arg : [arg]), table);\n}\n/**\n * Converts all arguments to Values and in case of ranges to arrays of Values.\n *\n * @function Highcharts.Formula.getArgumentsValues\n *\n * @param {Highcharts.FormulaArguments} args\n * Formula arguments to convert.\n *\n * @param {Highcharts.DataTable} [table]\n * Table to use for references and ranges.\n *\n * @return {Array<(Highcharts.FormulaValue|Array<Highcharts.FormulaValue>)>}\n * Converted values.\n */\nfunction getArgumentsValues(args, table) {\n const values = [];\n for (let i = 0, iEnd = args.length; i < iEnd; ++i) {\n values.push(getArgumentValue(args[i], table));\n }\n return values;\n}\n/**\n * Extracts cell values from a table for a given range.\n *\n * @function Highcharts.Formula.getRangeValues\n *\n * @param {Highcharts.FormulaRange} range\n * Formula range to use.\n *\n * @param {Highcharts.DataTable} table\n * Table to extract from.\n *\n * @return {Array<Highcharts.FormulaValue>}\n * Extracted values.\n */\nfunction getRangeValues(range, table) {\n const columnNames = table\n .getColumnNames()\n .slice(range.beginColumn, range.endColumn + 1), values = [];\n for (let i = 0, iEnd = columnNames.length, cell; i < iEnd; ++i) {\n const cells = table.getColumn(columnNames[i], true) || [];\n for (let j = range.beginRow, jEnd = range.endRow + 1; j < jEnd; ++j) {\n cell = cells[j];\n if (typeof cell === 'string' &&\n cell[0] === '=' &&\n table !== table.modified) {\n // Look in the modified table for formula result\n cell = table.modified.getCell(columnNames[i], j);\n }\n values.push(FormulaProcessor_isValue(cell) ? cell : NaN);\n }\n }\n return values;\n}\n/**\n * Extracts the cell value from a table for a given reference.\n *\n * @private\n *\n * @param {Highcharts.FormulaReference} reference\n * Formula reference to use.\n *\n * @param {Highcharts.DataTable} table\n * Table to extract from.\n *\n * @return {Highcharts.FormulaValue}\n * Extracted value. 'undefined' might also indicate that the cell was not found.\n */\nfunction getReferenceValue(reference, table) {\n const columnName = table.getColumnNames()[reference.column];\n if (columnName) {\n const cell = table.getCell(columnName, reference.row);\n if (typeof cell === 'string' &&\n cell[0] === '=' &&\n table !== table.modified) {\n // Look in the modified table for formula result\n const result = table.modified.getCell(columnName, reference.row);\n return FormulaProcessor_isValue(result) ? result : NaN;\n }\n return FormulaProcessor_isValue(cell) ? cell : NaN;\n }\n return NaN;\n}\n/**\n * Processes a formula array on the given table. If the formula does not contain\n * references or ranges, then no table has to be provided.\n *\n * @private\n * @function Highcharts.processFormula\n *\n * @param {Highcharts.Formula} formula\n * Formula array to process.\n *\n * @param {Highcharts.DataTable} [table]\n * Table to use for references and ranges.\n *\n * @return {Highcharts.FormulaValue}\n * Result value of the process. `NaN` indicates an error.\n */\nfunction processFormula(formula, table) {\n let x;\n for (let i = 0, iEnd = formula.length, item, operator, result, y; i < iEnd; ++i) {\n item = formula[i];\n // Remember operator for operation on next item\n if (FormulaProcessor_isOperator(item)) {\n operator = item;\n continue;\n }\n // Next item is a value\n if (FormulaProcessor_isValue(item)) {\n y = item;\n // Next item is a formula and needs to get processed first\n }\n else if (FormulaProcessor_isFormula(item)) {\n y = processFormula(formula, table);\n // Next item is a function call and needs to get processed first\n }\n else if (FormulaProcessor_isFunction(item)) {\n result = processFunction(item, table);\n y = (FormulaProcessor_isValue(result) ? result : NaN); // Arrays are not allowed here\n // Next item is a reference and needs to get resolved\n }\n else if (FormulaProcessor_isReference(item)) {\n y = (table && getReferenceValue(item, table));\n }\n // If we have a next value, lets do the operation\n if (typeof y !== 'undefined') {\n // Next value is our first value\n if (typeof x === 'undefined') {\n if (operator) {\n x = basicOperation(operator, 0, y);\n }\n else {\n x = y;\n }\n // Fail fast if no operator available\n }\n else if (!operator) {\n return NaN;\n // Regular next value\n }\n else {\n const operator2 = formula[i + 1];\n if (FormulaProcessor_isOperator(operator2) &&\n operatorPriority[operator2] > operatorPriority[operator]) {\n y = basicOperation(operator2, y, processFormula(formula.slice(i + 2)));\n i = iEnd;\n }\n x = basicOperation(operator, x, y);\n }\n operator = void 0;\n y = void 0;\n }\n }\n return FormulaProcessor_isValue(x) ? x : NaN;\n}\n/**\n * Process a function on the given table. If the arguments do not contain\n * references or ranges, then no table has to be provided.\n *\n * @private\n *\n * @param {Highcharts.FormulaFunction} formulaFunction\n * Formula function to process.\n *\n * @param {Highcharts.DataTable} [table]\n * Table to use for references and ranges.\n *\n * @param {Highcharts.FormulaReference} [reference]\n * Table cell reference to use for relative references and ranges.\n *\n * @return {Highcharts.FormulaValue|Array<Highcharts.FormulaValue>}\n * Result value (or values) of the process. `NaN` indicates an error.\n */\nfunction processFunction(formulaFunction, table, \n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nreference // @todo\n) {\n const processor = processorFunctions[formulaFunction.name];\n if (processor) {\n try {\n return processor(formulaFunction.args, table);\n }\n catch {\n return NaN;\n }\n }\n const error = new Error(`Function \"${formulaFunction.name}\" not found.`);\n error.name = 'FormulaProcessError';\n throw error;\n}\n/**\n * Registers a function for the FormulaProcessor.\n *\n * @param {string} name\n * Name of the function in spreadsheets notation with upper case.\n *\n * @param {Highcharts.FormulaFunction} processorFunction\n * ProcessorFunction for the FormulaProcessor. This is an object so that it\n * can take additional parameter for future validation routines.\n *\n * @return {boolean}\n * Return true, if the ProcessorFunction has been registered.\n */\nfunction registerProcessorFunction(name, processorFunction) {\n return (processorFunctionNameRegExp.test(name) &&\n !processorFunctions[name] &&\n !!(processorFunctions[name] = processorFunction));\n}\n/**\n * Translates relative references and ranges in-place.\n *\n * @param {Highcharts.Formula} formula\n * Formula to translate references and ranges in.\n *\n * @param {number} [columnDelta=0]\n * Column delta to translate to. Negative translate back.\n *\n * @param {number} [rowDelta=0]\n * Row delta to translate to. Negative numbers translate back.\n *\n * @return {Highcharts.Formula}\n * Formula with translated reference and ranges. This formula is equal to the\n * first argument.\n */\nfunction translateReferences(formula, columnDelta = 0, rowDelta = 0) {\n for (let i = 0, iEnd = formula.length, item; i < iEnd; ++i) {\n item = formula[i];\n if (item instanceof Array) {\n translateReferences(item, columnDelta, rowDelta);\n }\n else if (FormulaProcessor_isFunction(item)) {\n translateReferences(item.args, columnDelta, rowDelta);\n }\n else if (FormulaProcessor_isRange(item)) {\n if (item.beginColumnRelative) {\n item.beginColumn += columnDelta;\n }\n if (item.beginRowRelative) {\n item.beginRow += rowDelta;\n }\n if (item.endColumnRelative) {\n item.endColumn += columnDelta;\n }\n if (item.endRowRelative) {\n item.endRow += rowDelta;\n }\n }\n else if (FormulaProcessor_isReference(item)) {\n if (item.columnRelative) {\n item.column += columnDelta;\n }\n if (item.rowRelative) {\n item.row += rowDelta;\n }\n }\n }\n return formula;\n}\n/* *\n *\n * Default Export\n *\n * */\nconst FormulaProcessor = {\n asNumber,\n getArgumentValue,\n getArgumentsValues,\n getRangeValues,\n getReferenceValue,\n processFormula,\n processorFunctions,\n registerProcessorFunction,\n translateReferences\n};\n/* harmony default export */ const Formula_FormulaProcessor = (FormulaProcessor);\n\n;// ./code/es-modules/Data/Formula/Functions/ABS.js\n/* *\n *\n * (c) 2009-2024 Highsoft AS\n *\n * License: www.highcharts.com/license\n *\n * !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!\n *\n * Authors:\n * - Sophie Bremer\n *\n * */\n\n\nconst { getArgumentValue: ABS_getArgumentValue } = Formula_FormulaProcessor;\n/* *\n *\n * Functions\n *\n * */\n/**\n * Processor for the `ABS(value)` implementation. Returns positive numbers.\n *\n * @private\n * @function Formula.processorFunctions.AND\n *\n * @param {Highcharts.FormulaArguments} args\n * Arguments to process.\n *\n * @param {Highcharts.DataTable} [table]\n * Table to use for references and ranges.\n *\n * @return {Array<number>}\n * Result value of the process.\n */\nfunction ABS(args, table) {\n const value = ABS_getArgumentValue(args[0], table);\n switch (typeof value) {\n case 'number':\n return Math.abs(value);\n case 'object': {\n const values = [];\n for (let i = 0, iEnd = value.length, value2; i < iEnd; ++i) {\n value2 = value[i];\n if (typeof value2 !== 'number') {\n return NaN;\n }\n values.push(Math.abs(value2));\n }\n return values;\n }\n default:\n return NaN;\n }\n}\n/* *\n *\n * Registry\n *\n * */\nFormula_FormulaProcessor.registerProcessorFunction('ABS', ABS);\n/* *\n *\n * Default Export\n *\n * */\n/* harmony default export */ const Functions_ABS = ((/* unused pure expression or super */ null && (ABS)));\n\n;// ./code/es-modules/Data/Formula/Functions/AND.js\n/* *\n *\n * (c) 2009-2024 Highsoft AS\n *\n * License: www.highcharts.com/license\n *\n * !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!\n *\n * Authors:\n * - Sophie Bremer\n *\n * */\n\n\nconst { getArgumentValue: AND_getArgumentValue } = Formula_FormulaProcessor;\n/* *\n *\n * Functions\n *\n * */\n/**\n * Processor for the `AND(...tests)` implementation. Returns `TRUE`, if all test\n * results are not `0` or `FALSE`.\n *\n * @private\n * @function Formula.processorFunctions.AND\n *\n * @param {Highcharts.FormulaArguments} args\n * Arguments to process.\n *\n * @param {Highcharts.DataTable} [table]\n * Table to use for references and ranges.\n *\n * @return {boolean}\n * Result value of the process.\n */\nfunction AND(args, table) {\n for (let i = 0, iEnd = args.length, value; i < iEnd; ++i) {\n value = AND_getArgumentValue(args[i], table);\n if (!value ||\n (typeof value === 'object' &&\n !AND(value, table))) {\n return false;\n }\n }\n return true;\n}\n/* *\n *\n * Registry\n *\n * */\nFormula_FormulaProcessor.registerProcessorFunction('AND', AND);\n/* *\n *\n * Default Export\n *\n * */\n/* harmony default export */ const Functions_AND = ((/* unused pure expression or super */ null && (AND)));\n\n;// ./code/es-modules/Data/Formula/Functions/AVERAGE.js\n/* *\n *\n * (c) 2009-2024 Highsoft AS\n *\n * License: www.highcharts.com/license\n *\n * !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!\n *\n * Authors:\n * - Sophie Bremer\n *\n * */\n\n\nconst { getArgumentsValues: AVERAGE_getArgumentsValues } = Formula_FormulaProcessor;\n/* *\n *\n * Functions\n *\n * */\n/**\n * Processor for the `AVERAGE(...values)` implementation. Calculates the average\n * of the given values that are numbers.\n *\n * @private\n * @function Formula.processorFunctions.AVERAGE\n *\n * @param {Highcharts.FormulaArguments} args\n * Arguments to process.\n *\n * @param {Highcharts.DataTable} [table]\n * Table to use for references and ranges.\n *\n * @return {number}\n * Result value of the process.\n */\nfunction AVERAGE(args, table) {\n const values = AVERAGE_getArgumentsValues(args, table);\n let count = 0, result = 0;\n for (let i = 0, iEnd = values.length, value; i < iEnd; ++i) {\n value = values[i];\n switch (typeof value) {\n case 'number':\n if (!isNaN(value)) {\n ++count;\n result += value;\n }\n break;\n case 'object':\n for (let j = 0, jEnd = value.length, value2; j < jEnd; ++j) {\n value2 = value[j];\n if (typeof value2 === 'number' &&\n !isNaN(value2)) {\n ++count;\n result += value2;\n }\n }\n break;\n }\n }\n return (count ? (result / count) : 0);\n}\n/* *\n *\n * Registry\n *\n * */\nFormula_FormulaProcessor.registerProcessorFunction('AVERAGE', AVERAGE);\n/* *\n *\n * Default Export\n *\n * */\n/* harmony default export */ const Functions_AVERAGE = ((/* unused pure expression or super */ null && (AVERAGE)));\n\n;// ./code/es-modules/Data/Formula/Functions/AVERAGEA.js\n/* *\n *\n * (c) 2009-2024 Highsoft AS\n *\n * License: www.highcharts.com/license\n *\n * !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!\n *\n * Authors:\n * - Sophie Bremer\n *\n * */\n\n\nconst { getArgumentValue: AVERAGEA_getArgumentValue } = Formula_FormulaProcessor;\n/* *\n *\n * Functions\n *\n * */\n/**\n * Processor for the `AVERAGEA(...values)` implementation. Calculates the\n * average of the given values. Strings and FALSE are calculated as 0.\n *\n * @private\n * @function Formula.processorFunctions.AVERAGEA\n *\n * @param {Highcharts.FormulaArguments} args\n * Arguments to process.\n *\n * @param {Highcharts.DataTable} [table]\n * Table to use for references and ranges.\n *\n * @return {number}\n * Result value of the process.\n */\nfunction AVERAGEA(args, table) {\n let count = 0, result = 0;\n for (let i = 0, iEnd = args.length, value; i < iEnd; ++i) {\n value = AVERAGEA_getArgumentValue(args[i], table);\n switch (typeof value) {\n case 'boolean':\n ++count;\n result += (value ? 1 : 0);\n continue;\n case 'number':\n if (!isNaN(value)) {\n ++count;\n result += value;\n }\n continue;\n case 'string':\n ++count;\n continue;\n default:\n for (let j = 0, jEnd = value.length, value2; j < jEnd; ++j) {\n value2 = value[j];\n switch (typeof value2) {\n case 'boolean':\n ++count;\n result += (value2 ? 1 : 0);\n continue;\n case 'number':\n if (!isNaN(value2)) {\n ++count;\n result += value2;\n }\n continue;\n case 'string':\n ++count;\n continue;\n }\n }\n continue;\n }\n }\n return (count ? (result / count) : 0);\n}\n/* *\n *\n * Registry\n *\n * */\nFormula_FormulaProcessor.registerProcessorFunction('AVERAGEA', AVERAGEA);\n/* *\n *\n * Default Export\n *\n * */\n/* harmony default export */ const Functions_AVERAGEA = ((/* unused pure expression or super */ null && (AVERAGEA)));\n\n;// ./code/es-modules/Data/Formula/Functions/COUNT.js\n/* *\n *\n * (c) 2009-2024 Highsoft AS\n *\n * License: www.highcharts.com/license\n *\n * !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!\n *\n * Authors:\n * - Sophie Bremer\n *\n * */\n\n\n/* *\n *\n * Functions\n *\n * */\n/**\n * Processor for the `COUNT(...values)` implementation. Returns the count of\n * given values that are numbers.\n *\n * @private\n * @function Formula.processorFunctions.COUNT\n *\n * @param {Highcharts.FormulaArguments} args\n * Arguments to process.\n *\n * @param {Highcharts.DataTable} [table]\n * Table to use for references and ranges.\n *\n * @return {number}\n * Result value of the process.\n */\nfunction COUNT(args, table) {\n const values = Formula_FormulaProcessor.getArgumentsValues(args, table);\n let count = 0;\n for (let i = 0, iEnd = values.length, value; i < iEnd; ++i) {\n value = values[i];\n switch (typeof value) {\n case 'number':\n if (!isNaN(value)) {\n ++count;\n }\n break;\n case 'object':\n count += COUNT(value, table);\n break;\n }\n }\n return count;\n}\n/* *\n *\n * Registry\n *\n * */\nFormula_FormulaProcessor.registerProcessorFunction('COUNT', COUNT);\n/* *\n *\n * Default Export\n *\n * */\n/* harmony default export */ const Functions_COUNT = ((/* unused pure expression or super */ null && (COUNT)));\n\n;// ./code/es-modules/Data/Formula/Functions/COUNTA.js\n/* *\n *\n * (c) 2009-2024 Highsoft AS\n *\n * License: www.highcharts.com/license\n *\n * !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!\n *\n * Authors:\n * - Sophie Bremer\n *\n * */\n\n\n/* *\n *\n * Functions\n *\n * */\n/**\n * Processor for the `COUNTA(...values)` implementation. Returns the count of\n * given values that are not empty.\n *\n * @private\n * @function Formula.processorFunctions.COUNT\n *\n * @param {Highcharts.FormulaArguments} args\n * Arguments to process.\n *\n * @param {Highcharts.DataTable} [table]\n * Table to use for references and ranges.\n *\n * @return {number}\n * Result value of the process.\n */\nfunction COUNTA(args, table) {\n const values = Formula_FormulaProcessor.getArgumentsValues(args, table);\n let count = 0;\n for (let i = 0, iEnd = values.length, value; i < iEnd; ++i) {\n value = values[i];\n switch (typeof value) {\n case 'number':\n if (isNaN(value)) {\n continue;\n }\n break;\n case 'object':\n count += COUNTA(value, table);\n continue;\n case 'string':\n if (!value) {\n continue;\n }\n break;\n }\n ++count;\n }\n return count;\n}\n/* *\n *\n * Registry\n *\n * */\nFormula_FormulaProcessor.registerProcessorFunction('COUNTA', COUNTA);\n/* *\n *\n * Default Export\n *\n * */\n/* harmony default export */ const Functions_COUNTA = ((/* unused pure expression or super */ null && (COUNTA)));\n\n;// ./code/es-modules/Data/Formula/Functions/IF.js\n/* *\n *\n * (c) 2009-2024 Highsoft AS\n *\n * License: www.highcharts.com/license\n *\n * !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!\n *\n * Authors:\n * - Sophie Bremer\n *\n * */\n\n\nconst { getArgumentValue: IF_getArgumentValue } = Formula_FormulaProcessor;\n/* *\n *\n * Functions\n *\n * */\n/**\n * Processor for the `IF(test, value1, value2)` implementation. Returns one of\n * the values based on the test result. `value1` will be returned, if the test\n * result is not `0` or `FALSE`.\n *\n * @private\n * @function Formula.processorFunctions.IF\n *\n * @param {Highcharts.FormulaArguments} args\n * Arguments to process.\n *\n * @param {Highcharts.DataTable} [table]\n * Table to use for references and ranges.\n *\n * @return {Highcharts.FormulaValue|Array<Highcharts.FormulaValue>}\n * Result value of the process.\n */\nfunction IF(args, table) {\n return (IF_getArgumentValue(args[0], table) ?\n IF_getArgumentValue(args[1], table) :\n IF_getArgumentValue(args[2], table));\n}\n/* *\n *\n * Registry\n *\n * */\nFormula_FormulaProcessor.registerProcessorFunction('IF', IF);\n/* *\n *\n * Default Export\n *\n * */\n/* harmony default export */ const Functions_IF = ((/* unused pure expression or super */ null && (IF)));\n\n;// ./code/es-modules/Data/Formula/Functions/ISNA.js\n/* *\n *\n * (c) 2009-2024 Highsoft AS\n *\n * License: www.highcharts.com/license\n *\n * !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!\n *\n * Authors:\n * - Sophie Bremer\n *\n * */\n\n\nconst { getArgumentValue: ISNA_getArgumentValue } = Formula_FormulaProcessor;\n/* *\n *\n * Functions\n *\n * */\n/**\n * Processor for the `ISNA(value)` implementation. Returns TRUE if value is not\n * a number.\n *\n * @private\n * @function Formula.processorFunctions.ISNA\n *\n * @param {Highcharts.FormulaArguments} args\n * Arguments to process.\n *\n * @param {Highcharts.DataTable} [table]\n * Table to use for references and ranges.\n *\n * @return {boolean}\n * Result value of the process.\n */\nfunction ISNA(args, table) {\n const value = ISNA_getArgumentValue(args[0], table);\n return (typeof value !== 'number' || isNaN(value));\n}\n/* *\n *\n * Registry\n *\n * */\nFormula_FormulaProcessor.registerProcessorFunction('ISNA', ISNA);\n/* *\n *\n * Default Export\n *\n * */\n/* harmony default export */ const Functions_ISNA = ((/* unused pure expression or super */ null && (ISNA)));\n\n;// ./code/es-modules/Data/Formula/Functions/MAX.js\n/* *\n *\n * (c) 2009-2024 Highsoft AS\n *\n * License: www.highcharts.com/license\n *\n * !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!\n *\n * Authors:\n * - Sophie Bremer\n *\n * */\n\n\nconst { getArgumentsValues: MAX_getArgumentsValues } = Formula_FormulaProcessor;\n/* *\n *\n * Functions\n *\n * */\n/**\n * Processor for the `MAX(...values)` implementation. Calculates the largest\n * of the given values that are numbers.\n *\n * @private\n * @function Formula.processorFunctions.MAX\n *\n * @param {Highcharts.FormulaArguments} args\n * Arguments to process.\n *\n * @param {Highcharts.DataTable} [table]\n * Table to use for references and ranges.\n *\n * @return {number}\n * Result value of the process.\n */\nfunction MAX(args, table) {\n const values = MAX_getArgumentsValues(args, table);\n let result = Number.NEGATIVE_INFINITY;\n for (let i = 0, iEnd = values.length, value; i < iEnd; ++i) {\n value = values[i];\n switch (typeof value) {\n case 'number':\n if (value > result) {\n result = value;\n }\n break;\n case 'object':\n value = MAX(value);\n if (value > result) {\n result = value;\n }\n break;\n }\n }\n return isFinite(result) ? result : 0;\n}\n/* *\n *\n * Registry\n *\n * */\nFormula_FormulaProcessor.registerProcessorFunction('MAX', MAX);\n/* *\n *\n * Default Export\n *\n * */\n/* harmony default export */ const Functions_MAX = ((/* unused pure expression or super */ null && (MAX)));\n\n;// ./code/es-modules/Data/Formula/Functions/MEDIAN.js\n/* *\n *\n * (c) 2009-2024 Highsoft AS\n *\n * License: www.highcharts.com/license\n *\n * !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!\n *\n * Authors:\n * - Sophie Bremer\n *\n * */\n\n\n/* *\n *\n * Functions\n *\n * */\n/**\n * Processor for the `MEDIAN(...values)` implementation. Calculates the median\n * average of the given values.\n *\n * @private\n * @function Formula.processorFunctions.MEDIAN\n *\n * @param {Highcharts.FormulaArguments} args\n * Arguments to process.\n *\n * @param {Highcharts.DataTable} [table]\n * Table to process.\n *\n * @return {number}\n * Result value of the process.\n */\nfunction MEDIAN(args, table) {\n const median = [], values = Formula_FormulaProcessor.getArgumentsValues(args, table);\n for (let i = 0, iEnd = values.length, value; i < iEnd; ++i) {\n value = values[i];\n switch (typeof value) {\n case 'number':\n if (!isNaN(value)) {\n median.push(value);\n }\n break;\n case 'object':\n for (let j = 0, jEnd = value.length, value2; j < jEnd; ++j) {\n value2 = value[j];\n if (typeof value2 === 'number' &&\n !isNaN(value2)) {\n median.push(value2);\n }\n }\n break;\n }\n }\n const count = median.length;\n if (!count) {\n return NaN;\n }\n const half = Math.floor(count / 2); // Floor because index starts at 0\n return (count % 2 ?\n median[half] : // Odd\n (median[half - 1] + median[half]) / 2 // Even\n );\n}\n/* *\n *\n * Registry\n *\n * */\nFormula_FormulaProcessor.registerProcessorFunction('MEDIAN', MEDIAN);\n/* *\n *\n * Default Export\n *\n * */\n/* harmony default export */ const Functions_MEDIAN = ((/* unused pure expression or super */ null && (MEDIAN)));\n\n;// ./code/es-modules/Data/Formula/Functions/MIN.js\n/* *\n *\n * (c) 2009-2024 Highsoft AS\n *\n * License: www.highcharts.com/license\n *\n * !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!\n *\n * Authors:\n * - Sophie Bremer\n *\n * */\n\n\nconst { getArgumentsValues: MIN_getArgumentsValues } = Formula_FormulaProcessor;\n/* *\n *\n * Functions\n *\n * */\n/**\n * Processor for the `MIN(...values)` implementation. Calculates the lowest\n * of the given values that are numbers.\n *\n * @private\n * @function Formula.processorFunctions.MIN\n *\n * @param {Highcharts.FormulaArguments} args\n * Arguments to process.\n *\n * @param {Highcharts.DataTable} [table]\n * Table to use for references and ranges.\n *\n * @return {number}\n * Result value of the process.\n */\nfunction MIN(args, table) {\n const values = MIN_getArgumentsValues(args, table);\n let result = Number.POSITIVE_INFINITY;\n for (let i = 0, iEnd = values.length, value; i < iEnd; ++i) {\n value = values[i];\n switch (typeof value) {\n case 'number':\n if (value < result) {\n result = value;\n }\n break;\n case 'object':\n value = MIN(value);\n if (value < result) {\n result = value;\n }\n break;\n }\n }\n return isFinite(result) ? result : 0;\n}\n/* *\n *\n * Registry\n *\n * */\nFormula_FormulaProcessor.registerProcessorFunction('MIN', MIN);\n/* *\n *\n * Default Export\n *\n * */\n/* harmony default export */ const Functions_MIN = ((/* unused pure expression or super */ null && (MIN)));\n\n;// ./code/es-modules/Data/Formula/Functions/MOD.js\n/* *\n *\n * (c) 2009-2024 Highsoft AS\n *\n * License: www.highcharts.com/license\n *\n * !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!\n *\n * Authors:\n * - Sophie Bremer\n *\n * */\n\n\nconst { getArgumentValue: MOD_getArgumentValue } = Formula_FormulaProcessor;\n/* *\n *\n * Functions\n *\n * */\n/**\n * Processor for the `MOD(value1, value2)` implementation. Calculates the rest\n * of the division with the given values.\n *\n * @private\n * @function Formula.processorFunctions.MOD\n *\n * @param {Highcharts.FormulaArguments} args\n * Arguments to process.\n *\n * @param {Highcharts.DataTable} [table]\n * Table to use for references and ranges.\n *\n * @return {number}\n * Result value of the process.\n */\nfunction MOD(args, table) {\n let value1 = MOD_getArgumentValue(args[0], table), value2 = MOD_getArgumentValue(args[1], table);\n if (typeof value1 === 'object') {\n value1 = value1[0];\n }\n if (typeof value2 === 'object') {\n value2 = value2[0];\n }\n if (typeof value1 !== 'number' ||\n typeof value2 !== 'number' ||\n value2 === 0) {\n return NaN;\n }\n return value1 % value2;\n}\n/* *\n *\n * Registry\n *\n * */\nFormula_FormulaProcessor.registerProcessorFunction('MOD', MOD);\n/* *\n *\n * Default Export\n *\n * */\n/* harmony default export */ const Functions_MOD = ((/* unused pure expression or super */ null && (MOD)));\n\n;// ./code/es-modules/Data/Formula/Functions/MODE.js\n/* *\n *\n * (c) 2009-2024 Highsoft AS\n *\n * License: www.highcharts.com/license\n *\n * !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!\n *\n * Authors:\n * - Sophie Bremer\n *\n * */\n\n\n/* *\n *\n * Functions\n *\n * */\n/**\n * Creates the mode map of the given arguments.\n *\n * @private\n * @function Formula.processorFunctions.MULT\n *\n * @param {Highcharts.FormulaArguments} args\n * Arguments to process.\n *\n * @param {Highcharts.DataTable} [table]\n * Table to process.\n *\n * @return {number}\n * Result value of the process.\n */\nfunction getModeMap(args, table) {\n const modeMap = {}, values = Formula_FormulaProcessor.getArgumentsValues(args, table);\n for (let i = 0, iEnd = values.length, value; i < iEnd; ++i) {\n value = values[i];\n switch (typeof value) {\n case 'number':\n if (!isNaN(value)) {\n modeMap[value] = (modeMap[value] || 0) + 1;\n }\n break;\n case 'object':\n for (let j = 0, jEnd = value.length, value2; j < jEnd; ++j) {\n value2 = value[j];\n if (typeof value2 === 'number' &&\n !isNaN(value2)) {\n modeMap[value2] = (modeMap[value2] || 0) + 1;\n }\n }\n break;\n }\n }\n return modeMap;\n}\n/**\n * Processor for the `MODE.MULT(...values)` implementation. Calculates the most\n * frequent values of the give values.\n *\n * @private\n * @function Formula.processorFunctions.MULT\n *\n * @param {Highcharts.FormulaArguments} args\n * Arguments to process.\n *\n * @param {Highcharts.DataTable} [table]\n * Table to process.\n *\n * @return {number|Array<number>}\n * Result value of the process.\n */\nfunction MULT(args, table) {\n const modeMap = getModeMap(args, table), keys = Object.keys(modeMap);\n if (!keys.length) {\n return NaN;\n }\n let modeKeys = [parseFloat(keys[0])], modeCount = modeMap[keys[0]];\n for (let i = 1, iEnd = keys.length, key, count; i < iEnd; ++i) {\n key = keys[i];\n count = modeMap[key];\n if (modeCount < count) {\n modeKeys = [parseFloat(key)];\n modeCount = count;\n }\n else if (modeCount === count) {\n modeKeys.push(parseFloat(key));\n }\n }\n return modeCount > 1 ? modeKeys : NaN;\n}\n/**\n * Processor for the `MODE.SNGL(...values)` implementation. Calculates the\n * lowest most frequent value of the give values.\n *\n * @private\n * @function Formula.processorFunctions['MODE.SNGL']\n *\n * @param {Highcharts.FormulaArguments} args\n * Arguments to process.\n *\n * @param {Highcharts.DataTable} [table]\n * Table to process.\n *\n * @return {number}\n * Result value of the process.\n */\nfunction SNGL(args, table) {\n const modeMap = getModeMap(args, table), keys = Object.keys(modeMap);\n if (!keys.length) {\n return NaN;\n }\n let modeKey = parseFloat(keys[0]), modeCount = modeMap[keys[0]];\n for (let i = 1, iEnd = keys.length, key, keyValue, count; i < iEnd; ++i) {\n key = keys[i];\n count = modeMap[key];\n if (modeCount < count) {\n modeKey = parseFloat(key);\n modeCount = count;\n }\n else if (modeCount === count) {\n keyValue = parseFloat(key);\n if (modeKey > keyValue) {\n modeKey = keyValue;\n modeCount = count;\n }\n }\n }\n return modeCount > 1 ? modeKey : NaN;\n}\n/* *\n *\n * Registry\n *\n * */\nFormula_FormulaProcessor.registerProcessorFunction('MODE', SNGL);\nFormula_FormulaProcessor.registerProcessorFunction('MODE.MULT', MULT);\nFormula_FormulaProcessor.registerProcessorFunction('MODE.SNGL', SNGL);\n/* *\n *\n * Default Export\n *\n * */\nconst MODE = {\n MULT,\n SNGL\n};\n/* harmony default export */ const Functions_MODE = ((/* unused pure expression or super */ null && (MODE)));\n\n;// ./code/es-modules/Data/Formula/Functions/NOT.js\n/* *\n *\n * (c) 2009-2024 Highsoft AS\n *\n * License: www.highcharts.com/license\n *\n * !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!\n *\n * Authors:\n * - Sophie Bremer\n *\n * */\n\n\nconst { getArgumentValue: NOT_getArgumentValue } = Formula_FormulaProcessor;\n/* *\n *\n * Functions\n *\n * */\n/**\n * Processor for the `NOT(value)` implementation. Returns the opposite test\n * result.\n *\n * @private\n * @function Formula.processorFunctions.NOT\n *\n * @param {Highcharts.FormulaArguments} args\n * Arguments to process.\n *\n * @param {Highcharts.DataTable} [table]\n * Table to use for references and ranges.\n *\n * @return {boolean|number}\n * Result value of the process.\n */\nfunction NOT(args, table) {\n let value = NOT_getArgumentValue(args[0], table);\n if (typeof value === 'object') {\n value = value[0];\n }\n switch (typeof value) {\n case 'boolean':\n case 'number':\n return !value;\n }\n return NaN;\n}\n/* *\n *\n * Registry\n *\n * */\nFormula_FormulaProcessor.registerProcessorFunction('NOT', NOT);\n/* *\n *\n * Default Export\n *\n * */\n/* harmony default export */ const Functions_NOT = ((/* unused pure expression or super */ null && (NOT)));\n\n;// ./code/es-modules/Data/Formula/Functions/OR.js\n/* *\n *\n * (c) 2009-2024 Highsoft AS\n *\n * License: www.highcharts.com/license\n *\n * !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!\n *\n * Authors:\n * - Sophie Bremer\n *\n * */\n\n\nconst { getArgumentValue: OR_getArgumentValue } = Formula_FormulaProcessor;\n/* *\n *\n * Functions\n *\n * */\n/**\n * Processor for the `OR(...tests)` implementation. Returns `TRUE`, if one test\n * result is not `0` or `FALSE`.\n *\n * @private\n * @function Formula.processorFunctions.AND\n *\n * @param {Highcharts.FormulaArguments} args\n * Arguments to process.\n *\n * @param {Highcharts.DataTable} [table]\n * Table to use for references and ranges.\n *\n * @return {boolean}\n * Result value of the process.\n */\nfunction OR(args, table) {\n for (let i = 0, iEnd = args.length, value; i < iEnd; ++i) {\n value = OR_getArgumentValue(args[i], table);\n if (typeof value === 'object') {\n if (OR(value, table)) {\n return true;\n }\n }\n else if (value) {\n return true;\n }\n }\n return false;\n}\n/* *\n *\n * Registry\n *\n * */\nFormula_FormulaProcessor.registerProcessorFunction('OR', OR);\n/* *\n *\n * Default Export\n *\n * */\n/* harmony default export */ const Functions_OR = ((/* unused pure expression or super */ null && (OR)));\n\n;// ./code/es-modules/Data/Formula/Functions/PRODUCT.js\n/* *\n *\n * (c) 2009-2024 Highsoft AS\n *\n * License: www.highcharts.com/license\n *\n * !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!\n *\n * Authors:\n * - Sophie Bremer\n *\n * */\n\n\nconst { getArgumentsValues: PRODUCT_getArgumentsValues } = Formula_FormulaProcessor;\n/* *\n *\n * Functions\n *\n * */\n/**\n * Processor for the `PRODUCT(...values)` implementation. Calculates the product\n * of the given values.\n *\n * @private\n * @function Formula.processorFunctions.PRODUCT\n *\n * @param {Highcharts.FormulaArguments} args\n * Arguments to process.\n *\n * @param {Highcharts.DataTable} [table]\n * Table to use for references and ranges.\n *\n * @return {number}\n * Result value of the process.\n */\nfunction PRODUCT(args, table) {\n const values = PRODUCT_getArgumentsValues(args, table);\n let result = 1, calculated = false;\n for (let i = 0, iEnd = values.length, value; i < iEnd; ++i) {\n value = values[i];\n switch (typeof value) {\n case 'number':\n if (!isNaN(value)) {\n calculated = true;\n result *= value;\n }\n break;\n case 'object':\n calculated = true;\n result *= PRODUCT(value, table);\n break;\n }\n }\n return (calculated ? result : 0);\n}\n/* *\n *\n * Registry\n *\n * */\nFormula_FormulaProcessor.registerProcessorFunction('PRODUCT', PRODUCT);\n/* *\n *\n * Default Export\n *\n * */\n/* harmony default export */ const Functions_PRODUCT = ((/* unused pure expression or super */ null && (PRODUCT)));\n\n;// ./code/es-modules/Data/Formula/Functions/SUM.js\n/* *\n *\n * (c) 2009-2024 Highsoft AS\n *\n * License: www.highcharts.com/license\n *\n * !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!\n *\n * Authors:\n * - Sophie Bremer\n *\n * */\n\n\n/* *\n *\n * Functions\n *\n * */\n/**\n * Processor for the `SUM(...values)` implementation. Calculates the sum of the\n * given values.\n *\n * @private\n * @function Formula.processorFunctions.SUM\n *\n * @param {Highcharts.FormulaArguments} args\n * Arguments to process.\n *\n * @param {Highcharts.DataTable} [table]\n * Table to process.\n *\n * @return {number}\n * Result value of the process.\n */\nfunction SUM(args, table) {\n const values = Formula_FormulaProcessor.getArgumentsValues(args, table);\n let result = 0;\n for (let i = 0, iEnd = values.length, value; i < iEnd; ++i) {\n value = values[i];\n switch (typeof value) {\n case 'number':\n if (!isNaN(value)) {\n result += value;\n }\n break;\n case 'object':\n result += SUM(value, table);\n break;\n }\n }\n return result;\n}\n/* *\n *\n * Registry\n *\n * */\nFormula_FormulaProcessor.registerProcessorFunction('SUM', SUM); // 🐝\n/* *\n *\n * Default Export\n *\n * */\n/* harmony default export */ const Functions_SUM = ((/* unused pure expression or super */ null && (SUM)));\n\n;// ./code/es-modules/Data/Formula/Functions/XOR.js\n/* *\n *\n * (c) 2009-2024 Highsoft AS\n *\n * License: www.highcharts.com/license\n *\n * !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!\n *\n * Authors:\n * - Sophie Bremer\n *\n * */\n\n\nconst { getArgumentValue: XOR_getArgumentValue } = Formula_FormulaProcessor;\n/* *\n *\n * Functions\n *\n * */\n/**\n * Processor for the `XOR(...tests)` implementation. Returns `TRUE`, if at least\n * one of the given tests differs in result of other tests.\n *\n * @private\n * @function Formula.processorFunctions.AND\n *\n * @param {Highcharts.FormulaArguments} args\n * Arguments to process.\n *\n * @param {Highcharts.DataTable} [table]\n * Table to use for references and ranges.\n *\n * @return {boolean|number}\n * Result value of the process.\n */\nfunction XOR(args, table) {\n for (let i = 0, iEnd = args.length, lastValue, value; i < iEnd; ++i) {\n value = XOR_getArgumentValue(args[i], table);\n switch (typeof value) {\n case 'boolean':\n case 'number':\n if (typeof lastValue === 'undefined') {\n lastValue = !!value;\n }\n else if (!!value !== lastValue) {\n return true;\n }\n break;\n case 'object':\n for (let j = 0, jEnd = value.length, value2; j < jEnd; ++j) {\n value2 = value[j];\n switch (typeof value2) {\n case 'boolean':\n case 'number':\n if (typeof lastValue === 'undefined') {\n lastValue = !!value2;\n }\n else if (!!value2 !== lastValue) {\n return true;\n }\n break;\n }\n }\n break;\n }\n }\n return false;\n}\n/* *\n *\n * Registry\n *\n * */\nFormula_FormulaProcessor.registerProcessorFunction('XOR', XOR);\n/* *\n *\n * Default Export\n *\n * */\n/* harmony default export */ const Functions_XOR = ((/* unused pure expression or super */ null && (XOR)));\n\n;// ./code/es-modules/Data/Formula/Formula.js\n/* *\n *\n * (c) 2009-2024 Highsoft AS\n *\n * License: www.highcharts.com/license\n *\n * !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!\n *\n * Authors:\n * - Sophie Bremer\n *\n * */\n\n/* *\n *\n * Imports\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 * Default Export\n *\n * */\n/**\n * Formula engine to make use of spreadsheet formula strings.\n * @internal\n */\nconst Formula = {\n ...Formula_FormulaParser,\n ...Formula_FormulaProcessor,\n ...FormulaTypes\n};\n/* harmony default export */ const Formula_Formula = (Formula);\n\n;// ./code/es-modules/Data/Converters/CSVConverter.js\n/* *\n *\n * (c) 2009-2024 Highsoft AS\n *\n * License: www.highcharts.com/license\n *\n * !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!\n *\n * Authors:\n * - Torstein Hønsi\n * - Christer Vasseng\n * - Gøran Slettemark\n * - Sophie Bremer\n *\n * */\n\n\n\nconst { merge: CSVConverter_merge } = (highcharts_commonjs_highcharts_commonjs2_highcharts_root_Highcharts_default());\n/* *\n *\n * Class\n *\n * */\n/**\n * Handles parsing and transforming CSV to a table.\n *\n * @private\n */\nclass CSVConverter extends Converters_DataConverter {\n /* *\n *\n * Constructor\n *\n * */\n /**\n * Constructs an instance of the CSV parser.\n *\n * @param {CSVConverter.UserOptions} [options]\n * Options for the CSV parser.\n */\n constructor(options) {\n const mergedOptions = CSVConverter_merge(CSVConverter.defaultOptions, options);\n super(mergedOptions);\n /* *\n *\n * Properties\n *\n * */\n this.columns = [];\n this.headers = [];\n this.dataTypes = [];\n this.options = mergedOptions;\n }\n /* *\n *\n * Functions\n *\n * */\n /**\n * Creates a CSV string from the datatable on the connector instance.\n *\n * @param {DataConnector} connector\n * Connector instance to export from.\n *\n * @param {CSVConverter.Options} [options]\n * Options used for the export.\n *\n * @return {string}\n * CSV string from the connector table.\n */\n export(connector, options = this.options) {\n const { useLocalDecimalPoint, lineDelimiter } = options, exportNames = (this.options.firstRowAsNames !== false);\n let { decimalPoint, itemDelimiter } = options;\n if (!decimalPoint) {\n decimalPoint = (itemDelimiter !== ',' && useLocalDecimalPoint ?\n (1.1).toLocaleString()[1] :\n '.');\n }\n if (!itemDelimiter) {\n itemDelimiter = (decimalPoint === ',' ? ';' : ',');\n }\n const columns = connector.getSortedColumns(options.usePresentationOrder), columnNames = Object.keys(columns), csvRows = [], columnsCount = columnNames.length;\n const rowArray = [];\n // Add the names as the first row if they should be exported\n if (exportNames) {\n csvRows.push(columnNames.map((columnName) => `\"${columnName}\"`).join(itemDelimiter));\n }\n for (let columnIndex = 0; columnIndex < columnsCount; columnIndex++) {\n const columnName = columnNames[columnIndex], column = columns[columnName], columnLength = column.length;\n const columnMeta = connector.whatIs(columnName);\n let columnDataType;\n if (columnMeta) {\n columnDataType = columnMeta.dataType;\n }\n for (let rowIndex = 0; rowIndex < columnLength; rowIndex++) {\n let cellValue = column[rowIndex];\n if (!rowArray[rowIndex]) {\n rowArray[rowIndex] = [];\n }\n // Prefer datatype from metadata\n if (columnDataType === 'string') {\n cellValue = '\"' + cellValue + '\"';\n }\n else if (typeof cellValue === 'number') {\n cellValue = String(cellValue).replace('.', decimalPoint);\n }\n else if (typeof cellValue === 'string') {\n cellValue = `\"${cellValue}\"`;\n }\n rowArray[rowIndex][columnIndex] = cellValue;\n // On the final column, push the row to the CSV\n if (columnIndex === columnsCount - 1) {\n // Trim repeated undefined values starting at the end\n // Currently, we export the first \"comma\" even if the\n // second value is undefined\n let i = columnIndex;\n while (rowArray[rowIndex].length > 2) {\n const cellVal = rowArray[rowIndex][i];\n if (cellVal !== void 0) {\n break;\n }\n rowArray[rowIndex].pop();\n i--;\n }\n csvRows.push(rowArray[rowIndex].join(itemDelimiter));\n }\n }\n }\n return csvRows.join(lineDelimiter);\n }\n /**\n * Initiates parsing of CSV\n *\n * @param {CSVConverter.UserOptions}[options]\n * Options for the parser\n *\n * @param {DataEvent.Detail} [eventDetail]\n * Custom information for pending events.\n *\n * @emits CSVDataParser#parse\n * @emits CSVDataParser#afterParse\n */\n parse(options, eventDetail) {\n const converter = this, dataTypes = converter.dataTypes, parserOptions = CSVConverter_merge(this.options, options), { beforeParse, lineDelimiter, firstRowAsNames, itemDelimiter } = parserOptions;\n let lines, rowIt = 0, { csv, startRow, endRow } = parserOptions, column;\n converter.columns = [];\n converter.emit({\n type: 'parse',\n columns: converter.columns,\n detail: eventDetail,\n headers: converter.headers\n });\n if (csv && beforeParse) {\n csv = beforeParse(csv);\n }\n if (csv) {\n lines = csv\n .replace(/\\r\\n|\\r/g, '\\n') // Windows | Mac\n .split(lineDelimiter || '\\n');\n if (!startRow || startRow < 0) {\n startRow = 0;\n }\n if (!endRow || endRow >= lines.length) {\n endRow = lines.length - 1;\n }\n if (!itemDelimiter) {\n converter.guessedItemDelimiter =\n converter.guessDelimiter(lines);\n }\n // If the first row contain names, add them to the\n // headers array and skip the row.\n if (firstRowAsNames) {\n const headers = lines[0].split(itemDelimiter || converter.guessedItemDelimiter || ',');\n // Remove \"\"s from the headers\n for (let i = 0; i < headers.length; i++) {\n headers[i] = headers[i].trim().replace(/^[\"']|[\"']$/g, '');\n }\n converter.headers = headers;\n startRow++;\n }\n let offset = 0;\n for (rowIt = startRow; rowIt <= endRow; rowIt++) {\n if (lines[rowIt][0] === '#') {\n offset++;\n }\n else {\n converter\n .parseCSVRow(lines[rowIt], rowIt - startRow - offset);\n }\n }\n if (dataTypes.length &&\n dataTypes[0].length &&\n dataTypes[0][1] === 'date' && // Format is a string date\n !converter.options.dateFormat) {\n converter.deduceDateFormat(converter.columns[0], null, true);\n }\n // Guess types.\n for (let i = 0, iEnd = converter.columns.length; i < iEnd; ++i) {\n column = converter.columns[i];\n for (let j = 0, jEnd = column.length; j < jEnd; ++j) {\n if (column[j] && typeof column[j] === 'string') {\n let cellValue = converter.asGuessedType(column[j]);\n if (cellValue instanceof Date) {\n cellValue = cellValue.getTime();\n }\n converter.columns[i][j] = cellValue;\n }\n }\n }\n }\n converter.emit({\n type: 'afterParse',\n columns: converter.columns,\n detail: eventDetail,\n headers: converter.headers\n });\n }\n /**\n * Internal method that parses a single CSV row\n */\n parseCSVRow(columnStr, rowNumber) {\n const converter = this, columns = converter.columns || [], dataTypes = converter.dataTypes, { startColumn, endColumn } = converter.options, itemDelimiter = (converter.options.itemDelimiter ||\n converter.guessedItemDelimiter);\n let { decimalPoint } = converter.options;\n if (!decimalPoint || decimalPoint === itemDelimiter) {\n decimalPoint = converter.guessedDecimalPoint || '.';\n }\n let i = 0, c = '', token = '', actualColumn = 0, column = 0;\n const read = (j) => {\n c = columnStr[j];\n };\n const pushType = (type) => {\n if (dataTypes.length < column + 1) {\n dataTypes.push([type]);\n }\n if (dataTypes[column][dataTypes[column].length - 1] !== type) {\n dataTypes[column].push(type);\n }\n };\n const push = () => {\n if (startColumn > actualColumn || actualColumn > endColumn) {\n // Skip this column, but increment the column count (#7272)\n ++actualColumn;\n token = '';\n return;\n }\n // Save the type of the token.\n if (typeof token === 'string') {\n if (!isNaN(parseFloat(token)) && isFinite(token)) {\n token = parseFloat(token);\n pushType('number');\n }\n else if (!isNaN(Date.parse(token))) {\n token = token.replace(/\\//g, '-');\n pushType('date');\n }\n else {\n pushType('string');\n }\n }\n else {\n pushType('number');\n }\n if (columns.length < column + 1) {\n columns.push([]);\n }\n // Try to apply the decimal point, and check if the token then is a\n // number. If not, reapply the initial value\n if (typeof token !== 'number' &&\n converter.guessType(token) !== 'number' &&\n decimalPoint) {\n const initialValue = token;\n token = token.replace(decimalPoint, '.');\n if (converter.guessType(token) !== 'number') {\n token = initialValue;\n }\n }\n columns[column][rowNumber] = token;\n token = '';\n ++column;\n ++actualColumn;\n };\n if (!columnStr.trim().length) {\n return;\n }\n if (columnStr.trim()[0] === '#') {\n return;\n }\n for (; i < columnStr.length; i++) {\n read(i);\n if (c === '#') {\n // If there are hexvalues remaining (#13283)\n if (!/^#[A-F\\d]{3,3}|[A-F\\d]{6,6}/i.test(columnStr.substring(i))) {\n // The rest of the row is a comment\n push();\n return;\n }\n }\n // Quoted string\n if (c === '\"') {\n read(++i);\n while (i < columnStr.length) {\n if (c === '\"') {\n break;\n }\n token += c;\n read(++i);\n }\n }\n else if (c === itemDelimiter) {\n push();\n // Actual column data\n }\n else {\n token += c;\n }\n }\n push();\n }\n /**\n * Internal method that guesses the delimiter from the first\n * 13 lines of the CSV\n * @param {Array<string>} lines\n * The CSV, split into lines\n */\n guessDelimiter(lines) {\n let points = 0, commas = 0, guessed;\n const potDelimiters = {\n ',': 0,\n ';': 0,\n '\\t': 0\n }, linesCount = lines.length;\n for (let i = 0; i < linesCount; i++) {\n let inStr = false, c, cn, cl, token = '';\n // We should be able to detect dateformats within 13 rows\n if (i > 13) {\n break;\n }\n const columnStr = lines[i];\n for (let j = 0; j < columnStr.length; j++) {\n c = columnStr[j];\n cn = columnStr[j + 1];\n cl = columnStr[j - 1];\n if (c === '#') {\n // Skip the rest of the line - it's a comment\n break;\n }\n if (c === '\"') {\n if (inStr) {\n if (cl !== '\"' && cn !== '\"') {\n while (cn === ' ' && j < columnStr.length) {\n cn = columnStr[++j];\n }\n // After parsing a string, the next non-blank\n // should be a delimiter if the CSV is properly\n // formed.\n if (typeof potDelimiters[cn] !== 'undefined') {\n potDelimiters[cn]++;\n }\n inStr = false;\n }\n }\n else {\n inStr = true;\n }\n }\n else if (typeof potDelimiters[c] !== 'undefined') {\n token = token.trim();\n if (!isNaN(Date.parse(token))) {\n potDelimiters[c]++;\n }\n else if (isNaN(Number(token)) ||\n !isFinite(Number(token))) {\n potDelimiters[c]++;\n }\n token = '';\n }\n else {\n token += c;\n }\n if (c === ',') {\n commas++;\n }\n if (c === '.') {\n points++;\n }\n }\n }\n // Count the potential delimiters.\n // This could be improved by checking if the number of delimiters\n // equals the number of columns - 1\n if (potDelimiters[';'] > potDelimiters[',']) {\n guessed = ';';\n }\n else if (potDelimiters[','] > potDelimiters[';']) {\n guessed = ',';\n }\n else {\n // No good guess could be made..\n guessed = ',';\n }\n // Try to deduce the decimal point if it's not explicitly set.\n // If both commas or points is > 0 there is likely an issue\n if (points > commas) {\n this.guessedDecimalPoint = '.';\n }\n else {\n this.guessedDecimalPoint = ',';\n }\n return guessed;\n }\n /**\n * Handles converting the parsed data to a table.\n *\n * @return {DataTable}\n * Table from the parsed CSV.\n */\n getTable() {\n return Converters_DataConverter.getTableFromColumns(this.columns, this.headers);\n }\n}\n/* *\n *\n * Static Properties\n *\n * */\n/**\n * Default options\n */\nCSVConverter.defaultOptions = {\n ...Converters_DataConverter.defaultOptions,\n lineDelimiter: '\\n'\n};\nConverters_DataConverter.registerType('CSV', CSVConverter);\n/* *\n *\n * Default Export\n *\n * */\n/* harmony default export */ const Converters_CSVConverter = (CSVConverter);\n\n;// ./code/es-modules/Data/Connectors/CSVConnector.js\n/* *\n *\n * (c) 2009-2024 Highsoft AS\n *\n * License: www.highcharts.com/license\n *\n * !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!\n *\n * Authors:\n * - Torstein Hønsi\n * - Christer Vasseng\n * - Gøran Slettemark\n * - Sophie Bremer\n *\n * */\n\n\n\n\nconst { merge: CSVConnector_merge } = (highcharts_commonjs_highcharts_commonjs2_highcharts_root_Highcharts_default());\n/* *\n *\n * Class\n *\n * */\n/**\n * Class that handles creating a DataConnector from CSV\n *\n * @private\n */\nclass CSVConnector extends Connectors_DataConnector {\n /* *\n *\n * Constructor\n *\n * */\n /**\n * Constructs an instance of CSVConnector.\n *\n * @param {CSVConnector.UserOptions} [options]\n * Options for the connector and converter.\n */\n constructor(options) {\n const mergedOptions = CSVConnector_merge(CSVConnector.defaultOptions, options);\n super(mergedOptions);\n this.converter = new Converters_CSVConverter(mergedOptions);\n this.options = mergedOptions;\n if (mergedOptions.enablePolling) {\n this.startPolling(Math.max(mergedOptions.dataRefreshRate || 0, 1) * 1000);\n }\n }\n /* *\n *\n * Functions\n *\n * */\n /**\n * Initiates the loading of the CSV source to the connector\n *\n * @param {DataEvent.Detail} [eventDetail]\n * Custom information for pending events.\n *\n * @emits CSVConnector#load\n * @emits CSVConnector#afterLoad\n */\n load(eventDetail) {\n const connector = this, converter = connector.converter, table = connector.table, { csv, csvURL, dataModifier } = connector.options;\n connector.emit({\n type: 'load',\n csv,\n detail: eventDetail,\n table\n });\n return Promise\n .resolve(csvURL ?\n fetch(csvURL).then((response) => response.text()) :\n csv || '')\n .then((csv) => {\n if (csv) {\n // If already loaded, clear the current rows\n table.deleteColumns();\n converter.parse({ csv });\n table.setColumns(converter.getTable().getColumns());\n }\n return connector\n .setModifierOptions(dataModifier)\n .then(() => csv);\n })\n .then((csv) => {\n connector.emit({\n type: 'afterLoad',\n csv,\n detail: eventDetail,\n table\n });\n return connector;\n })['catch']((error) => {\n connector.emit({\n type: 'loadError',\n detail: eventDetail,\n error,\n table\n });\n throw error;\n });\n }\n}\n/* *\n *\n * Static Properties\n *\n * */\nCSVConnector.defaultOptions = {\n csv: '',\n csvURL: '',\n enablePolling: false,\n dataRefreshRate: 1,\n firstRowAsNames: true\n};\nConnectors_DataConnector.registerType('CSV', CSVConnector);\n/* *\n *\n * Default Export\n *\n * */\n/* harmony default export */ const Connectors_CSVConnector = ((/* unused pure expression or super */ null && (CSVConnector)));\n\n;// ./code/es-modules/Data/Converters/JSONConverter.js\n/* *\n *\n * (c) 2009-2024 Highsoft AS\n *\n * License: www.highcharts.com/license\n *\n * !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!\n *\n * Authors:\n * - Pawel Lysy\n *\n * */\n\n\n\n\nconst { error, isArray: JSONConverter_isArray, merge: JSONConverter_merge, objectEach: JSONConverter_objectEach } = (highcharts_commonjs_highcharts_commonjs2_highcharts_root_Highcharts_default());\n/* *\n *\n * Class\n *\n * */\n/**\n * Handles parsing and transforming JSON to a table.\n *\n * @private\n */\nclass JSONConverter extends Converters_DataConverter {\n /* *\n *\n * Constructor\n *\n * */\n /**\n * Constructs an instance of the JSON parser.\n *\n * @param {JSONConverter.UserOptions} [options]\n * Options for the JSON parser.\n */\n constructor(options) {\n const mergedOptions = JSONConverter_merge(JSONConverter.defaultOptions, options);\n super(mergedOptions);\n /* *\n *\n * Properties\n *\n * */\n this.columns = [];\n this.headers = [];\n this.options = mergedOptions;\n this.table = new Data_DataTable();\n }\n /* *\n *\n * Functions\n *\n * */\n /**\n * Initiates parsing of JSON structure.\n *\n * @param {JSONConverter.UserOptions}[options]\n * Options for the parser\n *\n * @param {DataEvent.Detail} [eventDetail]\n * Custom information for pending events.\n *\n * @emits JSONConverter#parse\n * @emits JSONConverter#afterParse\n */\n parse(options, eventDetail) {\n const converter = this;\n options = JSONConverter_merge(converter.options, options);\n const { beforeParse, orientation, firstRowAsNames, columnNames } = options;\n let data = options.data;\n if (!data) {\n return;\n }\n converter.columns = [];\n converter.emit({\n type: 'parse',\n columns: converter.columns,\n detail: eventDetail,\n headers: converter.headers\n });\n if (beforeParse) {\n data = beforeParse(data);\n }\n data = data.slice();\n if (orientation === 'columns') {\n for (let i = 0, iEnd = data.length; i < iEnd; i++) {\n const item = data[i];\n if (!(item instanceof Array)) {\n return;\n }\n if (converter.headers instanceof Array) {\n if (firstRowAsNames) {\n converter.headers.push(`${item.shift()}`);\n }\n else if (columnNames && columnNames instanceof Array) {\n converter.headers.push(columnNames[i]);\n }\n converter.table.setColumn(converter.headers[i] || i.toString(), item);\n }\n else {\n error('JSONConverter: Invalid `columnNames` option.', false);\n }\n }\n }\n else if (orientation === 'rows') {\n if (firstRowAsNames) {\n converter.headers = data.shift();\n }\n else if (columnNames) {\n converter.headers = columnNames;\n }\n for (let rowIndex = 0, iEnd = data.length; rowIndex < iEnd; rowIndex++) {\n let row = data[rowIndex];\n if (JSONConverter_isArray(row)) {\n for (let columnIndex = 0, jEnd = row.length; columnIndex < jEnd; columnIndex++) {\n if (converter.columns.length < columnIndex + 1) {\n converter.columns.push([]);\n }\n converter.columns[columnIndex].push(row[columnIndex]);\n if (converter.headers instanceof Array) {\n this.table.setColumn(converter.headers[columnIndex] ||\n columnIndex.toString(), converter.columns[columnIndex]);\n }\n else {\n error('JSONConverter: Invalid `columnNames` option.', false);\n }\n }\n }\n else {\n const columnNames = converter.headers;\n if (columnNames && !(columnNames instanceof Array)) {\n const newRow = {};\n JSONConverter_objectEach(columnNames, (arrayWithPath, name) => {\n newRow[name] = arrayWithPath.reduce((acc, key) => acc[key], row);\n });\n row = newRow;\n }\n this.table.setRows([row], rowIndex);\n }\n }\n }\n converter.emit({\n type: 'afterParse',\n columns: converter.columns,\n detail: eventDetail,\n headers: converter.headers\n });\n }\n /**\n * Handles converting the parsed data to a table.\n *\n * @return {DataTable}\n * Table from the parsed CSV.\n */\n getTable() {\n return this.table;\n }\n}\n/* *\n *\n * Static Properties\n *\n * */\n/**\n * Default options\n */\nJSONConverter.defaultOptions = {\n ...Converters_DataConverter.defaultOptions,\n data: [],\n orientation: 'rows'\n};\nConverters_DataConverter.registerType('JSON', JSONConverter);\n/* *\n *\n * Default Export\n *\n * */\n/* harmony default export */ const Converters_JSONConverter = (JSONConverter);\n\n;// ./code/es-modules/Data/Connectors/JSONConnector.js\n/* *\n *\n * (c) 2009-2024 Highsoft AS\n *\n * License: www.highcharts.com/license\n *\n * !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!\n *\n * Authors:\n * - Pawel Lysy\n *\n * */\n\n\n\n\nconst { merge: JSONConnector_merge } = (highcharts_commonjs_highcharts_commonjs2_highcharts_root_Highcharts_default());\n/* *\n *\n * Class\n *\n * */\n/**\n * Class that handles creating a DataConnector from JSON structure\n *\n * @private\n */\nclass JSONConnector extends Connectors_DataConnector {\n /* *\n *\n * Constructor\n *\n * */\n /**\n * Constructs an instance of JSONConnector.\n *\n * @param {JSONConnector.UserOptions} [options]\n * Options for the connector and converter.\n */\n constructor(options) {\n const mergedOptions = JSONConnector_merge(JSONConnector.defaultOptions, options);\n super(mergedOptions);\n this.converter = new Converters_JSONConverter(mergedOptions);\n this.options = mergedOptions;\n if (mergedOptions.enablePolling) {\n this.startPolling(Math.max(mergedOptions.dataRefreshRate || 0, 1) * 1000);\n }\n }\n /* *\n *\n * Functions\n *\n * */\n /**\n * Initiates the loading of the JSON source to the connector\n *\n * @param {DataEvent.Detail} [eventDetail]\n * Custom information for pending events.\n *\n * @emits JSONConnector#load\n * @emits JSONConnector#afterLoad\n */\n load(eventDetail) {\n const connector = this, converter = connector.converter, table = connector.table, { data, dataUrl, dataModifier } = connector.options;\n connector.emit({\n type: 'load',\n data,\n detail: eventDetail,\n table\n });\n return Promise\n .resolve(dataUrl ?\n fetch(dataUrl).then((json) => json.json()) :\n data || [])\n .then((data) => {\n if (data) {\n // If already loaded, clear the current rows\n table.deleteColumns();\n converter.parse({ data });\n table.setColumns(converter.getTable().getColumns());\n }\n return connector.setModifierOptions(dataModifier).then(() => data);\n })\n .then((data) => {\n connector.emit({\n type: 'afterLoad',\n data,\n detail: eventDetail,\n table\n });\n return connector;\n })['catch']((error) => {\n connector.emit({\n type: 'loadError',\n detail: eventDetail,\n error,\n table\n });\n throw error;\n });\n }\n}\n/* *\n *\n * Static Properties\n *\n * */\nJSONConnector.defaultOptions = {\n data: [],\n enablePolling: false,\n dataRefreshRate: 0,\n firstRowAsNames: true,\n orientation: 'rows'\n};\nConnectors_DataConnector.registerType('JSON', JSONConnector);\n/* *\n *\n * Default Export\n *\n * */\n/* harmony default export */ const Connectors_JSONConnector = ((/* unused pure expression or super */ null && (JSONConnector)));\n\n;// ./code/es-modules/Data/Converters/GoogleSheetsConverter.js\n/* *\n *\n * (c) 2009-2024 Highsoft AS\n *\n * License: www.highcharts.com/license\n *\n * !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!\n *\n * Authors:\n * - Torstein Hønsi\n * - Gøran Slettemark\n * - Wojciech Chmiel\n * - Sophie Bremer\n *\n * */\n\n\n\nconst { merge: GoogleSheetsConverter_merge, uniqueKey: GoogleSheetsConverter_uniqueKey } = (highcharts_commonjs_highcharts_commonjs2_highcharts_root_Highcharts_default());\n/* *\n *\n * Class\n *\n * */\n/**\n * Handles parsing and transformation of an Google Sheets to a table.\n *\n * @private\n */\nclass GoogleSheetsConverter extends Converters_DataConverter {\n /* *\n *\n * Constructor\n *\n * */\n /**\n * Constructs an instance of the GoogleSheetsConverter.\n *\n * @param {GoogleSheetsConverter.UserOptions} [options]\n * Options for the GoogleSheetsConverter.\n */\n constructor(options) {\n const mergedOptions = GoogleSheetsConverter_merge(GoogleSheetsConverter.defaultOptions, options);\n super(mergedOptions);\n this.columns = [];\n this.header = [];\n this.options = mergedOptions;\n }\n /* *\n *\n * Functions\n *\n * */\n /**\n * Initiates the parsing of the Google Sheet\n *\n * @param {GoogleSheetsConverter.UserOptions}[options]\n * Options for the parser\n *\n * @param {DataEvent.Detail} [eventDetail]\n * Custom information for pending events.\n *\n * @emits GoogleSheetsParser#parse\n * @emits GoogleSheetsParser#afterParse\n */\n parse(options, eventDetail) {\n const converter = this, parseOptions = GoogleSheetsConverter_merge(converter.options, options);\n let columns = ((parseOptions.json?.values) || []).map((column) => column.slice());\n if (columns.length === 0) {\n return false;\n }\n converter.header = [];\n converter.columns = [];\n converter.emit({\n type: 'parse',\n columns: converter.columns,\n detail: eventDetail,\n headers: converter.header\n });\n // If beforeParse is defined, use it to modify the data\n const { beforeParse, json } = parseOptions;\n if (beforeParse && json) {\n columns = beforeParse(json.values);\n }\n let column;\n converter.columns = columns;\n for (let i = 0, iEnd = columns.length; i < iEnd; i++) {\n column = columns[i];\n converter.header[i] = (parseOptions.firstRowAsNames ?\n `${column.shift()}` :\n GoogleSheetsConverter_uniqueKey());\n for (let j = 0, jEnd = column.length; j < jEnd; ++j) {\n if (column[j] && typeof column[j] === 'string') {\n let cellValue = converter.asGuessedType(column[j]);\n if (cellValue instanceof Date) {\n cellValue = cellValue.getTime();\n }\n converter.columns[i][j] = cellValue;\n }\n }\n }\n converter.emit({\n type: 'afterParse',\n columns: converter.columns,\n detail: eventDetail,\n headers: converter.header\n });\n }\n /**\n * Handles converting the parsed data to a table.\n *\n * @return {DataTable}\n * Table from the parsed Google Sheet\n */\n getTable() {\n return Converters_DataConverter.getTableFromColumns(this.columns, this.header);\n }\n}\n/* *\n *\n * Static Properties\n *\n * */\n/**\n * Default options\n */\nGoogleSheetsConverter.defaultOptions = {\n ...Converters_DataConverter.defaultOptions\n};\nConverters_DataConverter.registerType('GoogleSheets', GoogleSheetsConverter);\n/* *\n *\n * Default Export\n *\n * */\n/* harmony default export */ const Converters_GoogleSheetsConverter = (GoogleSheetsConverter);\n\n;// ./code/es-modules/Data/Connectors/GoogleSheetsConnector.js\n/* *\n *\n * (c) 2009-2024 Highsoft AS\n *\n * License: www.highcharts.com/license\n *\n * !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!\n *\n * Authors:\n * - Torstein Hønsi\n * - Gøran Slettemark\n * - Wojciech Chmiel\n * - Sophie Bremer\n * - Jomar Hønsi\n *\n * */\n\n\n\n\nconst { merge: GoogleSheetsConnector_merge, pick: GoogleSheetsConnector_pick } = (highcharts_commonjs_highcharts_commonjs2_highcharts_root_Highcharts_default());\n/* *\n *\n * Functions\n *\n * */\n/**\n * Tests Google's response for error.\n * @private\n */\nfunction isGoogleError(json) {\n return (typeof json === 'object' && json &&\n typeof json.error === 'object' && json.error &&\n typeof json.error.code === 'number' &&\n typeof json.error.message === 'string' &&\n typeof json.error.status === 'string');\n}\n/* *\n *\n * Class\n *\n * */\n/**\n * @private\n * @todo implement save, requires oauth2\n */\nclass GoogleSheetsConnector extends Connectors_DataConnector {\n /* *\n *\n * Constructor\n *\n * */\n /**\n * Constructs an instance of GoogleSheetsConnector\n *\n * @param {GoogleSheetsConnector.UserOptions} [options]\n * Options for the connector and converter.\n */\n constructor(options) {\n const mergedOptions = GoogleSheetsConnector_merge(GoogleSheetsConnector.defaultOptions, options);\n super(mergedOptions);\n this.converter = new Converters_GoogleSheetsConverter(mergedOptions);\n this.options = mergedOptions;\n }\n /* *\n *\n * Functions\n *\n * */\n /**\n * Loads data from a Google Spreadsheet.\n *\n * @param {DataEvent.Detail} [eventDetail]\n * Custom information for pending events.\n *\n * @return {Promise<this>}\n * Same connector instance with modified table.\n */\n load(eventDetail) {\n const connector = this, converter = connector.converter, table = connector.table, { dataModifier, dataRefreshRate, enablePolling, firstRowAsNames, googleAPIKey, googleSpreadsheetKey } = connector.options, url = GoogleSheetsConnector.buildFetchURL(googleAPIKey, googleSpreadsheetKey, connector.options);\n connector.emit({\n type: 'load',\n detail: eventDetail,\n table,\n url\n });\n if (!URL.canParse(url)) {\n throw new Error('Invalid URL: ' + url);\n }\n return fetch(url)\n .then((response) => (response.json()))\n .then((json) => {\n if (isGoogleError(json)) {\n throw new Error(json.error.message);\n }\n converter.parse({\n firstRowAsNames,\n json\n });\n // If already loaded, clear the current table\n table.deleteColumns();\n table.setColumns(converter.getTable().getColumns());\n return connector.setModifierOptions(dataModifier);\n })\n .then(() => {\n connector.emit({\n type: 'afterLoad',\n detail: eventDetail,\n table,\n url\n });\n // Polling\n if (enablePolling) {\n setTimeout(() => connector.load(), Math.max(dataRefreshRate || 0, 1) * 1000);\n }\n return connector;\n })['catch']((error) => {\n connector.emit({\n type: 'loadError',\n detail: eventDetail,\n error,\n table\n });\n throw error;\n });\n }\n}\n/* *\n *\n * Static Properties\n *\n * */\nGoogleSheetsConnector.defaultOptions = {\n googleAPIKey: '',\n googleSpreadsheetKey: '',\n enablePolling: false,\n dataRefreshRate: 2,\n firstRowAsNames: true\n};\n/* *\n *\n * Class Namespace\n *\n * */\n(function (GoogleSheetsConnector) {\n /* *\n *\n * Declarations\n *\n * */\n /* *\n *\n * Constants\n *\n * */\n const alphabet = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ';\n /* *\n *\n * Functions\n *\n * */\n /**\n * Creates GoogleSheets API v4 URL.\n * @private\n */\n function buildFetchURL(apiKey, sheetKey, options = {}) {\n const url = new URL(`https://sheets.googleapis.com/v4/spreadsheets/${sheetKey}/values/`);\n const range = options.onlyColumnNames ?\n 'A1:Z1' : buildQueryRange(options);\n url.pathname += range;\n const searchParams = url.searchParams;\n searchParams.set('alt', 'json');\n if (!options.onlyColumnNames) {\n searchParams.set('dateTimeRenderOption', 'FORMATTED_STRING');\n searchParams.set('majorDimension', 'COLUMNS');\n searchParams.set('valueRenderOption', 'UNFORMATTED_VALUE');\n }\n searchParams.set('prettyPrint', 'false');\n searchParams.set('key', apiKey);\n return url.href;\n }\n GoogleSheetsConnector.buildFetchURL = buildFetchURL;\n /**\n * Creates sheets range.\n * @private\n */\n function buildQueryRange(options = {}) {\n const { endColumn, endRow, googleSpreadsheetRange, startColumn, startRow } = options;\n return googleSpreadsheetRange || ((alphabet[startColumn || 0] || 'A') +\n (Math.max((startRow || 0), 0) + 1) +\n ':' +\n (alphabet[GoogleSheetsConnector_pick(endColumn, 25)] || 'Z') +\n (endRow ?\n Math.max(endRow, 0) :\n 'Z'));\n }\n GoogleSheetsConnector.buildQueryRange = buildQueryRange;\n})(GoogleSheetsConnector || (GoogleSheetsConnector = {}));\nConnectors_DataConnector.registerType('GoogleSheets', GoogleSheetsConnector);\n/* *\n *\n * Default Export\n *\n * */\n/* harmony default export */ const Connectors_GoogleSheetsConnector = ((/* unused pure expression or super */ null && (GoogleSheetsConnector)));\n\n;// ./code/es-modules/Data/Converters/HTMLTableConverter.js\n/* *\n *\n * (c) 2009-2024 Highsoft AS\n *\n * License: www.highcharts.com/license\n *\n * !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!\n *\n * Authors:\n * - Torstein Hønsi\n * - Gøran Slettemark\n * - Wojciech Chmiel\n * - Sophie Bremer\n *\n * */\n\n\n\nconst { merge: HTMLTableConverter_merge } = (highcharts_commonjs_highcharts_commonjs2_highcharts_root_Highcharts_default());\n/* *\n *\n * Functions\n *\n * */\n/**\n * Row equal\n */\nfunction isRowEqual(row1, row2) {\n let i = row1.length;\n if (row2.length === i) {\n while (--i) {\n if (row1[i] !== row2[i]) {\n return false;\n }\n }\n }\n else {\n return false;\n }\n return true;\n}\n/* *\n *\n * Class\n *\n * */\n/**\n * Handles parsing and transformation of an HTML table to a table.\n *\n * @private\n */\nclass HTMLTableConverter extends Converters_DataConverter {\n /* *\n *\n * Constructor\n *\n * */\n /**\n * Constructs an instance of the HTMLTableConverter.\n *\n * @param {HTMLTableConverter.UserOptions} [options]\n * Options for the HTMLTableConverter.\n */\n constructor(options) {\n const mergedOptions = HTMLTableConverter_merge(HTMLTableConverter.defaultOptions, options);\n super(mergedOptions);\n this.columns = [];\n this.headers = [];\n this.options = mergedOptions;\n if (mergedOptions.tableElement) {\n this.tableElement = mergedOptions.tableElement;\n this.tableElementID = mergedOptions.tableElement.id;\n }\n }\n /* *\n *\n * Functions\n *\n * */\n /**\n * Exports the dataconnector as an HTML string, using the options\n * provided on import unless other options are provided.\n *\n * @param {DataConnector} connector\n * Connector instance to export from.\n *\n * @param {HTMLTableConnector.ExportOptions} [options]\n * Options that override default or existing export options.\n *\n * @return {string}\n * HTML from the current dataTable.\n */\n export(connector, options = this.options) {\n const exportNames = (options.firstRowAsNames !== false), useMultiLevelHeaders = options.useMultiLevelHeaders;\n const columns = connector.getSortedColumns(options.usePresentationOrder), columnNames = Object.keys(columns), htmlRows = [], columnsCount = columnNames.length;\n const rowArray = [];\n let tableHead = '';\n // Add the names as the first row if they should be exported\n if (exportNames) {\n const subcategories = [];\n // If using multilevel headers, the first value\n // of each column is a subcategory\n if (useMultiLevelHeaders) {\n for (const name of columnNames) {\n const subhead = (columns[name].shift() || '').toString();\n subcategories.push(subhead);\n }\n tableHead = this.getTableHeaderHTML(columnNames, subcategories, options);\n }\n else {\n tableHead = this.getTableHeaderHTML(void 0, columnNames, options);\n }\n }\n for (let columnIndex = 0; columnIndex < columnsCount; columnIndex++) {\n const columnName = columnNames[columnIndex], column = columns[columnName], columnLength = column.length;\n for (let rowIndex = 0; rowIndex < columnLength; rowIndex++) {\n let cellValue = column[rowIndex];\n if (!rowArray[rowIndex]) {\n rowArray[rowIndex] = [];\n }\n // Alternative: Datatype from HTML attribute with\n // connector.whatIs(columnName)\n if (!(typeof cellValue === 'string' ||\n typeof cellValue === 'number' ||\n typeof cellValue === 'undefined')) {\n cellValue = (cellValue || '').toString();\n }\n rowArray[rowIndex][columnIndex] = this.getCellHTMLFromValue(columnIndex ? 'td' : 'th', null, columnIndex ? '' : 'scope=\"row\"', cellValue);\n // On the final column, push the row to the array\n if (columnIndex === columnsCount - 1) {\n htmlRows.push('<tr>' +\n rowArray[rowIndex].join('') +\n '</tr>');\n }\n }\n }\n let caption = '';\n // Add table caption\n // Current exportdata falls back to chart title\n // but that should probably be handled elsewhere?\n if (options.tableCaption) {\n caption = '<caption class=\"highcharts-table-caption\">' +\n options.tableCaption +\n '</caption>';\n }\n return ('<table>' +\n caption +\n tableHead +\n '<tbody>' +\n htmlRows.join('') +\n '</tbody>' +\n '</table>');\n }\n /**\n * Get table cell markup from row data.\n */\n getCellHTMLFromValue(tag, classes, attrs, value, decimalPoint) {\n let val = value, className = 'text' + (classes ? ' ' + classes : '');\n // Convert to string if number\n if (typeof val === 'number') {\n val = val.toString();\n if (decimalPoint === ',') {\n val = val.replace('.', decimalPoint);\n }\n className = 'number';\n }\n else if (!value) {\n val = '';\n className = 'empty';\n }\n return '<' + tag + (attrs ? ' ' + attrs : '') +\n ' class=\"' + className + '\">' +\n val + '</' + tag + '>';\n }\n /**\n * Get table header markup from row data.\n */\n getTableHeaderHTML(topheaders = [], subheaders = [], options = this.options) {\n const { useMultiLevelHeaders, useRowspanHeaders } = options;\n let html = '<thead>', i = 0, len = subheaders && subheaders.length, next, cur, curColspan = 0, rowspan;\n // Clean up multiple table headers. Chart.getDataRows() returns two\n // levels of headers when using multilevel, not merged. We need to\n // merge identical headers, remove redundant headers, and keep it\n // all marked up nicely.\n if (useMultiLevelHeaders &&\n topheaders &&\n subheaders &&\n !isRowEqual(topheaders, subheaders)) {\n html += '<tr>';\n for (; i < len; ++i) {\n cur = topheaders[i];\n next = topheaders[i + 1];\n if (cur === next) {\n ++curColspan;\n }\n else if (curColspan) {\n // Ended colspan\n // Add cur to HTML with colspan.\n html += this.getCellHTMLFromValue('th', 'highcharts-table-topheading', 'scope=\"col\" ' +\n 'colspan=\"' + (curColspan + 1) + '\"', cur);\n curColspan = 0;\n }\n else {\n // Cur is standalone. If it is same as sublevel,\n // remove sublevel and add just toplevel.\n if (cur === subheaders[i]) {\n if (useRowspanHeaders) {\n rowspan = 2;\n delete subheaders[i];\n }\n else {\n rowspan = 1;\n subheaders[i] = '';\n }\n }\n else {\n rowspan = 1;\n }\n html += this.getCellHTMLFromValue('th', 'highcharts-table-topheading', 'scope=\"col\"' +\n (rowspan > 1 ?\n ' valign=\"top\" rowspan=\"' + rowspan + '\"' :\n ''), cur);\n }\n }\n html += '</tr>';\n }\n // Add the subheaders (the only headers if not using multilevels)\n if (subheaders) {\n html += '<tr>';\n for (i = 0, len = subheaders.length; i < len; ++i) {\n if (typeof subheaders[i] !== 'undefined') {\n html += this.getCellHTMLFromValue('th', null, 'scope=\"col\"', subheaders[i]);\n }\n }\n html += '</tr>';\n }\n html += '</thead>';\n return html;\n }\n /**\n * Initiates the parsing of the HTML table\n *\n * @param {HTMLTableConverter.UserOptions}[options]\n * Options for the parser\n *\n * @param {DataEvent.Detail} [eventDetail]\n * Custom information for pending events.\n *\n * @emits CSVDataParser#parse\n * @emits CSVDataParser#afterParse\n * @emits HTMLTableParser#parseError\n */\n parse(options, eventDetail) {\n const converter = this, columns = [], headers = [], parseOptions = HTMLTableConverter_merge(converter.options, options), { endRow, startColumn, endColumn, firstRowAsNames } = parseOptions, tableHTML = parseOptions.tableElement || this.tableElement;\n if (!(tableHTML instanceof HTMLElement)) {\n converter.emit({\n type: 'parseError',\n columns,\n detail: eventDetail,\n headers,\n error: 'Not a valid HTML Table'\n });\n return;\n }\n converter.tableElement = tableHTML;\n converter.tableElementID = tableHTML.id;\n this.emit({\n type: 'parse',\n columns: converter.columns,\n detail: eventDetail,\n headers: converter.headers\n });\n const rows = tableHTML.getElementsByTagName('tr'), rowsCount = rows.length;\n let rowIndex = 0, item, { startRow } = parseOptions;\n // Insert headers from the first row\n if (firstRowAsNames && rowsCount) {\n const items = rows[0].children, itemsLength = items.length;\n for (let i = startColumn; i < itemsLength; i++) {\n if (i > endColumn) {\n break;\n }\n item = items[i];\n if (item.tagName === 'TD' ||\n item.tagName === 'TH') {\n headers.push(item.innerHTML);\n }\n }\n startRow++;\n }\n while (rowIndex < rowsCount) {\n if (rowIndex >= startRow && rowIndex <= endRow) {\n const columnsInRow = rows[rowIndex].children, columnsInRowLength = columnsInRow.length;\n let columnIndex = 0;\n while (columnIndex < columnsInRowLength) {\n const relativeColumnIndex = columnIndex - startColumn, row = columns[relativeColumnIndex];\n item = columnsInRow[columnIndex];\n if ((item.tagName === 'TD' ||\n item.tagName === 'TH') &&\n (columnIndex >= startColumn &&\n columnIndex <= endColumn)) {\n if (!columns[relativeColumnIndex]) {\n columns[relativeColumnIndex] = [];\n }\n let cellValue = converter.asGuessedType(item.innerHTML);\n if (cellValue instanceof Date) {\n cellValue = cellValue.getTime();\n }\n columns[relativeColumnIndex][rowIndex - startRow] = cellValue;\n // Loop over all previous indices and make sure\n // they are nulls, not undefined.\n let i = 1;\n while (rowIndex - startRow >= i &&\n row[rowIndex - startRow - i] === void 0) {\n row[rowIndex - startRow - i] = null;\n i++;\n }\n }\n columnIndex++;\n }\n }\n rowIndex++;\n }\n this.columns = columns;\n this.headers = headers;\n this.emit({\n type: 'afterParse',\n columns,\n detail: eventDetail,\n headers\n });\n }\n /**\n * Handles converting the parsed data to a table.\n *\n * @return {DataTable}\n * Table from the parsed HTML table\n */\n getTable() {\n return Converters_DataConverter.getTableFromColumns(this.columns, this.headers);\n }\n}\n/* *\n *\n * Static Properties\n *\n * */\n/**\n * Default options\n */\nHTMLTableConverter.defaultOptions = {\n ...Converters_DataConverter.defaultOptions,\n useRowspanHeaders: true,\n useMultiLevelHeaders: true\n};\nConverters_DataConverter.registerType('HTMLTable', HTMLTableConverter);\n/* *\n *\n * Default Export\n *\n * */\n/* harmony default export */ const Converters_HTMLTableConverter = (HTMLTableConverter);\n\n;// ./code/es-modules/Data/Connectors/HTMLTableConnector.js\n/* *\n *\n * (c) 2009-2024 Highsoft AS\n *\n * License: www.highcharts.com/license\n *\n * !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!\n *\n * Authors:\n * - Torstein Hønsi\n * - Gøran Slettemark\n * - Wojciech Chmiel\n * - Sophie Bremer\n *\n * */\n\n\n\nconst { win } = (highcharts_commonjs_highcharts_commonjs2_highcharts_root_Highcharts_default());\n\n\nconst { merge: HTMLTableConnector_merge } = (highcharts_commonjs_highcharts_commonjs2_highcharts_root_Highcharts_default());\n/* *\n *\n * Class\n *\n * */\n/**\n * Class that handles creating a data connector from an HTML table.\n *\n * @private\n */\nclass HTMLTableConnector extends Connectors_DataConnector {\n /* *\n *\n * Constructor\n *\n * */\n /**\n * Constructs an instance of HTMLTableConnector.\n *\n * @param {HTMLTableConnector.UserOptions} [options]\n * Options for the connector and converter.\n */\n constructor(options) {\n const mergedOptions = HTMLTableConnector_merge(HTMLTableConnector.defaultOptions, options);\n super(mergedOptions);\n this.converter = new Converters_HTMLTableConverter(mergedOptions);\n this.options = mergedOptions;\n }\n /**\n * Initiates creating the dataconnector from the HTML table\n *\n * @param {DataEvent.Detail} [eventDetail]\n * Custom information for pending events.\n *\n * @emits HTMLTableConnector#load\n * @emits HTMLTableConnector#afterLoad\n * @emits HTMLTableConnector#loadError\n */\n load(eventDetail) {\n const connector = this, converter = connector.converter, table = connector.table, { dataModifier, table: tableHTML } = connector.options;\n connector.emit({\n type: 'load',\n detail: eventDetail,\n table,\n tableElement: connector.tableElement\n });\n let tableElement;\n if (typeof tableHTML === 'string') {\n connector.tableID = tableHTML;\n tableElement = win.document.getElementById(tableHTML);\n }\n else {\n tableElement = tableHTML;\n connector.tableID = tableElement.id;\n }\n connector.tableElement = tableElement || void 0;\n if (!connector.tableElement) {\n const error = 'HTML table not provided, or element with ID not found';\n connector.emit({\n type: 'loadError',\n detail: eventDetail,\n error,\n table\n });\n return Promise.reject(new Error(error));\n }\n converter.parse(HTMLTableConnector_merge({ tableElement: connector.tableElement }, connector.options), eventDetail);\n // If already loaded, clear the current rows\n table.deleteColumns();\n table.setColumns(converter.getTable().getColumns());\n return connector\n .setModifierOptions(dataModifier)\n .then(() => {\n connector.emit({\n type: 'afterLoad',\n detail: eventDetail,\n table,\n tableElement: connector.tableElement\n });\n return connector;\n });\n }\n}\n/* *\n *\n * Static Properties\n *\n * */\nHTMLTableConnector.defaultOptions = {\n table: ''\n};\nConnectors_DataConnector.registerType('HTMLTable', HTMLTableConnector);\n/* *\n *\n * Default Export\n *\n * */\n/* harmony default export */ const Connectors_HTMLTableConnector = ((/* unused pure expression or super */ null && (HTMLTableConnector)));\n\n;// ./code/es-modules/Data/Modifiers/ChainModifier.js\n/* *\n *\n * (c) 2009-2024 Highsoft AS\n *\n * License: www.highcharts.com/license\n *\n * !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!\n *\n * Authors:\n * - Sophie Bremer\n * - Dawid Dragula\n *\n * */\n\n\n\nconst { merge: ChainModifier_merge } = (highcharts_commonjs_highcharts_commonjs2_highcharts_root_Highcharts_default());\n/* *\n *\n * Class\n *\n * */\n/**\n * Modifies a table with the help of modifiers in an ordered chain.\n *\n */\nclass ChainModifier extends Modifiers_DataModifier {\n /* *\n *\n * Constructor\n *\n * */\n /**\n * Constructs an instance of the modifier chain.\n *\n * @param {Partial<ChainModifier.Options>} [options]\n * Options to configure the modifier chain.\n *\n * @param {...DataModifier} [chain]\n * Ordered chain of modifiers.\n */\n constructor(options, ...chain) {\n super();\n this.chain = chain;\n this.options = ChainModifier_merge(ChainModifier.defaultOptions, options);\n const optionsChain = this.options.chain || [];\n for (let i = 0, iEnd = optionsChain.length, modifierOptions, ModifierClass; i < iEnd; ++i) {\n modifierOptions = optionsChain[i];\n if (!modifierOptions.type) {\n continue;\n }\n ModifierClass = Modifiers_DataModifier.types[modifierOptions.type];\n if (ModifierClass) {\n chain.push(new ModifierClass(modifierOptions));\n }\n }\n }\n /* *\n *\n * Functions\n *\n * */\n /**\n * Adds a configured modifier to the end of the modifier chain. Please note,\n * that the modifier can be added multiple times.\n *\n * @param {DataModifier} modifier\n * Configured modifier to add.\n *\n * @param {DataEvent.Detail} [eventDetail]\n * Custom information for pending events.\n */\n add(modifier, eventDetail) {\n this.emit({\n type: 'addModifier',\n detail: eventDetail,\n modifier\n });\n this.chain.push(modifier);\n this.emit({\n type: 'addModifier',\n detail: eventDetail,\n modifier\n });\n }\n /**\n * Clears all modifiers from the chain.\n *\n * @param {DataEvent.Detail} [eventDetail]\n * Custom information for pending events.\n */\n clear(eventDetail) {\n this.emit({\n type: 'clearChain',\n detail: eventDetail\n });\n this.chain.length = 0;\n this.emit({\n type: 'afterClearChain',\n detail: eventDetail\n });\n }\n /**\n * Applies several modifications to the table and returns a modified copy of\n * the given table.\n *\n * @param {Highcharts.DataTable} table\n * Table to modify.\n *\n * @param {DataEvent.Detail} [eventDetail]\n * Custom information for pending events.\n *\n * @return {Promise<Highcharts.DataTable>}\n * Table with `modified` property as a reference.\n */\n async modify(table, eventDetail) {\n const modifiers = (this.options.reverse ?\n this.chain.slice().reverse() :\n this.chain.slice());\n if (table.modified === table) {\n table.modified = table.clone(false, eventDetail);\n }\n let modified = table;\n for (let i = 0, iEnd = modifiers.length; i < iEnd; ++i) {\n try {\n await modifiers[i].modify(modified, eventDetail);\n }\n catch (error) {\n this.emit({\n type: 'error',\n detail: eventDetail,\n table\n });\n throw error;\n }\n modified = modified.modified;\n }\n table.modified = modified;\n return table;\n }\n /**\n * Applies partial modifications of a cell change to the property `modified`\n * of the given modified table.\n *\n * *Note:* The `modified` property of the table gets replaced.\n *\n * @param {Highcharts.DataTable} table\n * Modified table.\n *\n * @param {string} columnName\n * Column name of changed cell.\n *\n * @param {number|undefined} rowIndex\n * Row index of changed cell.\n *\n * @param {Highcharts.DataTableCellType} cellValue\n * Changed cell value.\n *\n * @param {Highcharts.DataTableEventDetail} [eventDetail]\n * Custom information for pending events.\n *\n * @return {Highcharts.DataTable}\n * Table with `modified` property as a reference.\n */\n modifyCell(table, columnName, rowIndex, cellValue, eventDetail) {\n const modifiers = (this.options.reverse ?\n this.chain.reverse() :\n this.chain);\n if (modifiers.length) {\n let clone = table.clone();\n for (let i = 0, iEnd = modifiers.length; i < iEnd; ++i) {\n modifiers[i].modifyCell(clone, columnName, rowIndex, cellValue, eventDetail);\n clone = clone.modified;\n }\n table.modified = clone;\n }\n return table;\n }\n /**\n * Applies partial modifications of column changes to the property\n * `modified` of the given table.\n *\n * *Note:* The `modified` property of the table gets replaced.\n *\n * @param {Highcharts.DataTable} table\n * Modified table.\n *\n * @param {Highcharts.DataTableColumnCollection} columns\n * Changed columns as a collection, where the keys are the column names.\n *\n * @param {number} [rowIndex=0]\n * Index of the first changed row.\n *\n * @param {Highcharts.DataTableEventDetail} [eventDetail]\n * Custom information for pending events.\n *\n * @return {Highcharts.DataTable}\n * Table with `modified` property as a reference.\n */\n modifyColumns(table, columns, rowIndex, eventDetail) {\n const modifiers = (this.options.reverse ?\n this.chain.reverse() :\n this.chain.slice());\n if (modifiers.length) {\n let clone = table.clone();\n for (let i = 0, iEnd = modifiers.length; i < iEnd; ++i) {\n modifiers[i].modifyColumns(clone, columns, rowIndex, eventDetail);\n clone = clone.modified;\n }\n table.modified = clone;\n }\n return table;\n }\n /**\n * Applies partial modifications of row changes to the property `modified`\n * of the given table.\n *\n * *Note:* The `modified` property of the table gets replaced.\n *\n * @param {Highcharts.DataTable} table\n * Modified table.\n *\n * @param {Array<(Highcharts.DataTableRow|Highcharts.DataTableRowObject)>} rows\n * Changed rows.\n *\n * @param {number} [rowIndex]\n * Index of the first changed row.\n *\n * @param {Highcharts.DataTableEventDetail} [eventDetail]\n * Custom information for pending events.\n *\n * @return {Highcharts.DataTable}\n * Table with `modified` property as a reference.\n */\n modifyRows(table, rows, rowIndex, eventDetail) {\n const modifiers = (this.options.reverse ?\n this.chain.reverse() :\n this.chain.slice());\n if (modifiers.length) {\n let clone = table.clone();\n for (let i = 0, iEnd = modifiers.length; i < iEnd; ++i) {\n modifiers[i].modifyRows(clone, rows, rowIndex, eventDetail);\n clone = clone.modified;\n }\n table.modified = clone;\n }\n return table;\n }\n /**\n * Applies several modifications to the table.\n *\n * *Note:* The `modified` property of the table gets replaced.\n *\n * @param {DataTable} table\n * Table to modify.\n *\n * @param {DataEvent.Detail} [eventDetail]\n * Custom information for pending events.\n *\n * @return {DataTable}\n * Table as a reference.\n *\n * @emits ChainDataModifier#execute\n * @emits ChainDataModifier#afterExecute\n */\n modifyTable(table, eventDetail) {\n const chain = this;\n chain.emit({\n type: 'modify',\n detail: eventDetail,\n table\n });\n const modifiers = (chain.options.reverse ?\n chain.chain.reverse() :\n chain.chain.slice());\n let modified = table.modified;\n for (let i = 0, iEnd = modifiers.length, modifier; i < iEnd; ++i) {\n modifier = modifiers[i];\n modified = modifier.modifyTable(modified, eventDetail).modified;\n }\n table.modified = modified;\n chain.emit({\n type: 'afterModify',\n detail: eventDetail,\n table\n });\n return table;\n }\n /**\n * Removes a configured modifier from all positions in the modifier chain.\n *\n * @param {DataModifier} modifier\n * Configured modifier to remove.\n *\n * @param {DataEvent.Detail} [eventDetail]\n * Custom information for pending events.\n */\n remove(modifier, eventDetail) {\n const modifiers = this.chain;\n this.emit({\n type: 'removeModifier',\n detail: eventDetail,\n modifier\n });\n modifiers.splice(modifiers.indexOf(modifier), 1);\n this.emit({\n type: 'afterRemoveModifier',\n detail: eventDetail,\n modifier\n });\n }\n}\n/* *\n *\n * Static Properties\n *\n * */\n/**\n * Default option for the ordered modifier chain.\n */\nChainModifier.defaultOptions = {\n type: 'Chain'\n};\nModifiers_DataModifier.registerType('Chain', ChainModifier);\n/* *\n *\n * Default Export\n *\n * */\n/* harmony default export */ const Modifiers_ChainModifier = ((/* unused pure expression or super */ null && (ChainModifier)));\n\n;// ./code/es-modules/Data/Modifiers/InvertModifier.js\n/* *\n *\n * (c) 2009-2024 Highsoft AS\n *\n * License: www.highcharts.com/license\n *\n * !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!\n *\n * Authors:\n * - Wojciech Chmiel\n * - Sophie Bremer\n *\n * */\n\n\n\nconst { merge: InvertModifier_merge } = (highcharts_commonjs_highcharts_commonjs2_highcharts_root_Highcharts_default());\n/* *\n *\n * Class\n *\n * */\n/**\n * Inverts columns and rows in a table.\n *\n * @private\n */\nclass InvertModifier extends Modifiers_DataModifier {\n /* *\n *\n * Constructor\n *\n * */\n /**\n * Constructs an instance of the invert modifier.\n *\n * @param {Partial<InvertModifier.Options>} [options]\n * Options to configure the invert modifier.\n */\n constructor(options) {\n super();\n this.options = InvertModifier_merge(InvertModifier.defaultOptions, options);\n }\n /* *\n *\n * Functions\n *\n * */\n /**\n * Applies partial modifications of a cell change to the property `modified`\n * of the given modified table.\n *\n * @param {Highcharts.DataTable} table\n * Modified table.\n *\n * @param {string} columnName\n * Column name of changed cell.\n *\n * @param {number|undefined} rowIndex\n * Row index of changed cell.\n *\n * @param {Highcharts.DataTableCellType} cellValue\n * Changed cell value.\n *\n * @param {Highcharts.DataTableEventDetail} [eventDetail]\n * Custom information for pending events.\n *\n * @return {Highcharts.DataTable}\n * Table with `modified` property as a reference.\n */\n modifyCell(table, columnName, rowIndex, cellValue, eventDetail) {\n const modified = table.modified, modifiedRowIndex = modified.getRowIndexBy('columnNames', columnName);\n if (typeof modifiedRowIndex === 'undefined') {\n modified.setColumns(this.modifyTable(table.clone()).getColumns(), void 0, eventDetail);\n }\n else {\n modified.setCell(`${rowIndex}`, modifiedRowIndex, cellValue, eventDetail);\n }\n return table;\n }\n /**\n * Applies partial modifications of column changes to the property\n * `modified` of the given table.\n *\n * @param {Highcharts.DataTable} table\n * Modified table.\n *\n * @param {Highcharts.DataTableColumnCollection} columns\n * Changed columns as a collection, where the keys are the column names.\n *\n * @param {number} [rowIndex=0]\n * Index of the first changed row.\n *\n * @param {Highcharts.DataTableEventDetail} [eventDetail]\n * Custom information for pending events.\n *\n * @return {Highcharts.DataTable}\n * Table with `modified` property as a reference.\n */\n modifyColumns(table, columns, rowIndex, eventDetail) {\n const modified = table.modified, modifiedColumnNames = (modified.getColumn('columnNames') || []);\n let columnNames = table.getColumnNames(), reset = (table.getRowCount() !== modifiedColumnNames.length);\n if (!reset) {\n for (let i = 0, iEnd = columnNames.length; i < iEnd; ++i) {\n if (columnNames[i] !== modifiedColumnNames[i]) {\n reset = true;\n break;\n }\n }\n }\n if (reset) {\n return this.modifyTable(table, eventDetail);\n }\n columnNames = Object.keys(columns);\n for (let i = 0, iEnd = columnNames.length, column, columnName, modifiedRowIndex; i < iEnd; ++i) {\n columnName = columnNames[i];\n column = columns[columnName];\n modifiedRowIndex = (modified.getRowIndexBy('columnNames', columnName) ||\n modified.getRowCount());\n for (let j = 0, j2 = rowIndex, jEnd = column.length; j < jEnd; ++j, ++j2) {\n modified.setCell(`${j2}`, modifiedRowIndex, column[j], eventDetail);\n }\n }\n return table;\n }\n /**\n * Applies partial modifications of row changes to the property `modified`\n * of the given table.\n *\n * @param {Highcharts.DataTable} table\n * Modified table.\n *\n * @param {Array<(Highcharts.DataTableRow|Highcharts.DataTableRowObject)>} rows\n * Changed rows.\n *\n * @param {number} [rowIndex]\n * Index of the first changed row.\n *\n * @param {Highcharts.DataTableEventDetail} [eventDetail]\n * Custom information for pending events.\n *\n * @return {Highcharts.DataTable}\n * Table with `modified` property as a reference.\n */\n modifyRows(table, rows, rowIndex, eventDetail) {\n const columnNames = table.getColumnNames(), modified = table.modified, modifiedColumnNames = (modified.getColumn('columnNames') || []);\n let reset = (table.getRowCount() !== modifiedColumnNames.length);\n if (!reset) {\n for (let i = 0, iEnd = columnNames.length; i < iEnd; ++i) {\n if (columnNames[i] !== modifiedColumnNames[i]) {\n reset = true;\n break;\n }\n }\n }\n if (reset) {\n return this.modifyTable(table, eventDetail);\n }\n for (let i = 0, i2 = rowIndex, iEnd = rows.length, row; i < iEnd; ++i, ++i2) {\n row = rows[i];\n if (row instanceof Array) {\n modified.setColumn(`${i2}`, row);\n }\n else {\n for (let j = 0, jEnd = columnNames.length; j < jEnd; ++j) {\n modified.setCell(`${i2}`, j, row[columnNames[j]], eventDetail);\n }\n }\n }\n return table;\n }\n /**\n * Inverts rows and columns in the table.\n *\n * @param {DataTable} table\n * Table to invert.\n *\n * @param {DataEvent.Detail} [eventDetail]\n * Custom information for pending events.\n *\n * @return {DataTable}\n * Table with inverted `modified` property as a reference.\n */\n modifyTable(table, eventDetail) {\n const modifier = this;\n modifier.emit({ type: 'modify', detail: eventDetail, table });\n const modified = table.modified;\n if (table.hasColumns(['columnNames'])) { // Inverted table\n const columnNames = ((table.deleteColumns(['columnNames']) || {})\n .columnNames || []).map((column) => `${column}`), columns = {};\n for (let i = 0, iEnd = table.getRowCount(), row; i < iEnd; ++i) {\n row = table.getRow(i);\n if (row) {\n columns[columnNames[i]] = row;\n }\n }\n modified.deleteColumns();\n modified.setColumns(columns);\n }\n else { // Regular table\n const columns = {};\n for (let i = 0, iEnd = table.getRowCount(), row; i < iEnd; ++i) {\n row = table.getRow(i);\n if (row) {\n columns[`${i}`] = row;\n }\n }\n columns.columnNames = table.getColumnNames();\n modified.deleteColumns();\n modified.setColumns(columns);\n }\n modifier.emit({ type: 'afterModify', detail: eventDetail, table });\n return table;\n }\n}\n/* *\n *\n * Static Properties\n *\n * */\n/**\n * Default options for the invert modifier.\n */\nInvertModifier.defaultOptions = {\n type: 'Invert'\n};\nModifiers_DataModifier.registerType('Invert', InvertModifier);\n/* *\n *\n * Default Export\n *\n * */\n/* harmony default export */ const Modifiers_InvertModifier = ((/* unused pure expression or super */ null && (InvertModifier)));\n\n;// ./code/es-modules/Data/Modifiers/MathModifier.js\n/* *\n *\n * (c) 2009-2024 Highsoft AS\n *\n * License: www.highcharts.com/license\n *\n * !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!\n *\n * Authors:\n * - Sophie Bremer\n *\n * */\n\n\n\n\n/* *\n *\n * Class\n *\n * */\n/**\n * Replaces formula strings in a table with calculated values.\n *\n * @class\n * @name Highcharts.DataModifier.types.MathModifier\n * @augments Highcharts.DataModifier\n */\nclass MathModifier extends Modifiers_DataModifier {\n /* *\n *\n * Constructor\n *\n * */\n constructor(options) {\n super();\n this.options = {\n ...MathModifier.defaultOptions,\n ...options\n };\n }\n /* *\n *\n * Functions\n *\n * */\n modifyTable(table, eventDetail) {\n const modifier = this;\n modifier.emit({ type: 'modify', detail: eventDetail, table });\n const alternativeSeparators = modifier.options.alternativeSeparators, formulaColumns = (modifier.options.formulaColumns ||\n table.getColumnNames()), modified = table.modified;\n for (let i = 0, iEnd = formulaColumns.length, columnName; i < iEnd; ++i) {\n columnName = formulaColumns[i];\n if (formulaColumns.indexOf(columnName) >= 0) {\n modified.setColumn(columnName, modifier.processColumn(table, columnName));\n }\n }\n const columnFormulas = (modifier.options.columnFormulas || []);\n for (let i = 0, iEnd = columnFormulas.length, columnFormula, formula; i < iEnd; ++i) {\n columnFormula = columnFormulas[i];\n formula = Formula_FormulaParser.parseFormula(columnFormula.formula, alternativeSeparators);\n modified.setColumn(columnFormula.column, modifier.processColumnFormula(formula, table, columnFormula.rowStart, columnFormula.rowEnd));\n }\n modifier.emit({ type: 'afterModify', detail: eventDetail, table });\n return table;\n }\n /**\n * Process a column by replacing formula strings with calculated values.\n *\n * @private\n *\n * @param {Highcharts.DataTable} table\n * Table to extract column from and use as reference.\n *\n * @param {string} columnName\n * Name of column to process.\n *\n * @param {number} rowIndex\n * Row index to start the replacing process from.\n *\n * @return {Highcharts.DataTableColumn}\n * Returns the processed table column.\n */\n processColumn(table, columnName, rowIndex = 0) {\n const alternativeSeparators = this.options.alternativeSeparators, column = (table.getColumn(columnName, true) || [])\n .slice(rowIndex > 0 ? rowIndex : 0);\n for (let i = 0, iEnd = column.length, cacheFormula = [], cacheString = '', cell; i < iEnd; ++i) {\n cell = column[i];\n if (typeof cell === 'string' &&\n cell[0] === '=') {\n try {\n // Use cache while formula string is repetitive\n cacheFormula = (cacheString === cell ?\n cacheFormula :\n Formula_FormulaParser.parseFormula(cell.substring(1), alternativeSeparators));\n // Process parsed formula string\n column[i] =\n Formula_FormulaProcessor.processFormula(cacheFormula, table);\n }\n catch {\n column[i] = NaN;\n }\n }\n }\n return column;\n }\n /**\n * Process a column by replacing cell values with calculated values from a\n * given formula.\n *\n * @private\n *\n * @param {Highcharts.Formula} formula\n * Formula to use for processing.\n *\n * @param {Highcharts.DataTable} table\n * Table to extract column from and use as reference.\n *\n * @param {number} rowStart\n * Row index to start the replacing process from.\n *\n * @param {number} rowEnd\n * Row index to end the replacing process.\n *\n * @return {Highcharts.DataTableColumn}\n * Returns the processed table column.\n */\n processColumnFormula(formula, table, rowStart = 0, rowEnd = table.getRowCount()) {\n rowStart = rowStart >= 0 ? rowStart : 0;\n rowEnd = rowEnd >= 0 ? rowEnd : table.getRowCount() + rowEnd;\n const column = [], modified = table.modified;\n for (let i = 0, iEnd = (rowEnd - rowStart); i < iEnd; ++i) {\n try {\n column[i] = Formula_FormulaProcessor.processFormula(formula, modified);\n }\n catch {\n column[i] = NaN;\n }\n finally {\n formula = Formula_FormulaProcessor.translateReferences(formula, 0, 1);\n }\n }\n return column;\n }\n}\n/* *\n *\n * Static Properties\n *\n * */\n/**\n * Default options of MathModifier.\n * @private\n */\nMathModifier.defaultOptions = {\n type: 'Math',\n alternativeSeparators: false\n};\nModifiers_DataModifier.registerType('Math', MathModifier);\n/* *\n *\n * Default Export\n *\n * */\n/* harmony default export */ const Modifiers_MathModifier = ((/* unused pure expression or super */ null && (MathModifier)));\n\n;// ./code/es-modules/Data/Modifiers/RangeModifier.js\n/* *\n *\n * (c) 2009-2024 Highsoft AS\n *\n * License: www.highcharts.com/license\n *\n * !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!\n *\n * Authors:\n * - Sophie Bremer\n * - Dawid Dragula\n *\n * */\n\n\n\nconst { merge: RangeModifier_merge } = (highcharts_commonjs_highcharts_commonjs2_highcharts_root_Highcharts_default());\n/* *\n *\n * Class\n *\n * */\n/**\n * Filters out table rows with a specific value range.\n *\n */\nclass RangeModifier extends Modifiers_DataModifier {\n /* *\n *\n * Constructor\n *\n * */\n /**\n * Constructs an instance of the range modifier.\n *\n * @param {Partial<RangeModifier.Options>} [options]\n * Options to configure the range modifier.\n */\n constructor(options) {\n super();\n this.options = RangeModifier_merge(RangeModifier.defaultOptions, options);\n }\n /* *\n *\n * Functions\n *\n * */\n /**\n * Replaces table rows with filtered rows.\n *\n * @param {DataTable} table\n * Table to modify.\n *\n * @param {DataEvent.Detail} [eventDetail]\n * Custom information for pending events.\n *\n * @return {DataTable}\n * Table with `modified` property as a reference.\n */\n modifyTable(table, eventDetail) {\n const modifier = this;\n modifier.emit({ type: 'modify', detail: eventDetail, table });\n let indexes = [];\n const { additive, ranges, strict } = modifier.options;\n if (ranges.length) {\n const modified = table.modified;\n let columns = table.getColumns(), rows = [];\n for (let i = 0, iEnd = ranges.length, range, rangeColumn; i < iEnd; ++i) {\n range = ranges[i];\n if (strict &&\n typeof range.minValue !== typeof range.maxValue) {\n continue;\n }\n if (i > 0 && !additive) {\n modified.deleteRows();\n modified.setRows(rows);\n modified.setOriginalRowIndexes(indexes, true);\n columns = modified.getColumns();\n rows = [];\n indexes = [];\n }\n rangeColumn = (columns[range.column] || []);\n for (let j = 0, jEnd = rangeColumn.length, cell, row, originalRowIndex; j < jEnd; ++j) {\n cell = rangeColumn[j];\n switch (typeof cell) {\n default:\n continue;\n case 'boolean':\n case 'number':\n case 'string':\n break;\n }\n if (strict &&\n typeof cell !== typeof range.minValue) {\n continue;\n }\n if (cell >= range.minValue &&\n cell <= range.maxValue) {\n if (additive) {\n row = table.getRow(j);\n originalRowIndex = table.getOriginalRowIndex(j);\n }\n else {\n row = modified.getRow(j);\n originalRowIndex = modified.getOriginalRowIndex(j);\n }\n if (row) {\n rows.push(row);\n indexes.push(originalRowIndex);\n }\n }\n }\n }\n modified.deleteRows();\n modified.setRows(rows);\n modified.setOriginalRowIndexes(indexes);\n }\n modifier.emit({ type: 'afterModify', detail: eventDetail, table });\n return table;\n }\n}\n/* *\n *\n * Static Properties\n *\n * */\n/**\n * Default options for the range modifier.\n */\nRangeModifier.defaultOptions = {\n type: 'Range',\n ranges: []\n};\nModifiers_DataModifier.registerType('Range', RangeModifier);\n/* *\n *\n * Default Export\n *\n * */\n/* harmony default export */ const Modifiers_RangeModifier = ((/* unused pure expression or super */ null && (RangeModifier)));\n\n;// ./code/es-modules/Data/Modifiers/SortModifier.js\n/* *\n *\n * (c) 2009-2024 Highsoft AS\n *\n * License: www.highcharts.com/license\n *\n * !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!\n *\n * Authors:\n * - Sophie Bremer\n * - Dawid Dragula\n *\n * */\n\n\n\n\nconst { merge: SortModifier_merge } = (highcharts_commonjs_highcharts_commonjs2_highcharts_root_Highcharts_default());\n/* *\n *\n * Class\n *\n * */\n/**\n * Sort table rows according to values of a column.\n *\n */\nclass SortModifier extends Modifiers_DataModifier {\n /* *\n *\n * Static Functions\n *\n * */\n static ascending(a, b) {\n return ((a || 0) < (b || 0) ? -1 :\n (a || 0) > (b || 0) ? 1 :\n 0);\n }\n static descending(a, b) {\n return ((b || 0) < (a || 0) ? -1 :\n (b || 0) > (a || 0) ? 1 :\n 0);\n }\n /* *\n *\n * Constructor\n *\n * */\n /**\n * Constructs an instance of the range modifier.\n *\n * @param {Partial<RangeDataModifier.Options>} [options]\n * Options to configure the range modifier.\n */\n constructor(options) {\n super();\n this.options = SortModifier_merge(SortModifier.defaultOptions, options);\n }\n /* *\n *\n * Functions\n *\n * */\n /**\n * Returns index and row for sort reference.\n *\n * @private\n *\n * @param {Highcharts.DataTable} table\n * Table with rows to reference.\n *\n * @return {Array<SortModifier.RowReference>}\n * Array of row references.\n */\n getRowReferences(table) {\n const rows = table.getRows(), rowReferences = [];\n for (let i = 0, iEnd = rows.length; i < iEnd; ++i) {\n rowReferences.push({\n index: i,\n row: rows[i]\n });\n }\n return rowReferences;\n }\n /**\n * Applies partial modifications of a cell change to the property `modified`\n * of the given modified table.\n *\n * @param {Highcharts.DataTable} table\n * Modified table.\n *\n * @param {string} columnName\n * Column name of changed cell.\n *\n * @param {number|undefined} rowIndex\n * Row index of changed cell.\n *\n * @param {Highcharts.DataTableCellType} cellValue\n * Changed cell value.\n *\n * @param {Highcharts.DataTableEventDetail} [eventDetail]\n * Custom information for pending events.\n *\n * @return {Highcharts.DataTable}\n * Table with `modified` property as a reference.\n */\n modifyCell(table, columnName, rowIndex, cellValue, eventDetail) {\n const modifier = this, { orderByColumn, orderInColumn } = modifier.options;\n if (columnName === orderByColumn) {\n if (orderInColumn) {\n table.modified.setCell(columnName, rowIndex, cellValue);\n table.modified.setColumn(orderInColumn, modifier\n .modifyTable(new Data_DataTable({\n columns: table\n .getColumns([orderByColumn, orderInColumn])\n }))\n .modified\n .getColumn(orderInColumn));\n }\n else {\n modifier.modifyTable(table, eventDetail);\n }\n }\n return table;\n }\n /**\n * Applies partial modifications of column changes to the property\n * `modified` of the given table.\n *\n * @param {Highcharts.DataTable} table\n * Modified table.\n *\n * @param {Highcharts.DataTableColumnCollection} columns\n * Changed columns as a collection, where the keys are the column names.\n *\n * @param {number} [rowIndex=0]\n * Index of the first changed row.\n *\n * @param {Highcharts.DataTableEventDetail} [eventDetail]\n * Custom information for pending events.\n *\n * @return {Highcharts.DataTable}\n * Table with `modified` property as a reference.\n */\n modifyColumns(table, columns, rowIndex, eventDetail) {\n const modifier = this, { orderByColumn, orderInColumn } = modifier.options, columnNames = Object.keys(columns);\n if (columnNames.indexOf(orderByColumn) > -1) {\n if (orderInColumn &&\n columns[columnNames[0]].length) {\n table.modified.setColumns(columns, rowIndex);\n table.modified.setColumn(orderInColumn, modifier\n .modifyTable(new Data_DataTable({\n columns: table\n .getColumns([orderByColumn, orderInColumn])\n }))\n .modified\n .getColumn(orderInColumn));\n }\n else {\n modifier.modifyTable(table, eventDetail);\n }\n }\n return table;\n }\n /**\n * Applies partial modifications of row changes to the property `modified`\n * of the given table.\n *\n * @param {Highcharts.DataTable} table\n * Modified table.\n *\n * @param {Array<(Highcharts.DataTableRow|Highcharts.DataTableRowObject)>} rows\n * Changed rows.\n *\n * @param {number} [rowIndex]\n * Index of the first changed row.\n *\n * @param {Highcharts.DataTableEventDetail} [eventDetail]\n * Custom information for pending events.\n *\n * @return {Highcharts.DataTable}\n * Table with `modified` property as a reference.\n */\n modifyRows(table, rows, rowIndex, eventDetail) {\n const modifier = this, { orderByColumn, orderInColumn } = modifier.options;\n if (orderInColumn &&\n rows.length) {\n table.modified.setRows(rows, rowIndex);\n table.modified.setColumn(orderInColumn, modifier\n .modifyTable(new Data_DataTable({\n columns: table\n .getColumns([orderByColumn, orderInColumn])\n }))\n .modified\n .getColumn(orderInColumn));\n }\n else {\n modifier.modifyTable(table, eventDetail);\n }\n return table;\n }\n /**\n * Sorts rows in the table.\n *\n * @param {DataTable} table\n * Table to sort in.\n *\n * @param {DataEvent.Detail} [eventDetail]\n * Custom information for pending events.\n *\n * @return {DataTable}\n * Table with `modified` property as a reference.\n */\n modifyTable(table, eventDetail) {\n const modifier = this;\n modifier.emit({ type: 'modify', detail: eventDetail, table });\n const columnNames = table.getColumnNames(), rowCount = table.getRowCount(), rowReferences = this.getRowReferences(table), { direction, orderByColumn, orderInColumn } = modifier.options, compare = (direction === 'asc' ?\n SortModifier.ascending :\n SortModifier.descending), orderByColumnIndex = columnNames.indexOf(orderByColumn), modified = table.modified;\n if (orderByColumnIndex !== -1) {\n rowReferences.sort((a, b) => compare(a.row[orderByColumnIndex], b.row[orderByColumnIndex]));\n }\n if (orderInColumn) {\n const column = [];\n for (let i = 0; i < rowCount; ++i) {\n column[rowReferences[i].index] = i;\n }\n modified.setColumns({ [orderInColumn]: column });\n }\n else {\n const originalIndexes = [];\n const rows = [];\n let rowReference;\n for (let i = 0; i < rowCount; ++i) {\n rowReference = rowReferences[i];\n originalIndexes.push(modified.getOriginalRowIndex(rowReference.index));\n rows.push(rowReference.row);\n }\n modified.setRows(rows, 0);\n modified.setOriginalRowIndexes(originalIndexes);\n }\n modifier.emit({ type: 'afterModify', detail: eventDetail, table });\n return table;\n }\n}\n/* *\n *\n * Static Properties\n *\n * */\n/**\n * Default options to group table rows.\n */\nSortModifier.defaultOptions = {\n type: 'Sort',\n direction: 'desc',\n orderByColumn: 'y'\n};\nModifiers_DataModifier.registerType('Sort', SortModifier);\n/* *\n *\n * Default Export\n *\n * */\n/* harmony default export */ const Modifiers_SortModifier = ((/* unused pure expression or super */ null && (SortModifier)));\n\n;// ./code/es-modules/masters/modules/data-tools.src.js\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nconst G = (highcharts_commonjs_highcharts_commonjs2_highcharts_root_Highcharts_default());\nG.DataConnector = G.DataConnector || Connectors_DataConnector;\nG.DataConverter = G.DataConverter || Converters_DataConverter;\nG.DataCursor = G.DataCursor || Data_DataCursor;\nG.DataModifier = G.DataModifier || Modifiers_DataModifier;\nG.DataPool = G.DataPool || Data_DataPool;\nG.DataTable = G.DataTable || Data_DataTable;\nG.Formula = G.Formula || Formula_Formula;\n/* harmony default export */ const data_tools_src = ((highcharts_commonjs_highcharts_commonjs2_highcharts_root_Highcharts_default()));\n\n__webpack_exports__ = __webpack_exports__[\"default\"];\n/******/ \treturn __webpack_exports__;\n/******/ })()\n;\n});"],"names":["root","factory","exports","module","define","amd","amd1","window","__WEBPACK_EXTERNAL_MODULE__944__","__webpack_modules__","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","undefined","n","getter","__esModule","d","a","definition","key","o","Object","defineProperty","enumerable","get","obj","prop","prototype","hasOwnProperty","call","__webpack_exports__","data_tools_src","highcharts_commonjs_highcharts_commonjs2_highcharts_root_Highcharts_","highcharts_commonjs_highcharts_commonjs2_highcharts_root_Highcharts_default","addEvent","fireEvent","merge","DataModifier","benchmark","dataTable","options","results","modifier","execute","modifyTable","emit","type","iterations","on","length","times","startTime","endTime","performance","now","push","e","modify","table","eventDetail","Promise","resolve","reject","modified","clone","detail","modifyCell","columnName","rowIndex","cellValue","modifyColumns","columns","modifyRows","rows","callback","types","registerType","DataModifierClass","Modifiers_DataModifier","DataTableCore_fireEvent","isArray","objectEach","uniqueKey","Data_DataTableCore","constructor","autoId","id","rowCount","versionTag","column","slice","Math","max","applyRowCount","getColumn","asReference","getColumns","columnNames","keys","reduce","getRow","map","setColumn","setColumns","silent","setRow","row","insert","indexRowCount","addColumns","Array","splice","DataTable_addEvent","defined","DataTable_fireEvent","extend","DataTable_uniqueKey","DataTable","isNull","NULL","i","iEnd","skipColumns","tableOptions","tableClone","originalRowIndexes","localRowIndexes","deleteColumns","deletedColumns","modifiedColumns","deleteRowIndexReferences","deleteRows","deletedRows","modifiedRows","deletedCells","j","jEnd","includes","getCell","getCellAsBoolean","getCellAsNumber","useNaN","isNaN","parseFloat","getCellAsString","getColumnAsNumbers","columnAsNumber","columnLength","getColumnNames","tableColumns","getLocalRowIndex","originalRowIndex","getModifier","getOriginalRowIndex","getRows","getRowCount","getRowIndexBy","rowIndexOffset","indexOf","getRowObject","getRowObjects","i2","min","getVersionTag","hasColumns","hasRowWith","renameColumn","newColumnName","setCell","tableModifier","tableColumn","setModifier","promise","then","error","setOriginalRowIndexes","omitLocalRowIndexes","modifiedIndexes","originalIndex","setRows","version","DataConnector_addEvent","DataConnector_fireEvent","DataConnector_merge","pick","DataConnector","metadata","polling","describeColumn","name","columnMeta","connector","describeColumns","pop","getColumnOrder","usePresentationState","names","sort","b","index","getSortedColumns","usePresentationOrder","load","save","Error","setColumnOrder","setModifierOptions","modifierOptions","ModifierClass","startPolling","refreshTime","clearTimeout","_polling","setTimeout","stopPolling","whatIs","DataConnectorClass","Connectors_DataConnector","DataConverter_addEvent","DataConverter_fireEvent","isNumber","DataConverter_merge","DataConverter","dateFormats","regex","parser","match","Date","UTC","NaN","alternative","year","getFullYear","mergedOptions","defaultOptions","regExpPoint","decimalPoint","decimalRegExp","RegExp","asBoolean","value","asNumber","asDate","timestamp","parseDate","asString","asGuessedType","typeMap","converter","guessType","decimalRegex","replace","test","getDate","deduceDateFormat","data","limit","stable","format","thing","guessedFormat","madeDeduction","elem","trim","split","parseInt","join","dateFormat","export","headers","getTable","result","trimedValue","innerTrimedValue","floatValue","parse","dateFormatProp","getTime","getTimezoneOffset","str","inside","alternativeFormat","startColumn","endColumn","Number","MAX_VALUE","startRow","endRow","firstRowAsNames","switchRowsAndColumns","DataConverterClass","getTableFromColumns","Converters_DataConverter","DataCursor","stateMap","emittingRegister","listenerMap","addListener","tableId","state","listener","listeners","buildEmittingTag","cursor","firstRow","lastRow","emitCursor","event","lasting","cursors","getIndex","emittingTag","remitCursor","removeListener","toRange","defaultRange","range","needle","columnNeedle","JSON","stringify","isEqual","cursorA","cursorB","isInRange","needleColumns","rangeColumns","every","toPositions","positions","rowEnd","columnEnd","Data_DataCursor","Data_DataPoolDefaults","connectors","DataPool","waiting","getConnector","connectorId","waitingList","connectorOptions","getConnectorOptions","loadConnector","getConnectorIds","connectorIds","getConnectorTable","isNewConnector","ConnectorClass","setConnectorOptions","instances","booleanRegExp","decimal1RegExp","decimal2RegExp","functionRegExp","operatorRegExp","rangeA1RegExp","rangeR1C1RegExp","referenceA1RegExp","referenceR1C1RegExp","extractParantheses","text","parantheseLevel","char","parantheseStart","substring","extractString","start","escaping","parseArgument","alternativeSeparators","beginColumnRelative","beginRowRelative","endColumnRelative","endRowRelative","beginColumn","beginRow","parseReferenceColumn","formula","parseFormula","next","columnRelative","rowRelative","reference","string","parantheses","args","parseArguments","argumentsSeparator","term","paranteses","position","code","factor","charCodeAt","pow","Formula_FormulaParser","operators","FormulaTypes","isFormula","item","isFunction","isOperator","isRange","isReference","isValue","FormulaProcessor_isFormula","FormulaProcessor_isFunction","FormulaProcessor_isOperator","FormulaProcessor_isRange","FormulaProcessor_isReference","FormulaProcessor_isValue","asLogicalStringRegExp","MAX_FALSE","MAX_STRING","MAX_TRUE","operatorPriority","processorFunctions","processorFunctionNameRegExp","asLogicalNumber","asLogicalString","toLowerCase","basicOperation","operator","x","y","round","getArgumentValue","arg","getRangeValues","processFunction","processFormula","values","cell","cells","getReferenceValue","operator2","formulaFunction","processor","Formula_FormulaProcessor","getArgumentsValues","registerProcessorFunction","processorFunction","translateReferences","columnDelta","rowDelta","ABS_getArgumentValue","abs","value2","AND_getArgumentValue","AND","AVERAGE_getArgumentsValues","count","AVERAGEA_getArgumentValue","COUNT","COUNTA","IF_getArgumentValue","ISNA_getArgumentValue","MAX_getArgumentsValues","MAX","NEGATIVE_INFINITY","isFinite","median","half","floor","MIN_getArgumentsValues","MIN","POSITIVE_INFINITY","MOD_getArgumentValue","getModeMap","modeMap","SNGL","modeKey","modeCount","keyValue","value1","modeKeys","NOT_getArgumentValue","OR_getArgumentValue","OR","PRODUCT_getArgumentsValues","PRODUCT","calculated","SUM","XOR_getArgumentValue","lastValue","Formula","CSVConverter_merge","CSVConverter","dataTypes","useLocalDecimalPoint","lineDelimiter","exportNames","itemDelimiter","toLocaleString","csvRows","columnsCount","rowArray","columnIndex","columnDataType","dataType","String","cellVal","parserOptions","beforeParse","lines","rowIt","csv","guessedItemDelimiter","guessDelimiter","offset","parseCSVRow","columnStr","rowNumber","guessedDecimalPoint","c","token","actualColumn","read","pushType","initialValue","points","commas","guessed","potDelimiters","linesCount","inStr","cn","cl","CSVConnector_merge","CSVConnector","enablePolling","dataRefreshRate","csvURL","dataModifier","fetch","response","JSONConverter_isArray","JSONConverter_merge","JSONConverter_objectEach","JSONConverter","orientation","shift","toString","newRow","arrayWithPath","acc","JSONConnector_merge","JSONConnector","dataUrl","json","GoogleSheetsConverter_merge","GoogleSheetsConverter_uniqueKey","GoogleSheetsConverter","header","parseOptions","GoogleSheetsConnector_merge","GoogleSheetsConnector_pick","GoogleSheetsConnector","googleAPIKey","googleSpreadsheetKey","url","buildFetchURL","URL","canParse","message","status","alphabet","buildQueryRange","googleSpreadsheetRange","apiKey","sheetKey","onlyColumnNames","pathname","searchParams","set","href","HTMLTableConverter_merge","HTMLTableConverter","tableElement","tableElementID","useMultiLevelHeaders","htmlRows","tableHead","subcategories","subhead","getTableHeaderHTML","getCellHTMLFromValue","caption","tableCaption","tag","classes","attrs","val","className","topheaders","subheaders","useRowspanHeaders","html","len","cur","curColspan","rowspan","isRowEqual","row1","row2","tableHTML","HTMLElement","getElementsByTagName","rowsCount","items","children","itemsLength","tagName","innerHTML","columnsInRow","columnsInRowLength","relativeColumnIndex","win","HTMLTableConnector_merge","HTMLTableConnector","tableID","document","getElementById","ChainModifier_merge","ChainModifier","chain","optionsChain","add","clear","modifiers","reverse","remove","InvertModifier_merge","InvertModifier","modifiedRowIndex","modifiedColumnNames","reset","j2","MathModifier","formulaColumns","processColumn","columnFormulas","columnFormula","processColumnFormula","rowStart","cacheFormula","cacheString","RangeModifier_merge","RangeModifier","indexes","additive","ranges","strict","rangeColumn","minValue","maxValue","SortModifier_merge","SortModifier","ascending","descending","getRowReferences","rowReferences","orderByColumn","orderInColumn","direction","compare","orderByColumnIndex","rowReference","originalIndexes","G"],"mappings":"CAWA,AAXA;;;;;;;;;;CAUC,EACA,SAA0CA,CAAI,CAAEC,CAAO,EACpD,AAAmB,UAAnB,OAAOC,SAAwB,AAAkB,UAAlB,OAAOC,OACxCA,OAAOD,OAAO,CAAGD,EAAQD,EAAK,WAAc,EACrC,AAAkB,YAAlB,OAAOI,QAAyBA,OAAOC,GAAG,CACjDD,OAAO,gCAAiC,CAAC,wBAAwB,CAAE,SAAUE,CAAI,EAAG,OAAOL,EAAQK,EAAM,GAClG,AAAmB,UAAnB,OAAOJ,QACdA,OAAO,CAAC,gCAAgC,CAAGD,EAAQD,EAAK,WAAc,EAEtEA,EAAK,UAAa,CAAGC,EAAQD,EAAK,UAAa,CACjD,EAAG,AAAkB,aAAlB,OAAOO,OAAyB,IAAI,CAAGA,OAAQ,AAACC,GACnC,AAAC,CAAA,KACP,aACA,IAAIC,EAAuB,CAE/B,IACC,AAACN,IAERA,EAAOD,OAAO,CAAGM,CAEX,CAEI,EAGIE,EAA2B,CAAC,EAGhC,SAASC,EAAoBC,CAAQ,EAEpC,IAAIC,EAAeH,CAAwB,CAACE,EAAS,CACrD,GAAIC,AAAiBC,KAAAA,IAAjBD,EACH,OAAOA,EAA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