UNPKG

@budibase/server

Version:
913 lines • 682 kB
import { R as Kt } from "./index-fc73233e.js"; var Ge = { exports: {} }; /*! * ApexCharts v3.54.1 * (c) 2018-2024 ApexCharts * Released under the MIT License. */ (function(Ve, pt) { function Te(y, e) { (e == null || e > y.length) && (e = y.length); for (var t = 0, i = Array(e); t < e; t++) i[t] = y[t]; return i; } function je(y) { if (y === void 0) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return y; } function R(y, e) { if (!(y instanceof e)) throw new TypeError("Cannot call a class as a function"); } function _e(y, e) { for (var t = 0; t < e.length; t++) { var i = e[t]; i.enumerable = i.enumerable || !1, i.configurable = !0, "value" in i && (i.writable = !0), Object.defineProperty(y, $e(i.key), i); } } function F(y, e, t) { return e && _e(y.prototype, e), t && _e(y, t), Object.defineProperty(y, "prototype", { writable: !1 }), y; } function Ae(y, e) { var t = typeof Symbol < "u" && y[Symbol.iterator] || y["@@iterator"]; if (!t) { if (Array.isArray(y) || (t = Xe(y)) || e && y && typeof y.length == "number") { t && (y = t); var i = 0, a = function() { }; return { s: a, n: function() { return i >= y.length ? { done: !0 } : { done: !1, value: y[i++] }; }, e: function(o) { throw o; }, f: a }; } throw new TypeError(`Invalid attempt to iterate non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`); } var r, s = !0, n = !1; return { s: function() { t = t.call(y); }, n: function() { var o = t.next(); return s = o.done, o; }, e: function(o) { n = !0, r = o; }, f: function() { try { s || t.return == null || t.return(); } finally { if (n) throw r; } } }; } function xe(y) { var e = Ue(); return function() { var t, i = Ce(y); if (e) { var a = Ce(this).constructor; t = Reflect.construct(i, arguments, a); } else t = i.apply(this, arguments); return function(r, s) { if (s && (typeof s == "object" || typeof s == "function")) return s; if (s !== void 0) throw new TypeError("Derived constructors may only return object or undefined"); return je(r); }(this, t); }; } function Se(y, e, t) { return (e = $e(e)) in y ? Object.defineProperty(y, e, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : y[e] = t, y; } function Ce(y) { return Ce = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(e) { return e.__proto__ || Object.getPrototypeOf(e); }, Ce(y); } function be(y, e) { if (typeof e != "function" && e !== null) throw new TypeError("Super expression must either be null or a function"); y.prototype = Object.create(e && e.prototype, { constructor: { value: y, writable: !0, configurable: !0 } }), Object.defineProperty(y, "prototype", { writable: !1 }), e && ze(y, e); } function Ue() { try { var y = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() { })); } catch { } return (Ue = function() { return !!y; })(); } function qe(y, e) { var t = Object.keys(y); if (Object.getOwnPropertySymbols) { var i = Object.getOwnPropertySymbols(y); e && (i = i.filter(function(a) { return Object.getOwnPropertyDescriptor(y, a).enumerable; })), t.push.apply(t, i); } return t; } function E(y) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e] != null ? arguments[e] : {}; e % 2 ? qe(Object(t), !0).forEach(function(i) { Se(y, i, t[i]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(y, Object.getOwnPropertyDescriptors(t)) : qe(Object(t)).forEach(function(i) { Object.defineProperty(y, i, Object.getOwnPropertyDescriptor(t, i)); }); } return y; } function ze(y, e) { return ze = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(t, i) { return t.__proto__ = i, t; }, ze(y, e); } function Ze(y, e) { return function(t) { if (Array.isArray(t)) return t; }(y) || function(t, i) { var a = t == null ? null : typeof Symbol < "u" && t[Symbol.iterator] || t["@@iterator"]; if (a != null) { var r, s, n, o, h = [], d = !0, c = !1; try { if (n = (a = a.call(t)).next, i === 0) { if (Object(a) !== a) return; d = !1; } else for (; !(d = (r = n.call(a)).done) && (h.push(r.value), h.length !== i); d = !0) ; } catch (g) { c = !0, s = g; } finally { try { if (!d && a.return != null && (o = a.return(), Object(o) !== o)) return; } finally { if (c) throw s; } } return h; } }(y, e) || Xe(y, e) || function() { throw new TypeError(`Invalid attempt to destructure non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`); }(); } function J(y) { return function(e) { if (Array.isArray(e)) return Te(e); }(y) || function(e) { if (typeof Symbol < "u" && e[Symbol.iterator] != null || e["@@iterator"] != null) return Array.from(e); }(y) || Xe(y) || function() { throw new TypeError(`Invalid attempt to spread non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`); }(); } function $e(y) { var e = function(t, i) { if (typeof t != "object" || !t) return t; var a = t[Symbol.toPrimitive]; if (a !== void 0) { var r = a.call(t, i || "default"); if (typeof r != "object") return r; throw new TypeError("@@toPrimitive must return a primitive value."); } return (i === "string" ? String : Number)(t); }(y, "string"); return typeof e == "symbol" ? e : e + ""; } function Q(y) { return Q = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(e) { return typeof e; } : function(e) { return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e; }, Q(y); } function Xe(y, e) { if (y) { if (typeof y == "string") return Te(y, e); var t = {}.toString.call(y).slice(8, -1); return t === "Object" && y.constructor && (t = y.constructor.name), t === "Map" || t === "Set" ? Array.from(y) : t === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? Te(y, e) : void 0; } } var P = function() { function y() { R(this, y); } return F(y, [{ key: "shadeRGBColor", value: function(e, t) { var i = t.split(","), a = e < 0 ? 0 : 255, r = e < 0 ? -1 * e : e, s = parseInt(i[0].slice(4), 10), n = parseInt(i[1], 10), o = parseInt(i[2], 10); return "rgb(" + (Math.round((a - s) * r) + s) + "," + (Math.round((a - n) * r) + n) + "," + (Math.round((a - o) * r) + o) + ")"; } }, { key: "shadeHexColor", value: function(e, t) { var i = parseInt(t.slice(1), 16), a = e < 0 ? 0 : 255, r = e < 0 ? -1 * e : e, s = i >> 16, n = i >> 8 & 255, o = 255 & i; return "#" + (16777216 + 65536 * (Math.round((a - s) * r) + s) + 256 * (Math.round((a - n) * r) + n) + (Math.round((a - o) * r) + o)).toString(16).slice(1); } }, { key: "shadeColor", value: function(e, t) { return y.isColorHex(t) ? this.shadeHexColor(e, t) : this.shadeRGBColor(e, t); } }], [{ key: "bind", value: function(e, t) { return function() { return e.apply(t, arguments); }; } }, { key: "isObject", value: function(e) { return e && Q(e) === "object" && !Array.isArray(e) && e != null; } }, { key: "is", value: function(e, t) { return Object.prototype.toString.call(t) === "[object " + e + "]"; } }, { key: "listToArray", value: function(e) { var t, i = []; for (t = 0; t < e.length; t++) i[t] = e[t]; return i; } }, { key: "extend", value: function(e, t) { var i = this; typeof Object.assign != "function" && (Object.assign = function(r) { if (r == null) throw new TypeError("Cannot convert undefined or null to object"); for (var s = Object(r), n = 1; n < arguments.length; n++) { var o = arguments[n]; if (o != null) for (var h in o) o.hasOwnProperty(h) && (s[h] = o[h]); } return s; }); var a = Object.assign({}, e); return this.isObject(e) && this.isObject(t) && Object.keys(t).forEach(function(r) { i.isObject(t[r]) && r in e ? a[r] = i.extend(e[r], t[r]) : Object.assign(a, Se({}, r, t[r])); }), a; } }, { key: "extendArray", value: function(e, t) { var i = []; return e.map(function(a) { i.push(y.extend(t, a)); }), e = i; } }, { key: "monthMod", value: function(e) { return e % 12; } }, { key: "clone", value: function(e) { if (y.is("Array", e)) { for (var t = [], i = 0; i < e.length; i++) t[i] = this.clone(e[i]); return t; } if (y.is("Null", e)) return null; if (y.is("Date", e)) return e; if (Q(e) === "object") { var a = {}; for (var r in e) e.hasOwnProperty(r) && (a[r] = this.clone(e[r])); return a; } return e; } }, { key: "log10", value: function(e) { return Math.log(e) / Math.LN10; } }, { key: "roundToBase10", value: function(e) { return Math.pow(10, Math.floor(Math.log10(e))); } }, { key: "roundToBase", value: function(e, t) { return Math.pow(t, Math.floor(Math.log(e) / Math.log(t))); } }, { key: "parseNumber", value: function(e) { return e === null ? e : parseFloat(e); } }, { key: "stripNumber", value: function(e) { var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 2; return Number.isInteger(e) ? e : parseFloat(e.toPrecision(t)); } }, { key: "randomId", value: function() { return (Math.random() + 1).toString(36).substring(4); } }, { key: "noExponents", value: function(e) { var t = String(e).split(/[eE]/); if (t.length === 1) return t[0]; var i = "", a = e < 0 ? "-" : "", r = t[0].replace(".", ""), s = Number(t[1]) + 1; if (s < 0) { for (i = a + "0."; s++; ) i += "0"; return i + r.replace(/^-/, ""); } for (s -= r.length; s--; ) i += "0"; return r + i; } }, { key: "getDimensions", value: function(e) { var t = getComputedStyle(e, null), i = e.clientHeight, a = e.clientWidth; return i -= parseFloat(t.paddingTop) + parseFloat(t.paddingBottom), [a -= parseFloat(t.paddingLeft) + parseFloat(t.paddingRight), i]; } }, { key: "getBoundingClientRect", value: function(e) { var t = e.getBoundingClientRect(); return { top: t.top, right: t.right, bottom: t.bottom, left: t.left, width: e.clientWidth, height: e.clientHeight, x: t.left, y: t.top }; } }, { key: "getLargestStringFromArr", value: function(e) { return e.reduce(function(t, i) { return Array.isArray(i) && (i = i.reduce(function(a, r) { return a.length > r.length ? a : r; })), t.length > i.length ? t : i; }, 0); } }, { key: "hexToRgba", value: function() { var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : "#999999", t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0.6; e.substring(0, 1) !== "#" && (e = "#999999"); var i = e.replace("#", ""); i = i.match(new RegExp("(.{" + i.length / 3 + "})", "g")); for (var a = 0; a < i.length; a++) i[a] = parseInt(i[a].length === 1 ? i[a] + i[a] : i[a], 16); return t !== void 0 && i.push(t), "rgba(" + i.join(",") + ")"; } }, { key: "getOpacityFromRGBA", value: function(e) { return parseFloat(e.replace(/^.*,(.+)\)/, "$1")); } }, { key: "rgb2hex", value: function(e) { return (e = e.match(/^rgba?[\s+]?\([\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?/i)) && e.length === 4 ? "#" + ("0" + parseInt(e[1], 10).toString(16)).slice(-2) + ("0" + parseInt(e[2], 10).toString(16)).slice(-2) + ("0" + parseInt(e[3], 10).toString(16)).slice(-2) : ""; } }, { key: "isColorHex", value: function(e) { return /(^#[0-9A-F]{6}$)|(^#[0-9A-F]{3}$)|(^#[0-9A-F]{8}$)/i.test(e); } }, { key: "getPolygonPos", value: function(e, t) { for (var i = [], a = 2 * Math.PI / t, r = 0; r < t; r++) { var s = {}; s.x = e * Math.sin(r * a), s.y = -e * Math.cos(r * a), i.push(s); } return i; } }, { key: "polarToCartesian", value: function(e, t, i, a) { var r = (a - 90) * Math.PI / 180; return { x: e + i * Math.cos(r), y: t + i * Math.sin(r) }; } }, { key: "escapeString", value: function(e) { var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : "x", i = e.toString().slice(); return i = i.replace(/[` ~!@#$%^&*()|+\=?;:'",.<>{}[\]\\/]/gi, t); } }, { key: "negToZero", value: function(e) { return e < 0 ? 0 : e; } }, { key: "moveIndexInArray", value: function(e, t, i) { if (i >= e.length) for (var a = i - e.length + 1; a--; ) e.push(void 0); return e.splice(i, 0, e.splice(t, 1)[0]), e; } }, { key: "extractNumber", value: function(e) { return parseFloat(e.replace(/[^\d.]*/g, "")); } }, { key: "findAncestor", value: function(e, t) { for (; (e = e.parentElement) && !e.classList.contains(t); ) ; return e; } }, { key: "setELstyles", value: function(e, t) { for (var i in t) t.hasOwnProperty(i) && (e.style.key = t[i]); } }, { key: "preciseAddition", value: function(e, t) { var i = (String(e).split(".")[1] || "").length, a = (String(t).split(".")[1] || "").length, r = Math.pow(10, Math.max(i, a)); return (Math.round(e * r) + Math.round(t * r)) / r; } }, { key: "isNumber", value: function(e) { return !isNaN(e) && parseFloat(Number(e)) === e && !isNaN(parseInt(e, 10)); } }, { key: "isFloat", value: function(e) { return Number(e) === e && e % 1 != 0; } }, { key: "isSafari", value: function() { return /^((?!chrome|android).)*safari/i.test(navigator.userAgent); } }, { key: "isFirefox", value: function() { return navigator.userAgent.toLowerCase().indexOf("firefox") > -1; } }, { key: "isMsEdge", value: function() { var e = window.navigator.userAgent, t = e.indexOf("Edge/"); return t > 0 && parseInt(e.substring(t + 5, e.indexOf(".", t)), 10); } }, { key: "getGCD", value: function(e, t) { var i = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : 7, a = Math.pow(10, i - Math.floor(Math.log10(Math.max(e, t)))); for (e = Math.round(Math.abs(e) * a), t = Math.round(Math.abs(t) * a); t; ) { var r = t; t = e % t, e = r; } return e / a; } }, { key: "getPrimeFactors", value: function(e) { for (var t = [], i = 2; e >= 2; ) e % i == 0 ? (t.push(i), e /= i) : i++; return t; } }, { key: "mod", value: function(e, t) { var i = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : 7, a = Math.pow(10, i - Math.floor(Math.log10(Math.max(e, t)))); return (e = Math.round(Math.abs(e) * a)) % (t = Math.round(Math.abs(t) * a)) / a; } }]), y; }(), ge = function() { function y(e) { R(this, y), this.ctx = e, this.w = e.w, this.setEasingFunctions(); } return F(y, [{ key: "setEasingFunctions", value: function() { var e; if (!this.w.globals.easing) { switch (this.w.config.chart.animations.easing) { case "linear": e = "-"; break; case "easein": e = "<"; break; case "easeout": e = ">"; break; case "easeinout": default: e = "<>"; break; case "swing": e = function(t) { var i = 1.70158; return (t -= 1) * t * ((i + 1) * t + i) + 1; }; break; case "bounce": e = function(t) { return t < 1 / 2.75 ? 7.5625 * t * t : t < 2 / 2.75 ? 7.5625 * (t -= 1.5 / 2.75) * t + 0.75 : t < 2.5 / 2.75 ? 7.5625 * (t -= 2.25 / 2.75) * t + 0.9375 : 7.5625 * (t -= 2.625 / 2.75) * t + 0.984375; }; break; case "elastic": e = function(t) { return t === !!t ? t : Math.pow(2, -10 * t) * Math.sin((t - 0.075) * (2 * Math.PI) / 0.3) + 1; }; } this.w.globals.easing = e; } } }, { key: "animateLine", value: function(e, t, i, a) { e.attr(t).animate(a).attr(i); } }, { key: "animateMarker", value: function(e, t, i, a) { e.attr({ opacity: 0 }).animate(t, i).attr({ opacity: 1 }).afterAll(function() { a(); }); } }, { key: "animateRect", value: function(e, t, i, a, r) { e.attr(t).animate(a).attr(i).afterAll(function() { return r(); }); } }, { key: "animatePathsGradually", value: function(e) { var t = e.el, i = e.realIndex, a = e.j, r = e.fill, s = e.pathFrom, n = e.pathTo, o = e.speed, h = e.delay, d = this.w, c = 0; d.config.chart.animations.animateGradually.enabled && (c = d.config.chart.animations.animateGradually.delay), d.config.chart.animations.dynamicAnimation.enabled && d.globals.dataChanged && d.config.chart.type !== "bar" && (c = 0), this.morphSVG(t, i, a, d.config.chart.type !== "line" || d.globals.comboCharts ? r : "stroke", s, n, o, h * c); } }, { key: "showDelayedElements", value: function() { this.w.globals.delayedElements.forEach(function(e) { var t = e.el; t.classList.remove("apexcharts-element-hidden"), t.classList.add("apexcharts-hidden-element-shown"); }); } }, { key: "animationCompleted", value: function(e) { var t = this.w; t.globals.animationEnded || (t.globals.animationEnded = !0, this.showDelayedElements(), typeof t.config.chart.events.animationEnd == "function" && t.config.chart.events.animationEnd(this.ctx, { el: e, w: t })); } }, { key: "morphSVG", value: function(e, t, i, a, r, s, n, o) { var h = this, d = this.w; r || (r = e.attr("pathFrom")), s || (s = e.attr("pathTo")); var c = function(g) { return d.config.chart.type === "radar" && (n = 1), "M 0 ".concat(d.globals.gridHeight); }; (!r || r.indexOf("undefined") > -1 || r.indexOf("NaN") > -1) && (r = c()), (!s || s.indexOf("undefined") > -1 || s.indexOf("NaN") > -1) && (s = c()), d.globals.shouldAnimate || (n = 1), e.plot(r).animate(1, d.globals.easing, o).plot(r).animate(n, d.globals.easing, o).plot(s).afterAll(function() { P.isNumber(i) ? i === d.globals.series[d.globals.maxValsInArrayIndex].length - 2 && d.globals.shouldAnimate && h.animationCompleted(e) : a !== "none" && d.globals.shouldAnimate && (!d.globals.comboCharts && t === d.globals.series.length - 1 || d.globals.comboCharts) && h.animationCompleted(e), h.showDelayedElements(); }); } }]), y; }(), ee = function() { function y(e) { R(this, y), this.ctx = e, this.w = e.w; } return F(y, [{ key: "getDefaultFilter", value: function(e, t) { var i = this.w; e.unfilter(!0), new window.SVG.Filter().size("120%", "180%", "-5%", "-40%"), i.config.states.normal.filter !== "none" ? this.applyFilter(e, t, i.config.states.normal.filter.type, i.config.states.normal.filter.value) : i.config.chart.dropShadow.enabled && this.dropShadow(e, i.config.chart.dropShadow, t); } }, { key: "addNormalFilter", value: function(e, t) { var i = this.w; i.config.chart.dropShadow.enabled && !e.node.classList.contains("apexcharts-marker") && this.dropShadow(e, i.config.chart.dropShadow, t); } }, { key: "addLightenFilter", value: function(e, t, i) { var a = this, r = this.w, s = i.intensity; e.unfilter(!0), new window.SVG.Filter(), e.filter(function(n) { var o = r.config.chart.dropShadow; (o.enabled ? a.addShadow(n, t, o) : n).componentTransfer({ rgb: { type: "linear", slope: 1.5, intercept: s } }); }), e.filterer.node.setAttribute("filterUnits", "userSpaceOnUse"), this._scaleFilterSize(e.filterer.node); } }, { key: "addDarkenFilter", value: function(e, t, i) { var a = this, r = this.w, s = i.intensity; e.unfilter(!0), new window.SVG.Filter(), e.filter(function(n) { var o = r.config.chart.dropShadow; (o.enabled ? a.addShadow(n, t, o) : n).componentTransfer({ rgb: { type: "linear", slope: s } }); }), e.filterer.node.setAttribute("filterUnits", "userSpaceOnUse"), this._scaleFilterSize(e.filterer.node); } }, { key: "applyFilter", value: function(e, t, i) { var a = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : 0.5; switch (i) { case "none": this.addNormalFilter(e, t); break; case "lighten": this.addLightenFilter(e, t, { intensity: a }); break; case "darken": this.addDarkenFilter(e, t, { intensity: a }); } } }, { key: "addShadow", value: function(e, t, i) { var a, r = this.w, s = i.blur, n = i.top, o = i.left, h = i.color, d = i.opacity; if (((a = r.config.chart.dropShadow.enabledOnSeries) === null || a === void 0 ? void 0 : a.length) > 0 && r.config.chart.dropShadow.enabledOnSeries.indexOf(t) === -1) return e; var c = e.flood(Array.isArray(h) ? h[t] : h, d).composite(e.sourceAlpha, "in").offset(o, n).gaussianBlur(s).merge(e.source); return e.blend(e.source, c); } }, { key: "dropShadow", value: function(e, t) { var i, a, r = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : 0, s = t.top, n = t.left, o = t.blur, h = t.color, d = t.opacity, c = t.noUserSpaceOnUse, g = this.w; return e.unfilter(!0), P.isMsEdge() && g.config.chart.type === "radialBar" || ((i = g.config.chart.dropShadow.enabledOnSeries) === null || i === void 0 ? void 0 : i.length) > 0 && ((a = g.config.chart.dropShadow.enabledOnSeries) === null || a === void 0 ? void 0 : a.indexOf(r)) === -1 || (h = Array.isArray(h) ? h[r] : h, e.filter(function(p) { var x = null; x = P.isSafari() || P.isFirefox() || P.isMsEdge() ? p.flood(h, d).composite(p.sourceAlpha, "in").offset(n, s).gaussianBlur(o) : p.flood(h, d).composite(p.sourceAlpha, "in").offset(n, s).gaussianBlur(o).merge(p.source), p.blend(p.source, x); }), c || e.filterer.node.setAttribute("filterUnits", "userSpaceOnUse"), this._scaleFilterSize(e.filterer.node)), e; } }, { key: "setSelectionFilter", value: function(e, t, i) { var a = this.w; if (a.globals.selectedDataPoints[t] !== void 0 && a.globals.selectedDataPoints[t].indexOf(i) > -1) { e.node.setAttribute("selected", !0); var r = a.config.states.active.filter; r !== "none" && this.applyFilter(e, t, r.type, r.value); } } }, { key: "_scaleFilterSize", value: function(e) { (function(t) { for (var i in t) t.hasOwnProperty(i) && e.setAttribute(i, t[i]); })({ width: "200%", height: "200%", x: "-50%", y: "-50%" }); } }]), y; }(), X = function() { function y(e) { R(this, y), this.ctx = e, this.w = e.w; } return F(y, [{ key: "roundPathCorners", value: function(e, t) { function i(S, C, L) { var M = C.x - S.x, T = C.y - S.y, I = Math.sqrt(M * M + T * T); return a(S, C, Math.min(1, L / I)); } function a(S, C, L) { return { x: S.x + (C.x - S.x) * L, y: S.y + (C.y - S.y) * L }; } function r(S, C) { S.length > 2 && (S[S.length - 2] = C.x, S[S.length - 1] = C.y); } function s(S) { return { x: parseFloat(S[S.length - 2]), y: parseFloat(S[S.length - 1]) }; } e.indexOf("NaN") > -1 && (e = ""); var n = e.split(/[,\s]/).reduce(function(S, C) { var L = C.match("([a-zA-Z])(.+)"); return L ? (S.push(L[1]), S.push(L[2])) : S.push(C), S; }, []).reduce(function(S, C) { return parseFloat(C) == C && S.length ? S[S.length - 1].push(C) : S.push([C]), S; }, []), o = []; if (n.length > 1) { var h = s(n[0]), d = null; n[n.length - 1][0] == "Z" && n[0].length > 2 && (d = ["L", h.x, h.y], n[n.length - 1] = d), o.push(n[0]); for (var c = 1; c < n.length; c++) { var g = o[o.length - 1], p = n[c], x = p == d ? n[1] : n[c + 1]; if (x && g && g.length > 2 && p[0] == "L" && x.length > 2 && x[0] == "L") { var f, m, v = s(g), w = s(p), l = s(x); f = i(w, v, t), m = i(w, l, t), r(p, f), p.origPoint = w, o.push(p); var u = a(f, w, 0.5), b = a(w, m, 0.5), A = ["C", u.x, u.y, b.x, b.y, m.x, m.y]; A.origPoint = w, o.push(A); } else o.push(p); } if (d) { var k = s(o[o.length - 1]); o.push(["Z"]), r(o[0], k); } } else o = n; return o.reduce(function(S, C) { return S + C.join(" ") + " "; }, ""); } }, { key: "drawLine", value: function(e, t, i, a) { var r = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : "#a8a8a8", s = arguments.length > 5 && arguments[5] !== void 0 ? arguments[5] : 0, n = arguments.length > 6 && arguments[6] !== void 0 ? arguments[6] : null, o = arguments.length > 7 && arguments[7] !== void 0 ? arguments[7] : "butt"; return this.w.globals.dom.Paper.line().attr({ x1: e, y1: t, x2: i, y2: a, stroke: r, "stroke-dasharray": s, "stroke-width": n, "stroke-linecap": o }); } }, { key: "drawRect", value: function() { var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : 0, t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0, i = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : 0, a = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : 0, r = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : 0, s = arguments.length > 5 && arguments[5] !== void 0 ? arguments[5] : "#fefefe", n = arguments.length > 6 && arguments[6] !== void 0 ? arguments[6] : 1, o = arguments.length > 7 && arguments[7] !== void 0 ? arguments[7] : null, h = arguments.length > 8 && arguments[8] !== void 0 ? arguments[8] : null, d = arguments.length > 9 && arguments[9] !== void 0 ? arguments[9] : 0, c = this.w.globals.dom.Paper.rect(); return c.attr({ x: e, y: t, width: i > 0 ? i : 0, height: a > 0 ? a : 0, rx: r, ry: r, opacity: n, "stroke-width": o !== null ? o : 0, stroke: h !== null ? h : "none", "stroke-dasharray": d }), c.node.setAttribute("fill", s), c; } }, { key: "drawPolygon", value: function(e) { var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : "#e1e1e1", i = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : 1, a = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : "none"; return this.w.globals.dom.Paper.polygon(e).attr({ fill: a, stroke: t, "stroke-width": i }); } }, { key: "drawCircle", value: function(e) { var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : null; e < 0 && (e = 0); var i = this.w.globals.dom.Paper.circle(2 * e); return t !== null && i.attr(t), i; } }, { key: "drawPath", value: function(e) { var t = e.d, i = t === void 0 ? "" : t, a = e.stroke, r = a === void 0 ? "#a8a8a8" : a, s = e.strokeWidth, n = s === void 0 ? 1 : s, o = e.fill, h = e.fillOpacity, d = h === void 0 ? 1 : h, c = e.strokeOpacity, g = c === void 0 ? 1 : c, p = e.classes, x = e.strokeLinecap, f = x === void 0 ? null : x, m = e.strokeDashArray, v = m === void 0 ? 0 : m, w = this.w; return f === null && (f = w.config.stroke.lineCap), (i.indexOf("undefined") > -1 || i.indexOf("NaN") > -1) && (i = "M 0 ".concat(w.globals.gridHeight)), w.globals.dom.Paper.path(i).attr({ fill: o, "fill-opacity": d, stroke: r, "stroke-opacity": g, "stroke-linecap": f, "stroke-width": n, "stroke-dasharray": v, class: p }); } }, { key: "group", value: function() { var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : null, t = this.w.globals.dom.Paper.group(); return e !== null && t.attr(e), t; } }, { key: "move", value: function(e, t) { var i = ["M", e, t].join(" "); return i; } }, { key: "line", value: function(e, t) { var i = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : null, a = null; return i === null ? a = [" L", e, t].join(" ") : i === "H" ? a = [" H", e].join(" ") : i === "V" && (a = [" V", t].join(" ")), a; } }, { key: "curve", value: function(e, t, i, a, r, s) { var n = ["C", e, t, i, a, r, s].join(" "); return n; } }, { key: "quadraticCurve", value: function(e, t, i, a) { return ["Q", e, t, i, a].join(" "); } }, { key: "arc", value: function(e, t, i, a, r, s, n) { var o = "A"; arguments.length > 7 && arguments[7] !== void 0 && arguments[7] && (o = "a"); var h = [o, e, t, i, a, r, s, n].join(" "); return h; } }, { key: "renderPaths", value: function(e) { var t, i = e.j, a = e.realIndex, r = e.pathFrom, s = e.pathTo, n = e.stroke, o = e.strokeWidth, h = e.strokeLinecap, d = e.fill, c = e.animationDelay, g = e.initialSpeed, p = e.dataChangeSpeed, x = e.className, f = e.chartType, m = e.shouldClipToGrid, v = m === void 0 || m, w = e.bindEventsOnPaths, l = w === void 0 || w, u = e.drawShadow, b = u === void 0 || u, A = this.w, k = new ee(this.ctx), S = new ge(this.ctx), C = this.w.config.chart.animations.enabled, L = C && this.w.config.chart.animations.dynamicAnimation.enabled, M = !!(C && !A.globals.resized || L && A.globals.dataChanged && A.globals.shouldAnimate); M ? t = r : (t = s, A.globals.animationEnded = !0); var T = A.config.stroke.dashArray, I = 0; I = Array.isArray(T) ? T[a] : A.config.stroke.dashArray; var z = this.drawPath({ d: t, stroke: n, strokeWidth: o, fill: d, fillOpacity: 1, classes: x, strokeLinecap: h, strokeDashArray: I }); if (z.attr("index", a), v && (f === "bar" && !A.globals.isHorizontal || A.globals.comboCharts ? z.attr({ "clip-path": "url(#gridRectBarMask".concat(A.globals.cuid, ")") }) : z.attr({ "clip-path": "url(#gridRectMask".concat(A.globals.cuid, ")") })), A.config.states.normal.filter.type !== "none") k.getDefaultFilter(z, a); else if (A.config.chart.dropShadow.enabled && b) { var Y = A.config.chart.dropShadow; k.dropShadow(z, Y, a); } l && (z.node.addEventListener("mouseenter", this.pathMouseEnter.bind(this, z)), z.node.addEventListener("mouseleave", this.pathMouseLeave.bind(this, z)), z.node.addEventListener("mousedown", this.pathMouseDown.bind(this, z))), z.attr({ pathTo: s, pathFrom: r }); var D = { el: z, j: i, realIndex: a, pathFrom: r, pathTo: s, fill: d, strokeWidth: o, delay: c }; return !C || A.globals.resized || A.globals.dataChanged ? !A.globals.resized && A.globals.dataChanged || S.showDelayedElements() : S.animatePathsGradually(E(E({}, D), {}, { speed: g })), A.globals.dataChanged && L && M && S.animatePathsGradually(E(E({}, D), {}, { speed: p })), z; } }, { key: "drawPattern", value: function(e, t, i) { var a = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : "#a8a8a8", r = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : 0; return this.w.globals.dom.Paper.pattern(t, i, function(s) { e === "horizontalLines" ? s.line(0, 0, i, 0).stroke({ color: a, width: r + 1 }) : e === "verticalLines" ? s.line(0, 0, 0, t).stroke({ color: a, width: r + 1 }) : e === "slantedLines" ? s.line(0, 0, t, i).stroke({ color: a, width: r }) : e === "squares" ? s.rect(t, i).fill("none").stroke({ color: a, width: r }) : e === "circles" && s.circle(t).fill("none").stroke({ color: a, width: r }); }); } }, { key: "drawGradient", value: function(e, t, i, a, r) { var s, n = arguments.length > 5 && arguments[5] !== void 0 ? arguments[5] : null, o = arguments.length > 6 && arguments[6] !== void 0 ? arguments[6] : null, h = arguments.length > 7 && arguments[7] !== void 0 ? arguments[7] : null, d = arguments.length > 8 && arguments[8] !== void 0 ? arguments[8] : 0, c = this.w; t.length < 9 && t.indexOf("#") === 0 && (t = P.hexToRgba(t, a)), i.length < 9 && i.indexOf("#") === 0 && (i = P.hexToRgba(i, r)); var g = 0, p = 1, x = 1, f = null; o !== null && (g = o[0] !== void 0 ? o[0] / 100 : 0, p = o[1] !== void 0 ? o[1] / 100 : 1, x = o[2] !== void 0 ? o[2] / 100 : 1, f = o[3] !== void 0 ? o[3] / 100 : null); var m = !(c.config.chart.type !== "donut" && c.config.chart.type !== "pie" && c.config.chart.type !== "polarArea" && c.config.chart.type !== "bubble"); if (s = h === null || h.length === 0 ? c.globals.dom.Paper.gradient(m ? "radial" : "linear", function(l) { l.at(g, t, a), l.at(p, i, r), l.at(x, i, r), f !== null && l.at(f, t, a); }) : c.globals.dom.Paper.gradient(m ? "radial" : "linear", function(l) { (Array.isArray(h[d]) ? h[d] : h).forEach(function(u) { l.at(u.offset / 100, u.color, u.opacity); }); }), m) { var v = c.globals.gridWidth / 2, w = c.globals.gridHeight / 2; c.config.chart.type !== "bubble" ? s.attr({ gradientUnits: "userSpaceOnUse", cx: v, cy: w, r: n }) : s.attr({ cx: 0.5, cy: 0.5, r: 0.8, fx: 0.2, fy: 0.2 }); } else e === "vertical" ? s.from(0, 0).to(0, 1) : e === "diagonal" ? s.from(0, 0).to(1, 1) : e === "horizontal" ? s.from(0, 1).to(1, 1) : e === "diagonal2" && s.from(1, 0).to(0, 1); return s; } }, { key: "getTextBasedOnMaxWidth", value: function(e) { var t = e.text, i = e.maxWidth, a = e.fontSize, r = e.fontFamily, s = this.getTextRects(t, a, r), n = s.width / t.length, o = Math.floor(i / n); return i < s.width ? t.slice(0, o - 3) + "..." : t; } }, { key: "drawText", value: function(e) { var t = this, i = e.x, a = e.y, r = e.text, s = e.textAnchor, n = e.fontSize, o = e.fontFamily, h = e.fontWeight, d = e.foreColor, c = e.opacity, g = e.maxWidth, p = e.cssClass, x = p === void 0 ? "" : p, f = e.isPlainText, m = f === void 0 || f, v = e.dominantBaseline, w = v === void 0 ? "auto" : v, l = this.w; r === void 0 && (r = ""); var u = r; s || (s = "start"), d && d.length || (d = l.config.chart.foreColor), o = o || l.config.chart.fontFamily, h = h || "regular"; var b, A = { maxWidth: g, fontSize: n = n || "11px", fontFamily: o }; return Array.isArray(r) ? b = l.globals.dom.Paper.text(function(k) { for (var S = 0; S < r.length; S++) u = r[S], g && (u = t.getTextBasedOnMaxWidth(E({ text: r[S] }, A))), S === 0 ? k.tspan(u) : k.tspan(u).newLine(); }) : (g && (u = this.getTextBasedOnMaxWidth(E({ text: r }, A))), b = m ? l.globals.dom.Paper.plain(r) : l.globals.dom.Paper.text(function(k) { return k.tspan(u); })), b.attr({ x: i, y: a, "text-anchor": s, "dominant-baseline": w, "font-size": n, "font-family": o, "font-weight": h, fill: d, class: "apexcharts-text " + x }), b.node.style.fontFamily = o, b.node.style.opacity = c, b; } }, { key: "getMarkerPath", value: function(e, t, i, a) { var r = ""; switch (i) { case "cross": r = "M ".concat(e - (a /= 1.4), " ").concat(t - a, " L ").concat(e + a, " ").concat(t + a, " M ").concat(e - a, " ").concat(t + a, " L ").concat(e + a, " ").concat(t - a); break; case "plus": r = "M ".concat(e - (a /= 1.12), " ").concat(t, " L ").concat(e + a, " ").concat(t, " M ").concat(e, " ").concat(t - a, " L ").concat(e, " ").concat(t + a); break; case "star": case "sparkle": var s = 5; a *= 1.15, i === "sparkle" && (a /= 1.1, s = 4); for (var n = Math.PI / s, o = 0; o <= 2 * s; o++) { var h = o * n, d = o % 2 == 0 ? a : a / 2; r += (o === 0 ? "M" : "L") + (e + d * Math.sin(h)) + "," + (t - d * Math.cos(h)); } r += "Z"; break; case "triangle": r = "M ".concat(e, " ").concat(t - a, ` L `).concat(e + a, " ").concat(t + a, ` L `).concat(e - a, " ").concat(t + a, ` Z`); break; case "square": case "rect": r = "M ".concat(e - (a /= 1.125), " ").concat(t - a, ` L `).concat(e + a, " ").concat(t - a, ` L `).concat(e + a, " ").concat(t + a, ` L `).concat(e - a, " ").concat(t + a, ` Z`); break; case "diamond": a *= 1.05, r = "M ".concat(e, " ").concat(t - a, ` L `).concat(e + a, " ").concat(t, ` L `).concat(e, " ").concat(t + a, ` L `).concat(e - a, " ").concat(t, ` Z`); break; case "line": r = "M ".concat(e - (a /= 1.1), " ").concat(t, ` L `).concat(e + a, " ").concat(t); break; default: a *= 2, r = "M ".concat(e, ", ").concat(t, ` m -`).concat(a / 2, `, 0 a `).concat(a / 2, ",").concat(a / 2, " 0 1,0 ").concat(a, `,0 a `).concat(a / 2, ",").concat(a / 2, " 0 1,0 -").concat(a, ",0"); } return r; } }, { key: "drawMarkerShape", value: function(e, t, i, a, r) { var s = this.drawPath({ d: this.getMarkerPath(e, t, i, a, r), stroke: r.pointStrokeColor, strokeDashArray: r.pointStrokeDashArray, strokeWidth: r.pointStrokeWidth, fill: r.pointFillColor, fillOpacity: r.pointFillOpacity, strokeOpacity: r.pointStrokeOpacity }); return s.attr({ cx: e, cy: t, shape: r.shape, class: r.class ? r.class : "" }), s; } }, { key: "drawMarker", value: function(e, t, i) { e = e || 0; var a = i.pSize || 0; return P.isNumber(t) || (a = 0, t = 0), this.drawMarkerShape(e, t, i == null ? void 0 : i.shape, a, E(E({}, i), i.shape === "line" || i.shape === "plus" || i.shape === "cross" ? { pointStrokeColor: i.pointFillColor, pointStrokeOpacity: i.pointFillOpacity } : {})); } }, { key: "pathMouseEnter", value: function(e, t) { var i = this.w, a = new ee(this.ctx), r = parseInt(e.node.getAttribute("index"), 10), s = parseInt(e.node.getAttribute("j"), 10); if (typeof i.config.chart.events.dataPointMouseEnter == "function" && i.config.chart.events.dataPointMouseEnter(t, this.ctx, { seriesIndex: r, dataPointIndex: s, w: i }), this.ctx.events.fireEvent("dataPointMouseEnter", [t, this.ctx, { seriesIndex: r, dataPointIndex: s, w: i }]), (i.config.states.active.filter.type === "none" || e.node.getAttribute("selected") !== "true") && i.config.states.hover.filter.type !== "none" && !i.globals.isTouchDevice) { var n = i.config.states.hover.filter; a.applyFilter(e, r, n.type, n.value); } } }, { key: "pathMouseLeave", value: function(e, t) { var i = this.w, a = new ee(this.ctx), r = parseInt(e.node.getAttribute("index"), 10), s = parseInt(e.node.getAttribute("j"), 10); typeof i.config.chart.events.dataPointMouseLeave == "function" && i.config.chart.events.dataPointMouseLeave(t, this.ctx, { seriesIndex: r, dataPointIndex: s, w: i }), this.ctx.events.fireEvent("dataPointMouseLeave", [t, this.ctx, { seriesIndex: r, dataPointIndex: s, w: i }]), i.config.states.active.filter.type !== "none" && e.node.getAttribute("selected") === "true" || i.config.states.hover.filter.type !== "none" && a.getDefaultFilter(e, r); } }, { key: "pathMouseDown", value: function(e, t) { var i = this.w, a = new ee(this.ctx), r = parseInt(e.node.getAttribute("index"), 10), s = parseInt(e.node.getAttribute("j"), 10), n = "false"; if (e.node.getAttribute("selected") === "true") { if (e.node.setAttribute("selected", "false"), i.globals.selectedDataPoints[r].indexOf(s) > -1) { var o = i.globals.selectedDataPoints[r].indexOf(s); i.globals.selectedDataPoints[r].splice(o, 1); } } else { if (!i.config.states.active.allowMultipleDataPointsSelection && i.globals.selectedDataPoints.length > 0) { i.globals.selectedDataPoints = []; var h = i.globals.dom.Paper.select(".apexcharts-series path").members, d = i.globals.dom.Paper.select(".apexcharts-series circle, .apexcharts-series rect").members, c = function(x) { Array.prototype.forEach.call(x, function(f) { f.node.setAttribute("selected", "false"), a.getDefaultFilter(f, r); }); }; c(h), c(d); } e.node.setAttribute("selected", "true"), n = "true", i.globals.selectedDataPoints[r] === void 0 && (i.globals.selectedDataPoints[r] = []), i.globals.selectedDataPoints[r].push(s); } if (n === "true") { var g = i.config.states.active.filter; if (g !== "none") a.applyFilter(e, r, g.type, g.value); else if (i.config.states.hover.filter !== "none" && !i.globals.isTouchDevice) { var p = i.config.states.hover.filter; a.applyFilter(e, r, p.type, p.value); } } else i.config.states.active.filter.type !== "none" && (i.config.states.hover.filter.type === "none" || i.globals.isTouchDevice ? a.getDefaultFilter(e, r) : (p = i.config.states.hover.filter, a.applyFilter(e, r, p.type, p.value))); typeof i.config.chart.events.dataPointSelection == "function" && i.config.chart.events.dataPointSelection(t, this.ctx, { selectedDataPoints: i.globals.selectedDataPoints, seriesIndex: r, dataPointIndex: s, w: i }), t && this.ctx.events.fireEvent("dataPointSelection", [t, this.ctx, { selectedDataPoints: i.globals.selectedDataPoints, seriesIndex: r, dataPointIndex: s, w: i }]); } }, { key: "rotateAroundCenter", value: function(e) { var t = {}; return e && typeof e.getBBox == "function" && (t = e.getBBox()), { x: t.x + t.width / 2, y: t.y + t.height / 2 }; } }, { key: "getTextRects", value: function(e, t, i, a) { var r = !(arguments.length > 4 && arguments[4] !== void 0) || arguments[4], s = this.w, n = this.drawText({ x: -200, y: -200, text: e, textAnchor: "start", fontSize: t, fontFamily: i, foreColor: "#fff", opacity: 0 }); a && n.attr("transform", a), s.globals.dom.Paper.add(n); var o = n.bbox(); return r || (o = n.node.getBoundingClientRect()), n.remove(), { width: o.width, height: o.height }; } }, { key: "placeTextWithEllipsis", value: function(e, t, i) { if (typeof e.getComputedTextLength == "function" && (e.textContent = t, t.length > 0 && e.getComputedTextLength() >= i / 1.1)) { for (var a = t.length - 3; a > 0; a -= 3) if (e.getSubStringLength(0, a) <= i / 1.1) return void (e.textContent = t.substring(0, a) + "..."); e.textContent = "."; } } }], [{ key: "setAttrs", value: function(e, t) { for (var i in t) t.hasOwnProperty(i) && e.setAttribute(i, t[i]); } }]), y; }(), $ = function() { function y(e) { R(this, y), this.ctx = e, this.w = e.w; } return F(y, [{ key: "getStackedSeriesTotals", value: function() { var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : [], t = this.w, i = []; if (t.globals.series.length === 0) return i; for (var a = 0; a < t.globals.series[t.globals.maxValsInArrayIndex].length; a++) { for (var r = 0, s = 0; s < t.globals.series.length; s++) t.globals.series[s][a] !== void 0 && e.indexOf(s) === -1 && (r += t.globals.series[s][a]); i.push(r); } return i; } }, { key: "getSeriesTotalByIndex", value: function() { var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : null; return e === null ? this.w.config.series.reduce(function(t, i) { return t + i; }, 0) : this.w.globals.series[e].reduce(function(t, i) { return t + i; }, 0); } }, { key: "getStackedSeriesTotalsByGroups", value: function() { var e = this, t = this.w, i = []; return t.globals.seriesGroups.forEach(function(a) { var r = []; t.config.series.forEach(function(n, o) { a.indexOf(t.globals.seriesNames[o]) > -1 && r.push(o); }); var s = t.globals.series.map(function(n, o) { return r.indexOf(o) === -1 ? o : -1; }).filter(function(n) { return n !== -1; }); i.push(e.getStackedSeriesTotals(s)); }), i; } }, { key: "setSeriesYAxisMappings", value: function() { var e = this.w.globals, t = this.w.config, i = [], a = [], r = [], s = e.series.length > t.yaxis.length || t.yaxis.some(function(c) { return Array.isArray(c.seriesName); }); t.series.forEach(function(c, g) { r.push(g), a.push(null); }), t.yaxis.forEach(function(c, g) { i[g] = []; }); var n = []; t.yaxis.forEach(function(c, g) { var p = !1; if (c.seriesName) { var x = []; Array.isArray(c.seriesName) ? x = c.seriesName : x.push(c.seriesName), x.forEach(function(f) { t.series.forEach(function(m, v) { if (m.name === f) { var w = v; g === v || s ? !s || r.indexOf(v) > -1 ? i[g].push([g, v]) : console.warn("Series '" + m.name + "' referenced more than once in what looks like the new style. That is, when using either seriesName: [], or when there are more series than yaxes.") : (i[v].push([v, g]), w = g), p = !0, (w = r.indexOf(w)) !== -1 && r.splice(w, 1); } }); }); } p || n.push(g); }), i = i.map(function(c, g) { var p = []; return c.forEach(function(x) { a[x[1]] = x[0], p.push(x[1]); }), p; }); for (var o = t.yaxis.length - 1, h = 0; h < n.length && (o = n[h], i[o] = [], r); h++) { var d = r[0]; r.shift(), i[o].push(d), a[d] = o; } r.forEach(function(c) { i[o].push(c), a[c] = o; }), e.seriesYAxisMap = i.map(function(c) { return c; }), e.seriesYAxisReverseMap = a.map(function(c) { return c; }), e.seriesYAxisMap.forEach(function(c, g) { c.forEach(function(p) { t.series[p] && t.series[p].group === void 0 && (t.series[p].group = "apexcharts-axis-".concat(g.toString())); }); }); } }, { key: "isSeriesNull", value: function() { var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : null; return (e === null ? this.w.config.series.filter(function(t) { return t !== null; }) : this.w.config.series[e].data.filter(function(t) { return t !== null; })).length === 0; } }, { key: "seriesHaveSameValues", value: function(e) { return this.w.globals.series[e].every(function(t, i, a) { return t === a[0]; }); } }, { key: "getCategoryLabels", value: function(e) { var t = this.w, i = e.slice(); return t.config.xaxis.convertedCatToNumeric && (i = e.map(function(a, r) { return t.config.xaxis.labels.formatter(a - t.globals.minX + 1); })), i; } }, { key: "getLargestSeries", value: function() { var e = this.w; e.globals.maxValsInArrayIndex = e.globals.series.map(function(t) { return t.length; }).indexOf(Math.max.apply(Math, e.globals.series.map(function(t) { return t.length; }))); } }, { key: "getLargestMarkerSize", value: function() { var e = this.w, t = 0; return e.globals.markers.size.forEach(function(i) { t = Math.max(t, i); }), e.config.markers.discrete && e.config.markers.discrete.length && e.config.markers.discrete.forEach(function(i) { t = Math.max(t, i.size); }), t > 0 && (e.config.markers.hover.size > 0 ? t = e.config.markers.hover.size : t += e.config.markers.hover.sizeOffset), e.globals.markers.largestSize = t, t; } }, { key: "getSeriesTotals", value: function() { var e = this.w; e.globals.seriesTotals = e.globals.series.map(function(t, i) { var a = 0; if (Array.isArray(t)) for (var r = 0; r < t.length; r++) a += t[r]; else a += t; return a; }); } }, { key: "getSeriesTotalsXRange", value: function(e, t) { var i = this.w; return i.globals.series.map(function(a, r) { for (var s = 0, n = 0; n < a.length; n++) i.globals.seriesX[r][n] > e && i.globals.seriesX[r][n] < t && (s += a[n]); return s; }); } }, { key: "getPercentSeries", value: function() { var e = this.w; e.globals.seriesPercent = e.globals.series.map(function(t, i) { var a = []; if (Array.isArray(t)) for (var r = 0; r < t.length; r++) { var s = e.globals.stackedSeriesTotals[r], n = 0; s && (n = 100 * t[r] / s), a.push(n); } else { var o = 100 * t / e.globals.seriesTotals.reduce(function(h, d) { return h + d; }, 0); a.push(o); } return a; }); } }, { key: "getCalculatedRatios", value: function() { var e, t, i, a = this, r = this.w, s = r.globals, n = [], o = 0, h = [], d = 0.1, c = 0; if (s.yRange = [], s.isMultipleYAxis) for (var g = 0; g