-
Notifications
You must be signed in to change notification settings - Fork 1
/
datagrid.js.map
1 lines (1 loc) · 884 KB
/
datagrid.js.map
1
{"version":3,"sources":["<anon>"],"sourcesContent":["/**\n * @license Highcharts Dashboards v3.0.0 (2024-10-16)\n *\n * (c) 2009-2024 Highsoft AS\n *\n * License: www.highcharts.com/license\n */\n(function (root, factory) {\n if (typeof module === 'object' && module.exports) {\n factory['default'] = factory;\n module.exports = (root && root.document) ?\n factory(root) :\n factory;\n } else if (typeof define === 'function' && define.amd) {\n define('datagrid/datagrid', function () {\n return factory(root);\n });\n } else {\n if (root.DataGrid) {\n root.DataGrid.error(16, true);\n }\n root.DataGrid = factory(root);\n }\n}(typeof window !== 'undefined' ? window : this, function (window) {\n 'use strict';\n var _modules = {};\n function _registerModule(obj, path, args, fn) {\n if (!obj.hasOwnProperty(path)) {\n obj[path] = fn.apply(null, args);\n\n if (window && typeof CustomEvent === 'function') {\n window.dispatchEvent(new CustomEvent(\n 'DataGridModuleLoaded',\n { detail: { path: path, module: obj[path] } }\n ));\n }\n }\n }\n _registerModule(_modules, 'Core/Globals.js', [], function () {\n /* *\n *\n * (c) 2010-2024 Torstein Honsi\n *\n * License: www.highcharts.com/license\n *\n * !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!\n *\n * */\n /* *\n *\n * Namespace\n *\n * */\n /**\n * Shared Highcharts properties.\n * @private\n */\n var Globals;\n (function (Globals) {\n /* *\n *\n * Constants\n *\n * */\n Globals.SVG_NS = 'http://www.w3.org/2000/svg', Globals.product = 'Highcharts', Globals.version = '3.0.0', Globals.win = (typeof window !== 'undefined' ?\n window :\n {}), // eslint-disable-line node/no-unsupported-features/es-builtins\n Globals.doc = Globals.win.document, Globals.svg = (Globals.doc &&\n Globals.doc.createElementNS &&\n !!Globals.doc.createElementNS(Globals.SVG_NS, 'svg').createSVGRect), Globals.userAgent = (Globals.win.navigator && Globals.win.navigator.userAgent) || '', Globals.isChrome = Globals.win.chrome, Globals.isFirefox = Globals.userAgent.indexOf('Firefox') !== -1, Globals.isMS = /(edge|msie|trident)/i.test(Globals.userAgent) && !Globals.win.opera, Globals.isSafari = !Globals.isChrome && Globals.userAgent.indexOf('Safari') !== -1, Globals.isTouchDevice = /(Mobile|Android|Windows Phone)/.test(Globals.userAgent), Globals.isWebKit = Globals.userAgent.indexOf('AppleWebKit') !== -1, Globals.deg2rad = Math.PI * 2 / 360, Globals.hasBidiBug = (Globals.isFirefox &&\n parseInt(Globals.userAgent.split('Firefox/')[1], 10) < 4 // Issue #38\n ), Globals.marginNames = [\n 'plotTop',\n 'marginRight',\n 'marginBottom',\n 'plotLeft'\n ], Globals.noop = function () { }, Globals.supportsPassiveEvents = (function () {\n // Checks whether the browser supports passive events, (#11353).\n let supportsPassive = false;\n // Object.defineProperty doesn't work on IE as well as passive\n // events - instead of using polyfill, we can exclude IE totally.\n if (!Globals.isMS) {\n const opts = Object.defineProperty({}, 'passive', {\n get: function () {\n supportsPassive = true;\n }\n });\n if (Globals.win.addEventListener && Globals.win.removeEventListener) {\n Globals.win.addEventListener('testPassive', Globals.noop, opts);\n Globals.win.removeEventListener('testPassive', Globals.noop, opts);\n }\n }\n return supportsPassive;\n }());\n /**\n * An array containing the current chart objects in the page. A chart's\n * position in the array is preserved throughout the page's lifetime. When\n * a chart is destroyed, the array item becomes `undefined`.\n *\n * @name Highcharts.charts\n * @type {Array<Highcharts.Chart|undefined>}\n */\n Globals.charts = [];\n /**\n * A shared registry between all bundles to keep track of applied\n * compositions.\n * @private\n */\n Globals.composed = [];\n /**\n * A hook for defining additional date format specifiers. New\n * specifiers are defined as key-value pairs by using the\n * specifier as key, and a function which takes the timestamp as\n * value. This function returns the formatted portion of the\n * date.\n *\n * @sample highcharts/global/dateformats/\n * Adding support for week number\n *\n * @name Highcharts.dateFormats\n * @type {Record<string, Highcharts.TimeFormatCallbackFunction>}\n */\n Globals.dateFormats = {};\n /**\n * @private\n * @deprecated\n * @todo Use only `Core/Series/SeriesRegistry.seriesTypes`\n */\n Globals.seriesTypes = {};\n /**\n * @private\n */\n Globals.symbolSizes = {};\n /* *\n *\n * Properties\n *\n * */\n // eslint-disable-next-line prefer-const\n Globals.chartCount = 0;\n })(Globals || (Globals = {}));\n /* *\n *\n * Default Export\n *\n * */\n /* *\n *\n * API Declarations\n *\n * */\n /**\n * Theme options that should get applied to the chart. In module mode it\n * might not be possible to change this property because of read-only\n * restrictions, instead use {@link Highcharts.setOptions}.\n *\n * @deprecated\n * @name Highcharts.theme\n * @type {Highcharts.Options}\n */\n (''); // Keeps doclets above in JS file\n\n return Globals;\n });\n _registerModule(_modules, 'Core/Utilities.js', [_modules['Core/Globals.js']], function (H) {\n /* *\n *\n * (c) 2010-2024 Torstein Honsi\n *\n * License: www.highcharts.com/license\n *\n * !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!\n *\n * */\n const { charts, doc, win } = H;\n /* *\n *\n * Functions\n *\n * */\n /**\n * Provide error messages for debugging, with links to online explanation. This\n * function can be overridden to provide custom error handling.\n *\n * @sample highcharts/chart/highcharts-error/\n * Custom error handler\n *\n * @function Highcharts.error\n *\n * @param {number|string} code\n * The error code. See\n * [errors.xml](https://github.com/highcharts/highcharts/blob/master/errors/errors.xml)\n * for available codes. If it is a string, the error message is printed\n * directly in the console.\n *\n * @param {boolean} [stop=false]\n * Whether to throw an error or just log a warning in the console.\n *\n * @param {Highcharts.Chart} [chart]\n * Reference to the chart that causes the error. Used in 'debugger'\n * module to display errors directly on the chart.\n * Important note: This argument is undefined for errors that lack\n * access to the Chart instance. In such case, the error will be\n * displayed on the last created chart.\n *\n * @param {Highcharts.Dictionary<string>} [params]\n * Additional parameters for the generated message.\n *\n * @return {void}\n */\n function error(code, stop, chart, params) {\n const severity = stop ? 'Highcharts error' : 'Highcharts warning';\n if (code === 32) {\n code = `${severity}: Deprecated member`;\n }\n const isCode = isNumber(code);\n let message = isCode ?\n `${severity} #${code}: www.highcharts.com/errors/${code}/` :\n code.toString();\n const defaultHandler = function () {\n if (stop) {\n throw new Error(message);\n }\n // Else ...\n if (win.console &&\n error.messages.indexOf(message) === -1 // Prevent console flooting\n ) {\n console.warn(message); // eslint-disable-line no-console\n }\n };\n if (typeof params !== 'undefined') {\n let additionalMessages = '';\n if (isCode) {\n message += '?';\n }\n objectEach(params, function (value, key) {\n additionalMessages += `\\n - ${key}: ${value}`;\n if (isCode) {\n message += encodeURI(key) + '=' + encodeURI(value);\n }\n });\n message += additionalMessages;\n }\n fireEvent(H, 'displayError', { chart, code, message, params }, defaultHandler);\n error.messages.push(message);\n }\n (function (error) {\n error.messages = [];\n })(error || (error = {}));\n /**\n * Utility function to deep merge two or more objects and return a third object.\n * If the first argument is true, the contents of the second object is copied\n * into the first object. The merge function can also be used with a single\n * object argument to create a deep copy of an object.\n *\n * @function Highcharts.merge<T>\n *\n * @param {true | T} extendOrSource\n * Whether to extend the left-side object,\n * or the first object to merge as a deep copy.\n *\n * @param {...Array<object|undefined>} [sources]\n * Object(s) to merge into the previous one.\n *\n * @return {T}\n * The merged object. If the first argument is true, the return is the\n * same as the second argument.\n */\n function merge(extendOrSource, ...sources) {\n let i, args = [extendOrSource, ...sources], ret = {};\n const doCopy = function (copy, original) {\n // An object is replacing a primitive\n if (typeof copy !== 'object') {\n copy = {};\n }\n objectEach(original, function (value, key) {\n // Prototype pollution (#14883)\n if (key === '__proto__' || key === 'constructor') {\n return;\n }\n // Copy the contents of objects, but not arrays or DOM nodes\n if (isObject(value, true) &&\n !isClass(value) &&\n !isDOMElement(value)) {\n copy[key] = doCopy(copy[key] || {}, value);\n // Primitives and arrays are copied over directly\n }\n else {\n copy[key] = original[key];\n }\n });\n return copy;\n };\n // If first argument is true, copy into the existing object. Used in\n // setOptions.\n if (extendOrSource === true) {\n ret = args[1];\n args = Array.prototype.slice.call(args, 2);\n }\n // For each argument, extend the return\n const len = args.length;\n for (i = 0; i < len; i++) {\n ret = doCopy(ret, args[i]);\n }\n return ret;\n }\n /**\n * Constrain a value to within a lower and upper threshold.\n *\n * @private\n * @param {number} value The initial value\n * @param {number} min The lower threshold\n * @param {number} max The upper threshold\n * @return {number} Returns a number value within min and max.\n */\n function clamp(value, min, max) {\n return value > min ? value < max ? value : max : min;\n }\n /**\n * Utility for crisping a line position to the nearest full pixel depening on\n * the line width\n * @param {number} value The raw pixel position\n * @param {number} lineWidth The line width\n * @param {boolean} [inverted] Whether the containing group is inverted.\n * Crisping round numbers on the y-scale need to go\n * to the other side because the coordinate system\n * is flipped (scaleY is -1)\n * @return {number} The pixel position to use for a crisp display\n */\n const crisp = (value, lineWidth = 0, inverted) => {\n const mod = lineWidth % 2 / 2, inverter = inverted ? -1 : 1;\n return (Math.round(value * inverter - mod) + mod) * inverter;\n };\n // eslint-disable-next-line valid-jsdoc\n /**\n * Return the deep difference between two objects. It can either return the new\n * properties, or optionally return the old values of new properties.\n * @private\n */\n function diffObjects(newer, older, keepOlder, collectionsWithUpdate) {\n const ret = {};\n /**\n * Recurse over a set of options and its current values, and store the\n * current values in the ret object.\n */\n function diff(newer, older, ret, depth) {\n const keeper = keepOlder ? older : newer;\n objectEach(newer, function (newerVal, key) {\n if (!depth &&\n collectionsWithUpdate &&\n collectionsWithUpdate.indexOf(key) > -1 &&\n older[key]) {\n newerVal = splat(newerVal);\n ret[key] = [];\n // Iterate over collections like series, xAxis or yAxis and map\n // the items by index.\n for (let i = 0; i < Math.max(newerVal.length, older[key].length); i++) {\n // Item exists in current data (#6347)\n if (older[key][i]) {\n // If the item is missing from the new data, we need to\n // save the whole config structure. Like when\n // responsively updating from a dual axis layout to a\n // single axis and back (#13544).\n if (newerVal[i] === void 0) {\n ret[key][i] = older[key][i];\n // Otherwise, proceed\n }\n else {\n ret[key][i] = {};\n diff(newerVal[i], older[key][i], ret[key][i], depth + 1);\n }\n }\n }\n }\n else if (isObject(newerVal, true) &&\n !newerVal.nodeType // #10044\n ) {\n ret[key] = isArray(newerVal) ? [] : {};\n diff(newerVal, older[key] || {}, ret[key], depth + 1);\n // Delete empty nested objects\n if (Object.keys(ret[key]).length === 0 &&\n // Except colorAxis which is a special case where the empty\n // object means it is enabled. Which is unfortunate and we\n // should try to find a better way.\n !(key === 'colorAxis' && depth === 0)) {\n delete ret[key];\n }\n }\n else if (newer[key] !== older[key] ||\n // If the newer key is explicitly undefined, keep it (#10525)\n (key in newer && !(key in older))) {\n if (key !== '__proto__' && key !== 'constructor') {\n ret[key] = keeper[key];\n }\n }\n });\n }\n diff(newer, older, ret, 0);\n return ret;\n }\n /**\n * Shortcut for parseInt\n *\n * @private\n * @function Highcharts.pInt\n *\n * @param {*} s\n * any\n *\n * @param {number} [mag]\n * Magnitude\n *\n * @return {number}\n * number\n */\n function pInt(s, mag) {\n return parseInt(s, mag || 10);\n }\n /**\n * Utility function to check for string type.\n *\n * @function Highcharts.isString\n *\n * @param {*} s\n * The item to check.\n *\n * @return {boolean}\n * True if the argument is a string.\n */\n function isString(s) {\n return typeof s === 'string';\n }\n /**\n * Utility function to check if an item is an array.\n *\n * @function Highcharts.isArray\n *\n * @param {*} obj\n * The item to check.\n *\n * @return {boolean}\n * True if the argument is an array.\n */\n function isArray(obj) {\n const str = Object.prototype.toString.call(obj);\n return str === '[object Array]' || str === '[object Array Iterator]';\n }\n /**\n * Utility function to check if an item is of type object.\n *\n * @function Highcharts.isObject\n *\n * @param {*} obj\n * The item to check.\n *\n * @param {boolean} [strict=false]\n * Also checks that the object is not an array.\n *\n * @return {boolean}\n * True if the argument is an object.\n */\n function isObject(obj, strict) {\n return (!!obj &&\n typeof obj === 'object' &&\n (!strict || !isArray(obj))); // eslint-disable-line @typescript-eslint/no-explicit-any\n }\n /**\n * Utility function to check if an Object is a HTML Element.\n *\n * @function Highcharts.isDOMElement\n *\n * @param {*} obj\n * The item to check.\n *\n * @return {boolean}\n * True if the argument is a HTML Element.\n */\n function isDOMElement(obj) {\n return isObject(obj) && typeof obj.nodeType === 'number';\n }\n /**\n * Utility function to check if an Object is a class.\n *\n * @function Highcharts.isClass\n *\n * @param {object|undefined} obj\n * The item to check.\n *\n * @return {boolean}\n * True if the argument is a class.\n */\n function isClass(obj) {\n const c = obj && obj.constructor;\n return !!(isObject(obj, true) &&\n !isDOMElement(obj) &&\n (c && c.name && c.name !== 'Object'));\n }\n /**\n * Utility function to check if an item is a number and it is finite (not NaN,\n * Infinity or -Infinity).\n *\n * @function Highcharts.isNumber\n *\n * @param {*} n\n * The item to check.\n *\n * @return {boolean}\n * True if the item is a finite number\n */\n function isNumber(n) {\n return typeof n === 'number' && !isNaN(n) && n < Infinity && n > -Infinity;\n }\n /**\n * Remove the last occurence of an item from an array.\n *\n * @function Highcharts.erase\n *\n * @param {Array<*>} arr\n * The array.\n *\n * @param {*} item\n * The item to remove.\n *\n * @return {void}\n */\n function erase(arr, item) {\n let i = arr.length;\n while (i--) {\n if (arr[i] === item) {\n arr.splice(i, 1);\n break;\n }\n }\n }\n /**\n * Insert a series or an axis in a collection with other items, either the\n * chart series or yAxis series or axis collections, in the correct order\n * according to the index option and whether it is internal. Used internally\n * when adding series and axes.\n *\n * @private\n * @function Highcharts.Chart#insertItem\n * @param {Highcharts.Series|Highcharts.Axis} item\n * The item to insert\n * @param {Array<Highcharts.Series>|Array<Highcharts.Axis>} collection\n * A collection of items, like `chart.series` or `xAxis.series`.\n * @return {number} The index of the series in the collection.\n */\n function insertItem(item, collection) {\n const indexOption = item.options.index, length = collection.length;\n let i;\n for (\n // Internal item (navigator) should always be pushed to the end\n i = item.options.isInternal ? length : 0; i < length + 1; i++) {\n if (\n // No index option, reached the end of the collection,\n // equivalent to pushing\n !collection[i] ||\n // Handle index option, the element to insert has lower index\n (isNumber(indexOption) &&\n indexOption < pick(collection[i].options.index, collection[i]._i)) ||\n // Insert the new item before other internal items\n // (navigator)\n collection[i].options.isInternal) {\n collection.splice(i, 0, item);\n break;\n }\n }\n return i;\n }\n /**\n * Adds an item to an array, if it is not present in the array.\n *\n * @function Highcharts.pushUnique\n *\n * @param {Array<unknown>} array\n * The array to add the item to.\n *\n * @param {unknown} item\n * The item to add.\n *\n * @return {boolean}\n * Returns true, if the item was not present and has been added.\n */\n function pushUnique(array, item) {\n return array.indexOf(item) < 0 && !!array.push(item);\n }\n /**\n * Check if an object is null or undefined.\n *\n * @function Highcharts.defined\n *\n * @param {*} obj\n * The object to check.\n *\n * @return {boolean}\n * False if the object is null or undefined, otherwise true.\n */\n function defined(obj) {\n return typeof obj !== 'undefined' && obj !== null;\n }\n /**\n * Set or get an attribute or an object of attributes.\n *\n * To use as a setter, pass a key and a value, or let the second argument be a\n * collection of keys and values. When using a collection, passing a value of\n * `null` or `undefined` will remove the attribute.\n *\n * To use as a getter, pass only a string as the second argument.\n *\n * @function Highcharts.attr\n *\n * @param {Highcharts.HTMLDOMElement|Highcharts.SVGDOMElement} elem\n * The DOM element to receive the attribute(s).\n *\n * @param {string|Highcharts.HTMLAttributes|Highcharts.SVGAttributes} [keyOrAttribs]\n * The property or an object of key-value pairs.\n *\n * @param {number|string} [value]\n * The value if a single property is set.\n *\n * @return {string|null|undefined}\n * When used as a getter, return the value.\n */\n function attr(elem, keyOrAttribs, value) {\n const isGetter = isString(keyOrAttribs) && !defined(value);\n let ret;\n const attrSingle = (value, key) => {\n // Set the value\n if (defined(value)) {\n elem.setAttribute(key, value);\n // Get the value\n }\n else if (isGetter) {\n ret = elem.getAttribute(key);\n // IE7 and below cannot get class through getAttribute (#7850)\n if (!ret && key === 'class') {\n ret = elem.getAttribute(key + 'Name');\n }\n // Remove the value\n }\n else {\n elem.removeAttribute(key);\n }\n };\n // If keyOrAttribs is a string\n if (isString(keyOrAttribs)) {\n attrSingle(value, keyOrAttribs);\n // Else if keyOrAttribs is defined, it is a hash of key/value pairs\n }\n else {\n objectEach(keyOrAttribs, attrSingle);\n }\n return ret;\n }\n /**\n * Check if an element is an array, and if not, make it into an array.\n *\n * @function Highcharts.splat\n *\n * @param {*} obj\n * The object to splat.\n *\n * @return {Array}\n * The produced or original array.\n */\n function splat(obj) {\n return isArray(obj) ? obj : [obj];\n }\n /**\n * Set a timeout if the delay is given, otherwise perform the function\n * synchronously.\n *\n * @function Highcharts.syncTimeout\n *\n * @param {Function} fn\n * The function callback.\n *\n * @param {number} delay\n * Delay in milliseconds.\n *\n * @param {*} [context]\n * An optional context to send to the function callback.\n *\n * @return {number}\n * An identifier for the timeout that can later be cleared with\n * Highcharts.clearTimeout. Returns -1 if there is no timeout.\n */\n function syncTimeout(fn, delay, context) {\n if (delay > 0) {\n return setTimeout(fn, delay, context);\n }\n fn.call(0, context);\n return -1;\n }\n /**\n * Internal clear timeout. The function checks that the `id` was not removed\n * (e.g. by `chart.destroy()`). For the details see\n * [issue #7901](https://github.com/highcharts/highcharts/issues/7901).\n *\n * @function Highcharts.clearTimeout\n *\n * @param {number|undefined} id\n * Id of a timeout.\n */\n function internalClearTimeout(id) {\n if (defined(id)) {\n clearTimeout(id);\n }\n }\n /* eslint-disable valid-jsdoc */\n /**\n * Utility function to extend an object with the members of another.\n *\n * @function Highcharts.extend<T>\n *\n * @param {T|undefined} a\n * The object to be extended.\n *\n * @param {Partial<T>} b\n * The object to add to the first one.\n *\n * @return {T}\n * Object a, the original object.\n */\n function extend(a, b) {\n /* eslint-enable valid-jsdoc */\n let n;\n if (!a) {\n a = {};\n }\n for (n in b) { // eslint-disable-line guard-for-in\n a[n] = b[n];\n }\n return a;\n }\n /* eslint-disable valid-jsdoc */\n /**\n * Return the first value that is not null or undefined.\n *\n * @function Highcharts.pick<T>\n *\n * @param {...Array<T|null|undefined>} items\n * Variable number of arguments to inspect.\n *\n * @return {T}\n * The value of the first argument that is not null or undefined.\n */\n function pick() {\n const args = arguments;\n const length = args.length;\n for (let i = 0; i < length; i++) {\n const arg = args[i];\n if (typeof arg !== 'undefined' && arg !== null) {\n return arg;\n }\n }\n }\n /**\n * Set CSS on a given element.\n *\n * @function Highcharts.css\n *\n * @param {Highcharts.HTMLDOMElement|Highcharts.SVGDOMElement} el\n * An HTML DOM element.\n *\n * @param {Highcharts.CSSObject} styles\n * Style object with camel case property names.\n *\n * @return {void}\n */\n function css(el, styles) {\n extend(el.style, styles);\n }\n /**\n * Utility function to create an HTML element with attributes and styles.\n *\n * @function Highcharts.createElement\n *\n * @param {string} tag\n * The HTML tag.\n *\n * @param {Highcharts.HTMLAttributes} [attribs]\n * Attributes as an object of key-value pairs.\n *\n * @param {Highcharts.CSSObject} [styles]\n * Styles as an object of key-value pairs.\n *\n * @param {Highcharts.HTMLDOMElement} [parent]\n * The parent HTML object.\n *\n * @param {boolean} [nopad=false]\n * If true, remove all padding, border and margin.\n *\n * @return {Highcharts.HTMLDOMElement}\n * The created DOM element.\n */\n function createElement(tag, attribs, styles, parent, nopad) {\n const el = doc.createElement(tag);\n if (attribs) {\n extend(el, attribs);\n }\n if (nopad) {\n css(el, { padding: '0', border: 'none', margin: '0' });\n }\n if (styles) {\n css(el, styles);\n }\n if (parent) {\n parent.appendChild(el);\n }\n return el;\n }\n // eslint-disable-next-line valid-jsdoc\n /**\n * Extend a prototyped class by new members.\n *\n * @deprecated\n * @function Highcharts.extendClass<T>\n *\n * @param {Highcharts.Class<T>} parent\n * The parent prototype to inherit.\n *\n * @param {Highcharts.Dictionary<*>} members\n * A collection of prototype members to add or override compared to the\n * parent prototype.\n *\n * @return {Highcharts.Class<T>}\n * A new prototype.\n */\n function extendClass(parent, members) {\n const obj = (function () { });\n obj.prototype = new parent(); // eslint-disable-line new-cap\n extend(obj.prototype, members);\n return obj;\n }\n /**\n * Left-pad a string to a given length by adding a character repetitively.\n *\n * @function Highcharts.pad\n *\n * @param {number} number\n * The input string or number.\n *\n * @param {number} [length]\n * The desired string length.\n *\n * @param {string} [padder=0]\n * The character to pad with.\n *\n * @return {string}\n * The padded string.\n */\n function pad(number, length, padder) {\n return new Array((length || 2) +\n 1 -\n String(number)\n .replace('-', '')\n .length).join(padder || '0') + number;\n }\n /**\n * Return a length based on either the integer value, or a percentage of a base.\n *\n * @function Highcharts.relativeLength\n *\n * @param {Highcharts.RelativeSize} value\n * A percentage string or a number.\n *\n * @param {number} base\n * The full length that represents 100%.\n *\n * @param {number} [offset=0]\n * A pixel offset to apply for percentage values. Used internally in\n * axis positioning.\n *\n * @return {number}\n * The computed length.\n */\n function relativeLength(value, base, offset) {\n return (/%$/).test(value) ?\n (base * parseFloat(value) / 100) + (offset || 0) :\n parseFloat(value);\n }\n /**\n * Replaces text in a string with a given replacement in a loop to catch nested\n * matches after previous replacements.\n *\n * @function Highcharts.replaceNested\n *\n * @param {string} text\n * Text to search and modify.\n *\n * @param {...Array<(RegExp|string)>} replacements\n * One or multiple tuples with search pattern (`[0]: (string|RegExp)`) and\n * replacement (`[1]: string`) for matching text.\n *\n * @return {string}\n * Text with replacements.\n */\n function replaceNested(text, ...replacements) {\n let previous, replacement;\n do {\n previous = text;\n for (replacement of replacements) {\n text = text.replace(replacement[0], replacement[1]);\n }\n } while (text !== previous);\n return text;\n }\n /**\n * Wrap a method with extended functionality, preserving the original function.\n *\n * @function Highcharts.wrap\n *\n * @param {*} obj\n * The context object that the method belongs to. In real cases, this is\n * often a prototype.\n *\n * @param {string} method\n * The name of the method to extend.\n *\n * @param {Highcharts.WrapProceedFunction} func\n * A wrapper function callback. This function is called with the same\n * arguments as the original function, except that the original function\n * is unshifted and passed as the first argument.\n */\n function wrap(obj, method, func) {\n const proceed = obj[method];\n obj[method] = function () {\n const outerArgs = arguments, scope = this;\n return func.apply(this, [\n function () {\n return proceed.apply(scope, arguments.length ? arguments : outerArgs);\n }\n ].concat([].slice.call(arguments)));\n };\n }\n /**\n * Get the magnitude of a number.\n *\n * @function Highcharts.getMagnitude\n *\n * @param {number} num\n * The number.\n *\n * @return {number}\n * The magnitude, where 1-9 are magnitude 1, 10-99 magnitude 2 etc.\n */\n function getMagnitude(num) {\n return Math.pow(10, Math.floor(Math.log(num) / Math.LN10));\n }\n /**\n * Take an interval and normalize it to multiples of round numbers.\n *\n * @deprecated\n * @function Highcharts.normalizeTickInterval\n *\n * @param {number} interval\n * The raw, un-rounded interval.\n *\n * @param {Array<*>} [multiples]\n * Allowed multiples.\n *\n * @param {number} [magnitude]\n * The magnitude of the number.\n *\n * @param {boolean} [allowDecimals]\n * Whether to allow decimals.\n *\n * @param {boolean} [hasTickAmount]\n * If it has tickAmount, avoid landing on tick intervals lower than\n * original.\n *\n * @return {number}\n * The normalized interval.\n *\n * @todo\n * Move this function to the Axis prototype. It is here only for historical\n * reasons.\n */\n function normalizeTickInterval(interval, multiples, magnitude, allowDecimals, hasTickAmount) {\n let i, retInterval = interval;\n // Round to a tenfold of 1, 2, 2.5 or 5\n magnitude = pick(magnitude, getMagnitude(interval));\n const normalized = interval / magnitude;\n // Multiples for a linear scale\n if (!multiples) {\n multiples = hasTickAmount ?\n // Finer grained ticks when the tick amount is hard set, including\n // when alignTicks is true on multiple axes (#4580).\n [1, 1.2, 1.5, 2, 2.5, 3, 4, 5, 6, 8, 10] :\n // Else, let ticks fall on rounder numbers\n [1, 2, 2.5, 5, 10];\n // The allowDecimals option\n if (allowDecimals === false) {\n if (magnitude === 1) {\n multiples = multiples.filter(function (num) {\n return num % 1 === 0;\n });\n }\n else if (magnitude <= 0.1) {\n multiples = [1 / magnitude];\n }\n }\n }\n // Normalize the interval to the nearest multiple\n for (i = 0; i < multiples.length; i++) {\n retInterval = multiples[i];\n // Only allow tick amounts smaller than natural\n if ((hasTickAmount &&\n retInterval * magnitude >= interval) ||\n (!hasTickAmount &&\n (normalized <=\n (multiples[i] +\n (multiples[i + 1] || multiples[i])) / 2))) {\n break;\n }\n }\n // Multiply back to the correct magnitude. Correct floats to appropriate\n // precision (#6085).\n retInterval = correctFloat(retInterval * magnitude, -Math.round(Math.log(0.001) / Math.LN10));\n return retInterval;\n }\n /**\n * Sort an object array and keep the order of equal items. The ECMAScript\n * standard does not specify the behaviour when items are equal.\n *\n * @function Highcharts.stableSort\n *\n * @param {Array<*>} arr\n * The array to sort.\n *\n * @param {Function} sortFunction\n * The function to sort it with, like with regular Array.prototype.sort.\n */\n function stableSort(arr, sortFunction) {\n // @todo It seems like Chrome since v70 sorts in a stable way internally,\n // plus all other browsers do it, so over time we may be able to remove this\n // function\n const length = arr.length;\n let sortValue, i;\n // Add index to each item\n for (i = 0; i < length; i++) {\n arr[i].safeI = i; // Stable sort index\n }\n arr.sort(function (a, b) {\n sortValue = sortFunction(a, b);\n return sortValue === 0 ? a.safeI - b.safeI : sortValue;\n });\n // Remove index from items\n for (i = 0; i < length; i++) {\n delete arr[i].safeI; // Stable sort index\n }\n }\n /**\n * Non-recursive method to find the lowest member of an array. `Math.min` raises\n * a maximum call stack size exceeded error in Chrome when trying to apply more\n * than 150.000 points. This method is slightly slower, but safe.\n *\n * @function Highcharts.arrayMin\n *\n * @param {Array<*>} data\n * An array of numbers.\n *\n * @return {number}\n * The lowest number.\n */\n function arrayMin(data) {\n let i = data.length, min = data[0];\n while (i--) {\n if (data[i] < min) {\n min = data[i];\n }\n }\n return min;\n }\n /**\n * Non-recursive method to find the lowest member of an array. `Math.max` raises\n * a maximum call stack size exceeded error in Chrome when trying to apply more\n * than 150.000 points. This method is slightly slower, but safe.\n *\n * @function Highcharts.arrayMax\n *\n * @param {Array<*>} data\n * An array of numbers.\n *\n * @return {number}\n * The highest number.\n */\n function arrayMax(data) {\n let i = data.length, max = data[0];\n while (i--) {\n if (data[i] > max) {\n max = data[i];\n }\n }\n return max;\n }\n /**\n * Utility method that destroys any SVGElement instances that are properties on\n * the given object. It loops all properties and invokes destroy if there is a\n * destroy method. The property is then delete.\n *\n * @function Highcharts.destroyObjectProperties\n *\n * @param {*} obj\n * The object to destroy properties on.\n *\n * @param {*} [except]\n * Exception, do not destroy this property, only delete it.\n */\n function destroyObjectProperties(obj, except, destructablesOnly) {\n objectEach(obj, function (val, n) {\n // If the object is non-null and destroy is defined\n if (val !== except && val?.destroy) {\n // Invoke the destroy\n val.destroy();\n }\n // Delete the property from the object\n if (val?.destroy || !destructablesOnly) {\n delete obj[n];\n }\n });\n }\n /**\n * Discard a HTML element\n *\n * @function Highcharts.discardElement\n *\n * @param {Highcharts.HTMLDOMElement} element\n * The HTML node to discard.\n */\n function discardElement(element) {\n if (element && element.parentElement) {\n element.parentElement.removeChild(element);\n }\n }\n /**\n * Fix JS round off float errors.\n *\n * @function Highcharts.correctFloat\n *\n * @param {number} num\n * A float number to fix.\n *\n * @param {number} [prec=14]\n * The precision.\n *\n * @return {number}\n * The corrected float number.\n */\n function correctFloat(num, prec) {\n // When the number is higher than 1e14 use the number (#16275)\n return num > 1e14 ? num : parseFloat(num.toPrecision(prec || 14));\n }\n /**\n * The time unit lookup\n *\n * @ignore\n */\n const timeUnits = {\n millisecond: 1,\n second: 1000,\n minute: 60000,\n hour: 3600000,\n day: 24 * 3600000,\n week: 7 * 24 * 3600000,\n month: 28 * 24 * 3600000,\n year: 364 * 24 * 3600000\n };\n /**\n * Easing definition\n *\n * @private\n * @function Math.easeInOutSine\n *\n * @param {number} pos\n * Current position, ranging from 0 to 1.\n *\n * @return {number}\n * Ease result\n */\n Math.easeInOutSine = function (pos) {\n return -0.5 * (Math.cos(Math.PI * pos) - 1);\n };\n /**\n * Find the closest distance between two values of a two-dimensional array\n * @private\n * @function Highcharts.getClosestDistance\n *\n * @param {Array<Array<number>>} arrays\n * An array of arrays of numbers\n *\n * @return {number | undefined}\n * The closest distance between values\n */\n function getClosestDistance(arrays, onError) {\n const allowNegative = !onError;\n let closest, loopLength, distance, i;\n arrays.forEach((xData) => {\n if (xData.length > 1) {\n loopLength = xData.length - 1;\n for (i = loopLength; i > 0; i--) {\n distance = xData[i] - xData[i - 1];\n if (distance < 0 && !allowNegative) {\n onError?.();\n // Only one call\n onError = void 0;\n }\n else if (distance && (typeof closest === 'undefined' || distance < closest)) {\n closest = distance;\n }\n }\n }\n });\n return closest;\n }\n /**\n * Returns the value of a property path on a given object.\n *\n * @private\n * @function getNestedProperty\n *\n * @param {string} path\n * Path to the property, for example `custom.myValue`.\n *\n * @param {unknown} obj\n * Instance containing the property on the specific path.\n *\n * @return {unknown}\n * The unknown property value.\n */\n function getNestedProperty(path, parent) {\n const pathElements = path.split('.');\n while (pathElements.length && defined(parent)) {\n const pathElement = pathElements.shift();\n // Filter on the key\n if (typeof pathElement === 'undefined' ||\n pathElement === '__proto__') {\n return; // Undefined\n }\n if (pathElement === 'this') {\n let thisProp;\n if (isObject(parent)) {\n thisProp = parent['@this'];\n }\n return thisProp ?? parent;\n }\n const child = parent[pathElement];\n // Filter on the child\n if (!defined(child) ||\n typeof child === 'function' ||\n typeof child.nodeType === 'number' ||\n child === win) {\n return; // Undefined\n }\n // Else, proceed\n parent = child;\n }\n return parent;\n }\n /**\n * Get the computed CSS value for given element and property, only for numerical\n * properties. For width and height, the dimension of the inner box (excluding\n * padding) is returned. Used for fitting the chart within the container.\n *\n * @function Highcharts.getStyle\n *\n * @param {Highcharts.HTMLDOMElement} el\n * An HTML element.\n *\n * @param {string} prop\n * The property name.\n *\n * @param {boolean} [toInt=true]\n * Parse to integer.\n *\n * @return {number|string|undefined}\n * The style value.\n */\n function getStyle(el, prop, toInt) {\n let style;\n // For width and height, return the actual inner pixel size (#4913)\n if (prop === 'width') {\n let offsetWidth = Math.min(el.offsetWidth, el.scrollWidth);\n // In flex boxes, we need to use getBoundingClientRect and floor it,\n // because scrollWidth doesn't support subpixel precision (#6427) ...\n const boundingClientRectWidth = el.getBoundingClientRect &&\n el.getBoundingClientRect().width;\n // ...unless if the containing div or its parents are transform-scaled\n // down, in which case the boundingClientRect can't be used as it is\n // also scaled down (#9871, #10498).\n if (boundingClientRectWidth < offsetWidth &&\n boundingClientRectWidth >= offsetWidth - 1) {\n offsetWidth = Math.floor(boundingClientRectWidth);\n }\n return Math.max(0, // #8377\n (offsetWidth -\n (getStyle(el, 'padding-left', true) || 0) -\n (getStyle(el, 'padding-right', true) || 0)));\n }\n if (prop === 'height') {\n return Math.max(0, // #8377\n (Math.min(el.offsetHeight, el.scrollHeight) -\n (getStyle(el, 'padding-top', true) || 0) -\n (getStyle(el, 'padding-bottom', true) || 0)));\n }\n // Otherwise, get the computed style\n const css = win.getComputedStyle(el, void 0); // eslint-disable-line no-undefined\n if (css) {\n style = css.getPropertyValue(prop);\n if (pick(toInt, prop !== 'opacity')) {\n style = pInt(style);\n }\n }\n return style;\n }\n /**\n * Search for an item in an array.\n *\n * @function Highcharts.inArray\n *\n * @deprecated\n *\n * @param {*} item\n * The item to search for.\n *\n * @param {Array<*>} arr\n * The array or node collection to search in.\n *\n * @param {number} [fromIndex=0]\n * The index to start searching from.\n *\n * @return {number}\n * The index within the array, or -1 if not found.\n */\n function inArray(item, arr, fromIndex) {\n error(32, false, void 0, { 'Highcharts.inArray': 'use Array.indexOf' });\n return arr.indexOf(item, fromIndex);\n }\n /**\n * Return the value of the first element in the array that satisfies the\n * provided testing function.\n *\n * @function Highcharts.find<T>\n *\n * @param {Array<T>} arr\n * The array to test.\n *\n * @param {Function} callback\n * The callback function. The function receives the item as the first\n * argument. Return `true` if this item satisfies the condition.\n *\n * @return {T|undefined}\n * The value of the element.\n */\n const find = Array.prototype.find ?\n function (arr, callback) {\n return arr.find(callback);\n } :\n // Legacy implementation. PhantomJS, IE <= 11 etc. #7223.\n function (arr, callback) {\n let i;\n const length = arr.length;\n for (i = 0; i < length; i++) {\n if (callback(arr[i], i)) { // eslint-disable-line node/callback-return\n return arr[i];\n }\n }\n };\n /**\n * Returns an array of a given object's own properties.\n *\n * @function Highcharts.keys\n * @deprecated\n *\n * @param {*} obj\n * The object of which the properties are to be returned.\n *\n * @return {Array<string>}\n * An array of strings that represents all the properties.\n */\n function keys(obj) {\n error(32, false, void 0, { 'Highcharts.keys': 'use Object.keys' });\n return Object.keys(obj);\n }\n /**\n * Get the element's offset position, corrected for `overflow: auto`.\n *\n * @function Highcharts.offset\n *\n * @param {global.Element} el\n * The DOM element.\n *\n * @return {Highcharts.OffsetObject}\n * An object containing `left` and `top` properties for the position in\n * the page.\n */\n function offset(el) {\n const docElem = doc.documentElement, box = (el.parentElement || el.parentNode) ?\n el.getBoundingClientRect() :\n { top: 0, left: 0, width: 0, height: 0 };\n return {\n top: box.top + (win.pageYOffset || docElem.scrollTop) -\n (docElem.clientTop || 0),\n left: box.left + (win.pageXOffset || docElem.scrollLeft) -\n (docElem.clientLeft || 0),\n width: box.width,\n height: box.height\n };\n }\n /* eslint-disable valid-jsdoc */\n /**\n * Iterate over object key pairs in an object.\n *\n * @function Highcharts.objectEach<T>\n *\n * @param {*} obj\n * The object to iterate over.\n *\n * @param {Highcharts.ObjectEachCallbackFunction<T>} fn\n * The iterator callback. It passes three arguments:\n * * value - The property value.\n * * key - The property key.\n * * obj - The object that objectEach is being applied to.\n *\n * @param {T} [ctx]\n * The context.\n */\n function objectEach(obj, fn, ctx) {\n /* eslint-enable valid-jsdoc */\n for (const key in obj) {\n if (Object.hasOwnProperty.call(obj, key)) {\n fn.call(ctx || obj[key], obj[key], key, obj);\n }\n }\n }\n /**\n * Iterate over an array.\n *\n * @deprecated\n * @function Highcharts.each\n *\n * @param {Array<*>} arr\n * The array to iterate over.\n *\n * @param {Function} fn\n * The iterator callback. It passes three arguments:\n * - `item`: The array item.\n * - `index`: The item's index in the array.\n * - `arr`: The array that each is being applied to.\n *\n * @param {*} [ctx]\n * The context.\n *\n * @return {void}\n */\n /**\n * Filter an array by a callback.\n *\n * @deprecated\n * @function Highcharts.grep\n *\n * @param {Array<*>} arr\n * The array to filter.\n *\n * @param {Function} callback\n * The callback function. The function receives the item as the first\n * argument. Return `true` if the item is to be preserved.\n *\n * @return {Array<*>}\n * A new, filtered array.\n */\n /**\n * Map an array by a callback.\n *\n * @deprecated\n * @function Highcharts.map\n *\n * @param {Array<*>} arr\n * The array to map.\n *\n * @param {Function} fn\n * The callback function. Return the new value for the new array.\n *\n * @return {Array<*>}\n * A new array item with modified items.\n */\n /**\n * Reduce an array to a single value.\n *\n * @deprecated\n * @function Highcharts.reduce\n *\n * @param {Array<*>} arr\n * The array to reduce.\n *\n * @param {Function} fn\n * The callback function. Return the reduced value. Receives 4\n * arguments: Accumulated/reduced value, current value, current array\n * index, and the array.\n *\n * @param {*} initialValue\n * The initial value of the accumulator.\n *\n * @return {*}\n * The reduced value.\n */\n /**\n * Test whether at least one element in the array passes the test implemented by\n * the provided function.\n *\n * @deprecated\n * @function Highcharts.some\n *\n * @param {Array<*>} arr\n * The array to test\n *\n * @param {Function} fn\n * The function to run on each item. Return truthy to pass the test.\n * Receives arguments `currentValue`, `index` and `array`.\n *\n * @param {*} ctx\n * The context.\n *\n * @return {boolean}\n */\n objectEach({\n map: 'map',\n each: 'forEach',\n grep: 'filter',\n reduce: 'reduce',\n some: 'some'\n }, function (val, key) {\n H[key] = function (arr) {\n error(32, false, void 0, { [`Highcharts.${key}`]: `use Array.${val}` });\n return Array.prototype[val].apply(arr, [].slice.call(arguments, 1));\n };\n });\n /* eslint-disable valid-jsdoc */\n /**\n * Add an event listener.\n *\n * @function Highcharts.addEvent<T>\n *\n * @param {Highcharts.Class<T>|T} el\n * The element or object to add a listener to. It can be a\n * {@link HTMLDOMElement}, an {@link SVGElement} or any other object.\n *\n * @param {string} type\n * The event type.\n *\n * @param {Highcharts.EventCallbackFunction<T>|Function} fn\n * The function callback to execute when the event is fired.\n *\n * @param {Highcharts.EventOptionsObject} [options]\n * Options for adding the event.\n *\n * @sample highcharts/members/addevent\n * Use a general `render` event to draw shapes on a chart\n *\n * @return {Function}\n * A callback function to remove the added event.\n */\n function addEvent(el, type, fn, options = {}) {\n /* eslint-enable valid-jsdoc */\n // Add hcEvents to either the prototype (in case we're running addEvent on a\n // class) or the instance. If hasOwnProperty('hcEvents') is false, it is\n // inherited down the prototype chain, in which case we need to set the\n // property on this instance (which may itself be a prototype).\n const owner = typeof el === 'function' && el.prototype || el;\n if (!Object.hasOwnProperty.call(owner, 'hcEvents')) {\n owner.hcEvents = {};\n }\n const events = owner.hcEvents;\n // Allow click events added to points, otherwise they will be prevented by\n // the TouchPointer.pinch function after a pinch zoom operation (#7091).\n if (H.Point && // Without H a dependency loop occurs\n el instanceof H.Point &&\n el.series &&\n el.series.chart) {\n el.series.chart.runTrackerClick = true;\n }\n // Handle DOM events\n // If the browser supports passive events, add it to improve performance\n // on touch events (#11353).\n const addEventListener = el.addEventListener;\n if (addEventListener) {\n addEventListener.call(el, type, fn, H.supportsPassiveEvents ? {\n passive: options.passive === void 0 ?\n type.indexOf('touch') !== -1 : options.passive,\n capture: false\n } : false);\n }\n if (!events[type]) {\n events[type] = [];\n }\n const eventObject = {\n fn,\n order: typeof options.order === 'number' ? options.order : Infinity\n };\n events[type].push(eventObject);\n // Order the calls\n events[type].sort((a, b) => a.order - b.order);\n // Return a function that can be called to remove this event.\n return function () {\n removeEvent(el, type, fn);\n };\n }\n /* eslint-disable valid-jsdoc */\n /**\n * Remove an event that was added with {@link Highcharts#addEvent}.\n *\n * @function Highcharts.removeEvent<T>\n *\n * @param {Highcharts.Class<T>|T} el\n * The element to remove events on.\n *\n * @param {string} [type]\n * The type of events to remove. If undefined, all events are removed\n * from the element.\n *\n * @param {Highcharts.EventCallbackFunction<T>} [fn]\n * The specific callback to remove. If undefined, all events that match\n * the element and optionally the type are removed.\n *\n * @return {void}\n */\n function removeEvent(el, type, fn) {\n /* eslint-enable valid-jsdoc */\n /**\n * @private\n */\n function removeOneEvent(type, fn) {\n const removeEventListener = el.removeEventListener;\n if (removeEventListener) {\n removeEventListener.call(el, type, fn, false);\n }\n }\n /**\n * @private\n */\n function removeAllEvents(eventCollection) {\n let types, len;\n if (!el.nodeName) {\n return; // Break on non-DOM events\n }\n if (type) {\n types = {};\n types[type] = true;\n }\n else {\n types = eventCollection;\n }\n objectEach(types, function (_val, n) {\n if (eventCollection[n]) {\n len = eventCollection[n].length;\n while (len--) {\n removeOneEvent(n, eventCollection[n][len].fn);\n }\n }\n });\n }\n const owner = typeof el === 'function' && el.prototype || el;\n if (Object.hasOwnProperty.call(owner, 'hcEvents')) {\n const events = owner.hcEvents;\n if (type) {\n const typeEvents = (events[type] || []);\n if (fn) {\n events[type] = typeEvents.filter(function (obj) {\n return fn !== obj.fn;\n });\n removeOneEvent(type, fn);\n }\n else {\n removeAllEvents(events);\n events[type] = [];\n }\n }\n else {\n removeAllEvents(events);\n delete owner.hcEvents;\n }\n }\n }\n /* eslint-disable valid-jsdoc */\n /**\n * Fire an event that was registered with {@link Highcharts#addEvent}.\n *\n * @function Highcharts.fireEvent<T>\n *\n * @param {T} el\n * The object to fire the event on. It can be a {@link HTMLDOMElement},\n * an {@link SVGElement} or any other object.\n *\n * @param {string} type\n * The type of event.\n *\n * @param {Highcharts.Dictionary<*>|Event} [eventArguments]\n * Custom event arguments that are passed on as an argument to the event\n * handler.\n *\n * @param {Highcharts.EventCallbackFunction<T>|Function} [defaultFunction]\n * The default function to execute if the other listeners haven't\n * returned false.\n *\n * @return {void}\n */\n function fireEvent(el, type, eventArguments, defaultFunction) {\n /* eslint-enable valid-jsdoc */\n eventArguments = eventArguments || {};\n if (doc.createEvent &&\n (el.dispatchEvent ||\n (el.fireEvent &&\n // Enable firing events on Highcharts instance.\n el !== H))) {\n const e = doc.createEvent('Events');\n e.initEvent(type, true, true);\n eventArguments = extend(e, eventArguments);\n if (el.dispatchEvent) {\n el.dispatchEvent(eventArguments);\n }\n else {\n el.fireEvent(type, eventArguments);\n }\n }\n else if (el.hcEvents) {\n if (!eventArguments.target) {\n // We're running a custom event\n extend(eventArguments, {\n // Attach a simple preventDefault function to skip\n // default handler if called. The built-in\n // defaultPrevented property is not overwritable (#5112)\n preventDefault: function () {\n eventArguments.defaultPrevented = true;\n },\n // Setting target to native events fails with clicking\n // the zoom-out button in Chrome.\n target: el,\n // If the type is not set, we're running a custom event\n // (#2297). If it is set, we're running a browser event.\n type: type\n });\n }\n const events = [];\n let object = el;\n let multilevel = false;\n // Recurse up the inheritance chain and collect hcEvents set as own\n // objects on the prototypes.\n while (object.hcEvents) {\n if (Object.hasOwnProperty.call(object, 'hcEvents') &&\n object.hcEvents[type]) {\n if (events.length) {\n multilevel = true;\n }\n events.unshift.apply(events, object.hcEvents[type]);\n }\n object = Object.getPrototypeOf(object);\n }\n // For performance reasons, only sort the event handlers in case we are\n // dealing with multiple levels in the prototype chain. Otherwise, the\n // events are already sorted in the addEvent function.\n if (multilevel) {\n // Order the calls\n events.sort((a, b) => a.order - b.order);\n }\n // Call the collected event handlers\n events.forEach((obj) => {\n // If the event handler returns false, prevent the default handler\n // from executing\n if (obj.fn.call(el, eventArguments) === false) {\n eventArguments.preventDefault();\n }\n });\n }\n // Run the default if not prevented\n if (defaultFunction && !eventArguments.defaultPrevented) {\n defaultFunction.call(el, eventArguments);\n }\n }\n let serialMode;\n /**\n * Get a unique key for using in internal element id's and pointers. The key is\n * composed of a random hash specific to this Highcharts instance, and a\n * counter.\n *\n * @example\n * let id = uniqueKey(); // => 'highcharts-x45f6hp-0'\n *\n * @function Highcharts.uniqueKey\n *\n * @return {string}\n * A unique key.\n */\n const uniqueKey = (function () {\n const hash = Math.random().toString(36).substring(2, 9) + '-';\n let id = 0;\n return function () {\n return 'highcharts-' + (serialMode ? '' : hash) + id++;\n };\n }());\n /**\n * Activates a serial mode for element IDs provided by\n * {@link Highcharts.uniqueKey}. This mode can be used in automated tests, where\n * a simple comparison of two rendered SVG graphics is needed.\n *\n * **Note:** This is only for testing purposes and will break functionality in\n * webpages with multiple charts.\n *\n * @example\n * if (\n * process &&\n * process.env.NODE_ENV === 'development'\n * ) {\n * Highcharts.useSerialIds(true);\n * }\n *\n * @function Highcharts.useSerialIds\n *\n * @param {boolean} [mode]\n * Changes the state of serial mode.\n *\n * @return {boolean|undefined}\n * State of the serial mode.\n */\n function useSerialIds(mode) {\n return (serialMode = pick(mode, serialMode));\n }\n function isFunction(obj) {\n return typeof obj === 'function';\n }\n // Register Highcharts as a plugin in jQuery\n if (win.jQuery) {\n /**\n * Highcharts-extended JQuery.\n *\n * @external JQuery\n */\n /**\n * Helper function to return the chart of the current JQuery selector\n * element.\n *\n * @function external:JQuery#highcharts\n *\n * @return {Highcharts.Chart}\n * The chart that is linked to the JQuery selector element.\n */ /**\n * Factory function to create a chart in the current JQuery selector\n * element.\n *\n * @function external:JQuery#highcharts\n *\n * @param {'Chart'|'Map'|'StockChart'|string} [className]\n * Name of the factory class in the Highcharts namespace.\n *\n * @param {Highcharts.Options} [options]\n * The chart options structure.\n *\n * @param {Highcharts.ChartCallbackFunction} [callback]\n * Function to run when the chart has loaded and all external\n * images are loaded. Defining a\n * [chart.events.load](https://api.highcharts.com/highcharts/chart.events.load)\n * handler is equivalent.\n *\n * @return {JQuery}\n * The current JQuery selector.\n */\n win.jQuery.fn.highcharts = function () {\n const args = [].slice.call(arguments);\n if (this[0]) { // `this[0]` is the renderTo div\n // Create the chart\n if (args[0]) {\n new H[ // eslint-disable-line computed-property-spacing, no-new\n // Constructor defaults to Chart\n isString(args[0]) ? args.shift() : 'Chart'](this[0], args[0], args[1]);\n return this;\n }\n // When called without parameters or with the return argument,\n // return an existing chart\n return charts[attr(this[0], 'data-highcharts-chart')];\n }\n };\n }\n /* *\n *\n * Default Export\n *\n * */\n // TODO use named exports when supported.\n const Utilities = {\n addEvent,\n arrayMax,\n arrayMin,\n attr,\n clamp,\n clearTimeout: internalClearTimeout,\n correctFloat,\n createElement,\n crisp,\n css,\n defined,\n destroyObjectProperties,\n diffObjects,\n discardElement,\n erase,\n error,\n extend,\n extendClass,\n find,\n fireEvent,\n getClosestDistance,\n getMagnitude,\n getNestedProperty,\n getStyle,\n inArray,\n insertItem,\n isArray,\n isClass,\n isDOMElement,\n isFunction,\n isNumber,\n isObject,\n isString,\n keys,\n merge,\n normalizeTickInterval,\n objectEach,\n offset,\n pad,\n pick,\n pInt,\n pushUnique,\n relativeLength,\n removeEvent,\n replaceNested,\n splat,\n stableSort,\n syncTimeout,\n timeUnits,\n uniqueKey,\n useSerialIds,\n wrap\n };\n /* *\n *\n * API Declarations\n *\n * */\n /**\n * An animation configuration. Animation configurations can also be defined as\n * booleans, where `false` turns off animation and `true` defaults to a duration\n * of 500ms and defer of 0ms.\n *\n * @interface Highcharts.AnimationOptionsObject\n */ /**\n * A callback function to execute when the animation finishes.\n * @name Highcharts.AnimationOptionsObject#complete\n * @type {Function|undefined}\n */ /**\n * The animation defer in milliseconds.\n * @name Highcharts.AnimationOptionsObject#defer\n * @type {number|undefined}\n */ /**\n * The animation duration in milliseconds.\n * @name Highcharts.AnimationOptionsObject#duration\n * @type {number|undefined}\n */ /**\n * The name of an easing function as defined on the `Math` object.\n * @name Highcharts.AnimationOptionsObject#easing\n * @type {string|Function|undefined}\n */ /**\n * A callback function to execute on each step of each attribute or CSS property\n * that's being animated. The first argument contains information about the\n * animation and progress.\n * @name Highcharts.AnimationOptionsObject#step\n * @type {Function|undefined}\n */\n /**\n * Creates a frame for the animated SVG element.\n *\n * @callback Highcharts.AnimationStepCallbackFunction\n *\n * @param {Highcharts.SVGElement} this\n * The SVG element to animate.\n *\n * @return {void}\n */\n /**\n * Interface description for a class.\n *\n * @interface Highcharts.Class<T>\n * @extends Function\n */ /**\n * Class constructor.\n * @function Highcharts.Class<T>#new\n * @param {...Array<*>} args\n * Constructor arguments.\n * @return {T}\n * Class instance.\n */\n /**\n * A style object with camel case property names to define visual appearance of\n * a SVG element or HTML element. The properties can be whatever styles are\n * supported on the given SVG or HTML element.\n *\n * @example\n * {\n * fontFamily: 'monospace',\n * fontSize: '1.2em'\n * }\n *\n * @interface Highcharts.CSSObject\n */ /**\n * @name Highcharts.CSSObject#[key:string]\n * @type {boolean|number|string|undefined}\n */ /**\n * Background style for the element.\n * @name Highcharts.CSSObject#background\n * @type {string|undefined}\n */ /**\n * Background color of the element.\n * @name Highcharts.CSSObject#backgroundColor\n * @type {Highcharts.ColorString|undefined}\n */ /**\n * Border style for the element.\n * @name Highcharts.CSSObject#border\n * @type {string|undefined}\n */ /**\n * Radius of the element border.\n * @name Highcharts.CSSObject#borderRadius\n * @type {number|undefined}\n */ /**\n * Color used in the element. The 'contrast' option is a Highcharts custom\n * property that results in black or white, depending on the background of the\n * element.\n * @name Highcharts.CSSObject#color\n * @type {'contrast'|Highcharts.ColorString|undefined}\n */ /**\n * Style of the mouse cursor when resting over the element.\n * @name Highcharts.CSSObject#cursor\n * @type {Highcharts.CursorValue|undefined}\n */ /**\n * Font family of the element text. Multiple values have to be in decreasing\n * preference order and separated by comma.\n * @name Highcharts.CSSObject#fontFamily\n * @type {string|undefined}\n */ /**\n * Font size of the element text.\n * @name Highcharts.CSSObject#fontSize\n * @type {string|undefined}\n */ /**\n * Font weight of the element text.\n * @name Highcharts.CSSObject#fontWeight\n * @type {string|undefined}\n */ /**\n * Height of the element.\n * @name Highcharts.CSSObject#height\n * @type {number|undefined}\n */ /**\n * Width of the element border.\n * @name Highcharts.CSSObject#lineWidth\n * @type {number|undefined}\n */ /**\n * Opacity of the element.\n * @name Highcharts.CSSObject#opacity\n * @type {number|undefined}\n */ /**\n * Space around the element content.\n * @name Highcharts.CSSObject#padding\n * @type {string|undefined}\n */ /**\n * Behaviour of the element when the mouse cursor rests over it.\n * @name Highcharts.CSSObject#pointerEvents\n * @type {string|undefined}\n */ /**\n * Positioning of the element.\n * @name Highcharts.CSSObject#position\n * @type {string|undefined}\n */ /**\n * Alignment of the element text.\n * @name Highcharts.CSSObject#textAlign\n * @type {string|undefined}\n */ /**\n * Additional decoration of the element text.\n * @name Highcharts.CSSObject#textDecoration\n * @type {string|undefined}\n */ /**\n * Outline style of the element text.\n * @name Highcharts.CSSObject#textOutline\n * @type {string|undefined}\n */ /**\n * Line break style of the element text. Highcharts SVG elements support\n * `ellipsis` when a `width` is set.\n * @name Highcharts.CSSObject#textOverflow\n * @type {string|undefined}\n */ /**\n * Top spacing of the element relative to the parent element.\n * @name Highcharts.CSSObject#top\n * @type {string|undefined}\n */ /**\n * Animated transition of selected element properties.\n * @name Highcharts.CSSObject#transition\n * @type {string|undefined}\n */ /**\n * Line break style of the element text.\n * @name Highcharts.CSSObject#whiteSpace\n * @type {string|undefined}\n */ /**\n * Width of the element.\n * @name Highcharts.CSSObject#width\n * @type {number|undefined}\n */\n /**\n * All possible cursor styles.\n *\n * @typedef {'alias'|'all-scroll'|'auto'|'cell'|'col-resize'|'context-menu'|'copy'|'crosshair'|'default'|'e-resize'|'ew-resize'|'grab'|'grabbing'|'help'|'move'|'n-resize'|'ne-resize'|'nesw-resize'|'no-drop'|'none'|'not-allowed'|'ns-resize'|'nw-resize'|'nwse-resize'|'pointer'|'progress'|'row-resize'|'s-resize'|'se-resize'|'sw-resize'|'text'|'vertical-text'|'w-resize'|'wait'|'zoom-in'|'zoom-out'} Highcharts.CursorValue\n */\n /**\n * All possible dash styles.\n *\n * @typedef {'Dash'|'DashDot'|'Dot'|'LongDash'|'LongDashDot'|'LongDashDotDot'|'ShortDash'|'ShortDashDot'|'ShortDashDotDot'|'ShortDot'|'Solid'} Highcharts.DashStyleValue\n */\n /**\n * Generic dictionary in TypeScript notation.\n * Use the native `AnyRecord` instead.\n *\n * @deprecated\n * @interface Highcharts.Dictionary<T>\n */ /**\n * @name Highcharts.Dictionary<T>#[key:string]\n * @type {T}\n */\n /**\n * The function callback to execute when the event is fired. The `this` context\n * contains the instance, that fired the event.\n *\n * @callback Highcharts.EventCallbackFunction<T>\n *\n * @param {T} this\n *\n * @param {Highcharts.Dictionary<*>|Event} [eventArguments]\n * Event arguments.\n *\n * @return {boolean|void}\n */\n /**\n * The event options for adding function callback.\n *\n * @interface Highcharts.EventOptionsObject\n */ /**\n * The order the event handler should be called. This opens for having one\n * handler be called before another, independent of in which order they were\n * added.\n * @name Highcharts.EventOptionsObject#order\n * @type {number}\n */ /**\n * Whether an event should be passive or not.\n * When set to `true`, the function specified by listener will never call\n * `preventDefault()`.\n * @name Highcharts.EventOptionsObject#passive\n * @type boolean\n */\n /**\n * Formats data as a string. Usually the data is accessible through the `this`\n * keyword.\n *\n * @callback Highcharts.FormatterCallbackFunction<T>\n *\n * @param {T} this\n * Context to format\n *\n * @return {string}\n * Formatted text\n */\n /**\n * An object of key-value pairs for HTML attributes.\n *\n * @typedef {Highcharts.Dictionary<boolean|number|string|Function>} Highcharts.HTMLAttributes\n */\n /**\n * An HTML DOM element. The type is a reference to the regular HTMLElement in\n * the global scope.\n *\n * @typedef {global.HTMLElement} Highcharts.HTMLDOMElement\n *\n * @see https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement\n */\n /**\n * The iterator callback.\n *\n * @callback Highcharts.ObjectEachCallbackFunction<T>\n *\n * @param {T} this\n * The context.\n *\n * @param {*} value\n * The property value.\n *\n * @param {string} key\n * The property key.\n *\n * @param {*} obj\n * The object that objectEach is being applied to.\n */\n /**\n * An object containing `left` and `top` properties for the position in the\n * page.\n *\n * @interface Highcharts.OffsetObject\n */ /**\n * Left distance to the page border.\n * @name Highcharts.OffsetObject#left\n * @type {number}\n */ /**\n * Top distance to the page border.\n * @name Highcharts.OffsetObject#top\n * @type {number}\n */\n /**\n * Describes a range.\n *\n * @interface Highcharts.RangeObject\n */ /**\n * Maximum number of the range.\n * @name Highcharts.RangeObject#max\n * @type {number}\n */ /**\n * Minimum number of the range.\n * @name Highcharts.RangeObject#min\n * @type {number}\n */\n /**\n * If a number is given, it defines the pixel length. If a percentage string is\n * given, like for example `'50%'`, the setting defines a length relative to a\n * base size, for example the size of a container.\n *\n * @typedef {number|string} Highcharts.RelativeSize\n */\n /**\n * Proceed function to call original (wrapped) function.\n *\n * @callback Highcharts.WrapProceedFunction\n *\n * @param {*} [arg1]\n * Optional argument. Without any arguments defaults to first argument of\n * the wrapping function.\n *\n * @param {*} [arg2]\n * Optional argument. Without any arguments defaults to second argument\n * of the wrapping function.\n *\n * @param {*} [arg3]\n * Optional argument. Without any arguments defaults to third argument of\n * the wrapping function.\n *\n * @return {*}\n * Return value of the original function.\n */\n /**\n * The Highcharts object is the placeholder for all other members, and various\n * utility functions. The most important member of the namespace would be the\n * chart constructor.\n *\n * @example\n * let chart = Highcharts.chart('container', { ... });\n *\n * @namespace Highcharts\n */\n ''; // Detach doclets above\n\n return Utilities;\n });\n _registerModule(_modules, 'Core/Renderer/HTML/AST.js', [_modules['Core/Globals.js'], _modules['Core/Utilities.js']], function (H, U) {\n /* *\n *\n * (c) 2010-2024 Torstein Honsi\n *\n * License: www.highcharts.com/license\n *\n * !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!\n *\n * */\n const { SVG_NS, win } = H;\n const { attr, createElement, css, error, isFunction, isString, objectEach, splat } = U;\n const { trustedTypes } = win;\n /* *\n *\n * Constants\n *\n * */\n // Create the trusted type policy. This should not be exposed.\n const trustedTypesPolicy = (trustedTypes &&\n isFunction(trustedTypes.createPolicy) &&\n trustedTypes.createPolicy('highcharts', {\n createHTML: (s) => s\n }));\n const emptyHTML = trustedTypesPolicy ?\n trustedTypesPolicy.createHTML('') :\n '';\n /* *\n *\n * Class\n *\n * */\n /**\n * The AST class represents an abstract syntax tree of HTML or SVG content. It\n * can take HTML as an argument, parse it, optionally transform it to SVG, then\n * perform sanitation before inserting it into the DOM.\n *\n * @class\n * @name Highcharts.AST\n *\n * @param {string|Array<Highcharts.ASTNode>} source\n * Either an HTML string or an ASTNode list to populate the tree.\n */\n class AST {\n /* *\n *\n * Static Functions\n *\n * */\n /**\n * Filter an object of SVG or HTML attributes against the allow list.\n *\n * @static\n *\n * @function Highcharts.AST#filterUserAttributes\n *\n * @param {Highcharts.SVGAttributes} attributes The attributes to filter\n *\n * @return {Highcharts.SVGAttributes}\n * The filtered attributes\n */\n static filterUserAttributes(attributes) {\n objectEach(attributes, (val, key) => {\n let valid = true;\n if (AST.allowedAttributes.indexOf(key) === -1) {\n valid = false;\n }\n if (['background', 'dynsrc', 'href', 'lowsrc', 'src']\n .indexOf(key) !== -1) {\n valid = isString(val) && AST.allowedReferences.some((ref) => val.indexOf(ref) === 0);\n }\n if (!valid) {\n error(33, false, void 0, {\n 'Invalid attribute in config': `${key}`\n });\n delete attributes[key];\n }\n // #17753, < is not allowed in SVG attributes\n if (isString(val) && attributes[key]) {\n attributes[key] = val.replace(/</g, '<');\n }\n });\n return attributes;\n }\n static parseStyle(style) {\n return style\n .split(';')\n .reduce((styles, line) => {\n const pair = line.split(':').map((s) => s.trim()), key = pair.shift();\n if (key && pair.length) {\n styles[key.replace(/-([a-z])/g, (g) => g[1].toUpperCase())] = pair.join(':'); // #17146\n }\n return styles;\n }, {});\n }\n /**\n * Utility function to set html content for an element by passing in a\n * markup string. The markup is safely parsed by the AST class to avoid\n * XSS vulnerabilities. This function should be used instead of setting\n * `innerHTML` in all cases where the content is not fully trusted.\n *\n * @static\n * @function Highcharts.AST#setElementHTML\n *\n * @param {SVGDOMElement|HTMLDOMElement} el\n * Node to set content of.\n *\n * @param {string} html\n * Markup string\n */\n static setElementHTML(el, html) {\n el.innerHTML = AST.emptyHTML; // Clear previous\n if (html) {\n const ast = new AST(html);\n ast.addToDOM(el);\n }\n }\n /* *\n *\n * Constructor\n *\n * */\n // Construct an AST from HTML markup, or wrap an array of existing AST nodes\n constructor(source) {\n this.nodes = typeof source === 'string' ?\n this.parseMarkup(source) : source;\n }\n /* *\n *\n * Functions\n *\n * */\n /**\n * Add the tree defined as a hierarchical JS structure to the DOM\n *\n * @function Highcharts.AST#addToDOM\n *\n * @param {Highcharts.HTMLDOMElement|Highcharts.SVGDOMElement} parent\n * The node where it should be added\n *\n * @return {Highcharts.HTMLDOMElement|Highcharts.SVGDOMElement}\n * The inserted node.\n */\n addToDOM(parent) {\n /**\n * @private\n * @param {Highcharts.ASTNode} subtree\n * HTML/SVG definition\n * @param {Element} [subParent]\n * parent node\n * @return {Highcharts.SVGDOMElement|Highcharts.HTMLDOMElement}\n * The inserted node.\n */\n function recurse(subtree, subParent) {\n let ret;\n splat(subtree).forEach(function (item) {\n const tagName = item.tagName;\n const textNode = item.textContent ?\n H.doc.createTextNode(item.textContent) :\n void 0;\n // Whether to ignore the AST filtering totally, #15345\n const bypassHTMLFiltering = AST.bypassHTMLFiltering;\n let node;\n if (tagName) {\n if (tagName === '#text') {\n node = textNode;\n }\n else if (AST.allowedTags.indexOf(tagName) !== -1 ||\n bypassHTMLFiltering) {\n const NS = tagName === 'svg' ?\n SVG_NS :\n (subParent.namespaceURI || SVG_NS);\n const element = H.doc.createElementNS(NS, tagName);\n const attributes = item.attributes || {};\n // Apply attributes from root of AST node, legacy from\n // from before TextBuilder\n objectEach(item, function (val, key) {\n if (key !== 'tagName' &&\n key !== 'attributes' &&\n key !== 'children' &&\n key !== 'style' &&\n key !== 'textContent') {\n attributes[key] = val;\n }\n });\n attr(element, bypassHTMLFiltering ?\n attributes :\n AST.filterUserAttributes(attributes));\n if (item.style) {\n css(element, item.style);\n }\n // Add text content\n if (textNode) {\n element.appendChild(textNode);\n }\n // Recurse\n recurse(item.children || [], element);\n node = element;\n }\n else {\n error(33, false, void 0, {\n 'Invalid tagName in config': tagName\n });\n }\n }\n // Add to the tree\n if (node) {\n subParent.appendChild(node);\n }\n ret = node;\n });\n // Return last node added (on top level it's the only one)\n return ret;\n }\n return recurse(this.nodes, parent);\n }\n /**\n * Parse HTML/SVG markup into AST Node objects. Used internally from the\n * constructor.\n *\n * @private\n *\n * @function Highcharts.AST#getNodesFromMarkup\n *\n * @param {string} markup The markup string.\n *\n * @return {Array<Highcharts.ASTNode>} The parsed nodes.\n */\n parseMarkup(markup) {\n const nodes = [];\n markup = markup\n .trim()\n // The style attribute throws a warning when parsing when CSP is\n // enabled (#6884), so use an alias and pick it up below\n // Make all quotation marks parse correctly to DOM (#17627)\n .replace(/ style=([\"'])/g, ' data-style=$1');\n let doc;\n try {\n doc = new DOMParser().parseFromString(trustedTypesPolicy ?\n trustedTypesPolicy.createHTML(markup) :\n markup, 'text/html');\n }\n catch (e) {\n // There are two cases where this fails:\n // 1. IE9 and PhantomJS, where the DOMParser only supports parsing\n // XML\n // 2. Due to a Chromium issue where chart redraws are triggered by\n // a `beforeprint` event (#16931),\n // https://issues.chromium.org/issues/40222135\n }\n if (!doc) {\n const body = createElement('div');\n body.innerHTML = markup;\n doc = { body };\n }\n const appendChildNodes = (node, addTo) => {\n const tagName = node.nodeName.toLowerCase();\n // Add allowed tags\n const astNode = {\n tagName\n };\n if (tagName === '#text') {\n astNode.textContent = node.textContent || '';\n }\n const parsedAttributes = node.attributes;\n // Add attributes\n if (parsedAttributes) {\n const attributes = {};\n [].forEach.call(parsedAttributes, (attrib) => {\n if (attrib.name === 'data-style') {\n astNode.style = AST.parseStyle(attrib.value);\n }\n else {\n attributes[attrib.name] = attrib.value;\n }\n });\n astNode.attributes = attributes;\n }\n // Handle children\n if (node.childNodes.length) {\n const children = [];\n [].forEach.call(node.childNodes, (childNode) => {\n appendChildNodes(childNode, children);\n });\n if (children.length) {\n astNode.children = children;\n }\n }\n addTo.push(astNode);\n };\n [].forEach.call(doc.body.childNodes, (childNode) => appendChildNodes(childNode, nodes));\n return nodes;\n }\n }\n /* *\n *\n * Static Properties\n *\n * */\n /**\n * The list of allowed SVG or HTML attributes, used for sanitizing\n * potentially harmful content from the chart configuration before adding to\n * the DOM.\n *\n * @see [Source code with default values](\n * https://github.com/highcharts/highcharts/blob/master/ts/Core/Renderer/HTML/AST.ts#:~:text=public%20static%20allowedAttributes)\n *\n * @example\n * // Allow a custom, trusted attribute\n * Highcharts.AST.allowedAttributes.push('data-value');\n *\n * @name Highcharts.AST.allowedAttributes\n * @type {Array<string>}\n */\n AST.allowedAttributes = [\n 'alt',\n 'aria-controls',\n 'aria-describedby',\n 'aria-expanded',\n 'aria-haspopup',\n 'aria-hidden',\n 'aria-label',\n 'aria-labelledby',\n 'aria-live',\n 'aria-pressed',\n 'aria-readonly',\n 'aria-roledescription',\n 'aria-selected',\n 'class',\n 'clip-path',\n 'color',\n 'colspan',\n 'cx',\n 'cy',\n 'd',\n 'dx',\n 'dy',\n 'disabled',\n 'fill',\n 'filterUnits',\n 'flood-color',\n 'flood-opacity',\n 'height',\n 'href',\n 'id',\n 'in',\n 'in2',\n 'markerHeight',\n 'markerWidth',\n 'offset',\n 'opacity',\n 'operator',\n 'orient',\n 'padding',\n 'paddingLeft',\n 'paddingRight',\n 'patternUnits',\n 'r',\n 'radius',\n 'refX',\n 'refY',\n 'role',\n 'scope',\n 'slope',\n 'src',\n 'startOffset',\n 'stdDeviation',\n 'stroke',\n 'stroke-linecap',\n 'stroke-width',\n 'style',\n 'tableValues',\n 'result',\n 'rowspan',\n 'summary',\n 'target',\n 'tabindex',\n 'text-align',\n 'text-anchor',\n 'textAnchor',\n 'textLength',\n 'title',\n 'type',\n 'valign',\n 'width',\n 'x',\n 'x1',\n 'x2',\n 'xlink:href',\n 'y',\n 'y1',\n 'y2',\n 'zIndex'\n ];\n /**\n * The list of allowed references for referring attributes like `href` and\n * `src`. Attribute values will only be allowed if they start with one of\n * these strings.\n *\n * @see [Source code with default values](\n * https://github.com/highcharts/highcharts/blob/master/ts/Core/Renderer/HTML/AST.ts#:~:text=public%20static%20allowedReferences)\n *\n * @example\n * // Allow tel:\n * Highcharts.AST.allowedReferences.push('tel:');\n *\n * @name Highcharts.AST.allowedReferences\n * @type {Array<string>}\n */\n AST.allowedReferences = [\n 'https://',\n 'http://',\n 'mailto:',\n '/',\n '../',\n './',\n '#'\n ];\n /**\n * The list of allowed SVG or HTML tags, used for sanitizing potentially\n * harmful content from the chart configuration before adding to the DOM.\n *\n * @see [Source code with default values](\n * https://github.com/highcharts/highcharts/blob/master/ts/Core/Renderer/HTML/AST.ts#:~:text=public%20static%20allowedTags)\n *\n * @example\n * // Allow a custom, trusted tag\n * Highcharts.AST.allowedTags.push('blink'); // ;)\n *\n * @name Highcharts.AST.allowedTags\n * @type {Array<string>}\n */\n AST.allowedTags = [\n 'a',\n 'abbr',\n 'b',\n 'br',\n 'button',\n 'caption',\n 'circle',\n 'clipPath',\n 'code',\n 'dd',\n 'defs',\n 'div',\n 'dl',\n 'dt',\n 'em',\n 'feComponentTransfer',\n 'feComposite',\n 'feDropShadow',\n 'feFlood',\n 'feFuncA',\n 'feFuncB',\n 'feFuncG',\n 'feFuncR',\n 'feGaussianBlur',\n 'feMorphology',\n 'feOffset',\n 'feMerge',\n 'feMergeNode',\n 'filter',\n 'h1',\n 'h2',\n 'h3',\n 'h4',\n 'h5',\n 'h6',\n 'hr',\n 'i',\n 'img',\n 'li',\n 'linearGradient',\n 'marker',\n 'ol',\n 'p',\n 'path',\n 'pattern',\n 'pre',\n 'rect',\n 'small',\n 'span',\n 'stop',\n 'strong',\n 'style',\n 'sub',\n 'sup',\n 'svg',\n 'table',\n 'text',\n 'textPath',\n 'thead',\n 'title',\n 'tbody',\n 'tspan',\n 'td',\n 'th',\n 'tr',\n 'u',\n 'ul',\n '#text'\n ];\n AST.emptyHTML = emptyHTML;\n /**\n * Allow all custom SVG and HTML attributes, references and tags (together\n * with potentially harmful ones) to be added to the DOM from the chart\n * configuration. In other words, disable the allow-listing which is the\n * primary functionality of the AST.\n *\n * WARNING: Setting this property to `true` while allowing untrusted user\n * data in the chart configuration will expose your application to XSS\n * security risks!\n *\n * Note that in case you want to allow a known set of tags or attributes,\n * you should allow-list them instead of disabling the filtering totally.\n * See [allowedAttributes](Highcharts.AST#.allowedAttributes),\n * [allowedReferences](Highcharts.AST#.allowedReferences) and\n * [allowedTags](Highcharts.AST#.allowedTags). The `bypassHTMLFiltering`\n * setting is intended only for those cases where allow-listing is not\n * practical, and the chart configuration already comes from a secure\n * source.\n *\n * @example\n * // Allow all custom attributes, references and tags (disable DOM XSS\n * // filtering)\n * Highcharts.AST.bypassHTMLFiltering = true;\n *\n * @name Highcharts.AST.bypassHTMLFiltering\n * @static\n */\n AST.bypassHTMLFiltering = false;\n /* *\n *\n * Default Export\n *\n * */\n /* *\n *\n * API Declarations\n *\n * */\n /**\n * Serialized form of an SVG/HTML definition, including children.\n *\n * @interface Highcharts.ASTNode\n */ /**\n * @name Highcharts.ASTNode#attributes\n * @type {Highcharts.SVGAttributes|undefined}\n */ /**\n * @name Highcharts.ASTNode#children\n * @type {Array<Highcharts.ASTNode>|undefined}\n */ /**\n * @name Highcharts.ASTNode#tagName\n * @type {string|undefined}\n */ /**\n * @name Highcharts.ASTNode#textContent\n * @type {string|undefined}\n */\n (''); // Keeps doclets above in file\n\n return AST;\n });\n _registerModule(_modules, 'Data/Modifiers/DataModifier.js', [_modules['Core/Utilities.js']], function (U) {\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 const { addEvent, fireEvent, merge } = U;\n /* *\n *\n * Class\n *\n * */\n /**\n * Abstract class to provide an interface for modifying a table.\n *\n */\n class 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\n return DataModifier;\n });\n _registerModule(_modules, 'Data/DataTable.js', [_modules['Core/Utilities.js']], function (U) {\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 const { addEvent, defined, fireEvent, uniqueKey } = U;\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 */\n class DataTable {\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 /**\n * Constructs an instance of the DataTable class.\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 identification 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 const columns = options.columns || {}, columnNames = Object.keys(columns), thisColumns = this.columns;\n let rowCount = 0;\n for (let i = 0, iEnd = columnNames.length, column, columnName; i < iEnd; ++i) {\n columnName = columnNames[i];\n column = columns[columnName].slice();\n thisColumns[columnName] = column;\n rowCount = Math.max(rowCount, column.length);\n }\n for (let i = 0, iEnd = columnNames.length; i < iEnd; ++i) {\n thisColumns[columnNames[i]].length = rowCount;\n }\n this.rowCount = rowCount;\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 const table = this;\n switch (e.type) {\n case 'afterDeleteColumns':\n case 'afterDeleteRows':\n case 'afterSetCell':\n case 'afterSetColumns':\n case 'afterSetRows':\n table.versionTag = uniqueKey();\n break;\n default:\n }\n fireEvent(table, 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 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 a column. Will insert a new column, if not found.\n *\n * @function Highcharts.DataTable#setColumn\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 {Highcharts.DataTableEventDetail} [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.\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, reset = (typeof rowIndex === 'undefined'), columnNames = Object.keys(columns);\n table.emit({\n type: 'setColumns',\n columns,\n columnNames,\n detail: eventDetail,\n rowIndex\n });\n for (let i = 0, iEnd = columnNames.length, column, columnName; i < iEnd; ++i) {\n columnName = columnNames[i];\n column = columns[columnName];\n if (reset) {\n tableColumns[columnName] = column.slice();\n table.rowCount = column.length;\n }\n else {\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 table.rowCount = Math.max(table.rowCount, tableColumn.length);\n }\n }\n const tableColumnNames = Object.keys(tableColumns);\n for (let i = 0, iEnd = tableColumnNames.length; i < iEnd; ++i) {\n tableColumns[tableColumnNames[i]].length = table.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 {Highcharts.DataTableEventDetail} [eventDetail]\n * Custom information for pending events.\n *\n * @emits #setRows\n * @emits #afterSetRows\n */\n setRow(row, rowIndex, eventDetail) {\n this.setRows([row], rowIndex, 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 {Highcharts.DataTableEventDetail} [eventDetail]\n * Custom information for pending events.\n *\n * @emits #setRows\n * @emits #afterSetRows\n */\n setRows(rows, rowIndex = this.rowCount, 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 columns[columnNames[j]][i2] = null;\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 const rowColumnNames = Object.keys(row);\n for (let j = 0, jEnd = rowColumnNames.length, rowColumnName; j < jEnd; ++j) {\n rowColumnName = rowColumnNames[j];\n if (!columns[rowColumnName]) {\n columns[rowColumnName] = new Array(i2 + 1);\n }\n columns[rowColumnName][i2] = row[rowColumnName];\n }\n }\n }\n const indexRowCount = (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 */\n DataTable.NULL = {};\n /**\n * Semantic version string of the DataTable class.\n * @internal\n */\n DataTable.version = '1.0.0';\n /* *\n *\n * Default Export\n *\n * */\n\n return DataTable;\n });\n _registerModule(_modules, 'Data/Connectors/DataConnector.js', [_modules['Data/Modifiers/DataModifier.js'], _modules['Data/DataTable.js'], _modules['Core/Utilities.js']], function (DataModifier, DataTable, U) {\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 const { addEvent, fireEvent, merge, pick } = U;\n /* *\n *\n * Class\n *\n * */\n /**\n * Abstract class providing an interface for managing a DataConnector.\n *\n * @private\n */\n class 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 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] = 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 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 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 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 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 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\n return DataConnector;\n });\n _registerModule(_modules, 'Data/Converters/DataConverter.js', [_modules['Data/DataTable.js'], _modules['Core/Utilities.js']], function (DataTable, U) {\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 *\n * */\n const { addEvent, fireEvent, isNumber, merge } = U;\n /* *\n *\n * Class\n *\n * */\n /**\n * Base class providing an interface and basic methods for a DataConverter\n *\n * @private\n */\n class 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 = 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 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 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 */\n DataConverter.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 * Functions\n *\n * */\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 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\n return DataConverter;\n });\n _registerModule(_modules, 'Data/DataCursor.js', [], function () {\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 * 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 */\n class 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 */\n DataCursor.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\n return DataCursor;\n });\n _registerModule(_modules, 'DataGrid/Globals.js', [], function () {\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 * - Dawid Dragula\n * - Sebastian Bochan\n *\n * */\n /* *\n *\n * Imports\n *\n * */\n /* *\n *\n * Namespace\n *\n * */\n /**\n * Global DataGrid namespace.\n *\n * @namespace DataGrid\n */\n var Globals;\n (function (Globals) {\n /* *\n *\n * Declarations\n *\n * */\n /* *\n *\n * Constants\n *\n * */\n Globals.classNamePrefix = 'highcharts-datagrid-';\n Globals.classNames = {\n container: Globals.classNamePrefix + 'container',\n tableElement: Globals.classNamePrefix + 'table',\n captionElement: Globals.classNamePrefix + 'caption',\n theadElement: Globals.classNamePrefix + 'thead',\n tbodyElement: Globals.classNamePrefix + 'tbody',\n rowElement: Globals.classNamePrefix + 'row',\n rowOdd: Globals.classNamePrefix + 'row-odd',\n hoveredRow: Globals.classNamePrefix + 'hovered-row',\n columnElement: Globals.classNamePrefix + 'column',\n hoveredCell: Globals.classNamePrefix + 'hovered-cell',\n hoveredColumn: Globals.classNamePrefix + 'hovered-column',\n editedCell: Globals.classNamePrefix + 'edited-cell',\n rowsContentNowrap: Globals.classNamePrefix + 'rows-content-nowrap',\n headerCell: Globals.classNamePrefix + 'header-cell',\n headerCellContent: Globals.classNamePrefix + 'header-cell-content',\n headerCellResized: Globals.classNamePrefix + 'header-cell-resized',\n headerRow: Globals.classNamePrefix + 'head-row-content',\n noData: Globals.classNamePrefix + 'no-data',\n columnFirst: Globals.classNamePrefix + 'column-first',\n columnSortable: Globals.classNamePrefix + 'column-sortable',\n columnSortedAsc: Globals.classNamePrefix + 'column-sorted-asc',\n columnSortedDesc: Globals.classNamePrefix + 'column-sorted-desc',\n resizerHandles: Globals.classNamePrefix + 'column-resizer',\n resizedColumn: Globals.classNamePrefix + 'column-resized',\n creditsContainer: Globals.classNamePrefix + 'credits-container',\n creditsText: Globals.classNamePrefix + 'credits'\n };\n Globals.win = window;\n Globals.userAgent = (Globals.win.navigator && Globals.win.navigator.userAgent) || '';\n Globals.isChrome = Globals.userAgent.indexOf('Chrome') !== -1;\n Globals.isSafari = !Globals.isChrome && Globals.userAgent.indexOf('Safari') !== -1;\n })(Globals || (Globals = {}));\n /* *\n *\n * Default Export\n *\n * */\n\n return Globals;\n });\n _registerModule(_modules, 'DataGrid/Utils.js', [], function () {\n /* *\n *\n * Data Grid utilities\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 * - Dawid Dragula\n *\n * */\n /* *\n *\n * Namespace\n *\n * */\n var DataGridUtils;\n (function (DataGridUtils) {\n /* *\n *\n * Functions\n *\n * */\n /* *\n *\n * Functions\n *\n * */\n /**\n * Creates a HTML element with the provided options.\n *\n * @param tagName\n * The tag name of the element.\n *\n * @param params\n * The parameters of the element.\n *\n * @param parent\n * The parent element.\n */\n function makeHTMLElement(tagName, params, parent) {\n const element = document.createElement(tagName);\n if (params) {\n const paramsKeys = Object.keys(params);\n for (let i = 0; i < paramsKeys.length; i++) {\n const key = paramsKeys[i];\n const value = params[key];\n if (value !== void 0) {\n if (key === 'style') {\n Object.assign(element.style, value);\n }\n else {\n element[key] = value;\n }\n }\n }\n }\n if (parent) {\n parent.appendChild(element);\n }\n return element;\n }\n DataGridUtils.makeHTMLElement = makeHTMLElement;\n /**\n * Creates a div element with the provided class name and id.\n *\n * @param className\n * The class name of the div.\n *\n * @param id\n * The id of the element.\n */\n function makeDiv(className, id) {\n return makeHTMLElement('div', { className, id });\n }\n DataGridUtils.makeDiv = makeDiv;\n /**\n * Gets the translateY value of an element.\n *\n * @param element\n * The element to get the translateY value from.\n *\n * @returns The translateY value of the element.\n */\n function getTranslateY(element) {\n const transform = element.style.transform;\n if (transform) {\n const match = transform.match(/translateY\\(([^)]+)\\)/);\n if (match) {\n return parseFloat(match[1]);\n }\n }\n return 0;\n }\n DataGridUtils.getTranslateY = getTranslateY;\n /**\n * Check if there's a possibility that the given string is an HTML\n * (contains '<').\n *\n * @param str\n * Text to verify.\n */\n function isHTML(str) {\n return str.indexOf('<') !== -1;\n }\n DataGridUtils.isHTML = isHTML;\n /**\n * Returns a string containing plain text format by removing HTML tags\n *\n * @param text\n * String to be sanitized\n *\n * @returns\n * Sanitized plain text string\n */\n function sanitizeText(text) {\n try {\n return new DOMParser().parseFromString(text, 'text/html')\n .body.textContent || '';\n }\n catch (error) {\n return '';\n }\n }\n DataGridUtils.sanitizeText = sanitizeText;\n })(DataGridUtils || (DataGridUtils = {}));\n /* *\n *\n * Default Export\n *\n * */\n\n return DataGridUtils;\n });\n _registerModule(_modules, 'DataGrid/Credits.js', [_modules['DataGrid/Globals.js'], _modules['DataGrid/Utils.js']], function (Globals, DGUtils) {\n /* *\n *\n * Data Grid Credits class\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 * - Dawid Dragula\n *\n * */\n const { makeHTMLElement } = DGUtils;\n /* *\n *\n * Abstract Class of Row\n *\n * */\n /**\n * Represents a credits in the data grid.\n */\n class Credits {\n /* *\n *\n * Constructor\n *\n * */\n /**\n * Construct the credits.\n *\n * @param dataGrid\n * The Data Grid Table instance which the credits belong to.\n */\n constructor(dataGrid) {\n this.dataGrid = dataGrid;\n this.options = dataGrid.options?.credits ?? {};\n this.containerElement = makeHTMLElement('div', {\n className: Globals.classNames.creditsContainer\n });\n this.textElement = makeHTMLElement('a', {\n className: Globals.classNames.creditsText\n }, this.containerElement);\n this.textElement.setAttribute('target', '_top');\n this.render();\n }\n /* *\n *\n * Methods\n *\n * */\n /**\n * Set the content of the credits.\n */\n setContent() {\n const { text, href } = this.options;\n this.textElement.innerText = text || '';\n this.textElement.setAttribute('href', href || '');\n }\n /**\n * Append the credits to the container. The position of the credits is\n * determined by the `position` option.\n */\n appendToContainer() {\n const { position } = this.options;\n if (position === 'top') {\n // Append the credits to the top of the table.\n this.dataGrid.contentWrapper?.prepend(this.containerElement);\n return;\n }\n // Append the credits to the bottom of the table.\n this.dataGrid.contentWrapper?.appendChild(this.containerElement);\n }\n /**\n * Update the credits with new options.\n *\n * @param options\n * The new options for the credits.\n *\n * @param render\n * Whether to render the credits after the update.\n */\n update(options, render = true) {\n if (options) {\n this.dataGrid.update({\n credits: options\n }, false);\n this.options = this.dataGrid.options?.credits ?? {};\n }\n if (render) {\n this.render();\n }\n }\n /**\n * Render the credits. If the credits are disabled, they will be removed\n * from the container. If also reflows the viewport dimensions.\n */\n render() {\n const enabled = this.options.enabled ?? false;\n this.containerElement.remove();\n if (enabled) {\n this.setContent();\n this.appendToContainer();\n }\n else {\n this.destroy();\n }\n this.dataGrid.viewport?.reflow();\n }\n /**\n * Get the height of the credits container.\n */\n getHeight() {\n return this.containerElement.offsetHeight;\n }\n /**\n * Destroy the credits. The credits will be removed from the container and\n * the reference to the credits will be deleted from the DataGrid instance\n * it belongs to.\n */\n destroy() {\n this.containerElement.remove();\n delete this.dataGrid.credits;\n }\n }\n /* *\n *\n * Default Export\n *\n * */\n\n return Credits;\n });\n _registerModule(_modules, 'DataGrid/DefaultOptions.js', [], function () {\n /* *\n *\n * Data Grid default options\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 * - Dawid Dragula\n * - Sebastian Bochan\n *\n * */\n /* *\n *\n * API Options\n *\n * */\n const DefaultOptions = {\n rendering: {\n columns: {\n distribution: 'full'\n },\n rows: {\n bufferSize: 10,\n strictHeights: false\n },\n header: {\n enabled: true\n }\n },\n credits: {\n enabled: true,\n text: 'Highcharts.com',\n href: 'https://www.highcharts.com?credits',\n position: 'bottom'\n },\n columnDefaults: {\n sorting: {\n sortable: true\n },\n resizing: true\n }\n };\n /* *\n *\n * Default Export\n *\n * */\n\n return DefaultOptions;\n });\n _registerModule(_modules, 'Core/Chart/ChartDefaults.js', [], function () {\n /* *\n *\n * (c) 2010-2024 Torstein Honsi\n *\n * License: www.highcharts.com/license\n *\n * !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!\n *\n * */\n /* *\n *\n * API Options\n *\n * */\n /**\n * General options for the chart.\n *\n * @optionparent chart\n */\n const ChartDefaults = {\n /**\n * Default `mapData` for all series, in terms of a GeoJSON or TopoJSON\n * object. If set to a string, it functions as an index into the\n * `Highcharts.maps` array.\n *\n * For picking out individual shapes and geometries to use for each series\n * of the map, see [series.mapData](#series.map.mapData).\n *\n * @sample maps/demo/geojson\n * Loading GeoJSON data\n * @sample maps/chart/topojson\n * Loading TopoJSON data\n *\n * @type {string|Array<*>|Highcharts.GeoJSON|Highcharts.TopoJSON}\n * @since 5.0.0\n * @product highmaps\n * @apioption chart.map\n */\n /**\n * Set lat/lon transformation definitions for the chart. If not defined,\n * these are extracted from the map data.\n *\n * @type {*}\n * @since 5.0.0\n * @product highmaps\n * @apioption chart.mapTransforms\n */\n /**\n * When using multiple axes, the ticks of two or more opposite axes\n * will automatically be aligned by adding ticks to the axis or axes\n * with the least ticks, as if `tickAmount` were specified.\n *\n * This can be prevented by setting `alignTicks` to false. If the grid\n * lines look messy, it's a good idea to hide them for the secondary\n * axis by setting `gridLineWidth` to 0.\n *\n * If `startOnTick` or `endOnTick` in the axis options are set to false,\n * then the `alignTicks ` will be disabled for the axis.\n *\n * Disabled for logarithmic axes.\n *\n * @sample {highcharts} highcharts/chart/alignticks-true/\n * True by default\n * @sample {highcharts} highcharts/chart/alignticks-false/\n * False\n * @sample {highstock} stock/chart/alignticks-true/\n * True by default\n * @sample {highstock} stock/chart/alignticks-false/\n * False\n *\n * @type {boolean}\n * @default true\n * @product highcharts highstock gantt\n * @apioption chart.alignTicks\n */\n /**\n * When using multiple axes, align the thresholds. When this is true, other\n * ticks will also be aligned.\n *\n * Note that for line series and some other series types, the `threshold`\n * option is set to `null` by default. This will in turn cause their y-axis\n * to not have a threshold. In order to avoid that, set the series\n * `threshold` to 0 or another number.\n *\n * If `startOnTick` or `endOnTick` in the axis options are set to false, or\n * if the axis is logarithmic, the threshold will not be aligned.\n *\n * @sample {highcharts} highcharts/chart/alignthresholds/ Set to true\n *\n * @since 10.0.0\n * @product highcharts highstock gantt\n * @apioption chart.alignThresholds\n */\n alignThresholds: false,\n /**\n * Set the overall animation for all chart updating. Animation can be\n * disabled throughout the chart by setting it to false here. It can\n * be overridden for each individual API method as a function parameter.\n * The only animation not affected by this option is the initial series\n * animation, see [plotOptions.series.animation](\n * #plotOptions.series.animation).\n *\n * The animation can either be set as a boolean or a configuration\n * object. If `true`, it will use the 'swing' jQuery easing and a\n * duration of 500 ms. If used as a configuration object, the following\n * properties are supported:\n *\n * - `defer`: The animation delay time in milliseconds.\n *\n * - `duration`: The duration of the animation in milliseconds.\n *\n * - `easing`: A string reference to an easing function set on the\n * `Math` object. See\n * [the easing demo](https://jsfiddle.net/gh/get/library/pure/highcharts/highcharts/tree/master/samples/highcharts/plotoptions/series-animation-easing/).\n *\n * When zooming on a series with less than 100 points, the chart redraw\n * will be done with animation, but in case of more data points, it is\n * necessary to set this option to ensure animation on zoom.\n *\n * @sample {highcharts} highcharts/chart/animation-none/\n * Updating with no animation\n * @sample {highcharts} highcharts/chart/animation-duration/\n * With a longer duration\n * @sample {highcharts} highcharts/chart/animation-easing/\n * With a jQuery UI easing\n * @sample {highmaps} maps/chart/animation-none/\n * Updating with no animation\n * @sample {highmaps} maps/chart/animation-duration/\n * With a longer duration\n *\n * @type {boolean|Partial<Highcharts.AnimationOptionsObject>}\n * @default true\n * @apioption chart.animation\n */\n /**\n * A CSS class name to apply to the charts container `div`, allowing\n * unique CSS styling for each chart.\n *\n * @type {string}\n * @apioption chart.className\n */\n /**\n * Event listeners for the chart.\n *\n * @apioption chart.events\n */\n /**\n * Fires when a series is added to the chart after load time, using the\n * `addSeries` method. One parameter, `event`, is passed to the\n * function, containing common event information. Through\n * `event.options` you can access the series options that were passed to\n * the `addSeries` method. Returning false prevents the series from\n * being added.\n *\n * @sample {highcharts} highcharts/chart/events-addseries/\n * Alert on add series\n * @sample {highstock} stock/chart/events-addseries/\n * Alert on add series\n *\n * @type {Highcharts.ChartAddSeriesCallbackFunction}\n * @since 1.2.0\n * @context Highcharts.Chart\n * @apioption chart.events.addSeries\n */\n /**\n * Fires when clicking on the plot background. One parameter, `event`,\n * is passed to the function, containing common event information.\n *\n * Information on the clicked spot can be found through `event.xAxis`\n * and `event.yAxis`, which are arrays containing the axes of each\n * dimension and each axis' value at the clicked spot. The primary axes\n * are `event.xAxis[0]` and `event.yAxis[0]`. Remember the unit of a\n * datetime axis is milliseconds since 1970-01-01 00:00:00.\n *\n * ```js\n * click: function(e) {\n * console.log(\n * Highcharts.dateFormat('%Y-%m-%d %H:%M:%S', e.xAxis[0].value),\n * e.yAxis[0].value\n * )\n * }\n * ```\n *\n * @sample {highcharts} highcharts/chart/events-click/\n * Alert coordinates on click\n * @sample {highcharts} highcharts/chart/events-container/\n * Alternatively, attach event to container\n * @sample {highstock} stock/chart/events-click/\n * Alert coordinates on click\n * @sample {highstock} highcharts/chart/events-container/\n * Alternatively, attach event to container\n * @sample {highmaps} maps/chart/events-click/\n * Record coordinates on click\n * @sample {highmaps} highcharts/chart/events-container/\n * Alternatively, attach event to container\n *\n * @type {Highcharts.ChartClickCallbackFunction}\n * @since 1.2.0\n * @context Highcharts.Chart\n * @apioption chart.events.click\n */\n /**\n * Fires when the chart is finished loading. Since v4.2.2, it also waits\n * for images to be loaded, for example from point markers. One\n * parameter, `event`, is passed to the function, containing common\n * event information.\n *\n * There is also a second parameter to the chart constructor where a\n * callback function can be passed to be executed on chart.load.\n *\n * @sample {highcharts} highcharts/chart/events-load/\n * Alert on chart load\n * @sample {highcharts} highcharts/chart/events-render/\n * Load vs Redraw vs Render\n * @sample {highstock} stock/chart/events-load/\n * Alert on chart load\n * @sample {highmaps} maps/chart/events-load/\n * Add series on chart load\n *\n * @type {Highcharts.ChartLoadCallbackFunction}\n * @context Highcharts.Chart\n * @apioption chart.events.load\n */\n /**\n * Fires when the chart is redrawn, either after a call to\n * `chart.redraw()` or after an axis, series or point is modified with\n * the `redraw` option set to `true`. One parameter, `event`, is passed\n * to the function, containing common event information.\n *\n * @sample {highcharts} highcharts/chart/events-redraw/\n * Alert on chart redraw\n * @sample {highcharts} highcharts/chart/events-render/\n * Load vs Redraw vs Render\n * @sample {highstock} stock/chart/events-redraw/\n * Alert on chart redraw when adding a series or moving the\n * zoomed range\n * @sample {highmaps} maps/chart/events-redraw/\n * Set subtitle on chart redraw\n *\n * @type {Highcharts.ChartRedrawCallbackFunction}\n * @since 1.2.0\n * @context Highcharts.Chart\n * @apioption chart.events.redraw\n */\n /**\n * Fires after initial load of the chart (directly after the `load`\n * event), and after each redraw (directly after the `redraw` event).\n *\n * @sample {highcharts} highcharts/chart/events-render/\n * Load vs Redraw vs Render\n *\n * @type {Highcharts.ChartRenderCallbackFunction}\n * @since 5.0.7\n * @context Highcharts.Chart\n * @apioption chart.events.render\n */\n /**\n * Fires when an area of the chart has been selected. Selection is\n * enabled by setting the chart's zoomType. One parameter, `event`, is\n * passed to the function, containing common event information. The\n * default action for the selection event is to zoom the chart to the\n * selected area. It can be prevented by calling\n * `event.preventDefault()` or return false.\n *\n * Information on the selected area can be found through `event.xAxis`\n * and `event.yAxis`, which are arrays containing the axes of each\n * dimension and each axis' min and max values. The primary axes are\n * `event.xAxis[0]` and `event.yAxis[0]`. Remember the unit of a\n * datetime axis is milliseconds since 1970-01-01 00:00:00.\n *\n * ```js\n * selection: function(event) {\n * // log the min and max of the primary, datetime x-axis\n * console.log(\n * Highcharts.dateFormat(\n * '%Y-%m-%d %H:%M:%S',\n * event.xAxis[0].min\n * ),\n * Highcharts.dateFormat(\n * '%Y-%m-%d %H:%M:%S',\n * event.xAxis[0].max\n * )\n * );\n * // log the min and max of the y axis\n * console.log(event.yAxis[0].min, event.yAxis[0].max);\n * }\n * ```\n *\n * @sample {highcharts} highcharts/chart/events-selection/\n * Report on selection and reset\n * @sample {highcharts} highcharts/chart/events-selection-points/\n * Select a range of points through a drag selection\n * @sample {highstock} stock/chart/events-selection/\n * Report on selection and reset\n * @sample {highstock} highcharts/chart/events-selection-points/\n * Select a range of points through a drag selection\n * (Highcharts)\n *\n * @type {Highcharts.ChartSelectionCallbackFunction}\n * @apioption chart.events.selection\n */\n /**\n * The margin between the outer edge of the chart and the plot area.\n * The numbers in the array designate top, right, bottom and left\n * respectively. Use the options `marginTop`, `marginRight`,\n * `marginBottom` and `marginLeft` for shorthand setting of one option.\n *\n * By default there is no margin. The actual space is dynamically\n * calculated from the offset of axis labels, axis title, title,\n * subtitle and legend in addition to the `spacingTop`, `spacingRight`,\n * `spacingBottom` and `spacingLeft` options.\n *\n * @sample {highcharts} highcharts/chart/margins-zero/\n * Zero margins\n * @sample {highstock} stock/chart/margin-zero/\n * Zero margins\n *\n * @type {number|Array<number>}\n * @apioption chart.margin\n */\n /**\n * The margin between the bottom outer edge of the chart and the plot\n * area. Use this to set a fixed pixel value for the margin as opposed\n * to the default dynamic margin. See also `spacingBottom`.\n *\n * @sample {highcharts} highcharts/chart/marginbottom/\n * 100px bottom margin\n * @sample {highstock} stock/chart/marginbottom/\n * 100px bottom margin\n * @sample {highmaps} maps/chart/margin/\n * 100px margins\n *\n * @type {number}\n * @since 2.0\n * @apioption chart.marginBottom\n */\n /**\n * The margin between the left outer edge of the chart and the plot\n * area. Use this to set a fixed pixel value for the margin as opposed\n * to the default dynamic margin. See also `spacingLeft`.\n *\n * @sample {highcharts} highcharts/chart/marginleft/\n * 150px left margin\n * @sample {highstock} stock/chart/marginleft/\n * 150px left margin\n * @sample {highmaps} maps/chart/margin/\n * 100px margins\n *\n * @type {number}\n * @since 2.0\n * @apioption chart.marginLeft\n */\n /**\n * The margin between the right outer edge of the chart and the plot\n * area. Use this to set a fixed pixel value for the margin as opposed\n * to the default dynamic margin. See also `spacingRight`.\n *\n * @sample {highcharts} highcharts/chart/marginright/\n * 100px right margin\n * @sample {highstock} stock/chart/marginright/\n * 100px right margin\n * @sample {highmaps} maps/chart/margin/\n * 100px margins\n *\n * @type {number}\n * @since 2.0\n * @apioption chart.marginRight\n */\n /**\n * The margin between the top outer edge of the chart and the plot area.\n * Use this to set a fixed pixel value for the margin as opposed to\n * the default dynamic margin. See also `spacingTop`.\n *\n * @sample {highcharts} highcharts/chart/margintop/ 100px top margin\n * @sample {highstock} stock/chart/margintop/\n * 100px top margin\n * @sample {highmaps} maps/chart/margin/\n * 100px margins\n *\n * @type {number}\n * @since 2.0\n * @apioption chart.marginTop\n */\n /**\n * Callback function to override the default function that formats all\n * the numbers in the chart. Returns a string with the formatted number.\n *\n * @sample highcharts/members/highcharts-numberformat\n * Arabic digits in Highcharts\n * @type {Highcharts.NumberFormatterCallbackFunction}\n * @since 8.0.0\n * @apioption chart.numberFormatter\n */\n /**\n * When a chart with an x and a y-axis is rendered, we first pre-render the\n * labels of both in order to measure them. Then, if either of the axis\n * labels take up so much space that it significantly affects the length of\n * the other axis, we repeat the process.\n *\n * By default we stop at two axis layout runs, but it may be that the second\n * run also alter the space required by either axis, for example if it\n * causes the labels to rotate. In this situation, a subsequent redraw of\n * the chart may cause the tick and label placement to change for apparently\n * no reason.\n *\n * Use the `axisLayoutRuns` option to set the maximum allowed number of\n * repetitions. But keep in mind that the default value of 2 is set because\n * every run costs performance time.\n *\n * **Note:** Changing that option to higher than the default might decrease\n * performance significantly, especially with bigger sets of data.\n *\n * @type {number}\n * @default 2\n * @since 11.3.0\n * @apioption chart.axisLayoutRuns\n */\n /**\n * Allows setting a key to switch between zooming and panning. Can be\n * one of `alt`, `ctrl`, `meta` (the command key on Mac and Windows\n * key on Windows) or `shift`. The keys are mapped directly to the key\n * properties of the click event argument (`event.altKey`,\n * `event.ctrlKey`, `event.metaKey` and `event.shiftKey`).\n *\n * @type {string}\n * @since 4.0.3\n * @product highcharts gantt\n * @validvalue [\"alt\", \"ctrl\", \"meta\", \"shift\"]\n * @apioption chart.panKey\n */\n /**\n * Allow panning in a chart. Best used with [panKey](#chart.panKey)\n * to combine zooming and panning.\n *\n * On touch devices, when the [tooltip.followTouchMove](\n * #tooltip.followTouchMove) option is `true` (default), panning\n * requires two fingers. To allow panning with one finger, set\n * `followTouchMove` to `false`.\n *\n * @sample {highcharts} highcharts/chart/pankey/ Zooming and panning\n * @sample {highstock} stock/chart/panning/ Zooming and xy panning\n */\n panning: {\n /**\n * Enable or disable chart panning.\n *\n * @type {boolean}\n * @default {highcharts} false\n * @default {highstock|highmaps} true\n */\n enabled: false,\n /**\n * Decides in what dimensions the user can pan the chart. Can be\n * one of `x`, `y`, or `xy`.\n *\n * During panning, all axes will behave as if\n * [`startOnTick`](#yAxis.startOnTick) and\n * [`endOnTick`](#yAxis.endOnTick) were set to `false`. After the\n * panning action is finished, the axes will adjust to their actual\n * settings.\n *\n * @sample {highcharts} highcharts/chart/panning-type\n * Zooming and xy panning\n *\n * @declare Highcharts.OptionsChartPanningTypeValue\n * @type {string}\n * @validvalue [\"x\", \"y\", \"xy\"]\n * @product highcharts highstock gantt\n */\n type: 'x'\n },\n /**\n * Equivalent to [zoomType](#chart.zoomType), but for multitouch\n * gestures only. By default, the `pinchType` is the same as the\n * `zoomType` setting. However, pinching can be enabled separately in\n * some cases, for example in stock charts where a mouse drag pans the\n * chart, while pinching is enabled. When [tooltip.followTouchMove](\n * #tooltip.followTouchMove) is true, pinchType only applies to\n * two-finger touches.\n *\n * @type {string}\n * @default {highcharts} undefined\n * @default {highstock} undefined\n * @since 3.0\n * @product highcharts highstock gantt\n * @deprecated\n * @validvalue [\"x\", \"y\", \"xy\"]\n * @apioption chart.pinchType\n */\n /**\n * Whether to apply styled mode. When in styled mode, no presentational\n * attributes or CSS are applied to the chart SVG. Instead, CSS rules\n * are required to style the chart. The default style sheet is\n * available from `https://code.highcharts.com/css/highcharts.css`.\n *\n * [Read more in the docs](https://www.highcharts.com/docs/chart-design-and-style/style-by-css)\n * on what classes and variables are available.\n *\n * @sample highcharts/css/colors\n * Color theming with CSS\n * @sample highcharts/css/prefers-color-scheme\n * Dynamic theme based on system settings\n * @type {boolean}\n * @default false\n * @since 7.0\n * @apioption chart.styledMode\n */\n styledMode: false,\n /**\n * The corner radius of the outer chart border.\n *\n * @sample {highcharts} highcharts/chart/borderradius/\n * 20px radius\n * @sample {highstock} stock/chart/border/\n * 10px radius\n * @sample {highmaps} maps/chart/border/\n * Border options\n *\n */\n borderRadius: 0,\n /**\n * In styled mode, this sets how many colors the class names\n * should rotate between. With ten colors, series (or points) are\n * given class names like `highcharts-color-0`, `highcharts-color-1`\n * [...] `highcharts-color-9`. The equivalent in non-styled mode\n * is to set colors using the [colors](#colors) setting.\n *\n * @since 5.0.0\n */\n colorCount: 10,\n /**\n * By default, (because of memory and performance reasons) the chart does\n * not copy the data but keeps it as a reference. In some cases, this might\n * result in mutating the original data source. In order to prevent that,\n * set that property to false. Please note that changing that might decrease\n * performance, especially with bigger sets of data.\n *\n * @type {boolean}\n * @since 10.1.0\n */\n allowMutatingData: true,\n /**\n * If true, the axes will scale to the remaining visible series once\n * one series is hidden. If false, hiding and showing a series will\n * not affect the axes or the other series. For stacks, once one series\n * within the stack is hidden, the rest of the stack will close in\n * around it even if the axis is not affected.\n *\n * @sample {highcharts} highcharts/chart/ignorehiddenseries-true/\n * True by default\n * @sample {highcharts} highcharts/chart/ignorehiddenseries-false/\n * False\n * @sample {highcharts} highcharts/chart/ignorehiddenseries-true-stacked/\n * True with stack\n * @sample {highstock} stock/chart/ignorehiddenseries-true/\n * True by default\n * @sample {highstock} stock/chart/ignorehiddenseries-false/\n * False\n *\n * @since 1.2.0\n * @product highcharts highstock gantt\n */\n ignoreHiddenSeries: true,\n /**\n * Whether to invert the axes so that the x axis is vertical and y axis\n * is horizontal. When `true`, the x axis is [reversed](#xAxis.reversed)\n * by default.\n *\n * @productdesc {highcharts}\n * If a bar series is present in the chart, it will be inverted\n * automatically. Inverting the chart doesn't have an effect if there\n * are no cartesian series in the chart.\n *\n * @sample {highcharts} highcharts/chart/inverted/\n * Inverted line\n * @sample {highstock} stock/navigator/inverted/\n * Inverted stock chart\n *\n * @type {boolean}\n * @default false\n * @product highcharts highstock gantt\n * @apioption chart.inverted\n */\n /**\n * The distance between the outer edge of the chart and the content,\n * like title or legend, or axis title and labels if present. The\n * numbers in the array designate top, right, bottom and left\n * respectively. Use the options spacingTop, spacingRight, spacingBottom\n * and spacingLeft options for shorthand setting of one option.\n *\n * @type {Array<number>}\n * @see [chart.margin](#chart.margin)\n * @default [10, 10, 15, 10]\n * @since 3.0.6\n */\n spacing: [10, 10, 15, 10],\n /**\n * The button that appears after a selection zoom, allowing the user\n * to reset zoom. This option is deprecated in favor of\n * [zooming](#chart.zooming).\n *\n * @since 2.2\n * @deprecated 10.2.1\n */\n resetZoomButton: {\n /**\n * What frame the button placement should be related to. Can be\n * either `plotBox` or `spacingBox`.\n *\n * @sample {highcharts} highcharts/chart/resetzoombutton-relativeto/\n * Relative to the chart\n * @sample {highstock} highcharts/chart/resetzoombutton-relativeto/\n * Relative to the chart\n *\n * @type {Highcharts.ButtonRelativeToValue}\n * @apioption chart.resetZoomButton.relativeTo\n */\n /**\n * A collection of attributes for the button. The object takes SVG\n * attributes like `fill`, `stroke`, `stroke-width` or `r`, the\n * border radius. The theme also supports `style`, a collection of\n * CSS properties for the text. Equivalent attributes for the hover\n * state are given in `theme.states.hover`.\n *\n * @sample {highcharts} highcharts/chart/resetzoombutton-theme/\n * Theming the button\n * @sample {highstock} highcharts/chart/resetzoombutton-theme/\n * Theming the button\n *\n * @type {Highcharts.SVGAttributes}\n */\n theme: {\n /**\n * The z-index of the button.\n *\n * @type {number}\n * @apioption chart.resetZoomButton.theme.zIndex\n */\n },\n /**\n * The position of the button.\n *\n * @sample {highcharts} highcharts/chart/resetzoombutton-position/\n * Above the plot area\n * @sample {highstock} highcharts/chart/resetzoombutton-position/\n * Above the plot area\n * @sample {highmaps} highcharts/chart/resetzoombutton-position/\n * Above the plot area\n *\n * @type {Highcharts.AlignObject}\n */\n position: {\n /**\n * The horizontal alignment of the button.\n *\n * @type {number}\n * @apioption chart.resetZoomButton.position.align\n */\n /**\n * The horizontal offset of the button.\n *\n * @type {number}\n * @apioption chart.resetZoomButton.position.x\n */\n /**\n * The vertical alignment of the button.\n *\n * @type {Highcharts.VerticalAlignValue}\n * @apioption chart.resetZoomButton.position.verticalAlign\n */\n /**\n * The vertical offset of the button.\n *\n * @type {number}\n * @apioption chart.resetZoomButton.position.y\n */\n }\n },\n /**\n * The pixel width of the plot area border.\n *\n * @sample {highcharts} highcharts/chart/plotborderwidth/\n * 1px border\n * @sample {highstock} stock/chart/plotborder/\n * 2px border\n * @sample {highmaps} maps/chart/plotborder/\n * Plot border options\n *\n * @type {number}\n * @default 0\n * @apioption chart.plotBorderWidth\n */\n /**\n * Whether to apply a drop shadow to the plot area. Requires that\n * plotBackgroundColor be set. The shadow can be an object configuration\n * containing `color`, `offsetX`, `offsetY`, `opacity` and `width`.\n *\n * @sample {highcharts} highcharts/chart/plotshadow/\n * Plot shadow\n * @sample {highstock} stock/chart/plotshadow/\n * Plot shadow\n * @sample {highmaps} maps/chart/plotborder/\n * Plot border options\n *\n * @type {boolean|Highcharts.ShadowOptionsObject}\n * @default false\n * @apioption chart.plotShadow\n */\n /**\n * When true, cartesian charts like line, spline, area and column are\n * transformed into the polar coordinate system. This produces _polar\n * charts_, also known as _radar charts_.\n *\n * @sample {highcharts} highcharts/demo/polar/\n * Polar chart\n * @sample {highcharts} highcharts/demo/polar-wind-rose/\n * Wind rose, stacked polar column chart\n * @sample {highcharts} highcharts/demo/polar-spider/\n * Spider web chart\n * @sample {highcharts} highcharts/parallel-coordinates/polar/\n * Star plot, multivariate data in a polar chart\n *\n * @type {boolean}\n * @default false\n * @since 2.3.0\n * @product highcharts\n * @requires highcharts-more\n * @apioption chart.polar\n */\n /**\n * Whether to reflow the chart to fit the width of the container div\n * on resizing the window.\n *\n * @sample {highcharts} highcharts/chart/reflow-true/\n * True by default\n * @sample {highcharts} highcharts/chart/reflow-false/\n * False\n * @sample {highstock} stock/chart/reflow-true/\n * True by default\n * @sample {highstock} stock/chart/reflow-false/\n * False\n * @sample {highmaps} maps/chart/reflow-true/\n * True by default\n * @sample {highmaps} maps/chart/reflow-false/\n * False\n *\n * @since 2.1\n */\n reflow: true,\n /**\n * The HTML element where the chart will be rendered. If it is a string,\n * the element by that id is used. The HTML element can also be passed\n * by direct reference, or as the first argument of the chart\n * constructor, in which case the option is not needed.\n *\n * @sample {highcharts} highcharts/chart/reflow-true/\n * String\n * @sample {highcharts} highcharts/chart/renderto-object/\n * Object reference\n * @sample {highstock} stock/chart/renderto-string/\n * String\n * @sample {highstock} stock/chart/renderto-object/\n * Object reference\n *\n * @type {string|Highcharts.HTMLDOMElement}\n * @apioption chart.renderTo\n */\n /**\n * The background color of the marker square when selecting (zooming\n * in on) an area of the chart.\n *\n * @see In styled mode, the selection marker fill is set with the\n * `.highcharts-selection-marker` class.\n *\n * @type {Highcharts.ColorString|Highcharts.GradientColorObject|Highcharts.PatternObject}\n * @default rgba(51,92,173,0.25)\n * @since 2.1.7\n * @apioption chart.selectionMarkerFill\n */\n /**\n * Whether to apply a drop shadow to the global series group. This causes\n * all the series to have the same shadow. Contrary to the `series.shadow`\n * option, this prevents items from casting shadows on each other, like for\n * others series in a stack. The shadow can be an object configuration\n * containing `color`, `offsetX`, `offsetY`, `opacity` and `width`.\n *\n * @sample highcharts/chart/seriesgroupshadow/ Shadow\n *\n * @type {boolean|Highcharts.ShadowOptionsObject}\n * @default false\n * @apioption chart.shadow\n */\n /**\n * Whether to apply a drop shadow to the outer chart area. Requires\n * that backgroundColor be set. The shadow can be an object\n * configuration containing `color`, `offsetX`, `offsetY`, `opacity` and\n * `width`.\n *\n * @sample {highcharts} highcharts/chart/shadow/\n * Shadow\n * @sample {highstock} stock/chart/shadow/\n * Shadow\n * @sample {highmaps} maps/chart/border/\n * Chart border and shadow\n *\n * @type {boolean|Highcharts.ShadowOptionsObject}\n * @default false\n * @apioption chart.shadow\n */\n /**\n * Whether to show the axes initially. This only applies to empty charts\n * where series are added dynamically, as axes are automatically added\n * to cartesian series.\n *\n * @sample {highcharts} highcharts/chart/showaxes-false/\n * False by default\n * @sample {highcharts} highcharts/chart/showaxes-true/\n * True\n *\n * @type {boolean}\n * @since 1.2.5\n * @product highcharts gantt\n * @apioption chart.showAxes\n */\n /**\n * The space between the bottom edge of the chart and the content (plot\n * area, axis title and labels, title, subtitle or legend in top\n * position).\n *\n * @sample {highcharts} highcharts/chart/spacingbottom/\n * Spacing bottom set to 100\n * @sample {highstock} stock/chart/spacingbottom/\n * Spacing bottom set to 100\n * @sample {highmaps} maps/chart/spacing/\n * Spacing 100 all around\n *\n * @type {number}\n * @default 15\n * @since 2.1\n * @apioption chart.spacingBottom\n */\n /**\n * The space between the left edge of the chart and the content (plot\n * area, axis title and labels, title, subtitle or legend in top\n * position).\n *\n * @sample {highcharts} highcharts/chart/spacingleft/\n * Spacing left set to 100\n * @sample {highstock} stock/chart/spacingleft/\n * Spacing left set to 100\n * @sample {highmaps} maps/chart/spacing/\n * Spacing 100 all around\n *\n * @type {number}\n * @default 10\n * @since 2.1\n * @apioption chart.spacingLeft\n */\n /**\n * The space between the right edge of the chart and the content (plot\n * area, axis title and labels, title, subtitle or legend in top\n * position).\n *\n * @sample {highcharts} highcharts/chart/spacingright-100/\n * Spacing set to 100\n * @sample {highcharts} highcharts/chart/spacingright-legend/\n * Legend in right position with default spacing\n * @sample {highstock} stock/chart/spacingright/\n * Spacing set to 100\n * @sample {highmaps} maps/chart/spacing/\n * Spacing 100 all around\n *\n * @type {number}\n * @default 10\n * @since 2.1\n * @apioption chart.spacingRight\n */\n /**\n * The space between the top edge of the chart and the content (plot\n * area, axis title and labels, title, subtitle or legend in top\n * position).\n *\n * @sample {highcharts} highcharts/chart/spacingtop-100/\n * A top spacing of 100\n * @sample {highcharts} highcharts/chart/spacingtop-10/\n * Floating chart title makes the plot area align to the default\n * spacingTop of 10.\n * @sample {highstock} stock/chart/spacingtop/\n * A top spacing of 100\n * @sample {highmaps} maps/chart/spacing/\n * Spacing 100 all around\n *\n * @type {number}\n * @default 10\n * @since 2.1\n * @apioption chart.spacingTop\n */\n /**\n * Additional CSS styles to apply inline to the container `div` and the root\n * SVG.\n *\n * According to the CSS syntax documentation, it is recommended to quote\n * font family names that contain white space, digits, or punctuation\n * characters other than hyphens. In such cases, wrap the fontFamily\n * name as follows: `fontFamily: '\"Font name\"'`.\n *\n * Since v11, the root font size is 1rem by default, and all child element\n * are given a relative `em` font size by default. This allows implementers\n * to control all the chart's font sizes by only setting the root level.\n *\n * @see In styled mode, general chart styles can be set with the\n * `.highcharts-root` class.\n * @sample {highcharts} highcharts/chart/style-serif-font/\n * Using a serif type font\n * @sample {highcharts} highcharts/chart/style-special-font/\n * Using a font with special character in name\n * @sample {highcharts} highcharts/members/relative-font-size/\n * Relative font sizes\n * @sample {highcharts} highcharts/css/em/\n * Styled mode with relative font sizes\n * @sample {highstock} stock/chart/style/\n * Using a serif type font\n * @sample {highmaps} maps/chart/style-serif-font/\n * Using a serif type font\n *\n * @type {Highcharts.CSSObject}\n * @default {\"fontFamily\": Helvetica, Arial, sans-serif\",\"fontSize\":\"1rem\"}\n * @apioption chart.style\n */\n /**\n * The default series type for the chart. Can be any of the chart types\n * listed under [plotOptions](#plotOptions) and [series](#series) or can\n * be a series provided by an additional module.\n *\n * In TypeScript this option has no effect in sense of typing and\n * instead the `type` option must always be set in the series.\n *\n * @sample {highcharts} highcharts/chart/type-bar/\n * Bar\n * @sample {highstock} stock/chart/type/\n * Areaspline\n * @sample {highmaps} maps/chart/type-mapline/\n * Mapline\n *\n * @type {string}\n * @default {highcharts} line\n * @default {highstock} line\n * @default {highmaps} map\n * @since 2.1.0\n * @apioption chart.type\n */\n type: 'line',\n /**\n * Decides in what dimensions the user can zoom by dragging the mouse.\n * Can be one of `x`, `y` or `xy`.\n *\n * @see [panKey](#chart.panKey)\n *\n * @sample {highcharts} highcharts/chart/zoomtype-none/\n * None by default\n * @sample {highcharts} highcharts/chart/zoomtype-x/\n * X\n * @sample {highcharts} highcharts/chart/zoomtype-y/\n * Y\n * @sample {highcharts} highcharts/chart/zoomtype-xy/\n * Xy\n * @sample {highcharts} highcharts/chart/zoomtype-polar/\n * Zoom on polar chart\n * @sample {highstock} stock/demo/basic-line/\n * None by default\n * @sample {highstock} stock/chart/zoomtype-x/\n * X\n * @sample {highstock} stock/chart/zoomtype-y/\n * Y\n * @sample {highstock} stock/chart/zoomtype-xy/\n * Xy\n * @sample {highmaps} maps/chart/zoomtype-xy/\n * Map with selection zoom\n *\n * @type {string}\n * @validvalue [\"x\", \"y\", \"xy\"]\n * @deprecated\n * @apioption chart.zoomType\n */\n /**\n * Enables zooming by a single touch, in combination with\n * [chart.zoomType](#chart.zoomType). When enabled, two-finger pinch\n * will still work as set up by [chart.pinchType](#chart.pinchType).\n * However, `zoomBySingleTouch` will interfere with touch-dragging the\n * chart to read the tooltip. And especially when vertical zooming is\n * enabled, it will make it hard to scroll vertically on the page.\n * @since 9.0.0\n * @sample highcharts/chart/zoombysingletouch\n * Zoom by single touch enabled, with buttons to toggle\n * @product highcharts highstock gantt\n * @deprecated\n */\n /**\n * Chart zooming options.\n * @since 10.2.1\n */\n zooming: {\n /**\n * Equivalent to [type](#chart.zooming.type), but for multitouch\n * gestures only. By default, the `pinchType` is the same as the\n * `type` setting. However, pinching can be enabled separately in\n * some cases, for example in stock charts where a mouse drag pans the\n * chart, while pinching is enabled. When [tooltip.followTouchMove](\n * #tooltip.followTouchMove) is true, pinchType only applies to\n * two-finger touches.\n *\n * @type {string}\n * @default {highcharts} undefined\n * @default {highstock} x\n * @product highcharts highstock gantt\n * @validvalue [\"x\", \"y\", \"xy\"]\n * @apioption chart.zooming.pinchType\n */\n /**\n * Decides in what dimensions the user can zoom by dragging the mouse.\n * Can be one of `x`, `y` or `xy`.\n *\n * @declare Highcharts.OptionsChartZoomingTypeValue\n * @type {string}\n * @default {highcharts} undefined\n * @product highcharts highstock gantt\n * @validvalue [\"x\", \"y\", \"xy\"]\n * @apioption chart.zooming.type\n */\n /**\n * Set a key to hold when dragging to zoom the chart. This is useful to\n * avoid zooming while moving points. Should be set different than\n * [chart.panKey](#chart.panKey).\n *\n * @type {string}\n * @default {highcharts} undefined\n * @validvalue [\"alt\", \"ctrl\", \"meta\", \"shift\"]\n * @requires modules/draggable-points\n * @apioption chart.zooming.key\n */\n /**\n * Enables zooming by a single touch, in combination with\n * [chart.zooming.type](#chart.zooming.type). When enabled, two-finger\n * pinch will still work as set up by [chart.zooming.pinchType]\n * (#chart.zooming.pinchType). However, `singleTouch` will interfere\n * with touch-dragging the chart to read the tooltip. And especially\n * when vertical zooming is enabled, it will make it hard to scroll\n * vertically on the page.\n *\n * @sample highcharts/chart/zoombysingletouch\n * Zoom by single touch enabled, with buttons to toggle\n *\n * @product highcharts highstock gantt\n */\n singleTouch: false,\n /**\n * The button that appears after a selection zoom, allowing the user\n * to reset zoom.\n */\n resetButton: {\n /**\n * What frame the button placement should be related to. Can be\n * either `plotBox` or `spacingBox`.\n *\n * @sample {highcharts} highcharts/chart/resetzoombutton-relativeto/\n * Relative to the chart\n * @sample {highstock} highcharts/chart/resetzoombutton-relativeto/\n * Relative to the chart\n *\n * @type {Highcharts.ButtonRelativeToValue}\n * @default plot\n * @apioption chart.zooming.resetButton.relativeTo\n */\n /**\n * A collection of attributes for the button. The object takes SVG\n * attributes like `fill`, `stroke`, `stroke-width` or `r`, the\n * border radius. The theme also supports `style`, a collection of\n * CSS properties for the text. Equivalent attributes for the hover\n * state are given in `theme.states.hover`.\n *\n * @sample {highcharts} highcharts/chart/resetzoombutton-theme/\n * Theming the button\n * @sample {highstock} highcharts/chart/resetzoombutton-theme/\n * Theming the button\n *\n * @type {Highcharts.SVGAttributes}\n * @since 10.2.1\n */\n theme: {\n /** @internal */\n zIndex: 6\n },\n /**\n * The position of the button.\n *\n * Note: Adjusting position values might cause overlap with chart\n * elements. Ensure coordinates do not obstruct other components or\n * data visibility.\n *\n * @sample {highcharts} highcharts/chart/resetzoombutton-position/\n * Above the plot area\n * @sample {highstock} highcharts/chart/resetzoombutton-position/\n * Above the plot area\n * @sample {highmaps} highcharts/chart/resetzoombutton-position/\n * Above the plot area\n *\n * @type {Highcharts.AlignObject}\n * @since 10.2.1\n */\n position: {\n /**\n * The horizontal alignment of the button.\n */\n align: 'right',\n /**\n * The horizontal offset of the button.\n */\n x: -10,\n /**\n * The vertical alignment of the button.\n *\n * @type {Highcharts.VerticalAlignValue}\n * @default top\n * @apioption chart.zooming.resetButton.position.verticalAlign\n */\n /**\n * The vertical offset of the button.\n */\n y: 10\n }\n }\n },\n /**\n * An explicit width for the chart. By default (when `null`) the width\n * is calculated from the offset width of the containing element.\n *\n * @sample {highcharts} highcharts/chart/width/\n * 800px wide\n * @sample {highstock} stock/chart/width/\n * 800px wide\n * @sample {highmaps} maps/chart/size/\n * Chart with explicit size\n *\n * @type {null|number|string}\n */\n width: null,\n /**\n * An explicit height for the chart. If a _number_, the height is\n * given in pixels. If given a _percentage string_ (for example\n * `'56%'`), the height is given as the percentage of the actual chart\n * width. This allows for preserving the aspect ratio across responsive\n * sizes.\n *\n * By default (when `null`) the height is calculated from the offset\n * height of the containing element, or 400 pixels if the containing\n * element's height is 0.\n *\n * @sample {highcharts} highcharts/chart/height/\n * Forced 200px height\n * @sample {highstock} stock/chart/height/\n * 300px height\n * @sample {highmaps} maps/chart/size/\n * Chart with explicit size\n * @sample highcharts/chart/height-percent/\n * Highcharts with percentage height\n * @sample highcharts/chart/height-inherited/\n * Chart with inherited height\n *\n * @type {null|number|string}\n */\n height: null,\n /**\n * The color of the outer chart border.\n *\n * @see In styled mode, the stroke is set with the\n * `.highcharts-background` class.\n *\n * @sample {highcharts} highcharts/chart/bordercolor/\n * Brown border\n * @sample {highstock} stock/chart/border/\n * Brown border\n * @sample {highmaps} maps/chart/border/\n * Border options\n *\n * @type {Highcharts.ColorString|Highcharts.GradientColorObject|Highcharts.PatternObject}\n */\n borderColor: \"#334eff\" /* Palette.highlightColor80 */,\n /**\n * The pixel width of the outer chart border.\n *\n * @see In styled mode, the stroke is set with the\n * `.highcharts-background` class.\n *\n * @sample {highcharts} highcharts/chart/borderwidth/\n * 5px border\n * @sample {highstock} stock/chart/border/\n * 2px border\n * @sample {highmaps} maps/chart/border/\n * Border options\n *\n * @type {number}\n * @default 0\n * @apioption chart.borderWidth\n */\n /**\n * The background color or gradient for the outer chart area.\n *\n * @see In styled mode, the background is set with the\n * `.highcharts-background` class.\n *\n * @sample {highcharts} highcharts/chart/backgroundcolor-color/\n * Color\n * @sample {highcharts} highcharts/chart/backgroundcolor-gradient/\n * Gradient\n * @sample {highstock} stock/chart/backgroundcolor-color/\n * Color\n * @sample {highstock} stock/chart/backgroundcolor-gradient/\n * Gradient\n * @sample {highmaps} maps/chart/backgroundcolor-color/\n * Color\n * @sample {highmaps} maps/chart/backgroundcolor-gradient/\n * Gradient\n *\n * @type {Highcharts.ColorString|Highcharts.GradientColorObject|Highcharts.PatternObject}\n */\n backgroundColor: \"#ffffff\" /* Palette.backgroundColor */,\n /**\n * The background color or gradient for the plot area.\n *\n * @see In styled mode, the plot background is set with the\n * `.highcharts-plot-background` class.\n *\n * @sample {highcharts} highcharts/chart/plotbackgroundcolor-color/\n * Color\n * @sample {highcharts} highcharts/chart/plotbackgroundcolor-gradient/\n * Gradient\n * @sample {highstock} stock/chart/plotbackgroundcolor-color/\n * Color\n * @sample {highstock} stock/chart/plotbackgroundcolor-gradient/\n * Gradient\n * @sample {highmaps} maps/chart/plotbackgroundcolor-color/\n * Color\n * @sample {highmaps} maps/chart/plotbackgroundcolor-gradient/\n * Gradient\n *\n * @type {Highcharts.ColorString|Highcharts.GradientColorObject|Highcharts.PatternObject}\n * @apioption chart.plotBackgroundColor\n */\n /**\n * The URL for an image to use as the plot background. To set an image\n * as the background for the entire chart, set a CSS background image\n * to the container element. Note that for the image to be applied to\n * exported charts, its URL needs to be accessible by the export server.\n *\n * @see In styled mode, a plot background image can be set with the\n * `.highcharts-plot-background` class and a [custom pattern](\n * https://www.highcharts.com/docs/chart-design-and-style/gradients-shadows-and-patterns).\n *\n * @sample {highcharts} highcharts/chart/plotbackgroundimage/\n * Skies\n * @sample {highstock} stock/chart/plotbackgroundimage/\n * Skies\n *\n * @type {string}\n * @apioption chart.plotBackgroundImage\n */\n /**\n * The color of the inner chart or plot area border.\n *\n * @see In styled mode, a plot border stroke can be set with the\n * `.highcharts-plot-border` class.\n *\n * @sample {highcharts} highcharts/chart/plotbordercolor/\n * Blue border\n * @sample {highstock} stock/chart/plotborder/\n * Blue border\n * @sample {highmaps} maps/chart/plotborder/\n * Plot border options\n *\n * @type {Highcharts.ColorString|Highcharts.GradientColorObject|Highcharts.PatternObject}\n */\n plotBorderColor: \"#cccccc\" /* Palette.neutralColor20 */\n };\n /* *\n *\n * Default Export\n *\n * */\n\n return ChartDefaults;\n });\n _registerModule(_modules, 'Core/Color/Palettes.js', [], function () {\n /*\n * Series palettes for Highcharts. Series colors are defined in highcharts.css.\n * **Do not edit this file!** This file is generated using the 'gulp palette' task.\n */\n const SeriesPalettes = {\n /**\n * Colors for data series and points\n */\n colors: [\n '#2caffe',\n '#544fc5',\n '#00e272',\n '#fe6a35',\n '#6b8abc',\n '#d568fb',\n '#2ee0ca',\n '#fa4b42',\n '#feb56a',\n '#91e8e1'\n ]\n };\n\n return SeriesPalettes;\n });\n _registerModule(_modules, 'Core/Time.js', [_modules['Core/Globals.js'], _modules['Core/Utilities.js']], function (H, U) {\n /* *\n *\n * (c) 2010-2024 Torstein Honsi\n *\n * License: www.highcharts.com/license\n *\n * !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!\n *\n * */\n const { win } = H;\n const { defined, error, extend, isNumber, isObject, merge, objectEach, pad, pick, splat, timeUnits } = U;\n /* *\n *\n * Constants\n *\n * */\n const hasNewSafariBug = H.isSafari &&\n win.Intl &&\n win.Intl.DateTimeFormat.prototype.formatRange;\n // To do: Remove this when we no longer need support for Safari < v14.1\n const hasOldSafariBug = H.isSafari &&\n win.Intl &&\n !win.Intl.DateTimeFormat.prototype.formatRange;\n /* *\n *\n * Class\n *\n * */\n /* eslint-disable no-invalid-this, valid-jsdoc */\n /**\n * The Time class. Time settings are applied in general for each page using\n * `Highcharts.setOptions`, or individually for each Chart item through the\n * [time](https://api.highcharts.com/highcharts/time) options set.\n *\n * The Time object is available from {@link Highcharts.Chart#time},\n * which refers to `Highcharts.time` if no individual time settings are\n * applied.\n *\n * @example\n * // Apply time settings globally\n * Highcharts.setOptions({\n * time: {\n * timezone: 'Europe/London'\n * }\n * });\n *\n * // Apply time settings by instance\n * let chart = Highcharts.chart('container', {\n * time: {\n * timezone: 'America/New_York'\n * },\n * series: [{\n * data: [1, 4, 3, 5]\n * }]\n * });\n *\n * // Use the Time object\n * console.log(\n * 'Current time in New York',\n * chart.time.dateFormat('%Y-%m-%d %H:%M:%S', Date.now())\n * );\n *\n * @since 6.0.5\n *\n * @class\n * @name Highcharts.Time\n *\n * @param {Highcharts.TimeOptions} [options]\n * Time options as defined in [chart.options.time](/highcharts/time).\n */\n class Time {\n /* *\n *\n * Constructors\n *\n * */\n constructor(options) {\n /* *\n *\n * Properties\n *\n * */\n this.options = {};\n this.useUTC = false;\n this.variableTimezone = false;\n this.Date = win.Date;\n /**\n * Get the time zone offset based on the current timezone information as\n * set in the global options.\n *\n * @function Highcharts.Time#getTimezoneOffset\n *\n * @param {number} timestamp\n * The JavaScript timestamp to inspect.\n *\n * @return {number}\n * The timezone offset in minutes compared to UTC.\n */\n this.getTimezoneOffset = this.timezoneOffsetFunction();\n this.update(options);\n }\n /* *\n *\n * Functions\n *\n * */\n /**\n * Time units used in `Time.get` and `Time.set`\n *\n * @typedef {\"Date\"|\"Day\"|\"FullYear\"|\"Hours\"|\"Milliseconds\"|\"Minutes\"|\"Month\"|\"Seconds\"} Highcharts.TimeUnitValue\n */\n /**\n * Get the value of a date object in given units, and subject to the Time\n * object's current timezone settings. This function corresponds directly to\n * JavaScripts `Date.getXXX / Date.getUTCXXX`, so instead of calling\n * `date.getHours()` or `date.getUTCHours()` we will call\n * `time.get('Hours')`.\n *\n * @function Highcharts.Time#get\n *\n * @param {Highcharts.TimeUnitValue} unit\n * @param {Date} date\n *\n * @return {number}\n * The given time unit\n */\n get(unit, date) {\n if (this.variableTimezone || this.timezoneOffset) {\n const realMs = date.getTime();\n const ms = realMs - this.getTimezoneOffset(date);\n date.setTime(ms); // Temporary adjust to timezone\n const ret = date['getUTC' + unit]();\n date.setTime(realMs); // Reset\n return ret;\n }\n // UTC time with no timezone handling\n if (this.useUTC) {\n return date['getUTC' + unit]();\n }\n // Else, local time\n return date['get' + unit]();\n }\n /**\n * Set the value of a date object in given units, and subject to the Time\n * object's current timezone settings. This function corresponds directly to\n * JavaScripts `Date.setXXX / Date.setUTCXXX`, so instead of calling\n * `date.setHours(0)` or `date.setUTCHours(0)` we will call\n * `time.set('Hours', 0)`.\n *\n * @function Highcharts.Time#set\n *\n * @param {Highcharts.TimeUnitValue} unit\n * @param {Date} date\n * @param {number} value\n *\n * @return {number}\n * The epoch milliseconds of the updated date\n */\n set(unit, date, value) {\n // UTC time with timezone handling\n if (this.variableTimezone || this.timezoneOffset) {\n // For lower order time units, just set it directly using UTC\n // time\n if (unit === 'Milliseconds' ||\n unit === 'Seconds' ||\n (unit === 'Minutes' &&\n this.getTimezoneOffset(date) % 3600000 === 0) // #13961\n ) {\n return date['setUTC' + unit](value);\n }\n // Higher order time units need to take the time zone into\n // account\n // Adjust by timezone\n const offset = this.getTimezoneOffset(date);\n let ms = date.getTime() - offset;\n date.setTime(ms);\n date['setUTC' + unit](value);\n const newOffset = this.getTimezoneOffset(date);\n ms = date.getTime() + newOffset;\n return date.setTime(ms);\n }\n // UTC time with no timezone handling\n if (this.useUTC ||\n // Leap calculation in UTC only\n (hasNewSafariBug && unit === 'FullYear')) {\n return date['setUTC' + unit](value);\n }\n // Else, local time\n return date['set' + unit](value);\n }\n /**\n * Update the Time object with current options. It is called internally on\n * initializing Highcharts, after running `Highcharts.setOptions` and on\n * `Chart.update`.\n *\n * @private\n * @function Highcharts.Time#update\n *\n * @param {Highcharts.TimeOptions} [options]\n *\n */\n update(options = {}) {\n const useUTC = pick(options.useUTC, true);\n this.options = options = merge(true, this.options, options);\n // Allow using a different Date class\n this.Date = options.Date || win.Date || Date;\n this.useUTC = useUTC;\n this.timezoneOffset = (useUTC && options.timezoneOffset) || void 0;\n this.getTimezoneOffset = this.timezoneOffsetFunction();\n /*\n * The time object has options allowing for variable time zones, meaning\n * the axis ticks or series data needs to consider this.\n */\n this.variableTimezone = useUTC && !!(options.getTimezoneOffset ||\n options.timezone);\n }\n /**\n * Make a time and returns milliseconds. Interprets the inputs as UTC time,\n * local time or a specific timezone time depending on the current time\n * settings.\n *\n * @function Highcharts.Time#makeTime\n *\n * @param {number} year\n * The year\n *\n * @param {number} month\n * The month. Zero-based, so January is 0.\n *\n * @param {number} [date=1]\n * The day of the month\n *\n * @param {number} [hours=0]\n * The hour of the day, 0-23.\n *\n * @param {number} [minutes=0]\n * The minutes\n *\n * @param {number} [seconds=0]\n * The seconds\n *\n * @return {number}\n * The time in milliseconds since January 1st 1970.\n */\n makeTime(year, month, date, hours, minutes, seconds) {\n let d, offset, newOffset;\n if (this.useUTC) {\n d = this.Date.UTC.apply(0, arguments);\n offset = this.getTimezoneOffset(d);\n d += offset;\n newOffset = this.getTimezoneOffset(d);\n if (offset !== newOffset) {\n d += newOffset - offset;\n // A special case for transitioning from summer time to winter time.\n // When the clock is set back, the same time is repeated twice, i.e.\n // 02:30 am is repeated since the clock is set back from 3 am to\n // 2 am. We need to make the same time as local Date does.\n }\n else if (offset - 36e5 === this.getTimezoneOffset(d - 36e5) &&\n !hasOldSafariBug) {\n d -= 36e5;\n }\n }\n else {\n d = new this.Date(year, month, pick(date, 1), pick(hours, 0), pick(minutes, 0), pick(seconds, 0)).getTime();\n }\n return d;\n }\n /**\n * Sets the getTimezoneOffset function. If the `timezone` option is set, a\n * default getTimezoneOffset function with that timezone is returned. If\n * a `getTimezoneOffset` option is defined, it is returned. If neither are\n * specified, the function using the `timezoneOffset` option or 0 offset is\n * returned.\n *\n * @private\n * @function Highcharts.Time#timezoneOffsetFunction\n *\n * @return {Function}\n * A getTimezoneOffset function\n */\n timezoneOffsetFunction() {\n const time = this, options = this.options, getTimezoneOffset = options.getTimezoneOffset;\n if (!this.useUTC) {\n return (timestamp) => new Date(timestamp.toString()).getTimezoneOffset() * 60000;\n }\n if (options.timezone) {\n return (timestamp) => {\n try {\n // Cache the DateTimeFormat instances for performance\n // (#20720)\n const cacheKey = `shortOffset,${options.timezone || ''}`, dateTimeFormat = Time.formatCache[cacheKey] = (Time.formatCache[cacheKey] ||\n // eslint-disable-next-line new-cap\n Intl.DateTimeFormat('en', {\n timeZone: options.timezone,\n timeZoneName: 'shortOffset'\n }));\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n const [date, gmt, hours, colon, minutes = 0] = dateTimeFormat\n .format(timestamp)\n .split(/(GMT|:)/)\n .map(Number), offset = -(hours + minutes / 60) * 60 * 60000;\n // Possible future NaNs stop here\n if (isNumber(offset)) {\n return offset;\n }\n }\n catch (e) {\n error(34);\n }\n return 0;\n };\n }\n // If not timezone is set, look for the getTimezoneOffset callback\n if (this.useUTC && getTimezoneOffset) {\n return (timestamp) => getTimezoneOffset(timestamp.valueOf()) * 60000;\n }\n // Last, use the `timezoneOffset` option if set\n return () => (time.timezoneOffset || 0) * 60000;\n }\n /**\n * Formats a JavaScript date timestamp (milliseconds since Jan 1st 1970)\n * into a human readable date string. The available format keys are listed\n * below. Additional formats can be given in the\n * {@link Highcharts.dateFormats} hook.\n *\n * Supported format keys:\n * - `%a`: Short weekday, like 'Mon'\n * - `%A`: Long weekday, like 'Monday'\n * - `%d`: Two digit day of the month, 01 to 31\n * - `%e`: Day of the month, 1 through 31\n * - `%w`: Day of the week, 0 through 6\n * - `%b`: Short month, like 'Jan'\n * - `%B`: Long month, like 'January'\n * - `%m`: Two digit month number, 01 through 12\n * - `%y`: Two digits year, like 09 for 2009\n * - `%Y`: Four digits year, like 2009\n * - `%H`: Two digits hours in 24h format, 00 through 23\n * - `%k`: Hours in 24h format, 0 through 23\n * - `%I`: Two digits hours in 12h format, 00 through 11\n * - `%l`: Hours in 12h format, 1 through 12\n * - `%M`: Two digits minutes, 00 through 59\n * - `%p`: Upper case AM or PM\n * - `%P`: Lower case AM or PM\n * - `%S`: Two digits seconds, 00 through 59\n * - `%L`: Milliseconds (naming from Ruby)\n *\n * @example\n * const time = new Highcharts.Time();\n * const s = time.dateFormat('%Y-%m-%d %H:%M:%S', Date.UTC(2020, 0, 1));\n * console.log(s); // => 2020-01-01 00:00:00\n *\n * @function Highcharts.Time#dateFormat\n *\n * @param {string} format\n * The desired format where various time representations are\n * prefixed with %.\n *\n * @param {number} [timestamp]\n * The JavaScript timestamp.\n *\n * @param {boolean} [capitalize=false]\n * Upper case first letter in the return.\n *\n * @return {string}\n * The formatted date.\n */\n dateFormat(format, timestamp, capitalize) {\n if (!defined(timestamp) || isNaN(timestamp)) {\n return (H.defaultOptions.lang &&\n H.defaultOptions.lang.invalidDate ||\n '');\n }\n format = pick(format, '%Y-%m-%d %H:%M:%S');\n const time = this, date = new this.Date(timestamp), \n // Get the basic time values\n hours = this.get('Hours', date), day = this.get('Day', date), dayOfMonth = this.get('Date', date), month = this.get('Month', date), fullYear = this.get('FullYear', date), lang = H.defaultOptions.lang, langWeekdays = (lang && lang.weekdays), shortWeekdays = (lang && lang.shortWeekdays), \n // List all format keys. Custom formats can be added from the\n // outside.\n replacements = extend({\n // Day\n // Short weekday, like 'Mon'\n a: shortWeekdays ?\n shortWeekdays[day] :\n langWeekdays[day].substr(0, 3),\n // Long weekday, like 'Monday'\n A: langWeekdays[day],\n // Two digit day of the month, 01 to 31\n d: pad(dayOfMonth),\n // Day of the month, 1 through 31\n e: pad(dayOfMonth, 2, ' '),\n // Day of the week, 0 through 6\n w: day,\n // Week (none implemented)\n // 'W': weekNumber(),\n // Month\n // Short month, like 'Jan'\n b: lang.shortMonths[month],\n // Long month, like 'January'\n B: lang.months[month],\n // Two digit month number, 01 through 12\n m: pad(month + 1),\n // Month number, 1 through 12 (#8150)\n o: month + 1,\n // Year\n // Two digits year, like 09 for 2009\n y: fullYear.toString().substr(2, 2),\n // Four digits year, like 2009\n Y: fullYear,\n // Time\n // Two digits hours in 24h format, 00 through 23\n H: pad(hours),\n // Hours in 24h format, 0 through 23\n k: hours,\n // Two digits hours in 12h format, 00 through 11\n I: pad((hours % 12) || 12),\n // Hours in 12h format, 1 through 12\n l: (hours % 12) || 12,\n // Two digits minutes, 00 through 59\n M: pad(this.get('Minutes', date)),\n // Upper case AM or PM\n p: hours < 12 ? 'AM' : 'PM',\n // Lower case AM or PM\n P: hours < 12 ? 'am' : 'pm',\n // Two digits seconds, 00 through 59\n S: pad(this.get('Seconds', date)),\n // Milliseconds (naming from Ruby)\n L: pad(Math.floor(timestamp % 1000), 3)\n }, H.dateFormats);\n // Do the replaces\n objectEach(replacements, function (val, key) {\n // Regex would do it in one line, but this is faster\n while (format.indexOf('%' + key) !== -1) {\n format = format.replace('%' + key, typeof val === 'function' ? val.call(time, timestamp) : val);\n }\n });\n // Optionally capitalize the string and return\n return capitalize ?\n (format.substr(0, 1).toUpperCase() +\n format.substr(1)) :\n format;\n }\n /**\n * Resolve legacy formats of dateTimeLabelFormats (strings and arrays) into\n * an object.\n * @private\n * @param {string|Array<T>|Highcharts.Dictionary<T>} f\n * General format description\n * @return {Highcharts.Dictionary<T>}\n * The object definition\n */\n resolveDTLFormat(f) {\n if (!isObject(f, true)) { // Check for string or array\n f = splat(f);\n return {\n main: f[0],\n from: f[1],\n to: f[2]\n };\n }\n return f;\n }\n /**\n * Return an array with time positions distributed on round time values\n * right and right after min and max. Used in datetime axes as well as for\n * grouping data on a datetime axis.\n *\n * @function Highcharts.Time#getTimeTicks\n *\n * @param {Highcharts.TimeNormalizedObject} normalizedInterval\n * The interval in axis values (ms) and the count\n *\n * @param {number} [min]\n * The minimum in axis values\n *\n * @param {number} [max]\n * The maximum in axis values\n *\n * @param {number} [startOfWeek=1]\n *\n * @return {Highcharts.AxisTickPositionsArray}\n * Time positions\n */\n getTimeTicks(normalizedInterval, min, max, startOfWeek) {\n const time = this, Date = time.Date, tickPositions = [], higherRanks = {}, \n // When crossing DST, use the max. Resolves #6278.\n minDate = new Date(min), interval = normalizedInterval.unitRange, count = normalizedInterval.count || 1;\n let i, minYear, // Used in months and years as a basis for Date.UTC()\n variableDayLength, minDay;\n startOfWeek = pick(startOfWeek, 1);\n if (defined(min)) { // #1300\n time.set('Milliseconds', minDate, interval >= timeUnits.second ?\n 0 : // #3935\n count * Math.floor(time.get('Milliseconds', minDate) / count)); // #3652, #3654\n if (interval >= timeUnits.second) { // Second\n time.set('Seconds', minDate, interval >= timeUnits.minute ?\n 0 : // #3935\n count * Math.floor(time.get('Seconds', minDate) / count));\n }\n if (interval >= timeUnits.minute) { // Minute\n time.set('Minutes', minDate, interval >= timeUnits.hour ?\n 0 :\n count * Math.floor(time.get('Minutes', minDate) / count));\n }\n if (interval >= timeUnits.hour) { // Hour\n time.set('Hours', minDate, interval >= timeUnits.day ?\n 0 :\n count * Math.floor(time.get('Hours', minDate) / count));\n }\n if (interval >= timeUnits.day) { // Day\n time.set('Date', minDate, interval >= timeUnits.month ?\n 1 :\n Math.max(1, count * Math.floor(time.get('Date', minDate) / count)));\n }\n if (interval >= timeUnits.month) { // Month\n time.set('Month', minDate, interval >= timeUnits.year ? 0 :\n count * Math.floor(time.get('Month', minDate) / count));\n minYear = time.get('FullYear', minDate);\n }\n if (interval >= timeUnits.year) { // Year\n minYear -= minYear % count;\n time.set('FullYear', minDate, minYear);\n }\n // Week is a special case that runs outside the hierarchy\n if (interval === timeUnits.week) {\n // Get start of current week, independent of count\n minDay = time.get('Day', minDate);\n time.set('Date', minDate, (time.get('Date', minDate) -\n minDay + startOfWeek +\n // We don't want to skip days that are before\n // startOfWeek (#7051)\n (minDay < startOfWeek ? -7 : 0)));\n }\n // Get basics for variable time spans\n minYear = time.get('FullYear', minDate);\n const minMonth = time.get('Month', minDate), minDateDate = time.get('Date', minDate), minHours = time.get('Hours', minDate);\n // Redefine min to the floored/rounded minimum time (#7432)\n min = minDate.getTime();\n // Handle local timezone offset\n if ((time.variableTimezone || !time.useUTC) && defined(max)) {\n // Detect whether we need to take the DST crossover into\n // consideration. If we're crossing over DST, the day length may\n // be 23h or 25h and we need to compute the exact clock time for\n // each tick instead of just adding hours. This comes at a cost,\n // so first we find out if it is needed (#4951).\n variableDayLength = (\n // Long range, assume we're crossing over.\n max - min > 4 * timeUnits.month ||\n // Short range, check if min and max are in different time\n // zones.\n time.getTimezoneOffset(min) !==\n time.getTimezoneOffset(max));\n }\n // Iterate and add tick positions at appropriate values\n let t = minDate.getTime();\n i = 1;\n while (t < max) {\n tickPositions.push(t);\n // If the interval is years, use Date.UTC to increase years\n if (interval === timeUnits.year) {\n t = time.makeTime(minYear + i * count, 0);\n // If the interval is months, use Date.UTC to increase months\n }\n else if (interval === timeUnits.month) {\n t = time.makeTime(minYear, minMonth + i * count);\n // If we're using global time, the interval is not fixed as it\n // jumps one hour at the DST crossover\n }\n else if (variableDayLength &&\n (interval === timeUnits.day || interval === timeUnits.week)) {\n t = time.makeTime(minYear, minMonth, minDateDate +\n i * count * (interval === timeUnits.day ? 1 : 7));\n }\n else if (variableDayLength &&\n interval === timeUnits.hour &&\n count > 1) {\n // Make sure higher ranks are preserved across DST (#6797,\n // #7621)\n t = time.makeTime(minYear, minMonth, minDateDate, minHours + i * count);\n // Else, the interval is fixed and we use simple addition\n }\n else {\n t += interval * count;\n }\n i++;\n }\n // Push the last time\n tickPositions.push(t);\n // Handle higher ranks. Mark new days if the time is on midnight\n // (#950, #1649, #1760, #3349). Use a reasonable dropout threshold\n // to prevent looping over dense data grouping (#6156).\n if (interval <= timeUnits.hour && tickPositions.length < 10000) {\n tickPositions.forEach(function (t) {\n if (\n // Speed optimization, no need to run dateFormat unless\n // we're on a full or half hour\n t % 1800000 === 0 &&\n // Check for local or global midnight\n time.dateFormat('%H%M%S%L', t) === '000000000') {\n higherRanks[t] = 'day';\n }\n });\n }\n }\n // Record information on the chosen unit - for dynamic label formatter\n tickPositions.info = extend(normalizedInterval, {\n higherRanks,\n totalRange: interval * count\n });\n return tickPositions;\n }\n /**\n * Get the optimal date format for a point, based on a range.\n *\n * @private\n * @function Highcharts.Time#getDateFormat\n *\n * @param {number} range\n * The time range\n *\n * @param {number} timestamp\n * The timestamp of the date\n *\n * @param {number} startOfWeek\n * An integer representing the first day of the week, where 0 is\n * Sunday.\n *\n * @param {Highcharts.Dictionary<string>} dateTimeLabelFormats\n * A map of time units to formats.\n *\n * @return {string}\n * The optimal date format for a point.\n */\n getDateFormat(range, timestamp, startOfWeek, dateTimeLabelFormats) {\n const dateStr = this.dateFormat('%m-%d %H:%M:%S.%L', timestamp), blank = '01-01 00:00:00.000', strpos = {\n millisecond: 15,\n second: 12,\n minute: 9,\n hour: 6,\n day: 3\n };\n let n = 'millisecond', \n // For sub-millisecond data, #4223\n lastN = n;\n for (n in timeUnits) { // eslint-disable-line guard-for-in\n // If the range is exactly one week and we're looking at a\n // Sunday/Monday, go for the week format\n if (range === timeUnits.week &&\n +this.dateFormat('%w', timestamp) === startOfWeek &&\n dateStr.substr(6) === blank.substr(6)) {\n n = 'week';\n break;\n }\n // The first format that is too great for the range\n if (timeUnits[n] > range) {\n n = lastN;\n break;\n }\n // If the point is placed every day at 23:59, we need to show\n // the minutes as well. #2637.\n if (strpos[n] &&\n dateStr.substr(strpos[n]) !== blank.substr(strpos[n])) {\n break;\n }\n // Weeks are outside the hierarchy, only apply them on\n // Mondays/Sundays like in the first condition\n if (n !== 'week') {\n lastN = n;\n }\n }\n return this.resolveDTLFormat(dateTimeLabelFormats[n]).main;\n }\n }\n Time.formatCache = {};\n /* *\n *\n * Default export\n *\n * */\n /* *\n *\n * API Declarations\n *\n * */\n /**\n * Normalized interval.\n *\n * @interface Highcharts.TimeNormalizedObject\n */ /**\n * The count.\n *\n * @name Highcharts.TimeNormalizedObject#count\n * @type {number|undefined}\n */ /**\n * The interval in axis values (ms).\n *\n * @name Highcharts.TimeNormalizedObject#unitRange\n * @type {number}\n */\n /**\n * Function of an additional date format specifier.\n *\n * @callback Highcharts.TimeFormatCallbackFunction\n *\n * @param {number} timestamp\n * The time to format.\n *\n * @return {string}\n * The formatted portion of the date.\n */\n /**\n * Time ticks.\n *\n * @interface Highcharts.AxisTickPositionsArray\n * @extends global.Array<number>\n */ /**\n * @name Highcharts.AxisTickPositionsArray#info\n * @type {Highcharts.TimeTicksInfoObject|undefined}\n */\n /**\n * A callback to return the time zone offset for a given datetime. It\n * takes the timestamp in terms of milliseconds since January 1 1970,\n * and returns the timezone offset in minutes. This provides a hook\n * for drawing time based charts in specific time zones using their\n * local DST crossover dates, with the help of external libraries.\n *\n * @callback Highcharts.TimezoneOffsetCallbackFunction\n *\n * @param {number} timestamp\n * Timestamp in terms of milliseconds since January 1 1970.\n *\n * @return {number}\n * Timezone offset in minutes.\n */\n ''; // Keeps doclets above in JS file\n\n return Time;\n });\n _registerModule(_modules, 'Core/Defaults.js', [_modules['Core/Chart/ChartDefaults.js'], _modules['Core/Globals.js'], _modules['Core/Color/Palettes.js'], _modules['Core/Time.js'], _modules['Core/Utilities.js']], function (ChartDefaults, H, Palettes, Time, U) {\n /* *\n *\n * (c) 2010-2024 Torstein Honsi\n *\n * License: www.highcharts.com/license\n *\n * !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!\n *\n * */\n const { isTouchDevice } = H;\n const { fireEvent, merge } = U;\n /* *\n *\n * API Options\n *\n * */\n /**\n * Global default settings.\n *\n * @name Highcharts.defaultOptions\n * @type {Highcharts.Options}\n */ /**\n * @optionparent\n * @private\n */\n const defaultOptions = {\n /**\n * An array containing the default colors for the chart's series. When\n * all colors are used, new colors are pulled from the start again.\n *\n * Default colors can also be set on a series or series.type basis,\n * see [column.colors](#plotOptions.column.colors),\n * [pie.colors](#plotOptions.pie.colors).\n *\n * In styled mode, the colors option doesn't exist. Instead, colors\n * are defined in CSS and applied either through series or point class\n * names, or through the [chart.colorCount](#chart.colorCount) option.\n *\n * @sample {highcharts} highcharts/chart/colors/\n * Assign a global color theme\n * @sample highcharts/members/theme-v10/\n * Latest release styled like version 10\n *\n * @type {Array<(Highcharts.ColorString|Highcharts.GradientColorObject|Highcharts.PatternObject)>}\n * @default [\n * \"#2caffe\",\n * \"#544fc5\",\n * \"#00e272\",\n * \"#fe6a35\",\n * \"#6b8abc\",\n * \"#d568fb\",\n * \"#2ee0ca\",\n * \"#fa4b42\",\n * \"#feb56a\",\n * \"#91e8e1\"\n * ]\n */\n colors: Palettes.colors,\n /**\n * Styled mode only. Configuration object for adding SVG definitions for\n * reusable elements. See [gradients, shadows and\n * patterns](https://www.highcharts.com/docs/chart-design-and-style/gradients-shadows-and-patterns)\n * for more information and code examples.\n *\n * @type {*}\n * @since 5.0.0\n * @apioption defs\n */\n /**\n * @ignore-option\n */\n symbols: ['circle', 'diamond', 'square', 'triangle', 'triangle-down'],\n /**\n * The language object is global and it can't be set on each chart\n * initialization. Instead, use `Highcharts.setOptions` to set it before any\n * chart is initialized.\n *\n * ```js\n * Highcharts.setOptions({\n * lang: {\n * months: [\n * 'Janvier', 'Février', 'Mars', 'Avril',\n * 'Mai', 'Juin', 'Juillet', 'Août',\n * 'Septembre', 'Octobre', 'Novembre', 'Décembre'\n * ],\n * weekdays: [\n * 'Dimanche', 'Lundi', 'Mardi', 'Mercredi',\n * 'Jeudi', 'Vendredi', 'Samedi'\n * ]\n * }\n * });\n * ```\n */\n lang: {\n /**\n * The loading text that appears when the chart is set into the loading\n * state following a call to `chart.showLoading`.\n */\n loading: 'Loading...',\n /**\n * An array containing the months names. Corresponds to the `%B` format\n * in `Highcharts.dateFormat()`.\n *\n * @type {Array<string>}\n * @default [\"January\", \"February\", \"March\", \"April\", \"May\", \"June\",\n * \"July\", \"August\", \"September\", \"October\", \"November\",\n * \"December\"]\n */\n months: [\n 'January', 'February', 'March', 'April', 'May', 'June', 'July',\n 'August', 'September', 'October', 'November', 'December'\n ],\n /**\n * An array containing the months names in abbreviated form. Corresponds\n * to the `%b` format in `Highcharts.dateFormat()`.\n *\n * @type {Array<string>}\n * @default [\"Jan\", \"Feb\", \"Mar\", \"Apr\", \"May\", \"Jun\",\n * \"Jul\", \"Aug\", \"Sep\", \"Oct\", \"Nov\", \"Dec\"]\n */\n shortMonths: [\n 'Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul',\n 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'\n ],\n /**\n * An array containing the weekday names.\n *\n * @type {Array<string>}\n * @default [\"Sunday\", \"Monday\", \"Tuesday\", \"Wednesday\", \"Thursday\",\n * \"Friday\", \"Saturday\"]\n */\n weekdays: [\n 'Sunday', 'Monday', 'Tuesday', 'Wednesday',\n 'Thursday', 'Friday', 'Saturday'\n ],\n /**\n * Short week days, starting Sunday. If not specified, Highcharts uses\n * the first three letters of the `lang.weekdays` option.\n *\n * @sample highcharts/lang/shortweekdays/\n * Finnish two-letter abbreviations\n *\n * @type {Array<string>}\n * @since 4.2.4\n * @apioption lang.shortWeekdays\n */\n /**\n * What to show in a date field for invalid dates. Defaults to an empty\n * string.\n *\n * @type {string}\n * @since 4.1.8\n * @product highcharts highstock\n * @apioption lang.invalidDate\n */\n /**\n * The title appearing on hovering the zoom in button. The text itself\n * defaults to \"+\" and can be changed in the button options.\n *\n * @type {string}\n * @default Zoom in\n * @product highmaps\n * @apioption lang.zoomIn\n */\n /**\n * The title appearing on hovering the zoom out button. The text itself\n * defaults to \"-\" and can be changed in the button options.\n *\n * @type {string}\n * @default Zoom out\n * @product highmaps\n * @apioption lang.zoomOut\n */\n /**\n * The default decimal point used in the `Highcharts.numberFormat`\n * method unless otherwise specified in the function arguments.\n *\n * @since 1.2.2\n */\n decimalPoint: '.',\n /**\n * [Metric prefixes](https://en.wikipedia.org/wiki/Metric_prefix) used\n * to shorten high numbers in axis labels. Replacing any of the\n * positions with `null` causes the full number to be written. Setting\n * `numericSymbols` to `undefined` disables shortening altogether.\n *\n * @sample {highcharts} highcharts/lang/numericsymbols/\n * Replacing the symbols with text\n * @sample {highstock} highcharts/lang/numericsymbols/\n * Replacing the symbols with text\n *\n * @type {Array<string>}\n * @default [\"k\", \"M\", \"G\", \"T\", \"P\", \"E\"]\n * @since 2.3.0\n */\n numericSymbols: ['k', 'M', 'G', 'T', 'P', 'E'],\n /**\n * The magnitude of [numericSymbols](#lang.numericSymbol) replacements.\n * Use 10000 for Japanese, Korean and various Chinese locales, which\n * use symbols for 10^4, 10^8 and 10^12.\n *\n * @sample highcharts/lang/numericsymbolmagnitude/\n * 10000 magnitude for Japanese\n *\n * @type {number}\n * @default 1000\n * @since 5.0.3\n * @apioption lang.numericSymbolMagnitude\n */\n /**\n * The text for the label appearing when a chart is zoomed.\n *\n * @since 1.2.4\n */\n resetZoom: 'Reset zoom',\n /**\n * The tooltip title for the label appearing when a chart is zoomed.\n *\n * @since 1.2.4\n */\n resetZoomTitle: 'Reset zoom level 1:1',\n /**\n * The default thousands separator used in the `Highcharts.numberFormat`\n * method unless otherwise specified in the function arguments. Defaults\n * to a single space character, which is recommended in\n * [ISO 31-0](https://en.wikipedia.org/wiki/ISO_31-0#Numbers) and works\n * across Anglo-American and continental European languages.\n *\n * @default \\u0020\n * @since 1.2.2\n */\n thousandsSep: ' '\n },\n /**\n * Global options that don't apply to each chart. These options, like\n * the `lang` options, must be set using the `Highcharts.setOptions`\n * method.\n *\n * ```js\n * Highcharts.setOptions({\n * global: {\n * buttonTheme: {\n * fill: '#d0d0d0'\n * }\n * }\n * });\n * ```\n */\n global: {\n /**\n * _Canvg rendering for Android 2.x is removed as of Highcharts 5.0\\.\n * Use the [libURL](#exporting.libURL) option to configure exporting._\n *\n * The URL to the additional file to lazy load for Android 2.x devices.\n * These devices don't support SVG, so we download a helper file that\n * contains [canvg](https://github.com/canvg/canvg), its dependency\n * rbcolor, and our own CanVG Renderer class. To avoid hotlinking to\n * our site, you can install canvas-tools.js on your own server and\n * change this option accordingly.\n *\n * @deprecated\n *\n * @type {string}\n * @default https://code.highcharts.com/{version}/modules/canvas-tools.js\n * @product highcharts highmaps\n * @apioption global.canvasToolsURL\n */\n /**\n * This option is deprecated since v6.0.5. Instead, use\n * [time.useUTC](#time.useUTC) that supports individual time settings\n * per chart.\n *\n * @deprecated\n *\n * @type {boolean}\n * @apioption global.useUTC\n */\n /**\n * This option is deprecated since v6.0.5. Instead, use\n * [time.Date](#time.Date) that supports individual time settings\n * per chart.\n *\n * @deprecated\n *\n * @type {Function}\n * @product highcharts highstock\n * @apioption global.Date\n */\n /**\n * This option is deprecated since v6.0.5. Instead, use\n * [time.getTimezoneOffset](#time.getTimezoneOffset) that supports\n * individual time settings per chart.\n *\n * @deprecated\n *\n * @type {Function}\n * @product highcharts highstock\n * @apioption global.getTimezoneOffset\n */\n /**\n * This option is deprecated since v6.0.5. Instead, use\n * [time.timezone](#time.timezone) that supports individual time\n * settings per chart.\n *\n * @deprecated\n *\n * @type {string}\n * @product highcharts highstock\n * @apioption global.timezone\n */\n /**\n * This option is deprecated since v6.0.5. Instead, use\n * [time.timezoneOffset](#time.timezoneOffset) that supports individual\n * time settings per chart.\n *\n * @deprecated\n *\n * @type {number}\n * @product highcharts highstock\n * @apioption global.timezoneOffset\n */\n /**\n * General theme for buttons. This applies to the zoom button, exporting\n * context menu, map navigation, range selector buttons and custom\n * buttons generated using the `SVGRenderer.button` function. However,\n * each of these may be overridden with more specific options.\n *\n * @sample highcharts/global/buttontheme\n * General button theme\n * @since 11.4.2\n */\n buttonTheme: {\n /**\n * The fill color for buttons\n */\n fill: \"#f7f7f7\" /* Palette.neutralColor3 */,\n /**\n * The padding of buttons\n */\n padding: 8,\n /**\n * The border radius for buttons\n */\n r: 2,\n /**\n * The stroke color for buttons\n */\n stroke: \"#cccccc\" /* Palette.neutralColor20 */,\n /**\n * The stroke width for buttons\n */\n 'stroke-width': 1,\n /**\n * CSS styling for the buttons' text\n */\n style: {\n color: \"#333333\" /* Palette.neutralColor80 */,\n cursor: 'pointer',\n fontSize: '0.8em',\n fontWeight: 'normal'\n },\n /**\n * State overrides for the buttons\n */\n states: {\n /**\n * Hover state overrides for the buttons are applied in addition\n * to the normal state options\n */\n hover: {\n fill: \"#e6e6e6\" /* Palette.neutralColor10 */\n },\n /**\n * Select state overrides for the buttons are applied in\n * addition to the normal state options\n */\n select: {\n fill: \"#e6e9ff\" /* Palette.highlightColor10 */,\n style: {\n color: \"#000000\" /* Palette.neutralColor100 */,\n fontWeight: 'bold'\n }\n },\n /**\n * Disabled state overrides for the buttons are applied in\n * addition to the normal state options\n */\n disabled: {\n /**\n * Disabled state CSS style overrides for the buttons' text\n */\n style: {\n color: \"#cccccc\" /* Palette.neutralColor20 */\n }\n }\n }\n }\n },\n /**\n * Time options that can apply globally or to individual charts. These\n * settings affect how `datetime` axes are laid out, how tooltips are\n * formatted, how series\n * [pointIntervalUnit](#plotOptions.series.pointIntervalUnit) works and how\n * the Highcharts Stock range selector handles time.\n *\n * The common use case is that all charts in the same Highcharts object\n * share the same time settings, in which case the global settings are set\n * using `setOptions`.\n *\n * ```js\n * // Apply time settings globally\n * Highcharts.setOptions({\n * time: {\n * timezone: 'Europe/London'\n * }\n * });\n * // Apply time settings by instance\n * let chart = Highcharts.chart('container', {\n * time: {\n * timezone: 'America/New_York'\n * },\n * series: [{\n * data: [1, 4, 3, 5]\n * }]\n * });\n *\n * // Use the Time object\n * console.log(\n * 'Current time in New York',\n * chart.time.dateFormat('%Y-%m-%d %H:%M:%S', Date.now())\n * );\n * ```\n *\n * Since v6.0.5, the time options were moved from the `global` object to the\n * `time` object, and time options can be set on each individual chart.\n *\n * @sample {highcharts|highstock}\n * highcharts/time/timezone/\n * Set the timezone globally\n * @sample {highcharts}\n * highcharts/time/individual/\n * Set the timezone per chart instance\n * @sample {highstock}\n * stock/time/individual/\n * Set the timezone per chart instance\n *\n * @since 6.0.5\n * @optionparent time\n */\n time: {\n /**\n * A custom `Date` class for advanced date handling. For example,\n * [JDate](https://github.com/tahajahangir/jdate) can be hooked in to\n * handle Jalali dates.\n *\n * @type {*}\n * @since 4.0.4\n * @product highcharts highstock gantt\n */\n Date: void 0,\n /**\n * A callback to return the time zone offset for a given datetime. It\n * takes the timestamp in terms of milliseconds since January 1 1970,\n * and returns the timezone offset in minutes. This provides a hook\n * for drawing time based charts in specific time zones using their\n * local DST crossover dates, with the help of external libraries.\n *\n * This option is deprecated as of v11.4.1 and will be removed in a\n * future release. Use the [time.timezone](#time.timezone) option\n * instead.\n *\n * @sample {highcharts|highstock} highcharts/time/gettimezoneoffset/\n * Use moment.js to draw Oslo time regardless of browser locale\n *\n * @type {Highcharts.TimezoneOffsetCallbackFunction}\n * @since 4.1.0\n * @deprecated 11.4.2\n * @product highcharts highstock gantt\n */\n getTimezoneOffset: void 0,\n /**\n * A named time zone. Supported time zone names rely on the browser\n * implementations, as described in the [mdn\n * docs](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat/DateTimeFormat#timezone).\n * If the given time zone is not recognized by the browser, Highcharts\n * provides a warning and falls back to returning a 0 offset,\n * corresponding to the UTC time zone.\n *\n * Until v11.2.0, this option depended on moment.js.\n *\n * @sample {highcharts|highstock} highcharts/time/timezone/ Europe/Oslo\n *\n * @type {string}\n * @since 5.0.7\n * @product highcharts highstock gantt\n */\n timezone: void 0,\n /**\n * The timezone offset in minutes. Positive values are west, negative\n * values are east of UTC, as in the ECMAScript\n * [getTimezoneOffset](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/getTimezoneOffset)\n * method. Use this to display UTC based data in a predefined time zone.\n *\n * This option is deprecated as of v11.4.1 and will be removed in a\n * future release. Use the [time.timezone](#time.timezone) option\n * instead.\n *\n * @see [time.getTimezoneOffset](#time.getTimezoneOffset)\n *\n * @sample {highcharts|highstock} highcharts/time/timezoneoffset/\n * Timezone offset\n *\n * @since 3.0.8\n * @deprecated 11.4.2\n * @product highcharts highstock gantt\n */\n timezoneOffset: 0,\n /**\n * Whether to use UTC time for axis scaling, tickmark placement and\n * time display in `Highcharts.dateFormat`. Advantages of using UTC\n * is that the time displays equally regardless of the user agent's\n * time zone settings. Local time can be used when the data is loaded\n * in real time or when correct Daylight Saving Time transitions are\n * required.\n *\n * @sample {highcharts} highcharts/time/useutc-true/\n * True by default\n * @sample {highcharts} highcharts/time/useutc-false/\n * False\n */\n useUTC: true\n },\n chart: ChartDefaults,\n /**\n * The chart's main title.\n *\n * @sample {highmaps} maps/title/title/\n * Title options demonstrated\n */\n title: {\n /**\n * When the title is floating, the plot area will not move to make space\n * for it.\n *\n * @sample {highcharts} highcharts/chart/zoomtype-none/\n * False by default\n * @sample {highcharts} highcharts/title/floating/\n * True - title on top of the plot area\n * @sample {highstock} stock/chart/title-floating/\n * True - title on top of the plot area\n *\n * @type {boolean}\n * @default false\n * @since 2.1\n * @apioption title.floating\n */\n /**\n * Whether to\n * [use HTML](https://www.highcharts.com/docs/chart-concepts/labels-and-string-formatting#html)\n * to render the text.\n *\n * @type {boolean}\n * @default false\n * @apioption title.useHTML\n */\n /**\n * The vertical alignment of the title. Can be one of `\"top\"`,\n * `\"middle\"` and `\"bottom\"`. When a value is given, the title behaves\n * as if [floating](#title.floating) were `true`.\n *\n * @sample {highcharts} highcharts/title/verticalalign/\n * Chart title in bottom right corner\n * @sample {highstock} stock/chart/title-verticalalign/\n * Chart title in bottom right corner\n *\n * @type {Highcharts.VerticalAlignValue}\n * @since 2.1\n * @apioption title.verticalAlign\n */\n /**\n * The x position of the title relative to the alignment within\n * `chart.spacingLeft` and `chart.spacingRight`.\n *\n * @sample {highcharts} highcharts/title/align/\n * Aligned to the plot area (x = 70px = margin left - spacing\n * left)\n * @sample {highstock} stock/chart/title-align/\n * Aligned to the plot area (x = 50px = margin left - spacing\n * left)\n *\n * @type {number}\n * @default 0\n * @since 2.0\n * @apioption title.x\n */\n /**\n * The y position of the title relative to the alignment within\n * [chart.spacingTop](#chart.spacingTop) and [chart.spacingBottom](\n * #chart.spacingBottom). By default it depends on the font size.\n *\n * @sample {highcharts} highcharts/title/y/\n * Title inside the plot area\n * @sample {highstock} stock/chart/title-verticalalign/\n * Chart title in bottom right corner\n *\n * @type {number}\n * @since 2.0\n * @apioption title.y\n */\n /**\n * CSS styles for the title. Use this for font styling, but use `align`,\n * `x` and `y` for text alignment.\n *\n * In styled mode, the title style is given in the `.highcharts-title`\n * class.\n *\n * @sample {highcharts} highcharts/title/style/\n * Custom color and weight\n * @sample {highstock} stock/chart/title-style/\n * Custom color and weight\n * @sample highcharts/css/titles/\n * Styled mode\n *\n * @type {Highcharts.CSSObject}\n * @default {highcharts|highmaps} { \"color\": \"#333333\", \"fontSize\": \"18px\" }\n * @default {highstock} { \"color\": \"#333333\", \"fontSize\": \"16px\" }\n */\n style: {\n color: \"#333333\" /* Palette.neutralColor80 */,\n fontWeight: 'bold'\n },\n /**\n * The title of the chart. To disable the title, set the `text` to\n * `undefined`.\n *\n * @sample {highcharts} highcharts/title/text/\n * Custom title\n * @sample {highstock} stock/chart/title-text/\n * Custom title\n *\n * @default {highcharts|highmaps} Chart title\n * @default {highstock} undefined\n */\n text: 'Chart title',\n /**\n * The horizontal alignment of the title. Can be one of \"left\", \"center\"\n * and \"right\".\n *\n * @sample {highcharts} highcharts/title/align/\n * Aligned to the plot area (x = 70px = margin left - spacing\n * left)\n * @sample {highstock} stock/chart/title-align/\n * Aligned to the plot area (x = 50px = margin left - spacing\n * left)\n *\n * @type {Highcharts.AlignValue}\n * @since 2.0\n */\n align: 'center',\n /**\n * The margin between the title and the plot area, or if a subtitle\n * is present, the margin between the subtitle and the plot area.\n *\n * @sample {highcharts} highcharts/title/margin-50/\n * A chart title margin of 50\n * @sample {highcharts} highcharts/title/margin-subtitle/\n * The same margin applied with a subtitle\n * @sample {highstock} stock/chart/title-margin/\n * A chart title margin of 50\n *\n * @since 2.1\n */\n margin: 15,\n /**\n * Adjustment made to the title width, normally to reserve space for\n * the exporting burger menu.\n *\n * @sample highcharts/title/widthadjust/\n * Wider menu, greater padding\n *\n * @since 4.2.5\n */\n widthAdjust: -44\n },\n /**\n * The chart's subtitle. This can be used both to display a subtitle below\n * the main title, and to display random text anywhere in the chart. The\n * subtitle can be updated after chart initialization through the\n * `Chart.setTitle` method.\n *\n * @sample {highmaps} maps/title/subtitle/\n * Subtitle options demonstrated\n */\n subtitle: {\n /**\n * When the subtitle is floating, the plot area will not move to make\n * space for it.\n *\n * @sample {highcharts} highcharts/subtitle/floating/\n * Floating title and subtitle\n * @sample {highstock} stock/chart/subtitle-footnote\n * Footnote floating at bottom right of plot area\n *\n * @type {boolean}\n * @default false\n * @since 2.1\n * @apioption subtitle.floating\n */\n /**\n * CSS styles for the title.\n *\n * In styled mode, the subtitle style is given in the\n * `.highcharts-subtitle` class.\n *\n * @sample {highcharts} highcharts/subtitle/style/\n * Custom color and weight\n * @sample {highcharts} highcharts/css/titles/\n * Styled mode\n * @sample {highstock} stock/chart/subtitle-style\n * Custom color and weight\n * @sample {highstock} highcharts/css/titles/\n * Styled mode\n * @sample {highmaps} highcharts/css/titles/\n * Styled mode\n *\n * @type {Highcharts.CSSObject}\n * @default {\"color\": \"#666666\"}\n * @apioption subtitle.style\n */\n /**\n * Whether to\n * [use HTML](https://www.highcharts.com/docs/chart-concepts/labels-and-string-formatting#html)\n * to render the text.\n *\n * @type {boolean}\n * @default false\n * @apioption subtitle.useHTML\n */\n /**\n * The vertical alignment of the title. Can be one of `\"top\"`,\n * `\"middle\"` and `\"bottom\"`. When middle, the subtitle behaves as\n * floating.\n *\n * @sample {highcharts} highcharts/subtitle/verticalalign/\n * Footnote at the bottom right of plot area\n * @sample {highstock} stock/chart/subtitle-footnote\n * Footnote at the bottom right of plot area\n *\n * @type {Highcharts.VerticalAlignValue}\n * @since 2.1\n * @apioption subtitle.verticalAlign\n */\n /**\n * The x position of the subtitle relative to the alignment within\n * `chart.spacingLeft` and `chart.spacingRight`.\n *\n * @sample {highcharts} highcharts/subtitle/align/\n * Footnote at right of plot area\n * @sample {highstock} stock/chart/subtitle-footnote\n * Footnote at the bottom right of plot area\n *\n * @type {number}\n * @default 0\n * @since 2.0\n * @apioption subtitle.x\n */\n /**\n * The y position of the subtitle relative to the alignment within\n * `chart.spacingTop` and `chart.spacingBottom`. By default the subtitle\n * is laid out below the title unless the title is floating.\n *\n * @sample {highcharts} highcharts/subtitle/verticalalign/\n * Footnote at the bottom right of plot area\n * @sample {highstock} stock/chart/subtitle-footnote\n * Footnote at the bottom right of plot area\n *\n * @type {number}\n * @since 2.0\n * @apioption subtitle.y\n */\n /**\n * CSS styles for the title.\n *\n * In styled mode, the subtitle style is given in the\n * `.highcharts-subtitle` class.\n *\n * @sample {highcharts} highcharts/subtitle/style/\n * Custom color and weight\n * @sample {highcharts} highcharts/css/titles/\n * Styled mode\n * @sample {highstock} stock/chart/subtitle-style\n * Custom color and weight\n * @sample {highstock} highcharts/css/titles/\n * Styled mode\n * @sample {highmaps} highcharts/css/titles/\n * Styled mode\n *\n * @type {Highcharts.CSSObject}\n * @default {\"color\": \"#666666\"}\n */\n style: {\n color: \"#666666\" /* Palette.neutralColor60 */,\n fontSize: '0.8em'\n },\n /**\n * The subtitle of the chart.\n *\n * @sample {highcharts|highstock} highcharts/subtitle/text/\n * Custom subtitle\n * @sample {highcharts|highstock} highcharts/subtitle/text-formatted/\n * Formatted and linked text.\n */\n text: '',\n /**\n * The horizontal alignment of the subtitle. Can be one of \"left\",\n * \"center\" and \"right\".\n *\n * @sample {highcharts} highcharts/subtitle/align/\n * Footnote at right of plot area\n * @sample {highstock} stock/chart/subtitle-footnote\n * Footnote at bottom right of plot area\n *\n * @type {Highcharts.AlignValue}\n * @since 2.0\n */\n align: 'center',\n /**\n * Adjustment made to the subtitle width, normally to reserve space\n * for the exporting burger menu.\n *\n * @see [title.widthAdjust](#title.widthAdjust)\n *\n * @sample highcharts/title/widthadjust/\n * Wider menu, greater padding\n *\n * @since 4.2.5\n */\n widthAdjust: -44\n },\n /**\n * The chart's caption, which will render below the chart and will be part\n * of exported charts. The caption can be updated after chart initialization\n * through the `Chart.update` or `Chart.caption.update` methods.\n *\n * @sample highcharts/caption/text/\n * A chart with a caption\n * @since 7.2.0\n */\n caption: {\n /**\n * When the caption is floating, the plot area will not move to make\n * space for it.\n *\n * @type {boolean}\n * @default false\n * @apioption caption.floating\n */\n /**\n * The margin between the caption and the plot area.\n */\n margin: 15,\n /**\n * Whether to\n * [use HTML](https://www.highcharts.com/docs/chart-concepts/labels-and-string-formatting#html)\n * to render the text.\n *\n * @type {boolean}\n * @default false\n * @apioption caption.useHTML\n */\n /**\n * The x position of the caption relative to the alignment within\n * `chart.spacingLeft` and `chart.spacingRight`.\n *\n * @type {number}\n * @default 0\n * @apioption caption.x\n */\n /**\n * The y position of the caption relative to the alignment within\n * `chart.spacingTop` and `chart.spacingBottom`.\n *\n * @type {number}\n * @apioption caption.y\n */\n /**\n * CSS styles for the caption.\n *\n * In styled mode, the caption style is given in the\n * `.highcharts-caption` class.\n *\n * @sample {highcharts} highcharts/css/titles/\n * Styled mode\n *\n * @type {Highcharts.CSSObject}\n * @default {\"color\": \"#666666\"}\n */\n style: {\n color: \"#666666\" /* Palette.neutralColor60 */,\n fontSize: '0.8em'\n },\n /**\n * The caption text of the chart.\n *\n * @sample {highcharts} highcharts/caption/text/\n * Custom caption\n */\n text: '',\n /**\n * The horizontal alignment of the caption. Can be one of \"left\",\n * \"center\" and \"right\".\n *\n * @type {Highcharts.AlignValue}\n */\n align: 'left',\n /**\n * The vertical alignment of the caption. Can be one of `\"top\"`,\n * `\"middle\"` and `\"bottom\"`. When middle, the caption behaves as\n * floating.\n *\n * @type {Highcharts.VerticalAlignValue}\n */\n verticalAlign: 'bottom'\n },\n /**\n * The plotOptions is a wrapper object for config objects for each series\n * type. The config objects for each series can also be overridden for\n * each series item as given in the series array.\n *\n * Configuration options for the series are given in three levels. Options\n * for all series in a chart are given in the [plotOptions.series](\n * #plotOptions.series) object. Then options for all series of a specific\n * type are given in the plotOptions of that type, for example\n * `plotOptions.line`. Next, options for one single series are given in\n * [the series array](#series).\n */\n plotOptions: {},\n /**\n * The legend is a box containing a symbol and name for each series\n * item or point item in the chart. Each series (or points in case\n * of pie charts) is represented by a symbol and its name in the legend.\n *\n * It is possible to override the symbol creator function and create\n * [custom legend symbols](https://jsfiddle.net/gh/get/library/pure/highcharts/highcharts/tree/master/samples/highcharts/studies/legend-custom-symbol/).\n *\n * @productdesc {highmaps}\n * A Highmaps legend by default contains one legend item per series, but if\n * a `colorAxis` is defined, the axis will be displayed in the legend.\n * Either as a gradient, or as multiple legend items for `dataClasses`.\n */\n legend: {\n /**\n * The background color of the legend.\n *\n * @see In styled mode, the legend background fill can be applied with\n * the `.highcharts-legend-box` class.\n *\n * @sample {highcharts} highcharts/legend/backgroundcolor/\n * Yellowish background\n * @sample {highstock} stock/legend/align/\n * Various legend options\n * @sample {highmaps} maps/legend/border-background/\n * Border and background options\n *\n * @type {Highcharts.ColorString|Highcharts.GradientColorObject|Highcharts.PatternObject}\n * @apioption legend.backgroundColor\n */\n /**\n * The width of the drawn border around the legend.\n *\n * @see In styled mode, the legend border stroke width can be applied\n * with the `.highcharts-legend-box` class.\n *\n * @sample {highcharts} highcharts/legend/borderwidth/\n * 2px border width\n * @sample {highstock} stock/legend/align/\n * Various legend options\n * @sample {highmaps} maps/legend/border-background/\n * Border and background options\n *\n * @type {number}\n * @default 0\n * @apioption legend.borderWidth\n */\n /**\n * Enable or disable the legend. There is also a series-specific option,\n * [showInLegend](#plotOptions.series.showInLegend), that can hide the\n * series from the legend. In some series types this is `false` by\n * default, so it must set to `true` in order to show the legend for the\n * series.\n *\n * @sample {highcharts} highcharts/legend/enabled-false/ Legend disabled\n * @sample {highstock} stock/legend/align/ Various legend options\n * @sample {highmaps} maps/legend/enabled-false/ Legend disabled\n *\n * @default {highstock} false\n * @default {highmaps} true\n * @default {gantt} false\n */\n enabled: true,\n /**\n * The horizontal alignment of the legend box within the chart area.\n * Valid values are `left`, `center` and `right`.\n *\n * In the case that the legend is aligned in a corner position, the\n * `layout` option will determine whether to place it above/below\n * or on the side of the plot area.\n *\n * @sample {highcharts} highcharts/legend/align/\n * Legend at the right of the chart\n * @sample {highstock} stock/legend/align/\n * Various legend options\n * @sample {highmaps} maps/legend/alignment/\n * Legend alignment\n *\n * @type {Highcharts.AlignValue}\n * @since 2.0\n */\n align: 'center',\n /**\n * If the [layout](legend.layout) is `horizontal` and the legend items\n * span over two lines or more, whether to align the items into vertical\n * columns. Setting this to `false` makes room for more items, but will\n * look more messy.\n *\n * @since 6.1.0\n */\n alignColumns: true,\n /**\n * A CSS class name to apply to the legend group.\n */\n className: 'highcharts-no-tooltip',\n /**\n * General event handlers for the legend. These event hooks can\n * also be attached to the legend at run time using the\n * `Highcharts.addEvent` function.\n *\n * @declare Highcharts.LegendEventsOptionsObject\n *\n * @private\n */\n events: {},\n /**\n * Fires when the legend item belonging to the series is clicked. One\n * parameter, `event`, is passed to the function. The default action\n * is to toggle the visibility of the series, point or data class. This\n * can be prevented by returning `false` or calling\n * `event.preventDefault()`.\n *\n * @sample {highcharts} highcharts/legend/itemclick/\n * Confirm hiding and showing\n * @sample {highcharts} highcharts/legend/pie-legend-itemclick/\n * Confirm toggle visibility of pie slices\n *\n * @type {Highcharts.LegendItemClickCallbackFunction}\n * @context Highcharts.Legend\n * @apioption legend.events.itemClick\n */\n /**\n * When the legend is floating, the plot area ignores it and is allowed\n * to be placed below it.\n *\n * @sample {highcharts} highcharts/legend/floating-false/\n * False by default\n * @sample {highcharts} highcharts/legend/floating-true/\n * True\n * @sample {highmaps} maps/legend/alignment/\n * Floating legend\n *\n * @type {boolean}\n * @default false\n * @since 2.1\n * @apioption legend.floating\n */\n /**\n * The layout of the legend items. Can be one of `horizontal` or\n * `vertical` or `proximate`. When `proximate`, the legend items will be\n * placed as close as possible to the graphs they're representing,\n * except in inverted charts or when the legend position doesn't allow\n * it.\n *\n * @sample {highcharts} highcharts/legend/layout-horizontal/\n * Horizontal by default\n * @sample {highcharts} highcharts/legend/layout-vertical/\n * Vertical\n * @sample highcharts/legend/layout-proximate\n * Labels proximate to the data\n * @sample {highstock} stock/legend/layout-horizontal/\n * Horizontal by default\n * @sample {highmaps} maps/legend/padding-itemmargin/\n * Vertical with data classes\n * @sample {highmaps} maps/legend/layout-vertical/\n * Vertical with color axis gradient\n *\n * @validvalue [\"horizontal\", \"vertical\", \"proximate\"]\n */\n layout: 'horizontal',\n /**\n * In a legend with horizontal layout, the itemDistance defines the\n * pixel distance between each item.\n *\n * @sample {highcharts} highcharts/legend/layout-horizontal/\n * 50px item distance\n * @sample {highstock} highcharts/legend/layout-horizontal/\n * 50px item distance\n *\n * @type {number}\n * @default {highcharts} 20\n * @default {highstock} 20\n * @default {highmaps} 8\n * @since 3.0.3\n * @apioption legend.itemDistance\n */\n /**\n * The pixel bottom margin for each legend item.\n *\n * @sample {highcharts|highstock} highcharts/legend/padding-itemmargin/\n * Padding and item margins demonstrated\n * @sample {highmaps} maps/legend/padding-itemmargin/\n * Padding and item margins demonstrated\n *\n * @since 2.2.0\n */\n itemMarginBottom: 2,\n /**\n * The pixel top margin for each legend item.\n *\n * @sample {highcharts|highstock} highcharts/legend/padding-itemmargin/\n * Padding and item margins demonstrated\n * @sample {highmaps} maps/legend/padding-itemmargin/\n * Padding and item margins demonstrated\n *\n * @since 2.2.0\n */\n itemMarginTop: 2,\n /**\n * The width for each legend item. By default the items are laid out\n * successively. In a [horizontal layout](legend.layout), if the items\n * are laid out across two rows or more, they will be vertically aligned\n * depending on the [legend.alignColumns](legend.alignColumns) option.\n *\n * @sample {highcharts} highcharts/legend/itemwidth-default/\n * Undefined by default\n * @sample {highcharts} highcharts/legend/itemwidth-80/\n * 80 for aligned legend items\n *\n * @type {number}\n * @since 2.0\n * @apioption legend.itemWidth\n */\n /**\n * A [format string](https://www.highcharts.com/docs/chart-concepts/labels-and-string-formatting)\n * for each legend label. Available variables relates to properties on\n * the series, or the point in case of pies.\n *\n * @type {string}\n * @default {name}\n * @since 1.3\n * @apioption legend.labelFormat\n */\n /* eslint-disable valid-jsdoc */\n /**\n * Callback function to format each of the series' labels. The `this`\n * keyword refers to the series object, or the point object in case of\n * pie charts. By default the series or point name is printed.\n *\n * @productdesc {highmaps}\n * In Highmaps the context can also be a data class in case of a\n * `colorAxis`.\n *\n * @sample {highcharts} highcharts/legend/labelformatter/\n * Add text\n * @sample {highmaps} maps/legend/labelformatter/\n * Data classes with label formatter\n *\n * @type {Highcharts.FormatterCallbackFunction<Point|Series>}\n */\n labelFormatter: function () {\n // eslint-enable valid-jsdoc\n return this.name;\n },\n /**\n * Line height for the legend items. Deprecated as of 2.1\\. Instead,\n * the line height for each item can be set using\n * `itemStyle.lineHeight`, and the padding between items using\n * `itemMarginTop` and `itemMarginBottom`.\n *\n * @sample {highcharts} highcharts/legend/lineheight/\n * Setting padding\n *\n * @deprecated\n *\n * @type {number}\n * @default 16\n * @since 2.0\n * @product highcharts gantt\n * @apioption legend.lineHeight\n */\n /**\n * If the plot area sized is calculated automatically and the legend is\n * not floating, the legend margin is the space between the legend and\n * the axis labels or plot area.\n *\n * @sample {highcharts} highcharts/legend/margin-default/\n * 12 pixels by default\n * @sample {highcharts} highcharts/legend/margin-30/\n * 30 pixels\n *\n * @type {number}\n * @default 12\n * @since 2.1\n * @apioption legend.margin\n */\n /**\n * Maximum pixel height for the legend. When the maximum height is\n * extended, navigation will show.\n *\n * @type {number}\n * @since 2.3.0\n * @apioption legend.maxHeight\n */\n /**\n * The color of the drawn border around the legend.\n *\n * @see In styled mode, the legend border stroke can be applied with the\n * `.highcharts-legend-box` class.\n *\n * @sample {highcharts} highcharts/legend/bordercolor/\n * Brown border\n * @sample {highstock} stock/legend/align/\n * Various legend options\n * @sample {highmaps} maps/legend/border-background/\n * Border and background options\n *\n * @type {Highcharts.ColorString|Highcharts.GradientColorObject|Highcharts.PatternObject}\n */\n borderColor: \"#999999\" /* Palette.neutralColor40 */,\n /**\n * The border corner radius of the legend.\n *\n * @sample {highcharts} highcharts/legend/borderradius-default/\n * Square by default\n * @sample {highcharts} highcharts/legend/borderradius-round/\n * 5px rounded\n * @sample {highmaps} maps/legend/border-background/\n * Border and background options\n */\n borderRadius: 0,\n /**\n * Options for the paging or navigation appearing when the legend is\n * overflown. Navigation works well on screen, but not in static\n * exported images. One way of working around that is to\n * [increase the chart height in\n * export](https://jsfiddle.net/gh/get/library/pure/highcharts/highcharts/tree/master/samples/highcharts/legend/navigation-enabled-false/).\n *\n * @sample highcharts/legend/scrollable-vertical/\n * Legend with vertical scrollable extension\n * @sample highcharts/legend/scrollable-horizontal/\n * Legend with horizontal scrollable extension\n *\n */\n navigation: {\n /**\n * How to animate the pages when navigating up or down. A value of\n * `true` applies the default navigation given in the\n * `chart.animation` option. Additional options can be given as an\n * object containing values for easing and duration.\n *\n * @sample {highcharts} highcharts/legend/navigation/\n * Legend page navigation demonstrated\n * @sample {highstock} highcharts/legend/navigation/\n * Legend page navigation demonstrated\n *\n * @type {boolean|Partial<Highcharts.AnimationOptionsObject>}\n * @default true\n * @since 2.2.4\n * @apioption legend.navigation.animation\n */\n /**\n * The pixel size of the up and down arrows in the legend paging\n * navigation.\n *\n * @sample {highcharts} highcharts/legend/navigation/\n * Legend page navigation demonstrated\n * @sample {highstock} highcharts/legend/navigation/\n * Legend page navigation demonstrated\n *\n * @type {number}\n * @default 12\n * @since 2.2.4\n * @apioption legend.navigation.arrowSize\n */\n /**\n * Whether to enable the legend navigation. In most cases, disabling\n * the navigation results in an unwanted overflow.\n *\n * See also the\n * [adapt chart to legend](https://github.com/highcharts/adapt-chart-to-legend)\n * plugin for a solution to extend the chart height to make room for\n * the legend, optionally in exported charts only.\n *\n * @type {boolean}\n * @default true\n * @since 4.2.4\n * @apioption legend.navigation.enabled\n */\n /**\n * Text styles for the legend page navigation.\n *\n * @see In styled mode, the navigation items are styled with the\n * `.highcharts-legend-navigation` class.\n *\n * @sample {highcharts} highcharts/legend/navigation/\n * Legend page navigation demonstrated\n * @sample {highstock} highcharts/legend/navigation/\n * Legend page navigation demonstrated\n *\n * @type {Highcharts.CSSObject}\n * @since 2.2.4\n * @apioption legend.navigation.style\n */\n style: {\n fontSize: '0.8em'\n },\n /**\n * The color for the active up or down arrow in the legend page\n * navigation.\n *\n * @see In styled mode, the active arrow be styled with the\n * `.highcharts-legend-nav-active` class.\n *\n * @sample {highcharts} highcharts/legend/navigation/\n * Legend page navigation demonstrated\n * @sample {highstock} highcharts/legend/navigation/\n * Legend page navigation demonstrated\n *\n * @type {Highcharts.ColorString|Highcharts.GradientColorObject|Highcharts.PatternObject}\n * @since 2.2.4\n */\n activeColor: \"#0022ff\" /* Palette.highlightColor100 */,\n /**\n * The color of the inactive up or down arrow in the legend page\n * navigation. .\n *\n * @see In styled mode, the inactive arrow be styled with the\n * `.highcharts-legend-nav-inactive` class.\n *\n * @sample {highcharts} highcharts/legend/navigation/\n * Legend page navigation demonstrated\n * @sample {highstock} highcharts/legend/navigation/\n * Legend page navigation demonstrated\n *\n * @type {Highcharts.ColorString|Highcharts.GradientColorObject|Highcharts.PatternObject}\n * @since 2.2.4\n */\n inactiveColor: \"#cccccc\" /* Palette.neutralColor20 */\n },\n /**\n * The inner padding of the legend box.\n *\n * @sample {highcharts|highstock} highcharts/legend/padding-itemmargin/\n * Padding and item margins demonstrated\n * @sample {highmaps} maps/legend/padding-itemmargin/\n * Padding and item margins demonstrated\n *\n * @type {number}\n * @default 8\n * @since 2.2.0\n * @apioption legend.padding\n */\n /**\n * Whether to reverse the order of the legend items compared to the\n * order of the series or points as defined in the configuration object.\n *\n * @see [yAxis.reversedStacks](#yAxis.reversedStacks),\n * [series.legendIndex](#series.legendIndex)\n *\n * @sample {highcharts} highcharts/legend/reversed/\n * Stacked bar with reversed legend\n *\n * @type {boolean}\n * @default false\n * @since 1.2.5\n * @apioption legend.reversed\n */\n /**\n * Whether to show the symbol on the right side of the text rather than\n * the left side. This is common in Arabic and Hebrew.\n *\n * @sample {highcharts} highcharts/legend/rtl/\n * Symbol to the right\n *\n * @type {boolean}\n * @default false\n * @since 2.2\n * @apioption legend.rtl\n */\n /**\n * CSS styles for the legend area. In the 1.x versions the position\n * of the legend area was determined by CSS. In 2.x, the position is\n * determined by properties like `align`, `verticalAlign`, `x` and `y`,\n * but the styles are still parsed for backwards compatibility.\n *\n * @deprecated\n *\n * @type {Highcharts.CSSObject}\n * @product highcharts highstock\n * @apioption legend.style\n */\n /**\n * CSS styles for each legend item. Only a subset of CSS is supported,\n * notably those options related to text. The default `textOverflow`\n * property makes long texts truncate. Set it to `undefined` to wrap\n * text instead. A `width` property can be added to control the text\n * width.\n *\n * @see In styled mode, the legend items can be styled with the\n * `.highcharts-legend-item` class.\n *\n * @sample {highcharts} highcharts/legend/itemstyle/\n * Bold black text\n * @sample {highmaps} maps/legend/itemstyle/\n * Item text styles\n *\n * @type {Highcharts.CSSObject}\n * @default {\"color\": \"#333333\", \"cursor\": \"pointer\", \"fontSize\": \"0.8em\", \"fontWeight\": \"bold\", \"textOverflow\": \"ellipsis\"}\n */\n itemStyle: {\n /**\n * @ignore\n */\n color: \"#333333\" /* Palette.neutralColor80 */,\n /**\n * @ignore\n */\n cursor: 'pointer',\n /**\n * @ignore\n */\n fontSize: '0.8em',\n /**\n * @ignore\n */\n textDecoration: 'none',\n /**\n * @ignore\n */\n textOverflow: 'ellipsis'\n },\n /**\n * CSS styles for each legend item in hover mode. Only a subset of\n * CSS is supported, notably those options related to text. Properties\n * are inherited from `style` unless overridden here.\n *\n * @see In styled mode, the hovered legend items can be styled with\n * the `.highcharts-legend-item:hover` pseudo-class.\n *\n * @sample {highcharts} highcharts/legend/itemhoverstyle/\n * Red on hover\n * @sample {highmaps} maps/legend/itemstyle/\n * Item text styles\n *\n * @type {Highcharts.CSSObject}\n * @default {\"color\": \"#000000\"}\n */\n itemHoverStyle: {\n /**\n * @ignore\n */\n color: \"#000000\" /* Palette.neutralColor100 */\n },\n /**\n * CSS styles for each legend item when the corresponding series or\n * point is hidden. Only a subset of CSS is supported, notably those\n * options related to text. Properties are inherited from `style`\n * unless overridden here.\n *\n * @see In styled mode, the hidden legend items can be styled with\n * the `.highcharts-legend-item-hidden` class.\n *\n * @sample {highcharts} highcharts/legend/itemhiddenstyle/\n * Darker gray color\n *\n * @type {Highcharts.CSSObject}\n * @default {\"color\": \"#cccccc\"}\n */\n itemHiddenStyle: {\n /**\n * @ignore\n */\n color: \"#666666\" /* Palette.neutralColor60 */,\n /**\n * @ignore\n */\n textDecoration: 'line-through'\n },\n /**\n * Whether to apply a drop shadow to the legend. A `backgroundColor`\n * also needs to be applied for this to take effect. The shadow can be\n * an object configuration containing `color`, `offsetX`, `offsetY`,\n * `opacity` and `width`.\n *\n * @sample {highcharts} highcharts/legend/shadow/\n * White background and drop shadow\n * @sample {highstock} stock/legend/align/\n * Various legend options\n * @sample {highmaps} maps/legend/border-background/\n * Border and background options\n *\n * @type {boolean|Highcharts.CSSObject}\n */\n shadow: false,\n /**\n * Default styling for the checkbox next to a legend item when\n * `showCheckbox` is true.\n *\n * @type {Highcharts.CSSObject}\n * @default {\"width\": \"13px\", \"height\": \"13px\", \"position\":\"absolute\"}\n */\n itemCheckboxStyle: {\n /**\n * @ignore\n */\n position: 'absolute',\n /**\n * @ignore\n */\n width: '13px', // For IE precision\n /**\n * @ignore\n */\n height: '13px'\n },\n /// itemWidth: undefined,\n /**\n * When this is true, the legend symbol width will be the same as\n * the symbol height, which in turn defaults to the font size of the\n * legend items.\n *\n * @since 5.0.0\n */\n squareSymbol: true,\n /**\n * The pixel height of the symbol for series types that use a rectangle\n * in the legend. Defaults to the font size of legend items.\n *\n * Note: This option is a default source of color axis height, if the\n * [colorAxis.height](https://api.highcharts.com/highcharts/colorAxis.height)\n * option is not set.\n *\n * @productdesc {highmaps}\n * In Highmaps, when the symbol is the gradient of a vertical color\n * axis, the height defaults to 200.\n *\n * @sample {highmaps} maps/legend/layout-vertical-sized/\n * Sized vertical gradient\n * @sample {highmaps} maps/legend/padding-itemmargin/\n * No distance between data classes\n *\n * @type {number}\n * @since 3.0.8\n * @apioption legend.symbolHeight\n */\n /**\n * The border radius of the symbol for series types that use a rectangle\n * in the legend. Defaults to half the `symbolHeight`, effectively\n * creating a circle.\n *\n * For color axis scales, it defaults to 3.\n *\n * @sample {highcharts} highcharts/legend/symbolradius/\n * Round symbols\n * @sample {highstock} highcharts/legend/symbolradius/\n * Round symbols\n * @sample {highmaps} highcharts/legend/symbolradius/\n * Round symbols\n *\n * @type {number}\n * @since 3.0.8\n * @apioption legend.symbolRadius\n */\n /**\n * The pixel width of the legend item symbol. When the `squareSymbol`\n * option is set, this defaults to the `symbolHeight`, otherwise 16.\n *\n * Note: This option is a default source of color axis width, if the\n * [colorAxis.width](https://api.highcharts.com/highcharts/colorAxis.width)\n * option is not set.\n *\n * @productdesc {highmaps}\n * In Highmaps, when the symbol is the gradient of a horizontal color\n * axis, the width defaults to 200.\n *\n * @sample {highcharts} highcharts/legend/symbolwidth/\n * Greater symbol width and padding\n * @sample {highmaps} maps/legend/padding-itemmargin/\n * Padding and item margins demonstrated\n * @sample {highmaps} maps/legend/layout-vertical-sized/\n * Sized vertical gradient\n *\n * @type {number}\n * @apioption legend.symbolWidth\n */\n /**\n * Whether to [use HTML](https://www.highcharts.com/docs/chart-concepts/labels-and-string-formatting#html)\n * to render the legend item texts.\n *\n * Prior to 4.1.7, when using HTML, [legend.navigation](\n * #legend.navigation) was disabled.\n *\n * @sample highcharts/legend/scrollable-vertical/\n * Legend with vertical scrollable extension\n * @sample highcharts/legend/scrollable-horizontal/\n * Legend with horizontal scrollable extension\n *\n * @type {boolean}\n * @default false\n * @apioption legend.useHTML\n */\n /**\n * For a color axis with data classes, how many decimals to render in\n * the legend. The default preserves the decimals of the range numbers.\n *\n * @type {number}\n * @default -1\n * @product highcharts highmaps\n * @apioption legend.valueDecimals\n */\n /**\n * For a color axis with data classes, a suffix for the range numbers in\n * the legend.\n *\n * @type {string}\n * @default ''\n * @product highcharts highmaps\n * @apioption legend.valueSuffix\n */\n /**\n * The width of the legend box. If a number is set, it translates to\n * pixels. Since v7.0.2 it allows setting a percent string of the full\n * chart width, for example `40%`.\n *\n * Defaults to the full chart width for legends below or above the\n * chart, half the chart width for legends to the left and right.\n *\n * @sample {highcharts} highcharts/legend/width/\n * Aligned to the plot area\n * @sample {highcharts} highcharts/legend/width-percent/\n * A percent of the chart width\n *\n * @type {number|string}\n * @since 2.0\n * @apioption legend.width\n */\n /**\n * The pixel padding between the legend item symbol and the legend\n * item text.\n *\n * @sample {highcharts} highcharts/legend/symbolpadding/\n * Greater symbol width and padding\n */\n symbolPadding: 5,\n /**\n * The vertical alignment of the legend box. Can be one of `top`,\n * `middle` or `bottom`. Vertical position can be further determined\n * by the `y` option.\n *\n * In the case that the legend is aligned in a corner position, the\n * `layout` option will determine whether to place it above/below\n * or on the side of the plot area.\n *\n * When the [layout](#legend.layout) option is `proximate`, the\n * `verticalAlign` option doesn't apply.\n *\n * @sample {highcharts} highcharts/legend/verticalalign/\n * Legend 100px from the top of the chart\n * @sample {highstock} stock/legend/align/\n * Various legend options\n * @sample {highmaps} maps/legend/alignment/\n * Legend alignment\n *\n * @type {Highcharts.VerticalAlignValue}\n * @since 2.0\n */\n verticalAlign: 'bottom',\n // Width: undefined,\n /**\n * The x offset of the legend relative to its horizontal alignment\n * `align` within chart.spacingLeft and chart.spacingRight. Negative\n * x moves it to the left, positive x moves it to the right.\n *\n * @sample {highcharts} highcharts/legend/width/\n * Aligned to the plot area\n *\n * @since 2.0\n */\n x: 0,\n /**\n * The vertical offset of the legend relative to it's vertical alignment\n * `verticalAlign` within chart.spacingTop and chart.spacingBottom.\n * Negative y moves it up, positive y moves it down.\n *\n * @sample {highcharts} highcharts/legend/verticalalign/\n * Legend 100px from the top of the chart\n * @sample {highstock} stock/legend/align/\n * Various legend options\n * @sample {highmaps} maps/legend/alignment/\n * Legend alignment\n *\n * @since 2.0\n */\n y: 0,\n /**\n * A title to be added on top of the legend.\n *\n * @sample {highcharts} highcharts/legend/title/\n * Legend title\n * @sample {highmaps} maps/legend/alignment/\n * Legend with title\n *\n * @since 3.0\n */\n title: {\n /**\n * A text or HTML string for the title.\n *\n * @type {string}\n * @since 3.0\n * @apioption legend.title.text\n */\n /**\n * Generic CSS styles for the legend title.\n *\n * @see In styled mode, the legend title is styled with the\n * `.highcharts-legend-title` class.\n *\n * @type {Highcharts.CSSObject}\n * @default {\"fontSize\": \"0.8em\", \"fontWeight\": \"bold\"}\n * @since 3.0\n */\n style: {\n /**\n * @ignore\n */\n fontSize: '0.8em',\n /**\n * @ignore\n */\n fontWeight: 'bold'\n }\n }\n },\n /**\n * The loading options control the appearance of the loading screen\n * that covers the plot area on chart operations. This screen only\n * appears after an explicit call to `chart.showLoading()`. It is a\n * utility for developers to communicate to the end user that something\n * is going on, for example while retrieving new data via an XHR connection.\n * The \"Loading...\" text itself is not part of this configuration\n * object, but part of the `lang` object.\n */\n loading: {\n /**\n * The duration in milliseconds of the fade out effect.\n *\n * @sample highcharts/loading/hideduration/\n * Fade in and out over a second\n *\n * @type {number}\n * @default 100\n * @since 1.2.0\n * @apioption loading.hideDuration\n */\n /**\n * The duration in milliseconds of the fade in effect.\n *\n * @sample highcharts/loading/hideduration/\n * Fade in and out over a second\n *\n * @type {number}\n * @default 100\n * @since 1.2.0\n * @apioption loading.showDuration\n */\n /**\n * CSS styles for the loading label `span`.\n *\n * @see In styled mode, the loading label is styled with the\n * `.highcharts-loading-inner` class.\n *\n * @sample {highcharts|highmaps} highcharts/loading/labelstyle/\n * Vertically centered\n * @sample {highstock} stock/loading/general/\n * Label styles\n *\n * @type {Highcharts.CSSObject}\n * @default {\"fontWeight\": \"bold\", \"position\": \"relative\", \"top\": \"45%\"}\n * @since 1.2.0\n */\n labelStyle: {\n /**\n * @ignore\n */\n fontWeight: 'bold',\n /**\n * @ignore\n */\n position: 'relative',\n /**\n * @ignore\n */\n top: '45%'\n },\n /**\n * CSS styles for the loading screen that covers the plot area.\n *\n * In styled mode, the loading label is styled with the\n * `.highcharts-loading` class.\n *\n * @sample {highcharts|highmaps} highcharts/loading/style/\n * Gray plot area, white text\n * @sample {highstock} stock/loading/general/\n * Gray plot area, white text\n *\n * @type {Highcharts.CSSObject}\n * @default {\"position\": \"absolute\", \"backgroundColor\": \"#ffffff\", \"opacity\": 0.5, \"textAlign\": \"center\"}\n * @since 1.2.0\n */\n style: {\n /**\n * @ignore\n */\n position: 'absolute',\n /**\n * @ignore\n */\n backgroundColor: \"#ffffff\" /* Palette.backgroundColor */,\n /**\n * @ignore\n */\n opacity: 0.5,\n /**\n * @ignore\n */\n textAlign: 'center'\n }\n },\n /**\n * Options for the tooltip that appears when the user hovers over a\n * series or point.\n *\n * @declare Highcharts.TooltipOptions\n */\n tooltip: {\n /**\n * The color of the tooltip border. When `undefined`, the border takes\n * the color of the corresponding series or point.\n *\n * Note that the [borderWidth](#tooltip.borderWidth) is usually 0 by\n * default, so the border color may not be visible until a border width\n * is set.\n *\n * @sample {highcharts} highcharts/tooltip/bordercolor-default/ Follow\n * series by default\n * @sample {highcharts} highcharts/tooltip/bordercolor-black/ Black\n * border\n * @sample {highstock} stock/tooltip/general/ Styled tooltip\n * @sample {highmaps} maps/tooltip/background-border/ Background and\n * border demo\n *\n * @type {Highcharts.ColorString|Highcharts.GradientColorObject|Highcharts.PatternObject}\n * @apioption tooltip.borderColor\n */\n /**\n * A CSS class name to apply to the tooltip's container div,\n * allowing unique CSS styling for each chart.\n *\n * @type {string}\n * @apioption tooltip.className\n */\n /**\n * Since 4.1, the crosshair definitions are moved to the Axis object\n * in order for a better separation from the tooltip. See\n * [xAxis.crosshair](#xAxis.crosshair).\n *\n * @sample {highcharts} highcharts/tooltip/crosshairs-x/\n * Enable a crosshair for the x value\n *\n * @deprecated\n *\n * @type {*}\n * @default true\n * @apioption tooltip.crosshairs\n */\n /**\n * Distance from point to tooltip in pixels.\n *\n * @type {number}\n * @default 16\n * @apioption tooltip.distance\n */\n /**\n * Whether the tooltip should follow the mouse as it moves across\n * columns, pie slices and other point types with an extent.\n * By default it behaves this way for pie, polygon, map, sankey\n * and wordcloud series by override in the `plotOptions`\n * for those series types.\n *\n * Does not apply if [split](#tooltip.split) is `true`.\n *\n * For touch moves to behave the same way, [followTouchMove](\n * #tooltip.followTouchMove) must be `true` also.\n *\n * @sample highcharts/tooltip/followpointer/\n * Tooltip follow pointer comparison\n *\n * @type {boolean}\n * @default {highcharts} false\n * @default {highstock} false\n * @default {highmaps} true\n * @since 3.0\n * @apioption tooltip.followPointer\n */\n /**\n * Whether the tooltip should update as the finger moves on a touch\n * device. If this is `true` and [chart.panning](#chart.panning) is\n * set,`followTouchMove` will take over one-finger touches, so the user\n * needs to use two fingers for zooming and panning.\n *\n * Note the difference to [followPointer](#tooltip.followPointer) that\n * only defines the _position_ of the tooltip. If `followPointer` is\n * false in for example a column series, the tooltip will show above or\n * below the column, but as `followTouchMove` is true, the tooltip will\n * jump from column to column as the user swipes across the plot area.\n *\n * @type {boolean}\n * @default {highcharts} true\n * @default {highstock} true\n * @default {highmaps} false\n * @since 3.0.1\n * @apioption tooltip.followTouchMove\n */\n /**\n * A [format string](https://www.highcharts.com/docs/chart-concepts/labels-and-string-formatting)\n * for the whole shared tooltip. When format strings are a requirement,\n * it is usually more convenient to use `headerFormat`, `pointFormat`\n * and `footerFormat`, but the `format` option allows combining them\n * into one setting.\n *\n * The context of the format string is the same as that of the\n * `tooltip.formatter` callback.\n *\n * @sample {highcharts} highcharts/tooltip/format-shared/\n * Format for shared tooltip\n *\n * @type {string}\n * @default undefined\n * @since 11.1.0\n * @apioption tooltip.format\n */\n /**\n * Callback function to format the text of the tooltip from scratch. In\n * case of single or [shared](#tooltip.shared) tooltips, a string should\n * be returned. In case of [split](#tooltip.split) tooltips, it should\n * return an array where the first item is the header, and subsequent\n * items are mapped to the points. Return `false` to disable tooltip for\n * a specific point on series.\n *\n * A subset of HTML is supported. Unless `useHTML` is true, the HTML of\n * the tooltip is parsed and converted to SVG, therefore this isn't a\n * complete HTML renderer. The following HTML tags are supported: `b`,\n * `br`, `em`, `i`, `span`, `strong`. Spans can be styled with a `style`\n * attribute, but only text-related CSS, that is shared with SVG, is\n * handled.\n *\n * The available data in the formatter differ a bit depending on whether\n * the tooltip is shared or split, or belongs to a single point. In a\n * shared/split tooltip, all properties except `x`, which is common for\n * all points, are kept in an array, `this.points`.\n *\n * Available data are:\n *\n * - **this.percentage (not shared) /**\n * **this.points[i].percentage (shared)**:\n * Stacked series and pies only. The point's percentage of the total.\n *\n * - **this.point (not shared) / this.points[i].point (shared)**:\n * The point object. The point name, if defined, is available through\n * `this.point.name`.\n *\n * - **this.points**:\n * In a shared tooltip, this is an array containing all other\n * properties for each point.\n *\n * - **this.series (not shared) / this.points[i].series (shared)**:\n * The series object. The series name is available through\n * `this.series.name`.\n *\n * - **this.total (not shared) / this.points[i].total (shared)**:\n * Stacked series only. The total value at this point's x value.\n *\n * - **this.x**:\n * The x value. This property is the same regardless of the tooltip\n * being shared or not.\n *\n * - **this.y (not shared) / this.points[i].y (shared)**:\n * The y value.\n *\n * @sample {highcharts} highcharts/tooltip/formatter-simple/\n * Simple string formatting\n * @sample {highcharts} highcharts/tooltip/formatter-shared/\n * Formatting with shared tooltip\n * @sample {highcharts|highstock} highcharts/tooltip/formatter-split/\n * Formatting with split tooltip\n * @sample highcharts/tooltip/formatter-conditional-default/\n * Extending default formatter\n * @sample {highstock} stock/tooltip/formatter/\n * Formatting with shared tooltip\n * @sample {highmaps} maps/tooltip/formatter/\n * String formatting\n *\n * @type {Highcharts.TooltipFormatterCallbackFunction}\n * @apioption tooltip.formatter\n */\n /**\n * Callback function to format the text of the tooltip for\n * visible null points.\n * Works analogously to [formatter](#tooltip.formatter).\n *\n * @sample highcharts/plotoptions/series-nullformat\n * Format data label and tooltip for null point.\n *\n * @type {Highcharts.TooltipFormatterCallbackFunction}\n * @apioption tooltip.nullFormatter\n */\n /**\n * Whether to allow the tooltip to render outside the chart's SVG\n * element box. By default (`false`), the tooltip is rendered within the\n * chart's SVG element, which results in the tooltip being aligned\n * inside the chart area. For small charts, this may result in clipping\n * or overlapping. When `true`, a separate SVG element is created and\n * overlaid on the page, allowing the tooltip to be aligned inside the\n * page itself.\n *\n * Defaults to `true` if `chart.scrollablePlotArea` is activated,\n * otherwise `false`.\n *\n * @sample highcharts/tooltip/outside\n * Small charts with tooltips outside\n *\n * @type {boolean|undefined}\n * @default undefined\n * @since 6.1.1\n * @apioption tooltip.outside\n */\n /**\n * A callback function for formatting the HTML output for a single point\n * in the tooltip. Like the `pointFormat` string, but with more\n * flexibility.\n *\n * @type {Highcharts.FormatterCallbackFunction<Highcharts.Point>}\n * @since 4.1.0\n * @context Highcharts.Point\n * @apioption tooltip.pointFormatter\n */\n /**\n * A callback function to place the tooltip in a custom position. The\n * callback receives three parameters: `labelWidth`, `labelHeight` and\n * `point`, where point contains values for `plotX` and `plotY` telling\n * where the reference point is in the plot area. Add `chart.plotLeft`\n * and `chart.plotTop` to get the full coordinates.\n *\n * To find the actual hovered `Point` instance, use\n * `this.chart.hoverPoint`. For shared or split tooltips, all the hover\n * points are available in `this.chart.hoverPoints`.\n *\n * Since v7, when [tooltip.split](#tooltip.split) option is enabled,\n * positioner is called for each of the boxes separately, including\n * xAxis header. xAxis header is not a point, instead `point` argument\n * contains info: `{ plotX: Number, plotY: Number, isHeader: Boolean }`\n *\n * The return should be an object containing x and y values, for example\n * `{ x: 100, y: 100 }`.\n *\n * @sample {highcharts} highcharts/tooltip/positioner/\n * A fixed tooltip position\n * @sample {highstock} stock/tooltip/positioner/\n * A fixed tooltip position on top of the chart\n * @sample {highmaps} maps/tooltip/positioner/\n * A fixed tooltip position\n * @sample {highstock} stock/tooltip/split-positioner/\n * Split tooltip with fixed positions\n * @sample {highstock} stock/tooltip/positioner-scrollable-plotarea/\n * Scrollable plot area combined with tooltip positioner\n *\n * @type {Highcharts.TooltipPositionerCallbackFunction}\n * @since 2.2.4\n * @apioption tooltip.positioner\n */\n /**\n * Shows tooltip for all points with the same X value. Splits the\n * tooltip into one label per series, with the header close to the axis.\n * This is recommended over [shared](#tooltip.shared)\n * tooltips for charts with multiple line series, generally making them\n * easier to read. This option takes precedence over `tooltip.shared`.\n *\n * Not supported for [polar](#chart.polar) and [inverted](#chart.inverted) charts.\n *\n * @productdesc {highstock} In Highcharts Stock, tooltips are split\n * by default since v6.0.0. Stock charts typically contain\n * multi-dimension points and multiple panes, making split tooltips\n * the preferred layout over\n * the previous `shared` tooltip.\n *\n * @sample highcharts/tooltip/split/\n * Split tooltip\n * @sample {highcharts|highstock} highcharts/tooltip/formatter-split/\n * Split tooltip and custom formatter callback\n *\n * @type {boolean}\n * @default {highcharts} false\n * @default {highstock} true\n * @since 5.0.0\n * @product highcharts highstock\n * @apioption tooltip.split\n */\n /**\n * Prevents the tooltip from switching or closing, when touched or\n * pointed.\n *\n * @sample highcharts/tooltip/stickoncontact/\n * Tooltip sticks on pointer contact\n *\n * @type {boolean}\n * @since 8.0.1\n * @apioption tooltip.stickOnContact\n */\n /**\n * Use HTML to render the contents of the tooltip instead of SVG. Using\n * HTML allows advanced formatting like tables and images in the\n * tooltip. It is also recommended for rtl languages as it works around\n * rtl bugs in early Firefox.\n *\n * @sample {highcharts|highstock} highcharts/tooltip/footerformat/\n * A table for value alignment\n * @sample {highcharts|highstock} highcharts/tooltip/fullhtml/\n * Full HTML tooltip\n * @sample {highmaps} maps/tooltip/usehtml/\n * Pure HTML tooltip\n *\n * @type {boolean}\n * @default false\n * @since 2.2\n * @apioption tooltip.useHTML\n */\n /**\n * How many decimals to show in each series' y value. This is\n * overridable in each series' tooltip options object. The default is to\n * preserve all decimals.\n *\n * @sample {highcharts|highstock} highcharts/tooltip/valuedecimals/\n * Set decimals, prefix and suffix for the value\n * @sample {highmaps} maps/tooltip/valuedecimals/\n * Set decimals, prefix and suffix for the value\n *\n * @type {number|undefined}\n * @since 2.2\n * @apioption tooltip.valueDecimals\n */\n /**\n * A string to prepend to each series' y value. Overridable in each\n * series' tooltip options object.\n *\n * @sample {highcharts|highstock} highcharts/tooltip/valuedecimals/\n * Set decimals, prefix and suffix for the value\n * @sample {highmaps} maps/tooltip/valuedecimals/\n * Set decimals, prefix and suffix for the value\n *\n * @type {string}\n * @since 2.2\n * @apioption tooltip.valuePrefix\n */\n /**\n * A string to append to each series' y value. Overridable in each\n * series' tooltip options object.\n *\n * @sample {highcharts|highstock} highcharts/tooltip/valuedecimals/\n * Set decimals, prefix and suffix for the value\n * @sample {highmaps} maps/tooltip/valuedecimals/\n * Set decimals, prefix and suffix for the value\n *\n * @type {string}\n * @since 2.2\n * @apioption tooltip.valueSuffix\n */\n /**\n * The format for the date in the tooltip header if the X axis is a\n * datetime axis. The default is a best guess based on the smallest\n * distance between points in the chart.\n *\n * @sample {highcharts} highcharts/tooltip/xdateformat/\n * A different format\n *\n * @type {string}\n * @product highcharts highstock gantt\n * @apioption tooltip.xDateFormat\n */\n /**\n * How many decimals to show for the `point.change`\n * or the `point.cumulativeSum` value when the `series.compare`\n * or the `series.cumulative` option is set.\n * This is overridable in each series' tooltip options object.\n *\n * @type {number}\n * @default 2\n * @since 1.0.1\n * @product highstock\n * @apioption tooltip.changeDecimals\n */\n /**\n * Enable or disable the tooltip.\n *\n * @sample {highcharts} highcharts/tooltip/enabled/\n * Disabled\n * @sample {highcharts} highcharts/plotoptions/series-point-events-mouseover/\n * Disable tooltip and show values on chart instead\n */\n enabled: true,\n /**\n * Enable or disable animation of the tooltip.\n *\n * @type {boolean|Partial<Highcharts.AnimationOptionsObject>}\n * @since 2.3.0\n */\n animation: {\n duration: 300,\n // EaseOutCirc\n easing: (x) => Math.sqrt(1 - Math.pow(x - 1, 2))\n },\n /**\n * The radius of the rounded border corners.\n *\n * @sample {highcharts} highcharts/tooltip/bordercolor-default/\n * Default border radius\n * @sample {highcharts} highcharts/tooltip/borderradius-0/\n * Square borders\n * @sample {highmaps} maps/tooltip/background-border/\n * Background and border demo\n */\n borderRadius: 3,\n /**\n * For series on datetime axes, the date format in the tooltip's\n * header will by default be guessed based on the closest data points.\n * This member gives the default string representations used for\n * each unit. For an overview of the replacement codes, see\n * [dateFormat](/class-reference/Highcharts.Time#dateFormat).\n *\n * @see [xAxis.dateTimeLabelFormats](#xAxis.dateTimeLabelFormats)\n *\n * @type {Highcharts.Dictionary<string>}\n * @product highcharts highstock gantt\n */\n dateTimeLabelFormats: {\n /** @internal */\n millisecond: '%A, %e %b, %H:%M:%S.%L',\n /** @internal */\n second: '%A, %e %b, %H:%M:%S',\n /** @internal */\n minute: '%A, %e %b, %H:%M',\n /** @internal */\n hour: '%A, %e %b, %H:%M',\n /** @internal */\n day: '%A, %e %b %Y',\n /** @internal */\n week: 'Week from %A, %e %b %Y',\n /** @internal */\n month: '%B %Y',\n /** @internal */\n year: '%Y'\n },\n /**\n * A string to append to the tooltip format.\n *\n * @sample {highcharts} highcharts/tooltip/footerformat/\n * A table for value alignment\n * @sample {highmaps} maps/tooltip/format/\n * Format demo\n *\n * @since 2.2\n */\n footerFormat: '',\n /**\n * The name of a symbol to use for the border around the tooltip\n * header. Applies only when [tooltip.split](#tooltip.split) is\n * enabled.\n *\n * Custom callbacks for symbol path generation can also be added to\n * `Highcharts.SVGRenderer.prototype.symbols` the same way as for\n * [series.marker.symbol](plotOptions.line.marker.symbol).\n *\n * @see [tooltip.shape](#tooltip.shape)\n *\n * @sample {highstock} stock/tooltip/split-positioner/\n * Different shapes for header and split boxes\n *\n * @type {Highcharts.TooltipShapeValue}\n * @validvalue [\"callout\", \"rect\"]\n * @since 7.0\n */\n headerShape: 'callout',\n /**\n * The number of milliseconds to wait until the tooltip is hidden when\n * mouse out from a point or chart.\n *\n * @since 3.0\n */\n hideDelay: 500,\n /**\n * Padding inside the tooltip, in pixels.\n *\n * @since 5.0.0\n */\n padding: 8,\n /**\n * The name of a symbol to use for the border around the tooltip. Can\n * be one of: `\"callout\"`, `\"circle\"` or `\"rect\"`. When\n * [tooltip.split](#tooltip.split)\n * option is enabled, shape is applied to all boxes except header, which\n * is controlled by\n * [tooltip.headerShape](#tooltip.headerShape).\n *\n * Custom callbacks for symbol path generation can also be added to\n * `Highcharts.SVGRenderer.prototype.symbols` the same way as for\n * [series.marker.symbol](plotOptions.line.marker.symbol).\n *\n * @type {Highcharts.TooltipShapeValue}\n * @since 4.0\n */\n shape: 'callout',\n /**\n * Shows information in the tooltip for all points with the same X\n * value. When the tooltip is shared, the entire plot area will capture\n * mouse movement or touch events. Tooltip texts for series types with\n * ordered data (not pie, scatter, flags etc) will be shown in a single\n * bubble. This is recommended for single series charts and for\n * tablet/mobile optimized charts.\n *\n * See also [tooltip.split](#tooltip.split), that is better suited for\n * charts with many series, especially line-type series. The\n * `tooltip.split` option takes precedence over `tooltip.shared`.\n *\n * @sample {highcharts} highcharts/tooltip/shared-false/\n * False by default\n * @sample {highcharts} highcharts/tooltip/shared-true/\n * True\n * @sample {highcharts} highcharts/tooltip/shared-x-crosshair/\n * True with x axis crosshair\n * @sample {highcharts} highcharts/tooltip/shared-true-mixed-types/\n * True with mixed series types\n *\n * @since 2.1\n * @product highcharts highstock\n */\n shared: false,\n /**\n * Proximity snap for graphs or single points. It defaults to 10 for\n * mouse-powered devices and 25 for touch devices.\n *\n * Note that in most cases the whole plot area captures the mouse\n * movement, and in these cases `tooltip.snap` doesn't make sense. This\n * applies when [stickyTracking](#plotOptions.series.stickyTracking)\n * is `true` (default) and when the tooltip is [shared](#tooltip.shared)\n * or [split](#tooltip.split).\n *\n * @sample {highcharts} highcharts/tooltip/bordercolor-default/\n * 10 px by default\n * @sample {highcharts} highcharts/tooltip/snap-50/\n * 50 px on graph\n *\n * @type {number}\n * @default 10/25\n * @since 1.2.0\n * @product highcharts highstock\n */\n snap: isTouchDevice ? 25 : 10,\n /**\n * The HTML of the tooltip header line. Variables are enclosed by\n * curly brackets. Available variables are `point.key`, `series.name`,\n * `series.color` and other members from the `point` and `series`\n * objects. The `point.key` variable contains the category name, x\n * value or datetime string depending on the type of axis. For datetime\n * axes, the `point.key` date format can be set using\n * `tooltip.xDateFormat`.\n *\n * @sample {highcharts} highcharts/tooltip/footerformat/\n * An HTML table in the tooltip\n * @sample {highstock} highcharts/tooltip/footerformat/\n * An HTML table in the tooltip\n * @sample {highmaps} maps/tooltip/format/\n * Format demo\n *\n * @type {string}\n * @apioption tooltip.headerFormat\n */\n headerFormat: '<span style=\"font-size: 0.8em\">{point.key}</span><br/>',\n /**\n * The HTML of the null point's line in the tooltip. Works analogously\n * to [pointFormat](#tooltip.pointFormat).\n *\n * @sample {highcharts} highcharts/plotoptions/series-nullformat\n * Format data label and tooltip for null point.\n *\n * @type {string}\n * @apioption tooltip.nullFormat\n */\n /**\n * The HTML of the point's line in the tooltip. Variables are enclosed\n * by curly brackets. Available variables are `point.x`, `point.y`,\n * `series.name` and `series.color` and other properties on the same\n * form. Furthermore, `point.y` can be extended by the\n * `tooltip.valuePrefix` and `tooltip.valueSuffix` variables. This can\n * also be overridden for each series, which makes it a good hook for\n * displaying units.\n *\n * In styled mode, the dot is colored by a class name rather\n * than the point color.\n *\n * @sample {highcharts} highcharts/tooltip/pointformat/\n * A different point format with value suffix\n * @sample {highcharts|highstock} highcharts/tooltip/pointformat-extra-information/\n * Show extra information about points in the tooltip\n * @sample {highmaps} maps/tooltip/format/\n * Format demo\n *\n * @type {string}\n * @since 2.2\n * @apioption tooltip.pointFormat\n */\n pointFormat: '<span style=\"color:{point.color}\">\\u25CF</span> {series.name}: <b>{point.y}</b><br/>',\n /**\n * The background color or gradient for the tooltip.\n *\n * In styled mode, the stroke width is set in the\n * `.highcharts-tooltip-box` class.\n *\n * @sample {highcharts} highcharts/tooltip/backgroundcolor-solid/\n * Yellowish background\n * @sample {highcharts} highcharts/tooltip/backgroundcolor-gradient/\n * Gradient\n * @sample {highcharts} highcharts/css/tooltip-border-background/\n * Tooltip in styled mode\n * @sample {highstock} stock/tooltip/general/\n * Custom tooltip\n * @sample {highstock} highcharts/css/tooltip-border-background/\n * Tooltip in styled mode\n * @sample {highmaps} maps/tooltip/background-border/\n * Background and border demo\n * @sample {highmaps} highcharts/css/tooltip-border-background/\n * Tooltip in styled mode\n *\n * @type {Highcharts.ColorString|Highcharts.GradientColorObject|Highcharts.PatternObject}\n */\n backgroundColor: \"#ffffff\" /* Palette.backgroundColor */,\n /**\n * The pixel width of the tooltip border. Defaults to 0 for single\n * tooltips and 1 for split tooltips.\n *\n * In styled mode, the stroke width is set in the\n * `.highcharts-tooltip-box` class.\n *\n * @sample {highcharts} highcharts/tooltip/bordercolor-default/\n * 2 pixels\n * @sample {highcharts} highcharts/tooltip/borderwidth/\n * No border (shadow only)\n * @sample {highcharts} highcharts/css/tooltip-border-background/\n * Tooltip in styled mode\n * @sample {highstock} stock/tooltip/general/\n * Custom tooltip\n * @sample {highstock} highcharts/css/tooltip-border-background/\n * Tooltip in styled mode\n * @sample {highmaps} maps/tooltip/background-border/\n * Background and border demo\n * @sample {highmaps} highcharts/css/tooltip-border-background/\n * Tooltip in styled mode\n *\n * @type {number}\n */\n borderWidth: void 0,\n /**\n * Whether to apply a drop shadow to the tooltip.\n *\n * @sample {highcharts} highcharts/tooltip/bordercolor-default/\n * True by default\n * @sample {highcharts} highcharts/tooltip/shadow/\n * False\n * @sample {highmaps} maps/tooltip/positioner/\n * Fixed tooltip position, border and shadow disabled\n *\n * @type {boolean|Highcharts.ShadowOptionsObject}\n */\n shadow: true,\n /**\n * Prevents the tooltip from switching or closing when touched or\n * pointed.\n *\n * @sample highcharts/tooltip/stickoncontact/\n * Tooltip sticks on pointer contact\n *\n * @since 8.0.1\n */\n stickOnContact: false,\n /**\n * CSS styles for the tooltip. The tooltip can also be styled through\n * the CSS class `.highcharts-tooltip`.\n *\n * Note that the default `pointerEvents` style makes the tooltip ignore\n * mouse events, so in order to use clickable tooltips, this value must\n * be set to `auto`.\n *\n * @sample {highcharts} highcharts/tooltip/style/\n * Greater padding, bold text\n *\n * @type {Highcharts.CSSObject}\n */\n style: {\n /** @internal */\n color: \"#333333\" /* Palette.neutralColor80 */,\n /** @internal */\n cursor: 'default',\n /** @internal */\n fontSize: '0.8em'\n },\n /**\n * Use HTML to render the contents of the tooltip instead of SVG. Using\n * HTML allows advanced formatting like tables and images in the\n * tooltip. It is also recommended for rtl languages as it works around\n * rtl bugs in early Firefox.\n *\n * @sample {highcharts|highstock} highcharts/tooltip/footerformat/\n * A table for value alignment\n * @sample {highcharts|highstock} highcharts/tooltip/fullhtml/\n * Full HTML tooltip\n * @sample {highmaps} maps/tooltip/usehtml/\n * Pure HTML tooltip\n *\n * @since 2.2\n */\n useHTML: false\n },\n /**\n * Highchart by default puts a credits label in the lower right corner\n * of the chart. This can be changed using these options.\n */\n credits: {\n /**\n * Credits for map source to be concatenated with conventional credit\n * text. By default this is a format string that collects copyright\n * information from the map if available.\n *\n * @see [mapTextFull](#credits.mapTextFull)\n * @see [text](#credits.text)\n *\n * @type {string}\n * @default \\u00a9 <a href=\"{geojson.copyrightUrl}\">{geojson.copyrightShort}</a>\n * @since 4.2.2\n * @product highmaps\n * @apioption credits.mapText\n */\n /**\n * Detailed credits for map source to be displayed on hover of credits\n * text. By default this is a format string that collects copyright\n * information from the map if available.\n *\n * @see [mapText](#credits.mapText)\n * @see [text](#credits.text)\n *\n * @type {string}\n * @default {geojson.copyright}\n * @since 4.2.2\n * @product highmaps\n * @apioption credits.mapTextFull\n */\n /**\n * Whether to show the credits text.\n *\n * @sample {highcharts} highcharts/credits/enabled-false/\n * Credits disabled\n * @sample {highstock} stock/credits/enabled/\n * Credits disabled\n * @sample {highmaps} maps/credits/enabled-false/\n * Credits disabled\n */\n enabled: true,\n /**\n * The URL for the credits label.\n *\n * @sample {highcharts} highcharts/credits/href/\n * Custom URL and text\n * @sample {highmaps} maps/credits/customized/\n * Custom URL and text\n */\n href: 'https://www.highcharts.com?credits',\n /**\n * Position configuration for the credits label.\n *\n * @sample {highcharts} highcharts/credits/position-left/\n * Left aligned\n * @sample {highcharts} highcharts/credits/position-left/\n * Left aligned\n * @sample {highmaps} maps/credits/customized/\n * Left aligned\n * @sample {highmaps} maps/credits/customized/\n * Left aligned\n *\n * @type {Highcharts.AlignObject}\n * @since 2.1\n */\n position: {\n /** @internal */\n align: 'right',\n /** @internal */\n x: -10,\n /** @internal */\n verticalAlign: 'bottom',\n /** @internal */\n y: -5\n },\n /**\n * CSS styles for the credits label.\n *\n * @see In styled mode, credits styles can be set with the\n * `.highcharts-credits` class.\n *\n * @type {Highcharts.CSSObject}\n */\n style: {\n /** @internal */\n cursor: 'pointer',\n /** @internal */\n color: \"#999999\" /* Palette.neutralColor40 */,\n /** @internal */\n fontSize: '0.6em'\n },\n /**\n * The text for the credits label.\n *\n * @productdesc {highmaps}\n * If a map is loaded as GeoJSON, the text defaults to\n * `Highcharts @ {map-credits}`. Otherwise, it defaults to\n * `Highcharts.com`.\n *\n * @sample {highcharts} highcharts/credits/href/\n * Custom URL and text\n * @sample {highmaps} maps/credits/customized/\n * Custom URL and text\n */\n text: 'Highcharts.com'\n }\n };\n /* eslint-disable spaced-comment */\n\n defaultOptions.chart.styledMode = false;\n\n '';\n const defaultTime = new Time(defaultOptions.time);\n /**\n * Get the updated default options. Until 3.0.7, merely exposing defaultOptions\n * for outside modules wasn't enough because the setOptions method created a new\n * object.\n *\n * @function Highcharts.getOptions\n *\n * @return {Highcharts.Options}\n * Default options.\n */\n function getOptions() {\n return defaultOptions;\n }\n /**\n * Merge the default options with custom options and return the new options\n * structure. Commonly used for defining reusable templates.\n *\n * @sample highcharts/global/useutc-false Setting a global option\n * @sample highcharts/members/setoptions Applying a global theme\n *\n * @function Highcharts.setOptions\n *\n * @param {Highcharts.Options} options\n * The new custom chart options.\n *\n * @return {Highcharts.Options}\n * Updated options.\n */\n function setOptions(options) {\n fireEvent(H, 'setOptions', { options });\n // Copy in the default options\n merge(true, defaultOptions, options);\n // Update the time object\n if (options.time || options.global) {\n if (H.time) {\n H.time.update(merge(defaultOptions.global, defaultOptions.time, options.global, options.time));\n }\n else {\n /**\n * Global `Time` object with default options. Since v6.0.5, time\n * settings can be applied individually for each chart. If no\n * individual settings apply, this `Time` object is shared by all\n * instances.\n *\n * @name Highcharts.time\n * @type {Highcharts.Time}\n */\n H.time = defaultTime;\n }\n }\n return defaultOptions;\n }\n /* *\n *\n * Default Export\n *\n * */\n const DefaultOptions = {\n defaultOptions,\n defaultTime,\n getOptions,\n setOptions\n };\n /* *\n *\n * API Declarations\n *\n * */\n /**\n * @typedef {\"plotBox\"|\"spacingBox\"} Highcharts.ButtonRelativeToValue\n */\n /**\n * Gets fired when a series is added to the chart after load time, using the\n * `addSeries` method. Returning `false` prevents the series from being added.\n *\n * @callback Highcharts.ChartAddSeriesCallbackFunction\n *\n * @param {Highcharts.Chart} this\n * The chart on which the event occurred.\n *\n * @param {Highcharts.ChartAddSeriesEventObject} event\n * The event that occurred.\n */\n /**\n * Contains common event information. Through the `options` property you can\n * access the series options that were passed to the `addSeries` method.\n *\n * @interface Highcharts.ChartAddSeriesEventObject\n */ /**\n * The series options that were passed to the `addSeries` method.\n * @name Highcharts.ChartAddSeriesEventObject#options\n * @type {Highcharts.SeriesOptionsType}\n */ /**\n * Prevents the default behaviour of the event.\n * @name Highcharts.ChartAddSeriesEventObject#preventDefault\n * @type {Function}\n */ /**\n * The event target.\n * @name Highcharts.ChartAddSeriesEventObject#target\n * @type {Highcharts.Chart}\n */ /**\n * The event type.\n * @name Highcharts.ChartAddSeriesEventObject#type\n * @type {\"addSeries\"}\n */\n /**\n * Gets fired when clicking on the plot background.\n *\n * @callback Highcharts.ChartClickCallbackFunction\n *\n * @param {Highcharts.Chart} this\n * The chart on which the event occurred.\n *\n * @param {Highcharts.PointerEventObject} event\n * The event that occurred.\n */\n /**\n * Contains an axes of the clicked spot.\n *\n * @interface Highcharts.ChartClickEventAxisObject\n */ /**\n * Axis at the clicked spot.\n * @name Highcharts.ChartClickEventAxisObject#axis\n * @type {Highcharts.Axis}\n */ /**\n * Axis value at the clicked spot.\n * @name Highcharts.ChartClickEventAxisObject#value\n * @type {number}\n */\n /**\n * Contains information about the clicked spot on the chart. Remember the unit\n * of a datetime axis is milliseconds since 1970-01-01 00:00:00.\n *\n * @interface Highcharts.ChartClickEventObject\n * @extends Highcharts.PointerEventObject\n */ /**\n * Information about the x-axis on the clicked spot.\n * @name Highcharts.ChartClickEventObject#xAxis\n * @type {Array<Highcharts.ChartClickEventAxisObject>}\n */ /**\n * Information about the y-axis on the clicked spot.\n * @name Highcharts.ChartClickEventObject#yAxis\n * @type {Array<Highcharts.ChartClickEventAxisObject>}\n */ /**\n * Information about the z-axis on the clicked spot.\n * @name Highcharts.ChartClickEventObject#zAxis\n * @type {Array<Highcharts.ChartClickEventAxisObject>|undefined}\n */\n /**\n * Gets fired when the chart is finished loading.\n *\n * @callback Highcharts.ChartLoadCallbackFunction\n *\n * @param {Highcharts.Chart} this\n * The chart on which the event occurred.\n *\n * @param {global.Event} event\n * The event that occurred.\n */\n /**\n * Fires when the chart is redrawn, either after a call to `chart.redraw()` or\n * after an axis, series or point is modified with the `redraw` option set to\n * `true`.\n *\n * @callback Highcharts.ChartRedrawCallbackFunction\n *\n * @param {Highcharts.Chart} this\n * The chart on which the event occurred.\n *\n * @param {global.Event} event\n * The event that occurred.\n */\n /**\n * Gets fired after initial load of the chart (directly after the `load` event),\n * and after each redraw (directly after the `redraw` event).\n *\n * @callback Highcharts.ChartRenderCallbackFunction\n *\n * @param {Highcharts.Chart} this\n * The chart on which the event occurred.\n *\n * @param {global.Event} event\n * The event that occurred.\n */\n /**\n * Gets fired when an area of the chart has been selected. The default action\n * for the selection event is to zoom the chart to the selected area. It can be\n * prevented by calling `event.preventDefault()` or return false.\n *\n * @callback Highcharts.ChartSelectionCallbackFunction\n *\n * @param {Highcharts.Chart} this\n * The chart on which the event occurred.\n *\n * @param {Highcharts.SelectEventObject} event\n * Event informations\n *\n * @return {boolean|undefined}\n * Return false to prevent the default action, usually zoom.\n */\n (''); // Detach doclets above\n\n return DefaultOptions;\n });\n _registerModule(_modules, 'Core/Templating.js', [_modules['Core/Defaults.js'], _modules['Core/Utilities.js']], function (D, U) {\n /* *\n *\n * (c) 2010-2024 Torstein Honsi\n *\n * License: www.highcharts.com/license\n *\n * !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!\n *\n * */\n const { defaultOptions, defaultTime } = D;\n const { extend, getNestedProperty, isArray, isNumber, isObject, pick, pInt } = U;\n const helpers = {\n // Built-in helpers\n add: (a, b) => a + b,\n divide: (a, b) => (b !== 0 ? a / b : ''),\n // eslint-disable-next-line eqeqeq\n eq: (a, b) => a == b,\n each: function (arr) {\n const match = arguments[arguments.length - 1];\n return isArray(arr) ?\n arr.map((item, i) => format(match.body, extend(isObject(item) ? item : { '@this': item }, {\n '@index': i,\n '@first': i === 0,\n '@last': i === arr.length - 1\n }))).join('') :\n false;\n },\n ge: (a, b) => a >= b,\n gt: (a, b) => a > b,\n 'if': (condition) => !!condition,\n le: (a, b) => a <= b,\n lt: (a, b) => a < b,\n multiply: (a, b) => a * b,\n // eslint-disable-next-line eqeqeq\n ne: (a, b) => a != b,\n subtract: (a, b) => a - b,\n unless: (condition) => !condition\n };\n /* *\n *\n * Functions\n *\n * */\n /**\n * Formats a JavaScript date timestamp (milliseconds since Jan 1st 1970) into a\n * human readable date string. The format is a subset of the formats for PHP's\n * [strftime](https://www.php.net/manual/en/function.strftime.php) function.\n * Additional formats can be given in the {@link Highcharts.dateFormats} hook.\n *\n * Since v6.0.5, all internal dates are formatted through the\n * {@link Highcharts.Chart#time} instance to respect chart-level time settings.\n * The `Highcharts.dateFormat` function only reflects global time settings set\n * with `setOptions`.\n *\n * Supported format keys:\n * - `%a`: Short weekday, like 'Mon'\n * - `%A`: Long weekday, like 'Monday'\n * - `%d`: Two digit day of the month, 01 to 31\n * - `%e`: Day of the month, 1 through 31\n * - `%w`: Day of the week, 0 through 6\n * - `%b`: Short month, like 'Jan'\n * - `%B`: Long month, like 'January'\n * - `%m`: Two digit month number, 01 through 12\n * - `%y`: Two digits year, like 09 for 2009\n * - `%Y`: Four digits year, like 2009\n * - `%H`: Two digits hours in 24h format, 00 through 23\n * - `%k`: Hours in 24h format, 0 through 23\n * - `%I`: Two digits hours in 12h format, 00 through 11\n * - `%l`: Hours in 12h format, 1 through 12\n * - `%M`: Two digits minutes, 00 through 59\n * - `%p`: Upper case AM or PM\n * - `%P`: Lower case AM or PM\n * - `%S`: Two digits seconds, 00 through 59\n * - `%L`: Milliseconds (naming from Ruby)\n *\n * @function Highcharts.dateFormat\n *\n * @param {string} format\n * The desired format where various time representations are prefixed\n * with `%`.\n *\n * @param {number} timestamp\n * The JavaScript timestamp.\n *\n * @param {boolean} [capitalize=false]\n * Upper case first letter in the return.\n *\n * @return {string}\n * The formatted date.\n */\n function dateFormat(format, timestamp, capitalize) {\n return defaultTime.dateFormat(format, timestamp, capitalize);\n }\n /**\n * Format a string according to a subset of the rules of Python's String.format\n * method.\n *\n * @example\n * let s = Highcharts.format(\n * 'The {color} fox was {len:.2f} feet long',\n * { color: 'red', len: Math.PI }\n * );\n * // => The red fox was 3.14 feet long\n *\n * @function Highcharts.format\n *\n * @param {string} str\n * The string to format.\n *\n * @param {Record<string, *>} ctx\n * The context, a collection of key-value pairs where each key is\n * replaced by its value.\n *\n * @param {Highcharts.Chart} [chart]\n * A `Chart` instance used to get numberFormatter and time.\n *\n * @return {string}\n * The formatted string.\n */\n function format(str = '', ctx, chart) {\n const regex = /\\{([\\w\\:\\.\\,;\\-\\/<>%@\"'’= #\\(\\)]+)\\}/g, \n // The sub expression regex is the same as the top expression regex,\n // but except parens and block helpers (#), and surrounded by parens\n // instead of curly brackets.\n subRegex = /\\(([\\w\\:\\.\\,;\\-\\/<>%@\"'= ]+)\\)/g, matches = [], floatRegex = /f$/, decRegex = /\\.(\\d)/, lang = defaultOptions.lang, time = chart && chart.time || defaultTime, numberFormatter = chart && chart.numberFormatter || numberFormat;\n /*\n * Get a literal or variable value inside a template expression. May be\n * extended with other types like string or null if needed, but keep it\n * small for now.\n */\n const resolveProperty = (key = '') => {\n let n;\n // Literals\n if (key === 'true') {\n return true;\n }\n if (key === 'false') {\n return false;\n }\n if ((n = Number(key)).toString() === key) {\n return n;\n }\n // Variables and constants\n return getNestedProperty(key, ctx);\n };\n let match, currentMatch, depth = 0, hasSub;\n // Parse and create tree\n while ((match = regex.exec(str)) !== null) {\n // When a sub expression is found, it is evaluated first, and the\n // results recursively evaluated until no subexpression exists.\n const mainMatch = match, subMatch = subRegex.exec(match[1]);\n if (subMatch) {\n match = subMatch;\n hasSub = true;\n }\n if (!currentMatch || !currentMatch.isBlock) {\n currentMatch = {\n ctx,\n expression: match[1],\n find: match[0],\n isBlock: match[1].charAt(0) === '#',\n start: match.index,\n startInner: match.index + match[0].length,\n length: match[0].length\n };\n }\n // Identify helpers\n const fn = (currentMatch.isBlock ? mainMatch : match)[1].split(' ')[0].replace('#', '');\n if (helpers[fn]) {\n // Block helper, only 0 level is handled\n if (currentMatch.isBlock && fn === currentMatch.fn) {\n depth++;\n }\n if (!currentMatch.fn) {\n currentMatch.fn = fn;\n }\n }\n // Closing a block helper\n const startingElseSection = match[1] === 'else';\n if (currentMatch.isBlock &&\n currentMatch.fn && (match[1] === `/${currentMatch.fn}` ||\n startingElseSection)) {\n if (!depth) { // === 0\n const start = currentMatch.startInner, body = str.substr(start, match.index - start);\n // Either closing without an else section, or when encountering\n // an else section\n if (currentMatch.body === void 0) {\n currentMatch.body = body;\n currentMatch.startInner = match.index + match[0].length;\n // The body exists already, so this is the else section\n }\n else {\n currentMatch.elseBody = body;\n }\n currentMatch.find += body + match[0];\n if (!startingElseSection) {\n matches.push(currentMatch);\n currentMatch = void 0;\n }\n }\n else if (!startingElseSection) {\n depth--;\n }\n // Common expression\n }\n else if (!currentMatch.isBlock) {\n matches.push(currentMatch);\n }\n // Evaluate sub-matches one by one to prevent orphaned block closers\n if (subMatch && !currentMatch?.isBlock) {\n break;\n }\n }\n // Execute\n matches.forEach((match) => {\n const { body, elseBody, expression, fn } = match;\n let replacement, i;\n // Helper function\n if (fn) {\n // Pass the helpers the amount of arguments defined by the function,\n // then the match as the last argument.\n const args = [match], parts = expression.split(' ');\n i = helpers[fn].length;\n while (i--) {\n args.unshift(resolveProperty(parts[i + 1]));\n }\n replacement = helpers[fn].apply(ctx, args);\n // Block helpers may return true or false. They may also return a\n // string, like the `each` helper.\n if (match.isBlock && typeof replacement === 'boolean') {\n replacement = format(replacement ? body : elseBody, ctx, chart);\n }\n // Simple variable replacement\n }\n else {\n const valueAndFormat = expression.split(':');\n replacement = resolveProperty(valueAndFormat.shift() || '');\n // Format the replacement\n if (valueAndFormat.length && typeof replacement === 'number') {\n const segment = valueAndFormat.join(':');\n if (floatRegex.test(segment)) { // Float\n const decimals = parseInt((segment.match(decRegex) || ['', '-1'])[1], 10);\n if (replacement !== null) {\n replacement = numberFormatter(replacement, decimals, lang.decimalPoint, segment.indexOf(',') > -1 ? lang.thousandsSep : '');\n }\n }\n else {\n replacement = time.dateFormat(segment, replacement);\n }\n }\n }\n str = str.replace(match.find, pick(replacement, ''));\n });\n return hasSub ? format(str, ctx, chart) : str;\n }\n /**\n * Format a number and return a string based on input settings.\n *\n * @sample highcharts/members/highcharts-numberformat/\n * Custom number format\n *\n * @function Highcharts.numberFormat\n *\n * @param {number} number\n * The input number to format.\n *\n * @param {number} decimals\n * The amount of decimals. A value of -1 preserves the amount in the\n * input number.\n *\n * @param {string} [decimalPoint]\n * The decimal point, defaults to the one given in the lang options, or\n * a dot.\n *\n * @param {string} [thousandsSep]\n * The thousands separator, defaults to the one given in the lang\n * options, or a space character.\n *\n * @return {string}\n * The formatted number.\n */\n function numberFormat(number, decimals, decimalPoint, thousandsSep) {\n number = +number || 0;\n decimals = +decimals;\n let ret, fractionDigits;\n const lang = defaultOptions.lang, origDec = (number.toString().split('.')[1] || '').split('e')[0].length, exponent = number.toString().split('e'), firstDecimals = decimals;\n if (decimals === -1) {\n // Preserve decimals. Not huge numbers (#3793).\n decimals = Math.min(origDec, 20);\n }\n else if (!isNumber(decimals)) {\n decimals = 2;\n }\n else if (decimals && exponent[1] && exponent[1] < 0) {\n // Expose decimals from exponential notation (#7042)\n fractionDigits = decimals + +exponent[1];\n if (fractionDigits >= 0) {\n // Remove too small part of the number while keeping the notation\n exponent[0] = (+exponent[0]).toExponential(fractionDigits)\n .split('e')[0];\n decimals = fractionDigits;\n }\n else {\n // `fractionDigits < 0`\n exponent[0] = exponent[0].split('.')[0] || 0;\n if (decimals < 20) {\n // Use number instead of exponential notation (#7405)\n number = (exponent[0] * Math.pow(10, exponent[1]))\n .toFixed(decimals);\n }\n else {\n // Or zero\n number = 0;\n }\n exponent[1] = 0;\n }\n }\n // Add another decimal to avoid rounding errors of float numbers. (#4573)\n // Then use toFixed to handle rounding.\n const roundedNumber = (Math.abs(exponent[1] ? exponent[0] : number) +\n Math.pow(10, -Math.max(decimals, origDec) - 1)).toFixed(decimals);\n // A string containing the positive integer component of the number\n const strinteger = String(pInt(roundedNumber));\n // Leftover after grouping into thousands. Can be 0, 1 or 2.\n const thousands = strinteger.length > 3 ? strinteger.length % 3 : 0;\n // Language\n decimalPoint = pick(decimalPoint, lang.decimalPoint);\n thousandsSep = pick(thousandsSep, lang.thousandsSep);\n // Start building the return\n ret = number < 0 ? '-' : '';\n // Add the leftover after grouping into thousands. For example, in the\n // number 42 000 000, this line adds 42.\n ret += thousands ? strinteger.substr(0, thousands) + thousandsSep : '';\n if (+exponent[1] < 0 && !firstDecimals) {\n ret = '0';\n }\n else {\n // Add the remaining thousands groups, joined by the thousands separator\n ret += strinteger\n .substr(thousands)\n .replace(/(\\d{3})(?=\\d)/g, '$1' + thousandsSep);\n }\n // Add the decimal point and the decimal component\n if (decimals) {\n // Get the decimal component\n ret += decimalPoint + roundedNumber.slice(-decimals);\n }\n else if (+ret === 0) { // Remove signed minus #20564\n ret = '0';\n }\n if (exponent[1] && +ret !== 0) {\n ret += 'e' + exponent[1];\n }\n return ret;\n }\n /* *\n *\n * Default Export\n *\n * */\n const Templating = {\n dateFormat,\n format,\n helpers,\n numberFormat\n };\n\n return Templating;\n });\n _registerModule(_modules, 'DataGrid/Table/Column.js', [_modules['DataGrid/Globals.js'], _modules['Core/Utilities.js'], _modules['DataGrid/Utils.js'], _modules['Core/Templating.js']], function (Globals, Utils, DGUtils, Templating) {\n /* *\n *\n * Data Grid class\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 * - Dawid Dragula\n * - Sebastian Bochan\n *\n * */\n const { merge } = Utils;\n const { makeHTMLElement } = DGUtils;\n /* *\n *\n * Class\n *\n * */\n /**\n * Represents a column in the data grid.\n */\n class Column {\n /* *\n *\n * Constructor\n *\n * */\n /**\n * Constructs a column in the data grid.\n *\n * @param viewport\n * The viewport (table) the column belongs to.\n *\n * @param id\n * The id of the column (`name` in the Data Table).\n *\n * @param index\n * The index of the column.\n */\n constructor(viewport, id, index) {\n /**\n * The cells of the column.\n */\n this.cells = [];\n this.options = merge(viewport.dataGrid.options?.columnDefaults ?? {}, viewport.dataGrid.columnOptionsMap?.[id] ?? {});\n this.id = id;\n this.index = index;\n this.viewport = viewport;\n this.width = this.getInitialWidth();\n this.loadData();\n }\n /* *\n *\n * Methods\n *\n * */\n /**\n * Loads the data of the column from the viewport's data table.\n */\n loadData() {\n this.data = this.viewport.dataTable.getColumn(this.id, true);\n }\n /**\n * Registers a cell in the column.\n *\n * @param cell\n * The cell to register.\n */\n registerCell(cell) {\n cell.htmlElement.setAttribute('data-column-id', this.id);\n if (this.options.className) {\n cell.htmlElement.classList.add(...this.options.className.split(/\\s+/g));\n }\n if (this.viewport.dataGrid.hoveredColumnId === this.id) {\n cell.htmlElement.classList.add(Globals.classNames.hoveredColumn);\n }\n this.cells.push(cell);\n }\n /**\n * Unregister a cell from the column.\n *\n * @param cell\n * The cell to unregister.\n */\n unregisterCell(cell) {\n const index = this.cells.indexOf(cell);\n if (index > -1) {\n this.cells.splice(index, 1);\n }\n }\n /**\n * Returns the width of the column in pixels.\n */\n getWidth() {\n const vp = this.viewport;\n return vp.columnDistribution === 'full' ?\n vp.getWidthFromRatio(this.width) :\n this.width;\n }\n /**\n * Adds or removes the hovered CSS class to the column element\n * and its cells.\n *\n * @param hovered\n * Whether the column should be hovered.\n */\n setHoveredState(hovered) {\n this.header?.htmlElement?.classList[hovered ? 'add' : 'remove'](Globals.classNames.hoveredColumn);\n for (let i = 0, iEnd = this.cells.length; i < iEnd; ++i) {\n this.cells[i].htmlElement.classList[hovered ? 'add' : 'remove'](Globals.classNames.hoveredColumn);\n }\n }\n /**\n * Creates a mock element to measure the width of the column from the CSS.\n * The element is appended to the viewport container and then removed.\n * It should be called only once for each column.\n *\n * @returns The initial width of the column.\n */\n getInitialWidth() {\n let result;\n const { viewport } = this;\n // Set the initial width of the column.\n const mock = makeHTMLElement('div', {\n className: Globals.classNames.columnElement\n }, viewport.dataGrid.container);\n mock.setAttribute('data-column-id', this.id);\n if (this.options.className) {\n mock.classList.add(...this.options.className.split(/\\s+/g));\n }\n if (viewport.columnDistribution === 'full') {\n result = this.getInitialFullDistWidth(mock);\n }\n else {\n result = mock.offsetWidth || 100;\n }\n mock.remove();\n return result;\n }\n /**\n * The initial width of the column in the full distribution mode. The last\n * column in the viewport will have to fill the remaining space.\n *\n * @param mock\n * The mock element to measure the width.\n */\n getInitialFullDistWidth(mock) {\n const vp = this.viewport;\n const columnsCount = vp.dataGrid.enabledColumns?.length ?? 0;\n if (this.index < columnsCount - 1) {\n return vp.getRatioFromWidth(mock.offsetWidth) || 1 / columnsCount;\n }\n let allPreviousWidths = 0;\n for (let i = 0, iEnd = columnsCount - 1; i < iEnd; i++) {\n allPreviousWidths += vp.columns[i].width;\n }\n const result = 1 - allPreviousWidths;\n if (result < 0) {\n // eslint-disable-next-line no-console\n console.warn('The sum of the columns\\' widths exceeds the ' +\n 'viewport width. It may cause unexpected behavior in the ' +\n 'full distribution mode. Check the CSS styles of the ' +\n 'columns. Corrections may be needed.');\n }\n return result;\n }\n /**\n * Returns the formatted string where the templating context is the column.\n *\n * @param template\n * The template string.\n *\n * @return\n * The formatted string.\n */\n format(template) {\n return Templating.format(template, this);\n }\n }\n /* *\n *\n * Static Properties\n *\n * */\n /**\n * The minimum width of a column.\n * @internal\n */\n Column.MIN_COLUMN_WIDTH = 20;\n /* *\n *\n * Default Export\n *\n * */\n\n return Column;\n });\n _registerModule(_modules, 'DataGrid/Table/Row.js', [_modules['DataGrid/Utils.js']], function (DGUtils) {\n /* *\n *\n * Data Grid class\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 * - Dawid Dragula\n * - Sebastian Bochan\n *\n * */\n const { makeHTMLElement } = DGUtils;\n /* *\n *\n * Abstract Class of Row\n *\n * */\n /**\n * Represents a row in the data grid.\n */\n class Row {\n /* *\n *\n * Constructor\n *\n * */\n /**\n * Constructs a row in the data grid.\n *\n * @param viewport\n * The Data Grid Table instance which the row belongs to.\n */\n constructor(viewport) {\n /* *\n *\n * Properties\n *\n * */\n /**\n * The cells of the row.\n */\n this.cells = [];\n this.viewport = viewport;\n this.htmlElement = makeHTMLElement('tr', {});\n }\n /**\n * Renders the row's content. It does not attach the row element to the\n * viewport nor pushes the rows to the viewport.rows array.\n */\n render() {\n const columns = this.viewport.columns;\n for (let i = 0, iEnd = columns.length; i < iEnd; i++) {\n const cell = this.createCell(columns[i]);\n cell.render();\n }\n this.reflow();\n }\n /**\n * Reflows the row's content dimensions.\n */\n reflow() {\n for (let j = 0, jEnd = this.cells.length; j < jEnd; ++j) {\n this.cells[j].reflow();\n }\n const vp = this.viewport;\n if (vp.rowsWidth) {\n this.htmlElement.style.width = vp.rowsWidth + 'px';\n }\n }\n /**\n * Destroys the row.\n */\n destroy() {\n this.destroyed = true;\n if (!this.htmlElement) {\n return;\n }\n for (let i = 0, iEnd = this.cells.length; i < iEnd; ++i) {\n this.cells[i].destroy();\n }\n this.htmlElement.remove();\n }\n /**\n * Returns the cell with the given column ID.\n *\n * @param columnId\n * The column ID that the cell belongs to.\n *\n * @returns\n * The cell with the given column ID or undefined if not found.\n */\n getCell(columnId) {\n return this.cells.find((cell) => cell.column.id === columnId);\n }\n /**\n * Registers a cell in the row.\n *\n * @param cell\n * The cell to register.\n */\n registerCell(cell) {\n this.cells.push(cell);\n }\n /**\n * Unregister a cell from the row.\n *\n * @param cell\n * The cell to unregister.\n */\n unregisterCell(cell) {\n if (this.destroyed) {\n return;\n }\n const index = this.cells.indexOf(cell);\n if (index > -1) {\n this.cells.splice(index, 1);\n }\n }\n }\n /* *\n *\n * Default Export\n *\n * */\n\n return Row;\n });\n _registerModule(_modules, 'DataGrid/Table/Cell.js', [_modules['Core/Renderer/HTML/AST.js'], _modules['Core/Templating.js']], function (AST, Templating) {\n /* *\n *\n * Data Grid class\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 * - Dawid Dragula\n * - Sebastian Bochan\n *\n * */\n /* *\n *\n * Abstract Class of Cell\n *\n * */\n class Cell {\n /* *\n *\n * Constructor\n *\n * */\n /**\n * Constructs a cell in the data grid.\n *\n * @param column\n * The column of the cell.\n *\n * @param row\n * The row of the cell.\n */\n constructor(column, row) {\n /**\n * Array of cell events to be removed when the cell is destroyed.\n */\n this.cellEvents = [];\n this.column = column;\n this.row = row;\n this.row.registerCell(this);\n this.htmlElement = this.init();\n this.htmlElement.setAttribute('tabindex', '-1');\n this.initEvents();\n }\n /* *\n *\n * Methods\n *\n * */\n /**\n * Init element.\n * @internal\n */\n init() {\n return document.createElement('td', {});\n }\n /**\n * Initialize event listeners. Events added to the `cellEvents` array will\n * be registered now and unregistered when the cell is destroyed.\n */\n initEvents() {\n this.cellEvents.push(['blur', () => this.onBlur()]);\n this.cellEvents.push(['focus', () => this.onFocus()]);\n this.cellEvents.push(['click', (e) => {\n this.onClick(e);\n }]);\n this.cellEvents.push(['keydown', (e) => {\n this.onKeyDown(e);\n }]);\n this.cellEvents.forEach((pair) => {\n this.htmlElement.addEventListener(pair[0], pair[1]);\n });\n }\n /**\n * Handles the focus event on the cell.\n */\n onFocus() {\n const vp = this.row.viewport;\n const focusAnchor = vp.rowsVirtualizer.focusAnchorCell?.htmlElement;\n focusAnchor?.setAttribute('tabindex', '-1');\n }\n /**\n * Handles the blur event on the cell.\n */\n onBlur() {\n const vp = this.row.viewport;\n const focusAnchor = vp.rowsVirtualizer.focusAnchorCell?.htmlElement;\n focusAnchor?.setAttribute('tabindex', '0');\n delete vp.focusCursor;\n }\n /**\n * Handles user keydown on the cell.\n *\n * @param e\n * Keyboard event object.\n */\n onKeyDown(e) {\n const { row, column } = this;\n const vp = row.viewport;\n const changeFocusKeys = {\n ArrowDown: [1, 0],\n ArrowUp: [-1, 0],\n ArrowLeft: [0, -1],\n ArrowRight: [0, 1]\n };\n const dir = changeFocusKeys[e.key];\n if (dir) {\n e.preventDefault();\n e.stopPropagation();\n const localRowIndex = row.index === void 0 ? -1 : (row.index - vp.rows[0].index);\n const nextVerticalDir = localRowIndex + dir[0];\n if (nextVerticalDir < 0 && vp.header) {\n vp.columns[column.index + dir[1]]?.header?.htmlElement.focus();\n return;\n }\n const nextRow = vp.rows[nextVerticalDir];\n if (nextRow) {\n nextRow.cells[column.index + dir[1]]?.htmlElement.focus();\n }\n }\n }\n /**\n * Renders the cell by appending the HTML element to the row.\n */\n render() {\n this.row.htmlElement.appendChild(this.htmlElement);\n }\n /**\n * Reflows the cell dimensions.\n */\n reflow() {\n const column = this.column;\n const elementStyle = this.htmlElement.style;\n elementStyle.width = elementStyle.maxWidth = column.getWidth() + 'px';\n }\n /**\n * Returns the formatted string where the templating context is the cell.\n *\n * @param template\n * The template string.\n *\n * @return\n * The formatted string.\n */\n format(template) {\n return Templating.format(template, this);\n }\n /**\n * Sets the custom class name of the cell based on the template.\n *\n * @param template\n * The template string.\n */\n setCustomClassName(template) {\n const element = this.htmlElement;\n if (this.customClassName) {\n element.classList.remove(...this.customClassName.split(/\\s+/g));\n }\n if (!template) {\n delete this.customClassName;\n return;\n }\n const newClassName = this.format(template);\n if (!newClassName) {\n delete this.customClassName;\n return;\n }\n element.classList.add(...newClassName.split(/\\s+/g));\n this.customClassName = newClassName;\n }\n /**\n * Renders content of cell.\n *\n * @param cellContent\n * Content to render.\n *\n * @param parentElement\n * Parent element where the content should be.\n *\n * @internal\n */\n renderHTMLCellContent(cellContent, parentElement) {\n const formattedNodes = new AST(cellContent);\n formattedNodes.addToDOM(parentElement);\n }\n /**\n * Destroys the cell.\n */\n destroy() {\n this.cellEvents.forEach((pair) => {\n this.htmlElement.removeEventListener(pair[0], pair[1]);\n });\n this.column.unregisterCell(this);\n this.row.unregisterCell(this);\n this.htmlElement.remove();\n }\n }\n /* *\n *\n * Default Export\n *\n * */\n\n return Cell;\n });\n _registerModule(_modules, 'DataGrid/Table/Actions/ColumnSorting.js', [_modules['DataGrid/Globals.js']], function (Globals) {\n /* *\n *\n * Data Grid class\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 * - Dawid Dragula\n * - Sebastian Bochan\n *\n * */\n /* *\n *\n * Class\n *\n * */\n /**\n * Class that manages sorting for a dedicated column.\n */\n class ColumnSorting {\n /* *\n *\n * Constructor\n *\n * */\n /**\n * Constructs sorting for a dedicated column.\n *\n * @param column\n * The column that be sorted.\n *\n * @param headerCellElement\n * The head element of the column.\n */\n constructor(column, headerCellElement) {\n /**\n * Toggle sorting order for the column in the order: asc -> desc -> none\n */\n this.toggle = () => {\n const viewport = this.column.viewport;\n const querying = viewport.dataGrid.querying;\n const sortingController = querying.sorting;\n const currentOrder = (sortingController.currentSorting?.columnId === this.column.id ?\n sortingController.currentSorting.order : null) || 'none';\n const consequents = {\n none: 'asc',\n asc: 'desc',\n desc: null\n };\n void this.setOrder(consequents[currentOrder]);\n };\n this.column = column;\n this.headerCellElement = headerCellElement;\n this.addHeaderElementAttributes();\n }\n /* *\n *\n * Methods\n *\n * */\n /**\n * Adds attributes to the column header.\n */\n addHeaderElementAttributes() {\n const col = this.column;\n const sortingOptions = col.options.sorting;\n const { currentSorting } = col.viewport.dataGrid.querying.sorting;\n const el = this.headerCellElement;\n if (sortingOptions?.sortable) {\n el.classList.add(Globals.classNames.columnSortable);\n }\n if (currentSorting?.columnId !== col.id || !currentSorting?.order) {\n el.classList.remove(Globals.classNames.columnSortedAsc);\n el.classList.remove(Globals.classNames.columnSortedDesc);\n return;\n }\n switch (currentSorting?.order) {\n case 'asc':\n el.classList.add(Globals.classNames.columnSortedAsc);\n el.classList.remove(Globals.classNames.columnSortedDesc);\n break;\n case 'desc':\n el.classList.remove(Globals.classNames.columnSortedAsc);\n el.classList.add(Globals.classNames.columnSortedDesc);\n break;\n }\n }\n /**\n * Set sorting order for the column. It will modify the presentation data\n * and rerender the rows.\n *\n * @param order\n * The order of sorting. It can be `'asc'`, `'desc'` or `null` if the\n * sorting should be disabled.\n */\n async setOrder(order) {\n const viewport = this.column.viewport;\n const querying = viewport.dataGrid.querying;\n const sortingController = querying.sorting;\n sortingController.setSorting(order, this.column.id);\n await querying.proceed();\n viewport.loadPresentationData();\n for (const col of viewport.columns) {\n col.sorting?.addHeaderElementAttributes();\n }\n viewport.dataGrid.options?.events?.column?.afterSorting?.call(this.column);\n }\n }\n /* *\n *\n * Default Export\n *\n * */\n\n return ColumnSorting;\n });\n _registerModule(_modules, 'DataGrid/Table/Header/HeaderCell.js', [_modules['DataGrid/Table/Cell.js'], _modules['DataGrid/Utils.js'], _modules['DataGrid/Globals.js'], _modules['DataGrid/Table/Actions/ColumnSorting.js'], _modules['Core/Utilities.js']], function (Cell, DGUtils, Globals, ColumnSorting, Utilities) {\n /* *\n *\n * Data Grid class\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 * - Dawid Dragula\n * - Sebastian Bochan\n *\n * */\n const { makeHTMLElement, isHTML } = DGUtils;\n const { merge } = Utilities;\n /* *\n *\n * Class\n *\n * */\n /**\n * Represents a cell in the data grid header.\n */\n class HeaderCell extends Cell {\n /* *\n *\n * Constructor\n *\n * */\n /**\n * Constructs a cell in the data grid header.\n *\n * @param column\n * The column of the cell.\n *\n * @param row\n * The row of the cell.\n */\n constructor(column, row) {\n super(column, row);\n /**\n * Reference to options in settings header.\n */\n this.options = {};\n /**\n * Content value of the header cell.\n */\n this.value = '';\n column.header = this;\n this.isMain = !!this.row.viewport.getColumn(this.column.id);\n }\n /* *\n *\n * Methods\n *\n * */\n /**\n * Init element.\n */\n init() {\n const elem = document.createElement('th', {});\n elem.classList.add(Globals.classNames.headerCell);\n return elem;\n }\n /**\n * Render the cell container.\n */\n render() {\n const column = this.column;\n const options = merge(column.options, this.options);\n const headerCellOptions = options.header || {};\n if (headerCellOptions.formatter) {\n this.value = headerCellOptions.formatter.call(this).toString();\n }\n else if (headerCellOptions.format) {\n this.value = column.format(headerCellOptions.format);\n }\n else {\n this.value = column.id;\n }\n // Render content of th element\n this.row.htmlElement.appendChild(this.htmlElement);\n this.headerContent = makeHTMLElement('div', {\n className: Globals.classNames.headerCellContent\n }, this.htmlElement);\n if (isHTML(this.value)) {\n this.renderHTMLCellContent(this.value, this.headerContent);\n }\n else {\n this.headerContent.innerText = this.value;\n }\n // Set the accessibility attributes.\n this.htmlElement.setAttribute('scope', 'col');\n this.htmlElement.setAttribute('data-column-id', column.id);\n if (this.options.className) {\n this.htmlElement.classList.add(...this.options.className.split(/\\s+/g));\n }\n if (this.isMain) {\n // Add user column classname\n if (column.options.className) {\n this.htmlElement.classList.add(...column.options.className.split(/\\s+/g));\n }\n // Add resizing\n this.column.viewport.columnsResizer?.renderColumnDragHandles(this.column, this);\n // Add sorting\n this.initColumnSorting();\n }\n this.setCustomClassName(options.header?.className);\n }\n reflow() {\n const cell = this;\n const th = cell.htmlElement;\n const vp = cell.column.viewport;\n if (!th) {\n return;\n }\n let width = 0;\n if (cell.columns) {\n for (const col of cell.columns) {\n width += (vp.getColumn(col.columnId || '')?.getWidth()) || 0;\n }\n }\n else {\n width = cell.column.getWidth();\n }\n // Set the width of the column. Max width is needed for the\n // overflow: hidden to work.\n th.style.width = th.style.maxWidth = width + 'px';\n }\n onKeyDown(e) {\n if (e.target !== this.htmlElement) {\n return;\n }\n if (e.key === 'Enter') {\n if (this.column.options.sorting?.sortable) {\n this.column.sorting?.toggle();\n }\n return;\n }\n super.onKeyDown(e);\n }\n onClick(e) {\n const column = this.column;\n if (!this.isMain || (e.target !== this.htmlElement &&\n e.target !== column.header?.headerContent)) {\n return;\n }\n if (column.options.sorting?.sortable) {\n column.sorting?.toggle();\n }\n column.viewport.dataGrid.options?.events?.header?.click?.call(column);\n }\n /**\n * Add sorting option to the column.\n */\n initColumnSorting() {\n const { column } = this;\n column.sorting = new ColumnSorting(column, this.htmlElement);\n }\n }\n /* *\n *\n * Default Export\n *\n * */\n\n return HeaderCell;\n });\n _registerModule(_modules, 'DataGrid/Table/Header/HeaderRow.js', [_modules['DataGrid/Table/Row.js'], _modules['DataGrid/Globals.js'], _modules['DataGrid/Table/Header/HeaderCell.js'], _modules['DataGrid/Table/Column.js'], _modules['DataGrid/Utils.js']], function (Row, Globals, HeaderCell, Column, DGUtils) {\n /* *\n *\n * Data Grid class\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 * - Dawid Dragula\n * - Sebastian Bochan\n *\n * */\n const { sanitizeText } = DGUtils;\n /* *\n *\n * Class\n *\n * */\n /**\n * Represents a row in the data grid header.\n */\n class HeaderRow extends Row {\n /* *\n *\n * Constructor\n *\n * */\n /**\n * Constructs a row in the data grid.\n *\n * @param viewport\n * The Data Grid Table instance which the row belongs to.\n *\n * @param level\n * The current level of header that is rendered.\n */\n constructor(viewport, level) {\n super(viewport);\n this.level = level;\n this.setRowAttributes();\n }\n /* *\n *\n * Methods\n *\n * */\n createCell(column) {\n return new HeaderCell(column, this);\n }\n /**\n * Renders the row's content in the header.\n *\n * @param level\n * The current level in the header tree\n */\n renderMultipleLevel(level) {\n const header = this.viewport.dataGrid.options?.header;\n const vp = this.viewport;\n const enabledColumns = vp.dataGrid.enabledColumns;\n // Render element\n vp.theadElement?.appendChild(this.htmlElement);\n this.htmlElement.classList.add(Globals.classNames.headerRow);\n if (!header) {\n super.render();\n return;\n }\n const columnsOnLevel = this.getColumnsAtLevel(header, level);\n for (let i = 0, iEnd = columnsOnLevel.length; i < iEnd; i++) {\n const column = columnsOnLevel[i];\n const colSpan = (typeof column !== 'string' && column.columns) ?\n vp.dataGrid.getColumnIds(column.columns).length : 0;\n const columnId = typeof column === 'string' ?\n column : column.columnId;\n const dataColumn = vp.getColumn(columnId || '');\n const headerFormat = (typeof column !== 'string') ?\n column.format : void 0;\n const className = (typeof column !== 'string') ?\n column.className : void 0;\n // Skip hidden column or header when all columns are hidden.\n if ((columnId &&\n enabledColumns && enabledColumns?.indexOf(columnId) < 0) || (!dataColumn && colSpan === 0)) {\n continue;\n }\n const headerCell = this.createCell(vp.getColumn(columnId || '') ||\n new Column(vp, \n // Remove HTML tags and empty spaces.\n sanitizeText(headerFormat || '').trim() || '', i));\n if (headerFormat) {\n if (!headerCell.options.header) {\n headerCell.options.header = {};\n }\n headerCell.options.header.format = headerFormat;\n }\n if (className) {\n headerCell.options.className = className;\n }\n // Add class to disable left border on first column\n if (dataColumn?.index === 0 && i === 0) {\n headerCell.htmlElement.classList.add(Globals.classNames.columnFirst);\n }\n headerCell.render();\n headerCell.columns =\n typeof column !== 'string' ? column.columns : void 0;\n if (columnId) {\n headerCell.htmlElement.setAttribute('rowSpan', (this.viewport.header?.levels || 1) - level);\n }\n else {\n if (colSpan > 1) {\n headerCell.htmlElement.setAttribute('colSpan', colSpan);\n }\n }\n }\n }\n reflow() {\n const row = this;\n for (let i = 0, iEnd = row.cells.length; i < iEnd; i++) {\n const cell = row.cells[i];\n cell.reflow();\n }\n }\n /**\n * Get all headers that should be rendered in a level.\n *\n * @param scope\n * Level that we start\n *\n * @param targetLevel\n * Max level\n *\n * @param currentLevel\n * Current level\n *\n * @return\n * Array of headers that should be rendered in a level\n */\n getColumnsAtLevel(scope, targetLevel, currentLevel = 0) {\n let result = [];\n for (const column of scope) {\n if (currentLevel === targetLevel) {\n result.push(column);\n }\n if (typeof column !== 'string' && column.columns) {\n result = result.concat(this.getColumnsAtLevel(column.columns, targetLevel, currentLevel + 1));\n }\n }\n return result;\n }\n /**\n * Sets the row HTML element attributes and additional classes.\n */\n setRowAttributes() {\n const el = this.htmlElement;\n el.setAttribute('aria-rowindex', this.level);\n }\n }\n /* *\n *\n * Default Export\n *\n * */\n\n return HeaderRow;\n });\n _registerModule(_modules, 'DataGrid/Table/Header/TableHeader.js', [_modules['DataGrid/Table/Header/HeaderRow.js'], _modules['Core/Utilities.js']], function (HeaderRow, Utils) {\n /* *\n *\n * Data Grid class\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 * - Dawid Dragula\n * - Sebastian Bochan\n *\n * */\n const { getStyle } = Utils;\n /* *\n *\n * Class\n *\n * */\n /**\n * Represents a table header row containing the cells (headers) with\n * column names.\n */\n class TableHeader {\n /* *\n *\n * Constructor\n *\n * */\n /**\n * Constructs a new table head.\n *\n * @param viewport\n * The viewport (table) the table head belongs to.\n */\n constructor(viewport) {\n /* *\n *\n * Properties\n *\n * */\n /**\n * The visible columns of the table.\n */\n this.columns = [];\n /**\n * The container of the table head.\n */\n this.rows = [];\n /**\n * Amount of levels in the header, that is used in creating correct rows.\n */\n this.levels = 1;\n this.viewport = viewport;\n this.columns = viewport.columns;\n if (viewport.dataGrid.options?.header) {\n this.levels = this.getRowLevels(viewport.dataGrid.options?.header);\n }\n }\n /* *\n *\n * Methods\n *\n * */\n /**\n * Renders the table head content.\n */\n render() {\n const vp = this.viewport;\n const dataGrid = vp.dataGrid;\n if (!dataGrid.enabledColumns) {\n return;\n }\n for (let i = 0, iEnd = this.levels; i < iEnd; i++) {\n const row = new HeaderRow(vp, i + 1); // Avoid indexing from 0\n row.renderMultipleLevel(i);\n this.rows.push(row);\n }\n }\n /**\n * Reflows the table head's content dimensions.\n */\n reflow() {\n const vp = this.viewport;\n if (!vp.theadElement) {\n return;\n }\n const { clientWidth, offsetWidth } = vp.tbodyElement;\n const header = vp.header;\n const rows = this.rows;\n const tableEl = header?.viewport.dataGrid.tableElement;\n const theadEL = header?.viewport.theadElement;\n const theadBorder = theadEL && getStyle(theadEL, 'border-right-width', true) || 0;\n const tableBorder = (tableEl && getStyle(tableEl, 'border-right-width', true)) || 0;\n const bordersWidth = offsetWidth - clientWidth - theadBorder - tableBorder;\n for (const row of rows) {\n row.reflow();\n }\n if (vp.rowsWidth) {\n vp.theadElement.style.width =\n Math.max(vp.rowsWidth, clientWidth) + bordersWidth + 'px';\n }\n // Adjust cell's width when scrollbar is enabled.\n if (header && bordersWidth > 0) {\n const cells = header.rows[header.rows.length - 1].cells;\n const cellHtmlElement = cells[cells.length - 1].htmlElement;\n cellHtmlElement.style.width = cellHtmlElement.style.maxWidth =\n cellHtmlElement.offsetWidth + bordersWidth + 'px';\n }\n }\n /**\n * Returns amount of rows for the current cell in header tree.\n *\n * @param scope\n * Structure of header\n *\n * @returns\n */\n getRowLevels(scope) {\n let maxDepth = 0;\n for (const item of scope) {\n if (typeof item !== 'string' && item.columns) {\n const depth = this.getRowLevels(item.columns);\n if (depth > maxDepth) {\n maxDepth = depth;\n }\n }\n }\n return maxDepth + 1;\n }\n /**\n * Scrolls the table head horizontally.\n *\n * @param scrollLeft\n * The left scroll position.\n */\n scrollHorizontally(scrollLeft) {\n const el = this.viewport.theadElement;\n if (!el) {\n return;\n }\n el.style.transform = `translateX(${-scrollLeft}px)`;\n }\n }\n /* *\n *\n * Default Export\n *\n * */\n\n return TableHeader;\n });\n _registerModule(_modules, 'DataGrid/Table/Content/TableCell.js', [_modules['DataGrid/Table/Cell.js'], _modules['Core/Utilities.js'], _modules['DataGrid/Utils.js']], function (Cell, Utils, DGUtils) {\n /* *\n *\n * Data Grid class\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 * - Dawid Dragula\n * - Sebastian Bochan\n *\n * */\n const { defined, fireEvent } = Utils;\n const { isHTML } = DGUtils;\n /* *\n *\n * Class\n *\n * */\n /**\n * Represents a cell in the data grid.\n */\n class TableCell extends Cell {\n /* *\n *\n * Constructor\n *\n * */\n /**\n * Constructs a cell in the data grid.\n *\n * @param column\n * The column of the cell.\n *\n * @param row\n * The row of the cell.\n */\n constructor(column, row) {\n super(column, row);\n this.row = row;\n this.column.registerCell(this);\n }\n /* *\n *\n * Methods\n *\n * */\n /**\n * Renders the cell by appending it to the row and setting its value.\n */\n render() {\n super.render();\n // It may happen that `await` will be needed here in the future.\n void this.setValue(this.column.data?.[this.row.index], false);\n }\n initEvents() {\n this.cellEvents.push(['dblclick', (e) => {\n this.onDblClick(e);\n }]);\n this.cellEvents.push(['mouseout', () => this.onMouseOut()]);\n this.cellEvents.push(['mouseover', () => this.onMouseOver()]);\n this.cellEvents.push(['mousedown', (e) => {\n this.onMouseDown(e);\n }]);\n super.initEvents();\n }\n /**\n * Handles the focus event on the cell.\n */\n onFocus() {\n super.onFocus();\n const vp = this.row.viewport;\n vp.focusCursor = [\n this.row.index,\n this.column.index\n ];\n }\n /**\n * Handles the mouse down event on the cell.\n *\n * @param e\n * The mouse event object.\n */\n onMouseDown(e) {\n const { dataGrid } = this.row.viewport;\n if (e.target === this.htmlElement) {\n this.htmlElement.focus();\n }\n fireEvent(dataGrid, 'cellMouseDown', {\n target: this\n });\n }\n /**\n * Handles the mouse over event on the cell.\n */\n onMouseOver() {\n const { dataGrid } = this.row.viewport;\n dataGrid.hoverRow(this.row.index);\n dataGrid.hoverColumn(this.column.id);\n dataGrid.options?.events?.cell?.mouseOver?.call(this);\n fireEvent(dataGrid, 'cellMouseOver', {\n target: this\n });\n }\n /**\n * Handles the mouse out event on the cell.\n */\n onMouseOut() {\n const { dataGrid } = this.row.viewport;\n dataGrid.hoverRow();\n dataGrid.hoverColumn();\n dataGrid.options?.events?.cell?.mouseOut?.call(this);\n fireEvent(dataGrid, 'cellMouseOut', {\n target: this\n });\n }\n /**\n * Handles the double click event on the cell.\n *\n * @param e\n * The mouse event object.\n */\n onDblClick(e) {\n const vp = this.row.viewport;\n const { dataGrid } = vp;\n if (this.column.options.cells?.editable) {\n e.preventDefault();\n vp.cellEditing.startEditing(this);\n }\n dataGrid.options?.events?.cell?.dblClick?.call(this);\n fireEvent(dataGrid, 'cellDblClick', {\n target: this\n });\n }\n onClick() {\n const vp = this.row.viewport;\n const { dataGrid } = vp;\n dataGrid.options?.events?.cell?.click?.call(this);\n fireEvent(dataGrid, 'cellClick', {\n target: this\n });\n }\n onKeyDown(e) {\n if (e.target !== this.htmlElement) {\n return;\n }\n if (e.key === 'Enter') {\n if (this.column.options.cells?.editable) {\n this.row.viewport.cellEditing.startEditing(this);\n }\n return;\n }\n super.onKeyDown(e);\n }\n /**\n * Sets the value & updating content of the cell.\n *\n * @param value\n * The raw value to set.\n *\n * @param updateTable\n * Whether to update the table after setting the content.\n */\n async setValue(value, updateTable) {\n this.value = value;\n const vp = this.column.viewport;\n const element = this.htmlElement;\n const cellContent = this.formatCell();\n if (isHTML(cellContent)) {\n this.renderHTMLCellContent(cellContent, element);\n }\n else {\n element.innerText = cellContent;\n }\n this.htmlElement.setAttribute('data-value', this.value + '');\n this.setCustomClassName(this.column.options.cells?.className);\n vp.dataGrid.options?.events?.cell?.afterSetValue?.call(this);\n if (!updateTable) {\n return;\n }\n const { dataTable: originalDataTable } = vp.dataGrid;\n // Taken the local row index of the original datagrid data table, but\n // in the future it should affect the globally original data table.\n // (To be done after the DataLayer refinement)\n const rowTableIndex = this.row.id && originalDataTable?.getLocalRowIndex(this.row.id);\n if (!originalDataTable || rowTableIndex === void 0) {\n return;\n }\n originalDataTable.setCell(this.column.id, rowTableIndex, this.value);\n if (vp.dataGrid.querying.willNotModify()) {\n // If the data table does not need to be modified, skip the\n // data modification and don't update the whole table. It checks\n // if the modifiers are globally set. Can be changed in the future\n // to check if the modifiers are set for the specific columns.\n return;\n }\n let focusedRowId;\n if (vp.focusCursor) {\n focusedRowId = vp.dataTable.getOriginalRowIndex(vp.focusCursor[0]);\n }\n await vp.dataGrid.querying.proceed(true);\n vp.loadPresentationData();\n if (focusedRowId !== void 0 && vp.focusCursor) {\n const newRowIndex = vp.dataTable.getLocalRowIndex(focusedRowId);\n if (newRowIndex !== void 0) {\n vp.rows[newRowIndex - vp.rows[0].index]\n ?.cells[vp.focusCursor[1]].htmlElement.focus();\n }\n }\n }\n /**\n * Handle the formatting content of the cell.\n */\n formatCell() {\n const options = this.column.options.cells || {};\n const { format, formatter } = options;\n let value = this.value;\n if (!defined(value)) {\n value = '';\n }\n let cellContent = '';\n if (formatter) {\n cellContent = formatter.call(this).toString();\n }\n else {\n cellContent = (format ? this.format(format) : value + '');\n }\n return cellContent;\n }\n /**\n * Destroys the cell.\n */\n destroy() {\n super.destroy();\n }\n }\n /* *\n *\n * Default Export\n *\n * */\n\n return TableCell;\n });\n _registerModule(_modules, 'DataGrid/Table/Content/TableRow.js', [_modules['DataGrid/Table/Row.js'], _modules['DataGrid/Table/Content/TableCell.js'], _modules['DataGrid/Globals.js']], function (Row, TableCell, Globals) {\n /* *\n *\n * Data Grid class\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 * - Dawid Dragula\n * - Sebastian Bochan\n *\n * */\n /* *\n *\n * Class\n *\n * */\n /**\n * Represents a row in the data grid.\n */\n class TableRow extends Row {\n /* *\n *\n * Constructor\n *\n * */\n /**\n * Constructs a row in the data grid.\n *\n * @param viewport\n * The Data Grid Table instance which the row belongs to.\n *\n * @param index\n * The index of the row in the data table.\n */\n constructor(viewport, index) {\n super(viewport);\n this.index = index;\n this.id = viewport.dataTable.getOriginalRowIndex(index);\n this.setRowAttributes();\n }\n /* *\n *\n * Methods\n *\n * */\n createCell(column) {\n return new TableCell(column, this);\n }\n /**\n * Adds or removes the hovered CSS class to the row element.\n *\n * @param hovered\n * Whether the row should be hovered.\n */\n setHoveredState(hovered) {\n this.htmlElement.classList[hovered ? 'add' : 'remove'](Globals.classNames.hoveredRow);\n if (hovered) {\n this.viewport.dataGrid.hoveredRowIndex = this.index;\n }\n }\n /**\n * Sets the row HTML element attributes and additional classes.\n */\n setRowAttributes() {\n const idx = this.index;\n const el = this.htmlElement;\n el.style.transform = `translateY(${this.getDefaultTopOffset()}px)`;\n el.classList.add(Globals.classNames.rowElement);\n // Index of the row in the presentation data table\n el.setAttribute('data-row-index', idx);\n // Index of the row in the original data table (ID)\n if (this.id !== void 0) {\n el.setAttribute('data-row-id', this.id);\n }\n // Calculate levels of header, 1 to avoid indexing from 0\n el.setAttribute('aria-rowindex', idx + (this.viewport.header?.levels ?? 1) + 1);\n if (idx % 2 === 1) {\n el.classList.add(Globals.classNames.rowOdd);\n }\n if (this.viewport.dataGrid.hoveredRowIndex === idx) {\n el.classList.add(Globals.classNames.hoveredRow);\n }\n }\n /**\n * Returns the default top offset of the row (before adjusting row heights).\n * @internal\n */\n getDefaultTopOffset() {\n return this.index * this.viewport.rowsVirtualizer.defaultRowHeight;\n }\n }\n /* *\n *\n * Default Export\n *\n * */\n\n return TableRow;\n });\n _registerModule(_modules, 'DataGrid/Table/Actions/RowsVirtualizer.js', [_modules['DataGrid/Utils.js'], _modules['DataGrid/Globals.js'], _modules['DataGrid/Table/Content/TableRow.js']], function (DGUtils, Globals, TableRow) {\n /* *\n *\n * Data Grid Rows Renderer class.\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 * - Dawid Dragula\n *\n * */\n const { makeHTMLElement, getTranslateY } = DGUtils;\n /* *\n *\n * Class\n *\n * */\n /**\n * Represents a virtualized rows renderer for the data grid.\n */\n class RowsVirtualizer {\n /* *\n *\n * Constructor\n *\n * */\n /**\n * Constructs an instance of the rows virtualizer.\n *\n * @param viewport\n * The viewport of the data grid to render rows in.\n */\n constructor(viewport) {\n /**\n * The index of the first visible row.\n */\n this.rowCursor = 0;\n /**\n * Flag indicating if the scrolling handler should be prevented to avoid\n * flickering loops when scrolling to the last row.\n */\n this.preventScroll = false;\n const rowSettings = viewport.dataGrid.options?.rendering?.rows;\n this.viewport = viewport;\n this.strictRowHeights = rowSettings?.strictHeights;\n this.buffer = Math.max(rowSettings?.bufferSize, 0);\n this.defaultRowHeight = this.getDefaultRowHeight();\n if (this.strictRowHeights) {\n viewport.tbodyElement.classList.add(Globals.classNames.rowsContentNowrap);\n }\n }\n /* *\n *\n * Functions\n *\n * */\n /**\n * Renders the rows in the viewport for the first time.\n */\n initialRender() {\n // Initial reflow to set the viewport height\n this.viewport.reflow();\n // Load & render rows\n this.renderRows(this.rowCursor);\n this.adjustRowHeights();\n }\n /**\n * Renders the rows in the viewport. It is called when the rows need to be\n * re-rendered, e.g., after a sort or filter operation.\n */\n rerender() {\n const rows = this.viewport.rows;\n const tbody = this.viewport.tbodyElement;\n let oldScrollTop;\n if (rows.length) {\n oldScrollTop = tbody.scrollTop;\n for (let i = 0, iEnd = rows.length; i < iEnd; ++i) {\n rows[i].destroy();\n }\n rows.length = 0;\n }\n this.renderRows(this.rowCursor);\n if (oldScrollTop !== void 0) {\n tbody.scrollTop = oldScrollTop;\n }\n this.scroll();\n // Reflow the rendered row cells widths (check redundancy)\n for (let i = 0, iEnd = rows.length; i < iEnd; ++i) {\n rows[i].reflow();\n }\n }\n /**\n * Method called on the viewport scroll event.\n */\n scroll() {\n const target = this.viewport.tbodyElement;\n const { defaultRowHeight: rowHeight } = this;\n const lastScrollTop = target.scrollTop;\n if (this.preventScroll) {\n if (lastScrollTop <= target.scrollTop) {\n this.preventScroll = false;\n }\n this.adjustBottomRowHeights();\n return;\n }\n // Do vertical virtual scrolling\n const rowCursor = Math.floor(target.scrollTop / rowHeight);\n if (this.rowCursor !== rowCursor) {\n this.renderRows(rowCursor);\n }\n this.rowCursor = rowCursor;\n this.adjustRowHeights();\n if (!this.strictRowHeights &&\n lastScrollTop > target.scrollTop &&\n !this.preventScroll) {\n target.scrollTop = lastScrollTop;\n this.preventScroll = true;\n }\n }\n /**\n * Adjusts the visible row heights from the bottom of the viewport.\n */\n adjustBottomRowHeights() {\n const rows = this.viewport.rows;\n const rowsLn = rows.length;\n const lastRow = rows[rowsLn - 1];\n let rowTop = getTranslateY(lastRow.htmlElement);\n const rowBottom = rowTop + lastRow.htmlElement.offsetHeight;\n let newHeight = lastRow.cells[0].htmlElement.offsetHeight;\n rowTop = rowBottom - newHeight;\n lastRow.htmlElement.style.height = newHeight + 'px';\n lastRow.htmlElement.style.transform = `translateY(${rowTop}px)`;\n for (let j = 0, jEnd = lastRow.cells.length; j < jEnd; ++j) {\n lastRow.cells[j].htmlElement.style.transform = '';\n }\n for (let i = rowsLn - 2; i >= 0; i--) {\n const row = rows[i];\n newHeight = row.cells[0].htmlElement.offsetHeight;\n rowTop -= newHeight;\n row.htmlElement.style.height = newHeight + 'px';\n row.htmlElement.style.transform = `translateY(${rowTop}px)`;\n for (let j = 0, jEnd = row.cells.length; j < jEnd; ++j) {\n row.cells[j].htmlElement.style.transform = '';\n }\n }\n }\n /**\n * Renders rows in the specified range. Removes rows that are out of the\n * range except the last row.\n *\n * @param rowCursor\n * The index of the first visible row.\n */\n renderRows(rowCursor) {\n const { viewport: vp, buffer } = this;\n const rowsPerPage = Math.ceil(vp.tbodyElement.offsetHeight / this.defaultRowHeight);\n const rows = vp.rows;\n if (!rows.length) {\n const last = new TableRow(vp, vp.dataTable.getRowCount() - 1);\n last.render();\n rows.push(last);\n vp.tbodyElement.appendChild(last.htmlElement);\n }\n const from = Math.max(0, Math.min(rowCursor - buffer, vp.dataTable.getRowCount() - rowsPerPage));\n const to = Math.min(rowCursor + rowsPerPage + buffer, rows[rows.length - 1].index - 1);\n const alwaysLastRow = rows.pop();\n for (let i = 0, iEnd = rows.length; i < iEnd; ++i) {\n rows[i].destroy();\n }\n rows.length = 0;\n for (let i = from; i <= to; ++i) {\n const newRow = new TableRow(vp, i);\n newRow.render();\n vp.tbodyElement.insertBefore(newRow.htmlElement, vp.tbodyElement.lastChild);\n rows.push(newRow);\n }\n if (alwaysLastRow) {\n rows.push(alwaysLastRow);\n }\n // Focus the cell if the focus cursor is set\n if (vp.focusCursor) {\n const [rowIndex, columnIndex] = vp.focusCursor;\n const row = rows.find((row) => row.index === rowIndex);\n if (row) {\n row.cells[columnIndex]?.htmlElement.focus({\n preventScroll: true\n });\n }\n }\n const firstVisibleRow = rows[rowCursor - rows[0].index];\n this.focusAnchorCell = firstVisibleRow?.cells[0];\n this.focusAnchorCell?.htmlElement.setAttribute('tabindex', '0');\n }\n /**\n * Adjusts the heights of the rows based on the current scroll position.\n * It handles the possibility of the rows having different heights than\n * the default height.\n */\n adjustRowHeights() {\n if (this.strictRowHeights) {\n return;\n }\n const { rowCursor: cursor, defaultRowHeight: defaultH } = this;\n const { rows, tbodyElement } = this.viewport;\n const rowsLn = rows.length;\n let translateBuffer = rows[0].getDefaultTopOffset();\n for (let i = 0; i < rowsLn; ++i) {\n const row = rows[i];\n // Reset row height and cell transforms\n row.htmlElement.style.height = '';\n if (row.cells[0].htmlElement.style.transform) {\n for (let j = 0, jEnd = row.cells.length; j < jEnd; ++j) {\n const cell = row.cells[j];\n cell.htmlElement.style.transform = '';\n }\n }\n // Rows above the first visible row\n if (row.index < cursor) {\n row.htmlElement.style.height = defaultH + 'px';\n continue;\n }\n const cellHeight = row.cells[0].htmlElement.offsetHeight;\n row.htmlElement.style.height = cellHeight + 'px';\n // Rows below the first visible row\n if (row.index > cursor) {\n continue;\n }\n // First visible row\n if (row.htmlElement.offsetHeight > defaultH) {\n const newHeight = Math.floor(cellHeight - (cellHeight - defaultH) * (tbodyElement.scrollTop / defaultH - cursor));\n row.htmlElement.style.height = newHeight + 'px';\n for (let j = 0, jEnd = row.cells.length; j < jEnd; ++j) {\n const cell = row.cells[j];\n cell.htmlElement.style.transform = `translateY(${newHeight - cellHeight}px)`;\n }\n }\n }\n for (let i = 1, iEnd = rowsLn - 1; i < iEnd; ++i) {\n translateBuffer += rows[i - 1].htmlElement.offsetHeight;\n rows[i].htmlElement.style.transform =\n `translateY(${translateBuffer}px)`;\n }\n // Set the proper offset for the last row\n const lastRow = rows[rowsLn - 1];\n const preLastRow = rows[rowsLn - 2];\n if (preLastRow && preLastRow.index === lastRow.index - 1) {\n lastRow.htmlElement.style.transform = `translateY(${preLastRow.htmlElement.offsetHeight +\n getTranslateY(preLastRow.htmlElement)}px)`;\n }\n }\n /**\n * Reflow the rendered rows content dimensions.\n */\n reflowRows() {\n const rows = this.viewport.rows;\n if (rows.length < 1) {\n return;\n }\n for (let i = 0, iEnd = rows.length; i < iEnd; ++i) {\n rows[i].reflow();\n }\n this.adjustRowHeights();\n }\n /**\n * Returns the default height of a row. This method should be called only\n * once on initialization.\n */\n getDefaultRowHeight() {\n const mockRow = makeHTMLElement('tr', {\n className: Globals.classNames.rowElement\n }, this.viewport.tbodyElement);\n const defaultRowHeight = mockRow.offsetHeight;\n mockRow.remove();\n return defaultRowHeight;\n }\n }\n /* *\n *\n * Default Export\n *\n * */\n\n return RowsVirtualizer;\n });\n _registerModule(_modules, 'DataGrid/Table/Actions/ColumnsResizer.js', [_modules['DataGrid/Table/Column.js'], _modules['DataGrid/Globals.js'], _modules['DataGrid/Utils.js']], function (Column, Globals, DGUtils) {\n /* *\n *\n * Data Grid Columns Resizer class.\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 * - Dawid Dragula\n * - Sebastian Bochan\n *\n * */\n const { makeHTMLElement } = DGUtils;\n /* *\n *\n * Class\n *\n * */\n /**\n * The class that handles the resizing of columns in the data grid.\n */\n class ColumnsResizer {\n /* *\n *\n * Constructor\n *\n * */\n constructor(viewport) {\n /**\n * The handles and their mouse down event listeners.\n */\n this.handles = [];\n /**\n * Handles the mouse move event on the document.\n *\n * @param e\n * The mouse event.\n */\n this.onDocumentMouseMove = (e) => {\n if (!this.draggedResizeHandle || !this.draggedColumn) {\n return;\n }\n const diff = e.pageX - (this.dragStartX || 0);\n if (this.viewport.columnDistribution === 'full') {\n this.fullDistributionResize(diff);\n }\n else {\n this.fixedDistributionResize(diff);\n }\n this.viewport.reflow();\n this.viewport.rowsVirtualizer.adjustRowHeights();\n this.viewport.dataGrid.options?.events?.column?.afterResize?.call(this.draggedColumn);\n };\n /**\n * Handles the mouse up event on the document.\n */\n this.onDocumentMouseUp = () => {\n this.draggedColumn?.header?.htmlElement?.classList.remove(Globals.classNames.resizedColumn);\n this.dragStartX = void 0;\n this.draggedColumn = void 0;\n this.draggedResizeHandle = void 0;\n this.columnStartWidth = void 0;\n this.nextColumnStartWidth = void 0;\n };\n this.viewport = viewport;\n document.addEventListener('mousemove', this.onDocumentMouseMove);\n document.addEventListener('mouseup', this.onDocumentMouseUp);\n }\n /* *\n *\n * Functions\n *\n * */\n /**\n * Resizes the columns in the full distribution mode.\n *\n * @param diff\n * The X position difference in pixels.\n */\n fullDistributionResize(diff) {\n const vp = this.viewport;\n const column = this.draggedColumn;\n if (!column) {\n return;\n }\n const nextColumn = vp.columns[column.index + 1];\n if (!nextColumn) {\n return;\n }\n const leftColW = this.columnStartWidth ?? 0;\n const rightColW = this.nextColumnStartWidth ?? 0;\n const MIN_WIDTH = Column.MIN_COLUMN_WIDTH;\n let newLeftW = leftColW + diff;\n let newRightW = rightColW - diff;\n if (newLeftW < MIN_WIDTH) {\n newLeftW = MIN_WIDTH;\n newRightW = leftColW + rightColW - MIN_WIDTH;\n }\n if (newRightW < MIN_WIDTH) {\n newRightW = MIN_WIDTH;\n newLeftW = leftColW + rightColW - MIN_WIDTH;\n }\n column.width = vp.getRatioFromWidth(newLeftW);\n nextColumn.width = vp.getRatioFromWidth(newRightW);\n }\n /**\n * Render the drag handle for resizing columns.\n *\n * @param column\n * The reference to rendered column\n *\n * @param cell\n * The reference to rendered cell, where hadles should be added\n */\n renderColumnDragHandles(column, cell) {\n const vp = column.viewport;\n if (vp.columnsResizer && (vp.columnDistribution !== 'full' ||\n (vp.dataGrid.enabledColumns &&\n column.index < vp.dataGrid.enabledColumns.length - 1))) {\n const handle = makeHTMLElement('div', {\n className: Globals.classNames.resizerHandles\n }, cell.htmlElement);\n vp.columnsResizer?.addHandleListeners(handle, column);\n }\n }\n /**\n * Resizes the columns in the fixed distribution mode.\n *\n * @param diff\n * The X position difference in pixels.\n */\n fixedDistributionResize(diff) {\n const column = this.draggedColumn;\n if (!column) {\n return;\n }\n const colW = this.columnStartWidth ?? 0;\n const MIN_WIDTH = Column.MIN_COLUMN_WIDTH;\n let newW = colW + diff;\n if (newW < MIN_WIDTH) {\n newW = MIN_WIDTH;\n }\n column.width = newW;\n }\n /**\n * Adds event listeners to the handle.\n *\n * @param handle\n * The handle element.\n *\n * @param column\n * The column the handle belongs to.\n */\n addHandleListeners(handle, column) {\n const onHandleMouseDown = (e) => {\n this.dragStartX = e.pageX;\n this.draggedColumn = column;\n this.draggedResizeHandle = handle;\n this.columnStartWidth = column.getWidth();\n this.nextColumnStartWidth =\n this.viewport.columns[column.index + 1]?.getWidth();\n column.header?.htmlElement.classList.add(Globals.classNames.resizedColumn);\n };\n this.handles.push([handle, onHandleMouseDown]);\n handle.addEventListener('mousedown', onHandleMouseDown);\n }\n /**\n * Removes all added event listeners from the document and handles. This\n * should be called on the destroy of the data grid.\n */\n removeEventListeners() {\n document.removeEventListener('mousemove', this.onDocumentMouseMove);\n document.removeEventListener('mouseup', this.onDocumentMouseUp);\n for (let i = 0, iEnd = this.handles.length; i < iEnd; i++) {\n const [handle, listener] = this.handles[i];\n handle.removeEventListener('mousedown', listener);\n }\n }\n }\n /* *\n *\n * Default Export\n *\n * */\n\n return ColumnsResizer;\n });\n _registerModule(_modules, 'DataGrid/Table/Actions/CellEditing.js', [_modules['DataGrid/Globals.js'], _modules['DataGrid/Utils.js']], function (Globals, DGUtils) {\n /* *\n *\n * Data Grid Cell Editing class.\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 * - Dawid Dragula\n * - Sebastian Bochan\n *\n * */\n const { makeHTMLElement } = DGUtils;\n /* *\n *\n * Class\n *\n * */\n /**\n * The class that handles the manual editing of cells in the data grid.\n */\n class CellEditing {\n constructor() {\n /* *\n *\n * Properties\n *\n * */\n /**\n * Handles the blur event on the input field.\n */\n this.onInputBlur = () => {\n this.stopEditing();\n };\n /**\n * Handles the keydown event on the input field. Cancels editing on escape\n * and saves the value on enter.\n *\n * @param e\n * The keyboard event.\n */\n this.onInputKeyDown = (e) => {\n const { keyCode } = e;\n // Enter / Escape\n if (keyCode === 13 || keyCode === 27) {\n // Cancel editing on escape\n this.stopEditing(keyCode === 13);\n }\n };\n }\n /* *\n *\n * Methods\n *\n * */\n /**\n * Turns the cell into an editable input field.\n *\n * @param cell\n * The cell that is to be edited.\n */\n startEditing(cell) {\n if (this.editedCell === cell) {\n return;\n }\n if (this.editedCell) {\n this.stopEditing();\n }\n this.editedCell = cell;\n const cellElement = cell.htmlElement;\n cellElement.innerHTML = '';\n cellElement.classList.add(Globals.classNames.editedCell);\n this.renderInput();\n }\n /**\n * Stops the editing of the cell.\n *\n * @param submit\n * Whether to save the value of the input to the cell. Defaults to true.\n */\n stopEditing(submit = true) {\n const cell = this.editedCell;\n const input = this.inputElement;\n if (!cell || !input) {\n return;\n }\n const dataGrid = cell.column.viewport.dataGrid;\n let newValue = input.value;\n this.destroyInput();\n cell.htmlElement.classList.remove(Globals.classNames.editedCell);\n cell.htmlElement.focus();\n // Convert to number if possible\n if (!isNaN(+newValue)) {\n newValue = +newValue;\n }\n void cell.setValue(submit ? newValue : cell.value, submit && cell.value !== newValue);\n dataGrid.options?.events?.cell?.afterEdit?.call(cell);\n delete this.editedCell;\n }\n /**\n * Renders the input field for the cell, focuses it and sets up event\n * listeners.\n */\n renderInput() {\n const cell = this.editedCell;\n if (!cell) {\n return;\n }\n const cellEl = cell.htmlElement;\n const input = this.inputElement = makeHTMLElement('input', {}, cellEl);\n input.value = '' + cell.value;\n input.focus();\n input.addEventListener('blur', this.onInputBlur);\n input.addEventListener('keydown', this.onInputKeyDown);\n }\n /**\n * Removes event listeners and the input element.\n */\n destroyInput() {\n const input = this.inputElement;\n if (!input) {\n return;\n }\n input.removeEventListener('keydown', this.onInputKeyDown);\n input.removeEventListener('blur', this.onInputBlur);\n input.remove();\n delete this.inputElement;\n }\n }\n /* *\n *\n * Default Export\n *\n * */\n\n return CellEditing;\n });\n _registerModule(_modules, 'DataGrid/Table/Table.js', [_modules['DataGrid/Utils.js'], _modules['DataGrid/Table/Column.js'], _modules['DataGrid/Table/Header/TableHeader.js'], _modules['DataGrid/Table/Actions/RowsVirtualizer.js'], _modules['DataGrid/Table/Actions/ColumnsResizer.js'], _modules['DataGrid/Globals.js'], _modules['Core/Utilities.js'], _modules['DataGrid/Table/Actions/CellEditing.js']], function (DGUtils, Column, TableHeader, RowsVirtualizer, ColumnsResizer, Globals, Utils, CellEditing) {\n /* *\n *\n * Data Grid class\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 * - Dawid Dragula\n * - Sebastian Bochan\n *\n * */\n const { makeHTMLElement } = DGUtils;\n const { getStyle } = Utils;\n /* *\n *\n * Class\n *\n * */\n /**\n * Represents a table viewport of the data grid.\n */\n class Table {\n /* *\n *\n * Constructor\n *\n * */\n /**\n * Constructs a new data grid table.\n *\n * @param dataGrid\n * The data grid instance which the table (viewport) belongs to.\n *\n * @param tableElement\n * The HTML table element of the data grid.\n */\n constructor(dataGrid, tableElement) {\n /**\n * The visible columns of the table.\n */\n this.columns = [];\n /**\n * The visible rows of the table.\n */\n this.rows = [];\n /**\n * Handles the focus event on the table body.\n *\n * @param e\n * The focus event.\n */\n this.onTBodyFocus = (e) => {\n e.preventDefault();\n this.rows[this.rowsVirtualizer.rowCursor - this.rows[0].index]\n ?.cells[0]?.htmlElement.focus();\n };\n /**\n * Handles the resize event.\n */\n this.onResize = () => {\n this.reflow();\n };\n /**\n * Handles the scroll event.\n */\n this.onScroll = () => {\n this.rowsVirtualizer.scroll();\n this.header?.scrollHorizontally(this.tbodyElement.scrollLeft);\n };\n this.dataGrid = dataGrid;\n this.dataTable = this.dataGrid.presentationTable;\n const dgOptions = dataGrid.options;\n const customClassName = dgOptions?.rendering?.table?.className;\n this.columnDistribution =\n dgOptions?.rendering?.columns?.distribution;\n this.renderCaption();\n if (dgOptions?.rendering?.header?.enabled) {\n this.theadElement = makeHTMLElement('thead', {}, tableElement);\n }\n this.tbodyElement = makeHTMLElement('tbody', {}, tableElement);\n this.rowsVirtualizer = new RowsVirtualizer(this);\n if (dgOptions?.columnDefaults?.resizing) {\n this.columnsResizer = new ColumnsResizer(this);\n }\n this.cellEditing = new CellEditing();\n if (customClassName) {\n tableElement.classList.add(...customClassName.split(/\\s+/g));\n }\n this.init();\n // Add event listeners\n this.resizeObserver = new ResizeObserver(this.onResize);\n this.resizeObserver.observe(tableElement);\n this.tbodyElement.addEventListener('scroll', this.onScroll);\n this.tbodyElement.addEventListener('focus', this.onTBodyFocus);\n }\n /* *\n *\n * Methods\n *\n * */\n /**\n * Initializes the data grid table.\n */\n init() {\n // Load columns\n this.loadColumns();\n // Load & render head\n if (this.dataGrid.options?.rendering?.header?.enabled) {\n this.header = new TableHeader(this);\n this.header.render();\n }\n // TODO: Load & render footer\n // this.footer = new TableFooter(this);\n // this.footer.render();\n this.rowsVirtualizer.initialRender();\n }\n /**\n * Loads the columns of the table.\n */\n loadColumns() {\n const { enabledColumns } = this.dataGrid;\n if (!enabledColumns) {\n return;\n }\n let columnId;\n for (let i = 0, iEnd = enabledColumns.length; i < iEnd; ++i) {\n columnId = enabledColumns[i];\n this.columns.push(new Column(this, columnId, i));\n }\n }\n /**\n * Loads the modified data from the data table and renders the rows.\n */\n loadPresentationData() {\n this.dataTable = this.dataGrid.presentationTable;\n for (const column of this.columns) {\n column.loadData();\n }\n this.rowsVirtualizer.rerender();\n }\n /**\n * Reflows the table's content dimensions.\n */\n reflow() {\n const tableEl = this.dataGrid.tableElement;\n const borderWidth = tableEl ? ((getStyle(tableEl, 'border-top-width', true) || 0) +\n (getStyle(tableEl, 'border-bottom-width', true) || 0)) : 0;\n this.tbodyElement.style.height = this.tbodyElement.style.minHeight = `${(this.dataGrid.container?.clientHeight || 0) -\n (this.theadElement?.offsetHeight || 0) -\n (this.captionElement?.offsetHeight || 0) -\n (this.dataGrid.credits?.getHeight() || 0) -\n borderWidth}px`;\n // Get the width of the rows.\n if (this.columnDistribution === 'fixed') {\n let rowsWidth = 0;\n for (let i = 0, iEnd = this.columns.length; i < iEnd; ++i) {\n rowsWidth += this.columns[i].width;\n }\n this.rowsWidth = rowsWidth;\n }\n // Reflow the head\n this.header?.reflow();\n // Reflow rows content dimensions\n this.rowsVirtualizer.reflowRows();\n }\n /**\n * Scrolls the table to the specified row.\n *\n * @param index\n * The index of the row to scroll to.\n *\n * Try it: {@link https://jsfiddle.net/gh/get/library/pure/highcharts/highcharts/tree/master/samples/data-grid/basic/scroll-to-row | Scroll to row}\n */\n scrollToRow(index) {\n this.tbodyElement.scrollTop =\n index * this.rowsVirtualizer.defaultRowHeight;\n }\n /**\n * Get the widthRatio value from the width in pixels. The widthRatio is\n * calculated based on the width of the viewport.\n *\n * @param width\n * The width in pixels.\n *\n * @return The width ratio.\n *\n * @internal\n */\n getRatioFromWidth(width) {\n return width / this.tbodyElement.clientWidth;\n }\n /**\n * Get the width in pixels from the widthRatio value. The width is\n * calculated based on the width of the viewport.\n *\n * @param ratio\n * The width ratio.\n *\n * @returns The width in pixels.\n *\n * @internal\n */\n getWidthFromRatio(ratio) {\n return this.tbodyElement.clientWidth * ratio;\n }\n /**\n * Render caption above the datagrid\n * @internal\n */\n renderCaption() {\n const captionOptions = this.dataGrid.options?.caption;\n if (!captionOptions?.text) {\n return;\n }\n this.captionElement = makeHTMLElement('caption', {\n innerText: captionOptions.text,\n className: Globals.classNames.captionElement\n }, this.dataGrid.tableElement);\n if (captionOptions.className) {\n this.captionElement.classList.add(...captionOptions.className.split(/\\s+/g));\n }\n }\n /**\n * Destroys the data grid table.\n */\n destroy() {\n this.tbodyElement.removeEventListener('focus', this.onTBodyFocus);\n this.tbodyElement.removeEventListener('scroll', this.onScroll);\n this.resizeObserver.disconnect();\n this.columnsResizer?.removeEventListeners();\n for (let i = 0, iEnd = this.rows.length; i < iEnd; ++i) {\n this.rows[i].destroy();\n }\n }\n /**\n * Get the viewport state metadata. It is used to save the state of the\n * viewport and restore it when the data grid is re-rendered.\n *\n * @returns\n * The viewport state metadata.\n */\n getStateMeta() {\n return {\n scrollTop: this.tbodyElement.scrollTop,\n scrollLeft: this.tbodyElement.scrollLeft,\n columnDistribution: this.columnDistribution,\n columnWidths: this.columns.map((column) => column.width),\n focusCursor: this.focusCursor\n };\n }\n /**\n * Apply the metadata to the viewport state. It is used to restore the state\n * of the viewport when the data grid is re-rendered.\n *\n * @param meta\n * The viewport state metadata.\n */\n applyStateMeta(meta) {\n this.tbodyElement.scrollTop = meta.scrollTop;\n this.tbodyElement.scrollLeft = meta.scrollLeft;\n if (this.columnDistribution === meta.columnDistribution &&\n this.columns.length === meta.columnWidths.length) {\n const widths = meta.columnWidths;\n for (let i = 0, iEnd = widths.length; i < iEnd; ++i) {\n this.columns[i].width = widths[i];\n }\n this.reflow();\n if (meta.focusCursor) {\n const [rowIndex, columnIndex] = meta.focusCursor;\n const row = this.rows[rowIndex - this.rows[0].index];\n row?.cells[columnIndex]?.htmlElement.focus();\n }\n }\n }\n /**\n * Returns the column with the provided ID.\n *\n * @param id\n * The ID of the column.\n */\n getColumn(id) {\n const columns = this.dataGrid.enabledColumns;\n if (!columns) {\n return;\n }\n const columnIndex = columns.indexOf(id);\n if (columnIndex < 0) {\n return;\n }\n return this.columns[columnIndex];\n }\n /**\n * Returns the row with the provided ID.\n *\n * @param id\n * The ID of the row.\n */\n getRow(id) {\n return this.rows.find((row) => row.id === id);\n }\n }\n /* *\n *\n * Default Export\n *\n * */\n\n return Table;\n });\n _registerModule(_modules, 'Data/Modifiers/ChainModifier.js', [_modules['Data/Modifiers/DataModifier.js'], _modules['Core/Utilities.js']], function (DataModifier, U) {\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 const { merge } = U;\n /* *\n *\n * Class\n *\n * */\n /**\n * Modifies a table with the help of modifiers in an ordered chain.\n *\n */\n class ChainModifier extends 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 = 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 = 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 */\n ChainModifier.defaultOptions = {\n type: 'Chain'\n };\n DataModifier.registerType('Chain', ChainModifier);\n /* *\n *\n * Default Export\n *\n * */\n\n return ChainModifier;\n });\n _registerModule(_modules, 'Data/Modifiers/SortModifier.js', [_modules['Data/Modifiers/DataModifier.js'], _modules['Data/DataTable.js'], _modules['Core/Utilities.js']], function (DataModifier, DataTable, U) {\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 const { merge } = U;\n /* *\n *\n * Class\n *\n * */\n /**\n * Sort table rows according to values of a column.\n *\n */\n class SortModifier extends 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 = 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 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 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 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 */\n SortModifier.defaultOptions = {\n type: 'Sort',\n direction: 'desc',\n orderByColumn: 'y'\n };\n DataModifier.registerType('Sort', SortModifier);\n /* *\n *\n * Default Export\n *\n * */\n\n return SortModifier;\n });\n _registerModule(_modules, 'DataGrid/Querying/SortingController.js', [_modules['Data/Modifiers/SortModifier.js']], function (SortModifier) {\n /* *\n *\n * Data Grid Sorting Controller class\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 * - Dawid Dragula\n *\n * */\n /* *\n *\n * Class\n *\n * */\n /**\n * Class that manages one of the data grid querying types - sorting.\n */\n class SortingController {\n /* *\n *\n * Constructor\n *\n * */\n /**\n * Constructs the SortingController instance.\n *\n * @param dataGrid\n * The data grid instance.\n */\n constructor(dataGrid) {\n /**\n * The flag that indicates if the data should be updated because of the\n * change in the sorting options.\n */\n this.shouldBeUpdated = false;\n this.dataGrid = dataGrid;\n }\n /* *\n *\n * Functions\n *\n * */\n /**\n * Sets the sorting state. If the new sorting state is different than the\n * current one, the `shouldBeUpdated` flag is set to `true`. If the\n * same, the flag is set to `false`.\n *\n * @param order\n * The sorting order.\n *\n * @param columnId\n * The column ID to sort by.\n */\n setSorting(order, columnId) {\n if (this.currentSorting?.columnId !== columnId ||\n this.currentSorting?.order !== order) {\n this.shouldBeUpdated = true;\n this.currentSorting = {\n columnId,\n order\n };\n }\n this.modifier = this.createModifier();\n }\n /**\n * Returns the sorting options from the data grid options.\n */\n getSortingOptions() {\n const dataGrid = this.dataGrid, { columnOptionsMap } = dataGrid;\n if (!columnOptionsMap) {\n return { order: null };\n }\n const columnIDs = Object.keys(columnOptionsMap);\n let foundOrder = null;\n let foundColumnId;\n for (let i = columnIDs.length - 1; i > -1; --i) {\n const columnId = columnIDs[i];\n const columnOptions = columnOptionsMap[columnId];\n const order = columnOptions.sorting?.order;\n if (order) {\n if (foundColumnId) {\n // eslint-disable-next-line no-console\n console.warn('DataGrid: Only one column can be sorted at a time. ' +\n 'Data will be sorted only by the last found column ' +\n `with the sorting order defined in the options: \"${foundColumnId}\".`);\n break;\n }\n foundOrder = order;\n foundColumnId = columnId;\n }\n }\n return {\n columnId: foundColumnId,\n order: foundOrder\n };\n }\n /**\n * Loads sorting options from the data grid options.\n */\n loadOptions() {\n const stateFromOptions = this.getSortingOptions();\n if (stateFromOptions.columnId !== this.initialSorting?.columnId ||\n stateFromOptions.order !== this.initialSorting?.order) {\n this.initialSorting = stateFromOptions;\n this.setSorting(stateFromOptions.order, stateFromOptions.columnId);\n }\n }\n /**\n * Returns the sorting modifier based on the loaded sorting options.\n */\n createModifier() {\n if (!this.currentSorting) {\n return;\n }\n const { columnId, order } = this.currentSorting;\n if (!order) {\n return;\n }\n return new SortModifier({\n orderByColumn: columnId,\n direction: order\n });\n }\n }\n /* *\n *\n * Default Export\n *\n * */\n\n return SortingController;\n });\n _registerModule(_modules, 'DataGrid/Querying/QueryingController.js', [_modules['Data/Modifiers/ChainModifier.js'], _modules['DataGrid/Querying/SortingController.js']], function (ChainModifier, SortingController) {\n /* *\n *\n * Data Grid Querying Controller class\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 * - Dawid Dragula\n *\n * */\n /* *\n *\n * Imports\n *\n * */\n /* *\n *\n * Class\n *\n * */\n /**\n * Class that manage data modification of the visible data in the data grid.\n * It manages the modifiers that are applied to the data table.\n */\n class QueryingController {\n /* *\n *\n * Constructor\n *\n * */\n constructor(dataGrid) {\n this.dataGrid = dataGrid;\n this.sorting = new SortingController(dataGrid);\n /// this.filtering = new FilteringController(dataGrid);\n }\n /* *\n *\n * Functions\n *\n * */\n /**\n * Proceeds with the data modification if needed.\n *\n * @param force\n * If the data should be modified even if the significant options are not\n * changed.\n */\n async proceed(force = false) {\n if (force ||\n this.sorting.shouldBeUpdated // ||\n // this.filtering.shouldBeUpdated\n ) {\n await this.modifyData();\n }\n }\n /**\n * Load all options needed to generate the modifiers.\n */\n loadOptions() {\n this.sorting.loadOptions();\n }\n /**\n * Check if the data table does not need to be modified.\n */\n willNotModify() {\n return (!this.sorting.modifier\n // && !this.filtering.modifier\n );\n }\n /**\n * Apply all modifiers to the data table.\n */\n async modifyData() {\n const originalDataTable = this.dataGrid.dataTable;\n if (!originalDataTable) {\n return;\n }\n const modifiers = [];\n // TODO: Implement filtering\n // if (this.filtering.modifier) {\n // modifiers.push(this.filtering.modifier);\n // }\n if (this.sorting.modifier) {\n modifiers.push(this.sorting.modifier);\n }\n if (modifiers.length > 0) {\n const chainModifier = new ChainModifier({}, ...modifiers);\n const dataTableCopy = originalDataTable.clone();\n await chainModifier.modify(dataTableCopy.modified);\n this.dataGrid.presentationTable = dataTableCopy.modified;\n }\n else {\n this.dataGrid.presentationTable = originalDataTable.modified;\n }\n this.sorting.shouldBeUpdated = false;\n /// this.filtering.shouldBeUpdated = false;\n }\n }\n /* *\n *\n * Default Export\n *\n * */\n\n return QueryingController;\n });\n _registerModule(_modules, 'DataGrid/DataGrid.js', [_modules['Core/Renderer/HTML/AST.js'], _modules['DataGrid/Credits.js'], _modules['DataGrid/DefaultOptions.js'], _modules['DataGrid/Table/Table.js'], _modules['DataGrid/Utils.js'], _modules['Data/DataTable.js'], _modules['DataGrid/Querying/QueryingController.js'], _modules['DataGrid/Globals.js'], _modules['Core/Utilities.js']], function (AST, Credits, DataGridDefaultOptions, Table, DataGridUtils, DataTable, QueryingController, Globals, U) {\n /* *\n *\n * Data Grid class\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 * - Dawid Dragula\n * - Sebastian Bochan\n *\n * */\n const { makeHTMLElement } = DataGridUtils;\n const { win } = Globals;\n const { merge } = U;\n /* *\n *\n * Class\n *\n * */\n /**\n * Creates a grid structure (table).\n */\n class DataGrid {\n // Implementation\n static dataGrid(renderTo, options, async) {\n if (async) {\n return new Promise((resolve) => {\n void new DataGrid(renderTo, options, (dataGrid) => {\n resolve(dataGrid);\n });\n });\n }\n return new DataGrid(renderTo, options);\n }\n /* *\n *\n * Constructor\n *\n * */\n /**\n * Constructs a new data grid.\n *\n * @param renderTo\n * The render target (container) of the data grid.\n *\n * @param options\n * The options of the data grid.\n *\n * @param afterLoadCallback\n * The callback that is called after the data grid is loaded.\n */\n constructor(renderTo, options, afterLoadCallback) {\n /**\n * The user options declared for the columns as an object of column ID to\n * column options.\n */\n this.columnOptionsMap = {};\n /**\n * The options that were declared by the user when creating the data grid\n * or when updating it.\n */\n this.userOptions = {};\n this.loadUserOptions(options);\n this.querying = new QueryingController(this);\n this.initContainers(renderTo);\n this.loadDataTable(this.options?.dataTable);\n this.querying.loadOptions();\n void this.querying.proceed().then(() => {\n this.renderViewport();\n afterLoadCallback?.(this);\n });\n DataGrid.dataGrids.push(this);\n }\n /* *\n *\n * Methods\n *\n * */\n /**\n * Initializes the container of the data grid.\n *\n * @param renderTo\n * The render target (html element or id) of the data grid.\n *\n */\n initContainers(renderTo) {\n const container = (typeof renderTo === 'string') ?\n win.document.getElementById(renderTo) : renderTo;\n // Display an error if the renderTo is wrong\n if (!container) {\n // eslint-disable-next-line no-console\n console.error(`\n Rendering div not found. It is unable to find the HTML element\n to render the DataGrid in.\n `);\n return;\n }\n this.container = container;\n this.container.innerHTML = AST.emptyHTML;\n this.contentWrapper = makeHTMLElement('div', {\n className: Globals.classNames.container\n }, this.container);\n }\n /**\n * Loads the new user options to all the important fields (`userOptions`,\n * `options` and `columnOptionsMap`).\n *\n * @param newOptions\n * The options that were declared by the user.\n *\n * @param oneToOne\n * When `false` (default), the existing column options will be merged with\n * the ones that are currently defined in the user options. When `true`,\n * the columns not defined in the new options will be removed.\n */\n loadUserOptions(newOptions, oneToOne = false) {\n // Operate on a copy of the options argument\n newOptions = merge(newOptions);\n if (newOptions.columns) {\n if (oneToOne) {\n this.loadColumnOptionsOneToOne(newOptions.columns);\n }\n else {\n this.loadColumnOptions(newOptions.columns);\n }\n delete newOptions.columns;\n }\n this.userOptions = merge(this.userOptions, newOptions);\n this.options = merge(this.options ?? DataGrid.defaultOptions, this.userOptions);\n const columnOptionsArray = this.options?.columns;\n if (!columnOptionsArray) {\n return;\n }\n const columnOptionsObj = {};\n for (let i = 0, iEnd = columnOptionsArray?.length ?? 0; i < iEnd; ++i) {\n columnOptionsObj[columnOptionsArray[i].id] = columnOptionsArray[i];\n }\n this.columnOptionsMap = columnOptionsObj;\n }\n /**\n * Loads the new column options to the userOptions field.\n *\n * @param newColumnOptions\n * The new column options that should be loaded.\n *\n * @param overwrite\n * Whether to overwrite the existing column options with the new ones.\n * Default is `false`.\n */\n loadColumnOptions(newColumnOptions, overwrite = false) {\n if (!this.userOptions.columns) {\n this.userOptions.columns = [];\n }\n const columnOptions = this.userOptions.columns;\n for (let i = 0, iEnd = newColumnOptions.length; i < iEnd; ++i) {\n const newOptions = newColumnOptions[i];\n const indexInPrevOptions = columnOptions.findIndex((prev) => prev.id === newOptions.id);\n // If the new column options contain only the id.\n if (Object.keys(newOptions).length < 2) {\n if (overwrite && indexInPrevOptions !== -1) {\n columnOptions.splice(indexInPrevOptions, 1);\n }\n continue;\n }\n if (indexInPrevOptions === -1) {\n columnOptions.push(newOptions);\n }\n else if (overwrite) {\n columnOptions[indexInPrevOptions] = newOptions;\n }\n else {\n columnOptions[indexInPrevOptions] = merge(columnOptions[indexInPrevOptions], newOptions);\n }\n }\n if (columnOptions.length < 1) {\n delete this.userOptions.columns;\n }\n }\n /**\n * Loads the new column options to the userOptions field in a one-to-one\n * manner. It means that all the columns that are not defined in the new\n * options will be removed.\n *\n * @param newColumnOptions\n * The new column options that should be loaded.\n */\n loadColumnOptionsOneToOne(newColumnOptions) {\n const prevColumnOptions = this.userOptions.columns;\n const columnOptions = [];\n let prevOptions;\n for (let i = 0, iEnd = newColumnOptions.length; i < iEnd; ++i) {\n const newOptions = newColumnOptions[i];\n const indexInPrevOptions = prevColumnOptions?.findIndex((prev) => prev.id === newOptions.id);\n if (indexInPrevOptions !== void 0 && indexInPrevOptions !== -1) {\n prevOptions = prevColumnOptions?.[indexInPrevOptions];\n }\n const resultOptions = merge(prevOptions ?? {}, newOptions);\n if (Object.keys(resultOptions).length > 1) {\n columnOptions.push(resultOptions);\n }\n }\n this.userOptions.columns = columnOptions;\n }\n /**\n * Updates the data grid with new options.\n *\n * @param options\n * The options of the data grid that should be updated. If not provided,\n * the update will be proceeded based on the `this.userOptions` property.\n * The `column` options are merged using the `id` property as a key.\n *\n * @param render\n * Whether to re-render the data grid after updating the options.\n *\n * @param oneToOne\n * When `false` (default), the existing column options will be merged with\n * the ones that are currently defined in the user options. When `true`,\n * the columns not defined in the new options will be removed.\n */\n async update(options = {}, render = true, oneToOne = false) {\n this.loadUserOptions(options, oneToOne);\n let newDataTable = false;\n if (!this.dataTable || options.dataTable) {\n this.userOptions.dataTable = options.dataTable;\n (this.options ?? {}).dataTable = options.dataTable;\n this.loadDataTable(this.options?.dataTable);\n newDataTable = true;\n }\n this.querying.loadOptions();\n if (render) {\n await this.querying.proceed(newDataTable);\n this.renderViewport();\n }\n }\n /**\n * Updates the column of the data grid with new options.\n *\n * @param columnId\n * The ID of the column that should be updated.\n *\n * @param options\n * The options of the columns that should be updated. If null,\n * column options for this column ID will be removed.\n *\n * @param render\n * Whether to re-render the data grid after updating the columns.\n *\n * @param overwrite\n * If true, the column options will be updated by replacing the existing\n * options with the new ones instead of merging them.\n */\n async updateColumn(columnId, options, render = true, overwrite = false) {\n this.loadColumnOptions([{\n id: columnId,\n ...options\n }], overwrite);\n await this.update(void 0, render);\n }\n /**\n * Hovers the row with the provided index. It removes the hover effect from\n * the previously hovered row.\n *\n * @param rowIndex\n * The index of the row.\n */\n hoverRow(rowIndex) {\n const rows = this.viewport?.rows;\n if (!rows) {\n return;\n }\n const firstRowIndex = this.viewport?.rows[0]?.index ?? 0;\n if (this.hoveredRowIndex !== void 0) {\n rows[this.hoveredRowIndex - firstRowIndex]?.setHoveredState(false);\n }\n if (rowIndex !== void 0) {\n rows[rowIndex - firstRowIndex]?.setHoveredState(true);\n }\n this.hoveredRowIndex = rowIndex;\n }\n /**\n * Hovers the column with the provided ID. It removes the hover effect from\n * the previously hovered column.\n *\n * @param columnId\n * The ID of the column.\n */\n hoverColumn(columnId) {\n const vp = this.viewport;\n if (!vp) {\n return;\n }\n if (this.hoveredColumnId) {\n vp.getColumn(this.hoveredColumnId)?.setHoveredState(false);\n }\n if (columnId) {\n vp.getColumn(columnId)?.setHoveredState(true);\n }\n this.hoveredColumnId = columnId;\n }\n /**\n * Renders the viewport of the data grid. If the data grid is already\n * rendered, it will be destroyed and re-rendered with the new data.\n * @internal\n */\n renderViewport() {\n let vp = this.viewport;\n const viewportMeta = vp?.getStateMeta();\n this.enabledColumns = this.getEnabledColumnIDs();\n this.credits?.destroy();\n vp?.destroy();\n if (this.contentWrapper) {\n this.contentWrapper.innerHTML = AST.emptyHTML;\n }\n if (this.enabledColumns.length > 0) {\n this.renderTable();\n vp = this.viewport;\n if (viewportMeta && vp) {\n vp.applyStateMeta(viewportMeta);\n }\n }\n else {\n this.renderNoData();\n }\n if (this.options?.credits?.enabled) {\n this.credits = new Credits(this);\n }\n this.viewport?.reflow();\n }\n /**\n * Renders the table (viewport) of the data grid.\n */\n renderTable() {\n this.tableElement = makeHTMLElement('table', {\n className: Globals.classNames.tableElement\n }, this.contentWrapper);\n this.viewport = new Table(this, this.tableElement);\n // Accessibility\n this.tableElement.setAttribute('aria-rowcount', this.dataTable?.getRowCount() ?? 0);\n }\n /**\n * Renders a message that there is no data to display.\n */\n renderNoData() {\n makeHTMLElement('div', {\n className: Globals.classNames.noData,\n innerText: 'No data to display'\n }, this.contentWrapper);\n }\n /**\n * Returns the array of IDs of columns that should be displayed in the data\n * grid, in the correct order.\n */\n getEnabledColumnIDs() {\n const { columnOptionsMap } = this;\n const header = this.options?.header;\n const headerColumns = this.getColumnIds(header || [], false);\n const columnsIncluded = this.options?.rendering?.columns?.included || (headerColumns && headerColumns.length > 0 ?\n headerColumns : this.dataTable?.getColumnNames());\n if (!columnsIncluded?.length) {\n return [];\n }\n if (!columnOptionsMap) {\n return columnsIncluded;\n }\n let columnName;\n const result = [];\n for (let i = 0, iEnd = columnsIncluded.length; i < iEnd; ++i) {\n columnName = columnsIncluded[i];\n if (columnOptionsMap?.[columnName]?.enabled !== false) {\n result.push(columnName);\n }\n }\n return result;\n }\n loadDataTable(tableOptions) {\n // If the table is passed as a reference, it should be used instead of\n // creating a new one.\n if (tableOptions?.id) {\n this.dataTable = tableOptions;\n this.presentationTable = this.dataTable.modified;\n return;\n }\n this.dataTable = this.presentationTable =\n new DataTable(tableOptions);\n }\n /**\n * Extracts all references to columnIds on all levels below defined level\n * in the settings.header structure.\n *\n * @param columns\n * Structure that we start calculation\n *\n * @param [onlyEnabledColumns=true]\n * Extract all columns from header or columns filtered by enabled param\n * @returns\n */\n getColumnIds(columns, onlyEnabledColumns = true) {\n let columnIds = [];\n const { enabledColumns } = this;\n for (const column of columns) {\n const columnId = typeof column === 'string' ? column : column.columnId;\n if (columnId &&\n (!onlyEnabledColumns || (enabledColumns?.includes(columnId)))) {\n columnIds.push(columnId);\n }\n if (typeof column !== 'string' && column.columns) {\n columnIds = columnIds.concat(this.getColumnIds(column.columns, onlyEnabledColumns));\n }\n }\n return columnIds;\n }\n /**\n * Destroys the data grid.\n */\n destroy() {\n const dgIndex = DataGrid.dataGrids.findIndex((dg) => dg === this);\n this.viewport?.destroy();\n if (this.container) {\n this.container.innerHTML = AST.emptyHTML;\n this.container.classList.remove(Globals.classNames.container);\n }\n // Clear all properties\n Object.keys(this).forEach((key) => {\n delete this[key];\n });\n DataGrid.dataGrids.splice(dgIndex, 1);\n }\n /**\n * Returns the current dataGrid data as a JSON string.\n *\n * @return\n * JSON representation of the data\n */\n getJSON() {\n const json = this.viewport?.dataTable.modified.columns;\n if (!this.enabledColumns || !json) {\n return '{}';\n }\n for (const key of Object.keys(json)) {\n if (this.enabledColumns.indexOf(key) === -1) {\n delete json[key];\n }\n }\n return JSON.stringify(json);\n }\n /**\n * Returns the current DataGrid options as a JSON string.\n *\n * @param onlyUserOptions\n * Whether to return only the user options or all options (user options\n * merged with the default ones). Default is `true`.\n *\n * @returns\n * Options as a JSON string.\n */\n getOptionsJSON(onlyUserOptions = true) {\n const optionsCopy = onlyUserOptions ? merge(this.userOptions) : merge(this.options);\n if (optionsCopy.dataTable?.id) {\n optionsCopy.dataTable = {\n columns: optionsCopy.dataTable.columns\n };\n }\n return JSON.stringify(optionsCopy);\n }\n }\n /* *\n *\n * Properties\n *\n * */\n /**\n * Default options for all DataGrid instances.\n * @internal\n */\n DataGrid.defaultOptions = DataGridDefaultOptions;\n /**\n * An array containing the current DataGrid objects in the page.\n */\n DataGrid.dataGrids = [];\n /* *\n *\n * Default Export\n *\n * */\n\n return DataGrid;\n });\n _registerModule(_modules, 'Data/DataPoolDefaults.js', [], function () {\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 * API Options\n *\n * */\n const DataPoolDefaults = {\n connectors: []\n };\n /* *\n *\n * Export Defaults\n *\n * */\n\n return DataPoolDefaults;\n });\n _registerModule(_modules, 'Data/DataPool.js', [_modules['Data/Connectors/DataConnector.js'], _modules['Data/DataPoolDefaults.js'], _modules['Core/Utilities.js']], function (DataConnector, DataPoolDefaults, U) {\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 * 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 */\n class DataPool {\n /* *\n *\n * Constructor\n *\n * */\n constructor(options = 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 U.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 = 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 U.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 */\n DataPool.version = '1.0.0';\n /* *\n *\n * Default Export\n *\n * */\n\n return DataPool;\n });\n _registerModule(_modules, 'Data/Converters/CSVConverter.js', [_modules['Data/Converters/DataConverter.js'], _modules['Core/Utilities.js']], function (DataConverter, U) {\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 const { merge } = U;\n /* *\n *\n * Class\n *\n * */\n /**\n * Handles parsing and transforming CSV to a table.\n *\n * @private\n */\n class CSVConverter extends 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 = 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 = 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 DataConverter.getTableFromColumns(this.columns, this.headers);\n }\n }\n /* *\n *\n * Static Properties\n *\n * */\n /**\n * Default options\n */\n CSVConverter.defaultOptions = {\n ...DataConverter.defaultOptions,\n lineDelimiter: '\\n'\n };\n /* *\n *\n * Default Export\n *\n * */\n\n return CSVConverter;\n });\n _registerModule(_modules, 'Data/Connectors/CSVConnector.js', [_modules['Data/Converters/CSVConverter.js'], _modules['Data/Connectors/DataConnector.js'], _modules['Core/Utilities.js']], function (CSVConverter, DataConnector, U) {\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 const { merge } = U;\n /* *\n *\n * Class\n *\n * */\n /**\n * Class that handles creating a DataConnector from CSV\n *\n * @private\n */\n class CSVConnector extends 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 = merge(CSVConnector.defaultOptions, options);\n super(mergedOptions);\n this.converter = new 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 * */\n CSVConnector.defaultOptions = {\n csv: '',\n csvURL: '',\n enablePolling: false,\n dataRefreshRate: 1,\n firstRowAsNames: true\n };\n DataConnector.registerType('CSV', CSVConnector);\n /* *\n *\n * Default Export\n *\n * */\n\n return CSVConnector;\n });\n _registerModule(_modules, 'Data/Converters/GoogleSheetsConverter.js', [_modules['Data/Converters/DataConverter.js'], _modules['Core/Utilities.js']], function (DataConverter, U) {\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 const { merge, uniqueKey } = U;\n /* *\n *\n * Class\n *\n * */\n /**\n * Handles parsing and transformation of an Google Sheets to a table.\n *\n * @private\n */\n class GoogleSheetsConverter extends 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 = 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 = 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 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 DataConverter.getTableFromColumns(this.columns, this.header);\n }\n }\n /* *\n *\n * Static Properties\n *\n * */\n /**\n * Default options\n */\n GoogleSheetsConverter.defaultOptions = {\n ...DataConverter.defaultOptions\n };\n /* *\n *\n * Default Export\n *\n * */\n\n return GoogleSheetsConverter;\n });\n _registerModule(_modules, 'Data/Connectors/GoogleSheetsConnector.js', [_modules['Data/Connectors/DataConnector.js'], _modules['Data/Converters/GoogleSheetsConverter.js'], _modules['Core/Utilities.js']], function (DataConnector, GoogleSheetsConverter, U) {\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 const { merge, pick } = U;\n /* *\n *\n * Functions\n *\n * */\n /**\n * Tests Google's response for error.\n * @private\n */\n function 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 */\n class GoogleSheetsConnector extends 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 = merge(GoogleSheetsConnector.defaultOptions, options);\n super(mergedOptions);\n this.converter = new 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 * */\n GoogleSheetsConnector.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[pick(endColumn, 25)] || 'Z') +\n (endRow ?\n Math.max(endRow, 0) :\n 'Z'));\n }\n GoogleSheetsConnector.buildQueryRange = buildQueryRange;\n })(GoogleSheetsConnector || (GoogleSheetsConnector = {}));\n DataConnector.registerType('GoogleSheets', GoogleSheetsConnector);\n /* *\n *\n * Default Export\n *\n * */\n\n return GoogleSheetsConnector;\n });\n _registerModule(_modules, 'Data/Converters/HTMLTableConverter.js', [_modules['Data/Converters/DataConverter.js'], _modules['Core/Utilities.js']], function (DataConverter, U) {\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 const { merge } = U;\n /* *\n *\n * Functions\n *\n * */\n /**\n * Row equal\n */\n function 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 */\n class HTMLTableConverter extends 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 = 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 *\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 = 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 DataConverter.getTableFromColumns(this.columns, this.headers);\n }\n }\n /* *\n *\n * Static Properties\n *\n * */\n /**\n * Default options\n */\n HTMLTableConverter.defaultOptions = {\n ...DataConverter.defaultOptions,\n useRowspanHeaders: true,\n useMultiLevelHeaders: true\n };\n /* *\n *\n * Default Export\n *\n * */\n\n return HTMLTableConverter;\n });\n _registerModule(_modules, 'Data/Connectors/HTMLTableConnector.js', [_modules['Data/Connectors/DataConnector.js'], _modules['Core/Globals.js'], _modules['Data/Converters/HTMLTableConverter.js'], _modules['Core/Utilities.js']], function (DataConnector, H, HTMLTableConverter, U) {\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 const { win } = H;\n const { merge } = U;\n /* *\n *\n * Class\n *\n * */\n /**\n * Class that handles creating a data connector from an HTML table.\n *\n * @private\n */\n class HTMLTableConnector extends 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 = merge(HTMLTableConnector.defaultOptions, options);\n super(mergedOptions);\n this.converter = new 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(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 * */\n HTMLTableConnector.defaultOptions = {\n table: ''\n };\n DataConnector.registerType('HTMLTable', HTMLTableConnector);\n /* *\n *\n * Default Export\n *\n * */\n\n return HTMLTableConnector;\n });\n _registerModule(_modules, 'Data/Converters/JSONConverter.js', [_modules['Data/Converters/DataConverter.js'], _modules['Data/DataTable.js'], _modules['Core/Utilities.js']], function (DataConverter, DataTable, U) {\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 const { error, isArray, merge, objectEach } = U;\n /* *\n *\n * Class\n *\n * */\n /**\n * Handles parsing and transforming JSON to a table.\n *\n * @private\n */\n class JSONConverter extends 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 = 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 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 = 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 (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 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 */\n JSONConverter.defaultOptions = {\n ...DataConverter.defaultOptions,\n data: [],\n orientation: 'rows'\n };\n /* *\n *\n * Default Export\n *\n * */\n\n return JSONConverter;\n });\n _registerModule(_modules, 'Data/Connectors/JSONConnector.js', [_modules['Data/Connectors/DataConnector.js'], _modules['Core/Utilities.js'], _modules['Data/Converters/JSONConverter.js']], function (DataConnector, U, JSONConverter) {\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 const { merge } = U;\n /* *\n *\n * Class\n *\n * */\n /**\n * Class that handles creating a DataConnector from JSON structure\n *\n * @private\n */\n class JSONConnector extends 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 = merge(JSONConnector.defaultOptions, options);\n super(mergedOptions);\n this.converter = new 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 * */\n JSONConnector.defaultOptions = {\n data: [],\n enablePolling: false,\n dataRefreshRate: 0,\n firstRowAsNames: true,\n orientation: 'rows'\n };\n DataConnector.registerType('JSON', JSONConnector);\n /* *\n *\n * Default Export\n *\n * */\n\n return JSONConnector;\n });\n _registerModule(_modules, 'Data/Modifiers/InvertModifier.js', [_modules['Data/Modifiers/DataModifier.js'], _modules['Core/Utilities.js']], function (DataModifier, U) {\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 const { merge } = U;\n /* *\n *\n * Class\n *\n * */\n /**\n * Inverts columns and rows in a table.\n *\n * @private\n */\n class InvertModifier extends 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 = 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 */\n InvertModifier.defaultOptions = {\n type: 'Invert'\n };\n DataModifier.registerType('Invert', InvertModifier);\n /* *\n *\n * Default Export\n *\n * */\n\n return InvertModifier;\n });\n _registerModule(_modules, 'Data/Modifiers/RangeModifier.js', [_modules['Data/Modifiers/DataModifier.js'], _modules['Core/Utilities.js']], function (DataModifier, U) {\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 const { merge } = U;\n /* *\n *\n * Class\n *\n * */\n /**\n * Filters out table rows with a specific value range.\n *\n */\n class RangeModifier extends 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 = 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 */\n RangeModifier.defaultOptions = {\n type: 'Range',\n ranges: []\n };\n DataModifier.registerType('Range', RangeModifier);\n /* *\n *\n * Default Export\n *\n * */\n\n return RangeModifier;\n });\n _registerModule(_modules, 'masters/datagrid.src.js', [_modules['Core/Renderer/HTML/AST.js'], _modules['Data/Connectors/DataConnector.js'], _modules['Data/Converters/DataConverter.js'], _modules['Data/DataCursor.js'], _modules['DataGrid/DataGrid.js'], _modules['Data/Modifiers/DataModifier.js'], _modules['Data/DataPool.js'], _modules['Data/DataTable.js'], _modules['DataGrid/Globals.js']], function (AST, DataConnector, DataConverter, DataCursor, _DataGrid, DataModifier, DataPool, DataTable, Globals) {\n\n /* *\n *\n * Imports\n *\n * */\n // Fill registries\n /* *\n *\n * Namespace\n *\n * */\n const G = Globals;\n G.AST = AST;\n G.DataConnector = DataConnector;\n G.DataCursor = DataCursor;\n G.DataConverter = DataConverter;\n G.DataGrid = _DataGrid;\n G.dataGrid = _DataGrid.dataGrid;\n G.dataGrids = _DataGrid.dataGrids;\n G.DataModifier = DataModifier;\n G.DataPool = DataPool;\n G.DataTable = DataTable;\n /* *\n *\n * Classic Export\n *\n * */\n if (!G.win.DataGrid) {\n G.win.DataGrid = G;\n }\n /* *\n *\n * Default Export\n *\n * */\n\n return G;\n });\n _modules['masters/datagrid.src.js']._modules = _modules;\n return _modules['masters/datagrid.src.js'];\n}));"],"names":["root","factory","module","exports","document","define","amd","DataGrid","error","window","_modules","_registerModule","obj","path","args","fn","hasOwnProperty","apply","CustomEvent","dispatchEvent","detail","Globals","SVG_NS","product","version","win","doc","svg","createElementNS","createSVGRect","userAgent","navigator","isChrome","chrome","isFirefox","indexOf","isMS","test","opera","isSafari","isTouchDevice","isWebKit","deg2rad","Math","PI","hasBidiBug","parseInt","split","marginNames","noop","supportsPassiveEvents","supportsPassive","opts","Object","defineProperty","get","addEventListener","removeEventListener","charts","composed","dateFormats","seriesTypes","symbolSizes","chartCount","H","serialMode","code","stop","chart","params","severity","isCode","isNumber","message","toString","additionalMessages","objectEach","value","key","encodeURI","fireEvent","Error","console","messages","warn","push","pInt","s","mag","isString","isArray","str","prototype","call","isObject","strict","isDOMElement","nodeType","isClass","c","constructor","name","n","isNaN","Infinity","defined","attr","elem","keyOrAttribs","ret","isGetter","attrSingle","setAttribute","getAttribute","removeAttribute","splat","extend","a","b","pick","arguments","length","i","arg","css","el","styles","style","getMagnitude","num","pow","floor","log","LN10","correctFloat","prec","parseFloat","toPrecision","easeInOutSine","pos","cos","find","Array","arr","callback","ctx","removeEvent","type","removeOneEvent","removeAllEvents","eventCollection","types","len","nodeName","_val","owner","events","hcEvents","typeEvents","filter","eventArguments","defaultFunction","createEvent","e","initEvent","target","preventDefault","defaultPrevented","object","multilevel","unshift","getPrototypeOf","sort","order","forEach","map","each","grep","reduce","some","val","slice","uniqueKey","hash","random","substring","id","jQuery","highcharts","shift","addEvent","options","Point","series","runTrackerClick","passive","capture","eventObject","arrayMax","data","max","arrayMin","min","clamp","clearTimeout","createElement","tag","attribs","parent","nopad","padding","border","margin","appendChild","crisp","lineWidth","inverted","mod","inverter","round","destroyObjectProperties","except","destructablesOnly","destroy","diffObjects","newer","older","keepOlder","collectionsWithUpdate","diff","depth","keeper","newerVal","keys","discardElement","element","parentElement","removeChild","erase","item","splice","extendClass","members","getClosestDistance","arrays","onError","closest","loopLength","distance","allowNegative","xData","getNestedProperty","pathElements","pathElement","thisProp","child","getStyle","prop","toInt","offsetWidth","scrollWidth","boundingClientRectWidth","getBoundingClientRect","width","offsetHeight","scrollHeight","getComputedStyle","getPropertyValue","inArray","fromIndex","insertItem","collection","indexOption","index","isInternal","_i","isFunction","merge","extendOrSource","sources","doCopy","copy","original","normalizeTickInterval","interval","multiples","magnitude","allowDecimals","hasTickAmount","retInterval","normalized","offset","docElem","documentElement","box","parentNode","top","left","height","pageYOffset","scrollTop","clientTop","pageXOffset","scrollLeft","clientLeft","pad","number","padder","String","replace","join","pushUnique","array","relativeLength","base","replaceNested","text","replacements","previous","replacement","stableSort","sortFunction","sortValue","safeI","syncTimeout","delay","context","setTimeout","timeUnits","millisecond","second","minute","hour","day","week","month","year","useSerialIds","mode","wrap","method","func","proceed","outerArgs","scope","concat","U","trustedTypes","trustedTypesPolicy","createPolicy","createHTML","emptyHTML","AST","filterUserAttributes","attributes","valid","allowedAttributes","allowedReferences","ref","parseStyle","line","pair","trim","g","toUpperCase","setElementHTML","html","innerHTML","ast","addToDOM","source","nodes","parseMarkup","recurse","subtree","subParent","node","tagName","textNode","textContent","createTextNode","bypassHTMLFiltering","allowedTags","NS","namespaceURI","children","markup","DOMParser","parseFromString","body","appendChildNodes","addTo","toLowerCase","astNode","parsedAttributes","attrib","childNodes","childNode","DataModifier","benchmark","dataTable","results","modifier","execute","modifyTable","emit","iterations","on","times","startTime","endTime","performance","now","modify","table","eventDetail","Promise","resolve","reject","modified","clone","modifyCell","columnName","rowIndex","cellValue","modifyColumns","columns","modifyRows","rows","registerType","DataModifierClass","DataTable","isNull","row","NULL","iEnd","columnNames","autoId","rowCount","versionTag","thisColumns","column","skipColumns","tableOptions","tableClone","originalRowIndexes","localRowIndexes","deleteColumns","deletedColumns","modifiedColumns","deleteRowIndexReferences","deleteRows","deletedRows","modifiedRows","deletedCells","j","jEnd","getCell","getCellAsBoolean","getCellAsNumber","useNaN","getCellAsString","getColumn","asReference","getColumns","getColumnAsNumbers","columnAsNumber","columnLength","getColumnNames","tableColumns","getLocalRowIndex","originalRowIndex","getModifier","getOriginalRowIndex","getRow","getRows","getRowCount","getRowIndexBy","rowIndexOffset","getRowObject","getRowObjects","i2","getVersionTag","hasColumns","hasRowWith","renameColumn","newColumnName","setCell","setColumn","setColumns","tableModifier","reset","tableColumn","tableColumnNames","setModifier","promise","then","setOriginalRowIndexes","omitLocalRowIndexes","modifiedIndexes","originalIndex","setRow","setRows","rowColumnNames","rowColumnName","indexRowCount","DataConnector","metadata","polling","describeColumn","columnMeta","connector","describeColumns","pop","getColumnOrder","usePresentationState","names","getSortedColumns","usePresentationOrder","load","save","setColumnOrder","setModifierOptions","modifierOptions","ModifierClass","startPolling","refreshTime","_polling","stopPolling","whatIs","DataConnectorClass","DataConverter","regex","parser","match","Date","UTC","NaN","alternative","d","getFullYear","mergedOptions","defaultOptions","regExpPoint","decimalPoint","decimalRegExp","RegExp","asBoolean","asNumber","asDate","timestamp","parseDate","asString","asGuessedType","typeMap","converter","guessType","decimalRegex","getDate","deduceDateFormat","limit","stable","format","thing","guessedFormat","madeDeduction","dateFormat","export","headers","getTable","result","trimedValue","innerTrimedValue","floatValue","parse","dateFormatProp","getTime","getTimezoneOffset","inside","alternativeFormat","startColumn","endColumn","Number","MAX_VALUE","startRow","endRow","firstRowAsNames","switchRowsAndColumns","getTableFromColumns","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","classNamePrefix","classNames","container","tableElement","captionElement","theadElement","tbodyElement","rowElement","rowOdd","hoveredRow","columnElement","hoveredCell","hoveredColumn","editedCell","rowsContentNowrap","headerCell","headerCellContent","headerCellResized","headerRow","noData","columnFirst","columnSortable","columnSortedAsc","columnSortedDesc","resizerHandles","resizedColumn","creditsContainer","creditsText","DataGridUtils","makeHTMLElement","paramsKeys","assign","makeDiv","className","getTranslateY","transform","isHTML","sanitizeText","DGUtils","dataGrid","credits","containerElement","textElement","render","setContent","href","innerText","appendToContainer","position","contentWrapper","prepend","update","enabled","remove","viewport","reflow","getHeight","rendering","distribution","bufferSize","strictHeights","header","columnDefaults","sorting","sortable","resizing","alignThresholds","panning","styledMode","borderRadius","colorCount","allowMutatingData","ignoreHiddenSeries","spacing","resetZoomButton","theme","zooming","singleTouch","resetButton","zIndex","align","x","y","borderColor","backgroundColor","plotBorderColor","colors","hasNewSafariBug","Intl","DateTimeFormat","formatRange","hasOldSafariBug","Time","useUTC","variableTimezone","timezoneOffsetFunction","unit","date","timezoneOffset","realMs","ms","setTime","set","newOffset","timezone","makeTime","hours","minutes","seconds","time","cacheKey","gmt","colon","dateTimeFormat","formatCache","timeZone","timeZoneName","valueOf","capitalize","lang","invalidDate","dayOfMonth","fullYear","langWeekdays","weekdays","shortWeekdays","substr","A","w","shortMonths","B","months","m","o","Y","k","I","l","M","p","P","S","L","resolveDTLFormat","f","main","from","to","getTimeTicks","normalizedInterval","startOfWeek","minYear","variableDayLength","minDay","tickPositions","higherRanks","minDate","unitRange","count","minMonth","minDateDate","minHours","t","info","totalRange","getDateFormat","dateTimeLabelFormats","dateStr","blank","strpos","lastN","ChartDefaults","Palettes","symbols","loading","numericSymbols","resetZoom","resetZoomTitle","thousandsSep","global","buttonTheme","fill","r","stroke","color","fontSize","fontWeight","states","hover","select","disabled","title","widthAdjust","subtitle","caption","verticalAlign","plotOptions","legend","alignColumns","layout","itemMarginBottom","itemMarginTop","labelFormatter","navigation","activeColor","inactiveColor","itemStyle","textDecoration","textOverflow","itemHoverStyle","itemHiddenStyle","shadow","itemCheckboxStyle","squareSymbol","symbolPadding","labelStyle","opacity","textAlign","tooltip","animation","duration","easing","sqrt","footerFormat","headerShape","hideDelay","shape","shared","snap","headerFormat","pointFormat","borderWidth","stickOnContact","useHTML","defaultTime","getOptions","setOptions","D","helpers","add","divide","eq","ge","gt","condition","le","lt","multiply","ne","subtract","unless","subRegex","matches","floatRegex","decRegex","numberFormatter","numberFormat","resolveProperty","currentMatch","hasSub","exec","mainMatch","subMatch","isBlock","expression","charAt","start","startInner","startingElseSection","elseBody","parts","valueAndFormat","segment","decimals","fractionDigits","origDec","exponent","firstDecimals","toExponential","toFixed","roundedNumber","abs","strinteger","thousands","Utils","Templating","Column","cells","columnOptionsMap","getInitialWidth","loadData","registerCell","cell","htmlElement","classList","hoveredColumnId","unregisterCell","getWidth","vp","columnDistribution","getWidthFromRatio","setHoveredState","hovered","mock","getInitialFullDistWidth","columnsCount","enabledColumns","getRatioFromWidth","allPreviousWidths","template","MIN_COLUMN_WIDTH","createCell","rowsWidth","destroyed","columnId","cellEvents","init","initEvents","onBlur","onFocus","onClick","onKeyDown","focusAnchor","rowsVirtualizer","focusAnchorCell","focusCursor","dir","changeFocusKeys","ArrowDown","ArrowUp","ArrowLeft","ArrowRight","stopPropagation","nextVerticalDir","localRowIndex","focus","nextRow","elementStyle","maxWidth","setCustomClassName","customClassName","newClassName","renderHTMLCellContent","cellContent","formattedNodes","headerCellElement","toggle","sortingController","querying","currentOrder","currentSorting","setOrder","consequents","none","asc","desc","addHeaderElementAttributes","col","sortingOptions","setSorting","loadPresentationData","afterSorting","Cell","ColumnSorting","Utilities","isMain","headerCellOptions","formatter","headerContent","columnsResizer","renderColumnDragHandles","initColumnSorting","th","click","Row","HeaderCell","level","setRowAttributes","renderMultipleLevel","columnsOnLevel","getColumnsAtLevel","colSpan","getColumnIds","dataColumn","levels","targetLevel","currentLevel","HeaderRow","getRowLevels","clientWidth","tableEl","theadEL","bordersWidth","cellHtmlElement","maxDepth","scrollHorizontally","setValue","onDblClick","onMouseOut","onMouseOver","onMouseDown","hoverRow","hoverColumn","mouseOver","mouseOut","editable","cellEditing","startEditing","dblClick","updateTable","focusedRowId","formatCell","afterSetValue","originalDataTable","rowTableIndex","willNotModify","newRowIndex","TableCell","hoveredRowIndex","idx","getDefaultTopOffset","defaultRowHeight","TableRow","rowCursor","preventScroll","rowSettings","strictRowHeights","buffer","getDefaultRowHeight","initialRender","renderRows","adjustRowHeights","rerender","oldScrollTop","tbody","scroll","rowHeight","lastScrollTop","adjustBottomRowHeights","rowsLn","rowTop","rowBottom","newHeight","rowsPerPage","ceil","last","alwaysLastRow","newRow","insertBefore","lastChild","columnIndex","firstVisibleRow","defaultH","translateBuffer","cellHeight","preLastRow","reflowRows","mockRow","handles","onDocumentMouseMove","draggedResizeHandle","draggedColumn","pageX","dragStartX","fullDistributionResize","fixedDistributionResize","afterResize","onDocumentMouseUp","columnStartWidth","nextColumnStartWidth","nextColumn","leftColW","rightColW","MIN_WIDTH","newLeftW","newRightW","handle","addHandleListeners","colW","newW","onHandleMouseDown","removeEventListeners","onInputBlur","stopEditing","onInputKeyDown","keyCode","cellElement","renderInput","submit","input","inputElement","newValue","destroyInput","afterEdit","cellEl","TableHeader","RowsVirtualizer","ColumnsResizer","CellEditing","onTBodyFocus","onResize","onScroll","presentationTable","dgOptions","renderCaption","resizeObserver","ResizeObserver","observe","loadColumns","minHeight","clientHeight","scrollToRow","ratio","captionOptions","disconnect","getStateMeta","columnWidths","applyStateMeta","meta","widths","ChainModifier","chain","optionsChain","clear","modifiers","reverse","SortModifier","ascending","descending","getRowReferences","rowReferences","orderByColumn","orderInColumn","direction","compare","orderByColumnIndex","rowReference","originalIndexes","shouldBeUpdated","createModifier","getSortingOptions","foundColumnId","columnIDs","foundOrder","columnOptions","loadOptions","stateFromOptions","initialSorting","SortingController","force","modifyData","chainModifier","dataTableCopy","Credits","DataGridDefaultOptions","Table","QueryingController","renderTo","async","afterLoadCallback","userOptions","loadUserOptions","initContainers","loadDataTable","renderViewport","dataGrids","getElementById","newOptions","oneToOne","loadColumnOptionsOneToOne","loadColumnOptions","columnOptionsArray","columnOptionsObj","newColumnOptions","overwrite","indexInPrevOptions","findIndex","prev","prevOptions","prevColumnOptions","resultOptions","newDataTable","updateColumn","firstRowIndex","viewportMeta","getEnabledColumnIDs","renderTable","renderNoData","headerColumns","columnsIncluded","included","onlyEnabledColumns","columnIds","includes","dgIndex","dg","getJSON","json","getOptionsJSON","onlyUserOptions","optionsCopy","connectors","DataPoolDefaults","DataPool","waiting","getConnector","connectorId","waitingList","connectorOptions","getConnectorOptions","loadConnector","getConnectorIds","connectorIds","getConnectorTable","isNewConnector","ConnectorClass","setConnectorOptions","instances","CSVConverter","dataTypes","useLocalDecimalPoint","lineDelimiter","exportNames","itemDelimiter","toLocaleString","csvRows","rowArray","columnDataType","dataType","cellVal","parserOptions","beforeParse","lines","rowIt","csv","guessedItemDelimiter","guessDelimiter","parseCSVRow","columnStr","rowNumber","guessedDecimalPoint","token","actualColumn","read","pushType","isFinite","initialValue","points","commas","guessed","potDelimiters","linesCount","inStr","cn","cl","CSVConnector","enablePolling","dataRefreshRate","csvURL","dataModifier","fetch","response","GoogleSheetsConverter","parseOptions","values","GoogleSheetsConnector","googleAPIKey","googleSpreadsheetKey","url","buildFetchURL","URL","canParse","status","alphabet","buildQueryRange","googleSpreadsheetRange","apiKey","sheetKey","onlyColumnNames","pathname","searchParams","HTMLTableConverter","tableElementID","useMultiLevelHeaders","htmlRows","tableHead","subcategories","subhead","getTableHeaderHTML","getCellHTMLFromValue","tableCaption","classes","attrs","topheaders","subheaders","useRowspanHeaders","cur","curColspan","rowspan","isRowEqual","row1","row2","tableHTML","HTMLElement","getElementsByTagName","rowsCount","items","itemsLength","columnsInRow","columnsInRowLength","relativeColumnIndex","HTMLTableConnector","tableID","JSONConverter","orientation","arrayWithPath","acc","JSONConnector","dataUrl","InvertModifier","modifiedRowIndex","modifiedColumnNames","j2","RangeModifier","indexes","additive","ranges","rangeColumn","minValue","maxValue","_DataGrid","G"],"mappings":"CAAA;;;;;;CAMC,EACA,SAAUA,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AE,CACnB,EAAE,CAACnN,OAAO,CAACjF,IAAI,CAAC2R,EAAKoB,UAAU,CAAE,AAACC,IAC9BP,EAAiBO,EAAWZ,EAChC,GACIA,EAASxQ,MAAM,EACfgR,CAAAA,EAAQR,QAAQ,CAAGA,CAAO,CAElC,CACAM,EAAMlT,IAAI,CAACoT,EACf,EAEA,MADA,EAAE,CAAC3N,OAAO,CAACjF,IAAI,CAACnE,EAAI2W,IAAI,CAACO,UAAU,CAAE,AAACC,GAAcP,EAAiBO,EAAW1B,IACzEA,CACX,CACJ,CA2QA,OAtPAnB,EAAII,iBAAiB,CAAG,CACpB,MACA,gBACA,mBACA,gBACA,gBACA,cACA,aACA,kBACA,YACA,eACA,gBACA,uBACA,gBACA,QACA,YACA,QACA,UACA,KACA,KACA,IACA,KACA,KACA,WACA,OACA,cACA,cACA,gBACA,SACA,OACA,KACA,KACA,MACA,eACA,cACA,SACA,UACA,WACA,SACA,UACA,cACA,eACA,eACA,IACA,SACA,OACA,OACA,OACA,QACA,QACA,MACA,cACA,eACA,SACA,iBACA,eACA,QACA,cACA,SACA,UACA,UACA,SACA,WACA,aACA,cACA,aACA,aACA,QACA,OACA,SACA,QACA,IACA,KACA,KACA,aACA,IACA,KACA,KACA,SACH,CAgBDJ,EAAIK,iBAAiB,CAAG,CACpB,WACA,UACA,UACA,IACA,MACA,KACA,IACH,CAeDL,EAAI8B,WAAW,CAAG,CACd,IACA,OACA,IACA,KACA,SACA,UACA,SACA,WACA,OACA,KACA,OACA,MACA,KACA,KACA,KACA,sBACA,cACA,eACA,UACA,UACA,UACA,UACA,UACA,iBACA,eACA,WACA,UACA,cACA,SACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,IACA,MACA,KACA,iBACA,SACA,KACA,IACA,OACA,UACA,MACA,OACA,QACA,OACA,OACA,SACA,QACA,MACA,MACA,MACA,QACA,OACA,WACA,QACA,QACA,QACA,QACA,KACA,KACA,KACA,IACA,KACA,QACH,CACD9B,EAAID,SAAS,CAAGA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