import { ref as Le, reactive as z0, nextTick as fo, openBlock as Je, createElementBlock as qe, normalizeStyle as Ar, createElementVNode as ar, toDisplayString as yn, unref as X0, createCommentVNode as qn, createTextVNode as qp, Fragment as tl, renderList as el, normalizeClass as G0, defineCustomElement as Qp } from "vue";
const go = {
//图表配置
chart: {
spacingTop: 30,
backgroundColor: "rgba(0,0,0,0)"
},
title: {
enabled: !1
},
exporting: {
enabled: !1
},
boost: {
useGPUTranslations: !0
},
//默认颜色配置
colors: [
"#00f",
"#f00",
"#999",
"#000",
"#7cb5ec",
"#90ed7d",
"#f7a35c",
"#8085e9",
"#f15c80",
"#e4d354",
"#2b908f",
"#f45b5b",
"#91e8e1"
],
//版权信息
credits: { enabled: !1 },
//数据列通用配置
plotOptions: {
series: {
turboThreshold: 0,
//不限制数据点个数
boostThreshold: 0,
dataGrouping: {
enabled: !1
},
//取消数据大自动数据合并
animation: {
duration: 1e3
}
},
areaspline: {
lineWidth: 1,
stacking: "normal",
marker: {
enabled: !1
}
// fillOpacity: 0.5,
},
column: {
pointPadding: 0.05,
stacking: "normal"
},
scatter: {
turboThreshold: 0,
marker: {
symbol: "circle",
radius: 5,
states: {
hover: {
enabled: !0
}
}
},
states: {
hover: {
marker: {
enabled: !0
}
}
}
}
},
//范围选择器
rangeSelector: {
enabled: !1,
selected: 2
},
//悬浮提示框
tooltip: {
split: !1,
shared: !0,
dateTimeLabelFormats: {
// 时间格式化字符
day: "%Y/%m/%d",
week: "%Y/%m",
month: "%Y/%m",
year: "%Y/%m"
},
xDateFormat: "%Y/%m/%d",
className: "chart-tooltips-box"
// formatter:function(e){
// return `
${this.x}
aaa
`
// // return e
// }
// outside: true,
// valueDecimals: 4,
},
//图例
legend: {
enabled: !0,
verticalAlign: "top",
margin: 3
// layout: 'vertical'
},
//滚动条
scrollbar: {
enabled: !1
},
//导航器
navigator: {
enabled: !1
},
//范围选择器
rangeSelector: {
enabled: !1
},
xAxis: {
tickPosition: "inside",
lineColor: "#bfbfbf",
tickColor: "#bfbfbf",
tickLength: 5,
type: "datetime",
ordinal: !1,
dateTimeLabelFormats: {
day: "%y/%m",
week: "%y/%m",
month: "%y/%m",
year: "%y/%m"
}
// gridLineWidth:0
}
}, H0 = {
//默认颜色配置
colors: ["#4B0082", "#7FFFAA", "#FF4500", "#808000", "#EEE8AA", "#849EC1", "#8A4294", "#578B5A", "#FDA8C7", "#53B3FF", "#999999", "#000000", "#FFDF0C", "#FF0000", "#0033FF"],
yAxis: {
lineWidth: 1,
lineColor: "#bfbfbf",
tickColor: "#bfbfbf",
offset: 0,
opposite: !1,
reversed: !1,
visible: !0,
gridLineWidth: 0,
tickWidth: 1,
tickLength: 5,
tickPosition: "inside",
endOnTick: !1,
startOnTick: !1,
showLastLabel: !0,
//显示最后刻度值
tickPixelInterval: 50
}
}, wn = {
tickPosition: "inside",
lineColor: "#bfbfbf",
tickColor: "#bfbfbf",
tickLength: 5,
ordinal: !1,
type: "linear"
}, dr = {
tickWidth: 1,
tickLength: 5,
lineWidth: 1,
lineColor: "#bfbfbf",
tickColor: "#bfbfbf",
// offset: 0,
visible: !0,
gridLineWidth: 0,
tickPosition: "inside",
endOnTick: !1,
startOnTick: !1,
showLastLabel: !0,
tickPixelInterval: 50
}, tu = {
tickPosition: "inside",
lineColor: "#bfbfbf",
tickColor: "#bfbfbf",
tickLength: 5,
type: "datetime",
ordinal: !1,
dateTimeLabelFormats: {
day: "%y/%m",
week: "%y/%m",
month: "%y/%m",
year: "%y/%m"
},
xDateFormat: "%Y-%m-%d"
}, F0 = {
年: "Y",
季: "Q",
月: "M",
周: "W",
天: "D"
}, Op = {
年: "Year",
季: "Season",
月: "Month",
周: "Week",
天: "Day"
};
var Gr = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
function Mn(r) {
return r && r.__esModule && Object.prototype.hasOwnProperty.call(r, "default") ? r.default : r;
}
var eu = { exports: {} };
(function(r) {
(function(d, C) {
r.exports ? (C.default = C, r.exports = d.document ? C(d) : C) : (d.Highcharts && d.Highcharts.error(16, !0), d.Highcharts = C(d));
})(typeof window < "u" ? window : Gr, function(d) {
function C(y, N, _, U) {
y.hasOwnProperty(N) || (y[N] = U.apply(null, _));
}
var o = {};
return C(o, "Core/Globals.js", [], function() {
var y = typeof d < "u" ? d : typeof window < "u" ? window : {}, N;
return function(_) {
_.SVG_NS = "http://www.w3.org/2000/svg", _.product = "Highcharts", _.version = "9.3.3", _.win = y, _.doc = _.win.document, _.svg = _.doc && _.doc.createElementNS && !!_.doc.createElementNS(_.SVG_NS, "svg").createSVGRect, _.userAgent = _.win.navigator && _.win.navigator.userAgent || "", _.isChrome = _.userAgent.indexOf("Chrome") !== -1, _.isFirefox = _.userAgent.indexOf("Firefox") !== -1, _.isMS = /(edge|msie|trident)/i.test(_.userAgent) && !_.win.opera, _.isSafari = !_.isChrome && _.userAgent.indexOf("Safari") !== -1, _.isTouchDevice = /(Mobile|Android|Windows Phone)/.test(_.userAgent), _.isWebKit = _.userAgent.indexOf("AppleWebKit") !== -1, _.deg2rad = 2 * Math.PI / 360, _.hasBidiBug = _.isFirefox && 4 > parseInt(_.userAgent.split("Firefox/")[1], 10), _.hasTouch = !!_.win.TouchEvent, _.marginNames = ["plotTop", "marginRight", "marginBottom", "plotLeft"], _.noop = function() {
}, _.supportsPassiveEvents = function() {
var U = !1;
if (!_.isMS) {
var G = Object.defineProperty({}, "passive", { get: function() {
U = !0;
} });
_.win.addEventListener && _.win.removeEventListener && (_.win.addEventListener(
"testPassive",
_.noop,
G
), _.win.removeEventListener("testPassive", _.noop, G));
}
return U;
}(), _.charts = [], _.dateFormats = {}, _.seriesTypes = {}, _.symbolSizes = {}, _.chartCount = 0;
}(N || (N = {})), N;
}), C(o, "Core/Utilities.js", [o["Core/Globals.js"]], function(y) {
function N(t, s, n, P) {
var D = s ? "Highcharts error" : "Highcharts warning";
t === 32 && (t = D + ": Deprecated member");
var I = w(t), W = I ? D + " #" + t + ": www.highcharts.com/errors/" + t + "/" : t.toString();
if (typeof P < "u") {
var E = "";
I && (W += "?"), b(P, function(X, g) {
E += `
- ` + g + ": " + X, I && (W += encodeURI(g) + "=" + encodeURI(X));
}), W += E;
}
v(y, "displayError", { chart: n, code: t, message: W, params: P }, function() {
if (s)
throw Error(W);
u.console && N.messages.indexOf(W) === -1 && console.warn(W);
}), N.messages.push(W);
}
function _(t, s) {
var n = {};
return b(t, function(P, D) {
F(t[D], !0) && !t.nodeType && s[D] ? (P = _(t[D], s[D]), Object.keys(P).length && (n[D] = P)) : (F(t[D]) || t[D] !== s[D]) && (n[D] = t[D]);
}), n;
}
function U(t, s) {
return parseInt(t, s || 10);
}
function G(t) {
return typeof t == "string";
}
function V(t) {
return t = Object.prototype.toString.call(t), t === "[object Array]" || t === "[object Array Iterator]";
}
function F(t, s) {
return !!t && typeof t == "object" && (!s || !V(t));
}
function B(t) {
return F(t) && typeof t.nodeType == "number";
}
function j(t) {
var s = t && t.constructor;
return !(!F(t, !0) || B(t) || !s || !s.name || s.name === "Object");
}
function w(t) {
return typeof t == "number" && !isNaN(t) && 1 / 0 > t && -1 / 0 < t;
}
function x(t) {
return typeof t < "u" && t !== null;
}
function f(t, s, n) {
var P;
return G(s) ? x(n) ? t.setAttribute(s, n) : t && t.getAttribute && ((P = t.getAttribute(s)) || s !== "class" || (P = t.getAttribute(s + "Name"))) : b(s, function(D, I) {
x(D) ? t.setAttribute(I, D) : t.removeAttribute(I);
}), P;
}
function l(t, s) {
var n;
t || (t = {});
for (n in s)
t[n] = s[n];
return t;
}
function T() {
for (var t = arguments, s = t.length, n = 0; n < s; n++) {
var P = t[n];
if (typeof P < "u" && P !== null)
return P;
}
}
function O(t, s) {
y.isMS && !y.svg && s && typeof s.opacity < "u" && (s.filter = "alpha(opacity=" + 100 * s.opacity + ")"), l(t.style, s);
}
function R(t, s) {
return 1e14 < t ? t : parseFloat(t.toPrecision(s || 14));
}
function k(t, s, n) {
var P = y.getStyle || k;
if (s === "width")
return s = Math.min(t.offsetWidth, t.scrollWidth), n = t.getBoundingClientRect && t.getBoundingClientRect().width, n < s && n >= s - 1 && (s = Math.floor(n)), Math.max(0, s - (P(t, "padding-left", !0) || 0) - (P(t, "padding-right", !0) || 0));
if (s === "height")
return Math.max(0, Math.min(t.offsetHeight, t.scrollHeight) - (P(t, "padding-top", !0) || 0) - (P(t, "padding-bottom", !0) || 0));
if (u.getComputedStyle || N(27, !0), t = u.getComputedStyle(t, void 0)) {
var D = t.getPropertyValue(s);
T(n, s !== "opacity") && (D = U(D));
}
return D;
}
function b(t, s, n) {
for (var P in t)
Object.hasOwnProperty.call(t, P) && s.call(n || t[P], t[P], P, t);
}
function S(t, s, n) {
function P(E, X) {
var g = t.removeEventListener || y.removeEventListenerPolyfill;
g && g.call(t, E, X, !1);
}
function D(E) {
var X;
if (t.nodeName) {
if (s) {
var g = {};
g[s] = !0;
} else
g = E;
b(g, function(m, L) {
if (E[L])
for (X = E[L].length; X--; )
P(L, E[L][X].fn);
});
}
}
var I = typeof t == "function" && t.prototype || t;
if (Object.hasOwnProperty.call(I, "hcEvents")) {
var W = I.hcEvents;
s ? (I = W[s] || [], n ? (W[s] = I.filter(function(E) {
return n !== E.fn;
}), P(s, n)) : (D(W), W[s] = [])) : (D(W), delete I.hcEvents);
}
}
function v(t, s, n, P) {
if (n = n || {}, c.createEvent && (t.dispatchEvent || t.fireEvent && t !== y)) {
var D = c.createEvent("Events");
D.initEvent(s, !0, !0), n = l(D, n), t.dispatchEvent ? t.dispatchEvent(n) : t.fireEvent(s, n);
} else if (t.hcEvents) {
n.target || l(n, { preventDefault: function() {
n.defaultPrevented = !0;
}, target: t, type: s }), D = [];
for (var I = t, W = !1; I.hcEvents; )
Object.hasOwnProperty.call(I, "hcEvents") && I.hcEvents[s] && (D.length && (W = !0), D.unshift.apply(D, I.hcEvents[s])), I = Object.getPrototypeOf(I);
W && D.sort(function(E, X) {
return E.order - X.order;
}), D.forEach(function(E) {
E.fn.call(t, n) === !1 && n.preventDefault();
});
}
P && !n.defaultPrevented && P.call(t, n);
}
var h = y.charts, c = y.doc, u = y.win;
(N || (N = {})).messages = [], Math.easeInOutSine = function(t) {
return -0.5 * (Math.cos(Math.PI * t) - 1);
};
var i = Array.prototype.find ? function(t, s) {
return t.find(s);
} : function(t, s) {
var n, P = t.length;
for (n = 0; n < P; n++)
if (s(t[n], n))
return t[n];
};
b({ map: "map", each: "forEach", grep: "filter", reduce: "reduce", some: "some" }, function(t, s) {
y[s] = function(n) {
var P;
return N(32, !1, void 0, (P = {}, P["Highcharts." + s] = "use Array." + t, P)), Array.prototype[t].apply(n, [].slice.call(arguments, 1));
};
});
var p, a = function() {
var t = Math.random().toString(36).substring(2, 9) + "-", s = 0;
return function() {
return "highcharts-" + (p ? "" : t) + s++;
};
}();
return u.jQuery && (u.jQuery.fn.highcharts = function() {
var t = [].slice.call(arguments);
if (this[0])
return t[0] ? (new y[G(t[0]) ? t.shift() : "Chart"](this[0], t[0], t[1]), this) : h[f(this[0], "data-highcharts-chart")];
}), i = { addEvent: function(t, s, n, P) {
P === void 0 && (P = {});
var D = typeof t == "function" && t.prototype || t;
Object.hasOwnProperty.call(D, "hcEvents") || (D.hcEvents = {}), D = D.hcEvents, y.Point && t instanceof y.Point && t.series && t.series.chart && (t.series.chart.runTrackerClick = !0);
var I = t.addEventListener || y.addEventListenerPolyfill;
return I && I.call(t, s, n, y.supportsPassiveEvents ? { passive: P.passive === void 0 ? s.indexOf("touch") !== -1 : P.passive, capture: !1 } : !1), D[s] || (D[s] = []), D[s].push({ fn: n, order: typeof P.order == "number" ? P.order : 1 / 0 }), D[s].sort(function(W, E) {
return W.order - E.order;
}), function() {
S(t, s, n);
};
}, arrayMax: function(t) {
for (var s = t.length, n = t[0]; s--; )
t[s] > n && (n = t[s]);
return n;
}, arrayMin: function(t) {
for (var s = t.length, n = t[0]; s--; )
t[s] < n && (n = t[s]);
return n;
}, attr: f, clamp: function(t, s, n) {
return t > s ? t < n ? t : n : s;
}, cleanRecursively: _, clearTimeout: function(t) {
x(t) && clearTimeout(t);
}, correctFloat: R, createElement: function(t, s, n, P, D) {
return t = c.createElement(t), s && l(t, s), D && O(t, { padding: "0", border: "none", margin: "0" }), n && O(t, n), P && P.appendChild(t), t;
}, css: O, defined: x, destroyObjectProperties: function(t, s) {
b(t, function(n, P) {
n && n !== s && n.destroy && n.destroy(), delete t[P];
});
}, discardElement: function(t) {
t && t.parentElement && t.parentElement.removeChild(t);
}, erase: function(t, s) {
for (var n = t.length; n--; )
if (t[n] === s) {
t.splice(n, 1);
break;
}
}, error: N, extend: l, extendClass: function(t, s) {
var n = function() {
};
return n.prototype = new t(), l(n.prototype, s), n;
}, find: i, fireEvent: v, getMagnitude: function(t) {
return Math.pow(10, Math.floor(Math.log(t) / Math.LN10));
}, getNestedProperty: function(t, s) {
for (t = t.split("."); t.length && x(s); ) {
var n = t.shift();
if (typeof n > "u" || n === "__proto__" || (s = s[n], !x(s) || typeof s == "function" || typeof s.nodeType == "number" || s === u))
return;
}
return s;
}, getStyle: k, inArray: function(t, s, n) {
return N(32, !1, void 0, { "Highcharts.inArray": "use Array.indexOf" }), s.indexOf(t, n);
}, isArray: V, isClass: j, isDOMElement: B, isFunction: function(t) {
return typeof t == "function";
}, isNumber: w, isObject: F, isString: G, keys: function(t) {
return N(32, !1, void 0, { "Highcharts.keys": "use Object.keys" }), Object.keys(t);
}, merge: function() {
var t, s = arguments, n = {}, P = function(I, W) {
return typeof I != "object" && (I = {}), b(W, function(E, X) {
X !== "__proto__" && X !== "constructor" && (!F(E, !0) || j(E) || B(E) ? I[X] = W[X] : I[X] = P(I[X] || {}, E));
}), I;
};
s[0] === !0 && (n = s[1], s = Array.prototype.slice.call(s, 2));
var D = s.length;
for (t = 0; t < D; t++)
n = P(n, s[t]);
return n;
}, normalizeTickInterval: function(t, s, n, P, D) {
var I = t;
n = T(n, 1);
var W = t / n;
for (s || (s = D ? [1, 1.2, 1.5, 2, 2.5, 3, 4, 5, 6, 8, 10] : [1, 2, 2.5, 5, 10], P === !1 && (n === 1 ? s = s.filter(function(E) {
return E % 1 === 0;
}) : 0.1 >= n && (s = [1 / n]))), P = 0; P < s.length && (I = s[P], !(D && I * n >= t || !D && W <= (s[P] + (s[P + 1] || s[P])) / 2)); P++)
;
return I = R(I * n, -Math.round(Math.log(1e-3) / Math.LN10));
}, objectEach: b, offset: function(t) {
var s = c.documentElement;
return t = t.parentElement || t.parentNode ? t.getBoundingClientRect() : { top: 0, left: 0, width: 0, height: 0 }, { top: t.top + (u.pageYOffset || s.scrollTop) - (s.clientTop || 0), left: t.left + (u.pageXOffset || s.scrollLeft) - (s.clientLeft || 0), width: t.width, height: t.height };
}, pad: function(t, s, n) {
return Array((s || 2) + 1 - String(t).replace("-", "").length).join(n || "0") + t;
}, pick: T, pInt: U, relativeLength: function(t, s, n) {
return /%$/.test(t) ? s * parseFloat(t) / 100 + (n || 0) : parseFloat(t);
}, removeEvent: S, splat: function(t) {
return V(t) ? t : [t];
}, stableSort: function(t, s) {
var n = t.length, P, D;
for (D = 0; D < n; D++)
t[D].safeI = D;
for (t.sort(function(I, W) {
return P = s(I, W), P === 0 ? I.safeI - W.safeI : P;
}), D = 0; D < n; D++)
delete t[D].safeI;
}, syncTimeout: function(t, s, n) {
return 0 < s ? setTimeout(t, s, n) : (t.call(0, n), -1);
}, timeUnits: {
millisecond: 1,
second: 1e3,
minute: 6e4,
hour: 36e5,
day: 864e5,
week: 6048e5,
month: 24192e5,
year: 314496e5
}, uniqueKey: a, useSerialIds: function(t) {
return p = T(t, p);
}, wrap: function(t, s, n) {
var P = t[s];
t[s] = function() {
var D = Array.prototype.slice.call(arguments), I = arguments, W = this;
return W.proceed = function() {
P.apply(W, arguments.length ? arguments : I);
}, D.unshift(P), D = n.apply(this, D), W.proceed = null, D;
};
} }, i;
}), C(o, "Core/Chart/ChartDefaults.js", [], function() {
return { panning: { enabled: !1, type: "x" }, styledMode: !1, borderRadius: 0, colorCount: 10, defaultSeriesType: "line", ignoreHiddenSeries: !0, spacing: [
10,
10,
15,
10
], resetZoomButton: { theme: { zIndex: 6 }, position: { align: "right", x: -10, y: 10 } }, zoomBySingleTouch: !1, width: null, height: null, borderColor: "#335cad", backgroundColor: "#ffffff", plotBorderColor: "#cccccc" };
}), C(o, "Core/Color/Color.js", [o["Core/Globals.js"], o["Core/Utilities.js"]], function(y, N) {
var _ = N.isNumber, U = N.merge, G = N.pInt;
return N = function() {
function V(F) {
this.rgba = [NaN, NaN, NaN, NaN], this.input = F;
var B = y.Color;
if (B && B !== V)
return new B(F);
if (!(this instanceof V))
return new V(F);
this.init(F);
}
return V.parse = function(F) {
return F ? new V(F) : V.None;
}, V.prototype.init = function(F) {
var B;
if (typeof F == "object" && typeof F.stops < "u")
this.stops = F.stops.map(function(f) {
return new V(f[1]);
});
else if (typeof F == "string") {
if (this.input = F = V.names[F.toLowerCase()] || F, F.charAt(0) === "#") {
var j = F.length, w = parseInt(F.substr(1), 16);
j === 7 ? B = [(w & 16711680) >> 16, (w & 65280) >> 8, w & 255, 1] : j === 4 && (B = [(w & 3840) >> 4 | (w & 3840) >> 8, (w & 240) >> 4 | w & 240, (w & 15) << 4 | w & 15, 1]);
}
if (!B)
for (w = V.parsers.length; w-- && !B; ) {
var x = V.parsers[w];
(j = x.regex.exec(F)) && (B = x.parse(j));
}
}
B && (this.rgba = B);
}, V.prototype.get = function(F) {
var B = this.input, j = this.rgba;
if (typeof B == "object" && typeof this.stops < "u") {
var w = U(B);
return w.stops = [].slice.call(w.stops), this.stops.forEach(function(x, f) {
w.stops[f] = [w.stops[f][0], x.get(F)];
}), w;
}
return j && _(j[0]) ? F === "rgb" || !F && j[3] === 1 ? "rgb(" + j[0] + "," + j[1] + "," + j[2] + ")" : F === "a" ? "" + j[3] : "rgba(" + j.join(",") + ")" : B;
}, V.prototype.brighten = function(F) {
var B = this.rgba;
if (this.stops)
this.stops.forEach(function(w) {
w.brighten(F);
});
else if (_(F) && F !== 0)
for (var j = 0; 3 > j; j++)
B[j] += G(255 * F), 0 > B[j] && (B[j] = 0), 255 < B[j] && (B[j] = 255);
return this;
}, V.prototype.setOpacity = function(F) {
return this.rgba[3] = F, this;
}, V.prototype.tweenTo = function(F, B) {
var j = this.rgba, w = F.rgba;
return !_(j[0]) || !_(w[0]) ? F.input || "none" : (F = w[3] !== 1 || j[3] !== 1, (F ? "rgba(" : "rgb(") + Math.round(w[0] + (j[0] - w[0]) * (1 - B)) + "," + Math.round(w[1] + (j[1] - w[1]) * (1 - B)) + "," + Math.round(w[2] + (j[2] - w[2]) * (1 - B)) + (F ? "," + (w[3] + (j[3] - w[3]) * (1 - B)) : "") + ")");
}, V.names = { white: "#ffffff", black: "#000000" }, V.parsers = [{
regex: /rgba\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]?(?:\.[0-9]+)?)\s*\)/,
parse: function(F) {
return [G(F[1]), G(F[2]), G(F[3]), parseFloat(F[4], 10)];
}
}, { regex: /rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/, parse: function(F) {
return [G(F[1]), G(F[2]), G(F[3]), 1];
} }], V.None = new V(""), V;
}(), N;
}), C(o, "Core/Color/Palettes.js", [], function() {
return { colors: "#7cb5ec #434348 #90ed7d #f7a35c #8085e9 #f15c80 #e4d354 #2b908f #f45b5b #91e8e1".split(" ") };
}), C(o, "Core/Time.js", [o["Core/Globals.js"], o["Core/Utilities.js"]], function(y, N) {
var _ = y.win, U = N.defined, G = N.error, V = N.extend, F = N.isObject, B = N.merge, j = N.objectEach, w = N.pad, x = N.pick, f = N.splat, l = N.timeUnits, T = y.isSafari && _.Intl && _.Intl.DateTimeFormat.prototype.formatRange, O = y.isSafari && _.Intl && !_.Intl.DateTimeFormat.prototype.formatRange;
return N = function() {
function R(k) {
this.options = {}, this.variableTimezone = this.useUTC = !1, this.Date = _.Date, this.getTimezoneOffset = this.timezoneOffsetFunction(), this.update(k);
}
return R.prototype.get = function(k, b) {
if (this.variableTimezone || this.timezoneOffset) {
var S = b.getTime(), v = S - this.getTimezoneOffset(b);
return b.setTime(v), k = b["getUTC" + k](), b.setTime(S), k;
}
return this.useUTC ? b["getUTC" + k]() : b["get" + k]();
}, R.prototype.set = function(k, b, S) {
if (this.variableTimezone || this.timezoneOffset) {
if (k === "Milliseconds" || k === "Seconds" || k === "Minutes" && this.getTimezoneOffset(b) % 36e5 === 0)
return b["setUTC" + k](S);
var v = this.getTimezoneOffset(b);
return v = b.getTime() - v, b.setTime(v), b["setUTC" + k](S), k = this.getTimezoneOffset(b), v = b.getTime() + k, b.setTime(v);
}
return this.useUTC || T && k === "FullYear" ? b["setUTC" + k](S) : b["set" + k](S);
}, R.prototype.update = function(k) {
var b = x(k && k.useUTC, !0);
this.options = k = B(!0, this.options || {}, k), this.Date = k.Date || _.Date || Date, this.timezoneOffset = (this.useUTC = b) && k.timezoneOffset, this.getTimezoneOffset = this.timezoneOffsetFunction(), this.variableTimezone = b && !(!k.getTimezoneOffset && !k.timezone);
}, R.prototype.makeTime = function(k, b, S, v, h, c) {
if (this.useUTC) {
var u = this.Date.UTC.apply(0, arguments), i = this.getTimezoneOffset(u);
u += i;
var p = this.getTimezoneOffset(u);
i !== p ? u += p - i : i - 36e5 !== this.getTimezoneOffset(u - 36e5) || O || (u -= 36e5);
} else
u = new this.Date(k, b, x(S, 1), x(v, 0), x(h, 0), x(c, 0)).getTime();
return u;
}, R.prototype.timezoneOffsetFunction = function() {
var k = this, b = this.options, S = b.getTimezoneOffset, v = b.moment || _.moment;
if (!this.useUTC)
return function(h) {
return 6e4 * new Date(h.toString()).getTimezoneOffset();
};
if (b.timezone) {
if (v)
return function(h) {
return 6e4 * -v.tz(h, b.timezone).utcOffset();
};
G(25);
}
return this.useUTC && S ? function(h) {
return 6e4 * S(h.valueOf());
} : function() {
return 6e4 * (k.timezoneOffset || 0);
};
}, R.prototype.dateFormat = function(k, b, S) {
if (!U(b) || isNaN(b))
return y.defaultOptions.lang && y.defaultOptions.lang.invalidDate || "";
k = x(k, "%Y-%m-%d %H:%M:%S");
var v = this, h = new this.Date(b), c = this.get("Hours", h), u = this.get("Day", h), i = this.get("Date", h), p = this.get("Month", h), a = this.get("FullYear", h), t = y.defaultOptions.lang, s = t && t.weekdays, n = t && t.shortWeekdays;
return h = V({ a: n ? n[u] : s[u].substr(0, 3), A: s[u], d: w(i), e: w(i, 2, " "), w: u, b: t.shortMonths[p], B: t.months[p], m: w(p + 1), o: p + 1, y: a.toString().substr(2, 2), Y: a, H: w(c), k: c, I: w(c % 12 || 12), l: c % 12 || 12, M: w(this.get("Minutes", h)), p: 12 > c ? "AM" : "PM", P: 12 > c ? "am" : "pm", S: w(h.getSeconds()), L: w(Math.floor(b % 1e3), 3) }, y.dateFormats), j(h, function(P, D) {
for (; k.indexOf("%" + D) !== -1; )
k = k.replace("%" + D, typeof P == "function" ? P.call(v, b) : P);
}), S ? k.substr(0, 1).toUpperCase() + k.substr(1) : k;
}, R.prototype.resolveDTLFormat = function(k) {
return F(k, !0) ? k : (k = f(k), { main: k[0], from: k[1], to: k[2] });
}, R.prototype.getTimeTicks = function(k, b, S, v) {
var h = this, c = [], u = {}, i = new h.Date(b), p = k.unitRange, a = k.count || 1, t;
if (v = x(v, 1), U(b)) {
if (h.set(
"Milliseconds",
i,
p >= l.second ? 0 : a * Math.floor(h.get("Milliseconds", i) / a)
), p >= l.second && h.set("Seconds", i, p >= l.minute ? 0 : a * Math.floor(h.get("Seconds", i) / a)), p >= l.minute && h.set("Minutes", i, p >= l.hour ? 0 : a * Math.floor(h.get("Minutes", i) / a)), p >= l.hour && h.set("Hours", i, p >= l.day ? 0 : a * Math.floor(h.get("Hours", i) / a)), p >= l.day && h.set("Date", i, p >= l.month ? 1 : Math.max(1, a * Math.floor(h.get("Date", i) / a))), p >= l.month) {
h.set("Month", i, p >= l.year ? 0 : a * Math.floor(h.get("Month", i) / a));
var s = h.get("FullYear", i);
}
p >= l.year && h.set(
"FullYear",
i,
s - s % a
), p === l.week && (s = h.get("Day", i), h.set("Date", i, h.get("Date", i) - s + v + (s < v ? -7 : 0))), s = h.get("FullYear", i), v = h.get("Month", i);
var n = h.get("Date", i), P = h.get("Hours", i);
for (b = i.getTime(), !h.variableTimezone && h.useUTC || !U(S) || (t = S - b > 4 * l.month || h.getTimezoneOffset(b) !== h.getTimezoneOffset(S)), b = i.getTime(), i = 1; b < S; )
c.push(b), b = p === l.year ? h.makeTime(s + i * a, 0) : p === l.month ? h.makeTime(s, v + i * a) : !t || p !== l.day && p !== l.week ? t && p === l.hour && 1 < a ? h.makeTime(s, v, n, P + i * a) : b + p * a : h.makeTime(s, v, n + i * a * (p === l.day ? 1 : 7)), i++;
c.push(b), p <= l.hour && 1e4 > c.length && c.forEach(function(D) {
D % 18e5 === 0 && h.dateFormat("%H%M%S%L", D) === "000000000" && (u[D] = "day");
});
}
return c.info = V(k, { higherRanks: u, totalRange: p * a }), c;
}, R.prototype.getDateFormat = function(k, b, S, v) {
var h = this.dateFormat("%m-%d %H:%M:%S.%L", b), c = { millisecond: 15, second: 12, minute: 9, hour: 6, day: 3 }, u = "millisecond";
for (i in l) {
if (k === l.week && +this.dateFormat("%w", b) === S && h.substr(6) === "00:00:00.000") {
var i = "week";
break;
}
if (l[i] > k) {
i = u;
break;
}
if (c[i] && h.substr(c[i]) !== "01-01 00:00:00.000".substr(c[i]))
break;
i !== "week" && (u = i);
}
if (i)
var p = this.resolveDTLFormat(v[i]).main;
return p;
}, R;
}(), N;
}), C(o, "Core/DefaultOptions.js", [o["Core/Chart/ChartDefaults.js"], o["Core/Color/Color.js"], o["Core/Globals.js"], o["Core/Color/Palettes.js"], o["Core/Time.js"], o["Core/Utilities.js"]], function(y, N, _, U, G, V) {
N = N.parse;
var F = V.merge, B = {
colors: U.colors,
symbols: ["circle", "diamond", "square", "triangle", "triangle-down"],
lang: {
loading: "Loading...",
months: "January February March April May June July August September October November December".split(" "),
shortMonths: "Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec".split(" "),
weekdays: "Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" "),
decimalPoint: ".",
numericSymbols: "kMGTPE".split(""),
resetZoom: "Reset zoom",
resetZoomTitle: "Reset zoom level 1:1",
thousandsSep: " "
},
global: {},
time: { Date: void 0, getTimezoneOffset: void 0, timezone: void 0, timezoneOffset: 0, useUTC: !0 },
chart: y,
title: { text: "Chart title", align: "center", margin: 15, widthAdjust: -44 },
subtitle: { text: "", align: "center", widthAdjust: -44 },
caption: { margin: 15, text: "", align: "left", verticalAlign: "bottom" },
plotOptions: {},
labels: { style: { position: "absolute", color: "#333333" } },
legend: {
enabled: !0,
align: "center",
alignColumns: !0,
className: "highcharts-no-tooltip",
layout: "horizontal",
labelFormatter: function() {
return this.name;
},
borderColor: "#999999",
borderRadius: 0,
navigation: { activeColor: "#003399", inactiveColor: "#cccccc" },
itemStyle: { color: "#333333", cursor: "pointer", fontSize: "12px", fontWeight: "bold", textOverflow: "ellipsis" },
itemHoverStyle: { color: "#000000" },
itemHiddenStyle: { color: "#cccccc" },
shadow: !1,
itemCheckboxStyle: { position: "absolute", width: "13px", height: "13px" },
squareSymbol: !0,
symbolPadding: 5,
verticalAlign: "bottom",
x: 0,
y: 0,
title: { style: { fontWeight: "bold" } }
},
loading: { labelStyle: { fontWeight: "bold", position: "relative", top: "45%" }, style: { position: "absolute", backgroundColor: "#ffffff", opacity: 0.5, textAlign: "center" } },
tooltip: {
enabled: !0,
animation: _.svg,
borderRadius: 3,
dateTimeLabelFormats: {
millisecond: "%A, %b %e, %H:%M:%S.%L",
second: "%A, %b %e, %H:%M:%S",
minute: "%A, %b %e, %H:%M",
hour: "%A, %b %e, %H:%M",
day: "%A, %b %e, %Y",
week: "Week from %A, %b %e, %Y",
month: "%B %Y",
year: "%Y"
},
footerFormat: "",
headerShape: "callout",
hideDelay: 500,
padding: 8,
shape: "callout",
shared: !1,
snap: _.isTouchDevice ? 25 : 10,
headerFormat: '{point.key}
',
pointFormat: '● {series.name}: {point.y}
',
backgroundColor: N("#f7f7f7").setOpacity(0.85).get(),
borderWidth: 1,
shadow: !0,
stickOnContact: !1,
style: { color: "#333333", cursor: "default", fontSize: "12px", whiteSpace: "nowrap" },
useHTML: !1
},
credits: { enabled: !0, href: "https://www.highcharts.com?credits", position: { align: "right", x: -10, verticalAlign: "bottom", y: -5 }, style: { cursor: "pointer", color: "#999999", fontSize: "9px" }, text: "Highcharts.com" }
};
B.chart.styledMode = !1;
var j = new G(F(B.global, B.time));
return y = { defaultOptions: B, defaultTime: j, getOptions: function() {
return B;
}, setOptions: function(w) {
return F(!0, B, w), (w.time || w.global) && (_.time ? _.time.update(F(
B.global,
B.time,
w.global,
w.time
)) : _.time = j), B;
} }, y;
}), C(o, "Core/Animation/Fx.js", [o["Core/Color/Color.js"], o["Core/Globals.js"], o["Core/Utilities.js"]], function(y, N, _) {
var U = y.parse, G = N.win, V = _.isNumber, F = _.objectEach;
return function() {
function B(j, w, x) {
this.pos = NaN, this.options = w, this.elem = j, this.prop = x;
}
return B.prototype.dSetter = function() {
var j = this.paths, w = j && j[0];
j = j && j[1];
var x = this.now || 0, f = [];
if (x !== 1 && w && j)
if (w.length === j.length && 1 > x)
for (var l = 0; l < j.length; l++) {
for (var T = w[l], O = j[l], R = [], k = 0; k < O.length; k++) {
var b = T[k], S = O[k];
V(b) && V(S) && (O[0] !== "A" || k !== 4 && k !== 5) ? R[k] = b + x * (S - b) : R[k] = S;
}
f.push(R);
}
else
f = j;
else
f = this.toD || [];
this.elem.attr("d", f, void 0, !0);
}, B.prototype.update = function() {
var j = this.elem, w = this.prop, x = this.now, f = this.options.step;
this[w + "Setter"] ? this[w + "Setter"]() : j.attr ? j.element && j.attr(w, x, null, !0) : j.style[w] = x + this.unit, f && f.call(j, x, this);
}, B.prototype.run = function(j, w, x) {
var f = this, l = f.options, T = function(k) {
return T.stopped ? !1 : f.step(k);
}, O = G.requestAnimationFrame || function(k) {
setTimeout(
k,
13
);
}, R = function() {
for (var k = 0; k < B.timers.length; k++)
B.timers[k]() || B.timers.splice(k--, 1);
B.timers.length && O(R);
};
j !== w || this.elem["forceAnimate:" + this.prop] ? (this.startTime = +/* @__PURE__ */ new Date(), this.start = j, this.end = w, this.unit = x, this.now = this.start, this.pos = 0, T.elem = this.elem, T.prop = this.prop, T() && B.timers.push(T) === 1 && O(R)) : (delete l.curAnim[this.prop], l.complete && Object.keys(l.curAnim).length === 0 && l.complete.call(this.elem));
}, B.prototype.step = function(j) {
var w = +/* @__PURE__ */ new Date(), x = this.options, f = this.elem, l = x.complete, T = x.duration, O = x.curAnim;
if (f.attr && !f.element)
j = !1;
else if (j || w >= T + this.startTime) {
this.now = this.end, this.pos = 1, this.update();
var R = O[this.prop] = !0;
F(O, function(k) {
k !== !0 && (R = !1);
}), R && l && l.call(f), j = !1;
} else
this.pos = x.easing((w - this.startTime) / T), this.now = this.start + (this.end - this.start) * this.pos, this.update(), j = !0;
return j;
}, B.prototype.initPath = function(j, w, x) {
function f(h, c) {
for (; h.length < v; ) {
var u = h[0], i = c[v - h.length];
i && u[0] === "M" && (h[0] = i[0] === "C" ? ["C", u[1], u[2], u[1], u[2], u[1], u[2]] : [
"L",
u[1],
u[2]
]), h.unshift(u), R && (u = h.pop(), h.push(h[h.length - 1], u));
}
}
function l(h, c) {
for (; h.length < v; )
if (c = h[Math.floor(h.length / k) - 1].slice(), c[0] === "C" && (c[1] = c[5], c[2] = c[6]), R) {
var u = h[Math.floor(h.length / k)].slice();
h.splice(h.length / 2, 0, c, u);
} else
h.push(c);
}
var T = j.startX, O = j.endX;
x = x.slice();
var R = j.isArea, k = R ? 2 : 1;
if (w = w && w.slice(), !w)
return [x, x];
if (T && O && O.length) {
for (j = 0; j < T.length; j++)
if (T[j] === O[0]) {
var b = j;
break;
} else if (T[0] === O[O.length - T.length + j]) {
b = j;
var S = !0;
break;
} else if (T[T.length - 1] === O[O.length - T.length + j]) {
b = T.length - j;
break;
}
typeof b > "u" && (w = []);
}
if (w.length && V(b)) {
var v = x.length + b * k;
S ? (f(w, x), l(x, w)) : (f(x, w), l(w, x));
}
return [w, x];
}, B.prototype.fillSetter = function() {
B.prototype.strokeSetter.apply(this, arguments);
}, B.prototype.strokeSetter = function() {
this.elem.attr(this.prop, U(this.start).tweenTo(U(this.end), this.pos), void 0, !0);
}, B.timers = [], B;
}();
}), C(o, "Core/Animation/AnimationUtilities.js", [o["Core/Animation/Fx.js"], o["Core/Utilities.js"]], function(y, N) {
function _(l) {
return j(l) ? w({ duration: 500, defer: 0 }, l) : { duration: l ? 500 : 0, defer: 0 };
}
function U(l, T) {
for (var O = y.timers.length; O--; )
y.timers[O].elem !== l || T && T !== y.timers[O].prop || (y.timers[O].stopped = !0);
}
var G = N.defined, V = N.getStyle, F = N.isArray, B = N.isNumber, j = N.isObject, w = N.merge, x = N.objectEach, f = N.pick;
return { animate: function(l, T, O) {
var R, k = "", b, S;
if (!j(O)) {
var v = arguments;
O = { duration: v[2], easing: v[3], complete: v[4] };
}
B(O.duration) || (O.duration = 400), O.easing = typeof O.easing == "function" ? O.easing : Math[O.easing] || Math.easeInOutSine, O.curAnim = w(T), x(T, function(h, c) {
U(l, c), S = new y(l, O, c), b = void 0, c === "d" && F(T.d) ? (S.paths = S.initPath(l, l.pathArray, T.d), S.toD = T.d, R = 0, b = 1) : l.attr ? R = l.attr(c) : (R = parseFloat(V(l, c)) || 0, c !== "opacity" && (k = "px")), b || (b = h), typeof b == "string" && b.match("px") && (b = b.replace(/px/g, "")), S.run(R, b, k);
});
}, animObject: _, getDeferredAnimation: function(l, T, O) {
var R = _(T), k = 0, b = 0;
return (O ? [O] : l.series).forEach(function(S) {
S = _(S.options.animation), k = T && G(T.defer) ? R.defer : Math.max(k, S.duration + S.defer), b = Math.min(R.duration, S.duration);
}), l.renderer.forExport && (k = 0), { defer: Math.max(0, k - b), duration: Math.min(k, b) };
}, setAnimation: function(l, T) {
T.renderer.globalAnimation = f(l, T.options.chart.animation, !0);
}, stop: U };
}), C(o, "Core/Renderer/HTML/AST.js", [o["Core/Globals.js"], o["Core/Utilities.js"]], function(y, N) {
var _ = y.SVG_NS, U = N.attr, G = N.createElement, V = N.error, F = N.isFunction, B = N.isString, j = N.objectEach, w = N.splat, x = (N = y.win.trustedTypes) && F(N.createPolicy) && N.createPolicy("highcharts", { createHTML: function(T) {
return T;
} }), f = x ? x.createHTML("") : "";
try {
var l = !!new DOMParser().parseFromString(f, "text/html");
} catch {
l = !1;
}
return F = function() {
function T(O) {
this.nodes = typeof O == "string" ? this.parseMarkup(O) : O;
}
return T.filterUserAttributes = function(O) {
return j(O, function(R, k) {
var b = !0;
T.allowedAttributes.indexOf(k) === -1 && (b = !1), ["background", "dynsrc", "href", "lowsrc", "src"].indexOf(k) !== -1 && (b = B(R) && T.allowedReferences.some(function(S) {
return R.indexOf(S) === 0;
})), b || (V("Highcharts warning: Invalid attribute '" + k + "' in config"), delete O[k]);
}), O;
}, T.setElementHTML = function(O, R) {
O.innerHTML = T.emptyHTML, R && new T(R).addToDOM(O);
}, T.prototype.addToDOM = function(O) {
function R(k, b) {
var S;
return w(k).forEach(function(v) {
var h = v.tagName, c = v.textContent ? y.doc.createTextNode(v.textContent) : void 0;
if (h)
if (h === "#text")
var u = c;
else if (T.allowedTags.indexOf(h) !== -1) {
h = y.doc.createElementNS(h === "svg" ? _ : b.namespaceURI || _, h);
var i = v.attributes || {};
j(v, function(p, a) {
a !== "tagName" && a !== "attributes" && a !== "children" && a !== "textContent" && (i[a] = p);
}), U(h, T.filterUserAttributes(i)), c && h.appendChild(c), R(v.children || [], h), u = h;
} else
V("Highcharts warning: Invalid tagName " + h + " in config");
u && b.appendChild(u), S = u;
}), S;
}
return R(this.nodes, O);
}, T.prototype.parseMarkup = function(O) {
var R = [];
if (O = O.trim(), l)
O = new DOMParser().parseFromString(x ? x.createHTML(O) : O, "text/html");
else {
var k = G("div");
k.innerHTML = O, O = { body: k };
}
var b = function(S, v) {
var h = S.nodeName.toLowerCase(), c = { tagName: h };
if (h === "#text" && (c.textContent = S.textContent || ""), h = S.attributes) {
var u = {};
[].forEach.call(h, function(p) {
u[p.name] = p.value;
}), c.attributes = u;
}
if (S.childNodes.length) {
var i = [];
[].forEach.call(S.childNodes, function(p) {
b(p, i);
}), i.length && (c.children = i);
}
v.push(c);
};
return [].forEach.call(O.body.childNodes, function(S) {
return b(S, R);
}), R;
}, T.allowedAttributes = "aria-controls aria-describedby aria-expanded aria-haspopup aria-hidden aria-label aria-labelledby aria-live aria-pressed aria-readonly aria-roledescription aria-selected class clip-path color colspan cx cy d dx dy disabled fill height href id in markerHeight markerWidth offset opacity orient padding paddingLeft paddingRight patternUnits r refX refY role scope slope src startOffset stdDeviation stroke stroke-linecap stroke-width style tableValues result rowspan summary target tabindex text-align textAnchor textLength title type valign width x x1 x2 y y1 y2 zIndex".split(" "), T.allowedReferences = "https:// http:// mailto: / ../ ./ #".split(" "), T.allowedTags = "a abbr b br button caption circle clipPath code dd defs div dl dt em feComponentTransfer feFuncA feFuncB feFuncG feFuncR feGaussianBlur feOffset feMerge feMergeNode filter h1 h2 h3 h4 h5 h6 hr i img li linearGradient marker ol p path pattern pre rect small span stop strong style sub sup svg table text thead tbody tspan td th tr u ul #text".split(" "), T.emptyHTML = f, T;
}(), F;
}), C(
o,
"Core/FormatUtilities.js",
[o["Core/DefaultOptions.js"], o["Core/Utilities.js"]],
function(y, N) {
function _(w, x, f, l) {
w = +w || 0, x = +x;
var T = U.lang, O = (w.toString().split(".")[1] || "").split("e")[0].length, R = w.toString().split("e"), k = x;
if (x === -1)
x = Math.min(O, 20);
else if (!F(x))
x = 2;
else if (x && R[1] && 0 > R[1]) {
var b = x + +R[1];
0 <= b ? (R[0] = (+R[0]).toExponential(b).split("e")[0], x = b) : (R[0] = R[0].split(".")[0] || 0, w = 20 > x ? (R[0] * Math.pow(10, R[1])).toFixed(x) : 0, R[1] = 0);
}
b = (Math.abs(R[1] ? R[0] : w) + Math.pow(10, -Math.max(x, O) - 1)).toFixed(x), O = String(j(b));
var S = 3 < O.length ? O.length % 3 : 0;
return f = B(f, T.decimalPoint), l = B(l, T.thousandsSep), w = (0 > w ? "-" : "") + (S ? O.substr(0, S) + l : ""), w = 0 > +R[1] && !k ? "0" : w + O.substr(S).replace(/(\d{3})(?=\d)/g, "$1" + l), x && (w += f + b.slice(-x)), R[1] && +w != 0 && (w += "e" + R[1]), w;
}
var U = y.defaultOptions, G = y.defaultTime, V = N.getNestedProperty, F = N.isNumber, B = N.pick, j = N.pInt;
return { dateFormat: function(w, x, f) {
return G.dateFormat(w, x, f);
}, format: function(w, x, f) {
var l = "{", T = !1, O = /f$/, R = /\.([0-9])/, k = U.lang, b = f && f.time || G;
f = f && f.numberFormatter || _;
for (var S = []; w; ) {
var v = w.indexOf(l);
if (v === -1)
break;
var h = w.slice(0, v);
if (T) {
if (h = h.split(":"), l = V(h.shift() || "", x), h.length && typeof l == "number")
if (h = h.join(":"), O.test(h)) {
var c = parseInt((h.match(R) || ["", "-1"])[1], 10);
l !== null && (l = f(l, c, k.decimalPoint, -1 < h.indexOf(",") ? k.thousandsSep : ""));
} else
l = b.dateFormat(h, l);
S.push(l);
} else
S.push(h);
w = w.slice(v + 1), l = (T = !T) ? "}" : "{";
}
return S.push(w), S.join("");
}, numberFormat: _ };
}
), C(o, "Core/Renderer/RendererUtilities.js", [o["Core/Utilities.js"]], function(y) {
var N = y.clamp, _ = y.pick, U = y.stableSort, G;
return function(V) {
function F(B, j, w) {
var x = B, f = x.reducedLen || j, l = function(S, v) {
return (v.rank || 0) - (S.rank || 0);
}, T = function(S, v) {
return S.target - v.target;
}, O, R = !0, k = [], b = 0;
for (O = B.length; O--; )
b += B[O].size;
if (b > f) {
for (U(B, l), b = O = 0; b <= f; )
b += B[O].size, O++;
k = B.splice(O - 1, B.length);
}
for (U(B, T), B = B.map(function(S) {
return { size: S.size, targets: [S.target], align: _(S.align, 0.5) };
}); R; ) {
for (O = B.length; O--; )
f = B[O], l = (Math.min.apply(0, f.targets) + Math.max.apply(0, f.targets)) / 2, f.pos = N(
l - f.size * f.align,
0,
j - f.size
);
for (O = B.length, R = !1; O--; )
0 < O && B[O - 1].pos + B[O - 1].size > B[O].pos && (B[O - 1].size += B[O].size, B[O - 1].targets = B[O - 1].targets.concat(B[O].targets), B[O - 1].align = 0.5, B[O - 1].pos + B[O - 1].size > j && (B[O - 1].pos = j - B[O - 1].size), B.splice(O, 1), R = !0);
}
return x.push.apply(x, k), O = 0, B.some(function(S) {
var v = 0;
return (S.targets || []).some(function() {
return x[O].pos = S.pos + v, typeof w < "u" && Math.abs(x[O].pos - x[O].target) > w ? (x.slice(0, O + 1).forEach(function(h) {
return delete h.pos;
}), x.reducedLen = (x.reducedLen || j) - 0.1 * j, x.reducedLen > 0.1 * j && F(x, j, w), !0) : (v += x[O].size, O++, !1);
});
}), U(x, T), x;
}
V.distribute = F;
}(G || (G = {})), G;
}), C(o, "Core/Renderer/SVG/SVGElement.js", [o["Core/Animation/AnimationUtilities.js"], o["Core/Renderer/HTML/AST.js"], o["Core/Color/Color.js"], o["Core/Globals.js"], o["Core/Utilities.js"]], function(y, N, _, U, G) {
var V = y.animate, F = y.animObject, B = y.stop, j = U.deg2rad, w = U.doc, x = U.noop, f = U.svg, l = U.SVG_NS, T = U.win, O = G.addEvent, R = G.attr, k = G.createElement, b = G.css, S = G.defined, v = G.erase, h = G.extend, c = G.fireEvent, u = G.isArray, i = G.isFunction, p = G.isNumber, a = G.isString, t = G.merge, s = G.objectEach, n = G.pick, P = G.pInt, D = G.syncTimeout, I = G.uniqueKey;
return y = function() {
function W() {
this.element = void 0, this.onEvents = {}, this.opacity = 1, this.renderer = void 0, this.SVG_NS = l, this.symbolCustomAttribs = "x y width height r start end innerR anchorX anchorY rounded".split(" ");
}
return W.prototype._defaultGetter = function(E) {
return E = n(this[E + "Value"], this[E], this.element ? this.element.getAttribute(E) : null, 0), /^[\-0-9\.]+$/.test(E) && (E = parseFloat(E)), E;
}, W.prototype._defaultSetter = function(E, X, g) {
g.setAttribute(X, E);
}, W.prototype.add = function(E) {
var X = this.renderer, g = this.element;
if (E && (this.parentGroup = E), this.parentInverted = E && E.inverted, typeof this.textStr < "u" && this.element.nodeName === "text" && X.buildText(this), this.added = !0, !E || E.handleZ || this.zIndex)
var m = this.zIndexSetter();
return m || (E ? E.element : X.box).appendChild(g), this.onAdd && this.onAdd(), this;
}, W.prototype.addClass = function(E, X) {
var g = X ? "" : this.attr("class") || "";
return E = (E || "").split(/ /g).reduce(function(m, L) {
return g.indexOf(L) === -1 && m.push(L), m;
}, g ? [g] : []).join(" "), E !== g && this.attr("class", E), this;
}, W.prototype.afterSetters = function() {
this.doTransform && (this.updateTransform(), this.doTransform = !1);
}, W.prototype.align = function(E, X, g) {
var m = {}, L = this.renderer, z = L.alignedObjects, $, Q, A;
E ? (this.alignOptions = E, this.alignByTranslate = X, (!g || a(g)) && (this.alignTo = $ = g || "renderer", v(z, this), z.push(this), g = void 0)) : (E = this.alignOptions, X = this.alignByTranslate, $ = this.alignTo), g = n(g, L[$], $ === "scrollablePlotBox" ? L.plotBox : void 0, L), $ = E.align;
var H = E.verticalAlign;
return L = (g.x || 0) + (E.x || 0), z = (g.y || 0) + (E.y || 0), $ === "right" ? Q = 1 : $ === "center" && (Q = 2), Q && (L += (g.width - (E.width || 0)) / Q), m[X ? "translateX" : "x"] = Math.round(L), H === "bottom" ? A = 1 : H === "middle" && (A = 2), A && (z += (g.height - (E.height || 0)) / A), m[X ? "translateY" : "y"] = Math.round(z), this[this.placed ? "animate" : "attr"](m), this.placed = !0, this.alignAttr = m, this;
}, W.prototype.alignSetter = function(E) {
var X = { left: "start", center: "middle", right: "end" };
X[E] && (this.alignValue = E, this.element.setAttribute(
"text-anchor",
X[E]
));
}, W.prototype.animate = function(E, X, g) {
var m = this, L = F(n(X, this.renderer.globalAnimation, !0));
return X = L.defer, n(w.hidden, w.msHidden, w.webkitHidden, !1) && (L.duration = 0), L.duration !== 0 ? (g && (L.complete = g), D(function() {
m.element && V(m, E, L);
}, X)) : (this.attr(E, void 0, g), s(E, function(z, $) {
L.step && L.step.call(this, z, { prop: $, pos: 1, elem: this });
}, this)), this;
}, W.prototype.applyTextOutline = function(E) {
var X = this.element;
E.indexOf("contrast") !== -1 && (E = E.replace(/contrast/g, this.renderer.getContrast(X.style.fill)));
var g = E.split(" ");
if (E = g[g.length - 1], (g = g[0]) && g !== "none" && U.svg) {
this.fakeTS = !0, this.ySetter = this.xSetter, g = g.replace(/(^[\d\.]+)(.*?)$/g, function(z, $, Q) {
return 2 * Number($) + Q;
}), this.removeTextOutline();
var m = w.createElementNS(l, "tspan");
R(m, { class: "highcharts-text-outline", fill: E, stroke: E, "stroke-width": g, "stroke-linejoin": "round" }), [].forEach.call(X.childNodes, function(z) {
var $ = z.cloneNode(!0);
$.removeAttribute && ["fill", "stroke", "stroke-width", "stroke"].forEach(function(Q) {
return $.removeAttribute(Q);
}), m.appendChild($);
});
var L = w.createElementNS(l, "tspan");
L.textContent = "", ["x", "y"].forEach(function(z) {
var $ = X.getAttribute(z);
$ && L.setAttribute(z, $);
}), m.appendChild(L), X.insertBefore(m, X.firstChild);
}
}, W.prototype.attr = function(E, X, g, m) {
var L = this.element, z = this.symbolCustomAttribs, $, Q = this, A, H;
if (typeof E == "string" && typeof X < "u") {
var Y = E;
E = {}, E[Y] = X;
}
return typeof E == "string" ? Q = (this[E + "Getter"] || this._defaultGetter).call(this, E, L) : (s(E, function(Z, q) {
A = !1, m || B(this, q), this.symbolName && z.indexOf(q) !== -1 && ($ || (this.symbolAttr(E), $ = !0), A = !0), !this.rotation || q !== "x" && q !== "y" || (this.doTransform = !0), A || (H = this[q + "Setter"] || this._defaultSetter, H.call(this, Z, q, L), !this.styledMode && this.shadows && /^(width|height|visibility|x|y|d|transform|cx|cy|r)$/.test(q) && this.updateShadows(q, Z, H));
}, this), this.afterSetters()), g && g.call(this), Q;
}, W.prototype.clip = function(E) {
return this.attr("clip-path", E ? "url(" + this.renderer.url + "#" + E.id + ")" : "none");
}, W.prototype.crisp = function(E, X) {
X = X || E.strokeWidth || 0;
var g = Math.round(X) % 2 / 2;
return E.x = Math.floor(E.x || this.x || 0) + g, E.y = Math.floor(E.y || this.y || 0) + g, E.width = Math.floor((E.width || this.width || 0) - 2 * g), E.height = Math.floor((E.height || this.height || 0) - 2 * g), S(E.strokeWidth) && (E.strokeWidth = X), E;
}, W.prototype.complexColor = function(E, X, g) {
var m = this.renderer, L, z, $, Q, A, H, Y, Z, q, it, et = [], nt;
c(this.renderer, "complexColor", { args: arguments }, function() {
if (E.radialGradient ? z = "radialGradient" : E.linearGradient && (z = "linearGradient"), z) {
if ($ = E[z], A = m.gradients, H = E.stops, q = g.radialReference, u($) && (E[z] = $ = { x1: $[0], y1: $[1], x2: $[2], y2: $[3], gradientUnits: "userSpaceOnUse" }), z === "radialGradient" && q && !S($.gradientUnits) && (Q = $, $ = t($, m.getRadialAttr(q, Q), { gradientUnits: "userSpaceOnUse" })), s($, function(ct, gt) {
gt !== "id" && et.push(gt, ct);
}), s(H, function(ct) {
et.push(ct);
}), et = et.join(","), A[et])
it = A[et].attr("id");
else {
$.id = it = I();
var rt = A[et] = m.createElement(z).attr($).add(m.defs);
rt.radAttr = Q, rt.stops = [], H.forEach(function(ct) {
ct[1].indexOf("rgba") === 0 ? (L = _.parse(ct[1]), Y = L.get("rgb"), Z = L.get("a")) : (Y = ct[1], Z = 1), ct = m.createElement("stop").attr({
offset: ct[0],
"stop-color": Y,
"stop-opacity": Z
}).add(rt), rt.stops.push(ct);
});
}
nt = "url(" + m.url + "#" + it + ")", g.setAttribute(X, nt), g.gradient = et, E.toString = function() {
return nt;
};
}
});
}, W.prototype.css = function(E) {
var X = this.styles, g = {}, m = this.element, L = ["textOutline", "textOverflow", "width"], z = "", $ = !X;
if (E && E.color && (E.fill = E.color), X && s(E, function(H, Y) {
X && X[Y] !== H && (g[Y] = H, $ = !0);
}), $) {
if (X && (E = h(X, g)), E) {
if (E.width === null || E.width === "auto")
delete this.textWidth;
else if (m.nodeName.toLowerCase() === "text" && E.width)
var Q = this.textWidth = P(E.width);
}
if (this.styles = E, Q && !f && this.renderer.forExport && delete E.width, m.namespaceURI === this.SVG_NS) {
var A = function(H, Y) {
return "-" + Y.toLowerCase();
};
s(E, function(H, Y) {
L.indexOf(Y) === -1 && (z += Y.replace(/([A-Z])/g, A) + ":" + H + ";");
}), z && R(m, "style", z);
} else
b(m, E);
this.added && (this.element.nodeName === "text" && this.renderer.buildText(this), E && E.textOutline && this.applyTextOutline(E.textOutline));
}
return this;
}, W.prototype.dashstyleSetter = function(E) {
var X = this["stroke-width"];
if (X === "inherit" && (X = 1), E = E && E.toLowerCase()) {
var g = E.replace("shortdashdotdot", "3,1,1,1,1,1,").replace("shortdashdot", "3,1,1,1").replace("shortdot", "1,1,").replace("shortdash", "3,1,").replace("longdash", "8,3,").replace(/dot/g, "1,3,").replace("dash", "4,3,").replace(/,$/, "").split(",");
for (E = g.length; E--; )
g[E] = "" + P(g[E]) * n(X, NaN);
E = g.join(",").replace(/NaN/g, "none"), this.element.setAttribute("stroke-dasharray", E);
}
}, W.prototype.destroy = function() {
var E = this, X = E.element || {}, g = E.renderer, m = X.ownerSVGElement, L = g.isSVG && X.nodeName === "SPAN" && E.parentGroup || void 0;
if (X.onclick = X.onmouseout = X.onmouseover = X.onmousemove = X.point = null, B(E), E.clipPath && m) {
var z = E.clipPath;
[].forEach.call(m.querySelectorAll("[clip-path],[CLIP-PATH]"), function($) {
-1 < $.getAttribute("clip-path").indexOf(z.element.id) && $.removeAttribute("clip-path");
}), E.clipPath = z.destroy();
}
if (E.stops) {
for (m = 0; m < E.stops.length; m++)
E.stops[m].destroy();
E.stops.length = 0, E.stops = void 0;
}
for (E.safeRemoveChild(X), g.styledMode || E.destroyShadows(); L && L.div && L.div.childNodes.length === 0; )
X = L.parentGroup, E.safeRemoveChild(L.div), delete L.div, L = X;
E.alignTo && v(g.alignedObjects, E), s(E, function($, Q) {
E[Q] && E[Q].parentGroup === E && E[Q].destroy && E[Q].destroy(), delete E[Q];
});
}, W.prototype.destroyShadows = function() {
(this.shadows || []).forEach(function(E) {
this.safeRemoveChild(E);
}, this), this.shadows = void 0;
}, W.prototype.destroyTextPath = function(E, X) {
var g = E.getElementsByTagName("text")[0];
if (g) {
if (g.removeAttribute("dx"), g.removeAttribute("dy"), X.element.setAttribute("id", ""), this.textPathWrapper && g.getElementsByTagName("textPath").length) {
for (E = this.textPathWrapper.element.childNodes; E.length; )
g.appendChild(E[0]);
g.removeChild(this.textPathWrapper.element);
}
} else
(E.getAttribute("dx") || E.getAttribute("dy")) && (E.removeAttribute("dx"), E.removeAttribute("dy"));
this.textPathWrapper && (this.textPathWrapper = this.textPathWrapper.destroy());
}, W.prototype.dSetter = function(E, X, g) {
u(E) && (typeof E[0] == "string" && (E = this.renderer.pathToSegments(E)), this.pathArray = E, E = E.reduce(function(m, L, z) {
return L && L.join ? (z ? m + " " : "") + L.join(" ") : (L || "").toString();
}, "")), /(NaN| {2}|^$)/.test(E) && (E = "M 0 0"), this[X] !== E && (g.setAttribute(X, E), this[X] = E);
}, W.prototype.fadeOut = function(E) {
var X = this;
X.animate({ opacity: 0 }, { duration: n(E, 150), complete: function() {
X.attr({ y: -9999 }).hide();
} });
}, W.prototype.fillSetter = function(E, X, g) {
typeof E == "string" ? g.setAttribute(X, E) : E && this.complexColor(E, X, g);
}, W.prototype.getBBox = function(E, X) {
var g = this.renderer, m = this.element, L = this.styles, z = this.textStr, $ = g.cache, Q = g.cacheKeys, A = m.namespaceURI === this.SVG_NS;
X = n(X, this.rotation, 0);
var H = g.styledMode ? m && W.prototype.getStyle.call(m, "font-size") : L && L.fontSize, Y;
if (S(z)) {
var Z = z.toString();
Z.indexOf("<") === -1 && (Z = Z.replace(/[0-9]/g, "0")), Z += ["", X, H, this.textWidth, L && L.textOverflow, L && L.fontWeight].join();
}
if (Z && !E && (Y = $[Z]), !Y) {
if (A || g.forExport) {
try {
var q = this.fakeTS && function(it) {
var et = m.querySelector(".highcharts-text-outline");
et && b(et, { display: it });
};
i(q) && q("none"), Y = m.getBBox ? h({}, m.getBBox()) : { width: m.offsetWidth, height: m.offsetHeight }, i(q) && q("");
} catch {
}
(!Y || 0 > Y.width) && (Y = {
width: 0,
height: 0
});
} else
Y = this.htmlGetBBox();
if (g.isSVG && (E = Y.width, g = Y.height, A && (Y.height = g = { "11px,17": 14, "13px,20": 16 }[(H || "") + "," + Math.round(g)] || g), X && (A = X * j, Y.width = Math.abs(g * Math.sin(A)) + Math.abs(E * Math.cos(A)), Y.height = Math.abs(g * Math.cos(A)) + Math.abs(E * Math.sin(A)))), Z && (z === "" || 0 < Y.height)) {
for (; 250 < Q.length; )
delete $[Q.shift()];
$[Z] || Q.push(Z), $[Z] = Y;
}
}
return Y;
}, W.prototype.getStyle = function(E) {
return T.getComputedStyle(this.element || this, "").getPropertyValue(E);
}, W.prototype.hasClass = function(E) {
return ("" + this.attr("class")).split(" ").indexOf(E) !== -1;
}, W.prototype.hide = function(E) {
return E ? this.attr({ y: -9999 }) : this.attr({ visibility: "hidden" }), this;
}, W.prototype.htmlGetBBox = function() {
return { height: 0, width: 0, x: 0, y: 0 };
}, W.prototype.init = function(E, X) {
this.element = X === "span" ? k(X) : w.createElementNS(this.SVG_NS, X), this.renderer = E, c(this, "afterInit");
}, W.prototype.invert = function(E) {
return this.inverted = E, this.updateTransform(), this;
}, W.prototype.on = function(E, X) {
var g = this.onEvents;
return g[E] && g[E](), g[E] = O(
this.element,
E,
X
), this;
}, W.prototype.opacitySetter = function(E, X, g) {
this.opacity = E = Number(Number(E).toFixed(3)), g.setAttribute(X, E);
}, W.prototype.removeClass = function(E) {
return this.attr("class", ("" + this.attr("class")).replace(a(E) ? new RegExp("(^| )" + E + "( |$)") : E, " ").replace(/ +/g, " ").trim());
}, W.prototype.removeTextOutline = function() {
var E = this.element.querySelector("tspan.highcharts-text-outline");
E && this.safeRemoveChild(E);
}, W.prototype.safeRemoveChild = function(E) {
var X = E.parentNode;
X && X.removeChild(E);
}, W.prototype.setRadialReference = function(E) {
var X = this.element.gradient && this.renderer.gradients[this.element.gradient];
return this.element.radialReference = E, X && X.radAttr && X.animate(this.renderer.getRadialAttr(E, X.radAttr)), this;
}, W.prototype.setTextPath = function(E, X) {
var g = this.element, m = this.text ? this.text.element : g, L = { textAnchor: "text-anchor" }, z = !1, $ = this.textPathWrapper, Q = !$;
X = t(!0, { enabled: !0, attributes: { dy: -5, startOffset: "50%", textAnchor: "middle" } }, X);
var A = N.filterUserAttributes(X.attributes);
if (E && X && X.enabled) {
$ && $.element.parentNode === null ? (Q = !0, $ = $.destroy()) : $ && this.removeTextOutline.call($.parentGroup), this.options && this.options.padding && (A.dx = -this.options.padding), $ || (this.textPathWrapper = $ = this.renderer.createElement("textPath"), z = !0);
var H = $.element;
if ((X = E.element.getAttribute("id")) || E.element.setAttribute("id", X = I()), Q)
for (m.setAttribute("y", 0), p(A.dx) && m.setAttribute("x", -A.dx), E = [].slice.call(m.childNodes), Q = 0; Q < E.length; Q++) {
var Y = E[Q];
Y.nodeType !== T.Node.TEXT_NODE && Y.nodeName !== "tspan" || H.appendChild(Y);
}
z && $ && $.add({ element: m }), H.setAttributeNS("http://www.w3.org/1999/xlink", "href", this.renderer.url + "#" + X), S(A.dy) && (H.parentNode.setAttribute("dy", A.dy), delete A.dy), S(A.dx) && (H.parentNode.setAttribute("dx", A.dx), delete A.dx), s(A, function(Z, q) {
H.setAttribute(L[q] || q, Z);
}), g.removeAttribute("transform"), this.removeTextOutline.call($), this.text && !this.renderer.styledMode && this.attr({ fill: "none", "stroke-width": 0 }), this.applyTextOutline = this.updateTransform = x;
} else
$ && (delete this.updateTransform, delete this.applyTextOutline, this.destroyTextPath(g, E), this.updateTransform(), this.options && this.options.rotation && this.applyTextOutline(this.options.style.textOutline));
return this;
}, W.prototype.shadow = function(E, X, g) {
var m = [], L = this.element, z = this.oldShadowOptions, $ = { color: "#000000", offsetX: this.parentInverted ? -1 : 1, offsetY: this.parentInverted ? -1 : 1, opacity: 0.15, width: 3 }, Q = !1, A;
if (E === !0 ? A = $ : typeof E == "object" && (A = h($, E)), A && (A && z && s(A, function(it, et) {
it !== z[et] && (Q = !0);
}), Q && this.destroyShadows(), this.oldShadowOptions = A), !A)
this.destroyShadows();
else if (!this.shadows) {
var H = A.opacity / A.width, Y = this.parentInverted ? "translate(" + A.offsetY + ", " + A.offsetX + ")" : "translate(" + A.offsetX + ", " + A.offsetY + ")";
for ($ = 1; $ <= A.width; $++) {
var Z = L.cloneNode(!1), q = 2 * A.width + 1 - 2 * $;
R(Z, { stroke: E.color || "#000000", "stroke-opacity": H * $, "stroke-width": q, transform: Y, fill: "none" }), Z.setAttribute("class", (Z.getAttribute("class") || "") + " highcharts-shadow"), g && (R(Z, "height", Math.max(R(Z, "height") - q, 0)), Z.cutHeight = q), X ? X.element.appendChild(Z) : L.parentNode && L.parentNode.insertBefore(Z, L), m.push(Z);
}
this.shadows = m;
}
return this;
}, W.prototype.show = function(E) {
return this.attr({ visibility: E ? "inherit" : "visible" });
}, W.prototype.strokeSetter = function(E, X, g) {
this[X] = E, this.stroke && this["stroke-width"] ? (W.prototype.fillSetter.call(this, this.stroke, "stroke", g), g.setAttribute("stroke-width", this["stroke-width"]), this.hasStroke = !0) : X === "stroke-width" && E === 0 && this.hasStroke ? (g.removeAttribute("stroke"), this.hasStroke = !1) : this.renderer.styledMode && this["stroke-width"] && (g.setAttribute("stroke-width", this["stroke-width"]), this.hasStroke = !0);
}, W.prototype.strokeWidth = function() {
if (!this.renderer.styledMode)
return this["stroke-width"] || 0;
var E = this.getStyle("stroke-width"), X = 0;
if (E.indexOf("px") === E.length - 2)
X = P(E);
else if (E !== "") {
var g = w.createElementNS(l, "rect");
R(g, { width: E, "stroke-width": 0 }), this.element.parentNode.appendChild(g), X = g.getBBox().width, g.parentNode.removeChild(g);
}
return X;
}, W.prototype.symbolAttr = function(E) {
var X = this;
"x y r start end width height innerR anchorX anchorY clockwise".split(" ").forEach(function(g) {
X[g] = n(E[g], X[g]);
}), X.attr({ d: X.renderer.symbols[X.symbolName](X.x, X.y, X.width, X.height, X) });
}, W.prototype.textSetter = function(E) {
E !== this.textStr && (delete this.textPxLength, this.textStr = E, this.added && this.renderer.buildText(this));
}, W.prototype.titleSetter = function(E) {
var X = this.element, g = X.getElementsByTagName("title")[0] || w.createElementNS(this.SVG_NS, "title");
X.insertBefore ? X.insertBefore(g, X.firstChild) : X.appendChild(g), g.textContent = String(n(E, "")).replace(/<[^>]*>/g, "").replace(/</g, "<").replace(
/>/g,
">"
);
}, W.prototype.toFront = function() {
var E = this.element;
return E.parentNode.appendChild(E), this;
}, W.prototype.translate = function(E, X) {
return this.attr({ translateX: E, translateY: X });
}, W.prototype.updateShadows = function(E, X, g) {
var m = this.shadows;
if (m)
for (var L = m.length; L--; )
g.call(m[L], E === "height" ? Math.max(X - (m[L].cutHeight || 0), 0) : E === "d" ? this.d : X, E, m[L]);
}, W.prototype.updateTransform = function() {
var E = this.scaleX, X = this.scaleY, g = this.inverted, m = this.rotation, L = this.matrix, z = this.element, $ = this.translateX || 0, Q = this.translateY || 0;
g && ($ += this.width, Q += this.height), $ = ["translate(" + $ + "," + Q + ")"], S(L) && $.push("matrix(" + L.join(",") + ")"), g ? $.push("rotate(90) scale(-1,1)") : m && $.push("rotate(" + m + " " + n(this.rotationOriginX, z.getAttribute("x"), 0) + " " + n(this.rotationOriginY, z.getAttribute("y") || 0) + ")"), (S(E) || S(X)) && $.push("scale(" + n(E, 1) + " " + n(X, 1) + ")"), $.length && z.setAttribute("transform", $.join(" "));
}, W.prototype.visibilitySetter = function(E, X, g) {
E === "inherit" ? g.removeAttribute(X) : this[X] !== E && g.setAttribute(
X,
E
), this[X] = E;
}, W.prototype.xGetter = function(E) {
return this.element.nodeName === "circle" && (E === "x" ? E = "cx" : E === "y" && (E = "cy")), this._defaultGetter(E);
}, W.prototype.zIndexSetter = function(E, X) {
var g = this.renderer, m = this.parentGroup, L = (m || g).element || g.box, z = this.element;
g = L === g.box;
var $ = !1, Q = this.added, A;
if (S(E) ? (z.setAttribute("data-z-index", E), E = +E, this[X] === E && (Q = !1)) : S(this[X]) && z.removeAttribute("data-z-index"), this[X] = E, Q) {
for ((E = this.zIndex) && m && (m.handleZ = !0), X = L.childNodes, A = X.length - 1; 0 <= A && !$; A--) {
m = X[A], Q = m.getAttribute("data-z-index");
var H = !S(Q);
m !== z && (0 > E && H && !g && !A ? (L.insertBefore(z, X[A]), $ = !0) : (P(Q) <= E || H && (!S(E) || 0 <= E)) && (L.insertBefore(z, X[A + 1] || null), $ = !0));
}
$ || (L.insertBefore(z, X[g ? 3 : 0] || null), $ = !0);
}
return $;
}, W;
}(), y.prototype["stroke-widthSetter"] = y.prototype.strokeSetter, y.prototype.yGetter = y.prototype.xGetter, y.prototype.matrixSetter = y.prototype.rotationOriginXSetter = y.prototype.rotationOriginYSetter = y.prototype.rotationSetter = y.prototype.scaleXSetter = y.prototype.scaleYSetter = y.prototype.translateXSetter = y.prototype.translateYSetter = y.prototype.verticalAlignSetter = function(W, E) {
this[E] = W, this.doTransform = !0;
}, y;
}), C(o, "Core/Renderer/RendererRegistry.js", [o["Core/Globals.js"]], function(y) {
var N;
return function(_) {
_.rendererTypes = {};
var U;
_.getRendererType = function(G) {
return G === void 0 && (G = U), _.rendererTypes[G] || _.rendererTypes[U];
}, _.registerRendererType = function(G, V, F) {
_.rendererTypes[G] = V, (!U || F) && (U = G, y.Renderer = V);
};
}(N || (N = {})), N;
}), C(
o,
"Core/Renderer/SVG/SVGLabel.js",
[o["Core/Renderer/SVG/SVGElement.js"], o["Core/Utilities.js"]],
function(y, N) {
var _ = this && this.__extends || function() {
var w = function(x, f) {
return w = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(l, T) {
l.__proto__ = T;
} || function(l, T) {
for (var O in T)
T.hasOwnProperty(O) && (l[O] = T[O]);
}, w(x, f);
};
return function(x, f) {
function l() {
this.constructor = x;
}
w(x, f), x.prototype = f === null ? Object.create(f) : (l.prototype = f.prototype, new l());
};
}(), U = N.defined, G = N.extend, V = N.isNumber, F = N.merge, B = N.pick, j = N.removeEvent;
return function(w) {
function x(f, l, T, O, R, k, b, S, v, h) {
var c = w.call(this) || this;
c.paddingLeftSetter = c.paddingSetter, c.paddingRightSetter = c.paddingSetter, c.init(f, "g"), c.textStr = l, c.x = T, c.y = O, c.anchorX = k, c.anchorY = b, c.baseline = v, c.className = h, c.addClass(h === "button" ? "highcharts-no-tooltip" : "highcharts-label"), h && c.addClass("highcharts-" + h), c.text = f.text(void 0, 0, 0, S).attr({ zIndex: 1 });
var u;
return typeof R == "string" && ((u = /^url\((.*?)\)$/.test(R)) || c.renderer.symbols[R]) && (c.symbolKey = R), c.bBox = x.emptyBBox, c.padding = 3, c.baselineOffset = 0, c.needsBox = f.styledMode || u, c.deferredAttr = {}, c.alignFactor = 0, c;
}
return _(x, w), x.prototype.alignSetter = function(f) {
f = { left: 0, center: 0.5, right: 1 }[f], f !== this.alignFactor && (this.alignFactor = f, this.bBox && V(this.xSetting) && this.attr({ x: this.xSetting }));
}, x.prototype.anchorXSetter = function(f, l) {
this.anchorX = f, this.boxAttr(l, Math.round(f) - this.getCrispAdjust() - this.xSetting);
}, x.prototype.anchorYSetter = function(f, l) {
this.anchorY = f, this.boxAttr(l, f - this.ySetting);
}, x.prototype.boxAttr = function(f, l) {
this.box ? this.box.attr(f, l) : this.deferredAttr[f] = l;
}, x.prototype.css = function(f) {
if (f) {
var l = {};
f = F(f), x.textProps.forEach(function(O) {
typeof f[O] < "u" && (l[O] = f[O], delete f[O]);
}), this.text.css(l);
var T = "width" in l;
"fontSize" in l || "fontWeight" in l ? this.updateTextPadding() : T && this.updateBoxSize();
}
return y.prototype.css.call(this, f);
}, x.prototype.destroy = function() {
j(this.element, "mouseenter"), j(this.element, "mouseleave"), this.text && this.text.destroy(), this.box && (this.box = this.box.destroy()), y.prototype.destroy.call(this);
}, x.prototype.fillSetter = function(f, l) {
f && (this.needsBox = !0), this.fill = f, this.boxAttr(l, f);
}, x.prototype.getBBox = function() {
this.textStr && this.bBox.width === 0 && this.bBox.height === 0 && this.updateBoxSize();
var f = this.padding, l = B(this.paddingLeft, f);
return { width: this.width, height: this.height, x: this.bBox.x - l, y: this.bBox.y - f };
}, x.prototype.getCrispAdjust = function() {
return this.renderer.styledMode && this.box ? this.box.strokeWidth() % 2 / 2 : (this["stroke-width"] ? parseInt(
this["stroke-width"],
10
) : 0) % 2 / 2;
}, x.prototype.heightSetter = function(f) {
this.heightSetting = f;
}, x.prototype.onAdd = function() {
var f = this.textStr;
this.text.add(this), this.attr({ text: U(f) ? f : "", x: this.x, y: this.y }), this.box && U(this.anchorX) && this.attr({ anchorX: this.anchorX, anchorY: this.anchorY });
}, x.prototype.paddingSetter = function(f, l) {
V(f) ? f !== this[l] && (this[l] = f, this.updateTextPadding()) : this[l] = void 0;
}, x.prototype.rSetter = function(f, l) {
this.boxAttr(l, f);
}, x.prototype.shadow = function(f) {
return f && !this.renderer.styledMode && (this.updateBoxSize(), this.box && this.box.shadow(f)), this;
}, x.prototype.strokeSetter = function(f, l) {
this.stroke = f, this.boxAttr(l, f);
}, x.prototype["stroke-widthSetter"] = function(f, l) {
f && (this.needsBox = !0), this["stroke-width"] = f, this.boxAttr(l, f);
}, x.prototype["text-alignSetter"] = function(f) {
this.textAlign = f;
}, x.prototype.textSetter = function(f) {
typeof f < "u" && this.text.attr({ text: f }), this.updateTextPadding();
}, x.prototype.updateBoxSize = function() {
var f = this.text.element.style, l = {}, T = this.padding, O = this.bBox = V(this.widthSetting) && V(this.heightSetting) && !this.textAlign || !U(this.text.textStr) ? x.emptyBBox : this.text.getBBox();
this.width = this.getPaddedWidth(), this.height = (this.heightSetting || O.height || 0) + 2 * T, f = this.renderer.fontMetrics(f && f.fontSize, this.text), this.baselineOffset = T + Math.min((this.text.firstLineMetrics || f).b, O.height || 1 / 0), this.heightSetting && (this.baselineOffset += (this.heightSetting - f.h) / 2), this.needsBox && (this.box || (T = this.box = this.symbolKey ? this.renderer.symbol(this.symbolKey) : this.renderer.rect(), T.addClass((this.className === "button" ? "" : "highcharts-label-box") + (this.className ? " highcharts-" + this.className + "-box" : "")), T.add(this)), T = this.getCrispAdjust(), l.x = T, l.y = (this.baseline ? -this.baselineOffset : 0) + T, l.width = Math.round(this.width), l.height = Math.round(this.height), this.box.attr(G(l, this.deferredAttr)), this.deferredAttr = {});
}, x.prototype.updateTextPadding = function() {
var f = this.text;
this.updateBoxSize();
var l = this.baseline ? 0 : this.baselineOffset, T = B(this.paddingLeft, this.padding);
U(this.widthSetting) && this.bBox && (this.textAlign === "center" || this.textAlign === "right") && (T += { center: 0.5, right: 1 }[this.textAlign] * (this.widthSetting - this.bBox.width)), (T !== f.x || l !== f.y) && (f.attr("x", T), f.hasBoxWidthChanged && (this.bBox = f.getBBox(!0)), typeof l < "u" && f.attr("y", l)), f.x = T, f.y = l;
}, x.prototype.widthSetter = function(f) {
this.widthSetting = V(f) ? f : void 0;
}, x.prototype.getPaddedWidth = function() {
var f = this.padding, l = B(this.paddingLeft, f);
return f = B(this.paddingRight, f), (this.widthSetting || this.bBox.width || 0) + l + f;
}, x.prototype.xSetter = function(f) {
this.x = f, this.alignFactor && (f -= this.alignFactor * this.getPaddedWidth(), this["forceAnimate:x"] = !0), this.xSetting = Math.round(f), this.attr("translateX", this.xSetting);
}, x.prototype.ySetter = function(f) {
this.ySetting = this.y = Math.round(f), this.attr("translateY", this.ySetting);
}, x.emptyBBox = { width: 0, height: 0, x: 0, y: 0 }, x.textProps = "color direction fontFamily fontSize fontStyle fontWeight lineHeight textAlign textDecoration textOutline textOverflow width".split(" "), x;
}(y);
}
), C(
o,
"Core/Renderer/SVG/Symbols.js",
[o["Core/Utilities.js"]],
function(y) {
function N(B, j, w, x, f) {
var l = [];
if (f) {
var T = f.start || 0, O = F(f.r, w);
w = F(f.r, x || w);
var R = (f.end || 0) - 1e-3;
x = f.innerR;
var k = F(f.open, 1e-3 > Math.abs((f.end || 0) - T - 2 * Math.PI)), b = Math.cos(T), S = Math.sin(T), v = Math.cos(R), h = Math.sin(R);
T = F(f.longArc, 1e-3 > R - T - Math.PI ? 0 : 1), l.push(["M", B + O * b, j + w * S], ["A", O, w, 0, T, F(f.clockwise, 1), B + O * v, j + w * h]), G(x) && l.push(k ? ["M", B + x * v, j + x * h] : ["L", B + x * v, j + x * h], ["A", x, x, 0, T, G(f.clockwise) ? 1 - f.clockwise : 0, B + x * b, j + x * S]), k || l.push(["Z"]);
}
return l;
}
function _(B, j, w, x, f) {
return f && f.r ? U(B, j, w, x, f) : [["M", B, j], ["L", B + w, j], ["L", B + w, j + x], ["L", B, j + x], ["Z"]];
}
function U(B, j, w, x, f) {
return f = f && f.r || 0, [["M", B + f, j], ["L", B + w - f, j], ["C", B + w, j, B + w, j, B + w, j + f], ["L", B + w, j + x - f], ["C", B + w, j + x, B + w, j + x, B + w - f, j + x], ["L", B + f, j + x], ["C", B, j + x, B, j + x, B, j + x - f], ["L", B, j + f], ["C", B, j, B, j, B + f, j]];
}
var G = y.defined, V = y.isNumber, F = y.pick;
return { arc: N, callout: function(B, j, w, x, f) {
var l = Math.min(f && f.r || 0, w, x), T = l + 6, O = f && f.anchorX;
f = f && f.anchorY || 0;
var R = U(B, j, w, x, { r: l });
return V(O) && (B + O >= w ? f > j + T && f < j + x - T ? R.splice(3, 1, ["L", B + w, f - 6], ["L", B + w + 6, f], ["L", B + w, f + 6], ["L", B + w, j + x - l]) : R.splice(3, 1, ["L", B + w, x / 2], ["L", O, f], ["L", B + w, x / 2], ["L", B + w, j + x - l]) : 0 >= B + O ? f > j + T && f < j + x - T ? R.splice(7, 1, ["L", B, f + 6], ["L", B - 6, f], ["L", B, f - 6], ["L", B, j + l]) : R.splice(7, 1, ["L", B, x / 2], ["L", O, f], ["L", B, x / 2], ["L", B, j + l]) : f && f > x && O > B + T && O < B + w - T ? R.splice(5, 1, ["L", O + 6, j + x], ["L", O, j + x + 6], ["L", O - 6, j + x], ["L", B + l, j + x]) : f && 0 > f && O > B + T && O < B + w - T && R.splice(1, 1, ["L", O - 6, j], ["L", O, j - 6], ["L", O + 6, j], ["L", w - l, j])), R;
}, circle: function(B, j, w, x) {
return N(B + w / 2, j + x / 2, w / 2, x / 2, { start: 0.5 * Math.PI, end: 2.5 * Math.PI, open: !1 });
}, diamond: function(B, j, w, x) {
return [["M", B + w / 2, j], ["L", B + w, j + x / 2], ["L", B + w / 2, j + x], ["L", B, j + x / 2], ["Z"]];
}, rect: _, roundedRect: U, square: _, triangle: function(B, j, w, x) {
return [["M", B + w / 2, j], ["L", B + w, j + x], ["L", B, j + x], ["Z"]];
}, "triangle-down": function(B, j, w, x) {
return [["M", B, j], ["L", B + w, j], ["L", B + w / 2, j + x], ["Z"]];
} };
}
), C(o, "Core/Renderer/SVG/TextBuilder.js", [o["Core/Renderer/HTML/AST.js"], o["Core/Globals.js"], o["Core/Utilities.js"]], function(y, N, _) {
var U = N.doc, G = N.SVG_NS, V = N.win, F = _.attr, B = _.isString, j = _.objectEach, w = _.pick;
return function() {
function x(f) {
var l = f.styles;
this.renderer = f.renderer, this.svgElement = f, this.width = f.textWidth, this.textLineHeight = l && l.lineHeight, this.textOutline = l && l.textOutline, this.ellipsis = !(!l || l.textOverflow !== "ellipsis"), this.noWrap = !(!l || l.whiteSpace !== "nowrap"), this.fontSize = l && l.fontSize;
}
return x.prototype.buildSVG = function() {
var f = this.svgElement, l = f.element, T = f.renderer, O = w(f.textStr, "").toString(), R = O.indexOf("<") !== -1, k = l.childNodes;
T = this.width && !f.added && T.box;
var b = //g, S = [O, this.ellipsis, this.noWrap, this.textLineHeight, this.textOutline, this.fontSize, this.width].join();
if (S !== f.textCache) {
for (f.textCache = S, delete f.actualWidth, S = k.length; S--; )
l.removeChild(k[S]);
R || this.ellipsis || this.width || O.indexOf(" ") !== -1 && (!this.noWrap || b.test(O)) ? O !== "" && (T && T.appendChild(l), O = new y(O), this.modifyTree(O.nodes), O.addToDOM(f.element), this.modifyDOM(), this.ellipsis && (l.textContent || "").indexOf("…") !== -1 && f.attr(
"title",
this.unescapeEntities(f.textStr || "", ["<", ">"])
), T && T.removeChild(l)) : l.appendChild(U.createTextNode(this.unescapeEntities(O))), B(this.textOutline) && f.applyTextOutline && f.applyTextOutline(this.textOutline);
}
}, x.prototype.modifyDOM = function() {
var f = this, l = this.svgElement, T = F(l.element, "x");
l.firstLineMetrics = void 0;
for (var O; (O = l.element.firstChild) && /^[\s\u200B]*$/.test(O.textContent || " "); )
l.element.removeChild(O);
[].forEach.call(l.element.querySelectorAll("tspan.highcharts-br"), function(S, v) {
S.nextSibling && S.previousSibling && (v === 0 && S.previousSibling.nodeType === 1 && (l.firstLineMetrics = l.renderer.fontMetrics(void 0, S.previousSibling)), F(S, { dy: f.getLineHeight(S.nextSibling), x: T }));
});
var R = this.width || 0;
if (R) {
var k = function(S, v) {
var h = S.textContent || "", c = h.replace(/([^\^])-/g, "$1- ").split(" "), u = !f.noWrap && (1 < c.length || 1 < l.element.childNodes.length), i = f.getLineHeight(v), p = 0, a = l.actualWidth;
if (f.ellipsis)
h && f.truncate(S, h, void 0, 0, Math.max(0, R - parseInt(f.fontSize || 12, 10)), function(t, s) {
return t.substring(
0,
s
) + "…";
});
else if (u) {
for (h = [], u = []; v.firstChild && v.firstChild !== S; )
u.push(v.firstChild), v.removeChild(v.firstChild);
for (; c.length; )
c.length && !f.noWrap && 0 < p && (h.push(S.textContent || ""), S.textContent = c.join(" ").replace(/- /g, "-")), f.truncate(S, void 0, c, p === 0 && a || 0, R, function(t, s) {
return c.slice(0, s).join(" ").replace(/- /g, "-");
}), a = l.actualWidth, p++;
u.forEach(function(t) {
v.insertBefore(t, S);
}), h.forEach(function(t) {
v.insertBefore(U.createTextNode(t), S), t = U.createElementNS(G, "tspan"), t.textContent = "", F(t, { dy: i, x: T }), v.insertBefore(t, S);
});
}
}, b = function(S) {
[].slice.call(S.childNodes).forEach(function(v) {
v.nodeType === V.Node.TEXT_NODE ? k(v, S) : (v.className.baseVal.indexOf("highcharts-br") !== -1 && (l.actualWidth = 0), b(v));
});
};
b(l.element);
}
}, x.prototype.getLineHeight = function(f) {
var l;
return f = f.nodeType === V.Node.TEXT_NODE ? f.parentElement : f, this.renderer.styledMode || (l = f && /(px|em)$/.test(f.style.fontSize) ? f.style.fontSize : this.fontSize || this.renderer.style.fontSize || 12), this.textLineHeight ? parseInt(
this.textLineHeight.toString(),
10
) : this.renderer.fontMetrics(l, f || this.svgElement.element).h;
}, x.prototype.modifyTree = function(f) {
var l = this, T = function(O, R) {
var k = O.attributes;
k = k === void 0 ? {} : k;
var b = O.children, S = O.tagName, v = l.renderer.styledMode;
S === "b" || S === "strong" ? v ? k.class = "highcharts-strong" : k.style = "font-weight:bold;" + (k.style || "") : (S === "i" || S === "em") && (v ? k.class = "highcharts-emphasized" : k.style = "font-style:italic;" + (k.style || "")), B(k.style) && (k.style = k.style.replace(/(;| |^)color([ :])/, "$1fill$2")), S === "br" ? (k.class = "highcharts-br", O.textContent = "", (R = f[R + 1]) && R.textContent && (R.textContent = R.textContent.replace(/^ +/gm, ""))) : S === "a" && b && b.some(function(h) {
return h.tagName === "#text";
}) && (O.children = [{ children: b, tagName: "tspan" }]), S !== "#text" && S !== "a" && (O.tagName = "tspan"), O.attributes = k, b && b.filter(function(h) {
return h.tagName !== "#text";
}).forEach(T);
};
f.forEach(T);
}, x.prototype.truncate = function(f, l, T, O, R, k) {
var b = this.svgElement, S = b.renderer, v = b.rotation, h = [], c = T ? 1 : 0, u = (l || T || "").length, i = u, p, a = function(s, n) {
n = n || s;
var P = f.parentNode;
if (P && typeof h[n] > "u")
if (P.getSubStringLength)
try {
h[n] = O + P.getSubStringLength(0, T ? n + 1 : n);
} catch {
}
else
S.getSpanWidth && (f.textContent = k(l || T, s), h[n] = O + S.getSpanWidth(b, f));
return h[n];
};
b.rotation = 0;
var t = a(f.textContent.length);
if (O + t > R) {
for (; c <= u; )
i = Math.ceil((c + u) / 2), T && (p = k(T, i)), t = a(i, p && p.length - 1), c === u ? c = u + 1 : t > R ? u = i - 1 : c = i;
u === 0 ? f.textContent = "" : l && u === l.length - 1 || (f.textContent = p || k(l || T, i));
}
T && T.splice(0, i), b.actualWidth = t, b.rotation = v;
}, x.prototype.unescapeEntities = function(f, l) {
return j(this.renderer.escapes, function(T, O) {
l && l.indexOf(T) !== -1 || (f = f.toString().replace(new RegExp(T, "g"), O));
}), f;
}, x;
}();
}), C(o, "Core/Renderer/SVG/SVGRenderer.js", [o["Core/Renderer/HTML/AST.js"], o["Core/Color/Color.js"], o["Core/Globals.js"], o["Core/Renderer/RendererRegistry.js"], o["Core/Renderer/SVG/SVGElement.js"], o["Core/Renderer/SVG/SVGLabel.js"], o["Core/Renderer/SVG/Symbols.js"], o["Core/Renderer/SVG/TextBuilder.js"], o["Core/Utilities.js"]], function(y, N, _, U, G, V, F, B, j) {
var w = _.charts, x = _.deg2rad, f = _.doc, l = _.isFirefox, T = _.isMS, O = _.isWebKit, R = _.noop, k = _.SVG_NS, b = _.symbolSizes, S = _.win, v = j.addEvent, h = j.attr, c = j.createElement, u = j.css, i = j.defined, p = j.destroyObjectProperties, a = j.extend, t = j.isArray, s = j.isNumber, n = j.isObject, P = j.isString, D = j.merge, I = j.pick, W = j.pInt, E = j.uniqueKey, X;
return _ = function() {
function g(m, L, z, $, Q, A, H) {
this.width = this.url = this.style = this.isSVG = this.imgCount = this.height = this.gradients = this.globalAnimation = this.defs = this.chartIndex = this.cacheKeys = this.cache = this.boxWrapper = this.box = this.alignedObjects = void 0, this.init(m, L, z, $, Q, A, H);
}
return g.prototype.init = function(m, L, z, $, Q, A, H) {
var Y = this.createElement("svg").attr({ version: "1.1", class: "highcharts-root" }), Z = Y.element;
H || Y.css(this.getStyle($)), m.appendChild(Z), h(m, "dir", "ltr"), m.innerHTML.indexOf("xmlns") === -1 && h(Z, "xmlns", this.SVG_NS), this.isSVG = !0, this.box = Z, this.boxWrapper = Y, this.alignedObjects = [], this.url = this.getReferenceURL(), this.createElement("desc").add().element.appendChild(f.createTextNode("Created with Highcharts 9.3.3")), this.defs = this.createElement("defs").add(), this.allowHTML = A, this.forExport = Q, this.styledMode = H, this.gradients = {}, this.cache = {}, this.cacheKeys = [], this.imgCount = 0, this.setSize(L, z, !1);
var q;
l && m.getBoundingClientRect && (L = function() {
u(m, { left: 0, top: 0 }), q = m.getBoundingClientRect(), u(m, { left: Math.ceil(q.left) - q.left + "px", top: Math.ceil(q.top) - q.top + "px" });
}, L(), this.unSubPixelFix = v(S, "resize", L));
}, g.prototype.definition = function(m) {
return new y([m]).addToDOM(this.defs.element);
}, g.prototype.getReferenceURL = function() {
if ((l || O) && f.getElementsByTagName("base").length) {
if (!i(X)) {
var m = E();
m = new y([{ tagName: "svg", attributes: { width: 8, height: 8 }, children: [{ tagName: "defs", children: [{ tagName: "clipPath", attributes: { id: m }, children: [{ tagName: "rect", attributes: { width: 4, height: 4 } }] }] }, { tagName: "rect", attributes: { id: "hitme", width: 8, height: 8, "clip-path": "url(#" + m + ")", fill: "rgba(0,0,0,0.001)" } }] }]).addToDOM(f.body), u(m, { position: "fixed", top: 0, left: 0, zIndex: 9e5 });
var L = f.elementFromPoint(6, 6);
X = (L && L.id) === "hitme", f.body.removeChild(m);
}
if (X)
return S.location.href.split("#")[0].replace(/<[^>]*>/g, "").replace(/([\('\)])/g, "\\$1").replace(/ /g, "%20");
}
return "";
}, g.prototype.getStyle = function(m) {
return this.style = a({ fontFamily: '"Lucida Grande", "Lucida Sans Unicode", Arial, Helvetica, sans-serif', fontSize: "12px" }, m);
}, g.prototype.setStyle = function(m) {
this.boxWrapper.css(this.getStyle(m));
}, g.prototype.isHidden = function() {
return !this.boxWrapper.getBBox().width;
}, g.prototype.destroy = function() {
var m = this.defs;
return this.box = null, this.boxWrapper = this.boxWrapper.destroy(), p(this.gradients || {}), this.gradients = null, m && (this.defs = m.destroy()), this.unSubPixelFix && this.unSubPixelFix(), this.alignedObjects = null;
}, g.prototype.createElement = function(m) {
var L = new this.Element();
return L.init(this, m), L;
}, g.prototype.getRadialAttr = function(m, L) {
return { cx: m[0] - m[2] / 2 + (L.cx || 0) * m[2], cy: m[1] - m[2] / 2 + (L.cy || 0) * m[2], r: (L.r || 0) * m[2] };
}, g.prototype.buildText = function(m) {
new B(m).buildSVG();
}, g.prototype.getContrast = function(m) {
return m = N.parse(m).rgba, m[0] *= 1, m[1] *= 1.2, m[2] *= 0.5, 459 < m[0] + m[1] + m[2] ? "#000000" : "#FFFFFF";
}, g.prototype.button = function(m, L, z, $, Q, A, H, Y, Z, q) {
var it = this.label(m, L, z, Z, void 0, void 0, q, void 0, "button"), et = this.styledMode, nt = 0, rt = Q ? D(Q) : {};
if (m = rt && rt.style || {}, rt = y.filterUserAttributes(rt), it.attr(D({ padding: 8, r: 2 }, rt)), !et) {
rt = D({ fill: "#f7f7f7", stroke: "#cccccc", "stroke-width": 1, style: { color: "#333333", cursor: "pointer", fontWeight: "normal" } }, { style: m }, rt);
var ct = rt.style;
delete rt.style, A = D(rt, { fill: "#e6e6e6" }, y.filterUserAttributes(A || {}));
var gt = A.style;
delete A.style, H = D(rt, { fill: "#e6ebf5", style: { color: "#000000", fontWeight: "bold" } }, y.filterUserAttributes(H || {}));
var dt = H.style;
delete H.style, Y = D(rt, { style: { color: "#cccccc" } }, y.filterUserAttributes(Y || {}));
var ht = Y.style;
delete Y.style;
}
return v(it.element, T ? "mouseover" : "mouseenter", function() {
nt !== 3 && it.setState(1);
}), v(it.element, T ? "mouseout" : "mouseleave", function() {
nt !== 3 && it.setState(nt);
}), it.setState = function(at) {
at !== 1 && (it.state = nt = at), it.removeClass(/highcharts-button-(normal|hover|pressed|disabled)/).addClass("highcharts-button-" + ["normal", "hover", "pressed", "disabled"][at || 0]), et || it.attr([rt, A, H, Y][at || 0]).css([ct, gt, dt, ht][at || 0]);
}, et || it.attr(rt).css(a({ cursor: "default" }, ct)), it.on("touchstart", function(at) {
return at.stopPropagation();
}).on("click", function(at) {
nt !== 3 && $.call(it, at);
});
}, g.prototype.crispLine = function(m, L, z) {
z === void 0 && (z = "round");
var $ = m[0], Q = m[1];
return i($[1]) && $[1] === Q[1] && ($[1] = Q[1] = Math[z]($[1]) - L % 2 / 2), i($[2]) && $[2] === Q[2] && ($[2] = Q[2] = Math[z]($[2]) + L % 2 / 2), m;
}, g.prototype.path = function(m) {
var L = this.styledMode ? {} : { fill: "none" };
return t(m) ? L.d = m : n(m) && a(L, m), this.createElement("path").attr(L);
}, g.prototype.circle = function(m, L, z) {
return m = n(m) ? m : typeof m > "u" ? {} : { x: m, y: L, r: z }, L = this.createElement("circle"), L.xSetter = L.ySetter = function($, Q, A) {
A.setAttribute("c" + Q, $);
}, L.attr(m);
}, g.prototype.arc = function(m, L, z, $, Q, A) {
return n(m) ? ($ = m, L = $.y, z = $.r, m = $.x) : $ = { innerR: $, start: Q, end: A }, m = this.symbol("arc", m, L, z, z, $), m.r = z, m;
}, g.prototype.rect = function(m, L, z, $, Q, A) {
Q = n(m) ? m.r : Q;
var H = this.createElement("rect");
return m = n(m) ? m : typeof m > "u" ? {} : { x: m, y: L, width: Math.max(z, 0), height: Math.max($, 0) }, this.styledMode || (typeof A < "u" && (m["stroke-width"] = A, m = H.crisp(m)), m.fill = "none"), Q && (m.r = Q), H.rSetter = function(Y, Z, q) {
H.r = Y, h(q, { rx: Y, ry: Y });
}, H.rGetter = function() {
return H.r || 0;
}, H.attr(m);
}, g.prototype.setSize = function(m, L, z) {
this.width = m, this.height = L, this.boxWrapper.animate({ width: m, height: L }, { step: function() {
this.attr({ viewBox: "0 0 " + this.attr("width") + " " + this.attr("height") });
}, duration: I(
z,
!0
) ? void 0 : 0 }), this.alignElements();
}, g.prototype.g = function(m) {
var L = this.createElement("g");
return m ? L.attr({ class: "highcharts-" + m }) : L;
}, g.prototype.image = function(m, L, z, $, Q, A) {
var H = { preserveAspectRatio: "none" }, Y = function(q, it) {
q.setAttributeNS ? q.setAttributeNS("http://www.w3.org/1999/xlink", "href", it) : q.setAttribute("hc-svg-href", it);
};
s(L) && (H.x = L), s(z) && (H.y = z), s($) && (H.width = $), s(Q) && (H.height = Q);
var Z = this.createElement("image").attr(H);
return L = function(q) {
Y(Z.element, m), A.call(Z, q);
}, A ? (Y(
Z.element,
"data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw=="
), z = new S.Image(), v(z, "load", L), z.src = m, z.complete && L({})) : Y(Z.element, m), Z;
}, g.prototype.symbol = function(m, L, z, $, Q, A) {
var H = this, Y = /^url\((.*?)\)$/, Z = Y.test(m), q = !Z && (this.symbols[m] ? m : "circle"), it = q && this.symbols[q], et;
if (it) {
typeof L == "number" && (et = it.call(this.symbols, Math.round(L || 0), Math.round(z || 0), $ || 0, Q || 0, A));
var nt = this.path(et);
H.styledMode || nt.attr("fill", "none"), a(nt, { symbolName: q || void 0, x: L, y: z, width: $, height: Q }), A && a(nt, A);
} else if (Z) {
var rt = m.match(Y)[1], ct = nt = this.image(rt);
ct.imgwidth = I(b[rt] && b[rt].width, A && A.width), ct.imgheight = I(b[rt] && b[rt].height, A && A.height);
var gt = function(dt) {
return dt.attr({ width: dt.width, height: dt.height });
};
["width", "height"].forEach(function(dt) {
ct[dt + "Setter"] = function(ht, at) {
var J = this["img" + at];
this[at] = ht, i(J) && (A && A.backgroundSize === "within" && this.width && this.height && (J = Math.round(J * Math.min(this.width / this.imgwidth, this.height / this.imgheight))), this.element && this.element.setAttribute(at, J), this.alignByTranslate || (ht = ((this[at] || 0) - J) / 2, this.attr(at === "width" ? { translateX: ht } : { translateY: ht })));
};
}), i(L) && ct.attr({ x: L, y: z }), ct.isImg = !0, i(ct.imgwidth) && i(ct.imgheight) ? gt(ct) : (ct.attr({ width: 0, height: 0 }), c("img", { onload: function() {
var dt = w[H.chartIndex];
this.width === 0 && (u(this, { position: "absolute", top: "-999em" }), f.body.appendChild(this)), b[rt] = { width: this.width, height: this.height }, ct.imgwidth = this.width, ct.imgheight = this.height, ct.element && gt(ct), this.parentNode && this.parentNode.removeChild(this), H.imgCount--, !H.imgCount && dt && !dt.hasLoaded && dt.onload();
}, src: rt }), this.imgCount++);
}
return nt;
}, g.prototype.clipRect = function(m, L, z, $) {
var Q = E() + "-", A = this.createElement("clipPath").attr({ id: Q }).add(this.defs);
return m = this.rect(m, L, z, $, 0).add(A), m.id = Q, m.clipPath = A, m.count = 0, m;
}, g.prototype.text = function(m, L, z, $) {
var Q = {};
return $ && (this.allowHTML || !this.forExport) ? this.html(m, L, z) : (Q.x = Math.round(L || 0), z && (Q.y = Math.round(z)), i(m) && (Q.text = m), m = this.createElement("text").attr(Q), (!$ || this.forExport && !this.allowHTML) && (m.xSetter = function(A, H, Y) {
for (var Z = Y.getElementsByTagName("tspan"), q = Y.getAttribute(H), it = 0, et; it < Z.length; it++)
et = Z[it], et.getAttribute(H) === q && et.setAttribute(H, A);
Y.setAttribute(H, A);
}), m);
}, g.prototype.fontMetrics = function(m, L) {
return m = !this.styledMode && /px/.test(m) || !S.getComputedStyle ? m || L && L.style && L.style.fontSize || this.style && this.style.fontSize : L && G.prototype.getStyle.call(L, "font-size"), m = /px/.test(m) ? W(m) : 12, L = 24 > m ? m + 3 : Math.round(1.2 * m), { h: L, b: Math.round(0.8 * L), f: m };
}, g.prototype.rotCorr = function(m, L, z) {
var $ = m;
return L && z && ($ = Math.max($ * Math.cos(L * x), 4)), { x: -m / 3 * Math.sin(L * x), y: $ };
}, g.prototype.pathToSegments = function(m) {
for (var L = [], z = [], $ = { A: 8, C: 7, H: 2, L: 3, M: 3, Q: 5, S: 5, T: 3, V: 2 }, Q = 0; Q < m.length; Q++)
P(z[0]) && s(m[Q]) && z.length === $[z[0].toUpperCase()] && m.splice(Q, 0, z[0].replace("M", "L").replace("m", "l")), typeof m[Q] == "string" && (z.length && L.push(z.slice(0)), z.length = 0), z.push(m[Q]);
return L.push(z.slice(0)), L;
}, g.prototype.label = function(m, L, z, $, Q, A, H, Y, Z) {
return new V(this, m, L, z, $, Q, A, H, Y, Z);
}, g.prototype.alignElements = function() {
this.alignedObjects.forEach(function(m) {
return m.align();
});
}, g;
}(), a(_.prototype, { Element: G, SVG_NS: k, escapes: { "&": "&", "<": "<", ">": ">", "'": "'", '"': """ }, symbols: F, draw: R }), U.registerRendererType("svg", _, !0), _;
}), C(o, "Core/Renderer/HTML/HTMLElement.js", [o["Core/Globals.js"], o["Core/Renderer/SVG/SVGElement.js"], o["Core/Utilities.js"]], function(y, N, _) {
var U = this && this.__extends || function() {
var T = function(O, R) {
return T = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(k, b) {
k.__proto__ = b;
} || function(k, b) {
for (var S in b)
b.hasOwnProperty(S) && (k[S] = b[S]);
}, T(O, R);
};
return function(O, R) {
function k() {
this.constructor = O;
}
T(O, R), O.prototype = R === null ? Object.create(R) : (k.prototype = R.prototype, new k());
};
}(), G = y.isFirefox, V = y.isMS, F = y.isWebKit, B = y.win, j = _.css, w = _.defined, x = _.extend, f = _.pick, l = _.pInt;
return function(T) {
function O() {
return T !== null && T.apply(this, arguments) || this;
}
return U(O, T), O.compose = function(R) {
if (O.composedClasses.indexOf(R) === -1) {
O.composedClasses.push(R);
var k = O.prototype, b = R.prototype;
b.getSpanCorrection = k.getSpanCorrection, b.htmlCss = k.htmlCss, b.htmlGetBBox = k.htmlGetBBox, b.htmlUpdateTransform = k.htmlUpdateTransform, b.setSpanRotation = k.setSpanRotation;
}
return R;
}, O.prototype.getSpanCorrection = function(R, k, b) {
this.xCorr = -R * b, this.yCorr = -k;
}, O.prototype.htmlCss = function(R) {
var k = this.element.tagName === "SPAN" && R && "width" in R, b = f(k && R.width, void 0);
if (k) {
delete R.width, this.textWidth = b;
var S = !0;
}
return R && R.textOverflow === "ellipsis" && (R.whiteSpace = "nowrap", R.overflow = "hidden"), this.styles = x(this.styles, R), j(this.element, R), S && this.htmlUpdateTransform(), this;
}, O.prototype.htmlGetBBox = function() {
var R = this.element;
return { x: R.offsetLeft, y: R.offsetTop, width: R.offsetWidth, height: R.offsetHeight };
}, O.prototype.htmlUpdateTransform = function() {
if (this.added) {
var R = this.renderer, k = this.element, b = this.translateX || 0, S = this.translateY || 0, v = this.x || 0, h = this.y || 0, c = this.textAlign || "left", u = { left: 0, center: 0.5, right: 1 }[c], i = this.styles;
if (i = i && i.whiteSpace, j(k, { marginLeft: b, marginTop: S }), !R.styledMode && this.shadows && this.shadows.forEach(function(P) {
j(P, { marginLeft: b + 1, marginTop: S + 1 });
}), this.inverted && [].forEach.call(k.childNodes, function(P) {
R.invertChild(P, k);
}), k.tagName === "SPAN") {
var p = this.rotation, a = this.textWidth && l(this.textWidth), t = [p, c, k.innerHTML, this.textWidth, this.textAlign].join(), s = void 0;
if (s = !1, a !== this.oldTextWidth) {
if (this.textPxLength)
var n = this.textPxLength;
else
j(k, { width: "", whiteSpace: i || "nowrap" }), n = k.offsetWidth;
(a > this.oldTextWidth || n > a) && (/[ \-]/.test(k.textContent || k.innerText) || k.style.textOverflow === "ellipsis") && (j(k, { width: n > a || p ? a + "px" : "auto", display: "block", whiteSpace: i || "normal" }), this.oldTextWidth = a, s = !0);
}
this.hasBoxWidthChanged = s, t !== this.cTT && (s = R.fontMetrics(k.style.fontSize, k).b, !w(p) || p === (this.oldRotation || 0) && c === this.oldAlign || this.setSpanRotation(p, u, s), this.getSpanCorrection(!w(p) && this.textPxLength || k.offsetWidth, s, u, p, c)), j(k, { left: v + (this.xCorr || 0) + "px", top: h + (this.yCorr || 0) + "px" }), this.cTT = t, this.oldRotation = p, this.oldAlign = c;
}
} else
this.alignOnAdd = !0;
}, O.prototype.setSpanRotation = function(R, k, b) {
var S = {}, v = V && !/Edge/.test(B.navigator.userAgent) ? "-ms-transform" : F ? "-webkit-transform" : G ? "MozTransform" : B.opera ? "-o-transform" : void 0;
v && (S[v] = S.transform = "rotate(" + R + "deg)", S[v + (G ? "Origin" : "-origin")] = S.transformOrigin = 100 * k + "% " + b + "px", j(this.element, S));
}, O.composedClasses = [], O;
}(N);
}), C(
o,
"Core/Renderer/HTML/HTMLRenderer.js",
[o["Core/Renderer/HTML/AST.js"], o["Core/Renderer/SVG/SVGElement.js"], o["Core/Renderer/SVG/SVGRenderer.js"], o["Core/Utilities.js"]],
function(y, N, _, U) {
var G = this && this.__extends || function() {
var w = function(x, f) {
return w = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(l, T) {
l.__proto__ = T;
} || function(l, T) {
for (var O in T)
T.hasOwnProperty(O) && (l[O] = T[O]);
}, w(x, f);
};
return function(x, f) {
function l() {
this.constructor = x;
}
w(x, f), x.prototype = f === null ? Object.create(f) : (l.prototype = f.prototype, new l());
};
}(), V = U.attr, F = U.createElement, B = U.extend, j = U.pick;
return function(w) {
function x() {
return w !== null && w.apply(this, arguments) || this;
}
return G(x, w), x.compose = function(f) {
return x.composedClasses.indexOf(f) === -1 && (x.composedClasses.push(f), f.prototype.html = x.prototype.html), f;
}, x.prototype.html = function(f, l, T) {
var O = this.createElement("span"), R = O.element, k = O.renderer, b = k.isSVG, S = function(v, h) {
["opacity", "visibility"].forEach(function(c) {
v[c + "Setter"] = function(u, i, p) {
var a = v.div ? v.div.style : h;
N.prototype[c + "Setter"].call(this, u, i, p), a && (a[i] = u);
};
}), v.addedSetters = !0;
};
return O.textSetter = function(v) {
v !== this.textStr && (delete this.bBox, delete this.oldTextWidth, y.setElementHTML(this.element, j(v, "")), this.textStr = v, O.doTransform = !0);
}, b && S(O, O.element.style), O.xSetter = O.ySetter = O.alignSetter = O.rotationSetter = function(v, h) {
h === "align" ? O.alignValue = O.textAlign = v : O[h] = v, O.doTransform = !0;
}, O.afterSetters = function() {
this.doTransform && (this.htmlUpdateTransform(), this.doTransform = !1);
}, O.attr({ text: f, x: Math.round(l), y: Math.round(T) }).css({ position: "absolute" }), k.styledMode || O.css({ fontFamily: this.style.fontFamily, fontSize: this.style.fontSize }), R.style.whiteSpace = "nowrap", O.css = O.htmlCss, b && (O.add = function(v) {
var h = k.box.parentNode, c = [];
if (this.parentGroup = v) {
var u = v.div;
if (!u) {
for (; v; )
c.push(v), v = v.parentGroup;
c.reverse().forEach(function(i) {
function p(n, P) {
i[P] = n, P === "translateX" ? s.left = n + "px" : s.top = n + "px", i.doTransform = !0;
}
var a = V(i.element, "class"), t = i.styles || {};
u = i.div = i.div || F("div", a ? { className: a } : void 0, {
position: "absolute",
left: (i.translateX || 0) + "px",
top: (i.translateY || 0) + "px",
display: i.display,
opacity: i.opacity,
cursor: t.cursor,
pointerEvents: t.pointerEvents,
visibility: i.visibility
}, u || h);
var s = u.style;
B(i, { classSetter: function(n) {
return function(P) {
this.element.setAttribute("class", P), n.className = P;
};
}(u), on: function() {
return c[0].div && O.on.apply({ element: c[0].div, onEvents: i.onEvents }, arguments), i;
}, translateXSetter: p, translateYSetter: p }), i.addedSetters || S(i);
});
}
} else
u = h;
return u.appendChild(R), O.added = !0, O.alignOnAdd && O.htmlUpdateTransform(), O;
}), O;
}, x.composedClasses = [], x;
}(_);
}
), C(o, "Core/Axis/AxisDefaults.js", [], function() {
var y;
return function(N) {
N.defaultXAxisOptions = { alignTicks: !0, allowDecimals: void 0, panningEnabled: !0, zIndex: 2, zoomEnabled: !0, dateTimeLabelFormats: { millisecond: { main: "%H:%M:%S.%L", range: !1 }, second: { main: "%H:%M:%S", range: !1 }, minute: { main: "%H:%M", range: !1 }, hour: { main: "%H:%M", range: !1 }, day: { main: "%e. %b" }, week: { main: "%e. %b" }, month: { main: "%b '%y" }, year: { main: "%Y" } }, endOnTick: !1, gridLineDashStyle: "Solid", gridZIndex: 1, labels: {
autoRotation: void 0,
autoRotationLimit: 80,
distance: void 0,
enabled: !0,
indentation: 10,
overflow: "justify",
padding: 5,
reserveSpace: void 0,
rotation: void 0,
staggerLines: 0,
step: 0,
useHTML: !1,
x: 0,
zIndex: 7,
style: { color: "#666666", cursor: "default", fontSize: "11px" }
}, maxPadding: 0.01, minorGridLineDashStyle: "Solid", minorTickLength: 2, minorTickPosition: "outside", minPadding: 0.01, offset: void 0, opposite: !1, reversed: void 0, reversedStacks: !1, showEmpty: !0, showFirstLabel: !0, showLastLabel: !0, startOfWeek: 1, startOnTick: !1, tickLength: 10, tickPixelInterval: 100, tickmarkPlacement: "between", tickPosition: "outside", title: {
align: "middle",
rotation: 0,
useHTML: !1,
x: 0,
y: 0,
style: { color: "#666666" }
}, type: "linear", uniqueNames: !0, visible: !0, minorGridLineColor: "#f2f2f2", minorGridLineWidth: 1, minorTickColor: "#999999", lineColor: "#ccd6eb", lineWidth: 1, gridLineColor: "#e6e6e6", gridLineWidth: void 0, tickColor: "#ccd6eb" }, N.defaultYAxisOptions = { reversedStacks: !0, endOnTick: !0, maxPadding: 0.05, minPadding: 0.05, tickPixelInterval: 72, showLastLabel: !0, labels: { x: -8 }, startOnTick: !0, title: { rotation: 270, text: "Values" }, stackLabels: {
animation: {},
allowOverlap: !1,
enabled: !1,
crop: !0,
overflow: "justify",
formatter: function() {
var _ = this.axis.chart.numberFormatter;
return _(this.total, -1);
},
style: { color: "#000000", fontSize: "11px", fontWeight: "bold", textOutline: "1px contrast" }
}, gridLineWidth: 1, lineWidth: 0 }, N.defaultLeftAxisOptions = { labels: { x: -15 }, title: { rotation: 270 } }, N.defaultRightAxisOptions = { labels: { x: 15 }, title: { rotation: 90 } }, N.defaultBottomAxisOptions = { labels: { autoRotation: [-45], x: 0 }, margin: 15, title: { rotation: 0 } }, N.defaultTopAxisOptions = { labels: { autoRotation: [-45], x: 0 }, margin: 15, title: { rotation: 0 } };
}(y || (y = {})), y;
}), C(o, "Core/Foundation.js", [o["Core/Utilities.js"]], function(y) {
var N = y.addEvent, _ = y.isFunction, U = y.objectEach, G = y.removeEvent, V;
return function(F) {
F.registerEventOptions = function(B, j) {
B.eventOptions = B.eventOptions || {}, U(j.events, function(w, x) {
B.eventOptions[x] !== w && (B.eventOptions[x] && (G(B, x, B.eventOptions[x]), delete B.eventOptions[x]), _(w) && (B.eventOptions[x] = w, N(B, x, w)));
});
};
}(V || (V = {})), V;
}), C(
o,
"Core/Axis/Tick.js",
[o["Core/FormatUtilities.js"], o["Core/Globals.js"], o["Core/Utilities.js"]],
function(y, N, _) {
var U = N.deg2rad, G = _.clamp, V = _.correctFloat, F = _.defined, B = _.destroyObjectProperties, j = _.extend, w = _.fireEvent, x = _.isNumber, f = _.merge, l = _.objectEach, T = _.pick;
return N = function() {
function O(R, k, b, S, v) {
this.isNewLabel = this.isNew = !0, this.axis = R, this.pos = k, this.type = b || "", this.parameters = v || {}, this.tickmarkOffset = this.parameters.tickmarkOffset, this.options = this.parameters.options, w(this, "init"), b || S || this.addLabel();
}
return O.prototype.addLabel = function() {
var R = this, k = R.axis, b = k.options, S = k.chart, v = k.categories, h = k.logarithmic, c = k.names, u = R.pos, i = T(R.options && R.options.labels, b.labels), p = k.tickPositions, a = u === p[0], t = u === p[p.length - 1], s = (!i.step || i.step === 1) && k.tickInterval === 1;
p = p.info;
var n = R.label, P;
if (v = this.parameters.category || (v ? T(v[u], c[u], u) : u), h && x(v) && (v = V(h.lin2log(v))), k.dateTime)
if (p)
var D = S.time.resolveDTLFormat(b.dateTimeLabelFormats[!b.grid && p.higherRanks[u] || p.unitName]), I = D.main;
else
x(v) && (I = k.dateTime.getXDateFormat(v, b.dateTimeLabelFormats || {}));
R.isFirst = a, R.isLast = t;
var W = {
axis: k,
chart: S,
dateTimeLabelFormat: I,
isFirst: a,
isLast: t,
pos: u,
tick: R,
tickPositionInfo: p,
value: v
};
w(this, "labelFormat", W);
var E = function(g) {
return i.formatter ? i.formatter.call(g, g) : i.format ? (g.text = k.defaultLabelFormatter.call(g), y.format(i.format, g, S)) : k.defaultLabelFormatter.call(g, g);
};
b = E.call(W, W);
var X = D && D.list;
R.shortenLabel = X ? function() {
for (P = 0; P < X.length; P++)
if (j(W, { dateTimeLabelFormat: X[P] }), n.attr({ text: E.call(W, W) }), n.getBBox().width < k.getSlotWidth(R) - 2 * i.padding)
return;
n.attr({ text: "" });
} : void 0, s && k._addedPlotLB && R.moveLabel(b, i), F(n) || R.movedLabel ? n && n.textStr !== b && !s && (!n.textWidth || i.style.width || n.styles.width || n.css({ width: null }), n.attr({ text: b }), n.textPxLength = n.getBBox().width) : (R.label = n = R.createLabel({ x: 0, y: 0 }, b, i), R.rotation = 0);
}, O.prototype.createLabel = function(R, k, b) {
var S = this.axis, v = S.chart;
return (R = F(k) && b.enabled ? v.renderer.text(k, R.x, R.y, b.useHTML).add(S.labelGroup) : null) && (v.styledMode || R.css(f(b.style)), R.textPxLength = R.getBBox().width), R;
}, O.prototype.destroy = function() {
B(
this,
this.axis
);
}, O.prototype.getPosition = function(R, k, b, S) {
var v = this.axis, h = v.chart, c = S && h.oldChartHeight || h.chartHeight;
return R = { x: R ? V(v.translate(k + b, null, null, S) + v.transB) : v.left + v.offset + (v.opposite ? (S && h.oldChartWidth || h.chartWidth) - v.right - v.left : 0), y: R ? c - v.bottom + v.offset - (v.opposite ? v.height : 0) : V(c - v.translate(k + b, null, null, S) - v.transB) }, R.y = G(R.y, -1e5, 1e5), w(this, "afterGetPosition", { pos: R }), R;
}, O.prototype.getLabelPosition = function(R, k, b, S, v, h, c, u) {
var i = this.axis, p = i.transA, a = i.isLinked && i.linkedParent ? i.linkedParent.reversed : i.reversed, t = i.staggerLines, s = i.tickRotCorr || { x: 0, y: 0 }, n = S || i.reserveSpaceDefault ? 0 : -i.labelOffset * (i.labelAlign === "center" ? 0.5 : 1), P = {}, D = v.y;
return F(D) || (D = i.side === 0 ? b.rotation ? -8 : -b.getBBox().height : i.side === 2 ? s.y + 8 : Math.cos(b.rotation * U) * (s.y - b.getBBox(!1, 0).height / 2)), R = R + v.x + n + s.x - (h && S ? h * p * (a ? -1 : 1) : 0), k = k + D - (h && !S ? h * p * (a ? 1 : -1) : 0), t && (b = c / (u || 1) % t, i.opposite && (b = t - b - 1), k += i.labelOffset / t * b), P.x = R, P.y = Math.round(k), w(this, "afterGetLabelPosition", { pos: P, tickmarkOffset: h, index: c }), P;
}, O.prototype.getLabelSize = function() {
return this.label ? this.label.getBBox()[this.axis.horiz ? "height" : "width"] : 0;
}, O.prototype.getMarkPath = function(R, k, b, S, v, h) {
return h.crispLine([["M", R, k], ["L", R + (v ? 0 : -b), k + (v ? b : 0)]], S);
}, O.prototype.handleOverflow = function(R) {
var k = this.axis, b = k.options.labels, S = R.x, v = k.chart.chartWidth, h = k.chart.spacing, c = T(k.labelLeft, Math.min(k.pos, h[3]));
h = T(k.labelRight, Math.max(k.isRadial ? 0 : k.pos + k.len, v - h[1]));
var u = this.label, i = this.rotation, p = { left: 0, center: 0.5, right: 1 }[k.labelAlign || u.attr("align")], a = u.getBBox().width, t = k.getSlotWidth(this), s = {}, n = t, P = 1, D;
i || b.overflow !== "justify" ? 0 > i && S - p * a < c ? D = Math.round(S / Math.cos(i * U) - c) : 0 < i && S + p * a > h && (D = Math.round((v - S) / Math.cos(i * U))) : (v = S + (1 - p) * a, S - p * a < c ? n = R.x + n * (1 - p) - c : v > h && (n = h - R.x + n * p, P = -1), n = Math.min(t, n), n < t && k.labelAlign === "center" && (R.x += P * (t - n - p * (t - Math.min(a, n)))), (a > n || k.autoRotation && (u.styles || {}).width) && (D = n)), D && (this.shortenLabel ? this.shortenLabel() : (s.width = Math.floor(D) + "px", (b.style || {}).textOverflow || (s.textOverflow = "ellipsis"), u.css(s)));
}, O.prototype.moveLabel = function(R, k) {
var b = this, S = b.label, v = b.axis, h = v.reversed, c = !1;
if (S && S.textStr === R ? (b.movedLabel = S, c = !0, delete b.label) : l(v.ticks, function(i) {
c || i.isNew || i === b || !i.label || i.label.textStr !== R || (b.movedLabel = i.label, c = !0, i.labelPos = b.movedLabel.xy, delete i.label);
}), !c && (b.labelPos || S)) {
var u = b.labelPos || S.xy;
S = v.horiz ? h ? 0 : v.width + v.left : u.x, v = v.horiz ? u.y : h ? v.width + v.left : 0, b.movedLabel = b.createLabel({ x: S, y: v }, R, k), b.movedLabel && b.movedLabel.attr({ opacity: 0 });
}
}, O.prototype.render = function(R, k, b) {
var S = this.axis, v = S.horiz, h = this.pos, c = T(this.tickmarkOffset, S.tickmarkOffset);
h = this.getPosition(v, h, c, k), c = h.x;
var u = h.y;
S = v && c === S.pos + S.len || !v && u === S.pos ? -1 : 1, v = T(b, this.label && this.label.newOpacity, 1), b = T(b, 1), this.isActive = !0, this.renderGridLine(k, b, S), this.renderMark(h, b, S), this.renderLabel(h, k, v, R), this.isNew = !1, w(this, "afterRender");
}, O.prototype.renderGridLine = function(R, k, b) {
var S = this.axis, v = S.options, h = {}, c = this.pos, u = this.type, i = T(
this.tickmarkOffset,
S.tickmarkOffset
), p = S.chart.renderer, a = this.gridLine, t = v.gridLineWidth, s = v.gridLineColor, n = v.gridLineDashStyle;
this.type === "minor" && (t = v.minorGridLineWidth, s = v.minorGridLineColor, n = v.minorGridLineDashStyle), a || (S.chart.styledMode || (h.stroke = s, h["stroke-width"] = t || 0, h.dashstyle = n), u || (h.zIndex = 1), R && (k = 0), this.gridLine = a = p.path().attr(h).addClass("highcharts-" + (u ? u + "-" : "") + "grid-line").add(S.gridGroup)), a && (b = S.getPlotLinePath({ value: c + i, lineWidth: a.strokeWidth() * b, force: "pass", old: R })) && a[R || this.isNew ? "attr" : "animate"]({ d: b, opacity: k });
}, O.prototype.renderMark = function(R, k, b) {
var S = this.axis, v = S.options, h = S.chart.renderer, c = this.type, u = S.tickSize(c ? c + "Tick" : "tick"), i = R.x;
R = R.y;
var p = T(v[c !== "minor" ? "tickWidth" : "minorTickWidth"], !c && S.isXAxis ? 1 : 0);
v = v[c !== "minor" ? "tickColor" : "minorTickColor"];
var a = this.mark, t = !a;
u && (S.opposite && (u[0] = -u[0]), a || (this.mark = a = h.path().addClass("highcharts-" + (c ? c + "-" : "") + "tick").add(S.axisGroup), S.chart.styledMode || a.attr({ stroke: v, "stroke-width": p })), a[t ? "attr" : "animate"]({ d: this.getMarkPath(
i,
R,
u[0],
a.strokeWidth() * b,
S.horiz,
h
), opacity: k }));
}, O.prototype.renderLabel = function(R, k, b, S) {
var v = this.axis, h = v.horiz, c = v.options, u = this.label, i = c.labels, p = i.step;
v = T(this.tickmarkOffset, v.tickmarkOffset);
var a = R.x;
R = R.y;
var t = !0;
u && x(a) && (u.xy = R = this.getLabelPosition(a, R, u, h, i, v, S, p), this.isFirst && !this.isLast && !c.showFirstLabel || this.isLast && !this.isFirst && !c.showLastLabel ? t = !1 : !h || i.step || i.rotation || k || b === 0 || this.handleOverflow(R), p && S % p && (t = !1), t && x(R.y) ? (R.opacity = b, u[this.isNewLabel ? "attr" : "animate"](R), this.isNewLabel = !1) : (u.attr("y", -9999), this.isNewLabel = !0));
}, O.prototype.replaceMovedLabel = function() {
var R = this.label, k = this.axis, b = k.reversed;
if (R && !this.isNew) {
var S = k.horiz ? b ? k.left : k.width + k.left : R.xy.x;
b = k.horiz ? R.xy.y : b ? k.width + k.top : k.top, R.animate({ x: S, y: b, opacity: 0 }, void 0, R.destroy), delete this.label;
}
k.isDirty = !0, this.label = this.movedLabel, delete this.movedLabel;
}, O;
}(), N;
}
), C(o, "Core/Axis/Axis.js", [
o["Core/Animation/AnimationUtilities.js"],
o["Core/Axis/AxisDefaults.js"],
o["Core/Color/Color.js"],
o["Core/DefaultOptions.js"],
o["Core/Foundation.js"],
o["Core/Globals.js"],
o["Core/Axis/Tick.js"],
o["Core/Utilities.js"]
], function(y, N, _, U, G, V, F, B) {
var j = y.animObject, w = U.defaultOptions, x = G.registerEventOptions, f = V.deg2rad, l = B.arrayMax, T = B.arrayMin, O = B.clamp, R = B.correctFloat, k = B.defined, b = B.destroyObjectProperties, S = B.erase, v = B.error, h = B.extend, c = B.fireEvent, u = B.getMagnitude, i = B.isArray, p = B.isNumber, a = B.isString, t = B.merge, s = B.normalizeTickInterval, n = B.objectEach, P = B.pick, D = B.relativeLength, I = B.removeEvent, W = B.splat, E = B.syncTimeout;
return y = function() {
function X(g, m) {
this.zoomEnabled = this.width = this.visible = this.userOptions = this.translationSlope = this.transB = this.transA = this.top = this.ticks = this.tickRotCorr = this.tickPositions = this.tickmarkOffset = this.tickInterval = this.tickAmount = this.side = this.series = this.right = this.positiveValuesOnly = this.pos = this.pointRangePadding = this.pointRange = this.plotLinesAndBandsGroups = this.plotLinesAndBands = this.paddedTicks = this.overlap = this.options = this.offset = this.names = this.minPixelPadding = this.minorTicks = this.minorTickInterval = this.min = this.maxLabelLength = this.max = this.len = this.left = this.labelFormatter = this.labelEdge = this.isLinked = this.height = this.hasVisibleSeries = this.hasNames = this.eventOptions = this.coll = this.closestPointRange = this.chart = this.categories = this.bottom = this.alternateBands = void 0, this.init(g, m);
}
return X.prototype.init = function(g, m) {
var L = m.isX;
this.chart = g, this.horiz = g.inverted && !this.isZAxis ? !L : L, this.isXAxis = L, this.coll = this.coll || (L ? "xAxis" : "yAxis"), c(this, "init", { userOptions: m }), this.opposite = P(m.opposite, this.opposite), this.side = P(m.side, this.side, this.horiz ? this.opposite ? 0 : 2 : this.opposite ? 1 : 3), this.setOptions(m);
var z = this.options, $ = z.labels, Q = z.type;
this.userOptions = m, this.minPixelPadding = 0, this.reversed = P(z.reversed, this.reversed), this.visible = z.visible, this.zoomEnabled = z.zoomEnabled, this.hasNames = Q === "category" || z.categories === !0, this.categories = z.categories || this.hasNames, this.names || (this.names = [], this.names.keys = {}), this.plotLinesAndBandsGroups = {}, this.positiveValuesOnly = !!this.logarithmic, this.isLinked = k(z.linkedTo), this.ticks = {}, this.labelEdge = [], this.minorTicks = {}, this.plotLinesAndBands = [], this.alternateBands = {}, this.len = 0, this.minRange = this.userMinRange = z.minRange || z.maxZoom, this.range = z.range, this.offset = z.offset || 0, this.min = this.max = null, m = P(z.crosshair, W(g.options.tooltip.crosshairs)[L ? 0 : 1]), this.crosshair = m === !0 ? {} : m, g.axes.indexOf(this) === -1 && (L ? g.axes.splice(g.xAxis.length, 0, this) : g.axes.push(this), g[this.coll].push(this)), this.series = this.series || [], g.inverted && !this.isZAxis && L && typeof this.reversed > "u" && (this.reversed = !0), this.labelRotation = p($.rotation) ? $.rotation : void 0, x(this, z), c(this, "afterInit");
}, X.prototype.setOptions = function(g) {
this.options = t(N.defaultXAxisOptions, this.coll === "yAxis" && N.defaultYAxisOptions, [N.defaultTopAxisOptions, N.defaultRightAxisOptions, N.defaultBottomAxisOptions, N.defaultLeftAxisOptions][this.side], t(w[this.coll], g)), c(this, "afterSetOptions", { userOptions: g });
}, X.prototype.defaultLabelFormatter = function(g) {
var m = this.axis;
g = this.chart.numberFormatter;
var L = p(this.value) ? this.value : NaN, z = m.chart.time, $ = this.dateTimeLabelFormat, Q = w.lang, A = Q.numericSymbols;
Q = Q.numericSymbolMagnitude || 1e3;
var H = m.logarithmic ? Math.abs(L) : m.tickInterval, Y = A && A.length;
if (m.categories)
var Z = "" + this.value;
else if ($)
Z = z.dateFormat($, L);
else if (Y && 1e3 <= H)
for (; Y-- && typeof Z > "u"; )
m = Math.pow(Q, Y + 1), H >= m && 10 * L % m === 0 && A[Y] !== null && L !== 0 && (Z = g(L / m, -1) + A[Y]);
return typeof Z > "u" && (Z = 1e4 <= Math.abs(L) ? g(L, -1) : g(L, -1, void 0, "")), Z;
}, X.prototype.getSeriesExtremes = function() {
var g = this, m = g.chart, L;
c(this, "getSeriesExtremes", null, function() {
g.hasVisibleSeries = !1, g.dataMin = g.dataMax = g.threshold = null, g.softThreshold = !g.isXAxis, g.stacking && g.stacking.buildStacks(), g.series.forEach(function(z) {
if (z.visible || !m.options.chart.ignoreHiddenSeries) {
var $ = z.options, Q = $.threshold;
if (g.hasVisibleSeries = !0, g.positiveValuesOnly && 0 >= Q && (Q = null), g.isXAxis) {
if ($ = z.xData, $.length) {
$ = g.logarithmic ? $.filter(g.validatePositiveValue) : $, L = z.getXExtremes($);
var A = L.min, H = L.max;
p(A) || A instanceof Date || ($ = $.filter(p), L = z.getXExtremes($), A = L.min, H = L.max), $.length && (g.dataMin = Math.min(P(g.dataMin, A), A), g.dataMax = Math.max(P(g.dataMax, H), H));
}
} else
z = z.applyExtremes(), p(z.dataMin) && (A = z.dataMin, g.dataMin = Math.min(P(g.dataMin, A), A)), p(z.dataMax) && (H = z.dataMax, g.dataMax = Math.max(P(g.dataMax, H), H)), k(Q) && (g.threshold = Q), (!$.softThreshold || g.positiveValuesOnly) && (g.softThreshold = !1);
}
});
}), c(this, "afterGetSeriesExtremes");
}, X.prototype.translate = function(g, m, L, z, $, Q) {
var A = this.linkedParent || this, H = z && A.old ? A.old.min : A.min, Y = A.minPixelPadding;
$ = (A.isOrdinal || A.brokenAxis && A.brokenAxis.hasBreaks || A.logarithmic && $) && A.lin2val;
var Z = 1, q = 0;
return z = z && A.old ? A.old.transA : A.transA, z || (z = A.transA), L && (Z *= -1, q = A.len), A.reversed && (Z *= -1, q -= Z * (A.sector || A.len)), m ? (g = (g * Z + q - Y) / z + H, $ && (g = A.lin2val(g))) : ($ && (g = A.val2lin(g)), g = p(H) ? Z * (g - H) * z + q + Z * Y + (p(Q) ? z * Q : 0) : void 0), g;
}, X.prototype.toPixels = function(g, m) {
return this.translate(
g,
!1,
!this.horiz,
null,
!0
) + (m ? 0 : this.pos);
}, X.prototype.toValue = function(g, m) {
return this.translate(g - (m ? 0 : this.pos), !0, !this.horiz, null, !0);
}, X.prototype.getPlotLinePath = function(g) {
function m(at, J, tt) {
return (nt !== "pass" && at < J || at > tt) && (nt ? at = O(at, J, tt) : ht = !0), at;
}
var L = this, z = L.chart, $ = L.left, Q = L.top, A = g.old, H = g.value, Y = g.lineWidth, Z = A && z.oldChartHeight || z.chartHeight, q = A && z.oldChartWidth || z.chartWidth, it = L.transB, et = g.translatedValue, nt = g.force, rt, ct, gt, dt, ht;
return g = {
value: H,
lineWidth: Y,
old: A,
force: nt,
acrossPanes: g.acrossPanes,
translatedValue: et
}, c(this, "getPlotLinePath", g, function(at) {
et = P(et, L.translate(H, null, null, A)), et = O(et, -1e5, 1e5), rt = gt = Math.round(et + it), ct = dt = Math.round(Z - et - it), p(et) ? L.horiz ? (ct = Q, dt = Z - L.bottom, rt = gt = m(rt, $, $ + L.width)) : (rt = $, gt = q - L.right, ct = dt = m(ct, Q, Q + L.height)) : (ht = !0, nt = !1), at.path = ht && !nt ? null : z.renderer.crispLine([["M", rt, ct], ["L", gt, dt]], Y || 1);
}), g.path;
}, X.prototype.getLinearTickPositions = function(g, m, L) {
var z = R(Math.floor(m / g) * g);
L = R(Math.ceil(L / g) * g);
var $ = [], Q;
if (R(z + g) === z && (Q = 20), this.single)
return [m];
for (m = z; m <= L && ($.push(m), m = R(m + g, Q), m !== A); )
var A = m;
return $;
}, X.prototype.getMinorTickInterval = function() {
var g = this.options;
return g.minorTicks === !0 ? P(g.minorTickInterval, "auto") : g.minorTicks === !1 ? null : g.minorTickInterval;
}, X.prototype.getMinorTickPositions = function() {
var g = this.options, m = this.tickPositions, L = this.minorTickInterval, z = this.pointRangePadding || 0, $ = this.min - z;
z = this.max + z;
var Q = z - $, A = [];
if (Q && Q / L < this.len / 3) {
var H = this.logarithmic;
if (H)
this.paddedTicks.forEach(function(Y, Z, q) {
Z && A.push.apply(
A,
H.getLogTickPositions(L, q[Z - 1], q[Z], !0)
);
});
else if (this.dateTime && this.getMinorTickInterval() === "auto")
A = A.concat(this.getTimeTicks(this.dateTime.normalizeTimeTickInterval(L), $, z, g.startOfWeek));
else
for (g = $ + (m[0] - $) % L; g <= z && g !== A[0]; g += L)
A.push(g);
}
return A.length !== 0 && this.trimTicks(A), A;
}, X.prototype.adjustForMinRange = function() {
var g = this.options, m = this.logarithmic, L = this.min, z = this.max, $ = 0, Q, A, H, Y;
if (this.isXAxis && typeof this.minRange > "u" && !m && (k(g.min) || k(g.max) || k(g.floor) || k(g.ceiling) ? this.minRange = null : (this.series.forEach(function(et) {
if (H = et.xData, Y = et.xIncrement ? 1 : H.length - 1, 1 < H.length)
for (Q = Y; 0 < Q; Q--)
A = H[Q] - H[Q - 1], (!$ || A < $) && ($ = A);
}), this.minRange = Math.min(5 * $, this.dataMax - this.dataMin))), z - L < this.minRange) {
var Z = this.dataMax - this.dataMin >= this.minRange, q = this.minRange, it = (q - z + L) / 2;
it = [L - it, P(g.min, L - it)], Z && (it[2] = this.logarithmic ? this.logarithmic.log2lin(this.dataMin) : this.dataMin), L = l(it), z = [L + q, P(g.max, L + q)], Z && (z[2] = m ? m.log2lin(this.dataMax) : this.dataMax), z = T(z), z - L < q && (it[0] = z - q, it[1] = P(g.min, z - q), L = l(it));
}
this.min = L, this.max = z;
}, X.prototype.getClosest = function() {
var g;
return this.categories ? g = 1 : this.series.forEach(function(m) {
var L = m.closestPointRange, z = m.visible || !m.chart.options.chart.ignoreHiddenSeries;
!m.noSharedTooltip && k(L) && z && (g = k(g) ? Math.min(g, L) : L);
}), g;
}, X.prototype.nameToX = function(g) {
var m = i(this.categories), L = m ? this.categories : this.names, z = g.options.x;
if (g.series.requireSorting = !1, k(z) || (z = this.options.uniqueNames ? m ? L.indexOf(g.name) : P(L.keys[g.name], -1) : g.series.autoIncrement()), z === -1) {
if (!m)
var $ = L.length;
} else
$ = z;
return typeof $ < "u" && (this.names[$] = g.name, this.names.keys[g.name] = $), $;
}, X.prototype.updateNames = function() {
var g = this, m = this.names;
0 < m.length && (Object.keys(m.keys).forEach(function(L) {
delete m.keys[L];
}), m.length = 0, this.minRange = this.userMinRange, (this.series || []).forEach(function(L) {
L.xIncrement = null, (!L.points || L.isDirtyData) && (g.max = Math.max(g.max, L.xData.length - 1), L.processData(), L.generatePoints()), L.data.forEach(function(z, $) {
if (z && z.options && typeof z.name < "u") {
var Q = g.nameToX(z);
typeof Q < "u" && Q !== z.x && (z.x = Q, L.xData[$] = Q);
}
});
}));
}, X.prototype.setAxisTranslation = function() {
var g = this, m = g.max - g.min, L = g.linkedParent, z = !!g.categories, $ = g.isXAxis, Q = g.axisPointRange || 0, A = 0, H = 0, Y = g.transA;
if ($ || z || Q) {
var Z = g.getClosest();
L ? (A = L.minPointOffset, H = L.pointRangePadding) : g.series.forEach(function(q) {
var it = z ? 1 : $ ? P(q.options.pointRange, Z, 0) : g.axisPointRange || 0, et = q.options.pointPlacement;
Q = Math.max(Q, it), (!g.single || z) && (q = q.is("xrange") ? !$ : $, A = Math.max(A, q && a(et) ? 0 : it / 2), H = Math.max(H, q && et === "on" ? 0 : it));
}), L = g.ordinal && g.ordinal.slope && Z ? g.ordinal.slope / Z : 1, g.minPointOffset = A *= L, g.pointRangePadding = H *= L, g.pointRange = Math.min(Q, g.single && z ? 1 : m), $ && (g.closestPointRange = Z);
}
g.translationSlope = g.transA = Y = g.staticScale || g.len / (m + H || 1), g.transB = g.horiz ? g.left : g.bottom, g.minPixelPadding = Y * A, c(this, "afterSetAxisTranslation");
}, X.prototype.minFromRange = function() {
return this.max - this.range;
}, X.prototype.setTickInterval = function(g) {
var m = this.chart, L = this.logarithmic, z = this.options, $ = this.isXAxis, Q = this.isLinked, A = z.tickPixelInterval, H = this.categories, Y = this.softThreshold, Z = z.maxPadding, q = z.minPadding, it = p(z.tickInterval) && 0 <= z.tickInterval ? z.tickInterval : void 0, et = p(this.threshold) ? this.threshold : null;
this.dateTime || H || Q || this.getTickAmount();
var nt = P(this.userMin, z.min), rt = P(this.userMax, z.max);
if (Q) {
this.linkedParent = m[this.coll][z.linkedTo];
var ct = this.linkedParent.getExtremes();
this.min = P(ct.min, ct.dataMin), this.max = P(ct.max, ct.dataMax), z.type !== this.linkedParent.options.type && v(11, 1, m);
} else {
if (Y && k(et)) {
if (this.dataMin >= et)
ct = et, q = 0;
else if (this.dataMax <= et) {
var gt = et;
Z = 0;
}
}
this.min = P(nt, ct, this.dataMin), this.max = P(rt, gt, this.dataMax);
}
if (L && (this.positiveValuesOnly && !g && 0 >= Math.min(this.min, P(this.dataMin, this.min)) && v(10, 1, m), this.min = R(L.log2lin(this.min), 16), this.max = R(L.log2lin(this.max), 16)), this.range && k(this.max) && (this.userMin = this.min = nt = Math.max(this.dataMin, this.minFromRange()), this.userMax = rt = this.max, this.range = null), c(this, "foundExtremes"), this.beforePadding && this.beforePadding(), this.adjustForMinRange(), !(H || this.axisPointRange || this.stacking && this.stacking.usePercentage || Q) && k(this.min) && k(this.max) && (m = this.max - this.min) && (!k(nt) && q && (this.min -= m * q), !k(rt) && Z && (this.max += m * Z)), p(this.userMin) || (p(z.softMin) && z.softMin < this.min && (this.min = nt = z.softMin), p(z.floor) && (this.min = Math.max(this.min, z.floor))), p(this.userMax) || (p(z.softMax) && z.softMax > this.max && (this.max = rt = z.softMax), p(z.ceiling) && (this.max = Math.min(this.max, z.ceiling))), Y && k(this.dataMin) && (et = et || 0, !k(nt) && this.min < et && this.dataMin >= et ? this.min = this.options.minRange ? Math.min(et, this.max - this.minRange) : et : !k(rt) && this.max > et && this.dataMax <= et && (this.max = this.options.minRange ? Math.max(et, this.min + this.minRange) : et)), p(this.min) && p(this.max) && !this.chart.polar && this.min > this.max && (k(this.options.min) ? this.max = this.min : k(this.options.max) && (this.min = this.max)), this.tickInterval = this.min === this.max || typeof this.min > "u" || typeof this.max > "u" ? 1 : Q && this.linkedParent && !it && A === this.linkedParent.options.tickPixelInterval ? it = this.linkedParent.tickInterval : P(it, this.tickAmount ? (this.max - this.min) / Math.max(this.tickAmount - 1, 1) : void 0, H ? 1 : (this.max - this.min) * A / Math.max(this.len, A)), $ && !g) {
var dt = this.min !== (this.old && this.old.min) || this.max !== (this.old && this.old.max);
this.series.forEach(function(ht) {
ht.forceCrop = ht.forceCropping && ht.forceCropping(), ht.processData(dt);
}), c(this, "postProcessData", { hasExtemesChanged: dt });
}
this.setAxisTranslation(), c(this, "initialAxisTranslation"), this.pointRange && !it && (this.tickInterval = Math.max(this.pointRange, this.tickInterval)), g = P(z.minTickInterval, this.dateTime && !this.series.some(function(ht) {
return ht.noSharedTooltip;
}) ? this.closestPointRange : 0), !it && this.tickInterval < g && (this.tickInterval = g), this.dateTime || this.logarithmic || it || (this.tickInterval = s(this.tickInterval, void 0, u(this.tickInterval), P(z.allowDecimals, 0.5 > this.tickInterval || this.tickAmount !== void 0), !!this.tickAmount)), this.tickAmount || (this.tickInterval = this.unsquish()), this.setTickPositions();
}, X.prototype.setTickPositions = function() {
var g = this.options, m = g.tickPositions, L = this.getMinorTickInterval(), z = this.hasVerticalPanning(), $ = this.coll === "colorAxis", Q = ($ || !z) && g.startOnTick;
z = ($ || !z) && g.endOnTick, $ = g.tickPositioner, this.tickmarkOffset = this.categories && g.tickmarkPlacement === "between" && this.tickInterval === 1 ? 0.5 : 0, this.minorTickInterval = L === "auto" && this.tickInterval ? this.tickInterval / 5 : L, this.single = this.min === this.max && k(this.min) && !this.tickAmount && (parseInt(this.min, 10) === this.min || g.allowDecimals !== !1), this.tickPositions = L = m && m.slice(), !L && (this.ordinal && this.ordinal.positions || !((this.max - this.min) / this.tickInterval > Math.max(2 * this.len, 200)) ? L = this.dateTime ? this.getTimeTicks(this.dateTime.normalizeTimeTickInterval(this.tickInterval, g.units), this.min, this.max, g.startOfWeek, this.ordinal && this.ordinal.positions, this.closestPointRange, !0) : this.logarithmic ? this.logarithmic.getLogTickPositions(this.tickInterval, this.min, this.max) : this.getLinearTickPositions(
this.tickInterval,
this.min,
this.max
) : (L = [this.min, this.max], v(19, !1, this.chart)), L.length > this.len && (L = [L[0], L.pop()], L[0] === L[1] && (L.length = 1)), this.tickPositions = L, $ && ($ = $.apply(this, [this.min, this.max]))) && (this.tickPositions = L = $), this.paddedTicks = L.slice(0), this.trimTicks(L, Q, z), this.isLinked || (this.single && 2 > L.length && !this.categories && !this.series.some(function(A) {
return A.is("heatmap") && A.options.pointPlacement === "between";
}) && (this.min -= 0.5, this.max += 0.5), m || $ || this.adjustTickAmount()), c(this, "afterSetTickPositions");
}, X.prototype.trimTicks = function(g, m, L) {
var z = g[0], $ = g[g.length - 1], Q = !this.isOrdinal && this.minPointOffset || 0;
if (c(this, "trimTicks"), !this.isLinked) {
if (m && z !== -1 / 0)
this.min = z;
else
for (; this.min - Q > g[0]; )
g.shift();
if (L)
this.max = $;
else
for (; this.max + Q < g[g.length - 1]; )
g.pop();
g.length === 0 && k(z) && !this.options.tickPositions && g.push(($ + z) / 2);
}
}, X.prototype.alignToOthers = function() {
var g = {}, m = this.options, L;
return this.chart.options.chart.alignTicks !== !1 && m.alignTicks && m.startOnTick !== !1 && m.endOnTick !== !1 && !this.logarithmic && this.chart[this.coll].forEach(function(z) {
var $ = z.options;
$ = [z.horiz ? $.left : $.top, $.width, $.height, $.pane].join(), z.series.length && (g[$] ? L = !0 : g[$] = 1);
}), L;
}, X.prototype.getTickAmount = function() {
var g = this.options, m = g.tickPixelInterval, L = g.tickAmount;
!k(g.tickInterval) && !L && this.len < m && !this.isRadial && !this.logarithmic && g.startOnTick && g.endOnTick && (L = 2), !L && this.alignToOthers() && (L = Math.ceil(this.len / m) + 1), 4 > L && (this.finalTickAmt = L, L = 5), this.tickAmount = L;
}, X.prototype.adjustTickAmount = function() {
var g = this.options, m = this.tickInterval, L = this.tickPositions, z = this.tickAmount, $ = this.finalTickAmt, Q = L && L.length, A = P(this.threshold, this.softThreshold ? 0 : null);
if (this.hasData() && p(this.min) && p(this.max)) {
if (Q < z) {
for (; L.length < z; )
L.length % 2 || this.min === A ? L.push(R(L[L.length - 1] + m)) : L.unshift(R(L[0] - m));
this.transA *= (Q - 1) / (z - 1), this.min = g.startOnTick ? L[0] : Math.min(this.min, L[0]), this.max = g.endOnTick ? L[L.length - 1] : Math.max(this.max, L[L.length - 1]);
} else
Q > z && (this.tickInterval *= 2, this.setTickPositions());
if (k($)) {
for (m = g = L.length; m--; )
($ === 3 && m % 2 === 1 || 2 >= $ && 0 < m && m < g - 1) && L.splice(m, 1);
this.finalTickAmt = void 0;
}
}
}, X.prototype.setScale = function() {
var g = !1, m = !1;
this.series.forEach(function(z) {
g = g || z.isDirtyData || z.isDirty, m = m || z.xAxis && z.xAxis.isDirty || !1;
}), this.setAxisSize();
var L = this.len !== (this.old && this.old.len);
L || g || m || this.isLinked || this.forceRedraw || this.userMin !== (this.old && this.old.userMin) || this.userMax !== (this.old && this.old.userMax) || this.alignToOthers() ? (this.stacking && this.stacking.resetStacks(), this.forceRedraw = !1, this.getSeriesExtremes(), this.setTickInterval(), this.isDirty || (this.isDirty = L || this.min !== (this.old && this.old.min) || this.max !== (this.old && this.old.max))) : this.stacking && this.stacking.cleanStacks(), g && this.panningState && (this.panningState.isDirty = !0), c(this, "afterSetScale");
}, X.prototype.setExtremes = function(g, m, L, z, $) {
var Q = this, A = Q.chart;
L = P(L, !0), Q.series.forEach(function(H) {
delete H.kdTree;
}), $ = h($, { min: g, max: m }), c(Q, "setExtremes", $, function() {
Q.userMin = g, Q.userMax = m, Q.eventArgs = $, L && A.redraw(z);
});
}, X.prototype.zoom = function(g, m) {
var L = this, z = this.dataMin, $ = this.dataMax, Q = this.options, A = Math.min(z, P(Q.min, z)), H = Math.max($, P(Q.max, $));
return g = { newMin: g, newMax: m }, c(this, "zoom", g, function(Y) {
var Z = Y.newMin, q = Y.newMax;
(Z !== L.min || q !== L.max) && (L.allowZoomOutside || (k(z) && (Z < A && (Z = A), Z > H && (Z = H)), k($) && (q < A && (q = A), q > H && (q = H))), L.displayBtn = typeof Z < "u" || typeof q < "u", L.setExtremes(Z, q, !1, void 0, { trigger: "zoom" })), Y.zoomed = !0;
}), g.zoomed;
}, X.prototype.setAxisSize = function() {
var g = this.chart, m = this.options, L = m.offsets || [0, 0, 0, 0], z = this.horiz, $ = this.width = Math.round(D(P(m.width, g.plotWidth - L[3] + L[1]), g.plotWidth)), Q = this.height = Math.round(D(P(m.height, g.plotHeight - L[0] + L[2]), g.plotHeight)), A = this.top = Math.round(D(P(m.top, g.plotTop + L[0]), g.plotHeight, g.plotTop));
m = this.left = Math.round(D(P(m.left, g.plotLeft + L[3]), g.plotWidth, g.plotLeft)), this.bottom = g.chartHeight - Q - A, this.right = g.chartWidth - $ - m, this.len = Math.max(z ? $ : Q, 0), this.pos = z ? m : A;
}, X.prototype.getExtremes = function() {
var g = this.logarithmic;
return { min: g ? R(g.lin2log(this.min)) : this.min, max: g ? R(g.lin2log(this.max)) : this.max, dataMin: this.dataMin, dataMax: this.dataMax, userMin: this.userMin, userMax: this.userMax };
}, X.prototype.getThreshold = function(g) {
var m = this.logarithmic, L = m ? m.lin2log(this.min) : this.min;
return m = m ? m.lin2log(this.max) : this.max, g === null || g === -1 / 0 ? g = L : g === 1 / 0 ? g = m : L > g ? g = L : m < g && (g = m), this.translate(g, 0, 1, 0, 1);
}, X.prototype.autoLabelAlign = function(g) {
var m = (P(g, 0) - 90 * this.side + 720) % 360;
return g = { align: "center" }, c(
this,
"autoLabelAlign",
g,
function(L) {
15 < m && 165 > m ? L.align = "right" : 195 < m && 345 > m && (L.align = "left");
}
), g.align;
}, X.prototype.tickSize = function(g) {
var m = this.options, L = P(m[g === "tick" ? "tickWidth" : "minorTickWidth"], g === "tick" && this.isXAxis && !this.categories ? 1 : 0), z = m[g === "tick" ? "tickLength" : "minorTickLength"];
if (L && z) {
m[g + "Position"] === "inside" && (z = -z);
var $ = [z, L];
}
return g = { tickSize: $ }, c(this, "afterTickSize", g), g.tickSize;
}, X.prototype.labelMetrics = function() {
var g = this.tickPositions && this.tickPositions[0] || 0;
return this.chart.renderer.fontMetrics(
this.options.labels.style.fontSize,
this.ticks[g] && this.ticks[g].label
);
}, X.prototype.unsquish = function() {
var g = this.options.labels, m = this.horiz, L = this.tickInterval, z = this.len / (((this.categories ? 1 : 0) + this.max - this.min) / L), $ = g.rotation, Q = this.labelMetrics(), A = Math.max(this.max - this.min, 0), H = function(nt) {
var rt = nt / (z || 1);
return rt = 1 < rt ? Math.ceil(rt) : 1, rt * L > A && nt !== 1 / 0 && z !== 1 / 0 && A && (rt = Math.ceil(A / L)), R(rt * L);
}, Y = L, Z, q, it = Number.MAX_VALUE;
if (m) {
if (!g.staggerLines && !g.step)
if (p($))
var et = [$];
else
z < g.autoRotationLimit && (et = g.autoRotation);
et && et.forEach(function(nt) {
if (nt === $ || nt && -90 <= nt && 90 >= nt) {
q = H(Math.abs(Q.h / Math.sin(f * nt)));
var rt = q + Math.abs(nt / 360);
rt < it && (it = rt, Z = nt, Y = q);
}
});
} else
g.step || (Y = H(Q.h));
return this.autoRotation = et, this.labelRotation = P(Z, p($) ? $ : 0), Y;
}, X.prototype.getSlotWidth = function(g) {
var m = this.chart, L = this.horiz, z = this.options.labels, $ = Math.max(this.tickPositions.length - (this.categories ? 0 : 1), 1), Q = m.margin[3];
if (g && p(g.slotWidth))
return g.slotWidth;
if (L && 2 > z.step)
return z.rotation ? 0 : (this.staggerLines || 1) * this.len / $;
if (!L) {
if (g = z.style.width, g !== void 0)
return parseInt(String(g), 10);
if (Q)
return Q - m.spacing[3];
}
return 0.33 * m.chartWidth;
}, X.prototype.renderUnsquish = function() {
var g = this.chart, m = g.renderer, L = this.tickPositions, z = this.ticks, $ = this.options.labels, Q = $.style, A = this.horiz, H = this.getSlotWidth(), Y = Math.max(1, Math.round(H - 2 * $.padding)), Z = {}, q = this.labelMetrics(), it = Q.textOverflow, et = 0;
if (a($.rotation) || (Z.rotation = $.rotation || 0), L.forEach(function(gt) {
gt = z[gt], gt.movedLabel && gt.replaceMovedLabel(), gt && gt.label && gt.label.textPxLength > et && (et = gt.label.textPxLength);
}), this.maxLabelLength = et, this.autoRotation)
et > Y && et > q.h ? Z.rotation = this.labelRotation : this.labelRotation = 0;
else if (H) {
var nt = Y;
if (!it) {
var rt = "clip";
for (Y = L.length; !A && Y--; ) {
var ct = L[Y];
(ct = z[ct].label) && (ct.styles && ct.styles.textOverflow === "ellipsis" ? ct.css({ textOverflow: "clip" }) : ct.textPxLength > H && ct.css({ width: H + "px" }), ct.getBBox().height > this.len / L.length - (q.h - q.f) && (ct.specificTextOverflow = "ellipsis"));
}
}
}
Z.rotation && (nt = et > 0.5 * g.chartHeight ? 0.33 * g.chartHeight : et, it || (rt = "ellipsis")), (this.labelAlign = $.align || this.autoLabelAlign(this.labelRotation)) && (Z.align = this.labelAlign), L.forEach(function(gt) {
var dt = (gt = z[gt]) && gt.label, ht = Q.width, at = {};
dt && (dt.attr(Z), gt.shortenLabel ? gt.shortenLabel() : nt && !ht && Q.whiteSpace !== "nowrap" && (nt < dt.textPxLength || dt.element.tagName === "SPAN") ? (at.width = nt + "px", it || (at.textOverflow = dt.specificTextOverflow || rt), dt.css(at)) : dt.styles && dt.styles.width && !at.width && !ht && dt.css({ width: null }), delete dt.specificTextOverflow, gt.rotation = Z.rotation);
}, this), this.tickRotCorr = m.rotCorr(q.b, this.labelRotation || 0, this.side !== 0);
}, X.prototype.hasData = function() {
return this.series.some(function(g) {
return g.hasData();
}) || this.options.showEmpty && k(this.min) && k(this.max);
}, X.prototype.addTitle = function(g) {
var m = this.chart.renderer, L = this.horiz, z = this.opposite, $ = this.options.title, Q = this.chart.styledMode, A;
this.axisTitle || ((A = $.textAlign) || (A = (L ? { low: "left", middle: "center", high: "right" } : { low: z ? "right" : "left", middle: "center", high: z ? "left" : "right" })[$.align]), this.axisTitle = m.text($.text || "", 0, 0, $.useHTML).attr({ zIndex: 7, rotation: $.rotation, align: A }).addClass("highcharts-axis-title"), Q || this.axisTitle.css(t($.style)), this.axisTitle.add(this.axisGroup), this.axisTitle.isNew = !0), Q || $.style.width || this.isRadial || this.axisTitle.css({ width: this.len + "px" }), this.axisTitle[g ? "show" : "hide"](g);
}, X.prototype.generateTick = function(g) {
var m = this.ticks;
m[g] ? m[g].addLabel() : m[g] = new F(this, g);
}, X.prototype.getOffset = function() {
var g = this, m = this, L = m.chart, z = m.horiz, $ = m.options, Q = m.side, A = m.ticks, H = m.tickPositions, Y = m.coll, Z = m.axisParent, q = L.renderer, it = L.inverted && !m.isZAxis ? [1, 0, 3, 2][Q] : Q, et = m.hasData(), nt = $.title, rt = $.labels, ct = L.axisOffset;
L = L.clipOffset;
var gt = [
-1,
1,
1,
-1
][Q], dt = $.className, ht, at = 0, J = 0, tt = 0;
if (m.showAxis = ht = et || $.showEmpty, m.staggerLines = m.horiz && rt.staggerLines || void 0, !m.axisGroup) {
var ot = function(pt, yt, vt) {
return q.g(pt).attr({ zIndex: vt }).addClass("highcharts-" + Y.toLowerCase() + yt + " " + (g.isRadial ? "highcharts-radial-axis" + yt + " " : "") + (dt || "")).add(Z);
};
m.gridGroup = ot("grid", "-grid", $.gridZIndex), m.axisGroup = ot("axis", "", $.zIndex), m.labelGroup = ot("axis-labels", "-labels", rt.zIndex);
}
if (et || m.isLinked ? (H.forEach(function(pt) {
m.generateTick(pt);
}), m.renderUnsquish(), m.reserveSpaceDefault = Q === 0 || Q === 2 || { 1: "left", 3: "right" }[Q] === m.labelAlign, P(rt.reserveSpace, m.labelAlign === "center" ? !0 : null, m.reserveSpaceDefault) && H.forEach(function(pt) {
tt = Math.max(A[pt].getLabelSize(), tt);
}), m.staggerLines && (tt *= m.staggerLines), m.labelOffset = tt * (m.opposite ? -1 : 1)) : n(A, function(pt, yt) {
pt.destroy(), delete A[yt];
}), nt && nt.text && nt.enabled !== !1 && (m.addTitle(ht), ht && nt.reserveSpace !== !1)) {
m.titleOffset = at = m.axisTitle.getBBox()[z ? "height" : "width"];
var lt = nt.offset;
J = k(lt) ? 0 : P(nt.margin, z ? 5 : 10);
}
m.renderLine(), m.offset = gt * P(
$.offset,
ct[Q] ? ct[Q] + ($.margin || 0) : 0
), m.tickRotCorr = m.tickRotCorr || { x: 0, y: 0 }, nt = Q === 0 ? -m.labelMetrics().h : Q === 2 ? m.tickRotCorr.y : 0, et = Math.abs(tt) + J, tt && (et = et - nt + gt * (z ? P(rt.y, m.tickRotCorr.y + 8 * gt) : rt.x)), m.axisTitleMargin = P(lt, et), m.getMaxLabelDimensions && (m.maxLabelDimensions = m.getMaxLabelDimensions(A, H)), Y !== "colorAxis" && (z = this.tickSize("tick"), ct[Q] = Math.max(ct[Q], (m.axisTitleMargin || 0) + at + gt * m.offset, et, H && H.length && z ? z[0] + gt * m.offset : 0), $ = !m.axisLine || $.offset ? 0 : 2 * Math.floor(m.axisLine.strokeWidth() / 2), L[it] = Math.max(
L[it],
$
)), c(this, "afterGetOffset");
}, X.prototype.getLinePath = function(g) {
var m = this.chart, L = this.opposite, z = this.offset, $ = this.horiz, Q = this.left + (L ? this.width : 0) + z;
return z = m.chartHeight - this.bottom - (L ? this.height : 0) + z, L && (g *= -1), m.renderer.crispLine([["M", $ ? this.left : Q, $ ? z : this.top], ["L", $ ? m.chartWidth - this.right : Q, $ ? z : m.chartHeight - this.bottom]], g);
}, X.prototype.renderLine = function() {
this.axisLine || (this.axisLine = this.chart.renderer.path().addClass("highcharts-axis-line").add(this.axisGroup), this.chart.styledMode || this.axisLine.attr({ stroke: this.options.lineColor, "stroke-width": this.options.lineWidth, zIndex: 7 }));
}, X.prototype.getTitlePosition = function() {
var g = this.horiz, m = this.left, L = this.top, z = this.len, $ = this.options.title, Q = g ? m : L, A = this.opposite, H = this.offset, Y = $.x, Z = $.y, q = this.axisTitle, it = this.chart.renderer.fontMetrics($.style.fontSize, q);
return q = Math.max(q.getBBox(null, 0).height - it.h - 1, 0), z = { low: Q + (g ? 0 : z), middle: Q + z / 2, high: Q + (g ? z : 0) }[$.align], m = (g ? L + this.height : m) + (g ? 1 : -1) * (A ? -1 : 1) * this.axisTitleMargin + [
-q,
q,
it.f,
-q
][this.side], g = { x: g ? z + Y : m + (A ? this.width : 0) + H + Y, y: g ? m + Z - (A ? this.height : 0) + H : z + Z }, c(this, "afterGetTitlePosition", { titlePosition: g }), g;
}, X.prototype.renderMinorTick = function(g, m) {
var L = this.minorTicks;
L[g] || (L[g] = new F(this, g, "minor")), m && L[g].isNew && L[g].render(null, !0), L[g].render(null, !1, 1);
}, X.prototype.renderTick = function(g, m, L) {
var z = this.ticks;
(!this.isLinked || g >= this.min && g <= this.max || this.grid && this.grid.isColumn) && (z[g] || (z[g] = new F(this, g)), L && z[g].isNew && z[g].render(m, !0, -1), z[g].render(m));
}, X.prototype.render = function() {
var g = this, m = g.chart, L = g.logarithmic, z = g.options, $ = g.isLinked, Q = g.tickPositions, A = g.axisTitle, H = g.ticks, Y = g.minorTicks, Z = g.alternateBands, q = z.stackLabels, it = z.alternateGridColor, et = g.tickmarkOffset, nt = g.axisLine, rt = g.showAxis, ct = j(m.renderer.globalAnimation), gt, dt;
if (g.labelEdge.length = 0, g.overlap = !1, [H, Y, Z].forEach(function(at) {
n(at, function(J) {
J.isActive = !1;
});
}), g.hasData() || $) {
var ht = g.chart.hasRendered && g.old && p(g.old.min);
g.minorTickInterval && !g.categories && g.getMinorTickPositions().forEach(function(at) {
g.renderMinorTick(
at,
ht
);
}), Q.length && (Q.forEach(function(at, J) {
g.renderTick(at, J, ht);
}), et && (g.min === 0 || g.single) && (H[-1] || (H[-1] = new F(g, -1, null, !0)), H[-1].render(-1))), it && Q.forEach(function(at, J) {
dt = typeof Q[J + 1] < "u" ? Q[J + 1] + et : g.max - et, J % 2 === 0 && at < g.max && dt <= g.max + (m.polar ? -et : et) && (Z[at] || (Z[at] = new V.PlotLineOrBand(g)), gt = at + et, Z[at].options = { from: L ? L.lin2log(gt) : gt, to: L ? L.lin2log(dt) : dt, color: it, className: "highcharts-alternate-grid" }, Z[at].render(), Z[at].isActive = !0);
}), g._addedPlotLB || (g._addedPlotLB = !0, (z.plotLines || []).concat(z.plotBands || []).forEach(function(at) {
g.addPlotBandOrLine(at);
}));
}
[H, Y, Z].forEach(function(at) {
var J = [], tt = ct.duration;
n(at, function(ot, lt) {
ot.isActive || (ot.render(lt, !1, 0), ot.isActive = !1, J.push(lt));
}), E(function() {
for (var ot = J.length; ot--; )
at[J[ot]] && !at[J[ot]].isActive && (at[J[ot]].destroy(), delete at[J[ot]]);
}, at !== Z && m.hasRendered && tt ? tt : 0);
}), nt && (nt[nt.isPlaced ? "animate" : "attr"]({ d: this.getLinePath(nt.strokeWidth()) }), nt.isPlaced = !0, nt[rt ? "show" : "hide"](rt)), A && rt && (z = g.getTitlePosition(), p(z.y) ? (A[A.isNew ? "attr" : "animate"](z), A.isNew = !1) : (A.attr(
"y",
-9999
), A.isNew = !0)), q && q.enabled && g.stacking && g.stacking.renderStackTotals(), g.old = { len: g.len, max: g.max, min: g.min, transA: g.transA, userMax: g.userMax, userMin: g.userMin }, g.isDirty = !1, c(this, "afterRender");
}, X.prototype.redraw = function() {
this.visible && (this.render(), this.plotLinesAndBands.forEach(function(g) {
g.render();
})), this.series.forEach(function(g) {
g.isDirty = !0;
});
}, X.prototype.getKeepProps = function() {
return this.keepProps || X.keepProps;
}, X.prototype.destroy = function(g) {
var m = this, L = m.plotLinesAndBands, z = this.eventOptions;
if (c(this, "destroy", { keepEvents: g }), g || I(m), [m.ticks, m.minorTicks, m.alternateBands].forEach(function(Q) {
b(Q);
}), L)
for (g = L.length; g--; )
L[g].destroy();
"axisLine axisTitle axisGroup gridGroup labelGroup cross scrollbar".split(" ").forEach(function(Q) {
m[Q] && (m[Q] = m[Q].destroy());
});
for (var $ in m.plotLinesAndBandsGroups)
m.plotLinesAndBandsGroups[$] = m.plotLinesAndBandsGroups[$].destroy();
n(m, function(Q, A) {
m.getKeepProps().indexOf(A) === -1 && delete m[A];
}), this.eventOptions = z;
}, X.prototype.drawCrosshair = function(g, m) {
var L = this.crosshair, z = P(L && L.snap, !0), $ = this.chart, Q, A = this.cross;
if (c(this, "drawCrosshair", { e: g, point: m }), g || (g = this.cross && this.cross.e), L && (k(m) || !z) !== !1) {
if (z ? k(m) && (Q = P(this.coll !== "colorAxis" ? m.crosshairPos : null, this.isXAxis ? m.plotX : this.len - m.plotY)) : Q = g && (this.horiz ? g.chartX - this.pos : this.len - g.chartY + this.pos), k(Q)) {
var H = { value: m && (this.isXAxis ? m.x : P(m.stackY, m.y)), translatedValue: Q };
$.polar && h(H, { isCrosshair: !0, chartX: g && g.chartX, chartY: g && g.chartY, point: m }), H = this.getPlotLinePath(H) || null;
}
if (!k(H)) {
this.hideCrosshair();
return;
}
z = this.categories && !this.isRadial, A || (this.cross = A = $.renderer.path().addClass("highcharts-crosshair highcharts-crosshair-" + (z ? "category " : "thin ") + (L.className || "")).attr({ zIndex: P(L.zIndex, 2) }).add(), $.styledMode || (A.attr({ stroke: L.color || (z ? _.parse("#ccd6eb").setOpacity(0.25).get() : "#cccccc"), "stroke-width": P(L.width, 1) }).css({ "pointer-events": "none" }), L.dashStyle && A.attr({ dashstyle: L.dashStyle }))), A.show().attr({ d: H }), z && !L.width && A.attr({ "stroke-width": this.transA }), this.cross.e = g;
} else
this.hideCrosshair();
c(this, "afterDrawCrosshair", { e: g, point: m });
}, X.prototype.hideCrosshair = function() {
this.cross && this.cross.hide(), c(this, "afterHideCrosshair");
}, X.prototype.hasVerticalPanning = function() {
var g = this.chart.options.chart.panning;
return !!(g && g.enabled && /y/.test(g.type));
}, X.prototype.validatePositiveValue = function(g) {
return p(g) && 0 < g;
}, X.prototype.update = function(g, m) {
var L = this.chart;
g = t(this.userOptions, g), this.destroy(!0), this.init(L, g), L.isDirtyBox = !0, P(m, !0) && L.redraw();
}, X.prototype.remove = function(g) {
for (var m = this.chart, L = this.coll, z = this.series, $ = z.length; $--; )
z[$] && z[$].remove(!1);
S(m.axes, this), S(m[L], this), m[L].forEach(function(Q, A) {
Q.options.index = Q.userOptions.index = A;
}), this.destroy(), m.isDirtyBox = !0, P(g, !0) && m.redraw();
}, X.prototype.setTitle = function(g, m) {
this.update({ title: g }, m);
}, X.prototype.setCategories = function(g, m) {
this.update({ categories: g }, m);
}, X.defaultOptions = N.defaultXAxisOptions, X.keepProps = "extKey hcEvents names series userMax userMin".split(" "), X;
}(), y;
}), C(o, "Core/Axis/DateTimeAxis.js", [o["Core/Utilities.js"]], function(y) {
var N = y.addEvent, _ = y.getMagnitude, U = y.normalizeTickInterval, G = y.timeUnits, V;
return function(F) {
function B() {
return this.chart.time.getTimeTicks.apply(this.chart.time, arguments);
}
function j(f) {
f.userOptions.type !== "datetime" ? this.dateTime = void 0 : this.dateTime || (this.dateTime = new x(this));
}
var w = [];
F.compose = function(f) {
return w.indexOf(f) === -1 && (w.push(f), f.keepProps.push("dateTime"), f.prototype.getTimeTicks = B, N(
f,
"init",
j
)), f;
};
var x = function() {
function f(l) {
this.axis = l;
}
return f.prototype.normalizeTimeTickInterval = function(l, T) {
var O = T || [["millisecond", [1, 2, 5, 10, 20, 25, 50, 100, 200, 500]], ["second", [1, 2, 5, 10, 15, 30]], ["minute", [1, 2, 5, 10, 15, 30]], ["hour", [1, 2, 3, 4, 6, 8, 12]], ["day", [1, 2]], ["week", [1, 2]], ["month", [1, 2, 3, 4, 6]], ["year", null]];
T = O[O.length - 1];
var R = G[T[0]], k = T[1], b;
for (b = 0; b < O.length && (T = O[b], R = G[T[0]], k = T[1], !(O[b + 1] && l <= (R * k[k.length - 1] + G[O[b + 1][0]]) / 2)); b++)
;
return R === G.year && l < 5 * R && (k = [1, 2, 5]), l = U(l / R, k, T[0] === "year" ? Math.max(_(l / R), 1) : 1), { unitRange: R, count: l, unitName: T[0] };
}, f.prototype.getXDateFormat = function(l, T) {
var O = this.axis;
return O.closestPointRange ? O.chart.time.getDateFormat(O.closestPointRange, l, O.options.startOfWeek, T) || T.year : T.day;
}, f;
}();
F.Additions = x;
}(V || (V = {})), V;
}), C(o, "Core/Axis/LogarithmicAxis.js", [o["Core/Utilities.js"]], function(y) {
var N = y.addEvent, _ = y.getMagnitude, U = y.normalizeTickInterval, G = y.pick, V;
return function(F) {
function B(f) {
var l = this.logarithmic;
f.userOptions.type !== "logarithmic" ? this.logarithmic = void 0 : l || (this.logarithmic = new x(this));
}
function j() {
var f = this.logarithmic;
f && (this.lin2val = function(l) {
return f.lin2log(l);
}, this.val2lin = function(l) {
return f.log2lin(l);
});
}
var w = [];
F.compose = function(f) {
return w.indexOf(f) === -1 && (w.push(f), f.keepProps.push("logarithmic"), N(f, "init", B), N(f, "afterInit", j)), f;
};
var x = function() {
function f(l) {
this.axis = l;
}
return f.prototype.getLogTickPositions = function(l, T, O, R) {
var k = this.axis, b = k.len, S = k.options, v = [];
if (R || (this.minorAutoInterval = void 0), 0.5 <= l)
l = Math.round(l), v = k.getLinearTickPositions(l, T, O);
else if (0.08 <= l) {
var h = Math.floor(T), c, u = S = void 0;
for (b = 0.3 < l ? [1, 2, 4] : 0.15 < l ? [1, 2, 4, 6, 8] : [1, 2, 3, 4, 5, 6, 7, 8, 9]; h < O + 1 && !u; h++) {
var i = b.length;
for (c = 0; c < i && !u; c++) {
var p = this.log2lin(this.lin2log(h) * b[c]);
p > T && (!R || S <= O) && typeof S < "u" && v.push(S), S > O && (u = !0), S = p;
}
}
} else
T = this.lin2log(T), O = this.lin2log(O), l = R ? k.getMinorTickInterval() : S.tickInterval, l = G(l === "auto" ? null : l, this.minorAutoInterval, S.tickPixelInterval / (R ? 5 : 1) * (O - T) / ((R ? b / k.tickPositions.length : b) || 1)), l = U(l, void 0, _(l)), v = k.getLinearTickPositions(l, T, O).map(this.log2lin), R || (this.minorAutoInterval = l / 5);
return R || (k.tickInterval = l), v;
}, f.prototype.lin2log = function(l) {
return Math.pow(10, l);
}, f.prototype.log2lin = function(l) {
return Math.log(l) / Math.LN10;
}, f;
}();
F.Additions = x;
}(V || (V = {})), V;
}), C(o, "Core/Axis/PlotLineOrBand/PlotLineOrBandAxis.js", [o["Core/Utilities.js"]], function(y) {
var N = y.erase, _ = y.extend, U = y.isNumber, G;
return function(V) {
var F = [], B;
V.compose = function(w, x) {
return B || (B = w), F.indexOf(x) === -1 && (F.push(x), _(x.prototype, j.prototype)), x;
};
var j = function() {
function w() {
}
return w.prototype.getPlotBandPath = function(x, f, l) {
l === void 0 && (l = this.options);
var T = this.getPlotLinePath({ value: f, force: !0, acrossPanes: l.acrossPanes }), O = [], R = this.horiz;
if (f = !U(this.min) || !U(this.max) || x < this.min && f < this.min || x > this.max && f > this.max, x = this.getPlotLinePath({ value: x, force: !0, acrossPanes: l.acrossPanes }), l = 1, x && T) {
if (f) {
var k = x.toString() === T.toString();
l = 0;
}
for (f = 0; f < x.length; f += 2) {
var b = x[f], S = x[f + 1], v = T[f], h = T[f + 1];
b[0] !== "M" && b[0] !== "L" || S[0] !== "M" && S[0] !== "L" || v[0] !== "M" && v[0] !== "L" || h[0] !== "M" && h[0] !== "L" || (R && v[1] === b[1] ? (v[1] += l, h[1] += l) : R || v[2] !== b[2] || (v[2] += l, h[2] += l), O.push(["M", b[1], b[2]], ["L", S[1], S[2]], ["L", h[1], h[2]], ["L", v[1], v[2]], ["Z"])), O.isFlat = k;
}
}
return O;
}, w.prototype.addPlotBand = function(x) {
return this.addPlotBandOrLine(x, "plotBands");
}, w.prototype.addPlotLine = function(x) {
return this.addPlotBandOrLine(x, "plotLines");
}, w.prototype.addPlotBandOrLine = function(x, f) {
var l = this, T = this.userOptions, O = new B(this, x);
if (this.visible && (O = O.render()), O) {
if (this._addedPlotLB || (this._addedPlotLB = !0, (T.plotLines || []).concat(T.plotBands || []).forEach(function(k) {
l.addPlotBandOrLine(k);
})), f) {
var R = T[f] || [];
R.push(x), T[f] = R;
}
this.plotLinesAndBands.push(O);
}
return O;
}, w.prototype.removePlotBandOrLine = function(x) {
var f = this.plotLinesAndBands, l = this.options, T = this.userOptions;
if (f) {
for (var O = f.length; O--; )
f[O].id === x && f[O].destroy();
[l.plotLines || [], T.plotLines || [], l.plotBands || [], T.plotBands || []].forEach(function(R) {
for (O = R.length; O--; )
(R[O] || {}).id === x && N(R, R[O]);
});
}
}, w.prototype.removePlotBand = function(x) {
this.removePlotBandOrLine(x);
}, w.prototype.removePlotLine = function(x) {
this.removePlotBandOrLine(x);
}, w;
}();
}(G || (G = {})), G;
}), C(o, "Core/Axis/PlotLineOrBand/PlotLineOrBand.js", [o["Core/Axis/PlotLineOrBand/PlotLineOrBandAxis.js"], o["Core/Utilities.js"]], function(y, N) {
var _ = N.arrayMax, U = N.arrayMin, G = N.defined, V = N.destroyObjectProperties, F = N.erase, B = N.fireEvent, j = N.merge, w = N.objectEach, x = N.pick;
return N = function() {
function f(l, T) {
this.axis = l, T && (this.options = T, this.id = T.id);
}
return f.compose = function(l) {
return y.compose(f, l);
}, f.prototype.render = function() {
B(this, "render");
var l = this, T = l.axis, O = T.horiz, R = T.logarithmic, k = l.options, b = k.color, S = x(k.zIndex, 0), v = k.events, h = {}, c = T.chart.renderer, u = k.label, i = l.label, p = k.to, a = k.from, t = k.value, s = l.svgElem, n = [], P = G(a) && G(p);
n = G(t);
var D = !s, I = { class: "highcharts-plot-" + (P ? "band " : "line ") + (k.className || "") }, W = P ? "bands" : "lines";
if (R && (a = R.log2lin(a), p = R.log2lin(p), t = R.log2lin(t)), T.chart.styledMode || (n ? (I.stroke = b || "#999999", I["stroke-width"] = x(k.width, 1), k.dashStyle && (I.dashstyle = k.dashStyle)) : P && (I.fill = b || "#e6ebf5", k.borderWidth && (I.stroke = k.borderColor, I["stroke-width"] = k.borderWidth))), h.zIndex = S, W += "-" + S, (R = T.plotLinesAndBandsGroups[W]) || (T.plotLinesAndBandsGroups[W] = R = c.g("plot-" + W).attr(h).add()), D && (l.svgElem = s = c.path().attr(I).add(R)), n)
n = T.getPlotLinePath({ value: t, lineWidth: s.strokeWidth(), acrossPanes: k.acrossPanes });
else if (P)
n = T.getPlotBandPath(
a,
p,
k
);
else
return;
return !l.eventsAdded && v && (w(v, function(E, X) {
s.on(X, function(g) {
v[X].apply(l, [g]);
});
}), l.eventsAdded = !0), (D || !s.d) && n && n.length ? s.attr({ d: n }) : s && (n ? (s.show(!0), s.animate({ d: n })) : s.d && (s.hide(), i && (l.label = i = i.destroy()))), u && (G(u.text) || G(u.formatter)) && n && n.length && 0 < T.width && 0 < T.height && !n.isFlat ? (u = j({ align: O && P && "center", x: O ? !P && 4 : 10, verticalAlign: !O && P && "middle", y: O ? P ? 16 : 10 : P ? 6 : -4, rotation: O && !P && 90 }, u), this.renderLabel(u, n, P, S)) : i && i.hide(), l;
}, f.prototype.renderLabel = function(l, T, O, R) {
var k = this.axis, b = k.chart.renderer, S = this.label;
S || (this.label = S = b.text(this.getLabelText(l), 0, 0, l.useHTML).attr({ align: l.textAlign || l.align, rotation: l.rotation, class: "highcharts-plot-" + (O ? "band" : "line") + "-label " + (l.className || ""), zIndex: R }).add(), k.chart.styledMode || S.css(j({ textOverflow: "ellipsis" }, l.style))), R = T.xBounds || [T[0][1], T[1][1], O ? T[2][1] : T[0][1]], T = T.yBounds || [T[0][2], T[1][2], O ? T[2][2] : T[0][2]], O = U(R), b = U(T), S.align(l, !1, { x: O, y: b, width: _(R) - O, height: _(T) - b }), S.alignValue && S.alignValue !== "left" || S.css({ width: (S.rotation === 90 ? k.height - (S.alignAttr.y - k.top) : k.width - (S.alignAttr.x - k.left)) + "px" }), S.show(!0);
}, f.prototype.getLabelText = function(l) {
return G(l.formatter) ? l.formatter.call(this) : l.text;
}, f.prototype.destroy = function() {
F(this.axis.plotLinesAndBands, this), delete this.axis, V(this);
}, f;
}(), N;
}), C(
o,
"Core/Tooltip.js",
[o["Core/FormatUtilities.js"], o["Core/Globals.js"], o["Core/Renderer/RendererUtilities.js"], o["Core/Renderer/RendererRegistry.js"], o["Core/Utilities.js"]],
function(y, N, _, U, G) {
var V = y.format, F = N.doc, B = _.distribute, j = G.addEvent, w = G.clamp, x = G.css, f = G.defined, l = G.discardElement, T = G.extend, O = G.fireEvent, R = G.isArray, k = G.isNumber, b = G.isString, S = G.merge, v = G.pick, h = G.splat, c = G.syncTimeout;
return y = function() {
function u(i, p) {
this.allowShared = !0, this.container = void 0, this.crosshairs = [], this.distance = 0, this.isHidden = !0, this.isSticky = !1, this.now = {}, this.options = {}, this.outside = !1, this.chart = i, this.init(i, p);
}
return u.prototype.applyFilter = function() {
var i = this.chart;
i.renderer.definition({
tagName: "filter",
attributes: { id: "drop-shadow-" + i.index, opacity: 0.5 },
children: [{ tagName: "feGaussianBlur", attributes: { in: "SourceAlpha", stdDeviation: 1 } }, { tagName: "feOffset", attributes: { dx: 1, dy: 1 } }, { tagName: "feComponentTransfer", children: [{ tagName: "feFuncA", attributes: { type: "linear", slope: 0.3 } }] }, { tagName: "feMerge", children: [{ tagName: "feMergeNode" }, { tagName: "feMergeNode", attributes: { in: "SourceGraphic" } }] }]
});
}, u.prototype.bodyFormatter = function(i) {
return i.map(function(p) {
var a = p.series.tooltipOptions;
return (a[(p.point.formatPrefix || "point") + "Formatter"] || p.point.tooltipFormatter).call(p.point, a[(p.point.formatPrefix || "point") + "Format"] || "");
});
}, u.prototype.cleanSplit = function(i) {
this.chart.series.forEach(function(p) {
var a = p && p.tt;
a && (!a.isActive || i ? p.tt = a.destroy() : a.isActive = !1);
});
}, u.prototype.defaultFormatter = function(i) {
var p = this.points || h(this), a = [i.tooltipFooterHeaderFormatter(p[0])];
return a = a.concat(i.bodyFormatter(p)), a.push(i.tooltipFooterHeaderFormatter(p[0], !0)), a;
}, u.prototype.destroy = function() {
this.label && (this.label = this.label.destroy()), this.split && this.tt && (this.cleanSplit(!0), this.tt = this.tt.destroy()), this.renderer && (this.renderer = this.renderer.destroy(), l(this.container)), G.clearTimeout(this.hideTimer), G.clearTimeout(this.tooltipTimeout);
}, u.prototype.getAnchor = function(i, p) {
var a = this.chart, t = a.pointer, s = a.inverted, n = a.plotTop, P = a.plotLeft, D, I, W = 0, E = 0;
return i = h(i), this.followPointer && p ? (typeof p.chartX > "u" && (p = t.normalize(p)), t = [p.chartX - P, p.chartY - n]) : i[0].tooltipPos ? t = i[0].tooltipPos : (i.forEach(function(X) {
D = X.series.yAxis, I = X.series.xAxis, W += X.plotX || 0, E += X.plotLow ? (X.plotLow + (X.plotHigh || 0)) / 2 : X.plotY || 0, I && D && (s ? (W += n + a.plotHeight - I.len - I.pos, E += P + a.plotWidth - D.len - D.pos) : (W += I.pos - P, E += D.pos - n));
}), W /= i.length, E /= i.length, t = [s ? a.plotWidth - E : W, s ? a.plotHeight - W : E], this.shared && 1 < i.length && p && (s ? t[0] = p.chartX - P : t[1] = p.chartY - n)), t.map(Math.round);
}, u.prototype.getLabel = function() {
var i = this, p = this.chart.styledMode, a = this.options, t = this.split && this.allowShared, s = "tooltip" + (f(a.className) ? " " + a.className : ""), n = a.style.pointerEvents || (!this.followPointer && a.stickOnContact ? "auto" : "none"), P = function() {
i.inContact = !0;
}, D = function(z) {
var $ = i.chart.hoverSeries;
i.inContact = i.shouldStickOnContact() && i.chart.pointer.inClass(z.relatedTarget, "highcharts-tooltip"), !i.inContact && $ && $.onMouseOut && $.onMouseOut();
}, I, W = this.chart.renderer;
if (i.label) {
var E = !i.label.hasClass("highcharts-label");
(t && !E || !t && E) && i.destroy();
}
if (!this.label) {
if (this.outside) {
E = this.chart.options.chart.style;
var X = U.getRendererType();
this.container = I = N.doc.createElement("div"), I.className = "highcharts-tooltip-container", x(I, { position: "absolute", top: "1px", pointerEvents: n, zIndex: Math.max(this.options.style.zIndex || 0, (E && E.zIndex || 0) + 3) }), j(I, "mouseenter", P), j(I, "mouseleave", D), N.doc.body.appendChild(I), this.renderer = W = new X(I, 0, 0, E, void 0, void 0, W.styledMode);
}
if (t ? this.label = W.g(s) : (this.label = W.label("", 0, 0, a.shape, void 0, void 0, a.useHTML, void 0, s).attr({ padding: a.padding, r: a.borderRadius }), p || this.label.attr({
fill: a.backgroundColor,
"stroke-width": a.borderWidth
}).css(a.style).css({ pointerEvents: n }).shadow(a.shadow)), p && a.shadow && (this.applyFilter(), this.label.attr({ filter: "url(#drop-shadow-" + this.chart.index + ")" })), i.outside && !i.split) {
var g = this.label, m = g.xSetter, L = g.ySetter;
g.xSetter = function(z) {
m.call(g, i.distance), I.style.left = z + "px";
}, g.ySetter = function(z) {
L.call(g, i.distance), I.style.top = z + "px";
};
}
this.label.on("mouseenter", P).on("mouseleave", D).attr({ zIndex: 8 }).add();
}
return this.label;
}, u.prototype.getPosition = function(i, p, a) {
var t = this.chart, s = this.distance, n = {}, P = t.inverted && a.h || 0, D = this.outside, I = D ? F.documentElement.clientWidth - 2 * s : t.chartWidth, W = D ? Math.max(F.body.scrollHeight, F.documentElement.scrollHeight, F.body.offsetHeight, F.documentElement.offsetHeight, F.documentElement.clientHeight) : t.chartHeight, E = t.pointer.getChartPosition(), X = function(Y) {
var Z = Y === "x";
return [Y, Z ? I : W, Z ? i : p].concat(D ? [Z ? i * E.scaleX : p * E.scaleY, Z ? E.left - s + (a.plotX + t.plotLeft) * E.scaleX : E.top - s + (a.plotY + t.plotTop) * E.scaleY, 0, Z ? I : W] : [Z ? i : p, Z ? a.plotX + t.plotLeft : a.plotY + t.plotTop, Z ? t.plotLeft : t.plotTop, Z ? t.plotLeft + t.plotWidth : t.plotTop + t.plotHeight]);
}, g = X("y"), m = X("x"), L;
X = !!a.negative, !t.polar && t.hoverSeries && t.hoverSeries.yAxis && t.hoverSeries.yAxis.reversed && (X = !X);
var z = !this.followPointer && v(a.ttBelow, !t.inverted === X), $ = function(Y, Z, q, it, et, nt, rt) {
var ct = D ? Y === "y" ? s * E.scaleY : s * E.scaleX : s, gt = (q - it) / 2, dt = it < et - s, ht = et + s + it < Z, at = et - ct - q + gt;
if (et = et + ct - gt, z && ht)
n[Y] = et;
else if (!z && dt)
n[Y] = at;
else if (dt)
n[Y] = Math.min(rt - it, 0 > at - P ? at : at - P);
else if (ht)
n[Y] = Math.max(nt, et + P + q > Z ? et : et + P);
else
return !1;
}, Q = function(Y, Z, q, it, et) {
var nt;
return et < s || et > Z - s ? nt = !1 : n[Y] = et < q / 2 ? 1 : et > Z - it / 2 ? Z - it - 2 : et - q / 2, nt;
}, A = function(Y) {
var Z = g;
g = m, m = Z, L = Y;
}, H = function() {
$.apply(0, g) !== !1 ? Q.apply(0, m) !== !1 || L || (A(!0), H()) : L ? n.x = n.y = 0 : (A(!0), H());
};
return (t.inverted || 1 < this.len) && A(), H(), n;
}, u.prototype.hide = function(i) {
var p = this;
G.clearTimeout(this.hideTimer), i = v(i, this.options.hideDelay), this.isHidden || (this.hideTimer = c(function() {
p.getLabel().fadeOut(i && void 0), p.isHidden = !0;
}, i));
}, u.prototype.init = function(i, p) {
this.chart = i, this.options = p, this.crosshairs = [], this.now = { x: 0, y: 0 }, this.isHidden = !0, this.split = p.split && !i.inverted && !i.polar, this.shared = p.shared || this.split, this.outside = v(p.outside, !(!i.scrollablePixelsX && !i.scrollablePixelsY));
}, u.prototype.shouldStickOnContact = function() {
return !(this.followPointer || !this.options.stickOnContact);
}, u.prototype.isStickyOnContact = function() {
return !(!this.shouldStickOnContact() || !this.inContact);
}, u.prototype.move = function(i, p, a, t) {
var s = this, n = s.now, P = s.options.animation !== !1 && !s.isHidden && (1 < Math.abs(i - n.x) || 1 < Math.abs(p - n.y)), D = s.followPointer || 1 < s.len;
T(n, { x: P ? (2 * n.x + i) / 3 : i, y: P ? (n.y + p) / 2 : p, anchorX: D ? void 0 : P ? (2 * n.anchorX + a) / 3 : a, anchorY: D ? void 0 : P ? (n.anchorY + t) / 2 : t }), s.getLabel().attr(n), s.drawTracker(), P && (G.clearTimeout(this.tooltipTimeout), this.tooltipTimeout = setTimeout(function() {
s && s.move(i, p, a, t);
}, 32));
}, u.prototype.refresh = function(i, p) {
var a = this.chart, t = this.options, s = h(i), n = s[0], P = [], D = t.formatter || this.defaultFormatter, I = this.shared, W = a.styledMode, E = {};
if (t.enabled) {
G.clearTimeout(this.hideTimer), this.allowShared = !(!R(i) && i.series && i.series.noSharedTooltip), this.followPointer = !this.split && n.series.tooltipOptions.followPointer, i = this.getAnchor(i, p);
var X = i[0], g = i[1];
if (I && this.allowShared ? (a.pointer.applyInactiveState(s), s.forEach(function(z) {
z.setState("hover"), P.push(z.getLabelConfig());
}), E = { x: n.category, y: n.y }, E.points = P) : E = n.getLabelConfig(), this.len = P.length, D = D.call(E, this), I = n.series, this.distance = v(I.tooltipOptions.distance, 16), D === !1)
this.hide();
else {
if (this.split && this.allowShared)
this.renderSplit(
D,
s
);
else {
var m = X, L = g;
if (p && a.pointer.isDirectTouch && (m = p.chartX - a.plotLeft, L = p.chartY - a.plotTop), a.polar || I.options.clip === !1 || s.some(function(z) {
return z.series.shouldShowTooltip(m, L);
}))
p = this.getLabel(), t.style.width && !W || p.css({ width: this.chart.spacingBox.width + "px" }), p.attr({ text: D && D.join ? D.join("") : D }), p.removeClass(/highcharts-color-[\d]+/g).addClass("highcharts-color-" + v(n.colorIndex, I.colorIndex)), W || p.attr({ stroke: t.borderColor || n.color || I.color || "#666666" }), this.updatePosition({
plotX: X,
plotY: g,
negative: n.negative,
ttBelow: n.ttBelow,
h: i[2] || 0
});
else {
this.hide();
return;
}
}
this.isHidden && this.label && this.label.attr({ opacity: 1 }).show(), this.isHidden = !1;
}
O(this, "refresh");
}
}, u.prototype.renderSplit = function(i, p) {
function a(ht, at, J, tt, ot) {
return ot === void 0 && (ot = !0), J ? (at = it ? 0 : ct, ht = w(ht - tt / 2, Y.left, Y.right - tt - (t.outside ? et : 0))) : (at -= nt, ht = ot ? ht - tt - Q : ht + Q, ht = w(ht, ot ? ht : Y.left, Y.right)), { x: ht, y: at };
}
var t = this, s = t.chart, n = t.chart, P = n.chartWidth, D = n.chartHeight, I = n.plotHeight, W = n.plotLeft, E = n.plotTop, X = n.pointer, g = n.scrollablePixelsY;
g = g === void 0 ? 0 : g;
var m = n.scrollablePixelsX, L = n.scrollingContainer;
L = L === void 0 ? { scrollLeft: 0, scrollTop: 0 } : L;
var z = L.scrollLeft;
L = L.scrollTop;
var $ = n.styledMode, Q = t.distance, A = t.options, H = t.options.positioner, Y = t.outside && typeof m != "number" ? F.documentElement.getBoundingClientRect() : { left: z, right: z + P, top: L, bottom: L + D }, Z = t.getLabel(), q = this.renderer || s.renderer, it = !(!s.xAxis[0] || !s.xAxis[0].opposite);
s = X.getChartPosition();
var et = s.left;
s = s.top;
var nt = E + L, rt = 0, ct = I - g;
b(i) && (i = [!1, i]), i = i.slice(0, p.length + 1).reduce(function(ht, at, J) {
if (at !== !1 && at !== "") {
J = p[J - 1] || { isHeader: !0, plotX: p[0].plotX, plotY: I, series: {} };
var tt = J.isHeader, ot = tt ? t : J.series;
at = at.toString();
var lt = ot.tt, pt = J.isHeader, yt = J.series, vt = "highcharts-color-" + v(J.colorIndex, yt.colorIndex, "none");
if (lt || (lt = { padding: A.padding, r: A.borderRadius }, $ || (lt.fill = A.backgroundColor, lt["stroke-width"] = A.borderWidth), lt = q.label("", 0, 0, A[pt ? "headerShape" : "shape"], void 0, void 0, A.useHTML).addClass((pt ? "highcharts-tooltip-header " : "") + "highcharts-tooltip-box " + vt).attr(lt).add(Z)), lt.isActive = !0, lt.attr({ text: at }), $ || lt.css(A.style).shadow(A.shadow).attr({ stroke: A.borderColor || J.color || yt.color || "#333333" }), ot = ot.tt = lt, pt = ot.getBBox(), at = pt.width + ot.strokeWidth(), tt && (rt = pt.height, ct += rt, it && (nt -= rt)), yt = J.plotX, yt = yt === void 0 ? 0 : yt, vt = J.plotY, vt = vt === void 0 ? 0 : vt, lt = J.series, J.isHeader) {
yt = W + yt;
var Ct = E + I / 2;
} else {
var Pt = lt.xAxis, At = lt.yAxis;
yt = Pt.pos + w(yt, -Q, Pt.len + Q), lt.shouldShowTooltip(0, At.pos - E + vt, { ignoreX: !0 }) && (Ct = At.pos + vt);
}
yt = w(yt, Y.left - Q, Y.right + Q), typeof Ct == "number" ? (pt = pt.height + 1, vt = H ? H.call(t, at, pt, J) : a(
yt,
Ct,
tt,
at
), ht.push({ align: H ? 0 : void 0, anchorX: yt, anchorY: Ct, boxWidth: at, point: J, rank: v(vt.rank, tt ? 1 : 0), size: pt, target: vt.y, tt: ot, x: vt.x })) : ot.isActive = !1;
}
return ht;
}, []), !H && i.some(function(ht) {
var at = (t.outside ? et : 0) + ht.anchorX;
return at < Y.left && at + ht.boxWidth < Y.right ? !0 : at < et - Y.left + ht.boxWidth && Y.right - at > at;
}) && (i = i.map(function(ht) {
var at = a(ht.anchorX, ht.anchorY, ht.point.isHeader, ht.boxWidth, !1);
return T(ht, { target: at.y, x: at.x });
})), t.cleanSplit(), B(i, ct);
var gt = et, dt = et;
i.forEach(function(ht) {
var at = ht.x, J = ht.boxWidth;
ht = ht.isHeader, ht || (t.outside && et + at < gt && (gt = et + at), !ht && t.outside && gt + J > dt && (dt = et + at));
}), i.forEach(function(ht) {
var at = ht.x, J = ht.anchorX, tt = ht.pos, ot = ht.point.isHeader;
if (tt = { visibility: typeof tt > "u" ? "hidden" : "inherit", x: at, y: tt + nt, anchorX: J, anchorY: ht.anchorY }, t.outside && at < J) {
var lt = et - gt;
0 < lt && (ot || (tt.x = at + lt, tt.anchorX = J + lt), ot && (tt.x = (dt - gt) / 2, tt.anchorX = J + lt));
}
ht.tt.attr(tt);
}), i = t.container, g = t.renderer, t.outside && i && g && (n = Z.getBBox(), g.setSize(n.width + n.x, n.height + n.y, !1), i.style.left = gt + "px", i.style.top = s + "px");
}, u.prototype.drawTracker = function() {
if (this.followPointer || !this.options.stickOnContact)
this.tracker && this.tracker.destroy();
else {
var i = this.chart, p = this.label, a = this.shared ? i.hoverPoints : i.hoverPoint;
if (p && a) {
var t = { x: 0, y: 0, width: 0, height: 0 };
a = this.getAnchor(a);
var s = p.getBBox();
a[0] += i.plotLeft - p.translateX, a[1] += i.plotTop - p.translateY, t.x = Math.min(0, a[0]), t.y = Math.min(0, a[1]), t.width = 0 > a[0] ? Math.max(Math.abs(a[0]), s.width - a[0]) : Math.max(Math.abs(a[0]), s.width), t.height = 0 > a[1] ? Math.max(Math.abs(a[1]), s.height - Math.abs(a[1])) : Math.max(Math.abs(a[1]), s.height), this.tracker ? this.tracker.attr(t) : (this.tracker = p.renderer.rect(t).addClass("highcharts-tracker").add(p), i.styledMode || this.tracker.attr({ fill: "rgba(0,0,0,0)" }));
}
}
}, u.prototype.styledModeFormat = function(i) {
return i.replace('style="font-size: 10px"', 'class="highcharts-header"').replace(/style="color:{(point|series)\.color}"/g, 'class="highcharts-color-{$1.colorIndex}"');
}, u.prototype.tooltipFooterHeaderFormatter = function(i, p) {
var a = i.series, t = a.tooltipOptions, s = a.xAxis, n = s && s.dateTime;
s = {
isFooter: p,
labelConfig: i
};
var P = t.xDateFormat, D = t[p ? "footerFormat" : "headerFormat"];
return O(this, "headerFormatter", s, function(I) {
n && !P && k(i.key) && (P = n.getXDateFormat(i.key, t.dateTimeLabelFormats)), n && P && (i.point && i.point.tooltipDateKeys || ["key"]).forEach(function(W) {
D = D.replace("{point." + W + "}", "{point." + W + ":" + P + "}");
}), a.chart.styledMode && (D = this.styledModeFormat(D)), I.text = V(D, { point: i, series: a }, this.chart);
}), s.text;
}, u.prototype.update = function(i) {
this.destroy(), S(!0, this.chart.options.tooltip.userOptions, i), this.init(this.chart, S(!0, this.options, i));
}, u.prototype.updatePosition = function(i) {
var p = this.chart, a = this.options, t = p.pointer, s = this.getLabel();
t = t.getChartPosition();
var n = (a.positioner || this.getPosition).call(this, s.width, s.height, i), P = i.plotX + p.plotLeft;
i = i.plotY + p.plotTop, this.outside && (a = a.borderWidth + 2 * this.distance, this.renderer.setSize(s.width + a, s.height + a, !1), (t.scaleX !== 1 || t.scaleY !== 1) && (x(this.container, { transform: "scale(" + t.scaleX + ", " + t.scaleY + ")" }), P *= t.scaleX, i *= t.scaleY), P += t.left - n.x, i += t.top - n.y), this.move(Math.round(n.x), Math.round(n.y || 0), P, i);
}, u;
}(), y;
}
), C(o, "Core/Series/Point.js", [o["Core/Renderer/HTML/AST.js"], o["Core/Animation/AnimationUtilities.js"], o["Core/DefaultOptions.js"], o["Core/FormatUtilities.js"], o["Core/Utilities.js"]], function(y, N, _, U, G) {
var V = N.animObject, F = _.defaultOptions, B = U.format, j = G.addEvent, w = G.defined, x = G.erase, f = G.extend, l = G.fireEvent, T = G.getNestedProperty, O = G.isArray, R = G.isFunction, k = G.isNumber, b = G.isObject, S = G.merge, v = G.objectEach, h = G.pick, c = G.syncTimeout, u = G.removeEvent, i = G.uniqueKey;
return N = function() {
function p() {
this.colorIndex = this.category = void 0, this.formatPrefix = "point", this.id = void 0, this.isNull = !1, this.percentage = this.options = this.name = void 0, this.selected = !1, this.total = this.series = void 0, this.visible = !0, this.x = void 0;
}
return p.prototype.animateBeforeDestroy = function() {
var a = this, t = { x: a.startXPos, opacity: 0 }, s = a.getGraphicalProps();
s.singular.forEach(function(n) {
a[n] = a[n].animate(n === "dataLabel" ? {
x: a[n].startXPos,
y: a[n].startYPos,
opacity: 0
} : t);
}), s.plural.forEach(function(n) {
a[n].forEach(function(P) {
P.element && P.animate(f({ x: a.startXPos }, P.startYPos ? { x: P.startXPos, y: P.startYPos } : {}));
});
});
}, p.prototype.applyOptions = function(a, t) {
var s = this.series, n = s.options.pointValKey || s.pointValKey;
return a = p.prototype.optionsToObject.call(this, a), f(this, a), this.options = this.options ? f(this.options, a) : a, a.group && delete this.group, a.dataLabels && delete this.dataLabels, n && (this.y = p.prototype.getNestedProperty.call(this, n)), this.formatPrefix = (this.isNull = h(this.isValid && !this.isValid(), this.x === null || !k(this.y))) ? "null" : "point", this.selected && (this.state = "select"), "name" in this && typeof t > "u" && s.xAxis && s.xAxis.hasNames && (this.x = s.xAxis.nameToX(this)), typeof this.x > "u" && s ? this.x = typeof t > "u" ? s.autoIncrement() : t : k(a.x) && s.options.relativeXValue && (this.x = s.autoIncrement(a.x)), this;
}, p.prototype.destroy = function() {
function a() {
(t.graphic || t.dataLabel || t.dataLabels) && (u(t), t.destroyElements());
for (I in t)
t[I] = null;
}
var t = this, s = t.series, n = s.chart;
s = s.options.dataSorting;
var P = n.hoverPoints, D = V(t.series.chart.renderer.globalAnimation), I;
t.legendItem && n.legend.destroyItem(t), P && (t.setState(), x(P, t), P.length || (n.hoverPoints = null)), t === n.hoverPoint && t.onMouseOut(), s && s.enabled ? (this.animateBeforeDestroy(), c(a, D.duration)) : a(), n.pointCount--;
}, p.prototype.destroyElements = function(a) {
var t = this;
a = t.getGraphicalProps(a), a.singular.forEach(function(s) {
t[s] = t[s].destroy();
}), a.plural.forEach(function(s) {
t[s].forEach(function(n) {
n.element && n.destroy();
}), delete t[s];
});
}, p.prototype.firePointEvent = function(a, t, s) {
var n = this, P = this.series.options;
(P.point.events[a] || n.options && n.options.events && n.options.events[a]) && n.importEvents(), a === "click" && P.allowPointSelect && (s = function(D) {
n.select && n.select(null, D.ctrlKey || D.metaKey || D.shiftKey);
}), l(n, a, t, s);
}, p.prototype.getClassName = function() {
return "highcharts-point" + (this.selected ? " highcharts-point-select" : "") + (this.negative ? " highcharts-negative" : "") + (this.isNull ? " highcharts-null-point" : "") + (typeof this.colorIndex < "u" ? " highcharts-color-" + this.colorIndex : "") + (this.options.className ? " " + this.options.className : "") + (this.zone && this.zone.className ? " " + this.zone.className.replace("highcharts-negative", "") : "");
}, p.prototype.getGraphicalProps = function(a) {
var t = this, s = [], n = { singular: [], plural: [] }, P;
for (a = a || { graphic: 1, dataLabel: 1 }, a.graphic && s.push("graphic", "upperGraphic", "shadowGroup"), a.dataLabel && s.push("dataLabel", "dataLabelUpper", "connector"), P = s.length; P--; ) {
var D = s[P];
t[D] && n.singular.push(D);
}
return ["dataLabel", "connector"].forEach(function(I) {
var W = I + "s";
a[I] && t[W] && n.plural.push(W);
}), n;
}, p.prototype.getLabelConfig = function() {
return { x: this.category, y: this.y, color: this.color, colorIndex: this.colorIndex, key: this.name || this.category, series: this.series, point: this, percentage: this.percentage, total: this.total || this.stackTotal };
}, p.prototype.getNestedProperty = function(a) {
if (a)
return a.indexOf("custom.") === 0 ? T(a, this.options) : this[a];
}, p.prototype.getZone = function() {
var a = this.series, t = a.zones;
a = a.zoneAxis || "y";
var s, n = 0;
for (s = t[n]; this[a] >= s.value; )
s = t[++n];
return this.nonZonedColor || (this.nonZonedColor = this.color), this.color = s && s.color && !this.options.color ? s.color : this.nonZonedColor, s;
}, p.prototype.hasNewShapeType = function() {
return (this.graphic && (this.graphic.symbolName || this.graphic.element.nodeName)) !== this.shapeType;
}, p.prototype.init = function(a, t, s) {
return this.series = a, this.applyOptions(t, s), this.id = w(this.id) ? this.id : i(), this.resolveColor(), a.chart.pointCount++, l(this, "afterInit"), this;
}, p.prototype.optionsToObject = function(a) {
var t = this.series, s = t.options.keys, n = s || t.pointArrayMap || ["y"], P = n.length, D = {}, I = 0, W = 0;
if (k(a) || a === null)
D[n[0]] = a;
else if (O(a))
for (!s && a.length > P && (t = typeof a[0], t === "string" ? D.name = a[0] : t === "number" && (D.x = a[0]), I++); W < P; )
s && typeof a[I] > "u" || (0 < n[W].indexOf(".") ? p.prototype.setNestedProperty(D, a[I], n[W]) : D[n[W]] = a[I]), I++, W++;
else
typeof a == "object" && (D = a, a.dataLabels && (t._hasPointLabels = !0), a.marker && (t._hasPointMarkers = !0));
return D;
}, p.prototype.resolveColor = function() {
var a = this.series, t = a.chart.styledMode, s = a.chart.options.chart.colorCount;
if (delete this.nonZonedColor, a.options.colorByPoint) {
if (!t) {
s = a.options.colors || a.chart.options.colors;
var n = s[a.colorCounter];
s = s.length;
}
t = a.colorCounter, a.colorCounter++, a.colorCounter === s && (a.colorCounter = 0);
} else
t || (n = a.color), t = a.colorIndex;
this.colorIndex = h(this.options.colorIndex, t), this.color = h(this.options.color, n);
}, p.prototype.setNestedProperty = function(a, t, s) {
return s.split(".").reduce(function(n, P, D, I) {
return n[P] = I.length - 1 === D ? t : b(n[P], !0) ? n[P] : {}, n[P];
}, a), a;
}, p.prototype.tooltipFormatter = function(a) {
var t = this.series, s = t.tooltipOptions, n = h(s.valueDecimals, ""), P = s.valuePrefix || "", D = s.valueSuffix || "";
return t.chart.styledMode && (a = t.chart.tooltip.styledModeFormat(a)), (t.pointArrayMap || ["y"]).forEach(function(I) {
I = "{point." + I, (P || D) && (a = a.replace(RegExp(I + "}", "g"), P + I + "}" + D)), a = a.replace(RegExp(I + "}", "g"), I + ":,." + n + "f}");
}), B(a, { point: this, series: this.series }, t.chart);
}, p.prototype.update = function(a, t, s, n) {
function P() {
D.applyOptions(a);
var m = W && D.hasDummyGraphic;
m = D.y === null ? !m : m, W && m && (D.graphic = W.destroy(), delete D.hasDummyGraphic), b(a, !0) && (W && W.element && a && a.marker && typeof a.marker.symbol < "u" && (D.graphic = W.destroy()), a && a.dataLabels && D.dataLabel && (D.dataLabel = D.dataLabel.destroy()), D.connector && (D.connector = D.connector.destroy())), g = D.index, I.updateParallelArrays(D, g), X.data[g] = b(X.data[g], !0) || b(a, !0) ? D.options : h(a, X.data[g]), I.isDirty = I.isDirtyData = !0, !I.fixedBox && I.hasCartesianSeries && (E.isDirtyBox = !0), X.legendType === "point" && (E.isDirtyLegend = !0), t && E.redraw(s);
}
var D = this, I = D.series, W = D.graphic, E = I.chart, X = I.options, g;
t = h(t, !0), n === !1 ? P() : D.firePointEvent("update", { options: a }, P);
}, p.prototype.remove = function(a, t) {
this.series.removePoint(this.series.data.indexOf(this), a, t);
}, p.prototype.select = function(a, t) {
var s = this, n = s.series, P = n.chart;
this.selectedStaging = a = h(a, !s.selected), s.firePointEvent(a ? "select" : "unselect", { accumulate: t }, function() {
s.selected = s.options.selected = a, n.options.data[n.data.indexOf(s)] = s.options, s.setState(a && "select"), t || P.getSelectedPoints().forEach(function(D) {
var I = D.series;
D.selected && D !== s && (D.selected = D.options.selected = !1, I.options.data[I.data.indexOf(D)] = D.options, D.setState(P.hoverPoints && I.options.inactiveOtherPoints ? "inactive" : ""), D.firePointEvent("unselect"));
});
}), delete this.selectedStaging;
}, p.prototype.onMouseOver = function(a) {
var t = this.series.chart, s = t.pointer;
a = a ? s.normalize(a) : s.getChartCoordinatesFromPoint(this, t.inverted), s.runPointActions(
a,
this
);
}, p.prototype.onMouseOut = function() {
var a = this.series.chart;
this.firePointEvent("mouseOut"), this.series.options.inactiveOtherPoints || (a.hoverPoints || []).forEach(function(t) {
t.setState();
}), a.hoverPoints = a.hoverPoint = null;
}, p.prototype.importEvents = function() {
if (!this.hasImportedEvents) {
var a = this, t = S(a.series.options.point, a.options).events;
a.events = t, v(t, function(s, n) {
R(s) && j(a, n, s);
}), this.hasImportedEvents = !0;
}
}, p.prototype.setState = function(a, t) {
var s = this.series, n = this.state, P = s.options.states[a || "normal"] || {}, D = F.plotOptions[s.type].marker && s.options.marker, I = D && D.enabled === !1, W = D && D.states && D.states[a || "normal"] || {}, E = W.enabled === !1, X = this.marker || {}, g = s.chart, m = D && s.markerAttribs, L = s.halo, z, $ = s.stateMarkerGraphic;
if (a = a || "", !(a === this.state && !t || this.selected && a !== "select" || P.enabled === !1 || a && (E || I && W.enabled === !1) || a && X.states && X.states[a] && X.states[a].enabled === !1)) {
if (this.state = a, m && (z = s.markerAttribs(this, a)), this.graphic && !this.hasDummyGraphic) {
if (n && this.graphic.removeClass("highcharts-point-" + n), a && this.graphic.addClass("highcharts-point-" + a), !g.styledMode) {
var Q = s.pointAttribs(this, a), A = h(g.options.chart.animation, P.animation);
s.options.inactiveOtherPoints && k(Q.opacity) && ((this.dataLabels || []).forEach(function(H) {
H && H.animate({ opacity: Q.opacity }, A);
}), this.connector && this.connector.animate({ opacity: Q.opacity }, A)), this.graphic.animate(Q, A);
}
z && this.graphic.animate(z, h(g.options.chart.animation, W.animation, D.animation)), $ && $.hide();
} else
a && W && (n = X.symbol || s.symbol, $ && $.currentSymbol !== n && ($ = $.destroy()), z && ($ ? $[t ? "animate" : "attr"]({ x: z.x, y: z.y }) : n && (s.stateMarkerGraphic = $ = g.renderer.symbol(n, z.x, z.y, z.width, z.height).add(s.markerGroup), $.currentSymbol = n)), !g.styledMode && $ && this.state !== "inactive" && $.attr(s.pointAttribs(this, a))), $ && ($[a && this.isInside ? "show" : "hide"](), $.element.point = this, $.addClass(this.getClassName(), !0));
P = P.halo, z = ($ = this.graphic || $) && $.visibility || "inherit", P && P.size && $ && z !== "hidden" && !this.isCluster ? (L || (s.halo = L = g.renderer.path().add($.parentGroup)), L.show()[t ? "animate" : "attr"]({ d: this.haloPath(P.size) }), L.attr({ class: "highcharts-halo highcharts-color-" + h(this.colorIndex, s.colorIndex) + (this.className ? " " + this.className : ""), visibility: z, zIndex: -1 }), L.point = this, g.styledMode || L.attr(f({ fill: this.color || s.color, "fill-opacity": P.opacity }, y.filterUserAttributes(P.attributes || {})))) : L && L.point && L.point.haloPath && L.animate({ d: L.point.haloPath(0) }, null, L.hide), l(this, "afterSetState", { state: a });
}
}, p.prototype.haloPath = function(a) {
return this.series.chart.renderer.symbols.circle(Math.floor(this.plotX) - a, this.plotY - a, 2 * a, 2 * a);
}, p;
}(), N;
}), C(o, "Core/Pointer.js", [o["Core/Color/Color.js"], o["Core/Globals.js"], o["Core/Tooltip.js"], o["Core/Utilities.js"]], function(y, N, _, U) {
var G = y.parse, V = N.charts, F = N.noop, B = U.addEvent, j = U.attr, w = U.css, x = U.defined, f = U.extend, l = U.find, T = U.fireEvent, O = U.isNumber, R = U.isObject, k = U.objectEach, b = U.offset, S = U.pick, v = U.splat;
return y = function() {
function h(c, u) {
this.lastValidTouch = {}, this.pinchDown = [], this.runChartClick = !1, this.eventsToUnbind = [], this.chart = c, this.hasDragged = !1, this.options = u, this.init(c, u);
}
return h.prototype.applyInactiveState = function(c) {
var u = [], i;
(c || []).forEach(function(p) {
i = p.series, u.push(i), i.linkedParent && u.push(i.linkedParent), i.linkedSeries && (u = u.concat(i.linkedSeries)), i.navigatorSeries && u.push(i.navigatorSeries);
}), this.chart.series.forEach(function(p) {
u.indexOf(p) === -1 ? p.setState("inactive", !0) : p.options.inactiveOtherPoints && p.setAllPointsToState("inactive");
});
}, h.prototype.destroy = function() {
var c = this;
this.eventsToUnbind.forEach(function(u) {
return u();
}), this.eventsToUnbind = [], N.chartCount || (h.unbindDocumentMouseUp && (h.unbindDocumentMouseUp = h.unbindDocumentMouseUp()), h.unbindDocumentTouchEnd && (h.unbindDocumentTouchEnd = h.unbindDocumentTouchEnd())), clearInterval(c.tooltipTimeout), k(c, function(u, i) {
c[i] = void 0;
});
}, h.prototype.drag = function(c) {
var u = this.chart, i = u.options.chart, p = this.zoomHor, a = this.zoomVert, t = u.plotLeft, s = u.plotTop, n = u.plotWidth, P = u.plotHeight, D = this.mouseDownX || 0, I = this.mouseDownY || 0, W = R(i.panning) ? i.panning && i.panning.enabled : i.panning, E = i.panKey && c[i.panKey + "Key"], X = c.chartX, g = c.chartY, m = this.selectionMarker;
if ((!m || !m.touch) && (X < t ? X = t : X > t + n && (X = t + n), g < s ? g = s : g > s + P && (g = s + P), this.hasDragged = Math.sqrt(Math.pow(D - X, 2) + Math.pow(I - g, 2)), 10 < this.hasDragged)) {
var L = u.isInsidePlot(D - t, I - s, { visiblePlotOnly: !0 });
!u.hasCartesianSeries && !u.mapView || !this.zoomX && !this.zoomY || !L || E || m || (this.selectionMarker = m = u.renderer.rect(t, s, p ? 1 : n, a ? 1 : P, 0).attr({ class: "highcharts-selection-marker", zIndex: 7 }).add(), u.styledMode || m.attr({ fill: i.selectionMarkerFill || G("#335cad").setOpacity(0.25).get() })), m && p && (p = X - D, m.attr({ width: Math.abs(p), x: (0 < p ? 0 : p) + D })), m && a && (p = g - I, m.attr({ height: Math.abs(p), y: (0 < p ? 0 : p) + I })), L && !m && W && u.pan(c, i.panning);
}
}, h.prototype.dragStart = function(c) {
var u = this.chart;
u.mouseIsDown = c.type, u.cancelClick = !1, u.mouseDownX = this.mouseDownX = c.chartX, u.mouseDownY = this.mouseDownY = c.chartY;
}, h.prototype.drop = function(c) {
var u = this, i = this.chart, p = this.hasPinched;
if (this.selectionMarker) {
var a = this.selectionMarker, t = a.attr ? a.attr("x") : a.x, s = a.attr ? a.attr("y") : a.y, n = a.attr ? a.attr("width") : a.width, P = a.attr ? a.attr("height") : a.height, D = { originalEvent: c, xAxis: [], yAxis: [], x: t, y: s, width: n, height: P }, I = !!i.mapView;
(this.hasDragged || p) && (i.axes.forEach(function(W) {
if (W.zoomEnabled && x(W.min) && (p || u[{ xAxis: "zoomX", yAxis: "zoomY" }[W.coll]]) && O(t) && O(s)) {
var E = W.horiz, X = c.type === "touchend" ? W.minPixelPadding : 0, g = W.toValue((E ? t : s) + X);
E = W.toValue((E ? t + n : s + P) - X), D[W.coll].push({ axis: W, min: Math.min(g, E), max: Math.max(g, E) }), I = !0;
}
}), I && T(i, "selection", D, function(W) {
i.zoom(f(
W,
p ? { animation: !1 } : null
));
})), O(i.index) && (this.selectionMarker = this.selectionMarker.destroy()), p && this.scaleGroups();
}
i && O(i.index) && (w(i.container, { cursor: i._cursor }), i.cancelClick = 10 < this.hasDragged, i.mouseIsDown = this.hasDragged = this.hasPinched = !1, this.pinchDown = []);
}, h.prototype.findNearestKDPoint = function(c, u, i) {
var p = this.chart, a = p.hoverPoint;
if (p = p.tooltip, a && p && p.isStickyOnContact())
return a;
var t;
return c.forEach(function(s) {
var n = !(s.noSharedTooltip && u) && 0 > s.options.findNearestPointBy.indexOf("y");
if (s = s.searchPoint(i, n), (n = R(s, !0) && s.series) && !(n = !R(t, !0))) {
n = t.distX - s.distX;
var P = t.dist - s.dist, D = (s.series.group && s.series.group.zIndex) - (t.series.group && t.series.group.zIndex);
n = 0 < (n !== 0 && u ? n : P !== 0 ? P : D !== 0 ? D : t.series.index > s.series.index ? -1 : 1);
}
n && (t = s);
}), t;
}, h.prototype.getChartCoordinatesFromPoint = function(c, u) {
var i = c.series, p = i.xAxis;
i = i.yAxis;
var a = c.shapeArgs;
if (p && i) {
var t = S(c.clientX, c.plotX), s = c.plotY || 0;
return c.isNode && a && O(a.x) && O(a.y) && (t = a.x, s = a.y), u ? { chartX: i.len + i.pos - s, chartY: p.len + p.pos - t } : { chartX: t + p.pos, chartY: s + i.pos };
}
if (a && a.x && a.y)
return { chartX: a.x, chartY: a.y };
}, h.prototype.getChartPosition = function() {
if (this.chartPosition)
return this.chartPosition;
var c = this.chart.container, u = b(c);
this.chartPosition = { left: u.left, top: u.top, scaleX: 1, scaleY: 1 };
var i = c.offsetWidth;
return c = c.offsetHeight, 2 < i && 2 < c && (this.chartPosition.scaleX = u.width / i, this.chartPosition.scaleY = u.height / c), this.chartPosition;
}, h.prototype.getCoordinates = function(c) {
var u = { xAxis: [], yAxis: [] };
return this.chart.axes.forEach(function(i) {
u[i.isXAxis ? "xAxis" : "yAxis"].push({ axis: i, value: i.toValue(c[i.horiz ? "chartX" : "chartY"]) });
}), u;
}, h.prototype.getHoverData = function(c, u, i, p, a, t) {
var s = [];
p = !(!p || !c);
var n = { chartX: t ? t.chartX : void 0, chartY: t ? t.chartY : void 0, shared: a };
T(this, "beforeGetHoverData", n);
var P = u && !u.stickyTracking ? [u] : i.filter(function(I) {
return n.filter ? n.filter(I) : I.visible && !(!a && I.directTouch) && S(I.options.enableMouseTracking, !0) && I.stickyTracking;
}), D = p || !t ? c : this.findNearestKDPoint(P, a, t);
return u = D && D.series, D && (a && !u.noSharedTooltip ? (P = i.filter(function(I) {
return n.filter ? n.filter(I) : I.visible && !(!a && I.directTouch) && S(I.options.enableMouseTracking, !0) && !I.noSharedTooltip;
}), P.forEach(function(I) {
var W = l(I.points, function(E) {
return E.x === D.x && !E.isNull;
});
R(W) && (I.chart.isBoosting && (W = I.getPoint(W)), s.push(W));
})) : s.push(D)), n = { hoverPoint: D }, T(this, "afterGetHoverData", n), { hoverPoint: n.hoverPoint, hoverSeries: u, hoverPoints: s };
}, h.prototype.getPointFromEvent = function(c) {
c = c.target;
for (var u; c && !u; )
u = c.point, c = c.parentNode;
return u;
}, h.prototype.onTrackerMouseOut = function(c) {
c = c.relatedTarget || c.toElement;
var u = this.chart.hoverSeries;
this.isDirectTouch = !1, !u || !c || u.stickyTracking || this.inClass(c, "highcharts-tooltip") || this.inClass(c, "highcharts-series-" + u.index) && this.inClass(c, "highcharts-tracker") || u.onMouseOut();
}, h.prototype.inClass = function(c, u) {
for (var i; c; ) {
if (i = j(c, "class")) {
if (i.indexOf(u) !== -1)
return !0;
if (i.indexOf("highcharts-container") !== -1)
return !1;
}
c = c.parentNode;
}
}, h.prototype.init = function(c, u) {
this.options = u, this.chart = c, this.runChartClick = !(!u.chart.events || !u.chart.events.click), this.pinchDown = [], this.lastValidTouch = {}, _ && (c.tooltip = new _(c, u.tooltip), this.followTouchMove = S(u.tooltip.followTouchMove, !0)), this.setDOMEvents();
}, h.prototype.normalize = function(c, u) {
var i = c.touches, p = i ? i.length ? i.item(0) : S(i.changedTouches, c.changedTouches)[0] : c;
return u || (u = this.getChartPosition()), i = p.pageX - u.left, p = p.pageY - u.top, i /= u.scaleX, p /= u.scaleY, f(c, { chartX: Math.round(i), chartY: Math.round(p) });
}, h.prototype.onContainerClick = function(c) {
var u = this.chart, i = u.hoverPoint;
c = this.normalize(c);
var p = u.plotLeft, a = u.plotTop;
u.cancelClick || (i && this.inClass(c.target, "highcharts-tracker") ? (T(i.series, "click", f(c, { point: i })), u.hoverPoint && i.firePointEvent("click", c)) : (f(c, this.getCoordinates(c)), u.isInsidePlot(c.chartX - p, c.chartY - a, { visiblePlotOnly: !0 }) && T(u, "click", c)));
}, h.prototype.onContainerMouseDown = function(c) {
var u = ((c.buttons || c.button) & 1) === 1;
c = this.normalize(c), N.isFirefox && c.button !== 0 && this.onContainerMouseMove(c), (typeof c.button > "u" || u) && (this.zoomOption(c), u && c.preventDefault && c.preventDefault(), this.dragStart(c));
}, h.prototype.onContainerMouseLeave = function(c) {
var u = V[S(h.hoverChartIndex, -1)], i = this.chart.tooltip;
i && i.shouldStickOnContact() && this.inClass(c.relatedTarget, "highcharts-tooltip-container") || (c = this.normalize(c), u && (c.relatedTarget || c.toElement) && (u.pointer.reset(), u.pointer.chartPosition = void 0), i && !i.isHidden && this.reset());
}, h.prototype.onContainerMouseEnter = function(c) {
delete this.chartPosition;
}, h.prototype.onContainerMouseMove = function(c) {
var u = this.chart;
c = this.normalize(c), this.setHoverChartIndex(), c.preventDefault || (c.returnValue = !1), (u.mouseIsDown === "mousedown" || this.touchSelect(c)) && this.drag(c), u.openMenu || !this.inClass(c.target, "highcharts-tracker") && !u.isInsidePlot(c.chartX - u.plotLeft, c.chartY - u.plotTop, { visiblePlotOnly: !0 }) || (this.inClass(c.target, "highcharts-no-tooltip") ? this.reset(!1, 0) : this.runPointActions(c));
}, h.prototype.onDocumentTouchEnd = function(c) {
var u = V[S(
h.hoverChartIndex,
-1
)];
u && u.pointer.drop(c);
}, h.prototype.onContainerTouchMove = function(c) {
this.touchSelect(c) ? this.onContainerMouseMove(c) : this.touch(c);
}, h.prototype.onContainerTouchStart = function(c) {
this.touchSelect(c) ? this.onContainerMouseDown(c) : (this.zoomOption(c), this.touch(c, !0));
}, h.prototype.onDocumentMouseMove = function(c) {
var u = this.chart, i = this.chartPosition;
c = this.normalize(c, i);
var p = u.tooltip;
!i || p && p.isStickyOnContact() || u.isInsidePlot(c.chartX - u.plotLeft, c.chartY - u.plotTop, { visiblePlotOnly: !0 }) || this.inClass(c.target, "highcharts-tracker") || this.reset();
}, h.prototype.onDocumentMouseUp = function(c) {
var u = V[S(h.hoverChartIndex, -1)];
u && u.pointer.drop(c);
}, h.prototype.pinch = function(c) {
var u = this, i = u.chart, p = u.pinchDown, a = c.touches || [], t = a.length, s = u.lastValidTouch, n = u.hasZoom, P = {}, D = t === 1 && (u.inClass(c.target, "highcharts-tracker") && i.runTrackerClick || u.runChartClick), I = {}, W = u.selectionMarker;
1 < t ? u.initiated = !0 : t === 1 && this.followTouchMove && (u.initiated = !1), n && u.initiated && !D && c.cancelable !== !1 && c.preventDefault(), [].map.call(a, function(E) {
return u.normalize(E);
}), c.type === "touchstart" ? ([].forEach.call(a, function(E, X) {
p[X] = { chartX: E.chartX, chartY: E.chartY };
}), s.x = [p[0].chartX, p[1] && p[1].chartX], s.y = [p[0].chartY, p[1] && p[1].chartY], i.axes.forEach(function(E) {
if (E.zoomEnabled) {
var X = i.bounds[E.horiz ? "h" : "v"], g = E.minPixelPadding, m = E.toPixels(Math.min(S(E.options.min, E.dataMin), E.dataMin)), L = E.toPixels(Math.max(S(E.options.max, E.dataMax), E.dataMax)), z = Math.max(m, L);
X.min = Math.min(E.pos, Math.min(
m,
L
) - g), X.max = Math.max(E.pos + E.len, z + g);
}
}), u.res = !0) : u.followTouchMove && t === 1 ? this.runPointActions(u.normalize(c)) : p.length && (T(i, "touchpan", { originalEvent: c }, function() {
W || (u.selectionMarker = W = f({ destroy: F, touch: !0 }, i.plotBox)), u.pinchTranslate(p, a, P, W, I, s), u.hasPinched = n, u.scaleGroups(P, I);
}), u.res && (u.res = !1, this.reset(!1, 0)));
}, h.prototype.pinchTranslate = function(c, u, i, p, a, t) {
this.zoomHor && this.pinchTranslateDirection(!0, c, u, i, p, a, t), this.zoomVert && this.pinchTranslateDirection(!1, c, u, i, p, a, t);
}, h.prototype.pinchTranslateDirection = function(c, u, i, p, a, t, s, n) {
var P = this.chart, D = c ? "x" : "y", I = c ? "X" : "Y", W = "chart" + I, E = c ? "width" : "height", X = P["plot" + (c ? "Left" : "Top")], g = P.inverted, m = P.bounds[c ? "h" : "v"], L = u.length === 1, z = u[0][W], $ = !L && u[1][W];
u = function() {
typeof Z == "number" && 20 < Math.abs(z - $) && (H = n || Math.abs(Y - Z) / Math.abs(z - $)), A = (X - Y) / H + z, Q = P["plot" + (c ? "Width" : "Height")] / H;
};
var Q, A, H = n || 1, Y = i[0][W], Z = !L && i[1][W];
if (u(), i = A, i < m.min) {
i = m.min;
var q = !0;
} else
i + Q > m.max && (i = m.max - Q, q = !0);
q ? (Y -= 0.8 * (Y - s[D][0]), typeof Z == "number" && (Z -= 0.8 * (Z - s[D][1])), u()) : s[D] = [Y, Z], g || (t[D] = A - X, t[E] = Q), t = g ? 1 / H : H, a[E] = Q, a[D] = i, p[g ? c ? "scaleY" : "scaleX" : "scale" + I] = H, p["translate" + I] = t * X + (Y - t * z);
}, h.prototype.reset = function(c, u) {
var i = this.chart, p = i.hoverSeries, a = i.hoverPoint, t = i.hoverPoints, s = i.tooltip, n = s && s.shared ? t : a;
c && n && v(n).forEach(function(P) {
P.series.isCartesian && typeof P.plotX > "u" && (c = !1);
}), c ? s && n && v(n).length && (s.refresh(n), s.shared && t ? t.forEach(function(P) {
P.setState(P.state, !0), P.series.isCartesian && (P.series.xAxis.crosshair && P.series.xAxis.drawCrosshair(
null,
P
), P.series.yAxis.crosshair && P.series.yAxis.drawCrosshair(null, P));
}) : a && (a.setState(a.state, !0), i.axes.forEach(function(P) {
P.crosshair && a.series[P.coll] === P && P.drawCrosshair(null, a);
}))) : (a && a.onMouseOut(), t && t.forEach(function(P) {
P.setState();
}), p && p.onMouseOut(), s && s.hide(u), this.unDocMouseMove && (this.unDocMouseMove = this.unDocMouseMove()), i.axes.forEach(function(P) {
P.hideCrosshair();
}), this.hoverX = i.hoverPoints = i.hoverPoint = null);
}, h.prototype.runPointActions = function(c, u) {
var i = this.chart, p = i.tooltip && i.tooltip.options.enabled ? i.tooltip : void 0, a = p ? p.shared : !1, t = u || i.hoverPoint, s = t && t.series || i.hoverSeries;
u = this.getHoverData(t, s, i.series, (!c || c.type !== "touchmove") && (!!u || s && s.directTouch && this.isDirectTouch), a, c), t = u.hoverPoint, s = u.hoverSeries;
var n = u.hoverPoints;
if (u = s && s.tooltipOptions.followPointer && !s.tooltipOptions.split, a = a && s && !s.noSharedTooltip, t && (t !== i.hoverPoint || p && p.isHidden)) {
if ((i.hoverPoints || []).forEach(function(P) {
n.indexOf(P) === -1 && P.setState();
}), i.hoverSeries !== s && s.onMouseOver(), this.applyInactiveState(n), (n || []).forEach(function(P) {
P.setState("hover");
}), i.hoverPoint && i.hoverPoint.firePointEvent("mouseOut"), !t.series)
return;
i.hoverPoints = n, i.hoverPoint = t, t.firePointEvent("mouseOver"), p && p.refresh(a ? n : t, c);
} else
u && p && !p.isHidden && (t = p.getAnchor([{}], c), i.isInsidePlot(t[0], t[1], { visiblePlotOnly: !0 }) && p.updatePosition({ plotX: t[0], plotY: t[1] }));
this.unDocMouseMove || (this.unDocMouseMove = B(i.container.ownerDocument, "mousemove", function(P) {
var D = V[h.hoverChartIndex];
D && D.pointer.onDocumentMouseMove(P);
}), this.eventsToUnbind.push(this.unDocMouseMove)), i.axes.forEach(function(P) {
var D = S((P.crosshair || {}).snap, !0), I;
D && ((I = i.hoverPoint) && I.series[P.coll] === P || (I = l(n, function(W) {
return W.series[P.coll] === P;
}))), I || !D ? P.drawCrosshair(c, I) : P.hideCrosshair();
});
}, h.prototype.scaleGroups = function(c, u) {
var i = this.chart;
i.series.forEach(function(p) {
var a = c || p.getPlotBox();
p.group && (p.xAxis && p.xAxis.zoomEnabled || i.mapView) && (p.group.attr(a), p.markerGroup && (p.markerGroup.attr(a), p.markerGroup.clip(u ? i.clipRect : null)), p.dataLabelsGroup && p.dataLabelsGroup.attr(a));
}), i.clipRect.attr(u || i.clipBox);
}, h.prototype.setDOMEvents = function() {
var c = this, u = this.chart.container, i = u.ownerDocument;
u.onmousedown = this.onContainerMouseDown.bind(this), u.onmousemove = this.onContainerMouseMove.bind(this), u.onclick = this.onContainerClick.bind(this), this.eventsToUnbind.push(B(u, "mouseenter", this.onContainerMouseEnter.bind(this))), this.eventsToUnbind.push(B(u, "mouseleave", this.onContainerMouseLeave.bind(this))), h.unbindDocumentMouseUp || (h.unbindDocumentMouseUp = B(i, "mouseup", this.onDocumentMouseUp.bind(this)));
for (var p = this.chart.renderTo.parentElement; p && p.tagName !== "BODY"; )
this.eventsToUnbind.push(B(p, "scroll", function() {
delete c.chartPosition;
})), p = p.parentElement;
N.hasTouch && (this.eventsToUnbind.push(B(u, "touchstart", this.onContainerTouchStart.bind(this), { passive: !1 })), this.eventsToUnbind.push(B(u, "touchmove", this.onContainerTouchMove.bind(this), { passive: !1 })), h.unbindDocumentTouchEnd || (h.unbindDocumentTouchEnd = B(i, "touchend", this.onDocumentTouchEnd.bind(this), { passive: !1 })));
}, h.prototype.setHoverChartIndex = function() {
var c = this.chart, u = N.charts[S(h.hoverChartIndex, -1)];
u && u !== c && u.pointer.onContainerMouseLeave({ relatedTarget: !0 }), u && u.mouseIsDown || (h.hoverChartIndex = c.index);
}, h.prototype.touch = function(c, u) {
var i = this.chart;
if (this.setHoverChartIndex(), c.touches.length === 1)
if (c = this.normalize(c), i.isInsidePlot(c.chartX - i.plotLeft, c.chartY - i.plotTop, { visiblePlotOnly: !0 }) && !i.openMenu) {
if (u && this.runPointActions(c), c.type === "touchmove") {
u = this.pinchDown;
var p = u[0] ? 4 <= Math.sqrt(Math.pow(u[0].chartX - c.chartX, 2) + Math.pow(u[0].chartY - c.chartY, 2)) : !1;
}
S(p, !0) && this.pinch(c);
} else
u && this.reset();
else
c.touches.length === 2 && this.pinch(c);
}, h.prototype.touchSelect = function(c) {
return !(!this.chart.options.chart.zoomBySingleTouch || !c.touches || c.touches.length !== 1);
}, h.prototype.zoomOption = function(c) {
var u = this.chart, i = u.options.chart;
u = u.inverted;
var p = i.zoomType || "";
/touch/.test(c.type) && (p = S(i.pinchType, p)), this.zoomX = c = /x/.test(p), this.zoomY = i = /y/.test(p), this.zoomHor = c && !u || i && u, this.zoomVert = i && !u || c && u, this.hasZoom = c || i;
}, h;
}(), y;
}), C(o, "Core/MSPointer.js", [o["Core/Globals.js"], o["Core/Pointer.js"], o["Core/Utilities.js"]], function(y, N, _) {
function U() {
var k = [];
return k.item = function(b) {
return this[b];
}, l(O, function(b) {
k.push({ pageX: b.pageX, pageY: b.pageY, target: b.target });
}), k;
}
function G(k, b, S, v) {
var h = F[N.hoverChartIndex || NaN];
k.pointerType !== "touch" && k.pointerType !== k.MSPOINTER_TYPE_TOUCH || !h || (h = h.pointer, v(k), h[b]({ type: S, target: k.currentTarget, preventDefault: j, touches: U() }));
}
var V = this && this.__extends || function() {
var k = function(b, S) {
return k = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(v, h) {
v.__proto__ = h;
} || function(v, h) {
for (var c in h)
h.hasOwnProperty(c) && (v[c] = h[c]);
}, k(b, S);
};
return function(b, S) {
function v() {
this.constructor = b;
}
k(b, S), b.prototype = S === null ? Object.create(S) : (v.prototype = S.prototype, new v());
};
}(), F = y.charts, B = y.doc, j = y.noop, w = y.win, x = _.addEvent, f = _.css, l = _.objectEach, T = _.removeEvent, O = {}, R = !!w.PointerEvent;
return function(k) {
function b() {
return k !== null && k.apply(this, arguments) || this;
}
return V(b, k), b.isRequired = function() {
return !(y.hasTouch || !w.PointerEvent && !w.MSPointerEvent);
}, b.prototype.batchMSEvents = function(S) {
S(this.chart.container, R ? "pointerdown" : "MSPointerDown", this.onContainerPointerDown), S(this.chart.container, R ? "pointermove" : "MSPointerMove", this.onContainerPointerMove), S(B, R ? "pointerup" : "MSPointerUp", this.onDocumentPointerUp);
}, b.prototype.destroy = function() {
this.batchMSEvents(T), k.prototype.destroy.call(this);
}, b.prototype.init = function(S, v) {
k.prototype.init.call(this, S, v), this.hasZoom && f(S.container, { "-ms-touch-action": "none", "touch-action": "none" });
}, b.prototype.onContainerPointerDown = function(S) {
G(S, "onContainerTouchStart", "touchstart", function(v) {
O[v.pointerId] = { pageX: v.pageX, pageY: v.pageY, target: v.currentTarget };
});
}, b.prototype.onContainerPointerMove = function(S) {
G(S, "onContainerTouchMove", "touchmove", function(v) {
O[v.pointerId] = {
pageX: v.pageX,
pageY: v.pageY
}, O[v.pointerId].target || (O[v.pointerId].target = v.currentTarget);
});
}, b.prototype.onDocumentPointerUp = function(S) {
G(S, "onDocumentTouchEnd", "touchend", function(v) {
delete O[v.pointerId];
});
}, b.prototype.setDOMEvents = function() {
k.prototype.setDOMEvents.call(this), (this.hasZoom || this.followTouchMove) && this.batchMSEvents(x);
}, b;
}(N);
}), C(o, "Core/Legend/Legend.js", [
o["Core/Animation/AnimationUtilities.js"],
o["Core/FormatUtilities.js"],
o["Core/Globals.js"],
o["Core/Series/Point.js"],
o["Core/Renderer/RendererUtilities.js"],
o["Core/Utilities.js"]
], function(y, N, _, U, G, V) {
var F = y.animObject, B = y.setAnimation, j = N.format;
y = _.isFirefox;
var w = _.marginNames;
_ = _.win;
var x = G.distribute, f = V.addEvent, l = V.createElement, T = V.css, O = V.defined, R = V.discardElement, k = V.find, b = V.fireEvent, S = V.isNumber, v = V.merge, h = V.pick, c = V.relativeLength, u = V.stableSort, i = V.syncTimeout;
return G = V.wrap, V = function() {
function p(a, t) {
this.allItems = [], this.contentGroup = this.box = void 0, this.display = !1, this.group = void 0, this.offsetWidth = this.maxLegendWidth = this.maxItemWidth = this.legendWidth = this.legendHeight = this.lastLineHeight = this.lastItemY = this.itemY = this.itemX = this.itemMarginTop = this.itemMarginBottom = this.itemHeight = this.initialItemY = 0, this.options = {}, this.padding = 0, this.pages = [], this.proximate = !1, this.scrollGroup = void 0, this.widthOption = this.totalItemWidth = this.titleHeight = this.symbolWidth = this.symbolHeight = 0, this.chart = a, this.init(a, t);
}
return p.prototype.init = function(a, t) {
this.chart = a, this.setOptions(t), t.enabled && (this.render(), f(this.chart, "endResize", function() {
this.legend.positionCheckboxes();
}), this.proximate ? this.unchartrender = f(this.chart, "render", function() {
this.legend.proximatePositions(), this.legend.positionItems();
}) : this.unchartrender && this.unchartrender());
}, p.prototype.setOptions = function(a) {
var t = h(a.padding, 8);
this.options = a, this.chart.styledMode || (this.itemStyle = a.itemStyle, this.itemHiddenStyle = v(this.itemStyle, a.itemHiddenStyle)), this.itemMarginTop = a.itemMarginTop || 0, this.itemMarginBottom = a.itemMarginBottom || 0, this.padding = t, this.initialItemY = t - 5, this.symbolWidth = h(
a.symbolWidth,
16
), this.pages = [], this.proximate = a.layout === "proximate" && !this.chart.inverted, this.baseline = void 0;
}, p.prototype.update = function(a, t) {
var s = this.chart;
this.setOptions(v(!0, this.options, a)), this.destroy(), s.isDirtyLegend = s.isDirtyBox = !0, h(t, !0) && s.redraw(), b(this, "afterUpdate");
}, p.prototype.colorizeItem = function(a, t) {
if (a.legendGroup[t ? "removeClass" : "addClass"]("highcharts-legend-item-hidden"), !this.chart.styledMode) {
var s = this.options, n = a.legendItem, P = a.legendLine, D = a.legendSymbol, I = this.itemHiddenStyle.color;
s = t ? s.itemStyle.color : I;
var W = t && a.color || I, E = a.options && a.options.marker, X = { fill: W };
n && n.css({ fill: s, color: s }), P && P.attr({ stroke: W }), D && (E && D.isMarker && (X = a.pointAttribs(), t || (X.stroke = X.fill = I)), D.attr(X));
}
b(this, "afterColorizeItem", { item: a, visible: t });
}, p.prototype.positionItems = function() {
this.allItems.forEach(this.positionItem, this), this.chart.isResizing || this.positionCheckboxes();
}, p.prototype.positionItem = function(a) {
var t = this, s = this.options, n = s.symbolPadding, P = !s.rtl, D = a._legendItemPos;
s = D[0], D = D[1];
var I = a.checkbox, W = a.legendGroup;
W && W.element && (n = { translateX: P ? s : this.legendWidth - s - 2 * n - 4, translateY: D }, P = function() {
b(t, "afterPositionItem", { item: a });
}, O(W.translateY) ? W.animate(n, void 0, P) : (W.attr(n), P())), I && (I.x = s, I.y = D);
}, p.prototype.destroyItem = function(a) {
var t = a.checkbox;
["legendItem", "legendLine", "legendSymbol", "legendGroup"].forEach(function(s) {
a[s] && (a[s] = a[s].destroy());
}), t && R(a.checkbox);
}, p.prototype.destroy = function() {
function a(t) {
this[t] && (this[t] = this[t].destroy());
}
this.getAllItems().forEach(function(t) {
[
"legendItem",
"legendGroup"
].forEach(a, t);
}), "clipRect up down pager nav box title group".split(" ").forEach(a, this), this.display = null;
}, p.prototype.positionCheckboxes = function() {
var a = this.group && this.group.alignAttr, t = this.clipHeight || this.legendHeight, s = this.titleHeight;
if (a) {
var n = a.translateY;
this.allItems.forEach(function(P) {
var D = P.checkbox;
if (D) {
var I = n + s + D.y + (this.scrollOffset || 0) + 3;
T(D, { left: a.translateX + P.checkboxOffset + D.x - 20 + "px", top: I + "px", display: this.proximate || I > n - 6 && I < n + t - 6 ? "" : "none" });
}
}, this);
}
}, p.prototype.renderTitle = function() {
var a = this.options, t = this.padding, s = a.title, n = 0;
s.text && (this.title || (this.title = this.chart.renderer.label(s.text, t - 3, t - 4, null, null, null, a.useHTML, null, "legend-title").attr({ zIndex: 1 }), this.chart.styledMode || this.title.css(s.style), this.title.add(this.group)), s.width || this.title.css({ width: this.maxLegendWidth + "px" }), a = this.title.getBBox(), n = a.height, this.offsetWidth = a.width, this.contentGroup.attr({ translateY: n })), this.titleHeight = n;
}, p.prototype.setText = function(a) {
var t = this.options;
a.legendItem.attr({ text: t.labelFormat ? j(t.labelFormat, a, this.chart) : t.labelFormatter.call(a) });
}, p.prototype.renderItem = function(a) {
var t = this.chart, s = t.renderer, n = this.options, P = this.symbolWidth, D = n.symbolPadding || 0, I = this.itemStyle, W = this.itemHiddenStyle, E = n.layout === "horizontal" ? h(n.itemDistance, 20) : 0, X = !n.rtl, g = !a.series, m = !g && a.series.drawLegendSymbol ? a.series : a, L = m.options, z = this.createCheckboxForItem && L && L.showCheckbox, $ = n.useHTML, Q = a.options.className, A = a.legendItem;
L = P + D + E + (z ? 20 : 0), A || (a.legendGroup = s.g("legend-item").addClass("highcharts-" + m.type + "-series highcharts-color-" + a.colorIndex + (Q ? " " + Q : "") + (g ? " highcharts-series-" + a.index : "")).attr({ zIndex: 1 }).add(this.scrollGroup), a.legendItem = A = s.text("", X ? P + D : -D, this.baseline || 0, $), t.styledMode || A.css(v(a.visible ? I : W)), A.attr({ align: X ? "left" : "right", zIndex: 2 }).add(a.legendGroup), this.baseline || (this.fontMetrics = s.fontMetrics(t.styledMode ? 12 : I.fontSize, A), this.baseline = this.fontMetrics.f + 3 + this.itemMarginTop, A.attr("y", this.baseline), this.symbolHeight = n.symbolHeight || this.fontMetrics.f, n.squareSymbol && (this.symbolWidth = h(n.symbolWidth, Math.max(this.symbolHeight, 16)), L = this.symbolWidth + D + E + (z ? 20 : 0), X && A.attr("x", this.symbolWidth + D))), m.drawLegendSymbol(this, a), this.setItemEvents && this.setItemEvents(a, A, $)), z && !a.checkbox && this.createCheckboxForItem && this.createCheckboxForItem(a), this.colorizeItem(a, a.visible), !t.styledMode && I.width || A.css({ width: (n.itemWidth || this.widthOption || t.spacingBox.width) - L + "px" }), this.setText(a), t = A.getBBox(), s = this.fontMetrics && this.fontMetrics.h || 0, a.itemWidth = a.checkboxOffset = n.itemWidth || a.legendItemWidth || t.width + L, this.maxItemWidth = Math.max(this.maxItemWidth, a.itemWidth), this.totalItemWidth += a.itemWidth, this.itemHeight = a.itemHeight = Math.round(a.legendItemHeight || (t.height > 1.5 * s ? t.height : s));
}, p.prototype.layoutItem = function(a) {
var t = this.options, s = this.padding, n = t.layout === "horizontal", P = a.itemHeight, D = this.itemMarginBottom, I = this.itemMarginTop, W = n ? h(t.itemDistance, 20) : 0, E = this.maxLegendWidth;
t = t.alignColumns && this.totalItemWidth > E ? this.maxItemWidth : a.itemWidth, n && this.itemX - s + t > E && (this.itemX = s, this.lastLineHeight && (this.itemY += I + this.lastLineHeight + D), this.lastLineHeight = 0), this.lastItemY = I + this.itemY + D, this.lastLineHeight = Math.max(P, this.lastLineHeight), a._legendItemPos = [this.itemX, this.itemY], n ? this.itemX += t : (this.itemY += I + P + D, this.lastLineHeight = P), this.offsetWidth = this.widthOption || Math.max((n ? this.itemX - s - (a.checkbox ? 0 : W) : t) + s, this.offsetWidth);
}, p.prototype.getAllItems = function() {
var a = [];
return this.chart.series.forEach(function(t) {
var s = t && t.options;
t && h(s.showInLegend, O(s.linkedTo) ? !1 : void 0, !0) && (a = a.concat(t.legendItems || (s.legendType === "point" ? t.data : t)));
}), b(this, "afterGetAllItems", { allItems: a }), a;
}, p.prototype.getAlignment = function() {
var a = this.options;
return this.proximate ? a.align.charAt(0) + "tv" : a.floating ? "" : a.align.charAt(0) + a.verticalAlign.charAt(0) + a.layout.charAt(0);
}, p.prototype.adjustMargins = function(a, t) {
var s = this.chart, n = this.options, P = this.getAlignment();
P && [/(lth|ct|rth)/, /(rtv|rm|rbv)/, /(rbh|cb|lbh)/, /(lbv|lm|ltv)/].forEach(function(D, I) {
D.test(P) && !O(a[I]) && (s[w[I]] = Math.max(s[w[I]], s.legend[(I + 1) % 2 ? "legendHeight" : "legendWidth"] + [1, -1, -1, 1][I] * n[I % 2 ? "x" : "y"] + h(n.margin, 12) + t[I] + (s.titleOffset[I] || 0)));
});
}, p.prototype.proximatePositions = function() {
var a = this.chart, t = [], s = this.options.align === "left";
this.allItems.forEach(function(n) {
var P, D = s;
if (n.yAxis) {
n.xAxis.options.reversed && (D = !D), n.points && (P = k(D ? n.points : n.points.slice(0).reverse(), function(W) {
return S(W.plotY);
})), D = this.itemMarginTop + n.legendItem.getBBox().height + this.itemMarginBottom;
var I = n.yAxis.top - a.plotTop;
n.visible ? (P = P ? P.plotY : n.yAxis.height, P += I - 0.3 * D) : P = I + n.yAxis.height, t.push({ target: P, size: D, item: n });
}
}, this), x(t, a.plotHeight).forEach(function(n) {
n.item._legendItemPos && (n.item._legendItemPos[1] = a.plotTop - a.spacing[0] + n.pos);
});
}, p.prototype.render = function() {
var a = this.chart, t = a.renderer, s = this.options, n = this.padding, P = this.getAllItems(), D = this.group, I = this.box;
this.itemX = n, this.itemY = this.initialItemY, this.lastItemY = this.offsetWidth = 0, this.widthOption = c(s.width, a.spacingBox.width - n);
var W = a.spacingBox.width - 2 * n - s.x;
-1 < ["rm", "lm"].indexOf(this.getAlignment().substring(0, 2)) && (W /= 2), this.maxLegendWidth = this.widthOption || W, D || (this.group = D = t.g("legend").addClass(s.className || "").attr({ zIndex: 7 }).add(), this.contentGroup = t.g().attr({ zIndex: 1 }).add(D), this.scrollGroup = t.g().add(this.contentGroup)), this.renderTitle(), u(P, function(X, g) {
return (X.options && X.options.legendIndex || 0) - (g.options && g.options.legendIndex || 0);
}), s.reversed && P.reverse(), this.allItems = P, this.display = W = !!P.length, this.itemHeight = this.totalItemWidth = this.maxItemWidth = this.lastLineHeight = 0, P.forEach(this.renderItem, this), P.forEach(this.layoutItem, this), P = (this.widthOption || this.offsetWidth) + n;
var E = this.lastItemY + this.lastLineHeight + this.titleHeight;
E = this.handleOverflow(E), E += n, I || (this.box = I = t.rect().addClass("highcharts-legend-box").attr({ r: s.borderRadius }).add(D), I.isNew = !0), a.styledMode || I.attr({ stroke: s.borderColor, "stroke-width": s.borderWidth || 0, fill: s.backgroundColor || "none" }).shadow(s.shadow), 0 < P && 0 < E && (I[I.isNew ? "attr" : "animate"](I.crisp.call({}, { x: 0, y: 0, width: P, height: E }, I.strokeWidth())), I.isNew = !1), I[W ? "show" : "hide"](), a.styledMode && D.getStyle("display") === "none" && (P = E = 0), this.legendWidth = P, this.legendHeight = E, W && this.align(), this.proximate || this.positionItems(), b(this, "afterRender");
}, p.prototype.align = function(a) {
a === void 0 && (a = this.chart.spacingBox);
var t = this.chart, s = this.options, n = a.y;
/(lth|ct|rth)/.test(this.getAlignment()) && 0 < t.titleOffset[0] ? n += t.titleOffset[0] : /(lbh|cb|rbh)/.test(this.getAlignment()) && 0 < t.titleOffset[2] && (n -= t.titleOffset[2]), n !== a.y && (a = v(a, { y: n })), this.group.align(v(s, { width: this.legendWidth, height: this.legendHeight, verticalAlign: this.proximate ? "top" : s.verticalAlign }), !0, a);
}, p.prototype.handleOverflow = function(a) {
var t = this, s = this.chart, n = s.renderer, P = this.options, D = P.y, I = P.verticalAlign === "top", W = this.padding, E = P.maxHeight, X = P.navigation, g = h(X.animation, !0), m = X.arrowSize || 12, L = this.pages, z = this.allItems, $ = function(q) {
typeof q == "number" ? Z.attr({ height: q }) : Z && (t.clipRect = Z.destroy(), t.contentGroup.clip()), t.contentGroup.div && (t.contentGroup.div.style.clip = q ? "rect(" + W + "px,9999px," + (W + q) + "px,0)" : "auto");
}, Q = function(q) {
return t[q] = n.circle(0, 0, 1.3 * m).translate(m / 2, m / 2).add(Y), s.styledMode || t[q].attr("fill", "rgba(0,0,0,0.0001)"), t[q];
}, A, H;
D = s.spacingBox.height + (I ? -D : D) - W;
var Y = this.nav, Z = this.clipRect;
return P.layout !== "horizontal" || P.verticalAlign === "middle" || P.floating || (D /= 2), E && (D = Math.min(D, E)), L.length = 0, a && 0 < D && a > D && X.enabled !== !1 ? (this.clipHeight = A = Math.max(D - 20 - this.titleHeight - W, 0), this.currentPage = h(this.currentPage, 1), this.fullHeight = a, z.forEach(function(q, it) {
var et = q._legendItemPos[1], nt = Math.round(q.legendItem.getBBox().height), rt = L.length;
(!rt || et - L[rt - 1] > A && (H || et) !== L[rt - 1]) && (L.push(H || et), rt++), q.pageIx = rt - 1, H && (z[it - 1].pageIx = rt - 1), it === z.length - 1 && et + nt - L[rt - 1] > A && nt <= A && (L.push(et), q.pageIx = rt), et !== H && (H = et);
}), Z || (Z = t.clipRect = n.clipRect(0, W, 9999, 0), t.contentGroup.clip(Z)), $(A), Y || (this.nav = Y = n.g().attr({ zIndex: 1 }).add(this.group), this.up = n.symbol("triangle", 0, 0, m, m).add(Y), Q("upTracker").on(
"click",
function() {
t.scroll(-1, g);
}
), this.pager = n.text("", 15, 10).addClass("highcharts-legend-navigation"), s.styledMode || this.pager.css(X.style), this.pager.add(Y), this.down = n.symbol("triangle-down", 0, 0, m, m).add(Y), Q("downTracker").on("click", function() {
t.scroll(1, g);
})), t.scroll(0), a = D) : Y && ($(), this.nav = Y.destroy(), this.scrollGroup.attr({ translateY: 1 }), this.clipHeight = 0), a;
}, p.prototype.scroll = function(a, t) {
var s = this, n = this.chart, P = this.pages, D = P.length, I = this.clipHeight, W = this.options.navigation, E = this.pager, X = this.padding, g = this.currentPage + a;
g > D && (g = D), 0 < g && (typeof t < "u" && B(t, n), this.nav.attr({ translateX: X, translateY: I + this.padding + 7 + this.titleHeight, visibility: "visible" }), [this.up, this.upTracker].forEach(function(m) {
m.attr({ class: g === 1 ? "highcharts-legend-nav-inactive" : "highcharts-legend-nav-active" });
}), E.attr({ text: g + "/" + D }), [this.down, this.downTracker].forEach(
function(m) {
m.attr({ x: 18 + this.pager.getBBox().width, class: g === D ? "highcharts-legend-nav-inactive" : "highcharts-legend-nav-active" });
},
this
), n.styledMode || (this.up.attr({ fill: g === 1 ? W.inactiveColor : W.activeColor }), this.upTracker.css({ cursor: g === 1 ? "default" : "pointer" }), this.down.attr({ fill: g === D ? W.inactiveColor : W.activeColor }), this.downTracker.css({ cursor: g === D ? "default" : "pointer" })), this.scrollOffset = -P[g - 1] + this.initialItemY, this.scrollGroup.animate({ translateY: this.scrollOffset }), this.currentPage = g, this.positionCheckboxes(), a = F(h(t, n.renderer.globalAnimation, !0)), i(function() {
b(s, "afterScroll", { currentPage: g });
}, a.duration));
}, p.prototype.setItemEvents = function(a, t, s) {
var n = this, P = n.chart.renderer.boxWrapper, D = a instanceof U, I = "highcharts-legend-" + (D ? "point" : "series") + "-active", W = n.chart.styledMode, E = function(X) {
n.allItems.forEach(function(g) {
a !== g && [g].concat(g.linkedSeries || []).forEach(function(m) {
m.setState(X, !D);
});
});
};
(s ? [t, a.legendSymbol] : [a.legendGroup]).forEach(function(X) {
X && X.on("mouseover", function() {
a.visible && E("inactive"), a.setState("hover"), a.visible && P.addClass(I), W || t.css(n.options.itemHoverStyle);
}).on("mouseout", function() {
n.chart.styledMode || t.css(v(a.visible ? n.itemStyle : n.itemHiddenStyle)), E(""), P.removeClass(I), a.setState();
}).on("click", function(g) {
var m = function() {
a.setVisible && a.setVisible(), E(a.visible ? "inactive" : "");
};
P.removeClass(I), g = { browserEvent: g }, a.firePointEvent ? a.firePointEvent("legendItemClick", g, m) : b(a, "legendItemClick", g, m);
});
});
}, p.prototype.createCheckboxForItem = function(a) {
a.checkbox = l(
"input",
{ type: "checkbox", className: "highcharts-legend-checkbox", checked: a.selected, defaultChecked: a.selected },
this.options.itemCheckboxStyle,
this.chart.container
), f(a.checkbox, "click", function(t) {
b(a.series || a, "checkboxClick", { checked: t.target.checked, item: a }, function() {
a.select();
});
});
}, p;
}(), (/Trident\/7\.0/.test(_.navigator && _.navigator.userAgent) || y) && G(V.prototype, "positionItem", function(p, a) {
var t = this, s = function() {
a._legendItemPos && p.call(t, a);
};
s(), t.bubbleLegend || setTimeout(s);
}), V;
}), C(
o,
"Core/Series/SeriesRegistry.js",
[o["Core/Globals.js"], o["Core/DefaultOptions.js"], o["Core/Series/Point.js"], o["Core/Utilities.js"]],
function(y, N, _, U) {
var G = N.defaultOptions, V = U.error, F = U.extendClass, B = U.merge, j;
return function(w) {
function x(f, l) {
var T = G.plotOptions || {}, O = l.defaultOptions;
l.prototype.pointClass || (l.prototype.pointClass = _), l.prototype.type = f, O && (T[f] = O), w.seriesTypes[f] = l;
}
w.seriesTypes = y.seriesTypes, w.getSeries = function(f, l) {
l === void 0 && (l = {});
var T = f.options.chart;
T = l.type || T.type || T.defaultSeriesType || "";
var O = w.seriesTypes[T];
return w || V(17, !0, f, { missingModuleFor: T }), T = new O(), typeof T.init == "function" && T.init(f, l), T;
}, w.registerSeriesType = x, w.seriesType = function(f, l, T, O, R) {
var k = G.plotOptions || {};
return l = l || "", k[f] = B(k[l], T), x(f, F(w.seriesTypes[l] || function() {
}, O)), w.seriesTypes[f].prototype.type = f, R && (w.seriesTypes[f].prototype.pointClass = F(_, R)), w.seriesTypes[f];
};
}(j || (j = {})), j;
}
), C(o, "Core/Chart/Chart.js", [
o["Core/Animation/AnimationUtilities.js"],
o["Core/Axis/Axis.js"],
o["Core/FormatUtilities.js"],
o["Core/Foundation.js"],
o["Core/Globals.js"],
o["Core/Legend/Legend.js"],
o["Core/MSPointer.js"],
o["Core/DefaultOptions.js"],
o["Core/Pointer.js"],
o["Core/Renderer/RendererRegistry.js"],
o["Core/Series/SeriesRegistry.js"],
o["Core/Renderer/SVG/SVGRenderer.js"],
o["Core/Time.js"],
o["Core/Utilities.js"],
o["Core/Renderer/HTML/AST.js"]
], function(y, N, _, U, G, V, F, B, j, w, x, f, l, T, O) {
var R = y.animate, k = y.animObject, b = y.setAnimation, S = _.numberFormat, v = U.registerEventOptions, h = G.charts, c = G.doc, u = G.marginNames, i = G.svg, p = G.win, a = B.defaultOptions, t = B.defaultTime, s = x.seriesTypes, n = T.addEvent, P = T.attr, D = T.cleanRecursively, I = T.createElement, W = T.css, E = T.defined, X = T.discardElement, g = T.erase, m = T.error, L = T.extend, z = T.find, $ = T.fireEvent, Q = T.getStyle, A = T.isArray, H = T.isNumber, Y = T.isObject, Z = T.isString, q = T.merge, it = T.objectEach, et = T.pick, nt = T.pInt, rt = T.relativeLength, ct = T.removeEvent, gt = T.splat, dt = T.syncTimeout, ht = T.uniqueKey;
return y = function() {
function at(J, tt, ot) {
this.series = this.renderTo = this.renderer = this.pointer = this.pointCount = this.plotWidth = this.plotTop = this.plotLeft = this.plotHeight = this.plotBox = this.options = this.numberFormatter = this.margin = this.legend = this.labelCollectors = this.isResizing = this.index = this.eventOptions = this.container = this.colorCounter = this.clipBox = this.chartWidth = this.chartHeight = this.bounds = this.axisOffset = this.axes = void 0, this.sharedClips = {}, this.yAxis = this.xAxis = this.userOptions = this.titleOffset = this.time = this.symbolCounter = this.spacingBox = this.spacing = void 0, this.getArgs(J, tt, ot);
}
return at.chart = function(J, tt, ot) {
return new at(J, tt, ot);
}, at.prototype.getArgs = function(J, tt, ot) {
Z(J) || J.nodeName ? (this.renderTo = J, this.init(tt, ot)) : this.init(J, tt);
}, at.prototype.init = function(J, tt) {
var ot = J.plotOptions || {};
$(this, "init", { args: arguments }, function() {
var lt = q(a, J), pt = lt.chart;
it(lt.plotOptions, function(yt, vt) {
Y(yt) && (yt.tooltip = ot[vt] && q(ot[vt].tooltip) || void 0);
}), lt.tooltip.userOptions = J.chart && J.chart.forExport && J.tooltip.userOptions || J.tooltip, this.userOptions = J, this.margin = [], this.spacing = [], this.bounds = { h: {}, v: {} }, this.labelCollectors = [], this.callback = tt, this.isResizing = 0, this.options = lt, this.axes = [], this.series = [], this.time = J.time && Object.keys(J.time).length ? new l(J.time) : G.time, this.numberFormatter = pt.numberFormatter || S, this.styledMode = pt.styledMode, this.hasCartesianSeries = pt.showAxes, this.index = h.length, h.push(this), G.chartCount++, v(this, pt), this.xAxis = [], this.yAxis = [], this.pointCount = this.colorCounter = this.symbolCounter = 0, $(this, "afterInit"), this.firstRender();
});
}, at.prototype.initSeries = function(J) {
var tt = this.options.chart;
tt = J.type || tt.type || tt.defaultSeriesType;
var ot = s[tt];
return ot || m(17, !0, this, { missingModuleFor: tt }), tt = new ot(), typeof tt.init == "function" && tt.init(this, J), tt;
}, at.prototype.setSeriesData = function() {
this.getSeriesOrderByLinks().forEach(function(J) {
J.points || J.data || !J.enabledDataSorting || J.setData(J.options.data, !1);
});
}, at.prototype.getSeriesOrderByLinks = function() {
return this.series.concat().sort(function(J, tt) {
return J.linkedSeries.length || tt.linkedSeries.length ? tt.linkedSeries.length - J.linkedSeries.length : 0;
});
}, at.prototype.orderSeries = function(J) {
var tt = this.series;
J = J || 0;
for (var ot = tt.length; J < ot; ++J)
tt[J] && (tt[J].index = J, tt[J].name = tt[J].getName());
}, at.prototype.isInsidePlot = function(J, tt, ot) {
ot === void 0 && (ot = {});
var lt = this.inverted, pt = this.plotBox, yt = this.plotLeft, vt = this.plotTop, Ct = this.scrollablePlotBox, Pt = 0, At = 0;
ot.visiblePlotOnly && this.scrollingContainer && (At = this.scrollingContainer, Pt = At.scrollLeft, At = At.scrollTop);
var St = ot.series;
if (pt = ot.visiblePlotOnly && Ct || pt, Ct = ot.inverted ? tt : J, tt = ot.inverted ? J : tt, J = { x: Ct, y: tt, isInsidePlot: !0 }, !ot.ignoreX) {
var Dt = St && (lt ? St.yAxis : St.xAxis) || { pos: yt, len: 1 / 0 };
Ct = ot.paneCoordinates ? Dt.pos + Ct : yt + Ct, Ct >= Math.max(Pt + yt, Dt.pos) && Ct <= Math.min(Pt + yt + pt.width, Dt.pos + Dt.len) || (J.isInsidePlot = !1);
}
return !ot.ignoreY && J.isInsidePlot && (lt = St && (lt ? St.xAxis : St.yAxis) || { pos: vt, len: 1 / 0 }, ot = ot.paneCoordinates ? lt.pos + tt : vt + tt, ot >= Math.max(At + vt, lt.pos) && ot <= Math.min(At + vt + pt.height, lt.pos + lt.len) || (J.isInsidePlot = !1)), $(this, "afterIsInsidePlot", J), J.isInsidePlot;
}, at.prototype.redraw = function(J) {
$(this, "beforeRedraw");
var tt = this.hasCartesianSeries ? this.axes : this.colorAxis || [], ot = this.series, lt = this.pointer, pt = this.legend, yt = this.userOptions.legend, vt = this.renderer, Ct = vt.isHidden(), Pt = [], At = this.isDirtyBox, St = this.isDirtyLegend;
for (this.setResponsive && this.setResponsive(!1), b(this.hasRendered ? J : !1, this), Ct && this.temporaryDisplay(), this.layOutTitles(), J = ot.length; J--; ) {
var Dt = ot[J];
if (Dt.options.stacking || Dt.options.centerInCategory) {
var _t = !0;
if (Dt.isDirty) {
var Nt = !0;
break;
}
}
}
if (Nt)
for (J = ot.length; J--; )
Dt = ot[J], Dt.options.stacking && (Dt.isDirty = !0);
ot.forEach(function(Ot) {
Ot.isDirty && (Ot.options.legendType === "point" ? (typeof Ot.updateTotals == "function" && Ot.updateTotals(), St = !0) : yt && (yt.labelFormatter || yt.labelFormat) && (St = !0)), Ot.isDirtyData && $(Ot, "updatedData");
}), St && pt && pt.options.enabled && (pt.render(), this.isDirtyLegend = !1), _t && this.getStacks(), tt.forEach(function(Ot) {
Ot.updateNames(), Ot.setScale();
}), this.getMargins(), tt.forEach(function(Ot) {
Ot.isDirty && (At = !0);
}), tt.forEach(function(Ot) {
var Kt = Ot.min + "," + Ot.max;
Ot.extKey !== Kt && (Ot.extKey = Kt, Pt.push(function() {
$(Ot, "afterSetExtremes", L(Ot.eventArgs, Ot.getExtremes())), delete Ot.eventArgs;
})), (At || _t) && Ot.redraw();
}), At && this.drawChartBox(), $(this, "predraw"), ot.forEach(function(Ot) {
(At || Ot.isDirty) && Ot.visible && Ot.redraw(), Ot.isDirtyData = !1;
}), lt && lt.reset(!0), vt.draw(), $(this, "redraw"), $(this, "render"), Ct && this.temporaryDisplay(!0), Pt.forEach(function(Ot) {
Ot.call();
});
}, at.prototype.get = function(J) {
function tt(yt) {
return yt.id === J || yt.options && yt.options.id === J;
}
for (var ot = this.series, lt = z(this.axes, tt) || z(this.series, tt), pt = 0; !lt && pt < ot.length; pt++)
lt = z(ot[pt].points || [], tt);
return lt;
}, at.prototype.getAxes = function() {
var J = this, tt = this.options, ot = tt.xAxis = gt(tt.xAxis || {});
tt = tt.yAxis = gt(tt.yAxis || {}), $(this, "getAxes"), ot.forEach(function(lt, pt) {
lt.index = pt, lt.isX = !0;
}), tt.forEach(function(lt, pt) {
lt.index = pt;
}), ot.concat(tt).forEach(function(lt) {
new N(J, lt);
}), $(this, "afterGetAxes");
}, at.prototype.getSelectedPoints = function() {
return this.series.reduce(function(J, tt) {
return tt.getPointsCollection().forEach(function(ot) {
et(ot.selectedStaging, ot.selected) && J.push(ot);
}), J;
}, []);
}, at.prototype.getSelectedSeries = function() {
return this.series.filter(function(J) {
return J.selected;
});
}, at.prototype.setTitle = function(J, tt, ot) {
this.applyDescription("title", J), this.applyDescription("subtitle", tt), this.applyDescription("caption", void 0), this.layOutTitles(ot);
}, at.prototype.applyDescription = function(J, tt) {
var ot = this, lt = J === "title" ? { color: "#333333", fontSize: this.options.isStock ? "16px" : "18px" } : { color: "#666666" };
lt = this.options[J] = q(!this.styledMode && { style: lt }, this.options[J], tt);
var pt = this[J];
pt && tt && (this[J] = pt = pt.destroy()), lt && !pt && (pt = this.renderer.text(lt.text, 0, 0, lt.useHTML).attr({ align: lt.align, class: "highcharts-" + J, zIndex: lt.zIndex || 4 }).add(), pt.update = function(yt) {
ot[{ title: "setTitle", subtitle: "setSubtitle", caption: "setCaption" }[J]](yt);
}, this.styledMode || pt.css(lt.style), this[J] = pt);
}, at.prototype.layOutTitles = function(J) {
var tt = [0, 0, 0], ot = this.renderer, lt = this.spacingBox;
["title", "subtitle", "caption"].forEach(function(yt) {
var vt = this[yt], Ct = this.options[yt], Pt = Ct.verticalAlign || "top";
yt = yt === "title" ? Pt === "top" ? -3 : 0 : Pt === "top" ? tt[0] + 2 : 0;
var At;
if (vt) {
this.styledMode || (At = Ct.style && Ct.style.fontSize), At = ot.fontMetrics(At, vt).b, vt.css({ width: (Ct.width || lt.width + (Ct.widthAdjust || 0)) + "px" });
var St = Math.round(vt.getBBox(Ct.useHTML).height);
vt.align(
L({ y: Pt === "bottom" ? At : yt + At, height: St }, Ct),
!1,
"spacingBox"
), Ct.floating || (Pt === "top" ? tt[0] = Math.ceil(tt[0] + St) : Pt === "bottom" && (tt[2] = Math.ceil(tt[2] + St)));
}
}, this), tt[0] && (this.options.title.verticalAlign || "top") === "top" && (tt[0] += this.options.title.margin), tt[2] && this.options.caption.verticalAlign === "bottom" && (tt[2] += this.options.caption.margin);
var pt = !this.titleOffset || this.titleOffset.join(",") !== tt.join(",");
this.titleOffset = tt, $(this, "afterLayOutTitles"), !this.isDirtyBox && pt && (this.isDirtyBox = this.isDirtyLegend = pt, this.hasRendered && et(J, !0) && this.isDirtyBox && this.redraw());
}, at.prototype.getChartSize = function() {
var J = this.options.chart, tt = J.width;
J = J.height;
var ot = this.renderTo;
E(tt) || (this.containerWidth = Q(ot, "width")), E(J) || (this.containerHeight = Q(ot, "height")), this.chartWidth = Math.max(0, tt || this.containerWidth || 600), this.chartHeight = Math.max(0, rt(J, this.chartWidth) || (1 < this.containerHeight ? this.containerHeight : 400));
}, at.prototype.temporaryDisplay = function(J) {
var tt = this.renderTo;
if (J)
for (; tt && tt.style; )
tt.hcOrigStyle && (W(tt, tt.hcOrigStyle), delete tt.hcOrigStyle), tt.hcOrigDetached && (c.body.removeChild(tt), tt.hcOrigDetached = !1), tt = tt.parentNode;
else
for (; tt && tt.style && (c.body.contains(tt) || tt.parentNode || (tt.hcOrigDetached = !0, c.body.appendChild(tt)), (Q(tt, "display", !1) === "none" || tt.hcOricDetached) && (tt.hcOrigStyle = { display: tt.style.display, height: tt.style.height, overflow: tt.style.overflow }, J = { display: "block", overflow: "hidden" }, tt !== this.renderTo && (J.height = 0), W(tt, J), tt.offsetWidth || tt.style.setProperty("display", "block", "important")), tt = tt.parentNode, tt !== c.body); )
;
}, at.prototype.setClassName = function(J) {
this.container.className = "highcharts-container " + (J || "");
}, at.prototype.getContainer = function() {
var J = this.options, tt = J.chart, ot = ht(), lt, pt = this.renderTo;
pt || (this.renderTo = pt = tt.renderTo), Z(pt) && (this.renderTo = pt = c.getElementById(pt)), pt || m(13, !0, this);
var yt = nt(P(pt, "data-highcharts-chart"));
H(yt) && h[yt] && h[yt].hasRendered && h[yt].destroy(), P(pt, "data-highcharts-chart", this.index), pt.innerHTML = O.emptyHTML, tt.skipClone || pt.offsetWidth || this.temporaryDisplay(), this.getChartSize(), yt = this.chartWidth;
var vt = this.chartHeight;
if (W(pt, { overflow: "hidden" }), this.styledMode || (lt = L({ position: "relative", overflow: "hidden", width: yt + "px", height: vt + "px", textAlign: "left", lineHeight: "normal", zIndex: 0, "-webkit-tap-highlight-color": "rgba(0,0,0,0)", userSelect: "none", "touch-action": "manipulation", outline: "none" }, tt.style || {})), this.container = ot = I("div", { id: ot }, lt, pt), this._cursor = ot.style.cursor, this.renderer = new (tt.renderer || !i ? w.getRendererType(tt.renderer) : f)(ot, yt, vt, void 0, tt.forExport, J.exporting && J.exporting.allowHTML, this.styledMode), b(
void 0,
this
), this.setClassName(tt.className), this.styledMode)
for (var Ct in J.defs)
this.renderer.definition(J.defs[Ct]);
else
this.renderer.setStyle(tt.style);
this.renderer.chartIndex = this.index, $(this, "afterGetContainer");
}, at.prototype.getMargins = function(J) {
var tt = this.spacing, ot = this.margin, lt = this.titleOffset;
this.resetMargins(), lt[0] && !E(ot[0]) && (this.plotTop = Math.max(this.plotTop, lt[0] + tt[0])), lt[2] && !E(ot[2]) && (this.marginBottom = Math.max(this.marginBottom, lt[2] + tt[2])), this.legend && this.legend.display && this.legend.adjustMargins(
ot,
tt
), $(this, "getMargins"), J || this.getAxisMargins();
}, at.prototype.getAxisMargins = function() {
var J = this, tt = J.axisOffset = [0, 0, 0, 0], ot = J.colorAxis, lt = J.margin, pt = function(yt) {
yt.forEach(function(vt) {
vt.visible && vt.getOffset();
});
};
J.hasCartesianSeries ? pt(J.axes) : ot && ot.length && pt(ot), u.forEach(function(yt, vt) {
E(lt[vt]) || (J[yt] += tt[vt]);
}), J.setChartSize();
}, at.prototype.reflow = function(J) {
var tt = this, ot = tt.options.chart, lt = tt.renderTo, pt = E(ot.width) && E(ot.height), yt = ot.width || Q(lt, "width");
ot = ot.height || Q(lt, "height"), lt = J ? J.target : p, delete tt.pointer.chartPosition, !pt && !tt.isPrinting && yt && ot && (lt === p || lt === c) && ((yt !== tt.containerWidth || ot !== tt.containerHeight) && (T.clearTimeout(tt.reflowTimeout), tt.reflowTimeout = dt(function() {
tt.container && tt.setSize(void 0, void 0, !1);
}, J ? 100 : 0)), tt.containerWidth = yt, tt.containerHeight = ot);
}, at.prototype.setReflow = function(J) {
var tt = this;
J === !1 || this.unbindReflow ? J === !1 && this.unbindReflow && (this.unbindReflow = this.unbindReflow()) : (this.unbindReflow = n(p, "resize", function(ot) {
tt.options && tt.reflow(ot);
}), n(this, "destroy", this.unbindReflow));
}, at.prototype.setSize = function(J, tt, ot) {
var lt = this, pt = lt.renderer;
lt.isResizing += 1, b(ot, lt), ot = pt.globalAnimation, lt.oldChartHeight = lt.chartHeight, lt.oldChartWidth = lt.chartWidth, typeof J < "u" && (lt.options.chart.width = J), typeof tt < "u" && (lt.options.chart.height = tt), lt.getChartSize(), lt.styledMode || (ot ? R : W)(lt.container, { width: lt.chartWidth + "px", height: lt.chartHeight + "px" }, ot), lt.setChartSize(!0), pt.setSize(lt.chartWidth, lt.chartHeight, ot), lt.axes.forEach(function(yt) {
yt.isDirty = !0, yt.setScale();
}), lt.isDirtyLegend = !0, lt.isDirtyBox = !0, lt.layOutTitles(), lt.getMargins(), lt.redraw(ot), lt.oldChartHeight = null, $(lt, "resize"), dt(function() {
lt && $(lt, "endResize", null, function() {
--lt.isResizing;
});
}, k(ot).duration);
}, at.prototype.setChartSize = function(J) {
var tt = this.inverted, ot = this.renderer, lt = this.chartWidth, pt = this.chartHeight, yt = this.options.chart, vt = this.spacing, Ct = this.clipOffset, Pt, At, St, Dt;
this.plotLeft = Pt = Math.round(this.plotLeft), this.plotTop = At = Math.round(this.plotTop), this.plotWidth = St = Math.max(0, Math.round(lt - Pt - this.marginRight)), this.plotHeight = Dt = Math.max(0, Math.round(pt - At - this.marginBottom)), this.plotSizeX = tt ? Dt : St, this.plotSizeY = tt ? St : Dt, this.plotBorderWidth = yt.plotBorderWidth || 0, this.spacingBox = ot.spacingBox = { x: vt[3], y: vt[0], width: lt - vt[3] - vt[1], height: pt - vt[0] - vt[2] }, this.plotBox = ot.plotBox = { x: Pt, y: At, width: St, height: Dt }, tt = 2 * Math.floor(this.plotBorderWidth / 2), lt = Math.ceil(Math.max(tt, Ct[3]) / 2), pt = Math.ceil(Math.max(tt, Ct[0]) / 2), this.clipBox = { x: lt, y: pt, width: Math.floor(this.plotSizeX - Math.max(tt, Ct[1]) / 2 - lt), height: Math.max(0, Math.floor(this.plotSizeY - Math.max(tt, Ct[2]) / 2 - pt)) }, J || (this.axes.forEach(function(_t) {
_t.setAxisSize(), _t.setAxisTranslation();
}), ot.alignElements()), $(this, "afterSetChartSize", { skipAxes: J });
}, at.prototype.resetMargins = function() {
$(this, "resetMargins");
var J = this, tt = J.options.chart;
["margin", "spacing"].forEach(function(ot) {
var lt = tt[ot], pt = Y(lt) ? lt : [lt, lt, lt, lt];
["Top", "Right", "Bottom", "Left"].forEach(function(yt, vt) {
J[ot][vt] = et(tt[ot + yt], pt[vt]);
});
}), u.forEach(function(ot, lt) {
J[ot] = et(J.margin[lt], J.spacing[lt]);
}), J.axisOffset = [0, 0, 0, 0], J.clipOffset = [0, 0, 0, 0];
}, at.prototype.drawChartBox = function() {
var J = this.options.chart, tt = this.renderer, ot = this.chartWidth, lt = this.chartHeight, pt = this.styledMode, yt = this.plotBGImage, vt = J.backgroundColor, Ct = J.plotBackgroundColor, Pt = J.plotBackgroundImage, At = this.plotLeft, St = this.plotTop, Dt = this.plotWidth, _t = this.plotHeight, Nt = this.plotBox, Ot = this.clipRect, Kt = this.clipBox, Gt = this.chartBackground, Wt = this.plotBackground, Jt = this.plotBorder, be, Yt = "animate";
if (Gt || (this.chartBackground = Gt = tt.rect().addClass("highcharts-background").add(), Yt = "attr"), pt)
var Vt = be = Gt.strokeWidth();
else
Vt = J.borderWidth || 0, be = Vt + (J.shadow ? 8 : 0), vt = { fill: vt || "none" }, (Vt || Gt["stroke-width"]) && (vt.stroke = J.borderColor, vt["stroke-width"] = Vt), Gt.attr(vt).shadow(J.shadow);
Gt[Yt]({ x: be / 2, y: be / 2, width: ot - be - Vt % 2, height: lt - be - Vt % 2, r: J.borderRadius }), Yt = "animate", Wt || (Yt = "attr", this.plotBackground = Wt = tt.rect().addClass("highcharts-plot-background").add()), Wt[Yt](Nt), pt || (Wt.attr({ fill: Ct || "none" }).shadow(J.plotShadow), Pt && (yt ? (Pt !== yt.attr("href") && yt.attr("href", Pt), yt.animate(Nt)) : this.plotBGImage = tt.image(Pt, At, St, Dt, _t).add())), Ot ? Ot.animate({ width: Kt.width, height: Kt.height }) : this.clipRect = tt.clipRect(Kt), Yt = "animate", Jt || (Yt = "attr", this.plotBorder = Jt = tt.rect().addClass("highcharts-plot-border").attr({ zIndex: 1 }).add()), pt || Jt.attr({ stroke: J.plotBorderColor, "stroke-width": J.plotBorderWidth || 0, fill: "none" }), Jt[Yt](Jt.crisp({ x: At, y: St, width: Dt, height: _t }, -Jt.strokeWidth())), this.isDirtyBox = !1, $(this, "afterDrawChartBox");
}, at.prototype.propFromSeries = function() {
var J = this, tt = J.options.chart, ot = J.options.series, lt, pt, yt;
["inverted", "angular", "polar"].forEach(function(vt) {
for (pt = s[tt.type || tt.defaultSeriesType], yt = tt[vt] || pt && pt.prototype[vt], lt = ot && ot.length; !yt && lt--; )
(pt = s[ot[lt].type]) && pt.prototype[vt] && (yt = !0);
J[vt] = yt;
});
}, at.prototype.linkSeries = function() {
var J = this, tt = J.series;
tt.forEach(function(ot) {
ot.linkedSeries.length = 0;
}), tt.forEach(function(ot) {
var lt = ot.options.linkedTo;
Z(lt) && (lt = lt === ":previous" ? J.series[ot.index - 1] : J.get(lt)) && lt.linkedParent !== ot && (lt.linkedSeries.push(ot), ot.linkedParent = lt, lt.enabledDataSorting && ot.setDataSortingOptions(), ot.visible = et(ot.options.visible, lt.options.visible, ot.visible));
}), $(this, "afterLinkSeries");
}, at.prototype.renderSeries = function() {
this.series.forEach(function(J) {
J.translate(), J.render();
});
}, at.prototype.renderLabels = function() {
var J = this, tt = J.options.labels;
tt.items && tt.items.forEach(function(ot) {
var lt = L(tt.style, ot.style), pt = nt(lt.left) + J.plotLeft, yt = nt(lt.top) + J.plotTop + 12;
delete lt.left, delete lt.top, J.renderer.text(ot.html, pt, yt).attr({ zIndex: 2 }).css(lt).add();
});
}, at.prototype.render = function() {
var J = this.axes, tt = this.colorAxis, ot = this.renderer, lt = this.options, pt = function(At) {
At.forEach(function(St) {
St.visible && St.render();
});
}, yt = 0;
this.setTitle(), this.legend = new V(this, lt.legend), this.getStacks && this.getStacks(), this.getMargins(!0), this.setChartSize(), lt = this.plotWidth, J.some(function(At) {
if (At.horiz && At.visible && At.options.labels.enabled && At.series.length)
return yt = 21, !0;
});
var vt = this.plotHeight = Math.max(this.plotHeight - yt, 0);
J.forEach(function(At) {
At.setScale();
}), this.getAxisMargins();
var Ct = 1.1 < lt / this.plotWidth, Pt = 1.05 < vt / this.plotHeight;
(Ct || Pt) && (J.forEach(function(At) {
(At.horiz && Ct || !At.horiz && Pt) && At.setTickInterval(!0);
}), this.getMargins()), this.drawChartBox(), this.hasCartesianSeries ? pt(J) : tt && tt.length && pt(tt), this.seriesGroup || (this.seriesGroup = ot.g("series-group").attr({ zIndex: 3 }).add()), this.renderSeries(), this.renderLabels(), this.addCredits(), this.setResponsive && this.setResponsive(), this.hasRendered = !0;
}, at.prototype.addCredits = function(J) {
var tt = this, ot = q(!0, this.options.credits, J);
ot.enabled && !this.credits && (this.credits = this.renderer.text(ot.text + (this.mapCredits || ""), 0, 0).addClass("highcharts-credits").on("click", function() {
ot.href && (p.location.href = ot.href);
}).attr({ align: ot.position.align, zIndex: 8 }), tt.styledMode || this.credits.css(ot.style), this.credits.add().align(ot.position), this.credits.update = function(lt) {
tt.credits = tt.credits.destroy(), tt.addCredits(lt);
});
}, at.prototype.destroy = function() {
var J = this, tt = J.axes, ot = J.series, lt = J.container, pt = lt && lt.parentNode, yt;
for ($(J, "destroy"), J.renderer.forExport ? g(h, J) : h[J.index] = void 0, G.chartCount--, J.renderTo.removeAttribute("data-highcharts-chart"), ct(J), yt = tt.length; yt--; )
tt[yt] = tt[yt].destroy();
for (this.scroller && this.scroller.destroy && this.scroller.destroy(), yt = ot.length; yt--; )
ot[yt] = ot[yt].destroy();
"title subtitle chartBackground plotBackground plotBGImage plotBorder seriesGroup clipRect credits pointer rangeSelector legend resetZoomButton tooltip renderer".split(" ").forEach(function(vt) {
var Ct = J[vt];
Ct && Ct.destroy && (J[vt] = Ct.destroy());
}), lt && (lt.innerHTML = O.emptyHTML, ct(lt), pt && X(lt)), it(J, function(vt, Ct) {
delete J[Ct];
});
}, at.prototype.firstRender = function() {
var J = this, tt = J.options;
(!J.isReadyToRender || J.isReadyToRender()) && (J.getContainer(), J.resetMargins(), J.setChartSize(), J.propFromSeries(), J.getAxes(), (A(tt.series) ? tt.series : []).forEach(function(ot) {
J.initSeries(ot);
}), J.linkSeries(), J.setSeriesData(), $(J, "beforeRender"), j && (F.isRequired() ? J.pointer = new F(J, tt) : J.pointer = new j(J, tt)), J.render(), J.pointer.getChartPosition(), !J.renderer.imgCount && !J.hasLoaded && J.onload(), J.temporaryDisplay(!0));
}, at.prototype.onload = function() {
this.callbacks.concat([this.callback]).forEach(function(J) {
J && typeof this.index < "u" && J.apply(this, [this]);
}, this), $(this, "load"), $(this, "render"), E(this.index) && this.setReflow(this.options.chart.reflow), this.hasLoaded = !0;
}, at.prototype.addSeries = function(J, tt, ot) {
var lt = this, pt;
return J && (tt = et(tt, !0), $(lt, "addSeries", { options: J }, function() {
pt = lt.initSeries(J), lt.isDirtyLegend = !0, lt.linkSeries(), pt.enabledDataSorting && pt.setData(J.data, !1), $(lt, "afterAddSeries", { series: pt }), tt && lt.redraw(ot);
})), pt;
}, at.prototype.addAxis = function(J, tt, ot, lt) {
return this.createAxis(tt ? "xAxis" : "yAxis", { axis: J, redraw: ot, animation: lt });
}, at.prototype.addColorAxis = function(J, tt, ot) {
return this.createAxis("colorAxis", { axis: J, redraw: tt, animation: ot });
}, at.prototype.createAxis = function(J, tt) {
return J = new N(this, q(tt.axis, { index: this[J].length, isX: J === "xAxis" })), et(tt.redraw, !0) && this.redraw(tt.animation), J;
}, at.prototype.showLoading = function(J) {
var tt = this, ot = tt.options, lt = ot.loading, pt = function() {
yt && W(yt, { left: tt.plotLeft + "px", top: tt.plotTop + "px", width: tt.plotWidth + "px", height: tt.plotHeight + "px" });
}, yt = tt.loadingDiv, vt = tt.loadingSpan;
yt || (tt.loadingDiv = yt = I("div", { className: "highcharts-loading highcharts-loading-hidden" }, null, tt.container)), vt || (tt.loadingSpan = vt = I(
"span",
{ className: "highcharts-loading-inner" },
null,
yt
), n(tt, "redraw", pt)), yt.className = "highcharts-loading", O.setElementHTML(vt, et(J, ot.lang.loading, "")), tt.styledMode || (W(yt, L(lt.style, { zIndex: 10 })), W(vt, lt.labelStyle), tt.loadingShown || (W(yt, { opacity: 0, display: "" }), R(yt, { opacity: lt.style.opacity || 0.5 }, { duration: lt.showDuration || 0 }))), tt.loadingShown = !0, pt();
}, at.prototype.hideLoading = function() {
var J = this.options, tt = this.loadingDiv;
tt && (tt.className = "highcharts-loading highcharts-loading-hidden", this.styledMode || R(tt, { opacity: 0 }, {
duration: J.loading.hideDuration || 100,
complete: function() {
W(tt, { display: "none" });
}
})), this.loadingShown = !1;
}, at.prototype.update = function(J, tt, ot, lt) {
var pt = this, yt = { credits: "addCredits", title: "setTitle", subtitle: "setSubtitle", caption: "setCaption" }, vt = J.isResponsiveOptions, Ct = [], Pt, At;
$(pt, "update", { options: J }), vt || pt.setResponsive(!1, !0), J = D(J, pt.options), pt.userOptions = q(pt.userOptions, J);
var St = J.chart;
if (St) {
if (q(!0, pt.options.chart, St), "className" in St && pt.setClassName(St.className), "reflow" in St && pt.setReflow(St.reflow), "inverted" in St || "polar" in St || "type" in St) {
pt.propFromSeries();
var Dt = !0;
}
"alignTicks" in St && (Dt = !0), "events" in St && v(this, St), it(St, function(_t, Nt) {
pt.propsRequireUpdateSeries.indexOf("chart." + Nt) !== -1 && (Pt = !0), pt.propsRequireDirtyBox.indexOf(Nt) !== -1 && (pt.isDirtyBox = !0), pt.propsRequireReflow.indexOf(Nt) !== -1 && (vt ? pt.isDirtyBox = !0 : At = !0);
}), !pt.styledMode && St.style && pt.renderer.setStyle(pt.options.chart.style || {});
}
!pt.styledMode && J.colors && (this.options.colors = J.colors), J.time && (this.time === t && (this.time = new l(J.time)), q(!0, pt.options.time, J.time)), it(J, function(_t, Nt) {
pt[Nt] && typeof pt[Nt].update == "function" ? pt[Nt].update(_t, !1) : typeof pt[yt[Nt]] == "function" ? pt[yt[Nt]](_t) : Nt !== "colors" && pt.collectionsWithUpdate.indexOf(Nt) === -1 && q(!0, pt.options[Nt], J[Nt]), Nt !== "chart" && pt.propsRequireUpdateSeries.indexOf(Nt) !== -1 && (Pt = !0);
}), this.collectionsWithUpdate.forEach(function(_t) {
if (J[_t]) {
var Nt = [];
pt[_t].forEach(function(Ot, Kt) {
Ot.options.isInternal || Nt.push(et(Ot.options.index, Kt));
}), gt(J[_t]).forEach(function(Ot, Kt) {
var Gt = E(Ot.id), Wt;
Gt && (Wt = pt.get(Ot.id)), !Wt && pt[_t] && (Wt = pt[_t][Nt ? Nt[Kt] : Kt]) && Gt && E(Wt.options.id) && (Wt = void 0), Wt && Wt.coll === _t && (Wt.update(Ot, !1), ot && (Wt.touched = !0)), !Wt && ot && pt.collectionsWithInit[_t] && (pt.collectionsWithInit[_t][0].apply(pt, [Ot].concat(pt.collectionsWithInit[_t][1] || []).concat([!1])).touched = !0);
}), ot && pt[_t].forEach(function(Ot) {
Ot.touched || Ot.options.isInternal ? delete Ot.touched : Ct.push(Ot);
});
}
}), Ct.forEach(function(_t) {
_t.chart && _t.remove && _t.remove(!1);
}), Dt && pt.axes.forEach(function(_t) {
_t.update({}, !1);
}), Pt && pt.getSeriesOrderByLinks().forEach(function(_t) {
_t.chart && _t.update({}, !1);
}, this), Dt = St && St.width, St = St && (Z(St.height) ? rt(St.height, Dt || pt.chartWidth) : St.height), At || H(Dt) && Dt !== pt.chartWidth || H(St) && St !== pt.chartHeight ? pt.setSize(Dt, St, lt) : et(tt, !0) && pt.redraw(lt), $(pt, "afterUpdate", { options: J, redraw: tt, animation: lt });
}, at.prototype.setSubtitle = function(J, tt) {
this.applyDescription("subtitle", J), this.layOutTitles(tt);
}, at.prototype.setCaption = function(J, tt) {
this.applyDescription("caption", J), this.layOutTitles(tt);
}, at.prototype.showResetZoom = function() {
function J() {
tt.zoomOut();
}
var tt = this, ot = a.lang, lt = tt.options.chart.resetZoomButton, pt = lt.theme, yt = pt.states, vt = lt.relativeTo === "chart" || lt.relativeTo === "spacingBox" ? null : "scrollablePlotBox";
$(this, "beforeShowResetZoom", null, function() {
tt.resetZoomButton = tt.renderer.button(ot.resetZoom, null, null, J, pt, yt && yt.hover).attr({ align: lt.position.align, title: ot.resetZoomTitle }).addClass("highcharts-reset-zoom").add().align(lt.position, !1, vt);
}), $(this, "afterShowResetZoom");
}, at.prototype.zoomOut = function() {
$(this, "selection", { resetSelection: !0 }, this.zoom);
}, at.prototype.zoom = function(J) {
var tt = this, ot = tt.pointer, lt = tt.inverted ? ot.mouseDownX : ot.mouseDownY, pt = !1, yt;
!J || J.resetSelection ? (tt.axes.forEach(function(Ct) {
yt = Ct.zoom();
}), ot.initiated = !1) : J.xAxis.concat(J.yAxis).forEach(function(Ct) {
var Pt = Ct.axis, At = tt.inverted ? Pt.left : Pt.top, St = tt.inverted ? At + Pt.width : At + Pt.height, Dt = Pt.isXAxis, _t = !1;
(!Dt && lt >= At && lt <= St || Dt || !E(lt)) && (_t = !0), ot[Dt ? "zoomX" : "zoomY"] && _t && (yt = Pt.zoom(Ct.min, Ct.max), Pt.displayBtn && (pt = !0));
});
var vt = tt.resetZoomButton;
pt && !vt ? tt.showResetZoom() : !pt && Y(vt) && (tt.resetZoomButton = vt.destroy()), yt && tt.redraw(et(
tt.options.chart.animation,
J && J.animation,
100 > tt.pointCount
));
}, at.prototype.pan = function(J, tt) {
var ot = this, lt = ot.hoverPoints;
tt = typeof tt == "object" ? tt : { enabled: tt, type: "x" };
var pt = ot.options.chart, yt = ot.options.mapNavigation && ot.options.mapNavigation.enabled;
pt && pt.panning && (pt.panning = tt);
var vt = tt.type, Ct;
$(this, "pan", { originalEvent: J }, function() {
lt && lt.forEach(function(St) {
St.setState();
});
var Pt = ot.xAxis;
vt === "xy" ? Pt = Pt.concat(ot.yAxis) : vt === "y" && (Pt = ot.yAxis);
var At = {};
Pt.forEach(function(St) {
if (St.options.panningEnabled && !St.options.isInternal) {
var Dt = St.horiz, _t = J[Dt ? "chartX" : "chartY"];
Dt = Dt ? "mouseDownX" : "mouseDownY";
var Nt = ot[Dt], Ot = St.minPointOffset || 0, Kt = St.reversed && !ot.inverted || !St.reversed && ot.inverted ? -1 : 1, Gt = St.getExtremes(), Wt = St.toValue(Nt - _t, !0) + Ot * Kt, Jt = St.toValue(Nt + St.len - _t, !0) - (Ot * Kt || St.isXAxis && St.pointRangePadding || 0), be = Jt < Wt;
Kt = St.hasVerticalPanning(), Nt = be ? Jt : Wt, Wt = be ? Wt : Jt;
var Yt = St.panningState;
!Kt || St.isXAxis || Yt && !Yt.isDirty || St.series.forEach(function(Vt) {
var Me = Vt.getProcessedData(!0);
Me = Vt.getExtremes(Me.yData, !0), Yt || (Yt = { startMin: Number.MAX_VALUE, startMax: -Number.MAX_VALUE }), H(Me.dataMin) && H(Me.dataMax) && (Yt.startMin = Math.min(et(Vt.options.threshold, 1 / 0), Me.dataMin, Yt.startMin), Yt.startMax = Math.max(et(Vt.options.threshold, -1 / 0), Me.dataMax, Yt.startMax));
}), Kt = Math.min(et(Yt && Yt.startMin, Gt.dataMin), Ot ? Gt.min : St.toValue(St.toPixels(Gt.min) - St.minPixelPadding)), Jt = Math.max(et(Yt && Yt.startMax, Gt.dataMax), Ot ? Gt.max : St.toValue(St.toPixels(Gt.max) + St.minPixelPadding)), St.panningState = Yt, St.isOrdinal || (Ot = Kt - Nt, 0 < Ot && (Wt += Ot, Nt = Kt), Ot = Wt - Jt, 0 < Ot && (Wt = Jt, Nt -= Ot), St.series.length && Nt !== Gt.min && Wt !== Gt.max && Nt >= Kt && Wt <= Jt && (St.setExtremes(Nt, Wt, !1, !1, { trigger: "pan" }), ot.resetZoomButton || yt || Nt === Kt || Wt === Jt || !vt.match("y") || (ot.showResetZoom(), St.displayBtn = !1), Ct = !0), At[Dt] = _t);
}
}), it(At, function(St, Dt) {
ot[Dt] = St;
}), Ct && ot.redraw(!1), W(ot.container, { cursor: "move" });
});
}, at;
}(), L(y.prototype, {
callbacks: [],
collectionsWithInit: { xAxis: [y.prototype.addAxis, [!0]], yAxis: [y.prototype.addAxis, [!1]], series: [y.prototype.addSeries] },
collectionsWithUpdate: ["xAxis", "yAxis", "series"],
propsRequireDirtyBox: "backgroundColor borderColor borderWidth borderRadius plotBackgroundColor plotBackgroundImage plotBorderColor plotBorderWidth plotShadow shadow".split(" "),
propsRequireReflow: "margin marginTop marginRight marginBottom marginLeft spacing spacingTop spacingRight spacingBottom spacingLeft".split(" "),
propsRequireUpdateSeries: "chart.inverted chart.polar chart.ignoreHiddenSeries chart.type colors plotOptions time tooltip".split(" ")
}), y;
}), C(o, "Core/Legend/LegendSymbol.js", [o["Core/Utilities.js"]], function(y) {
var N = y.merge, _ = y.pick, U;
return function(G) {
G.drawLineMarker = function(V) {
var F = this.options, B = V.symbolWidth, j = V.symbolHeight, w = j / 2, x = this.chart.renderer, f = this.legendGroup;
V = V.baseline - Math.round(0.3 * V.fontMetrics.b);
var l = {}, T = F.marker;
this.chart.styledMode || (l = { "stroke-width": F.lineWidth || 0 }, F.dashStyle && (l.dashstyle = F.dashStyle)), this.legendLine = x.path([["M", 0, V], ["L", B, V]]).addClass("highcharts-graph").attr(l).add(f), T && T.enabled !== !1 && B && (F = Math.min(_(T.radius, w), w), this.symbol.indexOf("url") === 0 && (T = N(T, { width: j, height: j }), F = 0), this.legendSymbol = B = x.symbol(this.symbol, B / 2 - F, V - F, 2 * F, 2 * F, T).addClass("highcharts-point").add(f), B.isMarker = !0);
}, G.drawRectangle = function(V, F) {
var B = V.symbolHeight, j = V.options.squareSymbol;
F.legendSymbol = this.chart.renderer.rect(j ? (V.symbolWidth - B) / 2 : 0, V.baseline - B + 1, j ? B : V.symbolWidth, B, _(V.options.symbolRadius, B / 2)).addClass("highcharts-point").attr({ zIndex: 3 }).add(F.legendGroup);
};
}(U || (U = {})), U;
}), C(o, "Core/Series/SeriesDefaults.js", [], function() {
return { lineWidth: 2, allowPointSelect: !1, crisp: !0, showCheckbox: !1, animation: { duration: 1e3 }, events: {}, marker: { enabledThreshold: 2, lineColor: "#ffffff", lineWidth: 0, radius: 4, states: {
normal: { animation: !0 },
hover: { animation: { duration: 50 }, enabled: !0, radiusPlus: 2, lineWidthPlus: 1 },
select: { fillColor: "#cccccc", lineColor: "#000000", lineWidth: 2 }
} }, point: { events: {} }, dataLabels: { animation: {}, align: "center", defer: !0, formatter: function() {
var y = this.series.chart.numberFormatter;
return typeof this.y != "number" ? "" : y(this.y, -1);
}, padding: 5, style: { fontSize: "11px", fontWeight: "bold", color: "contrast", textOutline: "1px contrast" }, verticalAlign: "bottom", x: 0, y: 0 }, cropThreshold: 300, opacity: 1, pointRange: 0, softThreshold: !0, states: {
normal: { animation: !0 },
hover: { animation: { duration: 50 }, lineWidthPlus: 1, marker: {}, halo: { size: 10, opacity: 0.25 } },
select: { animation: { duration: 0 } },
inactive: { animation: { duration: 50 }, opacity: 0.2 }
}, stickyTracking: !0, turboThreshold: 1e3, findNearestPointBy: "x" };
}), C(o, "Core/Series/Series.js", [
o["Core/Animation/AnimationUtilities.js"],
o["Core/DefaultOptions.js"],
o["Core/Foundation.js"],
o["Core/Globals.js"],
o["Core/Legend/LegendSymbol.js"],
o["Core/Series/Point.js"],
o["Core/Series/SeriesDefaults.js"],
o["Core/Series/SeriesRegistry.js"],
o["Core/Renderer/SVG/SVGElement.js"],
o["Core/Utilities.js"]
], function(y, N, _, U, G, V, F, B, j, w) {
var x = y.animObject, f = y.setAnimation, l = N.defaultOptions, T = _.registerEventOptions, O = U.hasTouch, R = U.svg, k = U.win, b = B.seriesTypes, S = w.addEvent, v = w.arrayMax, h = w.arrayMin, c = w.clamp, u = w.cleanRecursively, i = w.correctFloat, p = w.defined, a = w.erase, t = w.error, s = w.extend, n = w.find, P = w.fireEvent, D = w.getNestedProperty, I = w.isArray, W = w.isNumber, E = w.isString, X = w.merge, g = w.objectEach, m = w.pick, L = w.removeEvent, z = w.splat, $ = w.syncTimeout;
return y = function() {
function Q() {
this.zones = this.yAxis = this.xAxis = this.userOptions = this.tooltipOptions = this.processedYData = this.processedXData = this.points = this.options = this.linkedSeries = this.index = this.eventsToUnbind = this.eventOptions = this.data = this.chart = this._i = void 0;
}
return Q.prototype.init = function(A, H) {
P(this, "init", { options: H });
var Y = this, Z = A.series;
this.eventsToUnbind = [], Y.chart = A, Y.options = Y.setOptions(H), H = Y.options, Y.linkedSeries = [], Y.bindAxes(), s(Y, { name: H.name, state: "", visible: H.visible !== !1, selected: H.selected === !0 }), T(this, H);
var q = H.events;
(q && q.click || H.point && H.point.events && H.point.events.click || H.allowPointSelect) && (A.runTrackerClick = !0), Y.getColor(), Y.getSymbol(), Y.parallelArrays.forEach(function(et) {
Y[et + "Data"] || (Y[et + "Data"] = []);
}), Y.isCartesian && (A.hasCartesianSeries = !0);
var it;
Z.length && (it = Z[Z.length - 1]), Y._i = m(it && it._i, -1) + 1, Y.opacity = Y.options.opacity, A.orderSeries(this.insert(Z)), H.dataSorting && H.dataSorting.enabled ? Y.setDataSortingOptions() : Y.points || Y.data || Y.setData(H.data, !1), P(this, "afterInit");
}, Q.prototype.is = function(A) {
return b[A] && this instanceof b[A];
}, Q.prototype.insert = function(A) {
var H = this.options.index, Y;
if (W(H)) {
for (Y = A.length; Y--; )
if (H >= m(A[Y].options.index, A[Y]._i)) {
A.splice(Y + 1, 0, this);
break;
}
Y === -1 && A.unshift(this), Y += 1;
} else
A.push(this);
return m(Y, A.length - 1);
}, Q.prototype.bindAxes = function() {
var A = this, H = A.options, Y = A.chart, Z;
P(this, "bindAxes", null, function() {
(A.axisTypes || []).forEach(function(q) {
var it = 0;
Y[q].forEach(function(et) {
Z = et.options, (H[q] === it && !Z.isInternal || typeof H[q] < "u" && H[q] === Z.id || typeof H[q] > "u" && Z.index === 0) && (A.insert(et.series), A[q] = et, et.isDirty = !0), Z.isInternal || it++;
}), A[q] || A.optionalAxis === q || t(18, !0, Y);
});
}), P(this, "afterBindAxes");
}, Q.prototype.updateParallelArrays = function(A, H) {
var Y = A.series, Z = arguments, q = W(H) ? function(it) {
var et = it === "y" && Y.toYData ? Y.toYData(A) : A[it];
Y[it + "Data"][H] = et;
} : function(it) {
Array.prototype[H].apply(Y[it + "Data"], Array.prototype.slice.call(Z, 2));
};
Y.parallelArrays.forEach(q);
}, Q.prototype.hasData = function() {
return this.visible && typeof this.dataMax < "u" && typeof this.dataMin < "u" || this.visible && this.yData && 0 < this.yData.length;
}, Q.prototype.autoIncrement = function(A) {
var H = this.options, Y = H.pointIntervalUnit, Z = H.relativeXValue, q = this.chart.time, it = this.xIncrement, et;
return it = m(it, H.pointStart, 0), this.pointInterval = et = m(this.pointInterval, H.pointInterval, 1), Z && W(A) && (et *= A), Y && (H = new q.Date(it), Y === "day" ? q.set("Date", H, q.get("Date", H) + et) : Y === "month" ? q.set("Month", H, q.get("Month", H) + et) : Y === "year" && q.set("FullYear", H, q.get("FullYear", H) + et), et = H.getTime() - it), Z && W(A) ? it + et : (this.xIncrement = it + et, it);
}, Q.prototype.setDataSortingOptions = function() {
var A = this.options;
s(this, { requireSorting: !1, sorted: !1, enabledDataSorting: !0, allowDG: !1 }), p(A.pointRange) || (A.pointRange = 1);
}, Q.prototype.setOptions = function(A) {
var H = this.chart, Y = H.options, Z = Y.plotOptions, q = H.userOptions || {};
A = X(A), H = H.styledMode;
var it = { plotOptions: Z, userOptions: A };
P(this, "setOptions", it);
var et = it.plotOptions[this.type], nt = q.plotOptions || {};
return this.userOptions = it.userOptions, q = X(et, Z.series, q.plotOptions && q.plotOptions[this.type], A), this.tooltipOptions = X(l.tooltip, l.plotOptions.series && l.plotOptions.series.tooltip, l.plotOptions[this.type].tooltip, Y.tooltip.userOptions, Z.series && Z.series.tooltip, Z[this.type].tooltip, A.tooltip), this.stickyTracking = m(A.stickyTracking, nt[this.type] && nt[this.type].stickyTracking, nt.series && nt.series.stickyTracking, this.tooltipOptions.shared && !this.noSharedTooltip ? !0 : q.stickyTracking), et.marker === null && delete q.marker, this.zoneAxis = q.zoneAxis, Z = this.zones = (q.zones || []).slice(), !q.negativeColor && !q.negativeFillColor || q.zones || (Y = { value: q[this.zoneAxis + "Threshold"] || q.threshold || 0, className: "highcharts-negative" }, H || (Y.color = q.negativeColor, Y.fillColor = q.negativeFillColor), Z.push(Y)), Z.length && p(Z[Z.length - 1].value) && Z.push(H ? {} : { color: this.color, fillColor: this.fillColor }), P(this, "afterSetOptions", { options: q }), q;
}, Q.prototype.getName = function() {
return m(this.options.name, "Series " + (this.index + 1));
}, Q.prototype.getCyclic = function(A, H, Y) {
var Z = this.chart, q = this.userOptions, it = A + "Index", et = A + "Counter", nt = Y ? Y.length : m(Z.options.chart[A + "Count"], Z[A + "Count"]);
if (!H) {
var rt = m(q[it], q["_" + it]);
p(rt) || (Z.series.length || (Z[et] = 0), q["_" + it] = rt = Z[et] % nt, Z[et] += 1), Y && (H = Y[rt]);
}
typeof rt < "u" && (this[it] = rt), this[A] = H;
}, Q.prototype.getColor = function() {
this.chart.styledMode ? this.getCyclic("color") : this.options.colorByPoint ? this.color = "#cccccc" : this.getCyclic("color", this.options.color || l.plotOptions[this.type].color, this.chart.options.colors);
}, Q.prototype.getPointsCollection = function() {
return (this.hasGroupedData ? this.points : this.data) || [];
}, Q.prototype.getSymbol = function() {
this.getCyclic("symbol", this.options.marker.symbol, this.chart.options.symbols);
}, Q.prototype.findPointIndex = function(A, H) {
var Y = A.id, Z = A.x, q = this.points, it = this.options.dataSorting, et, nt;
if (Y)
it = this.chart.get(Y), it instanceof V && (et = it);
else if ((this.linkedParent || this.enabledDataSorting || this.options.relativeXValue) && (et = function(ct) {
return !ct.touched && ct.index === A.index;
}, it && it.matchByName ? et = function(ct) {
return !ct.touched && ct.name === A.name;
} : this.options.relativeXValue && (et = function(ct) {
return !ct.touched && ct.options.x === A.x;
}), et = n(q, et), !et))
return;
if (et) {
var rt = et && et.index;
typeof rt < "u" && (nt = !0);
}
return typeof rt > "u" && W(Z) && (rt = this.xData.indexOf(Z, H)), rt !== -1 && typeof rt < "u" && this.cropped && (rt = rt >= this.cropStart ? rt - this.cropStart : rt), !nt && W(rt) && q[rt] && q[rt].touched && (rt = void 0), rt;
}, Q.prototype.updateData = function(A, H) {
var Y = this.options, Z = Y.dataSorting, q = this.points, it = [], et = this.requireSorting, nt = A.length === q.length, rt, ct, gt, dt = !0;
if (this.xIncrement = null, A.forEach(function(ht, at) {
var J = p(ht) && this.pointClass.prototype.optionsToObject.call({ series: this }, ht) || {}, tt = J.x;
J.id || W(tt) ? (J = this.findPointIndex(J, gt), J === -1 || typeof J > "u" ? it.push(ht) : q[J] && ht !== Y.data[J] ? (q[J].update(ht, !1, null, !1), q[J].touched = !0, et && (gt = J + 1)) : q[J] && (q[J].touched = !0), (!nt || at !== J || Z && Z.enabled || this.hasDerivedData) && (rt = !0)) : it.push(ht);
}, this), rt)
for (A = q.length; A--; )
(ct = q[A]) && !ct.touched && ct.remove && ct.remove(!1, H);
else
!nt || Z && Z.enabled ? dt = !1 : (A.forEach(function(ht, at) {
ht !== q[at].y && q[at].update && q[at].update(
ht,
!1,
null,
!1
);
}), it.length = 0);
return q.forEach(function(ht) {
ht && (ht.touched = !1);
}), dt ? (it.forEach(function(ht) {
this.addPoint(ht, !1, null, null, !1);
}, this), this.xIncrement === null && this.xData && this.xData.length && (this.xIncrement = v(this.xData), this.autoIncrement()), !0) : !1;
}, Q.prototype.setData = function(A, H, Y, Z) {
var q = this, it = q.points, et = it && it.length || 0, nt = q.options, rt = q.chart, ct = nt.dataSorting, gt = q.xAxis, dt = nt.turboThreshold, ht = this.xData, at = this.yData, J = q.pointArrayMap;
J = J && J.length;
var tt = nt.keys, ot, lt = 0, pt = 1, yt = null;
A = A || [];
var vt = A.length;
if (H = m(H, !0), ct && ct.enabled && (A = this.sortData(A)), Z !== !1 && vt && et && !q.cropped && !q.hasGroupedData && q.visible && !q.isSeriesBoosting && (ot = this.updateData(A, Y)), !ot) {
if (q.xIncrement = null, q.colorCounter = 0, this.parallelArrays.forEach(function(Ct) {
q[Ct + "Data"].length = 0;
}), dt && vt > dt)
if (yt = q.getFirstValidPoint(A), W(yt))
for (Y = 0; Y < vt; Y++)
ht[Y] = this.autoIncrement(), at[Y] = A[Y];
else if (I(yt))
if (J)
if (yt.length === J)
for (Y = 0; Y < vt; Y++)
ht[Y] = this.autoIncrement(), at[Y] = A[Y];
else
for (Y = 0; Y < vt; Y++)
Z = A[Y], ht[Y] = Z[0], at[Y] = Z.slice(
1,
J + 1
);
else if (tt && (lt = tt.indexOf("x"), pt = tt.indexOf("y"), lt = 0 <= lt ? lt : 0, pt = 0 <= pt ? pt : 1), yt.length === 1 && (pt = 0), lt === pt)
for (Y = 0; Y < vt; Y++)
ht[Y] = this.autoIncrement(), at[Y] = A[Y][pt];
else
for (Y = 0; Y < vt; Y++)
Z = A[Y], ht[Y] = Z[lt], at[Y] = Z[pt];
else
t(12, !1, rt);
else
for (Y = 0; Y < vt; Y++)
typeof A[Y] < "u" && (Z = { series: q }, q.pointClass.prototype.applyOptions.apply(Z, [A[Y]]), q.updateParallelArrays(Z, Y));
for (at && E(at[0]) && t(14, !0, rt), q.data = [], q.options.data = q.userOptions.data = A, Y = et; Y--; )
it[Y] && it[Y].destroy && it[Y].destroy();
gt && (gt.minRange = gt.userMinRange), q.isDirty = rt.isDirtyBox = !0, q.isDirtyData = !!it, Y = !1;
}
nt.legendType === "point" && (this.processData(), this.generatePoints()), H && rt.redraw(Y);
}, Q.prototype.sortData = function(A) {
var H = this, Y = H.options.dataSorting.sortKey || "y", Z = function(q, it) {
return p(it) && q.pointClass.prototype.optionsToObject.call({ series: q }, it) || {};
};
return A.forEach(function(q, it) {
A[it] = Z(H, q), A[it].index = it;
}, this), A.concat().sort(function(q, it) {
return q = D(Y, q), it = D(Y, it), it < q ? -1 : it > q ? 1 : 0;
}).forEach(function(q, it) {
q.x = it;
}, this), H.linkedSeries && H.linkedSeries.forEach(function(q) {
var it = q.options, et = it.data;
it.dataSorting && it.dataSorting.enabled || !et || (et.forEach(function(nt, rt) {
et[rt] = Z(q, nt), A[rt] && (et[rt].x = A[rt].x, et[rt].index = rt);
}), q.setData(et, !1));
}), A;
}, Q.prototype.getProcessedData = function(A) {
var H = this.xAxis, Y = this.options, Z = Y.cropThreshold, q = A || this.getExtremesFromAll || Y.getExtremesFromAll, it = this.isCartesian;
A = H && H.val2lin, Y = !(!H || !H.logarithmic);
var et = 0, nt = this.xData, rt = this.yData, ct = this.requireSorting, gt = !1, dt = nt.length;
if (H) {
gt = H.getExtremes();
var ht = gt.min, at = gt.max;
gt = H.categories && !H.names.length;
}
if (it && this.sorted && !q && (!Z || dt > Z || this.forceCrop)) {
if (nt[dt - 1] < ht || nt[0] > at)
nt = [], rt = [];
else if (this.yData && (nt[0] < ht || nt[dt - 1] > at)) {
var J = this.cropData(this.xData, this.yData, ht, at);
nt = J.xData, rt = J.yData, et = J.start, J = !0;
}
}
for (Z = nt.length || 1; --Z; )
if (H = Y ? A(nt[Z]) - A(nt[Z - 1]) : nt[Z] - nt[Z - 1], 0 < H && (typeof tt > "u" || H < tt))
var tt = H;
else
0 > H && ct && !gt && (t(15, !1, this.chart), ct = !1);
return { xData: nt, yData: rt, cropped: J, cropStart: et, closestPointRange: tt };
}, Q.prototype.processData = function(A) {
var H = this.xAxis;
if (this.isCartesian && !this.isDirty && !H.isDirty && !this.yAxis.isDirty && !A)
return !1;
A = this.getProcessedData(), this.cropped = A.cropped, this.cropStart = A.cropStart, this.processedXData = A.xData, this.processedYData = A.yData, this.closestPointRange = this.basePointRange = A.closestPointRange, P(this, "afterProcessData");
}, Q.prototype.cropData = function(A, H, Y, Z, q) {
var it = A.length, et, nt = 0, rt = it;
for (q = m(q, this.cropShoulder), et = 0; et < it; et++)
if (A[et] >= Y) {
nt = Math.max(0, et - q);
break;
}
for (Y = et; Y < it; Y++)
if (A[Y] > Z) {
rt = Y + q;
break;
}
return { xData: A.slice(nt, rt), yData: H.slice(
nt,
rt
), start: nt, end: rt };
}, Q.prototype.generatePoints = function() {
var A = this.options, H = A.data, Y = this.processedXData, Z = this.processedYData, q = this.pointClass, it = Y.length, et = this.cropStart || 0, nt = this.hasGroupedData, rt = A.keys, ct = [];
A = A.dataGrouping && A.dataGrouping.groupAll ? et : 0;
var gt, dt, ht = this.data;
if (!ht && !nt) {
var at = [];
at.length = H.length, ht = this.data = at;
}
for (rt && nt && (this.options.keys = !1), dt = 0; dt < it; dt++) {
if (at = et + dt, nt) {
var J = new q().init(this, [Y[dt]].concat(z(Z[dt])));
J.dataGroup = this.groupMap[A + dt], J.dataGroup.options && (J.options = J.dataGroup.options, s(J, J.dataGroup.options), delete J.dataLabels);
} else
(J = ht[at]) || typeof H[at] > "u" || (ht[at] = J = new q().init(this, H[at], Y[dt]));
J && (J.index = nt ? A + dt : at, ct[dt] = J);
}
if (this.options.keys = rt, ht && (it !== (gt = ht.length) || nt))
for (dt = 0; dt < gt; dt++)
dt !== et || nt || (dt += it), ht[dt] && (ht[dt].destroyElements(), ht[dt].plotX = void 0);
this.data = ht, this.points = ct, P(this, "afterGeneratePoints");
}, Q.prototype.getXExtremes = function(A) {
return { min: h(A), max: v(A) };
}, Q.prototype.getExtremes = function(A, H) {
var Y = this.xAxis, Z = this.yAxis, q = this.processedXData || this.xData, it = [], et = this.requireSorting ? this.cropShoulder : 0;
Z = Z ? Z.positiveValuesOnly : !1;
var nt, rt = 0, ct = 0, gt = 0;
A = A || this.stackedYData || this.processedYData || [];
var dt = A.length;
if (Y) {
var ht = Y.getExtremes();
rt = ht.min, ct = ht.max;
}
for (nt = 0; nt < dt; nt++) {
var at = q[nt];
ht = A[nt];
var J = (W(ht) || I(ht)) && (ht.length || 0 < ht || !Z);
if (at = H || this.getExtremesFromAll || this.options.getExtremesFromAll || this.cropped || !Y || (q[nt + et] || at) >= rt && (q[nt - et] || at) <= ct, J && at)
if (J = ht.length)
for (; J--; )
W(ht[J]) && (it[gt++] = ht[J]);
else
it[gt++] = ht;
}
return A = { activeYData: it, dataMin: h(it), dataMax: v(it) }, P(this, "afterGetExtremes", { dataExtremes: A }), A;
}, Q.prototype.applyExtremes = function() {
var A = this.getExtremes();
return this.dataMin = A.dataMin, this.dataMax = A.dataMax, A;
}, Q.prototype.getFirstValidPoint = function(A) {
for (var H = A.length, Y = 0, Z = null; Z === null && Y < H; )
Z = A[Y], Y++;
return Z;
}, Q.prototype.translate = function() {
this.processedXData || this.processData(), this.generatePoints();
var A = this.options, H = A.stacking, Y = this.xAxis, Z = Y.categories, q = this.enabledDataSorting, it = this.yAxis, et = this.points, nt = et.length, rt = this.pointPlacementToXValue(), ct = !!rt, gt = A.threshold, dt = A.startFromThreshold ? gt : 0, ht = this.zoneAxis || "y", at, J, tt = Number.MAX_VALUE;
for (at = 0; at < nt; at++) {
var ot = et[at], lt = ot.x, pt = void 0, yt = void 0, vt = ot.y, Ct = ot.low, Pt = H && it.stacking && it.stacking.stacks[(this.negStacks && vt < (dt ? 0 : gt) ? "-" : "") + this.stackKey];
if ((it.positiveValuesOnly && !it.validatePositiveValue(vt) || Y.positiveValuesOnly && !Y.validatePositiveValue(lt)) && (ot.isNull = !0), ot.plotX = J = i(c(Y.translate(lt, 0, 0, 0, 1, rt, this.type === "flags"), -1e5, 1e5)), H && this.visible && Pt && Pt[lt]) {
var At = this.getStackIndicator(
At,
lt,
this.index
);
ot.isNull || (pt = Pt[lt], yt = pt.points[At.key]);
}
if (I(yt) && (Ct = yt[0], vt = yt[1], Ct === dt && At.key === Pt[lt].base && (Ct = m(W(gt) && gt, it.min)), it.positiveValuesOnly && 0 >= Ct && (Ct = null), ot.total = ot.stackTotal = pt.total, ot.percentage = pt.total && ot.y / pt.total * 100, ot.stackY = vt, this.irregularWidths || pt.setOffset(this.pointXOffset || 0, this.barW || 0)), ot.yBottom = p(Ct) ? c(it.translate(Ct, 0, 1, 0, 1), -1e5, 1e5) : null, this.dataModify && (vt = this.dataModify.modifyValue(vt, at)), ot.plotY = void 0, W(vt) && (pt = it.translate(vt, !1, !0, !1, !0), typeof pt < "u" && (ot.plotY = c(
pt,
-1e5,
1e5
))), ot.isInside = this.isPointInside(ot), ot.clientX = ct ? i(Y.translate(lt, 0, 0, 0, 1, rt)) : J, ot.negative = ot[ht] < (A[ht + "Threshold"] || gt || 0), ot.category = Z && typeof Z[ot.x] < "u" ? Z[ot.x] : ot.x, !ot.isNull && ot.visible !== !1) {
typeof St < "u" && (tt = Math.min(tt, Math.abs(J - St)));
var St = J;
}
ot.zone = this.zones.length ? ot.getZone() : void 0, !ot.graphic && this.group && q && (ot.isNew = !0);
}
this.closestPointRangePx = tt, P(this, "afterTranslate");
}, Q.prototype.getValidPoints = function(A, H, Y) {
var Z = this.chart;
return (A || this.points || []).filter(function(q) {
return H && !Z.isInsidePlot(q.plotX, q.plotY, { inverted: Z.inverted }) ? !1 : q.visible !== !1 && (Y || !q.isNull);
});
}, Q.prototype.getClipBox = function() {
var A = this.chart, H = this.xAxis, Y = this.yAxis, Z = X(A.clipBox);
return H && H.len !== A.plotSizeX && (Z.width = H.len), Y && Y.len !== A.plotSizeY && (Z.height = Y.len), Z;
}, Q.prototype.getSharedClipKey = function() {
return this.sharedClipKey = (this.options.xAxis || 0) + "," + (this.options.yAxis || 0);
}, Q.prototype.setClip = function() {
var A = this.chart, H = this.group, Y = this.markerGroup, Z = A.sharedClips;
A = A.renderer;
var q = this.getClipBox(), it = this.getSharedClipKey(), et = Z[it];
et ? et.animate(q) : Z[it] = et = A.clipRect(q), H && H.clip(this.options.clip === !1 ? void 0 : et), Y && Y.clip();
}, Q.prototype.animate = function(A) {
var H = this.chart, Y = this.group, Z = this.markerGroup, q = H.inverted, it = x(this.options.animation), et = [this.getSharedClipKey(), it.duration, it.easing, it.defer].join(), nt = H.sharedClips[et], rt = H.sharedClips[et + "m"];
if (A && Y)
it = this.getClipBox(), nt ? nt.attr("height", it.height) : (it.width = 0, q && (it.x = H.plotHeight), nt = H.renderer.clipRect(it), H.sharedClips[et] = nt, rt = H.renderer.clipRect({ x: q ? (H.plotSizeX || 0) + 99 : -99, y: q ? -H.plotLeft : -H.plotTop, width: 99, height: q ? H.chartWidth : H.chartHeight }), H.sharedClips[et + "m"] = rt), Y.clip(nt), Z && Z.clip(rt);
else if (nt && !nt.hasClass("highcharts-animating")) {
H = this.getClipBox();
var ct = it.step;
Z && Z.element.childNodes.length && (it.step = function(gt, dt) {
ct && ct.apply(dt, arguments), rt && rt.element && rt.attr(dt.prop, dt.prop === "width" ? gt + 99 : gt);
}), nt.addClass("highcharts-animating").animate(H, it);
}
}, Q.prototype.afterAnimate = function() {
var A = this;
this.setClip(), g(
this.chart.sharedClips,
function(H, Y, Z) {
H && !A.chart.container.querySelector('[clip-path="url(#' + H.id + ')"]') && (H.destroy(), delete Z[Y]);
}
), this.finishedAnimating = !0, P(this, "afterAnimate");
}, Q.prototype.drawPoints = function() {
var A = this.points, H = this.chart, Y = this.options.marker, Z = this[this.specialGroup] || this.markerGroup, q = this.xAxis, it = m(Y.enabled, !q || q.isRadial ? !0 : null, this.closestPointRangePx >= Y.enabledThreshold * Y.radius), et, nt;
if (Y.enabled !== !1 || this._hasPointMarkers)
for (et = 0; et < A.length; et++) {
var rt = A[et], ct = (nt = rt.graphic) ? "animate" : "attr", gt = rt.marker || {}, dt = !!rt.marker;
if ((it && typeof gt.enabled > "u" || gt.enabled) && !rt.isNull && rt.visible !== !1) {
var ht = m(gt.symbol, this.symbol, "rect"), at = this.markerAttribs(rt, rt.selected && "select");
this.enabledDataSorting && (rt.startXPos = q.reversed ? -(at.width || 0) : q.width);
var J = rt.isInside !== !1;
nt ? nt[J ? "show" : "hide"](J).animate(at) : J && (0 < (at.width || 0) || rt.hasImage) && (rt.graphic = nt = H.renderer.symbol(ht, at.x, at.y, at.width, at.height, dt ? gt : Y).add(Z), this.enabledDataSorting && H.hasRendered && (nt.attr({ x: rt.startXPos }), ct = "animate")), nt && ct === "animate" && nt[J ? "show" : "hide"](J).animate(at), nt && !H.styledMode && nt[ct](this.pointAttribs(rt, rt.selected && "select")), nt && nt.addClass(rt.getClassName(), !0);
} else
nt && (rt.graphic = nt.destroy());
}
}, Q.prototype.markerAttribs = function(A, H) {
var Y = this.options, Z = Y.marker, q = A.marker || {}, it = q.symbol || Z.symbol, et = m(q.radius, Z.radius);
return H && (Z = Z.states[H], H = q.states && q.states[H], et = m(H && H.radius, Z && Z.radius, et + (Z && Z.radiusPlus || 0))), A.hasImage = it && it.indexOf("url") === 0, A.hasImage && (et = 0), A = { x: Y.crisp ? Math.floor(A.plotX - et) : A.plotX - et, y: A.plotY - et }, et && (A.width = A.height = 2 * et), A;
}, Q.prototype.pointAttribs = function(A, H) {
var Y = this.options.marker, Z = A && A.options, q = Z && Z.marker || {}, it = Z && Z.color, et = A && A.color, nt = A && A.zone && A.zone.color, rt = this.color;
return A = m(q.lineWidth, Y.lineWidth), Z = 1, rt = it || nt || et || rt, it = q.fillColor || Y.fillColor || rt, et = q.lineColor || Y.lineColor || rt, H = H || "normal", Y = Y.states[H] || {}, H = q.states && q.states[H] || {}, A = m(H.lineWidth, Y.lineWidth, A + m(H.lineWidthPlus, Y.lineWidthPlus, 0)), it = H.fillColor || Y.fillColor || it, et = H.lineColor || Y.lineColor || et, Z = m(H.opacity, Y.opacity, Z), { stroke: et, "stroke-width": A, fill: it, opacity: Z };
}, Q.prototype.destroy = function(A) {
var H = this, Y = H.chart, Z = /AppleWebKit\/533/.test(k.navigator.userAgent), q = H.data || [], it, et, nt, rt;
for (P(H, "destroy"), this.removeEvents(A), (H.axisTypes || []).forEach(function(ct) {
(rt = H[ct]) && rt.series && (a(rt.series, H), rt.isDirty = rt.forceRedraw = !0);
}), H.legendItem && H.chart.legend.destroyItem(H), et = q.length; et--; )
(nt = q[et]) && nt.destroy && nt.destroy();
H.clips && H.clips.forEach(function(ct) {
return ct.destroy();
}), w.clearTimeout(H.animationTimeout), g(H, function(ct, gt) {
ct instanceof j && !ct.survive && (it = Z && gt === "group" ? "hide" : "destroy", ct[it]());
}), Y.hoverSeries === H && (Y.hoverSeries = void 0), a(Y.series, H), Y.orderSeries(), g(H, function(ct, gt) {
A && gt === "hcEvents" || delete H[gt];
});
}, Q.prototype.applyZones = function() {
var A = this, H = this.chart, Y = H.renderer, Z = this.zones, q = this.clips || [], it = this.graph, et = this.area, nt = Math.max(H.chartWidth, H.chartHeight), rt = this[(this.zoneAxis || "y") + "Axis"], ct = H.inverted, gt, dt, ht, at, J, tt, ot, lt, pt = !1;
if (Z.length && (it || et) && rt && typeof rt.min < "u") {
var yt = rt.reversed, vt = rt.horiz;
it && !this.showLine && it.hide(), et && et.hide();
var Ct = rt.getExtremes();
Z.forEach(function(Pt, At) {
gt = yt ? vt ? H.plotWidth : 0 : vt ? 0 : rt.toPixels(Ct.min) || 0, gt = c(m(dt, gt), 0, nt), dt = c(Math.round(rt.toPixels(m(Pt.value, Ct.max), !0) || 0), 0, nt), pt && (gt = dt = rt.toPixels(Ct.max)), at = Math.abs(gt - dt), J = Math.min(gt, dt), tt = Math.max(gt, dt), rt.isXAxis ? (ht = { x: ct ? tt : J, y: 0, width: at, height: nt }, vt || (ht.x = H.plotHeight - ht.x)) : (ht = { x: 0, y: ct ? tt : J, width: nt, height: at }, vt && (ht.y = H.plotWidth - ht.y)), ct && Y.isVML && (ht = rt.isXAxis ? {
x: 0,
y: yt ? J : tt,
height: ht.width,
width: H.chartWidth
} : { x: ht.y - H.plotLeft - H.spacingBox.x, y: 0, width: ht.height, height: H.chartHeight }), q[At] ? q[At].animate(ht) : q[At] = Y.clipRect(ht), ot = A["zone-area-" + At], lt = A["zone-graph-" + At], it && lt && lt.clip(q[At]), et && ot && ot.clip(q[At]), pt = Pt.value > Ct.max, A.resetZones && dt === 0 && (dt = void 0);
}), this.clips = q;
} else
A.visible && (it && it.show(!0), et && et.show(!0));
}, Q.prototype.invertGroups = function(A) {
function H() {
["group", "markerGroup"].forEach(function(q) {
Y[q] && (Z.renderer.isVML && Y[q].attr({ width: Y.yAxis.len, height: Y.xAxis.len }), Y[q].width = Y.yAxis.len, Y[q].height = Y.xAxis.len, Y[q].invert(Y.isRadialSeries ? !1 : A));
});
}
var Y = this, Z = Y.chart;
Y.xAxis && (Y.eventsToUnbind.push(S(Z, "resize", H)), H(), Y.invertGroups = H);
}, Q.prototype.plotGroup = function(A, H, Y, Z, q) {
var it = this[A], et = !it;
return Y = { visibility: Y, zIndex: Z || 0.1 }, typeof this.opacity > "u" || this.chart.styledMode || this.state === "inactive" || (Y.opacity = this.opacity), et && (this[A] = it = this.chart.renderer.g().add(q)), it.addClass("highcharts-" + H + " highcharts-series-" + this.index + " highcharts-" + this.type + "-series " + (p(this.colorIndex) ? "highcharts-color-" + this.colorIndex + " " : "") + (this.options.className || "") + (it.hasClass("highcharts-tracker") ? " highcharts-tracker" : ""), !0), it.attr(Y)[et ? "attr" : "animate"](this.getPlotBox()), it;
}, Q.prototype.getPlotBox = function() {
var A = this.chart, H = this.xAxis, Y = this.yAxis;
return A.inverted && (H = Y, Y = this.xAxis), { translateX: H ? H.left : A.plotLeft, translateY: Y ? Y.top : A.plotTop, scaleX: 1, scaleY: 1 };
}, Q.prototype.removeEvents = function(A) {
A || L(this), this.eventsToUnbind.length && (this.eventsToUnbind.forEach(function(H) {
H();
}), this.eventsToUnbind.length = 0);
}, Q.prototype.render = function() {
var A = this, H = A.chart, Y = A.options, Z = x(Y.animation), q = A.visible ? "inherit" : "hidden", it = Y.zIndex, et = A.hasRendered, nt = H.seriesGroup, rt = H.inverted;
H = !A.finishedAnimating && H.renderer.isSVG ? Z.duration : 0, P(this, "render");
var ct = A.plotGroup("group", "series", q, it, nt);
A.markerGroup = A.plotGroup("markerGroup", "markers", q, it, nt), Y.clip !== !1 && A.setClip(), A.animate && H && A.animate(!0), ct.inverted = m(A.invertible, A.isCartesian) ? rt : !1, A.drawGraph && (A.drawGraph(), A.applyZones()), A.visible && A.drawPoints(), A.drawDataLabels && A.drawDataLabels(), A.redrawPoints && A.redrawPoints(), A.drawTracker && A.options.enableMouseTracking !== !1 && A.drawTracker(), A.invertGroups(rt), A.animate && H && A.animate(), et || (H && Z.defer && (H += Z.defer), A.animationTimeout = $(function() {
A.afterAnimate();
}, H || 0)), A.isDirty = !1, A.hasRendered = !0, P(A, "afterRender");
}, Q.prototype.redraw = function() {
var A = this.chart, H = this.isDirty || this.isDirtyData, Y = this.group, Z = this.xAxis, q = this.yAxis;
Y && (A.inverted && Y.attr({
width: A.plotWidth,
height: A.plotHeight
}), Y.animate({ translateX: m(Z && Z.left, A.plotLeft), translateY: m(q && q.top, A.plotTop) })), this.translate(), this.render(), H && delete this.kdTree;
}, Q.prototype.searchPoint = function(A, H) {
var Y = this.xAxis, Z = this.yAxis, q = this.chart.inverted;
return this.searchKDTree({ clientX: q ? Y.len - A.chartY + Y.pos : A.chartX - Y.pos, plotY: q ? Z.len - A.chartX + Z.pos : A.chartY - Z.pos }, H, A);
}, Q.prototype.buildKDTree = function(A) {
function H(q, it, et) {
var nt = q && q.length;
if (nt) {
var rt = Y.kdAxisArray[it % et];
return q.sort(function(ct, gt) {
return ct[rt] - gt[rt];
}), nt = Math.floor(nt / 2), { point: q[nt], left: H(q.slice(0, nt), it + 1, et), right: H(q.slice(nt + 1), it + 1, et) };
}
}
this.buildingKdTree = !0;
var Y = this, Z = -1 < Y.options.findNearestPointBy.indexOf("y") ? 2 : 1;
delete Y.kdTree, $(function() {
Y.kdTree = H(Y.getValidPoints(null, !Y.directTouch), Z, Z), Y.buildingKdTree = !1;
}, Y.options.kdNow || A && A.type === "touchstart" ? 0 : 1);
}, Q.prototype.searchKDTree = function(A, H, Y) {
function Z(rt, ct, gt, dt) {
var ht = ct.point, at = q.kdAxisArray[gt % dt], J = ht, tt = p(rt[it]) && p(ht[it]) ? Math.pow(rt[it] - ht[it], 2) : null, ot = p(rt[et]) && p(ht[et]) ? Math.pow(rt[et] - ht[et], 2) : null;
return ot = (tt || 0) + (ot || 0), ht.dist = p(ot) ? Math.sqrt(ot) : Number.MAX_VALUE, ht.distX = p(tt) ? Math.sqrt(tt) : Number.MAX_VALUE, at = rt[at] - ht[at], ot = 0 > at ? "left" : "right", tt = 0 > at ? "right" : "left", ct[ot] && (ot = Z(rt, ct[ot], gt + 1, dt), J = ot[nt] < J[nt] ? ot : ht), ct[tt] && Math.sqrt(at * at) < J[nt] && (rt = Z(rt, ct[tt], gt + 1, dt), J = rt[nt] < J[nt] ? rt : J), J;
}
var q = this, it = this.kdAxisArray[0], et = this.kdAxisArray[1], nt = H ? "distX" : "dist";
if (H = -1 < q.options.findNearestPointBy.indexOf("y") ? 2 : 1, this.kdTree || this.buildingKdTree || this.buildKDTree(Y), this.kdTree)
return Z(
A,
this.kdTree,
H,
H
);
}, Q.prototype.pointPlacementToXValue = function() {
var A = this.options, H = A.pointRange, Y = this.xAxis;
return A = A.pointPlacement, A === "between" && (A = Y.reversed ? -0.5 : 0.5), W(A) ? A * (H || Y.pointRange) : 0;
}, Q.prototype.isPointInside = function(A) {
var H = this.chart, Y = this.xAxis, Z = this.yAxis;
return typeof A.plotY < "u" && typeof A.plotX < "u" && 0 <= A.plotY && A.plotY <= (Z ? Z.len : H.plotHeight) && 0 <= A.plotX && A.plotX <= (Y ? Y.len : H.plotWidth);
}, Q.prototype.drawTracker = function() {
var A = this, H = A.options, Y = H.trackByArea, Z = [].concat(Y ? A.areaPath : A.graphPath), q = A.chart, it = q.pointer, et = q.renderer, nt = q.options.tooltip.snap, rt = A.tracker, ct = function(dt) {
q.hoverSeries !== A && A.onMouseOver();
}, gt = "rgba(192,192,192," + (R ? 1e-4 : 2e-3) + ")";
rt ? rt.attr({ d: Z }) : A.graph && (A.tracker = et.path(Z).attr({ visibility: A.visible ? "visible" : "hidden", zIndex: 2 }).addClass(Y ? "highcharts-tracker-area" : "highcharts-tracker-line").add(A.group), q.styledMode || A.tracker.attr({ "stroke-linecap": "round", "stroke-linejoin": "round", stroke: gt, fill: Y ? gt : "none", "stroke-width": A.graph.strokeWidth() + (Y ? 0 : 2 * nt) }), [A.tracker, A.markerGroup, A.dataLabelsGroup].forEach(function(dt) {
dt && (dt.addClass("highcharts-tracker").on("mouseover", ct).on("mouseout", function(ht) {
it.onTrackerMouseOut(ht);
}), H.cursor && !q.styledMode && dt.css({ cursor: H.cursor }), O) && dt.on("touchstart", ct);
})), P(this, "afterDrawTracker");
}, Q.prototype.addPoint = function(A, H, Y, Z, q) {
var it = this.options, et = this.data, nt = this.chart, rt = this.xAxis;
rt = rt && rt.hasNames && rt.names;
var ct = it.data, gt = this.xData, dt;
H = m(H, !0);
var ht = { series: this };
this.pointClass.prototype.applyOptions.apply(
ht,
[A]
);
var at = ht.x, J = gt.length;
if (this.requireSorting && at < gt[J - 1])
for (dt = !0; J && gt[J - 1] > at; )
J--;
this.updateParallelArrays(ht, "splice", J, 0, 0), this.updateParallelArrays(ht, J), rt && ht.name && (rt[at] = ht.name), ct.splice(J, 0, A), dt && (this.data.splice(J, 0, null), this.processData()), it.legendType === "point" && this.generatePoints(), Y && (et[0] && et[0].remove ? et[0].remove(!1) : (et.shift(), this.updateParallelArrays(ht, "shift"), ct.shift())), q !== !1 && P(this, "addPoint", { point: ht }), this.isDirtyData = this.isDirty = !0, H && nt.redraw(Z);
}, Q.prototype.removePoint = function(A, H, Y) {
var Z = this, q = Z.data, it = q[A], et = Z.points, nt = Z.chart, rt = function() {
et && et.length === q.length && et.splice(A, 1), q.splice(A, 1), Z.options.data.splice(A, 1), Z.updateParallelArrays(it || { series: Z }, "splice", A, 1), it && it.destroy(), Z.isDirty = !0, Z.isDirtyData = !0, H && nt.redraw();
};
f(Y, nt), H = m(H, !0), it ? it.firePointEvent("remove", null, rt) : rt();
}, Q.prototype.remove = function(A, H, Y, Z) {
function q() {
it.destroy(Z), et.isDirtyLegend = et.isDirtyBox = !0, et.linkSeries(), m(A, !0) && et.redraw(H);
}
var it = this, et = it.chart;
Y !== !1 ? P(
it,
"remove",
null,
q
) : q();
}, Q.prototype.update = function(A, H) {
A = u(A, this.userOptions), P(this, "update", { options: A });
var Y = this, Z = Y.chart, q = Y.userOptions, it = Y.initialType || Y.type, et = Z.options.plotOptions, nt = b[it].prototype, rt = Y.finishedAnimating && { animation: !1 }, ct = {}, gt, dt = ["eventOptions", "navigatorSeries", "baseSeries"], ht = A.type || q.type || Z.options.chart.type, at = !(this.hasDerivedData || ht && ht !== this.type || typeof A.pointStart < "u" || typeof A.pointInterval < "u" || typeof A.relativeXValue < "u" || Y.hasOptionChanged("dataGrouping") || Y.hasOptionChanged("pointStart") || Y.hasOptionChanged("pointInterval") || Y.hasOptionChanged("pointIntervalUnit") || Y.hasOptionChanged("keys"));
if (ht = ht || it, at && (dt.push("data", "isDirtyData", "points", "processedXData", "processedYData", "xIncrement", "cropped", "_hasPointMarkers", "_hasPointLabels", "clips", "nodes", "layout", "mapMap", "mapData", "minY", "maxY", "minX", "maxX"), A.visible !== !1 && dt.push("area", "graph"), Y.parallelArrays.forEach(function(tt) {
dt.push(tt + "Data");
}), A.data && (A.dataSorting && s(Y.options.dataSorting, A.dataSorting), this.setData(A.data, !1))), A = X(q, rt, { index: typeof q.index > "u" ? Y.index : q.index, pointStart: m(et && et.series && et.series.pointStart, q.pointStart, Y.xData[0]) }, !at && { data: Y.options.data }, A), at && A.data && (A.data = Y.options.data), dt = ["group", "markerGroup", "dataLabelsGroup", "transformGroup"].concat(dt), dt.forEach(function(tt) {
dt[tt] = Y[tt], delete Y[tt];
}), et = !1, b[ht]) {
if (et = ht !== Y.type, Y.remove(!1, !1, !1, !0), et)
if (Object.setPrototypeOf)
Object.setPrototypeOf(Y, b[ht].prototype);
else {
rt = Object.hasOwnProperty.call(Y, "hcEvents") && Y.hcEvents;
for (gt in nt)
Y[gt] = void 0;
s(Y, b[ht].prototype), rt ? Y.hcEvents = rt : delete Y.hcEvents;
}
} else
t(17, !0, Z, { missingModuleFor: ht });
if (dt.forEach(function(tt) {
Y[tt] = dt[tt];
}), Y.init(Z, A), at && this.points) {
var J = Y.options;
J.visible === !1 ? (ct.graphic = 1, ct.dataLabel = 1) : Y._hasPointLabels || (A = J.marker, nt = J.dataLabels, !A || A.enabled !== !1 && (q.marker && q.marker.symbol) === A.symbol || (ct.graphic = 1), nt && nt.enabled === !1 && (ct.dataLabel = 1)), this.points.forEach(function(tt) {
tt && tt.series && (tt.resolveColor(), Object.keys(ct).length && tt.destroyElements(ct), J.showInLegend === !1 && tt.legendItem && Z.legend.destroyItem(tt));
}, this);
}
Y.initialType = it, Z.linkSeries(), et && Y.linkedSeries.length && (Y.isDirtyData = !0), P(this, "afterUpdate"), m(H, !0) && Z.redraw(at ? void 0 : !1);
}, Q.prototype.setName = function(A) {
this.name = this.options.name = this.userOptions.name = A, this.chart.isDirtyLegend = !0;
}, Q.prototype.hasOptionChanged = function(A) {
var H = this.options[A], Y = this.chart.options.plotOptions, Z = this.userOptions[A];
return Z ? H !== Z : H !== m(
Y && Y[this.type] && Y[this.type][A],
Y && Y.series && Y.series[A],
H
);
}, Q.prototype.onMouseOver = function() {
var A = this.chart, H = A.hoverSeries;
A.pointer.setHoverChartIndex(), H && H !== this && H.onMouseOut(), this.options.events.mouseOver && P(this, "mouseOver"), this.setState("hover"), A.hoverSeries = this;
}, Q.prototype.onMouseOut = function() {
var A = this.options, H = this.chart, Y = H.tooltip, Z = H.hoverPoint;
H.hoverSeries = null, Z && Z.onMouseOut(), this && A.events.mouseOut && P(this, "mouseOut"), !Y || this.stickyTracking || Y.shared && !this.noSharedTooltip || Y.hide(), H.series.forEach(function(q) {
q.setState(
"",
!0
);
});
}, Q.prototype.setState = function(A, H) {
var Y = this, Z = Y.options, q = Y.graph, it = Z.inactiveOtherPoints, et = Z.states, nt = m(et[A || "normal"] && et[A || "normal"].animation, Y.chart.options.chart.animation), rt = Z.lineWidth, ct = 0, gt = Z.opacity;
if (A = A || "", Y.state !== A && ([Y.group, Y.markerGroup, Y.dataLabelsGroup].forEach(function(dt) {
dt && (Y.state && dt.removeClass("highcharts-series-" + Y.state), A && dt.addClass("highcharts-series-" + A));
}), Y.state = A, !Y.chart.styledMode)) {
if (et[A] && et[A].enabled === !1)
return;
if (A && (rt = et[A].lineWidth || rt + (et[A].lineWidthPlus || 0), gt = m(et[A].opacity, gt)), q && !q.dashstyle)
for (Z = { "stroke-width": rt }, q.animate(Z, nt); Y["zone-graph-" + ct]; )
Y["zone-graph-" + ct].animate(Z, nt), ct += 1;
it || [Y.group, Y.markerGroup, Y.dataLabelsGroup, Y.labelBySeries].forEach(function(dt) {
dt && dt.animate({ opacity: gt }, nt);
});
}
H && it && Y.points && Y.setAllPointsToState(A || void 0);
}, Q.prototype.setAllPointsToState = function(A) {
this.points.forEach(function(H) {
H.setState && H.setState(A);
});
}, Q.prototype.setVisible = function(A, H) {
var Y = this, Z = Y.chart, q = Y.legendItem, it = Z.options.chart.ignoreHiddenSeries, et = Y.visible, nt = (Y.visible = A = Y.options.visible = Y.userOptions.visible = typeof A > "u" ? !et : A) ? "show" : "hide";
["group", "dataLabelsGroup", "markerGroup", "tracker", "tt"].forEach(function(rt) {
Y[rt] && Y[rt][nt]();
}), (Z.hoverSeries === Y || (Z.hoverPoint && Z.hoverPoint.series) === Y) && Y.onMouseOut(), q && Z.legend.colorizeItem(Y, A), Y.isDirty = !0, Y.options.stacking && Z.series.forEach(function(rt) {
rt.options.stacking && rt.visible && (rt.isDirty = !0);
}), Y.linkedSeries.forEach(function(rt) {
rt.setVisible(A, !1);
}), it && (Z.isDirtyBox = !0), P(Y, nt), H !== !1 && Z.redraw();
}, Q.prototype.show = function() {
this.setVisible(!0);
}, Q.prototype.hide = function() {
this.setVisible(!1);
}, Q.prototype.select = function(A) {
this.selected = A = this.options.selected = typeof A > "u" ? !this.selected : A, this.checkbox && (this.checkbox.checked = A), P(this, A ? "select" : "unselect");
}, Q.prototype.shouldShowTooltip = function(A, H, Y) {
return Y === void 0 && (Y = {}), Y.series = this, Y.visiblePlotOnly = !0, this.chart.isInsidePlot(A, H, Y);
}, Q.defaultOptions = F, Q;
}(), s(y.prototype, { axisTypes: [
"xAxis",
"yAxis"
], coll: "series", colorCounter: 0, cropShoulder: 1, directTouch: !1, drawLegendSymbol: G.drawLineMarker, isCartesian: !0, kdAxisArray: ["clientX", "plotY"], parallelArrays: ["x", "y"], pointClass: V, requireSorting: !0, sorted: !0 }), B.series = y, y;
}), C(o, "Extensions/ScrollablePlotArea.js", [o["Core/Animation/AnimationUtilities.js"], o["Core/Axis/Axis.js"], o["Core/Chart/Chart.js"], o["Core/Series/Series.js"], o["Core/Renderer/RendererRegistry.js"], o["Core/Utilities.js"]], function(y, N, _, U, G, V) {
var F = y.stop, B = V.addEvent, j = V.createElement, w = V.merge, x = V.pick;
B(_, "afterSetChartSize", function(f) {
var l = this.options.chart.scrollablePlotArea, T = l && l.minWidth;
if (l = l && l.minHeight, !this.renderer.forExport) {
if (T) {
if (this.scrollablePixelsX = T = Math.max(0, T - this.chartWidth)) {
this.scrollablePlotBox = this.renderer.scrollablePlotBox = w(this.plotBox), this.plotBox.width = this.plotWidth += T, this.inverted ? this.clipBox.height += T : this.clipBox.width += T;
var O = { 1: { name: "right", value: T } };
}
} else
l && (this.scrollablePixelsY = T = Math.max(
0,
l - this.chartHeight
)) && (this.scrollablePlotBox = this.renderer.scrollablePlotBox = w(this.plotBox), this.plotBox.height = this.plotHeight += T, this.inverted ? this.clipBox.width += T : this.clipBox.height += T, O = { 2: { name: "bottom", value: T } });
O && !f.skipAxes && this.axes.forEach(function(R) {
O[R.side] ? R.getPlotLinePath = function() {
var k = O[R.side].name, b = this[k];
this[k] = b - O[R.side].value;
var S = N.prototype.getPlotLinePath.apply(this, arguments);
return this[k] = b, S;
} : (R.setAxisSize(), R.setAxisTranslation());
});
}
}), B(_, "render", function() {
this.scrollablePixelsX || this.scrollablePixelsY ? (this.setUpScrolling && this.setUpScrolling(), this.applyFixed()) : this.fixedDiv && this.applyFixed();
}), _.prototype.setUpScrolling = function() {
var f = this, l = { WebkitOverflowScrolling: "touch", overflowX: "hidden", overflowY: "hidden" };
this.scrollablePixelsX && (l.overflowX = "auto"), this.scrollablePixelsY && (l.overflowY = "auto"), this.scrollingParent = j("div", { className: "highcharts-scrolling-parent" }, { position: "relative" }, this.renderTo), this.scrollingContainer = j(
"div",
{ className: "highcharts-scrolling" },
l,
this.scrollingParent
), B(this.scrollingContainer, "scroll", function() {
f.pointer && delete f.pointer.chartPosition;
}), this.innerContainer = j("div", { className: "highcharts-inner-container" }, null, this.scrollingContainer), this.innerContainer.appendChild(this.container), this.setUpScrolling = null;
}, _.prototype.moveFixedElements = function() {
var f = this.container, l = this.fixedRenderer, T = ".highcharts-contextbutton .highcharts-credits .highcharts-legend .highcharts-legend-checkbox .highcharts-navigator-series .highcharts-navigator-xaxis .highcharts-navigator-yaxis .highcharts-navigator .highcharts-reset-zoom .highcharts-drillup-button .highcharts-scrollbar .highcharts-subtitle .highcharts-title".split(" "), O;
this.scrollablePixelsX && !this.inverted ? O = ".highcharts-yaxis" : this.scrollablePixelsX && this.inverted || this.scrollablePixelsY && !this.inverted ? O = ".highcharts-xaxis" : this.scrollablePixelsY && this.inverted && (O = ".highcharts-yaxis"), O && T.push(O + ":not(.highcharts-radial-axis)", O + "-labels:not(.highcharts-radial-axis-labels)"), T.forEach(function(R) {
[].forEach.call(f.querySelectorAll(R), function(k) {
(k.namespaceURI === l.SVG_NS ? l.box : l.box.parentNode).appendChild(k), k.style.pointerEvents = "auto";
});
});
}, _.prototype.applyFixed = function() {
var f = !this.fixedDiv, l = this.options.chart, T = l.scrollablePlotArea, O = G.getRendererType();
f ? (this.fixedDiv = j("div", { className: "highcharts-fixed" }, { position: "absolute", overflow: "hidden", pointerEvents: "none", zIndex: (l.style && l.style.zIndex || 0) + 2, top: 0 }, null, !0), this.scrollingContainer && this.scrollingContainer.parentNode.insertBefore(this.fixedDiv, this.scrollingContainer), this.renderTo.style.overflow = "visible", this.fixedRenderer = l = new O(
this.fixedDiv,
this.chartWidth,
this.chartHeight,
this.options.chart.style
), this.scrollableMask = l.path().attr({ fill: this.options.chart.backgroundColor || "#fff", "fill-opacity": x(T.opacity, 0.85), zIndex: -1 }).addClass("highcharts-scrollable-mask").add(), B(this, "afterShowResetZoom", this.moveFixedElements), B(this, "afterDrilldown", this.moveFixedElements), B(this, "afterLayOutTitles", this.moveFixedElements)) : this.fixedRenderer.setSize(this.chartWidth, this.chartHeight), (this.scrollableDirty || f) && (this.scrollableDirty = !1, this.moveFixedElements()), l = this.chartWidth + (this.scrollablePixelsX || 0), O = this.chartHeight + (this.scrollablePixelsY || 0), F(this.container), this.container.style.width = l + "px", this.container.style.height = O + "px", this.renderer.boxWrapper.attr({ width: l, height: O, viewBox: [0, 0, l, O].join(" ") }), this.chartBackground.attr({ width: l, height: O }), this.scrollingContainer.style.height = this.chartHeight + "px", f && (T.scrollPositionX && (this.scrollingContainer.scrollLeft = this.scrollablePixelsX * T.scrollPositionX), T.scrollPositionY && (this.scrollingContainer.scrollTop = this.scrollablePixelsY * T.scrollPositionY)), O = this.axisOffset, f = this.plotTop - O[0] - 1, T = this.plotLeft - O[3] - 1, l = this.plotTop + this.plotHeight + O[2] + 1, O = this.plotLeft + this.plotWidth + O[1] + 1;
var R = this.plotLeft + this.plotWidth - (this.scrollablePixelsX || 0), k = this.plotTop + this.plotHeight - (this.scrollablePixelsY || 0);
f = this.scrollablePixelsX ? [["M", 0, f], ["L", this.plotLeft - 1, f], ["L", this.plotLeft - 1, l], ["L", 0, l], ["Z"], ["M", R, f], ["L", this.chartWidth, f], ["L", this.chartWidth, l], ["L", R, l], ["Z"]] : this.scrollablePixelsY ? [["M", T, 0], ["L", T, this.plotTop - 1], ["L", O, this.plotTop - 1], ["L", O, 0], ["Z"], ["M", T, k], ["L", T, this.chartHeight], ["L", O, this.chartHeight], ["L", O, k], ["Z"]] : [["M", 0, 0]], this.redrawTrigger !== "adjustHeight" && this.scrollableMask.attr({ d: f });
}, B(N, "afterInit", function() {
this.chart.scrollableDirty = !0;
}), B(U, "show", function() {
this.chart.scrollableDirty = !0;
});
}), C(o, "Core/Axis/StackingAxis.js", [o["Core/Animation/AnimationUtilities.js"], o["Core/Axis/Axis.js"], o["Core/Utilities.js"]], function(y, N, _) {
var U = y.getDeferredAnimation, G = _.addEvent, V = _.destroyObjectProperties, F = _.fireEvent, B = _.isNumber, j = _.objectEach, w;
return function(x) {
function f() {
var R = this.stacking;
if (R) {
var k = R.stacks;
j(k, function(b, S) {
V(b), k[S] = null;
}), R && R.stackTotalGroup && R.stackTotalGroup.destroy();
}
}
function l() {
this.stacking || (this.stacking = new O(this));
}
var T = [];
x.compose = function(R) {
return T.indexOf(R) === -1 && (T.push(R), G(R, "init", l), G(R, "destroy", f)), R;
};
var O = function() {
function R(k) {
this.oldStacks = {}, this.stacks = {}, this.stacksTouched = 0, this.axis = k;
}
return R.prototype.buildStacks = function() {
var k = this.axis, b = k.series, S = k.options.reversedStacks, v = b.length, h;
if (!k.isXAxis) {
for (this.usePercentage = !1, h = v; h--; ) {
var c = b[S ? h : v - h - 1];
c.setStackedPoints(), c.setGroupedPoints();
}
for (h = 0; h < v; h++)
b[h].modifyStacks();
F(k, "afterBuildStacks");
}
}, R.prototype.cleanStacks = function() {
if (!this.axis.isXAxis) {
if (this.oldStacks)
var k = this.stacks = this.oldStacks;
j(k, function(b) {
j(b, function(S) {
S.cumulative = S.total;
});
});
}
}, R.prototype.resetStacks = function() {
var k = this, b = k.stacks;
k.axis.isXAxis || j(b, function(S) {
j(
S,
function(v, h) {
B(v.touched) && v.touched < k.stacksTouched ? (v.destroy(), delete S[h]) : (v.total = null, v.cumulative = null);
}
);
});
}, R.prototype.renderStackTotals = function() {
var k = this.axis, b = k.chart, S = b.renderer, v = this.stacks;
k = U(b, k.options.stackLabels && k.options.stackLabels.animation || !1);
var h = this.stackTotalGroup = this.stackTotalGroup || S.g("stack-labels").attr({ visibility: "visible", zIndex: 6, opacity: 0 }).add();
h.translate(b.plotLeft, b.plotTop), j(v, function(c) {
j(c, function(u) {
u.render(h);
});
}), h.animate(
{ opacity: 1 },
k
);
}, R;
}();
x.Additions = O;
}(w || (w = {})), w;
}), C(o, "Extensions/Stacking.js", [o["Core/Axis/Axis.js"], o["Core/Chart/Chart.js"], o["Core/FormatUtilities.js"], o["Core/Globals.js"], o["Core/Series/Series.js"], o["Core/Axis/StackingAxis.js"], o["Core/Utilities.js"]], function(y, N, _, U, G, V, F) {
var B = _.format, j = F.correctFloat, w = F.defined, x = F.destroyObjectProperties, f = F.isArray, l = F.isNumber, T = F.objectEach, O = F.pick, R = function() {
function k(b, S, v, h, c) {
var u = b.chart.inverted;
this.axis = b, this.isNegative = v, this.options = S = S || {}, this.x = h, this.total = null, this.points = {}, this.hasValidPoints = !1, this.stack = c, this.rightCliff = this.leftCliff = 0, this.alignOptions = { align: S.align || (u ? v ? "left" : "right" : "center"), verticalAlign: S.verticalAlign || (u ? "middle" : v ? "bottom" : "top"), y: S.y, x: S.x }, this.textAlign = S.textAlign || (u ? v ? "right" : "left" : "center");
}
return k.prototype.destroy = function() {
x(this, this.axis);
}, k.prototype.render = function(b) {
var S = this.axis.chart, v = this.options, h = v.format;
h = h ? B(h, this, S) : v.formatter.call(this), this.label ? this.label.attr({
text: h,
visibility: "hidden"
}) : (this.label = S.renderer.label(h, null, null, v.shape, null, null, v.useHTML, !1, "stack-labels"), h = { r: v.borderRadius || 0, text: h, rotation: v.rotation, padding: O(v.padding, 5), visibility: "hidden" }, S.styledMode || (h.fill = v.backgroundColor, h.stroke = v.borderColor, h["stroke-width"] = v.borderWidth, this.label.css(v.style)), this.label.attr(h), this.label.added || this.label.add(b)), this.label.labelrank = S.plotSizeY;
}, k.prototype.setOffset = function(b, S, v, h, c) {
var u = this.axis, i = u.chart;
h = u.translate(u.stacking.usePercentage ? 100 : h || this.total, 0, 0, 0, 1), v = u.translate(v || 0), v = w(h) && Math.abs(h - v), b = O(c, i.xAxis[0].translate(this.x)) + b, u = w(h) && this.getStackBox(i, this, b, h, S, v, u), S = this.label, v = this.isNegative, b = O(this.options.overflow, "justify") === "justify";
var p = this.textAlign;
S && u && (c = S.getBBox(), h = S.padding, p = p === "left" ? i.inverted ? -h : h : p === "right" ? c.width : i.inverted && p === "center" ? c.width / 2 : i.inverted ? v ? c.width + h : -h : c.width / 2, v = i.inverted ? c.height / 2 : v ? -h : c.height, this.alignOptions.x = O(this.options.x, 0), this.alignOptions.y = O(this.options.y, 0), u.x -= p, u.y -= v, S.align(this.alignOptions, null, u), i.isInsidePlot(S.alignAttr.x + p - this.alignOptions.x, S.alignAttr.y + v - this.alignOptions.y) ? S.show() : (S.alignAttr.y = -9999, b = !1), b && G.prototype.justifyDataLabel.call(this.axis, S, this.alignOptions, S.alignAttr, c, u), S.attr({ x: S.alignAttr.x, y: S.alignAttr.y }), O(!b && this.options.crop, !0) && ((i = l(S.x) && l(S.y) && i.isInsidePlot(S.x - h + S.width, S.y) && i.isInsidePlot(S.x + h, S.y)) || S.hide()));
}, k.prototype.getStackBox = function(b, S, v, h, c, u, i) {
var p = S.axis.reversed, a = b.inverted, t = i.height + i.pos - (a ? b.plotLeft : b.plotTop);
return S = S.isNegative && !p || !S.isNegative && p, { x: a ? S ? h - i.right : h - u + i.pos - b.plotLeft : v + b.xAxis[0].transB - b.plotLeft, y: a ? i.height - v - c : S ? t - h - u : t - h, width: a ? u : c, height: a ? c : u };
}, k;
}();
return N.prototype.getStacks = function() {
var k = this, b = k.inverted;
k.yAxis.forEach(function(S) {
S.stacking && S.stacking.stacks && S.hasVisibleSeries && (S.stacking.oldStacks = S.stacking.stacks);
}), k.series.forEach(function(S) {
var v = S.xAxis && S.xAxis.options || {};
!S.options.stacking || S.visible !== !0 && k.options.chart.ignoreHiddenSeries !== !1 || (S.stackKey = [S.type, O(S.options.stack, ""), b ? v.top : v.left, b ? v.height : v.width].join());
});
}, V.compose(y), G.prototype.setGroupedPoints = function() {
var k = this.yAxis.stacking;
this.options.centerInCategory && (this.is("column") || this.is("columnrange")) && !this.options.stacking && 1 < this.chart.series.length ? G.prototype.setStackedPoints.call(this, "group") : k && T(k.stacks, function(b, S) {
S.slice(-5) === "group" && (T(b, function(v) {
return v.destroy();
}), delete k.stacks[S]);
});
}, G.prototype.setStackedPoints = function(k) {
var b = k || this.options.stacking;
if (b && (this.visible === !0 || this.chart.options.chart.ignoreHiddenSeries === !1)) {
var S = this.processedXData, v = this.processedYData, h = [], c = v.length, u = this.options, i = u.threshold, p = O(u.startFromThreshold && i, 0);
u = u.stack, k = k ? this.type + "," + b : this.stackKey;
var a = "-" + k, t = this.negStacks, s = this.yAxis, n = s.stacking.stacks, P = s.stacking.oldStacks, D, I;
for (s.stacking.stacksTouched += 1, I = 0; I < c; I++) {
var W = S[I], E = v[I], X = this.getStackIndicator(
X,
W,
this.index
), g = X.key, m = (D = t && E < (p ? 0 : i)) ? a : k;
n[m] || (n[m] = {}), n[m][W] || (P[m] && P[m][W] ? (n[m][W] = P[m][W], n[m][W].total = null) : n[m][W] = new R(s, s.options.stackLabels, D, W, u)), m = n[m][W], E !== null ? (m.points[g] = m.points[this.index] = [O(m.cumulative, p)], w(m.cumulative) || (m.base = g), m.touched = s.stacking.stacksTouched, 0 < X.index && this.singleStacks === !1 && (m.points[g][0] = m.points[this.index + "," + W + ",0"][0])) : m.points[g] = m.points[this.index] = null, b === "percent" ? (D = D ? k : a, t && n[D] && n[D][W] ? (D = n[D][W], m.total = D.total = Math.max(D.total, m.total) + Math.abs(E) || 0) : m.total = j(m.total + (Math.abs(E) || 0))) : b === "group" ? (f(E) && (E = E[0]), E !== null && (m.total = (m.total || 0) + 1)) : m.total = j(m.total + (E || 0)), m.cumulative = b === "group" ? (m.total || 1) - 1 : O(m.cumulative, p) + (E || 0), E !== null && (m.points[g].push(m.cumulative), h[I] = m.cumulative, m.hasValidPoints = !0);
}
b === "percent" && (s.stacking.usePercentage = !0), b !== "group" && (this.stackedYData = h), s.stacking.oldStacks = {};
}
}, G.prototype.modifyStacks = function() {
var k = this, b = k.stackKey, S = k.yAxis.stacking.stacks, v = k.processedXData, h, c = k.options.stacking;
k[c + "Stacker"] && [b, "-" + b].forEach(function(u) {
for (var i = v.length, p, a; i--; )
p = v[i], h = k.getStackIndicator(h, p, k.index, u), (a = (p = S[u] && S[u][p]) && p.points[h.key]) && k[c + "Stacker"](a, p, i);
});
}, G.prototype.percentStacker = function(k, b, S) {
b = b.total ? 100 / b.total : 0, k[0] = j(k[0] * b), k[1] = j(k[1] * b), this.stackedYData[S] = k[1];
}, G.prototype.getStackIndicator = function(k, b, S, v) {
return !w(k) || k.x !== b || v && k.key !== v ? k = { x: b, index: 0, key: v } : k.index++, k.key = [S, b, k.index].join(), k;
}, U.StackItem = R, U.StackItem;
}), C(o, "Series/Line/LineSeries.js", [o["Core/Series/Series.js"], o["Core/Series/SeriesRegistry.js"], o["Core/Utilities.js"]], function(y, N, _) {
var U = this && this.__extends || function() {
var F = function(B, j) {
return F = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(w, x) {
w.__proto__ = x;
} || function(w, x) {
for (var f in x)
x.hasOwnProperty(f) && (w[f] = x[f]);
}, F(B, j);
};
return function(B, j) {
function w() {
this.constructor = B;
}
F(B, j), B.prototype = j === null ? Object.create(j) : (w.prototype = j.prototype, new w());
};
}(), G = _.defined, V = _.merge;
return _ = function(F) {
function B() {
var j = F !== null && F.apply(this, arguments) || this;
return j.data = void 0, j.options = void 0, j.points = void 0, j;
}
return U(B, F), B.prototype.drawGraph = function() {
var j = this, w = this.options, x = (this.gappedPath || this.getGraphPath).call(this), f = this.chart.styledMode, l = [["graph", "highcharts-graph"]];
f || l[0].push(w.lineColor || this.color || "#cccccc", w.dashStyle), l = j.getZonesGraphs(l), l.forEach(function(T, O) {
var R = T[0], k = j[R], b = k ? "animate" : "attr";
k ? (k.endX = j.preventGraphAnimation ? null : x.xMap, k.animate({ d: x })) : x.length && (j[R] = k = j.chart.renderer.path(x).addClass(T[1]).attr({ zIndex: 1 }).add(j.group)), k && !f && (R = { stroke: T[2], "stroke-width": w.lineWidth, fill: j.fillGraph && j.color || "none" }, T[3] ? R.dashstyle = T[3] : w.linecap !== "square" && (R["stroke-linecap"] = R["stroke-linejoin"] = "round"), k[b](R).shadow(2 > O && w.shadow)), k && (k.startX = x.xMap, k.isArea = x.isArea);
});
}, B.prototype.getGraphPath = function(j, w, x) {
var f = this, l = f.options, T = [], O = [], R, k = l.step;
j = j || f.points;
var b = j.reversed;
return b && j.reverse(), (k = { right: 1, center: 2 }[k] || k && 3) && b && (k = 4 - k), j = this.getValidPoints(j, !1, !(l.connectNulls && !w && !x)), j.forEach(function(S, v) {
var h = S.plotX, c = S.plotY, u = j[v - 1];
(S.leftCliff || u && u.rightCliff) && !x && (R = !0), S.isNull && !G(w) && 0 < v ? R = !l.connectNulls : S.isNull && !w ? R = !0 : (v === 0 || R ? v = [["M", S.plotX, S.plotY]] : f.getPointSpline ? v = [f.getPointSpline(j, S, v)] : k ? (v = k === 1 ? [["L", u.plotX, c]] : k === 2 ? [["L", (u.plotX + h) / 2, u.plotY], ["L", (u.plotX + h) / 2, c]] : [["L", h, u.plotY]], v.push(["L", h, c])) : v = [["L", h, c]], O.push(S.x), k && (O.push(S.x), k === 2 && O.push(S.x)), T.push.apply(T, v), R = !1);
}), T.xMap = O, f.graphPath = T;
}, B.prototype.getZonesGraphs = function(j) {
return this.zones.forEach(function(w, x) {
x = ["zone-graph-" + x, "highcharts-graph highcharts-zone-graph-" + x + " " + (w.className || "")], this.chart.styledMode || x.push(w.color || this.color, w.dashStyle || this.options.dashStyle), j.push(x);
}, this), j;
}, B.defaultOptions = V(y.defaultOptions, {}), B;
}(y), N.registerSeriesType("line", _), _;
}), C(o, "Series/Area/AreaSeries.js", [
o["Core/Color/Color.js"],
o["Core/Legend/LegendSymbol.js"],
o["Core/Series/SeriesRegistry.js"],
o["Core/Utilities.js"]
], function(y, N, _, U) {
var G = this && this.__extends || function() {
var x = function(f, l) {
return x = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(T, O) {
T.__proto__ = O;
} || function(T, O) {
for (var R in O)
O.hasOwnProperty(R) && (T[R] = O[R]);
}, x(f, l);
};
return function(f, l) {
function T() {
this.constructor = f;
}
x(f, l), f.prototype = l === null ? Object.create(l) : (T.prototype = l.prototype, new T());
};
}(), V = y.parse, F = _.seriesTypes.line;
y = U.extend;
var B = U.merge, j = U.objectEach, w = U.pick;
return U = function(x) {
function f() {
var l = x !== null && x.apply(this, arguments) || this;
return l.data = void 0, l.options = void 0, l.points = void 0, l;
}
return G(f, x), f.prototype.drawGraph = function() {
this.areaPath = [], x.prototype.drawGraph.apply(this);
var l = this, T = this.areaPath, O = this.options, R = [["area", "highcharts-area", this.color, O.fillColor]];
this.zones.forEach(function(k, b) {
R.push(["zone-area-" + b, "highcharts-area highcharts-zone-area-" + b + " " + k.className, k.color || l.color, k.fillColor || O.fillColor]);
}), R.forEach(function(k) {
var b = k[0], S = l[b], v = S ? "animate" : "attr", h = {};
S ? (S.endX = l.preventGraphAnimation ? null : T.xMap, S.animate({ d: T })) : (h.zIndex = 0, S = l[b] = l.chart.renderer.path(T).addClass(k[1]).add(l.group), S.isArea = !0), l.chart.styledMode || (h.fill = w(k[3], V(k[2]).setOpacity(w(O.fillOpacity, 0.75)).get())), S[v](h), S.startX = T.xMap, S.shiftUnit = O.step ? 2 : 1;
});
}, f.prototype.getGraphPath = function(l) {
var T = F.prototype.getGraphPath, O = this.options, R = O.stacking, k = this.yAxis, b, S = [], v = [], h = this.index, c = k.stacking.stacks[this.stackKey], u = O.threshold, i = Math.round(k.getThreshold(O.threshold));
O = w(O.connectNulls, R === "percent");
var p = function(n, P, D) {
var I = l[n];
n = R && c[I.x].points[h];
var W = I[D + "Null"] || 0;
if (D = I[D + "Cliff"] || 0, I = !0, D || W) {
var E = (W ? n[0] : n[1]) + D, X = n[0] + D;
I = !!W;
} else
!R && l[P] && l[P].isNull && (E = X = u);
typeof E < "u" && (v.push({ plotX: t, plotY: E === null ? i : k.getThreshold(E), isNull: I, isCliff: !0 }), S.push({ plotX: t, plotY: X === null ? i : k.getThreshold(X), doCurve: !1 }));
};
for (l = l || this.points, R && (l = this.getStackPoints(l)), b = 0; b < l.length; b++) {
R || (l[b].leftCliff = l[b].rightCliff = l[b].leftNull = l[b].rightNull = void 0);
var a = l[b].isNull, t = w(l[b].rectPlotX, l[b].plotX), s = R ? w(l[b].yBottom, i) : i;
(!a || O) && (O || p(b, b - 1, "left"), a && !R && O || (v.push(l[b]), S.push({ x: b, plotX: t, plotY: s })), O || p(b, b + 1, "right"));
}
return b = T.call(this, v, !0, !0), S.reversed = !0, a = T.call(this, S, !0, !0), (s = a[0]) && s[0] === "M" && (a[0] = ["L", s[1], s[2]]), a = b.concat(a), a.length && a.push(["Z"]), T = T.call(this, v, !1, O), a.xMap = b.xMap, this.areaPath = a, T;
}, f.prototype.getStackPoints = function(l) {
var T = this, O = [], R = [], k = this.xAxis, b = this.yAxis, S = b.stacking.stacks[this.stackKey], v = {}, h = b.series, c = h.length, u = b.options.reversedStacks ? 1 : -1, i = h.indexOf(T);
if (l = l || this.points, this.options.stacking) {
for (var p = 0; p < l.length; p++)
l[p].leftNull = l[p].rightNull = void 0, v[l[p].x] = l[p];
j(S, function(t, s) {
t.total !== null && R.push(s);
}), R.sort(function(t, s) {
return t - s;
});
var a = h.map(function(t) {
return t.visible;
});
R.forEach(function(t, s) {
var n = 0, P, D;
if (v[t] && !v[t].isNull)
O.push(v[t]), [-1, 1].forEach(function(W) {
var E = W === 1 ? "rightNull" : "leftNull", X = 0, g = S[R[s + W]];
if (g)
for (var m = i; 0 <= m && m < c; ) {
var L = h[m].index;
P = g.points[L], P || (L === T.index ? v[t][E] = !0 : a[m] && (D = S[t].points[L]) && (X -= D[1] - D[0])), m += u;
}
v[t][W === 1 ? "rightCliff" : "leftCliff"] = X;
});
else {
for (var I = i; 0 <= I && I < c; ) {
if (P = S[t].points[h[I].index]) {
n = P[1];
break;
}
I += u;
}
n = w(n, 0), n = b.translate(n, 0, 1, 0, 1), O.push({ isNull: !0, plotX: k.translate(t, 0, 0, 0, 1), x: t, plotY: n, yBottom: n });
}
});
}
return O;
}, f.defaultOptions = B(F.defaultOptions, { threshold: 0 }), f;
}(F), y(U.prototype, {
singleStacks: !1,
drawLegendSymbol: N.drawRectangle
}), _.registerSeriesType("area", U), U;
}), C(o, "Series/Spline/SplineSeries.js", [o["Core/Series/SeriesRegistry.js"], o["Core/Utilities.js"]], function(y, N) {
var _ = this && this.__extends || function() {
var F = function(B, j) {
return F = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(w, x) {
w.__proto__ = x;
} || function(w, x) {
for (var f in x)
x.hasOwnProperty(f) && (w[f] = x[f]);
}, F(B, j);
};
return function(B, j) {
function w() {
this.constructor = B;
}
F(B, j), B.prototype = j === null ? Object.create(j) : (w.prototype = j.prototype, new w());
};
}(), U = y.seriesTypes.line, G = N.merge, V = N.pick;
return N = function(F) {
function B() {
var j = F !== null && F.apply(this, arguments) || this;
return j.data = void 0, j.options = void 0, j.points = void 0, j;
}
return _(B, F), B.prototype.getPointSpline = function(j, w, x) {
var f = w.plotX || 0, l = w.plotY || 0, T = j[x - 1];
if (x = j[x + 1], T && !T.isNull && T.doCurve !== !1 && !w.isCliff && x && !x.isNull && x.doCurve !== !1 && !w.isCliff) {
j = T.plotY || 0;
var O = x.plotX || 0;
x = x.plotY || 0;
var R = 0, k = (1.5 * f + (T.plotX || 0)) / 2.5, b = (1.5 * l + j) / 2.5;
O = (1.5 * f + O) / 2.5;
var S = (1.5 * l + x) / 2.5;
O !== k && (R = (S - b) * (O - f) / (O - k) + l - S), b += R, S += R, b > j && b > l ? (b = Math.max(j, l), S = 2 * l - b) : b < j && b < l && (b = Math.min(j, l), S = 2 * l - b), S > x && S > l ? (S = Math.max(x, l), b = 2 * l - S) : S < x && S < l && (S = Math.min(x, l), b = 2 * l - S), w.rightContX = O, w.rightContY = S;
}
return w = ["C", V(T.rightContX, T.plotX, 0), V(T.rightContY, T.plotY, 0), V(k, f, 0), V(b, l, 0), f, l], T.rightContX = T.rightContY = void 0, w;
}, B.defaultOptions = G(U.defaultOptions), B;
}(U), y.registerSeriesType("spline", N), N;
}), C(
o,
"Series/AreaSpline/AreaSplineSeries.js",
[o["Series/Area/AreaSeries.js"], o["Series/Spline/SplineSeries.js"], o["Core/Legend/LegendSymbol.js"], o["Core/Series/SeriesRegistry.js"], o["Core/Utilities.js"]],
function(y, N, _, U, G) {
var V = this && this.__extends || function() {
var w = function(x, f) {
return w = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(l, T) {
l.__proto__ = T;
} || function(l, T) {
for (var O in T)
T.hasOwnProperty(O) && (l[O] = T[O]);
}, w(x, f);
};
return function(x, f) {
function l() {
this.constructor = x;
}
w(x, f), x.prototype = f === null ? Object.create(f) : (l.prototype = f.prototype, new l());
};
}(), F = y.prototype, B = G.extend, j = G.merge;
return G = function(w) {
function x() {
var f = w !== null && w.apply(this, arguments) || this;
return f.data = void 0, f.points = void 0, f.options = void 0, f;
}
return V(x, w), x.defaultOptions = j(N.defaultOptions, y.defaultOptions), x;
}(N), B(G.prototype, { getGraphPath: F.getGraphPath, getStackPoints: F.getStackPoints, drawGraph: F.drawGraph, drawLegendSymbol: _.drawRectangle }), U.registerSeriesType("areaspline", G), G;
}
), C(o, "Series/Column/ColumnSeries.js", [
o["Core/Animation/AnimationUtilities.js"],
o["Core/Color/Color.js"],
o["Core/Globals.js"],
o["Core/Legend/LegendSymbol.js"],
o["Core/Series/Series.js"],
o["Core/Series/SeriesRegistry.js"],
o["Core/Utilities.js"]
], function(y, N, _, U, G, V, F) {
var B = this && this.__extends || function() {
var c = function(u, i) {
return c = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(p, a) {
p.__proto__ = a;
} || function(p, a) {
for (var t in a)
a.hasOwnProperty(t) && (p[t] = a[t]);
}, c(u, i);
};
return function(u, i) {
function p() {
this.constructor = u;
}
c(u, i), u.prototype = i === null ? Object.create(i) : (p.prototype = i.prototype, new p());
};
}(), j = y.animObject, w = N.parse, x = _.hasTouch;
y = _.noop;
var f = F.clamp, l = F.css, T = F.defined, O = F.extend, R = F.fireEvent, k = F.isArray, b = F.isNumber, S = F.merge, v = F.pick, h = F.objectEach;
return F = function(c) {
function u() {
var i = c !== null && c.apply(this, arguments) || this;
return i.borderWidth = void 0, i.data = void 0, i.group = void 0, i.options = void 0, i.points = void 0, i;
}
return B(u, c), u.prototype.animate = function(i) {
var p = this, a = this.yAxis, t = p.options, s = this.chart.inverted, n = {}, P = s ? "translateX" : "translateY";
if (i)
n.scaleY = 1e-3, i = f(a.toPixels(t.threshold), a.pos, a.pos + a.len), s ? n.translateX = i - a.len : n.translateY = i, p.clipBox && p.setClip(), p.group.attr(n);
else {
var D = Number(p.group.attr(P));
p.group.animate({ scaleY: 1 }, O(j(p.options.animation), { step: function(I, W) {
p.group && (n[P] = D + W.pos * (a.pos - D), p.group.attr(n));
} }));
}
}, u.prototype.init = function(i, p) {
c.prototype.init.apply(this, arguments);
var a = this;
i = a.chart, i.hasRendered && i.series.forEach(function(t) {
t.type === a.type && (t.isDirty = !0);
});
}, u.prototype.getColumnMetrics = function() {
var i = this, p = i.options, a = i.xAxis, t = i.yAxis, s = a.options.reversedStacks;
s = a.reversed && !s || !a.reversed && s;
var n = {}, P, D = 0;
p.grouping === !1 ? D = 1 : i.chart.series.forEach(function(X) {
var g = X.yAxis, m = X.options;
if (X.type === i.type && (X.visible || !i.chart.options.chart.ignoreHiddenSeries) && t.len === g.len && t.pos === g.pos) {
if (m.stacking && m.stacking !== "group") {
P = X.stackKey, typeof n[P] > "u" && (n[P] = D++);
var L = n[P];
} else
m.grouping !== !1 && (L = D++);
X.columnIndex = L;
}
});
var I = Math.min(Math.abs(a.transA) * (a.ordinal && a.ordinal.slope || p.pointRange || a.closestPointRange || a.tickInterval || 1), a.len), W = I * p.groupPadding, E = (I - 2 * W) / (D || 1);
return p = Math.min(p.maxPointWidth || a.len, v(p.pointWidth, E * (1 - 2 * p.pointPadding))), i.columnMetrics = { width: p, offset: (E - p) / 2 + (W + ((i.columnIndex || 0) + (s ? 1 : 0)) * E - I / 2) * (s ? -1 : 1), paddedWidth: E, columnCount: D }, i.columnMetrics;
}, u.prototype.crispCol = function(i, p, a, t) {
var s = this.chart, n = this.borderWidth, P = -(n % 2 ? 0.5 : 0);
return n = n % 2 ? 0.5 : 1, s.inverted && s.renderer.isVML && (n += 1), this.options.crisp && (a = Math.round(i + a) + P, i = Math.round(i) + P, a -= i), t = Math.round(p + t) + n, P = 0.5 >= Math.abs(p) && 0.5 < t, p = Math.round(p) + n, t -= p, P && t && (--p, t += 1), { x: i, y: p, width: a, height: t };
}, u.prototype.adjustForMissingColumns = function(i, p, a, t) {
var s = this, n = this.options.stacking;
if (!a.isNull && 1 < t.columnCount) {
var P = 0, D = 0;
h(this.yAxis.stacking && this.yAxis.stacking.stacks, function(I) {
if (typeof a.x == "number" && (I = I[a.x.toString()])) {
var W = I.points[s.index], E = I.total;
n ? (W && (P = D), I.hasValidPoints && D++) : k(W) && (P = W[1], D = E || 0);
}
}), i = (a.plotX || 0) + ((D - 1) * t.paddedWidth + p) / 2 - p - P * t.paddedWidth;
}
return i;
}, u.prototype.translate = function() {
var i = this, p = i.chart, a = i.options, t = i.dense = 2 > i.closestPointRange * i.xAxis.transA;
t = i.borderWidth = v(a.borderWidth, t ? 0 : 1);
var s = i.xAxis, n = i.yAxis, P = a.threshold, D = i.translatedThreshold = n.getThreshold(P), I = v(a.minPointLength, 5), W = i.getColumnMetrics(), E = W.width, X = i.pointXOffset = W.offset, g = i.dataMin, m = i.dataMax, L = i.barW = Math.max(E, 1 + 2 * t);
p.inverted && (D -= 0.5), a.pointPadding && (L = Math.ceil(L)), G.prototype.translate.apply(i), i.points.forEach(function(z) {
var $ = v(z.yBottom, D), Q = 999 + Math.abs($), A = z.plotX || 0;
Q = f(z.plotY, -Q, n.len + Q);
var H = Math.min(Q, $), Y = Math.max(Q, $) - H, Z = E, q = A + X, it = L;
I && Math.abs(Y) < I && (Y = I, A = !n.reversed && !z.negative || n.reversed && z.negative, b(P) && b(m) && z.y === P && m <= P && (n.min || 0) < P && (g !== m || (n.max || 0) <= P) && (A = !A), H = Math.abs(H - D) > I ? $ - I : D - (A ? I : 0)), T(z.options.pointWidth) && (Z = it = Math.ceil(z.options.pointWidth), q -= Math.round((Z - E) / 2)), a.centerInCategory && (q = i.adjustForMissingColumns(q, Z, z, W)), z.barX = q, z.pointWidth = Z, z.tooltipPos = p.inverted ? [f(n.len + n.pos - p.plotLeft - Q, n.pos - p.plotLeft, n.len + n.pos - p.plotLeft), s.len + s.pos - p.plotTop - q - it / 2, Y] : [s.left - p.plotLeft + q + it / 2, f(Q + n.pos - p.plotTop, n.pos - p.plotTop, n.len + n.pos - p.plotTop), Y], z.shapeType = i.pointClass.prototype.shapeType || "rect", z.shapeArgs = i.crispCol.apply(i, z.isNull ? [q, D, it, 0] : [q, H, it, Y]);
});
}, u.prototype.drawGraph = function() {
this.group[this.dense ? "addClass" : "removeClass"]("highcharts-dense-data");
}, u.prototype.pointAttribs = function(i, p) {
var a = this.options, t = this.pointAttrToOptions || {}, s = t.stroke || "borderColor", n = t["stroke-width"] || "borderWidth", P = i && i.color || this.color, D = i && i[s] || a[s] || P;
t = i && i.options.dashStyle || a.dashStyle;
var I = i && i[n] || a[n] || this[n] || 0, W = v(i && i.opacity, a.opacity, 1);
if (i && this.zones.length) {
var E = i.getZone();
P = i.options.color || E && (E.color || i.nonZonedColor) || this.color, E && (D = E.borderColor || D, t = E.dashStyle || t, I = E.borderWidth || I);
}
return p && i && (i = S(a.states[p], i.options.states && i.options.states[p] || {}), p = i.brightness, P = i.color || typeof p < "u" && w(P).brighten(i.brightness).get() || P, D = i[s] || D, I = i[n] || I, t = i.dashStyle || t, W = v(i.opacity, W)), s = { fill: P, stroke: D, "stroke-width": I, opacity: W }, t && (s.dashstyle = t), s;
}, u.prototype.drawPoints = function() {
var i = this, p = this.chart, a = i.options, t = p.renderer, s = a.animationLimit || 250, n;
i.points.forEach(function(P) {
var D = P.graphic, I = !!D, W = D && p.pointCount < s ? "animate" : "attr";
b(P.plotY) && P.y !== null ? (n = P.shapeArgs, D && P.hasNewShapeType() && (D = D.destroy()), i.enabledDataSorting && (P.startXPos = i.xAxis.reversed ? -(n && n.width || 0) : i.xAxis.width), D || (P.graphic = D = t[P.shapeType](n).add(P.group || i.group)) && i.enabledDataSorting && p.hasRendered && p.pointCount < s && (D.attr({ x: P.startXPos }), I = !0, W = "animate"), D && I && D[W](S(n)), a.borderRadius && D[W]({ r: a.borderRadius }), p.styledMode || D[W](i.pointAttribs(P, P.selected && "select")).shadow(P.allowShadow !== !1 && a.shadow, null, a.stacking && !a.borderRadius), D && (D.addClass(P.getClassName(), !0), D.attr({ visibility: P.visible ? "inherit" : "hidden" }))) : D && (P.graphic = D.destroy());
});
}, u.prototype.drawTracker = function() {
var i = this, p = i.chart, a = p.pointer, t = function(n) {
var P = a.getPointFromEvent(n);
typeof P < "u" && (a.isDirectTouch = !0, P.onMouseOver(n));
}, s;
i.points.forEach(function(n) {
s = k(n.dataLabels) ? n.dataLabels : n.dataLabel ? [n.dataLabel] : [], n.graphic && (n.graphic.element.point = n), s.forEach(function(P) {
P.div ? P.div.point = n : P.element.point = n;
});
}), i._hasTracking || (i.trackerGroups.forEach(function(n) {
i[n] && (i[n].addClass("highcharts-tracker").on("mouseover", t).on("mouseout", function(P) {
a.onTrackerMouseOut(P);
}), x && i[n].on(
"touchstart",
t
), !p.styledMode && i.options.cursor && i[n].css(l).css({ cursor: i.options.cursor }));
}), i._hasTracking = !0), R(this, "afterDrawTracker");
}, u.prototype.remove = function() {
var i = this, p = i.chart;
p.hasRendered && p.series.forEach(function(a) {
a.type === i.type && (a.isDirty = !0);
}), G.prototype.remove.apply(i, arguments);
}, u.defaultOptions = S(G.defaultOptions, { borderRadius: 0, centerInCategory: !1, groupPadding: 0.2, marker: null, pointPadding: 0.1, minPointLength: 0, cropThreshold: 50, pointRange: null, states: {
hover: { halo: !1, brightness: 0.1 },
select: { color: "#cccccc", borderColor: "#000000" }
}, dataLabels: { align: void 0, verticalAlign: void 0, y: void 0 }, startFromThreshold: !0, stickyTracking: !1, tooltip: { distance: 6 }, threshold: 0, borderColor: "#ffffff" }), u;
}(G), O(F.prototype, { cropShoulder: 0, directTouch: !0, drawLegendSymbol: U.drawRectangle, getSymbol: y, negStacks: !0, trackerGroups: ["group", "dataLabelsGroup"] }), V.registerSeriesType("column", F), F;
}), C(o, "Core/Series/DataLabel.js", [
o["Core/Animation/AnimationUtilities.js"],
o["Core/FormatUtilities.js"],
o["Core/Utilities.js"]
], function(y, N, _) {
var U = y.getDeferredAnimation, G = N.format, V = _.defined, F = _.extend, B = _.fireEvent, j = _.isArray, w = _.merge, x = _.objectEach, f = _.pick, l = _.splat, T;
return function(O) {
function R(u, i, p, a, t) {
var s = this, n = this.chart, P = this.isCartesian && n.inverted, D = this.enabledDataSorting, I = f(u.dlBox && u.dlBox.centerX, u.plotX, -9999), W = f(u.plotY, -9999), E = i.getBBox(), X = p.rotation, g = p.align, m = n.isInsidePlot(I, Math.round(W), { inverted: P, paneCoordinates: !0, series: s }), L = function(A) {
D && s.xAxis && !z && s.setDataLabelStartPos(
u,
i,
t,
m,
A
);
}, z = f(p.overflow, D ? "none" : "justify") === "justify", $ = this.visible && u.visible !== !1 && (u.series.forceDL || D && !z || m || f(p.inside, !!this.options.stacking) && a && n.isInsidePlot(I, P ? a.x + 1 : a.y + a.height - 1, { inverted: P, paneCoordinates: !0, series: s }));
if ($) {
var Q = n.renderer.fontMetrics(n.styledMode ? void 0 : p.style.fontSize, i).b;
a = F({ x: P ? this.yAxis.len - W : I, y: Math.round(P ? this.xAxis.len - I : W), width: 0, height: 0 }, a), F(p, { width: E.width, height: E.height }), X ? (z = !1, I = n.renderer.rotCorr(Q, X), I = { x: a.x + (p.x || 0) + a.width / 2 + I.x, y: a.y + (p.y || 0) + { top: 0, middle: 0.5, bottom: 1 }[p.verticalAlign] * a.height }, L(I), i[t ? "attr" : "animate"](I).attr({ align: g }), L = (X + 720) % 360, L = 180 < L && 360 > L, g === "left" ? I.y -= L ? E.height : 0 : g === "center" ? (I.x -= E.width / 2, I.y -= E.height / 2) : g === "right" && (I.x -= E.width, I.y -= L ? 0 : E.height), i.placed = !0, i.alignAttr = I) : (L(a), i.align(p, void 0, a), I = i.alignAttr), z && 0 <= a.height ? this.justifyDataLabel(i, p, I, E, a, t) : f(p.crop, !0) && ($ = n.isInsidePlot(I.x, I.y, { paneCoordinates: !0, series: s }) && n.isInsidePlot(I.x + E.width, I.y + E.height, {
paneCoordinates: !0,
series: s
})), p.shape && !X && i[t ? "attr" : "animate"]({ anchorX: P ? n.plotWidth - u.plotY : u.plotX, anchorY: P ? n.plotHeight - u.plotX : u.plotY });
}
t && D && (i.placed = !1), $ || D && !z || (i.hide(!0), i.placed = !1);
}
function k(u, i) {
var p = i.filter;
return p ? (i = p.operator, u = u[p.property], p = p.value, i === ">" && u > p || i === "<" && u < p || i === ">=" && u >= p || i === "<=" && u <= p || i === "==" && u == p || i === "===" && u === p) : !0;
}
function b() {
var u = this, i = u.chart, p = u.options, a = u.points, t = u.hasRendered || 0, s = i.renderer, n = p.dataLabels, P, D = n.animation;
if (D = n.defer ? U(
i,
D,
u
) : { defer: 0, duration: 0 }, n = v(v(i.options.plotOptions && i.options.plotOptions.series && i.options.plotOptions.series.dataLabels, i.options.plotOptions && i.options.plotOptions[u.type] && i.options.plotOptions[u.type].dataLabels), n), B(this, "drawDataLabels"), j(n) || n.enabled || u._hasPointLabels) {
var I = u.plotGroup("dataLabelsGroup", "data-labels", t ? "inherit" : "hidden", n.zIndex || 6);
I.attr({ opacity: +t }), !t && (t = u.dataLabelsGroup) && (u.visible && I.show(!0), t[p.animation ? "animate" : "attr"]({ opacity: 1 }, D)), a.forEach(function(W) {
P = l(v(n, W.dlOptions || W.options && W.options.dataLabels)), P.forEach(function(E, X) {
var g = E.enabled && (!W.isNull || W.dataLabelOnNull) && k(W, E), m = W.connectors ? W.connectors[X] : W.connector, L = W.dataLabels ? W.dataLabels[X] : W.dataLabel, z = f(E.distance, W.labelDistance), $ = !L;
if (g) {
var Q = W.getLabelConfig(), A = f(E[W.formatPrefix + "Format"], E.format);
Q = V(A) ? G(A, Q, i) : (E[W.formatPrefix + "Formatter"] || E.formatter).call(Q, E), A = E.style;
var H = E.rotation;
i.styledMode || (A.color = f(E.color, A.color, u.color, "#000000"), A.color === "contrast" ? (W.contrastColor = s.getContrast(W.color || u.color), A.color = !V(z) && E.inside || 0 > z || p.stacking ? W.contrastColor : "#000000") : delete W.contrastColor, p.cursor && (A.cursor = p.cursor));
var Y = { r: E.borderRadius || 0, rotation: H, padding: E.padding, zIndex: 1 };
i.styledMode || (Y.fill = E.backgroundColor, Y.stroke = E.borderColor, Y["stroke-width"] = E.borderWidth), x(Y, function(Z, q) {
typeof Z > "u" && delete Y[q];
});
}
!L || g && V(Q) && !!L.div == !!E.useHTML || (W.dataLabel = L = W.dataLabel && W.dataLabel.destroy(), W.dataLabels && (W.dataLabels.length === 1 ? delete W.dataLabels : delete W.dataLabels[X]), X || delete W.dataLabel, m && (W.connector = W.connector.destroy(), W.connectors && (W.connectors.length === 1 ? delete W.connectors : delete W.connectors[X]))), g && V(Q) && (L ? Y.text = Q : (W.dataLabels = W.dataLabels || [], L = W.dataLabels[X] = H ? s.text(Q, 0, -9999, E.useHTML).addClass("highcharts-data-label") : s.label(Q, 0, -9999, E.shape, null, null, E.useHTML, null, "data-label"), X || (W.dataLabel = L), L.addClass(" highcharts-data-label-color-" + W.colorIndex + " " + (E.className || "") + (E.useHTML ? " highcharts-tracker" : ""))), L.options = E, L.attr(Y), i.styledMode || L.css(A).shadow(E.shadow), L.added || L.add(I), E.textPath && !E.useHTML && (L.setTextPath(W.getDataLabelPath && W.getDataLabelPath(L) || W.graphic, E.textPath), W.dataLabelPath && !E.textPath.enabled && (W.dataLabelPath = W.dataLabelPath.destroy())), u.alignDataLabel(W, L, E, null, $));
});
});
}
B(this, "afterDrawDataLabels");
}
function S(u, i, p, a, t, s) {
var n = this.chart, P = i.align, D = i.verticalAlign, I = u.box ? 0 : u.padding || 0, W = i.x;
W = W === void 0 ? 0 : W;
var E = i.y;
E = E === void 0 ? 0 : E;
var X = (p.x || 0) + I;
if (0 > X) {
P === "right" && 0 <= W ? (i.align = "left", i.inside = !0) : W -= X;
var g = !0;
}
return X = (p.x || 0) + a.width - I, X > n.plotWidth && (P === "left" && 0 >= W ? (i.align = "right", i.inside = !0) : W += n.plotWidth - X, g = !0), X = p.y + I, 0 > X && (D === "bottom" && 0 <= E ? (i.verticalAlign = "top", i.inside = !0) : E -= X, g = !0), X = (p.y || 0) + a.height - I, X > n.plotHeight && (D === "top" && 0 >= E ? (i.verticalAlign = "bottom", i.inside = !0) : E += n.plotHeight - X, g = !0), g && (i.x = W, i.y = E, u.placed = !s, u.align(i, void 0, t)), g;
}
function v(u, i) {
var p = [], a;
if (j(u) && !j(i))
p = u.map(function(t) {
return w(t, i);
});
else if (j(i) && !j(u))
p = i.map(function(t) {
return w(u, t);
});
else if (j(u) || j(i))
for (a = Math.max(u.length, i.length); a--; )
p[a] = w(u[a], i[a]);
else
p = w(u, i);
return p;
}
function h(u, i, p, a, t) {
var s = this.chart, n = s.inverted, P = this.xAxis, D = P.reversed, I = n ? i.height / 2 : i.width / 2;
u = (u = u.pointWidth) ? u / 2 : 0, i.startXPos = n ? t.x : D ? -I - u : P.width - I + u, i.startYPos = n ? D ? this.yAxis.height - I + u : -I - u : t.y, a ? i.visibility === "hidden" && (i.show(), i.attr({ opacity: 0 }).animate({ opacity: 1 })) : i.attr({ opacity: 1 }).animate(
{ opacity: 0 },
void 0,
i.hide
), s.hasRendered && (p && i.attr({ x: i.startXPos, y: i.startYPos }), i.placed = !0);
}
var c = [];
O.compose = function(u) {
if (c.indexOf(u) === -1) {
var i = u.prototype;
c.push(u), i.alignDataLabel = R, i.drawDataLabels = b, i.justifyDataLabel = S, i.setDataLabelStartPos = h;
}
};
}(T || (T = {})), T;
}), C(o, "Series/Column/ColumnDataLabel.js", [o["Core/Series/DataLabel.js"], o["Core/Series/SeriesRegistry.js"], o["Core/Utilities.js"]], function(y, N, _) {
var U = N.series, G = _.merge, V = _.pick, F;
return function(B) {
function j(x, f, l, T, O) {
var R = this.chart.inverted, k = x.series, b = (k.xAxis ? k.xAxis.len : this.chart.plotSizeX) || 0;
k = (k.yAxis ? k.yAxis.len : this.chart.plotSizeY) || 0;
var S = x.dlBox || x.shapeArgs, v = V(x.below, x.plotY > V(this.translatedThreshold, k)), h = V(l.inside, !!this.options.stacking);
S && (T = G(S), 0 > T.y && (T.height += T.y, T.y = 0), S = T.y + T.height - k, 0 < S && S < T.height && (T.height -= S), R && (T = { x: k - T.y - T.height, y: b - T.x - T.width, width: T.height, height: T.width }), h || (R ? (T.x += v ? 0 : T.width, T.width = 0) : (T.y += v ? T.height : 0, T.height = 0))), l.align = V(l.align, !R || h ? "center" : v ? "right" : "left"), l.verticalAlign = V(l.verticalAlign, R || h ? "middle" : v ? "top" : "bottom"), U.prototype.alignDataLabel.call(this, x, f, l, T, O), l.inside && x.contrastColor && f.css({ color: x.contrastColor });
}
var w = [];
B.compose = function(x) {
y.compose(U), w.indexOf(x) === -1 && (w.push(x), x.prototype.alignDataLabel = j);
};
}(F || (F = {})), F;
}), C(o, "Series/Bar/BarSeries.js", [o["Series/Column/ColumnSeries.js"], o["Core/Series/SeriesRegistry.js"], o["Core/Utilities.js"]], function(y, N, _) {
var U = this && this.__extends || function() {
var F = function(B, j) {
return F = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(w, x) {
w.__proto__ = x;
} || function(w, x) {
for (var f in x)
x.hasOwnProperty(f) && (w[f] = x[f]);
}, F(B, j);
};
return function(B, j) {
function w() {
this.constructor = B;
}
F(B, j), B.prototype = j === null ? Object.create(j) : (w.prototype = j.prototype, new w());
};
}(), G = _.extend, V = _.merge;
return _ = function(F) {
function B() {
var j = F !== null && F.apply(this, arguments) || this;
return j.data = void 0, j.options = void 0, j.points = void 0, j;
}
return U(B, F), B.defaultOptions = V(
y.defaultOptions,
{}
), B;
}(y), G(_.prototype, { inverted: !0 }), N.registerSeriesType("bar", _), _;
}), C(o, "Series/Scatter/ScatterSeries.js", [o["Series/Column/ColumnSeries.js"], o["Series/Line/LineSeries.js"], o["Core/Series/SeriesRegistry.js"], o["Core/Utilities.js"]], function(y, N, _, U) {
var G = this && this.__extends || function() {
var j = function(w, x) {
return j = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(f, l) {
f.__proto__ = l;
} || function(f, l) {
for (var T in l)
l.hasOwnProperty(T) && (f[T] = l[T]);
}, j(w, x);
};
return function(w, x) {
function f() {
this.constructor = w;
}
j(w, x), w.prototype = x === null ? Object.create(x) : (f.prototype = x.prototype, new f());
};
}(), V = U.addEvent, F = U.extend, B = U.merge;
return U = function(j) {
function w() {
var x = j !== null && j.apply(this, arguments) || this;
return x.data = void 0, x.options = void 0, x.points = void 0, x;
}
return G(w, j), w.prototype.applyJitter = function() {
var x = this, f = this.options.jitter, l = this.points.length;
f && this.points.forEach(function(T, O) {
["x", "y"].forEach(function(R, k) {
var b = "plot" + R.toUpperCase();
if (f[R] && !T.isNull) {
var S = x[R + "Axis"], v = f[R] * S.transA;
if (S && !S.isLog) {
var h = Math.max(0, T[b] - v);
S = Math.min(S.len, T[b] + v), k = 1e4 * Math.sin(O + k * l), T[b] = h + (S - h) * (k - Math.floor(k)), R === "x" && (T.clientX = T.plotX);
}
}
});
});
}, w.prototype.drawGraph = function() {
this.options.lineWidth ? j.prototype.drawGraph.call(this) : this.graph && (this.graph = this.graph.destroy());
}, w.defaultOptions = B(N.defaultOptions, { lineWidth: 0, findNearestPointBy: "xy", jitter: { x: 0, y: 0 }, marker: { enabled: !0 }, tooltip: {
headerFormat: '● {series.name}
',
pointFormat: "x: {point.x}
y: {point.y}
"
} }), w;
}(N), F(U.prototype, { drawTracker: y.prototype.drawTracker, sorted: !1, requireSorting: !1, noSharedTooltip: !0, trackerGroups: ["group", "markerGroup", "dataLabelsGroup"], takeOrdinalPosition: !1 }), V(U, "afterTranslate", function() {
this.applyJitter();
}), _.registerSeriesType("scatter", U), U;
}), C(o, "Series/CenteredUtilities.js", [o["Core/Globals.js"], o["Core/Series/Series.js"], o["Core/Utilities.js"]], function(y, N, _) {
var U = y.deg2rad, G = _.isNumber, V = _.pick, F = _.relativeLength, B;
return function(j) {
j.getCenter = function() {
var w = this.options, x = this.chart, f = 2 * (w.slicedOffset || 0), l = x.plotWidth - 2 * f, T = x.plotHeight - 2 * f, O = w.center, R = Math.min(l, T), k = w.size, b = w.innerSize || 0;
for (typeof k == "string" && (k = parseFloat(k)), typeof b == "string" && (b = parseFloat(b)), w = [V(O[0], "50%"), V(O[1], "50%"), V(k && 0 > k ? void 0 : w.size, "100%"), V(b && 0 > b ? void 0 : w.innerSize || 0, "0%")], !x.angular || this instanceof N || (w[3] = 0), O = 0; 4 > O; ++O)
k = w[O], x = 2 > O || O === 2 && /%$/.test(k), w[O] = F(k, [l, T, R, w[2]][O]) + (x ? f : 0);
return w[3] > w[2] && (w[3] = w[2]), w;
}, j.getStartAndEndRadians = function(w, x) {
return w = G(w) ? w : 0, x = G(x) && x > w && 360 > x - w ? x : w + 360, { start: U * (w + -90), end: U * (x + -90) };
};
}(B || (B = {})), B;
}), C(o, "Series/Pie/PiePoint.js", [o["Core/Animation/AnimationUtilities.js"], o["Core/Series/Point.js"], o["Core/Utilities.js"]], function(y, N, _) {
var U = this && this.__extends || function() {
var x = function(f, l) {
return x = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(T, O) {
T.__proto__ = O;
} || function(T, O) {
for (var R in O)
O.hasOwnProperty(R) && (T[R] = O[R]);
}, x(f, l);
};
return function(f, l) {
function T() {
this.constructor = f;
}
x(f, l), f.prototype = l === null ? Object.create(l) : (T.prototype = l.prototype, new T());
};
}(), G = y.setAnimation, V = _.addEvent, F = _.defined;
y = _.extend;
var B = _.isNumber, j = _.pick, w = _.relativeLength;
return N = function(x) {
function f() {
var l = x !== null && x.apply(this, arguments) || this;
return l.labelDistance = void 0, l.options = void 0, l.series = void 0, l;
}
return U(f, x), f.prototype.getConnectorPath = function() {
var l = this.labelPosition, T = this.series.options.dataLabels, O = this.connectorShapes, R = T.connectorShape;
return O[R] && (R = O[R]), R.call(this, { x: l.final.x, y: l.final.y, alignment: l.alignment }, l.connectorPosition, T);
}, f.prototype.getTranslate = function() {
return this.sliced ? this.slicedTranslation : { translateX: 0, translateY: 0 };
}, f.prototype.haloPath = function(l) {
var T = this.shapeArgs;
return this.sliced || !this.visible ? [] : this.series.chart.renderer.symbols.arc(T.x, T.y, T.r + l, T.r + l, { innerR: T.r - 1, start: T.start, end: T.end });
}, f.prototype.init = function() {
var l = this;
x.prototype.init.apply(
this,
arguments
), this.name = j(this.name, "Slice");
var T = function(O) {
l.slice(O.type === "select");
};
return V(this, "select", T), V(this, "unselect", T), this;
}, f.prototype.isValid = function() {
return B(this.y) && 0 <= this.y;
}, f.prototype.setVisible = function(l, T) {
var O = this, R = this.series, k = R.chart, b = R.options.ignoreHiddenPoint;
T = j(T, b), l !== this.visible && (this.visible = this.options.visible = l = typeof l > "u" ? !this.visible : l, R.options.data[R.data.indexOf(this)] = this.options, ["graphic", "dataLabel", "connector", "shadowGroup"].forEach(function(S) {
O[S] && O[S][l ? "show" : "hide"](l);
}), this.legendItem && k.legend.colorizeItem(this, l), l || this.state !== "hover" || this.setState(""), b && (R.isDirty = !0), T && k.redraw());
}, f.prototype.slice = function(l, T, O) {
var R = this.series;
G(O, R.chart), j(T, !0), this.sliced = this.options.sliced = F(l) ? l : !this.sliced, R.options.data[R.data.indexOf(this)] = this.options, this.graphic && this.graphic.animate(this.getTranslate()), this.shadowGroup && this.shadowGroup.animate(this.getTranslate());
}, f;
}(N), y(N.prototype, { connectorShapes: { fixedOffset: function(x, f, l) {
var T = f.breakAt;
return f = f.touchingSliceAt, [["M", x.x, x.y], l.softConnector ? ["C", x.x + (x.alignment === "left" ? -5 : 5), x.y, 2 * T.x - f.x, 2 * T.y - f.y, T.x, T.y] : ["L", T.x, T.y], ["L", f.x, f.y]];
}, straight: function(x, f) {
return f = f.touchingSliceAt, [["M", x.x, x.y], ["L", f.x, f.y]];
}, crookedLine: function(x, f, l) {
f = f.touchingSliceAt;
var T = this.series, O = T.center[0], R = T.chart.plotWidth, k = T.chart.plotLeft;
T = x.alignment;
var b = this.shapeArgs.r;
return l = w(l.crookDistance, 1), R = T === "left" ? O + b + (R + k - O - b) * (1 - l) : k + (O - b) * l, l = ["L", R, x.y], O = !0, (T === "left" ? R > x.x || R < f.x : R < x.x || R > f.x) && (O = !1), x = [["M", x.x, x.y]], O && x.push(l), x.push(["L", f.x, f.y]), x;
} } }), N;
}), C(o, "Series/Pie/PieSeries.js", [o["Series/CenteredUtilities.js"], o["Series/Column/ColumnSeries.js"], o["Core/Globals.js"], o["Core/Legend/LegendSymbol.js"], o["Series/Pie/PiePoint.js"], o["Core/Series/Series.js"], o["Core/Series/SeriesRegistry.js"], o["Core/Renderer/SVG/Symbols.js"], o["Core/Utilities.js"]], function(y, N, _, U, G, V, F, B, j) {
var w = this && this.__extends || function() {
var b = function(S, v) {
return b = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(h, c) {
h.__proto__ = c;
} || function(h, c) {
for (var u in c)
c.hasOwnProperty(u) && (h[u] = c[u]);
}, b(S, v);
};
return function(S, v) {
function h() {
this.constructor = S;
}
b(S, v), S.prototype = v === null ? Object.create(v) : (h.prototype = v.prototype, new h());
};
}(), x = y.getStartAndEndRadians;
_ = _.noop;
var f = j.clamp, l = j.extend, T = j.fireEvent, O = j.merge, R = j.pick, k = j.relativeLength;
return j = function(b) {
function S() {
var v = b !== null && b.apply(this, arguments) || this;
return v.center = void 0, v.data = void 0, v.maxLabelDistance = void 0, v.options = void 0, v.points = void 0, v;
}
return w(S, b), S.prototype.animate = function(v) {
var h = this, c = h.points, u = h.startAngleRad;
v || c.forEach(function(i) {
var p = i.graphic, a = i.shapeArgs;
p && a && (p.attr({ r: R(i.startR, h.center && h.center[3] / 2), start: u, end: u }), p.animate({ r: a.r, start: a.start, end: a.end }, h.options.animation));
});
}, S.prototype.drawEmpty = function() {
var v = this.startAngleRad, h = this.endAngleRad, c = this.options;
if (this.total === 0 && this.center) {
var u = this.center[0], i = this.center[1];
this.graph || (this.graph = this.chart.renderer.arc(u, i, this.center[1] / 2, 0, v, h).addClass("highcharts-empty-series").add(this.group)), this.graph.attr({ d: B.arc(u, i, this.center[2] / 2, 0, { start: v, end: h, innerR: this.center[3] / 2 }) }), this.chart.styledMode || this.graph.attr({ "stroke-width": c.borderWidth, fill: c.fillColor || "none", stroke: c.color || "#cccccc" });
} else
this.graph && (this.graph = this.graph.destroy());
}, S.prototype.drawPoints = function() {
var v = this.chart.renderer;
this.points.forEach(function(h) {
h.graphic && h.hasNewShapeType() && (h.graphic = h.graphic.destroy()), h.graphic || (h.graphic = v[h.shapeType](h.shapeArgs).add(h.series.group), h.delayedRendering = !0);
});
}, S.prototype.generatePoints = function() {
b.prototype.generatePoints.call(this), this.updateTotals();
}, S.prototype.getX = function(v, h, c) {
var u = this.center, i = this.radii ? this.radii[c.index] || 0 : u[2] / 2;
return v = Math.asin(f((v - u[1]) / (i + c.labelDistance), -1, 1)), u[0] + (h ? -1 : 1) * Math.cos(v) * (i + c.labelDistance) + (0 < c.labelDistance ? (h ? -1 : 1) * this.options.dataLabels.padding : 0);
}, S.prototype.hasData = function() {
return !!this.processedXData.length;
}, S.prototype.redrawPoints = function() {
var v = this, h = v.chart, c = h.renderer, u = v.options.shadow, i, p, a, t;
this.drawEmpty(), !u || v.shadowGroup || h.styledMode || (v.shadowGroup = c.g("shadow").attr({ zIndex: -1 }).add(v.group)), v.points.forEach(function(s) {
var n = {};
if (p = s.graphic, !s.isNull && p) {
var P = void 0;
t = s.shapeArgs, i = s.getTranslate(), h.styledMode || (P = s.shadowGroup, u && !P && (P = s.shadowGroup = c.g("shadow").add(v.shadowGroup)), P && P.attr(i), a = v.pointAttribs(s, s.selected && "select")), s.delayedRendering ? (p.setRadialReference(v.center).attr(t).attr(i), h.styledMode || p.attr(a).attr({ "stroke-linejoin": "round" }).shadow(u, P), s.delayedRendering = !1) : (p.setRadialReference(v.center), h.styledMode || O(!0, n, a), O(!0, n, t, i), p.animate(n)), p.attr({ visibility: s.visible ? "inherit" : "hidden" }), p.addClass(s.getClassName(), !0);
} else
p && (s.graphic = p.destroy());
});
}, S.prototype.sortByAngle = function(v, h) {
v.sort(function(c, u) {
return typeof c.angle < "u" && (u.angle - c.angle) * h;
});
}, S.prototype.translate = function(v) {
this.generatePoints();
var h = this.options, c = h.slicedOffset, u = c + (h.borderWidth || 0), i = x(h.startAngle, h.endAngle), p = this.startAngleRad = i.start;
i = (this.endAngleRad = i.end) - p;
var a = this.points, t = h.dataLabels.distance;
h = h.ignoreHiddenPoint;
var s = a.length, n, P = 0;
for (v || (this.center = v = this.getCenter()), n = 0; n < s; n++) {
var D = a[n], I = p + P * i;
!D.isValid() || h && !D.visible || (P += D.percentage / 100);
var W = p + P * i, E = { x: v[0], y: v[1], r: v[2] / 2, innerR: v[3] / 2, start: Math.round(1e3 * I) / 1e3, end: Math.round(1e3 * W) / 1e3 };
D.shapeType = "arc", D.shapeArgs = E, D.labelDistance = R(D.options.dataLabels && D.options.dataLabels.distance, t), D.labelDistance = k(D.labelDistance, E.r), this.maxLabelDistance = Math.max(this.maxLabelDistance || 0, D.labelDistance), W = (W + I) / 2, W > 1.5 * Math.PI ? W -= 2 * Math.PI : W < -Math.PI / 2 && (W += 2 * Math.PI), D.slicedTranslation = { translateX: Math.round(Math.cos(W) * c), translateY: Math.round(Math.sin(W) * c) }, E = Math.cos(W) * v[2] / 2;
var X = Math.sin(W) * v[2] / 2;
D.tooltipPos = [v[0] + 0.7 * E, v[1] + 0.7 * X], D.half = W < -Math.PI / 2 || W > Math.PI / 2 ? 1 : 0, D.angle = W, I = Math.min(u, D.labelDistance / 5), D.labelPosition = { natural: { x: v[0] + E + Math.cos(W) * D.labelDistance, y: v[1] + X + Math.sin(W) * D.labelDistance }, final: {}, alignment: 0 > D.labelDistance ? "center" : D.half ? "right" : "left", connectorPosition: { breakAt: { x: v[0] + E + Math.cos(W) * I, y: v[1] + X + Math.sin(W) * I }, touchingSliceAt: { x: v[0] + E, y: v[1] + X } } };
}
T(this, "afterTranslate");
}, S.prototype.updateTotals = function() {
var v = this.points, h = v.length, c = this.options.ignoreHiddenPoint, u, i = 0;
for (u = 0; u < h; u++) {
var p = v[u];
!p.isValid() || c && !p.visible || (i += p.y);
}
for (this.total = i, u = 0; u < h; u++)
p = v[u], p.percentage = 0 < i && (p.visible || !c) ? p.y / i * 100 : 0, p.total = i;
}, S.defaultOptions = O(V.defaultOptions, {
center: [null, null],
clip: !1,
colorByPoint: !0,
dataLabels: { allowOverlap: !0, connectorPadding: 5, connectorShape: "fixedOffset", crookDistance: "70%", distance: 30, enabled: !0, formatter: function() {
return this.point.isNull ? void 0 : this.point.name;
}, softConnector: !0, x: 0 },
fillColor: void 0,
ignoreHiddenPoint: !0,
inactiveOtherPoints: !0,
legendType: "point",
marker: null,
size: null,
showInLegend: !1,
slicedOffset: 10,
stickyTracking: !1,
tooltip: { followPointer: !0 },
borderColor: "#ffffff",
borderWidth: 1,
lineWidth: void 0,
states: { hover: { brightness: 0.1 } }
}), S;
}(V), l(j.prototype, { axisTypes: [], directTouch: !0, drawGraph: void 0, drawLegendSymbol: U.drawRectangle, drawTracker: N.prototype.drawTracker, getCenter: y.getCenter, getSymbol: _, isCartesian: !1, noSharedTooltip: !0, pointAttribs: N.prototype.pointAttribs, pointClass: G, requireSorting: !1, searchPoint: _, trackerGroups: ["group", "dataLabelsGroup"] }), F.registerSeriesType("pie", j), j;
}), C(o, "Series/Pie/PieDataLabel.js", [
o["Core/Series/DataLabel.js"],
o["Core/Globals.js"],
o["Core/Renderer/RendererUtilities.js"],
o["Core/Series/SeriesRegistry.js"],
o["Core/Utilities.js"]
], function(y, N, _, U, G) {
var V = N.noop, F = _.distribute, B = U.series, j = G.arrayMax, w = G.clamp, x = G.defined, f = G.merge, l = G.pick, T = G.relativeLength, O;
return function(R) {
function k() {
var c = this, u = c.data, i = c.chart, p = c.options.dataLabels || {}, a = p.connectorPadding, t = i.plotWidth, s = i.plotHeight, n = i.plotLeft, P = Math.round(i.chartWidth / 3), D = c.center, I = D[2] / 2, W = D[1], E = [[], []], X = [0, 0, 0, 0], g = c.dataLabelPositioners, m, L, z, $, Q, A, H, Y, Z, q, it, et;
c.visible && (p.enabled || c._hasPointLabels) && (u.forEach(function(nt) {
nt.dataLabel && nt.visible && nt.dataLabel.shortened && (nt.dataLabel.attr({ width: "auto" }).css({ width: "auto", textOverflow: "clip" }), nt.dataLabel.shortened = !1);
}), B.prototype.drawDataLabels.apply(c), u.forEach(function(nt) {
nt.dataLabel && (nt.visible ? (E[nt.half].push(nt), nt.dataLabel._pos = null, !x(p.style.width) && !x(nt.options.dataLabels && nt.options.dataLabels.style && nt.options.dataLabels.style.width) && nt.dataLabel.getBBox().width > P && (nt.dataLabel.css({ width: Math.round(0.7 * P) + "px" }), nt.dataLabel.shortened = !0)) : (nt.dataLabel = nt.dataLabel.destroy(), nt.dataLabels && nt.dataLabels.length === 1 && delete nt.dataLabels));
}), E.forEach(function(nt, rt) {
var ct = nt.length, gt = [], dt;
if (ct) {
if (c.sortByAngle(nt, rt - 0.5), 0 < c.maxLabelDistance) {
var ht = Math.max(0, W - I - c.maxLabelDistance), at = Math.min(W + I + c.maxLabelDistance, i.plotHeight);
nt.forEach(function(J) {
0 < J.labelDistance && J.dataLabel && (J.top = Math.max(0, W - I - J.labelDistance), J.bottom = Math.min(W + I + J.labelDistance, i.plotHeight), dt = J.dataLabel.getBBox().height || 21, J.distributeBox = { target: J.labelPosition.natural.y - J.top + dt / 2, size: dt, rank: J.y }, gt.push(J.distributeBox));
}), ht = at + dt - ht, F(gt, ht, ht / 5);
}
for (it = 0; it < ct; it++) {
if (m = nt[it], A = m.labelPosition, $ = m.dataLabel, q = m.visible === !1 ? "hidden" : "inherit", Z = ht = A.natural.y, gt && x(m.distributeBox) && (typeof m.distributeBox.pos > "u" ? q = "hidden" : (H = m.distributeBox.size, Z = g.radialDistributionY(m))), delete m.positionIndex, p.justify)
Y = g.justify(m, I, D);
else
switch (p.alignTo) {
case "connectors":
Y = g.alignToConnectors(nt, rt, t, n);
break;
case "plotEdges":
Y = g.alignToPlotEdges($, rt, t, n);
break;
default:
Y = g.radialDistributionX(c, m, Z, ht);
}
$._attr = { visibility: q, align: A.alignment }, et = m.options.dataLabels || {}, $._pos = { x: Y + l(et.x, p.x) + ({ left: a, right: -a }[A.alignment] || 0), y: Z + l(et.y, p.y) - 10 }, A.final.x = Y, A.final.y = Z, l(p.crop, !0) && (Q = $.getBBox().width, ht = null, Y - Q < a && rt === 1 ? (ht = Math.round(Q - Y + a), X[3] = Math.max(ht, X[3])) : Y + Q > t - a && rt === 0 && (ht = Math.round(Y + Q - t + a), X[1] = Math.max(ht, X[1])), 0 > Z - H / 2 ? X[0] = Math.max(Math.round(-Z + H / 2), X[0]) : Z + H / 2 > s && (X[2] = Math.max(Math.round(Z + H / 2 - s), X[2])), $.sideOverflow = ht);
}
}
}), j(X) === 0 || this.verifyDataLabelOverflow(X)) && (this.placeDataLabels(), this.points.forEach(function(nt) {
if (et = f(p, nt.options.dataLabels), L = l(et.connectorWidth, 1)) {
var rt;
z = nt.connector, ($ = nt.dataLabel) && $._pos && nt.visible && 0 < nt.labelDistance ? (q = $._attr.visibility, (rt = !z) && (nt.connector = z = i.renderer.path().addClass("highcharts-data-label-connector highcharts-color-" + nt.colorIndex + (nt.className ? " " + nt.className : "")).add(c.dataLabelsGroup), i.styledMode || z.attr({ "stroke-width": L, stroke: et.connectorColor || nt.color || "#666666" })), z[rt ? "attr" : "animate"]({ d: nt.getConnectorPath() }), z.attr("visibility", q)) : z && (nt.connector = z.destroy());
}
}));
}
function b() {
this.points.forEach(function(c) {
var u = c.dataLabel, i;
u && c.visible && ((i = u._pos) ? (u.sideOverflow && (u._attr.width = Math.max(u.getBBox().width - u.sideOverflow, 0), u.css({ width: u._attr.width + "px", textOverflow: (this.options.dataLabels.style || {}).textOverflow || "ellipsis" }), u.shortened = !0), u.attr(u._attr), u[u.moved ? "animate" : "attr"](i), u.moved = !0) : u && u.attr({ y: -9999 })), delete c.distributeBox;
}, this);
}
function S(c) {
var u = this.center, i = this.options, p = i.center, a = i.minSize || 80, t = i.size !== null;
if (!t) {
if (p[0] !== null)
var s = Math.max(u[2] - Math.max(c[1], c[3]), a);
else
s = Math.max(u[2] - c[1] - c[3], a), u[0] += (c[3] - c[1]) / 2;
p[1] !== null ? s = w(s, a, u[2] - Math.max(c[0], c[2])) : (s = w(s, a, u[2] - c[0] - c[2]), u[1] += (c[0] - c[2]) / 2), s < u[2] ? (u[2] = s, u[3] = Math.min(T(i.innerSize || 0, s), s), this.translate(u), this.drawDataLabels && this.drawDataLabels()) : t = !0;
}
return t;
}
var v = [], h = { radialDistributionY: function(c) {
return c.top + c.distributeBox.pos;
}, radialDistributionX: function(c, u, i, p) {
return c.getX(i < u.top + 2 || i > u.bottom - 2 ? p : i, u.half, u);
}, justify: function(c, u, i) {
return i[0] + (c.half ? -1 : 1) * (u + c.labelDistance);
}, alignToPlotEdges: function(c, u, i, p) {
return c = c.getBBox().width, u ? c + p : i - c - p;
}, alignToConnectors: function(c, u, i, p) {
var a = 0, t;
return c.forEach(function(s) {
t = s.dataLabel.getBBox().width, t > a && (a = t);
}), u ? a + p : i - a - p;
} };
R.compose = function(c) {
y.compose(B), v.indexOf(c) === -1 && (v.push(c), c = c.prototype, c.dataLabelPositioners = h, c.alignDataLabel = V, c.drawDataLabels = k, c.placeDataLabels = b, c.verifyDataLabelOverflow = S);
};
}(O || (O = {})), O;
}), C(o, "Extensions/OverlappingDataLabels.js", [o["Core/Chart/Chart.js"], o["Core/Utilities.js"]], function(y, N) {
function _(w, x) {
var f = !1;
if (w) {
var l = w.newOpacity;
w.oldOpacity !== l && (w.alignAttr && w.placed ? (w[l ? "removeClass" : "addClass"]("highcharts-data-label-hidden"), f = !0, w.alignAttr.opacity = l, w[w.isOld ? "animate" : "attr"](w.alignAttr, null, function() {
x.styledMode || w.css({ pointerEvents: l ? "auto" : "none" });
}), G(x, "afterHideOverlappingLabel")) : w.attr({ opacity: l })), w.isOld = !0;
}
return f;
}
var U = N.addEvent, G = N.fireEvent, V = N.isArray, F = N.isNumber, B = N.objectEach, j = N.pick;
U(y, "render", function() {
var w = this, x = [];
(this.labelCollectors || []).forEach(function(f) {
x = x.concat(f());
}), (this.yAxis || []).forEach(function(f) {
f.stacking && f.options.stackLabels && !f.options.stackLabels.allowOverlap && B(f.stacking.stacks, function(l) {
B(l, function(T) {
T.label && T.label.visibility !== "hidden" && x.push(T.label);
});
});
}), (this.series || []).forEach(function(f) {
var l = f.options.dataLabels;
f.visible && (l.enabled !== !1 || f._hasPointLabels) && (l = function(T) {
return T.forEach(function(O) {
O.visible && (V(O.dataLabels) ? O.dataLabels : O.dataLabel ? [O.dataLabel] : []).forEach(function(R) {
var k = R.options;
R.labelrank = j(k.labelrank, O.labelrank, O.shapeArgs && O.shapeArgs.height), k.allowOverlap ? (R.oldOpacity = R.opacity, R.newOpacity = 1, _(R, w)) : x.push(R);
});
});
}, l(f.nodes || []), l(f.points));
}), this.hideOverlappingLabels(x);
}), y.prototype.hideOverlappingLabels = function(w) {
var x = this, f = w.length, l = x.renderer, T, O, R, k = !1, b = function(h) {
var c, u = h.box ? 0 : h.padding || 0, i = c = 0, p;
if (h && (!h.alignAttr || h.placed)) {
var a = h.alignAttr || { x: h.attr("x"), y: h.attr("y") }, t = h.parentGroup;
h.width || (c = h.getBBox(), h.width = c.width, h.height = c.height, c = l.fontMetrics(null, h.element).h);
var s = h.width - 2 * u;
return (p = { left: "0", center: "0.5", right: "1" }[h.alignValue]) ? i = +p * s : F(h.x) && Math.round(h.x) !== h.translateX && (i = h.x - h.translateX), { x: a.x + (t.translateX || 0) + u - (i || 0), y: a.y + (t.translateY || 0) + u - c, width: h.width - 2 * u, height: h.height - 2 * u };
}
};
for (O = 0; O < f; O++)
(T = w[O]) && (T.oldOpacity = T.opacity, T.newOpacity = 1, T.absoluteBox = b(T));
for (w.sort(function(h, c) {
return (c.labelrank || 0) - (h.labelrank || 0);
}), O = 0; O < f; O++) {
var S = (b = w[O]) && b.absoluteBox;
for (T = O + 1; T < f; ++T) {
var v = (R = w[T]) && R.absoluteBox;
!S || !v || b === R || b.newOpacity === 0 || R.newOpacity === 0 || v.x >= S.x + S.width || v.x + v.width <= S.x || v.y >= S.y + S.height || v.y + v.height <= S.y || ((b.labelrank < R.labelrank ? b : R).newOpacity = 0);
}
}
w.forEach(function(h) {
_(h, x) && (k = !0);
}), k && G(x, "afterHideAllOverlappingLabels");
};
}), C(
o,
"Core/Responsive.js",
[o["Core/Utilities.js"]],
function(y) {
var N = y.extend, _ = y.find, U = y.isArray, G = y.isObject, V = y.merge, F = y.objectEach, B = y.pick, j = y.splat, w = y.uniqueKey, x;
return function(f) {
var l = [];
f.compose = function(O) {
return l.indexOf(O) === -1 && (l.push(O), N(O.prototype, T.prototype)), O;
};
var T = function() {
function O() {
}
return O.prototype.currentOptions = function(R) {
function k(v, h, c, u) {
var i;
F(v, function(p, a) {
if (!u && -1 < b.collectionsWithUpdate.indexOf(a) && h[a])
for (p = j(p), c[a] = [], i = 0; i < Math.max(p.length, h[a].length); i++)
h[a][i] && (p[i] === void 0 ? c[a][i] = h[a][i] : (c[a][i] = {}, k(p[i], h[a][i], c[a][i], u + 1)));
else
G(p) ? (c[a] = U(p) ? [] : {}, k(p, h[a] || {}, c[a], u + 1)) : c[a] = typeof h[a] > "u" ? null : h[a];
});
}
var b = this, S = {};
return k(R, this.options, S, 0), S;
}, O.prototype.matchResponsiveRule = function(R, k) {
var b = R.condition;
(b.callback || function() {
return this.chartWidth <= B(b.maxWidth, Number.MAX_VALUE) && this.chartHeight <= B(b.maxHeight, Number.MAX_VALUE) && this.chartWidth >= B(b.minWidth, 0) && this.chartHeight >= B(b.minHeight, 0);
}).call(this) && k.push(R._id);
}, O.prototype.setResponsive = function(R, k) {
var b = this, S = this.options.responsive, v = this.currentResponsive, h = [];
!k && S && S.rules && S.rules.forEach(function(c) {
typeof c._id > "u" && (c._id = w()), b.matchResponsiveRule(c, h);
}, this), k = V.apply(void 0, h.map(function(c) {
return _((S || {}).rules || [], function(u) {
return u._id === c;
});
}).map(function(c) {
return c && c.chartOptions;
})), k.isResponsiveOptions = !0, h = h.toString() || void 0, h !== (v && v.ruleIds) && (v && this.update(v.undoOptions, R, !0), h ? (v = this.currentOptions(k), v.isResponsiveOptions = !0, this.currentResponsive = { ruleIds: h, mergedOptions: k, undoOptions: v }, this.update(k, R, !0)) : this.currentResponsive = void 0);
}, O;
}();
}(x || (x = {})), x;
}
), C(o, "masters/highcharts.src.js", [
o["Core/Globals.js"],
o["Core/Utilities.js"],
o["Core/DefaultOptions.js"],
o["Core/Animation/Fx.js"],
o["Core/Animation/AnimationUtilities.js"],
o["Core/Renderer/HTML/AST.js"],
o["Core/FormatUtilities.js"],
o["Core/Renderer/RendererUtilities.js"],
o["Core/Renderer/SVG/SVGElement.js"],
o["Core/Renderer/SVG/SVGRenderer.js"],
o["Core/Renderer/HTML/HTMLElement.js"],
o["Core/Renderer/HTML/HTMLRenderer.js"],
o["Core/Axis/Axis.js"],
o["Core/Axis/DateTimeAxis.js"],
o["Core/Axis/LogarithmicAxis.js"],
o["Core/Axis/PlotLineOrBand/PlotLineOrBand.js"],
o["Core/Axis/Tick.js"],
o["Core/Tooltip.js"],
o["Core/Series/Point.js"],
o["Core/Pointer.js"],
o["Core/MSPointer.js"],
o["Core/Legend/Legend.js"],
o["Core/Chart/Chart.js"],
o["Core/Series/Series.js"],
o["Core/Series/SeriesRegistry.js"],
o["Series/Column/ColumnSeries.js"],
o["Series/Column/ColumnDataLabel.js"],
o["Series/Pie/PieSeries.js"],
o["Series/Pie/PieDataLabel.js"],
o["Core/Series/DataLabel.js"],
o["Core/Responsive.js"],
o["Core/Color/Color.js"],
o["Core/Time.js"]
], function(y, N, _, U, G, V, F, B, j, w, x, f, l, T, O, R, k, b, S, v, h, c, u, i, p, a, t, s, n, P, D, I, W) {
return y.animate = G.animate, y.animObject = G.animObject, y.getDeferredAnimation = G.getDeferredAnimation, y.setAnimation = G.setAnimation, y.stop = G.stop, y.timers = U.timers, y.AST = V, y.Axis = l, y.Chart = u, y.chart = u.chart, y.Fx = U, y.Legend = c, y.PlotLineOrBand = R, y.Point = S, y.Pointer = h.isRequired() ? h : v, y.Series = i, y.SVGElement = j, y.SVGRenderer = w, y.Tick = k, y.Time = W, y.Tooltip = b, y.Color = I, y.color = I.parse, f.compose(w), x.compose(j), y.defaultOptions = _.defaultOptions, y.getOptions = _.getOptions, y.time = _.defaultTime, y.setOptions = _.setOptions, y.dateFormat = F.dateFormat, y.format = F.format, y.numberFormat = F.numberFormat, y.addEvent = N.addEvent, y.arrayMax = N.arrayMax, y.arrayMin = N.arrayMin, y.attr = N.attr, y.clearTimeout = N.clearTimeout, y.correctFloat = N.correctFloat, y.createElement = N.createElement, y.css = N.css, y.defined = N.defined, y.destroyObjectProperties = N.destroyObjectProperties, y.discardElement = N.discardElement, y.distribute = B.distribute, y.erase = N.erase, y.error = N.error, y.extend = N.extend, y.extendClass = N.extendClass, y.find = N.find, y.fireEvent = N.fireEvent, y.getMagnitude = N.getMagnitude, y.getStyle = N.getStyle, y.inArray = N.inArray, y.isArray = N.isArray, y.isClass = N.isClass, y.isDOMElement = N.isDOMElement, y.isFunction = N.isFunction, y.isNumber = N.isNumber, y.isObject = N.isObject, y.isString = N.isString, y.keys = N.keys, y.merge = N.merge, y.normalizeTickInterval = N.normalizeTickInterval, y.objectEach = N.objectEach, y.offset = N.offset, y.pad = N.pad, y.pick = N.pick, y.pInt = N.pInt, y.relativeLength = N.relativeLength, y.removeEvent = N.removeEvent, y.seriesType = p.seriesType, y.splat = N.splat, y.stableSort = N.stableSort, y.syncTimeout = N.syncTimeout, y.timeUnits = N.timeUnits, y.uniqueKey = N.uniqueKey, y.useSerialIds = N.useSerialIds, y.wrap = N.wrap, t.compose(a), P.compose(i), T.compose(l), O.compose(l), n.compose(s), R.compose(l), D.compose(u), y;
}), C(o, "Core/Axis/OrdinalAxis.js", [
o["Core/Axis/Axis.js"],
o["Core/Globals.js"],
o["Core/Series/Series.js"],
o["Core/Utilities.js"]
], function(y, N, _, U) {
var G = U.addEvent, V = U.correctFloat, F = U.css, B = U.defined, j = U.error, w = U.pick, x = U.timeUnits, f = [], l;
return function(T) {
function O(t, s, n, P, D, I, W) {
D === void 0 && (D = []), I === void 0 && (I = 0);
var E = {}, X = this.options.tickPixelInterval, g = this.chart.time, m = [], L, z, $ = 0, Q = [], A = -Number.MAX_VALUE;
if (!this.options.ordinal && !this.options.breaks || !D || 3 > D.length || typeof s > "u")
return g.getTimeTicks.apply(g, arguments);
var H = D.length;
for (L = 0; L < H; L++) {
var Y = L && D[L - 1] > n;
if (D[L] < s && ($ = L), L === H - 1 || D[L + 1] - D[L] > 5 * I || Y) {
if (D[L] > A) {
for (z = g.getTimeTicks(t, D[$], D[L], P); z.length && z[0] <= A; )
z.shift();
z.length && (A = z[z.length - 1]), m.push(Q.length), Q = Q.concat(z);
}
$ = L + 1;
}
if (Y)
break;
}
if (z) {
if (z = z.info, W && z.unitRange <= x.hour) {
for (L = Q.length - 1, $ = 1; $ < L; $++)
if (g.dateFormat("%d", Q[$]) !== g.dateFormat("%d", Q[$ - 1])) {
E[Q[$]] = "day";
var Z = !0;
}
Z && (E[Q[0]] = "day"), z.higherRanks = E;
}
z.segmentStarts = m, Q.info = z;
} else
j(12, !1, this.chart);
if (W && B(X)) {
for (z = Q.length, g = [], $ = [], L = void 0, Z = z; Z--; )
m = this.translate(Q[Z]), L && ($[Z] = L - m), g[Z] = L = m;
for ($.sort(), $ = $[Math.floor($.length / 2)], $ < 0.6 * X && ($ = null), Z = Q[z - 1] > n ? z - 1 : z, L = void 0; Z--; )
m = g[Z], z = Math.abs(L - m), L && z < 0.8 * X && ($ === null || z < 0.8 * $) ? (E[Q[Z]] && !E[Q[Z + 1]] ? (z = Z + 1, L = m) : z = Z, Q.splice(z, 1)) : L = m;
}
return Q;
}
function R(t) {
var s = this.ordinal.positions;
if (!s)
return t;
var n = s.length - 1;
if (0 > t)
t = s[0];
else if (t > n)
t = s[n];
else {
n = Math.floor(t);
var P = t - n;
}
return typeof P < "u" && typeof s[n] < "u" ? s[n] + (P ? P * (s[n + 1] - s[n]) : 0) : t;
}
function k(t) {
var s = this.ordinal, n = s.positions;
if (!n)
return t;
var P = (t - (this.old ? this.old.min : this.min)) * (this.old ? this.old.transA : this.transA) + this.minPixelPadding;
if (0 < P && P < this.left + this.len || (s.extendedOrdinalPositions || (s.extendedOrdinalPositions = s.getExtendedPositions()), n = s.extendedOrdinalPositions), n && n.length) {
if (t = s.getIndexOfPoint(P, n), s = V(t % 1), 0 <= t && t < n.length - 1)
return n[Math.floor(t)] + s * (n[Math.ceil(t)] - n[Math.floor(t)]);
s = n.length, P = n[0], n = n[s - 1];
var D = (n - P) / (s - 1);
return 0 > t ? P + D * t : n + D * (t - s);
}
return t;
}
function b(t, s) {
var n = T.Additions.findIndexOf(t, s, !0);
return t[n] === s ? n : n + (s - t[n]) / (t[n + 1] - t[n]);
}
function S() {
this.ordinal || (this.ordinal = new T.Additions(this));
}
function v() {
this.isXAxis && B(this.options.overscroll) && this.max === this.dataMax && (!this.chart.mouseIsDown || this.isInternal) && (!this.eventArgs || this.eventArgs && this.eventArgs.trigger !== "navigator") && (this.max += this.options.overscroll, !this.isInternal && B(this.userMin) && (this.min += this.options.overscroll));
}
function h() {
this.horiz && !this.isDirty && (this.isDirty = this.isOrdinal && this.chart.navigator && !this.chart.navigator.adaptToUpdatedData);
}
function c() {
this.ordinal && (this.ordinal.beforeSetTickPositions(), this.tickInterval = this.ordinal.postProcessTickInterval(this.tickInterval));
}
function u(t) {
var s = this.xAxis[0], n = s.options.overscroll, P = t.originalEvent.chartX, D = this.options.chart.panning, I = !1;
if (D && D.type !== "y" && s.options.ordinal && s.series.length) {
var W = this.mouseDownX, E = s.getExtremes(), X = E.dataMax, g = E.min, m = E.max, L = this.hoverPoints, z = s.closestPointRange || s.ordinal && s.ordinal.overscrollPointsRange;
W = (W - P) / (s.translationSlope * (s.ordinal.slope || z)), z = { ordinal: { positions: s.ordinal.getExtendedPositions() } };
var $ = s.index2val, Q = s.val2lin, A = void 0, H = A = void 0, Y = void 0;
z.ordinal.positions ? 1 < Math.abs(W) && (L && L.forEach(function(Z) {
Z.setState();
}), 0 > W ? (H = z, Y = s.ordinal.positions ? s : z) : (H = s.ordinal.positions ? s : z, Y = z), A = Y.ordinal.positions, X > A[A.length - 1] && A.push(X), this.fixedRange = m - g, A = s.navigatorAxis.toFixedRange(void 0, void 0, $.apply(H, [Q.apply(H, [g, !0]) + W]), $.apply(Y, [Q.apply(Y, [m, !0]) + W])), A.min >= Math.min(
E.dataMin,
g
) && A.max <= Math.max(X, m) + n && s.setExtremes(A.min, A.max, !0, !1, { trigger: "pan" }), this.mouseDownX = P, F(this.container, { cursor: "move" })) : I = !0;
} else
I = !0;
I || D && /y/.test(D.type) ? n && (s.max = s.dataMax + n) : t.preventDefault();
}
function i() {
var t = this.xAxis;
t && t.options.ordinal && (delete t.ordinal.index, delete t.ordinal.extendedOrdinalPositions);
}
function p(t, s) {
var n = this.ordinal, P = n.positions, D = n.slope, I = n.extendedOrdinalPositions;
if (!P)
return t;
var W = P.length;
if (P[0] <= t && P[W - 1] >= t)
t = b(P, t);
else {
if (I || (I = n.getExtendedPositions && n.getExtendedPositions(), n.extendedOrdinalPositions = I), !I || !I.length)
return t;
W = I.length, D || (D = (I[W - 1] - I[0]) / W), P = b(I, P[0]), t >= I[0] && t <= I[W - 1] ? t = b(I, t) - P : t < I[0] ? (t = I[0] - t, t = -P - t / D) : (t -= I[W - 1], t = t / D + W - P);
}
return s ? t : D * (t || 0) + n.offset;
}
T.compose = function(t, s, n) {
if (f.indexOf(t) === -1) {
f.push(t);
var P = t.prototype;
P.getTimeTicks = O, P.index2val = R, P.lin2val = k, P.val2lin = p, P.ordinal2lin = P.val2lin, G(t, "afterInit", S), G(t, "foundExtremes", v), G(t, "afterSetScale", h), G(t, "initialAxisTranslation", c);
}
return f.indexOf(n) === -1 && (f.push(n), G(n, "pan", u)), f.indexOf(s) === -1 && (f.push(s), G(s, "updatedData", i)), t;
};
var a = function() {
function t(s) {
this.index = {}, this.axis = s;
}
return t.prototype.beforeSetTickPositions = function() {
var s = this.axis, n = s.ordinal, P = s.getExtremes(), D = P.min, I = P.max, W = s.isXAxis && !!s.options.breaks;
P = s.options.ordinal;
var E = s.chart.options.chart.ignoreHiddenSeries, X, g, m = [], L = Number.MAX_VALUE, z = !1;
if (P || W) {
s.series.forEach(function(A, H) {
if (X = [], !(E && A.visible === !1 || A.takeOrdinalPosition === !1 && !W) && (m = m.concat(A.processedXData), $ = m.length, m.sort(function(Y, Z) {
return Y - Z;
}), L = Math.min(L, w(A.closestPointRange, L)), $)) {
for (H = 0; H < $ - 1; )
m[H] !== m[H + 1] && X.push(m[H + 1]), H++;
X[0] !== m[0] && X.unshift(m[0]), m = X;
}
});
var $ = m.length;
if (2 < $) {
var Q = m[1] - m[0];
for (g = $ - 1; g-- && !z; )
m[g + 1] - m[g] !== Q && (z = !0);
!s.options.keepOrdinalPadding && (m[0] - D > Q || I - m[m.length - 1] > Q) && (z = !0);
} else
s.options.overscroll && ($ === 2 ? L = m[1] - m[0] : $ === 1 ? (L = s.options.overscroll, m = [m[0], m[0] + L]) : L = n.overscrollPointsRange);
z || s.forceOrdinal ? (s.options.overscroll && (n.overscrollPointsRange = L, m = m.concat(n.getOverscrollPositions())), n.positions = m, Q = s.ordinal2lin(Math.max(D, m[0]), !0), g = Math.max(s.ordinal2lin(Math.min(I, m[m.length - 1]), !0), 1), n.slope = I = (I - D) / (g - Q), n.offset = D - Q * I) : (n.overscrollPointsRange = w(s.closestPointRange, n.overscrollPointsRange), n.positions = s.ordinal.slope = n.offset = void 0);
}
s.isOrdinal = P && z, n.groupIntervalFactor = null;
}, t.findIndexOf = function(s, n, P) {
for (var D = 0, I = s.length - 1, W; D < I; )
W = Math.ceil((D + I) / 2), s[W] <= n ? D = W : I = W - 1;
return s[D] === n || P ? D : -1;
}, t.prototype.getExtendedPositions = function() {
var s = this, n = s.axis, P = n.constructor.prototype, D = n.chart, I = n.series[0].currentDataGrouping, W = I ? I.count + I.unitName : "raw", E = n.options.overscroll, X = n.getExtremes(), g = void 0, m = s.index;
if (m || (m = s.index = {}), !m[W]) {
var L = {
series: [],
chart: D,
forceOrdinal: !1,
getExtremes: function() {
return { min: X.dataMin, max: X.dataMax + E };
},
getGroupPixelWidth: P.getGroupPixelWidth,
getTimeTicks: P.getTimeTicks,
options: { ordinal: !0 },
ordinal: { getGroupIntervalFactor: this.getGroupIntervalFactor },
ordinal2lin: P.ordinal2lin,
getIndexOfPoint: P.getIndexOfPoint,
val2lin: P.val2lin
};
L.ordinal.axis = L, n.series.forEach(function(z) {
g = { xAxis: L, xData: z.xData.slice(), chart: D, destroyGroupedData: N.noop, getProcessedData: _.prototype.getProcessedData, applyGrouping: _.prototype.applyGrouping }, g.xData = g.xData.concat(s.getOverscrollPositions()), g.options = { dataGrouping: I ? { firstAnchor: "firstPoint", anchor: "middle", lastAnchor: "lastPoint", enabled: !0, forced: !0, approximation: "open", units: [[I.unitName, [I.count]]] } : { enabled: !1 } }, L.series.push(g), z.processData.apply(g);
}), g.closestPointRange !== g.basePointRange && g.currentDataGrouping && (L.forceOrdinal = !0), n.ordinal.beforeSetTickPositions.apply({ axis: L }), m[W] = L.ordinal.positions;
}
return m[W];
}, t.prototype.getGroupIntervalFactor = function(s, n, P) {
P = P.processedXData;
var D = P.length, I = [], W = this.groupIntervalFactor;
if (!W) {
for (W = 0; W < D - 1; W++)
I[W] = P[W + 1] - P[W];
I.sort(function(E, X) {
return E - X;
}), I = I[Math.floor(D / 2)], s = Math.max(s, P[0]), n = Math.min(n, P[D - 1]), this.groupIntervalFactor = W = D * I / (n - s);
}
return W;
}, t.prototype.getIndexOfPoint = function(s, n) {
var P = this.axis, D = this.positions ? this.positions[0] : 0, I = P.series[0].points && P.series[0].points[0] && P.series[0].points[0].plotX || P.minPixelPadding;
return 1 < P.series.length && P.series.forEach(function(W) {
W.points && B(W.points[0]) && B(W.points[0].plotX) && W.points[0].plotX < I && (I = W.points[0].plotX);
}), s = (s - I) / (P.translationSlope * (this.slope || P.closestPointRange || this.overscrollPointsRange)), t.findIndexOf(n, D) + s;
}, t.prototype.getOverscrollPositions = function() {
var s = this.axis, n = s.options.overscroll, P = this.overscrollPointsRange, D = [], I = s.dataMax;
if (B(P))
for (; I <= s.dataMax + n; )
I += P, D.push(I);
return D;
}, t.prototype.postProcessTickInterval = function(s) {
var n = this.axis, P = this.slope;
return P ? n.options.breaks ? n.closestPointRange || s : s / (P / n.closestPointRange) : s;
}, t;
}();
T.Additions = a;
}(l || (l = {})), l;
}), C(o, "Series/DataModifyComposition.js", [o["Core/Axis/Axis.js"], o["Core/Series/Point.js"], o["Core/Series/Series.js"], o["Core/Utilities.js"]], function(y, N, _, U) {
var G = N.prototype.tooltipFormatter, V = U.addEvent, F = U.arrayMax, B = U.arrayMin, j = U.correctFloat, w = U.defined, x = U.isArray, f = U.isNumber, l = U.isString, T = U.pick, O;
return function(R) {
function k(s, n, P) {
this.isXAxis || (this.series.forEach(function(D) {
s === "compare" && typeof n != "boolean" ? D.setCompare(n, !1) : s !== "cumulative" || l(n) || D.setCumulative(n, !1);
}), T(P, !0) && this.chart.redraw());
}
function b(s) {
var n = this, P = n.series.chart.numberFormatter, D = function(I) {
s = s.replace("{point." + I + "}", (0 < n[I] && I === "change" ? "+" : "") + P(n[I], T(n.series.tooltipOptions.changeDecimals, 2)));
};
return w(n.change) && D("change"), w(n.cumulativeSum) && D("cumulativeSum"), G.apply(this, [s]);
}
function S() {
var s = this.options.compare;
if (s === "percent" || s === "value" || this.options.cumulative) {
var n = new t(this);
s === "percent" || s === "value" ? n.initCompare(s) : n.initCumulative();
}
this.dataModify = n;
}
function v(s) {
s = s.dataExtremes;
var n = s.activeYData;
if (this.dataModify && s) {
var P = void 0;
this.options.compare ? P = [this.dataModify.modifyValue(s.dataMin), this.dataModify.modifyValue(s.dataMax)] : this.options.cumulative && x(n) && 2 <= n.length && (P = t.getCumulativeExtremes(n)), P && (s.dataMin = B(P), s.dataMax = F(P));
}
}
function h(s, n) {
this.options.compare = this.userOptions.compare = s, this.update({}, T(n, !0)), !this.dataModify || s !== "value" && s !== "percent" ? this.points.forEach(function(P) {
delete P.change;
}) : this.dataModify.initCompare(s);
}
function c() {
if (this.xAxis && this.processedYData && this.dataModify) {
var s = this.processedXData, n = this.processedYData, P = n.length, D = this.options.compareStart === !0 ? 0 : 1, I = -1, W;
for (this.pointArrayMap && (I = this.pointArrayMap.indexOf(this.options.pointValKey || this.pointValKey || "y")), W = 0; W < P - D; W++) {
var E = n[W] && -1 < I ? n[W][I] : n[W];
if (f(E) && E !== 0 && s[W + D] >= (this.xAxis.min || 0)) {
this.dataModify.compareValue = E;
break;
}
}
}
}
function u(s, n) {
this.setModifier("compare", s, n);
}
function i(s, n) {
s = T(s, !1), this.options.cumulative = this.userOptions.cumulative = s, this.update({}, T(n, !0)), this.dataModify ? this.dataModify.initCumulative() : this.points.forEach(function(P) {
delete P.cumulativeSum;
});
}
function p(s, n) {
this.setModifier("cumulative", s, n);
}
var a = [];
R.compose = function(s, n, P) {
if (a.indexOf(s) === -1) {
a.push(s);
var D = s.prototype;
D.setCompare = h, D.setCumulative = i, V(s, "afterInit", S), V(s, "afterGetExtremes", v), V(s, "afterProcessData", c);
}
return a.indexOf(n) === -1 && (a.push(n), n = n.prototype, n.setCompare = u, n.setModifier = k, n.setCumulative = p), a.indexOf(P) === -1 && (a.push(P), P.prototype.tooltipFormatter = b), s;
};
var t = function() {
function s(n) {
this.series = n;
}
return s.prototype.modifyValue = function() {
return 0;
}, s.getCumulativeExtremes = function(n) {
var P = 1 / 0, D = -1 / 0;
return n.reduce(function(I, W) {
return W = I + W, P = Math.min(P, W, I), D = Math.max(
D,
W,
I
), W;
}), [P, D];
}, s.prototype.initCompare = function(n) {
this.modifyValue = function(P, D) {
P === null && (P = 0);
var I = this.compareValue;
return typeof P < "u" && typeof I < "u" ? (P = n === "value" ? P - I : P / I * 100 - (this.series.options.compareBase === 100 ? 0 : 100), typeof D < "u" && (D = this.series.points[D]) && (D.change = P), P) : 0;
};
}, s.prototype.initCumulative = function() {
this.modifyValue = function(n, P) {
if (n === null && (n = 0), n !== void 0 && P !== void 0) {
var D = 0 < P ? this.series.points[P - 1] : null;
return D && D.cumulativeSum && (n = j(D.cumulativeSum + n)), (P = this.series.points[P]) && (P.cumulativeSum = n), n;
}
return 0;
};
}, s;
}();
R.Additions = t;
}(O || (O = {})), O;
}), C(o, "Core/Axis/BrokenAxis.js", [o["Extensions/Stacking.js"], o["Core/Utilities.js"]], function(y, N) {
var _ = N.addEvent, U = N.find, G = N.fireEvent, V = N.isArray, F = N.isNumber, B = N.pick, j;
return function(w) {
function x() {
typeof this.brokenAxis < "u" && this.brokenAxis.setBreaks(this.options.breaks, !1);
}
function f() {
this.brokenAxis && this.brokenAxis.hasBreaks && (this.options.ordinal = !1);
}
function l() {
var h = this.brokenAxis;
if (h && h.hasBreaks) {
for (var c = this.tickPositions, u = this.tickPositions.info, i = [], p = 0; p < c.length; p++)
h.isInAnyBreak(c[p]) || i.push(c[p]);
this.tickPositions = i, this.tickPositions.info = u;
}
}
function T() {
this.brokenAxis || (this.brokenAxis = new v(this));
}
function O() {
var h = this.options.connectNulls, c = this.points, u = this.xAxis, i = this.yAxis;
if (this.isDirty)
for (var p = c.length; p--; ) {
var a = c[p], t = !(a.y === null && h === !1) && (u && u.brokenAxis && u.brokenAxis.isInAnyBreak(a.x, !0) || i && i.brokenAxis && i.brokenAxis.isInAnyBreak(a.y, !0));
a.visible = t ? !1 : a.options.visible !== !1;
}
}
function R() {
this.drawBreaks(this.xAxis, ["x"]), this.drawBreaks(this.yAxis, B(this.pointArrayMap, ["y"]));
}
function k(h, c) {
var u = this, i = u.points, p, a, t, s;
if (h && h.brokenAxis && h.brokenAxis.hasBreaks) {
var n = h.brokenAxis;
c.forEach(function(P) {
p = n && n.breakArray || [], a = h.isXAxis ? h.min : B(u.options.threshold, h.min), i.forEach(function(D) {
s = B(D["stack" + P.toUpperCase()], D[P]), p.forEach(function(I) {
F(a) && F(s) && (t = !1, a < I.from && s > I.to || a > I.from && s < I.from ? t = "pointBreak" : (a < I.from && s > I.from && s < I.to || a > I.from && s > I.to && s < I.from) && (t = "pointInBreak"), t && G(h, t, { point: D, brk: I }));
});
});
});
}
}
function b() {
var h = this.currentDataGrouping, c = h && h.gapSize;
h = this.points.slice();
var u = this.yAxis, i = this.options.gapSize, p = h.length - 1, a;
if (i && 0 < p)
for (this.options.gapUnit !== "value" && (i *= this.basePointRange), c && c > i && c >= this.basePointRange && (i = c), a = void 0; p--; )
a && a.visible !== !1 || (a = h[p + 1]), c = h[p], a.visible !== !1 && c.visible !== !1 && (a.x - c.x > i && (a = (c.x + a.x) / 2, h.splice(p + 1, 0, { isNull: !0, x: a }), u.stacking && this.options.stacking && (a = u.stacking.stacks[this.stackKey][a] = new y(u, u.options.stackLabels, !1, a, this.stack), a.total = 0)), a = c);
return this.getGraphPath(h);
}
var S = [];
w.compose = function(h, c) {
if (S.indexOf(h) === -1 && (S.push(h), h.keepProps.push("brokenAxis"), _(h, "init", T), _(h, "afterInit", x), _(h, "afterSetTickPositions", l), _(h, "afterSetOptions", f)), S.indexOf(c) === -1) {
S.push(c);
var u = c.prototype;
u.drawBreaks = k, u.gappedPath = b, _(c, "afterGeneratePoints", O), _(
c,
"afterRender",
R
);
}
return h;
};
var v = function() {
function h(c) {
this.hasBreaks = !1, this.axis = c;
}
return h.isInBreak = function(c, u) {
var i = c.repeat || 1 / 0, p = c.from, a = c.to - c.from;
return u = u >= p ? (u - p) % i : i - (p - u) % i, c.inclusive ? u <= a : u < a && u !== 0;
}, h.lin2Val = function(c) {
var u = this.brokenAxis;
if (u = u && u.breakArray, !u || !F(c))
return c;
var i;
for (i = 0; i < u.length; i++) {
var p = u[i];
if (p.from >= c)
break;
(p.to < c || h.isInBreak(p, c)) && (c += p.len);
}
return c;
}, h.val2Lin = function(c) {
var u = this.brokenAxis;
if (u = u && u.breakArray, !u || !F(c))
return c;
var i = c, p;
for (p = 0; p < u.length; p++) {
var a = u[p];
if (a.to <= c)
i -= a.len;
else {
if (a.from >= c)
break;
if (h.isInBreak(a, c)) {
i -= c - a.from;
break;
}
}
}
return i;
}, h.prototype.findBreakAt = function(c, u) {
return U(u, function(i) {
return i.from < c && c < i.to;
});
}, h.prototype.isInAnyBreak = function(c, u) {
var i = this.axis, p = i.options.breaks || [], a = p.length, t;
if (a && F(c)) {
for (; a--; )
if (h.isInBreak(p[a], c)) {
var s = !0;
t || (t = B(p[a].showPoints, !i.isXAxis));
}
var n = s && u ? s && !t : s;
}
return n;
}, h.prototype.setBreaks = function(c, u) {
var i = this, p = i.axis, a = V(c) && !!c.length;
p.isDirty = i.hasBreaks !== a, i.hasBreaks = a, p.options.breaks = p.userOptions.breaks = c, p.forceRedraw = !0, p.series.forEach(function(t) {
t.isDirty = !0;
}), a || p.val2lin !== h.val2Lin || (delete p.val2lin, delete p.lin2val), a && (p.userOptions.ordinal = !1, p.lin2val = h.lin2Val, p.val2lin = h.val2Lin, p.setExtremes = function(t, s, n, P, D) {
if (i.hasBreaks) {
for (var I = this.options.breaks || [], W; W = i.findBreakAt(t, I); )
t = W.to;
for (; W = i.findBreakAt(s, I); )
s = W.from;
s < t && (s = t);
}
p.constructor.prototype.setExtremes.call(this, t, s, n, P, D);
}, p.setAxisTranslation = function() {
if (p.constructor.prototype.setAxisTranslation.call(this), i.unitLength = void 0, i.hasBreaks) {
var t = p.options.breaks || [], s = [], n = [], P = B(p.pointRangePadding, 0), D = 0, I, W = p.userMin || p.min, E = p.userMax || p.max, X;
t.forEach(function(L) {
I = L.repeat || 1 / 0, F(W) && F(E) && (h.isInBreak(L, W) && (W += L.to % I - W % I), h.isInBreak(L, E) && (E -= E % I - L.from % I));
}), t.forEach(function(L) {
if (m = L.from, I = L.repeat || 1 / 0, F(W) && F(E)) {
for (; m - I > W; )
m -= I;
for (; m < W; )
m += I;
for (X = m; X < E; X += I)
s.push({ value: X, move: "in" }), s.push({ value: X + L.to - L.from, move: "out", size: L.breakSize });
}
}), s.sort(function(L, z) {
return L.value === z.value ? (L.move === "in" ? 0 : 1) - (z.move === "in" ? 0 : 1) : L.value - z.value;
});
var g = 0, m = W;
s.forEach(function(L) {
g += L.move === "in" ? 1 : -1, g === 1 && L.move === "in" && (m = L.value), g === 0 && F(m) && (n.push({ from: m, to: L.value, len: L.value - m - (L.size || 0) }), D += L.value - m - (L.size || 0));
}), i.breakArray = n, F(W) && F(E) && F(p.min) && (i.unitLength = E - W - D + P, G(p, "afterBreaks"), p.staticScale ? p.transA = p.staticScale : i.unitLength && (p.transA *= (E - p.min + P) / i.unitLength), P && (p.minPixelPadding = p.transA * (p.minPointOffset || 0)), p.min = W, p.max = E);
}
}), B(u, !0) && p.chart.redraw();
}, h;
}();
w.Additions = v;
}(j || (j = {})), j;
}), C(o, "masters/modules/broken-axis.src.js", [o["Core/Globals.js"], o["Core/Axis/BrokenAxis.js"]], function(y, N) {
N.compose(y.Axis, y.Series);
}), C(o, "Extensions/DataGrouping.js", [
o["Core/Axis/Axis.js"],
o["Core/Axis/DateTimeAxis.js"],
o["Core/FormatUtilities.js"],
o["Core/Globals.js"],
o["Core/Series/Point.js"],
o["Core/Series/Series.js"],
o["Core/Tooltip.js"],
o["Core/DefaultOptions.js"],
o["Core/Utilities.js"]
], function(y, N, _, U, G, V, F, B, j) {
var w = _.format, x = V.prototype;
_ = j.addEvent;
var f = j.arrayMax, l = j.arrayMin, T = j.correctFloat, O = j.defined, R = j.error, k = j.extend, b = j.isNumber, S = j.merge, v = j.pick, h = U.approximations = {
sum: function(t) {
var s = t.length;
if (!s && t.hasNulls)
var n = null;
else if (s)
for (n = 0; s--; )
n += t[s];
return n;
},
average: function(t) {
var s = t.length;
return t = h.sum(t), b(t) && s && (t = T(t / s)), t;
},
averages: function() {
var t = [];
return [].forEach.call(arguments, function(s) {
t.push(h.average(s));
}), typeof t[0] > "u" ? void 0 : t;
},
open: function(t) {
return t.length ? t[0] : t.hasNulls ? null : void 0;
},
high: function(t) {
return t.length ? f(t) : t.hasNulls ? null : void 0;
},
low: function(t) {
return t.length ? l(t) : t.hasNulls ? null : void 0;
},
close: function(t) {
return t.length ? t[t.length - 1] : t.hasNulls ? null : void 0;
},
hlc: function(t, s, n) {
if (t = h.high(t), s = h.low(s), n = h.close(n), b(t) || b(s) || b(n))
return [t, s, n];
},
ohlc: function(t, s, n, P) {
if (t = h.open(t), s = h.high(s), n = h.low(n), P = h.close(P), b(t) || b(s) || b(n) || b(P))
return [t, s, n, P];
},
range: function(t, s) {
if (t = h.low(t), s = h.high(s), b(t) || b(s))
return [t, s];
if (t === null && s === null)
return null;
}
};
j = function(t, s, n, P) {
var D = this, I = D.data, W = D.options && D.options.data, E = [], X = [], g = [], m = t.length, L = !!s, z = [], $ = D.pointArrayMap, Q = $ && $.length, A = ["x"].concat($ || ["y"]), H = this.options.dataGrouping && this.options.dataGrouping.groupAll, Y = 0, Z = 0, q;
P = typeof P == "function" ? P : h[P] ? h[P] : h[D.getDGApproximation && D.getDGApproximation() || "average"], Q ? $.forEach(function() {
z.push([]);
}) : z.push([]);
var it = Q || 1;
for (q = 0; q <= m && !(t[q] >= n[0]); q++)
;
for (q; q <= m; q++) {
for (; typeof n[Y + 1] < "u" && t[q] >= n[Y + 1] || q === m; ) {
var et = n[Y];
D.dataGroupInfo = { start: H ? Z : D.cropStart + Z, length: z[0].length };
var nt = P.apply(D, z);
for (D.pointClass && !O(D.dataGroupInfo.options) && (D.dataGroupInfo.options = S(D.pointClass.prototype.optionsToObject.call({ series: D }, D.options.data[D.cropStart + Z])), A.forEach(function(ct) {
delete D.dataGroupInfo.options[ct];
})), typeof nt < "u" && (E.push(et), X.push(nt), g.push(D.dataGroupInfo)), Z = q, et = 0; et < it; et++)
z[et].length = 0, z[et].hasNulls = !1;
if (Y += 1, q === m)
break;
}
if (q === m)
break;
if ($) {
et = D.options.dataGrouping && D.options.dataGrouping.groupAll ? q : D.cropStart + q, nt = I && I[et] || D.pointClass.prototype.applyOptions.apply({ series: D }, [W[et]]);
var rt = void 0;
for (et = 0; et < Q; et++)
rt = nt[$[et]], b(rt) ? z[et].push(rt) : rt === null && (z[et].hasNulls = !0);
} else
et = L ? s[q] : null, b(et) ? z[0].push(et) : et === null && (z[0].hasNulls = !0);
}
return { groupedXData: E, groupedYData: X, groupMap: g };
};
var c = { approximations: h, groupData: j }, u = x.generatePoints, i = { groupPixelWidth: 2, dateTimeLabelFormats: { millisecond: [
"%A, %b %e, %H:%M:%S.%L",
"%A, %b %e, %H:%M:%S.%L",
"-%H:%M:%S.%L"
], second: ["%A, %b %e, %H:%M:%S", "%A, %b %e, %H:%M:%S", "-%H:%M:%S"], minute: ["%A, %b %e, %H:%M", "%A, %b %e, %H:%M", "-%H:%M"], hour: ["%A, %b %e, %H:%M", "%A, %b %e, %H:%M", "-%H:%M"], day: ["%A, %b %e, %Y", "%A, %b %e", "-%A, %b %e, %Y"], week: ["Week from %A, %b %e, %Y", "%A, %b %e", "-%A, %b %e, %Y"], month: ["%B %Y", "%B", "-%B %Y"], year: ["%Y", "%Y", "-%Y"] } }, p = {
line: {},
spline: {},
area: {},
areaspline: {},
arearange: {},
column: { groupPixelWidth: 10 },
columnrange: { groupPixelWidth: 10 },
candlestick: { groupPixelWidth: 10 },
ohlc: { groupPixelWidth: 5 },
hlc: { groupPixelWidth: 5 },
heikinashi: { groupPixelWidth: 10 }
}, a = U.defaultDataGroupingUnits = [["millisecond", [1, 2, 5, 10, 20, 25, 50, 100, 200, 500]], ["second", [1, 2, 5, 10, 15, 30]], ["minute", [1, 2, 5, 10, 15, 30]], ["hour", [1, 2, 3, 4, 6, 8, 12]], ["day", [1]], ["week", [1]], ["month", [1, 3, 6]], ["year", null]];
return x.getDGApproximation = function() {
return this.is("arearange") ? "range" : this.is("ohlc") ? "ohlc" : this.is("hlc") ? "hlc" : this.is("column") ? "sum" : "average";
}, x.groupData = j, x.applyGrouping = function(t) {
var s = this.chart, n = this.options.dataGrouping, P = this.allowDG !== !1 && n && v(n.enabled, s.options.isStock), D = this.visible || !s.options.chart.ignoreHiddenSeries, I, W = this.currentDataGrouping, E = !1;
if (P && !this.requireSorting && (this.requireSorting = E = !0), t = !!(this.isCartesian && !this.isDirty && !this.xAxis.isDirty && !this.yAxis.isDirty && !t) || !P, E && (this.requireSorting = !1), !t) {
this.destroyGroupedData(), P = n.groupAll ? this.xData : this.processedXData;
var X = n.groupAll ? this.yData : this.processedYData;
t = s.plotSizeX, E = this.xAxis;
var g = E.options.ordinal, m = this.groupPixelWidth;
if (m && P && P.length) {
this.isDirty = I = !0, this.points = null;
var L = E.getExtremes(), z = L.min;
L = L.max, g = g && E.ordinal && E.ordinal.getGroupIntervalFactor(z, L, this) || 1, t = E.getTimeTicks(N.Additions.prototype.normalizeTimeTickInterval(m * (L - z) / t * g, n.units || a), Math.min(z, P[0]), Math.max(L, P[P.length - 1]), E.options.startOfWeek, P, this.closestPointRange), m = x.groupData.apply(this, [P, X, t, n.approximation]), P = m.groupedXData, X = m.groupedYData, g = 0, n && n.smoothed && P.length && (n.firstAnchor = "firstPoint", n.anchor = "middle", n.lastAnchor = "lastPoint", R(32, !1, s, { "dataGrouping.smoothed": "use dataGrouping.anchor" })), s = P;
var $ = this.options.dataGrouping;
if (z = this.currentDataGrouping && this.currentDataGrouping.gapSize, $ && this.xData && z && this.groupMap) {
var Q = s.length - 1, A = $.anchor, H = v($.firstAnchor, A);
if ($ = v($.lastAnchor, A), A && A !== "start") {
var Y = z * { middle: 0.5, end: 1 }[A];
for (A = s.length - 1; A-- && 0 < A; )
s[A] += Y;
}
if (H && H !== "start" && this.xData[0] >= s[0]) {
A = this.groupMap[0].start, Y = this.groupMap[0].length;
var Z = void 0;
b(A) && b(Y) && (Z = A + (Y - 1)), s[0] = { middle: s[0] + 0.5 * z, end: s[0] + z, firstPoint: this.xData[0], lastPoint: Z && this.xData[Z] }[H];
}
$ && $ !== "start" && z && s[Q] >= L - z && (L = this.groupMap[this.groupMap.length - 1].start, s[Q] = { middle: s[Q] + 0.5 * z, end: s[Q] + z, firstPoint: L && this.xData[L], lastPoint: this.xData[this.xData.length - 1] }[$]);
}
for (L = 1; L < t.length; L++)
t.info.segmentStarts && t.info.segmentStarts.indexOf(L) !== -1 || (g = Math.max(t[L] - t[L - 1], g));
L = t.info, L.gapSize = g, this.closestPointRange = t.info.totalRange, this.groupMap = m.groupMap, D && (D = P, O(D[0]) && b(E.min) && b(E.dataMin) && D[0] < E.min && ((!O(E.options.min) && E.min <= E.dataMin || E.min === E.dataMin) && (E.min = Math.min(D[0], E.min)), E.dataMin = Math.min(D[0], E.dataMin)), O(D[D.length - 1]) && b(E.max) && b(E.dataMax) && D[D.length - 1] > E.max && ((!O(E.options.max) && b(E.dataMax) && E.max >= E.dataMax || E.max === E.dataMax) && (E.max = Math.max(D[D.length - 1], E.max)), E.dataMax = Math.max(D[D.length - 1], E.dataMax))), n.groupAll && (this.allGroupedData = X, n = this.cropData(P, X, E.min, E.max, 1), P = n.xData, X = n.yData, this.cropStart = n.start), this.processedXData = P, this.processedYData = X;
} else
this.groupMap = null;
this.hasGroupedData = I, this.currentDataGrouping = L, this.preventGraphAnimation = (W && W.totalRange) !== (L && L.totalRange);
}
}, x.destroyGroupedData = function() {
this.groupedData && (this.groupedData.forEach(function(t, s) {
t && (this.groupedData[s] = t.destroy ? t.destroy() : null);
}, this), this.groupedData.length = 0);
}, x.generatePoints = function() {
u.apply(this), this.destroyGroupedData(), this.groupedData = this.hasGroupedData ? this.points : null;
}, y.prototype.applyGrouping = function(t) {
var s = this;
s.series.forEach(function(n) {
n.groupPixelWidth = void 0, n.groupPixelWidth = s.getGroupPixelWidth && s.getGroupPixelWidth(), n.groupPixelWidth && (n.hasProcessed = !0), n.applyGrouping(!!t.hasExtemesChanged);
});
}, y.prototype.getGroupPixelWidth = function() {
var t = this.series, s = t.length, n, P = 0, D = !1, I;
for (n = s; n--; )
(I = t[n].options.dataGrouping) && (P = Math.max(P, v(I.groupPixelWidth, i.groupPixelWidth)));
for (n = s; n--; )
(I = t[n].options.dataGrouping) && (s = (t[n].processedXData || t[n].data).length, (t[n].groupPixelWidth || s > this.chart.plotSizeX / P || s && I.forced) && (D = !0));
return D ? P : 0;
}, y.prototype.setDataGrouping = function(t, s) {
var n;
if (s = v(s, !0), t || (t = { forced: !1, units: null }), this instanceof y)
for (n = this.series.length; n--; )
this.series[n].update({ dataGrouping: t }, !1);
else
this.chart.options.series.forEach(function(P) {
P.dataGrouping = t;
}, !1);
this.ordinal && (this.ordinal.slope = void 0), s && this.chart.redraw();
}, _(y, "postProcessData", y.prototype.applyGrouping), _(G, "update", function() {
if (this.dataGroup)
return R(
24,
!1,
this.series.chart
), !1;
}), _(F, "headerFormatter", function(t) {
var s = this.chart, n = s.time, P = t.labelConfig, D = P.series, I = D.tooltipOptions, W = D.options.dataGrouping, E = I.xDateFormat, X = D.xAxis, g = I[t.isFooter ? "footerFormat" : "headerFormat"];
if (X && X.options.type === "datetime" && W && b(P.key)) {
var m = D.currentDataGrouping;
if (W = W.dateTimeLabelFormats || i.dateTimeLabelFormats, m)
if (I = W[m.unitName], m.count === 1)
E = I[0];
else {
E = I[1];
var L = I[2];
}
else
!E && W && X.dateTime && (E = X.dateTime.getXDateFormat(P.x, I.dateTimeLabelFormats));
E = n.dateFormat(E, P.key), L && (E += n.dateFormat(L, P.key + m.totalRange - 1)), D.chart.styledMode && (g = this.styledModeFormat(g)), t.text = w(g, { point: k(P.point, { key: E }), series: D }, s), t.preventDefault();
}
}), _(V, "destroy", x.destroyGroupedData), _(V, "afterSetOptions", function(t) {
t = t.options;
var s = this.type, n = this.chart.options.plotOptions, P = B.defaultOptions.plotOptions[s].dataGrouping, D = this.useCommonDataGrouping && i;
if (n && (p[s] || D)) {
P || (P = S(i, p[s]));
var I = this.chart.rangeSelector;
t.dataGrouping = S(
D,
P,
n.series && n.series.dataGrouping,
n[s].dataGrouping,
this.userOptions.dataGrouping,
!t.isInternal && I && b(I.selected) && I.buttonOptions[I.selected].dataGrouping
);
}
}), _(y, "afterSetScale", function() {
this.series.forEach(function(t) {
t.hasProcessed = !1;
});
}), U.dataGrouping = c, c;
}), C(o, "Series/HLC/HLCPoint.js", [o["Core/Series/SeriesRegistry.js"]], function(y) {
var N = this && this.__extends || function() {
var _ = function(U, G) {
return _ = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(V, F) {
V.__proto__ = F;
} || function(V, F) {
for (var B in F)
F.hasOwnProperty(B) && (V[B] = F[B]);
}, _(U, G);
};
return function(U, G) {
function V() {
this.constructor = U;
}
_(U, G), U.prototype = G === null ? Object.create(G) : (V.prototype = G.prototype, new V());
};
}();
return function(_) {
function U() {
var G = _ !== null && _.apply(this, arguments) || this;
return G.close = void 0, G.high = void 0, G.low = void 0, G.options = void 0, G.plotClose = void 0, G.series = void 0, G;
}
return N(U, _), U;
}(y.seriesTypes.column.prototype.pointClass);
}), C(
o,
"Series/HLC/HLCSeries.js",
[o["Series/HLC/HLCPoint.js"], o["Core/Series/SeriesRegistry.js"], o["Core/Utilities.js"]],
function(y, N, _) {
var U = this && this.__extends || function() {
var B = function(j, w) {
return B = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(x, f) {
x.__proto__ = f;
} || function(x, f) {
for (var l in f)
f.hasOwnProperty(l) && (x[l] = f[l]);
}, B(j, w);
};
return function(j, w) {
function x() {
this.constructor = j;
}
B(j, w), j.prototype = w === null ? Object.create(w) : (x.prototype = w.prototype, new x());
};
}(), G = N.seriesTypes.column, V = _.extend, F = _.merge;
return _ = function(B) {
function j() {
var w = B !== null && B.apply(this, arguments) || this;
return w.data = void 0, w.options = void 0, w.points = void 0, w.yData = void 0, w;
}
return U(j, B), j.prototype.extendStem = function(w, x, f) {
var l = w[0];
w = w[1], typeof l[2] == "number" && (l[2] = Math.max(f + x, l[2])), typeof w[2] == "number" && (w[2] = Math.min(f - x, w[2]));
}, j.prototype.getPointPath = function(w, x) {
x = x.strokeWidth();
var f = w.series, l = x % 2 / 2, T = Math.round(w.plotX) - l, O = Math.round(w.shapeArgs.width / 2), R = [["M", T, Math.round(w.yBottom)], ["L", T, Math.round(w.plotHigh)]];
return w.close !== null && (w = Math.round(w.plotClose) + l, R.push(["M", T, w], ["L", T + O, w]), f.extendStem(R, x / 2, w)), R;
}, j.prototype.drawSinglePoint = function(w) {
var x = w.series, f = x.chart, l = w.graphic, T = !l;
typeof w.plotY < "u" && (l || (w.graphic = l = f.renderer.path().add(x.group)), f.styledMode || l.attr(x.pointAttribs(w, w.selected && "select")), x = x.getPointPath(w, l), l[T ? "attr" : "animate"]({ d: x }).addClass(w.getClassName(), !0));
}, j.prototype.drawPoints = function() {
this.points.forEach(this.drawSinglePoint);
}, j.prototype.init = function() {
B.prototype.init.apply(this, arguments), this.options.stacking = void 0;
}, j.prototype.pointAttribs = function(w, x) {
return w = B.prototype.pointAttribs.call(this, w, x), delete w.fill, w;
}, j.prototype.toYData = function(w) {
return [w.high, w.low, w.close];
}, j.prototype.translate = function() {
var w = this, x = w.yAxis, f = this.pointArrayMap && this.pointArrayMap.slice() || [], l = f.map(function(T) {
return "plot" + (T.charAt(0).toUpperCase() + T.slice(1));
});
l.push("yBottom"), f.push("low"), B.prototype.translate.apply(w), w.points.forEach(function(T) {
f.forEach(function(O, R) {
O = T[O], O !== null && (w.dataModify && (O = w.dataModify.modifyValue(O)), T[l[R]] = x.toPixels(O, !0));
}), T.tooltipPos[1] = T.plotHigh + x.pos - w.chart.plotTop;
});
}, j.defaultOptions = F(G.defaultOptions, { lineWidth: 1, tooltip: { pointFormat: '● {series.name}
High: {point.high}
Low: {point.low}
Close: {point.close}
' }, threshold: null, states: { hover: { lineWidth: 3 } }, stickyTracking: !0 }), j;
}(G), V(_.prototype, { animate: null, directTouch: !1, pointArrayMap: ["high", "low", "close"], pointAttrToOptions: {
stroke: "color",
"stroke-width": "lineWidth"
}, pointValKey: "close" }), _.prototype.pointClass = y, N.registerSeriesType("hlc", _), _;
}
), C(o, "Series/OHLC/OHLCPoint.js", [o["Core/Series/SeriesRegistry.js"]], function(y) {
var N = this && this.__extends || function() {
var _ = function(U, G) {
return _ = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(V, F) {
V.__proto__ = F;
} || function(V, F) {
for (var B in F)
F.hasOwnProperty(B) && (V[B] = F[B]);
}, _(U, G);
};
return function(U, G) {
function V() {
this.constructor = U;
}
_(U, G), U.prototype = G === null ? Object.create(G) : (V.prototype = G.prototype, new V());
};
}();
return function(_) {
function U() {
var G = _ !== null && _.apply(this, arguments) || this;
return G.open = void 0, G.options = void 0, G.plotOpen = void 0, G.series = void 0, G;
}
return N(U, _), U.prototype.getClassName = function() {
return _.prototype.getClassName.call(this) + (this.open < this.close ? " highcharts-point-up" : " highcharts-point-down");
}, U.prototype.resolveUpColor = function() {
this.open < this.close && !this.options.color && this.series.options.upColor && (this.color = this.series.options.upColor);
}, U.prototype.resolveColor = function() {
_.prototype.resolveColor.call(this), this.resolveUpColor();
}, U.prototype.getZone = function() {
var G = _.prototype.getZone.call(this);
return this.resolveUpColor(), G;
}, U.prototype.applyOptions = function() {
return _.prototype.applyOptions.apply(this, arguments), this.resolveColor && this.resolveColor(), this;
}, U;
}(y.seriesTypes.hlc.prototype.pointClass);
}), C(
o,
"Series/OHLC/OHLCSeries.js",
[o["Series/OHLC/OHLCPoint.js"], o["Core/Series/SeriesRegistry.js"], o["Core/Utilities.js"]],
function(y, N, _) {
var U = this && this.__extends || function() {
var x = function(f, l) {
return x = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(T, O) {
T.__proto__ = O;
} || function(T, O) {
for (var R in O)
O.hasOwnProperty(R) && (T[R] = O[R]);
}, x(f, l);
};
return function(f, l) {
function T() {
this.constructor = f;
}
x(f, l), f.prototype = l === null ? Object.create(l) : (T.prototype = l.prototype, new T());
};
}(), G = N.series, V = N.seriesTypes.hlc, F = _.addEvent, B = _.extend, j = _.merge, w = function(x) {
function f() {
var l = x !== null && x.apply(this, arguments) || this;
return l.data = void 0, l.options = void 0, l.points = void 0, l;
}
return U(f, x), f.prototype.getPointPath = function(l, T) {
var O = x.prototype.getPointPath.call(this, l, T);
T = T.strokeWidth();
var R = T % 2 / 2, k = Math.round(l.plotX) - R, b = Math.round(l.shapeArgs.width / 2);
return l.open !== null && (l = Math.round(l.plotOpen) + R, O.push(["M", k, l], ["L", k - b, l]), x.prototype.extendStem.call(this, O, T / 2, l)), O;
}, f.prototype.pointAttribs = function(l, T) {
T = x.prototype.pointAttribs.call(this, l, T);
var O = this.options;
return delete T.fill, !l.options.color && O.upColor && l.open < l.close && (T.stroke = O.upColor), T;
}, f.prototype.toYData = function(l) {
return [l.open, l.high, l.low, l.close];
}, f.defaultOptions = j(V.defaultOptions, { tooltip: { pointFormat: '● {series.name}
Open: {point.open}
High: {point.high}
Low: {point.low}
Close: {point.close}
' } }), f;
}(V);
return B(w.prototype, { pointArrayMap: ["open", "high", "low", "close"] }), w.prototype.pointClass = y, N.registerSeriesType("ohlc", w), F(G, "init", function(x) {
x = x.options, x.useOhlcData && x.id !== "highcharts-navigator-series" && B(this, { pointValKey: w.prototype.pointValKey, pointArrayMap: w.prototype.pointArrayMap, toYData: w.prototype.toYData });
}), F(G, "afterSetOptions", function(x) {
x = x.options;
var f = x.dataGrouping;
f && x.useOhlcData && x.id !== "highcharts-navigator-series" && (f.approximation = "ohlc");
}), w;
}
), C(o, "Series/Candlestick/CandlestickSeries.js", [o["Core/DefaultOptions.js"], o["Core/Series/SeriesRegistry.js"], o["Core/Utilities.js"]], function(y, N, _) {
var U = this && this.__extends || function() {
var j = function(w, x) {
return j = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(f, l) {
f.__proto__ = l;
} || function(f, l) {
for (var T in l)
l.hasOwnProperty(T) && (f[T] = l[T]);
}, j(w, x);
};
return function(w, x) {
function f() {
this.constructor = w;
}
j(w, x), w.prototype = x === null ? Object.create(x) : (f.prototype = x.prototype, new f());
};
}(), G = y.defaultOptions;
y = N.seriesTypes;
var V = y.column, F = y.ohlc, B = _.merge;
return _ = function(j) {
function w() {
var x = j !== null && j.apply(this, arguments) || this;
return x.data = void 0, x.options = void 0, x.points = void 0, x;
}
return U(w, j), w.prototype.pointAttribs = function(x, f) {
var l = V.prototype.pointAttribs.call(this, x, f), T = this.options, O = x.open < x.close, R = T.lineColor || this.color, k = x.color || this.color;
return l["stroke-width"] = T.lineWidth, l.fill = x.options.color || O && T.upColor || k, l.stroke = x.options.lineColor || O && T.upLineColor || R, f && (x = T.states[f], l.fill = x.color || l.fill, l.stroke = x.lineColor || l.stroke, l["stroke-width"] = x.lineWidth || l["stroke-width"]), l;
}, w.prototype.drawPoints = function() {
var x = this, f = x.chart, l = x.yAxis.reversed;
x.points.forEach(function(T) {
var O = T.graphic, R = !O;
if (typeof T.plotY < "u") {
O || (T.graphic = O = f.renderer.path().add(x.group)), x.chart.styledMode || O.attr(x.pointAttribs(T, T.selected && "select")).shadow(x.options.shadow);
var k = O.strokeWidth() % 2 / 2, b = Math.round(T.plotX) - k, S = T.plotOpen, v = T.plotClose, h = Math.min(S, v);
S = Math.max(S, v);
var c = Math.round(T.shapeArgs.width / 2);
v = l ? S !== T.yBottom : Math.round(h) !== Math.round(T.plotHigh);
var u = l ? Math.round(h) !== Math.round(T.plotHigh) : S !== T.yBottom;
h = Math.round(h) + k, S = Math.round(S) + k, k = [], k.push(["M", b - c, S], ["L", b - c, h], ["L", b + c, h], ["L", b + c, S], ["Z"], ["M", b, h], ["L", b, v ? Math.round(l ? T.yBottom : T.plotHigh) : h], ["M", b, S], ["L", b, u ? Math.round(l ? T.plotHigh : T.yBottom) : S]), O[R ? "attr" : "animate"]({ d: k }).addClass(T.getClassName(), !0);
}
});
}, w.defaultOptions = B(F.defaultOptions, G.plotOptions, { states: { hover: { lineWidth: 2 } }, tooltip: G.plotOptions.ohlc.tooltip, threshold: null, lineColor: "#000000", lineWidth: 1, upColor: "#ffffff", stickyTracking: !0 }), w;
}(F), N.registerSeriesType("candlestick", _), _;
}), C(o, "Series/Flags/FlagsPoint.js", [o["Core/Series/SeriesRegistry.js"], o["Core/Utilities.js"]], function(y, N) {
var _ = this && this.__extends || function() {
var G = function(V, F) {
return G = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(B, j) {
B.__proto__ = j;
} || function(B, j) {
for (var w in j)
j.hasOwnProperty(w) && (B[w] = j[w]);
}, G(V, F);
};
return function(V, F) {
function B() {
this.constructor = V;
}
G(V, F), V.prototype = F === null ? Object.create(F) : (B.prototype = F.prototype, new B());
};
}(), U = N.isNumber;
return function(G) {
function V() {
var F = G !== null && G.apply(this, arguments) || this;
return F.options = void 0, F.series = void 0, F;
}
return _(V, G), V.prototype.isValid = function() {
return U(this.y) || typeof this.y > "u";
}, V.prototype.hasNewShapeType = function() {
var F = this.options.shape || this.series.options.shape;
return this.graphic && F && F !== this.graphic.symbolKey;
}, V;
}(y.seriesTypes.column.prototype.pointClass);
}), C(o, "Series/OnSeriesComposition.js", [
o["Series/Column/ColumnSeries.js"],
o["Core/Series/Series.js"],
o["Core/Utilities.js"]
], function(y, N, _) {
var U = y.prototype, G = N.prototype, V = _.defined, F = _.stableSort, B;
return function(j) {
function w() {
return G.getPlotBox.call(this.options.onSeries && this.chart.get(this.options.onSeries) || this);
}
function x() {
U.translate.apply(this);
var l = this, T = l.options, O = l.chart, R = l.points, k = T.onSeries, b = (k = k && O.get(k)) && k.options.step, S = k && k.points, v = O.inverted, h = l.xAxis, c = l.yAxis;
O = R.length - 1;
var u;
T = T.onKey || "y";
var i = S && S.length, p = 0, a;
if (k && k.visible && i) {
p = (k.pointXOffset || 0) + (k.barW || 0) / 2;
var t = k.currentDataGrouping, s = S[i - 1].x + (t ? t.totalRange : 0);
for (F(R, function(D, I) {
return D.x - I.x;
}), T = "plot" + T[0].toUpperCase() + T.substr(1); i-- && R[O]; ) {
var n = S[i];
if (t = R[O], t.y = n.y, n.x <= t.x && typeof n[T] < "u") {
if (t.x <= s && (t.plotY = n[T], n.x < t.x && !b && (a = S[i + 1]) && typeof a[T] < "u")) {
var P = (t.x - n.x) / (a.x - n.x);
t.plotY += P * (a[T] - n[T]), t.y += P * (a.y - n.y);
}
if (O--, i++, 0 > O)
break;
}
}
}
R.forEach(function(D, I) {
if (D.plotX += p, (typeof D.plotY > "u" || v) && (0 <= D.plotX && D.plotX <= h.len ? v ? (D.plotY = h.translate(D.x, 0, 1, 0, 1), D.plotX = V(D.y) ? c.translate(D.y, 0, 0, 0, 1) : 0) : D.plotY = (h.opposite ? 0 : l.yAxis.len) + h.offset : D.shapeArgs = {}), (u = R[I - 1]) && u.plotX === D.plotX) {
typeof u.stackIndex > "u" && (u.stackIndex = 0);
var W = u.stackIndex + 1;
}
D.stackIndex = W;
}), this.onSeries = k;
}
var f = [];
j.compose = function(l) {
if (f.indexOf(l) === -1) {
f.push(l);
var T = l.prototype;
T.getPlotBox = w, T.translate = x;
}
return l;
}, j.getPlotBox = w, j.translate = x;
}(B || (B = {})), B;
}), C(
o,
"Series/Flags/FlagsSymbols.js",
[o["Core/Renderer/RendererRegistry.js"], o["Core/Renderer/SVG/SVGRenderer.js"]],
function(y, N) {
function _(G) {
U[G + "pin"] = function(V, F, B, j, w) {
var x = w && w.anchorX;
w = w && w.anchorY, G === "circle" && j > B && (V -= Math.round((j - B) / 2), B = j);
var f = U[G](V, F, B, j);
if (x && w) {
var l = x;
G === "circle" ? l = V + B / 2 : (V = f[0], B = f[1], V[0] === "M" && B[0] === "L" && (l = (V[1] + B[1]) / 2)), f.push(["M", l, F > w ? F : F + j], ["L", x, w]), f = f.concat(U.circle(x - 1, w - 1, 2, 2));
}
return f;
};
}
var U = N.prototype.symbols;
return U.flag = function(G, V, F, B, j) {
var w = j && j.anchorX || G;
j = j && j.anchorY || V;
var x = U.circle(w - 1, j - 1, 2, 2);
return x.push(["M", w, j], ["L", G, V + B], ["L", G, V], ["L", G + F, V], ["L", G + F, V + B], ["L", G, V + B], ["Z"]), x;
}, _("circle"), _("square"), y = y.getRendererType(), y !== N && (y.prototype.symbols.circlepin = U.circlepin, y.prototype.symbols.flag = U.flag, y.prototype.symbols.squarepin = U.squarepin), U;
}
), C(o, "Series/Flags/FlagsSeries.js", [
o["Series/Flags/FlagsPoint.js"],
o["Core/Globals.js"],
o["Series/OnSeriesComposition.js"],
o["Core/Renderer/RendererUtilities.js"],
o["Core/Series/SeriesRegistry.js"],
o["Core/Renderer/SVG/SVGElement.js"],
o["Core/Utilities.js"]
], function(y, N, _, U, G, V, F) {
var B = this && this.__extends || function() {
var k = function(b, S) {
return k = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(v, h) {
v.__proto__ = h;
} || function(v, h) {
for (var c in h)
h.hasOwnProperty(c) && (v[c] = h[c]);
}, k(b, S);
};
return function(b, S) {
function v() {
this.constructor = b;
}
k(b, S), b.prototype = S === null ? Object.create(S) : (v.prototype = S.prototype, new v());
};
}();
N = N.noop;
var j = U.distribute, w = G.series, x = G.seriesTypes.column, f = F.addEvent, l = F.defined;
U = F.extend;
var T = F.merge, O = F.objectEach, R = F.wrap;
return F = function(k) {
function b() {
var S = k !== null && k.apply(this, arguments) || this;
return S.data = void 0, S.options = void 0, S.points = void 0, S;
}
return B(b, k), b.prototype.animate = function(S) {
S && this.setClip();
}, b.prototype.drawPoints = function() {
var S = this.points, v = this.chart, h = v.renderer, c = v.inverted, u = this.options, i = u.y, p, a = this.yAxis, t = {}, s = [];
for (p = S.length; p--; ) {
var n = S[p], P = (c ? n.plotY : n.plotX) > this.xAxis.len, D = n.plotX, I = n.stackIndex, W = n.options.shape || u.shape, E = n.plotY;
typeof E < "u" && (E = n.plotY + i - (typeof I < "u" && I * u.stackDistance)), n.anchorX = I ? void 0 : n.plotX;
var X = I ? void 0 : n.plotY, g = W !== "flag";
I = n.graphic, typeof E < "u" && 0 <= D && !P ? (I && n.hasNewShapeType() && (I = I.destroy()), I || (I = n.graphic = h.label("", null, null, W, null, null, u.useHTML).addClass("highcharts-point").add(this.markerGroup), n.graphic.div && (n.graphic.div.point = n), I.isNew = !0), I.attr({
align: g ? "center" : "left",
width: u.width,
height: u.height,
"text-align": u.textAlign
}), v.styledMode || I.attr(this.pointAttribs(n)).css(T(u.style, n.style)).shadow(u.shadow), 0 < D && (D -= I.strokeWidth() % 2), W = { y: E, anchorY: X }, u.allowOverlapX && (W.x = D, W.anchorX = n.anchorX), I.attr({ text: n.options.title || u.title || "A" })[I.isNew ? "attr" : "animate"](W), u.allowOverlapX || (t[n.plotX] ? t[n.plotX].size = Math.max(t[n.plotX].size, I.width) : t[n.plotX] = { align: g ? 0.5 : 0, size: I.width, target: D, anchorX: D }), n.tooltipPos = [D, E + a.pos - v.plotTop]) : I && (n.graphic = I.destroy());
}
if (!u.allowOverlapX) {
var m = 100;
O(t, function(L) {
L.plotX = L.anchorX, s.push(L), m = Math.max(L.size, m);
}), j(s, c ? a.len : this.xAxis.len, m), S.forEach(function(L) {
var z = L.graphic && t[L.plotX];
z && (L.graphic[L.graphic.isNew ? "attr" : "animate"]({ x: z.pos + z.align * z.size, anchorX: L.anchorX }), l(z.pos) ? L.graphic.isNew = !1 : (L.graphic.attr({ x: -9999, anchorX: -9999 }), L.graphic.isNew = !0));
});
}
u.useHTML && R(this.markerGroup, "on", function(L) {
return V.prototype.on.apply(L.apply(this, [].slice.call(arguments, 1)), [].slice.call(arguments, 1));
});
}, b.prototype.drawTracker = function() {
var S = this.points;
k.prototype.drawTracker.call(this), S.forEach(function(v) {
var h = v.graphic;
h && (v.unbindMouseOver && v.unbindMouseOver(), v.unbindMouseOver = f(h.element, "mouseover", function() {
0 < v.stackIndex && !v.raised && (v._y = h.y, h.attr({ y: v._y - 8 }), v.raised = !0), S.forEach(function(c) {
c !== v && c.raised && c.graphic && (c.graphic.attr({ y: c._y }), c.raised = !1);
});
}));
});
}, b.prototype.pointAttribs = function(S, v) {
var h = this.options, c = S && S.color || this.color, u = h.lineColor, i = S && S.lineWidth;
return S = S && S.fillColor || h.fillColor, v && (S = h.states[v].fillColor, u = h.states[v].lineColor, i = h.states[v].lineWidth), { fill: S || c, stroke: u || c, "stroke-width": i || h.lineWidth || 0 };
}, b.prototype.setClip = function() {
w.prototype.setClip.apply(this, arguments), this.options.clip !== !1 && this.sharedClipKey && this.markerGroup && this.markerGroup.clip(this.chart.sharedClips[this.sharedClipKey]);
}, b.defaultOptions = T(x.defaultOptions, {
pointRange: 0,
allowOverlapX: !1,
shape: "flag",
stackDistance: 12,
textAlign: "center",
tooltip: { pointFormat: "{point.text}" },
threshold: null,
y: -30,
fillColor: "#ffffff",
lineWidth: 1,
states: { hover: { lineColor: "#000000", fillColor: "#ccd6eb" } },
style: { fontSize: "11px", fontWeight: "bold" }
}), b;
}(x), _.compose(F), U(F.prototype, { allowDG: !1, forceCrop: !0, invertible: !1, noSharedTooltip: !0, pointClass: y, sorted: !1, takeOrdinalPosition: !1, trackerGroups: ["markerGroup"], buildKDTree: N, init: w.prototype.init, invertGroups: N }), G.registerSeriesType("flags", F), F;
}), C(o, "Core/Axis/ScrollbarAxis.js", [o["Core/Utilities.js"]], function(y) {
var N = y.addEvent, _ = y.defined, U = y.pick;
return function() {
function G() {
}
return G.compose = function(V, F) {
if (G.composed.indexOf(V) === -1)
G.composed.push(V);
else
return V;
var B = function(j) {
var w = U(j.options && j.options.min, j.min), x = U(j.options && j.options.max, j.max);
return { axisMin: w, axisMax: x, scrollMin: _(j.dataMin) ? Math.min(w, j.min, j.dataMin, U(j.threshold, 1 / 0)) : w, scrollMax: _(j.dataMax) ? Math.max(x, j.max, j.dataMax, U(j.threshold, -1 / 0)) : x };
};
return N(V, "afterInit", function() {
var j = this;
j.options && j.options.scrollbar && j.options.scrollbar.enabled && (j.options.scrollbar.vertical = !j.horiz, j.options.startOnTick = j.options.endOnTick = !1, j.scrollbar = new F(j.chart.renderer, j.options.scrollbar, j.chart), N(j.scrollbar, "changed", function(w) {
var x = B(j), f = x.axisMax, l = x.scrollMin, T = x.scrollMax - l;
_(x.axisMin) && _(f) && (j.horiz && !j.reversed || !j.horiz && j.reversed ? (x = l + T * this.to, l += T * this.from) : (x = l + T * (1 - this.from), l += T * (1 - this.to)), this.shouldUpdateExtremes(w.DOMType) ? j.setExtremes(l, x, !0, w.DOMType !== "mousemove" && w.DOMType !== "touchmove", w) : this.setRange(
this.from,
this.to
));
}));
}), N(V, "afterRender", function() {
var j = B(this), w = j.scrollMin, x = j.scrollMax;
j = this.scrollbar;
var f = this.axisTitleMargin + (this.titleOffset || 0), l = this.chart.scrollbarsOffsets, T = this.options.margin || 0;
j && (this.horiz ? (this.opposite || (l[1] += f), j.position(this.left, this.top + this.height + 2 + l[1] - (this.opposite ? T : 0), this.width, this.height), this.opposite || (l[1] += T), f = 1) : (this.opposite && (l[0] += f), j.position(
j.options.opposite ? this.left + this.width + 2 + l[0] - (this.opposite ? 0 : T) : this.opposite ? 0 : T,
this.top,
this.width,
this.height
), this.opposite && (l[0] += T), f = 0), l[f] += j.size + j.options.margin, isNaN(w) || isNaN(x) || !_(this.min) || !_(this.max) || this.min === this.max ? j.setRange(0, 1) : (l = (this.min - w) / (x - w), w = (this.max - w) / (x - w), this.horiz && !this.reversed || !this.horiz && this.reversed ? j.setRange(l, w) : j.setRange(1 - w, 1 - l)));
}), N(V, "afterGetOffset", function() {
var j = this.scrollbar && !this.scrollbar.options.opposite;
j = this.horiz ? 2 : j ? 3 : 1;
var w = this.scrollbar;
w && (this.chart.scrollbarsOffsets = [0, 0], this.chart.axisOffset[j] += w.size + w.options.margin);
}), V;
}, G.composed = [], G;
}();
}), C(o, "Core/ScrollbarDefaults.js", [o["Core/Globals.js"]], function(y) {
return {
height: y.isTouchDevice ? 20 : 14,
barBorderRadius: 0,
buttonBorderRadius: 0,
liveRedraw: void 0,
margin: 10,
minWidth: 6,
opposite: !0,
step: 0.2,
zIndex: 3,
barBackgroundColor: "#cccccc",
barBorderWidth: 1,
barBorderColor: "#cccccc",
buttonArrowColor: "#333333",
buttonBackgroundColor: "#e6e6e6",
buttonBorderColor: "#cccccc",
buttonBorderWidth: 1,
rifleColor: "#333333",
trackBackgroundColor: "#f2f2f2",
trackBorderColor: "#f2f2f2",
trackBorderWidth: 1
};
}), C(o, "Core/Scrollbar.js", [o["Core/DefaultOptions.js"], o["Core/Globals.js"], o["Core/Axis/ScrollbarAxis.js"], o["Core/ScrollbarDefaults.js"], o["Core/Utilities.js"]], function(y, N, _, U, G) {
var V = y.defaultOptions, F = G.addEvent, B = G.correctFloat, j = G.defined, w = G.destroyObjectProperties, x = G.fireEvent, f = G.merge, l = G.pick, T = G.removeEvent;
return y = function() {
function O(R, k, b) {
this._events = [], this.chart = void 0, this.from = this.chartY = this.chartX = 0, this.scrollbar = this.renderer = this.options = this.group = void 0, this.scrollbarButtons = [], this.scrollbarGroup = void 0, this.scrollbarLeft = 0, this.scrollbarRifles = void 0, this.scrollbarStrokeWidth = 1, this.to = this.size = this.scrollbarTop = 0, this.track = void 0, this.trackBorderWidth = 1, this.userOptions = void 0, this.y = this.x = 0, this.init(R, k, b);
}
return O.compose = function(R) {
_.compose(R, O);
}, O.swapXY = function(R, k) {
return k && R.forEach(function(b) {
for (var S = b.length, v, h = 0; h < S; h += 2)
v = b[h + 1], typeof v == "number" && (b[h + 1] = b[h + 2], b[h + 2] = v);
}), R;
}, O.prototype.addEvents = function() {
var R = this.options.inverted ? [1, 0] : [0, 1], k = this.scrollbarButtons, b = this.scrollbarGroup.element, S = this.track.element, v = this.mouseDownHandler.bind(this), h = this.mouseMoveHandler.bind(this), c = this.mouseUpHandler.bind(this);
R = [[k[R[0]].element, "click", this.buttonToMinClick.bind(this)], [k[R[1]].element, "click", this.buttonToMaxClick.bind(this)], [S, "click", this.trackClick.bind(this)], [b, "mousedown", v], [b.ownerDocument, "mousemove", h], [b.ownerDocument, "mouseup", c]], N.hasTouch && R.push(
[b, "touchstart", v],
[b.ownerDocument, "touchmove", h],
[b.ownerDocument, "touchend", c]
), R.forEach(function(u) {
F.apply(null, u);
}), this._events = R;
}, O.prototype.buttonToMaxClick = function(R) {
var k = (this.to - this.from) * l(this.options.step, 0.2);
this.updatePosition(this.from + k, this.to + k), x(this, "changed", { from: this.from, to: this.to, trigger: "scrollbar", DOMEvent: R });
}, O.prototype.buttonToMinClick = function(R) {
var k = B(this.to - this.from) * l(this.options.step, 0.2);
this.updatePosition(B(this.from - k), B(this.to - k)), x(this, "changed", {
from: this.from,
to: this.to,
trigger: "scrollbar",
DOMEvent: R
});
}, O.prototype.cursorToScrollbarPosition = function(R) {
var k = this.options;
return k = k.minWidth > this.calculatedWidth ? k.minWidth : 0, { chartX: (R.chartX - this.x - this.xOffset) / (this.barWidth - k), chartY: (R.chartY - this.y - this.yOffset) / (this.barWidth - k) };
}, O.prototype.destroy = function() {
var R = this, k = R.chart.scroller;
R.removeEvents(), ["track", "scrollbarRifles", "scrollbar", "scrollbarGroup", "group"].forEach(function(b) {
R[b] && R[b].destroy && (R[b] = R[b].destroy());
}), k && R === k.scrollbar && (k.scrollbar = null, w(k.scrollbarButtons));
}, O.prototype.drawScrollbarButton = function(R) {
var k = this.renderer, b = this.scrollbarButtons, S = this.options, v = this.size, h = k.g().add(this.group);
b.push(h), h = k.rect().addClass("highcharts-scrollbar-button").add(h), this.chart.styledMode || h.attr({ stroke: S.buttonBorderColor, "stroke-width": S.buttonBorderWidth, fill: S.buttonBackgroundColor }), h.attr(h.crisp({ x: -0.5, y: -0.5, width: v + 1, height: v + 1, r: S.buttonBorderRadius }, h.strokeWidth())), h = k.path(O.swapXY([["M", v / 2 + (R ? -1 : 1), v / 2 - 3], ["L", v / 2 + (R ? -1 : 1), v / 2 + 3], ["L", v / 2 + (R ? 2 : -2), v / 2]], S.vertical)).addClass("highcharts-scrollbar-arrow").add(b[R]), this.chart.styledMode || h.attr({ fill: S.buttonArrowColor });
}, O.prototype.init = function(R, k, b) {
this.scrollbarButtons = [], this.renderer = R, this.userOptions = k, this.options = f(U, V.scrollbar, k), this.chart = b, this.size = l(this.options.size, this.options.height), k.enabled && (this.render(), this.addEvents());
}, O.prototype.mouseDownHandler = function(R) {
R = this.chart.pointer.normalize(R), R = this.cursorToScrollbarPosition(R), this.chartX = R.chartX, this.chartY = R.chartY, this.initPositions = [this.from, this.to], this.grabbedCenter = !0;
}, O.prototype.mouseMoveHandler = function(R) {
var k = this.chart.pointer.normalize(R), b = this.options.vertical ? "chartY" : "chartX", S = this.initPositions || [];
!this.grabbedCenter || R.touches && R.touches[0][b] === 0 || (k = this.cursorToScrollbarPosition(k)[b], b = this[b], b = k - b, this.hasDragged = !0, this.updatePosition(S[0] + b, S[1] + b), this.hasDragged && x(this, "changed", { from: this.from, to: this.to, trigger: "scrollbar", DOMType: R.type, DOMEvent: R }));
}, O.prototype.mouseUpHandler = function(R) {
this.hasDragged && x(this, "changed", { from: this.from, to: this.to, trigger: "scrollbar", DOMType: R.type, DOMEvent: R }), this.grabbedCenter = this.hasDragged = this.chartX = this.chartY = null;
}, O.prototype.position = function(R, k, b, S) {
var v = this.options.vertical, h = this.rendered ? "animate" : "attr", c = 0;
this.x = R, this.y = k + this.trackBorderWidth, this.width = b, this.xOffset = this.height = S, this.yOffset = c, v ? (this.width = this.yOffset = b = c = this.size, this.xOffset = k = 0, this.barWidth = S - 2 * b, this.x = R += this.options.margin) : (this.height = this.xOffset = S = k = this.size, this.barWidth = b - 2 * S, this.y += this.options.margin), this.group[h]({ translateX: R, translateY: this.y }), this.track[h]({ width: b, height: S }), this.scrollbarButtons[1][h]({ translateX: v ? 0 : b - k, translateY: v ? S - c : 0 });
}, O.prototype.removeEvents = function() {
this._events.forEach(function(R) {
T.apply(null, R);
}), this._events.length = 0;
}, O.prototype.render = function() {
var R = this.renderer, k = this.options, b = this.size, S = this.chart.styledMode, v = R.g("scrollbar").attr({ zIndex: k.zIndex, translateY: -99999 }).add();
this.group = v, this.track = R.rect().addClass("highcharts-scrollbar-track").attr({ x: 0, r: k.trackBorderRadius || 0, height: b, width: b }).add(v), S || this.track.attr({ fill: k.trackBackgroundColor, stroke: k.trackBorderColor, "stroke-width": k.trackBorderWidth }), this.trackBorderWidth = this.track.strokeWidth(), this.track.attr({ y: -this.trackBorderWidth % 2 / 2 }), this.scrollbarGroup = R.g().add(v), this.scrollbar = R.rect().addClass("highcharts-scrollbar-thumb").attr({ height: b, width: b, r: k.barBorderRadius || 0 }).add(this.scrollbarGroup), this.scrollbarRifles = R.path(O.swapXY([["M", -3, b / 4], ["L", -3, 2 * b / 3], ["M", 0, b / 4], ["L", 0, 2 * b / 3], ["M", 3, b / 4], ["L", 3, 2 * b / 3]], k.vertical)).addClass("highcharts-scrollbar-rifles").add(this.scrollbarGroup), S || (this.scrollbar.attr({ fill: k.barBackgroundColor, stroke: k.barBorderColor, "stroke-width": k.barBorderWidth }), this.scrollbarRifles.attr({ stroke: k.rifleColor, "stroke-width": 1 })), this.scrollbarStrokeWidth = this.scrollbar.strokeWidth(), this.scrollbarGroup.translate(-this.scrollbarStrokeWidth % 2 / 2, -this.scrollbarStrokeWidth % 2 / 2), this.drawScrollbarButton(0), this.drawScrollbarButton(1);
}, O.prototype.setRange = function(R, k) {
var b = this.options, S = b.vertical, v = b.minWidth, h = this.barWidth, c = !this.rendered || this.hasDragged || this.chart.navigator && this.chart.navigator.hasDragged ? "attr" : "animate";
if (j(h)) {
var u = h * Math.min(k, 1);
R = Math.max(R, 0);
var i = Math.ceil(h * R);
this.calculatedWidth = u = B(u - i), u < v && (i = (h - v + u) * R, u = v), v = Math.floor(i + this.xOffset + this.yOffset), h = u / 2 - 0.5, this.from = R, this.to = k, S ? (this.scrollbarGroup[c]({ translateY: v }), this.scrollbar[c]({ height: u }), this.scrollbarRifles[c]({ translateY: h }), this.scrollbarTop = v, this.scrollbarLeft = 0) : (this.scrollbarGroup[c]({ translateX: v }), this.scrollbar[c]({ width: u }), this.scrollbarRifles[c]({ translateX: h }), this.scrollbarLeft = v, this.scrollbarTop = 0), 12 >= u ? this.scrollbarRifles.hide() : this.scrollbarRifles.show(!0), b.showFull === !1 && (0 >= R && 1 <= k ? this.group.hide() : this.group.show()), this.rendered = !0;
}
}, O.prototype.shouldUpdateExtremes = function(R) {
return l(this.options.liveRedraw, N.svg && !N.isTouchDevice && !this.chart.isBoosting) || R === "mouseup" || R === "touchend" || !j(R);
}, O.prototype.trackClick = function(R) {
var k = this.chart.pointer.normalize(R), b = this.to - this.from, S = this.y + this.scrollbarTop, v = this.x + this.scrollbarLeft;
this.options.vertical && k.chartY > S || !this.options.vertical && k.chartX > v ? this.updatePosition(this.from + b, this.to + b) : this.updatePosition(this.from - b, this.to - b), x(this, "changed", { from: this.from, to: this.to, trigger: "scrollbar", DOMEvent: R });
}, O.prototype.update = function(R) {
this.destroy(), this.init(this.chart.renderer, f(
!0,
this.options,
R
), this.chart);
}, O.prototype.updatePosition = function(R, k) {
1 < k && (R = B(1 - B(k - R)), k = 1), 0 > R && (k = B(k - R), R = 0), this.from = R, this.to = k;
}, O.defaultOptions = U, O;
}(), V.scrollbar = f(!0, y.defaultOptions, V.scrollbar), y;
}), C(o, "Core/Axis/NavigatorAxis.js", [o["Core/Globals.js"], o["Core/Utilities.js"]], function(y, N) {
var _ = y.isTouchDevice, U = N.addEvent, G = N.correctFloat, V = N.defined, F = N.isNumber, B = N.pick, j = function() {
function w(x) {
this.axis = x;
}
return w.prototype.destroy = function() {
this.axis = void 0;
}, w.prototype.toFixedRange = function(x, f, l, T) {
var O = this.axis, R = O.chart;
R = R && R.fixedRange;
var k = (O.pointRange || 0) / 2;
return x = B(l, O.translate(x, !0, !O.horiz)), f = B(T, O.translate(f, !0, !O.horiz)), O = R && (f - x) / R, V(l) || (x = G(x + k)), V(T) || (f = G(f - k)), 0.7 < O && 1.3 > O && (T ? x = f - R : f = x + R), F(x) && F(f) || (x = f = void 0), { min: x, max: f };
}, w;
}();
return function() {
function w() {
}
return w.compose = function(x) {
x.keepProps.push("navigatorAxis"), U(x, "init", function() {
this.navigatorAxis || (this.navigatorAxis = new j(this));
}), U(x, "zoom", function(f) {
var l = this.chart.options, T = l.navigator, O = this.navigatorAxis, R = l.chart.pinchType, k = l.rangeSelector;
l = l.chart.zoomType, this.isXAxis && (T && T.enabled || k && k.enabled) && (l === "y" ? f.zoomed = !1 : (!_ && l === "xy" || _ && R === "xy") && this.options.range && (T = O.previousZoom, V(f.newMin) ? O.previousZoom = [this.min, this.max] : T && (f.newMin = T[0], f.newMax = T[1], O.previousZoom = void 0))), typeof f.zoomed < "u" && f.preventDefault();
});
}, w.AdditionsClass = j, w;
}();
}), C(o, "Core/Navigator.js", [
o["Core/Axis/Axis.js"],
o["Core/Chart/Chart.js"],
o["Core/Color/Color.js"],
o["Core/Globals.js"],
o["Core/Axis/NavigatorAxis.js"],
o["Core/DefaultOptions.js"],
o["Core/Renderer/RendererRegistry.js"],
o["Core/Scrollbar.js"],
o["Core/Series/Series.js"],
o["Core/Series/SeriesRegistry.js"],
o["Core/Utilities.js"]
], function(y, N, _, U, G, V, F, B, j, w, x) {
_ = _.parse;
var f = U.hasTouch, l = U.isTouchDevice, T = V.defaultOptions, O = x.addEvent, R = x.clamp, k = x.correctFloat, b = x.defined, S = x.destroyObjectProperties, v = x.erase, h = x.extend, c = x.find, u = x.isArray, i = x.isNumber, p = x.merge, a = x.pick, t = x.removeEvent, s = x.splat, n = function(D) {
for (var I = [], W = 1; W < arguments.length; W++)
I[W - 1] = arguments[W];
if (I = [].filter.call(I, i), I.length)
return Math[D].apply(0, I);
};
V = typeof w.seriesTypes.areaspline > "u" ? "line" : "areaspline", h(T, { navigator: { height: 40, margin: 25, maskInside: !0, handles: { width: 7, height: 15, symbols: ["navigator-handle", "navigator-handle"], enabled: !0, lineWidth: 1, backgroundColor: "#f2f2f2", borderColor: "#999999" }, maskFill: _("#6685c2").setOpacity(0.3).get(), outlineColor: "#cccccc", outlineWidth: 1, series: {
type: V,
fillOpacity: 0.05,
lineWidth: 1,
compare: null,
dataGrouping: { approximation: "average", enabled: !0, groupPixelWidth: 2, firstAnchor: "firstPoint", anchor: "middle", lastAnchor: "lastPoint", units: [["millisecond", [1, 2, 5, 10, 20, 25, 50, 100, 200, 500]], ["second", [1, 2, 5, 10, 15, 30]], ["minute", [1, 2, 5, 10, 15, 30]], ["hour", [1, 2, 3, 4, 6, 8, 12]], ["day", [1, 2, 3, 4]], ["week", [1, 2, 3]], ["month", [1, 3, 6]], ["year", null]] },
dataLabels: { enabled: !1, zIndex: 2 },
id: "highcharts-navigator-series",
className: "highcharts-navigator-series",
lineColor: null,
marker: { enabled: !1 },
threshold: null
}, xAxis: { overscroll: 0, className: "highcharts-navigator-xaxis", tickLength: 0, lineWidth: 0, gridLineColor: "#e6e6e6", gridLineWidth: 1, tickPixelInterval: 200, labels: { align: "left", style: { color: "#999999" }, x: 3, y: -4 }, crosshair: !1 }, yAxis: { className: "highcharts-navigator-yaxis", gridLineWidth: 0, startOnTick: !1, endOnTick: !1, minPadding: 0.1, maxPadding: 0.1, labels: { enabled: !1 }, crosshair: !1, title: { text: null }, tickLength: 0, tickWidth: 0 } } }), F.getRendererType().prototype.symbols["navigator-handle"] = function(D, I, W, E, X) {
return D = (X && X.width || 0) / 2, I = Math.round(D / 3) + 0.5, X = X && X.height || 0, [["M", -D - 1, 0.5], ["L", D, 0.5], ["L", D, X + 0.5], ["L", -D - 1, X + 0.5], ["L", -D - 1, 0.5], ["M", -I, 4], ["L", -I, X - 3], ["M", I - 1, 4], ["L", I - 1, X - 3]];
};
var P = function() {
function D(I) {
this.zoomedMin = this.zoomedMax = this.yAxis = this.xAxis = this.top = this.size = this.shades = this.rendered = this.range = this.outlineHeight = this.outline = this.opposite = this.navigatorSize = this.navigatorSeries = this.navigatorOptions = this.navigatorGroup = this.navigatorEnabled = this.left = this.height = this.handles = this.chart = this.baseSeries = void 0, this.init(I);
}
return D.prototype.drawHandle = function(I, W, E, X) {
var g = this.navigatorOptions.handles.height;
this.handles[W][X](E ? { translateX: Math.round(this.left + this.height / 2), translateY: Math.round(this.top + parseInt(I, 10) + 0.5 - g) } : { translateX: Math.round(this.left + parseInt(I, 10)), translateY: Math.round(this.top + this.height / 2 - g / 2 - 1) });
}, D.prototype.drawOutline = function(I, W, E, X) {
var g = this.navigatorOptions.maskInside, m = this.outline.strokeWidth(), L = m / 2, z = m % 2 / 2;
m = this.outlineHeight;
var $ = this.scrollbarHeight || 0, Q = this.size, A = this.left - $, H = this.top;
E ? (A -= L, E = H + W + z, W = H + I + z, z = [["M", A + m, H - $ - z], ["L", A + m, E], ["L", A, E], ["L", A, W], ["L", A + m, W], ["L", A + m, H + Q + $]], g && z.push(["M", A + m, E - L], ["L", A + m, W + L])) : (I += A + $ - z, W += A + $ - z, H += L, z = [["M", A, H], ["L", I, H], ["L", I, H + m], ["L", W, H + m], ["L", W, H], ["L", A + Q + 2 * $, H]], g && z.push(["M", I - L, H], ["L", W + L, H])), this.outline[X]({ d: z });
}, D.prototype.drawMasks = function(I, W, E, X) {
var g = this.left, m = this.top, L = this.height;
if (E)
var z = [g, g, g], $ = [m, m + I, m + W], Q = [L, L, L], A = [I, W - I, this.size - W];
else
z = [g, g + I, g + W], $ = [m, m, m], Q = [I, W - I, this.size - W], A = [L, L, L];
this.shades.forEach(function(H, Y) {
H[X]({ x: z[Y], y: $[Y], width: Q[Y], height: A[Y] });
});
}, D.prototype.renderElements = function() {
var I = this, W = I.navigatorOptions, E = W.maskInside, X = I.chart, g = X.renderer, m, L = { cursor: X.inverted ? "ns-resize" : "ew-resize" };
I.navigatorGroup = m = g.g("navigator").attr({ zIndex: 8, visibility: "hidden" }).add(), [!E, E, !E].forEach(function(z, $) {
I.shades[$] = g.rect().addClass("highcharts-navigator-mask" + ($ === 1 ? "-inside" : "-outside")).add(m), X.styledMode || I.shades[$].attr({ fill: z ? W.maskFill : "rgba(0,0,0,0)" }).css($ === 1 && L);
}), I.outline = g.path().addClass("highcharts-navigator-outline").add(m), X.styledMode || I.outline.attr({ "stroke-width": W.outlineWidth, stroke: W.outlineColor }), W.handles.enabled && [0, 1].forEach(function(z) {
if (W.handles.inverted = X.inverted, I.handles[z] = g.symbol(W.handles.symbols[z], -W.handles.width / 2 - 1, 0, W.handles.width, W.handles.height, W.handles), I.handles[z].attr({ zIndex: 7 - z }).addClass("highcharts-navigator-handle highcharts-navigator-handle-" + ["left", "right"][z]).add(m), !X.styledMode) {
var $ = W.handles;
I.handles[z].attr({ fill: $.backgroundColor, stroke: $.borderColor, "stroke-width": $.lineWidth }).css(L);
}
});
}, D.prototype.update = function(I) {
(this.series || []).forEach(function(W) {
W.baseSeries && delete W.baseSeries.navigatorSeries;
}), this.destroy(), p(!0, this.chart.options.navigator, this.options, I), this.init(this.chart);
}, D.prototype.render = function(I, W, E, X) {
var g = this.chart, m = this.scrollbarHeight, L, z = this.xAxis, $ = z.pointRange || 0, Q = z.navigatorAxis.fake ? g.xAxis[0] : z, A = this.navigatorEnabled, H, Y = this.rendered, Z = g.inverted, q = g.xAxis[0].minRange, it = g.xAxis[0].options.maxRange;
if (!this.hasDragged || b(E)) {
if (I = k(I - $ / 2), W = k(W + $ / 2), !i(I) || !i(W))
if (Y)
E = 0, X = a(z.width, Q.width);
else
return;
this.left = a(z.left, g.plotLeft + m + (Z ? g.plotWidth : 0)), this.size = H = L = a(z.len, (Z ? g.plotHeight : g.plotWidth) - 2 * m), g = Z ? m : L + 2 * m, E = a(E, z.toPixels(I, !0)), X = a(X, z.toPixels(W, !0)), i(E) && Math.abs(E) !== 1 / 0 || (E = 0, X = g), I = z.toValue(E, !0), W = z.toValue(X, !0);
var et = Math.abs(k(W - I));
et < q ? this.grabbedLeft ? E = z.toPixels(W - q - $, !0) : this.grabbedRight && (X = z.toPixels(I + q + $, !0)) : b(it) && k(et - $) > it && (this.grabbedLeft ? E = z.toPixels(W - it - $, !0) : this.grabbedRight && (X = z.toPixels(I + it + $, !0))), this.zoomedMax = R(Math.max(E, X), 0, H), this.zoomedMin = R(this.fixedWidth ? this.zoomedMax - this.fixedWidth : Math.min(E, X), 0, H), this.range = this.zoomedMax - this.zoomedMin, H = Math.round(this.zoomedMax), E = Math.round(this.zoomedMin), A && (this.navigatorGroup.attr({ visibility: "visible" }), Y = Y && !this.hasDragged ? "animate" : "attr", this.drawMasks(E, H, Z, Y), this.drawOutline(E, H, Z, Y), this.navigatorOptions.handles.enabled && (this.drawHandle(E, 0, Z, Y), this.drawHandle(H, 1, Z, Y))), this.scrollbar && (Z ? (Z = this.top - m, Q = this.left - m + (A || !Q.opposite ? 0 : (Q.titleOffset || 0) + Q.axisTitleMargin), m = L + 2 * m) : (Z = this.top + (A ? this.height : -m), Q = this.left - m), this.scrollbar.position(Q, Z, g, m), this.scrollbar.setRange(this.zoomedMin / (L || 1), this.zoomedMax / (L || 1))), this.rendered = !0;
}
}, D.prototype.addMouseEvents = function() {
var I = this, W = I.chart, E = W.container, X = [], g, m;
I.mouseMoveHandler = g = function(L) {
I.onMouseMove(L);
}, I.mouseUpHandler = m = function(L) {
I.onMouseUp(L);
}, X = I.getPartsEvents("mousedown"), X.push(O(W.renderTo, "mousemove", g), O(E.ownerDocument, "mouseup", m)), f && (X.push(O(W.renderTo, "touchmove", g), O(E.ownerDocument, "touchend", m)), X.concat(I.getPartsEvents("touchstart"))), I.eventsToUnbind = X, I.series && I.series[0] && X.push(O(I.series[0].xAxis, "foundExtremes", function() {
W.navigator.modifyNavigatorAxisExtremes();
}));
}, D.prototype.getPartsEvents = function(I) {
var W = this, E = [];
return ["shades", "handles"].forEach(function(X) {
W[X].forEach(function(g, m) {
E.push(O(g.element, I, function(L) {
W[X + "Mousedown"](L, m);
}));
});
}), E;
}, D.prototype.shadesMousedown = function(I, W) {
I = this.chart.pointer.normalize(I);
var E = this.chart, X = this.xAxis, g = this.zoomedMin, m = this.left, L = this.size, z = this.range, $ = I.chartX;
if (E.inverted && ($ = I.chartY, m = this.top), W === 1)
this.grabbedCenter = $, this.fixedWidth = z, this.dragOffset = $ - g;
else {
if (I = $ - m - z / 2, W === 0)
I = Math.max(0, I);
else if (W === 2 && I + z >= L)
if (I = L - z, this.reversedExtremes) {
I -= z;
var Q = this.getUnionExtremes().dataMin;
} else
var A = this.getUnionExtremes().dataMax;
I !== g && (this.fixedWidth = z, W = X.navigatorAxis.toFixedRange(I, I + z, Q, A), b(W.min) && E.xAxis[0].setExtremes(Math.min(W.min, W.max), Math.max(W.min, W.max), !0, null, { trigger: "navigator" }));
}
}, D.prototype.handlesMousedown = function(I, W) {
this.chart.pointer.normalize(I), I = this.chart;
var E = I.xAxis[0], X = this.reversedExtremes;
W === 0 ? (this.grabbedLeft = !0, this.otherHandlePos = this.zoomedMax, this.fixedExtreme = X ? E.min : E.max) : (this.grabbedRight = !0, this.otherHandlePos = this.zoomedMin, this.fixedExtreme = X ? E.max : E.min), I.fixedRange = null;
}, D.prototype.onMouseMove = function(I) {
var W = this, E = W.chart, X = W.left, g = W.navigatorSize, m = W.range, L = W.dragOffset, z = E.inverted;
I.touches && I.touches[0].pageX === 0 || (I = E.pointer.normalize(I), E = I.chartX, z && (X = W.top, E = I.chartY), W.grabbedLeft ? (W.hasDragged = !0, W.render(0, 0, E - X, W.otherHandlePos)) : W.grabbedRight ? (W.hasDragged = !0, W.render(0, 0, W.otherHandlePos, E - X)) : W.grabbedCenter && (W.hasDragged = !0, E < L ? E = L : E > g + L - m && (E = g + L - m), W.render(0, 0, E - L, E - L + m)), W.hasDragged && W.scrollbar && a(W.scrollbar.options.liveRedraw, U.svg && !l && !this.chart.isBoosting) && (I.DOMType = I.type, setTimeout(function() {
W.onMouseUp(I);
}, 0)));
}, D.prototype.onMouseUp = function(I) {
var W = this.chart, E = this.xAxis, X = this.scrollbar, g = I.DOMEvent || I, m = W.inverted, L = this.rendered && !this.hasDragged ? "animate" : "attr";
if (this.hasDragged && (!X || !X.hasDragged) || I.trigger === "scrollbar") {
if (X = this.getUnionExtremes(), this.zoomedMin === this.otherHandlePos)
var z = this.fixedExtreme;
else if (this.zoomedMax === this.otherHandlePos)
var $ = this.fixedExtreme;
this.zoomedMax === this.size && ($ = this.reversedExtremes ? X.dataMin : X.dataMax), this.zoomedMin === 0 && (z = this.reversedExtremes ? X.dataMax : X.dataMin), E = E.navigatorAxis.toFixedRange(this.zoomedMin, this.zoomedMax, z, $), b(E.min) && W.xAxis[0].setExtremes(Math.min(E.min, E.max), Math.max(E.min, E.max), !0, this.hasDragged ? !1 : null, { trigger: "navigator", triggerOp: "navigator-drag", DOMEvent: g });
}
I.DOMType !== "mousemove" && I.DOMType !== "touchmove" && (this.grabbedLeft = this.grabbedRight = this.grabbedCenter = this.fixedWidth = this.fixedExtreme = this.otherHandlePos = this.hasDragged = this.dragOffset = null), this.navigatorEnabled && i(this.zoomedMin) && i(this.zoomedMax) && (W = Math.round(this.zoomedMin), I = Math.round(this.zoomedMax), this.shades && this.drawMasks(W, I, m, L), this.outline && this.drawOutline(W, I, m, L), this.navigatorOptions.handles.enabled && Object.keys(this.handles).length === this.handles.length && (this.drawHandle(W, 0, m, L), this.drawHandle(I, 1, m, L)));
}, D.prototype.removeEvents = function() {
this.eventsToUnbind && (this.eventsToUnbind.forEach(function(I) {
I();
}), this.eventsToUnbind = void 0), this.removeBaseSeriesEvents();
}, D.prototype.removeBaseSeriesEvents = function() {
var I = this.baseSeries || [];
this.navigatorEnabled && I[0] && (this.navigatorOptions.adaptToUpdatedData !== !1 && I.forEach(function(W) {
t(W, "updatedData", this.updatedDataHandler);
}, this), I[0].xAxis && t(I[0].xAxis, "foundExtremes", this.modifyBaseAxisExtremes));
}, D.prototype.init = function(I) {
var W = I.options, E = W.navigator, X = E.enabled, g = W.scrollbar, m = g.enabled;
W = X ? E.height : 0;
var L = m ? g.height : 0;
this.handles = [], this.shades = [], this.chart = I, this.setBaseSeries(), this.height = W, this.scrollbarHeight = L, this.scrollbarEnabled = m, this.navigatorEnabled = X, this.navigatorOptions = E, this.scrollbarOptions = g, this.outlineHeight = W + L, this.opposite = a(E.opposite, !(X || !I.inverted));
var z = this;
X = z.baseSeries, g = I.xAxis.length, m = I.yAxis.length;
var $ = X && X[0] && X[0].xAxis || I.xAxis[0] || { options: {} };
I.isDirtyBox = !0, z.navigatorEnabled ? (z.xAxis = new y(I, p(
{ breaks: $.options.breaks, ordinal: $.options.ordinal },
E.xAxis,
{ id: "navigator-x-axis", yAxis: "navigator-y-axis", isX: !0, type: "datetime", index: g, isInternal: !0, offset: 0, keepOrdinalPadding: !0, startOnTick: !1, endOnTick: !1, minPadding: 0, maxPadding: 0, zoomEnabled: !1 },
I.inverted ? { offsets: [L, 0, -L, 0], width: W } : { offsets: [0, -L, 0, L], height: W }
)), z.yAxis = new y(I, p(E.yAxis, { id: "navigator-y-axis", alignTicks: !1, offset: 0, index: m, isInternal: !0, reversed: a(E.yAxis && E.yAxis.reversed, I.yAxis[0] && I.yAxis[0].reversed, !1), zoomEnabled: !1 }, I.inverted ? { width: W } : { height: W })), X || E.series.data ? z.updateNavigatorSeries(!1) : I.series.length === 0 && (z.unbindRedraw = O(I, "beforeRedraw", function() {
0 < I.series.length && !z.series && (z.setBaseSeries(), z.unbindRedraw());
})), z.reversedExtremes = I.inverted && !z.xAxis.reversed || !I.inverted && z.xAxis.reversed, z.renderElements(), z.addMouseEvents()) : (z.xAxis = {
chart: I,
navigatorAxis: { fake: !0 },
translate: function(Q, A) {
var H = I.xAxis[0], Y = H.getExtremes(), Z = H.len - 2 * L, q = n("min", H.options.min, Y.dataMin);
return H = n("max", H.options.max, Y.dataMax) - q, A ? Q * H / Z + q : Z * (Q - q) / H;
},
toPixels: function(Q) {
return this.translate(Q);
},
toValue: function(Q) {
return this.translate(Q, !0);
}
}, z.xAxis.navigatorAxis.axis = z.xAxis, z.xAxis.navigatorAxis.toFixedRange = G.AdditionsClass.prototype.toFixedRange.bind(z.xAxis.navigatorAxis)), I.options.scrollbar.enabled && (I.scrollbar = z.scrollbar = new B(I.renderer, p(I.options.scrollbar, { margin: z.navigatorEnabled ? 0 : 10, vertical: I.inverted }), I), O(z.scrollbar, "changed", function(Q) {
var A = z.size, H = A * this.to;
A *= this.from, z.hasDragged = z.scrollbar.hasDragged, z.render(0, 0, A, H), this.shouldUpdateExtremes(Q.DOMType) && setTimeout(function() {
z.onMouseUp(Q);
});
})), z.addBaseSeriesEvents(), z.addChartEvents();
}, D.prototype.getUnionExtremes = function(I) {
var W = this.chart.xAxis[0], E = this.xAxis, X = E.options, g = W.options, m;
return I && W.dataMin === null || (m = { dataMin: a(X && X.min, n("min", g.min, W.dataMin, E.dataMin, E.min)), dataMax: a(X && X.max, n("max", g.max, W.dataMax, E.dataMax, E.max)) }), m;
}, D.prototype.setBaseSeries = function(I, W) {
var E = this.chart, X = this.baseSeries = [];
I = I || E.options && E.options.navigator.baseSeries || (E.series.length ? c(
E.series,
function(g) {
return !g.options.isInternal;
}
).index : 0), (E.series || []).forEach(function(g, m) {
g.options.isInternal || !g.options.showInNavigator && (m !== I && g.options.id !== I || g.options.showInNavigator === !1) || X.push(g);
}), this.xAxis && !this.xAxis.navigatorAxis.fake && this.updateNavigatorSeries(!0, W);
}, D.prototype.updateNavigatorSeries = function(I, W) {
var E = this, X = E.chart, g = E.baseSeries, m, L, z = E.navigatorOptions.series, $, Q = {
enableMouseTracking: !1,
index: null,
linkedTo: null,
group: "nav",
padXAxis: !1,
xAxis: "navigator-x-axis",
yAxis: "navigator-y-axis",
showInLegend: !1,
stacking: void 0,
isInternal: !0,
states: { inactive: { opacity: 1 } }
}, A = E.series = (E.series || []).filter(function(H) {
var Y = H.baseSeries;
return 0 > g.indexOf(Y) ? (Y && (t(Y, "updatedData", E.updatedDataHandler), delete Y.navigatorSeries), H.chart && H.destroy(), !1) : !0;
});
g && g.length && g.forEach(function(H) {
var Y = H.navigatorSeries, Z = h({ color: H.color, visible: H.visible }, u(z) ? T.navigator.series : z);
Y && E.navigatorOptions.adaptToUpdatedData === !1 || (Q.name = "Navigator " + g.length, m = H.options || {}, $ = m.navigatorOptions || {}, Z.dataLabels = s(Z.dataLabels), L = p(m, Q, Z, $), L.pointRange = a(Z.pointRange, $.pointRange, T.plotOptions[L.type || "line"].pointRange), Z = $.data || Z.data, E.hasNavigatorData = E.hasNavigatorData || !!Z, L.data = Z || m.data && m.data.slice(0), Y && Y.options ? Y.update(L, W) : (H.navigatorSeries = X.initSeries(L), H.navigatorSeries.baseSeries = H, A.push(H.navigatorSeries)));
}), (z.data && (!g || !g.length) || u(z)) && (E.hasNavigatorData = !1, z = s(z), z.forEach(function(H, Y) {
Q.name = "Navigator " + (A.length + 1), L = p(
T.navigator.series,
{ color: X.series[Y] && !X.series[Y].options.isInternal && X.series[Y].color || X.options.colors[Y] || X.options.colors[0] },
Q,
H
), L.data = H.data, L.data && (E.hasNavigatorData = !0, A.push(X.initSeries(L)));
})), I && this.addBaseSeriesEvents();
}, D.prototype.addBaseSeriesEvents = function() {
var I = this, W = I.baseSeries || [];
W[0] && W[0].xAxis && W[0].eventsToUnbind.push(O(W[0].xAxis, "foundExtremes", this.modifyBaseAxisExtremes)), W.forEach(function(E) {
E.eventsToUnbind.push(O(E, "show", function() {
this.navigatorSeries && this.navigatorSeries.setVisible(
!0,
!1
);
})), E.eventsToUnbind.push(O(E, "hide", function() {
this.navigatorSeries && this.navigatorSeries.setVisible(!1, !1);
})), this.navigatorOptions.adaptToUpdatedData !== !1 && E.xAxis && E.eventsToUnbind.push(O(E, "updatedData", this.updatedDataHandler)), E.eventsToUnbind.push(O(E, "remove", function() {
this.navigatorSeries && (v(I.series, this.navigatorSeries), b(this.navigatorSeries.options) && this.navigatorSeries.remove(!1), delete this.navigatorSeries);
}));
}, this);
}, D.prototype.getBaseSeriesMin = function(I) {
return this.baseSeries.reduce(function(W, E) {
return Math.min(W, E.xData ? E.xData[0] : W);
}, I);
}, D.prototype.modifyNavigatorAxisExtremes = function() {
var I = this.xAxis, W;
typeof I.getExtremes < "u" && (!(W = this.getUnionExtremes(!0)) || W.dataMin === I.min && W.dataMax === I.max || (I.min = W.dataMin, I.max = W.dataMax));
}, D.prototype.modifyBaseAxisExtremes = function() {
var I = this.chart.navigator, W = this.getExtremes(), E = W.dataMin, X = W.dataMax;
W = W.max - W.min;
var g = I.stickToMin, m = I.stickToMax, L = a(this.options.overscroll, 0), z = I.series && I.series[0], $ = !!this.setExtremes;
if (!this.eventArgs || this.eventArgs.trigger !== "rangeSelectorButton") {
if (g)
var Q = E, A = Q + W;
m && (A = X + L, g || (Q = Math.max(E, A - W, I.getBaseSeriesMin(z && z.xData ? z.xData[0] : -Number.MAX_VALUE)))), $ && (g || m) && i(Q) && (this.min = this.userMin = Q, this.max = this.userMax = A);
}
I.stickToMin = I.stickToMax = null;
}, D.prototype.updatedDataHandler = function() {
var I = this.chart.navigator, W = this.navigatorSeries;
I.stickToMax = I.reversedExtremes ? Math.round(I.zoomedMin) === 0 : Math.round(I.zoomedMax) >= Math.round(I.size), I.stickToMin = I.shouldStickToMin(
this,
I
), W && !I.hasNavigatorData && (W.options.pointStart = this.xData[0], W.setData(this.options.data, !1, null, !1));
}, D.prototype.shouldStickToMin = function(I, W) {
W = W.getBaseSeriesMin(I.xData[0]);
var E = I.xAxis;
I = E.max;
var X = E.min;
return E = E.options.range, i(I) && i(X) ? E && 0 < I - W ? I - W < E : X <= W : !1;
}, D.prototype.addChartEvents = function() {
this.eventsToUnbind || (this.eventsToUnbind = []), this.eventsToUnbind.push(O(this.chart, "redraw", function() {
var I = this.navigator, W = I && (I.baseSeries && I.baseSeries[0] && I.baseSeries[0].xAxis || this.xAxis[0]);
W && I.render(W.min, W.max);
}), O(this.chart, "getMargins", function() {
var I = this.navigator, W = I.opposite ? "plotTop" : "marginBottom";
this.inverted && (W = I.opposite ? "marginRight" : "plotLeft"), this[W] = (this[W] || 0) + (I.navigatorEnabled || !this.inverted ? I.outlineHeight : 0) + I.navigatorOptions.margin;
}));
}, D.prototype.destroy = function() {
this.removeEvents(), this.xAxis && (v(this.chart.xAxis, this.xAxis), v(this.chart.axes, this.xAxis)), this.yAxis && (v(this.chart.yAxis, this.yAxis), v(this.chart.axes, this.yAxis)), (this.series || []).forEach(function(I) {
I.destroy && I.destroy();
}), "series xAxis yAxis shades outline scrollbarTrack scrollbarRifles scrollbarGroup scrollbar navigatorGroup rendered".split(" ").forEach(function(I) {
this[I] && this[I].destroy && this[I].destroy(), this[I] = null;
}, this), [this.handles].forEach(function(I) {
S(I);
}, this);
}, D;
}();
return U.Navigator || (U.Navigator = P, G.compose(y), O(N, "beforeShowResetZoom", function() {
var D = this.options, I = D.navigator, W = D.rangeSelector;
if ((I && I.enabled || W && W.enabled) && (!l && D.chart.zoomType === "x" || l && D.chart.pinchType === "x"))
return !1;
}), O(N, "beforeRender", function() {
var D = this.options;
(D.navigator.enabled || D.scrollbar.enabled) && (this.scroller = this.navigator = new P(this));
}), O(N, "afterSetChartSize", function() {
var D = this.legend, I = this.navigator;
if (I) {
var W = D && D.options, E = I.xAxis, X = I.yAxis, g = I.scrollbarHeight;
this.inverted ? (I.left = I.opposite ? this.chartWidth - g - I.height : this.spacing[3] + g, I.top = this.plotTop + g) : (I.left = a(E.left, this.plotLeft + g), I.top = I.navigatorOptions.top || this.chartHeight - I.height - g - this.spacing[2] - (this.rangeSelector && this.extraBottomMargin ? this.rangeSelector.getHeight() : 0) - (W && W.verticalAlign === "bottom" && W.layout !== "proximate" && W.enabled && !W.floating ? D.legendHeight + a(W.margin, 10) : 0) - (this.titleOffset ? this.titleOffset[2] : 0)), E && X && (this.inverted ? E.options.left = X.options.left = I.left : E.options.top = X.options.top = I.top, E.setAxisSize(), X.setAxisSize());
}
}), O(N, "update", function(D) {
var I = D.options.navigator || {}, W = D.options.scrollbar || {};
this.navigator || this.scroller || !I.enabled && !W.enabled || (p(
!0,
this.options.navigator,
I
), p(!0, this.options.scrollbar, W), delete D.options.navigator, delete D.options.scrollbar);
}), O(N, "afterUpdate", function(D) {
this.navigator || this.scroller || !this.options.navigator.enabled && !this.options.scrollbar.enabled || (this.scroller = this.navigator = new P(this), a(D.redraw, !0) && this.redraw(D.animation));
}), O(N, "afterAddSeries", function() {
this.navigator && this.navigator.setBaseSeries(null, !1);
}), O(j, "afterUpdate", function() {
this.chart.navigator && !this.options.isInternal && this.chart.navigator.setBaseSeries(
null,
!1
);
}), N.prototype.callbacks.push(function(D) {
var I = D.navigator;
I && D.xAxis[0] && (D = D.xAxis[0].getExtremes(), I.render(D.min, D.max));
})), U.Navigator = P, U.Navigator;
}), C(o, "Extensions/RangeSelector.js", [o["Core/Axis/Axis.js"], o["Core/Chart/Chart.js"], o["Core/Globals.js"], o["Core/DefaultOptions.js"], o["Core/Renderer/SVG/SVGElement.js"], o["Core/Utilities.js"]], function(y, N, _, U, G, V) {
function F(s) {
if (s.indexOf("%L") !== -1)
return "text";
var n = "aAdewbBmoyY".split("").some(function(D) {
return s.indexOf("%" + D) !== -1;
}), P = "HkIlMS".split("").some(function(D) {
return s.indexOf("%" + D) !== -1;
});
return n && P ? "datetime-local" : n ? "date" : P ? "time" : "text";
}
var B = U.defaultOptions, j = V.addEvent, w = V.createElement, x = V.css, f = V.defined, l = V.destroyObjectProperties, T = V.discardElement, O = V.extend, R = V.find, k = V.fireEvent, b = V.isNumber, S = V.merge, v = V.objectEach, h = V.pad, c = V.pick, u = V.pInt, i = V.splat;
O(B, { rangeSelector: { allButtonsEnabled: !1, buttons: void 0, buttonSpacing: 5, dropdown: "responsive", enabled: void 0, verticalAlign: "top", buttonTheme: {
width: 28,
height: 18,
padding: 2,
zIndex: 7
}, floating: !1, x: 0, y: 0, height: void 0, inputBoxBorderColor: "none", inputBoxHeight: 17, inputBoxWidth: void 0, inputDateFormat: "%b %e, %Y", inputDateParser: void 0, inputEditDateFormat: "%Y-%m-%d", inputEnabled: !0, inputPosition: { align: "right", x: 0, y: 0 }, inputSpacing: 5, selected: void 0, buttonPosition: { align: "left", x: 0, y: 0 }, inputStyle: { color: "#335cad", cursor: "pointer" }, labelStyle: { color: "#666666" } } }), O(B.lang, { rangeSelectorZoom: "Zoom", rangeSelectorFrom: "", rangeSelectorTo: "→" });
var p = function() {
function s(n) {
this.buttons = void 0, this.buttonOptions = s.prototype.defaultButtons, this.initialButtonGroupWidth = 0, this.options = void 0, this.chart = n, this.init(n);
}
return s.prototype.clickButton = function(n, P) {
var D = this.chart, I = this.buttonOptions[n], W = D.xAxis[0], E = D.scroller && D.scroller.getUnionExtremes() || W || {}, X = E.dataMin, g = E.dataMax, m = W && Math.round(Math.min(W.max, c(g, W.max))), L = I.type;
E = I._range;
var z, $ = I.dataGrouping;
if (X !== null && g !== null) {
if (D.fixedRange = E, this.setSelected(n), $ && (this.forcedDataGrouping = !0, y.prototype.setDataGrouping.call(W || { chart: this.chart }, $, !1), this.frozenStates = I.preserveDataGrouping), L === "month" || L === "year")
if (W) {
L = { range: I, max: m, chart: D, dataMin: X, dataMax: g };
var Q = W.minFromRange.call(L);
b(L.newMax) && (m = L.newMax);
} else
E = I;
else if (E)
Q = Math.max(m - E, X), m = Math.min(Q + E, g);
else if (L === "ytd")
if (W)
typeof g > "u" && (X = Number.MAX_VALUE, g = Number.MIN_VALUE, D.series.forEach(function(Z) {
Z = Z.xData, X = Math.min(Z[0], X), g = Math.max(Z[Z.length - 1], g);
}), P = !1), m = this.getYTDExtremes(
g,
X,
D.time.useUTC
), Q = z = m.min, m = m.max;
else {
this.deferredYTDClick = n;
return;
}
else
L === "all" && W && (D.navigator && D.navigator.baseSeries[0] && (D.navigator.baseSeries[0].xAxis.options.range = void 0), Q = X, m = g);
if (f(Q) && (Q += I._offsetMin), f(m) && (m += I._offsetMax), this.dropdown && (this.dropdown.selectedIndex = n + 1), W)
W.setExtremes(Q, m, c(P, !0), void 0, { trigger: "rangeSelectorButton", rangeSelectorButton: I });
else {
var A = i(D.options.xAxis)[0], H = A.range;
A.range = E;
var Y = A.min;
A.min = z, j(D, "load", function() {
A.range = H, A.min = Y;
});
}
k(
this,
"afterBtnClick"
);
}
}, s.prototype.setSelected = function(n) {
this.selected = this.options.selected = n;
}, s.prototype.init = function(n) {
var P = this, D = n.options.rangeSelector, I = D.buttons || P.defaultButtons.slice(), W = D.selected, E = function() {
var X = P.minInput, g = P.maxInput;
X && X.blur && k(X, "blur"), g && g.blur && k(g, "blur");
};
P.chart = n, P.options = D, P.buttons = [], P.buttonOptions = I, this.eventsToUnbind = [], this.eventsToUnbind.push(j(n.container, "mousedown", E)), this.eventsToUnbind.push(j(n, "resize", E)), I.forEach(P.computeButtonRange), typeof W < "u" && I[W] && this.clickButton(W, !1), this.eventsToUnbind.push(j(n, "load", function() {
n.xAxis && n.xAxis[0] && j(n.xAxis[0], "setExtremes", function(X) {
this.max - this.min !== n.fixedRange && X.trigger !== "rangeSelectorButton" && X.trigger !== "updatedData" && P.forcedDataGrouping && !P.frozenStates && this.setDataGrouping(!1, !1);
});
}));
}, s.prototype.updateButtonStates = function() {
var n = this, P = this.chart, D = this.dropdown, I = P.xAxis[0], W = Math.round(I.max - I.min), E = !I.hasVisibleSeries, X = P.scroller && P.scroller.getUnionExtremes() || I, g = X.dataMin, m = X.dataMax;
P = n.getYTDExtremes(m, g, P.time.useUTC);
var L = P.min, z = P.max, $ = n.selected, Q = b($), A = n.options.allButtonsEnabled, H = n.buttons;
n.buttonOptions.forEach(function(Y, Z) {
var q = Y._range, it = Y.type, et = Y.count || 1, nt = H[Z], rt = 0, ct = Y._offsetMax - Y._offsetMin;
Y = Z === $;
var gt = q > m - g, dt = q < I.minRange, ht = !1, at = !1;
q = q === W, (it === "month" || it === "year") && W + 36e5 >= 864e5 * { month: 28, year: 365 }[it] * et - ct && W - 36e5 <= 864e5 * { month: 31, year: 366 }[it] * et + ct ? q = !0 : it === "ytd" ? (q = z - L + ct === W, ht = !Y) : it === "all" && (q = I.max - I.min >= m - g, at = !Y && Q && q), it = !A && (gt || dt || at || E), et = Y && q || q && !Q && !ht || Y && n.frozenStates, it ? rt = 3 : et && (Q = !0, rt = 2), nt.state !== rt && (nt.setState(rt), D && (D.options[Z + 1].disabled = it, rt === 2 && (D.selectedIndex = Z + 1)), rt === 0 && $ === Z && n.setSelected());
});
}, s.prototype.computeButtonRange = function(n) {
var P = n.type, D = n.count || 1, I = { millisecond: 1, second: 1e3, minute: 6e4, hour: 36e5, day: 864e5, week: 6048e5 };
I[P] ? n._range = I[P] * D : (P === "month" || P === "year") && (n._range = 864e5 * { month: 30, year: 365 }[P] * D), n._offsetMin = c(n.offsetMin, 0), n._offsetMax = c(n.offsetMax, 0), n._range += n._offsetMax - n._offsetMin;
}, s.prototype.getInputValue = function(n) {
n = n === "min" ? this.minInput : this.maxInput;
var P = this.chart.options.rangeSelector, D = this.chart.time;
return n ? (n.type === "text" && P.inputDateParser || this.defaultInputDateParser)(n.value, D.useUTC, D) : 0;
}, s.prototype.setInputValue = function(n, P) {
var D = this.options, I = this.chart.time, W = n === "min" ? this.minInput : this.maxInput;
if (n = n === "min" ? this.minDateBox : this.maxDateBox, W) {
var E = W.getAttribute("data-hc-time");
E = f(E) ? Number(E) : void 0, f(P) && (f(E) && W.setAttribute("data-hc-time-previous", E), W.setAttribute("data-hc-time", P), E = P), W.value = I.dateFormat(this.inputTypeFormats[W.type] || D.inputEditDateFormat, E), n && n.attr({ text: I.dateFormat(D.inputDateFormat, E) });
}
}, s.prototype.setInputExtremes = function(n, P, D) {
if (n = n === "min" ? this.minInput : this.maxInput) {
var I = this.inputTypeFormats[n.type], W = this.chart.time;
I && (P = W.dateFormat(I, P), n.min !== P && (n.min = P), D = W.dateFormat(I, D), n.max !== D && (n.max = D));
}
}, s.prototype.showInput = function(n) {
var P = n === "min" ? this.minDateBox : this.maxDateBox;
if ((n = n === "min" ? this.minInput : this.maxInput) && P && this.inputGroup) {
var D = n.type === "text", I = this.inputGroup, W = I.translateX;
I = I.translateY;
var E = this.options.inputBoxWidth;
x(n, { width: D ? P.width + (E ? -2 : 20) + "px" : "auto", height: D ? P.height - 2 + "px" : "auto", border: "2px solid silver" }), D && E ? x(n, { left: W + P.x + "px", top: I + "px" }) : x(n, { left: Math.min(Math.round(P.x + W - (n.offsetWidth - P.width) / 2), this.chart.chartWidth - n.offsetWidth) + "px", top: I - (n.offsetHeight - P.height) / 2 + "px" });
}
}, s.prototype.hideInput = function(n) {
(n = n === "min" ? this.minInput : this.maxInput) && x(n, { top: "-9999em", border: 0, width: "1px", height: "1px" });
}, s.prototype.defaultInputDateParser = function(n, P, D) {
var I = n.split("/").join("-").split(" ").join("T");
if (I.indexOf("T") === -1 && (I += "T00:00"), P)
I += "Z";
else {
var W;
(W = _.isSafari) && (W = I, W = !(6 < W.length && (W.lastIndexOf("-") === W.length - 6 || W.lastIndexOf("+") === W.length - 6))), W && (W = new Date(I).getTimezoneOffset() / 60, I += 0 >= W ? "+" + h(-W) + ":00" : "-" + h(W) + ":00");
}
return I = Date.parse(I), b(I) || (n = n.split("-"), I = Date.UTC(u(n[0]), u(n[1]) - 1, u(n[2]))), D && P && b(I) && (I += D.getTimezoneOffset(I)), I;
}, s.prototype.drawInput = function(n) {
function P() {
var A = E.getInputValue(n), H = D.xAxis[0], Y = D.scroller && D.scroller.xAxis ? D.scroller.xAxis : H, Z = Y.dataMin;
Y = Y.dataMax;
var q = E.maxInput, it = E.minInput;
A !== Number($.getAttribute("data-hc-time-previous")) && b(A) && ($.setAttribute("data-hc-time-previous", A), L && q && b(Z) ? A > Number(q.getAttribute("data-hc-time")) ? A = void 0 : A < Z && (A = Z) : it && b(Y) && (A < Number(it.getAttribute("data-hc-time")) ? A = void 0 : A > Y && (A = Y)), typeof A < "u" && H.setExtremes(L ? A : H.min, L ? H.max : A, void 0, void 0, { trigger: "rangeSelectorInput" }));
}
var D = this.chart, I = this.div, W = this.inputGroup, E = this, X = D.renderer.style || {}, g = D.renderer, m = D.options.rangeSelector, L = n === "min", z = B.lang[L ? "rangeSelectorFrom" : "rangeSelectorTo"] || "";
z = g.label(z, 0).addClass("highcharts-range-label").attr({ padding: z ? 2 : 0, height: z ? m.inputBoxHeight : 0 }).add(W), g = g.label("", 0).addClass("highcharts-range-input").attr({ padding: 2, width: m.inputBoxWidth, height: m.inputBoxHeight, "text-align": "center" }).on(
"click",
function() {
E.showInput(n), E[n + "Input"].focus();
}
), D.styledMode || g.attr({ stroke: m.inputBoxBorderColor, "stroke-width": 1 }), g.add(W);
var $ = w("input", { name: n, className: "highcharts-range-selector" }, void 0, I);
$.setAttribute("type", F(m.inputDateFormat || "%b %e, %Y")), D.styledMode || (z.css(S(X, m.labelStyle)), g.css(S({ color: "#333333" }, X, m.inputStyle)), x($, O({
position: "absolute",
border: 0,
boxShadow: "0 0 15px rgba(0,0,0,0.3)",
width: "1px",
height: "1px",
padding: 0,
textAlign: "center",
fontSize: X.fontSize,
fontFamily: X.fontFamily,
top: "-9999em"
}, m.inputStyle))), $.onfocus = function() {
E.showInput(n);
}, $.onblur = function() {
$ === _.doc.activeElement && P(), E.hideInput(n), E.setInputValue(n), $.blur();
};
var Q = !1;
return $.onchange = function() {
Q || (P(), E.hideInput(n), $.blur());
}, $.onkeypress = function(A) {
A.keyCode === 13 && P();
}, $.onkeydown = function(A) {
Q = !0, A.keyCode !== 38 && A.keyCode !== 40 || P();
}, $.onkeyup = function() {
Q = !1;
}, { dateBox: g, input: $, label: z };
}, s.prototype.getPosition = function() {
var n = this.chart, P = n.options.rangeSelector;
return n = P.verticalAlign === "top" ? n.plotTop - n.axisOffset[0] : 0, { buttonTop: n + P.buttonPosition.y, inputTop: n + P.inputPosition.y - 10 };
}, s.prototype.getYTDExtremes = function(n, P, D) {
var I = this.chart.time, W = new I.Date(n), E = I.get("FullYear", W);
return D = D ? I.Date.UTC(E, 0, 1) : +new I.Date(E, 0, 1), P = Math.max(P, D), W = W.getTime(), { max: Math.min(n || W, W), min: P };
}, s.prototype.render = function(n, P) {
var D = this.chart, I = D.renderer, W = D.container, E = D.options, X = E.rangeSelector, g = c(E.chart.style && E.chart.style.zIndex, 0) + 1;
if (E = X.inputEnabled, X.enabled !== !1) {
if (this.rendered || (this.group = I.g("range-selector-group").attr({ zIndex: 7 }).add(), this.div = w("div", void 0, { position: "relative", height: 0, zIndex: g }), this.buttonOptions.length && this.renderButtons(), W.parentNode && W.parentNode.insertBefore(this.div, W), E && (this.inputGroup = I.g("input-group").add(this.group), I = this.drawInput("min"), this.minDateBox = I.dateBox, this.minLabel = I.label, this.minInput = I.input, I = this.drawInput("max"), this.maxDateBox = I.dateBox, this.maxLabel = I.label, this.maxInput = I.input)), E && (this.setInputValue(
"min",
n
), this.setInputValue("max", P), n = D.scroller && D.scroller.getUnionExtremes() || D.xAxis[0] || {}, f(n.dataMin) && f(n.dataMax) && (D = D.xAxis[0].minRange || 0, this.setInputExtremes("min", n.dataMin, Math.min(n.dataMax, this.getInputValue("max")) - D), this.setInputExtremes("max", Math.max(n.dataMin, this.getInputValue("min")) + D, n.dataMax)), this.inputGroup)) {
var m = 0;
[this.minLabel, this.minDateBox, this.maxLabel, this.maxDateBox].forEach(function(L) {
if (L) {
var z = L.getBBox().width;
z && (L.attr({ x: m }), m += z + X.inputSpacing);
}
});
}
this.alignElements(), this.rendered = !0;
}
}, s.prototype.renderButtons = function() {
var n = this, P = this.buttons, D = this.options, I = B.lang, W = this.chart.renderer, E = S(D.buttonTheme), X = E && E.states, g = E.width || 28;
delete E.width, delete E.states, this.buttonGroup = W.g("range-selector-buttons").add(this.group);
var m = this.dropdown = w("select", void 0, { position: "absolute", width: "1px", height: "1px", padding: 0, border: 0, top: "-9999em", cursor: "pointer", opacity: 1e-4 }, this.div);
j(m, "touchstart", function() {
m.style.fontSize = "16px";
}), [[_.isMS ? "mouseover" : "mouseenter"], [_.isMS ? "mouseout" : "mouseleave"], ["change", "click"]].forEach(function(L) {
var z = L[0], $ = L[1];
j(m, z, function() {
var Q = P[n.currentButtonIndex()];
Q && k(Q.element, $ || z);
});
}), this.zoomText = W.label(I && I.rangeSelectorZoom || "", 0).attr({ padding: D.buttonTheme.padding, height: D.buttonTheme.height, paddingLeft: 0, paddingRight: 0 }).add(this.buttonGroup), this.chart.styledMode || (this.zoomText.css(D.labelStyle), E["stroke-width"] = c(E["stroke-width"], 0)), w(
"option",
{ textContent: this.zoomText.textStr, disabled: !0 },
void 0,
m
), this.buttonOptions.forEach(function(L, z) {
w("option", { textContent: L.title || L.text }, void 0, m), P[z] = W.button(L.text, 0, 0, function($) {
var Q = L.events && L.events.click, A;
Q && (A = Q.call(L, $)), A !== !1 && n.clickButton(z), n.isActive = !0;
}, E, X && X.hover, X && X.select, X && X.disabled).attr({ "text-align": "center", width: g }).add(n.buttonGroup), L.title && P[z].attr("title", L.title);
});
}, s.prototype.alignElements = function() {
var n = this, P = this.buttonGroup, D = this.buttons, I = this.chart, W = this.group, E = this.inputGroup, X = this.options, g = this.zoomText, m = I.options, L = m.exporting && m.exporting.enabled !== !1 && m.navigation && m.navigation.buttonOptions;
m = X.buttonPosition;
var z = X.inputPosition, $ = X.verticalAlign, Q = function(Z, q) {
return L && n.titleCollision(I) && $ === "top" && q.align === "right" && q.y - Z.getBBox().height - 12 < (L.y || 0) + (L.height || 0) + I.spacing[0] ? -40 : 0;
}, A = I.plotLeft;
if (W && m && z) {
var H = m.x - I.spacing[3];
if (P) {
if (this.positionButtons(), !this.initialButtonGroupWidth) {
var Y = 0;
g && (Y += g.getBBox().width + 5), D.forEach(function(Z, q) {
Y += Z.width, q !== D.length - 1 && (Y += X.buttonSpacing);
}), this.initialButtonGroupWidth = Y;
}
A -= I.spacing[3], this.updateButtonStates(), g = Q(P, m), this.alignButtonGroup(g), W.placed = P.placed = I.hasLoaded;
}
P = 0, E && (P = Q(E, z), z.align === "left" ? H = A : z.align === "right" && (H = -Math.max(I.axisOffset[1], -P)), E.align({ y: z.y, width: E.getBBox().width, align: z.align, x: z.x + H - 2 }, !0, I.spacingBox), E.placed = I.hasLoaded), this.handleCollision(P), W.align({ verticalAlign: $ }, !0, I.spacingBox), E = W.alignAttr.translateY, P = W.getBBox().height + 20, Q = 0, $ === "bottom" && (Q = (Q = I.legend && I.legend.options) && Q.verticalAlign === "bottom" && Q.enabled && !Q.floating ? I.legend.legendHeight + c(Q.margin, 10) : 0, P = P + Q - 20, Q = E - P - (X.floating ? 0 : X.y) - (I.titleOffset ? I.titleOffset[2] : 0) - 10), $ === "top" ? (X.floating && (Q = 0), I.titleOffset && I.titleOffset[0] && (Q = I.titleOffset[0]), Q += I.margin[0] - I.spacing[0] || 0) : $ === "middle" && (z.y === m.y ? Q = E : (z.y || m.y) && (Q = 0 > z.y || 0 > m.y ? Q - Math.min(z.y, m.y) : E - P)), W.translate(X.x, X.y + Math.floor(Q)), m = this.minInput, z = this.maxInput, E = this.dropdown, X.inputEnabled && m && z && (m.style.marginTop = W.translateY + "px", z.style.marginTop = W.translateY + "px"), E && (E.style.marginTop = W.translateY + "px");
}
}, s.prototype.alignButtonGroup = function(n, P) {
var D = this.chart, I = this.buttonGroup, W = this.options.buttonPosition, E = D.plotLeft - D.spacing[3], X = W.x - D.spacing[3];
W.align === "right" ? X += n - E : W.align === "center" && (X -= E / 2), I && I.align({ y: W.y, width: c(P, this.initialButtonGroupWidth), align: W.align, x: X }, !0, D.spacingBox);
}, s.prototype.positionButtons = function() {
var n = this.buttons, P = this.chart, D = this.options, I = this.zoomText, W = P.hasLoaded ? "animate" : "attr", E = D.buttonPosition, X = P.plotLeft, g = X;
I && I.visibility !== "hidden" && (I[W]({ x: c(X + E.x, X) }), g += E.x + I.getBBox().width + 5), this.buttonOptions.forEach(function(m, L) {
n[L].visibility !== "hidden" ? (n[L][W]({ x: g }), g += n[L].width + D.buttonSpacing) : n[L][W]({ x: X });
});
}, s.prototype.handleCollision = function(n) {
var P = this, D = this.chart, I = this.buttonGroup, W = this.inputGroup, E = this.options, X = E.buttonPosition, g = E.dropdown, m = E.inputPosition;
E = function() {
var $ = 0;
return P.buttons.forEach(function(Q) {
Q = Q.getBBox(), Q.width > $ && ($ = Q.width);
}), $;
};
var L = function($) {
if (W && I) {
var Q = W.alignAttr.translateX + W.alignOptions.x - n + W.getBBox().x + 2, A = W.alignOptions.width, H = I.alignAttr.translateX + I.getBBox().x;
return H + $ > Q && Q + A > H && X.y < m.y + W.getBBox().height;
}
return !1;
}, z = function() {
W && I && W.attr({ translateX: W.alignAttr.translateX + (D.axisOffset[1] >= -n ? 0 : -n), translateY: W.alignAttr.translateY + I.getBBox().height + 10 });
};
if (I) {
if (g === "always") {
this.collapseButtons(n), L(E()) && z();
return;
}
g === "never" && this.expandButtons();
}
W && I ? m.align === X.align || L(this.initialButtonGroupWidth + 20) ? g === "responsive" ? (this.collapseButtons(n), L(E()) && z()) : z() : g === "responsive" && this.expandButtons() : I && g === "responsive" && (this.initialButtonGroupWidth > D.plotWidth ? this.collapseButtons(n) : this.expandButtons());
}, s.prototype.collapseButtons = function(n) {
var P = this.buttons, D = this.buttonOptions, I = this.chart, W = this.dropdown, E = this.options, X = this.zoomText, g = I.userOptions.rangeSelector && I.userOptions.rangeSelector.buttonTheme || {}, m = function(z) {
return { text: z ? z + " ▾" : "▾", width: "auto", paddingLeft: c(E.buttonTheme.paddingLeft, g.padding, 8), paddingRight: c(E.buttonTheme.paddingRight, g.padding, 8) };
};
X && X.hide();
var L = !1;
D.forEach(function(z, $) {
$ = P[$], $.state !== 2 ? $.hide() : ($.show(), $.attr(m(z.text)), L = !0);
}), L || (W && (W.selectedIndex = 0), P[0].show(), P[0].attr(m(this.zoomText && this.zoomText.textStr))), D = E.buttonPosition.align, this.positionButtons(), D !== "right" && D !== "center" || this.alignButtonGroup(n, P[this.currentButtonIndex()].getBBox().width), this.showDropdown();
}, s.prototype.expandButtons = function() {
var n = this.buttons, P = this.buttonOptions, D = this.options, I = this.zoomText;
this.hideDropdown(), I && I.show(), P.forEach(function(W, E) {
E = n[E], E.show(), E.attr({ text: W.text, width: D.buttonTheme.width || 28, paddingLeft: c(D.buttonTheme.paddingLeft, "unset"), paddingRight: c(D.buttonTheme.paddingRight, "unset") }), 2 > E.state && E.setState(0);
}), this.positionButtons();
}, s.prototype.currentButtonIndex = function() {
var n = this.dropdown;
return n && 0 < n.selectedIndex ? n.selectedIndex - 1 : 0;
}, s.prototype.showDropdown = function() {
var n = this.buttonGroup, P = this.buttons, D = this.chart, I = this.dropdown;
if (n && I) {
var W = n.translateX;
n = n.translateY, P = P[this.currentButtonIndex()].getBBox(), x(I, { left: D.plotLeft + W + "px", top: n + 0.5 + "px", width: P.width + "px", height: P.height + "px" }), this.hasVisibleDropdown = !0;
}
}, s.prototype.hideDropdown = function() {
var n = this.dropdown;
n && (x(n, { top: "-9999em", width: "1px", height: "1px" }), this.hasVisibleDropdown = !1);
}, s.prototype.getHeight = function() {
var n = this.options, P = this.group, D = n.y, I = n.buttonPosition.y, W = n.inputPosition.y;
return n.height ? n.height : (this.alignElements(), n = P ? P.getBBox(!0).height + 13 + D : 0, P = Math.min(W, I), (0 > W && 0 > I || 0 < W && 0 < I) && (n += Math.abs(P)), n);
}, s.prototype.titleCollision = function(n) {
return !(n.options.title.text || n.options.subtitle.text);
}, s.prototype.update = function(n) {
var P = this.chart;
S(!0, P.options.rangeSelector, n), this.destroy(), this.init(P), this.render();
}, s.prototype.destroy = function() {
var n = this, P = n.minInput, D = n.maxInput;
n.eventsToUnbind && (n.eventsToUnbind.forEach(function(I) {
return I();
}), n.eventsToUnbind = void 0), l(n.buttons), P && (P.onfocus = P.onblur = P.onchange = null), D && (D.onfocus = D.onblur = D.onchange = null), v(n, function(I, W) {
I && W !== "chart" && (I instanceof G ? I.destroy() : I instanceof window.HTMLElement && T(I)), I !== s.prototype[W] && (n[W] = null);
}, this);
}, s;
}();
if (p.prototype.defaultButtons = [
{ type: "month", count: 1, text: "1m", title: "View 1 month" },
{ type: "month", count: 3, text: "3m", title: "View 3 months" },
{ type: "month", count: 6, text: "6m", title: "View 6 months" },
{ type: "ytd", text: "YTD", title: "View year to date" },
{ type: "year", count: 1, text: "1y", title: "View 1 year" },
{ type: "all", text: "All", title: "View all" }
], p.prototype.inputTypeFormats = { "datetime-local": "%Y-%m-%dT%H:%M:%S", date: "%Y-%m-%d", time: "%H:%M:%S" }, y.prototype.minFromRange = function() {
var s = this.range, n = s.type, P = this.max, D = this.chart.time, I = function(g, m) {
var L = n === "year" ? "FullYear" : "Month", z = new D.Date(g), $ = D.get(L, z);
return D.set(L, z, $ + m), $ === D.get(L, z) && D.set("Date", z, 0), z.getTime() - g;
};
if (b(s))
var W = P - s, E = s;
else
W = P + I(P, -s.count), this.chart && (this.chart.fixedRange = P - W);
var X = c(this.dataMin, Number.MIN_VALUE);
return b(W) || (W = X), W <= X && (W = X, typeof E > "u" && (E = I(W, s.count)), this.newMax = Math.min(W + E, this.dataMax)), b(P) || (W = void 0), W;
}, !_.RangeSelector) {
var a = [], t = function(s) {
function n() {
D && (P = s.xAxis[0].getExtremes(), I = s.legend, E = D && D.options.verticalAlign, b(P.min) && D.render(P.min, P.max), I.display && E === "top" && E === I.options.verticalAlign && (W = S(s.spacingBox), W.y = I.options.layout === "vertical" ? s.plotTop : W.y + D.getHeight(), I.group.placed = !1, I.align(W)));
}
var P, D = s.rangeSelector, I, W, E;
D && (R(a, function(X) {
return X[0] === s;
}) || a.push([s, [j(s.xAxis[0], "afterSetExtremes", function(X) {
D && D.render(X.min, X.max);
}), j(s, "redraw", n)]]), n());
};
j(N, "afterGetContainer", function() {
this.options.rangeSelector && this.options.rangeSelector.enabled && (this.rangeSelector = new p(this));
}), j(N, "beforeRender", function() {
var s = this.axes, n = this.rangeSelector;
n && (b(n.deferredYTDClick) && (n.clickButton(n.deferredYTDClick), delete n.deferredYTDClick), s.forEach(function(P) {
P.updateNames(), P.setScale();
}), this.getAxisMargins(), n.render(), s = n.options.verticalAlign, n.options.floating || (s === "bottom" ? this.extraBottomMargin = !0 : s !== "middle" && (this.extraTopMargin = !0)));
}), j(N, "update", function(s) {
var n = s.options.rangeSelector;
s = this.rangeSelector;
var P = this.extraBottomMargin, D = this.extraTopMargin;
n && n.enabled && !f(s) && this.options.rangeSelector && (this.options.rangeSelector.enabled = !0, this.rangeSelector = s = new p(this)), this.extraTopMargin = this.extraBottomMargin = !1, s && (t(this), n = n && n.verticalAlign || s.options && s.options.verticalAlign, s.options.floating || (n === "bottom" ? this.extraBottomMargin = !0 : n !== "middle" && (this.extraTopMargin = !0)), this.extraBottomMargin !== P || this.extraTopMargin !== D) && (this.isDirtyBox = !0);
}), j(N, "render", function() {
var s = this.rangeSelector;
s && !s.options.floating && (s.render(), s = s.options.verticalAlign, s === "bottom" ? this.extraBottomMargin = !0 : s !== "middle" && (this.extraTopMargin = !0));
}), j(N, "getMargins", function() {
var s = this.rangeSelector;
s && (s = s.getHeight(), this.extraTopMargin && (this.plotTop += s), this.extraBottomMargin && (this.marginBottom += s));
}), N.prototype.callbacks.push(t), j(N, "destroy", function() {
for (var s = 0; s < a.length; s++) {
var n = a[s];
if (n[0] === this) {
n[1].forEach(function(P) {
return P();
}), a.splice(s, 1);
break;
}
}
}), _.RangeSelector = p;
}
return p;
}), C(
o,
"Core/Chart/StockChart.js",
[o["Core/Animation/AnimationUtilities.js"], o["Core/Axis/Axis.js"], o["Core/Chart/Chart.js"], o["Core/FormatUtilities.js"], o["Core/DefaultOptions.js"], o["Core/Series/Series.js"], o["Core/Renderer/SVG/SVGRenderer.js"], o["Core/Utilities.js"]],
function(y, N, _, U, G, V, F, B) {
function j(u, i) {
return u === "xAxis" ? { minPadding: 0, maxPadding: 0, overscroll: 0, ordinal: !0, title: { text: null }, labels: { overflow: "justify" }, showLastLabel: !0 } : u === "yAxis" ? { labels: { y: -2 }, opposite: h(i.opposite, !0), showLastLabel: !(!i.categories && i.type !== "category"), title: { text: null } } : {};
}
function w(u, i) {
if (u === "xAxis") {
u = l();
var p = { type: "datetime", categories: void 0 };
return h(i.navigator && i.navigator.enabled, u.navigator.enabled, !0) && (p.startOnTick = !1, p.endOnTick = !1), p;
}
return {};
}
var x = this && this.__extends || function() {
var u = function(i, p) {
return u = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(a, t) {
a.__proto__ = t;
} || function(a, t) {
for (var s in t)
t.hasOwnProperty(s) && (a[s] = t[s]);
}, u(i, p);
};
return function(i, p) {
function a() {
this.constructor = i;
}
u(i, p), i.prototype = p === null ? Object.create(p) : (a.prototype = p.prototype, new a());
};
}(), f = U.format, l = G.getOptions;
y = B.addEvent;
var T = B.clamp, O = B.defined, R = B.extend, k = B.find, b = B.isNumber, S = B.isString, v = B.merge, h = B.pick, c = B.splat;
return B = function(u) {
function i() {
return u !== null && u.apply(this, arguments) || this;
}
return x(i, u), i.prototype.init = function(p, a) {
var t = l(), s = p.xAxis, n = p.yAxis, P = h(p.navigator && p.navigator.enabled, t.navigator.enabled, !0);
p.xAxis = p.yAxis = void 0, P = v({ chart: { panning: { enabled: !0, type: "x" }, pinchType: "x" }, navigator: { enabled: P }, scrollbar: { enabled: h(t.scrollbar && t.scrollbar.enabled, !0) }, rangeSelector: { enabled: h(t.rangeSelector.enabled, !0) }, title: { text: null }, tooltip: { split: h(t.tooltip.split, !0), crosshairs: !0 }, legend: { enabled: !1 } }, p, { isStock: !0 }), p.xAxis = s, p.yAxis = n, P.xAxis = c(p.xAxis || {}).map(function(D, I) {
return v(j("xAxis", D), t.xAxis, t.xAxis && t.xAxis[I], D, w("xAxis", p));
}), P.yAxis = c(p.yAxis || {}).map(function(D, I) {
return v(j("yAxis", D), t.yAxis, t.yAxis && t.yAxis[I], D);
}), u.prototype.init.call(this, P, a);
}, i.prototype.createAxis = function(p, a) {
return a.axis = v(j(p, a.axis), a.axis, w(p, this.userOptions)), u.prototype.createAxis.call(this, p, a);
}, i;
}(_), function(u) {
u.stockChart = function(i, p, a) {
return new u(i, p, a);
};
}(B || (B = {})), y(V, "setOptions", function(u) {
var i;
this.chart.options.isStock && (this.is("column") || this.is("columnrange") ? i = { borderWidth: 0, shadow: !1 } : this.is("scatter") || this.is("sma") || (i = { marker: { enabled: !1, radius: 2 } }), i && (u.plotOptions[this.type] = v(u.plotOptions[this.type], i)));
}), y(N, "autoLabelAlign", function(u) {
var i = this.chart, p = this.options;
i = i._labelPanes = i._labelPanes || {};
var a = this.options.labels;
this.chart.options.isStock && this.coll === "yAxis" && (p = p.top + "," + p.height, !i[p] && a.enabled && (a.x === 15 && (a.x = 0), typeof a.align > "u" && (a.align = "right"), i[p] = this, u.align = "right", u.preventDefault()));
}), y(N, "destroy", function() {
var u = this.chart, i = this.options && this.options.top + "," + this.options.height;
i && u._labelPanes && u._labelPanes[i] === this && delete u._labelPanes[i];
}), y(N, "getPlotLinePath", function(u) {
function i(H) {
var Y = H === "xAxis" ? "yAxis" : "xAxis";
return H = p.options[Y], b(H) ? [t[Y][H]] : S(H) ? [t.get(H)] : a.map(function(Z) {
return Z[Y];
});
}
var p = this, a = this.isLinked && !this.series ? this.linkedParent.series : this.series, t = p.chart, s = t.renderer, n = p.left, P = p.top, D, I, W, E, X = [], g = [], m = u.translatedValue, L = u.value, z = u.force;
if (t.options.isStock && u.acrossPanes !== !1 && p.coll === "xAxis" || p.coll === "yAxis") {
u.preventDefault(), g = i(p.coll);
var $ = p.isXAxis ? t.yAxis : t.xAxis;
$.forEach(function(H) {
if (!O(H.options.id) || H.options.id.indexOf("navigator") === -1) {
var Y = H.isXAxis ? "yAxis" : "xAxis";
Y = O(H.options[Y]) ? t[Y][H.options[Y]] : t[Y][0], p === Y && g.push(H);
}
});
var Q = g.length ? [] : [p.isXAxis ? t.yAxis[0] : t.xAxis[0]];
g.forEach(function(H) {
Q.indexOf(H) !== -1 || k(Q, function(Y) {
return Y.pos === H.pos && Y.len === H.len;
}) || Q.push(H);
});
var A = h(m, p.translate(L, null, null, u.old));
b(A) && (p.horiz ? Q.forEach(function(H) {
var Y;
I = H.pos, E = I + H.len, D = W = Math.round(A + p.transB), z !== "pass" && (D < n || D > n + p.width) && (z ? D = W = T(D, n, n + p.width) : Y = !0), Y || X.push(["M", D, I], ["L", W, E]);
}) : Q.forEach(function(H) {
var Y;
D = H.pos, W = D + H.len, I = E = Math.round(P + p.height - A), z !== "pass" && (I < P || I > P + p.height) && (z ? I = E = T(I, P, P + p.height) : Y = !0), Y || X.push(["M", D, I], ["L", W, E]);
})), u.path = 0 < X.length ? s.crispPolyLine(X, u.lineWidth || 1) : null;
}
}), F.prototype.crispPolyLine = function(u, i) {
for (var p = 0; p < u.length; p += 2) {
var a = u[p], t = u[p + 1];
a[1] === t[1] && (a[1] = t[1] = Math.round(a[1]) - i % 2 / 2), a[2] === t[2] && (a[2] = t[2] = Math.round(a[2]) + i % 2 / 2);
}
return u;
}, y(N, "afterHideCrosshair", function() {
this.crossLabel && (this.crossLabel = this.crossLabel.hide());
}), y(N, "afterDrawCrosshair", function(u) {
var i, p;
if (this.crosshair && this.crosshair.label && this.crosshair.label.enabled && this.cross && b(this.min) && b(this.max)) {
var a = this.chart, t = this.logarithmic, s = this.crosshair.label, n = this.horiz, P = this.opposite, D = this.left, I = this.top, W = this.crossLabel, E = s.format, X = "", g = this.options.tickPosition === "inside", m = this.crosshair.snap !== !1, L = 0, z = u.e || this.cross && this.cross.e;
u = u.point;
var $ = this.min, Q = this.max;
t && ($ = t.lin2log($), Q = t.lin2log(Q)), t = n ? "center" : P ? this.labelAlign === "right" ? "right" : "left" : this.labelAlign === "left" ? "left" : "center", W || (W = this.crossLabel = a.renderer.label("", 0, void 0, s.shape || "callout").addClass("highcharts-crosshair-label highcharts-color-" + (u ? u.series.colorIndex : this.series[0] && this.series[0].colorIndex)).attr({ align: s.align || t, padding: h(s.padding, 8), r: h(s.borderRadius, 3), zIndex: 2 }).add(this.labelGroup), a.styledMode || W.attr({ fill: s.backgroundColor || u && u.series && u.series.color || "#666666", stroke: s.borderColor || "", "stroke-width": s.borderWidth || 0 }).css(R({ color: "#ffffff", fontWeight: "normal", fontSize: "11px", textAlign: "center" }, s.style || {}))), n ? (t = m ? (u.plotX || 0) + D : z.chartX, I += P ? 0 : this.height) : (t = P ? this.width + D : 0, I = m ? (u.plotY || 0) + I : z.chartY), E || s.formatter || (this.dateTime && (X = "%b %d, %Y"), E = "{value" + (X ? ":" + X : "") + "}"), X = m ? this.isXAxis ? u.x : u.y : this.toValue(n ? z.chartX : z.chartY), m = u ? u.series.isPointInside(u) : b(X) && X > $ && X < Q, z = "", E ? z = f(E, { value: X }, a) : s.formatter && b(X) && (z = s.formatter.call(this, X)), W.attr({ text: z, x: t, y: I, visibility: m ? "visible" : "hidden" }), s = W.getBBox(), b(W.y) && (n ? (g && !P || !g && P) && (I = W.y - s.height) : I = W.y - s.height / 2), n ? (i = D - s.x, p = D + this.width - s.x) : (i = this.labelAlign === "left" ? D : 0, p = this.labelAlign === "right" ? D + this.width : a.chartWidth), W.translateX < i && (L = i - W.translateX), W.translateX + s.width >= p && (L = -(W.translateX + s.width - p)), W.attr({ x: t + L, y: I, anchorX: n ? t : this.opposite ? 0 : a.chartWidth, anchorY: n ? this.opposite ? a.chartHeight : 0 : I + s.height / 2 });
}
}), V.prototype.forceCropping = function() {
var u = this.chart, i = this.options.dataGrouping;
return this.allowDG !== !1 && i && h(i.enabled, u.options.isStock);
}, y(_, "update", function(u) {
u = u.options, "scrollbar" in u && this.navigator && (v(!0, this.options.scrollbar, u.scrollbar), this.navigator.update({}, !1), delete u.scrollbar);
}), B;
}
), C(o, "masters/modules/stock.src.js", [
o["Core/Globals.js"],
o["Core/Axis/OrdinalAxis.js"],
o["Series/DataModifyComposition.js"],
o["Core/Scrollbar.js"],
o["Core/Chart/StockChart.js"]
], function(y, N, _, U, G) {
y.Scrollbar = U, y.StockChart = y.stockChart = G.stockChart, U.compose(y.Axis), N.compose(y.Axis, y.Series, y.Chart), _.compose(y.Series, y.Axis, y.Point);
}), C(o, "masters/highstock.src.js", [o["masters/highcharts.src.js"]], function(y) {
return y.product = "Highstock", y;
}), o["masters/highstock.src.js"]._modules = o, o["masters/highstock.src.js"];
});
})(eu);
var U0 = eu.exports;
const Vr = /* @__PURE__ */ Mn(U0);
var iu = { exports: {} };
(function(r) {
(function(d, C) {
r.exports ? (C.default = C, r.exports = d.document ? C(d) : C) : (d.Highcharts && d.Highcharts.error(16, !0), d.Highcharts = C(d));
})(typeof window < "u" ? window : Gr, function(d) {
function C(y, N, _, U) {
y.hasOwnProperty(N) || (y[N] = U.apply(null, _));
}
var o = {};
return C(o, "Core/Globals.js", [], function() {
var y = typeof d < "u" ? d : typeof window < "u" ? window : {}, N;
return function(_) {
_.SVG_NS = "http://www.w3.org/2000/svg", _.product = "Highcharts", _.version = "9.3.3", _.win = y, _.doc = _.win.document, _.svg = _.doc && _.doc.createElementNS && !!_.doc.createElementNS(_.SVG_NS, "svg").createSVGRect, _.userAgent = _.win.navigator && _.win.navigator.userAgent || "", _.isChrome = _.userAgent.indexOf("Chrome") !== -1, _.isFirefox = _.userAgent.indexOf("Firefox") !== -1, _.isMS = /(edge|msie|trident)/i.test(_.userAgent) && !_.win.opera, _.isSafari = !_.isChrome && _.userAgent.indexOf("Safari") !== -1, _.isTouchDevice = /(Mobile|Android|Windows Phone)/.test(_.userAgent), _.isWebKit = _.userAgent.indexOf("AppleWebKit") !== -1, _.deg2rad = 2 * Math.PI / 360, _.hasBidiBug = _.isFirefox && 4 > parseInt(_.userAgent.split("Firefox/")[1], 10), _.hasTouch = !!_.win.TouchEvent, _.marginNames = ["plotTop", "marginRight", "marginBottom", "plotLeft"], _.noop = function() {
}, _.supportsPassiveEvents = function() {
var U = !1;
if (!_.isMS) {
var G = Object.defineProperty({}, "passive", { get: function() {
U = !0;
} });
_.win.addEventListener && _.win.removeEventListener && (_.win.addEventListener(
"testPassive",
_.noop,
G
), _.win.removeEventListener("testPassive", _.noop, G));
}
return U;
}(), _.charts = [], _.dateFormats = {}, _.seriesTypes = {}, _.symbolSizes = {}, _.chartCount = 0;
}(N || (N = {})), N;
}), C(o, "Core/Utilities.js", [o["Core/Globals.js"]], function(y) {
function N(t, s, n, P) {
var D = s ? "Highcharts error" : "Highcharts warning";
t === 32 && (t = D + ": Deprecated member");
var I = w(t), W = I ? D + " #" + t + ": www.highcharts.com/errors/" + t + "/" : t.toString();
if (typeof P < "u") {
var E = "";
I && (W += "?"), b(P, function(X, g) {
E += `
- ` + g + ": " + X, I && (W += encodeURI(g) + "=" + encodeURI(X));
}), W += E;
}
v(y, "displayError", { chart: n, code: t, message: W, params: P }, function() {
if (s)
throw Error(W);
u.console && N.messages.indexOf(W) === -1 && console.warn(W);
}), N.messages.push(W);
}
function _(t, s) {
var n = {};
return b(t, function(P, D) {
F(t[D], !0) && !t.nodeType && s[D] ? (P = _(t[D], s[D]), Object.keys(P).length && (n[D] = P)) : (F(t[D]) || t[D] !== s[D]) && (n[D] = t[D]);
}), n;
}
function U(t, s) {
return parseInt(t, s || 10);
}
function G(t) {
return typeof t == "string";
}
function V(t) {
return t = Object.prototype.toString.call(t), t === "[object Array]" || t === "[object Array Iterator]";
}
function F(t, s) {
return !!t && typeof t == "object" && (!s || !V(t));
}
function B(t) {
return F(t) && typeof t.nodeType == "number";
}
function j(t) {
var s = t && t.constructor;
return !(!F(t, !0) || B(t) || !s || !s.name || s.name === "Object");
}
function w(t) {
return typeof t == "number" && !isNaN(t) && 1 / 0 > t && -1 / 0 < t;
}
function x(t) {
return typeof t < "u" && t !== null;
}
function f(t, s, n) {
var P;
return G(s) ? x(n) ? t.setAttribute(s, n) : t && t.getAttribute && ((P = t.getAttribute(s)) || s !== "class" || (P = t.getAttribute(s + "Name"))) : b(s, function(D, I) {
x(D) ? t.setAttribute(I, D) : t.removeAttribute(I);
}), P;
}
function l(t, s) {
var n;
t || (t = {});
for (n in s)
t[n] = s[n];
return t;
}
function T() {
for (var t = arguments, s = t.length, n = 0; n < s; n++) {
var P = t[n];
if (typeof P < "u" && P !== null)
return P;
}
}
function O(t, s) {
y.isMS && !y.svg && s && typeof s.opacity < "u" && (s.filter = "alpha(opacity=" + 100 * s.opacity + ")"), l(t.style, s);
}
function R(t, s) {
return 1e14 < t ? t : parseFloat(t.toPrecision(s || 14));
}
function k(t, s, n) {
var P = y.getStyle || k;
if (s === "width")
return s = Math.min(t.offsetWidth, t.scrollWidth), n = t.getBoundingClientRect && t.getBoundingClientRect().width, n < s && n >= s - 1 && (s = Math.floor(n)), Math.max(0, s - (P(t, "padding-left", !0) || 0) - (P(t, "padding-right", !0) || 0));
if (s === "height")
return Math.max(0, Math.min(t.offsetHeight, t.scrollHeight) - (P(t, "padding-top", !0) || 0) - (P(t, "padding-bottom", !0) || 0));
if (u.getComputedStyle || N(27, !0), t = u.getComputedStyle(t, void 0)) {
var D = t.getPropertyValue(s);
T(n, s !== "opacity") && (D = U(D));
}
return D;
}
function b(t, s, n) {
for (var P in t)
Object.hasOwnProperty.call(t, P) && s.call(n || t[P], t[P], P, t);
}
function S(t, s, n) {
function P(E, X) {
var g = t.removeEventListener || y.removeEventListenerPolyfill;
g && g.call(t, E, X, !1);
}
function D(E) {
var X;
if (t.nodeName) {
if (s) {
var g = {};
g[s] = !0;
} else
g = E;
b(g, function(m, L) {
if (E[L])
for (X = E[L].length; X--; )
P(L, E[L][X].fn);
});
}
}
var I = typeof t == "function" && t.prototype || t;
if (Object.hasOwnProperty.call(I, "hcEvents")) {
var W = I.hcEvents;
s ? (I = W[s] || [], n ? (W[s] = I.filter(function(E) {
return n !== E.fn;
}), P(s, n)) : (D(W), W[s] = [])) : (D(W), delete I.hcEvents);
}
}
function v(t, s, n, P) {
if (n = n || {}, c.createEvent && (t.dispatchEvent || t.fireEvent && t !== y)) {
var D = c.createEvent("Events");
D.initEvent(s, !0, !0), n = l(D, n), t.dispatchEvent ? t.dispatchEvent(n) : t.fireEvent(s, n);
} else if (t.hcEvents) {
n.target || l(n, { preventDefault: function() {
n.defaultPrevented = !0;
}, target: t, type: s }), D = [];
for (var I = t, W = !1; I.hcEvents; )
Object.hasOwnProperty.call(I, "hcEvents") && I.hcEvents[s] && (D.length && (W = !0), D.unshift.apply(D, I.hcEvents[s])), I = Object.getPrototypeOf(I);
W && D.sort(function(E, X) {
return E.order - X.order;
}), D.forEach(function(E) {
E.fn.call(t, n) === !1 && n.preventDefault();
});
}
P && !n.defaultPrevented && P.call(t, n);
}
var h = y.charts, c = y.doc, u = y.win;
(N || (N = {})).messages = [], Math.easeInOutSine = function(t) {
return -0.5 * (Math.cos(Math.PI * t) - 1);
};
var i = Array.prototype.find ? function(t, s) {
return t.find(s);
} : function(t, s) {
var n, P = t.length;
for (n = 0; n < P; n++)
if (s(t[n], n))
return t[n];
};
b({ map: "map", each: "forEach", grep: "filter", reduce: "reduce", some: "some" }, function(t, s) {
y[s] = function(n) {
var P;
return N(32, !1, void 0, (P = {}, P["Highcharts." + s] = "use Array." + t, P)), Array.prototype[t].apply(n, [].slice.call(arguments, 1));
};
});
var p, a = function() {
var t = Math.random().toString(36).substring(2, 9) + "-", s = 0;
return function() {
return "highcharts-" + (p ? "" : t) + s++;
};
}();
return u.jQuery && (u.jQuery.fn.highcharts = function() {
var t = [].slice.call(arguments);
if (this[0])
return t[0] ? (new y[G(t[0]) ? t.shift() : "Chart"](this[0], t[0], t[1]), this) : h[f(this[0], "data-highcharts-chart")];
}), i = { addEvent: function(t, s, n, P) {
P === void 0 && (P = {});
var D = typeof t == "function" && t.prototype || t;
Object.hasOwnProperty.call(D, "hcEvents") || (D.hcEvents = {}), D = D.hcEvents, y.Point && t instanceof y.Point && t.series && t.series.chart && (t.series.chart.runTrackerClick = !0);
var I = t.addEventListener || y.addEventListenerPolyfill;
return I && I.call(t, s, n, y.supportsPassiveEvents ? { passive: P.passive === void 0 ? s.indexOf("touch") !== -1 : P.passive, capture: !1 } : !1), D[s] || (D[s] = []), D[s].push({ fn: n, order: typeof P.order == "number" ? P.order : 1 / 0 }), D[s].sort(function(W, E) {
return W.order - E.order;
}), function() {
S(t, s, n);
};
}, arrayMax: function(t) {
for (var s = t.length, n = t[0]; s--; )
t[s] > n && (n = t[s]);
return n;
}, arrayMin: function(t) {
for (var s = t.length, n = t[0]; s--; )
t[s] < n && (n = t[s]);
return n;
}, attr: f, clamp: function(t, s, n) {
return t > s ? t < n ? t : n : s;
}, cleanRecursively: _, clearTimeout: function(t) {
x(t) && clearTimeout(t);
}, correctFloat: R, createElement: function(t, s, n, P, D) {
return t = c.createElement(t), s && l(t, s), D && O(t, { padding: "0", border: "none", margin: "0" }), n && O(t, n), P && P.appendChild(t), t;
}, css: O, defined: x, destroyObjectProperties: function(t, s) {
b(t, function(n, P) {
n && n !== s && n.destroy && n.destroy(), delete t[P];
});
}, discardElement: function(t) {
t && t.parentElement && t.parentElement.removeChild(t);
}, erase: function(t, s) {
for (var n = t.length; n--; )
if (t[n] === s) {
t.splice(n, 1);
break;
}
}, error: N, extend: l, extendClass: function(t, s) {
var n = function() {
};
return n.prototype = new t(), l(n.prototype, s), n;
}, find: i, fireEvent: v, getMagnitude: function(t) {
return Math.pow(10, Math.floor(Math.log(t) / Math.LN10));
}, getNestedProperty: function(t, s) {
for (t = t.split("."); t.length && x(s); ) {
var n = t.shift();
if (typeof n > "u" || n === "__proto__" || (s = s[n], !x(s) || typeof s == "function" || typeof s.nodeType == "number" || s === u))
return;
}
return s;
}, getStyle: k, inArray: function(t, s, n) {
return N(32, !1, void 0, { "Highcharts.inArray": "use Array.indexOf" }), s.indexOf(t, n);
}, isArray: V, isClass: j, isDOMElement: B, isFunction: function(t) {
return typeof t == "function";
}, isNumber: w, isObject: F, isString: G, keys: function(t) {
return N(32, !1, void 0, { "Highcharts.keys": "use Object.keys" }), Object.keys(t);
}, merge: function() {
var t, s = arguments, n = {}, P = function(I, W) {
return typeof I != "object" && (I = {}), b(W, function(E, X) {
X !== "__proto__" && X !== "constructor" && (!F(E, !0) || j(E) || B(E) ? I[X] = W[X] : I[X] = P(I[X] || {}, E));
}), I;
};
s[0] === !0 && (n = s[1], s = Array.prototype.slice.call(s, 2));
var D = s.length;
for (t = 0; t < D; t++)
n = P(n, s[t]);
return n;
}, normalizeTickInterval: function(t, s, n, P, D) {
var I = t;
n = T(n, 1);
var W = t / n;
for (s || (s = D ? [1, 1.2, 1.5, 2, 2.5, 3, 4, 5, 6, 8, 10] : [1, 2, 2.5, 5, 10], P === !1 && (n === 1 ? s = s.filter(function(E) {
return E % 1 === 0;
}) : 0.1 >= n && (s = [1 / n]))), P = 0; P < s.length && (I = s[P], !(D && I * n >= t || !D && W <= (s[P] + (s[P + 1] || s[P])) / 2)); P++)
;
return I = R(I * n, -Math.round(Math.log(1e-3) / Math.LN10));
}, objectEach: b, offset: function(t) {
var s = c.documentElement;
return t = t.parentElement || t.parentNode ? t.getBoundingClientRect() : { top: 0, left: 0, width: 0, height: 0 }, { top: t.top + (u.pageYOffset || s.scrollTop) - (s.clientTop || 0), left: t.left + (u.pageXOffset || s.scrollLeft) - (s.clientLeft || 0), width: t.width, height: t.height };
}, pad: function(t, s, n) {
return Array((s || 2) + 1 - String(t).replace("-", "").length).join(n || "0") + t;
}, pick: T, pInt: U, relativeLength: function(t, s, n) {
return /%$/.test(t) ? s * parseFloat(t) / 100 + (n || 0) : parseFloat(t);
}, removeEvent: S, splat: function(t) {
return V(t) ? t : [t];
}, stableSort: function(t, s) {
var n = t.length, P, D;
for (D = 0; D < n; D++)
t[D].safeI = D;
for (t.sort(function(I, W) {
return P = s(I, W), P === 0 ? I.safeI - W.safeI : P;
}), D = 0; D < n; D++)
delete t[D].safeI;
}, syncTimeout: function(t, s, n) {
return 0 < s ? setTimeout(t, s, n) : (t.call(0, n), -1);
}, timeUnits: {
millisecond: 1,
second: 1e3,
minute: 6e4,
hour: 36e5,
day: 864e5,
week: 6048e5,
month: 24192e5,
year: 314496e5
}, uniqueKey: a, useSerialIds: function(t) {
return p = T(t, p);
}, wrap: function(t, s, n) {
var P = t[s];
t[s] = function() {
var D = Array.prototype.slice.call(arguments), I = arguments, W = this;
return W.proceed = function() {
P.apply(W, arguments.length ? arguments : I);
}, D.unshift(P), D = n.apply(this, D), W.proceed = null, D;
};
} }, i;
}), C(o, "Core/Chart/ChartDefaults.js", [], function() {
return { panning: { enabled: !1, type: "x" }, styledMode: !1, borderRadius: 0, colorCount: 10, defaultSeriesType: "line", ignoreHiddenSeries: !0, spacing: [
10,
10,
15,
10
], resetZoomButton: { theme: { zIndex: 6 }, position: { align: "right", x: -10, y: 10 } }, zoomBySingleTouch: !1, width: null, height: null, borderColor: "#335cad", backgroundColor: "#ffffff", plotBorderColor: "#cccccc" };
}), C(o, "Core/Color/Color.js", [o["Core/Globals.js"], o["Core/Utilities.js"]], function(y, N) {
var _ = N.isNumber, U = N.merge, G = N.pInt;
return N = function() {
function V(F) {
this.rgba = [NaN, NaN, NaN, NaN], this.input = F;
var B = y.Color;
if (B && B !== V)
return new B(F);
if (!(this instanceof V))
return new V(F);
this.init(F);
}
return V.parse = function(F) {
return F ? new V(F) : V.None;
}, V.prototype.init = function(F) {
var B;
if (typeof F == "object" && typeof F.stops < "u")
this.stops = F.stops.map(function(f) {
return new V(f[1]);
});
else if (typeof F == "string") {
if (this.input = F = V.names[F.toLowerCase()] || F, F.charAt(0) === "#") {
var j = F.length, w = parseInt(F.substr(1), 16);
j === 7 ? B = [(w & 16711680) >> 16, (w & 65280) >> 8, w & 255, 1] : j === 4 && (B = [(w & 3840) >> 4 | (w & 3840) >> 8, (w & 240) >> 4 | w & 240, (w & 15) << 4 | w & 15, 1]);
}
if (!B)
for (w = V.parsers.length; w-- && !B; ) {
var x = V.parsers[w];
(j = x.regex.exec(F)) && (B = x.parse(j));
}
}
B && (this.rgba = B);
}, V.prototype.get = function(F) {
var B = this.input, j = this.rgba;
if (typeof B == "object" && typeof this.stops < "u") {
var w = U(B);
return w.stops = [].slice.call(w.stops), this.stops.forEach(function(x, f) {
w.stops[f] = [w.stops[f][0], x.get(F)];
}), w;
}
return j && _(j[0]) ? F === "rgb" || !F && j[3] === 1 ? "rgb(" + j[0] + "," + j[1] + "," + j[2] + ")" : F === "a" ? "" + j[3] : "rgba(" + j.join(",") + ")" : B;
}, V.prototype.brighten = function(F) {
var B = this.rgba;
if (this.stops)
this.stops.forEach(function(w) {
w.brighten(F);
});
else if (_(F) && F !== 0)
for (var j = 0; 3 > j; j++)
B[j] += G(255 * F), 0 > B[j] && (B[j] = 0), 255 < B[j] && (B[j] = 255);
return this;
}, V.prototype.setOpacity = function(F) {
return this.rgba[3] = F, this;
}, V.prototype.tweenTo = function(F, B) {
var j = this.rgba, w = F.rgba;
return !_(j[0]) || !_(w[0]) ? F.input || "none" : (F = w[3] !== 1 || j[3] !== 1, (F ? "rgba(" : "rgb(") + Math.round(w[0] + (j[0] - w[0]) * (1 - B)) + "," + Math.round(w[1] + (j[1] - w[1]) * (1 - B)) + "," + Math.round(w[2] + (j[2] - w[2]) * (1 - B)) + (F ? "," + (w[3] + (j[3] - w[3]) * (1 - B)) : "") + ")");
}, V.names = { white: "#ffffff", black: "#000000" }, V.parsers = [{
regex: /rgba\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]?(?:\.[0-9]+)?)\s*\)/,
parse: function(F) {
return [G(F[1]), G(F[2]), G(F[3]), parseFloat(F[4], 10)];
}
}, { regex: /rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/, parse: function(F) {
return [G(F[1]), G(F[2]), G(F[3]), 1];
} }], V.None = new V(""), V;
}(), N;
}), C(o, "Core/Color/Palettes.js", [], function() {
return { colors: "#7cb5ec #434348 #90ed7d #f7a35c #8085e9 #f15c80 #e4d354 #2b908f #f45b5b #91e8e1".split(" ") };
}), C(o, "Core/Time.js", [o["Core/Globals.js"], o["Core/Utilities.js"]], function(y, N) {
var _ = y.win, U = N.defined, G = N.error, V = N.extend, F = N.isObject, B = N.merge, j = N.objectEach, w = N.pad, x = N.pick, f = N.splat, l = N.timeUnits, T = y.isSafari && _.Intl && _.Intl.DateTimeFormat.prototype.formatRange, O = y.isSafari && _.Intl && !_.Intl.DateTimeFormat.prototype.formatRange;
return N = function() {
function R(k) {
this.options = {}, this.variableTimezone = this.useUTC = !1, this.Date = _.Date, this.getTimezoneOffset = this.timezoneOffsetFunction(), this.update(k);
}
return R.prototype.get = function(k, b) {
if (this.variableTimezone || this.timezoneOffset) {
var S = b.getTime(), v = S - this.getTimezoneOffset(b);
return b.setTime(v), k = b["getUTC" + k](), b.setTime(S), k;
}
return this.useUTC ? b["getUTC" + k]() : b["get" + k]();
}, R.prototype.set = function(k, b, S) {
if (this.variableTimezone || this.timezoneOffset) {
if (k === "Milliseconds" || k === "Seconds" || k === "Minutes" && this.getTimezoneOffset(b) % 36e5 === 0)
return b["setUTC" + k](S);
var v = this.getTimezoneOffset(b);
return v = b.getTime() - v, b.setTime(v), b["setUTC" + k](S), k = this.getTimezoneOffset(b), v = b.getTime() + k, b.setTime(v);
}
return this.useUTC || T && k === "FullYear" ? b["setUTC" + k](S) : b["set" + k](S);
}, R.prototype.update = function(k) {
var b = x(k && k.useUTC, !0);
this.options = k = B(!0, this.options || {}, k), this.Date = k.Date || _.Date || Date, this.timezoneOffset = (this.useUTC = b) && k.timezoneOffset, this.getTimezoneOffset = this.timezoneOffsetFunction(), this.variableTimezone = b && !(!k.getTimezoneOffset && !k.timezone);
}, R.prototype.makeTime = function(k, b, S, v, h, c) {
if (this.useUTC) {
var u = this.Date.UTC.apply(0, arguments), i = this.getTimezoneOffset(u);
u += i;
var p = this.getTimezoneOffset(u);
i !== p ? u += p - i : i - 36e5 !== this.getTimezoneOffset(u - 36e5) || O || (u -= 36e5);
} else
u = new this.Date(k, b, x(S, 1), x(v, 0), x(h, 0), x(c, 0)).getTime();
return u;
}, R.prototype.timezoneOffsetFunction = function() {
var k = this, b = this.options, S = b.getTimezoneOffset, v = b.moment || _.moment;
if (!this.useUTC)
return function(h) {
return 6e4 * new Date(h.toString()).getTimezoneOffset();
};
if (b.timezone) {
if (v)
return function(h) {
return 6e4 * -v.tz(h, b.timezone).utcOffset();
};
G(25);
}
return this.useUTC && S ? function(h) {
return 6e4 * S(h.valueOf());
} : function() {
return 6e4 * (k.timezoneOffset || 0);
};
}, R.prototype.dateFormat = function(k, b, S) {
if (!U(b) || isNaN(b))
return y.defaultOptions.lang && y.defaultOptions.lang.invalidDate || "";
k = x(k, "%Y-%m-%d %H:%M:%S");
var v = this, h = new this.Date(b), c = this.get("Hours", h), u = this.get("Day", h), i = this.get("Date", h), p = this.get("Month", h), a = this.get("FullYear", h), t = y.defaultOptions.lang, s = t && t.weekdays, n = t && t.shortWeekdays;
return h = V({ a: n ? n[u] : s[u].substr(0, 3), A: s[u], d: w(i), e: w(i, 2, " "), w: u, b: t.shortMonths[p], B: t.months[p], m: w(p + 1), o: p + 1, y: a.toString().substr(2, 2), Y: a, H: w(c), k: c, I: w(c % 12 || 12), l: c % 12 || 12, M: w(this.get("Minutes", h)), p: 12 > c ? "AM" : "PM", P: 12 > c ? "am" : "pm", S: w(h.getSeconds()), L: w(Math.floor(b % 1e3), 3) }, y.dateFormats), j(h, function(P, D) {
for (; k.indexOf("%" + D) !== -1; )
k = k.replace("%" + D, typeof P == "function" ? P.call(v, b) : P);
}), S ? k.substr(0, 1).toUpperCase() + k.substr(1) : k;
}, R.prototype.resolveDTLFormat = function(k) {
return F(k, !0) ? k : (k = f(k), { main: k[0], from: k[1], to: k[2] });
}, R.prototype.getTimeTicks = function(k, b, S, v) {
var h = this, c = [], u = {}, i = new h.Date(b), p = k.unitRange, a = k.count || 1, t;
if (v = x(v, 1), U(b)) {
if (h.set(
"Milliseconds",
i,
p >= l.second ? 0 : a * Math.floor(h.get("Milliseconds", i) / a)
), p >= l.second && h.set("Seconds", i, p >= l.minute ? 0 : a * Math.floor(h.get("Seconds", i) / a)), p >= l.minute && h.set("Minutes", i, p >= l.hour ? 0 : a * Math.floor(h.get("Minutes", i) / a)), p >= l.hour && h.set("Hours", i, p >= l.day ? 0 : a * Math.floor(h.get("Hours", i) / a)), p >= l.day && h.set("Date", i, p >= l.month ? 1 : Math.max(1, a * Math.floor(h.get("Date", i) / a))), p >= l.month) {
h.set("Month", i, p >= l.year ? 0 : a * Math.floor(h.get("Month", i) / a));
var s = h.get("FullYear", i);
}
p >= l.year && h.set(
"FullYear",
i,
s - s % a
), p === l.week && (s = h.get("Day", i), h.set("Date", i, h.get("Date", i) - s + v + (s < v ? -7 : 0))), s = h.get("FullYear", i), v = h.get("Month", i);
var n = h.get("Date", i), P = h.get("Hours", i);
for (b = i.getTime(), !h.variableTimezone && h.useUTC || !U(S) || (t = S - b > 4 * l.month || h.getTimezoneOffset(b) !== h.getTimezoneOffset(S)), b = i.getTime(), i = 1; b < S; )
c.push(b), b = p === l.year ? h.makeTime(s + i * a, 0) : p === l.month ? h.makeTime(s, v + i * a) : !t || p !== l.day && p !== l.week ? t && p === l.hour && 1 < a ? h.makeTime(s, v, n, P + i * a) : b + p * a : h.makeTime(s, v, n + i * a * (p === l.day ? 1 : 7)), i++;
c.push(b), p <= l.hour && 1e4 > c.length && c.forEach(function(D) {
D % 18e5 === 0 && h.dateFormat("%H%M%S%L", D) === "000000000" && (u[D] = "day");
});
}
return c.info = V(k, { higherRanks: u, totalRange: p * a }), c;
}, R.prototype.getDateFormat = function(k, b, S, v) {
var h = this.dateFormat("%m-%d %H:%M:%S.%L", b), c = { millisecond: 15, second: 12, minute: 9, hour: 6, day: 3 }, u = "millisecond";
for (i in l) {
if (k === l.week && +this.dateFormat("%w", b) === S && h.substr(6) === "00:00:00.000") {
var i = "week";
break;
}
if (l[i] > k) {
i = u;
break;
}
if (c[i] && h.substr(c[i]) !== "01-01 00:00:00.000".substr(c[i]))
break;
i !== "week" && (u = i);
}
if (i)
var p = this.resolveDTLFormat(v[i]).main;
return p;
}, R;
}(), N;
}), C(o, "Core/DefaultOptions.js", [o["Core/Chart/ChartDefaults.js"], o["Core/Color/Color.js"], o["Core/Globals.js"], o["Core/Color/Palettes.js"], o["Core/Time.js"], o["Core/Utilities.js"]], function(y, N, _, U, G, V) {
N = N.parse;
var F = V.merge, B = {
colors: U.colors,
symbols: ["circle", "diamond", "square", "triangle", "triangle-down"],
lang: {
loading: "Loading...",
months: "January February March April May June July August September October November December".split(" "),
shortMonths: "Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec".split(" "),
weekdays: "Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" "),
decimalPoint: ".",
numericSymbols: "kMGTPE".split(""),
resetZoom: "Reset zoom",
resetZoomTitle: "Reset zoom level 1:1",
thousandsSep: " "
},
global: {},
time: { Date: void 0, getTimezoneOffset: void 0, timezone: void 0, timezoneOffset: 0, useUTC: !0 },
chart: y,
title: { text: "Chart title", align: "center", margin: 15, widthAdjust: -44 },
subtitle: { text: "", align: "center", widthAdjust: -44 },
caption: { margin: 15, text: "", align: "left", verticalAlign: "bottom" },
plotOptions: {},
labels: { style: { position: "absolute", color: "#333333" } },
legend: {
enabled: !0,
align: "center",
alignColumns: !0,
className: "highcharts-no-tooltip",
layout: "horizontal",
labelFormatter: function() {
return this.name;
},
borderColor: "#999999",
borderRadius: 0,
navigation: { activeColor: "#003399", inactiveColor: "#cccccc" },
itemStyle: { color: "#333333", cursor: "pointer", fontSize: "12px", fontWeight: "bold", textOverflow: "ellipsis" },
itemHoverStyle: { color: "#000000" },
itemHiddenStyle: { color: "#cccccc" },
shadow: !1,
itemCheckboxStyle: { position: "absolute", width: "13px", height: "13px" },
squareSymbol: !0,
symbolPadding: 5,
verticalAlign: "bottom",
x: 0,
y: 0,
title: { style: { fontWeight: "bold" } }
},
loading: { labelStyle: { fontWeight: "bold", position: "relative", top: "45%" }, style: { position: "absolute", backgroundColor: "#ffffff", opacity: 0.5, textAlign: "center" } },
tooltip: {
enabled: !0,
animation: _.svg,
borderRadius: 3,
dateTimeLabelFormats: {
millisecond: "%A, %b %e, %H:%M:%S.%L",
second: "%A, %b %e, %H:%M:%S",
minute: "%A, %b %e, %H:%M",
hour: "%A, %b %e, %H:%M",
day: "%A, %b %e, %Y",
week: "Week from %A, %b %e, %Y",
month: "%B %Y",
year: "%Y"
},
footerFormat: "",
headerShape: "callout",
hideDelay: 500,
padding: 8,
shape: "callout",
shared: !1,
snap: _.isTouchDevice ? 25 : 10,
headerFormat: '{point.key}
',
pointFormat: '● {series.name}: {point.y}
',
backgroundColor: N("#f7f7f7").setOpacity(0.85).get(),
borderWidth: 1,
shadow: !0,
stickOnContact: !1,
style: { color: "#333333", cursor: "default", fontSize: "12px", whiteSpace: "nowrap" },
useHTML: !1
},
credits: { enabled: !0, href: "https://www.highcharts.com?credits", position: { align: "right", x: -10, verticalAlign: "bottom", y: -5 }, style: { cursor: "pointer", color: "#999999", fontSize: "9px" }, text: "Highcharts.com" }
};
B.chart.styledMode = !1;
var j = new G(F(B.global, B.time));
return y = { defaultOptions: B, defaultTime: j, getOptions: function() {
return B;
}, setOptions: function(w) {
return F(!0, B, w), (w.time || w.global) && (_.time ? _.time.update(F(
B.global,
B.time,
w.global,
w.time
)) : _.time = j), B;
} }, y;
}), C(o, "Core/Animation/Fx.js", [o["Core/Color/Color.js"], o["Core/Globals.js"], o["Core/Utilities.js"]], function(y, N, _) {
var U = y.parse, G = N.win, V = _.isNumber, F = _.objectEach;
return function() {
function B(j, w, x) {
this.pos = NaN, this.options = w, this.elem = j, this.prop = x;
}
return B.prototype.dSetter = function() {
var j = this.paths, w = j && j[0];
j = j && j[1];
var x = this.now || 0, f = [];
if (x !== 1 && w && j)
if (w.length === j.length && 1 > x)
for (var l = 0; l < j.length; l++) {
for (var T = w[l], O = j[l], R = [], k = 0; k < O.length; k++) {
var b = T[k], S = O[k];
V(b) && V(S) && (O[0] !== "A" || k !== 4 && k !== 5) ? R[k] = b + x * (S - b) : R[k] = S;
}
f.push(R);
}
else
f = j;
else
f = this.toD || [];
this.elem.attr("d", f, void 0, !0);
}, B.prototype.update = function() {
var j = this.elem, w = this.prop, x = this.now, f = this.options.step;
this[w + "Setter"] ? this[w + "Setter"]() : j.attr ? j.element && j.attr(w, x, null, !0) : j.style[w] = x + this.unit, f && f.call(j, x, this);
}, B.prototype.run = function(j, w, x) {
var f = this, l = f.options, T = function(k) {
return T.stopped ? !1 : f.step(k);
}, O = G.requestAnimationFrame || function(k) {
setTimeout(
k,
13
);
}, R = function() {
for (var k = 0; k < B.timers.length; k++)
B.timers[k]() || B.timers.splice(k--, 1);
B.timers.length && O(R);
};
j !== w || this.elem["forceAnimate:" + this.prop] ? (this.startTime = +/* @__PURE__ */ new Date(), this.start = j, this.end = w, this.unit = x, this.now = this.start, this.pos = 0, T.elem = this.elem, T.prop = this.prop, T() && B.timers.push(T) === 1 && O(R)) : (delete l.curAnim[this.prop], l.complete && Object.keys(l.curAnim).length === 0 && l.complete.call(this.elem));
}, B.prototype.step = function(j) {
var w = +/* @__PURE__ */ new Date(), x = this.options, f = this.elem, l = x.complete, T = x.duration, O = x.curAnim;
if (f.attr && !f.element)
j = !1;
else if (j || w >= T + this.startTime) {
this.now = this.end, this.pos = 1, this.update();
var R = O[this.prop] = !0;
F(O, function(k) {
k !== !0 && (R = !1);
}), R && l && l.call(f), j = !1;
} else
this.pos = x.easing((w - this.startTime) / T), this.now = this.start + (this.end - this.start) * this.pos, this.update(), j = !0;
return j;
}, B.prototype.initPath = function(j, w, x) {
function f(h, c) {
for (; h.length < v; ) {
var u = h[0], i = c[v - h.length];
i && u[0] === "M" && (h[0] = i[0] === "C" ? ["C", u[1], u[2], u[1], u[2], u[1], u[2]] : [
"L",
u[1],
u[2]
]), h.unshift(u), R && (u = h.pop(), h.push(h[h.length - 1], u));
}
}
function l(h, c) {
for (; h.length < v; )
if (c = h[Math.floor(h.length / k) - 1].slice(), c[0] === "C" && (c[1] = c[5], c[2] = c[6]), R) {
var u = h[Math.floor(h.length / k)].slice();
h.splice(h.length / 2, 0, c, u);
} else
h.push(c);
}
var T = j.startX, O = j.endX;
x = x.slice();
var R = j.isArea, k = R ? 2 : 1;
if (w = w && w.slice(), !w)
return [x, x];
if (T && O && O.length) {
for (j = 0; j < T.length; j++)
if (T[j] === O[0]) {
var b = j;
break;
} else if (T[0] === O[O.length - T.length + j]) {
b = j;
var S = !0;
break;
} else if (T[T.length - 1] === O[O.length - T.length + j]) {
b = T.length - j;
break;
}
typeof b > "u" && (w = []);
}
if (w.length && V(b)) {
var v = x.length + b * k;
S ? (f(w, x), l(x, w)) : (f(x, w), l(w, x));
}
return [w, x];
}, B.prototype.fillSetter = function() {
B.prototype.strokeSetter.apply(this, arguments);
}, B.prototype.strokeSetter = function() {
this.elem.attr(this.prop, U(this.start).tweenTo(U(this.end), this.pos), void 0, !0);
}, B.timers = [], B;
}();
}), C(o, "Core/Animation/AnimationUtilities.js", [o["Core/Animation/Fx.js"], o["Core/Utilities.js"]], function(y, N) {
function _(l) {
return j(l) ? w({ duration: 500, defer: 0 }, l) : { duration: l ? 500 : 0, defer: 0 };
}
function U(l, T) {
for (var O = y.timers.length; O--; )
y.timers[O].elem !== l || T && T !== y.timers[O].prop || (y.timers[O].stopped = !0);
}
var G = N.defined, V = N.getStyle, F = N.isArray, B = N.isNumber, j = N.isObject, w = N.merge, x = N.objectEach, f = N.pick;
return { animate: function(l, T, O) {
var R, k = "", b, S;
if (!j(O)) {
var v = arguments;
O = { duration: v[2], easing: v[3], complete: v[4] };
}
B(O.duration) || (O.duration = 400), O.easing = typeof O.easing == "function" ? O.easing : Math[O.easing] || Math.easeInOutSine, O.curAnim = w(T), x(T, function(h, c) {
U(l, c), S = new y(l, O, c), b = void 0, c === "d" && F(T.d) ? (S.paths = S.initPath(l, l.pathArray, T.d), S.toD = T.d, R = 0, b = 1) : l.attr ? R = l.attr(c) : (R = parseFloat(V(l, c)) || 0, c !== "opacity" && (k = "px")), b || (b = h), typeof b == "string" && b.match("px") && (b = b.replace(/px/g, "")), S.run(R, b, k);
});
}, animObject: _, getDeferredAnimation: function(l, T, O) {
var R = _(T), k = 0, b = 0;
return (O ? [O] : l.series).forEach(function(S) {
S = _(S.options.animation), k = T && G(T.defer) ? R.defer : Math.max(k, S.duration + S.defer), b = Math.min(R.duration, S.duration);
}), l.renderer.forExport && (k = 0), { defer: Math.max(0, k - b), duration: Math.min(k, b) };
}, setAnimation: function(l, T) {
T.renderer.globalAnimation = f(l, T.options.chart.animation, !0);
}, stop: U };
}), C(o, "Core/Renderer/HTML/AST.js", [o["Core/Globals.js"], o["Core/Utilities.js"]], function(y, N) {
var _ = y.SVG_NS, U = N.attr, G = N.createElement, V = N.error, F = N.isFunction, B = N.isString, j = N.objectEach, w = N.splat, x = (N = y.win.trustedTypes) && F(N.createPolicy) && N.createPolicy("highcharts", { createHTML: function(T) {
return T;
} }), f = x ? x.createHTML("") : "";
try {
var l = !!new DOMParser().parseFromString(f, "text/html");
} catch {
l = !1;
}
return F = function() {
function T(O) {
this.nodes = typeof O == "string" ? this.parseMarkup(O) : O;
}
return T.filterUserAttributes = function(O) {
return j(O, function(R, k) {
var b = !0;
T.allowedAttributes.indexOf(k) === -1 && (b = !1), ["background", "dynsrc", "href", "lowsrc", "src"].indexOf(k) !== -1 && (b = B(R) && T.allowedReferences.some(function(S) {
return R.indexOf(S) === 0;
})), b || (V("Highcharts warning: Invalid attribute '" + k + "' in config"), delete O[k]);
}), O;
}, T.setElementHTML = function(O, R) {
O.innerHTML = T.emptyHTML, R && new T(R).addToDOM(O);
}, T.prototype.addToDOM = function(O) {
function R(k, b) {
var S;
return w(k).forEach(function(v) {
var h = v.tagName, c = v.textContent ? y.doc.createTextNode(v.textContent) : void 0;
if (h)
if (h === "#text")
var u = c;
else if (T.allowedTags.indexOf(h) !== -1) {
h = y.doc.createElementNS(h === "svg" ? _ : b.namespaceURI || _, h);
var i = v.attributes || {};
j(v, function(p, a) {
a !== "tagName" && a !== "attributes" && a !== "children" && a !== "textContent" && (i[a] = p);
}), U(h, T.filterUserAttributes(i)), c && h.appendChild(c), R(v.children || [], h), u = h;
} else
V("Highcharts warning: Invalid tagName " + h + " in config");
u && b.appendChild(u), S = u;
}), S;
}
return R(this.nodes, O);
}, T.prototype.parseMarkup = function(O) {
var R = [];
if (O = O.trim(), l)
O = new DOMParser().parseFromString(x ? x.createHTML(O) : O, "text/html");
else {
var k = G("div");
k.innerHTML = O, O = { body: k };
}
var b = function(S, v) {
var h = S.nodeName.toLowerCase(), c = { tagName: h };
if (h === "#text" && (c.textContent = S.textContent || ""), h = S.attributes) {
var u = {};
[].forEach.call(h, function(p) {
u[p.name] = p.value;
}), c.attributes = u;
}
if (S.childNodes.length) {
var i = [];
[].forEach.call(S.childNodes, function(p) {
b(p, i);
}), i.length && (c.children = i);
}
v.push(c);
};
return [].forEach.call(O.body.childNodes, function(S) {
return b(S, R);
}), R;
}, T.allowedAttributes = "aria-controls aria-describedby aria-expanded aria-haspopup aria-hidden aria-label aria-labelledby aria-live aria-pressed aria-readonly aria-roledescription aria-selected class clip-path color colspan cx cy d dx dy disabled fill height href id in markerHeight markerWidth offset opacity orient padding paddingLeft paddingRight patternUnits r refX refY role scope slope src startOffset stdDeviation stroke stroke-linecap stroke-width style tableValues result rowspan summary target tabindex text-align textAnchor textLength title type valign width x x1 x2 y y1 y2 zIndex".split(" "), T.allowedReferences = "https:// http:// mailto: / ../ ./ #".split(" "), T.allowedTags = "a abbr b br button caption circle clipPath code dd defs div dl dt em feComponentTransfer feFuncA feFuncB feFuncG feFuncR feGaussianBlur feOffset feMerge feMergeNode filter h1 h2 h3 h4 h5 h6 hr i img li linearGradient marker ol p path pattern pre rect small span stop strong style sub sup svg table text thead tbody tspan td th tr u ul #text".split(" "), T.emptyHTML = f, T;
}(), F;
}), C(
o,
"Core/FormatUtilities.js",
[o["Core/DefaultOptions.js"], o["Core/Utilities.js"]],
function(y, N) {
function _(w, x, f, l) {
w = +w || 0, x = +x;
var T = U.lang, O = (w.toString().split(".")[1] || "").split("e")[0].length, R = w.toString().split("e"), k = x;
if (x === -1)
x = Math.min(O, 20);
else if (!F(x))
x = 2;
else if (x && R[1] && 0 > R[1]) {
var b = x + +R[1];
0 <= b ? (R[0] = (+R[0]).toExponential(b).split("e")[0], x = b) : (R[0] = R[0].split(".")[0] || 0, w = 20 > x ? (R[0] * Math.pow(10, R[1])).toFixed(x) : 0, R[1] = 0);
}
b = (Math.abs(R[1] ? R[0] : w) + Math.pow(10, -Math.max(x, O) - 1)).toFixed(x), O = String(j(b));
var S = 3 < O.length ? O.length % 3 : 0;
return f = B(f, T.decimalPoint), l = B(l, T.thousandsSep), w = (0 > w ? "-" : "") + (S ? O.substr(0, S) + l : ""), w = 0 > +R[1] && !k ? "0" : w + O.substr(S).replace(/(\d{3})(?=\d)/g, "$1" + l), x && (w += f + b.slice(-x)), R[1] && +w != 0 && (w += "e" + R[1]), w;
}
var U = y.defaultOptions, G = y.defaultTime, V = N.getNestedProperty, F = N.isNumber, B = N.pick, j = N.pInt;
return { dateFormat: function(w, x, f) {
return G.dateFormat(w, x, f);
}, format: function(w, x, f) {
var l = "{", T = !1, O = /f$/, R = /\.([0-9])/, k = U.lang, b = f && f.time || G;
f = f && f.numberFormatter || _;
for (var S = []; w; ) {
var v = w.indexOf(l);
if (v === -1)
break;
var h = w.slice(0, v);
if (T) {
if (h = h.split(":"), l = V(h.shift() || "", x), h.length && typeof l == "number")
if (h = h.join(":"), O.test(h)) {
var c = parseInt((h.match(R) || ["", "-1"])[1], 10);
l !== null && (l = f(l, c, k.decimalPoint, -1 < h.indexOf(",") ? k.thousandsSep : ""));
} else
l = b.dateFormat(h, l);
S.push(l);
} else
S.push(h);
w = w.slice(v + 1), l = (T = !T) ? "}" : "{";
}
return S.push(w), S.join("");
}, numberFormat: _ };
}
), C(o, "Core/Renderer/RendererUtilities.js", [o["Core/Utilities.js"]], function(y) {
var N = y.clamp, _ = y.pick, U = y.stableSort, G;
return function(V) {
function F(B, j, w) {
var x = B, f = x.reducedLen || j, l = function(S, v) {
return (v.rank || 0) - (S.rank || 0);
}, T = function(S, v) {
return S.target - v.target;
}, O, R = !0, k = [], b = 0;
for (O = B.length; O--; )
b += B[O].size;
if (b > f) {
for (U(B, l), b = O = 0; b <= f; )
b += B[O].size, O++;
k = B.splice(O - 1, B.length);
}
for (U(B, T), B = B.map(function(S) {
return { size: S.size, targets: [S.target], align: _(S.align, 0.5) };
}); R; ) {
for (O = B.length; O--; )
f = B[O], l = (Math.min.apply(0, f.targets) + Math.max.apply(0, f.targets)) / 2, f.pos = N(
l - f.size * f.align,
0,
j - f.size
);
for (O = B.length, R = !1; O--; )
0 < O && B[O - 1].pos + B[O - 1].size > B[O].pos && (B[O - 1].size += B[O].size, B[O - 1].targets = B[O - 1].targets.concat(B[O].targets), B[O - 1].align = 0.5, B[O - 1].pos + B[O - 1].size > j && (B[O - 1].pos = j - B[O - 1].size), B.splice(O, 1), R = !0);
}
return x.push.apply(x, k), O = 0, B.some(function(S) {
var v = 0;
return (S.targets || []).some(function() {
return x[O].pos = S.pos + v, typeof w < "u" && Math.abs(x[O].pos - x[O].target) > w ? (x.slice(0, O + 1).forEach(function(h) {
return delete h.pos;
}), x.reducedLen = (x.reducedLen || j) - 0.1 * j, x.reducedLen > 0.1 * j && F(x, j, w), !0) : (v += x[O].size, O++, !1);
});
}), U(x, T), x;
}
V.distribute = F;
}(G || (G = {})), G;
}), C(o, "Core/Renderer/SVG/SVGElement.js", [o["Core/Animation/AnimationUtilities.js"], o["Core/Renderer/HTML/AST.js"], o["Core/Color/Color.js"], o["Core/Globals.js"], o["Core/Utilities.js"]], function(y, N, _, U, G) {
var V = y.animate, F = y.animObject, B = y.stop, j = U.deg2rad, w = U.doc, x = U.noop, f = U.svg, l = U.SVG_NS, T = U.win, O = G.addEvent, R = G.attr, k = G.createElement, b = G.css, S = G.defined, v = G.erase, h = G.extend, c = G.fireEvent, u = G.isArray, i = G.isFunction, p = G.isNumber, a = G.isString, t = G.merge, s = G.objectEach, n = G.pick, P = G.pInt, D = G.syncTimeout, I = G.uniqueKey;
return y = function() {
function W() {
this.element = void 0, this.onEvents = {}, this.opacity = 1, this.renderer = void 0, this.SVG_NS = l, this.symbolCustomAttribs = "x y width height r start end innerR anchorX anchorY rounded".split(" ");
}
return W.prototype._defaultGetter = function(E) {
return E = n(this[E + "Value"], this[E], this.element ? this.element.getAttribute(E) : null, 0), /^[\-0-9\.]+$/.test(E) && (E = parseFloat(E)), E;
}, W.prototype._defaultSetter = function(E, X, g) {
g.setAttribute(X, E);
}, W.prototype.add = function(E) {
var X = this.renderer, g = this.element;
if (E && (this.parentGroup = E), this.parentInverted = E && E.inverted, typeof this.textStr < "u" && this.element.nodeName === "text" && X.buildText(this), this.added = !0, !E || E.handleZ || this.zIndex)
var m = this.zIndexSetter();
return m || (E ? E.element : X.box).appendChild(g), this.onAdd && this.onAdd(), this;
}, W.prototype.addClass = function(E, X) {
var g = X ? "" : this.attr("class") || "";
return E = (E || "").split(/ /g).reduce(function(m, L) {
return g.indexOf(L) === -1 && m.push(L), m;
}, g ? [g] : []).join(" "), E !== g && this.attr("class", E), this;
}, W.prototype.afterSetters = function() {
this.doTransform && (this.updateTransform(), this.doTransform = !1);
}, W.prototype.align = function(E, X, g) {
var m = {}, L = this.renderer, z = L.alignedObjects, $, Q, A;
E ? (this.alignOptions = E, this.alignByTranslate = X, (!g || a(g)) && (this.alignTo = $ = g || "renderer", v(z, this), z.push(this), g = void 0)) : (E = this.alignOptions, X = this.alignByTranslate, $ = this.alignTo), g = n(g, L[$], $ === "scrollablePlotBox" ? L.plotBox : void 0, L), $ = E.align;
var H = E.verticalAlign;
return L = (g.x || 0) + (E.x || 0), z = (g.y || 0) + (E.y || 0), $ === "right" ? Q = 1 : $ === "center" && (Q = 2), Q && (L += (g.width - (E.width || 0)) / Q), m[X ? "translateX" : "x"] = Math.round(L), H === "bottom" ? A = 1 : H === "middle" && (A = 2), A && (z += (g.height - (E.height || 0)) / A), m[X ? "translateY" : "y"] = Math.round(z), this[this.placed ? "animate" : "attr"](m), this.placed = !0, this.alignAttr = m, this;
}, W.prototype.alignSetter = function(E) {
var X = { left: "start", center: "middle", right: "end" };
X[E] && (this.alignValue = E, this.element.setAttribute(
"text-anchor",
X[E]
));
}, W.prototype.animate = function(E, X, g) {
var m = this, L = F(n(X, this.renderer.globalAnimation, !0));
return X = L.defer, n(w.hidden, w.msHidden, w.webkitHidden, !1) && (L.duration = 0), L.duration !== 0 ? (g && (L.complete = g), D(function() {
m.element && V(m, E, L);
}, X)) : (this.attr(E, void 0, g), s(E, function(z, $) {
L.step && L.step.call(this, z, { prop: $, pos: 1, elem: this });
}, this)), this;
}, W.prototype.applyTextOutline = function(E) {
var X = this.element;
E.indexOf("contrast") !== -1 && (E = E.replace(/contrast/g, this.renderer.getContrast(X.style.fill)));
var g = E.split(" ");
if (E = g[g.length - 1], (g = g[0]) && g !== "none" && U.svg) {
this.fakeTS = !0, this.ySetter = this.xSetter, g = g.replace(/(^[\d\.]+)(.*?)$/g, function(z, $, Q) {
return 2 * Number($) + Q;
}), this.removeTextOutline();
var m = w.createElementNS(l, "tspan");
R(m, { class: "highcharts-text-outline", fill: E, stroke: E, "stroke-width": g, "stroke-linejoin": "round" }), [].forEach.call(X.childNodes, function(z) {
var $ = z.cloneNode(!0);
$.removeAttribute && ["fill", "stroke", "stroke-width", "stroke"].forEach(function(Q) {
return $.removeAttribute(Q);
}), m.appendChild($);
});
var L = w.createElementNS(l, "tspan");
L.textContent = "", ["x", "y"].forEach(function(z) {
var $ = X.getAttribute(z);
$ && L.setAttribute(z, $);
}), m.appendChild(L), X.insertBefore(m, X.firstChild);
}
}, W.prototype.attr = function(E, X, g, m) {
var L = this.element, z = this.symbolCustomAttribs, $, Q = this, A, H;
if (typeof E == "string" && typeof X < "u") {
var Y = E;
E = {}, E[Y] = X;
}
return typeof E == "string" ? Q = (this[E + "Getter"] || this._defaultGetter).call(this, E, L) : (s(E, function(Z, q) {
A = !1, m || B(this, q), this.symbolName && z.indexOf(q) !== -1 && ($ || (this.symbolAttr(E), $ = !0), A = !0), !this.rotation || q !== "x" && q !== "y" || (this.doTransform = !0), A || (H = this[q + "Setter"] || this._defaultSetter, H.call(this, Z, q, L), !this.styledMode && this.shadows && /^(width|height|visibility|x|y|d|transform|cx|cy|r)$/.test(q) && this.updateShadows(q, Z, H));
}, this), this.afterSetters()), g && g.call(this), Q;
}, W.prototype.clip = function(E) {
return this.attr("clip-path", E ? "url(" + this.renderer.url + "#" + E.id + ")" : "none");
}, W.prototype.crisp = function(E, X) {
X = X || E.strokeWidth || 0;
var g = Math.round(X) % 2 / 2;
return E.x = Math.floor(E.x || this.x || 0) + g, E.y = Math.floor(E.y || this.y || 0) + g, E.width = Math.floor((E.width || this.width || 0) - 2 * g), E.height = Math.floor((E.height || this.height || 0) - 2 * g), S(E.strokeWidth) && (E.strokeWidth = X), E;
}, W.prototype.complexColor = function(E, X, g) {
var m = this.renderer, L, z, $, Q, A, H, Y, Z, q, it, et = [], nt;
c(this.renderer, "complexColor", { args: arguments }, function() {
if (E.radialGradient ? z = "radialGradient" : E.linearGradient && (z = "linearGradient"), z) {
if ($ = E[z], A = m.gradients, H = E.stops, q = g.radialReference, u($) && (E[z] = $ = { x1: $[0], y1: $[1], x2: $[2], y2: $[3], gradientUnits: "userSpaceOnUse" }), z === "radialGradient" && q && !S($.gradientUnits) && (Q = $, $ = t($, m.getRadialAttr(q, Q), { gradientUnits: "userSpaceOnUse" })), s($, function(ct, gt) {
gt !== "id" && et.push(gt, ct);
}), s(H, function(ct) {
et.push(ct);
}), et = et.join(","), A[et])
it = A[et].attr("id");
else {
$.id = it = I();
var rt = A[et] = m.createElement(z).attr($).add(m.defs);
rt.radAttr = Q, rt.stops = [], H.forEach(function(ct) {
ct[1].indexOf("rgba") === 0 ? (L = _.parse(ct[1]), Y = L.get("rgb"), Z = L.get("a")) : (Y = ct[1], Z = 1), ct = m.createElement("stop").attr({
offset: ct[0],
"stop-color": Y,
"stop-opacity": Z
}).add(rt), rt.stops.push(ct);
});
}
nt = "url(" + m.url + "#" + it + ")", g.setAttribute(X, nt), g.gradient = et, E.toString = function() {
return nt;
};
}
});
}, W.prototype.css = function(E) {
var X = this.styles, g = {}, m = this.element, L = ["textOutline", "textOverflow", "width"], z = "", $ = !X;
if (E && E.color && (E.fill = E.color), X && s(E, function(H, Y) {
X && X[Y] !== H && (g[Y] = H, $ = !0);
}), $) {
if (X && (E = h(X, g)), E) {
if (E.width === null || E.width === "auto")
delete this.textWidth;
else if (m.nodeName.toLowerCase() === "text" && E.width)
var Q = this.textWidth = P(E.width);
}
if (this.styles = E, Q && !f && this.renderer.forExport && delete E.width, m.namespaceURI === this.SVG_NS) {
var A = function(H, Y) {
return "-" + Y.toLowerCase();
};
s(E, function(H, Y) {
L.indexOf(Y) === -1 && (z += Y.replace(/([A-Z])/g, A) + ":" + H + ";");
}), z && R(m, "style", z);
} else
b(m, E);
this.added && (this.element.nodeName === "text" && this.renderer.buildText(this), E && E.textOutline && this.applyTextOutline(E.textOutline));
}
return this;
}, W.prototype.dashstyleSetter = function(E) {
var X = this["stroke-width"];
if (X === "inherit" && (X = 1), E = E && E.toLowerCase()) {
var g = E.replace("shortdashdotdot", "3,1,1,1,1,1,").replace("shortdashdot", "3,1,1,1").replace("shortdot", "1,1,").replace("shortdash", "3,1,").replace("longdash", "8,3,").replace(/dot/g, "1,3,").replace("dash", "4,3,").replace(/,$/, "").split(",");
for (E = g.length; E--; )
g[E] = "" + P(g[E]) * n(X, NaN);
E = g.join(",").replace(/NaN/g, "none"), this.element.setAttribute("stroke-dasharray", E);
}
}, W.prototype.destroy = function() {
var E = this, X = E.element || {}, g = E.renderer, m = X.ownerSVGElement, L = g.isSVG && X.nodeName === "SPAN" && E.parentGroup || void 0;
if (X.onclick = X.onmouseout = X.onmouseover = X.onmousemove = X.point = null, B(E), E.clipPath && m) {
var z = E.clipPath;
[].forEach.call(m.querySelectorAll("[clip-path],[CLIP-PATH]"), function($) {
-1 < $.getAttribute("clip-path").indexOf(z.element.id) && $.removeAttribute("clip-path");
}), E.clipPath = z.destroy();
}
if (E.stops) {
for (m = 0; m < E.stops.length; m++)
E.stops[m].destroy();
E.stops.length = 0, E.stops = void 0;
}
for (E.safeRemoveChild(X), g.styledMode || E.destroyShadows(); L && L.div && L.div.childNodes.length === 0; )
X = L.parentGroup, E.safeRemoveChild(L.div), delete L.div, L = X;
E.alignTo && v(g.alignedObjects, E), s(E, function($, Q) {
E[Q] && E[Q].parentGroup === E && E[Q].destroy && E[Q].destroy(), delete E[Q];
});
}, W.prototype.destroyShadows = function() {
(this.shadows || []).forEach(function(E) {
this.safeRemoveChild(E);
}, this), this.shadows = void 0;
}, W.prototype.destroyTextPath = function(E, X) {
var g = E.getElementsByTagName("text")[0];
if (g) {
if (g.removeAttribute("dx"), g.removeAttribute("dy"), X.element.setAttribute("id", ""), this.textPathWrapper && g.getElementsByTagName("textPath").length) {
for (E = this.textPathWrapper.element.childNodes; E.length; )
g.appendChild(E[0]);
g.removeChild(this.textPathWrapper.element);
}
} else
(E.getAttribute("dx") || E.getAttribute("dy")) && (E.removeAttribute("dx"), E.removeAttribute("dy"));
this.textPathWrapper && (this.textPathWrapper = this.textPathWrapper.destroy());
}, W.prototype.dSetter = function(E, X, g) {
u(E) && (typeof E[0] == "string" && (E = this.renderer.pathToSegments(E)), this.pathArray = E, E = E.reduce(function(m, L, z) {
return L && L.join ? (z ? m + " " : "") + L.join(" ") : (L || "").toString();
}, "")), /(NaN| {2}|^$)/.test(E) && (E = "M 0 0"), this[X] !== E && (g.setAttribute(X, E), this[X] = E);
}, W.prototype.fadeOut = function(E) {
var X = this;
X.animate({ opacity: 0 }, { duration: n(E, 150), complete: function() {
X.attr({ y: -9999 }).hide();
} });
}, W.prototype.fillSetter = function(E, X, g) {
typeof E == "string" ? g.setAttribute(X, E) : E && this.complexColor(E, X, g);
}, W.prototype.getBBox = function(E, X) {
var g = this.renderer, m = this.element, L = this.styles, z = this.textStr, $ = g.cache, Q = g.cacheKeys, A = m.namespaceURI === this.SVG_NS;
X = n(X, this.rotation, 0);
var H = g.styledMode ? m && W.prototype.getStyle.call(m, "font-size") : L && L.fontSize, Y;
if (S(z)) {
var Z = z.toString();
Z.indexOf("<") === -1 && (Z = Z.replace(/[0-9]/g, "0")), Z += ["", X, H, this.textWidth, L && L.textOverflow, L && L.fontWeight].join();
}
if (Z && !E && (Y = $[Z]), !Y) {
if (A || g.forExport) {
try {
var q = this.fakeTS && function(it) {
var et = m.querySelector(".highcharts-text-outline");
et && b(et, { display: it });
};
i(q) && q("none"), Y = m.getBBox ? h({}, m.getBBox()) : { width: m.offsetWidth, height: m.offsetHeight }, i(q) && q("");
} catch {
}
(!Y || 0 > Y.width) && (Y = {
width: 0,
height: 0
});
} else
Y = this.htmlGetBBox();
if (g.isSVG && (E = Y.width, g = Y.height, A && (Y.height = g = { "11px,17": 14, "13px,20": 16 }[(H || "") + "," + Math.round(g)] || g), X && (A = X * j, Y.width = Math.abs(g * Math.sin(A)) + Math.abs(E * Math.cos(A)), Y.height = Math.abs(g * Math.cos(A)) + Math.abs(E * Math.sin(A)))), Z && (z === "" || 0 < Y.height)) {
for (; 250 < Q.length; )
delete $[Q.shift()];
$[Z] || Q.push(Z), $[Z] = Y;
}
}
return Y;
}, W.prototype.getStyle = function(E) {
return T.getComputedStyle(this.element || this, "").getPropertyValue(E);
}, W.prototype.hasClass = function(E) {
return ("" + this.attr("class")).split(" ").indexOf(E) !== -1;
}, W.prototype.hide = function(E) {
return E ? this.attr({ y: -9999 }) : this.attr({ visibility: "hidden" }), this;
}, W.prototype.htmlGetBBox = function() {
return { height: 0, width: 0, x: 0, y: 0 };
}, W.prototype.init = function(E, X) {
this.element = X === "span" ? k(X) : w.createElementNS(this.SVG_NS, X), this.renderer = E, c(this, "afterInit");
}, W.prototype.invert = function(E) {
return this.inverted = E, this.updateTransform(), this;
}, W.prototype.on = function(E, X) {
var g = this.onEvents;
return g[E] && g[E](), g[E] = O(
this.element,
E,
X
), this;
}, W.prototype.opacitySetter = function(E, X, g) {
this.opacity = E = Number(Number(E).toFixed(3)), g.setAttribute(X, E);
}, W.prototype.removeClass = function(E) {
return this.attr("class", ("" + this.attr("class")).replace(a(E) ? new RegExp("(^| )" + E + "( |$)") : E, " ").replace(/ +/g, " ").trim());
}, W.prototype.removeTextOutline = function() {
var E = this.element.querySelector("tspan.highcharts-text-outline");
E && this.safeRemoveChild(E);
}, W.prototype.safeRemoveChild = function(E) {
var X = E.parentNode;
X && X.removeChild(E);
}, W.prototype.setRadialReference = function(E) {
var X = this.element.gradient && this.renderer.gradients[this.element.gradient];
return this.element.radialReference = E, X && X.radAttr && X.animate(this.renderer.getRadialAttr(E, X.radAttr)), this;
}, W.prototype.setTextPath = function(E, X) {
var g = this.element, m = this.text ? this.text.element : g, L = { textAnchor: "text-anchor" }, z = !1, $ = this.textPathWrapper, Q = !$;
X = t(!0, { enabled: !0, attributes: { dy: -5, startOffset: "50%", textAnchor: "middle" } }, X);
var A = N.filterUserAttributes(X.attributes);
if (E && X && X.enabled) {
$ && $.element.parentNode === null ? (Q = !0, $ = $.destroy()) : $ && this.removeTextOutline.call($.parentGroup), this.options && this.options.padding && (A.dx = -this.options.padding), $ || (this.textPathWrapper = $ = this.renderer.createElement("textPath"), z = !0);
var H = $.element;
if ((X = E.element.getAttribute("id")) || E.element.setAttribute("id", X = I()), Q)
for (m.setAttribute("y", 0), p(A.dx) && m.setAttribute("x", -A.dx), E = [].slice.call(m.childNodes), Q = 0; Q < E.length; Q++) {
var Y = E[Q];
Y.nodeType !== T.Node.TEXT_NODE && Y.nodeName !== "tspan" || H.appendChild(Y);
}
z && $ && $.add({ element: m }), H.setAttributeNS("http://www.w3.org/1999/xlink", "href", this.renderer.url + "#" + X), S(A.dy) && (H.parentNode.setAttribute("dy", A.dy), delete A.dy), S(A.dx) && (H.parentNode.setAttribute("dx", A.dx), delete A.dx), s(A, function(Z, q) {
H.setAttribute(L[q] || q, Z);
}), g.removeAttribute("transform"), this.removeTextOutline.call($), this.text && !this.renderer.styledMode && this.attr({ fill: "none", "stroke-width": 0 }), this.applyTextOutline = this.updateTransform = x;
} else
$ && (delete this.updateTransform, delete this.applyTextOutline, this.destroyTextPath(g, E), this.updateTransform(), this.options && this.options.rotation && this.applyTextOutline(this.options.style.textOutline));
return this;
}, W.prototype.shadow = function(E, X, g) {
var m = [], L = this.element, z = this.oldShadowOptions, $ = { color: "#000000", offsetX: this.parentInverted ? -1 : 1, offsetY: this.parentInverted ? -1 : 1, opacity: 0.15, width: 3 }, Q = !1, A;
if (E === !0 ? A = $ : typeof E == "object" && (A = h($, E)), A && (A && z && s(A, function(it, et) {
it !== z[et] && (Q = !0);
}), Q && this.destroyShadows(), this.oldShadowOptions = A), !A)
this.destroyShadows();
else if (!this.shadows) {
var H = A.opacity / A.width, Y = this.parentInverted ? "translate(" + A.offsetY + ", " + A.offsetX + ")" : "translate(" + A.offsetX + ", " + A.offsetY + ")";
for ($ = 1; $ <= A.width; $++) {
var Z = L.cloneNode(!1), q = 2 * A.width + 1 - 2 * $;
R(Z, { stroke: E.color || "#000000", "stroke-opacity": H * $, "stroke-width": q, transform: Y, fill: "none" }), Z.setAttribute("class", (Z.getAttribute("class") || "") + " highcharts-shadow"), g && (R(Z, "height", Math.max(R(Z, "height") - q, 0)), Z.cutHeight = q), X ? X.element.appendChild(Z) : L.parentNode && L.parentNode.insertBefore(Z, L), m.push(Z);
}
this.shadows = m;
}
return this;
}, W.prototype.show = function(E) {
return this.attr({ visibility: E ? "inherit" : "visible" });
}, W.prototype.strokeSetter = function(E, X, g) {
this[X] = E, this.stroke && this["stroke-width"] ? (W.prototype.fillSetter.call(this, this.stroke, "stroke", g), g.setAttribute("stroke-width", this["stroke-width"]), this.hasStroke = !0) : X === "stroke-width" && E === 0 && this.hasStroke ? (g.removeAttribute("stroke"), this.hasStroke = !1) : this.renderer.styledMode && this["stroke-width"] && (g.setAttribute("stroke-width", this["stroke-width"]), this.hasStroke = !0);
}, W.prototype.strokeWidth = function() {
if (!this.renderer.styledMode)
return this["stroke-width"] || 0;
var E = this.getStyle("stroke-width"), X = 0;
if (E.indexOf("px") === E.length - 2)
X = P(E);
else if (E !== "") {
var g = w.createElementNS(l, "rect");
R(g, { width: E, "stroke-width": 0 }), this.element.parentNode.appendChild(g), X = g.getBBox().width, g.parentNode.removeChild(g);
}
return X;
}, W.prototype.symbolAttr = function(E) {
var X = this;
"x y r start end width height innerR anchorX anchorY clockwise".split(" ").forEach(function(g) {
X[g] = n(E[g], X[g]);
}), X.attr({ d: X.renderer.symbols[X.symbolName](X.x, X.y, X.width, X.height, X) });
}, W.prototype.textSetter = function(E) {
E !== this.textStr && (delete this.textPxLength, this.textStr = E, this.added && this.renderer.buildText(this));
}, W.prototype.titleSetter = function(E) {
var X = this.element, g = X.getElementsByTagName("title")[0] || w.createElementNS(this.SVG_NS, "title");
X.insertBefore ? X.insertBefore(g, X.firstChild) : X.appendChild(g), g.textContent = String(n(E, "")).replace(/<[^>]*>/g, "").replace(/</g, "<").replace(
/>/g,
">"
);
}, W.prototype.toFront = function() {
var E = this.element;
return E.parentNode.appendChild(E), this;
}, W.prototype.translate = function(E, X) {
return this.attr({ translateX: E, translateY: X });
}, W.prototype.updateShadows = function(E, X, g) {
var m = this.shadows;
if (m)
for (var L = m.length; L--; )
g.call(m[L], E === "height" ? Math.max(X - (m[L].cutHeight || 0), 0) : E === "d" ? this.d : X, E, m[L]);
}, W.prototype.updateTransform = function() {
var E = this.scaleX, X = this.scaleY, g = this.inverted, m = this.rotation, L = this.matrix, z = this.element, $ = this.translateX || 0, Q = this.translateY || 0;
g && ($ += this.width, Q += this.height), $ = ["translate(" + $ + "," + Q + ")"], S(L) && $.push("matrix(" + L.join(",") + ")"), g ? $.push("rotate(90) scale(-1,1)") : m && $.push("rotate(" + m + " " + n(this.rotationOriginX, z.getAttribute("x"), 0) + " " + n(this.rotationOriginY, z.getAttribute("y") || 0) + ")"), (S(E) || S(X)) && $.push("scale(" + n(E, 1) + " " + n(X, 1) + ")"), $.length && z.setAttribute("transform", $.join(" "));
}, W.prototype.visibilitySetter = function(E, X, g) {
E === "inherit" ? g.removeAttribute(X) : this[X] !== E && g.setAttribute(
X,
E
), this[X] = E;
}, W.prototype.xGetter = function(E) {
return this.element.nodeName === "circle" && (E === "x" ? E = "cx" : E === "y" && (E = "cy")), this._defaultGetter(E);
}, W.prototype.zIndexSetter = function(E, X) {
var g = this.renderer, m = this.parentGroup, L = (m || g).element || g.box, z = this.element;
g = L === g.box;
var $ = !1, Q = this.added, A;
if (S(E) ? (z.setAttribute("data-z-index", E), E = +E, this[X] === E && (Q = !1)) : S(this[X]) && z.removeAttribute("data-z-index"), this[X] = E, Q) {
for ((E = this.zIndex) && m && (m.handleZ = !0), X = L.childNodes, A = X.length - 1; 0 <= A && !$; A--) {
m = X[A], Q = m.getAttribute("data-z-index");
var H = !S(Q);
m !== z && (0 > E && H && !g && !A ? (L.insertBefore(z, X[A]), $ = !0) : (P(Q) <= E || H && (!S(E) || 0 <= E)) && (L.insertBefore(z, X[A + 1] || null), $ = !0));
}
$ || (L.insertBefore(z, X[g ? 3 : 0] || null), $ = !0);
}
return $;
}, W;
}(), y.prototype["stroke-widthSetter"] = y.prototype.strokeSetter, y.prototype.yGetter = y.prototype.xGetter, y.prototype.matrixSetter = y.prototype.rotationOriginXSetter = y.prototype.rotationOriginYSetter = y.prototype.rotationSetter = y.prototype.scaleXSetter = y.prototype.scaleYSetter = y.prototype.translateXSetter = y.prototype.translateYSetter = y.prototype.verticalAlignSetter = function(W, E) {
this[E] = W, this.doTransform = !0;
}, y;
}), C(o, "Core/Renderer/RendererRegistry.js", [o["Core/Globals.js"]], function(y) {
var N;
return function(_) {
_.rendererTypes = {};
var U;
_.getRendererType = function(G) {
return G === void 0 && (G = U), _.rendererTypes[G] || _.rendererTypes[U];
}, _.registerRendererType = function(G, V, F) {
_.rendererTypes[G] = V, (!U || F) && (U = G, y.Renderer = V);
};
}(N || (N = {})), N;
}), C(
o,
"Core/Renderer/SVG/SVGLabel.js",
[o["Core/Renderer/SVG/SVGElement.js"], o["Core/Utilities.js"]],
function(y, N) {
var _ = this && this.__extends || function() {
var w = function(x, f) {
return w = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(l, T) {
l.__proto__ = T;
} || function(l, T) {
for (var O in T)
T.hasOwnProperty(O) && (l[O] = T[O]);
}, w(x, f);
};
return function(x, f) {
function l() {
this.constructor = x;
}
w(x, f), x.prototype = f === null ? Object.create(f) : (l.prototype = f.prototype, new l());
};
}(), U = N.defined, G = N.extend, V = N.isNumber, F = N.merge, B = N.pick, j = N.removeEvent;
return function(w) {
function x(f, l, T, O, R, k, b, S, v, h) {
var c = w.call(this) || this;
c.paddingLeftSetter = c.paddingSetter, c.paddingRightSetter = c.paddingSetter, c.init(f, "g"), c.textStr = l, c.x = T, c.y = O, c.anchorX = k, c.anchorY = b, c.baseline = v, c.className = h, c.addClass(h === "button" ? "highcharts-no-tooltip" : "highcharts-label"), h && c.addClass("highcharts-" + h), c.text = f.text(void 0, 0, 0, S).attr({ zIndex: 1 });
var u;
return typeof R == "string" && ((u = /^url\((.*?)\)$/.test(R)) || c.renderer.symbols[R]) && (c.symbolKey = R), c.bBox = x.emptyBBox, c.padding = 3, c.baselineOffset = 0, c.needsBox = f.styledMode || u, c.deferredAttr = {}, c.alignFactor = 0, c;
}
return _(x, w), x.prototype.alignSetter = function(f) {
f = { left: 0, center: 0.5, right: 1 }[f], f !== this.alignFactor && (this.alignFactor = f, this.bBox && V(this.xSetting) && this.attr({ x: this.xSetting }));
}, x.prototype.anchorXSetter = function(f, l) {
this.anchorX = f, this.boxAttr(l, Math.round(f) - this.getCrispAdjust() - this.xSetting);
}, x.prototype.anchorYSetter = function(f, l) {
this.anchorY = f, this.boxAttr(l, f - this.ySetting);
}, x.prototype.boxAttr = function(f, l) {
this.box ? this.box.attr(f, l) : this.deferredAttr[f] = l;
}, x.prototype.css = function(f) {
if (f) {
var l = {};
f = F(f), x.textProps.forEach(function(O) {
typeof f[O] < "u" && (l[O] = f[O], delete f[O]);
}), this.text.css(l);
var T = "width" in l;
"fontSize" in l || "fontWeight" in l ? this.updateTextPadding() : T && this.updateBoxSize();
}
return y.prototype.css.call(this, f);
}, x.prototype.destroy = function() {
j(this.element, "mouseenter"), j(this.element, "mouseleave"), this.text && this.text.destroy(), this.box && (this.box = this.box.destroy()), y.prototype.destroy.call(this);
}, x.prototype.fillSetter = function(f, l) {
f && (this.needsBox = !0), this.fill = f, this.boxAttr(l, f);
}, x.prototype.getBBox = function() {
this.textStr && this.bBox.width === 0 && this.bBox.height === 0 && this.updateBoxSize();
var f = this.padding, l = B(this.paddingLeft, f);
return { width: this.width, height: this.height, x: this.bBox.x - l, y: this.bBox.y - f };
}, x.prototype.getCrispAdjust = function() {
return this.renderer.styledMode && this.box ? this.box.strokeWidth() % 2 / 2 : (this["stroke-width"] ? parseInt(
this["stroke-width"],
10
) : 0) % 2 / 2;
}, x.prototype.heightSetter = function(f) {
this.heightSetting = f;
}, x.prototype.onAdd = function() {
var f = this.textStr;
this.text.add(this), this.attr({ text: U(f) ? f : "", x: this.x, y: this.y }), this.box && U(this.anchorX) && this.attr({ anchorX: this.anchorX, anchorY: this.anchorY });
}, x.prototype.paddingSetter = function(f, l) {
V(f) ? f !== this[l] && (this[l] = f, this.updateTextPadding()) : this[l] = void 0;
}, x.prototype.rSetter = function(f, l) {
this.boxAttr(l, f);
}, x.prototype.shadow = function(f) {
return f && !this.renderer.styledMode && (this.updateBoxSize(), this.box && this.box.shadow(f)), this;
}, x.prototype.strokeSetter = function(f, l) {
this.stroke = f, this.boxAttr(l, f);
}, x.prototype["stroke-widthSetter"] = function(f, l) {
f && (this.needsBox = !0), this["stroke-width"] = f, this.boxAttr(l, f);
}, x.prototype["text-alignSetter"] = function(f) {
this.textAlign = f;
}, x.prototype.textSetter = function(f) {
typeof f < "u" && this.text.attr({ text: f }), this.updateTextPadding();
}, x.prototype.updateBoxSize = function() {
var f = this.text.element.style, l = {}, T = this.padding, O = this.bBox = V(this.widthSetting) && V(this.heightSetting) && !this.textAlign || !U(this.text.textStr) ? x.emptyBBox : this.text.getBBox();
this.width = this.getPaddedWidth(), this.height = (this.heightSetting || O.height || 0) + 2 * T, f = this.renderer.fontMetrics(f && f.fontSize, this.text), this.baselineOffset = T + Math.min((this.text.firstLineMetrics || f).b, O.height || 1 / 0), this.heightSetting && (this.baselineOffset += (this.heightSetting - f.h) / 2), this.needsBox && (this.box || (T = this.box = this.symbolKey ? this.renderer.symbol(this.symbolKey) : this.renderer.rect(), T.addClass((this.className === "button" ? "" : "highcharts-label-box") + (this.className ? " highcharts-" + this.className + "-box" : "")), T.add(this)), T = this.getCrispAdjust(), l.x = T, l.y = (this.baseline ? -this.baselineOffset : 0) + T, l.width = Math.round(this.width), l.height = Math.round(this.height), this.box.attr(G(l, this.deferredAttr)), this.deferredAttr = {});
}, x.prototype.updateTextPadding = function() {
var f = this.text;
this.updateBoxSize();
var l = this.baseline ? 0 : this.baselineOffset, T = B(this.paddingLeft, this.padding);
U(this.widthSetting) && this.bBox && (this.textAlign === "center" || this.textAlign === "right") && (T += { center: 0.5, right: 1 }[this.textAlign] * (this.widthSetting - this.bBox.width)), (T !== f.x || l !== f.y) && (f.attr("x", T), f.hasBoxWidthChanged && (this.bBox = f.getBBox(!0)), typeof l < "u" && f.attr("y", l)), f.x = T, f.y = l;
}, x.prototype.widthSetter = function(f) {
this.widthSetting = V(f) ? f : void 0;
}, x.prototype.getPaddedWidth = function() {
var f = this.padding, l = B(this.paddingLeft, f);
return f = B(this.paddingRight, f), (this.widthSetting || this.bBox.width || 0) + l + f;
}, x.prototype.xSetter = function(f) {
this.x = f, this.alignFactor && (f -= this.alignFactor * this.getPaddedWidth(), this["forceAnimate:x"] = !0), this.xSetting = Math.round(f), this.attr("translateX", this.xSetting);
}, x.prototype.ySetter = function(f) {
this.ySetting = this.y = Math.round(f), this.attr("translateY", this.ySetting);
}, x.emptyBBox = { width: 0, height: 0, x: 0, y: 0 }, x.textProps = "color direction fontFamily fontSize fontStyle fontWeight lineHeight textAlign textDecoration textOutline textOverflow width".split(" "), x;
}(y);
}
), C(
o,
"Core/Renderer/SVG/Symbols.js",
[o["Core/Utilities.js"]],
function(y) {
function N(B, j, w, x, f) {
var l = [];
if (f) {
var T = f.start || 0, O = F(f.r, w);
w = F(f.r, x || w);
var R = (f.end || 0) - 1e-3;
x = f.innerR;
var k = F(f.open, 1e-3 > Math.abs((f.end || 0) - T - 2 * Math.PI)), b = Math.cos(T), S = Math.sin(T), v = Math.cos(R), h = Math.sin(R);
T = F(f.longArc, 1e-3 > R - T - Math.PI ? 0 : 1), l.push(["M", B + O * b, j + w * S], ["A", O, w, 0, T, F(f.clockwise, 1), B + O * v, j + w * h]), G(x) && l.push(k ? ["M", B + x * v, j + x * h] : ["L", B + x * v, j + x * h], ["A", x, x, 0, T, G(f.clockwise) ? 1 - f.clockwise : 0, B + x * b, j + x * S]), k || l.push(["Z"]);
}
return l;
}
function _(B, j, w, x, f) {
return f && f.r ? U(B, j, w, x, f) : [["M", B, j], ["L", B + w, j], ["L", B + w, j + x], ["L", B, j + x], ["Z"]];
}
function U(B, j, w, x, f) {
return f = f && f.r || 0, [["M", B + f, j], ["L", B + w - f, j], ["C", B + w, j, B + w, j, B + w, j + f], ["L", B + w, j + x - f], ["C", B + w, j + x, B + w, j + x, B + w - f, j + x], ["L", B + f, j + x], ["C", B, j + x, B, j + x, B, j + x - f], ["L", B, j + f], ["C", B, j, B, j, B + f, j]];
}
var G = y.defined, V = y.isNumber, F = y.pick;
return { arc: N, callout: function(B, j, w, x, f) {
var l = Math.min(f && f.r || 0, w, x), T = l + 6, O = f && f.anchorX;
f = f && f.anchorY || 0;
var R = U(B, j, w, x, { r: l });
return V(O) && (B + O >= w ? f > j + T && f < j + x - T ? R.splice(3, 1, ["L", B + w, f - 6], ["L", B + w + 6, f], ["L", B + w, f + 6], ["L", B + w, j + x - l]) : R.splice(3, 1, ["L", B + w, x / 2], ["L", O, f], ["L", B + w, x / 2], ["L", B + w, j + x - l]) : 0 >= B + O ? f > j + T && f < j + x - T ? R.splice(7, 1, ["L", B, f + 6], ["L", B - 6, f], ["L", B, f - 6], ["L", B, j + l]) : R.splice(7, 1, ["L", B, x / 2], ["L", O, f], ["L", B, x / 2], ["L", B, j + l]) : f && f > x && O > B + T && O < B + w - T ? R.splice(5, 1, ["L", O + 6, j + x], ["L", O, j + x + 6], ["L", O - 6, j + x], ["L", B + l, j + x]) : f && 0 > f && O > B + T && O < B + w - T && R.splice(1, 1, ["L", O - 6, j], ["L", O, j - 6], ["L", O + 6, j], ["L", w - l, j])), R;
}, circle: function(B, j, w, x) {
return N(B + w / 2, j + x / 2, w / 2, x / 2, { start: 0.5 * Math.PI, end: 2.5 * Math.PI, open: !1 });
}, diamond: function(B, j, w, x) {
return [["M", B + w / 2, j], ["L", B + w, j + x / 2], ["L", B + w / 2, j + x], ["L", B, j + x / 2], ["Z"]];
}, rect: _, roundedRect: U, square: _, triangle: function(B, j, w, x) {
return [["M", B + w / 2, j], ["L", B + w, j + x], ["L", B, j + x], ["Z"]];
}, "triangle-down": function(B, j, w, x) {
return [["M", B, j], ["L", B + w, j], ["L", B + w / 2, j + x], ["Z"]];
} };
}
), C(o, "Core/Renderer/SVG/TextBuilder.js", [o["Core/Renderer/HTML/AST.js"], o["Core/Globals.js"], o["Core/Utilities.js"]], function(y, N, _) {
var U = N.doc, G = N.SVG_NS, V = N.win, F = _.attr, B = _.isString, j = _.objectEach, w = _.pick;
return function() {
function x(f) {
var l = f.styles;
this.renderer = f.renderer, this.svgElement = f, this.width = f.textWidth, this.textLineHeight = l && l.lineHeight, this.textOutline = l && l.textOutline, this.ellipsis = !(!l || l.textOverflow !== "ellipsis"), this.noWrap = !(!l || l.whiteSpace !== "nowrap"), this.fontSize = l && l.fontSize;
}
return x.prototype.buildSVG = function() {
var f = this.svgElement, l = f.element, T = f.renderer, O = w(f.textStr, "").toString(), R = O.indexOf("<") !== -1, k = l.childNodes;
T = this.width && !f.added && T.box;
var b = //g, S = [O, this.ellipsis, this.noWrap, this.textLineHeight, this.textOutline, this.fontSize, this.width].join();
if (S !== f.textCache) {
for (f.textCache = S, delete f.actualWidth, S = k.length; S--; )
l.removeChild(k[S]);
R || this.ellipsis || this.width || O.indexOf(" ") !== -1 && (!this.noWrap || b.test(O)) ? O !== "" && (T && T.appendChild(l), O = new y(O), this.modifyTree(O.nodes), O.addToDOM(f.element), this.modifyDOM(), this.ellipsis && (l.textContent || "").indexOf("…") !== -1 && f.attr(
"title",
this.unescapeEntities(f.textStr || "", ["<", ">"])
), T && T.removeChild(l)) : l.appendChild(U.createTextNode(this.unescapeEntities(O))), B(this.textOutline) && f.applyTextOutline && f.applyTextOutline(this.textOutline);
}
}, x.prototype.modifyDOM = function() {
var f = this, l = this.svgElement, T = F(l.element, "x");
l.firstLineMetrics = void 0;
for (var O; (O = l.element.firstChild) && /^[\s\u200B]*$/.test(O.textContent || " "); )
l.element.removeChild(O);
[].forEach.call(l.element.querySelectorAll("tspan.highcharts-br"), function(S, v) {
S.nextSibling && S.previousSibling && (v === 0 && S.previousSibling.nodeType === 1 && (l.firstLineMetrics = l.renderer.fontMetrics(void 0, S.previousSibling)), F(S, { dy: f.getLineHeight(S.nextSibling), x: T }));
});
var R = this.width || 0;
if (R) {
var k = function(S, v) {
var h = S.textContent || "", c = h.replace(/([^\^])-/g, "$1- ").split(" "), u = !f.noWrap && (1 < c.length || 1 < l.element.childNodes.length), i = f.getLineHeight(v), p = 0, a = l.actualWidth;
if (f.ellipsis)
h && f.truncate(S, h, void 0, 0, Math.max(0, R - parseInt(f.fontSize || 12, 10)), function(t, s) {
return t.substring(
0,
s
) + "…";
});
else if (u) {
for (h = [], u = []; v.firstChild && v.firstChild !== S; )
u.push(v.firstChild), v.removeChild(v.firstChild);
for (; c.length; )
c.length && !f.noWrap && 0 < p && (h.push(S.textContent || ""), S.textContent = c.join(" ").replace(/- /g, "-")), f.truncate(S, void 0, c, p === 0 && a || 0, R, function(t, s) {
return c.slice(0, s).join(" ").replace(/- /g, "-");
}), a = l.actualWidth, p++;
u.forEach(function(t) {
v.insertBefore(t, S);
}), h.forEach(function(t) {
v.insertBefore(U.createTextNode(t), S), t = U.createElementNS(G, "tspan"), t.textContent = "", F(t, { dy: i, x: T }), v.insertBefore(t, S);
});
}
}, b = function(S) {
[].slice.call(S.childNodes).forEach(function(v) {
v.nodeType === V.Node.TEXT_NODE ? k(v, S) : (v.className.baseVal.indexOf("highcharts-br") !== -1 && (l.actualWidth = 0), b(v));
});
};
b(l.element);
}
}, x.prototype.getLineHeight = function(f) {
var l;
return f = f.nodeType === V.Node.TEXT_NODE ? f.parentElement : f, this.renderer.styledMode || (l = f && /(px|em)$/.test(f.style.fontSize) ? f.style.fontSize : this.fontSize || this.renderer.style.fontSize || 12), this.textLineHeight ? parseInt(
this.textLineHeight.toString(),
10
) : this.renderer.fontMetrics(l, f || this.svgElement.element).h;
}, x.prototype.modifyTree = function(f) {
var l = this, T = function(O, R) {
var k = O.attributes;
k = k === void 0 ? {} : k;
var b = O.children, S = O.tagName, v = l.renderer.styledMode;
S === "b" || S === "strong" ? v ? k.class = "highcharts-strong" : k.style = "font-weight:bold;" + (k.style || "") : (S === "i" || S === "em") && (v ? k.class = "highcharts-emphasized" : k.style = "font-style:italic;" + (k.style || "")), B(k.style) && (k.style = k.style.replace(/(;| |^)color([ :])/, "$1fill$2")), S === "br" ? (k.class = "highcharts-br", O.textContent = "", (R = f[R + 1]) && R.textContent && (R.textContent = R.textContent.replace(/^ +/gm, ""))) : S === "a" && b && b.some(function(h) {
return h.tagName === "#text";
}) && (O.children = [{ children: b, tagName: "tspan" }]), S !== "#text" && S !== "a" && (O.tagName = "tspan"), O.attributes = k, b && b.filter(function(h) {
return h.tagName !== "#text";
}).forEach(T);
};
f.forEach(T);
}, x.prototype.truncate = function(f, l, T, O, R, k) {
var b = this.svgElement, S = b.renderer, v = b.rotation, h = [], c = T ? 1 : 0, u = (l || T || "").length, i = u, p, a = function(s, n) {
n = n || s;
var P = f.parentNode;
if (P && typeof h[n] > "u")
if (P.getSubStringLength)
try {
h[n] = O + P.getSubStringLength(0, T ? n + 1 : n);
} catch {
}
else
S.getSpanWidth && (f.textContent = k(l || T, s), h[n] = O + S.getSpanWidth(b, f));
return h[n];
};
b.rotation = 0;
var t = a(f.textContent.length);
if (O + t > R) {
for (; c <= u; )
i = Math.ceil((c + u) / 2), T && (p = k(T, i)), t = a(i, p && p.length - 1), c === u ? c = u + 1 : t > R ? u = i - 1 : c = i;
u === 0 ? f.textContent = "" : l && u === l.length - 1 || (f.textContent = p || k(l || T, i));
}
T && T.splice(0, i), b.actualWidth = t, b.rotation = v;
}, x.prototype.unescapeEntities = function(f, l) {
return j(this.renderer.escapes, function(T, O) {
l && l.indexOf(T) !== -1 || (f = f.toString().replace(new RegExp(T, "g"), O));
}), f;
}, x;
}();
}), C(o, "Core/Renderer/SVG/SVGRenderer.js", [o["Core/Renderer/HTML/AST.js"], o["Core/Color/Color.js"], o["Core/Globals.js"], o["Core/Renderer/RendererRegistry.js"], o["Core/Renderer/SVG/SVGElement.js"], o["Core/Renderer/SVG/SVGLabel.js"], o["Core/Renderer/SVG/Symbols.js"], o["Core/Renderer/SVG/TextBuilder.js"], o["Core/Utilities.js"]], function(y, N, _, U, G, V, F, B, j) {
var w = _.charts, x = _.deg2rad, f = _.doc, l = _.isFirefox, T = _.isMS, O = _.isWebKit, R = _.noop, k = _.SVG_NS, b = _.symbolSizes, S = _.win, v = j.addEvent, h = j.attr, c = j.createElement, u = j.css, i = j.defined, p = j.destroyObjectProperties, a = j.extend, t = j.isArray, s = j.isNumber, n = j.isObject, P = j.isString, D = j.merge, I = j.pick, W = j.pInt, E = j.uniqueKey, X;
return _ = function() {
function g(m, L, z, $, Q, A, H) {
this.width = this.url = this.style = this.isSVG = this.imgCount = this.height = this.gradients = this.globalAnimation = this.defs = this.chartIndex = this.cacheKeys = this.cache = this.boxWrapper = this.box = this.alignedObjects = void 0, this.init(m, L, z, $, Q, A, H);
}
return g.prototype.init = function(m, L, z, $, Q, A, H) {
var Y = this.createElement("svg").attr({ version: "1.1", class: "highcharts-root" }), Z = Y.element;
H || Y.css(this.getStyle($)), m.appendChild(Z), h(m, "dir", "ltr"), m.innerHTML.indexOf("xmlns") === -1 && h(Z, "xmlns", this.SVG_NS), this.isSVG = !0, this.box = Z, this.boxWrapper = Y, this.alignedObjects = [], this.url = this.getReferenceURL(), this.createElement("desc").add().element.appendChild(f.createTextNode("Created with Highcharts 9.3.3")), this.defs = this.createElement("defs").add(), this.allowHTML = A, this.forExport = Q, this.styledMode = H, this.gradients = {}, this.cache = {}, this.cacheKeys = [], this.imgCount = 0, this.setSize(L, z, !1);
var q;
l && m.getBoundingClientRect && (L = function() {
u(m, { left: 0, top: 0 }), q = m.getBoundingClientRect(), u(m, { left: Math.ceil(q.left) - q.left + "px", top: Math.ceil(q.top) - q.top + "px" });
}, L(), this.unSubPixelFix = v(S, "resize", L));
}, g.prototype.definition = function(m) {
return new y([m]).addToDOM(this.defs.element);
}, g.prototype.getReferenceURL = function() {
if ((l || O) && f.getElementsByTagName("base").length) {
if (!i(X)) {
var m = E();
m = new y([{ tagName: "svg", attributes: { width: 8, height: 8 }, children: [{ tagName: "defs", children: [{ tagName: "clipPath", attributes: { id: m }, children: [{ tagName: "rect", attributes: { width: 4, height: 4 } }] }] }, { tagName: "rect", attributes: { id: "hitme", width: 8, height: 8, "clip-path": "url(#" + m + ")", fill: "rgba(0,0,0,0.001)" } }] }]).addToDOM(f.body), u(m, { position: "fixed", top: 0, left: 0, zIndex: 9e5 });
var L = f.elementFromPoint(6, 6);
X = (L && L.id) === "hitme", f.body.removeChild(m);
}
if (X)
return S.location.href.split("#")[0].replace(/<[^>]*>/g, "").replace(/([\('\)])/g, "\\$1").replace(/ /g, "%20");
}
return "";
}, g.prototype.getStyle = function(m) {
return this.style = a({ fontFamily: '"Lucida Grande", "Lucida Sans Unicode", Arial, Helvetica, sans-serif', fontSize: "12px" }, m);
}, g.prototype.setStyle = function(m) {
this.boxWrapper.css(this.getStyle(m));
}, g.prototype.isHidden = function() {
return !this.boxWrapper.getBBox().width;
}, g.prototype.destroy = function() {
var m = this.defs;
return this.box = null, this.boxWrapper = this.boxWrapper.destroy(), p(this.gradients || {}), this.gradients = null, m && (this.defs = m.destroy()), this.unSubPixelFix && this.unSubPixelFix(), this.alignedObjects = null;
}, g.prototype.createElement = function(m) {
var L = new this.Element();
return L.init(this, m), L;
}, g.prototype.getRadialAttr = function(m, L) {
return { cx: m[0] - m[2] / 2 + (L.cx || 0) * m[2], cy: m[1] - m[2] / 2 + (L.cy || 0) * m[2], r: (L.r || 0) * m[2] };
}, g.prototype.buildText = function(m) {
new B(m).buildSVG();
}, g.prototype.getContrast = function(m) {
return m = N.parse(m).rgba, m[0] *= 1, m[1] *= 1.2, m[2] *= 0.5, 459 < m[0] + m[1] + m[2] ? "#000000" : "#FFFFFF";
}, g.prototype.button = function(m, L, z, $, Q, A, H, Y, Z, q) {
var it = this.label(m, L, z, Z, void 0, void 0, q, void 0, "button"), et = this.styledMode, nt = 0, rt = Q ? D(Q) : {};
if (m = rt && rt.style || {}, rt = y.filterUserAttributes(rt), it.attr(D({ padding: 8, r: 2 }, rt)), !et) {
rt = D({ fill: "#f7f7f7", stroke: "#cccccc", "stroke-width": 1, style: { color: "#333333", cursor: "pointer", fontWeight: "normal" } }, { style: m }, rt);
var ct = rt.style;
delete rt.style, A = D(rt, { fill: "#e6e6e6" }, y.filterUserAttributes(A || {}));
var gt = A.style;
delete A.style, H = D(rt, { fill: "#e6ebf5", style: { color: "#000000", fontWeight: "bold" } }, y.filterUserAttributes(H || {}));
var dt = H.style;
delete H.style, Y = D(rt, { style: { color: "#cccccc" } }, y.filterUserAttributes(Y || {}));
var ht = Y.style;
delete Y.style;
}
return v(it.element, T ? "mouseover" : "mouseenter", function() {
nt !== 3 && it.setState(1);
}), v(it.element, T ? "mouseout" : "mouseleave", function() {
nt !== 3 && it.setState(nt);
}), it.setState = function(at) {
at !== 1 && (it.state = nt = at), it.removeClass(/highcharts-button-(normal|hover|pressed|disabled)/).addClass("highcharts-button-" + ["normal", "hover", "pressed", "disabled"][at || 0]), et || it.attr([rt, A, H, Y][at || 0]).css([ct, gt, dt, ht][at || 0]);
}, et || it.attr(rt).css(a({ cursor: "default" }, ct)), it.on("touchstart", function(at) {
return at.stopPropagation();
}).on("click", function(at) {
nt !== 3 && $.call(it, at);
});
}, g.prototype.crispLine = function(m, L, z) {
z === void 0 && (z = "round");
var $ = m[0], Q = m[1];
return i($[1]) && $[1] === Q[1] && ($[1] = Q[1] = Math[z]($[1]) - L % 2 / 2), i($[2]) && $[2] === Q[2] && ($[2] = Q[2] = Math[z]($[2]) + L % 2 / 2), m;
}, g.prototype.path = function(m) {
var L = this.styledMode ? {} : { fill: "none" };
return t(m) ? L.d = m : n(m) && a(L, m), this.createElement("path").attr(L);
}, g.prototype.circle = function(m, L, z) {
return m = n(m) ? m : typeof m > "u" ? {} : { x: m, y: L, r: z }, L = this.createElement("circle"), L.xSetter = L.ySetter = function($, Q, A) {
A.setAttribute("c" + Q, $);
}, L.attr(m);
}, g.prototype.arc = function(m, L, z, $, Q, A) {
return n(m) ? ($ = m, L = $.y, z = $.r, m = $.x) : $ = { innerR: $, start: Q, end: A }, m = this.symbol("arc", m, L, z, z, $), m.r = z, m;
}, g.prototype.rect = function(m, L, z, $, Q, A) {
Q = n(m) ? m.r : Q;
var H = this.createElement("rect");
return m = n(m) ? m : typeof m > "u" ? {} : { x: m, y: L, width: Math.max(z, 0), height: Math.max($, 0) }, this.styledMode || (typeof A < "u" && (m["stroke-width"] = A, m = H.crisp(m)), m.fill = "none"), Q && (m.r = Q), H.rSetter = function(Y, Z, q) {
H.r = Y, h(q, { rx: Y, ry: Y });
}, H.rGetter = function() {
return H.r || 0;
}, H.attr(m);
}, g.prototype.setSize = function(m, L, z) {
this.width = m, this.height = L, this.boxWrapper.animate({ width: m, height: L }, { step: function() {
this.attr({ viewBox: "0 0 " + this.attr("width") + " " + this.attr("height") });
}, duration: I(
z,
!0
) ? void 0 : 0 }), this.alignElements();
}, g.prototype.g = function(m) {
var L = this.createElement("g");
return m ? L.attr({ class: "highcharts-" + m }) : L;
}, g.prototype.image = function(m, L, z, $, Q, A) {
var H = { preserveAspectRatio: "none" }, Y = function(q, it) {
q.setAttributeNS ? q.setAttributeNS("http://www.w3.org/1999/xlink", "href", it) : q.setAttribute("hc-svg-href", it);
};
s(L) && (H.x = L), s(z) && (H.y = z), s($) && (H.width = $), s(Q) && (H.height = Q);
var Z = this.createElement("image").attr(H);
return L = function(q) {
Y(Z.element, m), A.call(Z, q);
}, A ? (Y(
Z.element,
"data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw=="
), z = new S.Image(), v(z, "load", L), z.src = m, z.complete && L({})) : Y(Z.element, m), Z;
}, g.prototype.symbol = function(m, L, z, $, Q, A) {
var H = this, Y = /^url\((.*?)\)$/, Z = Y.test(m), q = !Z && (this.symbols[m] ? m : "circle"), it = q && this.symbols[q], et;
if (it) {
typeof L == "number" && (et = it.call(this.symbols, Math.round(L || 0), Math.round(z || 0), $ || 0, Q || 0, A));
var nt = this.path(et);
H.styledMode || nt.attr("fill", "none"), a(nt, { symbolName: q || void 0, x: L, y: z, width: $, height: Q }), A && a(nt, A);
} else if (Z) {
var rt = m.match(Y)[1], ct = nt = this.image(rt);
ct.imgwidth = I(b[rt] && b[rt].width, A && A.width), ct.imgheight = I(b[rt] && b[rt].height, A && A.height);
var gt = function(dt) {
return dt.attr({ width: dt.width, height: dt.height });
};
["width", "height"].forEach(function(dt) {
ct[dt + "Setter"] = function(ht, at) {
var J = this["img" + at];
this[at] = ht, i(J) && (A && A.backgroundSize === "within" && this.width && this.height && (J = Math.round(J * Math.min(this.width / this.imgwidth, this.height / this.imgheight))), this.element && this.element.setAttribute(at, J), this.alignByTranslate || (ht = ((this[at] || 0) - J) / 2, this.attr(at === "width" ? { translateX: ht } : { translateY: ht })));
};
}), i(L) && ct.attr({ x: L, y: z }), ct.isImg = !0, i(ct.imgwidth) && i(ct.imgheight) ? gt(ct) : (ct.attr({ width: 0, height: 0 }), c("img", { onload: function() {
var dt = w[H.chartIndex];
this.width === 0 && (u(this, { position: "absolute", top: "-999em" }), f.body.appendChild(this)), b[rt] = { width: this.width, height: this.height }, ct.imgwidth = this.width, ct.imgheight = this.height, ct.element && gt(ct), this.parentNode && this.parentNode.removeChild(this), H.imgCount--, !H.imgCount && dt && !dt.hasLoaded && dt.onload();
}, src: rt }), this.imgCount++);
}
return nt;
}, g.prototype.clipRect = function(m, L, z, $) {
var Q = E() + "-", A = this.createElement("clipPath").attr({ id: Q }).add(this.defs);
return m = this.rect(m, L, z, $, 0).add(A), m.id = Q, m.clipPath = A, m.count = 0, m;
}, g.prototype.text = function(m, L, z, $) {
var Q = {};
return $ && (this.allowHTML || !this.forExport) ? this.html(m, L, z) : (Q.x = Math.round(L || 0), z && (Q.y = Math.round(z)), i(m) && (Q.text = m), m = this.createElement("text").attr(Q), (!$ || this.forExport && !this.allowHTML) && (m.xSetter = function(A, H, Y) {
for (var Z = Y.getElementsByTagName("tspan"), q = Y.getAttribute(H), it = 0, et; it < Z.length; it++)
et = Z[it], et.getAttribute(H) === q && et.setAttribute(H, A);
Y.setAttribute(H, A);
}), m);
}, g.prototype.fontMetrics = function(m, L) {
return m = !this.styledMode && /px/.test(m) || !S.getComputedStyle ? m || L && L.style && L.style.fontSize || this.style && this.style.fontSize : L && G.prototype.getStyle.call(L, "font-size"), m = /px/.test(m) ? W(m) : 12, L = 24 > m ? m + 3 : Math.round(1.2 * m), { h: L, b: Math.round(0.8 * L), f: m };
}, g.prototype.rotCorr = function(m, L, z) {
var $ = m;
return L && z && ($ = Math.max($ * Math.cos(L * x), 4)), { x: -m / 3 * Math.sin(L * x), y: $ };
}, g.prototype.pathToSegments = function(m) {
for (var L = [], z = [], $ = { A: 8, C: 7, H: 2, L: 3, M: 3, Q: 5, S: 5, T: 3, V: 2 }, Q = 0; Q < m.length; Q++)
P(z[0]) && s(m[Q]) && z.length === $[z[0].toUpperCase()] && m.splice(Q, 0, z[0].replace("M", "L").replace("m", "l")), typeof m[Q] == "string" && (z.length && L.push(z.slice(0)), z.length = 0), z.push(m[Q]);
return L.push(z.slice(0)), L;
}, g.prototype.label = function(m, L, z, $, Q, A, H, Y, Z) {
return new V(this, m, L, z, $, Q, A, H, Y, Z);
}, g.prototype.alignElements = function() {
this.alignedObjects.forEach(function(m) {
return m.align();
});
}, g;
}(), a(_.prototype, { Element: G, SVG_NS: k, escapes: { "&": "&", "<": "<", ">": ">", "'": "'", '"': """ }, symbols: F, draw: R }), U.registerRendererType("svg", _, !0), _;
}), C(o, "Core/Renderer/HTML/HTMLElement.js", [o["Core/Globals.js"], o["Core/Renderer/SVG/SVGElement.js"], o["Core/Utilities.js"]], function(y, N, _) {
var U = this && this.__extends || function() {
var T = function(O, R) {
return T = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(k, b) {
k.__proto__ = b;
} || function(k, b) {
for (var S in b)
b.hasOwnProperty(S) && (k[S] = b[S]);
}, T(O, R);
};
return function(O, R) {
function k() {
this.constructor = O;
}
T(O, R), O.prototype = R === null ? Object.create(R) : (k.prototype = R.prototype, new k());
};
}(), G = y.isFirefox, V = y.isMS, F = y.isWebKit, B = y.win, j = _.css, w = _.defined, x = _.extend, f = _.pick, l = _.pInt;
return function(T) {
function O() {
return T !== null && T.apply(this, arguments) || this;
}
return U(O, T), O.compose = function(R) {
if (O.composedClasses.indexOf(R) === -1) {
O.composedClasses.push(R);
var k = O.prototype, b = R.prototype;
b.getSpanCorrection = k.getSpanCorrection, b.htmlCss = k.htmlCss, b.htmlGetBBox = k.htmlGetBBox, b.htmlUpdateTransform = k.htmlUpdateTransform, b.setSpanRotation = k.setSpanRotation;
}
return R;
}, O.prototype.getSpanCorrection = function(R, k, b) {
this.xCorr = -R * b, this.yCorr = -k;
}, O.prototype.htmlCss = function(R) {
var k = this.element.tagName === "SPAN" && R && "width" in R, b = f(k && R.width, void 0);
if (k) {
delete R.width, this.textWidth = b;
var S = !0;
}
return R && R.textOverflow === "ellipsis" && (R.whiteSpace = "nowrap", R.overflow = "hidden"), this.styles = x(this.styles, R), j(this.element, R), S && this.htmlUpdateTransform(), this;
}, O.prototype.htmlGetBBox = function() {
var R = this.element;
return { x: R.offsetLeft, y: R.offsetTop, width: R.offsetWidth, height: R.offsetHeight };
}, O.prototype.htmlUpdateTransform = function() {
if (this.added) {
var R = this.renderer, k = this.element, b = this.translateX || 0, S = this.translateY || 0, v = this.x || 0, h = this.y || 0, c = this.textAlign || "left", u = { left: 0, center: 0.5, right: 1 }[c], i = this.styles;
if (i = i && i.whiteSpace, j(k, { marginLeft: b, marginTop: S }), !R.styledMode && this.shadows && this.shadows.forEach(function(P) {
j(P, { marginLeft: b + 1, marginTop: S + 1 });
}), this.inverted && [].forEach.call(k.childNodes, function(P) {
R.invertChild(P, k);
}), k.tagName === "SPAN") {
var p = this.rotation, a = this.textWidth && l(this.textWidth), t = [p, c, k.innerHTML, this.textWidth, this.textAlign].join(), s = void 0;
if (s = !1, a !== this.oldTextWidth) {
if (this.textPxLength)
var n = this.textPxLength;
else
j(k, { width: "", whiteSpace: i || "nowrap" }), n = k.offsetWidth;
(a > this.oldTextWidth || n > a) && (/[ \-]/.test(k.textContent || k.innerText) || k.style.textOverflow === "ellipsis") && (j(k, { width: n > a || p ? a + "px" : "auto", display: "block", whiteSpace: i || "normal" }), this.oldTextWidth = a, s = !0);
}
this.hasBoxWidthChanged = s, t !== this.cTT && (s = R.fontMetrics(k.style.fontSize, k).b, !w(p) || p === (this.oldRotation || 0) && c === this.oldAlign || this.setSpanRotation(p, u, s), this.getSpanCorrection(!w(p) && this.textPxLength || k.offsetWidth, s, u, p, c)), j(k, { left: v + (this.xCorr || 0) + "px", top: h + (this.yCorr || 0) + "px" }), this.cTT = t, this.oldRotation = p, this.oldAlign = c;
}
} else
this.alignOnAdd = !0;
}, O.prototype.setSpanRotation = function(R, k, b) {
var S = {}, v = V && !/Edge/.test(B.navigator.userAgent) ? "-ms-transform" : F ? "-webkit-transform" : G ? "MozTransform" : B.opera ? "-o-transform" : void 0;
v && (S[v] = S.transform = "rotate(" + R + "deg)", S[v + (G ? "Origin" : "-origin")] = S.transformOrigin = 100 * k + "% " + b + "px", j(this.element, S));
}, O.composedClasses = [], O;
}(N);
}), C(
o,
"Core/Renderer/HTML/HTMLRenderer.js",
[o["Core/Renderer/HTML/AST.js"], o["Core/Renderer/SVG/SVGElement.js"], o["Core/Renderer/SVG/SVGRenderer.js"], o["Core/Utilities.js"]],
function(y, N, _, U) {
var G = this && this.__extends || function() {
var w = function(x, f) {
return w = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(l, T) {
l.__proto__ = T;
} || function(l, T) {
for (var O in T)
T.hasOwnProperty(O) && (l[O] = T[O]);
}, w(x, f);
};
return function(x, f) {
function l() {
this.constructor = x;
}
w(x, f), x.prototype = f === null ? Object.create(f) : (l.prototype = f.prototype, new l());
};
}(), V = U.attr, F = U.createElement, B = U.extend, j = U.pick;
return function(w) {
function x() {
return w !== null && w.apply(this, arguments) || this;
}
return G(x, w), x.compose = function(f) {
return x.composedClasses.indexOf(f) === -1 && (x.composedClasses.push(f), f.prototype.html = x.prototype.html), f;
}, x.prototype.html = function(f, l, T) {
var O = this.createElement("span"), R = O.element, k = O.renderer, b = k.isSVG, S = function(v, h) {
["opacity", "visibility"].forEach(function(c) {
v[c + "Setter"] = function(u, i, p) {
var a = v.div ? v.div.style : h;
N.prototype[c + "Setter"].call(this, u, i, p), a && (a[i] = u);
};
}), v.addedSetters = !0;
};
return O.textSetter = function(v) {
v !== this.textStr && (delete this.bBox, delete this.oldTextWidth, y.setElementHTML(this.element, j(v, "")), this.textStr = v, O.doTransform = !0);
}, b && S(O, O.element.style), O.xSetter = O.ySetter = O.alignSetter = O.rotationSetter = function(v, h) {
h === "align" ? O.alignValue = O.textAlign = v : O[h] = v, O.doTransform = !0;
}, O.afterSetters = function() {
this.doTransform && (this.htmlUpdateTransform(), this.doTransform = !1);
}, O.attr({ text: f, x: Math.round(l), y: Math.round(T) }).css({ position: "absolute" }), k.styledMode || O.css({ fontFamily: this.style.fontFamily, fontSize: this.style.fontSize }), R.style.whiteSpace = "nowrap", O.css = O.htmlCss, b && (O.add = function(v) {
var h = k.box.parentNode, c = [];
if (this.parentGroup = v) {
var u = v.div;
if (!u) {
for (; v; )
c.push(v), v = v.parentGroup;
c.reverse().forEach(function(i) {
function p(n, P) {
i[P] = n, P === "translateX" ? s.left = n + "px" : s.top = n + "px", i.doTransform = !0;
}
var a = V(i.element, "class"), t = i.styles || {};
u = i.div = i.div || F("div", a ? { className: a } : void 0, {
position: "absolute",
left: (i.translateX || 0) + "px",
top: (i.translateY || 0) + "px",
display: i.display,
opacity: i.opacity,
cursor: t.cursor,
pointerEvents: t.pointerEvents,
visibility: i.visibility
}, u || h);
var s = u.style;
B(i, { classSetter: function(n) {
return function(P) {
this.element.setAttribute("class", P), n.className = P;
};
}(u), on: function() {
return c[0].div && O.on.apply({ element: c[0].div, onEvents: i.onEvents }, arguments), i;
}, translateXSetter: p, translateYSetter: p }), i.addedSetters || S(i);
});
}
} else
u = h;
return u.appendChild(R), O.added = !0, O.alignOnAdd && O.htmlUpdateTransform(), O;
}), O;
}, x.composedClasses = [], x;
}(_);
}
), C(o, "Core/Axis/AxisDefaults.js", [], function() {
var y;
return function(N) {
N.defaultXAxisOptions = { alignTicks: !0, allowDecimals: void 0, panningEnabled: !0, zIndex: 2, zoomEnabled: !0, dateTimeLabelFormats: { millisecond: { main: "%H:%M:%S.%L", range: !1 }, second: { main: "%H:%M:%S", range: !1 }, minute: { main: "%H:%M", range: !1 }, hour: { main: "%H:%M", range: !1 }, day: { main: "%e. %b" }, week: { main: "%e. %b" }, month: { main: "%b '%y" }, year: { main: "%Y" } }, endOnTick: !1, gridLineDashStyle: "Solid", gridZIndex: 1, labels: {
autoRotation: void 0,
autoRotationLimit: 80,
distance: void 0,
enabled: !0,
indentation: 10,
overflow: "justify",
padding: 5,
reserveSpace: void 0,
rotation: void 0,
staggerLines: 0,
step: 0,
useHTML: !1,
x: 0,
zIndex: 7,
style: { color: "#666666", cursor: "default", fontSize: "11px" }
}, maxPadding: 0.01, minorGridLineDashStyle: "Solid", minorTickLength: 2, minorTickPosition: "outside", minPadding: 0.01, offset: void 0, opposite: !1, reversed: void 0, reversedStacks: !1, showEmpty: !0, showFirstLabel: !0, showLastLabel: !0, startOfWeek: 1, startOnTick: !1, tickLength: 10, tickPixelInterval: 100, tickmarkPlacement: "between", tickPosition: "outside", title: {
align: "middle",
rotation: 0,
useHTML: !1,
x: 0,
y: 0,
style: { color: "#666666" }
}, type: "linear", uniqueNames: !0, visible: !0, minorGridLineColor: "#f2f2f2", minorGridLineWidth: 1, minorTickColor: "#999999", lineColor: "#ccd6eb", lineWidth: 1, gridLineColor: "#e6e6e6", gridLineWidth: void 0, tickColor: "#ccd6eb" }, N.defaultYAxisOptions = { reversedStacks: !0, endOnTick: !0, maxPadding: 0.05, minPadding: 0.05, tickPixelInterval: 72, showLastLabel: !0, labels: { x: -8 }, startOnTick: !0, title: { rotation: 270, text: "Values" }, stackLabels: {
animation: {},
allowOverlap: !1,
enabled: !1,
crop: !0,
overflow: "justify",
formatter: function() {
var _ = this.axis.chart.numberFormatter;
return _(this.total, -1);
},
style: { color: "#000000", fontSize: "11px", fontWeight: "bold", textOutline: "1px contrast" }
}, gridLineWidth: 1, lineWidth: 0 }, N.defaultLeftAxisOptions = { labels: { x: -15 }, title: { rotation: 270 } }, N.defaultRightAxisOptions = { labels: { x: 15 }, title: { rotation: 90 } }, N.defaultBottomAxisOptions = { labels: { autoRotation: [-45], x: 0 }, margin: 15, title: { rotation: 0 } }, N.defaultTopAxisOptions = { labels: { autoRotation: [-45], x: 0 }, margin: 15, title: { rotation: 0 } };
}(y || (y = {})), y;
}), C(o, "Core/Foundation.js", [o["Core/Utilities.js"]], function(y) {
var N = y.addEvent, _ = y.isFunction, U = y.objectEach, G = y.removeEvent, V;
return function(F) {
F.registerEventOptions = function(B, j) {
B.eventOptions = B.eventOptions || {}, U(j.events, function(w, x) {
B.eventOptions[x] !== w && (B.eventOptions[x] && (G(B, x, B.eventOptions[x]), delete B.eventOptions[x]), _(w) && (B.eventOptions[x] = w, N(B, x, w)));
});
};
}(V || (V = {})), V;
}), C(
o,
"Core/Axis/Tick.js",
[o["Core/FormatUtilities.js"], o["Core/Globals.js"], o["Core/Utilities.js"]],
function(y, N, _) {
var U = N.deg2rad, G = _.clamp, V = _.correctFloat, F = _.defined, B = _.destroyObjectProperties, j = _.extend, w = _.fireEvent, x = _.isNumber, f = _.merge, l = _.objectEach, T = _.pick;
return N = function() {
function O(R, k, b, S, v) {
this.isNewLabel = this.isNew = !0, this.axis = R, this.pos = k, this.type = b || "", this.parameters = v || {}, this.tickmarkOffset = this.parameters.tickmarkOffset, this.options = this.parameters.options, w(this, "init"), b || S || this.addLabel();
}
return O.prototype.addLabel = function() {
var R = this, k = R.axis, b = k.options, S = k.chart, v = k.categories, h = k.logarithmic, c = k.names, u = R.pos, i = T(R.options && R.options.labels, b.labels), p = k.tickPositions, a = u === p[0], t = u === p[p.length - 1], s = (!i.step || i.step === 1) && k.tickInterval === 1;
p = p.info;
var n = R.label, P;
if (v = this.parameters.category || (v ? T(v[u], c[u], u) : u), h && x(v) && (v = V(h.lin2log(v))), k.dateTime)
if (p)
var D = S.time.resolveDTLFormat(b.dateTimeLabelFormats[!b.grid && p.higherRanks[u] || p.unitName]), I = D.main;
else
x(v) && (I = k.dateTime.getXDateFormat(v, b.dateTimeLabelFormats || {}));
R.isFirst = a, R.isLast = t;
var W = {
axis: k,
chart: S,
dateTimeLabelFormat: I,
isFirst: a,
isLast: t,
pos: u,
tick: R,
tickPositionInfo: p,
value: v
};
w(this, "labelFormat", W);
var E = function(g) {
return i.formatter ? i.formatter.call(g, g) : i.format ? (g.text = k.defaultLabelFormatter.call(g), y.format(i.format, g, S)) : k.defaultLabelFormatter.call(g, g);
};
b = E.call(W, W);
var X = D && D.list;
R.shortenLabel = X ? function() {
for (P = 0; P < X.length; P++)
if (j(W, { dateTimeLabelFormat: X[P] }), n.attr({ text: E.call(W, W) }), n.getBBox().width < k.getSlotWidth(R) - 2 * i.padding)
return;
n.attr({ text: "" });
} : void 0, s && k._addedPlotLB && R.moveLabel(b, i), F(n) || R.movedLabel ? n && n.textStr !== b && !s && (!n.textWidth || i.style.width || n.styles.width || n.css({ width: null }), n.attr({ text: b }), n.textPxLength = n.getBBox().width) : (R.label = n = R.createLabel({ x: 0, y: 0 }, b, i), R.rotation = 0);
}, O.prototype.createLabel = function(R, k, b) {
var S = this.axis, v = S.chart;
return (R = F(k) && b.enabled ? v.renderer.text(k, R.x, R.y, b.useHTML).add(S.labelGroup) : null) && (v.styledMode || R.css(f(b.style)), R.textPxLength = R.getBBox().width), R;
}, O.prototype.destroy = function() {
B(
this,
this.axis
);
}, O.prototype.getPosition = function(R, k, b, S) {
var v = this.axis, h = v.chart, c = S && h.oldChartHeight || h.chartHeight;
return R = { x: R ? V(v.translate(k + b, null, null, S) + v.transB) : v.left + v.offset + (v.opposite ? (S && h.oldChartWidth || h.chartWidth) - v.right - v.left : 0), y: R ? c - v.bottom + v.offset - (v.opposite ? v.height : 0) : V(c - v.translate(k + b, null, null, S) - v.transB) }, R.y = G(R.y, -1e5, 1e5), w(this, "afterGetPosition", { pos: R }), R;
}, O.prototype.getLabelPosition = function(R, k, b, S, v, h, c, u) {
var i = this.axis, p = i.transA, a = i.isLinked && i.linkedParent ? i.linkedParent.reversed : i.reversed, t = i.staggerLines, s = i.tickRotCorr || { x: 0, y: 0 }, n = S || i.reserveSpaceDefault ? 0 : -i.labelOffset * (i.labelAlign === "center" ? 0.5 : 1), P = {}, D = v.y;
return F(D) || (D = i.side === 0 ? b.rotation ? -8 : -b.getBBox().height : i.side === 2 ? s.y + 8 : Math.cos(b.rotation * U) * (s.y - b.getBBox(!1, 0).height / 2)), R = R + v.x + n + s.x - (h && S ? h * p * (a ? -1 : 1) : 0), k = k + D - (h && !S ? h * p * (a ? 1 : -1) : 0), t && (b = c / (u || 1) % t, i.opposite && (b = t - b - 1), k += i.labelOffset / t * b), P.x = R, P.y = Math.round(k), w(this, "afterGetLabelPosition", { pos: P, tickmarkOffset: h, index: c }), P;
}, O.prototype.getLabelSize = function() {
return this.label ? this.label.getBBox()[this.axis.horiz ? "height" : "width"] : 0;
}, O.prototype.getMarkPath = function(R, k, b, S, v, h) {
return h.crispLine([["M", R, k], ["L", R + (v ? 0 : -b), k + (v ? b : 0)]], S);
}, O.prototype.handleOverflow = function(R) {
var k = this.axis, b = k.options.labels, S = R.x, v = k.chart.chartWidth, h = k.chart.spacing, c = T(k.labelLeft, Math.min(k.pos, h[3]));
h = T(k.labelRight, Math.max(k.isRadial ? 0 : k.pos + k.len, v - h[1]));
var u = this.label, i = this.rotation, p = { left: 0, center: 0.5, right: 1 }[k.labelAlign || u.attr("align")], a = u.getBBox().width, t = k.getSlotWidth(this), s = {}, n = t, P = 1, D;
i || b.overflow !== "justify" ? 0 > i && S - p * a < c ? D = Math.round(S / Math.cos(i * U) - c) : 0 < i && S + p * a > h && (D = Math.round((v - S) / Math.cos(i * U))) : (v = S + (1 - p) * a, S - p * a < c ? n = R.x + n * (1 - p) - c : v > h && (n = h - R.x + n * p, P = -1), n = Math.min(t, n), n < t && k.labelAlign === "center" && (R.x += P * (t - n - p * (t - Math.min(a, n)))), (a > n || k.autoRotation && (u.styles || {}).width) && (D = n)), D && (this.shortenLabel ? this.shortenLabel() : (s.width = Math.floor(D) + "px", (b.style || {}).textOverflow || (s.textOverflow = "ellipsis"), u.css(s)));
}, O.prototype.moveLabel = function(R, k) {
var b = this, S = b.label, v = b.axis, h = v.reversed, c = !1;
if (S && S.textStr === R ? (b.movedLabel = S, c = !0, delete b.label) : l(v.ticks, function(i) {
c || i.isNew || i === b || !i.label || i.label.textStr !== R || (b.movedLabel = i.label, c = !0, i.labelPos = b.movedLabel.xy, delete i.label);
}), !c && (b.labelPos || S)) {
var u = b.labelPos || S.xy;
S = v.horiz ? h ? 0 : v.width + v.left : u.x, v = v.horiz ? u.y : h ? v.width + v.left : 0, b.movedLabel = b.createLabel({ x: S, y: v }, R, k), b.movedLabel && b.movedLabel.attr({ opacity: 0 });
}
}, O.prototype.render = function(R, k, b) {
var S = this.axis, v = S.horiz, h = this.pos, c = T(this.tickmarkOffset, S.tickmarkOffset);
h = this.getPosition(v, h, c, k), c = h.x;
var u = h.y;
S = v && c === S.pos + S.len || !v && u === S.pos ? -1 : 1, v = T(b, this.label && this.label.newOpacity, 1), b = T(b, 1), this.isActive = !0, this.renderGridLine(k, b, S), this.renderMark(h, b, S), this.renderLabel(h, k, v, R), this.isNew = !1, w(this, "afterRender");
}, O.prototype.renderGridLine = function(R, k, b) {
var S = this.axis, v = S.options, h = {}, c = this.pos, u = this.type, i = T(
this.tickmarkOffset,
S.tickmarkOffset
), p = S.chart.renderer, a = this.gridLine, t = v.gridLineWidth, s = v.gridLineColor, n = v.gridLineDashStyle;
this.type === "minor" && (t = v.minorGridLineWidth, s = v.minorGridLineColor, n = v.minorGridLineDashStyle), a || (S.chart.styledMode || (h.stroke = s, h["stroke-width"] = t || 0, h.dashstyle = n), u || (h.zIndex = 1), R && (k = 0), this.gridLine = a = p.path().attr(h).addClass("highcharts-" + (u ? u + "-" : "") + "grid-line").add(S.gridGroup)), a && (b = S.getPlotLinePath({ value: c + i, lineWidth: a.strokeWidth() * b, force: "pass", old: R })) && a[R || this.isNew ? "attr" : "animate"]({ d: b, opacity: k });
}, O.prototype.renderMark = function(R, k, b) {
var S = this.axis, v = S.options, h = S.chart.renderer, c = this.type, u = S.tickSize(c ? c + "Tick" : "tick"), i = R.x;
R = R.y;
var p = T(v[c !== "minor" ? "tickWidth" : "minorTickWidth"], !c && S.isXAxis ? 1 : 0);
v = v[c !== "minor" ? "tickColor" : "minorTickColor"];
var a = this.mark, t = !a;
u && (S.opposite && (u[0] = -u[0]), a || (this.mark = a = h.path().addClass("highcharts-" + (c ? c + "-" : "") + "tick").add(S.axisGroup), S.chart.styledMode || a.attr({ stroke: v, "stroke-width": p })), a[t ? "attr" : "animate"]({ d: this.getMarkPath(
i,
R,
u[0],
a.strokeWidth() * b,
S.horiz,
h
), opacity: k }));
}, O.prototype.renderLabel = function(R, k, b, S) {
var v = this.axis, h = v.horiz, c = v.options, u = this.label, i = c.labels, p = i.step;
v = T(this.tickmarkOffset, v.tickmarkOffset);
var a = R.x;
R = R.y;
var t = !0;
u && x(a) && (u.xy = R = this.getLabelPosition(a, R, u, h, i, v, S, p), this.isFirst && !this.isLast && !c.showFirstLabel || this.isLast && !this.isFirst && !c.showLastLabel ? t = !1 : !h || i.step || i.rotation || k || b === 0 || this.handleOverflow(R), p && S % p && (t = !1), t && x(R.y) ? (R.opacity = b, u[this.isNewLabel ? "attr" : "animate"](R), this.isNewLabel = !1) : (u.attr("y", -9999), this.isNewLabel = !0));
}, O.prototype.replaceMovedLabel = function() {
var R = this.label, k = this.axis, b = k.reversed;
if (R && !this.isNew) {
var S = k.horiz ? b ? k.left : k.width + k.left : R.xy.x;
b = k.horiz ? R.xy.y : b ? k.width + k.top : k.top, R.animate({ x: S, y: b, opacity: 0 }, void 0, R.destroy), delete this.label;
}
k.isDirty = !0, this.label = this.movedLabel, delete this.movedLabel;
}, O;
}(), N;
}
), C(o, "Core/Axis/Axis.js", [
o["Core/Animation/AnimationUtilities.js"],
o["Core/Axis/AxisDefaults.js"],
o["Core/Color/Color.js"],
o["Core/DefaultOptions.js"],
o["Core/Foundation.js"],
o["Core/Globals.js"],
o["Core/Axis/Tick.js"],
o["Core/Utilities.js"]
], function(y, N, _, U, G, V, F, B) {
var j = y.animObject, w = U.defaultOptions, x = G.registerEventOptions, f = V.deg2rad, l = B.arrayMax, T = B.arrayMin, O = B.clamp, R = B.correctFloat, k = B.defined, b = B.destroyObjectProperties, S = B.erase, v = B.error, h = B.extend, c = B.fireEvent, u = B.getMagnitude, i = B.isArray, p = B.isNumber, a = B.isString, t = B.merge, s = B.normalizeTickInterval, n = B.objectEach, P = B.pick, D = B.relativeLength, I = B.removeEvent, W = B.splat, E = B.syncTimeout;
return y = function() {
function X(g, m) {
this.zoomEnabled = this.width = this.visible = this.userOptions = this.translationSlope = this.transB = this.transA = this.top = this.ticks = this.tickRotCorr = this.tickPositions = this.tickmarkOffset = this.tickInterval = this.tickAmount = this.side = this.series = this.right = this.positiveValuesOnly = this.pos = this.pointRangePadding = this.pointRange = this.plotLinesAndBandsGroups = this.plotLinesAndBands = this.paddedTicks = this.overlap = this.options = this.offset = this.names = this.minPixelPadding = this.minorTicks = this.minorTickInterval = this.min = this.maxLabelLength = this.max = this.len = this.left = this.labelFormatter = this.labelEdge = this.isLinked = this.height = this.hasVisibleSeries = this.hasNames = this.eventOptions = this.coll = this.closestPointRange = this.chart = this.categories = this.bottom = this.alternateBands = void 0, this.init(g, m);
}
return X.prototype.init = function(g, m) {
var L = m.isX;
this.chart = g, this.horiz = g.inverted && !this.isZAxis ? !L : L, this.isXAxis = L, this.coll = this.coll || (L ? "xAxis" : "yAxis"), c(this, "init", { userOptions: m }), this.opposite = P(m.opposite, this.opposite), this.side = P(m.side, this.side, this.horiz ? this.opposite ? 0 : 2 : this.opposite ? 1 : 3), this.setOptions(m);
var z = this.options, $ = z.labels, Q = z.type;
this.userOptions = m, this.minPixelPadding = 0, this.reversed = P(z.reversed, this.reversed), this.visible = z.visible, this.zoomEnabled = z.zoomEnabled, this.hasNames = Q === "category" || z.categories === !0, this.categories = z.categories || this.hasNames, this.names || (this.names = [], this.names.keys = {}), this.plotLinesAndBandsGroups = {}, this.positiveValuesOnly = !!this.logarithmic, this.isLinked = k(z.linkedTo), this.ticks = {}, this.labelEdge = [], this.minorTicks = {}, this.plotLinesAndBands = [], this.alternateBands = {}, this.len = 0, this.minRange = this.userMinRange = z.minRange || z.maxZoom, this.range = z.range, this.offset = z.offset || 0, this.min = this.max = null, m = P(z.crosshair, W(g.options.tooltip.crosshairs)[L ? 0 : 1]), this.crosshair = m === !0 ? {} : m, g.axes.indexOf(this) === -1 && (L ? g.axes.splice(g.xAxis.length, 0, this) : g.axes.push(this), g[this.coll].push(this)), this.series = this.series || [], g.inverted && !this.isZAxis && L && typeof this.reversed > "u" && (this.reversed = !0), this.labelRotation = p($.rotation) ? $.rotation : void 0, x(this, z), c(this, "afterInit");
}, X.prototype.setOptions = function(g) {
this.options = t(N.defaultXAxisOptions, this.coll === "yAxis" && N.defaultYAxisOptions, [N.defaultTopAxisOptions, N.defaultRightAxisOptions, N.defaultBottomAxisOptions, N.defaultLeftAxisOptions][this.side], t(w[this.coll], g)), c(this, "afterSetOptions", { userOptions: g });
}, X.prototype.defaultLabelFormatter = function(g) {
var m = this.axis;
g = this.chart.numberFormatter;
var L = p(this.value) ? this.value : NaN, z = m.chart.time, $ = this.dateTimeLabelFormat, Q = w.lang, A = Q.numericSymbols;
Q = Q.numericSymbolMagnitude || 1e3;
var H = m.logarithmic ? Math.abs(L) : m.tickInterval, Y = A && A.length;
if (m.categories)
var Z = "" + this.value;
else if ($)
Z = z.dateFormat($, L);
else if (Y && 1e3 <= H)
for (; Y-- && typeof Z > "u"; )
m = Math.pow(Q, Y + 1), H >= m && 10 * L % m === 0 && A[Y] !== null && L !== 0 && (Z = g(L / m, -1) + A[Y]);
return typeof Z > "u" && (Z = 1e4 <= Math.abs(L) ? g(L, -1) : g(L, -1, void 0, "")), Z;
}, X.prototype.getSeriesExtremes = function() {
var g = this, m = g.chart, L;
c(this, "getSeriesExtremes", null, function() {
g.hasVisibleSeries = !1, g.dataMin = g.dataMax = g.threshold = null, g.softThreshold = !g.isXAxis, g.stacking && g.stacking.buildStacks(), g.series.forEach(function(z) {
if (z.visible || !m.options.chart.ignoreHiddenSeries) {
var $ = z.options, Q = $.threshold;
if (g.hasVisibleSeries = !0, g.positiveValuesOnly && 0 >= Q && (Q = null), g.isXAxis) {
if ($ = z.xData, $.length) {
$ = g.logarithmic ? $.filter(g.validatePositiveValue) : $, L = z.getXExtremes($);
var A = L.min, H = L.max;
p(A) || A instanceof Date || ($ = $.filter(p), L = z.getXExtremes($), A = L.min, H = L.max), $.length && (g.dataMin = Math.min(P(g.dataMin, A), A), g.dataMax = Math.max(P(g.dataMax, H), H));
}
} else
z = z.applyExtremes(), p(z.dataMin) && (A = z.dataMin, g.dataMin = Math.min(P(g.dataMin, A), A)), p(z.dataMax) && (H = z.dataMax, g.dataMax = Math.max(P(g.dataMax, H), H)), k(Q) && (g.threshold = Q), (!$.softThreshold || g.positiveValuesOnly) && (g.softThreshold = !1);
}
});
}), c(this, "afterGetSeriesExtremes");
}, X.prototype.translate = function(g, m, L, z, $, Q) {
var A = this.linkedParent || this, H = z && A.old ? A.old.min : A.min, Y = A.minPixelPadding;
$ = (A.isOrdinal || A.brokenAxis && A.brokenAxis.hasBreaks || A.logarithmic && $) && A.lin2val;
var Z = 1, q = 0;
return z = z && A.old ? A.old.transA : A.transA, z || (z = A.transA), L && (Z *= -1, q = A.len), A.reversed && (Z *= -1, q -= Z * (A.sector || A.len)), m ? (g = (g * Z + q - Y) / z + H, $ && (g = A.lin2val(g))) : ($ && (g = A.val2lin(g)), g = p(H) ? Z * (g - H) * z + q + Z * Y + (p(Q) ? z * Q : 0) : void 0), g;
}, X.prototype.toPixels = function(g, m) {
return this.translate(
g,
!1,
!this.horiz,
null,
!0
) + (m ? 0 : this.pos);
}, X.prototype.toValue = function(g, m) {
return this.translate(g - (m ? 0 : this.pos), !0, !this.horiz, null, !0);
}, X.prototype.getPlotLinePath = function(g) {
function m(at, J, tt) {
return (nt !== "pass" && at < J || at > tt) && (nt ? at = O(at, J, tt) : ht = !0), at;
}
var L = this, z = L.chart, $ = L.left, Q = L.top, A = g.old, H = g.value, Y = g.lineWidth, Z = A && z.oldChartHeight || z.chartHeight, q = A && z.oldChartWidth || z.chartWidth, it = L.transB, et = g.translatedValue, nt = g.force, rt, ct, gt, dt, ht;
return g = {
value: H,
lineWidth: Y,
old: A,
force: nt,
acrossPanes: g.acrossPanes,
translatedValue: et
}, c(this, "getPlotLinePath", g, function(at) {
et = P(et, L.translate(H, null, null, A)), et = O(et, -1e5, 1e5), rt = gt = Math.round(et + it), ct = dt = Math.round(Z - et - it), p(et) ? L.horiz ? (ct = Q, dt = Z - L.bottom, rt = gt = m(rt, $, $ + L.width)) : (rt = $, gt = q - L.right, ct = dt = m(ct, Q, Q + L.height)) : (ht = !0, nt = !1), at.path = ht && !nt ? null : z.renderer.crispLine([["M", rt, ct], ["L", gt, dt]], Y || 1);
}), g.path;
}, X.prototype.getLinearTickPositions = function(g, m, L) {
var z = R(Math.floor(m / g) * g);
L = R(Math.ceil(L / g) * g);
var $ = [], Q;
if (R(z + g) === z && (Q = 20), this.single)
return [m];
for (m = z; m <= L && ($.push(m), m = R(m + g, Q), m !== A); )
var A = m;
return $;
}, X.prototype.getMinorTickInterval = function() {
var g = this.options;
return g.minorTicks === !0 ? P(g.minorTickInterval, "auto") : g.minorTicks === !1 ? null : g.minorTickInterval;
}, X.prototype.getMinorTickPositions = function() {
var g = this.options, m = this.tickPositions, L = this.minorTickInterval, z = this.pointRangePadding || 0, $ = this.min - z;
z = this.max + z;
var Q = z - $, A = [];
if (Q && Q / L < this.len / 3) {
var H = this.logarithmic;
if (H)
this.paddedTicks.forEach(function(Y, Z, q) {
Z && A.push.apply(
A,
H.getLogTickPositions(L, q[Z - 1], q[Z], !0)
);
});
else if (this.dateTime && this.getMinorTickInterval() === "auto")
A = A.concat(this.getTimeTicks(this.dateTime.normalizeTimeTickInterval(L), $, z, g.startOfWeek));
else
for (g = $ + (m[0] - $) % L; g <= z && g !== A[0]; g += L)
A.push(g);
}
return A.length !== 0 && this.trimTicks(A), A;
}, X.prototype.adjustForMinRange = function() {
var g = this.options, m = this.logarithmic, L = this.min, z = this.max, $ = 0, Q, A, H, Y;
if (this.isXAxis && typeof this.minRange > "u" && !m && (k(g.min) || k(g.max) || k(g.floor) || k(g.ceiling) ? this.minRange = null : (this.series.forEach(function(et) {
if (H = et.xData, Y = et.xIncrement ? 1 : H.length - 1, 1 < H.length)
for (Q = Y; 0 < Q; Q--)
A = H[Q] - H[Q - 1], (!$ || A < $) && ($ = A);
}), this.minRange = Math.min(5 * $, this.dataMax - this.dataMin))), z - L < this.minRange) {
var Z = this.dataMax - this.dataMin >= this.minRange, q = this.minRange, it = (q - z + L) / 2;
it = [L - it, P(g.min, L - it)], Z && (it[2] = this.logarithmic ? this.logarithmic.log2lin(this.dataMin) : this.dataMin), L = l(it), z = [L + q, P(g.max, L + q)], Z && (z[2] = m ? m.log2lin(this.dataMax) : this.dataMax), z = T(z), z - L < q && (it[0] = z - q, it[1] = P(g.min, z - q), L = l(it));
}
this.min = L, this.max = z;
}, X.prototype.getClosest = function() {
var g;
return this.categories ? g = 1 : this.series.forEach(function(m) {
var L = m.closestPointRange, z = m.visible || !m.chart.options.chart.ignoreHiddenSeries;
!m.noSharedTooltip && k(L) && z && (g = k(g) ? Math.min(g, L) : L);
}), g;
}, X.prototype.nameToX = function(g) {
var m = i(this.categories), L = m ? this.categories : this.names, z = g.options.x;
if (g.series.requireSorting = !1, k(z) || (z = this.options.uniqueNames ? m ? L.indexOf(g.name) : P(L.keys[g.name], -1) : g.series.autoIncrement()), z === -1) {
if (!m)
var $ = L.length;
} else
$ = z;
return typeof $ < "u" && (this.names[$] = g.name, this.names.keys[g.name] = $), $;
}, X.prototype.updateNames = function() {
var g = this, m = this.names;
0 < m.length && (Object.keys(m.keys).forEach(function(L) {
delete m.keys[L];
}), m.length = 0, this.minRange = this.userMinRange, (this.series || []).forEach(function(L) {
L.xIncrement = null, (!L.points || L.isDirtyData) && (g.max = Math.max(g.max, L.xData.length - 1), L.processData(), L.generatePoints()), L.data.forEach(function(z, $) {
if (z && z.options && typeof z.name < "u") {
var Q = g.nameToX(z);
typeof Q < "u" && Q !== z.x && (z.x = Q, L.xData[$] = Q);
}
});
}));
}, X.prototype.setAxisTranslation = function() {
var g = this, m = g.max - g.min, L = g.linkedParent, z = !!g.categories, $ = g.isXAxis, Q = g.axisPointRange || 0, A = 0, H = 0, Y = g.transA;
if ($ || z || Q) {
var Z = g.getClosest();
L ? (A = L.minPointOffset, H = L.pointRangePadding) : g.series.forEach(function(q) {
var it = z ? 1 : $ ? P(q.options.pointRange, Z, 0) : g.axisPointRange || 0, et = q.options.pointPlacement;
Q = Math.max(Q, it), (!g.single || z) && (q = q.is("xrange") ? !$ : $, A = Math.max(A, q && a(et) ? 0 : it / 2), H = Math.max(H, q && et === "on" ? 0 : it));
}), L = g.ordinal && g.ordinal.slope && Z ? g.ordinal.slope / Z : 1, g.minPointOffset = A *= L, g.pointRangePadding = H *= L, g.pointRange = Math.min(Q, g.single && z ? 1 : m), $ && (g.closestPointRange = Z);
}
g.translationSlope = g.transA = Y = g.staticScale || g.len / (m + H || 1), g.transB = g.horiz ? g.left : g.bottom, g.minPixelPadding = Y * A, c(this, "afterSetAxisTranslation");
}, X.prototype.minFromRange = function() {
return this.max - this.range;
}, X.prototype.setTickInterval = function(g) {
var m = this.chart, L = this.logarithmic, z = this.options, $ = this.isXAxis, Q = this.isLinked, A = z.tickPixelInterval, H = this.categories, Y = this.softThreshold, Z = z.maxPadding, q = z.minPadding, it = p(z.tickInterval) && 0 <= z.tickInterval ? z.tickInterval : void 0, et = p(this.threshold) ? this.threshold : null;
this.dateTime || H || Q || this.getTickAmount();
var nt = P(this.userMin, z.min), rt = P(this.userMax, z.max);
if (Q) {
this.linkedParent = m[this.coll][z.linkedTo];
var ct = this.linkedParent.getExtremes();
this.min = P(ct.min, ct.dataMin), this.max = P(ct.max, ct.dataMax), z.type !== this.linkedParent.options.type && v(11, 1, m);
} else {
if (Y && k(et)) {
if (this.dataMin >= et)
ct = et, q = 0;
else if (this.dataMax <= et) {
var gt = et;
Z = 0;
}
}
this.min = P(nt, ct, this.dataMin), this.max = P(rt, gt, this.dataMax);
}
if (L && (this.positiveValuesOnly && !g && 0 >= Math.min(this.min, P(this.dataMin, this.min)) && v(10, 1, m), this.min = R(L.log2lin(this.min), 16), this.max = R(L.log2lin(this.max), 16)), this.range && k(this.max) && (this.userMin = this.min = nt = Math.max(this.dataMin, this.minFromRange()), this.userMax = rt = this.max, this.range = null), c(this, "foundExtremes"), this.beforePadding && this.beforePadding(), this.adjustForMinRange(), !(H || this.axisPointRange || this.stacking && this.stacking.usePercentage || Q) && k(this.min) && k(this.max) && (m = this.max - this.min) && (!k(nt) && q && (this.min -= m * q), !k(rt) && Z && (this.max += m * Z)), p(this.userMin) || (p(z.softMin) && z.softMin < this.min && (this.min = nt = z.softMin), p(z.floor) && (this.min = Math.max(this.min, z.floor))), p(this.userMax) || (p(z.softMax) && z.softMax > this.max && (this.max = rt = z.softMax), p(z.ceiling) && (this.max = Math.min(this.max, z.ceiling))), Y && k(this.dataMin) && (et = et || 0, !k(nt) && this.min < et && this.dataMin >= et ? this.min = this.options.minRange ? Math.min(et, this.max - this.minRange) : et : !k(rt) && this.max > et && this.dataMax <= et && (this.max = this.options.minRange ? Math.max(et, this.min + this.minRange) : et)), p(this.min) && p(this.max) && !this.chart.polar && this.min > this.max && (k(this.options.min) ? this.max = this.min : k(this.options.max) && (this.min = this.max)), this.tickInterval = this.min === this.max || typeof this.min > "u" || typeof this.max > "u" ? 1 : Q && this.linkedParent && !it && A === this.linkedParent.options.tickPixelInterval ? it = this.linkedParent.tickInterval : P(it, this.tickAmount ? (this.max - this.min) / Math.max(this.tickAmount - 1, 1) : void 0, H ? 1 : (this.max - this.min) * A / Math.max(this.len, A)), $ && !g) {
var dt = this.min !== (this.old && this.old.min) || this.max !== (this.old && this.old.max);
this.series.forEach(function(ht) {
ht.forceCrop = ht.forceCropping && ht.forceCropping(), ht.processData(dt);
}), c(this, "postProcessData", { hasExtemesChanged: dt });
}
this.setAxisTranslation(), c(this, "initialAxisTranslation"), this.pointRange && !it && (this.tickInterval = Math.max(this.pointRange, this.tickInterval)), g = P(z.minTickInterval, this.dateTime && !this.series.some(function(ht) {
return ht.noSharedTooltip;
}) ? this.closestPointRange : 0), !it && this.tickInterval < g && (this.tickInterval = g), this.dateTime || this.logarithmic || it || (this.tickInterval = s(this.tickInterval, void 0, u(this.tickInterval), P(z.allowDecimals, 0.5 > this.tickInterval || this.tickAmount !== void 0), !!this.tickAmount)), this.tickAmount || (this.tickInterval = this.unsquish()), this.setTickPositions();
}, X.prototype.setTickPositions = function() {
var g = this.options, m = g.tickPositions, L = this.getMinorTickInterval(), z = this.hasVerticalPanning(), $ = this.coll === "colorAxis", Q = ($ || !z) && g.startOnTick;
z = ($ || !z) && g.endOnTick, $ = g.tickPositioner, this.tickmarkOffset = this.categories && g.tickmarkPlacement === "between" && this.tickInterval === 1 ? 0.5 : 0, this.minorTickInterval = L === "auto" && this.tickInterval ? this.tickInterval / 5 : L, this.single = this.min === this.max && k(this.min) && !this.tickAmount && (parseInt(this.min, 10) === this.min || g.allowDecimals !== !1), this.tickPositions = L = m && m.slice(), !L && (this.ordinal && this.ordinal.positions || !((this.max - this.min) / this.tickInterval > Math.max(2 * this.len, 200)) ? L = this.dateTime ? this.getTimeTicks(this.dateTime.normalizeTimeTickInterval(this.tickInterval, g.units), this.min, this.max, g.startOfWeek, this.ordinal && this.ordinal.positions, this.closestPointRange, !0) : this.logarithmic ? this.logarithmic.getLogTickPositions(this.tickInterval, this.min, this.max) : this.getLinearTickPositions(
this.tickInterval,
this.min,
this.max
) : (L = [this.min, this.max], v(19, !1, this.chart)), L.length > this.len && (L = [L[0], L.pop()], L[0] === L[1] && (L.length = 1)), this.tickPositions = L, $ && ($ = $.apply(this, [this.min, this.max]))) && (this.tickPositions = L = $), this.paddedTicks = L.slice(0), this.trimTicks(L, Q, z), this.isLinked || (this.single && 2 > L.length && !this.categories && !this.series.some(function(A) {
return A.is("heatmap") && A.options.pointPlacement === "between";
}) && (this.min -= 0.5, this.max += 0.5), m || $ || this.adjustTickAmount()), c(this, "afterSetTickPositions");
}, X.prototype.trimTicks = function(g, m, L) {
var z = g[0], $ = g[g.length - 1], Q = !this.isOrdinal && this.minPointOffset || 0;
if (c(this, "trimTicks"), !this.isLinked) {
if (m && z !== -1 / 0)
this.min = z;
else
for (; this.min - Q > g[0]; )
g.shift();
if (L)
this.max = $;
else
for (; this.max + Q < g[g.length - 1]; )
g.pop();
g.length === 0 && k(z) && !this.options.tickPositions && g.push(($ + z) / 2);
}
}, X.prototype.alignToOthers = function() {
var g = {}, m = this.options, L;
return this.chart.options.chart.alignTicks !== !1 && m.alignTicks && m.startOnTick !== !1 && m.endOnTick !== !1 && !this.logarithmic && this.chart[this.coll].forEach(function(z) {
var $ = z.options;
$ = [z.horiz ? $.left : $.top, $.width, $.height, $.pane].join(), z.series.length && (g[$] ? L = !0 : g[$] = 1);
}), L;
}, X.prototype.getTickAmount = function() {
var g = this.options, m = g.tickPixelInterval, L = g.tickAmount;
!k(g.tickInterval) && !L && this.len < m && !this.isRadial && !this.logarithmic && g.startOnTick && g.endOnTick && (L = 2), !L && this.alignToOthers() && (L = Math.ceil(this.len / m) + 1), 4 > L && (this.finalTickAmt = L, L = 5), this.tickAmount = L;
}, X.prototype.adjustTickAmount = function() {
var g = this.options, m = this.tickInterval, L = this.tickPositions, z = this.tickAmount, $ = this.finalTickAmt, Q = L && L.length, A = P(this.threshold, this.softThreshold ? 0 : null);
if (this.hasData() && p(this.min) && p(this.max)) {
if (Q < z) {
for (; L.length < z; )
L.length % 2 || this.min === A ? L.push(R(L[L.length - 1] + m)) : L.unshift(R(L[0] - m));
this.transA *= (Q - 1) / (z - 1), this.min = g.startOnTick ? L[0] : Math.min(this.min, L[0]), this.max = g.endOnTick ? L[L.length - 1] : Math.max(this.max, L[L.length - 1]);
} else
Q > z && (this.tickInterval *= 2, this.setTickPositions());
if (k($)) {
for (m = g = L.length; m--; )
($ === 3 && m % 2 === 1 || 2 >= $ && 0 < m && m < g - 1) && L.splice(m, 1);
this.finalTickAmt = void 0;
}
}
}, X.prototype.setScale = function() {
var g = !1, m = !1;
this.series.forEach(function(z) {
g = g || z.isDirtyData || z.isDirty, m = m || z.xAxis && z.xAxis.isDirty || !1;
}), this.setAxisSize();
var L = this.len !== (this.old && this.old.len);
L || g || m || this.isLinked || this.forceRedraw || this.userMin !== (this.old && this.old.userMin) || this.userMax !== (this.old && this.old.userMax) || this.alignToOthers() ? (this.stacking && this.stacking.resetStacks(), this.forceRedraw = !1, this.getSeriesExtremes(), this.setTickInterval(), this.isDirty || (this.isDirty = L || this.min !== (this.old && this.old.min) || this.max !== (this.old && this.old.max))) : this.stacking && this.stacking.cleanStacks(), g && this.panningState && (this.panningState.isDirty = !0), c(this, "afterSetScale");
}, X.prototype.setExtremes = function(g, m, L, z, $) {
var Q = this, A = Q.chart;
L = P(L, !0), Q.series.forEach(function(H) {
delete H.kdTree;
}), $ = h($, { min: g, max: m }), c(Q, "setExtremes", $, function() {
Q.userMin = g, Q.userMax = m, Q.eventArgs = $, L && A.redraw(z);
});
}, X.prototype.zoom = function(g, m) {
var L = this, z = this.dataMin, $ = this.dataMax, Q = this.options, A = Math.min(z, P(Q.min, z)), H = Math.max($, P(Q.max, $));
return g = { newMin: g, newMax: m }, c(this, "zoom", g, function(Y) {
var Z = Y.newMin, q = Y.newMax;
(Z !== L.min || q !== L.max) && (L.allowZoomOutside || (k(z) && (Z < A && (Z = A), Z > H && (Z = H)), k($) && (q < A && (q = A), q > H && (q = H))), L.displayBtn = typeof Z < "u" || typeof q < "u", L.setExtremes(Z, q, !1, void 0, { trigger: "zoom" })), Y.zoomed = !0;
}), g.zoomed;
}, X.prototype.setAxisSize = function() {
var g = this.chart, m = this.options, L = m.offsets || [0, 0, 0, 0], z = this.horiz, $ = this.width = Math.round(D(P(m.width, g.plotWidth - L[3] + L[1]), g.plotWidth)), Q = this.height = Math.round(D(P(m.height, g.plotHeight - L[0] + L[2]), g.plotHeight)), A = this.top = Math.round(D(P(m.top, g.plotTop + L[0]), g.plotHeight, g.plotTop));
m = this.left = Math.round(D(P(m.left, g.plotLeft + L[3]), g.plotWidth, g.plotLeft)), this.bottom = g.chartHeight - Q - A, this.right = g.chartWidth - $ - m, this.len = Math.max(z ? $ : Q, 0), this.pos = z ? m : A;
}, X.prototype.getExtremes = function() {
var g = this.logarithmic;
return { min: g ? R(g.lin2log(this.min)) : this.min, max: g ? R(g.lin2log(this.max)) : this.max, dataMin: this.dataMin, dataMax: this.dataMax, userMin: this.userMin, userMax: this.userMax };
}, X.prototype.getThreshold = function(g) {
var m = this.logarithmic, L = m ? m.lin2log(this.min) : this.min;
return m = m ? m.lin2log(this.max) : this.max, g === null || g === -1 / 0 ? g = L : g === 1 / 0 ? g = m : L > g ? g = L : m < g && (g = m), this.translate(g, 0, 1, 0, 1);
}, X.prototype.autoLabelAlign = function(g) {
var m = (P(g, 0) - 90 * this.side + 720) % 360;
return g = { align: "center" }, c(
this,
"autoLabelAlign",
g,
function(L) {
15 < m && 165 > m ? L.align = "right" : 195 < m && 345 > m && (L.align = "left");
}
), g.align;
}, X.prototype.tickSize = function(g) {
var m = this.options, L = P(m[g === "tick" ? "tickWidth" : "minorTickWidth"], g === "tick" && this.isXAxis && !this.categories ? 1 : 0), z = m[g === "tick" ? "tickLength" : "minorTickLength"];
if (L && z) {
m[g + "Position"] === "inside" && (z = -z);
var $ = [z, L];
}
return g = { tickSize: $ }, c(this, "afterTickSize", g), g.tickSize;
}, X.prototype.labelMetrics = function() {
var g = this.tickPositions && this.tickPositions[0] || 0;
return this.chart.renderer.fontMetrics(
this.options.labels.style.fontSize,
this.ticks[g] && this.ticks[g].label
);
}, X.prototype.unsquish = function() {
var g = this.options.labels, m = this.horiz, L = this.tickInterval, z = this.len / (((this.categories ? 1 : 0) + this.max - this.min) / L), $ = g.rotation, Q = this.labelMetrics(), A = Math.max(this.max - this.min, 0), H = function(nt) {
var rt = nt / (z || 1);
return rt = 1 < rt ? Math.ceil(rt) : 1, rt * L > A && nt !== 1 / 0 && z !== 1 / 0 && A && (rt = Math.ceil(A / L)), R(rt * L);
}, Y = L, Z, q, it = Number.MAX_VALUE;
if (m) {
if (!g.staggerLines && !g.step)
if (p($))
var et = [$];
else
z < g.autoRotationLimit && (et = g.autoRotation);
et && et.forEach(function(nt) {
if (nt === $ || nt && -90 <= nt && 90 >= nt) {
q = H(Math.abs(Q.h / Math.sin(f * nt)));
var rt = q + Math.abs(nt / 360);
rt < it && (it = rt, Z = nt, Y = q);
}
});
} else
g.step || (Y = H(Q.h));
return this.autoRotation = et, this.labelRotation = P(Z, p($) ? $ : 0), Y;
}, X.prototype.getSlotWidth = function(g) {
var m = this.chart, L = this.horiz, z = this.options.labels, $ = Math.max(this.tickPositions.length - (this.categories ? 0 : 1), 1), Q = m.margin[3];
if (g && p(g.slotWidth))
return g.slotWidth;
if (L && 2 > z.step)
return z.rotation ? 0 : (this.staggerLines || 1) * this.len / $;
if (!L) {
if (g = z.style.width, g !== void 0)
return parseInt(String(g), 10);
if (Q)
return Q - m.spacing[3];
}
return 0.33 * m.chartWidth;
}, X.prototype.renderUnsquish = function() {
var g = this.chart, m = g.renderer, L = this.tickPositions, z = this.ticks, $ = this.options.labels, Q = $.style, A = this.horiz, H = this.getSlotWidth(), Y = Math.max(1, Math.round(H - 2 * $.padding)), Z = {}, q = this.labelMetrics(), it = Q.textOverflow, et = 0;
if (a($.rotation) || (Z.rotation = $.rotation || 0), L.forEach(function(gt) {
gt = z[gt], gt.movedLabel && gt.replaceMovedLabel(), gt && gt.label && gt.label.textPxLength > et && (et = gt.label.textPxLength);
}), this.maxLabelLength = et, this.autoRotation)
et > Y && et > q.h ? Z.rotation = this.labelRotation : this.labelRotation = 0;
else if (H) {
var nt = Y;
if (!it) {
var rt = "clip";
for (Y = L.length; !A && Y--; ) {
var ct = L[Y];
(ct = z[ct].label) && (ct.styles && ct.styles.textOverflow === "ellipsis" ? ct.css({ textOverflow: "clip" }) : ct.textPxLength > H && ct.css({ width: H + "px" }), ct.getBBox().height > this.len / L.length - (q.h - q.f) && (ct.specificTextOverflow = "ellipsis"));
}
}
}
Z.rotation && (nt = et > 0.5 * g.chartHeight ? 0.33 * g.chartHeight : et, it || (rt = "ellipsis")), (this.labelAlign = $.align || this.autoLabelAlign(this.labelRotation)) && (Z.align = this.labelAlign), L.forEach(function(gt) {
var dt = (gt = z[gt]) && gt.label, ht = Q.width, at = {};
dt && (dt.attr(Z), gt.shortenLabel ? gt.shortenLabel() : nt && !ht && Q.whiteSpace !== "nowrap" && (nt < dt.textPxLength || dt.element.tagName === "SPAN") ? (at.width = nt + "px", it || (at.textOverflow = dt.specificTextOverflow || rt), dt.css(at)) : dt.styles && dt.styles.width && !at.width && !ht && dt.css({ width: null }), delete dt.specificTextOverflow, gt.rotation = Z.rotation);
}, this), this.tickRotCorr = m.rotCorr(q.b, this.labelRotation || 0, this.side !== 0);
}, X.prototype.hasData = function() {
return this.series.some(function(g) {
return g.hasData();
}) || this.options.showEmpty && k(this.min) && k(this.max);
}, X.prototype.addTitle = function(g) {
var m = this.chart.renderer, L = this.horiz, z = this.opposite, $ = this.options.title, Q = this.chart.styledMode, A;
this.axisTitle || ((A = $.textAlign) || (A = (L ? { low: "left", middle: "center", high: "right" } : { low: z ? "right" : "left", middle: "center", high: z ? "left" : "right" })[$.align]), this.axisTitle = m.text($.text || "", 0, 0, $.useHTML).attr({ zIndex: 7, rotation: $.rotation, align: A }).addClass("highcharts-axis-title"), Q || this.axisTitle.css(t($.style)), this.axisTitle.add(this.axisGroup), this.axisTitle.isNew = !0), Q || $.style.width || this.isRadial || this.axisTitle.css({ width: this.len + "px" }), this.axisTitle[g ? "show" : "hide"](g);
}, X.prototype.generateTick = function(g) {
var m = this.ticks;
m[g] ? m[g].addLabel() : m[g] = new F(this, g);
}, X.prototype.getOffset = function() {
var g = this, m = this, L = m.chart, z = m.horiz, $ = m.options, Q = m.side, A = m.ticks, H = m.tickPositions, Y = m.coll, Z = m.axisParent, q = L.renderer, it = L.inverted && !m.isZAxis ? [1, 0, 3, 2][Q] : Q, et = m.hasData(), nt = $.title, rt = $.labels, ct = L.axisOffset;
L = L.clipOffset;
var gt = [
-1,
1,
1,
-1
][Q], dt = $.className, ht, at = 0, J = 0, tt = 0;
if (m.showAxis = ht = et || $.showEmpty, m.staggerLines = m.horiz && rt.staggerLines || void 0, !m.axisGroup) {
var ot = function(pt, yt, vt) {
return q.g(pt).attr({ zIndex: vt }).addClass("highcharts-" + Y.toLowerCase() + yt + " " + (g.isRadial ? "highcharts-radial-axis" + yt + " " : "") + (dt || "")).add(Z);
};
m.gridGroup = ot("grid", "-grid", $.gridZIndex), m.axisGroup = ot("axis", "", $.zIndex), m.labelGroup = ot("axis-labels", "-labels", rt.zIndex);
}
if (et || m.isLinked ? (H.forEach(function(pt) {
m.generateTick(pt);
}), m.renderUnsquish(), m.reserveSpaceDefault = Q === 0 || Q === 2 || { 1: "left", 3: "right" }[Q] === m.labelAlign, P(rt.reserveSpace, m.labelAlign === "center" ? !0 : null, m.reserveSpaceDefault) && H.forEach(function(pt) {
tt = Math.max(A[pt].getLabelSize(), tt);
}), m.staggerLines && (tt *= m.staggerLines), m.labelOffset = tt * (m.opposite ? -1 : 1)) : n(A, function(pt, yt) {
pt.destroy(), delete A[yt];
}), nt && nt.text && nt.enabled !== !1 && (m.addTitle(ht), ht && nt.reserveSpace !== !1)) {
m.titleOffset = at = m.axisTitle.getBBox()[z ? "height" : "width"];
var lt = nt.offset;
J = k(lt) ? 0 : P(nt.margin, z ? 5 : 10);
}
m.renderLine(), m.offset = gt * P($.offset, ct[Q] ? ct[Q] + ($.margin || 0) : 0), m.tickRotCorr = m.tickRotCorr || { x: 0, y: 0 }, nt = Q === 0 ? -m.labelMetrics().h : Q === 2 ? m.tickRotCorr.y : 0, et = Math.abs(tt) + J, tt && (et = et - nt + gt * (z ? P(rt.y, m.tickRotCorr.y + 8 * gt) : rt.x)), m.axisTitleMargin = P(lt, et), m.getMaxLabelDimensions && (m.maxLabelDimensions = m.getMaxLabelDimensions(A, H)), Y !== "colorAxis" && (z = this.tickSize("tick"), ct[Q] = Math.max(ct[Q], (m.axisTitleMargin || 0) + at + gt * m.offset, et, H && H.length && z ? z[0] + gt * m.offset : 0), $ = !m.axisLine || $.offset ? 0 : 2 * Math.floor(m.axisLine.strokeWidth() / 2), L[it] = Math.max(L[it], $)), c(this, "afterGetOffset");
}, X.prototype.getLinePath = function(g) {
var m = this.chart, L = this.opposite, z = this.offset, $ = this.horiz, Q = this.left + (L ? this.width : 0) + z;
return z = m.chartHeight - this.bottom - (L ? this.height : 0) + z, L && (g *= -1), m.renderer.crispLine([["M", $ ? this.left : Q, $ ? z : this.top], ["L", $ ? m.chartWidth - this.right : Q, $ ? z : m.chartHeight - this.bottom]], g);
}, X.prototype.renderLine = function() {
this.axisLine || (this.axisLine = this.chart.renderer.path().addClass("highcharts-axis-line").add(this.axisGroup), this.chart.styledMode || this.axisLine.attr({ stroke: this.options.lineColor, "stroke-width": this.options.lineWidth, zIndex: 7 }));
}, X.prototype.getTitlePosition = function() {
var g = this.horiz, m = this.left, L = this.top, z = this.len, $ = this.options.title, Q = g ? m : L, A = this.opposite, H = this.offset, Y = $.x, Z = $.y, q = this.axisTitle, it = this.chart.renderer.fontMetrics($.style.fontSize, q);
return q = Math.max(q.getBBox(null, 0).height - it.h - 1, 0), z = { low: Q + (g ? 0 : z), middle: Q + z / 2, high: Q + (g ? z : 0) }[$.align], m = (g ? L + this.height : m) + (g ? 1 : -1) * (A ? -1 : 1) * this.axisTitleMargin + [-q, q, it.f, -q][this.side], g = { x: g ? z + Y : m + (A ? this.width : 0) + H + Y, y: g ? m + Z - (A ? this.height : 0) + H : z + Z }, c(this, "afterGetTitlePosition", { titlePosition: g }), g;
}, X.prototype.renderMinorTick = function(g, m) {
var L = this.minorTicks;
L[g] || (L[g] = new F(this, g, "minor")), m && L[g].isNew && L[g].render(null, !0), L[g].render(null, !1, 1);
}, X.prototype.renderTick = function(g, m, L) {
var z = this.ticks;
(!this.isLinked || g >= this.min && g <= this.max || this.grid && this.grid.isColumn) && (z[g] || (z[g] = new F(this, g)), L && z[g].isNew && z[g].render(
m,
!0,
-1
), z[g].render(m));
}, X.prototype.render = function() {
var g = this, m = g.chart, L = g.logarithmic, z = g.options, $ = g.isLinked, Q = g.tickPositions, A = g.axisTitle, H = g.ticks, Y = g.minorTicks, Z = g.alternateBands, q = z.stackLabels, it = z.alternateGridColor, et = g.tickmarkOffset, nt = g.axisLine, rt = g.showAxis, ct = j(m.renderer.globalAnimation), gt, dt;
if (g.labelEdge.length = 0, g.overlap = !1, [H, Y, Z].forEach(function(at) {
n(at, function(J) {
J.isActive = !1;
});
}), g.hasData() || $) {
var ht = g.chart.hasRendered && g.old && p(g.old.min);
g.minorTickInterval && !g.categories && g.getMinorTickPositions().forEach(function(at) {
g.renderMinorTick(at, ht);
}), Q.length && (Q.forEach(function(at, J) {
g.renderTick(at, J, ht);
}), et && (g.min === 0 || g.single) && (H[-1] || (H[-1] = new F(g, -1, null, !0)), H[-1].render(-1))), it && Q.forEach(function(at, J) {
dt = typeof Q[J + 1] < "u" ? Q[J + 1] + et : g.max - et, J % 2 === 0 && at < g.max && dt <= g.max + (m.polar ? -et : et) && (Z[at] || (Z[at] = new V.PlotLineOrBand(g)), gt = at + et, Z[at].options = { from: L ? L.lin2log(gt) : gt, to: L ? L.lin2log(dt) : dt, color: it, className: "highcharts-alternate-grid" }, Z[at].render(), Z[at].isActive = !0);
}), g._addedPlotLB || (g._addedPlotLB = !0, (z.plotLines || []).concat(z.plotBands || []).forEach(function(at) {
g.addPlotBandOrLine(at);
}));
}
[H, Y, Z].forEach(function(at) {
var J = [], tt = ct.duration;
n(at, function(ot, lt) {
ot.isActive || (ot.render(lt, !1, 0), ot.isActive = !1, J.push(lt));
}), E(function() {
for (var ot = J.length; ot--; )
at[J[ot]] && !at[J[ot]].isActive && (at[J[ot]].destroy(), delete at[J[ot]]);
}, at !== Z && m.hasRendered && tt ? tt : 0);
}), nt && (nt[nt.isPlaced ? "animate" : "attr"]({ d: this.getLinePath(nt.strokeWidth()) }), nt.isPlaced = !0, nt[rt ? "show" : "hide"](rt)), A && rt && (z = g.getTitlePosition(), p(z.y) ? (A[A.isNew ? "attr" : "animate"](z), A.isNew = !1) : (A.attr("y", -9999), A.isNew = !0)), q && q.enabled && g.stacking && g.stacking.renderStackTotals(), g.old = { len: g.len, max: g.max, min: g.min, transA: g.transA, userMax: g.userMax, userMin: g.userMin }, g.isDirty = !1, c(this, "afterRender");
}, X.prototype.redraw = function() {
this.visible && (this.render(), this.plotLinesAndBands.forEach(function(g) {
g.render();
})), this.series.forEach(function(g) {
g.isDirty = !0;
});
}, X.prototype.getKeepProps = function() {
return this.keepProps || X.keepProps;
}, X.prototype.destroy = function(g) {
var m = this, L = m.plotLinesAndBands, z = this.eventOptions;
if (c(this, "destroy", { keepEvents: g }), g || I(m), [m.ticks, m.minorTicks, m.alternateBands].forEach(function(Q) {
b(Q);
}), L)
for (g = L.length; g--; )
L[g].destroy();
"axisLine axisTitle axisGroup gridGroup labelGroup cross scrollbar".split(" ").forEach(function(Q) {
m[Q] && (m[Q] = m[Q].destroy());
});
for (var $ in m.plotLinesAndBandsGroups)
m.plotLinesAndBandsGroups[$] = m.plotLinesAndBandsGroups[$].destroy();
n(m, function(Q, A) {
m.getKeepProps().indexOf(A) === -1 && delete m[A];
}), this.eventOptions = z;
}, X.prototype.drawCrosshair = function(g, m) {
var L = this.crosshair, z = P(L && L.snap, !0), $ = this.chart, Q, A = this.cross;
if (c(this, "drawCrosshair", { e: g, point: m }), g || (g = this.cross && this.cross.e), L && (k(m) || !z) !== !1) {
if (z ? k(m) && (Q = P(this.coll !== "colorAxis" ? m.crosshairPos : null, this.isXAxis ? m.plotX : this.len - m.plotY)) : Q = g && (this.horiz ? g.chartX - this.pos : this.len - g.chartY + this.pos), k(Q)) {
var H = { value: m && (this.isXAxis ? m.x : P(m.stackY, m.y)), translatedValue: Q };
$.polar && h(H, { isCrosshair: !0, chartX: g && g.chartX, chartY: g && g.chartY, point: m }), H = this.getPlotLinePath(H) || null;
}
if (!k(H)) {
this.hideCrosshair();
return;
}
z = this.categories && !this.isRadial, A || (this.cross = A = $.renderer.path().addClass("highcharts-crosshair highcharts-crosshair-" + (z ? "category " : "thin ") + (L.className || "")).attr({ zIndex: P(L.zIndex, 2) }).add(), $.styledMode || (A.attr({ stroke: L.color || (z ? _.parse("#ccd6eb").setOpacity(0.25).get() : "#cccccc"), "stroke-width": P(L.width, 1) }).css({ "pointer-events": "none" }), L.dashStyle && A.attr({ dashstyle: L.dashStyle }))), A.show().attr({ d: H }), z && !L.width && A.attr({ "stroke-width": this.transA }), this.cross.e = g;
} else
this.hideCrosshair();
c(this, "afterDrawCrosshair", { e: g, point: m });
}, X.prototype.hideCrosshair = function() {
this.cross && this.cross.hide(), c(this, "afterHideCrosshair");
}, X.prototype.hasVerticalPanning = function() {
var g = this.chart.options.chart.panning;
return !!(g && g.enabled && /y/.test(g.type));
}, X.prototype.validatePositiveValue = function(g) {
return p(g) && 0 < g;
}, X.prototype.update = function(g, m) {
var L = this.chart;
g = t(this.userOptions, g), this.destroy(!0), this.init(L, g), L.isDirtyBox = !0, P(m, !0) && L.redraw();
}, X.prototype.remove = function(g) {
for (var m = this.chart, L = this.coll, z = this.series, $ = z.length; $--; )
z[$] && z[$].remove(!1);
S(m.axes, this), S(m[L], this), m[L].forEach(function(Q, A) {
Q.options.index = Q.userOptions.index = A;
}), this.destroy(), m.isDirtyBox = !0, P(g, !0) && m.redraw();
}, X.prototype.setTitle = function(g, m) {
this.update({ title: g }, m);
}, X.prototype.setCategories = function(g, m) {
this.update(
{ categories: g },
m
);
}, X.defaultOptions = N.defaultXAxisOptions, X.keepProps = "extKey hcEvents names series userMax userMin".split(" "), X;
}(), y;
}), C(o, "Core/Axis/DateTimeAxis.js", [o["Core/Utilities.js"]], function(y) {
var N = y.addEvent, _ = y.getMagnitude, U = y.normalizeTickInterval, G = y.timeUnits, V;
return function(F) {
function B() {
return this.chart.time.getTimeTicks.apply(this.chart.time, arguments);
}
function j(f) {
f.userOptions.type !== "datetime" ? this.dateTime = void 0 : this.dateTime || (this.dateTime = new x(this));
}
var w = [];
F.compose = function(f) {
return w.indexOf(f) === -1 && (w.push(f), f.keepProps.push("dateTime"), f.prototype.getTimeTicks = B, N(f, "init", j)), f;
};
var x = function() {
function f(l) {
this.axis = l;
}
return f.prototype.normalizeTimeTickInterval = function(l, T) {
var O = T || [["millisecond", [1, 2, 5, 10, 20, 25, 50, 100, 200, 500]], ["second", [1, 2, 5, 10, 15, 30]], ["minute", [1, 2, 5, 10, 15, 30]], ["hour", [1, 2, 3, 4, 6, 8, 12]], ["day", [1, 2]], ["week", [1, 2]], ["month", [1, 2, 3, 4, 6]], ["year", null]];
T = O[O.length - 1];
var R = G[T[0]], k = T[1], b;
for (b = 0; b < O.length && (T = O[b], R = G[T[0]], k = T[1], !(O[b + 1] && l <= (R * k[k.length - 1] + G[O[b + 1][0]]) / 2)); b++)
;
return R === G.year && l < 5 * R && (k = [1, 2, 5]), l = U(l / R, k, T[0] === "year" ? Math.max(_(l / R), 1) : 1), { unitRange: R, count: l, unitName: T[0] };
}, f.prototype.getXDateFormat = function(l, T) {
var O = this.axis;
return O.closestPointRange ? O.chart.time.getDateFormat(O.closestPointRange, l, O.options.startOfWeek, T) || T.year : T.day;
}, f;
}();
F.Additions = x;
}(V || (V = {})), V;
}), C(o, "Core/Axis/LogarithmicAxis.js", [o["Core/Utilities.js"]], function(y) {
var N = y.addEvent, _ = y.getMagnitude, U = y.normalizeTickInterval, G = y.pick, V;
return function(F) {
function B(f) {
var l = this.logarithmic;
f.userOptions.type !== "logarithmic" ? this.logarithmic = void 0 : l || (this.logarithmic = new x(this));
}
function j() {
var f = this.logarithmic;
f && (this.lin2val = function(l) {
return f.lin2log(l);
}, this.val2lin = function(l) {
return f.log2lin(l);
});
}
var w = [];
F.compose = function(f) {
return w.indexOf(f) === -1 && (w.push(f), f.keepProps.push("logarithmic"), N(f, "init", B), N(f, "afterInit", j)), f;
};
var x = function() {
function f(l) {
this.axis = l;
}
return f.prototype.getLogTickPositions = function(l, T, O, R) {
var k = this.axis, b = k.len, S = k.options, v = [];
if (R || (this.minorAutoInterval = void 0), 0.5 <= l)
l = Math.round(l), v = k.getLinearTickPositions(l, T, O);
else if (0.08 <= l) {
var h = Math.floor(T), c, u = S = void 0;
for (b = 0.3 < l ? [1, 2, 4] : 0.15 < l ? [1, 2, 4, 6, 8] : [1, 2, 3, 4, 5, 6, 7, 8, 9]; h < O + 1 && !u; h++) {
var i = b.length;
for (c = 0; c < i && !u; c++) {
var p = this.log2lin(this.lin2log(h) * b[c]);
p > T && (!R || S <= O) && typeof S < "u" && v.push(S), S > O && (u = !0), S = p;
}
}
} else
T = this.lin2log(T), O = this.lin2log(O), l = R ? k.getMinorTickInterval() : S.tickInterval, l = G(l === "auto" ? null : l, this.minorAutoInterval, S.tickPixelInterval / (R ? 5 : 1) * (O - T) / ((R ? b / k.tickPositions.length : b) || 1)), l = U(l, void 0, _(l)), v = k.getLinearTickPositions(l, T, O).map(this.log2lin), R || (this.minorAutoInterval = l / 5);
return R || (k.tickInterval = l), v;
}, f.prototype.lin2log = function(l) {
return Math.pow(10, l);
}, f.prototype.log2lin = function(l) {
return Math.log(l) / Math.LN10;
}, f;
}();
F.Additions = x;
}(V || (V = {})), V;
}), C(o, "Core/Axis/PlotLineOrBand/PlotLineOrBandAxis.js", [o["Core/Utilities.js"]], function(y) {
var N = y.erase, _ = y.extend, U = y.isNumber, G;
return function(V) {
var F = [], B;
V.compose = function(w, x) {
return B || (B = w), F.indexOf(x) === -1 && (F.push(x), _(x.prototype, j.prototype)), x;
};
var j = function() {
function w() {
}
return w.prototype.getPlotBandPath = function(x, f, l) {
l === void 0 && (l = this.options);
var T = this.getPlotLinePath({ value: f, force: !0, acrossPanes: l.acrossPanes }), O = [], R = this.horiz;
if (f = !U(this.min) || !U(this.max) || x < this.min && f < this.min || x > this.max && f > this.max, x = this.getPlotLinePath({ value: x, force: !0, acrossPanes: l.acrossPanes }), l = 1, x && T) {
if (f) {
var k = x.toString() === T.toString();
l = 0;
}
for (f = 0; f < x.length; f += 2) {
var b = x[f], S = x[f + 1], v = T[f], h = T[f + 1];
b[0] !== "M" && b[0] !== "L" || S[0] !== "M" && S[0] !== "L" || v[0] !== "M" && v[0] !== "L" || h[0] !== "M" && h[0] !== "L" || (R && v[1] === b[1] ? (v[1] += l, h[1] += l) : R || v[2] !== b[2] || (v[2] += l, h[2] += l), O.push(["M", b[1], b[2]], ["L", S[1], S[2]], ["L", h[1], h[2]], ["L", v[1], v[2]], ["Z"])), O.isFlat = k;
}
}
return O;
}, w.prototype.addPlotBand = function(x) {
return this.addPlotBandOrLine(x, "plotBands");
}, w.prototype.addPlotLine = function(x) {
return this.addPlotBandOrLine(
x,
"plotLines"
);
}, w.prototype.addPlotBandOrLine = function(x, f) {
var l = this, T = this.userOptions, O = new B(this, x);
if (this.visible && (O = O.render()), O) {
if (this._addedPlotLB || (this._addedPlotLB = !0, (T.plotLines || []).concat(T.plotBands || []).forEach(function(k) {
l.addPlotBandOrLine(k);
})), f) {
var R = T[f] || [];
R.push(x), T[f] = R;
}
this.plotLinesAndBands.push(O);
}
return O;
}, w.prototype.removePlotBandOrLine = function(x) {
var f = this.plotLinesAndBands, l = this.options, T = this.userOptions;
if (f) {
for (var O = f.length; O--; )
f[O].id === x && f[O].destroy();
[l.plotLines || [], T.plotLines || [], l.plotBands || [], T.plotBands || []].forEach(function(R) {
for (O = R.length; O--; )
(R[O] || {}).id === x && N(R, R[O]);
});
}
}, w.prototype.removePlotBand = function(x) {
this.removePlotBandOrLine(x);
}, w.prototype.removePlotLine = function(x) {
this.removePlotBandOrLine(x);
}, w;
}();
}(G || (G = {})), G;
}), C(o, "Core/Axis/PlotLineOrBand/PlotLineOrBand.js", [o["Core/Axis/PlotLineOrBand/PlotLineOrBandAxis.js"], o["Core/Utilities.js"]], function(y, N) {
var _ = N.arrayMax, U = N.arrayMin, G = N.defined, V = N.destroyObjectProperties, F = N.erase, B = N.fireEvent, j = N.merge, w = N.objectEach, x = N.pick;
return N = function() {
function f(l, T) {
this.axis = l, T && (this.options = T, this.id = T.id);
}
return f.compose = function(l) {
return y.compose(f, l);
}, f.prototype.render = function() {
B(this, "render");
var l = this, T = l.axis, O = T.horiz, R = T.logarithmic, k = l.options, b = k.color, S = x(k.zIndex, 0), v = k.events, h = {}, c = T.chart.renderer, u = k.label, i = l.label, p = k.to, a = k.from, t = k.value, s = l.svgElem, n = [], P = G(a) && G(p);
n = G(t);
var D = !s, I = { class: "highcharts-plot-" + (P ? "band " : "line ") + (k.className || "") }, W = P ? "bands" : "lines";
if (R && (a = R.log2lin(a), p = R.log2lin(p), t = R.log2lin(t)), T.chart.styledMode || (n ? (I.stroke = b || "#999999", I["stroke-width"] = x(k.width, 1), k.dashStyle && (I.dashstyle = k.dashStyle)) : P && (I.fill = b || "#e6ebf5", k.borderWidth && (I.stroke = k.borderColor, I["stroke-width"] = k.borderWidth))), h.zIndex = S, W += "-" + S, (R = T.plotLinesAndBandsGroups[W]) || (T.plotLinesAndBandsGroups[W] = R = c.g("plot-" + W).attr(h).add()), D && (l.svgElem = s = c.path().attr(I).add(R)), n)
n = T.getPlotLinePath({
value: t,
lineWidth: s.strokeWidth(),
acrossPanes: k.acrossPanes
});
else if (P)
n = T.getPlotBandPath(a, p, k);
else
return;
return !l.eventsAdded && v && (w(v, function(E, X) {
s.on(X, function(g) {
v[X].apply(l, [g]);
});
}), l.eventsAdded = !0), (D || !s.d) && n && n.length ? s.attr({ d: n }) : s && (n ? (s.show(!0), s.animate({ d: n })) : s.d && (s.hide(), i && (l.label = i = i.destroy()))), u && (G(u.text) || G(u.formatter)) && n && n.length && 0 < T.width && 0 < T.height && !n.isFlat ? (u = j({ align: O && P && "center", x: O ? !P && 4 : 10, verticalAlign: !O && P && "middle", y: O ? P ? 16 : 10 : P ? 6 : -4, rotation: O && !P && 90 }, u), this.renderLabel(
u,
n,
P,
S
)) : i && i.hide(), l;
}, f.prototype.renderLabel = function(l, T, O, R) {
var k = this.axis, b = k.chart.renderer, S = this.label;
S || (this.label = S = b.text(this.getLabelText(l), 0, 0, l.useHTML).attr({ align: l.textAlign || l.align, rotation: l.rotation, class: "highcharts-plot-" + (O ? "band" : "line") + "-label " + (l.className || ""), zIndex: R }).add(), k.chart.styledMode || S.css(j({ textOverflow: "ellipsis" }, l.style))), R = T.xBounds || [T[0][1], T[1][1], O ? T[2][1] : T[0][1]], T = T.yBounds || [T[0][2], T[1][2], O ? T[2][2] : T[0][2]], O = U(R), b = U(T), S.align(
l,
!1,
{ x: O, y: b, width: _(R) - O, height: _(T) - b }
), S.alignValue && S.alignValue !== "left" || S.css({ width: (S.rotation === 90 ? k.height - (S.alignAttr.y - k.top) : k.width - (S.alignAttr.x - k.left)) + "px" }), S.show(!0);
}, f.prototype.getLabelText = function(l) {
return G(l.formatter) ? l.formatter.call(this) : l.text;
}, f.prototype.destroy = function() {
F(this.axis.plotLinesAndBands, this), delete this.axis, V(this);
}, f;
}(), N;
}), C(o, "Core/Tooltip.js", [
o["Core/FormatUtilities.js"],
o["Core/Globals.js"],
o["Core/Renderer/RendererUtilities.js"],
o["Core/Renderer/RendererRegistry.js"],
o["Core/Utilities.js"]
], function(y, N, _, U, G) {
var V = y.format, F = N.doc, B = _.distribute, j = G.addEvent, w = G.clamp, x = G.css, f = G.defined, l = G.discardElement, T = G.extend, O = G.fireEvent, R = G.isArray, k = G.isNumber, b = G.isString, S = G.merge, v = G.pick, h = G.splat, c = G.syncTimeout;
return y = function() {
function u(i, p) {
this.allowShared = !0, this.container = void 0, this.crosshairs = [], this.distance = 0, this.isHidden = !0, this.isSticky = !1, this.now = {}, this.options = {}, this.outside = !1, this.chart = i, this.init(i, p);
}
return u.prototype.applyFilter = function() {
var i = this.chart;
i.renderer.definition({ tagName: "filter", attributes: { id: "drop-shadow-" + i.index, opacity: 0.5 }, children: [{ tagName: "feGaussianBlur", attributes: { in: "SourceAlpha", stdDeviation: 1 } }, { tagName: "feOffset", attributes: { dx: 1, dy: 1 } }, { tagName: "feComponentTransfer", children: [{ tagName: "feFuncA", attributes: { type: "linear", slope: 0.3 } }] }, { tagName: "feMerge", children: [{ tagName: "feMergeNode" }, { tagName: "feMergeNode", attributes: { in: "SourceGraphic" } }] }] });
}, u.prototype.bodyFormatter = function(i) {
return i.map(function(p) {
var a = p.series.tooltipOptions;
return (a[(p.point.formatPrefix || "point") + "Formatter"] || p.point.tooltipFormatter).call(p.point, a[(p.point.formatPrefix || "point") + "Format"] || "");
});
}, u.prototype.cleanSplit = function(i) {
this.chart.series.forEach(function(p) {
var a = p && p.tt;
a && (!a.isActive || i ? p.tt = a.destroy() : a.isActive = !1);
});
}, u.prototype.defaultFormatter = function(i) {
var p = this.points || h(this), a = [i.tooltipFooterHeaderFormatter(p[0])];
return a = a.concat(i.bodyFormatter(p)), a.push(i.tooltipFooterHeaderFormatter(
p[0],
!0
)), a;
}, u.prototype.destroy = function() {
this.label && (this.label = this.label.destroy()), this.split && this.tt && (this.cleanSplit(!0), this.tt = this.tt.destroy()), this.renderer && (this.renderer = this.renderer.destroy(), l(this.container)), G.clearTimeout(this.hideTimer), G.clearTimeout(this.tooltipTimeout);
}, u.prototype.getAnchor = function(i, p) {
var a = this.chart, t = a.pointer, s = a.inverted, n = a.plotTop, P = a.plotLeft, D, I, W = 0, E = 0;
return i = h(i), this.followPointer && p ? (typeof p.chartX > "u" && (p = t.normalize(p)), t = [p.chartX - P, p.chartY - n]) : i[0].tooltipPos ? t = i[0].tooltipPos : (i.forEach(function(X) {
D = X.series.yAxis, I = X.series.xAxis, W += X.plotX || 0, E += X.plotLow ? (X.plotLow + (X.plotHigh || 0)) / 2 : X.plotY || 0, I && D && (s ? (W += n + a.plotHeight - I.len - I.pos, E += P + a.plotWidth - D.len - D.pos) : (W += I.pos - P, E += D.pos - n));
}), W /= i.length, E /= i.length, t = [s ? a.plotWidth - E : W, s ? a.plotHeight - W : E], this.shared && 1 < i.length && p && (s ? t[0] = p.chartX - P : t[1] = p.chartY - n)), t.map(Math.round);
}, u.prototype.getLabel = function() {
var i = this, p = this.chart.styledMode, a = this.options, t = this.split && this.allowShared, s = "tooltip" + (f(a.className) ? " " + a.className : ""), n = a.style.pointerEvents || (!this.followPointer && a.stickOnContact ? "auto" : "none"), P = function() {
i.inContact = !0;
}, D = function(z) {
var $ = i.chart.hoverSeries;
i.inContact = i.shouldStickOnContact() && i.chart.pointer.inClass(z.relatedTarget, "highcharts-tooltip"), !i.inContact && $ && $.onMouseOut && $.onMouseOut();
}, I, W = this.chart.renderer;
if (i.label) {
var E = !i.label.hasClass("highcharts-label");
(t && !E || !t && E) && i.destroy();
}
if (!this.label) {
if (this.outside) {
E = this.chart.options.chart.style;
var X = U.getRendererType();
this.container = I = N.doc.createElement("div"), I.className = "highcharts-tooltip-container", x(I, { position: "absolute", top: "1px", pointerEvents: n, zIndex: Math.max(this.options.style.zIndex || 0, (E && E.zIndex || 0) + 3) }), j(I, "mouseenter", P), j(I, "mouseleave", D), N.doc.body.appendChild(I), this.renderer = W = new X(I, 0, 0, E, void 0, void 0, W.styledMode);
}
if (t ? this.label = W.g(s) : (this.label = W.label("", 0, 0, a.shape, void 0, void 0, a.useHTML, void 0, s).attr({ padding: a.padding, r: a.borderRadius }), p || this.label.attr({ fill: a.backgroundColor, "stroke-width": a.borderWidth }).css(a.style).css({ pointerEvents: n }).shadow(a.shadow)), p && a.shadow && (this.applyFilter(), this.label.attr({ filter: "url(#drop-shadow-" + this.chart.index + ")" })), i.outside && !i.split) {
var g = this.label, m = g.xSetter, L = g.ySetter;
g.xSetter = function(z) {
m.call(g, i.distance), I.style.left = z + "px";
}, g.ySetter = function(z) {
L.call(g, i.distance), I.style.top = z + "px";
};
}
this.label.on("mouseenter", P).on("mouseleave", D).attr({ zIndex: 8 }).add();
}
return this.label;
}, u.prototype.getPosition = function(i, p, a) {
var t = this.chart, s = this.distance, n = {}, P = t.inverted && a.h || 0, D = this.outside, I = D ? F.documentElement.clientWidth - 2 * s : t.chartWidth, W = D ? Math.max(F.body.scrollHeight, F.documentElement.scrollHeight, F.body.offsetHeight, F.documentElement.offsetHeight, F.documentElement.clientHeight) : t.chartHeight, E = t.pointer.getChartPosition(), X = function(Y) {
var Z = Y === "x";
return [Y, Z ? I : W, Z ? i : p].concat(D ? [Z ? i * E.scaleX : p * E.scaleY, Z ? E.left - s + (a.plotX + t.plotLeft) * E.scaleX : E.top - s + (a.plotY + t.plotTop) * E.scaleY, 0, Z ? I : W] : [Z ? i : p, Z ? a.plotX + t.plotLeft : a.plotY + t.plotTop, Z ? t.plotLeft : t.plotTop, Z ? t.plotLeft + t.plotWidth : t.plotTop + t.plotHeight]);
}, g = X("y"), m = X("x"), L;
X = !!a.negative, !t.polar && t.hoverSeries && t.hoverSeries.yAxis && t.hoverSeries.yAxis.reversed && (X = !X);
var z = !this.followPointer && v(a.ttBelow, !t.inverted === X), $ = function(Y, Z, q, it, et, nt, rt) {
var ct = D ? Y === "y" ? s * E.scaleY : s * E.scaleX : s, gt = (q - it) / 2, dt = it < et - s, ht = et + s + it < Z, at = et - ct - q + gt;
if (et = et + ct - gt, z && ht)
n[Y] = et;
else if (!z && dt)
n[Y] = at;
else if (dt)
n[Y] = Math.min(rt - it, 0 > at - P ? at : at - P);
else if (ht)
n[Y] = Math.max(nt, et + P + q > Z ? et : et + P);
else
return !1;
}, Q = function(Y, Z, q, it, et) {
var nt;
return et < s || et > Z - s ? nt = !1 : n[Y] = et < q / 2 ? 1 : et > Z - it / 2 ? Z - it - 2 : et - q / 2, nt;
}, A = function(Y) {
var Z = g;
g = m, m = Z, L = Y;
}, H = function() {
$.apply(0, g) !== !1 ? Q.apply(0, m) !== !1 || L || (A(!0), H()) : L ? n.x = n.y = 0 : (A(!0), H());
};
return (t.inverted || 1 < this.len) && A(), H(), n;
}, u.prototype.hide = function(i) {
var p = this;
G.clearTimeout(this.hideTimer), i = v(i, this.options.hideDelay), this.isHidden || (this.hideTimer = c(function() {
p.getLabel().fadeOut(i && void 0), p.isHidden = !0;
}, i));
}, u.prototype.init = function(i, p) {
this.chart = i, this.options = p, this.crosshairs = [], this.now = { x: 0, y: 0 }, this.isHidden = !0, this.split = p.split && !i.inverted && !i.polar, this.shared = p.shared || this.split, this.outside = v(p.outside, !(!i.scrollablePixelsX && !i.scrollablePixelsY));
}, u.prototype.shouldStickOnContact = function() {
return !(this.followPointer || !this.options.stickOnContact);
}, u.prototype.isStickyOnContact = function() {
return !(!this.shouldStickOnContact() || !this.inContact);
}, u.prototype.move = function(i, p, a, t) {
var s = this, n = s.now, P = s.options.animation !== !1 && !s.isHidden && (1 < Math.abs(i - n.x) || 1 < Math.abs(p - n.y)), D = s.followPointer || 1 < s.len;
T(n, { x: P ? (2 * n.x + i) / 3 : i, y: P ? (n.y + p) / 2 : p, anchorX: D ? void 0 : P ? (2 * n.anchorX + a) / 3 : a, anchorY: D ? void 0 : P ? (n.anchorY + t) / 2 : t }), s.getLabel().attr(n), s.drawTracker(), P && (G.clearTimeout(this.tooltipTimeout), this.tooltipTimeout = setTimeout(function() {
s && s.move(i, p, a, t);
}, 32));
}, u.prototype.refresh = function(i, p) {
var a = this.chart, t = this.options, s = h(i), n = s[0], P = [], D = t.formatter || this.defaultFormatter, I = this.shared, W = a.styledMode, E = {};
if (t.enabled) {
G.clearTimeout(this.hideTimer), this.allowShared = !(!R(i) && i.series && i.series.noSharedTooltip), this.followPointer = !this.split && n.series.tooltipOptions.followPointer, i = this.getAnchor(i, p);
var X = i[0], g = i[1];
if (I && this.allowShared ? (a.pointer.applyInactiveState(s), s.forEach(function(z) {
z.setState("hover"), P.push(z.getLabelConfig());
}), E = { x: n.category, y: n.y }, E.points = P) : E = n.getLabelConfig(), this.len = P.length, D = D.call(E, this), I = n.series, this.distance = v(
I.tooltipOptions.distance,
16
), D === !1)
this.hide();
else {
if (this.split && this.allowShared)
this.renderSplit(D, s);
else {
var m = X, L = g;
if (p && a.pointer.isDirectTouch && (m = p.chartX - a.plotLeft, L = p.chartY - a.plotTop), a.polar || I.options.clip === !1 || s.some(function(z) {
return z.series.shouldShowTooltip(m, L);
}))
p = this.getLabel(), t.style.width && !W || p.css({ width: this.chart.spacingBox.width + "px" }), p.attr({ text: D && D.join ? D.join("") : D }), p.removeClass(/highcharts-color-[\d]+/g).addClass("highcharts-color-" + v(n.colorIndex, I.colorIndex)), W || p.attr({ stroke: t.borderColor || n.color || I.color || "#666666" }), this.updatePosition({ plotX: X, plotY: g, negative: n.negative, ttBelow: n.ttBelow, h: i[2] || 0 });
else {
this.hide();
return;
}
}
this.isHidden && this.label && this.label.attr({ opacity: 1 }).show(), this.isHidden = !1;
}
O(this, "refresh");
}
}, u.prototype.renderSplit = function(i, p) {
function a(ht, at, J, tt, ot) {
return ot === void 0 && (ot = !0), J ? (at = it ? 0 : ct, ht = w(ht - tt / 2, Y.left, Y.right - tt - (t.outside ? et : 0))) : (at -= nt, ht = ot ? ht - tt - Q : ht + Q, ht = w(ht, ot ? ht : Y.left, Y.right)), { x: ht, y: at };
}
var t = this, s = t.chart, n = t.chart, P = n.chartWidth, D = n.chartHeight, I = n.plotHeight, W = n.plotLeft, E = n.plotTop, X = n.pointer, g = n.scrollablePixelsY;
g = g === void 0 ? 0 : g;
var m = n.scrollablePixelsX, L = n.scrollingContainer;
L = L === void 0 ? { scrollLeft: 0, scrollTop: 0 } : L;
var z = L.scrollLeft;
L = L.scrollTop;
var $ = n.styledMode, Q = t.distance, A = t.options, H = t.options.positioner, Y = t.outside && typeof m != "number" ? F.documentElement.getBoundingClientRect() : { left: z, right: z + P, top: L, bottom: L + D }, Z = t.getLabel(), q = this.renderer || s.renderer, it = !(!s.xAxis[0] || !s.xAxis[0].opposite);
s = X.getChartPosition();
var et = s.left;
s = s.top;
var nt = E + L, rt = 0, ct = I - g;
b(i) && (i = [!1, i]), i = i.slice(0, p.length + 1).reduce(function(ht, at, J) {
if (at !== !1 && at !== "") {
J = p[J - 1] || { isHeader: !0, plotX: p[0].plotX, plotY: I, series: {} };
var tt = J.isHeader, ot = tt ? t : J.series;
at = at.toString();
var lt = ot.tt, pt = J.isHeader, yt = J.series, vt = "highcharts-color-" + v(J.colorIndex, yt.colorIndex, "none");
if (lt || (lt = { padding: A.padding, r: A.borderRadius }, $ || (lt.fill = A.backgroundColor, lt["stroke-width"] = A.borderWidth), lt = q.label("", 0, 0, A[pt ? "headerShape" : "shape"], void 0, void 0, A.useHTML).addClass((pt ? "highcharts-tooltip-header " : "") + "highcharts-tooltip-box " + vt).attr(lt).add(Z)), lt.isActive = !0, lt.attr({ text: at }), $ || lt.css(A.style).shadow(A.shadow).attr({ stroke: A.borderColor || J.color || yt.color || "#333333" }), ot = ot.tt = lt, pt = ot.getBBox(), at = pt.width + ot.strokeWidth(), tt && (rt = pt.height, ct += rt, it && (nt -= rt)), yt = J.plotX, yt = yt === void 0 ? 0 : yt, vt = J.plotY, vt = vt === void 0 ? 0 : vt, lt = J.series, J.isHeader) {
yt = W + yt;
var Ct = E + I / 2;
} else {
var Pt = lt.xAxis, At = lt.yAxis;
yt = Pt.pos + w(yt, -Q, Pt.len + Q), lt.shouldShowTooltip(0, At.pos - E + vt, { ignoreX: !0 }) && (Ct = At.pos + vt);
}
yt = w(
yt,
Y.left - Q,
Y.right + Q
), typeof Ct == "number" ? (pt = pt.height + 1, vt = H ? H.call(t, at, pt, J) : a(yt, Ct, tt, at), ht.push({ align: H ? 0 : void 0, anchorX: yt, anchorY: Ct, boxWidth: at, point: J, rank: v(vt.rank, tt ? 1 : 0), size: pt, target: vt.y, tt: ot, x: vt.x })) : ot.isActive = !1;
}
return ht;
}, []), !H && i.some(function(ht) {
var at = (t.outside ? et : 0) + ht.anchorX;
return at < Y.left && at + ht.boxWidth < Y.right ? !0 : at < et - Y.left + ht.boxWidth && Y.right - at > at;
}) && (i = i.map(function(ht) {
var at = a(ht.anchorX, ht.anchorY, ht.point.isHeader, ht.boxWidth, !1);
return T(ht, { target: at.y, x: at.x });
})), t.cleanSplit(), B(i, ct);
var gt = et, dt = et;
i.forEach(function(ht) {
var at = ht.x, J = ht.boxWidth;
ht = ht.isHeader, ht || (t.outside && et + at < gt && (gt = et + at), !ht && t.outside && gt + J > dt && (dt = et + at));
}), i.forEach(function(ht) {
var at = ht.x, J = ht.anchorX, tt = ht.pos, ot = ht.point.isHeader;
if (tt = { visibility: typeof tt > "u" ? "hidden" : "inherit", x: at, y: tt + nt, anchorX: J, anchorY: ht.anchorY }, t.outside && at < J) {
var lt = et - gt;
0 < lt && (ot || (tt.x = at + lt, tt.anchorX = J + lt), ot && (tt.x = (dt - gt) / 2, tt.anchorX = J + lt));
}
ht.tt.attr(tt);
}), i = t.container, g = t.renderer, t.outside && i && g && (n = Z.getBBox(), g.setSize(n.width + n.x, n.height + n.y, !1), i.style.left = gt + "px", i.style.top = s + "px");
}, u.prototype.drawTracker = function() {
if (this.followPointer || !this.options.stickOnContact)
this.tracker && this.tracker.destroy();
else {
var i = this.chart, p = this.label, a = this.shared ? i.hoverPoints : i.hoverPoint;
if (p && a) {
var t = { x: 0, y: 0, width: 0, height: 0 };
a = this.getAnchor(a);
var s = p.getBBox();
a[0] += i.plotLeft - p.translateX, a[1] += i.plotTop - p.translateY, t.x = Math.min(0, a[0]), t.y = Math.min(0, a[1]), t.width = 0 > a[0] ? Math.max(Math.abs(a[0]), s.width - a[0]) : Math.max(
Math.abs(a[0]),
s.width
), t.height = 0 > a[1] ? Math.max(Math.abs(a[1]), s.height - Math.abs(a[1])) : Math.max(Math.abs(a[1]), s.height), this.tracker ? this.tracker.attr(t) : (this.tracker = p.renderer.rect(t).addClass("highcharts-tracker").add(p), i.styledMode || this.tracker.attr({ fill: "rgba(0,0,0,0)" }));
}
}
}, u.prototype.styledModeFormat = function(i) {
return i.replace('style="font-size: 10px"', 'class="highcharts-header"').replace(/style="color:{(point|series)\.color}"/g, 'class="highcharts-color-{$1.colorIndex}"');
}, u.prototype.tooltipFooterHeaderFormatter = function(i, p) {
var a = i.series, t = a.tooltipOptions, s = a.xAxis, n = s && s.dateTime;
s = { isFooter: p, labelConfig: i };
var P = t.xDateFormat, D = t[p ? "footerFormat" : "headerFormat"];
return O(this, "headerFormatter", s, function(I) {
n && !P && k(i.key) && (P = n.getXDateFormat(i.key, t.dateTimeLabelFormats)), n && P && (i.point && i.point.tooltipDateKeys || ["key"]).forEach(function(W) {
D = D.replace("{point." + W + "}", "{point." + W + ":" + P + "}");
}), a.chart.styledMode && (D = this.styledModeFormat(D)), I.text = V(D, { point: i, series: a }, this.chart);
}), s.text;
}, u.prototype.update = function(i) {
this.destroy(), S(!0, this.chart.options.tooltip.userOptions, i), this.init(this.chart, S(!0, this.options, i));
}, u.prototype.updatePosition = function(i) {
var p = this.chart, a = this.options, t = p.pointer, s = this.getLabel();
t = t.getChartPosition();
var n = (a.positioner || this.getPosition).call(this, s.width, s.height, i), P = i.plotX + p.plotLeft;
i = i.plotY + p.plotTop, this.outside && (a = a.borderWidth + 2 * this.distance, this.renderer.setSize(s.width + a, s.height + a, !1), (t.scaleX !== 1 || t.scaleY !== 1) && (x(this.container, { transform: "scale(" + t.scaleX + ", " + t.scaleY + ")" }), P *= t.scaleX, i *= t.scaleY), P += t.left - n.x, i += t.top - n.y), this.move(Math.round(n.x), Math.round(n.y || 0), P, i);
}, u;
}(), y;
}), C(o, "Core/Series/Point.js", [o["Core/Renderer/HTML/AST.js"], o["Core/Animation/AnimationUtilities.js"], o["Core/DefaultOptions.js"], o["Core/FormatUtilities.js"], o["Core/Utilities.js"]], function(y, N, _, U, G) {
var V = N.animObject, F = _.defaultOptions, B = U.format, j = G.addEvent, w = G.defined, x = G.erase, f = G.extend, l = G.fireEvent, T = G.getNestedProperty, O = G.isArray, R = G.isFunction, k = G.isNumber, b = G.isObject, S = G.merge, v = G.objectEach, h = G.pick, c = G.syncTimeout, u = G.removeEvent, i = G.uniqueKey;
return N = function() {
function p() {
this.colorIndex = this.category = void 0, this.formatPrefix = "point", this.id = void 0, this.isNull = !1, this.percentage = this.options = this.name = void 0, this.selected = !1, this.total = this.series = void 0, this.visible = !0, this.x = void 0;
}
return p.prototype.animateBeforeDestroy = function() {
var a = this, t = { x: a.startXPos, opacity: 0 }, s = a.getGraphicalProps();
s.singular.forEach(function(n) {
a[n] = a[n].animate(n === "dataLabel" ? { x: a[n].startXPos, y: a[n].startYPos, opacity: 0 } : t);
}), s.plural.forEach(function(n) {
a[n].forEach(function(P) {
P.element && P.animate(f({ x: a.startXPos }, P.startYPos ? { x: P.startXPos, y: P.startYPos } : {}));
});
});
}, p.prototype.applyOptions = function(a, t) {
var s = this.series, n = s.options.pointValKey || s.pointValKey;
return a = p.prototype.optionsToObject.call(this, a), f(this, a), this.options = this.options ? f(this.options, a) : a, a.group && delete this.group, a.dataLabels && delete this.dataLabels, n && (this.y = p.prototype.getNestedProperty.call(
this,
n
)), this.formatPrefix = (this.isNull = h(this.isValid && !this.isValid(), this.x === null || !k(this.y))) ? "null" : "point", this.selected && (this.state = "select"), "name" in this && typeof t > "u" && s.xAxis && s.xAxis.hasNames && (this.x = s.xAxis.nameToX(this)), typeof this.x > "u" && s ? this.x = typeof t > "u" ? s.autoIncrement() : t : k(a.x) && s.options.relativeXValue && (this.x = s.autoIncrement(a.x)), this;
}, p.prototype.destroy = function() {
function a() {
(t.graphic || t.dataLabel || t.dataLabels) && (u(t), t.destroyElements());
for (I in t)
t[I] = null;
}
var t = this, s = t.series, n = s.chart;
s = s.options.dataSorting;
var P = n.hoverPoints, D = V(t.series.chart.renderer.globalAnimation), I;
t.legendItem && n.legend.destroyItem(t), P && (t.setState(), x(P, t), P.length || (n.hoverPoints = null)), t === n.hoverPoint && t.onMouseOut(), s && s.enabled ? (this.animateBeforeDestroy(), c(a, D.duration)) : a(), n.pointCount--;
}, p.prototype.destroyElements = function(a) {
var t = this;
a = t.getGraphicalProps(a), a.singular.forEach(function(s) {
t[s] = t[s].destroy();
}), a.plural.forEach(function(s) {
t[s].forEach(function(n) {
n.element && n.destroy();
}), delete t[s];
});
}, p.prototype.firePointEvent = function(a, t, s) {
var n = this, P = this.series.options;
(P.point.events[a] || n.options && n.options.events && n.options.events[a]) && n.importEvents(), a === "click" && P.allowPointSelect && (s = function(D) {
n.select && n.select(null, D.ctrlKey || D.metaKey || D.shiftKey);
}), l(n, a, t, s);
}, p.prototype.getClassName = function() {
return "highcharts-point" + (this.selected ? " highcharts-point-select" : "") + (this.negative ? " highcharts-negative" : "") + (this.isNull ? " highcharts-null-point" : "") + (typeof this.colorIndex < "u" ? " highcharts-color-" + this.colorIndex : "") + (this.options.className ? " " + this.options.className : "") + (this.zone && this.zone.className ? " " + this.zone.className.replace("highcharts-negative", "") : "");
}, p.prototype.getGraphicalProps = function(a) {
var t = this, s = [], n = { singular: [], plural: [] }, P;
for (a = a || { graphic: 1, dataLabel: 1 }, a.graphic && s.push("graphic", "upperGraphic", "shadowGroup"), a.dataLabel && s.push("dataLabel", "dataLabelUpper", "connector"), P = s.length; P--; ) {
var D = s[P];
t[D] && n.singular.push(D);
}
return ["dataLabel", "connector"].forEach(function(I) {
var W = I + "s";
a[I] && t[W] && n.plural.push(W);
}), n;
}, p.prototype.getLabelConfig = function() {
return { x: this.category, y: this.y, color: this.color, colorIndex: this.colorIndex, key: this.name || this.category, series: this.series, point: this, percentage: this.percentage, total: this.total || this.stackTotal };
}, p.prototype.getNestedProperty = function(a) {
if (a)
return a.indexOf("custom.") === 0 ? T(a, this.options) : this[a];
}, p.prototype.getZone = function() {
var a = this.series, t = a.zones;
a = a.zoneAxis || "y";
var s, n = 0;
for (s = t[n]; this[a] >= s.value; )
s = t[++n];
return this.nonZonedColor || (this.nonZonedColor = this.color), this.color = s && s.color && !this.options.color ? s.color : this.nonZonedColor, s;
}, p.prototype.hasNewShapeType = function() {
return (this.graphic && (this.graphic.symbolName || this.graphic.element.nodeName)) !== this.shapeType;
}, p.prototype.init = function(a, t, s) {
return this.series = a, this.applyOptions(t, s), this.id = w(this.id) ? this.id : i(), this.resolveColor(), a.chart.pointCount++, l(this, "afterInit"), this;
}, p.prototype.optionsToObject = function(a) {
var t = this.series, s = t.options.keys, n = s || t.pointArrayMap || ["y"], P = n.length, D = {}, I = 0, W = 0;
if (k(a) || a === null)
D[n[0]] = a;
else if (O(a))
for (!s && a.length > P && (t = typeof a[0], t === "string" ? D.name = a[0] : t === "number" && (D.x = a[0]), I++); W < P; )
s && typeof a[I] > "u" || (0 < n[W].indexOf(".") ? p.prototype.setNestedProperty(D, a[I], n[W]) : D[n[W]] = a[I]), I++, W++;
else
typeof a == "object" && (D = a, a.dataLabels && (t._hasPointLabels = !0), a.marker && (t._hasPointMarkers = !0));
return D;
}, p.prototype.resolveColor = function() {
var a = this.series, t = a.chart.styledMode, s = a.chart.options.chart.colorCount;
if (delete this.nonZonedColor, a.options.colorByPoint) {
if (!t) {
s = a.options.colors || a.chart.options.colors;
var n = s[a.colorCounter];
s = s.length;
}
t = a.colorCounter, a.colorCounter++, a.colorCounter === s && (a.colorCounter = 0);
} else
t || (n = a.color), t = a.colorIndex;
this.colorIndex = h(this.options.colorIndex, t), this.color = h(this.options.color, n);
}, p.prototype.setNestedProperty = function(a, t, s) {
return s.split(".").reduce(function(n, P, D, I) {
return n[P] = I.length - 1 === D ? t : b(n[P], !0) ? n[P] : {}, n[P];
}, a), a;
}, p.prototype.tooltipFormatter = function(a) {
var t = this.series, s = t.tooltipOptions, n = h(s.valueDecimals, ""), P = s.valuePrefix || "", D = s.valueSuffix || "";
return t.chart.styledMode && (a = t.chart.tooltip.styledModeFormat(a)), (t.pointArrayMap || ["y"]).forEach(function(I) {
I = "{point." + I, (P || D) && (a = a.replace(RegExp(I + "}", "g"), P + I + "}" + D)), a = a.replace(RegExp(I + "}", "g"), I + ":,." + n + "f}");
}), B(a, { point: this, series: this.series }, t.chart);
}, p.prototype.update = function(a, t, s, n) {
function P() {
D.applyOptions(a);
var m = W && D.hasDummyGraphic;
m = D.y === null ? !m : m, W && m && (D.graphic = W.destroy(), delete D.hasDummyGraphic), b(a, !0) && (W && W.element && a && a.marker && typeof a.marker.symbol < "u" && (D.graphic = W.destroy()), a && a.dataLabels && D.dataLabel && (D.dataLabel = D.dataLabel.destroy()), D.connector && (D.connector = D.connector.destroy())), g = D.index, I.updateParallelArrays(D, g), X.data[g] = b(X.data[g], !0) || b(a, !0) ? D.options : h(a, X.data[g]), I.isDirty = I.isDirtyData = !0, !I.fixedBox && I.hasCartesianSeries && (E.isDirtyBox = !0), X.legendType === "point" && (E.isDirtyLegend = !0), t && E.redraw(s);
}
var D = this, I = D.series, W = D.graphic, E = I.chart, X = I.options, g;
t = h(t, !0), n === !1 ? P() : D.firePointEvent("update", { options: a }, P);
}, p.prototype.remove = function(a, t) {
this.series.removePoint(this.series.data.indexOf(this), a, t);
}, p.prototype.select = function(a, t) {
var s = this, n = s.series, P = n.chart;
this.selectedStaging = a = h(a, !s.selected), s.firePointEvent(a ? "select" : "unselect", { accumulate: t }, function() {
s.selected = s.options.selected = a, n.options.data[n.data.indexOf(s)] = s.options, s.setState(a && "select"), t || P.getSelectedPoints().forEach(function(D) {
var I = D.series;
D.selected && D !== s && (D.selected = D.options.selected = !1, I.options.data[I.data.indexOf(D)] = D.options, D.setState(P.hoverPoints && I.options.inactiveOtherPoints ? "inactive" : ""), D.firePointEvent("unselect"));
});
}), delete this.selectedStaging;
}, p.prototype.onMouseOver = function(a) {
var t = this.series.chart, s = t.pointer;
a = a ? s.normalize(a) : s.getChartCoordinatesFromPoint(this, t.inverted), s.runPointActions(
a,
this
);
}, p.prototype.onMouseOut = function() {
var a = this.series.chart;
this.firePointEvent("mouseOut"), this.series.options.inactiveOtherPoints || (a.hoverPoints || []).forEach(function(t) {
t.setState();
}), a.hoverPoints = a.hoverPoint = null;
}, p.prototype.importEvents = function() {
if (!this.hasImportedEvents) {
var a = this, t = S(a.series.options.point, a.options).events;
a.events = t, v(t, function(s, n) {
R(s) && j(a, n, s);
}), this.hasImportedEvents = !0;
}
}, p.prototype.setState = function(a, t) {
var s = this.series, n = this.state, P = s.options.states[a || "normal"] || {}, D = F.plotOptions[s.type].marker && s.options.marker, I = D && D.enabled === !1, W = D && D.states && D.states[a || "normal"] || {}, E = W.enabled === !1, X = this.marker || {}, g = s.chart, m = D && s.markerAttribs, L = s.halo, z, $ = s.stateMarkerGraphic;
if (a = a || "", !(a === this.state && !t || this.selected && a !== "select" || P.enabled === !1 || a && (E || I && W.enabled === !1) || a && X.states && X.states[a] && X.states[a].enabled === !1)) {
if (this.state = a, m && (z = s.markerAttribs(this, a)), this.graphic && !this.hasDummyGraphic) {
if (n && this.graphic.removeClass("highcharts-point-" + n), a && this.graphic.addClass("highcharts-point-" + a), !g.styledMode) {
var Q = s.pointAttribs(this, a), A = h(g.options.chart.animation, P.animation);
s.options.inactiveOtherPoints && k(Q.opacity) && ((this.dataLabels || []).forEach(function(H) {
H && H.animate({ opacity: Q.opacity }, A);
}), this.connector && this.connector.animate({ opacity: Q.opacity }, A)), this.graphic.animate(Q, A);
}
z && this.graphic.animate(z, h(g.options.chart.animation, W.animation, D.animation)), $ && $.hide();
} else
a && W && (n = X.symbol || s.symbol, $ && $.currentSymbol !== n && ($ = $.destroy()), z && ($ ? $[t ? "animate" : "attr"]({ x: z.x, y: z.y }) : n && (s.stateMarkerGraphic = $ = g.renderer.symbol(n, z.x, z.y, z.width, z.height).add(s.markerGroup), $.currentSymbol = n)), !g.styledMode && $ && this.state !== "inactive" && $.attr(s.pointAttribs(this, a))), $ && ($[a && this.isInside ? "show" : "hide"](), $.element.point = this, $.addClass(this.getClassName(), !0));
P = P.halo, z = ($ = this.graphic || $) && $.visibility || "inherit", P && P.size && $ && z !== "hidden" && !this.isCluster ? (L || (s.halo = L = g.renderer.path().add($.parentGroup)), L.show()[t ? "animate" : "attr"]({ d: this.haloPath(P.size) }), L.attr({ class: "highcharts-halo highcharts-color-" + h(this.colorIndex, s.colorIndex) + (this.className ? " " + this.className : ""), visibility: z, zIndex: -1 }), L.point = this, g.styledMode || L.attr(f({ fill: this.color || s.color, "fill-opacity": P.opacity }, y.filterUserAttributes(P.attributes || {})))) : L && L.point && L.point.haloPath && L.animate({ d: L.point.haloPath(0) }, null, L.hide), l(this, "afterSetState", { state: a });
}
}, p.prototype.haloPath = function(a) {
return this.series.chart.renderer.symbols.circle(Math.floor(this.plotX) - a, this.plotY - a, 2 * a, 2 * a);
}, p;
}(), N;
}), C(o, "Core/Pointer.js", [o["Core/Color/Color.js"], o["Core/Globals.js"], o["Core/Tooltip.js"], o["Core/Utilities.js"]], function(y, N, _, U) {
var G = y.parse, V = N.charts, F = N.noop, B = U.addEvent, j = U.attr, w = U.css, x = U.defined, f = U.extend, l = U.find, T = U.fireEvent, O = U.isNumber, R = U.isObject, k = U.objectEach, b = U.offset, S = U.pick, v = U.splat;
return y = function() {
function h(c, u) {
this.lastValidTouch = {}, this.pinchDown = [], this.runChartClick = !1, this.eventsToUnbind = [], this.chart = c, this.hasDragged = !1, this.options = u, this.init(c, u);
}
return h.prototype.applyInactiveState = function(c) {
var u = [], i;
(c || []).forEach(function(p) {
i = p.series, u.push(i), i.linkedParent && u.push(i.linkedParent), i.linkedSeries && (u = u.concat(i.linkedSeries)), i.navigatorSeries && u.push(i.navigatorSeries);
}), this.chart.series.forEach(function(p) {
u.indexOf(p) === -1 ? p.setState("inactive", !0) : p.options.inactiveOtherPoints && p.setAllPointsToState("inactive");
});
}, h.prototype.destroy = function() {
var c = this;
this.eventsToUnbind.forEach(function(u) {
return u();
}), this.eventsToUnbind = [], N.chartCount || (h.unbindDocumentMouseUp && (h.unbindDocumentMouseUp = h.unbindDocumentMouseUp()), h.unbindDocumentTouchEnd && (h.unbindDocumentTouchEnd = h.unbindDocumentTouchEnd())), clearInterval(c.tooltipTimeout), k(c, function(u, i) {
c[i] = void 0;
});
}, h.prototype.drag = function(c) {
var u = this.chart, i = u.options.chart, p = this.zoomHor, a = this.zoomVert, t = u.plotLeft, s = u.plotTop, n = u.plotWidth, P = u.plotHeight, D = this.mouseDownX || 0, I = this.mouseDownY || 0, W = R(i.panning) ? i.panning && i.panning.enabled : i.panning, E = i.panKey && c[i.panKey + "Key"], X = c.chartX, g = c.chartY, m = this.selectionMarker;
if ((!m || !m.touch) && (X < t ? X = t : X > t + n && (X = t + n), g < s ? g = s : g > s + P && (g = s + P), this.hasDragged = Math.sqrt(Math.pow(D - X, 2) + Math.pow(I - g, 2)), 10 < this.hasDragged)) {
var L = u.isInsidePlot(D - t, I - s, { visiblePlotOnly: !0 });
!u.hasCartesianSeries && !u.mapView || !this.zoomX && !this.zoomY || !L || E || m || (this.selectionMarker = m = u.renderer.rect(t, s, p ? 1 : n, a ? 1 : P, 0).attr({ class: "highcharts-selection-marker", zIndex: 7 }).add(), u.styledMode || m.attr({ fill: i.selectionMarkerFill || G("#335cad").setOpacity(0.25).get() })), m && p && (p = X - D, m.attr({ width: Math.abs(p), x: (0 < p ? 0 : p) + D })), m && a && (p = g - I, m.attr({ height: Math.abs(p), y: (0 < p ? 0 : p) + I })), L && !m && W && u.pan(c, i.panning);
}
}, h.prototype.dragStart = function(c) {
var u = this.chart;
u.mouseIsDown = c.type, u.cancelClick = !1, u.mouseDownX = this.mouseDownX = c.chartX, u.mouseDownY = this.mouseDownY = c.chartY;
}, h.prototype.drop = function(c) {
var u = this, i = this.chart, p = this.hasPinched;
if (this.selectionMarker) {
var a = this.selectionMarker, t = a.attr ? a.attr("x") : a.x, s = a.attr ? a.attr("y") : a.y, n = a.attr ? a.attr("width") : a.width, P = a.attr ? a.attr("height") : a.height, D = { originalEvent: c, xAxis: [], yAxis: [], x: t, y: s, width: n, height: P }, I = !!i.mapView;
(this.hasDragged || p) && (i.axes.forEach(function(W) {
if (W.zoomEnabled && x(W.min) && (p || u[{ xAxis: "zoomX", yAxis: "zoomY" }[W.coll]]) && O(t) && O(s)) {
var E = W.horiz, X = c.type === "touchend" ? W.minPixelPadding : 0, g = W.toValue((E ? t : s) + X);
E = W.toValue((E ? t + n : s + P) - X), D[W.coll].push({ axis: W, min: Math.min(g, E), max: Math.max(g, E) }), I = !0;
}
}), I && T(i, "selection", D, function(W) {
i.zoom(f(
W,
p ? { animation: !1 } : null
));
})), O(i.index) && (this.selectionMarker = this.selectionMarker.destroy()), p && this.scaleGroups();
}
i && O(i.index) && (w(i.container, { cursor: i._cursor }), i.cancelClick = 10 < this.hasDragged, i.mouseIsDown = this.hasDragged = this.hasPinched = !1, this.pinchDown = []);
}, h.prototype.findNearestKDPoint = function(c, u, i) {
var p = this.chart, a = p.hoverPoint;
if (p = p.tooltip, a && p && p.isStickyOnContact())
return a;
var t;
return c.forEach(function(s) {
var n = !(s.noSharedTooltip && u) && 0 > s.options.findNearestPointBy.indexOf("y");
if (s = s.searchPoint(i, n), (n = R(s, !0) && s.series) && !(n = !R(t, !0))) {
n = t.distX - s.distX;
var P = t.dist - s.dist, D = (s.series.group && s.series.group.zIndex) - (t.series.group && t.series.group.zIndex);
n = 0 < (n !== 0 && u ? n : P !== 0 ? P : D !== 0 ? D : t.series.index > s.series.index ? -1 : 1);
}
n && (t = s);
}), t;
}, h.prototype.getChartCoordinatesFromPoint = function(c, u) {
var i = c.series, p = i.xAxis;
i = i.yAxis;
var a = c.shapeArgs;
if (p && i) {
var t = S(c.clientX, c.plotX), s = c.plotY || 0;
return c.isNode && a && O(a.x) && O(a.y) && (t = a.x, s = a.y), u ? { chartX: i.len + i.pos - s, chartY: p.len + p.pos - t } : { chartX: t + p.pos, chartY: s + i.pos };
}
if (a && a.x && a.y)
return { chartX: a.x, chartY: a.y };
}, h.prototype.getChartPosition = function() {
if (this.chartPosition)
return this.chartPosition;
var c = this.chart.container, u = b(c);
this.chartPosition = { left: u.left, top: u.top, scaleX: 1, scaleY: 1 };
var i = c.offsetWidth;
return c = c.offsetHeight, 2 < i && 2 < c && (this.chartPosition.scaleX = u.width / i, this.chartPosition.scaleY = u.height / c), this.chartPosition;
}, h.prototype.getCoordinates = function(c) {
var u = { xAxis: [], yAxis: [] };
return this.chart.axes.forEach(function(i) {
u[i.isXAxis ? "xAxis" : "yAxis"].push({ axis: i, value: i.toValue(c[i.horiz ? "chartX" : "chartY"]) });
}), u;
}, h.prototype.getHoverData = function(c, u, i, p, a, t) {
var s = [];
p = !(!p || !c);
var n = { chartX: t ? t.chartX : void 0, chartY: t ? t.chartY : void 0, shared: a };
T(this, "beforeGetHoverData", n);
var P = u && !u.stickyTracking ? [u] : i.filter(function(I) {
return n.filter ? n.filter(I) : I.visible && !(!a && I.directTouch) && S(I.options.enableMouseTracking, !0) && I.stickyTracking;
}), D = p || !t ? c : this.findNearestKDPoint(P, a, t);
return u = D && D.series, D && (a && !u.noSharedTooltip ? (P = i.filter(function(I) {
return n.filter ? n.filter(I) : I.visible && !(!a && I.directTouch) && S(I.options.enableMouseTracking, !0) && !I.noSharedTooltip;
}), P.forEach(function(I) {
var W = l(I.points, function(E) {
return E.x === D.x && !E.isNull;
});
R(W) && (I.chart.isBoosting && (W = I.getPoint(W)), s.push(W));
})) : s.push(D)), n = { hoverPoint: D }, T(this, "afterGetHoverData", n), { hoverPoint: n.hoverPoint, hoverSeries: u, hoverPoints: s };
}, h.prototype.getPointFromEvent = function(c) {
c = c.target;
for (var u; c && !u; )
u = c.point, c = c.parentNode;
return u;
}, h.prototype.onTrackerMouseOut = function(c) {
c = c.relatedTarget || c.toElement;
var u = this.chart.hoverSeries;
this.isDirectTouch = !1, !u || !c || u.stickyTracking || this.inClass(c, "highcharts-tooltip") || this.inClass(c, "highcharts-series-" + u.index) && this.inClass(c, "highcharts-tracker") || u.onMouseOut();
}, h.prototype.inClass = function(c, u) {
for (var i; c; ) {
if (i = j(c, "class")) {
if (i.indexOf(u) !== -1)
return !0;
if (i.indexOf("highcharts-container") !== -1)
return !1;
}
c = c.parentNode;
}
}, h.prototype.init = function(c, u) {
this.options = u, this.chart = c, this.runChartClick = !(!u.chart.events || !u.chart.events.click), this.pinchDown = [], this.lastValidTouch = {}, _ && (c.tooltip = new _(c, u.tooltip), this.followTouchMove = S(u.tooltip.followTouchMove, !0)), this.setDOMEvents();
}, h.prototype.normalize = function(c, u) {
var i = c.touches, p = i ? i.length ? i.item(0) : S(i.changedTouches, c.changedTouches)[0] : c;
return u || (u = this.getChartPosition()), i = p.pageX - u.left, p = p.pageY - u.top, i /= u.scaleX, p /= u.scaleY, f(c, { chartX: Math.round(i), chartY: Math.round(p) });
}, h.prototype.onContainerClick = function(c) {
var u = this.chart, i = u.hoverPoint;
c = this.normalize(c);
var p = u.plotLeft, a = u.plotTop;
u.cancelClick || (i && this.inClass(c.target, "highcharts-tracker") ? (T(i.series, "click", f(c, { point: i })), u.hoverPoint && i.firePointEvent("click", c)) : (f(c, this.getCoordinates(c)), u.isInsidePlot(c.chartX - p, c.chartY - a, { visiblePlotOnly: !0 }) && T(u, "click", c)));
}, h.prototype.onContainerMouseDown = function(c) {
var u = ((c.buttons || c.button) & 1) === 1;
c = this.normalize(c), N.isFirefox && c.button !== 0 && this.onContainerMouseMove(c), (typeof c.button > "u" || u) && (this.zoomOption(c), u && c.preventDefault && c.preventDefault(), this.dragStart(c));
}, h.prototype.onContainerMouseLeave = function(c) {
var u = V[S(h.hoverChartIndex, -1)], i = this.chart.tooltip;
i && i.shouldStickOnContact() && this.inClass(c.relatedTarget, "highcharts-tooltip-container") || (c = this.normalize(c), u && (c.relatedTarget || c.toElement) && (u.pointer.reset(), u.pointer.chartPosition = void 0), i && !i.isHidden && this.reset());
}, h.prototype.onContainerMouseEnter = function(c) {
delete this.chartPosition;
}, h.prototype.onContainerMouseMove = function(c) {
var u = this.chart;
c = this.normalize(c), this.setHoverChartIndex(), c.preventDefault || (c.returnValue = !1), (u.mouseIsDown === "mousedown" || this.touchSelect(c)) && this.drag(c), u.openMenu || !this.inClass(c.target, "highcharts-tracker") && !u.isInsidePlot(c.chartX - u.plotLeft, c.chartY - u.plotTop, { visiblePlotOnly: !0 }) || (this.inClass(c.target, "highcharts-no-tooltip") ? this.reset(!1, 0) : this.runPointActions(c));
}, h.prototype.onDocumentTouchEnd = function(c) {
var u = V[S(
h.hoverChartIndex,
-1
)];
u && u.pointer.drop(c);
}, h.prototype.onContainerTouchMove = function(c) {
this.touchSelect(c) ? this.onContainerMouseMove(c) : this.touch(c);
}, h.prototype.onContainerTouchStart = function(c) {
this.touchSelect(c) ? this.onContainerMouseDown(c) : (this.zoomOption(c), this.touch(c, !0));
}, h.prototype.onDocumentMouseMove = function(c) {
var u = this.chart, i = this.chartPosition;
c = this.normalize(c, i);
var p = u.tooltip;
!i || p && p.isStickyOnContact() || u.isInsidePlot(c.chartX - u.plotLeft, c.chartY - u.plotTop, { visiblePlotOnly: !0 }) || this.inClass(c.target, "highcharts-tracker") || this.reset();
}, h.prototype.onDocumentMouseUp = function(c) {
var u = V[S(h.hoverChartIndex, -1)];
u && u.pointer.drop(c);
}, h.prototype.pinch = function(c) {
var u = this, i = u.chart, p = u.pinchDown, a = c.touches || [], t = a.length, s = u.lastValidTouch, n = u.hasZoom, P = {}, D = t === 1 && (u.inClass(c.target, "highcharts-tracker") && i.runTrackerClick || u.runChartClick), I = {}, W = u.selectionMarker;
1 < t ? u.initiated = !0 : t === 1 && this.followTouchMove && (u.initiated = !1), n && u.initiated && !D && c.cancelable !== !1 && c.preventDefault(), [].map.call(a, function(E) {
return u.normalize(E);
}), c.type === "touchstart" ? ([].forEach.call(a, function(E, X) {
p[X] = { chartX: E.chartX, chartY: E.chartY };
}), s.x = [p[0].chartX, p[1] && p[1].chartX], s.y = [p[0].chartY, p[1] && p[1].chartY], i.axes.forEach(function(E) {
if (E.zoomEnabled) {
var X = i.bounds[E.horiz ? "h" : "v"], g = E.minPixelPadding, m = E.toPixels(Math.min(S(E.options.min, E.dataMin), E.dataMin)), L = E.toPixels(Math.max(S(E.options.max, E.dataMax), E.dataMax)), z = Math.max(m, L);
X.min = Math.min(E.pos, Math.min(
m,
L
) - g), X.max = Math.max(E.pos + E.len, z + g);
}
}), u.res = !0) : u.followTouchMove && t === 1 ? this.runPointActions(u.normalize(c)) : p.length && (T(i, "touchpan", { originalEvent: c }, function() {
W || (u.selectionMarker = W = f({ destroy: F, touch: !0 }, i.plotBox)), u.pinchTranslate(p, a, P, W, I, s), u.hasPinched = n, u.scaleGroups(P, I);
}), u.res && (u.res = !1, this.reset(!1, 0)));
}, h.prototype.pinchTranslate = function(c, u, i, p, a, t) {
this.zoomHor && this.pinchTranslateDirection(!0, c, u, i, p, a, t), this.zoomVert && this.pinchTranslateDirection(!1, c, u, i, p, a, t);
}, h.prototype.pinchTranslateDirection = function(c, u, i, p, a, t, s, n) {
var P = this.chart, D = c ? "x" : "y", I = c ? "X" : "Y", W = "chart" + I, E = c ? "width" : "height", X = P["plot" + (c ? "Left" : "Top")], g = P.inverted, m = P.bounds[c ? "h" : "v"], L = u.length === 1, z = u[0][W], $ = !L && u[1][W];
u = function() {
typeof Z == "number" && 20 < Math.abs(z - $) && (H = n || Math.abs(Y - Z) / Math.abs(z - $)), A = (X - Y) / H + z, Q = P["plot" + (c ? "Width" : "Height")] / H;
};
var Q, A, H = n || 1, Y = i[0][W], Z = !L && i[1][W];
if (u(), i = A, i < m.min) {
i = m.min;
var q = !0;
} else
i + Q > m.max && (i = m.max - Q, q = !0);
q ? (Y -= 0.8 * (Y - s[D][0]), typeof Z == "number" && (Z -= 0.8 * (Z - s[D][1])), u()) : s[D] = [Y, Z], g || (t[D] = A - X, t[E] = Q), t = g ? 1 / H : H, a[E] = Q, a[D] = i, p[g ? c ? "scaleY" : "scaleX" : "scale" + I] = H, p["translate" + I] = t * X + (Y - t * z);
}, h.prototype.reset = function(c, u) {
var i = this.chart, p = i.hoverSeries, a = i.hoverPoint, t = i.hoverPoints, s = i.tooltip, n = s && s.shared ? t : a;
c && n && v(n).forEach(function(P) {
P.series.isCartesian && typeof P.plotX > "u" && (c = !1);
}), c ? s && n && v(n).length && (s.refresh(n), s.shared && t ? t.forEach(function(P) {
P.setState(P.state, !0), P.series.isCartesian && (P.series.xAxis.crosshair && P.series.xAxis.drawCrosshair(
null,
P
), P.series.yAxis.crosshair && P.series.yAxis.drawCrosshair(null, P));
}) : a && (a.setState(a.state, !0), i.axes.forEach(function(P) {
P.crosshair && a.series[P.coll] === P && P.drawCrosshair(null, a);
}))) : (a && a.onMouseOut(), t && t.forEach(function(P) {
P.setState();
}), p && p.onMouseOut(), s && s.hide(u), this.unDocMouseMove && (this.unDocMouseMove = this.unDocMouseMove()), i.axes.forEach(function(P) {
P.hideCrosshair();
}), this.hoverX = i.hoverPoints = i.hoverPoint = null);
}, h.prototype.runPointActions = function(c, u) {
var i = this.chart, p = i.tooltip && i.tooltip.options.enabled ? i.tooltip : void 0, a = p ? p.shared : !1, t = u || i.hoverPoint, s = t && t.series || i.hoverSeries;
u = this.getHoverData(t, s, i.series, (!c || c.type !== "touchmove") && (!!u || s && s.directTouch && this.isDirectTouch), a, c), t = u.hoverPoint, s = u.hoverSeries;
var n = u.hoverPoints;
if (u = s && s.tooltipOptions.followPointer && !s.tooltipOptions.split, a = a && s && !s.noSharedTooltip, t && (t !== i.hoverPoint || p && p.isHidden)) {
if ((i.hoverPoints || []).forEach(function(P) {
n.indexOf(P) === -1 && P.setState();
}), i.hoverSeries !== s && s.onMouseOver(), this.applyInactiveState(n), (n || []).forEach(function(P) {
P.setState("hover");
}), i.hoverPoint && i.hoverPoint.firePointEvent("mouseOut"), !t.series)
return;
i.hoverPoints = n, i.hoverPoint = t, t.firePointEvent("mouseOver"), p && p.refresh(a ? n : t, c);
} else
u && p && !p.isHidden && (t = p.getAnchor([{}], c), i.isInsidePlot(t[0], t[1], { visiblePlotOnly: !0 }) && p.updatePosition({ plotX: t[0], plotY: t[1] }));
this.unDocMouseMove || (this.unDocMouseMove = B(i.container.ownerDocument, "mousemove", function(P) {
var D = V[h.hoverChartIndex];
D && D.pointer.onDocumentMouseMove(P);
}), this.eventsToUnbind.push(this.unDocMouseMove)), i.axes.forEach(function(P) {
var D = S((P.crosshair || {}).snap, !0), I;
D && ((I = i.hoverPoint) && I.series[P.coll] === P || (I = l(n, function(W) {
return W.series[P.coll] === P;
}))), I || !D ? P.drawCrosshair(c, I) : P.hideCrosshair();
});
}, h.prototype.scaleGroups = function(c, u) {
var i = this.chart;
i.series.forEach(function(p) {
var a = c || p.getPlotBox();
p.group && (p.xAxis && p.xAxis.zoomEnabled || i.mapView) && (p.group.attr(a), p.markerGroup && (p.markerGroup.attr(a), p.markerGroup.clip(u ? i.clipRect : null)), p.dataLabelsGroup && p.dataLabelsGroup.attr(a));
}), i.clipRect.attr(u || i.clipBox);
}, h.prototype.setDOMEvents = function() {
var c = this, u = this.chart.container, i = u.ownerDocument;
u.onmousedown = this.onContainerMouseDown.bind(this), u.onmousemove = this.onContainerMouseMove.bind(this), u.onclick = this.onContainerClick.bind(this), this.eventsToUnbind.push(B(u, "mouseenter", this.onContainerMouseEnter.bind(this))), this.eventsToUnbind.push(B(u, "mouseleave", this.onContainerMouseLeave.bind(this))), h.unbindDocumentMouseUp || (h.unbindDocumentMouseUp = B(i, "mouseup", this.onDocumentMouseUp.bind(this)));
for (var p = this.chart.renderTo.parentElement; p && p.tagName !== "BODY"; )
this.eventsToUnbind.push(B(p, "scroll", function() {
delete c.chartPosition;
})), p = p.parentElement;
N.hasTouch && (this.eventsToUnbind.push(B(u, "touchstart", this.onContainerTouchStart.bind(this), { passive: !1 })), this.eventsToUnbind.push(B(u, "touchmove", this.onContainerTouchMove.bind(this), { passive: !1 })), h.unbindDocumentTouchEnd || (h.unbindDocumentTouchEnd = B(i, "touchend", this.onDocumentTouchEnd.bind(this), { passive: !1 })));
}, h.prototype.setHoverChartIndex = function() {
var c = this.chart, u = N.charts[S(h.hoverChartIndex, -1)];
u && u !== c && u.pointer.onContainerMouseLeave({ relatedTarget: !0 }), u && u.mouseIsDown || (h.hoverChartIndex = c.index);
}, h.prototype.touch = function(c, u) {
var i = this.chart;
if (this.setHoverChartIndex(), c.touches.length === 1)
if (c = this.normalize(c), i.isInsidePlot(c.chartX - i.plotLeft, c.chartY - i.plotTop, { visiblePlotOnly: !0 }) && !i.openMenu) {
if (u && this.runPointActions(c), c.type === "touchmove") {
u = this.pinchDown;
var p = u[0] ? 4 <= Math.sqrt(Math.pow(u[0].chartX - c.chartX, 2) + Math.pow(u[0].chartY - c.chartY, 2)) : !1;
}
S(p, !0) && this.pinch(c);
} else
u && this.reset();
else
c.touches.length === 2 && this.pinch(c);
}, h.prototype.touchSelect = function(c) {
return !(!this.chart.options.chart.zoomBySingleTouch || !c.touches || c.touches.length !== 1);
}, h.prototype.zoomOption = function(c) {
var u = this.chart, i = u.options.chart;
u = u.inverted;
var p = i.zoomType || "";
/touch/.test(c.type) && (p = S(i.pinchType, p)), this.zoomX = c = /x/.test(p), this.zoomY = i = /y/.test(p), this.zoomHor = c && !u || i && u, this.zoomVert = i && !u || c && u, this.hasZoom = c || i;
}, h;
}(), y;
}), C(o, "Core/MSPointer.js", [o["Core/Globals.js"], o["Core/Pointer.js"], o["Core/Utilities.js"]], function(y, N, _) {
function U() {
var k = [];
return k.item = function(b) {
return this[b];
}, l(O, function(b) {
k.push({ pageX: b.pageX, pageY: b.pageY, target: b.target });
}), k;
}
function G(k, b, S, v) {
var h = F[N.hoverChartIndex || NaN];
k.pointerType !== "touch" && k.pointerType !== k.MSPOINTER_TYPE_TOUCH || !h || (h = h.pointer, v(k), h[b]({ type: S, target: k.currentTarget, preventDefault: j, touches: U() }));
}
var V = this && this.__extends || function() {
var k = function(b, S) {
return k = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(v, h) {
v.__proto__ = h;
} || function(v, h) {
for (var c in h)
h.hasOwnProperty(c) && (v[c] = h[c]);
}, k(b, S);
};
return function(b, S) {
function v() {
this.constructor = b;
}
k(b, S), b.prototype = S === null ? Object.create(S) : (v.prototype = S.prototype, new v());
};
}(), F = y.charts, B = y.doc, j = y.noop, w = y.win, x = _.addEvent, f = _.css, l = _.objectEach, T = _.removeEvent, O = {}, R = !!w.PointerEvent;
return function(k) {
function b() {
return k !== null && k.apply(this, arguments) || this;
}
return V(b, k), b.isRequired = function() {
return !(y.hasTouch || !w.PointerEvent && !w.MSPointerEvent);
}, b.prototype.batchMSEvents = function(S) {
S(this.chart.container, R ? "pointerdown" : "MSPointerDown", this.onContainerPointerDown), S(this.chart.container, R ? "pointermove" : "MSPointerMove", this.onContainerPointerMove), S(B, R ? "pointerup" : "MSPointerUp", this.onDocumentPointerUp);
}, b.prototype.destroy = function() {
this.batchMSEvents(T), k.prototype.destroy.call(this);
}, b.prototype.init = function(S, v) {
k.prototype.init.call(this, S, v), this.hasZoom && f(S.container, { "-ms-touch-action": "none", "touch-action": "none" });
}, b.prototype.onContainerPointerDown = function(S) {
G(S, "onContainerTouchStart", "touchstart", function(v) {
O[v.pointerId] = { pageX: v.pageX, pageY: v.pageY, target: v.currentTarget };
});
}, b.prototype.onContainerPointerMove = function(S) {
G(S, "onContainerTouchMove", "touchmove", function(v) {
O[v.pointerId] = {
pageX: v.pageX,
pageY: v.pageY
}, O[v.pointerId].target || (O[v.pointerId].target = v.currentTarget);
});
}, b.prototype.onDocumentPointerUp = function(S) {
G(S, "onDocumentTouchEnd", "touchend", function(v) {
delete O[v.pointerId];
});
}, b.prototype.setDOMEvents = function() {
k.prototype.setDOMEvents.call(this), (this.hasZoom || this.followTouchMove) && this.batchMSEvents(x);
}, b;
}(N);
}), C(o, "Core/Legend/Legend.js", [
o["Core/Animation/AnimationUtilities.js"],
o["Core/FormatUtilities.js"],
o["Core/Globals.js"],
o["Core/Series/Point.js"],
o["Core/Renderer/RendererUtilities.js"],
o["Core/Utilities.js"]
], function(y, N, _, U, G, V) {
var F = y.animObject, B = y.setAnimation, j = N.format;
y = _.isFirefox;
var w = _.marginNames;
_ = _.win;
var x = G.distribute, f = V.addEvent, l = V.createElement, T = V.css, O = V.defined, R = V.discardElement, k = V.find, b = V.fireEvent, S = V.isNumber, v = V.merge, h = V.pick, c = V.relativeLength, u = V.stableSort, i = V.syncTimeout;
return G = V.wrap, V = function() {
function p(a, t) {
this.allItems = [], this.contentGroup = this.box = void 0, this.display = !1, this.group = void 0, this.offsetWidth = this.maxLegendWidth = this.maxItemWidth = this.legendWidth = this.legendHeight = this.lastLineHeight = this.lastItemY = this.itemY = this.itemX = this.itemMarginTop = this.itemMarginBottom = this.itemHeight = this.initialItemY = 0, this.options = {}, this.padding = 0, this.pages = [], this.proximate = !1, this.scrollGroup = void 0, this.widthOption = this.totalItemWidth = this.titleHeight = this.symbolWidth = this.symbolHeight = 0, this.chart = a, this.init(a, t);
}
return p.prototype.init = function(a, t) {
this.chart = a, this.setOptions(t), t.enabled && (this.render(), f(this.chart, "endResize", function() {
this.legend.positionCheckboxes();
}), this.proximate ? this.unchartrender = f(this.chart, "render", function() {
this.legend.proximatePositions(), this.legend.positionItems();
}) : this.unchartrender && this.unchartrender());
}, p.prototype.setOptions = function(a) {
var t = h(a.padding, 8);
this.options = a, this.chart.styledMode || (this.itemStyle = a.itemStyle, this.itemHiddenStyle = v(this.itemStyle, a.itemHiddenStyle)), this.itemMarginTop = a.itemMarginTop || 0, this.itemMarginBottom = a.itemMarginBottom || 0, this.padding = t, this.initialItemY = t - 5, this.symbolWidth = h(
a.symbolWidth,
16
), this.pages = [], this.proximate = a.layout === "proximate" && !this.chart.inverted, this.baseline = void 0;
}, p.prototype.update = function(a, t) {
var s = this.chart;
this.setOptions(v(!0, this.options, a)), this.destroy(), s.isDirtyLegend = s.isDirtyBox = !0, h(t, !0) && s.redraw(), b(this, "afterUpdate");
}, p.prototype.colorizeItem = function(a, t) {
if (a.legendGroup[t ? "removeClass" : "addClass"]("highcharts-legend-item-hidden"), !this.chart.styledMode) {
var s = this.options, n = a.legendItem, P = a.legendLine, D = a.legendSymbol, I = this.itemHiddenStyle.color;
s = t ? s.itemStyle.color : I;
var W = t && a.color || I, E = a.options && a.options.marker, X = { fill: W };
n && n.css({ fill: s, color: s }), P && P.attr({ stroke: W }), D && (E && D.isMarker && (X = a.pointAttribs(), t || (X.stroke = X.fill = I)), D.attr(X));
}
b(this, "afterColorizeItem", { item: a, visible: t });
}, p.prototype.positionItems = function() {
this.allItems.forEach(this.positionItem, this), this.chart.isResizing || this.positionCheckboxes();
}, p.prototype.positionItem = function(a) {
var t = this, s = this.options, n = s.symbolPadding, P = !s.rtl, D = a._legendItemPos;
s = D[0], D = D[1];
var I = a.checkbox, W = a.legendGroup;
W && W.element && (n = { translateX: P ? s : this.legendWidth - s - 2 * n - 4, translateY: D }, P = function() {
b(t, "afterPositionItem", { item: a });
}, O(W.translateY) ? W.animate(n, void 0, P) : (W.attr(n), P())), I && (I.x = s, I.y = D);
}, p.prototype.destroyItem = function(a) {
var t = a.checkbox;
["legendItem", "legendLine", "legendSymbol", "legendGroup"].forEach(function(s) {
a[s] && (a[s] = a[s].destroy());
}), t && R(a.checkbox);
}, p.prototype.destroy = function() {
function a(t) {
this[t] && (this[t] = this[t].destroy());
}
this.getAllItems().forEach(function(t) {
[
"legendItem",
"legendGroup"
].forEach(a, t);
}), "clipRect up down pager nav box title group".split(" ").forEach(a, this), this.display = null;
}, p.prototype.positionCheckboxes = function() {
var a = this.group && this.group.alignAttr, t = this.clipHeight || this.legendHeight, s = this.titleHeight;
if (a) {
var n = a.translateY;
this.allItems.forEach(function(P) {
var D = P.checkbox;
if (D) {
var I = n + s + D.y + (this.scrollOffset || 0) + 3;
T(D, { left: a.translateX + P.checkboxOffset + D.x - 20 + "px", top: I + "px", display: this.proximate || I > n - 6 && I < n + t - 6 ? "" : "none" });
}
}, this);
}
}, p.prototype.renderTitle = function() {
var a = this.options, t = this.padding, s = a.title, n = 0;
s.text && (this.title || (this.title = this.chart.renderer.label(s.text, t - 3, t - 4, null, null, null, a.useHTML, null, "legend-title").attr({ zIndex: 1 }), this.chart.styledMode || this.title.css(s.style), this.title.add(this.group)), s.width || this.title.css({ width: this.maxLegendWidth + "px" }), a = this.title.getBBox(), n = a.height, this.offsetWidth = a.width, this.contentGroup.attr({ translateY: n })), this.titleHeight = n;
}, p.prototype.setText = function(a) {
var t = this.options;
a.legendItem.attr({ text: t.labelFormat ? j(t.labelFormat, a, this.chart) : t.labelFormatter.call(a) });
}, p.prototype.renderItem = function(a) {
var t = this.chart, s = t.renderer, n = this.options, P = this.symbolWidth, D = n.symbolPadding || 0, I = this.itemStyle, W = this.itemHiddenStyle, E = n.layout === "horizontal" ? h(n.itemDistance, 20) : 0, X = !n.rtl, g = !a.series, m = !g && a.series.drawLegendSymbol ? a.series : a, L = m.options, z = this.createCheckboxForItem && L && L.showCheckbox, $ = n.useHTML, Q = a.options.className, A = a.legendItem;
L = P + D + E + (z ? 20 : 0), A || (a.legendGroup = s.g("legend-item").addClass("highcharts-" + m.type + "-series highcharts-color-" + a.colorIndex + (Q ? " " + Q : "") + (g ? " highcharts-series-" + a.index : "")).attr({ zIndex: 1 }).add(this.scrollGroup), a.legendItem = A = s.text("", X ? P + D : -D, this.baseline || 0, $), t.styledMode || A.css(v(a.visible ? I : W)), A.attr({ align: X ? "left" : "right", zIndex: 2 }).add(a.legendGroup), this.baseline || (this.fontMetrics = s.fontMetrics(t.styledMode ? 12 : I.fontSize, A), this.baseline = this.fontMetrics.f + 3 + this.itemMarginTop, A.attr("y", this.baseline), this.symbolHeight = n.symbolHeight || this.fontMetrics.f, n.squareSymbol && (this.symbolWidth = h(n.symbolWidth, Math.max(this.symbolHeight, 16)), L = this.symbolWidth + D + E + (z ? 20 : 0), X && A.attr("x", this.symbolWidth + D))), m.drawLegendSymbol(this, a), this.setItemEvents && this.setItemEvents(a, A, $)), z && !a.checkbox && this.createCheckboxForItem && this.createCheckboxForItem(a), this.colorizeItem(a, a.visible), !t.styledMode && I.width || A.css({ width: (n.itemWidth || this.widthOption || t.spacingBox.width) - L + "px" }), this.setText(a), t = A.getBBox(), s = this.fontMetrics && this.fontMetrics.h || 0, a.itemWidth = a.checkboxOffset = n.itemWidth || a.legendItemWidth || t.width + L, this.maxItemWidth = Math.max(this.maxItemWidth, a.itemWidth), this.totalItemWidth += a.itemWidth, this.itemHeight = a.itemHeight = Math.round(a.legendItemHeight || (t.height > 1.5 * s ? t.height : s));
}, p.prototype.layoutItem = function(a) {
var t = this.options, s = this.padding, n = t.layout === "horizontal", P = a.itemHeight, D = this.itemMarginBottom, I = this.itemMarginTop, W = n ? h(t.itemDistance, 20) : 0, E = this.maxLegendWidth;
t = t.alignColumns && this.totalItemWidth > E ? this.maxItemWidth : a.itemWidth, n && this.itemX - s + t > E && (this.itemX = s, this.lastLineHeight && (this.itemY += I + this.lastLineHeight + D), this.lastLineHeight = 0), this.lastItemY = I + this.itemY + D, this.lastLineHeight = Math.max(P, this.lastLineHeight), a._legendItemPos = [this.itemX, this.itemY], n ? this.itemX += t : (this.itemY += I + P + D, this.lastLineHeight = P), this.offsetWidth = this.widthOption || Math.max((n ? this.itemX - s - (a.checkbox ? 0 : W) : t) + s, this.offsetWidth);
}, p.prototype.getAllItems = function() {
var a = [];
return this.chart.series.forEach(function(t) {
var s = t && t.options;
t && h(s.showInLegend, O(s.linkedTo) ? !1 : void 0, !0) && (a = a.concat(t.legendItems || (s.legendType === "point" ? t.data : t)));
}), b(this, "afterGetAllItems", { allItems: a }), a;
}, p.prototype.getAlignment = function() {
var a = this.options;
return this.proximate ? a.align.charAt(0) + "tv" : a.floating ? "" : a.align.charAt(0) + a.verticalAlign.charAt(0) + a.layout.charAt(0);
}, p.prototype.adjustMargins = function(a, t) {
var s = this.chart, n = this.options, P = this.getAlignment();
P && [/(lth|ct|rth)/, /(rtv|rm|rbv)/, /(rbh|cb|lbh)/, /(lbv|lm|ltv)/].forEach(function(D, I) {
D.test(P) && !O(a[I]) && (s[w[I]] = Math.max(s[w[I]], s.legend[(I + 1) % 2 ? "legendHeight" : "legendWidth"] + [1, -1, -1, 1][I] * n[I % 2 ? "x" : "y"] + h(n.margin, 12) + t[I] + (s.titleOffset[I] || 0)));
});
}, p.prototype.proximatePositions = function() {
var a = this.chart, t = [], s = this.options.align === "left";
this.allItems.forEach(function(n) {
var P, D = s;
if (n.yAxis) {
n.xAxis.options.reversed && (D = !D), n.points && (P = k(D ? n.points : n.points.slice(0).reverse(), function(W) {
return S(W.plotY);
})), D = this.itemMarginTop + n.legendItem.getBBox().height + this.itemMarginBottom;
var I = n.yAxis.top - a.plotTop;
n.visible ? (P = P ? P.plotY : n.yAxis.height, P += I - 0.3 * D) : P = I + n.yAxis.height, t.push({ target: P, size: D, item: n });
}
}, this), x(t, a.plotHeight).forEach(function(n) {
n.item._legendItemPos && (n.item._legendItemPos[1] = a.plotTop - a.spacing[0] + n.pos);
});
}, p.prototype.render = function() {
var a = this.chart, t = a.renderer, s = this.options, n = this.padding, P = this.getAllItems(), D = this.group, I = this.box;
this.itemX = n, this.itemY = this.initialItemY, this.lastItemY = this.offsetWidth = 0, this.widthOption = c(s.width, a.spacingBox.width - n);
var W = a.spacingBox.width - 2 * n - s.x;
-1 < ["rm", "lm"].indexOf(this.getAlignment().substring(0, 2)) && (W /= 2), this.maxLegendWidth = this.widthOption || W, D || (this.group = D = t.g("legend").addClass(s.className || "").attr({ zIndex: 7 }).add(), this.contentGroup = t.g().attr({ zIndex: 1 }).add(D), this.scrollGroup = t.g().add(this.contentGroup)), this.renderTitle(), u(P, function(X, g) {
return (X.options && X.options.legendIndex || 0) - (g.options && g.options.legendIndex || 0);
}), s.reversed && P.reverse(), this.allItems = P, this.display = W = !!P.length, this.itemHeight = this.totalItemWidth = this.maxItemWidth = this.lastLineHeight = 0, P.forEach(this.renderItem, this), P.forEach(this.layoutItem, this), P = (this.widthOption || this.offsetWidth) + n;
var E = this.lastItemY + this.lastLineHeight + this.titleHeight;
E = this.handleOverflow(E), E += n, I || (this.box = I = t.rect().addClass("highcharts-legend-box").attr({ r: s.borderRadius }).add(D), I.isNew = !0), a.styledMode || I.attr({ stroke: s.borderColor, "stroke-width": s.borderWidth || 0, fill: s.backgroundColor || "none" }).shadow(s.shadow), 0 < P && 0 < E && (I[I.isNew ? "attr" : "animate"](I.crisp.call({}, { x: 0, y: 0, width: P, height: E }, I.strokeWidth())), I.isNew = !1), I[W ? "show" : "hide"](), a.styledMode && D.getStyle("display") === "none" && (P = E = 0), this.legendWidth = P, this.legendHeight = E, W && this.align(), this.proximate || this.positionItems(), b(this, "afterRender");
}, p.prototype.align = function(a) {
a === void 0 && (a = this.chart.spacingBox);
var t = this.chart, s = this.options, n = a.y;
/(lth|ct|rth)/.test(this.getAlignment()) && 0 < t.titleOffset[0] ? n += t.titleOffset[0] : /(lbh|cb|rbh)/.test(this.getAlignment()) && 0 < t.titleOffset[2] && (n -= t.titleOffset[2]), n !== a.y && (a = v(a, { y: n })), this.group.align(v(s, { width: this.legendWidth, height: this.legendHeight, verticalAlign: this.proximate ? "top" : s.verticalAlign }), !0, a);
}, p.prototype.handleOverflow = function(a) {
var t = this, s = this.chart, n = s.renderer, P = this.options, D = P.y, I = P.verticalAlign === "top", W = this.padding, E = P.maxHeight, X = P.navigation, g = h(X.animation, !0), m = X.arrowSize || 12, L = this.pages, z = this.allItems, $ = function(q) {
typeof q == "number" ? Z.attr({ height: q }) : Z && (t.clipRect = Z.destroy(), t.contentGroup.clip()), t.contentGroup.div && (t.contentGroup.div.style.clip = q ? "rect(" + W + "px,9999px," + (W + q) + "px,0)" : "auto");
}, Q = function(q) {
return t[q] = n.circle(0, 0, 1.3 * m).translate(m / 2, m / 2).add(Y), s.styledMode || t[q].attr("fill", "rgba(0,0,0,0.0001)"), t[q];
}, A, H;
D = s.spacingBox.height + (I ? -D : D) - W;
var Y = this.nav, Z = this.clipRect;
return P.layout !== "horizontal" || P.verticalAlign === "middle" || P.floating || (D /= 2), E && (D = Math.min(D, E)), L.length = 0, a && 0 < D && a > D && X.enabled !== !1 ? (this.clipHeight = A = Math.max(D - 20 - this.titleHeight - W, 0), this.currentPage = h(this.currentPage, 1), this.fullHeight = a, z.forEach(function(q, it) {
var et = q._legendItemPos[1], nt = Math.round(q.legendItem.getBBox().height), rt = L.length;
(!rt || et - L[rt - 1] > A && (H || et) !== L[rt - 1]) && (L.push(H || et), rt++), q.pageIx = rt - 1, H && (z[it - 1].pageIx = rt - 1), it === z.length - 1 && et + nt - L[rt - 1] > A && nt <= A && (L.push(et), q.pageIx = rt), et !== H && (H = et);
}), Z || (Z = t.clipRect = n.clipRect(0, W, 9999, 0), t.contentGroup.clip(Z)), $(A), Y || (this.nav = Y = n.g().attr({ zIndex: 1 }).add(this.group), this.up = n.symbol("triangle", 0, 0, m, m).add(Y), Q("upTracker").on(
"click",
function() {
t.scroll(-1, g);
}
), this.pager = n.text("", 15, 10).addClass("highcharts-legend-navigation"), s.styledMode || this.pager.css(X.style), this.pager.add(Y), this.down = n.symbol("triangle-down", 0, 0, m, m).add(Y), Q("downTracker").on("click", function() {
t.scroll(1, g);
})), t.scroll(0), a = D) : Y && ($(), this.nav = Y.destroy(), this.scrollGroup.attr({ translateY: 1 }), this.clipHeight = 0), a;
}, p.prototype.scroll = function(a, t) {
var s = this, n = this.chart, P = this.pages, D = P.length, I = this.clipHeight, W = this.options.navigation, E = this.pager, X = this.padding, g = this.currentPage + a;
g > D && (g = D), 0 < g && (typeof t < "u" && B(t, n), this.nav.attr({ translateX: X, translateY: I + this.padding + 7 + this.titleHeight, visibility: "visible" }), [this.up, this.upTracker].forEach(function(m) {
m.attr({ class: g === 1 ? "highcharts-legend-nav-inactive" : "highcharts-legend-nav-active" });
}), E.attr({ text: g + "/" + D }), [this.down, this.downTracker].forEach(
function(m) {
m.attr({ x: 18 + this.pager.getBBox().width, class: g === D ? "highcharts-legend-nav-inactive" : "highcharts-legend-nav-active" });
},
this
), n.styledMode || (this.up.attr({ fill: g === 1 ? W.inactiveColor : W.activeColor }), this.upTracker.css({ cursor: g === 1 ? "default" : "pointer" }), this.down.attr({ fill: g === D ? W.inactiveColor : W.activeColor }), this.downTracker.css({ cursor: g === D ? "default" : "pointer" })), this.scrollOffset = -P[g - 1] + this.initialItemY, this.scrollGroup.animate({ translateY: this.scrollOffset }), this.currentPage = g, this.positionCheckboxes(), a = F(h(t, n.renderer.globalAnimation, !0)), i(function() {
b(s, "afterScroll", { currentPage: g });
}, a.duration));
}, p.prototype.setItemEvents = function(a, t, s) {
var n = this, P = n.chart.renderer.boxWrapper, D = a instanceof U, I = "highcharts-legend-" + (D ? "point" : "series") + "-active", W = n.chart.styledMode, E = function(X) {
n.allItems.forEach(function(g) {
a !== g && [g].concat(g.linkedSeries || []).forEach(function(m) {
m.setState(X, !D);
});
});
};
(s ? [t, a.legendSymbol] : [a.legendGroup]).forEach(function(X) {
X && X.on("mouseover", function() {
a.visible && E("inactive"), a.setState("hover"), a.visible && P.addClass(I), W || t.css(n.options.itemHoverStyle);
}).on("mouseout", function() {
n.chart.styledMode || t.css(v(a.visible ? n.itemStyle : n.itemHiddenStyle)), E(""), P.removeClass(I), a.setState();
}).on("click", function(g) {
var m = function() {
a.setVisible && a.setVisible(), E(a.visible ? "inactive" : "");
};
P.removeClass(I), g = { browserEvent: g }, a.firePointEvent ? a.firePointEvent("legendItemClick", g, m) : b(a, "legendItemClick", g, m);
});
});
}, p.prototype.createCheckboxForItem = function(a) {
a.checkbox = l(
"input",
{ type: "checkbox", className: "highcharts-legend-checkbox", checked: a.selected, defaultChecked: a.selected },
this.options.itemCheckboxStyle,
this.chart.container
), f(a.checkbox, "click", function(t) {
b(a.series || a, "checkboxClick", { checked: t.target.checked, item: a }, function() {
a.select();
});
});
}, p;
}(), (/Trident\/7\.0/.test(_.navigator && _.navigator.userAgent) || y) && G(V.prototype, "positionItem", function(p, a) {
var t = this, s = function() {
a._legendItemPos && p.call(t, a);
};
s(), t.bubbleLegend || setTimeout(s);
}), V;
}), C(
o,
"Core/Series/SeriesRegistry.js",
[o["Core/Globals.js"], o["Core/DefaultOptions.js"], o["Core/Series/Point.js"], o["Core/Utilities.js"]],
function(y, N, _, U) {
var G = N.defaultOptions, V = U.error, F = U.extendClass, B = U.merge, j;
return function(w) {
function x(f, l) {
var T = G.plotOptions || {}, O = l.defaultOptions;
l.prototype.pointClass || (l.prototype.pointClass = _), l.prototype.type = f, O && (T[f] = O), w.seriesTypes[f] = l;
}
w.seriesTypes = y.seriesTypes, w.getSeries = function(f, l) {
l === void 0 && (l = {});
var T = f.options.chart;
T = l.type || T.type || T.defaultSeriesType || "";
var O = w.seriesTypes[T];
return w || V(17, !0, f, { missingModuleFor: T }), T = new O(), typeof T.init == "function" && T.init(f, l), T;
}, w.registerSeriesType = x, w.seriesType = function(f, l, T, O, R) {
var k = G.plotOptions || {};
return l = l || "", k[f] = B(k[l], T), x(f, F(w.seriesTypes[l] || function() {
}, O)), w.seriesTypes[f].prototype.type = f, R && (w.seriesTypes[f].prototype.pointClass = F(_, R)), w.seriesTypes[f];
};
}(j || (j = {})), j;
}
), C(o, "Core/Chart/Chart.js", [
o["Core/Animation/AnimationUtilities.js"],
o["Core/Axis/Axis.js"],
o["Core/FormatUtilities.js"],
o["Core/Foundation.js"],
o["Core/Globals.js"],
o["Core/Legend/Legend.js"],
o["Core/MSPointer.js"],
o["Core/DefaultOptions.js"],
o["Core/Pointer.js"],
o["Core/Renderer/RendererRegistry.js"],
o["Core/Series/SeriesRegistry.js"],
o["Core/Renderer/SVG/SVGRenderer.js"],
o["Core/Time.js"],
o["Core/Utilities.js"],
o["Core/Renderer/HTML/AST.js"]
], function(y, N, _, U, G, V, F, B, j, w, x, f, l, T, O) {
var R = y.animate, k = y.animObject, b = y.setAnimation, S = _.numberFormat, v = U.registerEventOptions, h = G.charts, c = G.doc, u = G.marginNames, i = G.svg, p = G.win, a = B.defaultOptions, t = B.defaultTime, s = x.seriesTypes, n = T.addEvent, P = T.attr, D = T.cleanRecursively, I = T.createElement, W = T.css, E = T.defined, X = T.discardElement, g = T.erase, m = T.error, L = T.extend, z = T.find, $ = T.fireEvent, Q = T.getStyle, A = T.isArray, H = T.isNumber, Y = T.isObject, Z = T.isString, q = T.merge, it = T.objectEach, et = T.pick, nt = T.pInt, rt = T.relativeLength, ct = T.removeEvent, gt = T.splat, dt = T.syncTimeout, ht = T.uniqueKey;
return y = function() {
function at(J, tt, ot) {
this.series = this.renderTo = this.renderer = this.pointer = this.pointCount = this.plotWidth = this.plotTop = this.plotLeft = this.plotHeight = this.plotBox = this.options = this.numberFormatter = this.margin = this.legend = this.labelCollectors = this.isResizing = this.index = this.eventOptions = this.container = this.colorCounter = this.clipBox = this.chartWidth = this.chartHeight = this.bounds = this.axisOffset = this.axes = void 0, this.sharedClips = {}, this.yAxis = this.xAxis = this.userOptions = this.titleOffset = this.time = this.symbolCounter = this.spacingBox = this.spacing = void 0, this.getArgs(J, tt, ot);
}
return at.chart = function(J, tt, ot) {
return new at(J, tt, ot);
}, at.prototype.getArgs = function(J, tt, ot) {
Z(J) || J.nodeName ? (this.renderTo = J, this.init(tt, ot)) : this.init(J, tt);
}, at.prototype.init = function(J, tt) {
var ot = J.plotOptions || {};
$(this, "init", { args: arguments }, function() {
var lt = q(a, J), pt = lt.chart;
it(lt.plotOptions, function(yt, vt) {
Y(yt) && (yt.tooltip = ot[vt] && q(ot[vt].tooltip) || void 0);
}), lt.tooltip.userOptions = J.chart && J.chart.forExport && J.tooltip.userOptions || J.tooltip, this.userOptions = J, this.margin = [], this.spacing = [], this.bounds = { h: {}, v: {} }, this.labelCollectors = [], this.callback = tt, this.isResizing = 0, this.options = lt, this.axes = [], this.series = [], this.time = J.time && Object.keys(J.time).length ? new l(J.time) : G.time, this.numberFormatter = pt.numberFormatter || S, this.styledMode = pt.styledMode, this.hasCartesianSeries = pt.showAxes, this.index = h.length, h.push(this), G.chartCount++, v(this, pt), this.xAxis = [], this.yAxis = [], this.pointCount = this.colorCounter = this.symbolCounter = 0, $(this, "afterInit"), this.firstRender();
});
}, at.prototype.initSeries = function(J) {
var tt = this.options.chart;
tt = J.type || tt.type || tt.defaultSeriesType;
var ot = s[tt];
return ot || m(17, !0, this, { missingModuleFor: tt }), tt = new ot(), typeof tt.init == "function" && tt.init(this, J), tt;
}, at.prototype.setSeriesData = function() {
this.getSeriesOrderByLinks().forEach(function(J) {
J.points || J.data || !J.enabledDataSorting || J.setData(J.options.data, !1);
});
}, at.prototype.getSeriesOrderByLinks = function() {
return this.series.concat().sort(function(J, tt) {
return J.linkedSeries.length || tt.linkedSeries.length ? tt.linkedSeries.length - J.linkedSeries.length : 0;
});
}, at.prototype.orderSeries = function(J) {
var tt = this.series;
J = J || 0;
for (var ot = tt.length; J < ot; ++J)
tt[J] && (tt[J].index = J, tt[J].name = tt[J].getName());
}, at.prototype.isInsidePlot = function(J, tt, ot) {
ot === void 0 && (ot = {});
var lt = this.inverted, pt = this.plotBox, yt = this.plotLeft, vt = this.plotTop, Ct = this.scrollablePlotBox, Pt = 0, At = 0;
ot.visiblePlotOnly && this.scrollingContainer && (At = this.scrollingContainer, Pt = At.scrollLeft, At = At.scrollTop);
var St = ot.series;
if (pt = ot.visiblePlotOnly && Ct || pt, Ct = ot.inverted ? tt : J, tt = ot.inverted ? J : tt, J = { x: Ct, y: tt, isInsidePlot: !0 }, !ot.ignoreX) {
var Dt = St && (lt ? St.yAxis : St.xAxis) || { pos: yt, len: 1 / 0 };
Ct = ot.paneCoordinates ? Dt.pos + Ct : yt + Ct, Ct >= Math.max(Pt + yt, Dt.pos) && Ct <= Math.min(Pt + yt + pt.width, Dt.pos + Dt.len) || (J.isInsidePlot = !1);
}
return !ot.ignoreY && J.isInsidePlot && (lt = St && (lt ? St.xAxis : St.yAxis) || { pos: vt, len: 1 / 0 }, ot = ot.paneCoordinates ? lt.pos + tt : vt + tt, ot >= Math.max(At + vt, lt.pos) && ot <= Math.min(At + vt + pt.height, lt.pos + lt.len) || (J.isInsidePlot = !1)), $(this, "afterIsInsidePlot", J), J.isInsidePlot;
}, at.prototype.redraw = function(J) {
$(this, "beforeRedraw");
var tt = this.hasCartesianSeries ? this.axes : this.colorAxis || [], ot = this.series, lt = this.pointer, pt = this.legend, yt = this.userOptions.legend, vt = this.renderer, Ct = vt.isHidden(), Pt = [], At = this.isDirtyBox, St = this.isDirtyLegend;
for (this.setResponsive && this.setResponsive(!1), b(this.hasRendered ? J : !1, this), Ct && this.temporaryDisplay(), this.layOutTitles(), J = ot.length; J--; ) {
var Dt = ot[J];
if (Dt.options.stacking || Dt.options.centerInCategory) {
var _t = !0;
if (Dt.isDirty) {
var Nt = !0;
break;
}
}
}
if (Nt)
for (J = ot.length; J--; )
Dt = ot[J], Dt.options.stacking && (Dt.isDirty = !0);
ot.forEach(function(Ot) {
Ot.isDirty && (Ot.options.legendType === "point" ? (typeof Ot.updateTotals == "function" && Ot.updateTotals(), St = !0) : yt && (yt.labelFormatter || yt.labelFormat) && (St = !0)), Ot.isDirtyData && $(Ot, "updatedData");
}), St && pt && pt.options.enabled && (pt.render(), this.isDirtyLegend = !1), _t && this.getStacks(), tt.forEach(function(Ot) {
Ot.updateNames(), Ot.setScale();
}), this.getMargins(), tt.forEach(function(Ot) {
Ot.isDirty && (At = !0);
}), tt.forEach(function(Ot) {
var Kt = Ot.min + "," + Ot.max;
Ot.extKey !== Kt && (Ot.extKey = Kt, Pt.push(function() {
$(Ot, "afterSetExtremes", L(Ot.eventArgs, Ot.getExtremes())), delete Ot.eventArgs;
})), (At || _t) && Ot.redraw();
}), At && this.drawChartBox(), $(this, "predraw"), ot.forEach(function(Ot) {
(At || Ot.isDirty) && Ot.visible && Ot.redraw(), Ot.isDirtyData = !1;
}), lt && lt.reset(!0), vt.draw(), $(this, "redraw"), $(this, "render"), Ct && this.temporaryDisplay(!0), Pt.forEach(function(Ot) {
Ot.call();
});
}, at.prototype.get = function(J) {
function tt(yt) {
return yt.id === J || yt.options && yt.options.id === J;
}
for (var ot = this.series, lt = z(this.axes, tt) || z(this.series, tt), pt = 0; !lt && pt < ot.length; pt++)
lt = z(ot[pt].points || [], tt);
return lt;
}, at.prototype.getAxes = function() {
var J = this, tt = this.options, ot = tt.xAxis = gt(tt.xAxis || {});
tt = tt.yAxis = gt(tt.yAxis || {}), $(this, "getAxes"), ot.forEach(function(lt, pt) {
lt.index = pt, lt.isX = !0;
}), tt.forEach(function(lt, pt) {
lt.index = pt;
}), ot.concat(tt).forEach(function(lt) {
new N(J, lt);
}), $(this, "afterGetAxes");
}, at.prototype.getSelectedPoints = function() {
return this.series.reduce(function(J, tt) {
return tt.getPointsCollection().forEach(function(ot) {
et(ot.selectedStaging, ot.selected) && J.push(ot);
}), J;
}, []);
}, at.prototype.getSelectedSeries = function() {
return this.series.filter(function(J) {
return J.selected;
});
}, at.prototype.setTitle = function(J, tt, ot) {
this.applyDescription("title", J), this.applyDescription("subtitle", tt), this.applyDescription(
"caption",
void 0
), this.layOutTitles(ot);
}, at.prototype.applyDescription = function(J, tt) {
var ot = this, lt = J === "title" ? { color: "#333333", fontSize: this.options.isStock ? "16px" : "18px" } : { color: "#666666" };
lt = this.options[J] = q(!this.styledMode && { style: lt }, this.options[J], tt);
var pt = this[J];
pt && tt && (this[J] = pt = pt.destroy()), lt && !pt && (pt = this.renderer.text(lt.text, 0, 0, lt.useHTML).attr({ align: lt.align, class: "highcharts-" + J, zIndex: lt.zIndex || 4 }).add(), pt.update = function(yt) {
ot[{ title: "setTitle", subtitle: "setSubtitle", caption: "setCaption" }[J]](yt);
}, this.styledMode || pt.css(lt.style), this[J] = pt);
}, at.prototype.layOutTitles = function(J) {
var tt = [0, 0, 0], ot = this.renderer, lt = this.spacingBox;
["title", "subtitle", "caption"].forEach(function(yt) {
var vt = this[yt], Ct = this.options[yt], Pt = Ct.verticalAlign || "top";
yt = yt === "title" ? Pt === "top" ? -3 : 0 : Pt === "top" ? tt[0] + 2 : 0;
var At;
if (vt) {
this.styledMode || (At = Ct.style && Ct.style.fontSize), At = ot.fontMetrics(At, vt).b, vt.css({ width: (Ct.width || lt.width + (Ct.widthAdjust || 0)) + "px" });
var St = Math.round(vt.getBBox(Ct.useHTML).height);
vt.align(L({ y: Pt === "bottom" ? At : yt + At, height: St }, Ct), !1, "spacingBox"), Ct.floating || (Pt === "top" ? tt[0] = Math.ceil(tt[0] + St) : Pt === "bottom" && (tt[2] = Math.ceil(tt[2] + St)));
}
}, this), tt[0] && (this.options.title.verticalAlign || "top") === "top" && (tt[0] += this.options.title.margin), tt[2] && this.options.caption.verticalAlign === "bottom" && (tt[2] += this.options.caption.margin);
var pt = !this.titleOffset || this.titleOffset.join(",") !== tt.join(",");
this.titleOffset = tt, $(this, "afterLayOutTitles"), !this.isDirtyBox && pt && (this.isDirtyBox = this.isDirtyLegend = pt, this.hasRendered && et(J, !0) && this.isDirtyBox && this.redraw());
}, at.prototype.getChartSize = function() {
var J = this.options.chart, tt = J.width;
J = J.height;
var ot = this.renderTo;
E(tt) || (this.containerWidth = Q(ot, "width")), E(J) || (this.containerHeight = Q(ot, "height")), this.chartWidth = Math.max(0, tt || this.containerWidth || 600), this.chartHeight = Math.max(0, rt(J, this.chartWidth) || (1 < this.containerHeight ? this.containerHeight : 400));
}, at.prototype.temporaryDisplay = function(J) {
var tt = this.renderTo;
if (J)
for (; tt && tt.style; )
tt.hcOrigStyle && (W(tt, tt.hcOrigStyle), delete tt.hcOrigStyle), tt.hcOrigDetached && (c.body.removeChild(tt), tt.hcOrigDetached = !1), tt = tt.parentNode;
else
for (; tt && tt.style && (c.body.contains(tt) || tt.parentNode || (tt.hcOrigDetached = !0, c.body.appendChild(tt)), (Q(tt, "display", !1) === "none" || tt.hcOricDetached) && (tt.hcOrigStyle = { display: tt.style.display, height: tt.style.height, overflow: tt.style.overflow }, J = { display: "block", overflow: "hidden" }, tt !== this.renderTo && (J.height = 0), W(tt, J), tt.offsetWidth || tt.style.setProperty("display", "block", "important")), tt = tt.parentNode, tt !== c.body); )
;
}, at.prototype.setClassName = function(J) {
this.container.className = "highcharts-container " + (J || "");
}, at.prototype.getContainer = function() {
var J = this.options, tt = J.chart, ot = ht(), lt, pt = this.renderTo;
pt || (this.renderTo = pt = tt.renderTo), Z(pt) && (this.renderTo = pt = c.getElementById(pt)), pt || m(13, !0, this);
var yt = nt(P(pt, "data-highcharts-chart"));
H(yt) && h[yt] && h[yt].hasRendered && h[yt].destroy(), P(pt, "data-highcharts-chart", this.index), pt.innerHTML = O.emptyHTML, tt.skipClone || pt.offsetWidth || this.temporaryDisplay(), this.getChartSize(), yt = this.chartWidth;
var vt = this.chartHeight;
if (W(pt, { overflow: "hidden" }), this.styledMode || (lt = L({ position: "relative", overflow: "hidden", width: yt + "px", height: vt + "px", textAlign: "left", lineHeight: "normal", zIndex: 0, "-webkit-tap-highlight-color": "rgba(0,0,0,0)", userSelect: "none", "touch-action": "manipulation", outline: "none" }, tt.style || {})), this.container = ot = I("div", { id: ot }, lt, pt), this._cursor = ot.style.cursor, this.renderer = new (tt.renderer || !i ? w.getRendererType(tt.renderer) : f)(ot, yt, vt, void 0, tt.forExport, J.exporting && J.exporting.allowHTML, this.styledMode), b(
void 0,
this
), this.setClassName(tt.className), this.styledMode)
for (var Ct in J.defs)
this.renderer.definition(J.defs[Ct]);
else
this.renderer.setStyle(tt.style);
this.renderer.chartIndex = this.index, $(this, "afterGetContainer");
}, at.prototype.getMargins = function(J) {
var tt = this.spacing, ot = this.margin, lt = this.titleOffset;
this.resetMargins(), lt[0] && !E(ot[0]) && (this.plotTop = Math.max(this.plotTop, lt[0] + tt[0])), lt[2] && !E(ot[2]) && (this.marginBottom = Math.max(this.marginBottom, lt[2] + tt[2])), this.legend && this.legend.display && this.legend.adjustMargins(
ot,
tt
), $(this, "getMargins"), J || this.getAxisMargins();
}, at.prototype.getAxisMargins = function() {
var J = this, tt = J.axisOffset = [0, 0, 0, 0], ot = J.colorAxis, lt = J.margin, pt = function(yt) {
yt.forEach(function(vt) {
vt.visible && vt.getOffset();
});
};
J.hasCartesianSeries ? pt(J.axes) : ot && ot.length && pt(ot), u.forEach(function(yt, vt) {
E(lt[vt]) || (J[yt] += tt[vt]);
}), J.setChartSize();
}, at.prototype.reflow = function(J) {
var tt = this, ot = tt.options.chart, lt = tt.renderTo, pt = E(ot.width) && E(ot.height), yt = ot.width || Q(lt, "width");
ot = ot.height || Q(lt, "height"), lt = J ? J.target : p, delete tt.pointer.chartPosition, !pt && !tt.isPrinting && yt && ot && (lt === p || lt === c) && ((yt !== tt.containerWidth || ot !== tt.containerHeight) && (T.clearTimeout(tt.reflowTimeout), tt.reflowTimeout = dt(function() {
tt.container && tt.setSize(void 0, void 0, !1);
}, J ? 100 : 0)), tt.containerWidth = yt, tt.containerHeight = ot);
}, at.prototype.setReflow = function(J) {
var tt = this;
J === !1 || this.unbindReflow ? J === !1 && this.unbindReflow && (this.unbindReflow = this.unbindReflow()) : (this.unbindReflow = n(p, "resize", function(ot) {
tt.options && tt.reflow(ot);
}), n(this, "destroy", this.unbindReflow));
}, at.prototype.setSize = function(J, tt, ot) {
var lt = this, pt = lt.renderer;
lt.isResizing += 1, b(ot, lt), ot = pt.globalAnimation, lt.oldChartHeight = lt.chartHeight, lt.oldChartWidth = lt.chartWidth, typeof J < "u" && (lt.options.chart.width = J), typeof tt < "u" && (lt.options.chart.height = tt), lt.getChartSize(), lt.styledMode || (ot ? R : W)(lt.container, { width: lt.chartWidth + "px", height: lt.chartHeight + "px" }, ot), lt.setChartSize(!0), pt.setSize(lt.chartWidth, lt.chartHeight, ot), lt.axes.forEach(function(yt) {
yt.isDirty = !0, yt.setScale();
}), lt.isDirtyLegend = !0, lt.isDirtyBox = !0, lt.layOutTitles(), lt.getMargins(), lt.redraw(ot), lt.oldChartHeight = null, $(lt, "resize"), dt(function() {
lt && $(lt, "endResize", null, function() {
--lt.isResizing;
});
}, k(ot).duration);
}, at.prototype.setChartSize = function(J) {
var tt = this.inverted, ot = this.renderer, lt = this.chartWidth, pt = this.chartHeight, yt = this.options.chart, vt = this.spacing, Ct = this.clipOffset, Pt, At, St, Dt;
this.plotLeft = Pt = Math.round(this.plotLeft), this.plotTop = At = Math.round(this.plotTop), this.plotWidth = St = Math.max(0, Math.round(lt - Pt - this.marginRight)), this.plotHeight = Dt = Math.max(0, Math.round(pt - At - this.marginBottom)), this.plotSizeX = tt ? Dt : St, this.plotSizeY = tt ? St : Dt, this.plotBorderWidth = yt.plotBorderWidth || 0, this.spacingBox = ot.spacingBox = { x: vt[3], y: vt[0], width: lt - vt[3] - vt[1], height: pt - vt[0] - vt[2] }, this.plotBox = ot.plotBox = { x: Pt, y: At, width: St, height: Dt }, tt = 2 * Math.floor(this.plotBorderWidth / 2), lt = Math.ceil(Math.max(tt, Ct[3]) / 2), pt = Math.ceil(Math.max(tt, Ct[0]) / 2), this.clipBox = { x: lt, y: pt, width: Math.floor(this.plotSizeX - Math.max(tt, Ct[1]) / 2 - lt), height: Math.max(0, Math.floor(this.plotSizeY - Math.max(tt, Ct[2]) / 2 - pt)) }, J || (this.axes.forEach(function(_t) {
_t.setAxisSize(), _t.setAxisTranslation();
}), ot.alignElements()), $(this, "afterSetChartSize", { skipAxes: J });
}, at.prototype.resetMargins = function() {
$(this, "resetMargins");
var J = this, tt = J.options.chart;
["margin", "spacing"].forEach(function(ot) {
var lt = tt[ot], pt = Y(lt) ? lt : [lt, lt, lt, lt];
["Top", "Right", "Bottom", "Left"].forEach(function(yt, vt) {
J[ot][vt] = et(tt[ot + yt], pt[vt]);
});
}), u.forEach(function(ot, lt) {
J[ot] = et(J.margin[lt], J.spacing[lt]);
}), J.axisOffset = [0, 0, 0, 0], J.clipOffset = [0, 0, 0, 0];
}, at.prototype.drawChartBox = function() {
var J = this.options.chart, tt = this.renderer, ot = this.chartWidth, lt = this.chartHeight, pt = this.styledMode, yt = this.plotBGImage, vt = J.backgroundColor, Ct = J.plotBackgroundColor, Pt = J.plotBackgroundImage, At = this.plotLeft, St = this.plotTop, Dt = this.plotWidth, _t = this.plotHeight, Nt = this.plotBox, Ot = this.clipRect, Kt = this.clipBox, Gt = this.chartBackground, Wt = this.plotBackground, Jt = this.plotBorder, be, Yt = "animate";
if (Gt || (this.chartBackground = Gt = tt.rect().addClass("highcharts-background").add(), Yt = "attr"), pt)
var Vt = be = Gt.strokeWidth();
else
Vt = J.borderWidth || 0, be = Vt + (J.shadow ? 8 : 0), vt = { fill: vt || "none" }, (Vt || Gt["stroke-width"]) && (vt.stroke = J.borderColor, vt["stroke-width"] = Vt), Gt.attr(vt).shadow(J.shadow);
Gt[Yt]({ x: be / 2, y: be / 2, width: ot - be - Vt % 2, height: lt - be - Vt % 2, r: J.borderRadius }), Yt = "animate", Wt || (Yt = "attr", this.plotBackground = Wt = tt.rect().addClass("highcharts-plot-background").add()), Wt[Yt](Nt), pt || (Wt.attr({ fill: Ct || "none" }).shadow(J.plotShadow), Pt && (yt ? (Pt !== yt.attr("href") && yt.attr("href", Pt), yt.animate(Nt)) : this.plotBGImage = tt.image(Pt, At, St, Dt, _t).add())), Ot ? Ot.animate({ width: Kt.width, height: Kt.height }) : this.clipRect = tt.clipRect(Kt), Yt = "animate", Jt || (Yt = "attr", this.plotBorder = Jt = tt.rect().addClass("highcharts-plot-border").attr({ zIndex: 1 }).add()), pt || Jt.attr({ stroke: J.plotBorderColor, "stroke-width": J.plotBorderWidth || 0, fill: "none" }), Jt[Yt](Jt.crisp({ x: At, y: St, width: Dt, height: _t }, -Jt.strokeWidth())), this.isDirtyBox = !1, $(this, "afterDrawChartBox");
}, at.prototype.propFromSeries = function() {
var J = this, tt = J.options.chart, ot = J.options.series, lt, pt, yt;
["inverted", "angular", "polar"].forEach(function(vt) {
for (pt = s[tt.type || tt.defaultSeriesType], yt = tt[vt] || pt && pt.prototype[vt], lt = ot && ot.length; !yt && lt--; )
(pt = s[ot[lt].type]) && pt.prototype[vt] && (yt = !0);
J[vt] = yt;
});
}, at.prototype.linkSeries = function() {
var J = this, tt = J.series;
tt.forEach(function(ot) {
ot.linkedSeries.length = 0;
}), tt.forEach(function(ot) {
var lt = ot.options.linkedTo;
Z(lt) && (lt = lt === ":previous" ? J.series[ot.index - 1] : J.get(lt)) && lt.linkedParent !== ot && (lt.linkedSeries.push(ot), ot.linkedParent = lt, lt.enabledDataSorting && ot.setDataSortingOptions(), ot.visible = et(ot.options.visible, lt.options.visible, ot.visible));
}), $(this, "afterLinkSeries");
}, at.prototype.renderSeries = function() {
this.series.forEach(function(J) {
J.translate(), J.render();
});
}, at.prototype.renderLabels = function() {
var J = this, tt = J.options.labels;
tt.items && tt.items.forEach(function(ot) {
var lt = L(tt.style, ot.style), pt = nt(lt.left) + J.plotLeft, yt = nt(lt.top) + J.plotTop + 12;
delete lt.left, delete lt.top, J.renderer.text(ot.html, pt, yt).attr({ zIndex: 2 }).css(lt).add();
});
}, at.prototype.render = function() {
var J = this.axes, tt = this.colorAxis, ot = this.renderer, lt = this.options, pt = function(At) {
At.forEach(function(St) {
St.visible && St.render();
});
}, yt = 0;
this.setTitle(), this.legend = new V(this, lt.legend), this.getStacks && this.getStacks(), this.getMargins(!0), this.setChartSize(), lt = this.plotWidth, J.some(function(At) {
if (At.horiz && At.visible && At.options.labels.enabled && At.series.length)
return yt = 21, !0;
});
var vt = this.plotHeight = Math.max(this.plotHeight - yt, 0);
J.forEach(function(At) {
At.setScale();
}), this.getAxisMargins();
var Ct = 1.1 < lt / this.plotWidth, Pt = 1.05 < vt / this.plotHeight;
(Ct || Pt) && (J.forEach(function(At) {
(At.horiz && Ct || !At.horiz && Pt) && At.setTickInterval(!0);
}), this.getMargins()), this.drawChartBox(), this.hasCartesianSeries ? pt(J) : tt && tt.length && pt(tt), this.seriesGroup || (this.seriesGroup = ot.g("series-group").attr({ zIndex: 3 }).add()), this.renderSeries(), this.renderLabels(), this.addCredits(), this.setResponsive && this.setResponsive(), this.hasRendered = !0;
}, at.prototype.addCredits = function(J) {
var tt = this, ot = q(!0, this.options.credits, J);
ot.enabled && !this.credits && (this.credits = this.renderer.text(ot.text + (this.mapCredits || ""), 0, 0).addClass("highcharts-credits").on("click", function() {
ot.href && (p.location.href = ot.href);
}).attr({ align: ot.position.align, zIndex: 8 }), tt.styledMode || this.credits.css(ot.style), this.credits.add().align(ot.position), this.credits.update = function(lt) {
tt.credits = tt.credits.destroy(), tt.addCredits(lt);
});
}, at.prototype.destroy = function() {
var J = this, tt = J.axes, ot = J.series, lt = J.container, pt = lt && lt.parentNode, yt;
for ($(J, "destroy"), J.renderer.forExport ? g(h, J) : h[J.index] = void 0, G.chartCount--, J.renderTo.removeAttribute("data-highcharts-chart"), ct(J), yt = tt.length; yt--; )
tt[yt] = tt[yt].destroy();
for (this.scroller && this.scroller.destroy && this.scroller.destroy(), yt = ot.length; yt--; )
ot[yt] = ot[yt].destroy();
"title subtitle chartBackground plotBackground plotBGImage plotBorder seriesGroup clipRect credits pointer rangeSelector legend resetZoomButton tooltip renderer".split(" ").forEach(function(vt) {
var Ct = J[vt];
Ct && Ct.destroy && (J[vt] = Ct.destroy());
}), lt && (lt.innerHTML = O.emptyHTML, ct(lt), pt && X(lt)), it(J, function(vt, Ct) {
delete J[Ct];
});
}, at.prototype.firstRender = function() {
var J = this, tt = J.options;
(!J.isReadyToRender || J.isReadyToRender()) && (J.getContainer(), J.resetMargins(), J.setChartSize(), J.propFromSeries(), J.getAxes(), (A(tt.series) ? tt.series : []).forEach(function(ot) {
J.initSeries(ot);
}), J.linkSeries(), J.setSeriesData(), $(J, "beforeRender"), j && (F.isRequired() ? J.pointer = new F(J, tt) : J.pointer = new j(J, tt)), J.render(), J.pointer.getChartPosition(), !J.renderer.imgCount && !J.hasLoaded && J.onload(), J.temporaryDisplay(!0));
}, at.prototype.onload = function() {
this.callbacks.concat([this.callback]).forEach(function(J) {
J && typeof this.index < "u" && J.apply(this, [this]);
}, this), $(this, "load"), $(this, "render"), E(this.index) && this.setReflow(this.options.chart.reflow), this.hasLoaded = !0;
}, at.prototype.addSeries = function(J, tt, ot) {
var lt = this, pt;
return J && (tt = et(tt, !0), $(lt, "addSeries", { options: J }, function() {
pt = lt.initSeries(J), lt.isDirtyLegend = !0, lt.linkSeries(), pt.enabledDataSorting && pt.setData(J.data, !1), $(lt, "afterAddSeries", { series: pt }), tt && lt.redraw(ot);
})), pt;
}, at.prototype.addAxis = function(J, tt, ot, lt) {
return this.createAxis(tt ? "xAxis" : "yAxis", { axis: J, redraw: ot, animation: lt });
}, at.prototype.addColorAxis = function(J, tt, ot) {
return this.createAxis(
"colorAxis",
{ axis: J, redraw: tt, animation: ot }
);
}, at.prototype.createAxis = function(J, tt) {
return J = new N(this, q(tt.axis, { index: this[J].length, isX: J === "xAxis" })), et(tt.redraw, !0) && this.redraw(tt.animation), J;
}, at.prototype.showLoading = function(J) {
var tt = this, ot = tt.options, lt = ot.loading, pt = function() {
yt && W(yt, { left: tt.plotLeft + "px", top: tt.plotTop + "px", width: tt.plotWidth + "px", height: tt.plotHeight + "px" });
}, yt = tt.loadingDiv, vt = tt.loadingSpan;
yt || (tt.loadingDiv = yt = I("div", { className: "highcharts-loading highcharts-loading-hidden" }, null, tt.container)), vt || (tt.loadingSpan = vt = I("span", { className: "highcharts-loading-inner" }, null, yt), n(tt, "redraw", pt)), yt.className = "highcharts-loading", O.setElementHTML(vt, et(J, ot.lang.loading, "")), tt.styledMode || (W(yt, L(lt.style, { zIndex: 10 })), W(vt, lt.labelStyle), tt.loadingShown || (W(yt, { opacity: 0, display: "" }), R(yt, { opacity: lt.style.opacity || 0.5 }, { duration: lt.showDuration || 0 }))), tt.loadingShown = !0, pt();
}, at.prototype.hideLoading = function() {
var J = this.options, tt = this.loadingDiv;
tt && (tt.className = "highcharts-loading highcharts-loading-hidden", this.styledMode || R(tt, { opacity: 0 }, { duration: J.loading.hideDuration || 100, complete: function() {
W(tt, { display: "none" });
} })), this.loadingShown = !1;
}, at.prototype.update = function(J, tt, ot, lt) {
var pt = this, yt = { credits: "addCredits", title: "setTitle", subtitle: "setSubtitle", caption: "setCaption" }, vt = J.isResponsiveOptions, Ct = [], Pt, At;
$(pt, "update", { options: J }), vt || pt.setResponsive(!1, !0), J = D(J, pt.options), pt.userOptions = q(pt.userOptions, J);
var St = J.chart;
if (St) {
if (q(!0, pt.options.chart, St), "className" in St && pt.setClassName(St.className), "reflow" in St && pt.setReflow(St.reflow), "inverted" in St || "polar" in St || "type" in St) {
pt.propFromSeries();
var Dt = !0;
}
"alignTicks" in St && (Dt = !0), "events" in St && v(this, St), it(St, function(_t, Nt) {
pt.propsRequireUpdateSeries.indexOf("chart." + Nt) !== -1 && (Pt = !0), pt.propsRequireDirtyBox.indexOf(Nt) !== -1 && (pt.isDirtyBox = !0), pt.propsRequireReflow.indexOf(Nt) !== -1 && (vt ? pt.isDirtyBox = !0 : At = !0);
}), !pt.styledMode && St.style && pt.renderer.setStyle(pt.options.chart.style || {});
}
!pt.styledMode && J.colors && (this.options.colors = J.colors), J.time && (this.time === t && (this.time = new l(J.time)), q(
!0,
pt.options.time,
J.time
)), it(J, function(_t, Nt) {
pt[Nt] && typeof pt[Nt].update == "function" ? pt[Nt].update(_t, !1) : typeof pt[yt[Nt]] == "function" ? pt[yt[Nt]](_t) : Nt !== "colors" && pt.collectionsWithUpdate.indexOf(Nt) === -1 && q(!0, pt.options[Nt], J[Nt]), Nt !== "chart" && pt.propsRequireUpdateSeries.indexOf(Nt) !== -1 && (Pt = !0);
}), this.collectionsWithUpdate.forEach(function(_t) {
if (J[_t]) {
var Nt = [];
pt[_t].forEach(function(Ot, Kt) {
Ot.options.isInternal || Nt.push(et(Ot.options.index, Kt));
}), gt(J[_t]).forEach(function(Ot, Kt) {
var Gt = E(Ot.id), Wt;
Gt && (Wt = pt.get(Ot.id)), !Wt && pt[_t] && (Wt = pt[_t][Nt ? Nt[Kt] : Kt]) && Gt && E(Wt.options.id) && (Wt = void 0), Wt && Wt.coll === _t && (Wt.update(Ot, !1), ot && (Wt.touched = !0)), !Wt && ot && pt.collectionsWithInit[_t] && (pt.collectionsWithInit[_t][0].apply(pt, [Ot].concat(pt.collectionsWithInit[_t][1] || []).concat([!1])).touched = !0);
}), ot && pt[_t].forEach(function(Ot) {
Ot.touched || Ot.options.isInternal ? delete Ot.touched : Ct.push(Ot);
});
}
}), Ct.forEach(function(_t) {
_t.chart && _t.remove && _t.remove(!1);
}), Dt && pt.axes.forEach(function(_t) {
_t.update({}, !1);
}), Pt && pt.getSeriesOrderByLinks().forEach(function(_t) {
_t.chart && _t.update({}, !1);
}, this), Dt = St && St.width, St = St && (Z(St.height) ? rt(St.height, Dt || pt.chartWidth) : St.height), At || H(Dt) && Dt !== pt.chartWidth || H(St) && St !== pt.chartHeight ? pt.setSize(Dt, St, lt) : et(tt, !0) && pt.redraw(lt), $(pt, "afterUpdate", { options: J, redraw: tt, animation: lt });
}, at.prototype.setSubtitle = function(J, tt) {
this.applyDescription("subtitle", J), this.layOutTitles(tt);
}, at.prototype.setCaption = function(J, tt) {
this.applyDescription("caption", J), this.layOutTitles(tt);
}, at.prototype.showResetZoom = function() {
function J() {
tt.zoomOut();
}
var tt = this, ot = a.lang, lt = tt.options.chart.resetZoomButton, pt = lt.theme, yt = pt.states, vt = lt.relativeTo === "chart" || lt.relativeTo === "spacingBox" ? null : "scrollablePlotBox";
$(this, "beforeShowResetZoom", null, function() {
tt.resetZoomButton = tt.renderer.button(ot.resetZoom, null, null, J, pt, yt && yt.hover).attr({ align: lt.position.align, title: ot.resetZoomTitle }).addClass("highcharts-reset-zoom").add().align(lt.position, !1, vt);
}), $(this, "afterShowResetZoom");
}, at.prototype.zoomOut = function() {
$(this, "selection", { resetSelection: !0 }, this.zoom);
}, at.prototype.zoom = function(J) {
var tt = this, ot = tt.pointer, lt = tt.inverted ? ot.mouseDownX : ot.mouseDownY, pt = !1, yt;
!J || J.resetSelection ? (tt.axes.forEach(function(Ct) {
yt = Ct.zoom();
}), ot.initiated = !1) : J.xAxis.concat(J.yAxis).forEach(function(Ct) {
var Pt = Ct.axis, At = tt.inverted ? Pt.left : Pt.top, St = tt.inverted ? At + Pt.width : At + Pt.height, Dt = Pt.isXAxis, _t = !1;
(!Dt && lt >= At && lt <= St || Dt || !E(lt)) && (_t = !0), ot[Dt ? "zoomX" : "zoomY"] && _t && (yt = Pt.zoom(Ct.min, Ct.max), Pt.displayBtn && (pt = !0));
});
var vt = tt.resetZoomButton;
pt && !vt ? tt.showResetZoom() : !pt && Y(vt) && (tt.resetZoomButton = vt.destroy()), yt && tt.redraw(et(
tt.options.chart.animation,
J && J.animation,
100 > tt.pointCount
));
}, at.prototype.pan = function(J, tt) {
var ot = this, lt = ot.hoverPoints;
tt = typeof tt == "object" ? tt : { enabled: tt, type: "x" };
var pt = ot.options.chart, yt = ot.options.mapNavigation && ot.options.mapNavigation.enabled;
pt && pt.panning && (pt.panning = tt);
var vt = tt.type, Ct;
$(this, "pan", { originalEvent: J }, function() {
lt && lt.forEach(function(St) {
St.setState();
});
var Pt = ot.xAxis;
vt === "xy" ? Pt = Pt.concat(ot.yAxis) : vt === "y" && (Pt = ot.yAxis);
var At = {};
Pt.forEach(function(St) {
if (St.options.panningEnabled && !St.options.isInternal) {
var Dt = St.horiz, _t = J[Dt ? "chartX" : "chartY"];
Dt = Dt ? "mouseDownX" : "mouseDownY";
var Nt = ot[Dt], Ot = St.minPointOffset || 0, Kt = St.reversed && !ot.inverted || !St.reversed && ot.inverted ? -1 : 1, Gt = St.getExtremes(), Wt = St.toValue(Nt - _t, !0) + Ot * Kt, Jt = St.toValue(Nt + St.len - _t, !0) - (Ot * Kt || St.isXAxis && St.pointRangePadding || 0), be = Jt < Wt;
Kt = St.hasVerticalPanning(), Nt = be ? Jt : Wt, Wt = be ? Wt : Jt;
var Yt = St.panningState;
!Kt || St.isXAxis || Yt && !Yt.isDirty || St.series.forEach(function(Vt) {
var Me = Vt.getProcessedData(!0);
Me = Vt.getExtremes(Me.yData, !0), Yt || (Yt = { startMin: Number.MAX_VALUE, startMax: -Number.MAX_VALUE }), H(Me.dataMin) && H(Me.dataMax) && (Yt.startMin = Math.min(et(Vt.options.threshold, 1 / 0), Me.dataMin, Yt.startMin), Yt.startMax = Math.max(et(Vt.options.threshold, -1 / 0), Me.dataMax, Yt.startMax));
}), Kt = Math.min(et(Yt && Yt.startMin, Gt.dataMin), Ot ? Gt.min : St.toValue(St.toPixels(Gt.min) - St.minPixelPadding)), Jt = Math.max(et(Yt && Yt.startMax, Gt.dataMax), Ot ? Gt.max : St.toValue(St.toPixels(Gt.max) + St.minPixelPadding)), St.panningState = Yt, St.isOrdinal || (Ot = Kt - Nt, 0 < Ot && (Wt += Ot, Nt = Kt), Ot = Wt - Jt, 0 < Ot && (Wt = Jt, Nt -= Ot), St.series.length && Nt !== Gt.min && Wt !== Gt.max && Nt >= Kt && Wt <= Jt && (St.setExtremes(
Nt,
Wt,
!1,
!1,
{ trigger: "pan" }
), ot.resetZoomButton || yt || Nt === Kt || Wt === Jt || !vt.match("y") || (ot.showResetZoom(), St.displayBtn = !1), Ct = !0), At[Dt] = _t);
}
}), it(At, function(St, Dt) {
ot[Dt] = St;
}), Ct && ot.redraw(!1), W(ot.container, { cursor: "move" });
});
}, at;
}(), L(y.prototype, {
callbacks: [],
collectionsWithInit: { xAxis: [y.prototype.addAxis, [!0]], yAxis: [y.prototype.addAxis, [!1]], series: [y.prototype.addSeries] },
collectionsWithUpdate: ["xAxis", "yAxis", "series"],
propsRequireDirtyBox: "backgroundColor borderColor borderWidth borderRadius plotBackgroundColor plotBackgroundImage plotBorderColor plotBorderWidth plotShadow shadow".split(" "),
propsRequireReflow: "margin marginTop marginRight marginBottom marginLeft spacing spacingTop spacingRight spacingBottom spacingLeft".split(" "),
propsRequireUpdateSeries: "chart.inverted chart.polar chart.ignoreHiddenSeries chart.type colors plotOptions time tooltip".split(" ")
}), y;
}), C(o, "Core/Legend/LegendSymbol.js", [o["Core/Utilities.js"]], function(y) {
var N = y.merge, _ = y.pick, U;
return function(G) {
G.drawLineMarker = function(V) {
var F = this.options, B = V.symbolWidth, j = V.symbolHeight, w = j / 2, x = this.chart.renderer, f = this.legendGroup;
V = V.baseline - Math.round(0.3 * V.fontMetrics.b);
var l = {}, T = F.marker;
this.chart.styledMode || (l = { "stroke-width": F.lineWidth || 0 }, F.dashStyle && (l.dashstyle = F.dashStyle)), this.legendLine = x.path([["M", 0, V], ["L", B, V]]).addClass("highcharts-graph").attr(l).add(f), T && T.enabled !== !1 && B && (F = Math.min(_(T.radius, w), w), this.symbol.indexOf("url") === 0 && (T = N(T, { width: j, height: j }), F = 0), this.legendSymbol = B = x.symbol(this.symbol, B / 2 - F, V - F, 2 * F, 2 * F, T).addClass("highcharts-point").add(f), B.isMarker = !0);
}, G.drawRectangle = function(V, F) {
var B = V.symbolHeight, j = V.options.squareSymbol;
F.legendSymbol = this.chart.renderer.rect(j ? (V.symbolWidth - B) / 2 : 0, V.baseline - B + 1, j ? B : V.symbolWidth, B, _(V.options.symbolRadius, B / 2)).addClass("highcharts-point").attr({ zIndex: 3 }).add(F.legendGroup);
};
}(U || (U = {})), U;
}), C(o, "Core/Series/SeriesDefaults.js", [], function() {
return { lineWidth: 2, allowPointSelect: !1, crisp: !0, showCheckbox: !1, animation: { duration: 1e3 }, events: {}, marker: { enabledThreshold: 2, lineColor: "#ffffff", lineWidth: 0, radius: 4, states: {
normal: { animation: !0 },
hover: { animation: { duration: 50 }, enabled: !0, radiusPlus: 2, lineWidthPlus: 1 },
select: { fillColor: "#cccccc", lineColor: "#000000", lineWidth: 2 }
} }, point: { events: {} }, dataLabels: { animation: {}, align: "center", defer: !0, formatter: function() {
var y = this.series.chart.numberFormatter;
return typeof this.y != "number" ? "" : y(this.y, -1);
}, padding: 5, style: { fontSize: "11px", fontWeight: "bold", color: "contrast", textOutline: "1px contrast" }, verticalAlign: "bottom", x: 0, y: 0 }, cropThreshold: 300, opacity: 1, pointRange: 0, softThreshold: !0, states: {
normal: { animation: !0 },
hover: { animation: { duration: 50 }, lineWidthPlus: 1, marker: {}, halo: { size: 10, opacity: 0.25 } },
select: { animation: { duration: 0 } },
inactive: { animation: { duration: 50 }, opacity: 0.2 }
}, stickyTracking: !0, turboThreshold: 1e3, findNearestPointBy: "x" };
}), C(o, "Core/Series/Series.js", [
o["Core/Animation/AnimationUtilities.js"],
o["Core/DefaultOptions.js"],
o["Core/Foundation.js"],
o["Core/Globals.js"],
o["Core/Legend/LegendSymbol.js"],
o["Core/Series/Point.js"],
o["Core/Series/SeriesDefaults.js"],
o["Core/Series/SeriesRegistry.js"],
o["Core/Renderer/SVG/SVGElement.js"],
o["Core/Utilities.js"]
], function(y, N, _, U, G, V, F, B, j, w) {
var x = y.animObject, f = y.setAnimation, l = N.defaultOptions, T = _.registerEventOptions, O = U.hasTouch, R = U.svg, k = U.win, b = B.seriesTypes, S = w.addEvent, v = w.arrayMax, h = w.arrayMin, c = w.clamp, u = w.cleanRecursively, i = w.correctFloat, p = w.defined, a = w.erase, t = w.error, s = w.extend, n = w.find, P = w.fireEvent, D = w.getNestedProperty, I = w.isArray, W = w.isNumber, E = w.isString, X = w.merge, g = w.objectEach, m = w.pick, L = w.removeEvent, z = w.splat, $ = w.syncTimeout;
return y = function() {
function Q() {
this.zones = this.yAxis = this.xAxis = this.userOptions = this.tooltipOptions = this.processedYData = this.processedXData = this.points = this.options = this.linkedSeries = this.index = this.eventsToUnbind = this.eventOptions = this.data = this.chart = this._i = void 0;
}
return Q.prototype.init = function(A, H) {
P(this, "init", { options: H });
var Y = this, Z = A.series;
this.eventsToUnbind = [], Y.chart = A, Y.options = Y.setOptions(H), H = Y.options, Y.linkedSeries = [], Y.bindAxes(), s(Y, { name: H.name, state: "", visible: H.visible !== !1, selected: H.selected === !0 }), T(this, H);
var q = H.events;
(q && q.click || H.point && H.point.events && H.point.events.click || H.allowPointSelect) && (A.runTrackerClick = !0), Y.getColor(), Y.getSymbol(), Y.parallelArrays.forEach(function(et) {
Y[et + "Data"] || (Y[et + "Data"] = []);
}), Y.isCartesian && (A.hasCartesianSeries = !0);
var it;
Z.length && (it = Z[Z.length - 1]), Y._i = m(it && it._i, -1) + 1, Y.opacity = Y.options.opacity, A.orderSeries(this.insert(Z)), H.dataSorting && H.dataSorting.enabled ? Y.setDataSortingOptions() : Y.points || Y.data || Y.setData(H.data, !1), P(this, "afterInit");
}, Q.prototype.is = function(A) {
return b[A] && this instanceof b[A];
}, Q.prototype.insert = function(A) {
var H = this.options.index, Y;
if (W(H)) {
for (Y = A.length; Y--; )
if (H >= m(A[Y].options.index, A[Y]._i)) {
A.splice(Y + 1, 0, this);
break;
}
Y === -1 && A.unshift(this), Y += 1;
} else
A.push(this);
return m(Y, A.length - 1);
}, Q.prototype.bindAxes = function() {
var A = this, H = A.options, Y = A.chart, Z;
P(this, "bindAxes", null, function() {
(A.axisTypes || []).forEach(function(q) {
var it = 0;
Y[q].forEach(function(et) {
Z = et.options, (H[q] === it && !Z.isInternal || typeof H[q] < "u" && H[q] === Z.id || typeof H[q] > "u" && Z.index === 0) && (A.insert(et.series), A[q] = et, et.isDirty = !0), Z.isInternal || it++;
}), A[q] || A.optionalAxis === q || t(18, !0, Y);
});
}), P(this, "afterBindAxes");
}, Q.prototype.updateParallelArrays = function(A, H) {
var Y = A.series, Z = arguments, q = W(H) ? function(it) {
var et = it === "y" && Y.toYData ? Y.toYData(A) : A[it];
Y[it + "Data"][H] = et;
} : function(it) {
Array.prototype[H].apply(Y[it + "Data"], Array.prototype.slice.call(Z, 2));
};
Y.parallelArrays.forEach(q);
}, Q.prototype.hasData = function() {
return this.visible && typeof this.dataMax < "u" && typeof this.dataMin < "u" || this.visible && this.yData && 0 < this.yData.length;
}, Q.prototype.autoIncrement = function(A) {
var H = this.options, Y = H.pointIntervalUnit, Z = H.relativeXValue, q = this.chart.time, it = this.xIncrement, et;
return it = m(it, H.pointStart, 0), this.pointInterval = et = m(this.pointInterval, H.pointInterval, 1), Z && W(A) && (et *= A), Y && (H = new q.Date(it), Y === "day" ? q.set("Date", H, q.get("Date", H) + et) : Y === "month" ? q.set("Month", H, q.get("Month", H) + et) : Y === "year" && q.set("FullYear", H, q.get("FullYear", H) + et), et = H.getTime() - it), Z && W(A) ? it + et : (this.xIncrement = it + et, it);
}, Q.prototype.setDataSortingOptions = function() {
var A = this.options;
s(this, { requireSorting: !1, sorted: !1, enabledDataSorting: !0, allowDG: !1 }), p(A.pointRange) || (A.pointRange = 1);
}, Q.prototype.setOptions = function(A) {
var H = this.chart, Y = H.options, Z = Y.plotOptions, q = H.userOptions || {};
A = X(A), H = H.styledMode;
var it = { plotOptions: Z, userOptions: A };
P(this, "setOptions", it);
var et = it.plotOptions[this.type], nt = q.plotOptions || {};
return this.userOptions = it.userOptions, q = X(et, Z.series, q.plotOptions && q.plotOptions[this.type], A), this.tooltipOptions = X(l.tooltip, l.plotOptions.series && l.plotOptions.series.tooltip, l.plotOptions[this.type].tooltip, Y.tooltip.userOptions, Z.series && Z.series.tooltip, Z[this.type].tooltip, A.tooltip), this.stickyTracking = m(A.stickyTracking, nt[this.type] && nt[this.type].stickyTracking, nt.series && nt.series.stickyTracking, this.tooltipOptions.shared && !this.noSharedTooltip ? !0 : q.stickyTracking), et.marker === null && delete q.marker, this.zoneAxis = q.zoneAxis, Z = this.zones = (q.zones || []).slice(), !q.negativeColor && !q.negativeFillColor || q.zones || (Y = { value: q[this.zoneAxis + "Threshold"] || q.threshold || 0, className: "highcharts-negative" }, H || (Y.color = q.negativeColor, Y.fillColor = q.negativeFillColor), Z.push(Y)), Z.length && p(Z[Z.length - 1].value) && Z.push(H ? {} : { color: this.color, fillColor: this.fillColor }), P(this, "afterSetOptions", { options: q }), q;
}, Q.prototype.getName = function() {
return m(this.options.name, "Series " + (this.index + 1));
}, Q.prototype.getCyclic = function(A, H, Y) {
var Z = this.chart, q = this.userOptions, it = A + "Index", et = A + "Counter", nt = Y ? Y.length : m(Z.options.chart[A + "Count"], Z[A + "Count"]);
if (!H) {
var rt = m(q[it], q["_" + it]);
p(rt) || (Z.series.length || (Z[et] = 0), q["_" + it] = rt = Z[et] % nt, Z[et] += 1), Y && (H = Y[rt]);
}
typeof rt < "u" && (this[it] = rt), this[A] = H;
}, Q.prototype.getColor = function() {
this.chart.styledMode ? this.getCyclic("color") : this.options.colorByPoint ? this.color = "#cccccc" : this.getCyclic("color", this.options.color || l.plotOptions[this.type].color, this.chart.options.colors);
}, Q.prototype.getPointsCollection = function() {
return (this.hasGroupedData ? this.points : this.data) || [];
}, Q.prototype.getSymbol = function() {
this.getCyclic("symbol", this.options.marker.symbol, this.chart.options.symbols);
}, Q.prototype.findPointIndex = function(A, H) {
var Y = A.id, Z = A.x, q = this.points, it = this.options.dataSorting, et, nt;
if (Y)
it = this.chart.get(Y), it instanceof V && (et = it);
else if ((this.linkedParent || this.enabledDataSorting || this.options.relativeXValue) && (et = function(ct) {
return !ct.touched && ct.index === A.index;
}, it && it.matchByName ? et = function(ct) {
return !ct.touched && ct.name === A.name;
} : this.options.relativeXValue && (et = function(ct) {
return !ct.touched && ct.options.x === A.x;
}), et = n(q, et), !et))
return;
if (et) {
var rt = et && et.index;
typeof rt < "u" && (nt = !0);
}
return typeof rt > "u" && W(Z) && (rt = this.xData.indexOf(Z, H)), rt !== -1 && typeof rt < "u" && this.cropped && (rt = rt >= this.cropStart ? rt - this.cropStart : rt), !nt && W(rt) && q[rt] && q[rt].touched && (rt = void 0), rt;
}, Q.prototype.updateData = function(A, H) {
var Y = this.options, Z = Y.dataSorting, q = this.points, it = [], et = this.requireSorting, nt = A.length === q.length, rt, ct, gt, dt = !0;
if (this.xIncrement = null, A.forEach(function(ht, at) {
var J = p(ht) && this.pointClass.prototype.optionsToObject.call({ series: this }, ht) || {}, tt = J.x;
J.id || W(tt) ? (J = this.findPointIndex(J, gt), J === -1 || typeof J > "u" ? it.push(ht) : q[J] && ht !== Y.data[J] ? (q[J].update(ht, !1, null, !1), q[J].touched = !0, et && (gt = J + 1)) : q[J] && (q[J].touched = !0), (!nt || at !== J || Z && Z.enabled || this.hasDerivedData) && (rt = !0)) : it.push(ht);
}, this), rt)
for (A = q.length; A--; )
(ct = q[A]) && !ct.touched && ct.remove && ct.remove(!1, H);
else
!nt || Z && Z.enabled ? dt = !1 : (A.forEach(function(ht, at) {
ht !== q[at].y && q[at].update && q[at].update(
ht,
!1,
null,
!1
);
}), it.length = 0);
return q.forEach(function(ht) {
ht && (ht.touched = !1);
}), dt ? (it.forEach(function(ht) {
this.addPoint(ht, !1, null, null, !1);
}, this), this.xIncrement === null && this.xData && this.xData.length && (this.xIncrement = v(this.xData), this.autoIncrement()), !0) : !1;
}, Q.prototype.setData = function(A, H, Y, Z) {
var q = this, it = q.points, et = it && it.length || 0, nt = q.options, rt = q.chart, ct = nt.dataSorting, gt = q.xAxis, dt = nt.turboThreshold, ht = this.xData, at = this.yData, J = q.pointArrayMap;
J = J && J.length;
var tt = nt.keys, ot, lt = 0, pt = 1, yt = null;
A = A || [];
var vt = A.length;
if (H = m(H, !0), ct && ct.enabled && (A = this.sortData(A)), Z !== !1 && vt && et && !q.cropped && !q.hasGroupedData && q.visible && !q.isSeriesBoosting && (ot = this.updateData(A, Y)), !ot) {
if (q.xIncrement = null, q.colorCounter = 0, this.parallelArrays.forEach(function(Ct) {
q[Ct + "Data"].length = 0;
}), dt && vt > dt)
if (yt = q.getFirstValidPoint(A), W(yt))
for (Y = 0; Y < vt; Y++)
ht[Y] = this.autoIncrement(), at[Y] = A[Y];
else if (I(yt))
if (J)
if (yt.length === J)
for (Y = 0; Y < vt; Y++)
ht[Y] = this.autoIncrement(), at[Y] = A[Y];
else
for (Y = 0; Y < vt; Y++)
Z = A[Y], ht[Y] = Z[0], at[Y] = Z.slice(
1,
J + 1
);
else if (tt && (lt = tt.indexOf("x"), pt = tt.indexOf("y"), lt = 0 <= lt ? lt : 0, pt = 0 <= pt ? pt : 1), yt.length === 1 && (pt = 0), lt === pt)
for (Y = 0; Y < vt; Y++)
ht[Y] = this.autoIncrement(), at[Y] = A[Y][pt];
else
for (Y = 0; Y < vt; Y++)
Z = A[Y], ht[Y] = Z[lt], at[Y] = Z[pt];
else
t(12, !1, rt);
else
for (Y = 0; Y < vt; Y++)
typeof A[Y] < "u" && (Z = { series: q }, q.pointClass.prototype.applyOptions.apply(Z, [A[Y]]), q.updateParallelArrays(Z, Y));
for (at && E(at[0]) && t(14, !0, rt), q.data = [], q.options.data = q.userOptions.data = A, Y = et; Y--; )
it[Y] && it[Y].destroy && it[Y].destroy();
gt && (gt.minRange = gt.userMinRange), q.isDirty = rt.isDirtyBox = !0, q.isDirtyData = !!it, Y = !1;
}
nt.legendType === "point" && (this.processData(), this.generatePoints()), H && rt.redraw(Y);
}, Q.prototype.sortData = function(A) {
var H = this, Y = H.options.dataSorting.sortKey || "y", Z = function(q, it) {
return p(it) && q.pointClass.prototype.optionsToObject.call({ series: q }, it) || {};
};
return A.forEach(function(q, it) {
A[it] = Z(H, q), A[it].index = it;
}, this), A.concat().sort(function(q, it) {
return q = D(Y, q), it = D(Y, it), it < q ? -1 : it > q ? 1 : 0;
}).forEach(function(q, it) {
q.x = it;
}, this), H.linkedSeries && H.linkedSeries.forEach(function(q) {
var it = q.options, et = it.data;
it.dataSorting && it.dataSorting.enabled || !et || (et.forEach(function(nt, rt) {
et[rt] = Z(q, nt), A[rt] && (et[rt].x = A[rt].x, et[rt].index = rt);
}), q.setData(et, !1));
}), A;
}, Q.prototype.getProcessedData = function(A) {
var H = this.xAxis, Y = this.options, Z = Y.cropThreshold, q = A || this.getExtremesFromAll || Y.getExtremesFromAll, it = this.isCartesian;
A = H && H.val2lin, Y = !(!H || !H.logarithmic);
var et = 0, nt = this.xData, rt = this.yData, ct = this.requireSorting, gt = !1, dt = nt.length;
if (H) {
gt = H.getExtremes();
var ht = gt.min, at = gt.max;
gt = H.categories && !H.names.length;
}
if (it && this.sorted && !q && (!Z || dt > Z || this.forceCrop)) {
if (nt[dt - 1] < ht || nt[0] > at)
nt = [], rt = [];
else if (this.yData && (nt[0] < ht || nt[dt - 1] > at)) {
var J = this.cropData(this.xData, this.yData, ht, at);
nt = J.xData, rt = J.yData, et = J.start, J = !0;
}
}
for (Z = nt.length || 1; --Z; )
if (H = Y ? A(nt[Z]) - A(nt[Z - 1]) : nt[Z] - nt[Z - 1], 0 < H && (typeof tt > "u" || H < tt))
var tt = H;
else
0 > H && ct && !gt && (t(15, !1, this.chart), ct = !1);
return { xData: nt, yData: rt, cropped: J, cropStart: et, closestPointRange: tt };
}, Q.prototype.processData = function(A) {
var H = this.xAxis;
if (this.isCartesian && !this.isDirty && !H.isDirty && !this.yAxis.isDirty && !A)
return !1;
A = this.getProcessedData(), this.cropped = A.cropped, this.cropStart = A.cropStart, this.processedXData = A.xData, this.processedYData = A.yData, this.closestPointRange = this.basePointRange = A.closestPointRange, P(this, "afterProcessData");
}, Q.prototype.cropData = function(A, H, Y, Z, q) {
var it = A.length, et, nt = 0, rt = it;
for (q = m(q, this.cropShoulder), et = 0; et < it; et++)
if (A[et] >= Y) {
nt = Math.max(0, et - q);
break;
}
for (Y = et; Y < it; Y++)
if (A[Y] > Z) {
rt = Y + q;
break;
}
return { xData: A.slice(nt, rt), yData: H.slice(
nt,
rt
), start: nt, end: rt };
}, Q.prototype.generatePoints = function() {
var A = this.options, H = A.data, Y = this.processedXData, Z = this.processedYData, q = this.pointClass, it = Y.length, et = this.cropStart || 0, nt = this.hasGroupedData, rt = A.keys, ct = [];
A = A.dataGrouping && A.dataGrouping.groupAll ? et : 0;
var gt, dt, ht = this.data;
if (!ht && !nt) {
var at = [];
at.length = H.length, ht = this.data = at;
}
for (rt && nt && (this.options.keys = !1), dt = 0; dt < it; dt++) {
if (at = et + dt, nt) {
var J = new q().init(this, [Y[dt]].concat(z(Z[dt])));
J.dataGroup = this.groupMap[A + dt], J.dataGroup.options && (J.options = J.dataGroup.options, s(J, J.dataGroup.options), delete J.dataLabels);
} else
(J = ht[at]) || typeof H[at] > "u" || (ht[at] = J = new q().init(this, H[at], Y[dt]));
J && (J.index = nt ? A + dt : at, ct[dt] = J);
}
if (this.options.keys = rt, ht && (it !== (gt = ht.length) || nt))
for (dt = 0; dt < gt; dt++)
dt !== et || nt || (dt += it), ht[dt] && (ht[dt].destroyElements(), ht[dt].plotX = void 0);
this.data = ht, this.points = ct, P(this, "afterGeneratePoints");
}, Q.prototype.getXExtremes = function(A) {
return { min: h(A), max: v(A) };
}, Q.prototype.getExtremes = function(A, H) {
var Y = this.xAxis, Z = this.yAxis, q = this.processedXData || this.xData, it = [], et = this.requireSorting ? this.cropShoulder : 0;
Z = Z ? Z.positiveValuesOnly : !1;
var nt, rt = 0, ct = 0, gt = 0;
A = A || this.stackedYData || this.processedYData || [];
var dt = A.length;
if (Y) {
var ht = Y.getExtremes();
rt = ht.min, ct = ht.max;
}
for (nt = 0; nt < dt; nt++) {
var at = q[nt];
ht = A[nt];
var J = (W(ht) || I(ht)) && (ht.length || 0 < ht || !Z);
if (at = H || this.getExtremesFromAll || this.options.getExtremesFromAll || this.cropped || !Y || (q[nt + et] || at) >= rt && (q[nt - et] || at) <= ct, J && at)
if (J = ht.length)
for (; J--; )
W(ht[J]) && (it[gt++] = ht[J]);
else
it[gt++] = ht;
}
return A = { activeYData: it, dataMin: h(it), dataMax: v(it) }, P(this, "afterGetExtremes", { dataExtremes: A }), A;
}, Q.prototype.applyExtremes = function() {
var A = this.getExtremes();
return this.dataMin = A.dataMin, this.dataMax = A.dataMax, A;
}, Q.prototype.getFirstValidPoint = function(A) {
for (var H = A.length, Y = 0, Z = null; Z === null && Y < H; )
Z = A[Y], Y++;
return Z;
}, Q.prototype.translate = function() {
this.processedXData || this.processData(), this.generatePoints();
var A = this.options, H = A.stacking, Y = this.xAxis, Z = Y.categories, q = this.enabledDataSorting, it = this.yAxis, et = this.points, nt = et.length, rt = this.pointPlacementToXValue(), ct = !!rt, gt = A.threshold, dt = A.startFromThreshold ? gt : 0, ht = this.zoneAxis || "y", at, J, tt = Number.MAX_VALUE;
for (at = 0; at < nt; at++) {
var ot = et[at], lt = ot.x, pt = void 0, yt = void 0, vt = ot.y, Ct = ot.low, Pt = H && it.stacking && it.stacking.stacks[(this.negStacks && vt < (dt ? 0 : gt) ? "-" : "") + this.stackKey];
if ((it.positiveValuesOnly && !it.validatePositiveValue(vt) || Y.positiveValuesOnly && !Y.validatePositiveValue(lt)) && (ot.isNull = !0), ot.plotX = J = i(c(Y.translate(lt, 0, 0, 0, 1, rt, this.type === "flags"), -1e5, 1e5)), H && this.visible && Pt && Pt[lt]) {
var At = this.getStackIndicator(
At,
lt,
this.index
);
ot.isNull || (pt = Pt[lt], yt = pt.points[At.key]);
}
if (I(yt) && (Ct = yt[0], vt = yt[1], Ct === dt && At.key === Pt[lt].base && (Ct = m(W(gt) && gt, it.min)), it.positiveValuesOnly && 0 >= Ct && (Ct = null), ot.total = ot.stackTotal = pt.total, ot.percentage = pt.total && ot.y / pt.total * 100, ot.stackY = vt, this.irregularWidths || pt.setOffset(this.pointXOffset || 0, this.barW || 0)), ot.yBottom = p(Ct) ? c(it.translate(Ct, 0, 1, 0, 1), -1e5, 1e5) : null, this.dataModify && (vt = this.dataModify.modifyValue(vt, at)), ot.plotY = void 0, W(vt) && (pt = it.translate(vt, !1, !0, !1, !0), typeof pt < "u" && (ot.plotY = c(
pt,
-1e5,
1e5
))), ot.isInside = this.isPointInside(ot), ot.clientX = ct ? i(Y.translate(lt, 0, 0, 0, 1, rt)) : J, ot.negative = ot[ht] < (A[ht + "Threshold"] || gt || 0), ot.category = Z && typeof Z[ot.x] < "u" ? Z[ot.x] : ot.x, !ot.isNull && ot.visible !== !1) {
typeof St < "u" && (tt = Math.min(tt, Math.abs(J - St)));
var St = J;
}
ot.zone = this.zones.length ? ot.getZone() : void 0, !ot.graphic && this.group && q && (ot.isNew = !0);
}
this.closestPointRangePx = tt, P(this, "afterTranslate");
}, Q.prototype.getValidPoints = function(A, H, Y) {
var Z = this.chart;
return (A || this.points || []).filter(function(q) {
return H && !Z.isInsidePlot(q.plotX, q.plotY, { inverted: Z.inverted }) ? !1 : q.visible !== !1 && (Y || !q.isNull);
});
}, Q.prototype.getClipBox = function() {
var A = this.chart, H = this.xAxis, Y = this.yAxis, Z = X(A.clipBox);
return H && H.len !== A.plotSizeX && (Z.width = H.len), Y && Y.len !== A.plotSizeY && (Z.height = Y.len), Z;
}, Q.prototype.getSharedClipKey = function() {
return this.sharedClipKey = (this.options.xAxis || 0) + "," + (this.options.yAxis || 0);
}, Q.prototype.setClip = function() {
var A = this.chart, H = this.group, Y = this.markerGroup, Z = A.sharedClips;
A = A.renderer;
var q = this.getClipBox(), it = this.getSharedClipKey(), et = Z[it];
et ? et.animate(q) : Z[it] = et = A.clipRect(q), H && H.clip(this.options.clip === !1 ? void 0 : et), Y && Y.clip();
}, Q.prototype.animate = function(A) {
var H = this.chart, Y = this.group, Z = this.markerGroup, q = H.inverted, it = x(this.options.animation), et = [this.getSharedClipKey(), it.duration, it.easing, it.defer].join(), nt = H.sharedClips[et], rt = H.sharedClips[et + "m"];
if (A && Y)
it = this.getClipBox(), nt ? nt.attr("height", it.height) : (it.width = 0, q && (it.x = H.plotHeight), nt = H.renderer.clipRect(it), H.sharedClips[et] = nt, rt = H.renderer.clipRect({ x: q ? (H.plotSizeX || 0) + 99 : -99, y: q ? -H.plotLeft : -H.plotTop, width: 99, height: q ? H.chartWidth : H.chartHeight }), H.sharedClips[et + "m"] = rt), Y.clip(nt), Z && Z.clip(rt);
else if (nt && !nt.hasClass("highcharts-animating")) {
H = this.getClipBox();
var ct = it.step;
Z && Z.element.childNodes.length && (it.step = function(gt, dt) {
ct && ct.apply(dt, arguments), rt && rt.element && rt.attr(dt.prop, dt.prop === "width" ? gt + 99 : gt);
}), nt.addClass("highcharts-animating").animate(H, it);
}
}, Q.prototype.afterAnimate = function() {
var A = this;
this.setClip(), g(
this.chart.sharedClips,
function(H, Y, Z) {
H && !A.chart.container.querySelector('[clip-path="url(#' + H.id + ')"]') && (H.destroy(), delete Z[Y]);
}
), this.finishedAnimating = !0, P(this, "afterAnimate");
}, Q.prototype.drawPoints = function() {
var A = this.points, H = this.chart, Y = this.options.marker, Z = this[this.specialGroup] || this.markerGroup, q = this.xAxis, it = m(Y.enabled, !q || q.isRadial ? !0 : null, this.closestPointRangePx >= Y.enabledThreshold * Y.radius), et, nt;
if (Y.enabled !== !1 || this._hasPointMarkers)
for (et = 0; et < A.length; et++) {
var rt = A[et], ct = (nt = rt.graphic) ? "animate" : "attr", gt = rt.marker || {}, dt = !!rt.marker;
if ((it && typeof gt.enabled > "u" || gt.enabled) && !rt.isNull && rt.visible !== !1) {
var ht = m(gt.symbol, this.symbol, "rect"), at = this.markerAttribs(rt, rt.selected && "select");
this.enabledDataSorting && (rt.startXPos = q.reversed ? -(at.width || 0) : q.width);
var J = rt.isInside !== !1;
nt ? nt[J ? "show" : "hide"](J).animate(at) : J && (0 < (at.width || 0) || rt.hasImage) && (rt.graphic = nt = H.renderer.symbol(ht, at.x, at.y, at.width, at.height, dt ? gt : Y).add(Z), this.enabledDataSorting && H.hasRendered && (nt.attr({ x: rt.startXPos }), ct = "animate")), nt && ct === "animate" && nt[J ? "show" : "hide"](J).animate(at), nt && !H.styledMode && nt[ct](this.pointAttribs(rt, rt.selected && "select")), nt && nt.addClass(rt.getClassName(), !0);
} else
nt && (rt.graphic = nt.destroy());
}
}, Q.prototype.markerAttribs = function(A, H) {
var Y = this.options, Z = Y.marker, q = A.marker || {}, it = q.symbol || Z.symbol, et = m(q.radius, Z.radius);
return H && (Z = Z.states[H], H = q.states && q.states[H], et = m(H && H.radius, Z && Z.radius, et + (Z && Z.radiusPlus || 0))), A.hasImage = it && it.indexOf("url") === 0, A.hasImage && (et = 0), A = { x: Y.crisp ? Math.floor(A.plotX - et) : A.plotX - et, y: A.plotY - et }, et && (A.width = A.height = 2 * et), A;
}, Q.prototype.pointAttribs = function(A, H) {
var Y = this.options.marker, Z = A && A.options, q = Z && Z.marker || {}, it = Z && Z.color, et = A && A.color, nt = A && A.zone && A.zone.color, rt = this.color;
return A = m(q.lineWidth, Y.lineWidth), Z = 1, rt = it || nt || et || rt, it = q.fillColor || Y.fillColor || rt, et = q.lineColor || Y.lineColor || rt, H = H || "normal", Y = Y.states[H] || {}, H = q.states && q.states[H] || {}, A = m(H.lineWidth, Y.lineWidth, A + m(H.lineWidthPlus, Y.lineWidthPlus, 0)), it = H.fillColor || Y.fillColor || it, et = H.lineColor || Y.lineColor || et, Z = m(H.opacity, Y.opacity, Z), { stroke: et, "stroke-width": A, fill: it, opacity: Z };
}, Q.prototype.destroy = function(A) {
var H = this, Y = H.chart, Z = /AppleWebKit\/533/.test(k.navigator.userAgent), q = H.data || [], it, et, nt, rt;
for (P(H, "destroy"), this.removeEvents(A), (H.axisTypes || []).forEach(function(ct) {
(rt = H[ct]) && rt.series && (a(rt.series, H), rt.isDirty = rt.forceRedraw = !0);
}), H.legendItem && H.chart.legend.destroyItem(H), et = q.length; et--; )
(nt = q[et]) && nt.destroy && nt.destroy();
H.clips && H.clips.forEach(function(ct) {
return ct.destroy();
}), w.clearTimeout(H.animationTimeout), g(H, function(ct, gt) {
ct instanceof j && !ct.survive && (it = Z && gt === "group" ? "hide" : "destroy", ct[it]());
}), Y.hoverSeries === H && (Y.hoverSeries = void 0), a(Y.series, H), Y.orderSeries(), g(H, function(ct, gt) {
A && gt === "hcEvents" || delete H[gt];
});
}, Q.prototype.applyZones = function() {
var A = this, H = this.chart, Y = H.renderer, Z = this.zones, q = this.clips || [], it = this.graph, et = this.area, nt = Math.max(H.chartWidth, H.chartHeight), rt = this[(this.zoneAxis || "y") + "Axis"], ct = H.inverted, gt, dt, ht, at, J, tt, ot, lt, pt = !1;
if (Z.length && (it || et) && rt && typeof rt.min < "u") {
var yt = rt.reversed, vt = rt.horiz;
it && !this.showLine && it.hide(), et && et.hide();
var Ct = rt.getExtremes();
Z.forEach(function(Pt, At) {
gt = yt ? vt ? H.plotWidth : 0 : vt ? 0 : rt.toPixels(Ct.min) || 0, gt = c(m(dt, gt), 0, nt), dt = c(Math.round(rt.toPixels(m(Pt.value, Ct.max), !0) || 0), 0, nt), pt && (gt = dt = rt.toPixels(Ct.max)), at = Math.abs(gt - dt), J = Math.min(gt, dt), tt = Math.max(gt, dt), rt.isXAxis ? (ht = { x: ct ? tt : J, y: 0, width: at, height: nt }, vt || (ht.x = H.plotHeight - ht.x)) : (ht = { x: 0, y: ct ? tt : J, width: nt, height: at }, vt && (ht.y = H.plotWidth - ht.y)), ct && Y.isVML && (ht = rt.isXAxis ? {
x: 0,
y: yt ? J : tt,
height: ht.width,
width: H.chartWidth
} : { x: ht.y - H.plotLeft - H.spacingBox.x, y: 0, width: ht.height, height: H.chartHeight }), q[At] ? q[At].animate(ht) : q[At] = Y.clipRect(ht), ot = A["zone-area-" + At], lt = A["zone-graph-" + At], it && lt && lt.clip(q[At]), et && ot && ot.clip(q[At]), pt = Pt.value > Ct.max, A.resetZones && dt === 0 && (dt = void 0);
}), this.clips = q;
} else
A.visible && (it && it.show(!0), et && et.show(!0));
}, Q.prototype.invertGroups = function(A) {
function H() {
["group", "markerGroup"].forEach(function(q) {
Y[q] && (Z.renderer.isVML && Y[q].attr({ width: Y.yAxis.len, height: Y.xAxis.len }), Y[q].width = Y.yAxis.len, Y[q].height = Y.xAxis.len, Y[q].invert(Y.isRadialSeries ? !1 : A));
});
}
var Y = this, Z = Y.chart;
Y.xAxis && (Y.eventsToUnbind.push(S(Z, "resize", H)), H(), Y.invertGroups = H);
}, Q.prototype.plotGroup = function(A, H, Y, Z, q) {
var it = this[A], et = !it;
return Y = { visibility: Y, zIndex: Z || 0.1 }, typeof this.opacity > "u" || this.chart.styledMode || this.state === "inactive" || (Y.opacity = this.opacity), et && (this[A] = it = this.chart.renderer.g().add(q)), it.addClass("highcharts-" + H + " highcharts-series-" + this.index + " highcharts-" + this.type + "-series " + (p(this.colorIndex) ? "highcharts-color-" + this.colorIndex + " " : "") + (this.options.className || "") + (it.hasClass("highcharts-tracker") ? " highcharts-tracker" : ""), !0), it.attr(Y)[et ? "attr" : "animate"](this.getPlotBox()), it;
}, Q.prototype.getPlotBox = function() {
var A = this.chart, H = this.xAxis, Y = this.yAxis;
return A.inverted && (H = Y, Y = this.xAxis), { translateX: H ? H.left : A.plotLeft, translateY: Y ? Y.top : A.plotTop, scaleX: 1, scaleY: 1 };
}, Q.prototype.removeEvents = function(A) {
A || L(this), this.eventsToUnbind.length && (this.eventsToUnbind.forEach(function(H) {
H();
}), this.eventsToUnbind.length = 0);
}, Q.prototype.render = function() {
var A = this, H = A.chart, Y = A.options, Z = x(Y.animation), q = A.visible ? "inherit" : "hidden", it = Y.zIndex, et = A.hasRendered, nt = H.seriesGroup, rt = H.inverted;
H = !A.finishedAnimating && H.renderer.isSVG ? Z.duration : 0, P(this, "render");
var ct = A.plotGroup("group", "series", q, it, nt);
A.markerGroup = A.plotGroup("markerGroup", "markers", q, it, nt), Y.clip !== !1 && A.setClip(), A.animate && H && A.animate(!0), ct.inverted = m(A.invertible, A.isCartesian) ? rt : !1, A.drawGraph && (A.drawGraph(), A.applyZones()), A.visible && A.drawPoints(), A.drawDataLabels && A.drawDataLabels(), A.redrawPoints && A.redrawPoints(), A.drawTracker && A.options.enableMouseTracking !== !1 && A.drawTracker(), A.invertGroups(rt), A.animate && H && A.animate(), et || (H && Z.defer && (H += Z.defer), A.animationTimeout = $(function() {
A.afterAnimate();
}, H || 0)), A.isDirty = !1, A.hasRendered = !0, P(A, "afterRender");
}, Q.prototype.redraw = function() {
var A = this.chart, H = this.isDirty || this.isDirtyData, Y = this.group, Z = this.xAxis, q = this.yAxis;
Y && (A.inverted && Y.attr({
width: A.plotWidth,
height: A.plotHeight
}), Y.animate({ translateX: m(Z && Z.left, A.plotLeft), translateY: m(q && q.top, A.plotTop) })), this.translate(), this.render(), H && delete this.kdTree;
}, Q.prototype.searchPoint = function(A, H) {
var Y = this.xAxis, Z = this.yAxis, q = this.chart.inverted;
return this.searchKDTree({ clientX: q ? Y.len - A.chartY + Y.pos : A.chartX - Y.pos, plotY: q ? Z.len - A.chartX + Z.pos : A.chartY - Z.pos }, H, A);
}, Q.prototype.buildKDTree = function(A) {
function H(q, it, et) {
var nt = q && q.length;
if (nt) {
var rt = Y.kdAxisArray[it % et];
return q.sort(function(ct, gt) {
return ct[rt] - gt[rt];
}), nt = Math.floor(nt / 2), { point: q[nt], left: H(q.slice(0, nt), it + 1, et), right: H(q.slice(nt + 1), it + 1, et) };
}
}
this.buildingKdTree = !0;
var Y = this, Z = -1 < Y.options.findNearestPointBy.indexOf("y") ? 2 : 1;
delete Y.kdTree, $(function() {
Y.kdTree = H(Y.getValidPoints(null, !Y.directTouch), Z, Z), Y.buildingKdTree = !1;
}, Y.options.kdNow || A && A.type === "touchstart" ? 0 : 1);
}, Q.prototype.searchKDTree = function(A, H, Y) {
function Z(rt, ct, gt, dt) {
var ht = ct.point, at = q.kdAxisArray[gt % dt], J = ht, tt = p(rt[it]) && p(ht[it]) ? Math.pow(rt[it] - ht[it], 2) : null, ot = p(rt[et]) && p(ht[et]) ? Math.pow(rt[et] - ht[et], 2) : null;
return ot = (tt || 0) + (ot || 0), ht.dist = p(ot) ? Math.sqrt(ot) : Number.MAX_VALUE, ht.distX = p(tt) ? Math.sqrt(tt) : Number.MAX_VALUE, at = rt[at] - ht[at], ot = 0 > at ? "left" : "right", tt = 0 > at ? "right" : "left", ct[ot] && (ot = Z(rt, ct[ot], gt + 1, dt), J = ot[nt] < J[nt] ? ot : ht), ct[tt] && Math.sqrt(at * at) < J[nt] && (rt = Z(rt, ct[tt], gt + 1, dt), J = rt[nt] < J[nt] ? rt : J), J;
}
var q = this, it = this.kdAxisArray[0], et = this.kdAxisArray[1], nt = H ? "distX" : "dist";
if (H = -1 < q.options.findNearestPointBy.indexOf("y") ? 2 : 1, this.kdTree || this.buildingKdTree || this.buildKDTree(Y), this.kdTree)
return Z(
A,
this.kdTree,
H,
H
);
}, Q.prototype.pointPlacementToXValue = function() {
var A = this.options, H = A.pointRange, Y = this.xAxis;
return A = A.pointPlacement, A === "between" && (A = Y.reversed ? -0.5 : 0.5), W(A) ? A * (H || Y.pointRange) : 0;
}, Q.prototype.isPointInside = function(A) {
var H = this.chart, Y = this.xAxis, Z = this.yAxis;
return typeof A.plotY < "u" && typeof A.plotX < "u" && 0 <= A.plotY && A.plotY <= (Z ? Z.len : H.plotHeight) && 0 <= A.plotX && A.plotX <= (Y ? Y.len : H.plotWidth);
}, Q.prototype.drawTracker = function() {
var A = this, H = A.options, Y = H.trackByArea, Z = [].concat(Y ? A.areaPath : A.graphPath), q = A.chart, it = q.pointer, et = q.renderer, nt = q.options.tooltip.snap, rt = A.tracker, ct = function(dt) {
q.hoverSeries !== A && A.onMouseOver();
}, gt = "rgba(192,192,192," + (R ? 1e-4 : 2e-3) + ")";
rt ? rt.attr({ d: Z }) : A.graph && (A.tracker = et.path(Z).attr({ visibility: A.visible ? "visible" : "hidden", zIndex: 2 }).addClass(Y ? "highcharts-tracker-area" : "highcharts-tracker-line").add(A.group), q.styledMode || A.tracker.attr({ "stroke-linecap": "round", "stroke-linejoin": "round", stroke: gt, fill: Y ? gt : "none", "stroke-width": A.graph.strokeWidth() + (Y ? 0 : 2 * nt) }), [A.tracker, A.markerGroup, A.dataLabelsGroup].forEach(function(dt) {
dt && (dt.addClass("highcharts-tracker").on("mouseover", ct).on("mouseout", function(ht) {
it.onTrackerMouseOut(ht);
}), H.cursor && !q.styledMode && dt.css({ cursor: H.cursor }), O) && dt.on("touchstart", ct);
})), P(this, "afterDrawTracker");
}, Q.prototype.addPoint = function(A, H, Y, Z, q) {
var it = this.options, et = this.data, nt = this.chart, rt = this.xAxis;
rt = rt && rt.hasNames && rt.names;
var ct = it.data, gt = this.xData, dt;
H = m(H, !0);
var ht = { series: this };
this.pointClass.prototype.applyOptions.apply(
ht,
[A]
);
var at = ht.x, J = gt.length;
if (this.requireSorting && at < gt[J - 1])
for (dt = !0; J && gt[J - 1] > at; )
J--;
this.updateParallelArrays(ht, "splice", J, 0, 0), this.updateParallelArrays(ht, J), rt && ht.name && (rt[at] = ht.name), ct.splice(J, 0, A), dt && (this.data.splice(J, 0, null), this.processData()), it.legendType === "point" && this.generatePoints(), Y && (et[0] && et[0].remove ? et[0].remove(!1) : (et.shift(), this.updateParallelArrays(ht, "shift"), ct.shift())), q !== !1 && P(this, "addPoint", { point: ht }), this.isDirtyData = this.isDirty = !0, H && nt.redraw(Z);
}, Q.prototype.removePoint = function(A, H, Y) {
var Z = this, q = Z.data, it = q[A], et = Z.points, nt = Z.chart, rt = function() {
et && et.length === q.length && et.splice(A, 1), q.splice(A, 1), Z.options.data.splice(A, 1), Z.updateParallelArrays(it || { series: Z }, "splice", A, 1), it && it.destroy(), Z.isDirty = !0, Z.isDirtyData = !0, H && nt.redraw();
};
f(Y, nt), H = m(H, !0), it ? it.firePointEvent("remove", null, rt) : rt();
}, Q.prototype.remove = function(A, H, Y, Z) {
function q() {
it.destroy(Z), et.isDirtyLegend = et.isDirtyBox = !0, et.linkSeries(), m(A, !0) && et.redraw(H);
}
var it = this, et = it.chart;
Y !== !1 ? P(
it,
"remove",
null,
q
) : q();
}, Q.prototype.update = function(A, H) {
A = u(A, this.userOptions), P(this, "update", { options: A });
var Y = this, Z = Y.chart, q = Y.userOptions, it = Y.initialType || Y.type, et = Z.options.plotOptions, nt = b[it].prototype, rt = Y.finishedAnimating && { animation: !1 }, ct = {}, gt, dt = ["eventOptions", "navigatorSeries", "baseSeries"], ht = A.type || q.type || Z.options.chart.type, at = !(this.hasDerivedData || ht && ht !== this.type || typeof A.pointStart < "u" || typeof A.pointInterval < "u" || typeof A.relativeXValue < "u" || Y.hasOptionChanged("dataGrouping") || Y.hasOptionChanged("pointStart") || Y.hasOptionChanged("pointInterval") || Y.hasOptionChanged("pointIntervalUnit") || Y.hasOptionChanged("keys"));
if (ht = ht || it, at && (dt.push("data", "isDirtyData", "points", "processedXData", "processedYData", "xIncrement", "cropped", "_hasPointMarkers", "_hasPointLabels", "clips", "nodes", "layout", "mapMap", "mapData", "minY", "maxY", "minX", "maxX"), A.visible !== !1 && dt.push("area", "graph"), Y.parallelArrays.forEach(function(tt) {
dt.push(tt + "Data");
}), A.data && (A.dataSorting && s(Y.options.dataSorting, A.dataSorting), this.setData(A.data, !1))), A = X(q, rt, { index: typeof q.index > "u" ? Y.index : q.index, pointStart: m(et && et.series && et.series.pointStart, q.pointStart, Y.xData[0]) }, !at && { data: Y.options.data }, A), at && A.data && (A.data = Y.options.data), dt = ["group", "markerGroup", "dataLabelsGroup", "transformGroup"].concat(dt), dt.forEach(function(tt) {
dt[tt] = Y[tt], delete Y[tt];
}), et = !1, b[ht]) {
if (et = ht !== Y.type, Y.remove(!1, !1, !1, !0), et)
if (Object.setPrototypeOf)
Object.setPrototypeOf(Y, b[ht].prototype);
else {
rt = Object.hasOwnProperty.call(Y, "hcEvents") && Y.hcEvents;
for (gt in nt)
Y[gt] = void 0;
s(Y, b[ht].prototype), rt ? Y.hcEvents = rt : delete Y.hcEvents;
}
} else
t(17, !0, Z, { missingModuleFor: ht });
if (dt.forEach(function(tt) {
Y[tt] = dt[tt];
}), Y.init(Z, A), at && this.points) {
var J = Y.options;
J.visible === !1 ? (ct.graphic = 1, ct.dataLabel = 1) : Y._hasPointLabels || (A = J.marker, nt = J.dataLabels, !A || A.enabled !== !1 && (q.marker && q.marker.symbol) === A.symbol || (ct.graphic = 1), nt && nt.enabled === !1 && (ct.dataLabel = 1)), this.points.forEach(function(tt) {
tt && tt.series && (tt.resolveColor(), Object.keys(ct).length && tt.destroyElements(ct), J.showInLegend === !1 && tt.legendItem && Z.legend.destroyItem(tt));
}, this);
}
Y.initialType = it, Z.linkSeries(), et && Y.linkedSeries.length && (Y.isDirtyData = !0), P(this, "afterUpdate"), m(H, !0) && Z.redraw(at ? void 0 : !1);
}, Q.prototype.setName = function(A) {
this.name = this.options.name = this.userOptions.name = A, this.chart.isDirtyLegend = !0;
}, Q.prototype.hasOptionChanged = function(A) {
var H = this.options[A], Y = this.chart.options.plotOptions, Z = this.userOptions[A];
return Z ? H !== Z : H !== m(
Y && Y[this.type] && Y[this.type][A],
Y && Y.series && Y.series[A],
H
);
}, Q.prototype.onMouseOver = function() {
var A = this.chart, H = A.hoverSeries;
A.pointer.setHoverChartIndex(), H && H !== this && H.onMouseOut(), this.options.events.mouseOver && P(this, "mouseOver"), this.setState("hover"), A.hoverSeries = this;
}, Q.prototype.onMouseOut = function() {
var A = this.options, H = this.chart, Y = H.tooltip, Z = H.hoverPoint;
H.hoverSeries = null, Z && Z.onMouseOut(), this && A.events.mouseOut && P(this, "mouseOut"), !Y || this.stickyTracking || Y.shared && !this.noSharedTooltip || Y.hide(), H.series.forEach(function(q) {
q.setState(
"",
!0
);
});
}, Q.prototype.setState = function(A, H) {
var Y = this, Z = Y.options, q = Y.graph, it = Z.inactiveOtherPoints, et = Z.states, nt = m(et[A || "normal"] && et[A || "normal"].animation, Y.chart.options.chart.animation), rt = Z.lineWidth, ct = 0, gt = Z.opacity;
if (A = A || "", Y.state !== A && ([Y.group, Y.markerGroup, Y.dataLabelsGroup].forEach(function(dt) {
dt && (Y.state && dt.removeClass("highcharts-series-" + Y.state), A && dt.addClass("highcharts-series-" + A));
}), Y.state = A, !Y.chart.styledMode)) {
if (et[A] && et[A].enabled === !1)
return;
if (A && (rt = et[A].lineWidth || rt + (et[A].lineWidthPlus || 0), gt = m(et[A].opacity, gt)), q && !q.dashstyle)
for (Z = { "stroke-width": rt }, q.animate(Z, nt); Y["zone-graph-" + ct]; )
Y["zone-graph-" + ct].animate(Z, nt), ct += 1;
it || [Y.group, Y.markerGroup, Y.dataLabelsGroup, Y.labelBySeries].forEach(function(dt) {
dt && dt.animate({ opacity: gt }, nt);
});
}
H && it && Y.points && Y.setAllPointsToState(A || void 0);
}, Q.prototype.setAllPointsToState = function(A) {
this.points.forEach(function(H) {
H.setState && H.setState(A);
});
}, Q.prototype.setVisible = function(A, H) {
var Y = this, Z = Y.chart, q = Y.legendItem, it = Z.options.chart.ignoreHiddenSeries, et = Y.visible, nt = (Y.visible = A = Y.options.visible = Y.userOptions.visible = typeof A > "u" ? !et : A) ? "show" : "hide";
["group", "dataLabelsGroup", "markerGroup", "tracker", "tt"].forEach(function(rt) {
Y[rt] && Y[rt][nt]();
}), (Z.hoverSeries === Y || (Z.hoverPoint && Z.hoverPoint.series) === Y) && Y.onMouseOut(), q && Z.legend.colorizeItem(Y, A), Y.isDirty = !0, Y.options.stacking && Z.series.forEach(function(rt) {
rt.options.stacking && rt.visible && (rt.isDirty = !0);
}), Y.linkedSeries.forEach(function(rt) {
rt.setVisible(A, !1);
}), it && (Z.isDirtyBox = !0), P(Y, nt), H !== !1 && Z.redraw();
}, Q.prototype.show = function() {
this.setVisible(!0);
}, Q.prototype.hide = function() {
this.setVisible(!1);
}, Q.prototype.select = function(A) {
this.selected = A = this.options.selected = typeof A > "u" ? !this.selected : A, this.checkbox && (this.checkbox.checked = A), P(this, A ? "select" : "unselect");
}, Q.prototype.shouldShowTooltip = function(A, H, Y) {
return Y === void 0 && (Y = {}), Y.series = this, Y.visiblePlotOnly = !0, this.chart.isInsidePlot(A, H, Y);
}, Q.defaultOptions = F, Q;
}(), s(y.prototype, { axisTypes: [
"xAxis",
"yAxis"
], coll: "series", colorCounter: 0, cropShoulder: 1, directTouch: !1, drawLegendSymbol: G.drawLineMarker, isCartesian: !0, kdAxisArray: ["clientX", "plotY"], parallelArrays: ["x", "y"], pointClass: V, requireSorting: !0, sorted: !0 }), B.series = y, y;
}), C(o, "Extensions/ScrollablePlotArea.js", [o["Core/Animation/AnimationUtilities.js"], o["Core/Axis/Axis.js"], o["Core/Chart/Chart.js"], o["Core/Series/Series.js"], o["Core/Renderer/RendererRegistry.js"], o["Core/Utilities.js"]], function(y, N, _, U, G, V) {
var F = y.stop, B = V.addEvent, j = V.createElement, w = V.merge, x = V.pick;
B(_, "afterSetChartSize", function(f) {
var l = this.options.chart.scrollablePlotArea, T = l && l.minWidth;
if (l = l && l.minHeight, !this.renderer.forExport) {
if (T) {
if (this.scrollablePixelsX = T = Math.max(0, T - this.chartWidth)) {
this.scrollablePlotBox = this.renderer.scrollablePlotBox = w(this.plotBox), this.plotBox.width = this.plotWidth += T, this.inverted ? this.clipBox.height += T : this.clipBox.width += T;
var O = { 1: { name: "right", value: T } };
}
} else
l && (this.scrollablePixelsY = T = Math.max(
0,
l - this.chartHeight
)) && (this.scrollablePlotBox = this.renderer.scrollablePlotBox = w(this.plotBox), this.plotBox.height = this.plotHeight += T, this.inverted ? this.clipBox.width += T : this.clipBox.height += T, O = { 2: { name: "bottom", value: T } });
O && !f.skipAxes && this.axes.forEach(function(R) {
O[R.side] ? R.getPlotLinePath = function() {
var k = O[R.side].name, b = this[k];
this[k] = b - O[R.side].value;
var S = N.prototype.getPlotLinePath.apply(this, arguments);
return this[k] = b, S;
} : (R.setAxisSize(), R.setAxisTranslation());
});
}
}), B(_, "render", function() {
this.scrollablePixelsX || this.scrollablePixelsY ? (this.setUpScrolling && this.setUpScrolling(), this.applyFixed()) : this.fixedDiv && this.applyFixed();
}), _.prototype.setUpScrolling = function() {
var f = this, l = { WebkitOverflowScrolling: "touch", overflowX: "hidden", overflowY: "hidden" };
this.scrollablePixelsX && (l.overflowX = "auto"), this.scrollablePixelsY && (l.overflowY = "auto"), this.scrollingParent = j("div", { className: "highcharts-scrolling-parent" }, { position: "relative" }, this.renderTo), this.scrollingContainer = j(
"div",
{ className: "highcharts-scrolling" },
l,
this.scrollingParent
), B(this.scrollingContainer, "scroll", function() {
f.pointer && delete f.pointer.chartPosition;
}), this.innerContainer = j("div", { className: "highcharts-inner-container" }, null, this.scrollingContainer), this.innerContainer.appendChild(this.container), this.setUpScrolling = null;
}, _.prototype.moveFixedElements = function() {
var f = this.container, l = this.fixedRenderer, T = ".highcharts-contextbutton .highcharts-credits .highcharts-legend .highcharts-legend-checkbox .highcharts-navigator-series .highcharts-navigator-xaxis .highcharts-navigator-yaxis .highcharts-navigator .highcharts-reset-zoom .highcharts-drillup-button .highcharts-scrollbar .highcharts-subtitle .highcharts-title".split(" "), O;
this.scrollablePixelsX && !this.inverted ? O = ".highcharts-yaxis" : this.scrollablePixelsX && this.inverted || this.scrollablePixelsY && !this.inverted ? O = ".highcharts-xaxis" : this.scrollablePixelsY && this.inverted && (O = ".highcharts-yaxis"), O && T.push(O + ":not(.highcharts-radial-axis)", O + "-labels:not(.highcharts-radial-axis-labels)"), T.forEach(function(R) {
[].forEach.call(f.querySelectorAll(R), function(k) {
(k.namespaceURI === l.SVG_NS ? l.box : l.box.parentNode).appendChild(k), k.style.pointerEvents = "auto";
});
});
}, _.prototype.applyFixed = function() {
var f = !this.fixedDiv, l = this.options.chart, T = l.scrollablePlotArea, O = G.getRendererType();
f ? (this.fixedDiv = j("div", { className: "highcharts-fixed" }, { position: "absolute", overflow: "hidden", pointerEvents: "none", zIndex: (l.style && l.style.zIndex || 0) + 2, top: 0 }, null, !0), this.scrollingContainer && this.scrollingContainer.parentNode.insertBefore(this.fixedDiv, this.scrollingContainer), this.renderTo.style.overflow = "visible", this.fixedRenderer = l = new O(
this.fixedDiv,
this.chartWidth,
this.chartHeight,
this.options.chart.style
), this.scrollableMask = l.path().attr({ fill: this.options.chart.backgroundColor || "#fff", "fill-opacity": x(T.opacity, 0.85), zIndex: -1 }).addClass("highcharts-scrollable-mask").add(), B(this, "afterShowResetZoom", this.moveFixedElements), B(this, "afterDrilldown", this.moveFixedElements), B(this, "afterLayOutTitles", this.moveFixedElements)) : this.fixedRenderer.setSize(this.chartWidth, this.chartHeight), (this.scrollableDirty || f) && (this.scrollableDirty = !1, this.moveFixedElements()), l = this.chartWidth + (this.scrollablePixelsX || 0), O = this.chartHeight + (this.scrollablePixelsY || 0), F(this.container), this.container.style.width = l + "px", this.container.style.height = O + "px", this.renderer.boxWrapper.attr({ width: l, height: O, viewBox: [0, 0, l, O].join(" ") }), this.chartBackground.attr({ width: l, height: O }), this.scrollingContainer.style.height = this.chartHeight + "px", f && (T.scrollPositionX && (this.scrollingContainer.scrollLeft = this.scrollablePixelsX * T.scrollPositionX), T.scrollPositionY && (this.scrollingContainer.scrollTop = this.scrollablePixelsY * T.scrollPositionY)), O = this.axisOffset, f = this.plotTop - O[0] - 1, T = this.plotLeft - O[3] - 1, l = this.plotTop + this.plotHeight + O[2] + 1, O = this.plotLeft + this.plotWidth + O[1] + 1;
var R = this.plotLeft + this.plotWidth - (this.scrollablePixelsX || 0), k = this.plotTop + this.plotHeight - (this.scrollablePixelsY || 0);
f = this.scrollablePixelsX ? [["M", 0, f], ["L", this.plotLeft - 1, f], ["L", this.plotLeft - 1, l], ["L", 0, l], ["Z"], ["M", R, f], ["L", this.chartWidth, f], ["L", this.chartWidth, l], ["L", R, l], ["Z"]] : this.scrollablePixelsY ? [["M", T, 0], ["L", T, this.plotTop - 1], ["L", O, this.plotTop - 1], ["L", O, 0], ["Z"], ["M", T, k], ["L", T, this.chartHeight], ["L", O, this.chartHeight], ["L", O, k], ["Z"]] : [["M", 0, 0]], this.redrawTrigger !== "adjustHeight" && this.scrollableMask.attr({ d: f });
}, B(N, "afterInit", function() {
this.chart.scrollableDirty = !0;
}), B(U, "show", function() {
this.chart.scrollableDirty = !0;
});
}), C(o, "Core/Axis/StackingAxis.js", [o["Core/Animation/AnimationUtilities.js"], o["Core/Axis/Axis.js"], o["Core/Utilities.js"]], function(y, N, _) {
var U = y.getDeferredAnimation, G = _.addEvent, V = _.destroyObjectProperties, F = _.fireEvent, B = _.isNumber, j = _.objectEach, w;
return function(x) {
function f() {
var R = this.stacking;
if (R) {
var k = R.stacks;
j(k, function(b, S) {
V(b), k[S] = null;
}), R && R.stackTotalGroup && R.stackTotalGroup.destroy();
}
}
function l() {
this.stacking || (this.stacking = new O(this));
}
var T = [];
x.compose = function(R) {
return T.indexOf(R) === -1 && (T.push(R), G(R, "init", l), G(R, "destroy", f)), R;
};
var O = function() {
function R(k) {
this.oldStacks = {}, this.stacks = {}, this.stacksTouched = 0, this.axis = k;
}
return R.prototype.buildStacks = function() {
var k = this.axis, b = k.series, S = k.options.reversedStacks, v = b.length, h;
if (!k.isXAxis) {
for (this.usePercentage = !1, h = v; h--; ) {
var c = b[S ? h : v - h - 1];
c.setStackedPoints(), c.setGroupedPoints();
}
for (h = 0; h < v; h++)
b[h].modifyStacks();
F(k, "afterBuildStacks");
}
}, R.prototype.cleanStacks = function() {
if (!this.axis.isXAxis) {
if (this.oldStacks)
var k = this.stacks = this.oldStacks;
j(k, function(b) {
j(b, function(S) {
S.cumulative = S.total;
});
});
}
}, R.prototype.resetStacks = function() {
var k = this, b = k.stacks;
k.axis.isXAxis || j(b, function(S) {
j(
S,
function(v, h) {
B(v.touched) && v.touched < k.stacksTouched ? (v.destroy(), delete S[h]) : (v.total = null, v.cumulative = null);
}
);
});
}, R.prototype.renderStackTotals = function() {
var k = this.axis, b = k.chart, S = b.renderer, v = this.stacks;
k = U(b, k.options.stackLabels && k.options.stackLabels.animation || !1);
var h = this.stackTotalGroup = this.stackTotalGroup || S.g("stack-labels").attr({ visibility: "visible", zIndex: 6, opacity: 0 }).add();
h.translate(b.plotLeft, b.plotTop), j(v, function(c) {
j(c, function(u) {
u.render(h);
});
}), h.animate(
{ opacity: 1 },
k
);
}, R;
}();
x.Additions = O;
}(w || (w = {})), w;
}), C(o, "Extensions/Stacking.js", [o["Core/Axis/Axis.js"], o["Core/Chart/Chart.js"], o["Core/FormatUtilities.js"], o["Core/Globals.js"], o["Core/Series/Series.js"], o["Core/Axis/StackingAxis.js"], o["Core/Utilities.js"]], function(y, N, _, U, G, V, F) {
var B = _.format, j = F.correctFloat, w = F.defined, x = F.destroyObjectProperties, f = F.isArray, l = F.isNumber, T = F.objectEach, O = F.pick, R = function() {
function k(b, S, v, h, c) {
var u = b.chart.inverted;
this.axis = b, this.isNegative = v, this.options = S = S || {}, this.x = h, this.total = null, this.points = {}, this.hasValidPoints = !1, this.stack = c, this.rightCliff = this.leftCliff = 0, this.alignOptions = { align: S.align || (u ? v ? "left" : "right" : "center"), verticalAlign: S.verticalAlign || (u ? "middle" : v ? "bottom" : "top"), y: S.y, x: S.x }, this.textAlign = S.textAlign || (u ? v ? "right" : "left" : "center");
}
return k.prototype.destroy = function() {
x(this, this.axis);
}, k.prototype.render = function(b) {
var S = this.axis.chart, v = this.options, h = v.format;
h = h ? B(h, this, S) : v.formatter.call(this), this.label ? this.label.attr({
text: h,
visibility: "hidden"
}) : (this.label = S.renderer.label(h, null, null, v.shape, null, null, v.useHTML, !1, "stack-labels"), h = { r: v.borderRadius || 0, text: h, rotation: v.rotation, padding: O(v.padding, 5), visibility: "hidden" }, S.styledMode || (h.fill = v.backgroundColor, h.stroke = v.borderColor, h["stroke-width"] = v.borderWidth, this.label.css(v.style)), this.label.attr(h), this.label.added || this.label.add(b)), this.label.labelrank = S.plotSizeY;
}, k.prototype.setOffset = function(b, S, v, h, c) {
var u = this.axis, i = u.chart;
h = u.translate(u.stacking.usePercentage ? 100 : h || this.total, 0, 0, 0, 1), v = u.translate(v || 0), v = w(h) && Math.abs(h - v), b = O(c, i.xAxis[0].translate(this.x)) + b, u = w(h) && this.getStackBox(i, this, b, h, S, v, u), S = this.label, v = this.isNegative, b = O(this.options.overflow, "justify") === "justify";
var p = this.textAlign;
S && u && (c = S.getBBox(), h = S.padding, p = p === "left" ? i.inverted ? -h : h : p === "right" ? c.width : i.inverted && p === "center" ? c.width / 2 : i.inverted ? v ? c.width + h : -h : c.width / 2, v = i.inverted ? c.height / 2 : v ? -h : c.height, this.alignOptions.x = O(this.options.x, 0), this.alignOptions.y = O(this.options.y, 0), u.x -= p, u.y -= v, S.align(this.alignOptions, null, u), i.isInsidePlot(S.alignAttr.x + p - this.alignOptions.x, S.alignAttr.y + v - this.alignOptions.y) ? S.show() : (S.alignAttr.y = -9999, b = !1), b && G.prototype.justifyDataLabel.call(this.axis, S, this.alignOptions, S.alignAttr, c, u), S.attr({ x: S.alignAttr.x, y: S.alignAttr.y }), O(!b && this.options.crop, !0) && ((i = l(S.x) && l(S.y) && i.isInsidePlot(S.x - h + S.width, S.y) && i.isInsidePlot(S.x + h, S.y)) || S.hide()));
}, k.prototype.getStackBox = function(b, S, v, h, c, u, i) {
var p = S.axis.reversed, a = b.inverted, t = i.height + i.pos - (a ? b.plotLeft : b.plotTop);
return S = S.isNegative && !p || !S.isNegative && p, { x: a ? S ? h - i.right : h - u + i.pos - b.plotLeft : v + b.xAxis[0].transB - b.plotLeft, y: a ? i.height - v - c : S ? t - h - u : t - h, width: a ? u : c, height: a ? c : u };
}, k;
}();
return N.prototype.getStacks = function() {
var k = this, b = k.inverted;
k.yAxis.forEach(function(S) {
S.stacking && S.stacking.stacks && S.hasVisibleSeries && (S.stacking.oldStacks = S.stacking.stacks);
}), k.series.forEach(function(S) {
var v = S.xAxis && S.xAxis.options || {};
!S.options.stacking || S.visible !== !0 && k.options.chart.ignoreHiddenSeries !== !1 || (S.stackKey = [S.type, O(S.options.stack, ""), b ? v.top : v.left, b ? v.height : v.width].join());
});
}, V.compose(y), G.prototype.setGroupedPoints = function() {
var k = this.yAxis.stacking;
this.options.centerInCategory && (this.is("column") || this.is("columnrange")) && !this.options.stacking && 1 < this.chart.series.length ? G.prototype.setStackedPoints.call(this, "group") : k && T(k.stacks, function(b, S) {
S.slice(-5) === "group" && (T(b, function(v) {
return v.destroy();
}), delete k.stacks[S]);
});
}, G.prototype.setStackedPoints = function(k) {
var b = k || this.options.stacking;
if (b && (this.visible === !0 || this.chart.options.chart.ignoreHiddenSeries === !1)) {
var S = this.processedXData, v = this.processedYData, h = [], c = v.length, u = this.options, i = u.threshold, p = O(u.startFromThreshold && i, 0);
u = u.stack, k = k ? this.type + "," + b : this.stackKey;
var a = "-" + k, t = this.negStacks, s = this.yAxis, n = s.stacking.stacks, P = s.stacking.oldStacks, D, I;
for (s.stacking.stacksTouched += 1, I = 0; I < c; I++) {
var W = S[I], E = v[I], X = this.getStackIndicator(
X,
W,
this.index
), g = X.key, m = (D = t && E < (p ? 0 : i)) ? a : k;
n[m] || (n[m] = {}), n[m][W] || (P[m] && P[m][W] ? (n[m][W] = P[m][W], n[m][W].total = null) : n[m][W] = new R(s, s.options.stackLabels, D, W, u)), m = n[m][W], E !== null ? (m.points[g] = m.points[this.index] = [O(m.cumulative, p)], w(m.cumulative) || (m.base = g), m.touched = s.stacking.stacksTouched, 0 < X.index && this.singleStacks === !1 && (m.points[g][0] = m.points[this.index + "," + W + ",0"][0])) : m.points[g] = m.points[this.index] = null, b === "percent" ? (D = D ? k : a, t && n[D] && n[D][W] ? (D = n[D][W], m.total = D.total = Math.max(D.total, m.total) + Math.abs(E) || 0) : m.total = j(m.total + (Math.abs(E) || 0))) : b === "group" ? (f(E) && (E = E[0]), E !== null && (m.total = (m.total || 0) + 1)) : m.total = j(m.total + (E || 0)), m.cumulative = b === "group" ? (m.total || 1) - 1 : O(m.cumulative, p) + (E || 0), E !== null && (m.points[g].push(m.cumulative), h[I] = m.cumulative, m.hasValidPoints = !0);
}
b === "percent" && (s.stacking.usePercentage = !0), b !== "group" && (this.stackedYData = h), s.stacking.oldStacks = {};
}
}, G.prototype.modifyStacks = function() {
var k = this, b = k.stackKey, S = k.yAxis.stacking.stacks, v = k.processedXData, h, c = k.options.stacking;
k[c + "Stacker"] && [b, "-" + b].forEach(function(u) {
for (var i = v.length, p, a; i--; )
p = v[i], h = k.getStackIndicator(h, p, k.index, u), (a = (p = S[u] && S[u][p]) && p.points[h.key]) && k[c + "Stacker"](a, p, i);
});
}, G.prototype.percentStacker = function(k, b, S) {
b = b.total ? 100 / b.total : 0, k[0] = j(k[0] * b), k[1] = j(k[1] * b), this.stackedYData[S] = k[1];
}, G.prototype.getStackIndicator = function(k, b, S, v) {
return !w(k) || k.x !== b || v && k.key !== v ? k = { x: b, index: 0, key: v } : k.index++, k.key = [S, b, k.index].join(), k;
}, U.StackItem = R, U.StackItem;
}), C(o, "Series/Line/LineSeries.js", [o["Core/Series/Series.js"], o["Core/Series/SeriesRegistry.js"], o["Core/Utilities.js"]], function(y, N, _) {
var U = this && this.__extends || function() {
var F = function(B, j) {
return F = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(w, x) {
w.__proto__ = x;
} || function(w, x) {
for (var f in x)
x.hasOwnProperty(f) && (w[f] = x[f]);
}, F(B, j);
};
return function(B, j) {
function w() {
this.constructor = B;
}
F(B, j), B.prototype = j === null ? Object.create(j) : (w.prototype = j.prototype, new w());
};
}(), G = _.defined, V = _.merge;
return _ = function(F) {
function B() {
var j = F !== null && F.apply(this, arguments) || this;
return j.data = void 0, j.options = void 0, j.points = void 0, j;
}
return U(B, F), B.prototype.drawGraph = function() {
var j = this, w = this.options, x = (this.gappedPath || this.getGraphPath).call(this), f = this.chart.styledMode, l = [["graph", "highcharts-graph"]];
f || l[0].push(w.lineColor || this.color || "#cccccc", w.dashStyle), l = j.getZonesGraphs(l), l.forEach(function(T, O) {
var R = T[0], k = j[R], b = k ? "animate" : "attr";
k ? (k.endX = j.preventGraphAnimation ? null : x.xMap, k.animate({ d: x })) : x.length && (j[R] = k = j.chart.renderer.path(x).addClass(T[1]).attr({ zIndex: 1 }).add(j.group)), k && !f && (R = { stroke: T[2], "stroke-width": w.lineWidth, fill: j.fillGraph && j.color || "none" }, T[3] ? R.dashstyle = T[3] : w.linecap !== "square" && (R["stroke-linecap"] = R["stroke-linejoin"] = "round"), k[b](R).shadow(2 > O && w.shadow)), k && (k.startX = x.xMap, k.isArea = x.isArea);
});
}, B.prototype.getGraphPath = function(j, w, x) {
var f = this, l = f.options, T = [], O = [], R, k = l.step;
j = j || f.points;
var b = j.reversed;
return b && j.reverse(), (k = { right: 1, center: 2 }[k] || k && 3) && b && (k = 4 - k), j = this.getValidPoints(j, !1, !(l.connectNulls && !w && !x)), j.forEach(function(S, v) {
var h = S.plotX, c = S.plotY, u = j[v - 1];
(S.leftCliff || u && u.rightCliff) && !x && (R = !0), S.isNull && !G(w) && 0 < v ? R = !l.connectNulls : S.isNull && !w ? R = !0 : (v === 0 || R ? v = [["M", S.plotX, S.plotY]] : f.getPointSpline ? v = [f.getPointSpline(j, S, v)] : k ? (v = k === 1 ? [["L", u.plotX, c]] : k === 2 ? [["L", (u.plotX + h) / 2, u.plotY], ["L", (u.plotX + h) / 2, c]] : [["L", h, u.plotY]], v.push(["L", h, c])) : v = [["L", h, c]], O.push(S.x), k && (O.push(S.x), k === 2 && O.push(S.x)), T.push.apply(T, v), R = !1);
}), T.xMap = O, f.graphPath = T;
}, B.prototype.getZonesGraphs = function(j) {
return this.zones.forEach(function(w, x) {
x = ["zone-graph-" + x, "highcharts-graph highcharts-zone-graph-" + x + " " + (w.className || "")], this.chart.styledMode || x.push(w.color || this.color, w.dashStyle || this.options.dashStyle), j.push(x);
}, this), j;
}, B.defaultOptions = V(y.defaultOptions, {}), B;
}(y), N.registerSeriesType("line", _), _;
}), C(o, "Series/Area/AreaSeries.js", [
o["Core/Color/Color.js"],
o["Core/Legend/LegendSymbol.js"],
o["Core/Series/SeriesRegistry.js"],
o["Core/Utilities.js"]
], function(y, N, _, U) {
var G = this && this.__extends || function() {
var x = function(f, l) {
return x = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(T, O) {
T.__proto__ = O;
} || function(T, O) {
for (var R in O)
O.hasOwnProperty(R) && (T[R] = O[R]);
}, x(f, l);
};
return function(f, l) {
function T() {
this.constructor = f;
}
x(f, l), f.prototype = l === null ? Object.create(l) : (T.prototype = l.prototype, new T());
};
}(), V = y.parse, F = _.seriesTypes.line;
y = U.extend;
var B = U.merge, j = U.objectEach, w = U.pick;
return U = function(x) {
function f() {
var l = x !== null && x.apply(this, arguments) || this;
return l.data = void 0, l.options = void 0, l.points = void 0, l;
}
return G(f, x), f.prototype.drawGraph = function() {
this.areaPath = [], x.prototype.drawGraph.apply(this);
var l = this, T = this.areaPath, O = this.options, R = [["area", "highcharts-area", this.color, O.fillColor]];
this.zones.forEach(function(k, b) {
R.push(["zone-area-" + b, "highcharts-area highcharts-zone-area-" + b + " " + k.className, k.color || l.color, k.fillColor || O.fillColor]);
}), R.forEach(function(k) {
var b = k[0], S = l[b], v = S ? "animate" : "attr", h = {};
S ? (S.endX = l.preventGraphAnimation ? null : T.xMap, S.animate({ d: T })) : (h.zIndex = 0, S = l[b] = l.chart.renderer.path(T).addClass(k[1]).add(l.group), S.isArea = !0), l.chart.styledMode || (h.fill = w(k[3], V(k[2]).setOpacity(w(O.fillOpacity, 0.75)).get())), S[v](h), S.startX = T.xMap, S.shiftUnit = O.step ? 2 : 1;
});
}, f.prototype.getGraphPath = function(l) {
var T = F.prototype.getGraphPath, O = this.options, R = O.stacking, k = this.yAxis, b, S = [], v = [], h = this.index, c = k.stacking.stacks[this.stackKey], u = O.threshold, i = Math.round(k.getThreshold(O.threshold));
O = w(O.connectNulls, R === "percent");
var p = function(n, P, D) {
var I = l[n];
n = R && c[I.x].points[h];
var W = I[D + "Null"] || 0;
if (D = I[D + "Cliff"] || 0, I = !0, D || W) {
var E = (W ? n[0] : n[1]) + D, X = n[0] + D;
I = !!W;
} else
!R && l[P] && l[P].isNull && (E = X = u);
typeof E < "u" && (v.push({ plotX: t, plotY: E === null ? i : k.getThreshold(E), isNull: I, isCliff: !0 }), S.push({ plotX: t, plotY: X === null ? i : k.getThreshold(X), doCurve: !1 }));
};
for (l = l || this.points, R && (l = this.getStackPoints(l)), b = 0; b < l.length; b++) {
R || (l[b].leftCliff = l[b].rightCliff = l[b].leftNull = l[b].rightNull = void 0);
var a = l[b].isNull, t = w(l[b].rectPlotX, l[b].plotX), s = R ? w(l[b].yBottom, i) : i;
(!a || O) && (O || p(b, b - 1, "left"), a && !R && O || (v.push(l[b]), S.push({ x: b, plotX: t, plotY: s })), O || p(b, b + 1, "right"));
}
return b = T.call(this, v, !0, !0), S.reversed = !0, a = T.call(this, S, !0, !0), (s = a[0]) && s[0] === "M" && (a[0] = ["L", s[1], s[2]]), a = b.concat(a), a.length && a.push(["Z"]), T = T.call(this, v, !1, O), a.xMap = b.xMap, this.areaPath = a, T;
}, f.prototype.getStackPoints = function(l) {
var T = this, O = [], R = [], k = this.xAxis, b = this.yAxis, S = b.stacking.stacks[this.stackKey], v = {}, h = b.series, c = h.length, u = b.options.reversedStacks ? 1 : -1, i = h.indexOf(T);
if (l = l || this.points, this.options.stacking) {
for (var p = 0; p < l.length; p++)
l[p].leftNull = l[p].rightNull = void 0, v[l[p].x] = l[p];
j(S, function(t, s) {
t.total !== null && R.push(s);
}), R.sort(function(t, s) {
return t - s;
});
var a = h.map(function(t) {
return t.visible;
});
R.forEach(function(t, s) {
var n = 0, P, D;
if (v[t] && !v[t].isNull)
O.push(v[t]), [-1, 1].forEach(function(W) {
var E = W === 1 ? "rightNull" : "leftNull", X = 0, g = S[R[s + W]];
if (g)
for (var m = i; 0 <= m && m < c; ) {
var L = h[m].index;
P = g.points[L], P || (L === T.index ? v[t][E] = !0 : a[m] && (D = S[t].points[L]) && (X -= D[1] - D[0])), m += u;
}
v[t][W === 1 ? "rightCliff" : "leftCliff"] = X;
});
else {
for (var I = i; 0 <= I && I < c; ) {
if (P = S[t].points[h[I].index]) {
n = P[1];
break;
}
I += u;
}
n = w(n, 0), n = b.translate(n, 0, 1, 0, 1), O.push({ isNull: !0, plotX: k.translate(t, 0, 0, 0, 1), x: t, plotY: n, yBottom: n });
}
});
}
return O;
}, f.defaultOptions = B(F.defaultOptions, { threshold: 0 }), f;
}(F), y(U.prototype, {
singleStacks: !1,
drawLegendSymbol: N.drawRectangle
}), _.registerSeriesType("area", U), U;
}), C(o, "Series/Spline/SplineSeries.js", [o["Core/Series/SeriesRegistry.js"], o["Core/Utilities.js"]], function(y, N) {
var _ = this && this.__extends || function() {
var F = function(B, j) {
return F = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(w, x) {
w.__proto__ = x;
} || function(w, x) {
for (var f in x)
x.hasOwnProperty(f) && (w[f] = x[f]);
}, F(B, j);
};
return function(B, j) {
function w() {
this.constructor = B;
}
F(B, j), B.prototype = j === null ? Object.create(j) : (w.prototype = j.prototype, new w());
};
}(), U = y.seriesTypes.line, G = N.merge, V = N.pick;
return N = function(F) {
function B() {
var j = F !== null && F.apply(this, arguments) || this;
return j.data = void 0, j.options = void 0, j.points = void 0, j;
}
return _(B, F), B.prototype.getPointSpline = function(j, w, x) {
var f = w.plotX || 0, l = w.plotY || 0, T = j[x - 1];
if (x = j[x + 1], T && !T.isNull && T.doCurve !== !1 && !w.isCliff && x && !x.isNull && x.doCurve !== !1 && !w.isCliff) {
j = T.plotY || 0;
var O = x.plotX || 0;
x = x.plotY || 0;
var R = 0, k = (1.5 * f + (T.plotX || 0)) / 2.5, b = (1.5 * l + j) / 2.5;
O = (1.5 * f + O) / 2.5;
var S = (1.5 * l + x) / 2.5;
O !== k && (R = (S - b) * (O - f) / (O - k) + l - S), b += R, S += R, b > j && b > l ? (b = Math.max(j, l), S = 2 * l - b) : b < j && b < l && (b = Math.min(j, l), S = 2 * l - b), S > x && S > l ? (S = Math.max(x, l), b = 2 * l - S) : S < x && S < l && (S = Math.min(x, l), b = 2 * l - S), w.rightContX = O, w.rightContY = S;
}
return w = ["C", V(T.rightContX, T.plotX, 0), V(T.rightContY, T.plotY, 0), V(k, f, 0), V(b, l, 0), f, l], T.rightContX = T.rightContY = void 0, w;
}, B.defaultOptions = G(U.defaultOptions), B;
}(U), y.registerSeriesType("spline", N), N;
}), C(
o,
"Series/AreaSpline/AreaSplineSeries.js",
[o["Series/Area/AreaSeries.js"], o["Series/Spline/SplineSeries.js"], o["Core/Legend/LegendSymbol.js"], o["Core/Series/SeriesRegistry.js"], o["Core/Utilities.js"]],
function(y, N, _, U, G) {
var V = this && this.__extends || function() {
var w = function(x, f) {
return w = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(l, T) {
l.__proto__ = T;
} || function(l, T) {
for (var O in T)
T.hasOwnProperty(O) && (l[O] = T[O]);
}, w(x, f);
};
return function(x, f) {
function l() {
this.constructor = x;
}
w(x, f), x.prototype = f === null ? Object.create(f) : (l.prototype = f.prototype, new l());
};
}(), F = y.prototype, B = G.extend, j = G.merge;
return G = function(w) {
function x() {
var f = w !== null && w.apply(this, arguments) || this;
return f.data = void 0, f.points = void 0, f.options = void 0, f;
}
return V(x, w), x.defaultOptions = j(N.defaultOptions, y.defaultOptions), x;
}(N), B(G.prototype, { getGraphPath: F.getGraphPath, getStackPoints: F.getStackPoints, drawGraph: F.drawGraph, drawLegendSymbol: _.drawRectangle }), U.registerSeriesType("areaspline", G), G;
}
), C(o, "Series/Column/ColumnSeries.js", [
o["Core/Animation/AnimationUtilities.js"],
o["Core/Color/Color.js"],
o["Core/Globals.js"],
o["Core/Legend/LegendSymbol.js"],
o["Core/Series/Series.js"],
o["Core/Series/SeriesRegistry.js"],
o["Core/Utilities.js"]
], function(y, N, _, U, G, V, F) {
var B = this && this.__extends || function() {
var c = function(u, i) {
return c = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(p, a) {
p.__proto__ = a;
} || function(p, a) {
for (var t in a)
a.hasOwnProperty(t) && (p[t] = a[t]);
}, c(u, i);
};
return function(u, i) {
function p() {
this.constructor = u;
}
c(u, i), u.prototype = i === null ? Object.create(i) : (p.prototype = i.prototype, new p());
};
}(), j = y.animObject, w = N.parse, x = _.hasTouch;
y = _.noop;
var f = F.clamp, l = F.css, T = F.defined, O = F.extend, R = F.fireEvent, k = F.isArray, b = F.isNumber, S = F.merge, v = F.pick, h = F.objectEach;
return F = function(c) {
function u() {
var i = c !== null && c.apply(this, arguments) || this;
return i.borderWidth = void 0, i.data = void 0, i.group = void 0, i.options = void 0, i.points = void 0, i;
}
return B(u, c), u.prototype.animate = function(i) {
var p = this, a = this.yAxis, t = p.options, s = this.chart.inverted, n = {}, P = s ? "translateX" : "translateY";
if (i)
n.scaleY = 1e-3, i = f(a.toPixels(t.threshold), a.pos, a.pos + a.len), s ? n.translateX = i - a.len : n.translateY = i, p.clipBox && p.setClip(), p.group.attr(n);
else {
var D = Number(p.group.attr(P));
p.group.animate({ scaleY: 1 }, O(j(p.options.animation), { step: function(I, W) {
p.group && (n[P] = D + W.pos * (a.pos - D), p.group.attr(n));
} }));
}
}, u.prototype.init = function(i, p) {
c.prototype.init.apply(this, arguments);
var a = this;
i = a.chart, i.hasRendered && i.series.forEach(function(t) {
t.type === a.type && (t.isDirty = !0);
});
}, u.prototype.getColumnMetrics = function() {
var i = this, p = i.options, a = i.xAxis, t = i.yAxis, s = a.options.reversedStacks;
s = a.reversed && !s || !a.reversed && s;
var n = {}, P, D = 0;
p.grouping === !1 ? D = 1 : i.chart.series.forEach(function(X) {
var g = X.yAxis, m = X.options;
if (X.type === i.type && (X.visible || !i.chart.options.chart.ignoreHiddenSeries) && t.len === g.len && t.pos === g.pos) {
if (m.stacking && m.stacking !== "group") {
P = X.stackKey, typeof n[P] > "u" && (n[P] = D++);
var L = n[P];
} else
m.grouping !== !1 && (L = D++);
X.columnIndex = L;
}
});
var I = Math.min(Math.abs(a.transA) * (a.ordinal && a.ordinal.slope || p.pointRange || a.closestPointRange || a.tickInterval || 1), a.len), W = I * p.groupPadding, E = (I - 2 * W) / (D || 1);
return p = Math.min(p.maxPointWidth || a.len, v(p.pointWidth, E * (1 - 2 * p.pointPadding))), i.columnMetrics = { width: p, offset: (E - p) / 2 + (W + ((i.columnIndex || 0) + (s ? 1 : 0)) * E - I / 2) * (s ? -1 : 1), paddedWidth: E, columnCount: D }, i.columnMetrics;
}, u.prototype.crispCol = function(i, p, a, t) {
var s = this.chart, n = this.borderWidth, P = -(n % 2 ? 0.5 : 0);
return n = n % 2 ? 0.5 : 1, s.inverted && s.renderer.isVML && (n += 1), this.options.crisp && (a = Math.round(i + a) + P, i = Math.round(i) + P, a -= i), t = Math.round(p + t) + n, P = 0.5 >= Math.abs(p) && 0.5 < t, p = Math.round(p) + n, t -= p, P && t && (--p, t += 1), { x: i, y: p, width: a, height: t };
}, u.prototype.adjustForMissingColumns = function(i, p, a, t) {
var s = this, n = this.options.stacking;
if (!a.isNull && 1 < t.columnCount) {
var P = 0, D = 0;
h(this.yAxis.stacking && this.yAxis.stacking.stacks, function(I) {
if (typeof a.x == "number" && (I = I[a.x.toString()])) {
var W = I.points[s.index], E = I.total;
n ? (W && (P = D), I.hasValidPoints && D++) : k(W) && (P = W[1], D = E || 0);
}
}), i = (a.plotX || 0) + ((D - 1) * t.paddedWidth + p) / 2 - p - P * t.paddedWidth;
}
return i;
}, u.prototype.translate = function() {
var i = this, p = i.chart, a = i.options, t = i.dense = 2 > i.closestPointRange * i.xAxis.transA;
t = i.borderWidth = v(a.borderWidth, t ? 0 : 1);
var s = i.xAxis, n = i.yAxis, P = a.threshold, D = i.translatedThreshold = n.getThreshold(P), I = v(a.minPointLength, 5), W = i.getColumnMetrics(), E = W.width, X = i.pointXOffset = W.offset, g = i.dataMin, m = i.dataMax, L = i.barW = Math.max(E, 1 + 2 * t);
p.inverted && (D -= 0.5), a.pointPadding && (L = Math.ceil(L)), G.prototype.translate.apply(i), i.points.forEach(function(z) {
var $ = v(z.yBottom, D), Q = 999 + Math.abs($), A = z.plotX || 0;
Q = f(z.plotY, -Q, n.len + Q);
var H = Math.min(Q, $), Y = Math.max(Q, $) - H, Z = E, q = A + X, it = L;
I && Math.abs(Y) < I && (Y = I, A = !n.reversed && !z.negative || n.reversed && z.negative, b(P) && b(m) && z.y === P && m <= P && (n.min || 0) < P && (g !== m || (n.max || 0) <= P) && (A = !A), H = Math.abs(H - D) > I ? $ - I : D - (A ? I : 0)), T(z.options.pointWidth) && (Z = it = Math.ceil(z.options.pointWidth), q -= Math.round((Z - E) / 2)), a.centerInCategory && (q = i.adjustForMissingColumns(q, Z, z, W)), z.barX = q, z.pointWidth = Z, z.tooltipPos = p.inverted ? [f(n.len + n.pos - p.plotLeft - Q, n.pos - p.plotLeft, n.len + n.pos - p.plotLeft), s.len + s.pos - p.plotTop - q - it / 2, Y] : [s.left - p.plotLeft + q + it / 2, f(Q + n.pos - p.plotTop, n.pos - p.plotTop, n.len + n.pos - p.plotTop), Y], z.shapeType = i.pointClass.prototype.shapeType || "rect", z.shapeArgs = i.crispCol.apply(i, z.isNull ? [q, D, it, 0] : [q, H, it, Y]);
});
}, u.prototype.drawGraph = function() {
this.group[this.dense ? "addClass" : "removeClass"]("highcharts-dense-data");
}, u.prototype.pointAttribs = function(i, p) {
var a = this.options, t = this.pointAttrToOptions || {}, s = t.stroke || "borderColor", n = t["stroke-width"] || "borderWidth", P = i && i.color || this.color, D = i && i[s] || a[s] || P;
t = i && i.options.dashStyle || a.dashStyle;
var I = i && i[n] || a[n] || this[n] || 0, W = v(i && i.opacity, a.opacity, 1);
if (i && this.zones.length) {
var E = i.getZone();
P = i.options.color || E && (E.color || i.nonZonedColor) || this.color, E && (D = E.borderColor || D, t = E.dashStyle || t, I = E.borderWidth || I);
}
return p && i && (i = S(a.states[p], i.options.states && i.options.states[p] || {}), p = i.brightness, P = i.color || typeof p < "u" && w(P).brighten(i.brightness).get() || P, D = i[s] || D, I = i[n] || I, t = i.dashStyle || t, W = v(i.opacity, W)), s = { fill: P, stroke: D, "stroke-width": I, opacity: W }, t && (s.dashstyle = t), s;
}, u.prototype.drawPoints = function() {
var i = this, p = this.chart, a = i.options, t = p.renderer, s = a.animationLimit || 250, n;
i.points.forEach(function(P) {
var D = P.graphic, I = !!D, W = D && p.pointCount < s ? "animate" : "attr";
b(P.plotY) && P.y !== null ? (n = P.shapeArgs, D && P.hasNewShapeType() && (D = D.destroy()), i.enabledDataSorting && (P.startXPos = i.xAxis.reversed ? -(n && n.width || 0) : i.xAxis.width), D || (P.graphic = D = t[P.shapeType](n).add(P.group || i.group)) && i.enabledDataSorting && p.hasRendered && p.pointCount < s && (D.attr({ x: P.startXPos }), I = !0, W = "animate"), D && I && D[W](S(n)), a.borderRadius && D[W]({ r: a.borderRadius }), p.styledMode || D[W](i.pointAttribs(P, P.selected && "select")).shadow(P.allowShadow !== !1 && a.shadow, null, a.stacking && !a.borderRadius), D && (D.addClass(P.getClassName(), !0), D.attr({ visibility: P.visible ? "inherit" : "hidden" }))) : D && (P.graphic = D.destroy());
});
}, u.prototype.drawTracker = function() {
var i = this, p = i.chart, a = p.pointer, t = function(n) {
var P = a.getPointFromEvent(n);
typeof P < "u" && (a.isDirectTouch = !0, P.onMouseOver(n));
}, s;
i.points.forEach(function(n) {
s = k(n.dataLabels) ? n.dataLabels : n.dataLabel ? [n.dataLabel] : [], n.graphic && (n.graphic.element.point = n), s.forEach(function(P) {
P.div ? P.div.point = n : P.element.point = n;
});
}), i._hasTracking || (i.trackerGroups.forEach(function(n) {
i[n] && (i[n].addClass("highcharts-tracker").on("mouseover", t).on("mouseout", function(P) {
a.onTrackerMouseOut(P);
}), x && i[n].on(
"touchstart",
t
), !p.styledMode && i.options.cursor && i[n].css(l).css({ cursor: i.options.cursor }));
}), i._hasTracking = !0), R(this, "afterDrawTracker");
}, u.prototype.remove = function() {
var i = this, p = i.chart;
p.hasRendered && p.series.forEach(function(a) {
a.type === i.type && (a.isDirty = !0);
}), G.prototype.remove.apply(i, arguments);
}, u.defaultOptions = S(G.defaultOptions, { borderRadius: 0, centerInCategory: !1, groupPadding: 0.2, marker: null, pointPadding: 0.1, minPointLength: 0, cropThreshold: 50, pointRange: null, states: {
hover: { halo: !1, brightness: 0.1 },
select: { color: "#cccccc", borderColor: "#000000" }
}, dataLabels: { align: void 0, verticalAlign: void 0, y: void 0 }, startFromThreshold: !0, stickyTracking: !1, tooltip: { distance: 6 }, threshold: 0, borderColor: "#ffffff" }), u;
}(G), O(F.prototype, { cropShoulder: 0, directTouch: !0, drawLegendSymbol: U.drawRectangle, getSymbol: y, negStacks: !0, trackerGroups: ["group", "dataLabelsGroup"] }), V.registerSeriesType("column", F), F;
}), C(o, "Core/Series/DataLabel.js", [
o["Core/Animation/AnimationUtilities.js"],
o["Core/FormatUtilities.js"],
o["Core/Utilities.js"]
], function(y, N, _) {
var U = y.getDeferredAnimation, G = N.format, V = _.defined, F = _.extend, B = _.fireEvent, j = _.isArray, w = _.merge, x = _.objectEach, f = _.pick, l = _.splat, T;
return function(O) {
function R(u, i, p, a, t) {
var s = this, n = this.chart, P = this.isCartesian && n.inverted, D = this.enabledDataSorting, I = f(u.dlBox && u.dlBox.centerX, u.plotX, -9999), W = f(u.plotY, -9999), E = i.getBBox(), X = p.rotation, g = p.align, m = n.isInsidePlot(I, Math.round(W), { inverted: P, paneCoordinates: !0, series: s }), L = function(A) {
D && s.xAxis && !z && s.setDataLabelStartPos(
u,
i,
t,
m,
A
);
}, z = f(p.overflow, D ? "none" : "justify") === "justify", $ = this.visible && u.visible !== !1 && (u.series.forceDL || D && !z || m || f(p.inside, !!this.options.stacking) && a && n.isInsidePlot(I, P ? a.x + 1 : a.y + a.height - 1, { inverted: P, paneCoordinates: !0, series: s }));
if ($) {
var Q = n.renderer.fontMetrics(n.styledMode ? void 0 : p.style.fontSize, i).b;
a = F({ x: P ? this.yAxis.len - W : I, y: Math.round(P ? this.xAxis.len - I : W), width: 0, height: 0 }, a), F(p, { width: E.width, height: E.height }), X ? (z = !1, I = n.renderer.rotCorr(Q, X), I = { x: a.x + (p.x || 0) + a.width / 2 + I.x, y: a.y + (p.y || 0) + { top: 0, middle: 0.5, bottom: 1 }[p.verticalAlign] * a.height }, L(I), i[t ? "attr" : "animate"](I).attr({ align: g }), L = (X + 720) % 360, L = 180 < L && 360 > L, g === "left" ? I.y -= L ? E.height : 0 : g === "center" ? (I.x -= E.width / 2, I.y -= E.height / 2) : g === "right" && (I.x -= E.width, I.y -= L ? 0 : E.height), i.placed = !0, i.alignAttr = I) : (L(a), i.align(p, void 0, a), I = i.alignAttr), z && 0 <= a.height ? this.justifyDataLabel(i, p, I, E, a, t) : f(p.crop, !0) && ($ = n.isInsidePlot(I.x, I.y, { paneCoordinates: !0, series: s }) && n.isInsidePlot(I.x + E.width, I.y + E.height, {
paneCoordinates: !0,
series: s
})), p.shape && !X && i[t ? "attr" : "animate"]({ anchorX: P ? n.plotWidth - u.plotY : u.plotX, anchorY: P ? n.plotHeight - u.plotX : u.plotY });
}
t && D && (i.placed = !1), $ || D && !z || (i.hide(!0), i.placed = !1);
}
function k(u, i) {
var p = i.filter;
return p ? (i = p.operator, u = u[p.property], p = p.value, i === ">" && u > p || i === "<" && u < p || i === ">=" && u >= p || i === "<=" && u <= p || i === "==" && u == p || i === "===" && u === p) : !0;
}
function b() {
var u = this, i = u.chart, p = u.options, a = u.points, t = u.hasRendered || 0, s = i.renderer, n = p.dataLabels, P, D = n.animation;
if (D = n.defer ? U(
i,
D,
u
) : { defer: 0, duration: 0 }, n = v(v(i.options.plotOptions && i.options.plotOptions.series && i.options.plotOptions.series.dataLabels, i.options.plotOptions && i.options.plotOptions[u.type] && i.options.plotOptions[u.type].dataLabels), n), B(this, "drawDataLabels"), j(n) || n.enabled || u._hasPointLabels) {
var I = u.plotGroup("dataLabelsGroup", "data-labels", t ? "inherit" : "hidden", n.zIndex || 6);
I.attr({ opacity: +t }), !t && (t = u.dataLabelsGroup) && (u.visible && I.show(!0), t[p.animation ? "animate" : "attr"]({ opacity: 1 }, D)), a.forEach(function(W) {
P = l(v(n, W.dlOptions || W.options && W.options.dataLabels)), P.forEach(function(E, X) {
var g = E.enabled && (!W.isNull || W.dataLabelOnNull) && k(W, E), m = W.connectors ? W.connectors[X] : W.connector, L = W.dataLabels ? W.dataLabels[X] : W.dataLabel, z = f(E.distance, W.labelDistance), $ = !L;
if (g) {
var Q = W.getLabelConfig(), A = f(E[W.formatPrefix + "Format"], E.format);
Q = V(A) ? G(A, Q, i) : (E[W.formatPrefix + "Formatter"] || E.formatter).call(Q, E), A = E.style;
var H = E.rotation;
i.styledMode || (A.color = f(E.color, A.color, u.color, "#000000"), A.color === "contrast" ? (W.contrastColor = s.getContrast(W.color || u.color), A.color = !V(z) && E.inside || 0 > z || p.stacking ? W.contrastColor : "#000000") : delete W.contrastColor, p.cursor && (A.cursor = p.cursor));
var Y = { r: E.borderRadius || 0, rotation: H, padding: E.padding, zIndex: 1 };
i.styledMode || (Y.fill = E.backgroundColor, Y.stroke = E.borderColor, Y["stroke-width"] = E.borderWidth), x(Y, function(Z, q) {
typeof Z > "u" && delete Y[q];
});
}
!L || g && V(Q) && !!L.div == !!E.useHTML || (W.dataLabel = L = W.dataLabel && W.dataLabel.destroy(), W.dataLabels && (W.dataLabels.length === 1 ? delete W.dataLabels : delete W.dataLabels[X]), X || delete W.dataLabel, m && (W.connector = W.connector.destroy(), W.connectors && (W.connectors.length === 1 ? delete W.connectors : delete W.connectors[X]))), g && V(Q) && (L ? Y.text = Q : (W.dataLabels = W.dataLabels || [], L = W.dataLabels[X] = H ? s.text(Q, 0, -9999, E.useHTML).addClass("highcharts-data-label") : s.label(Q, 0, -9999, E.shape, null, null, E.useHTML, null, "data-label"), X || (W.dataLabel = L), L.addClass(" highcharts-data-label-color-" + W.colorIndex + " " + (E.className || "") + (E.useHTML ? " highcharts-tracker" : ""))), L.options = E, L.attr(Y), i.styledMode || L.css(A).shadow(E.shadow), L.added || L.add(I), E.textPath && !E.useHTML && (L.setTextPath(W.getDataLabelPath && W.getDataLabelPath(L) || W.graphic, E.textPath), W.dataLabelPath && !E.textPath.enabled && (W.dataLabelPath = W.dataLabelPath.destroy())), u.alignDataLabel(W, L, E, null, $));
});
});
}
B(this, "afterDrawDataLabels");
}
function S(u, i, p, a, t, s) {
var n = this.chart, P = i.align, D = i.verticalAlign, I = u.box ? 0 : u.padding || 0, W = i.x;
W = W === void 0 ? 0 : W;
var E = i.y;
E = E === void 0 ? 0 : E;
var X = (p.x || 0) + I;
if (0 > X) {
P === "right" && 0 <= W ? (i.align = "left", i.inside = !0) : W -= X;
var g = !0;
}
return X = (p.x || 0) + a.width - I, X > n.plotWidth && (P === "left" && 0 >= W ? (i.align = "right", i.inside = !0) : W += n.plotWidth - X, g = !0), X = p.y + I, 0 > X && (D === "bottom" && 0 <= E ? (i.verticalAlign = "top", i.inside = !0) : E -= X, g = !0), X = (p.y || 0) + a.height - I, X > n.plotHeight && (D === "top" && 0 >= E ? (i.verticalAlign = "bottom", i.inside = !0) : E += n.plotHeight - X, g = !0), g && (i.x = W, i.y = E, u.placed = !s, u.align(i, void 0, t)), g;
}
function v(u, i) {
var p = [], a;
if (j(u) && !j(i))
p = u.map(function(t) {
return w(t, i);
});
else if (j(i) && !j(u))
p = i.map(function(t) {
return w(u, t);
});
else if (j(u) || j(i))
for (a = Math.max(u.length, i.length); a--; )
p[a] = w(u[a], i[a]);
else
p = w(u, i);
return p;
}
function h(u, i, p, a, t) {
var s = this.chart, n = s.inverted, P = this.xAxis, D = P.reversed, I = n ? i.height / 2 : i.width / 2;
u = (u = u.pointWidth) ? u / 2 : 0, i.startXPos = n ? t.x : D ? -I - u : P.width - I + u, i.startYPos = n ? D ? this.yAxis.height - I + u : -I - u : t.y, a ? i.visibility === "hidden" && (i.show(), i.attr({ opacity: 0 }).animate({ opacity: 1 })) : i.attr({ opacity: 1 }).animate(
{ opacity: 0 },
void 0,
i.hide
), s.hasRendered && (p && i.attr({ x: i.startXPos, y: i.startYPos }), i.placed = !0);
}
var c = [];
O.compose = function(u) {
if (c.indexOf(u) === -1) {
var i = u.prototype;
c.push(u), i.alignDataLabel = R, i.drawDataLabels = b, i.justifyDataLabel = S, i.setDataLabelStartPos = h;
}
};
}(T || (T = {})), T;
}), C(o, "Series/Column/ColumnDataLabel.js", [o["Core/Series/DataLabel.js"], o["Core/Series/SeriesRegistry.js"], o["Core/Utilities.js"]], function(y, N, _) {
var U = N.series, G = _.merge, V = _.pick, F;
return function(B) {
function j(x, f, l, T, O) {
var R = this.chart.inverted, k = x.series, b = (k.xAxis ? k.xAxis.len : this.chart.plotSizeX) || 0;
k = (k.yAxis ? k.yAxis.len : this.chart.plotSizeY) || 0;
var S = x.dlBox || x.shapeArgs, v = V(x.below, x.plotY > V(this.translatedThreshold, k)), h = V(l.inside, !!this.options.stacking);
S && (T = G(S), 0 > T.y && (T.height += T.y, T.y = 0), S = T.y + T.height - k, 0 < S && S < T.height && (T.height -= S), R && (T = { x: k - T.y - T.height, y: b - T.x - T.width, width: T.height, height: T.width }), h || (R ? (T.x += v ? 0 : T.width, T.width = 0) : (T.y += v ? T.height : 0, T.height = 0))), l.align = V(l.align, !R || h ? "center" : v ? "right" : "left"), l.verticalAlign = V(l.verticalAlign, R || h ? "middle" : v ? "top" : "bottom"), U.prototype.alignDataLabel.call(this, x, f, l, T, O), l.inside && x.contrastColor && f.css({ color: x.contrastColor });
}
var w = [];
B.compose = function(x) {
y.compose(U), w.indexOf(x) === -1 && (w.push(x), x.prototype.alignDataLabel = j);
};
}(F || (F = {})), F;
}), C(o, "Series/Bar/BarSeries.js", [o["Series/Column/ColumnSeries.js"], o["Core/Series/SeriesRegistry.js"], o["Core/Utilities.js"]], function(y, N, _) {
var U = this && this.__extends || function() {
var F = function(B, j) {
return F = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(w, x) {
w.__proto__ = x;
} || function(w, x) {
for (var f in x)
x.hasOwnProperty(f) && (w[f] = x[f]);
}, F(B, j);
};
return function(B, j) {
function w() {
this.constructor = B;
}
F(B, j), B.prototype = j === null ? Object.create(j) : (w.prototype = j.prototype, new w());
};
}(), G = _.extend, V = _.merge;
return _ = function(F) {
function B() {
var j = F !== null && F.apply(this, arguments) || this;
return j.data = void 0, j.options = void 0, j.points = void 0, j;
}
return U(B, F), B.defaultOptions = V(
y.defaultOptions,
{}
), B;
}(y), G(_.prototype, { inverted: !0 }), N.registerSeriesType("bar", _), _;
}), C(o, "Series/Scatter/ScatterSeries.js", [o["Series/Column/ColumnSeries.js"], o["Series/Line/LineSeries.js"], o["Core/Series/SeriesRegistry.js"], o["Core/Utilities.js"]], function(y, N, _, U) {
var G = this && this.__extends || function() {
var j = function(w, x) {
return j = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(f, l) {
f.__proto__ = l;
} || function(f, l) {
for (var T in l)
l.hasOwnProperty(T) && (f[T] = l[T]);
}, j(w, x);
};
return function(w, x) {
function f() {
this.constructor = w;
}
j(w, x), w.prototype = x === null ? Object.create(x) : (f.prototype = x.prototype, new f());
};
}(), V = U.addEvent, F = U.extend, B = U.merge;
return U = function(j) {
function w() {
var x = j !== null && j.apply(this, arguments) || this;
return x.data = void 0, x.options = void 0, x.points = void 0, x;
}
return G(w, j), w.prototype.applyJitter = function() {
var x = this, f = this.options.jitter, l = this.points.length;
f && this.points.forEach(function(T, O) {
["x", "y"].forEach(function(R, k) {
var b = "plot" + R.toUpperCase();
if (f[R] && !T.isNull) {
var S = x[R + "Axis"], v = f[R] * S.transA;
if (S && !S.isLog) {
var h = Math.max(0, T[b] - v);
S = Math.min(S.len, T[b] + v), k = 1e4 * Math.sin(O + k * l), T[b] = h + (S - h) * (k - Math.floor(k)), R === "x" && (T.clientX = T.plotX);
}
}
});
});
}, w.prototype.drawGraph = function() {
this.options.lineWidth ? j.prototype.drawGraph.call(this) : this.graph && (this.graph = this.graph.destroy());
}, w.defaultOptions = B(N.defaultOptions, { lineWidth: 0, findNearestPointBy: "xy", jitter: { x: 0, y: 0 }, marker: { enabled: !0 }, tooltip: {
headerFormat: '● {series.name}
',
pointFormat: "x: {point.x}
y: {point.y}
"
} }), w;
}(N), F(U.prototype, { drawTracker: y.prototype.drawTracker, sorted: !1, requireSorting: !1, noSharedTooltip: !0, trackerGroups: ["group", "markerGroup", "dataLabelsGroup"], takeOrdinalPosition: !1 }), V(U, "afterTranslate", function() {
this.applyJitter();
}), _.registerSeriesType("scatter", U), U;
}), C(o, "Series/CenteredUtilities.js", [o["Core/Globals.js"], o["Core/Series/Series.js"], o["Core/Utilities.js"]], function(y, N, _) {
var U = y.deg2rad, G = _.isNumber, V = _.pick, F = _.relativeLength, B;
return function(j) {
j.getCenter = function() {
var w = this.options, x = this.chart, f = 2 * (w.slicedOffset || 0), l = x.plotWidth - 2 * f, T = x.plotHeight - 2 * f, O = w.center, R = Math.min(l, T), k = w.size, b = w.innerSize || 0;
for (typeof k == "string" && (k = parseFloat(k)), typeof b == "string" && (b = parseFloat(b)), w = [V(O[0], "50%"), V(O[1], "50%"), V(k && 0 > k ? void 0 : w.size, "100%"), V(b && 0 > b ? void 0 : w.innerSize || 0, "0%")], !x.angular || this instanceof N || (w[3] = 0), O = 0; 4 > O; ++O)
k = w[O], x = 2 > O || O === 2 && /%$/.test(k), w[O] = F(k, [l, T, R, w[2]][O]) + (x ? f : 0);
return w[3] > w[2] && (w[3] = w[2]), w;
}, j.getStartAndEndRadians = function(w, x) {
return w = G(w) ? w : 0, x = G(x) && x > w && 360 > x - w ? x : w + 360, { start: U * (w + -90), end: U * (x + -90) };
};
}(B || (B = {})), B;
}), C(o, "Series/Pie/PiePoint.js", [o["Core/Animation/AnimationUtilities.js"], o["Core/Series/Point.js"], o["Core/Utilities.js"]], function(y, N, _) {
var U = this && this.__extends || function() {
var x = function(f, l) {
return x = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(T, O) {
T.__proto__ = O;
} || function(T, O) {
for (var R in O)
O.hasOwnProperty(R) && (T[R] = O[R]);
}, x(f, l);
};
return function(f, l) {
function T() {
this.constructor = f;
}
x(f, l), f.prototype = l === null ? Object.create(l) : (T.prototype = l.prototype, new T());
};
}(), G = y.setAnimation, V = _.addEvent, F = _.defined;
y = _.extend;
var B = _.isNumber, j = _.pick, w = _.relativeLength;
return N = function(x) {
function f() {
var l = x !== null && x.apply(this, arguments) || this;
return l.labelDistance = void 0, l.options = void 0, l.series = void 0, l;
}
return U(f, x), f.prototype.getConnectorPath = function() {
var l = this.labelPosition, T = this.series.options.dataLabels, O = this.connectorShapes, R = T.connectorShape;
return O[R] && (R = O[R]), R.call(this, { x: l.final.x, y: l.final.y, alignment: l.alignment }, l.connectorPosition, T);
}, f.prototype.getTranslate = function() {
return this.sliced ? this.slicedTranslation : { translateX: 0, translateY: 0 };
}, f.prototype.haloPath = function(l) {
var T = this.shapeArgs;
return this.sliced || !this.visible ? [] : this.series.chart.renderer.symbols.arc(T.x, T.y, T.r + l, T.r + l, { innerR: T.r - 1, start: T.start, end: T.end });
}, f.prototype.init = function() {
var l = this;
x.prototype.init.apply(
this,
arguments
), this.name = j(this.name, "Slice");
var T = function(O) {
l.slice(O.type === "select");
};
return V(this, "select", T), V(this, "unselect", T), this;
}, f.prototype.isValid = function() {
return B(this.y) && 0 <= this.y;
}, f.prototype.setVisible = function(l, T) {
var O = this, R = this.series, k = R.chart, b = R.options.ignoreHiddenPoint;
T = j(T, b), l !== this.visible && (this.visible = this.options.visible = l = typeof l > "u" ? !this.visible : l, R.options.data[R.data.indexOf(this)] = this.options, ["graphic", "dataLabel", "connector", "shadowGroup"].forEach(function(S) {
O[S] && O[S][l ? "show" : "hide"](l);
}), this.legendItem && k.legend.colorizeItem(this, l), l || this.state !== "hover" || this.setState(""), b && (R.isDirty = !0), T && k.redraw());
}, f.prototype.slice = function(l, T, O) {
var R = this.series;
G(O, R.chart), j(T, !0), this.sliced = this.options.sliced = F(l) ? l : !this.sliced, R.options.data[R.data.indexOf(this)] = this.options, this.graphic && this.graphic.animate(this.getTranslate()), this.shadowGroup && this.shadowGroup.animate(this.getTranslate());
}, f;
}(N), y(N.prototype, { connectorShapes: { fixedOffset: function(x, f, l) {
var T = f.breakAt;
return f = f.touchingSliceAt, [["M", x.x, x.y], l.softConnector ? ["C", x.x + (x.alignment === "left" ? -5 : 5), x.y, 2 * T.x - f.x, 2 * T.y - f.y, T.x, T.y] : ["L", T.x, T.y], ["L", f.x, f.y]];
}, straight: function(x, f) {
return f = f.touchingSliceAt, [["M", x.x, x.y], ["L", f.x, f.y]];
}, crookedLine: function(x, f, l) {
f = f.touchingSliceAt;
var T = this.series, O = T.center[0], R = T.chart.plotWidth, k = T.chart.plotLeft;
T = x.alignment;
var b = this.shapeArgs.r;
return l = w(l.crookDistance, 1), R = T === "left" ? O + b + (R + k - O - b) * (1 - l) : k + (O - b) * l, l = ["L", R, x.y], O = !0, (T === "left" ? R > x.x || R < f.x : R < x.x || R > f.x) && (O = !1), x = [["M", x.x, x.y]], O && x.push(l), x.push(["L", f.x, f.y]), x;
} } }), N;
}), C(o, "Series/Pie/PieSeries.js", [o["Series/CenteredUtilities.js"], o["Series/Column/ColumnSeries.js"], o["Core/Globals.js"], o["Core/Legend/LegendSymbol.js"], o["Series/Pie/PiePoint.js"], o["Core/Series/Series.js"], o["Core/Series/SeriesRegistry.js"], o["Core/Renderer/SVG/Symbols.js"], o["Core/Utilities.js"]], function(y, N, _, U, G, V, F, B, j) {
var w = this && this.__extends || function() {
var b = function(S, v) {
return b = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(h, c) {
h.__proto__ = c;
} || function(h, c) {
for (var u in c)
c.hasOwnProperty(u) && (h[u] = c[u]);
}, b(S, v);
};
return function(S, v) {
function h() {
this.constructor = S;
}
b(S, v), S.prototype = v === null ? Object.create(v) : (h.prototype = v.prototype, new h());
};
}(), x = y.getStartAndEndRadians;
_ = _.noop;
var f = j.clamp, l = j.extend, T = j.fireEvent, O = j.merge, R = j.pick, k = j.relativeLength;
return j = function(b) {
function S() {
var v = b !== null && b.apply(this, arguments) || this;
return v.center = void 0, v.data = void 0, v.maxLabelDistance = void 0, v.options = void 0, v.points = void 0, v;
}
return w(S, b), S.prototype.animate = function(v) {
var h = this, c = h.points, u = h.startAngleRad;
v || c.forEach(function(i) {
var p = i.graphic, a = i.shapeArgs;
p && a && (p.attr({ r: R(i.startR, h.center && h.center[3] / 2), start: u, end: u }), p.animate({ r: a.r, start: a.start, end: a.end }, h.options.animation));
});
}, S.prototype.drawEmpty = function() {
var v = this.startAngleRad, h = this.endAngleRad, c = this.options;
if (this.total === 0 && this.center) {
var u = this.center[0], i = this.center[1];
this.graph || (this.graph = this.chart.renderer.arc(u, i, this.center[1] / 2, 0, v, h).addClass("highcharts-empty-series").add(this.group)), this.graph.attr({ d: B.arc(u, i, this.center[2] / 2, 0, { start: v, end: h, innerR: this.center[3] / 2 }) }), this.chart.styledMode || this.graph.attr({ "stroke-width": c.borderWidth, fill: c.fillColor || "none", stroke: c.color || "#cccccc" });
} else
this.graph && (this.graph = this.graph.destroy());
}, S.prototype.drawPoints = function() {
var v = this.chart.renderer;
this.points.forEach(function(h) {
h.graphic && h.hasNewShapeType() && (h.graphic = h.graphic.destroy()), h.graphic || (h.graphic = v[h.shapeType](h.shapeArgs).add(h.series.group), h.delayedRendering = !0);
});
}, S.prototype.generatePoints = function() {
b.prototype.generatePoints.call(this), this.updateTotals();
}, S.prototype.getX = function(v, h, c) {
var u = this.center, i = this.radii ? this.radii[c.index] || 0 : u[2] / 2;
return v = Math.asin(f((v - u[1]) / (i + c.labelDistance), -1, 1)), u[0] + (h ? -1 : 1) * Math.cos(v) * (i + c.labelDistance) + (0 < c.labelDistance ? (h ? -1 : 1) * this.options.dataLabels.padding : 0);
}, S.prototype.hasData = function() {
return !!this.processedXData.length;
}, S.prototype.redrawPoints = function() {
var v = this, h = v.chart, c = h.renderer, u = v.options.shadow, i, p, a, t;
this.drawEmpty(), !u || v.shadowGroup || h.styledMode || (v.shadowGroup = c.g("shadow").attr({ zIndex: -1 }).add(v.group)), v.points.forEach(function(s) {
var n = {};
if (p = s.graphic, !s.isNull && p) {
var P = void 0;
t = s.shapeArgs, i = s.getTranslate(), h.styledMode || (P = s.shadowGroup, u && !P && (P = s.shadowGroup = c.g("shadow").add(v.shadowGroup)), P && P.attr(i), a = v.pointAttribs(s, s.selected && "select")), s.delayedRendering ? (p.setRadialReference(v.center).attr(t).attr(i), h.styledMode || p.attr(a).attr({ "stroke-linejoin": "round" }).shadow(u, P), s.delayedRendering = !1) : (p.setRadialReference(v.center), h.styledMode || O(!0, n, a), O(!0, n, t, i), p.animate(n)), p.attr({ visibility: s.visible ? "inherit" : "hidden" }), p.addClass(s.getClassName(), !0);
} else
p && (s.graphic = p.destroy());
});
}, S.prototype.sortByAngle = function(v, h) {
v.sort(function(c, u) {
return typeof c.angle < "u" && (u.angle - c.angle) * h;
});
}, S.prototype.translate = function(v) {
this.generatePoints();
var h = this.options, c = h.slicedOffset, u = c + (h.borderWidth || 0), i = x(h.startAngle, h.endAngle), p = this.startAngleRad = i.start;
i = (this.endAngleRad = i.end) - p;
var a = this.points, t = h.dataLabels.distance;
h = h.ignoreHiddenPoint;
var s = a.length, n, P = 0;
for (v || (this.center = v = this.getCenter()), n = 0; n < s; n++) {
var D = a[n], I = p + P * i;
!D.isValid() || h && !D.visible || (P += D.percentage / 100);
var W = p + P * i, E = { x: v[0], y: v[1], r: v[2] / 2, innerR: v[3] / 2, start: Math.round(1e3 * I) / 1e3, end: Math.round(1e3 * W) / 1e3 };
D.shapeType = "arc", D.shapeArgs = E, D.labelDistance = R(D.options.dataLabels && D.options.dataLabels.distance, t), D.labelDistance = k(D.labelDistance, E.r), this.maxLabelDistance = Math.max(this.maxLabelDistance || 0, D.labelDistance), W = (W + I) / 2, W > 1.5 * Math.PI ? W -= 2 * Math.PI : W < -Math.PI / 2 && (W += 2 * Math.PI), D.slicedTranslation = { translateX: Math.round(Math.cos(W) * c), translateY: Math.round(Math.sin(W) * c) }, E = Math.cos(W) * v[2] / 2;
var X = Math.sin(W) * v[2] / 2;
D.tooltipPos = [v[0] + 0.7 * E, v[1] + 0.7 * X], D.half = W < -Math.PI / 2 || W > Math.PI / 2 ? 1 : 0, D.angle = W, I = Math.min(u, D.labelDistance / 5), D.labelPosition = { natural: { x: v[0] + E + Math.cos(W) * D.labelDistance, y: v[1] + X + Math.sin(W) * D.labelDistance }, final: {}, alignment: 0 > D.labelDistance ? "center" : D.half ? "right" : "left", connectorPosition: { breakAt: { x: v[0] + E + Math.cos(W) * I, y: v[1] + X + Math.sin(W) * I }, touchingSliceAt: { x: v[0] + E, y: v[1] + X } } };
}
T(this, "afterTranslate");
}, S.prototype.updateTotals = function() {
var v = this.points, h = v.length, c = this.options.ignoreHiddenPoint, u, i = 0;
for (u = 0; u < h; u++) {
var p = v[u];
!p.isValid() || c && !p.visible || (i += p.y);
}
for (this.total = i, u = 0; u < h; u++)
p = v[u], p.percentage = 0 < i && (p.visible || !c) ? p.y / i * 100 : 0, p.total = i;
}, S.defaultOptions = O(V.defaultOptions, {
center: [null, null],
clip: !1,
colorByPoint: !0,
dataLabels: { allowOverlap: !0, connectorPadding: 5, connectorShape: "fixedOffset", crookDistance: "70%", distance: 30, enabled: !0, formatter: function() {
return this.point.isNull ? void 0 : this.point.name;
}, softConnector: !0, x: 0 },
fillColor: void 0,
ignoreHiddenPoint: !0,
inactiveOtherPoints: !0,
legendType: "point",
marker: null,
size: null,
showInLegend: !1,
slicedOffset: 10,
stickyTracking: !1,
tooltip: { followPointer: !0 },
borderColor: "#ffffff",
borderWidth: 1,
lineWidth: void 0,
states: { hover: { brightness: 0.1 } }
}), S;
}(V), l(j.prototype, { axisTypes: [], directTouch: !0, drawGraph: void 0, drawLegendSymbol: U.drawRectangle, drawTracker: N.prototype.drawTracker, getCenter: y.getCenter, getSymbol: _, isCartesian: !1, noSharedTooltip: !0, pointAttribs: N.prototype.pointAttribs, pointClass: G, requireSorting: !1, searchPoint: _, trackerGroups: ["group", "dataLabelsGroup"] }), F.registerSeriesType("pie", j), j;
}), C(o, "Series/Pie/PieDataLabel.js", [
o["Core/Series/DataLabel.js"],
o["Core/Globals.js"],
o["Core/Renderer/RendererUtilities.js"],
o["Core/Series/SeriesRegistry.js"],
o["Core/Utilities.js"]
], function(y, N, _, U, G) {
var V = N.noop, F = _.distribute, B = U.series, j = G.arrayMax, w = G.clamp, x = G.defined, f = G.merge, l = G.pick, T = G.relativeLength, O;
return function(R) {
function k() {
var c = this, u = c.data, i = c.chart, p = c.options.dataLabels || {}, a = p.connectorPadding, t = i.plotWidth, s = i.plotHeight, n = i.plotLeft, P = Math.round(i.chartWidth / 3), D = c.center, I = D[2] / 2, W = D[1], E = [[], []], X = [0, 0, 0, 0], g = c.dataLabelPositioners, m, L, z, $, Q, A, H, Y, Z, q, it, et;
c.visible && (p.enabled || c._hasPointLabels) && (u.forEach(function(nt) {
nt.dataLabel && nt.visible && nt.dataLabel.shortened && (nt.dataLabel.attr({ width: "auto" }).css({ width: "auto", textOverflow: "clip" }), nt.dataLabel.shortened = !1);
}), B.prototype.drawDataLabels.apply(c), u.forEach(function(nt) {
nt.dataLabel && (nt.visible ? (E[nt.half].push(nt), nt.dataLabel._pos = null, !x(p.style.width) && !x(nt.options.dataLabels && nt.options.dataLabels.style && nt.options.dataLabels.style.width) && nt.dataLabel.getBBox().width > P && (nt.dataLabel.css({ width: Math.round(0.7 * P) + "px" }), nt.dataLabel.shortened = !0)) : (nt.dataLabel = nt.dataLabel.destroy(), nt.dataLabels && nt.dataLabels.length === 1 && delete nt.dataLabels));
}), E.forEach(function(nt, rt) {
var ct = nt.length, gt = [], dt;
if (ct) {
if (c.sortByAngle(nt, rt - 0.5), 0 < c.maxLabelDistance) {
var ht = Math.max(0, W - I - c.maxLabelDistance), at = Math.min(W + I + c.maxLabelDistance, i.plotHeight);
nt.forEach(function(J) {
0 < J.labelDistance && J.dataLabel && (J.top = Math.max(0, W - I - J.labelDistance), J.bottom = Math.min(W + I + J.labelDistance, i.plotHeight), dt = J.dataLabel.getBBox().height || 21, J.distributeBox = { target: J.labelPosition.natural.y - J.top + dt / 2, size: dt, rank: J.y }, gt.push(J.distributeBox));
}), ht = at + dt - ht, F(gt, ht, ht / 5);
}
for (it = 0; it < ct; it++) {
if (m = nt[it], A = m.labelPosition, $ = m.dataLabel, q = m.visible === !1 ? "hidden" : "inherit", Z = ht = A.natural.y, gt && x(m.distributeBox) && (typeof m.distributeBox.pos > "u" ? q = "hidden" : (H = m.distributeBox.size, Z = g.radialDistributionY(m))), delete m.positionIndex, p.justify)
Y = g.justify(m, I, D);
else
switch (p.alignTo) {
case "connectors":
Y = g.alignToConnectors(nt, rt, t, n);
break;
case "plotEdges":
Y = g.alignToPlotEdges($, rt, t, n);
break;
default:
Y = g.radialDistributionX(c, m, Z, ht);
}
$._attr = { visibility: q, align: A.alignment }, et = m.options.dataLabels || {}, $._pos = { x: Y + l(et.x, p.x) + ({ left: a, right: -a }[A.alignment] || 0), y: Z + l(et.y, p.y) - 10 }, A.final.x = Y, A.final.y = Z, l(p.crop, !0) && (Q = $.getBBox().width, ht = null, Y - Q < a && rt === 1 ? (ht = Math.round(Q - Y + a), X[3] = Math.max(ht, X[3])) : Y + Q > t - a && rt === 0 && (ht = Math.round(Y + Q - t + a), X[1] = Math.max(ht, X[1])), 0 > Z - H / 2 ? X[0] = Math.max(Math.round(-Z + H / 2), X[0]) : Z + H / 2 > s && (X[2] = Math.max(Math.round(Z + H / 2 - s), X[2])), $.sideOverflow = ht);
}
}
}), j(X) === 0 || this.verifyDataLabelOverflow(X)) && (this.placeDataLabels(), this.points.forEach(function(nt) {
if (et = f(p, nt.options.dataLabels), L = l(et.connectorWidth, 1)) {
var rt;
z = nt.connector, ($ = nt.dataLabel) && $._pos && nt.visible && 0 < nt.labelDistance ? (q = $._attr.visibility, (rt = !z) && (nt.connector = z = i.renderer.path().addClass("highcharts-data-label-connector highcharts-color-" + nt.colorIndex + (nt.className ? " " + nt.className : "")).add(c.dataLabelsGroup), i.styledMode || z.attr({ "stroke-width": L, stroke: et.connectorColor || nt.color || "#666666" })), z[rt ? "attr" : "animate"]({ d: nt.getConnectorPath() }), z.attr("visibility", q)) : z && (nt.connector = z.destroy());
}
}));
}
function b() {
this.points.forEach(function(c) {
var u = c.dataLabel, i;
u && c.visible && ((i = u._pos) ? (u.sideOverflow && (u._attr.width = Math.max(u.getBBox().width - u.sideOverflow, 0), u.css({ width: u._attr.width + "px", textOverflow: (this.options.dataLabels.style || {}).textOverflow || "ellipsis" }), u.shortened = !0), u.attr(u._attr), u[u.moved ? "animate" : "attr"](i), u.moved = !0) : u && u.attr({ y: -9999 })), delete c.distributeBox;
}, this);
}
function S(c) {
var u = this.center, i = this.options, p = i.center, a = i.minSize || 80, t = i.size !== null;
if (!t) {
if (p[0] !== null)
var s = Math.max(u[2] - Math.max(c[1], c[3]), a);
else
s = Math.max(u[2] - c[1] - c[3], a), u[0] += (c[3] - c[1]) / 2;
p[1] !== null ? s = w(s, a, u[2] - Math.max(c[0], c[2])) : (s = w(s, a, u[2] - c[0] - c[2]), u[1] += (c[0] - c[2]) / 2), s < u[2] ? (u[2] = s, u[3] = Math.min(T(i.innerSize || 0, s), s), this.translate(u), this.drawDataLabels && this.drawDataLabels()) : t = !0;
}
return t;
}
var v = [], h = { radialDistributionY: function(c) {
return c.top + c.distributeBox.pos;
}, radialDistributionX: function(c, u, i, p) {
return c.getX(i < u.top + 2 || i > u.bottom - 2 ? p : i, u.half, u);
}, justify: function(c, u, i) {
return i[0] + (c.half ? -1 : 1) * (u + c.labelDistance);
}, alignToPlotEdges: function(c, u, i, p) {
return c = c.getBBox().width, u ? c + p : i - c - p;
}, alignToConnectors: function(c, u, i, p) {
var a = 0, t;
return c.forEach(function(s) {
t = s.dataLabel.getBBox().width, t > a && (a = t);
}), u ? a + p : i - a - p;
} };
R.compose = function(c) {
y.compose(B), v.indexOf(c) === -1 && (v.push(c), c = c.prototype, c.dataLabelPositioners = h, c.alignDataLabel = V, c.drawDataLabels = k, c.placeDataLabels = b, c.verifyDataLabelOverflow = S);
};
}(O || (O = {})), O;
}), C(o, "Extensions/OverlappingDataLabels.js", [o["Core/Chart/Chart.js"], o["Core/Utilities.js"]], function(y, N) {
function _(w, x) {
var f = !1;
if (w) {
var l = w.newOpacity;
w.oldOpacity !== l && (w.alignAttr && w.placed ? (w[l ? "removeClass" : "addClass"]("highcharts-data-label-hidden"), f = !0, w.alignAttr.opacity = l, w[w.isOld ? "animate" : "attr"](w.alignAttr, null, function() {
x.styledMode || w.css({ pointerEvents: l ? "auto" : "none" });
}), G(x, "afterHideOverlappingLabel")) : w.attr({ opacity: l })), w.isOld = !0;
}
return f;
}
var U = N.addEvent, G = N.fireEvent, V = N.isArray, F = N.isNumber, B = N.objectEach, j = N.pick;
U(y, "render", function() {
var w = this, x = [];
(this.labelCollectors || []).forEach(function(f) {
x = x.concat(f());
}), (this.yAxis || []).forEach(function(f) {
f.stacking && f.options.stackLabels && !f.options.stackLabels.allowOverlap && B(f.stacking.stacks, function(l) {
B(l, function(T) {
T.label && T.label.visibility !== "hidden" && x.push(T.label);
});
});
}), (this.series || []).forEach(function(f) {
var l = f.options.dataLabels;
f.visible && (l.enabled !== !1 || f._hasPointLabels) && (l = function(T) {
return T.forEach(function(O) {
O.visible && (V(O.dataLabels) ? O.dataLabels : O.dataLabel ? [O.dataLabel] : []).forEach(function(R) {
var k = R.options;
R.labelrank = j(k.labelrank, O.labelrank, O.shapeArgs && O.shapeArgs.height), k.allowOverlap ? (R.oldOpacity = R.opacity, R.newOpacity = 1, _(R, w)) : x.push(R);
});
});
}, l(f.nodes || []), l(f.points));
}), this.hideOverlappingLabels(x);
}), y.prototype.hideOverlappingLabels = function(w) {
var x = this, f = w.length, l = x.renderer, T, O, R, k = !1, b = function(h) {
var c, u = h.box ? 0 : h.padding || 0, i = c = 0, p;
if (h && (!h.alignAttr || h.placed)) {
var a = h.alignAttr || { x: h.attr("x"), y: h.attr("y") }, t = h.parentGroup;
h.width || (c = h.getBBox(), h.width = c.width, h.height = c.height, c = l.fontMetrics(null, h.element).h);
var s = h.width - 2 * u;
return (p = { left: "0", center: "0.5", right: "1" }[h.alignValue]) ? i = +p * s : F(h.x) && Math.round(h.x) !== h.translateX && (i = h.x - h.translateX), { x: a.x + (t.translateX || 0) + u - (i || 0), y: a.y + (t.translateY || 0) + u - c, width: h.width - 2 * u, height: h.height - 2 * u };
}
};
for (O = 0; O < f; O++)
(T = w[O]) && (T.oldOpacity = T.opacity, T.newOpacity = 1, T.absoluteBox = b(T));
for (w.sort(function(h, c) {
return (c.labelrank || 0) - (h.labelrank || 0);
}), O = 0; O < f; O++) {
var S = (b = w[O]) && b.absoluteBox;
for (T = O + 1; T < f; ++T) {
var v = (R = w[T]) && R.absoluteBox;
!S || !v || b === R || b.newOpacity === 0 || R.newOpacity === 0 || v.x >= S.x + S.width || v.x + v.width <= S.x || v.y >= S.y + S.height || v.y + v.height <= S.y || ((b.labelrank < R.labelrank ? b : R).newOpacity = 0);
}
}
w.forEach(function(h) {
_(h, x) && (k = !0);
}), k && G(x, "afterHideAllOverlappingLabels");
};
}), C(
o,
"Core/Responsive.js",
[o["Core/Utilities.js"]],
function(y) {
var N = y.extend, _ = y.find, U = y.isArray, G = y.isObject, V = y.merge, F = y.objectEach, B = y.pick, j = y.splat, w = y.uniqueKey, x;
return function(f) {
var l = [];
f.compose = function(O) {
return l.indexOf(O) === -1 && (l.push(O), N(O.prototype, T.prototype)), O;
};
var T = function() {
function O() {
}
return O.prototype.currentOptions = function(R) {
function k(v, h, c, u) {
var i;
F(v, function(p, a) {
if (!u && -1 < b.collectionsWithUpdate.indexOf(a) && h[a])
for (p = j(p), c[a] = [], i = 0; i < Math.max(p.length, h[a].length); i++)
h[a][i] && (p[i] === void 0 ? c[a][i] = h[a][i] : (c[a][i] = {}, k(p[i], h[a][i], c[a][i], u + 1)));
else
G(p) ? (c[a] = U(p) ? [] : {}, k(p, h[a] || {}, c[a], u + 1)) : c[a] = typeof h[a] > "u" ? null : h[a];
});
}
var b = this, S = {};
return k(R, this.options, S, 0), S;
}, O.prototype.matchResponsiveRule = function(R, k) {
var b = R.condition;
(b.callback || function() {
return this.chartWidth <= B(b.maxWidth, Number.MAX_VALUE) && this.chartHeight <= B(b.maxHeight, Number.MAX_VALUE) && this.chartWidth >= B(b.minWidth, 0) && this.chartHeight >= B(b.minHeight, 0);
}).call(this) && k.push(R._id);
}, O.prototype.setResponsive = function(R, k) {
var b = this, S = this.options.responsive, v = this.currentResponsive, h = [];
!k && S && S.rules && S.rules.forEach(function(c) {
typeof c._id > "u" && (c._id = w()), b.matchResponsiveRule(c, h);
}, this), k = V.apply(void 0, h.map(function(c) {
return _((S || {}).rules || [], function(u) {
return u._id === c;
});
}).map(function(c) {
return c && c.chartOptions;
})), k.isResponsiveOptions = !0, h = h.toString() || void 0, h !== (v && v.ruleIds) && (v && this.update(v.undoOptions, R, !0), h ? (v = this.currentOptions(k), v.isResponsiveOptions = !0, this.currentResponsive = { ruleIds: h, mergedOptions: k, undoOptions: v }, this.update(k, R, !0)) : this.currentResponsive = void 0);
}, O;
}();
}(x || (x = {})), x;
}
), C(o, "masters/highcharts.src.js", [
o["Core/Globals.js"],
o["Core/Utilities.js"],
o["Core/DefaultOptions.js"],
o["Core/Animation/Fx.js"],
o["Core/Animation/AnimationUtilities.js"],
o["Core/Renderer/HTML/AST.js"],
o["Core/FormatUtilities.js"],
o["Core/Renderer/RendererUtilities.js"],
o["Core/Renderer/SVG/SVGElement.js"],
o["Core/Renderer/SVG/SVGRenderer.js"],
o["Core/Renderer/HTML/HTMLElement.js"],
o["Core/Renderer/HTML/HTMLRenderer.js"],
o["Core/Axis/Axis.js"],
o["Core/Axis/DateTimeAxis.js"],
o["Core/Axis/LogarithmicAxis.js"],
o["Core/Axis/PlotLineOrBand/PlotLineOrBand.js"],
o["Core/Axis/Tick.js"],
o["Core/Tooltip.js"],
o["Core/Series/Point.js"],
o["Core/Pointer.js"],
o["Core/MSPointer.js"],
o["Core/Legend/Legend.js"],
o["Core/Chart/Chart.js"],
o["Core/Series/Series.js"],
o["Core/Series/SeriesRegistry.js"],
o["Series/Column/ColumnSeries.js"],
o["Series/Column/ColumnDataLabel.js"],
o["Series/Pie/PieSeries.js"],
o["Series/Pie/PieDataLabel.js"],
o["Core/Series/DataLabel.js"],
o["Core/Responsive.js"],
o["Core/Color/Color.js"],
o["Core/Time.js"]
], function(y, N, _, U, G, V, F, B, j, w, x, f, l, T, O, R, k, b, S, v, h, c, u, i, p, a, t, s, n, P, D, I, W) {
return y.animate = G.animate, y.animObject = G.animObject, y.getDeferredAnimation = G.getDeferredAnimation, y.setAnimation = G.setAnimation, y.stop = G.stop, y.timers = U.timers, y.AST = V, y.Axis = l, y.Chart = u, y.chart = u.chart, y.Fx = U, y.Legend = c, y.PlotLineOrBand = R, y.Point = S, y.Pointer = h.isRequired() ? h : v, y.Series = i, y.SVGElement = j, y.SVGRenderer = w, y.Tick = k, y.Time = W, y.Tooltip = b, y.Color = I, y.color = I.parse, f.compose(w), x.compose(j), y.defaultOptions = _.defaultOptions, y.getOptions = _.getOptions, y.time = _.defaultTime, y.setOptions = _.setOptions, y.dateFormat = F.dateFormat, y.format = F.format, y.numberFormat = F.numberFormat, y.addEvent = N.addEvent, y.arrayMax = N.arrayMax, y.arrayMin = N.arrayMin, y.attr = N.attr, y.clearTimeout = N.clearTimeout, y.correctFloat = N.correctFloat, y.createElement = N.createElement, y.css = N.css, y.defined = N.defined, y.destroyObjectProperties = N.destroyObjectProperties, y.discardElement = N.discardElement, y.distribute = B.distribute, y.erase = N.erase, y.error = N.error, y.extend = N.extend, y.extendClass = N.extendClass, y.find = N.find, y.fireEvent = N.fireEvent, y.getMagnitude = N.getMagnitude, y.getStyle = N.getStyle, y.inArray = N.inArray, y.isArray = N.isArray, y.isClass = N.isClass, y.isDOMElement = N.isDOMElement, y.isFunction = N.isFunction, y.isNumber = N.isNumber, y.isObject = N.isObject, y.isString = N.isString, y.keys = N.keys, y.merge = N.merge, y.normalizeTickInterval = N.normalizeTickInterval, y.objectEach = N.objectEach, y.offset = N.offset, y.pad = N.pad, y.pick = N.pick, y.pInt = N.pInt, y.relativeLength = N.relativeLength, y.removeEvent = N.removeEvent, y.seriesType = p.seriesType, y.splat = N.splat, y.stableSort = N.stableSort, y.syncTimeout = N.syncTimeout, y.timeUnits = N.timeUnits, y.uniqueKey = N.uniqueKey, y.useSerialIds = N.useSerialIds, y.wrap = N.wrap, t.compose(a), P.compose(i), T.compose(l), O.compose(l), n.compose(s), R.compose(l), D.compose(u), y;
}), o["masters/highcharts.src.js"]._modules = o, o["masters/highcharts.src.js"];
});
})(iu);
var V0 = iu.exports;
const ts = /* @__PURE__ */ Mn(V0);
var ru = { exports: {} };
(function(r) {
(function(d) {
r.exports ? (d.default = d, r.exports = d) : d(typeof Highcharts < "u" ? Highcharts : void 0);
})(function(d) {
function C(o, y, N, _) {
o.hasOwnProperty(y) || (o[y] = _.apply(null, N));
}
d = d ? d._modules : {}, C(d, "Extensions/Pane.js", [
d["Core/Chart/Chart.js"],
d["Series/CenteredUtilities.js"],
d["Core/Globals.js"],
d["Core/Pointer.js"],
d["Core/Utilities.js"]
], function(o, y, N, _, U) {
function G(x, f, l) {
return Math.sqrt(Math.pow(x - l[0], 2) + Math.pow(f - l[1], 2)) <= l[2] / 2;
}
var V = U.addEvent, F = U.extend, B = U.merge, j = U.pick, w = U.splat;
return o.prototype.collectionsWithUpdate.push("pane"), U = function() {
function x(f, l) {
this.options = this.chart = this.center = this.background = void 0, this.coll = "pane", this.defaultOptions = { center: ["50%", "50%"], size: "85%", innerSize: "0%", startAngle: 0 }, this.defaultBackgroundOptions = { shape: "circle", borderWidth: 1, borderColor: "#cccccc", backgroundColor: { linearGradient: {
x1: 0,
y1: 0,
x2: 0,
y2: 1
}, stops: [[0, "#ffffff"], [1, "#e6e6e6"]] }, from: -Number.MAX_VALUE, innerRadius: 0, to: Number.MAX_VALUE, outerRadius: "105%" }, this.init(f, l);
}
return x.prototype.init = function(f, l) {
this.chart = l, this.background = [], l.pane.push(this), this.setOptions(f);
}, x.prototype.setOptions = function(f) {
this.options = B(this.defaultOptions, this.chart.angular ? { background: {} } : void 0, f);
}, x.prototype.render = function() {
var f = this.options, l = this.options.background, T = this.chart.renderer;
if (this.group || (this.group = T.g("pane-group").attr({ zIndex: f.zIndex || 0 }).add()), this.updateCenter(), l)
for (l = w(l), f = Math.max(l.length, this.background.length || 0), T = 0; T < f; T++)
l[T] && this.axis ? this.renderBackground(B(this.defaultBackgroundOptions, l[T]), T) : this.background[T] && (this.background[T] = this.background[T].destroy(), this.background.splice(T, 1));
}, x.prototype.renderBackground = function(f, l) {
var T = "animate", O = { class: "highcharts-pane " + (f.className || "") };
this.chart.styledMode || F(O, { fill: f.backgroundColor, stroke: f.borderColor, "stroke-width": f.borderWidth }), this.background[l] || (this.background[l] = this.chart.renderer.path().add(this.group), T = "attr"), this.background[l][T]({ d: this.axis.getPlotBandPath(f.from, f.to, f) }).attr(O);
}, x.prototype.updateCenter = function(f) {
this.center = (f || this.axis || {}).center = y.getCenter.call(this);
}, x.prototype.update = function(f, l) {
B(!0, this.options, f), this.setOptions(this.options), this.render(), this.chart.axes.forEach(function(T) {
T.pane === this && (T.pane = null, T.update({}, l));
}, this);
}, x;
}(), o.prototype.getHoverPane = function(x) {
var f = this, l;
return x && f.pane.forEach(function(T) {
var O = x.chartX - f.plotLeft, R = x.chartY - f.plotTop;
G(f.inverted ? R : O, f.inverted ? O : R, T.center) && (l = T);
}), l;
}, V(o, "afterIsInsidePlot", function(x) {
this.polar && (x.isInsidePlot = this.pane.some(function(f) {
return G(x.x, x.y, f.center);
}));
}), V(_, "beforeGetHoverData", function(x) {
var f = this.chart;
f.polar ? (f.hoverPane = f.getHoverPane(x), x.filter = function(l) {
return l.visible && !(!x.shared && l.directTouch) && j(l.options.enableMouseTracking, !0) && (!f.hoverPane || l.xAxis.pane === f.hoverPane);
}) : f.hoverPane = void 0;
}), V(
_,
"afterGetHoverData",
function(x) {
var f = this.chart;
x.hoverPoint && x.hoverPoint.plotX && x.hoverPoint.plotY && f.hoverPane && !G(x.hoverPoint.plotX, x.hoverPoint.plotY, f.hoverPane.center) && (x.hoverPoint = void 0);
}
), N.Pane = U, N.Pane;
}), C(d, "Core/Axis/RadialAxis.js", [d["Core/Axis/AxisDefaults.js"], d["Core/DefaultOptions.js"], d["Core/Globals.js"], d["Core/Utilities.js"]], function(o, y, N, _) {
var U = y.defaultOptions, G = N.noop, V = _.addEvent, F = _.correctFloat, B = _.defined, j = _.extend, w = _.fireEvent, x = _.merge, f = _.pick, l = _.relativeLength, T = _.wrap, O;
return function(R) {
function k() {
this.autoConnect = this.isCircular && typeof f(this.userMax, this.options.max) > "u" && F(this.endAngleRad - this.startAngleRad) === F(2 * Math.PI), !this.isCircular && this.chart.inverted && this.max++, this.autoConnect && (this.max += this.categories && 1 || this.pointRange || this.closestPointRange || 0);
}
function b() {
var Z = this;
return function() {
if (Z.isRadial && Z.tickPositions && Z.options.labels && Z.options.labels.allowOverlap !== !0)
return Z.tickPositions.map(function(q) {
return Z.ticks[q] && Z.ticks[q].label;
}).filter(function(q) {
return !!q;
});
};
}
function S() {
return G;
}
function v(Z, q, it) {
var et = this.pane.center, nt = Z.value;
if (this.isCircular) {
if (B(nt))
Z.point && (rt = Z.point.shapeArgs || {}, rt.start && (nt = this.chart.inverted ? this.translate(Z.point.rectPlotY, !0) : Z.point.x));
else {
var rt = Z.chartX || 0, ct = Z.chartY || 0;
nt = this.translate(Math.atan2(ct - it, rt - q) - this.startAngleRad, !0);
}
Z = this.getPosition(nt), rt = Z.x, ct = Z.y;
} else
B(nt) || (rt = Z.chartX, ct = Z.chartY), B(rt) && B(ct) && (it = et[1] + this.chart.plotTop, nt = this.translate(Math.min(Math.sqrt(Math.pow(rt - q, 2) + Math.pow(ct - it, 2)), et[2] / 2) - et[3] / 2, !0));
return [nt, rt || 0, ct || 0];
}
function h(Z, q, it) {
Z = this.pane.center;
var et = this.chart, nt = this.left || 0, rt = this.top || 0, ct = f(q, Z[2] / 2 - this.offset);
return typeof it > "u" && (it = this.horiz ? 0 : this.center && -this.center[3] / 2), it && (ct += it), this.isCircular || typeof q < "u" ? (q = this.chart.renderer.symbols.arc(nt + Z[0], rt + Z[1], ct, ct, { start: this.startAngleRad, end: this.endAngleRad, open: !0, innerR: 0 }), q.xBounds = [nt + Z[0]], q.yBounds = [rt + Z[1] - ct]) : (q = this.postTranslate(this.angleRad, ct), q = [["M", this.center[0] + et.plotLeft, this.center[1] + et.plotTop], ["L", q.x, q.y]]), q;
}
function c() {
this.constructor.prototype.getOffset.call(this), this.chart.axisOffset[this.side] = 0;
}
function u(Z, q, it) {
var et = this.chart, nt = function(yt) {
if (typeof yt == "string") {
var vt = parseInt(yt, 10);
return J.test(yt) && (vt = vt * gt / 100), vt;
}
return yt;
}, rt = this.center, ct = this.startAngleRad, gt = rt[2] / 2, dt = Math.min(this.offset, 0), ht = this.left || 0, at = this.top || 0, J = /%$/, tt = this.isCircular, ot = f(nt(it.outerRadius), gt), lt = nt(it.innerRadius);
if (nt = f(nt(it.thickness), 10), this.options.gridLineInterpolation === "polygon")
dt = this.getPlotLinePath({ value: Z }).concat(this.getPlotLinePath({ value: q, reverse: !0 }));
else {
if (Z = Math.max(Z, this.min), q = Math.min(q, this.max), Z = this.translate(Z), q = this.translate(q), tt || (ot = Z || 0, lt = q || 0), it.shape !== "circle" && tt)
it = ct + (Z || 0), ct += q || 0;
else {
it = -Math.PI / 2, ct = 1.5 * Math.PI;
var pt = !0;
}
ot -= dt, dt = et.renderer.symbols.arc(ht + rt[0], at + rt[1], ot, ot, { start: Math.min(it, ct), end: Math.max(it, ct), innerR: f(lt, ot - (nt - dt)), open: pt }), tt && (tt = (ct + it) / 2, ht = ht + rt[0] + rt[2] / 2 * Math.cos(tt), dt.xBounds = tt > -Math.PI / 2 && tt < Math.PI / 2 ? [ht, et.plotWidth] : [0, ht], dt.yBounds = [at + rt[1] + rt[2] / 2 * Math.sin(tt)], dt.yBounds[0] += tt > -Math.PI && 0 > tt || tt > Math.PI ? -10 : 10);
}
return dt;
}
function i(Z) {
var q = this, it = this.pane.center, et = this.chart, nt = et.inverted, rt = Z.reverse, ct = this.pane.options.background ? this.pane.options.background[0] || this.pane.options.background : {}, gt = ct.innerRadius || "0%", dt = ct.outerRadius || "100%", ht = it[0] + et.plotLeft, at = it[1] + et.plotTop, J = this.height, tt = Z.isCrosshair;
ct = it[3] / 2;
var ot = Z.value, lt, pt = this.getPosition(ot), yt = pt.x;
if (pt = pt.y, tt && (pt = this.getCrosshairPosition(Z, ht, at), ot = pt[0], yt = pt[1], pt = pt[2]), this.isCircular)
ot = Math.sqrt(Math.pow(yt - ht, 2) + Math.pow(pt - at, 2)), rt = typeof gt == "string" ? l(gt, 1) : gt / ot, et = typeof dt == "string" ? l(dt, 1) : dt / ot, it && ct && (ct /= ot, rt < ct && (rt = ct), et < ct && (et = ct)), it = [["M", ht + rt * (yt - ht), at - rt * (at - pt)], ["L", yt - (1 - et) * (yt - ht), pt + (1 - et) * (at - pt)]];
else if ((ot = this.translate(ot)) && (0 > ot || ot > J) && (ot = 0), this.options.gridLineInterpolation === "circle")
it = this.getLinePath(0, ot, ct);
else if (it = [], et[nt ? "yAxis" : "xAxis"].forEach(function(vt) {
vt.pane === q.pane && (lt = vt);
}), lt)
for (ht = lt.tickPositions, lt.autoConnect && (ht = ht.concat([ht[0]])), rt && (ht = ht.slice().reverse()), ot && (ot += ct), at = 0; at < ht.length; at++)
ct = lt.getPosition(ht[at], ot), it.push(at ? ["L", ct.x, ct.y] : ["M", ct.x, ct.y]);
return it;
}
function p(Z, q) {
return Z = this.translate(Z), this.postTranslate(this.isCircular ? Z : this.angleRad, f(this.isCircular ? q : 0 > Z ? 0 : Z, this.center[2] / 2) - this.offset);
}
function a() {
var Z = this.center, q = this.chart, it = this.options.title;
return { x: q.plotLeft + Z[0] + (it.x || 0), y: q.plotTop + Z[1] - { high: 0.5, middle: 0.25, low: 0 }[it.align] * Z[2] + (it.y || 0) };
}
function t(Z) {
Z.beforeSetTickPositions = k, Z.createLabelCollector = b, Z.getCrosshairPosition = v, Z.getLinePath = h, Z.getOffset = c, Z.getPlotBandPath = u, Z.getPlotLinePath = i, Z.getPosition = p, Z.getTitlePosition = a, Z.postTranslate = X, Z.setAxisSize = m, Z.setAxisTranslation = L, Z.setOptions = z;
}
function s() {
var Z = this.chart, q = this.options, it = this.pane, et = it && it.options;
Z.angular && this.isXAxis || !it || !Z.angular && !Z.polar || (this.angleRad = (q.angle || 0) * Math.PI / 180, this.startAngleRad = (et.startAngle - 90) * Math.PI / 180, this.endAngleRad = (f(et.endAngle, et.startAngle + 360) - 90) * Math.PI / 180, this.offset = q.offset || 0);
}
function n(Z) {
this.isRadial && (Z.align = void 0, Z.preventDefault());
}
function P() {
if (this.chart && this.chart.labelCollectors) {
var Z = this.labelCollector ? this.chart.labelCollectors.indexOf(this.labelCollector) : -1;
0 <= Z && this.chart.labelCollectors.splice(Z, 1);
}
}
function D(Z) {
var q = this.chart, it = q.inverted, et = q.angular, nt = q.polar, rt = this.isXAxis, ct = this.coll, gt = et && rt, dt = q.options;
Z = Z.userOptions.pane || 0, Z = this.pane = q.pane && q.pane[Z];
var ht;
ct === "colorAxis" ? this.isRadial = !1 : (et ? (gt ? (this.isHidden = !0, this.createLabelCollector = S, this.getOffset = G, this.render = this.redraw = g, this.setTitle = this.setCategories = this.setScale = G) : t(this), (ht = !rt) && (this.defaultPolarOptions = H)) : nt && (t(this), this.defaultPolarOptions = (ht = this.horiz) ? A : x(ct === "xAxis" ? o.defaultXAxisOptions : o.defaultYAxisOptions, Y), it && ct === "yAxis" && (this.defaultPolarOptions.stackLabels = o.defaultYAxisOptions.stackLabels, this.defaultPolarOptions.reversedStacks = !0)), et || nt ? (this.isRadial = !0, dt.chart.zoomType = null, this.labelCollector || (this.labelCollector = this.createLabelCollector()), this.labelCollector && q.labelCollectors.push(this.labelCollector)) : this.isRadial = !1, Z && ht && (Z.axis = this), this.isCircular = ht);
}
function I() {
this.isRadial && this.beforeSetTickPositions();
}
function W(Z) {
var q = this.label;
if (q) {
var it = this.axis, et = q.getBBox(), nt = it.options.labels, rt = (it.translate(this.pos) + it.startAngleRad + Math.PI / 2) / Math.PI * 180 % 360, ct = Math.round(rt), gt = B(nt.y) ? 0 : 0.3 * -et.height, dt = nt.y, ht = 20, at = nt.align, J = "end", tt = 0 > ct ? ct + 360 : ct, ot = tt, lt = 0, pt = 0;
if (it.isRadial) {
var yt = it.getPosition(this.pos, it.center[2] / 2 + l(f(nt.distance, -25), it.center[2] / 2, -it.center[2] / 2));
nt.rotation === "auto" ? q.attr({ rotation: rt }) : B(dt) || (dt = it.chart.renderer.fontMetrics(q.styles && q.styles.fontSize).b - et.height / 2), B(at) || (it.isCircular ? (et.width > it.len * it.tickInterval / (it.max - it.min) && (ht = 0), at = rt > ht && rt < 180 - ht ? "left" : rt > 180 + ht && rt < 360 - ht ? "right" : "center") : at = "center", q.attr({ align: at })), at === "auto" && it.tickPositions.length === 2 && it.isCircular && (90 < tt && 180 > tt ? tt = 180 - tt : 270 < tt && 360 >= tt && (tt = 540 - tt), 180 < ot && 360 >= ot && (ot = 360 - ot), (it.pane.options.startAngle === ct || it.pane.options.startAngle === ct + 360 || it.pane.options.startAngle === ct - 360) && (J = "start"), at = -90 <= ct && 90 >= ct || -360 <= ct && -270 >= ct || 270 <= ct && 360 >= ct ? J === "start" ? "right" : "left" : J === "start" ? "left" : "right", 70 < ot && 110 > ot && (at = "center"), 15 > tt || 180 <= tt && 195 > tt ? lt = 0.3 * et.height : 15 <= tt && 35 >= tt ? lt = J === "start" ? 0 : 0.75 * et.height : 195 <= tt && 215 >= tt ? lt = J === "start" ? 0.75 * et.height : 0 : 35 < tt && 90 >= tt ? lt = J === "start" ? 0.25 * -et.height : et.height : 215 < tt && 270 >= tt && (lt = J === "start" ? et.height : 0.25 * -et.height), 15 > ot ? pt = J === "start" ? 0.15 * -et.height : 0.15 * et.height : 165 < ot && 180 >= ot && (pt = J === "start" ? 0.15 * et.height : 0.15 * -et.height), q.attr({ align: at }), q.translate(
pt,
lt + gt
)), Z.pos.x = yt.x + (nt.x || 0), Z.pos.y = yt.y + (dt || 0);
}
}
}
function E(Z) {
this.axis.getPosition && j(Z.pos, this.axis.getPosition(this.pos));
}
function X(Z, q) {
var it = this.chart, et = this.center;
return Z = this.startAngleRad + Z, { x: it.plotLeft + et[0] + Math.cos(Z) * q, y: it.plotTop + et[1] + Math.sin(Z) * q };
}
function g() {
this.isDirty = !1;
}
function m() {
if (this.constructor.prototype.setAxisSize.call(this), this.isRadial) {
this.pane.updateCenter(this);
var Z = this.center = this.pane.center.slice();
if (this.isCircular)
this.sector = this.endAngleRad - this.startAngleRad;
else {
var q = this.postTranslate(this.angleRad, Z[3] / 2);
Z[0] = q.x - this.chart.plotLeft, Z[1] = q.y - this.chart.plotTop;
}
this.len = this.width = this.height = (Z[2] - Z[3]) * f(this.sector, 1) / 2;
}
}
function L() {
this.constructor.prototype.setAxisTranslation.call(this), this.center && (this.transA = this.isCircular ? (this.endAngleRad - this.startAngleRad) / (this.max - this.min || 1) : (this.center[2] - this.center[3]) / 2 / (this.max - this.min || 1), this.minPixelPadding = this.isXAxis ? this.transA * this.minPointOffset : 0);
}
function z(Z) {
Z = this.options = x(this.constructor.defaultOptions, this.defaultPolarOptions, U[this.coll], Z), Z.plotBands || (Z.plotBands = []), w(this, "afterSetOptions");
}
function $(Z, q, it, et, nt, rt, ct) {
var gt = this.axis;
return gt.isRadial ? (Z = gt.getPosition(this.pos, gt.center[2] / 2 + et), q = ["M", q, it, "L", Z.x, Z.y]) : q = Z.call(this, q, it, et, nt, rt, ct), q;
}
var Q = [], A = { gridLineWidth: 1, labels: { align: void 0, distance: 15, x: 0, y: void 0, style: { textOverflow: "none" } }, maxPadding: 0, minPadding: 0, showLastLabel: !1, tickLength: 0 }, H = {
labels: { align: "center", x: 0, y: void 0 },
minorGridLineWidth: 0,
minorTickInterval: "auto",
minorTickLength: 10,
minorTickPosition: "inside",
minorTickWidth: 1,
tickLength: 10,
tickPosition: "inside",
tickWidth: 2,
title: { rotation: 0 },
zIndex: 2
}, Y = { gridLineInterpolation: "circle", gridLineWidth: 1, labels: { align: "right", x: -3, y: -2 }, showLastLabel: !1, title: { x: 4, text: null, rotation: 90 } };
R.compose = function(Z, q) {
return Q.indexOf(Z) === -1 && (Q.push(Z), V(Z, "afterInit", s), V(Z, "autoLabelAlign", n), V(Z, "destroy", P), V(Z, "init", D), V(Z, "initialAxisTranslation", I)), Q.indexOf(q) === -1 && (Q.push(q), V(
q,
"afterGetLabelPosition",
W
), V(q, "afterGetPosition", E), T(q.prototype, "getMarkPath", $)), Z;
};
}(O || (O = {})), O;
}), C(d, "Series/AreaRange/AreaRangePoint.js", [d["Series/Area/AreaSeries.js"], d["Core/Series/Point.js"], d["Core/Utilities.js"]], function(o, y, N) {
var _ = this && this.__extends || function() {
var F = function(B, j) {
return F = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(w, x) {
w.__proto__ = x;
} || function(w, x) {
for (var f in x)
x.hasOwnProperty(f) && (w[f] = x[f]);
}, F(B, j);
};
return function(B, j) {
function w() {
this.constructor = B;
}
F(B, j), B.prototype = j === null ? Object.create(j) : (w.prototype = j.prototype, new w());
};
}(), U = y.prototype, G = N.defined, V = N.isNumber;
return function(F) {
function B() {
var j = F !== null && F.apply(this, arguments) || this;
return j.high = void 0, j.low = void 0, j.options = void 0, j.plotHigh = void 0, j.plotLow = void 0, j.plotHighX = void 0, j.plotLowX = void 0, j.plotX = void 0, j.series = void 0, j;
}
return _(B, F), B.prototype.setState = function() {
var j = this.state, w = this.series, x = w.chart.polar;
G(this.plotHigh) || (this.plotHigh = w.yAxis.toPixels(
this.high,
!0
)), G(this.plotLow) || (this.plotLow = this.plotY = w.yAxis.toPixels(this.low, !0)), w.stateMarkerGraphic && (w.lowerStateMarkerGraphic = w.stateMarkerGraphic, w.stateMarkerGraphic = w.upperStateMarkerGraphic), this.graphic = this.upperGraphic, this.plotY = this.plotHigh, x && (this.plotX = this.plotHighX), U.setState.apply(this, arguments), this.state = j, this.plotY = this.plotLow, this.graphic = this.lowerGraphic, x && (this.plotX = this.plotLowX), w.stateMarkerGraphic && (w.upperStateMarkerGraphic = w.stateMarkerGraphic, w.stateMarkerGraphic = w.lowerStateMarkerGraphic, w.lowerStateMarkerGraphic = void 0), U.setState.apply(this, arguments);
}, B.prototype.haloPath = function() {
var j = this.series.chart.polar, w = [];
return this.plotY = this.plotLow, j && (this.plotX = this.plotLowX), this.isInside && (w = U.haloPath.apply(this, arguments)), this.plotY = this.plotHigh, j && (this.plotX = this.plotHighX), this.isTopInside && (w = w.concat(U.haloPath.apply(this, arguments))), w;
}, B.prototype.isValid = function() {
return V(this.low) && V(this.high);
}, B;
}(o.prototype.pointClass);
}), C(
d,
"Series/AreaRange/AreaRangeSeries.js",
[d["Series/AreaRange/AreaRangePoint.js"], d["Series/Area/AreaSeries.js"], d["Series/Column/ColumnSeries.js"], d["Core/Globals.js"], d["Core/Series/Series.js"], d["Core/Series/SeriesRegistry.js"], d["Core/Utilities.js"]],
function(o, y, N, _, U, G, V) {
var F = this && this.__extends || function() {
var R = function(k, b) {
return R = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(S, v) {
S.__proto__ = v;
} || function(S, v) {
for (var h in v)
v.hasOwnProperty(h) && (S[h] = v[h]);
}, R(k, b);
};
return function(k, b) {
function S() {
this.constructor = k;
}
R(k, b), k.prototype = b === null ? Object.create(b) : (S.prototype = b.prototype, new S());
};
}(), B = y.prototype, j = N.prototype;
N = _.noop;
var w = U.prototype, x = V.defined, f = V.extend, l = V.isArray, T = V.pick, O = V.merge;
return U = function(R) {
function k() {
var b = R !== null && R.apply(this, arguments) || this;
return b.data = void 0, b.options = void 0, b.points = void 0, b.lowerStateMarkerGraphic = void 0, b.xAxis = void 0, b;
}
return F(k, R), k.prototype.toYData = function(b) {
return [b.low, b.high];
}, k.prototype.highToXY = function(b) {
var S = this.chart, v = this.xAxis.postTranslate(b.rectPlotX || 0, this.yAxis.len - b.plotHigh);
b.plotHighX = v.x - S.plotLeft, b.plotHigh = v.y - S.plotTop, b.plotLowX = b.plotX;
}, k.prototype.translate = function() {
var b = this, S = b.yAxis;
B.translate.apply(b), b.points.forEach(function(v) {
var h = v.high, c = v.plotY;
v.isNull ? v.plotY = null : (v.plotLow = c, v.plotHigh = S.translate(b.dataModify ? b.dataModify.modifyValue(h) : h, 0, 1, 0, 1), b.dataModify && (v.yBottom = v.plotHigh));
}), this.chart.polar && this.points.forEach(function(v) {
b.highToXY(v), v.tooltipPos = [(v.plotHighX + v.plotLowX) / 2, (v.plotHigh + v.plotLow) / 2];
});
}, k.prototype.getGraphPath = function(b) {
var S = [], v = [], h, c = B.getGraphPath, u = this.options, i = this.chart.polar, p = i && u.connectEnds !== !1, a = u.connectNulls, t = u.step;
for (b = b || this.points, h = b.length; h--; ) {
var s = b[h], n = i ? { plotX: s.rectPlotX, plotY: s.yBottom, doCurve: !1 } : { plotX: s.plotX, plotY: s.plotY, doCurve: !1 };
s.isNull || p || a || b[h + 1] && !b[h + 1].isNull || v.push(n);
var P = { polarPlotY: s.polarPlotY, rectPlotX: s.rectPlotX, yBottom: s.yBottom, plotX: T(
s.plotHighX,
s.plotX
), plotY: s.plotHigh, isNull: s.isNull };
v.push(P), S.push(P), s.isNull || p || a || b[h - 1] && !b[h - 1].isNull || v.push(n);
}
return b = c.call(this, b), t && (t === !0 && (t = "left"), u.step = { left: "right", center: "center", right: "left" }[t]), S = c.call(this, S), v = c.call(this, v), u.step = t, u = [].concat(b, S), !this.chart.polar && v[0] && v[0][0] === "M" && (v[0] = ["L", v[0][1], v[0][2]]), this.graphPath = u, this.areaPath = b.concat(v), u.isArea = !0, u.xMap = b.xMap, this.areaPath.xMap = b.xMap, u;
}, k.prototype.drawDataLabels = function() {
var b = this.points, S = b.length, v, h = [], c = this.options.dataLabels, u, i = this.chart.inverted;
if (c) {
if (l(c))
var p = c[0] || { enabled: !1 }, a = c[1] || { enabled: !1 };
else
p = f({}, c), p.x = c.xHigh, p.y = c.yHigh, a = f({}, c), a.x = c.xLow, a.y = c.yLow;
if (p.enabled || this._hasPointLabels) {
for (v = S; v--; )
if (u = b[v]) {
var t = p.inside ? u.plotHigh < u.plotLow : u.plotHigh > u.plotLow;
u.y = u.high, u._plotY = u.plotY, u.plotY = u.plotHigh, h[v] = u.dataLabel, u.dataLabel = u.dataLabelUpper, u.below = t, i ? p.align || (p.align = t ? "right" : "left") : p.verticalAlign || (p.verticalAlign = t ? "top" : "bottom");
}
for (this.options.dataLabels = p, w.drawDataLabels && w.drawDataLabels.apply(this, arguments), v = S; v--; )
(u = b[v]) && (u.dataLabelUpper = u.dataLabel, u.dataLabel = h[v], delete u.dataLabels, u.y = u.low, u.plotY = u._plotY);
}
if (a.enabled || this._hasPointLabels) {
for (v = S; v--; )
(u = b[v]) && (t = a.inside ? u.plotHigh < u.plotLow : u.plotHigh > u.plotLow, u.below = !t, i ? a.align || (a.align = t ? "left" : "right") : a.verticalAlign || (a.verticalAlign = t ? "bottom" : "top"));
this.options.dataLabels = a, w.drawDataLabels && w.drawDataLabels.apply(this, arguments);
}
if (p.enabled)
for (v = S; v--; )
(u = b[v]) && (u.dataLabels = [u.dataLabelUpper, u.dataLabel].filter(function(s) {
return !!s;
}));
this.options.dataLabels = c;
}
}, k.prototype.alignDataLabel = function() {
j.alignDataLabel.apply(this, arguments);
}, k.prototype.drawPoints = function() {
var b = this.points.length, S;
for (w.drawPoints.apply(this, arguments), S = 0; S < b; ) {
var v = this.points[S];
v.origProps = { plotY: v.plotY, plotX: v.plotX, isInside: v.isInside, negative: v.negative, zone: v.zone, y: v.y }, v.lowerGraphic = v.graphic, v.graphic = v.upperGraphic, v.plotY = v.plotHigh, x(v.plotHighX) && (v.plotX = v.plotHighX), v.y = T(v.high, v.origProps.y), v.negative = v.y < (this.options.threshold || 0), this.zones.length && (v.zone = v.getZone()), this.chart.polar || (v.isInside = v.isTopInside = typeof v.plotY < "u" && 0 <= v.plotY && v.plotY <= this.yAxis.len && 0 <= v.plotX && v.plotX <= this.xAxis.len), S++;
}
for (w.drawPoints.apply(this, arguments), S = 0; S < b; )
v = this.points[S], v.upperGraphic = v.graphic, v.graphic = v.lowerGraphic, v.origProps && (f(v, v.origProps), delete v.origProps), S++;
}, k.defaultOptions = O(y.defaultOptions, {
lineWidth: 1,
threshold: null,
tooltip: { pointFormat: '● {series.name}: {point.low} - {point.high}
' },
trackByArea: !0,
dataLabels: { align: void 0, verticalAlign: void 0, xLow: 0, xHigh: 0, yLow: 0, yHigh: 0 }
}), k;
}(y), f(U.prototype, { pointArrayMap: ["low", "high"], pointValKey: "low", deferTranslatePolar: !0, pointClass: o, setStackedPoints: N }), G.registerSeriesType("arearange", U), U;
}
), C(d, "Series/AreaSplineRange/AreaSplineRangeSeries.js", [
d["Series/AreaRange/AreaRangeSeries.js"],
d["Core/Series/SeriesRegistry.js"],
d["Core/Utilities.js"]
], function(o, y, N) {
var _ = this && this.__extends || function() {
var F = function(B, j) {
return F = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(w, x) {
w.__proto__ = x;
} || function(w, x) {
for (var f in x)
x.hasOwnProperty(f) && (w[f] = x[f]);
}, F(B, j);
};
return function(B, j) {
function w() {
this.constructor = B;
}
F(B, j), B.prototype = j === null ? Object.create(j) : (w.prototype = j.prototype, new w());
};
}(), U = y.seriesTypes.spline, G = N.merge;
N = N.extend;
var V = function(F) {
function B() {
var j = F !== null && F.apply(this, arguments) || this;
return j.options = void 0, j.data = void 0, j.points = void 0, j;
}
return _(B, F), B.defaultOptions = G(o.defaultOptions), B;
}(o);
return N(V.prototype, { getPointSpline: U.prototype.getPointSpline }), y.registerSeriesType("areasplinerange", V), V;
}), C(d, "Series/BoxPlot/BoxPlotSeries.js", [d["Series/Column/ColumnSeries.js"], d["Core/Globals.js"], d["Core/Series/SeriesRegistry.js"], d["Core/Utilities.js"]], function(o, y, N, _) {
var U = this && this.__extends || function() {
var B = function(j, w) {
return B = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(x, f) {
x.__proto__ = f;
} || function(x, f) {
for (var l in f)
f.hasOwnProperty(l) && (x[l] = f[l]);
}, B(j, w);
};
return function(j, w) {
function x() {
this.constructor = j;
}
B(j, w), j.prototype = w === null ? Object.create(w) : (x.prototype = w.prototype, new x());
};
}();
y = y.noop;
var G = _.extend, V = _.merge, F = _.pick;
return _ = function(B) {
function j() {
var w = B !== null && B.apply(this, arguments) || this;
return w.data = void 0, w.options = void 0, w.points = void 0, w;
}
return U(j, B), j.prototype.pointAttribs = function() {
return {};
}, j.prototype.translate = function() {
var w = this.yAxis, x = this.pointArrayMap;
B.prototype.translate.apply(this), this.points.forEach(function(f) {
x.forEach(function(l) {
f[l] !== null && (f[l + "Plot"] = w.translate(f[l], 0, 1, 0, 1));
}), f.plotHigh = f.highPlot;
});
}, j.prototype.drawPoints = function() {
var w = this, x = w.options, f = w.chart, l = f.renderer, T, O, R, k, b, S, v = 0, h, c, u, i, p = w.doQuartiles !== !1, a, t = w.options.whiskerLength;
w.points.forEach(function(s) {
var n = s.graphic, P = n ? "animate" : "attr", D = s.shapeArgs, I = {}, W = {}, E = {}, X = {}, g = s.color || w.color;
typeof s.plotY < "u" && (h = Math.round(D.width), c = Math.floor(D.x), u = c + h, i = Math.round(h / 2), T = Math.floor(p ? s.q1Plot : s.lowPlot), O = Math.floor(p ? s.q3Plot : s.lowPlot), R = Math.floor(s.highPlot), k = Math.floor(s.lowPlot), n || (s.graphic = n = l.g("point").add(w.group), s.stem = l.path().addClass("highcharts-boxplot-stem").add(n), t && (s.whiskers = l.path().addClass("highcharts-boxplot-whisker").add(n)), p && (s.box = l.path(void 0).addClass("highcharts-boxplot-box").add(n)), s.medianShape = l.path(void 0).addClass("highcharts-boxplot-median").add(n)), f.styledMode || (W.stroke = s.stemColor || x.stemColor || g, W["stroke-width"] = F(s.stemWidth, x.stemWidth, x.lineWidth), W.dashstyle = s.stemDashStyle || x.stemDashStyle || x.dashStyle, s.stem.attr(W), t && (E.stroke = s.whiskerColor || x.whiskerColor || g, E["stroke-width"] = F(s.whiskerWidth, x.whiskerWidth, x.lineWidth), E.dashstyle = s.whiskerDashStyle || x.whiskerDashStyle || x.dashStyle, s.whiskers.attr(E)), p && (I.fill = s.fillColor || x.fillColor || g, I.stroke = x.lineColor || g, I["stroke-width"] = x.lineWidth || 0, I.dashstyle = s.boxDashStyle || x.boxDashStyle || x.dashStyle, s.box.attr(I)), X.stroke = s.medianColor || x.medianColor || g, X["stroke-width"] = F(s.medianWidth, x.medianWidth, x.lineWidth), X.dashstyle = s.medianDashStyle || x.medianDashStyle || x.dashStyle, s.medianShape.attr(X)), S = s.stem.strokeWidth() % 2 / 2, v = c + i + S, n = [["M", v, O], ["L", v, R], ["M", v, T], ["L", v, k]], s.stem[P]({ d: n }), p && (S = s.box.strokeWidth() % 2 / 2, T = Math.floor(T) + S, O = Math.floor(O) + S, c += S, u += S, n = [["M", c, O], ["L", c, T], ["L", u, T], ["L", u, O], ["L", c, O], ["Z"]], s.box[P]({ d: n })), t && (S = s.whiskers.strokeWidth() % 2 / 2, R += S, k += S, a = /%$/.test(t) ? i * parseFloat(t) / 100 : t / 2, n = [["M", v - a, R], ["L", v + a, R], ["M", v - a, k], ["L", v + a, k]], s.whiskers[P]({ d: n })), b = Math.round(s.medianPlot), S = s.medianShape.strokeWidth() % 2 / 2, b += S, n = [["M", c, b], ["L", u, b]], s.medianShape[P]({ d: n }));
});
}, j.prototype.toYData = function(w) {
return [w.low, w.q1, w.median, w.q3, w.high];
}, j.defaultOptions = V(o.defaultOptions, {
threshold: null,
tooltip: { pointFormat: '● {series.name}
Maximum: {point.high}
Upper quartile: {point.q3}
Median: {point.median}
Lower quartile: {point.q1}
Minimum: {point.low}
' },
whiskerLength: "50%",
fillColor: "#ffffff",
lineWidth: 1,
medianWidth: 2,
whiskerWidth: 2
}), j;
}(o), G(_.prototype, { pointArrayMap: ["low", "q1", "median", "q3", "high"], pointValKey: "high", drawDataLabels: y, setStackedPoints: y }), N.registerSeriesType("boxplot", _), _;
}), C(d, "Series/Bubble/BubbleLegendDefaults.js", [], function() {
return { borderColor: void 0, borderWidth: 2, className: void 0, color: void 0, connectorClassName: void 0, connectorColor: void 0, connectorDistance: 60, connectorWidth: 1, enabled: !1, labels: {
className: void 0,
allowOverlap: !1,
format: "",
formatter: void 0,
align: "right",
style: { fontSize: "10px", color: "#000000" },
x: 0,
y: 0
}, maxSize: 60, minSize: 10, legendIndex: 0, ranges: { value: void 0, borderColor: void 0, color: void 0, connectorColor: void 0 }, sizeBy: "area", sizeByAbsoluteValue: !1, zIndex: 1, zThreshold: 0 };
}), C(d, "Series/Bubble/BubbleLegendItem.js", [d["Core/Color/Color.js"], d["Core/FormatUtilities.js"], d["Core/Globals.js"], d["Core/Utilities.js"]], function(o, y, N, _) {
var U = o.parse, G = N.noop, V = _.arrayMax, F = _.arrayMin, B = _.isNumber, j = _.merge, w = _.pick, x = _.stableSort;
return function() {
function f(l, T) {
this.options = this.symbols = this.visible = this.selected = this.ranges = this.movementX = this.maxLabel = this.legendSymbol = this.legendItemWidth = this.legendItemHeight = this.legendItem = this.legendGroup = this.legend = this.fontMetrics = this.chart = void 0, this.setState = G, this.init(l, T);
}
return f.prototype.init = function(l, T) {
this.options = l, this.visible = !0, this.chart = T.chart, this.legend = T;
}, f.prototype.addToLegend = function(l) {
l.splice(
this.options.legendIndex,
0,
this
);
}, f.prototype.drawLegendSymbol = function(l) {
var T = this.chart, O = this.options, R = w(l.options.itemDistance, 20), k = O.ranges, b = O.connectorDistance;
this.fontMetrics = T.renderer.fontMetrics(O.labels.style.fontSize), k && k.length && B(k[0].value) ? (x(k, function(S, v) {
return v.value - S.value;
}), this.ranges = k, this.setOptions(), this.render(), l = this.getMaxLabelSize(), k = this.ranges[0].radius, T = 2 * k, b = b - k + l.width, b = 0 < b ? b : 0, this.maxLabel = l, this.movementX = O.labels.align === "left" ? b : 0, this.legendItemWidth = T + b + R, this.legendItemHeight = T + this.fontMetrics.h / 2) : l.options.bubbleLegend.autoRanges = !0;
}, f.prototype.setOptions = function() {
var l = this.ranges, T = this.options, O = this.chart.series[T.seriesIndex], R = this.legend.baseline, k = { zIndex: T.zIndex, "stroke-width": T.borderWidth }, b = { zIndex: T.zIndex, "stroke-width": T.connectorWidth }, S = { align: this.legend.options.rtl || T.labels.align === "left" ? "right" : "left", zIndex: T.zIndex }, v = O.options.marker.fillOpacity, h = this.chart.styledMode;
l.forEach(function(c, u) {
h || (k.stroke = w(c.borderColor, T.borderColor, O.color), k.fill = w(c.color, T.color, v !== 1 ? U(O.color).setOpacity(v).get("rgba") : O.color), b.stroke = w(c.connectorColor, T.connectorColor, O.color)), l[u].radius = this.getRangeRadius(c.value), l[u] = j(l[u], { center: l[0].radius - l[u].radius + R }), h || j(!0, l[u], { bubbleAttribs: j(k), connectorAttribs: j(b), labelAttribs: S });
}, this);
}, f.prototype.getRangeRadius = function(l) {
var T = this.options;
return this.chart.series[this.options.seriesIndex].getRadius.call(
this,
T.ranges[T.ranges.length - 1].value,
T.ranges[0].value,
T.minSize,
T.maxSize,
l
);
}, f.prototype.render = function() {
var l = this.chart.renderer, T = this.options.zThreshold;
this.symbols || (this.symbols = { connectors: [], bubbleItems: [], labels: [] }), this.legendSymbol = l.g("bubble-legend"), this.legendItem = l.g("bubble-legend-item"), this.legendSymbol.translateX = 0, this.legendSymbol.translateY = 0, this.ranges.forEach(function(O) {
O.value >= T && this.renderRange(O);
}, this), this.legendSymbol.add(this.legendItem), this.legendItem.add(this.legendGroup), this.hideOverlappingLabels();
}, f.prototype.renderRange = function(l) {
var T = this.options, O = T.labels, R = this.chart, k = R.series[T.seriesIndex], b = R.renderer, S = this.symbols;
R = S.labels;
var v = l.center, h = Math.abs(l.radius), c = T.connectorDistance || 0, u = O.align, i = T.connectorWidth, p = this.ranges[0].radius || 0, a = v - h - T.borderWidth / 2 + i / 2, t = this.fontMetrics;
t = t.f / 2 - (t.h - t.f) / 2;
var s = b.styledMode;
c = this.legend.options.rtl || u === "left" ? -c : c, u === "center" && (c = 0, T.connectorDistance = 0, l.labelAttribs.align = "center"), u = a + T.labels.y;
var n = p + c + T.labels.x;
S.bubbleItems.push(b.circle(
p,
v + ((a % 1 ? 1 : 0.5) - (i % 2 ? 0 : 0.5)),
h
).attr(s ? {} : l.bubbleAttribs).addClass((s ? "highcharts-color-" + k.colorIndex + " " : "") + "highcharts-bubble-legend-symbol " + (T.className || "")).add(this.legendSymbol)), S.connectors.push(b.path(b.crispLine([["M", p, a], ["L", p + c, a]], T.connectorWidth)).attr(s ? {} : l.connectorAttribs).addClass((s ? "highcharts-color-" + this.options.seriesIndex + " " : "") + "highcharts-bubble-legend-connectors " + (T.connectorClassName || "")).add(this.legendSymbol)), l = b.text(this.formatLabel(l), n, u + t).attr(s ? {} : l.labelAttribs).css(s ? {} : O.style).addClass("highcharts-bubble-legend-labels " + (T.labels.className || "")).add(this.legendSymbol), R.push(l), l.placed = !0, l.alignAttr = { x: n, y: u + t };
}, f.prototype.getMaxLabelSize = function() {
var l, T;
return this.symbols.labels.forEach(function(O) {
T = O.getBBox(!0), l = l ? T.width > l.width ? T : l : T;
}), l || {};
}, f.prototype.formatLabel = function(l) {
var T = this.options, O = T.labels.formatter;
T = T.labels.format;
var R = this.chart.numberFormatter;
return T ? y.format(T, l) : O ? O.call(l) : R(l.value, 1);
}, f.prototype.hideOverlappingLabels = function() {
var l = this.chart, T = this.symbols;
!this.options.labels.allowOverlap && T && (l.hideOverlappingLabels(T.labels), T.labels.forEach(function(O, R) {
O.newOpacity ? O.newOpacity !== O.oldOpacity && T.connectors[R].show() : T.connectors[R].hide();
}));
}, f.prototype.getRanges = function() {
var l = this.legend.bubbleLegend, T = l.options.ranges, O, R = Number.MAX_VALUE, k = -Number.MAX_VALUE;
l.chart.series.forEach(function(S) {
S.isBubble && !S.ignoreSeries && (O = S.zData.filter(B), O.length && (R = w(S.options.zMin, Math.min(R, Math.max(
F(O),
S.options.displayNegative === !1 ? S.options.zThreshold : -Number.MAX_VALUE
))), k = w(S.options.zMax, Math.max(k, V(O)))));
});
var b = R === k ? [{ value: k }] : [{ value: R }, { value: (R + k) / 2 }, { value: k, autoRanges: !0 }];
return T.length && T[0].radius && b.reverse(), b.forEach(function(S, v) {
T && T[v] && (b[v] = j(T[v], S));
}), b;
}, f.prototype.predictBubbleSizes = function() {
var l = this.chart, T = this.fontMetrics, O = l.legend.options, R = O.floating, k = (O = O.layout === "horizontal") ? l.legend.lastLineHeight : 0, b = l.plotSizeX, S = l.plotSizeY, v = l.series[this.options.seriesIndex], h = v.getPxExtremes();
l = Math.ceil(h.minPxSize), h = Math.ceil(h.maxPxSize);
var c = Math.min(S, b);
return v = v.options.maxSize, R || !/%$/.test(v) ? T = h : (v = parseFloat(v), T = (c + k - T.h / 2) * v / 100 / (v / 100 + 1), (O && S - T >= b || !O && b - T >= S) && (T = h)), [l, Math.ceil(T)];
}, f.prototype.updateRanges = function(l, T) {
var O = this.legend.options.bubbleLegend;
O.minSize = l, O.maxSize = T, O.ranges = this.getRanges();
}, f.prototype.correctSizes = function() {
var l = this.legend, T = this.chart.series[this.options.seriesIndex].getPxExtremes();
1 < Math.abs(Math.ceil(T.maxPxSize) - this.options.maxSize) && (this.updateRanges(this.options.minSize, T.maxPxSize), l.render());
}, f;
}();
}), C(d, "Series/Bubble/BubbleLegendComposition.js", [d["Series/Bubble/BubbleLegendDefaults.js"], d["Series/Bubble/BubbleLegendItem.js"], d["Core/DefaultOptions.js"], d["Core/Utilities.js"]], function(o, y, N, _) {
var U = N.setOptions, G = _.addEvent, V = _.objectEach, F = _.wrap, B;
return function(j) {
function w(k, b, S) {
var v = this.legend, h = 0 <= x(this);
if (v && v.options.enabled && v.bubbleLegend && v.options.bubbleLegend.autoRanges && h) {
var c = v.bubbleLegend.options;
h = v.bubbleLegend.predictBubbleSizes(), v.bubbleLegend.updateRanges(h[0], h[1]), c.placed || (v.group.placed = !1, v.allItems.forEach(function(u) {
u.legendGroup.translateY = null;
})), v.render(), this.getMargins(), this.axes.forEach(function(u) {
u.visible && u.render(), c.placed || (u.setScale(), u.updateNames(), V(u.ticks, function(i) {
i.isNew = !0, i.isNewLabel = !0;
}));
}), c.placed = !0, this.getMargins(), k.call(this, b, S), v.bubbleLegend.correctSizes(), O(v, f(v));
} else
k.call(this, b, S), v && v.options.enabled && v.bubbleLegend && (v.render(), O(v, f(v)));
}
function x(k) {
k = k.series;
for (var b = 0; b < k.length; ) {
if (k[b] && k[b].isBubble && k[b].visible && k[b].zData.length)
return b;
b++;
}
return -1;
}
function f(k) {
k = k.allItems;
var b = [], S = k.length, v, h = 0;
for (v = 0; v < S; v++)
if (k[v].legendItemHeight && (k[v].itemHeight = k[v].legendItemHeight), k[v] === k[S - 1] || k[v + 1] && k[v]._legendItemPos[1] !== k[v + 1]._legendItemPos[1]) {
b.push({ height: 0 });
var c = b[b.length - 1];
for (h; h <= v; h++)
k[h].itemHeight > c.height && (c.height = k[h].itemHeight);
c.step = v;
}
return b;
}
function l(k) {
var b = this.bubbleLegend, S = this.options, v = S.bubbleLegend, h = x(this.chart);
b && b.ranges && b.ranges.length && (v.ranges.length && (v.autoRanges = !!v.ranges[0].autoRanges), this.destroyItem(b)), 0 <= h && S.enabled && v.enabled && (v.seriesIndex = h, this.bubbleLegend = new y(v, this), this.bubbleLegend.addToLegend(k.allItems));
}
function T() {
var k = this.chart, b = this.visible, S = this.chart.legend;
S && S.bubbleLegend && (this.visible = !b, this.ignoreSeries = b, k = 0 <= x(k), S.bubbleLegend.visible !== k && (S.update({ bubbleLegend: { enabled: k } }), S.bubbleLegend.visible = k), this.visible = b);
}
function O(k, b) {
var S = k.options.rtl, v, h, c, u = 0;
k.allItems.forEach(function(i, p) {
v = i.legendGroup.translateX, h = i._legendItemPos[1], ((c = i.movementX) || S && i.ranges) && (c = S ? v - i.options.maxSize / 2 : v + c, i.legendGroup.attr({ translateX: c })), p > b[u].step && u++, i.legendGroup.attr({ translateY: Math.round(h + b[u].height / 2) }), i._legendItemPos[1] = h + b[u].height / 2;
});
}
var R = [];
j.compose = function(k, b, S) {
R.indexOf(k) === -1 && (R.push(k), U({ legend: { bubbleLegend: o } }), F(k.prototype, "drawChartBox", w)), R.indexOf(b) === -1 && (R.push(b), G(b, "afterGetAllItems", l)), R.indexOf(S) === -1 && (R.push(S), G(S, "legendItemClick", T));
};
}(B || (B = {})), B;
}), C(d, "Series/Bubble/BubblePoint.js", [d["Core/Series/Point.js"], d["Core/Series/SeriesRegistry.js"], d["Core/Utilities.js"]], function(o, y, N) {
var _ = this && this.__extends || function() {
var U = function(G, V) {
return U = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(F, B) {
F.__proto__ = B;
} || function(F, B) {
for (var j in B)
B.hasOwnProperty(j) && (F[j] = B[j]);
}, U(G, V);
};
return function(G, V) {
function F() {
this.constructor = G;
}
U(G, V), G.prototype = V === null ? Object.create(V) : (F.prototype = V.prototype, new F());
};
}();
return N = N.extend, y = function(U) {
function G() {
var V = U !== null && U.apply(this, arguments) || this;
return V.options = void 0, V.series = void 0, V;
}
return _(G, U), G.prototype.haloPath = function(V) {
return o.prototype.haloPath.call(this, V === 0 ? 0 : (this.marker && this.marker.radius || 0) + V);
}, G;
}(y.seriesTypes.scatter.prototype.pointClass), N(y.prototype, { ttBelow: !1 }), y;
}), C(d, "Series/Bubble/BubbleSeries.js", [
d["Core/Axis/Axis.js"],
d["Series/Bubble/BubbleLegendComposition.js"],
d["Series/Bubble/BubblePoint.js"],
d["Core/Color/Color.js"],
d["Core/Globals.js"],
d["Core/Series/Series.js"],
d["Core/Series/SeriesRegistry.js"],
d["Core/Utilities.js"]
], function(o, y, N, _, U, G, V, F) {
var B = this && this.__extends || function() {
var S = function(v, h) {
return S = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(c, u) {
c.__proto__ = u;
} || function(c, u) {
for (var i in u)
u.hasOwnProperty(i) && (c[i] = u[i]);
}, S(v, h);
};
return function(v, h) {
function c() {
this.constructor = v;
}
S(v, h), v.prototype = h === null ? Object.create(h) : (c.prototype = h.prototype, new c());
};
}(), j = _.parse;
_ = U.noop;
var w = V.seriesTypes;
U = w.column;
var x = w.scatter;
w = F.addEvent;
var f = F.arrayMax, l = F.arrayMin, T = F.clamp, O = F.extend, R = F.isNumber, k = F.merge, b = F.pick;
return F = function(S) {
function v() {
var h = S !== null && S.apply(this, arguments) || this;
return h.data = void 0, h.maxPxSize = void 0, h.minPxSize = void 0, h.options = void 0, h.points = void 0, h.radii = void 0, h.yData = void 0, h.zData = void 0, h;
}
return B(v, S), v.prototype.animate = function(h) {
!h && this.points.length < this.options.animationLimit && this.points.forEach(function(c) {
var u = c.graphic;
u && u.width && (this.hasRendered || u.attr({ x: c.plotX, y: c.plotY, width: 1, height: 1 }), u.animate(this.markerAttribs(c), this.options.animation));
}, this);
}, v.prototype.getRadii = function() {
var h = this, c = this.zData, u = this.yData, i = [], p = this.chart.bubbleZExtremes, a = this.getPxExtremes(), t = a.minPxSize, s = a.maxPxSize;
if (!p) {
var n = Number.MAX_VALUE, P = -Number.MAX_VALUE, D;
this.chart.series.forEach(function(E) {
E.bubblePadding && (E.visible || !h.chart.options.chart.ignoreHiddenSeries) && (E = E.getZExtremes()) && (n = Math.min(n || E.zMin, E.zMin), P = Math.max(P || E.zMax, E.zMax), D = !0);
}), D ? (p = { zMin: n, zMax: P }, this.chart.bubbleZExtremes = p) : p = { zMin: 0, zMax: 0 };
}
var I = 0;
for (a = c.length; I < a; I++) {
var W = c[I];
i.push(this.getRadius(p.zMin, p.zMax, t, s, W, u[I]));
}
this.radii = i;
}, v.prototype.getRadius = function(h, c, u, i, p, a) {
var t = this.options, s = t.sizeBy !== "width", n = t.zThreshold, P = c - h, D = 0.5;
if (a === null || p === null)
return null;
if (R(p)) {
if (t.sizeByAbsoluteValue && (p = Math.abs(p - n), P = Math.max(c - n, Math.abs(h - n)), h = 0), p < h)
return u / 2 - 1;
0 < P && (D = (p - h) / P);
}
return s && 0 <= D && (D = Math.sqrt(D)), Math.ceil(u + D * (i - u)) / 2;
}, v.prototype.hasData = function() {
return !!this.processedXData.length;
}, v.prototype.pointAttribs = function(h, c) {
var u = this.options.marker.fillOpacity;
return h = G.prototype.pointAttribs.call(this, h, c), u !== 1 && (h.fill = j(h.fill).setOpacity(u).get("rgba")), h;
}, v.prototype.translate = function() {
S.prototype.translate.call(this), this.getRadii(), this.translateBubble();
}, v.prototype.translateBubble = function() {
for (var h = this.data, c = this.radii, u = this.getPxExtremes().minPxSize, i = h.length; i--; ) {
var p = h[i], a = c ? c[i] : 0;
R(a) && a >= u / 2 ? (p.marker = O(p.marker, { radius: a, width: 2 * a, height: 2 * a }), p.dlBox = { x: p.plotX - a, y: p.plotY - a, width: 2 * a, height: 2 * a }) : p.shapeArgs = p.plotY = p.dlBox = void 0;
}
}, v.prototype.getPxExtremes = function() {
var h = Math.min(this.chart.plotWidth, this.chart.plotHeight), c = function(i) {
if (typeof i == "string") {
var p = /%$/.test(i);
i = parseInt(i, 10);
}
return p ? h * i / 100 : i;
}, u = c(b(this.options.minSize, 8));
return c = Math.max(c(b(this.options.maxSize, "20%")), u), {
minPxSize: u,
maxPxSize: c
};
}, v.prototype.getZExtremes = function() {
var h = this.options, c = (this.zData || []).filter(R);
if (c.length) {
var u = b(h.zMin, T(l(c), h.displayNegative === !1 ? h.zThreshold || 0 : -Number.MAX_VALUE, Number.MAX_VALUE));
if (h = b(h.zMax, f(c)), R(u) && R(h))
return { zMin: u, zMax: h };
}
}, v.compose = y.compose, v.defaultOptions = k(x.defaultOptions, { dataLabels: { formatter: function() {
var h = this.series.chart.numberFormatter, c = this.point.z;
return R(c) ? h(c, -1) : "";
}, inside: !0, verticalAlign: "middle" }, animationLimit: 250, marker: {
lineColor: null,
lineWidth: 1,
fillOpacity: 0.5,
radius: null,
states: { hover: { radiusPlus: 0 } },
symbol: "circle"
}, minSize: 8, maxSize: "20%", softThreshold: !1, states: { hover: { halo: { size: 5 } } }, tooltip: { pointFormat: "({point.x}, {point.y}), Size: {point.z}" }, turboThreshold: 0, zThreshold: 0, zoneAxis: "z" }), v;
}(x), O(F.prototype, {
alignDataLabel: U.prototype.alignDataLabel,
applyZones: _,
bubblePadding: !0,
buildKDTree: _,
directTouch: !0,
isBubble: !0,
pointArrayMap: ["y", "z"],
pointClass: N,
parallelArrays: ["x", "y", "z"],
trackerGroups: ["group", "dataLabelsGroup"],
specialGroup: "group",
zoneAxis: "z"
}), w(F, "updatedData", function(S) {
delete S.target.chart.bubbleZExtremes;
}), o.prototype.beforePadding = function() {
var S = this, v = this.len, h = this.chart, c = 0, u = v, i = this.isXAxis, p = i ? "xData" : "yData", a = this.min, t = this.max - a, s = v / t, n;
this.series.forEach(function(P) {
if (P.bubblePadding && (P.visible || !h.options.chart.ignoreHiddenSeries)) {
n = S.allowZoomOutside = !0;
var D = P[p];
if (i && P.getRadii(0, 0, P), 0 < t) {
for (var I = D.length; I--; )
if (R(D[I]) && S.dataMin <= D[I] && D[I] <= S.max) {
var W = P.radii && P.radii[I] || 0;
c = Math.min((D[I] - a) * s - W, c), u = Math.max((D[I] - a) * s + W, u);
}
}
}
}), n && 0 < t && !this.logarithmic && (u -= v, s *= (v + Math.max(0, c) - Math.min(u, v)) / v, [["min", "userMin", c], ["max", "userMax", u]].forEach(function(P) {
typeof b(S.options[P[0]], S[P[1]]) > "u" && (S[P[0]] += P[2] / s);
}));
}, V.registerSeriesType("bubble", F), F;
}), C(d, "Series/ColumnRange/ColumnRangePoint.js", [d["Core/Series/SeriesRegistry.js"], d["Core/Utilities.js"]], function(o, y) {
var N = this && this.__extends || function() {
var V = function(F, B) {
return V = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(j, w) {
j.__proto__ = w;
} || function(j, w) {
for (var x in w)
w.hasOwnProperty(x) && (j[x] = w[x]);
}, V(F, B);
};
return function(F, B) {
function j() {
this.constructor = F;
}
V(F, B), F.prototype = B === null ? Object.create(B) : (j.prototype = B.prototype, new j());
};
}(), _ = o.seriesTypes;
o = _.column.prototype.pointClass;
var U = y.extend, G = y.isNumber;
return y = function(V) {
function F() {
var B = V !== null && V.apply(this, arguments) || this;
return B.series = void 0, B.options = void 0, B.barX = void 0, B.pointWidth = void 0, B.shapeType = void 0, B;
}
return N(F, V), F.prototype.isValid = function() {
return G(this.low);
}, F;
}(_.arearange.prototype.pointClass), U(y.prototype, { setState: o.prototype.setState }), y;
}), C(d, "Series/ColumnRange/ColumnRangeSeries.js", [d["Series/ColumnRange/ColumnRangePoint.js"], d["Core/Globals.js"], d["Core/Series/SeriesRegistry.js"], d["Core/Utilities.js"]], function(o, y, N, _) {
var U = this && this.__extends || function() {
var T = function(O, R) {
return T = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(k, b) {
k.__proto__ = b;
} || function(k, b) {
for (var S in b)
b.hasOwnProperty(S) && (k[S] = b[S]);
}, T(O, R);
};
return function(O, R) {
function k() {
this.constructor = O;
}
T(O, R), O.prototype = R === null ? Object.create(R) : (k.prototype = R.prototype, new k());
};
}();
y = y.noop;
var G = N.seriesTypes, V = G.arearange, F = G.column, B = F.prototype, j = V.prototype, w = _.clamp, x = _.merge, f = _.pick;
_ = _.extend;
var l = { pointRange: null, marker: null, states: { hover: { halo: !1 } } };
return G = function(T) {
function O() {
var R = T !== null && T.apply(this, arguments) || this;
return R.data = void 0, R.points = void 0, R.options = void 0, R;
}
return U(O, T), O.prototype.setOptions = function() {
return x(!0, arguments[0], { stacking: void 0 }), j.setOptions.apply(this, arguments);
}, O.prototype.translate = function() {
var R = this, k = R.yAxis, b = R.xAxis, S = b.startAngleRad, v, h = R.chart, c = R.xAxis.isRadial, u = Math.max(h.chartWidth, h.chartHeight) + 999, i;
B.translate.apply(R), R.points.forEach(function(p) {
var a = p.shapeArgs || {}, t = R.options.minPointLength;
p.plotHigh = i = w(k.translate(p.high, 0, 1, 0, 1), -u, u), p.plotLow = w(p.plotY, -u, u);
var s = i, n = f(
p.rectPlotY,
p.plotY
) - i;
Math.abs(n) < t ? (t -= n, n += t, s -= t / 2) : 0 > n && (n *= -1, s -= n), c ? (v = p.barX + S, p.shapeType = "arc", p.shapeArgs = R.polarArc(s + n, s, v, v + p.pointWidth)) : (a.height = n, a.y = s, t = a.x, t = t === void 0 ? 0 : t, a = a.width, a = a === void 0 ? 0 : a, p.tooltipPos = h.inverted ? [k.len + k.pos - h.plotLeft - s - n / 2, b.len + b.pos - h.plotTop - t - a / 2, n] : [b.left - h.plotLeft + t + a / 2, k.pos - h.plotTop + s + n / 2, n]);
});
}, O.prototype.crispCol = function() {
return B.crispCol.apply(this, arguments);
}, O.prototype.drawPoints = function() {
return B.drawPoints.apply(this, arguments);
}, O.prototype.drawTracker = function() {
return B.drawTracker.apply(this, arguments);
}, O.prototype.getColumnMetrics = function() {
return B.getColumnMetrics.apply(this, arguments);
}, O.prototype.pointAttribs = function() {
return B.pointAttribs.apply(this, arguments);
}, O.prototype.adjustForMissingColumns = function() {
return B.adjustForMissingColumns.apply(this, arguments);
}, O.prototype.animate = function() {
return B.animate.apply(this, arguments);
}, O.prototype.translate3dPoints = function() {
return B.translate3dPoints.apply(this, arguments);
}, O.prototype.translate3dShapes = function() {
return B.translate3dShapes.apply(this, arguments);
}, O.defaultOptions = x(F.defaultOptions, V.defaultOptions, l), O;
}(V), _(G.prototype, { directTouch: !0, trackerGroups: ["group", "dataLabelsGroup"], drawGraph: y, getSymbol: y, polarArc: function() {
return B.polarArc.apply(this, arguments);
}, pointClass: o }), N.registerSeriesType("columnrange", G), G;
}), C(d, "Series/ColumnPyramid/ColumnPyramidSeries.js", [d["Series/Column/ColumnSeries.js"], d["Core/Series/SeriesRegistry.js"], d["Core/Utilities.js"]], function(o, y, N) {
var _ = this && this.__extends || function() {
var B = function(j, w) {
return B = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(x, f) {
x.__proto__ = f;
} || function(x, f) {
for (var l in f)
f.hasOwnProperty(l) && (x[l] = f[l]);
}, B(j, w);
};
return function(j, w) {
function x() {
this.constructor = j;
}
B(j, w), j.prototype = w === null ? Object.create(w) : (x.prototype = w.prototype, new x());
};
}(), U = o.prototype, G = N.clamp, V = N.merge, F = N.pick;
return N = function(B) {
function j() {
var w = B !== null && B.apply(this, arguments) || this;
return w.data = void 0, w.options = void 0, w.points = void 0, w;
}
return _(j, B), j.prototype.translate = function() {
var w = this, x = w.chart, f = w.options, l = w.dense = 2 > w.closestPointRange * w.xAxis.transA;
l = w.borderWidth = F(f.borderWidth, l ? 0 : 1);
var T = w.yAxis, O = f.threshold, R = w.translatedThreshold = T.getThreshold(O), k = F(f.minPointLength, 5), b = w.getColumnMetrics(), S = b.width, v = w.barW = Math.max(S, 1 + 2 * l), h = w.pointXOffset = b.offset;
x.inverted && (R -= 0.5), f.pointPadding && (v = Math.ceil(v)), U.translate.apply(w), w.points.forEach(function(c) {
var u = F(c.yBottom, R), i = 999 + Math.abs(u), p = G(c.plotY, -i, T.len + i);
i = c.plotX + h;
var a = v / 2, t = Math.min(p, u);
u = Math.max(p, u) - t;
var s;
c.barX = i, c.pointWidth = S, c.tooltipPos = x.inverted ? [T.len + T.pos - x.plotLeft - p, w.xAxis.len - i - a, u] : [i + a, p + T.pos - x.plotTop, u], p = O + (c.total || c.y), f.stacking === "percent" && (p = O + (0 > c.y) ? -100 : 100), p = T.toPixels(p, !0);
var n = (s = x.plotHeight - p - (x.plotHeight - R)) ? a * (t - p) / s : 0, P = s ? a * (t + u - p) / s : 0;
s = i - n + a, n = i + n + a;
var D = i + P + a;
P = i - P + a;
var I = t - k, W = t + u;
0 > c.y && (I = t, W = t + u + k), x.inverted && (D = T.width - t, s = p - (T.width - R), n = a * (p - D) / s, P = a * (p - (D - u)) / s, s = i + a + n, n = s - 2 * n, D = i - P + a, P = i + P + a, I = t, W = t + u - k, 0 > c.y && (W = t + u + k)), c.shapeType = "path", c.shapeArgs = { x: s, y: I, width: n - s, height: u, d: [["M", s, I], ["L", n, I], ["L", D, W], ["L", P, W], ["Z"]] };
});
}, j.defaultOptions = V(o.defaultOptions, {}), j;
}(o), y.registerSeriesType("columnpyramid", N), N;
}), C(d, "Series/ErrorBar/ErrorBarSeries.js", [d["Series/BoxPlot/BoxPlotSeries.js"], d["Series/Column/ColumnSeries.js"], d["Core/Series/SeriesRegistry.js"], d["Core/Utilities.js"]], function(o, y, N, _) {
var U = this && this.__extends || function() {
var B = function(j, w) {
return B = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(x, f) {
x.__proto__ = f;
} || function(x, f) {
for (var l in f)
f.hasOwnProperty(l) && (x[l] = f[l]);
}, B(j, w);
};
return function(j, w) {
function x() {
this.constructor = j;
}
B(j, w), j.prototype = w === null ? Object.create(w) : (x.prototype = w.prototype, new x());
};
}(), G = N.seriesTypes.arearange, V = _.merge;
_ = _.extend;
var F = function(B) {
function j() {
var w = B !== null && B.apply(this, arguments) || this;
return w.data = void 0, w.options = void 0, w.points = void 0, w;
}
return U(j, B), j.prototype.getColumnMetrics = function() {
return this.linkedParent && this.linkedParent.columnMetrics || y.prototype.getColumnMetrics.call(this);
}, j.prototype.drawDataLabels = function() {
var w = this.pointValKey;
G && (G.prototype.drawDataLabels.call(this), this.data.forEach(function(x) {
x.y = x[w];
}));
}, j.prototype.toYData = function(w) {
return [w.low, w.high];
}, j.defaultOptions = V(o.defaultOptions, {
color: "#000000",
grouping: !1,
linkedTo: ":previous",
tooltip: { pointFormat: '● {series.name}: {point.low} - {point.high}
' },
whiskerWidth: null
}), j;
}(o);
return _(F.prototype, { pointArrayMap: ["low", "high"], pointValKey: "high", doQuartiles: !1 }), N.registerSeriesType("errorbar", F), F;
}), C(d, "Series/Gauge/GaugePoint.js", [d["Core/Series/SeriesRegistry.js"]], function(o) {
var y = this && this.__extends || function() {
var N = function(_, U) {
return N = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(G, V) {
G.__proto__ = V;
} || function(G, V) {
for (var F in V)
V.hasOwnProperty(F) && (G[F] = V[F]);
}, N(_, U);
};
return function(_, U) {
function G() {
this.constructor = _;
}
N(_, U), _.prototype = U === null ? Object.create(U) : (G.prototype = U.prototype, new G());
};
}();
return function(N) {
function _() {
var U = N !== null && N.apply(this, arguments) || this;
return U.options = void 0, U.series = void 0, U.shapeArgs = void 0, U;
}
return y(_, N), _.prototype.setState = function(U) {
this.state = U;
}, _;
}(o.series.prototype.pointClass);
}), C(d, "Series/Gauge/GaugeSeries.js", [d["Series/Gauge/GaugePoint.js"], d["Core/Globals.js"], d["Core/Series/SeriesRegistry.js"], d["Core/Utilities.js"]], function(o, y, N, _) {
var U = this && this.__extends || function() {
var l = function(T, O) {
return l = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(R, k) {
R.__proto__ = k;
} || function(R, k) {
for (var b in k)
k.hasOwnProperty(b) && (R[b] = k[b]);
}, l(T, O);
};
return function(T, O) {
function R() {
this.constructor = T;
}
l(T, O), T.prototype = O === null ? Object.create(O) : (R.prototype = O.prototype, new R());
};
}();
y = y.noop;
var G = N.series, V = N.seriesTypes.column, F = _.clamp, B = _.isNumber, j = _.extend, w = _.merge, x = _.pick, f = _.pInt;
return _ = function(l) {
function T() {
var O = l !== null && l.apply(this, arguments) || this;
return O.data = void 0, O.points = void 0, O.options = void 0, O.yAxis = void 0, O;
}
return U(T, l), T.prototype.translate = function() {
var O = this.yAxis, R = this.options, k = O.center;
this.generatePoints(), this.points.forEach(function(b) {
var S = w(R.dial, b.dial), v = f(x(S.radius, "80%")) * k[2] / 200, h = f(x(S.baseLength, "70%")) * v / 100, c = f(x(S.rearLength, "10%")) * v / 100, u = S.baseWidth || 3, i = S.topWidth || 1, p = R.overshoot, a = O.startAngleRad + O.translate(b.y, null, null, null, !0);
(B(p) || R.wrap === !1) && (p = B(p) ? p / 180 * Math.PI : 0, a = F(
a,
O.startAngleRad - p,
O.endAngleRad + p
)), a = 180 * a / Math.PI, b.shapeType = "path", b.shapeArgs = { d: S.path || [["M", -c, -u / 2], ["L", h, -u / 2], ["L", v, -i / 2], ["L", v, i / 2], ["L", h, u / 2], ["L", -c, u / 2], ["Z"]], translateX: k[0], translateY: k[1], rotation: a }, b.plotX = k[0], b.plotY = k[1];
});
}, T.prototype.drawPoints = function() {
var O = this, R = O.chart, k = O.yAxis.center, b = O.pivot, S = O.options, v = S.pivot, h = R.renderer;
O.points.forEach(function(c) {
var u = c.graphic, i = c.shapeArgs, p = i.d, a = w(S.dial, c.dial);
u ? (u.animate(i), i.d = p) : c.graphic = h[c.shapeType](i).attr({
rotation: i.rotation,
zIndex: 1
}).addClass("highcharts-dial").add(O.group), R.styledMode || c.graphic[u ? "animate" : "attr"]({ stroke: a.borderColor || "none", "stroke-width": a.borderWidth || 0, fill: a.backgroundColor || "#000000" });
}), b ? b.animate({ translateX: k[0], translateY: k[1] }) : (O.pivot = h.circle(0, 0, x(v.radius, 5)).attr({ zIndex: 2 }).addClass("highcharts-pivot").translate(k[0], k[1]).add(O.group), R.styledMode || O.pivot.attr({ "stroke-width": v.borderWidth || 0, stroke: v.borderColor || "#cccccc", fill: v.backgroundColor || "#000000" }));
}, T.prototype.animate = function(O) {
var R = this;
O || R.points.forEach(function(k) {
var b = k.graphic;
b && (b.attr({ rotation: 180 * R.yAxis.startAngleRad / Math.PI }), b.animate({ rotation: k.shapeArgs.rotation }, R.options.animation));
});
}, T.prototype.render = function() {
this.group = this.plotGroup("group", "series", this.visible ? "visible" : "hidden", this.options.zIndex, this.chart.seriesGroup), G.prototype.render.call(this), this.group.clip(this.chart.clipRect);
}, T.prototype.setData = function(O, R) {
G.prototype.setData.call(this, O, !1), this.processData(), this.generatePoints(), x(R, !0) && this.chart.redraw();
}, T.prototype.hasData = function() {
return !!this.points.length;
}, T.defaultOptions = w(G.defaultOptions, { dataLabels: { borderColor: "#cccccc", borderRadius: 3, borderWidth: 1, crop: !1, defer: !1, enabled: !0, verticalAlign: "top", y: 15, zIndex: 2 }, dial: {}, pivot: {}, tooltip: { headerFormat: "" }, showInLegend: !1 }), T;
}(G), j(_.prototype, { angular: !0, directTouch: !0, drawGraph: y, drawTracker: V.prototype.drawTracker, fixedBox: !0, forceDL: !0, noSharedTooltip: !0, pointClass: o, trackerGroups: [
"group",
"dataLabelsGroup"
] }), N.registerSeriesType("gauge", _), _;
}), C(d, "Series/PackedBubble/PackedBubblePoint.js", [d["Core/Chart/Chart.js"], d["Core/Series/Point.js"], d["Core/Series/SeriesRegistry.js"]], function(o, y, N) {
var _ = this && this.__extends || function() {
var U = function(G, V) {
return U = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(F, B) {
F.__proto__ = B;
} || function(F, B) {
for (var j in B)
B.hasOwnProperty(j) && (F[j] = B[j]);
}, U(G, V);
};
return function(G, V) {
function F() {
this.constructor = G;
}
U(G, V), G.prototype = V === null ? Object.create(V) : (F.prototype = V.prototype, new F());
};
}();
return function(U) {
function G() {
var V = U !== null && U.apply(this, arguments) || this;
return V.degree = NaN, V.mass = NaN, V.radius = NaN, V.options = void 0, V.series = void 0, V.value = null, V;
}
return _(G, U), G.prototype.destroy = function() {
return this.series.layout && this.series.layout.removeElementFromCollection(this, this.series.layout.nodes), y.prototype.destroy.apply(this, arguments);
}, G.prototype.firePointEvent = function() {
var V = this.series.options;
if (this.isParentNode && V.parentNode) {
var F = V.allowPointSelect;
V.allowPointSelect = V.parentNode.allowPointSelect, y.prototype.firePointEvent.apply(this, arguments), V.allowPointSelect = F;
} else
y.prototype.firePointEvent.apply(this, arguments);
}, G.prototype.select = function() {
var V = this.series.chart;
this.isParentNode ? (V.getSelectedPoints = V.getSelectedParentNodes, y.prototype.select.apply(this, arguments), V.getSelectedPoints = o.prototype.getSelectedPoints) : y.prototype.select.apply(this, arguments);
}, G;
}(N.seriesTypes.bubble.prototype.pointClass);
}), C(d, "Series/Networkgraph/DraggableNodes.js", [d["Core/Chart/Chart.js"], d["Core/Globals.js"], d["Core/Utilities.js"]], function(o, y, N) {
var _ = N.addEvent;
y.dragNodesMixin = { onMouseDown: function(U, G) {
G = this.chart.pointer.normalize(G), U.fixedPosition = { chartX: G.chartX, chartY: G.chartY, plotX: U.plotX, plotY: U.plotY }, U.inDragMode = !0;
}, onMouseMove: function(U, G) {
if (U.fixedPosition && U.inDragMode) {
var V = this.chart, F = V.pointer.normalize(G);
G = U.fixedPosition.chartX - F.chartX, F = U.fixedPosition.chartY - F.chartY;
var B = void 0, j = void 0, w = V.graphLayoutsLookup;
(5 < Math.abs(G) || 5 < Math.abs(F)) && (B = U.fixedPosition.plotX - G, j = U.fixedPosition.plotY - F, V.isInsidePlot(B, j) && (U.plotX = B, U.plotY = j, U.hasDragged = !0, this.redrawHalo(U), w.forEach(function(x) {
x.restartSimulation();
})));
}
}, onMouseUp: function(U, G) {
U.fixedPosition && (U.hasDragged && (this.layout.enableSimulation ? this.layout.start() : this.chart.redraw()), U.inDragMode = U.hasDragged = !1, this.options.fixedDraggable || delete U.fixedPosition);
}, redrawHalo: function(U) {
U && this.halo && this.halo.attr({ d: U.haloPath(this.options.states.hover.halo.size) });
} }, _(o, "load", function() {
var U = this, G, V, F;
U.container && (G = _(U.container, "mousedown", function(B) {
var j = U.hoverPoint;
j && j.series && j.series.hasDraggableNodes && j.series.options.draggable && (j.series.onMouseDown(j, B), V = _(U.container, "mousemove", function(w) {
return j && j.series && j.series.onMouseMove(j, w);
}), F = _(U.container.ownerDocument, "mouseup", function(w) {
return V(), F(), j && j.series && j.series.onMouseUp(j, w);
}));
})), _(U, "destroy", function() {
G();
});
});
}), C(
d,
"Series/Networkgraph/Integrations.js",
[d["Core/Globals.js"]],
function(o) {
o.networkgraphIntegrations = { verlet: { attractiveForceFunction: function(y, N) {
return (N - y) / y;
}, repulsiveForceFunction: function(y, N) {
return (N - y) / y * (N > y ? 1 : 0);
}, barycenter: function() {
var y = this.options.gravitationalConstant, N = this.barycenter.xFactor, _ = this.barycenter.yFactor;
N = (N - (this.box.left + this.box.width) / 2) * y, _ = (_ - (this.box.top + this.box.height) / 2) * y, this.nodes.forEach(function(U) {
U.fixedPosition || (U.plotX -= N / U.mass / U.degree, U.plotY -= _ / U.mass / U.degree);
});
}, repulsive: function(y, N, _) {
N = N * this.diffTemperature / y.mass / y.degree, y.fixedPosition || (y.plotX += _.x * N, y.plotY += _.y * N);
}, attractive: function(y, N, _) {
var U = y.getMass(), G = -_.x * N * this.diffTemperature;
N = -_.y * N * this.diffTemperature, y.fromNode.fixedPosition || (y.fromNode.plotX -= G * U.fromNode / y.fromNode.degree, y.fromNode.plotY -= N * U.fromNode / y.fromNode.degree), y.toNode.fixedPosition || (y.toNode.plotX += G * U.toNode / y.toNode.degree, y.toNode.plotY += N * U.toNode / y.toNode.degree);
}, integrate: function(y, N) {
var _ = -y.options.friction, U = y.options.maxSpeed, G = (N.plotX + N.dispX - N.prevX) * _;
_ *= N.plotY + N.dispY - N.prevY;
var V = Math.abs, F = V(G) / (G || 1);
V = V(_) / (_ || 1), G = F * Math.min(U, Math.abs(G)), _ = V * Math.min(U, Math.abs(_)), N.prevX = N.plotX + N.dispX, N.prevY = N.plotY + N.dispY, N.plotX += G, N.plotY += _, N.temperature = y.vectorLength({ x: G, y: _ });
}, getK: function(y) {
return Math.pow(y.box.width * y.box.height / y.nodes.length, 0.5);
} }, euler: { attractiveForceFunction: function(y, N) {
return y * y / N;
}, repulsiveForceFunction: function(y, N) {
return N * N / y;
}, barycenter: function() {
var y = this.options.gravitationalConstant, N = this.barycenter.xFactor, _ = this.barycenter.yFactor;
this.nodes.forEach(function(U) {
if (!U.fixedPosition) {
var G = U.getDegree();
G *= 1 + G / 2, U.dispX += (N - U.plotX) * y * G / U.degree, U.dispY += (_ - U.plotY) * y * G / U.degree;
}
});
}, repulsive: function(y, N, _, U) {
y.dispX += _.x / U * N / y.degree, y.dispY += _.y / U * N / y.degree;
}, attractive: function(y, N, _, U) {
var G = y.getMass(), V = _.x / U * N;
N *= _.y / U, y.fromNode.fixedPosition || (y.fromNode.dispX -= V * G.fromNode / y.fromNode.degree, y.fromNode.dispY -= N * G.fromNode / y.fromNode.degree), y.toNode.fixedPosition || (y.toNode.dispX += V * G.toNode / y.toNode.degree, y.toNode.dispY += N * G.toNode / y.toNode.degree);
}, integrate: function(y, N) {
N.dispX += N.dispX * y.options.friction, N.dispY += N.dispY * y.options.friction;
var _ = N.temperature = y.vectorLength({ x: N.dispX, y: N.dispY });
_ !== 0 && (N.plotX += N.dispX / _ * Math.min(Math.abs(N.dispX), y.temperature), N.plotY += N.dispY / _ * Math.min(Math.abs(N.dispY), y.temperature));
}, getK: function(y) {
return Math.pow(y.box.width * y.box.height / y.nodes.length, 0.3);
} } };
}
), C(
d,
"Series/Networkgraph/QuadTree.js",
[d["Core/Globals.js"], d["Core/Utilities.js"]],
function(o, y) {
y = y.extend;
var N = o.QuadTreeNode = function(_) {
this.box = _, this.boxSize = Math.min(_.width, _.height), this.nodes = [], this.body = this.isInternal = !1, this.isEmpty = !0;
};
y(N.prototype, { insert: function(_, U) {
this.isInternal ? this.nodes[this.getBoxPosition(_)].insert(_, U - 1) : (this.isEmpty = !1, this.body ? U ? (this.isInternal = !0, this.divideBox(), this.body !== !0 && (this.nodes[this.getBoxPosition(this.body)].insert(this.body, U - 1), this.body = !0), this.nodes[this.getBoxPosition(_)].insert(_, U - 1)) : (U = new N({
top: _.plotX,
left: _.plotY,
width: 0.1,
height: 0.1
}), U.body = _, U.isInternal = !1, this.nodes.push(U)) : (this.isInternal = !1, this.body = _));
}, updateMassAndCenter: function() {
var _ = 0, U = 0, G = 0;
this.isInternal ? (this.nodes.forEach(function(V) {
V.isEmpty || (_ += V.mass, U += V.plotX * V.mass, G += V.plotY * V.mass);
}), U /= _, G /= _) : this.body && (_ = this.body.mass, U = this.body.plotX, G = this.body.plotY), this.mass = _, this.plotX = U, this.plotY = G;
}, divideBox: function() {
var _ = this.box.width / 2, U = this.box.height / 2;
this.nodes[0] = new N({
left: this.box.left,
top: this.box.top,
width: _,
height: U
}), this.nodes[1] = new N({ left: this.box.left + _, top: this.box.top, width: _, height: U }), this.nodes[2] = new N({ left: this.box.left + _, top: this.box.top + U, width: _, height: U }), this.nodes[3] = new N({ left: this.box.left, top: this.box.top + U, width: _, height: U });
}, getBoxPosition: function(_) {
var U = _.plotY < this.box.top + this.box.height / 2;
return _.plotX < this.box.left + this.box.width / 2 ? U ? 0 : 3 : U ? 1 : 2;
} }), o = o.QuadTree = function(_, U, G, V) {
this.box = { left: _, top: U, width: G, height: V }, this.maxDepth = 25, this.root = new N(
this.box,
"0"
), this.root.isInternal = !0, this.root.isRoot = !0, this.root.divideBox();
}, y(o.prototype, { insertNodes: function(_) {
_.forEach(function(U) {
this.root.insert(U, this.maxDepth);
}, this);
}, visitNodeRecursive: function(_, U, G) {
var V;
_ || (_ = this.root), _ === this.root && U && (V = U(_)), V !== !1 && (_.nodes.forEach(function(F) {
if (F.isInternal) {
if (U && (V = U(F)), V === !1)
return;
this.visitNodeRecursive(F, U, G);
} else
F.body && U && U(F.body);
G && G(F);
}, this), _ === this.root && G && G(_));
}, calculateMassAndCenter: function() {
this.visitNodeRecursive(
null,
null,
function(_) {
_.updateMassAndCenter();
}
);
} });
}
), C(d, "Series/Networkgraph/Layouts.js", [d["Core/Chart/Chart.js"], d["Core/Animation/AnimationUtilities.js"], d["Core/Globals.js"], d["Core/Utilities.js"]], function(o, y, N, _) {
var U = y.setAnimation;
y = _.addEvent;
var G = _.clamp, V = _.defined, F = _.extend, B = _.isFunction, j = _.pick;
N.layouts = { "reingold-fruchterman": function() {
} }, F(N.layouts["reingold-fruchterman"].prototype, {
init: function(w) {
this.options = w, this.nodes = [], this.links = [], this.series = [], this.box = {
x: 0,
y: 0,
width: 0,
height: 0
}, this.setInitialRendering(!0), this.integration = N.networkgraphIntegrations[w.integration], this.enableSimulation = w.enableSimulation, this.attractiveForce = j(w.attractiveForce, this.integration.attractiveForceFunction), this.repulsiveForce = j(w.repulsiveForce, this.integration.repulsiveForceFunction), this.approximation = w.approximation;
},
updateSimulation: function(w) {
this.enableSimulation = j(w, this.options.enableSimulation);
},
start: function() {
var w = this.series, x = this.options;
this.currentStep = 0, this.forces = w[0] && w[0].forces || [], this.chart = w[0] && w[0].chart, this.initialRendering && (this.initPositions(), w.forEach(function(f) {
f.finishedAnimating = !0, f.render();
})), this.setK(), this.resetSimulation(x), this.enableSimulation && this.step();
},
step: function() {
var w = this, x = this.series;
w.currentStep++, w.approximation === "barnes-hut" && (w.createQuadTree(), w.quadTree.calculateMassAndCenter()), w.forces.forEach(function(f) {
w[f + "Forces"](w.temperature);
}), w.applyLimits(w.temperature), w.temperature = w.coolDown(
w.startTemperature,
w.diffTemperature,
w.currentStep
), w.prevSystemTemperature = w.systemTemperature, w.systemTemperature = w.getSystemTemperature(), w.enableSimulation && (x.forEach(function(f) {
f.chart && f.render();
}), w.maxIterations-- && isFinite(w.temperature) && !w.isStable() ? (w.simulation && N.win.cancelAnimationFrame(w.simulation), w.simulation = N.win.requestAnimationFrame(function() {
w.step();
})) : w.simulation = !1);
},
stop: function() {
this.simulation && N.win.cancelAnimationFrame(this.simulation);
},
setArea: function(w, x, f, l) {
this.box = {
left: w,
top: x,
width: f,
height: l
};
},
setK: function() {
this.k = this.options.linkLength || this.integration.getK(this);
},
addElementsToCollection: function(w, x) {
w.forEach(function(f) {
x.indexOf(f) === -1 && x.push(f);
});
},
removeElementFromCollection: function(w, x) {
w = x.indexOf(w), w !== -1 && x.splice(w, 1);
},
clear: function() {
this.nodes.length = 0, this.links.length = 0, this.series.length = 0, this.resetSimulation();
},
resetSimulation: function() {
this.forcedStop = !1, this.systemTemperature = 0, this.setMaxIterations(), this.setTemperature(), this.setDiffTemperature();
},
restartSimulation: function() {
this.simulation ? this.resetSimulation() : (this.setInitialRendering(!1), this.enableSimulation ? this.start() : this.setMaxIterations(1), this.chart && this.chart.redraw(), this.setInitialRendering(!0));
},
setMaxIterations: function(w) {
this.maxIterations = j(w, this.options.maxIterations);
},
setTemperature: function() {
this.temperature = this.startTemperature = Math.sqrt(this.nodes.length);
},
setDiffTemperature: function() {
this.diffTemperature = this.startTemperature / (this.options.maxIterations + 1);
},
setInitialRendering: function(w) {
this.initialRendering = w;
},
createQuadTree: function() {
this.quadTree = new N.QuadTree(this.box.left, this.box.top, this.box.width, this.box.height), this.quadTree.insertNodes(this.nodes);
},
initPositions: function() {
var w = this.options.initialPositions;
B(w) ? (w.call(this), this.nodes.forEach(function(x) {
V(x.prevX) || (x.prevX = x.plotX), V(x.prevY) || (x.prevY = x.plotY), x.dispX = 0, x.dispY = 0;
})) : w === "circle" ? this.setCircularPositions() : this.setRandomPositions();
},
setCircularPositions: function() {
function w(b) {
b.linksFrom.forEach(function(S) {
R[S.toNode.id] || (R[S.toNode.id] = !0, O.push(S.toNode), w(S.toNode));
});
}
var x = this.box, f = this.nodes, l = 2 * Math.PI / (f.length + 1), T = f.filter(function(b) {
return b.linksTo.length === 0;
}), O = [], R = {}, k = this.options.initialPositionRadius;
T.forEach(function(b) {
O.push(b), w(b);
}), O.length ? f.forEach(function(b) {
O.indexOf(b) === -1 && O.push(b);
}) : O = f, O.forEach(function(b, S) {
b.plotX = b.prevX = j(b.plotX, x.width / 2 + k * Math.cos(S * l)), b.plotY = b.prevY = j(b.plotY, x.height / 2 + k * Math.sin(S * l)), b.dispX = 0, b.dispY = 0;
});
},
setRandomPositions: function() {
function w(T) {
return T = T * T / Math.PI, T -= Math.floor(T);
}
var x = this.box, f = this.nodes, l = f.length + 1;
f.forEach(function(T, O) {
T.plotX = T.prevX = j(T.plotX, x.width * w(O)), T.plotY = T.prevY = j(T.plotY, x.height * w(l + O)), T.dispX = 0, T.dispY = 0;
});
},
force: function(w) {
this.integration[w].apply(this, Array.prototype.slice.call(arguments, 1));
},
barycenterForces: function() {
this.getBarycenter(), this.force("barycenter");
},
getBarycenter: function() {
var w = 0, x = 0, f = 0;
return this.nodes.forEach(function(l) {
x += l.plotX * l.mass, f += l.plotY * l.mass, w += l.mass;
}), this.barycenter = { x, y: f, xFactor: x / w, yFactor: f / w };
},
barnesHutApproximation: function(w, x) {
var f = this.getDistXY(w, x), l = this.vectorLength(f);
if (w !== x && l !== 0)
if (x.isInternal)
if (x.boxSize / l < this.options.theta && l !== 0) {
var T = this.repulsiveForce(l, this.k);
this.force("repulsive", w, T * x.mass, f, l);
var O = !1;
} else
O = !0;
else
T = this.repulsiveForce(l, this.k), this.force("repulsive", w, T * x.mass, f, l);
return O;
},
repulsiveForces: function() {
var w = this;
w.approximation === "barnes-hut" ? w.nodes.forEach(function(x) {
w.quadTree.visitNodeRecursive(
null,
function(f) {
return w.barnesHutApproximation(x, f);
}
);
}) : w.nodes.forEach(function(x) {
w.nodes.forEach(function(f) {
if (x !== f && !x.fixedPosition) {
var l = w.getDistXY(x, f), T = w.vectorLength(l);
if (T !== 0) {
var O = w.repulsiveForce(T, w.k);
w.force("repulsive", x, O * f.mass, l, T);
}
}
});
});
},
attractiveForces: function() {
var w = this, x, f, l;
w.links.forEach(function(T) {
T.fromNode && T.toNode && (x = w.getDistXY(T.fromNode, T.toNode), f = w.vectorLength(x), f !== 0 && (l = w.attractiveForce(f, w.k), w.force("attractive", T, l, x, f)));
});
},
applyLimits: function() {
var w = this;
w.nodes.forEach(function(x) {
x.fixedPosition || (w.integration.integrate(w, x), w.applyLimitBox(x, w.box), x.dispX = 0, x.dispY = 0);
});
},
applyLimitBox: function(w, x) {
var f = w.radius;
w.plotX = G(w.plotX, x.left + f, x.width - f), w.plotY = G(w.plotY, x.top + f, x.height - f);
},
coolDown: function(w, x, f) {
return w - x * f;
},
isStable: function() {
return 1e-5 > Math.abs(this.systemTemperature - this.prevSystemTemperature) || 0 >= this.temperature;
},
getSystemTemperature: function() {
return this.nodes.reduce(function(w, x) {
return w + x.temperature;
}, 0);
},
vectorLength: function(w) {
return Math.sqrt(w.x * w.x + w.y * w.y);
},
getDistR: function(w, x) {
return w = this.getDistXY(w, x), this.vectorLength(w);
},
getDistXY: function(w, x) {
var f = w.plotX - x.plotX;
return w = w.plotY - x.plotY, { x: f, y: w, absX: Math.abs(f), absY: Math.abs(w) };
}
}), y(o, "predraw", function() {
this.graphLayoutsLookup && this.graphLayoutsLookup.forEach(function(w) {
w.stop();
});
}), y(o, "render", function() {
function w(l) {
l.maxIterations-- && isFinite(l.temperature) && !l.isStable() && !l.enableSimulation && (l.beforeStep && l.beforeStep(), l.step(), f = !1, x = !0);
}
var x = !1;
if (this.graphLayoutsLookup) {
for (U(!1, this), this.graphLayoutsLookup.forEach(function(l) {
l.start();
}); !f; ) {
var f = !0;
this.graphLayoutsLookup.forEach(w);
}
x && this.series.forEach(function(l) {
l && l.layout && l.render();
});
}
}), y(o, "beforePrint", function() {
this.graphLayoutsLookup && (this.graphLayoutsLookup.forEach(function(w) {
w.updateSimulation(!1);
}), this.redraw());
}), y(o, "afterPrint", function() {
this.graphLayoutsLookup && this.graphLayoutsLookup.forEach(function(w) {
w.updateSimulation();
}), this.redraw();
});
}), C(d, "Series/PackedBubble/PackedBubbleComposition.js", [d["Core/Chart/Chart.js"], d["Core/Globals.js"], d["Core/Utilities.js"]], function(o, y, N) {
var _ = y.layouts["reingold-fruchterman"], U = N.addEvent, G = N.extendClass, V = N.pick;
o.prototype.getSelectedParentNodes = function() {
var F = [];
return this.series.forEach(function(B) {
B.parentNode && B.parentNode.selected && F.push(B.parentNode);
}), F;
}, y.networkgraphIntegrations.packedbubble = { repulsiveForceFunction: function(F, B, j, w) {
return Math.min(F, (j.marker.radius + w.marker.radius) / 2);
}, barycenter: function() {
var F = this, B = F.options.gravitationalConstant, j = F.box, w = F.nodes, x, f;
w.forEach(function(l) {
F.options.splitSeries && !l.isParentNode ? (x = l.series.parentNode.plotX, f = l.series.parentNode.plotY) : (x = j.width / 2, f = j.height / 2), l.fixedPosition || (l.plotX -= (l.plotX - x) * B / (l.mass * Math.sqrt(w.length)), l.plotY -= (l.plotY - f) * B / (l.mass * Math.sqrt(w.length)));
});
}, repulsive: function(F, B, j, w) {
var x = B * this.diffTemperature / F.mass / F.degree;
B = j.x * x, j = j.y * x, F.fixedPosition || (F.plotX += B, F.plotY += j), w.fixedPosition || (w.plotX -= B, w.plotY -= j);
}, integrate: y.networkgraphIntegrations.verlet.integrate, getK: y.noop }, y.layouts.packedbubble = G(_, { beforeStep: function() {
this.options.marker && this.series.forEach(function(F) {
F && F.calculateParentRadius();
});
}, isStable: function() {
var F = Math.abs(this.prevSystemTemperature - this.systemTemperature);
return 1 > Math.abs(10 * this.systemTemperature / Math.sqrt(this.nodes.length)) && 1e-5 > F || 0 >= this.temperature;
}, setCircularPositions: function() {
var F = this, B = F.box, j = F.nodes, w = 2 * Math.PI / (j.length + 1), x, f, l = F.options.initialPositionRadius;
j.forEach(function(T, O) {
F.options.splitSeries && !T.isParentNode ? (x = T.series.parentNode.plotX, f = T.series.parentNode.plotY) : (x = B.width / 2, f = B.height / 2), T.plotX = T.prevX = V(T.plotX, x + l * Math.cos(T.index || O * w)), T.plotY = T.prevY = V(T.plotY, f + l * Math.sin(T.index || O * w)), T.dispX = 0, T.dispY = 0;
});
}, repulsiveForces: function() {
var F = this, B, j, w, x = F.options.bubblePadding;
F.nodes.forEach(function(f) {
f.degree = f.mass, f.neighbours = 0, F.nodes.forEach(function(l) {
B = 0, f === l || f.fixedPosition || !F.options.seriesInteraction && f.series !== l.series || (w = F.getDistXY(f, l), j = F.vectorLength(w) - (f.marker.radius + l.marker.radius + x), 0 > j && (f.degree += 0.01, f.neighbours++, B = F.repulsiveForce(-j / Math.sqrt(f.neighbours), F.k, f, l)), F.force("repulsive", f, B * l.mass, w, l, j));
});
});
}, applyLimitBox: function(F) {
if (this.options.splitSeries && !F.isParentNode && this.options.parentNodeLimit) {
var B = this.getDistXY(F, F.series.parentNode), j = F.series.parentNodeRadius - F.marker.radius - this.vectorLength(B);
0 > j && j > -2 * F.marker.radius && (F.plotX -= 0.01 * B.x, F.plotY -= 0.01 * B.y);
}
_.prototype.applyLimitBox.apply(this, arguments);
} }), U(o, "beforeRedraw", function() {
this.allDataPoints && delete this.allDataPoints;
});
}), C(d, "Series/PackedBubble/PackedBubbleSeries.js", [d["Core/Color/Color.js"], d["Core/Globals.js"], d["Series/PackedBubble/PackedBubblePoint.js"], d["Core/Series/SeriesRegistry.js"], d["Core/Utilities.js"]], function(o, y, N, _, U) {
var G = this && this.__extends || function() {
var S = function(v, h) {
return S = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(c, u) {
c.__proto__ = u;
} || function(c, u) {
for (var i in u)
u.hasOwnProperty(i) && (c[i] = u[i]);
}, S(v, h);
};
return function(v, h) {
function c() {
this.constructor = v;
}
S(v, h), v.prototype = h === null ? Object.create(h) : (c.prototype = h.prototype, new c());
};
}(), V = o.parse, F = _.series, B = _.seriesTypes.bubble, j = U.addEvent, w = U.clamp, x = U.defined, f = U.extend, l = U.fireEvent, T = U.isArray, O = U.isNumber, R = U.merge, k = U.pick, b = y.dragNodesMixin;
return o = function(S) {
function v() {
var h = S !== null && S.apply(this, arguments) || this;
return h.chart = void 0, h.data = void 0, h.layout = void 0, h.options = void 0, h.points = void 0, h.xData = void 0, h;
}
return G(v, S), v.prototype.accumulateAllPoints = function(h) {
var c = h.chart, u = [], i, p;
for (i = 0; i < c.series.length; i++)
if (h = c.series[i], h.is("packedbubble") && h.visible || !c.options.chart.ignoreHiddenSeries)
for (p = 0; p < h.yData.length; p++)
u.push([null, null, h.yData[p], h.index, p, { id: p, marker: { radius: 0 } }]);
return u;
}, v.prototype.addLayout = function() {
var h = this.options.layoutAlgorithm, c = this.chart.graphLayoutsStorage, u = this.chart.graphLayoutsLookup, i = this.chart.options.chart;
c || (this.chart.graphLayoutsStorage = c = {}, this.chart.graphLayoutsLookup = u = []);
var p = c[h.type];
p || (h.enableSimulation = x(i.forExport) ? !i.forExport : h.enableSimulation, c[h.type] = p = new y.layouts[h.type](), p.init(h), u.splice(p.index, 0, p)), this.layout = p, this.points.forEach(function(a) {
a.mass = 2, a.degree = 1, a.collisionNmb = 1;
}), p.setArea(0, 0, this.chart.plotWidth, this.chart.plotHeight), p.addElementsToCollection([this], p.series), p.addElementsToCollection(this.points, p.nodes);
}, v.prototype.addSeriesLayout = function() {
var h = this.options.layoutAlgorithm, c = this.chart.graphLayoutsStorage, u = this.chart.graphLayoutsLookup, i = R(h, h.parentNodeOptions, { enableSimulation: this.layout.options.enableSimulation }), p = c[h.type + "-series"];
p || (c[h.type + "-series"] = p = new y.layouts[h.type](), p.init(i), u.splice(p.index, 0, p)), this.parentNodeLayout = p, this.createParentNodes();
}, v.prototype.calculateParentRadius = function() {
var h = this.seriesBox();
this.parentNodeRadius = w(Math.sqrt(2 * this.parentNodeMass / Math.PI) + 20, 20, h ? Math.max(Math.sqrt(Math.pow(
h.width,
2
) + Math.pow(h.height, 2)) / 2 + 20, 20) : Math.sqrt(2 * this.parentNodeMass / Math.PI) + 20), this.parentNode && (this.parentNode.marker.radius = this.parentNode.radius = this.parentNodeRadius);
}, v.prototype.calculateZExtremes = function() {
var h = this.options.zMin, c = this.options.zMax, u = 1 / 0, i = -1 / 0;
return h && c ? [h, c] : (this.chart.series.forEach(function(p) {
p.yData.forEach(function(a) {
x(a) && (a > i && (i = a), a < u && (u = a));
});
}), h = k(h, u), c = k(c, i), [h, c]);
}, v.prototype.checkOverlap = function(h, c) {
var u = h[0] - c[0], i = h[1] - c[1];
return -1e-3 > Math.sqrt(u * u + i * i) - Math.abs(h[2] + c[2]);
}, v.prototype.createParentNodes = function() {
var h = this, c = h.chart, u = h.parentNodeLayout, i, p = h.parentNode, a = h.pointClass, t = h.layout.options, s = { radius: h.parentNodeRadius, lineColor: h.color, fillColor: V(h.color).brighten(0.4).get() };
t.parentNodeOptions && (s = R(t.parentNodeOptions.marker || {}, s)), h.parentNodeMass = 0, h.points.forEach(function(n) {
h.parentNodeMass += Math.PI * Math.pow(n.marker.radius, 2);
}), h.calculateParentRadius(), u.nodes.forEach(function(n) {
n.seriesIndex === h.index && (i = !0);
}), u.setArea(0, 0, c.plotWidth, c.plotHeight), i || (p || (p = new a().init(this, { mass: h.parentNodeRadius / 2, marker: s, dataLabels: { inside: !1 }, states: { normal: { marker: s }, hover: { marker: s } }, dataLabelOnNull: !0, degree: h.parentNodeRadius, isParentNode: !0, seriesIndex: h.index })), h.parentNode && (p.plotX = h.parentNode.plotX, p.plotY = h.parentNode.plotY), h.parentNode = p, u.addElementsToCollection([h], u.series), u.addElementsToCollection([p], u.nodes));
}, v.prototype.deferLayout = function() {
var h = this.options.layoutAlgorithm;
this.visible && (this.addLayout(), h.splitSeries && this.addSeriesLayout());
}, v.prototype.destroy = function() {
this.chart.graphLayoutsLookup && this.chart.graphLayoutsLookup.forEach(function(h) {
h.removeElementFromCollection(this, h.series);
}, this), this.parentNode && this.parentNodeLayout && (this.parentNodeLayout.removeElementFromCollection(this.parentNode, this.parentNodeLayout.nodes), this.parentNode.dataLabel && (this.parentNode.dataLabel = this.parentNode.dataLabel.destroy())), F.prototype.destroy.apply(this, arguments);
}, v.prototype.drawDataLabels = function() {
var h = this.options.dataLabels.textPath, c = this.points;
F.prototype.drawDataLabels.apply(this, arguments), this.parentNode && (this.parentNode.formatPrefix = "parentNode", this.points = [this.parentNode], this.options.dataLabels.textPath = this.options.dataLabels.parentNodeTextPath, F.prototype.drawDataLabels.apply(this, arguments), this.points = c, this.options.dataLabels.textPath = h);
}, v.prototype.drawGraph = function() {
if (this.layout && this.layout.options.splitSeries) {
var h = this.chart, c = this.layout.options.parentNodeOptions.marker, u = { fill: c.fillColor || V(this.color).brighten(0.4).get(), opacity: c.fillOpacity, stroke: c.lineColor || this.color, "stroke-width": k(c.lineWidth, this.options.lineWidth) };
this.parentNodesGroup || (this.parentNodesGroup = this.plotGroup("parentNodesGroup", "parentNode", this.visible ? "inherit" : "hidden", 0.1, h.seriesGroup), this.group.attr({ zIndex: 2 })), this.calculateParentRadius(), c = R({
x: this.parentNode.plotX - this.parentNodeRadius,
y: this.parentNode.plotY - this.parentNodeRadius,
width: 2 * this.parentNodeRadius,
height: 2 * this.parentNodeRadius
}, u), this.parentNode.graphic || (this.graph = this.parentNode.graphic = h.renderer.symbol(u.symbol).add(this.parentNodesGroup)), this.parentNode.graphic.attr(c);
}
}, v.prototype.drawTracker = function() {
var h = this.parentNode;
if (S.prototype.drawTracker.call(this), h) {
var c = T(h.dataLabels) ? h.dataLabels : h.dataLabel ? [h.dataLabel] : [];
h.graphic && (h.graphic.element.point = h), c.forEach(function(u) {
u.div ? u.div.point = h : u.element.point = h;
});
}
}, v.prototype.getPointRadius = function() {
var h = this, c = h.chart, u = h.options, i = u.useSimulation, p = Math.min(c.plotWidth, c.plotHeight), a = {}, t = [], s = c.allDataPoints, n, P, D, I;
["minSize", "maxSize"].forEach(function(E) {
var X = parseInt(u[E], 10), g = /%$/.test(u[E]);
a[E] = g ? p * X / 100 : X * Math.sqrt(s.length);
}), c.minRadius = n = a.minSize / Math.sqrt(s.length), c.maxRadius = P = a.maxSize / Math.sqrt(s.length);
var W = i ? h.calculateZExtremes() : [n, P];
(s || []).forEach(function(E, X) {
D = i ? w(E[2], W[0], W[1]) : E[2], I = h.getRadius(W[0], W[1], n, P, D), I === 0 && (I = null), s[X][2] = I, t.push(I);
}), h.radii = t;
}, v.prototype.init = function() {
return F.prototype.init.apply(this, arguments), this.eventsToUnbind.push(j(this, "updatedData", function() {
this.chart.series.forEach(function(h) {
h.type === this.type && (h.isDirty = !0);
}, this);
})), this;
}, v.prototype.onMouseUp = function(h) {
if (h.fixedPosition && !h.removed) {
var c, u, i = this.layout, p = this.parentNodeLayout;
p && i.options.dragBetweenSeries && p.nodes.forEach(function(a) {
h && h.marker && a !== h.series.parentNode && (c = i.getDistXY(h, a), u = i.vectorLength(c) - a.marker.radius - h.marker.radius, 0 > u && (a.series.addPoint(R(h.options, { plotX: h.plotX, plotY: h.plotY }), !1), i.removeElementFromCollection(h, i.nodes), h.remove()));
}), b.onMouseUp.apply(this, arguments);
}
}, v.prototype.placeBubbles = function(h) {
var c = this.checkOverlap, u = this.positionBubble, i = [], p = 1, a = 0, t = 0, s = [], n;
if (h = h.sort(function(P, D) {
return D[2] - P[2];
}), h.length) {
if (i.push([[0, 0, h[0][2], h[0][3], h[0][4]]]), 1 < h.length)
for (i.push([[0, 0 - h[1][2] - h[0][2], h[1][2], h[1][3], h[1][4]]]), n = 2; n < h.length; n++)
h[n][2] = h[n][2] || 1, s = u(i[p][a], i[p - 1][t], h[n]), c(s, i[p][0]) ? (i.push([]), t = 0, i[p + 1].push(u(i[p][a], i[p][0], h[n])), p++, a = 0) : 1 < p && i[p - 1][t + 1] && c(s, i[p - 1][t + 1]) ? (t++, i[p].push(u(i[p][a], i[p - 1][t], h[n])), a++) : (a++, i[p].push(s));
this.chart.stages = i, this.chart.rawPositions = [].concat.apply([], i), this.resizeRadius(), s = this.chart.rawPositions;
}
return s;
}, v.prototype.pointAttribs = function(h, c) {
var u = this.options, i = u.marker;
return h && h.isParentNode && u.layoutAlgorithm && u.layoutAlgorithm.parentNodeOptions && (i = u.layoutAlgorithm.parentNodeOptions.marker), u = i.fillOpacity, h = F.prototype.pointAttribs.call(this, h, c), u !== 1 && (h["fill-opacity"] = u), h;
}, v.prototype.positionBubble = function(h, c, u) {
var i = Math.sqrt, p = Math.asin, a = Math.acos, t = Math.pow, s = Math.abs;
return i = i(t(h[0] - c[0], 2) + t(h[1] - c[1], 2)), a = a((t(i, 2) + t(u[2] + c[2], 2) - t(u[2] + h[2], 2)) / (2 * (u[2] + c[2]) * i)), p = p(s(h[0] - c[0]) / i), h = (0 > h[1] - c[1] ? 0 : Math.PI) + a + p * (0 > (h[0] - c[0]) * (h[1] - c[1]) ? 1 : -1), [c[0] + (c[2] + u[2]) * Math.sin(h), c[1] - (c[2] + u[2]) * Math.cos(h), u[2], u[3], u[4]];
}, v.prototype.render = function() {
var h = [];
F.prototype.render.apply(this, arguments), this.options.dataLabels.allowOverlap || (this.data.forEach(function(c) {
T(c.dataLabels) && c.dataLabels.forEach(function(u) {
h.push(u);
});
}), this.options.useSimulation && this.chart.hideOverlappingLabels(h));
}, v.prototype.resizeRadius = function() {
var h = this.chart, c = h.rawPositions, u = Math.min, i = Math.max, p = h.plotLeft, a = h.plotTop, t = h.plotHeight, s = h.plotWidth, n, P, D, I = n = Number.POSITIVE_INFINITY, W = P = Number.NEGATIVE_INFINITY;
for (D = 0; D < c.length; D++) {
var E = c[D][2];
I = u(
I,
c[D][0] - E
), W = i(W, c[D][0] + E), n = u(n, c[D][1] - E), P = i(P, c[D][1] + E);
}
if (D = [W - I, P - n], u = u.apply([], [(s - p) / D[0], (t - a) / D[1]]), 1e-10 < Math.abs(u - 1)) {
for (D = 0; D < c.length; D++)
c[D][2] *= u;
this.placeBubbles(c);
} else
h.diffY = t / 2 + a - n - (P - n) / 2, h.diffX = s / 2 + p - I - (W - I) / 2;
}, v.prototype.seriesBox = function() {
var h = this.chart, c = Math.max, u = Math.min, i, p = [h.plotLeft, h.plotLeft + h.plotWidth, h.plotTop, h.plotTop + h.plotHeight];
return this.data.forEach(function(a) {
x(a.plotX) && x(a.plotY) && a.marker.radius && (i = a.marker.radius, p[0] = u(p[0], a.plotX - i), p[1] = c(p[1], a.plotX + i), p[2] = u(p[2], a.plotY - i), p[3] = c(p[3], a.plotY + i));
}), O(p.width / p.height) ? p : null;
}, v.prototype.setVisible = function() {
var h = this;
F.prototype.setVisible.apply(h, arguments), h.parentNodeLayout && h.graph ? h.visible ? (h.graph.show(), h.parentNode.dataLabel && h.parentNode.dataLabel.show()) : (h.graph.hide(), h.parentNodeLayout.removeElementFromCollection(h.parentNode, h.parentNodeLayout.nodes), h.parentNode.dataLabel && h.parentNode.dataLabel.hide()) : h.layout && (h.visible ? h.layout.addElementsToCollection(
h.points,
h.layout.nodes
) : h.points.forEach(function(c) {
h.layout.removeElementFromCollection(c, h.layout.nodes);
}));
}, v.prototype.translate = function() {
var h = this.chart, c = this.data, u = this.index, i, p = this.options.useSimulation;
if (this.processedXData = this.xData, this.generatePoints(), x(h.allDataPoints) || (h.allDataPoints = this.accumulateAllPoints(this), this.getPointRadius()), p)
var a = h.allDataPoints;
else
a = this.placeBubbles(h.allDataPoints), this.options.draggable = !1;
for (i = 0; i < a.length; i++)
if (a[i][3] === u) {
var t = c[a[i][4]], s = k(a[i][2], void 0);
p || (t.plotX = a[i][0] - h.plotLeft + h.diffX, t.plotY = a[i][1] - h.plotTop + h.diffY), O(s) && (t.marker = f(t.marker, { radius: s, width: 2 * s, height: 2 * s }), t.radius = s);
}
p && this.deferLayout(), l(this, "afterTranslate");
}, v.defaultOptions = R(B.defaultOptions, { minSize: "10%", maxSize: "50%", sizeBy: "area", zoneAxis: "y", crisp: !1, tooltip: { pointFormat: "Value: {point.value}" }, draggable: !0, useSimulation: !0, parentNode: { allowPointSelect: !1 }, dataLabels: { formatter: function() {
var h = this.series.chart.numberFormatter, c = this.point.value;
return O(c) ? h(c, -1) : "";
}, parentNodeFormatter: function() {
return this.name;
}, parentNodeTextPath: { enabled: !0 }, padding: 0, style: { transition: "opacity 2000ms" } }, layoutAlgorithm: { initialPositions: "circle", initialPositionRadius: 20, bubblePadding: 5, parentNodeLimit: !1, seriesInteraction: !0, dragBetweenSeries: !1, parentNodeOptions: { maxIterations: 400, gravitationalConstant: 0.03, maxSpeed: 50, initialPositionRadius: 100, seriesInteraction: !0, marker: {
fillColor: null,
fillOpacity: 1,
lineWidth: null,
lineColor: null,
symbol: "circle"
} }, enableSimulation: !0, type: "packedbubble", integration: "packedbubble", maxIterations: 1e3, splitSeries: !1, maxSpeed: 5, gravitationalConstant: 0.01, friction: -0.981 } }), v;
}(B), f(o.prototype, {
alignDataLabel: F.prototype.alignDataLabel,
axisTypes: [],
directTouch: !0,
forces: ["barycenter", "repulsive"],
hasDraggableNodes: !0,
isCartesian: !1,
noSharedTooltip: !0,
onMouseDown: b.onMouseDown,
onMouseMove: b.onMouseMove,
pointArrayMap: ["value"],
pointClass: N,
pointValKey: "value",
redrawHalo: b.redrawHalo,
requireSorting: !1,
searchPoint: y.noop,
trackerGroups: ["group", "dataLabelsGroup", "parentNodesGroup"]
}), _.registerSeriesType("packedbubble", o), o;
}), C(d, "Series/Polygon/PolygonSeries.js", [d["Core/Globals.js"], d["Core/Legend/LegendSymbol.js"], d["Core/Series/SeriesRegistry.js"], d["Core/Utilities.js"]], function(o, y, N, _) {
var U = this && this.__extends || function() {
var x = function(f, l) {
return x = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(T, O) {
T.__proto__ = O;
} || function(T, O) {
for (var R in O)
O.hasOwnProperty(R) && (T[R] = O[R]);
}, x(f, l);
};
return function(f, l) {
function T() {
this.constructor = f;
}
x(f, l), f.prototype = l === null ? Object.create(l) : (T.prototype = l.prototype, new T());
};
}();
o = o.noop;
var G = N.series, V = N.seriesTypes, F = V.area, B = V.line, j = V.scatter;
V = _.extend;
var w = _.merge;
return _ = function(x) {
function f() {
var l = x !== null && x.apply(this, arguments) || this;
return l.data = void 0, l.options = void 0, l.points = void 0, l;
}
return U(f, x), f.prototype.getGraphPath = function() {
for (var l = B.prototype.getGraphPath.call(this), T = l.length + 1; T--; )
(T === l.length || l[T][0] === "M") && 0 < T && l.splice(T, 0, ["Z"]);
return this.areaPath = l;
}, f.prototype.drawGraph = function() {
this.options.fillColor = this.color, F.prototype.drawGraph.call(this);
}, f.defaultOptions = w(j.defaultOptions, { marker: { enabled: !1, states: { hover: { enabled: !1 } } }, stickyTracking: !1, tooltip: { followPointer: !0, pointFormat: "" }, trackByArea: !0 }), f;
}(j), V(_.prototype, { type: "polygon", drawLegendSymbol: y.drawRectangle, drawTracker: G.prototype.drawTracker, setStackedPoints: o }), N.registerSeriesType("polygon", _), _;
}), C(d, "Core/Axis/WaterfallAxis.js", [d["Extensions/Stacking.js"], d["Core/Utilities.js"]], function(o, y) {
var N = y.addEvent, _ = y.objectEach, U;
return function(G) {
function V() {
var x = this.waterfall.stacks;
x && (x.changed = !1, delete x.alreadyChanged);
}
function F() {
var x = this.options.stackLabels;
x && x.enabled && this.waterfall.stacks && this.waterfall.renderStackTotals();
}
function B() {
for (var x = this.axes, f = this.series, l = f.length; l--; )
f[l].options.stacking && (x.forEach(function(T) {
T.isXAxis || (T.waterfall.stacks.changed = !0);
}), l = 0);
}
function j() {
this.waterfall || (this.waterfall = new w(this));
}
var w = function() {
function x(f) {
this.axis = f, this.stacks = { changed: !1 };
}
return x.prototype.renderStackTotals = function() {
var f = this.axis, l = f.waterfall.stacks, T = f.stacking && f.stacking.stackTotalGroup, O = new o(f, f.options.stackLabels, !1, 0, void 0);
this.dummyStackItem = O, _(l, function(R) {
_(R, function(k) {
O.total = k.stackTotal, k.label && (O.label = k.label), o.prototype.render.call(O, T), k.label = O.label, delete O.label;
});
}), O.total = null;
}, x;
}();
G.Composition = w, G.compose = function(x, f) {
N(x, "init", j), N(x, "afterBuildStacks", V), N(x, "afterRender", F), N(f, "beforeRedraw", B);
};
}(U || (U = {})), U;
}), C(d, "Series/Waterfall/WaterfallPoint.js", [d["Series/Column/ColumnSeries.js"], d["Core/Series/Point.js"], d["Core/Utilities.js"]], function(o, y, N) {
var _ = this && this.__extends || function() {
var G = function(V, F) {
return G = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(B, j) {
B.__proto__ = j;
} || function(B, j) {
for (var w in j)
j.hasOwnProperty(w) && (B[w] = j[w]);
}, G(V, F);
};
return function(V, F) {
function B() {
this.constructor = V;
}
G(V, F), V.prototype = F === null ? Object.create(F) : (B.prototype = F.prototype, new B());
};
}(), U = N.isNumber;
return function(G) {
function V() {
var F = G !== null && G.apply(this, arguments) || this;
return F.options = void 0, F.series = void 0, F;
}
return _(V, G), V.prototype.getClassName = function() {
var F = y.prototype.getClassName.call(this);
return this.isSum ? F += " highcharts-sum" : this.isIntermediateSum && (F += " highcharts-intermediate-sum"), F;
}, V.prototype.isValid = function() {
return U(this.y) || this.isSum || !!this.isIntermediateSum;
}, V;
}(o.prototype.pointClass);
}), C(d, "Series/Waterfall/WaterfallSeries.js", [d["Core/Axis/Axis.js"], d["Core/Chart/Chart.js"], d["Core/Series/SeriesRegistry.js"], d["Core/Utilities.js"], d["Core/Axis/WaterfallAxis.js"], d["Series/Waterfall/WaterfallPoint.js"]], function(o, y, N, _, U, G) {
var V = this && this.__extends || function() {
var k = function(b, S) {
return k = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(v, h) {
v.__proto__ = h;
} || function(v, h) {
for (var c in h)
h.hasOwnProperty(c) && (v[c] = h[c]);
}, k(b, S);
};
return function(b, S) {
function v() {
this.constructor = b;
}
k(b, S), b.prototype = S === null ? Object.create(S) : (v.prototype = S.prototype, new v());
};
}(), F = N.seriesTypes, B = F.column, j = F.line, w = _.arrayMax, x = _.arrayMin, f = _.correctFloat;
F = _.extend;
var l = _.isNumber, T = _.merge, O = _.objectEach, R = _.pick;
return _ = function(k) {
function b() {
var S = k !== null && k.apply(this, arguments) || this;
return S.chart = void 0, S.data = void 0, S.options = void 0, S.points = void 0, S.stackedYNeg = void 0, S.stackedYPos = void 0, S.stackKey = void 0, S.xData = void 0, S.yAxis = void 0, S.yData = void 0, S;
}
return V(b, k), b.prototype.generatePoints = function() {
var S;
B.prototype.generatePoints.apply(this);
var v = 0;
for (S = this.points.length; v < S; v++) {
var h = this.points[v], c = this.processedYData[v];
(h.isIntermediateSum || h.isSum) && (h.y = f(c));
}
}, b.prototype.translate = function() {
var S = this.options, v = this.yAxis, h = R(S.minPointLength, 5), c = h / 2, u = S.threshold || 0, i = u, p = u;
S = S.stacking;
var a = v.waterfall.stacks[this.stackKey];
B.prototype.translate.apply(this);
for (var t = this.points, s = 0; s < t.length; s++) {
var n = t[s], P = this.processedYData[s], D = n.shapeArgs;
if (D && l(P)) {
var I = [0, P], W = n.y;
if (S) {
if (a) {
if (I = a[s], S === "overlap") {
var E = I.stackState[I.stateIndex--];
E = 0 <= W ? E : E - W, Object.hasOwnProperty.call(I, "absolutePos") && delete I.absolutePos, Object.hasOwnProperty.call(I, "absoluteNeg") && delete I.absoluteNeg;
} else
0 <= W ? (E = I.threshold + I.posTotal, I.posTotal -= W) : (E = I.threshold + I.negTotal, I.negTotal -= W, E -= W), !I.posTotal && Object.hasOwnProperty.call(I, "absolutePos") && (I.posTotal = I.absolutePos, delete I.absolutePos), !I.negTotal && Object.hasOwnProperty.call(I, "absoluteNeg") && (I.negTotal = I.absoluteNeg, delete I.absoluteNeg);
n.isSum || (I.connectorThreshold = I.threshold + I.stackTotal), v.reversed ? (P = 0 <= W ? E - W : E + W, W = E) : (P = E, W = E - W), n.below = P <= u, D.y = v.translate(P, !1, !0, !1, !0) || 0, D.height = Math.abs(D.y - (v.translate(W, !1, !0, !1, !0) || 0)), (W = v.waterfall.dummyStackItem) && (W.x = s, W.label = a[s].label, W.setOffset(this.pointXOffset || 0, this.barW || 0, this.stackedYNeg[s], this.stackedYPos[s]));
}
} else
E = Math.max(i, i + W) + I[0], D.y = v.translate(
E,
!1,
!0,
!1,
!0
) || 0, n.isSum ? (D.y = v.translate(I[1], !1, !0, !1, !0) || 0, D.height = Math.min(v.translate(I[0], !1, !0, !1, !0) || 0, v.len) - D.y, n.below = I[1] <= u) : n.isIntermediateSum ? (0 <= W ? (P = I[1] + p, W = p) : (P = p, W = I[1] + p), v.reversed && (P ^= W, W ^= P, P ^= W), D.y = v.translate(P, !1, !0, !1, !0) || 0, D.height = Math.abs(D.y - Math.min(v.translate(W, !1, !0, !1, !0) || 0, v.len)), p += I[1], n.below = P <= u) : (D.height = 0 < P ? (v.translate(i, !1, !0, !1, !0) || 0) - D.y : (v.translate(i, !1, !0, !1, !0) || 0) - (v.translate(i - P, !1, !0, !1, !0) || 0), i += P, n.below = i < u), 0 > D.height && (D.y += D.height, D.height *= -1);
n.plotY = D.y = Math.round(D.y || 0) - this.borderWidth % 2 / 2, D.height = Math.max(Math.round(D.height || 0), 1e-3), n.yBottom = D.y + D.height, D.height <= h && !n.isNull ? (D.height = h, D.y -= c, n.plotY = D.y, n.minPointLengthOffset = 0 > n.y ? -c : c) : (n.isNull && (D.width = 0), n.minPointLengthOffset = 0), W = n.plotY + (n.negative ? D.height : 0), n.below && (n.plotY += D.height), n.tooltipPos && (this.chart.inverted ? n.tooltipPos[0] = v.len - W : n.tooltipPos[1] = W);
}
}
}, b.prototype.processData = function(S) {
var v = this.options, h = this.yData, c = v.data, u = h.length, i = v.threshold || 0, p, a, t, s, n;
for (n = a = p = t = s = 0; n < u; n++) {
var P = h[n], D = c && c[n] ? c[n] : {};
P === "sum" || D.isSum ? h[n] = f(a) : P === "intermediateSum" || D.isIntermediateSum ? (h[n] = f(p), p = 0) : (a += P, p += P), t = Math.min(a, t), s = Math.max(a, s);
}
k.prototype.processData.call(this, S), v.stacking || (this.dataMin = t + i, this.dataMax = s);
}, b.prototype.toYData = function(S) {
return S.isSum ? "sum" : S.isIntermediateSum ? "intermediateSum" : S.y;
}, b.prototype.updateParallelArrays = function(S, v) {
k.prototype.updateParallelArrays.call(this, S, v), (this.yData[0] === "sum" || this.yData[0] === "intermediateSum") && (this.yData[0] = null);
}, b.prototype.pointAttribs = function(S, v) {
var h = this.options.upColor;
return h && !S.options.color && (S.color = 0 < S.y ? h : null), S = B.prototype.pointAttribs.call(this, S, v), delete S.dashstyle, S;
}, b.prototype.getGraphPath = function() {
return [["M", 0, 0]];
}, b.prototype.getCrispPath = function() {
var S = this.data, v = this.yAxis, h = S.length, c = Math.round(this.graph.strokeWidth()) % 2 / 2, u = Math.round(this.borderWidth) % 2 / 2, i = this.xAxis.reversed, p = this.yAxis.reversed, a = this.options.stacking, t = [], s;
for (s = 1; s < h; s++) {
var n = S[s].shapeArgs, P = S[s - 1], D = S[s - 1].shapeArgs, I = v.waterfall.stacks[this.stackKey], W = 0 < P.y ? -D.height : 0;
I && D && n && (I = I[s - 1], a ? (I = I.connectorThreshold, W = Math.round(v.translate(I, 0, 1, 0, 1) + (p ? W : 0)) - c) : W = D.y + P.minPointLengthOffset + u - c, t.push(["M", (D.x || 0) + (i ? 0 : D.width || 0), W], ["L", (n.x || 0) + (i && n.width || 0), W])), D && t.length && (!a && 0 > P.y && !p || 0 < P.y && p) && ((P = t[t.length - 2]) && typeof P[2] == "number" && (P[2] += D.height || 0), (P = t[t.length - 1]) && typeof P[2] == "number" && (P[2] += D.height || 0));
}
return t;
}, b.prototype.drawGraph = function() {
j.prototype.drawGraph.call(this), this.graph.attr({ d: this.getCrispPath() });
}, b.prototype.setStackedPoints = function() {
function S($, Q, A, H) {
if (z)
for (A; A < z; A++)
X.stackState[A] += H;
else
X.stackState[0] = $, z = X.stackState.length;
X.stackState.push(X.stackState[z - 1] + Q);
}
var v = this.options, h = this.yAxis.waterfall.stacks, c = v.threshold, u = c || 0, i = u, p = this.stackKey, a = this.xData, t = a.length, s, n, P;
this.yAxis.stacking.usePercentage = !1;
var D = n = P = u;
if (this.visible || !this.chart.options.chart.ignoreHiddenSeries) {
var I = h.changed;
(s = h.alreadyChanged) && 0 > s.indexOf(p) && (I = !0), h[p] || (h[p] = {}), s = h[p];
for (var W = 0; W < t; W++) {
var E = a[W];
(!s[E] || I) && (s[E] = { negTotal: 0, posTotal: 0, stackTotal: 0, threshold: 0, stateIndex: 0, stackState: [], label: I && s[E] ? s[E].label : void 0 });
var X = s[E], g = this.yData[W];
0 <= g ? X.posTotal += g : X.negTotal += g;
var m = v.data[W];
E = X.absolutePos = X.posTotal;
var L = X.absoluteNeg = X.negTotal;
X.stackTotal = E + L;
var z = X.stackState.length;
m && m.isIntermediateSum ? (S(P, n, 0, P), P = n, n = c, u ^= i, i ^= u, u ^= i) : m && m.isSum ? (S(c, D, z), u = c) : (S(u, g, 0, D), m && (D += g, n += g)), X.stateIndex++, X.threshold = u, u += X.stackTotal;
}
h.changed = !1, h.alreadyChanged || (h.alreadyChanged = []), h.alreadyChanged.push(p);
}
}, b.prototype.getExtremes = function() {
var S = this.options.stacking;
if (S) {
var v = this.yAxis;
v = v.waterfall.stacks;
var h = this.stackedYNeg = [], c = this.stackedYPos = [];
return S === "overlap" ? O(v[this.stackKey], function(u) {
h.push(x(u.stackState)), c.push(w(u.stackState));
}) : O(v[this.stackKey], function(u) {
h.push(u.negTotal + u.threshold), c.push(u.posTotal + u.threshold);
}), { dataMin: x(h), dataMax: w(c) };
}
return { dataMin: this.dataMin, dataMax: this.dataMax };
}, b.defaultOptions = T(B.defaultOptions, { dataLabels: { inside: !0 }, lineWidth: 1, lineColor: "#333333", dashStyle: "Dot", borderColor: "#333333", states: { hover: { lineWidthPlus: 0 } } }), b;
}(B), F(_.prototype, { getZonesGraphs: j.prototype.getZonesGraphs, pointValKey: "y", showLine: !0, pointClass: G }), N.registerSeriesType("waterfall", _), U.compose(o, y), _;
}), C(d, "Extensions/Polar.js", [
d["Core/Animation/AnimationUtilities.js"],
d["Core/Chart/Chart.js"],
d["Core/Globals.js"],
d["Extensions/Pane.js"],
d["Core/Pointer.js"],
d["Core/Series/Series.js"],
d["Core/Series/SeriesRegistry.js"],
d["Core/Renderer/SVG/SVGRenderer.js"],
d["Core/Utilities.js"]
], function(o, y, N, _, U, G, V, F, B) {
var j = o.animObject;
V = V.seriesTypes;
var w = B.addEvent, x = B.defined, f = B.find, l = B.isNumber, T = B.pick, O = B.splat, R = B.uniqueKey;
o = B.wrap;
var k = G.prototype;
U = U.prototype, k.searchPointByAngle = function(v) {
var h = this.chart, c = this.xAxis.pane.center;
return this.searchKDTree({ clientX: 180 + -180 / Math.PI * Math.atan2(v.chartX - c[0] - h.plotLeft, v.chartY - c[1] - h.plotTop) });
}, k.getConnectors = function(v, h, c, u) {
var i = u ? 1 : 0, p = 0 <= h && h <= v.length - 1 ? h : 0 > h ? v.length - 1 + h : 0;
h = 0 > p - 1 ? v.length - (1 + i) : p - 1, i = p + 1 > v.length - 1 ? i : p + 1;
var a = v[h];
i = v[i];
var t = a.plotX;
a = a.plotY;
var s = i.plotX, n = i.plotY;
i = v[p].plotX, p = v[p].plotY, t = (1.5 * i + t) / 2.5, a = (1.5 * p + a) / 2.5, s = (1.5 * i + s) / 2.5;
var P = (1.5 * p + n) / 2.5;
n = Math.sqrt(Math.pow(t - i, 2) + Math.pow(a - p, 2));
var D = Math.sqrt(Math.pow(s - i, 2) + Math.pow(P - p, 2));
return t = Math.atan2(a - p, t - i), P = Math.PI / 2 + (t + Math.atan2(P - p, s - i)) / 2, Math.abs(t - P) > Math.PI / 2 && (P -= Math.PI), t = i + Math.cos(P) * n, a = p + Math.sin(P) * n, s = i + Math.cos(Math.PI + P) * D, P = p + Math.sin(Math.PI + P) * D, i = { rightContX: s, rightContY: P, leftContX: t, leftContY: a, plotX: i, plotY: p }, c && (i.prevPointCont = this.getConnectors(v, h, !1, u)), i;
}, k.toXY = function(v) {
var h = this.chart, c = this.xAxis, u = this.yAxis, i = v.plotX, p = v.plotY, a = v.series, t = h.inverted, s = v.y, n = t ? i : u.len - p;
t && a && !a.isRadialBar && (v.plotY = p = typeof s == "number" && u.translate(s) || 0), v.rectPlotX = i, v.rectPlotY = p, u.center && (n += u.center[3] / 2), l(p) && (u = t ? u.postTranslate(p, n) : c.postTranslate(i, n), v.plotX = v.polarPlotX = u.x - h.plotLeft, v.plotY = v.polarPlotY = u.y - h.plotTop), this.kdByAngle ? (h = (i / Math.PI * 180 + c.pane.options.startAngle) % 360, 0 > h && (h += 360), v.clientX = h) : v.clientX = v.plotX;
}, V.spline && (o(V.spline.prototype, "getPointSpline", function(v, h, c, u) {
return this.chart.polar ? u ? (v = this.getConnectors(h, u, !0, this.connectEnds), h = v.prevPointCont && v.prevPointCont.rightContX, c = v.prevPointCont && v.prevPointCont.rightContY, v = ["C", l(h) ? h : v.plotX, l(c) ? c : v.plotY, l(v.leftContX) ? v.leftContX : v.plotX, l(v.leftContY) ? v.leftContY : v.plotY, v.plotX, v.plotY]) : v = ["M", c.plotX, c.plotY] : v = v.call(this, h, c, u), v;
}), V.areasplinerange && (V.areasplinerange.prototype.getPointSpline = V.spline.prototype.getPointSpline)), w(G, "afterTranslate", function() {
var v = this.chart;
if (v.polar && this.xAxis) {
if ((this.kdByAngle = v.tooltip && v.tooltip.shared) ? this.searchPoint = this.searchPointByAngle : this.options.findNearestPointBy = "xy", !this.preventPostTranslate)
for (var h = this.points, c = h.length; c--; )
this.toXY(h[c]), !v.hasParallelCoordinates && !this.yAxis.reversed && h[c].y < this.yAxis.min && (h[c].isNull = !0);
this.hasClipCircleSetter || (this.hasClipCircleSetter = !!this.eventsToUnbind.push(w(this, "afterRender", function() {
if (v.polar) {
var u = this.yAxis.pane.center;
this.clipCircle ? this.clipCircle.animate({ x: u[0], y: u[1], r: u[2] / 2, innerR: u[3] / 2 }) : this.clipCircle = v.renderer.clipCircle(u[0], u[1], u[2] / 2, u[3] / 2), this.group.clip(this.clipCircle), this.setClip = N.noop;
}
})));
}
}, { order: 2 }), o(
V.line.prototype,
"getGraphPath",
function(v, h) {
var c = this, u;
if (this.chart.polar) {
for (h = h || this.points, u = 0; u < h.length; u++)
if (!h[u].isNull) {
var i = u;
break;
}
if (this.options.connectEnds !== !1 && typeof i < "u") {
this.connectEnds = !0, h.splice(h.length, 0, h[i]);
var p = !0;
}
h.forEach(function(a) {
typeof a.polarPlotY > "u" && c.toXY(a);
});
}
return u = v.apply(this, [].slice.call(arguments, 1)), p && h.pop(), u;
}
);
var b = function(v, h) {
var c = this, u = this.chart, i = this.options.animation, p = this.group, a = this.markerGroup, t = this.xAxis && this.xAxis.center, s = u.plotLeft, n = u.plotTop, P, D, I, W;
if (u.polar) {
if (c.isRadialBar)
h || (c.startAngleRad = T(c.translatedThreshold, c.xAxis.startAngleRad), N.seriesTypes.pie.prototype.animate.call(c, h));
else if (u.renderer.isSVG)
if (i = j(i), c.is("column")) {
if (!h) {
var E = t[3] / 2;
c.points.forEach(function(X) {
P = X.graphic, I = (D = X.shapeArgs) && D.r, W = D && D.innerR, P && D && (P.attr({ r: E, innerR: E }), P.animate({ r: I, innerR: W }, c.options.animation));
});
}
} else
h ? (v = { translateX: t[0] + s, translateY: t[1] + n, scaleX: 1e-3, scaleY: 1e-3 }, p.attr(v), a && a.attr(v)) : (v = { translateX: s, translateY: n, scaleX: 1, scaleY: 1 }, p.animate(v, i), a && a.animate(v, i));
} else
v.call(this, h);
};
if (o(k, "animate", b), V.column) {
var S = V.arearange.prototype;
V = V.column.prototype, V.polarArc = function(v, h, c, u) {
var i = this.xAxis.center, p = this.yAxis.len, a = i[3] / 2;
return h = p - h + a, v = p - T(v, p) + a, this.yAxis.reversed && (0 > h && (h = a), 0 > v && (v = a)), { x: i[0], y: i[1], r: h, innerR: v, start: c, end: u };
}, o(V, "animate", b), o(V, "translate", function(v) {
var h = this.options, c = h.stacking, u = this.chart, i = this.xAxis, p = this.yAxis, a = p.reversed, t = p.center, s = i.startAngleRad, n = i.endAngleRad - s;
if (this.preventPostTranslate = !0, v.call(this), i.isRadial) {
v = this.points, i = v.length;
var P = p.translate(p.min), D = p.translate(p.max);
if (h = h.threshold || 0, u.inverted && l(h)) {
var I = p.translate(h);
x(I) && (0 > I ? I = 0 : I > n && (I = n), this.translatedThreshold = I + s);
}
for (; i--; ) {
h = v[i];
var W = h.barX, E = h.x, X = h.y;
if (h.shapeType = "arc", u.inverted) {
if (h.plotY = p.translate(X), c && p.stacking) {
if (X = p.stacking.stacks[(0 > X ? "-" : "") + this.stackKey], this.visible && X && X[E] && !h.isNull) {
var g = X[E].points[this.getStackIndicator(void 0, E, this.index).key], m = p.translate(g[0]);
g = p.translate(g[1]), x(m) && (m = B.clamp(m, 0, n));
}
} else
m = I, g = h.plotY;
m > g && (g = [m, m = g][0]), a ? g > P ? g = P : m < D ? m = D : (m > P || g < D) && (m = g = n) : m < P ? m = P : g > D ? g = D : (g < P || m > D) && (m = g = 0), p.min > p.max && (m = g = a ? n : 0), m += s, g += s, t && (h.barX = W += t[3] / 2), E = Math.max(W, 0), X = Math.max(W + h.pointWidth, 0), h.shapeArgs = { x: t && t[0], y: t && t[1], r: X, innerR: E, start: m, end: g }, h.opacity = m === g ? 0 : void 0, h.plotY = (x(this.translatedThreshold) && (m < this.translatedThreshold ? m : g)) - s;
} else
m = W + s, h.shapeArgs = this.polarArc(h.yBottom, h.plotY, m, m + h.pointWidth);
this.toXY(h), u.inverted ? (W = p.postTranslate(h.rectPlotY, W + h.pointWidth / 2), h.tooltipPos = [W.x - u.plotLeft, W.y - u.plotTop]) : h.tooltipPos = [h.plotX, h.plotY], t && (h.ttBelow = h.plotY > t[1]);
}
}
}), V.findAlignments = function(v, h) {
return h.align === null && (h.align = 20 < v && 160 > v ? "left" : 200 < v && 340 > v ? "right" : "center"), h.verticalAlign === null && (h.verticalAlign = 45 > v || 315 < v ? "bottom" : 135 < v && 225 > v ? "top" : "middle"), h;
}, S && (S.findAlignments = V.findAlignments), o(V, "alignDataLabel", function(v, h, c, u, i, p) {
var a = this.chart, t = T(u.inside, !!this.options.stacking);
a.polar ? (v = h.rectPlotX / Math.PI * 180, a.inverted ? (this.forceDL = a.isInsidePlot(h.plotX, Math.round(h.plotY)), t && h.shapeArgs ? (i = h.shapeArgs, i = this.yAxis.postTranslate(((i.start || 0) + (i.end || 0)) / 2 - this.xAxis.startAngleRad, h.barX + h.pointWidth / 2), i = { x: i.x - a.plotLeft, y: i.y - a.plotTop }) : h.tooltipPos && (i = { x: h.tooltipPos[0], y: h.tooltipPos[1] }), u.align = T(u.align, "center"), u.verticalAlign = T(
u.verticalAlign,
"middle"
)) : this.findAlignments && (u = this.findAlignments(v, u)), k.alignDataLabel.call(this, h, c, u, i, p), this.isRadialBar && h.shapeArgs && h.shapeArgs.start === h.shapeArgs.end && c.hide(!0)) : v.call(this, h, c, u, i, p);
});
}
o(U, "getCoordinates", function(v, h) {
var c = this.chart, u = { xAxis: [], yAxis: [] };
return c.polar ? c.axes.forEach(function(i) {
var p = i.isXAxis, a = i.center;
if (i.coll !== "colorAxis") {
var t = h.chartX - a[0] - c.plotLeft;
a = h.chartY - a[1] - c.plotTop, u[p ? "xAxis" : "yAxis"].push({ axis: i, value: i.translate(p ? Math.PI - Math.atan2(t, a) : Math.sqrt(Math.pow(
t,
2
) + Math.pow(a, 2)), !0) });
}
}) : u = v.call(this, h), u;
}), F.prototype.clipCircle = function(v, h, c, u) {
var i = R(), p = this.createElement("clipPath").attr({ id: i }).add(this.defs);
return v = u ? this.arc(v, h, c, u, 0, 2 * Math.PI).add(p) : this.circle(v, h, c).add(p), v.id = i, v.clipPath = p, v;
}, w(y, "getAxes", function() {
this.pane || (this.pane = []), this.options.pane = O(this.options.pane), this.options.pane.forEach(function(v) {
new _(v, this);
}, this);
}), w(y, "afterDrawChartBox", function() {
this.pane.forEach(function(v) {
v.render();
});
}), w(
G,
"afterInit",
function() {
var v = this.chart;
v.inverted && v.polar && (this.isRadialSeries = !0, this.is("column") && (this.isRadialBar = !0));
}
), o(y.prototype, "get", function(v, h) {
return f(this.pane || [], function(c) {
return c.options.id === h;
}) || v.call(this, h);
});
}), C(d, "masters/highcharts-more.src.js", [d["Core/Globals.js"], d["Core/Axis/RadialAxis.js"], d["Series/Bubble/BubbleSeries.js"]], function(o, y, N) {
y.compose(o.Axis, o.Tick), N.compose(o.Chart, o.Legend, o.Series);
});
});
})(ru);
var $0 = ru.exports;
const Z0 = /* @__PURE__ */ Mn($0);
var nu = { exports: {} };
(function(r) {
(function(d) {
r.exports ? (d.default = d, r.exports = d) : d(typeof Highcharts < "u" ? Highcharts : void 0);
})(function(d) {
function C(o, y, N, _) {
o.hasOwnProperty(y) || (o[y] = _.apply(null, N));
}
d = d ? d._modules : {}, C(
d,
"Extensions/FullScreen.js",
[d["Core/Chart/Chart.js"], d["Core/Globals.js"], d["Core/Renderer/HTML/AST.js"], d["Core/Utilities.js"]],
function(o, y, N, _) {
var U = _.addEvent;
return _ = function() {
function G(V) {
this.chart = V, this.isOpen = !1, V = V.renderTo, this.browserProps || (typeof V.requestFullscreen == "function" ? this.browserProps = { fullscreenChange: "fullscreenchange", requestFullscreen: "requestFullscreen", exitFullscreen: "exitFullscreen" } : V.mozRequestFullScreen ? this.browserProps = { fullscreenChange: "mozfullscreenchange", requestFullscreen: "mozRequestFullScreen", exitFullscreen: "mozCancelFullScreen" } : V.webkitRequestFullScreen ? this.browserProps = {
fullscreenChange: "webkitfullscreenchange",
requestFullscreen: "webkitRequestFullScreen",
exitFullscreen: "webkitExitFullscreen"
} : V.msRequestFullscreen && (this.browserProps = { fullscreenChange: "MSFullscreenChange", requestFullscreen: "msRequestFullscreen", exitFullscreen: "msExitFullscreen" }));
}
return G.prototype.close = function() {
var V = this.chart, F = V.options.chart;
this.isOpen && this.browserProps && V.container.ownerDocument instanceof Document && V.container.ownerDocument[this.browserProps.exitFullscreen](), this.unbindFullscreenEvent && (this.unbindFullscreenEvent = this.unbindFullscreenEvent()), V.setSize(this.origWidth, this.origHeight, !1), this.origHeight = this.origWidth = void 0, F.width = this.origWidthOption, F.height = this.origHeightOption, this.origHeightOption = this.origWidthOption = void 0, this.isOpen = !1, this.setButtonText();
}, G.prototype.open = function() {
var V = this, F = V.chart, B = F.options.chart;
if (B && (V.origWidthOption = B.width, V.origHeightOption = B.height), V.origWidth = F.chartWidth, V.origHeight = F.chartHeight, V.browserProps) {
var j = U(
F.container.ownerDocument,
V.browserProps.fullscreenChange,
function() {
V.isOpen ? (V.isOpen = !1, V.close()) : (F.setSize(null, null, !1), V.isOpen = !0, V.setButtonText());
}
), w = U(F, "destroy", j);
V.unbindFullscreenEvent = function() {
j(), w();
}, (B = F.renderTo[V.browserProps.requestFullscreen]()) && B.catch(function() {
alert("Full screen is not supported inside a frame.");
});
}
}, G.prototype.setButtonText = function() {
var V = this.chart, F = V.exportDivElements, B = V.options.exporting, j = B && B.buttons && B.buttons.contextButton.menuItems;
V = V.options.lang, B && B.menuItemDefinitions && V && V.exitFullscreen && V.viewFullscreen && j && F && (F = F[j.indexOf("viewFullscreen")]) && N.setElementHTML(F, this.isOpen ? V.exitFullscreen : B.menuItemDefinitions.viewFullscreen.text || V.viewFullscreen);
}, G.prototype.toggle = function() {
this.isOpen ? this.close() : this.open();
}, G;
}(), y.Fullscreen = _, U(o, "beforeRender", function() {
this.fullscreen = new y.Fullscreen(this);
}), y.Fullscreen;
}
), C(d, "Core/Chart/ChartNavigationComposition.js", [], function() {
var o;
return function(y) {
y.compose = function(_) {
return _.navigation || (_.navigation = new N(_)), _;
};
var N = function() {
function _(U) {
this.updates = [], this.chart = U;
}
return _.prototype.addUpdate = function(U) {
this.chart.navigation.updates.push(U);
}, _.prototype.update = function(U, G) {
var V = this;
this.updates.forEach(function(F) {
F.call(V.chart, U, G);
});
}, _;
}();
y.Additions = N;
}(o || (o = {})), o;
}), C(d, "Extensions/Exporting/ExportingDefaults.js", [d["Core/Globals.js"]], function(o) {
return { exporting: { type: "image/png", url: "https://export.highcharts.com/", printMaxWidth: 780, scale: 2, buttons: { contextButton: {
className: "highcharts-contextbutton",
menuClassName: "highcharts-contextmenu",
symbol: "menu",
titleKey: "contextButtonTitle",
menuItems: "viewFullscreen printChart separator downloadPNG downloadJPEG downloadPDF downloadSVG".split(" ")
} }, menuItemDefinitions: { viewFullscreen: { textKey: "viewFullscreen", onclick: function() {
this.fullscreen.toggle();
} }, printChart: { textKey: "printChart", onclick: function() {
this.print();
} }, separator: { separator: !0 }, downloadPNG: { textKey: "downloadPNG", onclick: function() {
this.exportChart();
} }, downloadJPEG: {
textKey: "downloadJPEG",
onclick: function() {
this.exportChart({ type: "image/jpeg" });
}
}, downloadPDF: { textKey: "downloadPDF", onclick: function() {
this.exportChart({ type: "application/pdf" });
} }, downloadSVG: { textKey: "downloadSVG", onclick: function() {
this.exportChart({ type: "image/svg+xml" });
} } } }, lang: {
viewFullscreen: "View in full screen",
exitFullscreen: "Exit from full screen",
printChart: "Print chart",
downloadPNG: "Download PNG image",
downloadJPEG: "Download JPEG image",
downloadPDF: "Download PDF document",
downloadSVG: "Download SVG vector image",
contextButtonTitle: "Chart context menu"
}, navigation: { buttonOptions: { symbolSize: 14, symbolX: 12.5, symbolY: 10.5, align: "right", buttonSpacing: 3, height: 22, verticalAlign: "top", width: 24, symbolFill: "#666666", symbolStroke: "#666666", symbolStrokeWidth: 3, theme: { padding: 5 } }, menuStyle: { border: "1px solid #999999", background: "#ffffff", padding: "5px 0" }, menuItemStyle: { padding: "0.5em 1em", color: "#333333", background: "none", fontSize: o.isTouchDevice ? "14px" : "11px", transition: "background 250ms, color 250ms" }, menuItemHoverStyle: {
background: "#335cad",
color: "#ffffff"
} } };
}), C(d, "Extensions/Exporting/ExportingSymbols.js", [], function() {
var o;
return function(y) {
function N(G, V, F, B) {
return [["M", G, V + 2.5], ["L", G + F, V + 2.5], ["M", G, V + B / 2 + 0.5], ["L", G + F, V + B / 2 + 0.5], ["M", G, V + B - 1.5], ["L", G + F, V + B - 1.5]];
}
function _(G, V, F, B) {
return G = B / 3 - 2, B = [], B = B.concat(this.circle(F - G, V, G, G), this.circle(F - G, V + G + 4, G, G), this.circle(F - G, V + 2 * (G + 4), G, G));
}
var U = [];
y.compose = function(G) {
U.indexOf(G) === -1 && (U.push(G), G = G.prototype.symbols, G.menu = N, G.menuball = _.bind(G));
};
}(o || (o = {})), o;
}), C(d, "Core/HttpUtilities.js", [d["Core/Globals.js"], d["Core/Utilities.js"]], function(o, y) {
var N = o.doc, _ = y.createElement, U = y.discardElement, G = y.merge, V = y.objectEach, F = { ajax: function(B) {
var j = G(!0, { url: !1, type: "get", dataType: "json", success: !1, error: !1, data: !1, headers: {} }, B);
B = { json: "application/json", xml: "application/xml", text: "text/plain", octet: "application/octet-stream" };
var w = new XMLHttpRequest();
if (!j.url)
return !1;
w.open(j.type.toUpperCase(), j.url, !0), j.headers["Content-Type"] || w.setRequestHeader(
"Content-Type",
B[j.dataType] || B.text
), V(j.headers, function(x, f) {
w.setRequestHeader(f, x);
}), w.onreadystatechange = function() {
if (w.readyState === 4) {
if (w.status === 200) {
var x = w.responseText;
if (j.dataType === "json")
try {
x = JSON.parse(x);
} catch (f) {
j.error && j.error(w, f);
return;
}
return j.success && j.success(x);
}
j.error && j.error(w, w.responseText);
}
};
try {
j.data = JSON.stringify(j.data);
} catch {
}
w.send(j.data || !0);
}, getJSON: function(B, j) {
F.ajax({ url: B, success: j, dataType: "json", headers: { "Content-Type": "text/plain" } });
}, post: function(B, j, w) {
var x = _("form", G({ method: "post", action: B, enctype: "multipart/form-data" }, w), { display: "none" }, N.body);
V(j, function(f, l) {
_("input", { type: "hidden", name: l, value: f }, null, x);
}), x.submit(), U(x);
} };
return F;
}), C(d, "Extensions/Exporting/Exporting.js", [
d["Core/Renderer/HTML/AST.js"],
d["Core/Chart/Chart.js"],
d["Core/Chart/ChartNavigationComposition.js"],
d["Core/DefaultOptions.js"],
d["Extensions/Exporting/ExportingDefaults.js"],
d["Extensions/Exporting/ExportingSymbols.js"],
d["Core/Globals.js"],
d["Core/HttpUtilities.js"],
d["Core/Utilities.js"]
], function(o, y, N, _, U, G, V, F, B) {
y = _.defaultOptions;
var j = V.doc, w = V.win, x = B.addEvent, f = B.css, l = B.createElement, T = B.discardElement, O = B.extend, R = B.find, k = B.fireEvent, b = B.isObject, S = B.merge, v = B.objectEach, h = B.pick, c = B.removeEvent, u = B.uniqueKey, i;
return function(p) {
function a(nt) {
var rt = this, ct = rt.renderer, gt = S(rt.options.navigation.buttonOptions, nt), dt = gt.onclick, ht = gt.menuItems, at = gt.symbolSize || 12;
if (rt.btnCount || (rt.btnCount = 0), rt.exportDivElements || (rt.exportDivElements = [], rt.exportSVGElements = []), gt.enabled !== !1 && gt.theme) {
var J = gt.theme, tt = J.states, ot = tt && tt.hover;
tt = tt && tt.select;
var lt;
rt.styledMode || (J.fill = h(J.fill, "#ffffff"), J.stroke = h(J.stroke, "none")), delete J.states, dt ? lt = function(vt) {
vt && vt.stopPropagation(), dt.call(rt, vt);
} : ht && (lt = function(vt) {
vt && vt.stopPropagation(), rt.contextMenu(pt.menuClassName, ht, pt.translateX, pt.translateY, pt.width, pt.height, pt), pt.setState(2);
}), gt.text && gt.symbol ? J.paddingLeft = h(J.paddingLeft, 30) : gt.text || O(J, { width: gt.width, height: gt.height, padding: 0 }), rt.styledMode || (J["stroke-linecap"] = "round", J.fill = h(J.fill, "#ffffff"), J.stroke = h(J.stroke, "none"));
var pt = ct.button(gt.text, 0, 0, lt, J, ot, tt).addClass(nt.className).attr({ title: h(rt.options.lang[gt._titleKey || gt.titleKey], "") });
if (pt.menuClassName = nt.menuClassName || "highcharts-menu-" + rt.btnCount++, gt.symbol) {
var yt = ct.symbol(gt.symbol, gt.symbolX - at / 2, gt.symbolY - at / 2, at, at, { width: at, height: at }).addClass("highcharts-button-symbol").attr({ zIndex: 1 }).add(pt);
rt.styledMode || yt.attr({ stroke: gt.symbolStroke, fill: gt.symbolFill, "stroke-width": gt.symbolStrokeWidth || 1 });
}
pt.add(rt.exportingGroup).align(O(
gt,
{ width: pt.width, x: h(gt.x, rt.buttonOffset) }
), !0, "spacingBox"), rt.buttonOffset += (pt.width + gt.buttonSpacing) * (gt.align === "right" ? -1 : 1), rt.exportSVGElements.push(pt, yt);
}
}
function t() {
if (this.printReverseInfo) {
var nt = this.printReverseInfo, rt = nt.childNodes, ct = nt.origDisplay;
nt = nt.resetParams, this.moveContainers(this.renderTo), [].forEach.call(rt, function(gt, dt) {
gt.nodeType === 1 && (gt.style.display = ct[dt] || "");
}), this.isPrinting = !1, nt && this.setSize.apply(this, nt), delete this.printReverseInfo, et = void 0, k(this, "afterPrint");
}
}
function s() {
var nt = j.body, rt = this.options.exporting.printMaxWidth, ct = { childNodes: nt.childNodes, origDisplay: [], resetParams: void 0 };
this.isPrinting = !0, this.pointer.reset(null, 0), k(this, "beforePrint"), rt && this.chartWidth > rt && (ct.resetParams = [this.options.chart.width, void 0, !1], this.setSize(rt, void 0, !1)), [].forEach.call(ct.childNodes, function(gt, dt) {
gt.nodeType === 1 && (ct.origDisplay[dt] = gt.style.display, gt.style.display = "none");
}), this.moveContainers(nt), this.printReverseInfo = ct;
}
function n(nt) {
nt.renderExporting(), x(nt, "redraw", nt.renderExporting), x(nt, "destroy", nt.destroyExport);
}
function P(nt, rt, ct, gt, dt, ht, at) {
var J = this, tt = J.options.navigation, ot = J.chartWidth, lt = J.chartHeight, pt = "cache-" + nt, yt = Math.max(dt, ht), vt = J[pt];
if (!vt) {
J.exportContextMenu = J[pt] = vt = l("div", { className: nt }, { position: "absolute", zIndex: 1e3, padding: yt + "px", pointerEvents: "auto" }, J.fixedDiv || J.container);
var Ct = l("ul", { className: "highcharts-menu" }, { listStyle: "none", margin: 0, padding: 0 }, vt);
J.styledMode || f(Ct, O(
{ MozBoxShadow: "3px 3px 10px #888", WebkitBoxShadow: "3px 3px 10px #888", boxShadow: "3px 3px 10px #888" },
tt.menuStyle
)), vt.hideMenu = function() {
f(vt, { display: "none" }), at && at.setState(0), J.openMenu = !1, f(J.renderTo, { overflow: "hidden" }), f(J.container, { overflow: "hidden" }), B.clearTimeout(vt.hideTimer), k(J, "exportMenuHidden");
}, J.exportEvents.push(x(vt, "mouseleave", function() {
vt.hideTimer = w.setTimeout(vt.hideMenu, 500);
}), x(vt, "mouseenter", function() {
B.clearTimeout(vt.hideTimer);
}), x(j, "mouseup", function(Pt) {
J.pointer.inClass(Pt.target, nt) || vt.hideMenu();
}), x(vt, "click", function() {
J.openMenu && vt.hideMenu();
})), rt.forEach(function(Pt) {
if (typeof Pt == "string" && (Pt = J.options.exporting.menuItemDefinitions[Pt]), b(Pt, !0)) {
var At = void 0;
Pt.separator ? At = l("hr", void 0, void 0, Ct) : (Pt.textKey === "viewData" && J.isDataTableVisible && (Pt.textKey = "hideData"), At = l("li", { className: "highcharts-menu-item", onclick: function(St) {
St && St.stopPropagation(), vt.hideMenu(), Pt.onclick && Pt.onclick.apply(J, arguments);
} }, void 0, Ct), o.setElementHTML(At, Pt.text || J.options.lang[Pt.textKey]), J.styledMode || (At.onmouseover = function() {
f(this, tt.menuItemHoverStyle);
}, At.onmouseout = function() {
f(this, tt.menuItemStyle);
}, f(At, O({ cursor: "pointer" }, tt.menuItemStyle)))), J.exportDivElements.push(At);
}
}), J.exportDivElements.push(Ct, vt), J.exportMenuWidth = vt.offsetWidth, J.exportMenuHeight = vt.offsetHeight;
}
rt = { display: "block" }, ct + J.exportMenuWidth > ot ? rt.right = ot - ct - dt - yt + "px" : rt.left = ct - yt + "px", gt + ht + J.exportMenuHeight > lt && at.alignOptions.verticalAlign !== "top" ? rt.bottom = lt - gt - yt + "px" : rt.top = gt + ht - yt + "px", f(vt, rt), f(J.renderTo, { overflow: "" }), f(J.container, { overflow: "" }), J.openMenu = !0, k(J, "exportMenuShown");
}
function D(nt) {
var rt = nt ? nt.target : this, ct = rt.exportSVGElements, gt = rt.exportDivElements;
nt = rt.exportEvents;
var dt;
ct && (ct.forEach(function(ht, at) {
ht && (ht.onclick = ht.ontouchstart = null, dt = "cache-" + ht.menuClassName, rt[dt] && delete rt[dt], ct[at] = ht.destroy());
}), ct.length = 0), rt.exportingGroup && (rt.exportingGroup.destroy(), delete rt.exportingGroup), gt && (gt.forEach(function(ht, at) {
ht && (B.clearTimeout(ht.hideTimer), c(ht, "mouseleave"), gt[at] = ht.onmouseout = ht.onmouseover = ht.ontouchstart = ht.onclick = null, T(ht));
}), gt.length = 0), nt && (nt.forEach(function(ht) {
ht();
}), nt.length = 0);
}
function I(nt, rt) {
rt = this.getSVGForExport(nt, rt), nt = S(this.options.exporting, nt), F.post(nt.url, { filename: nt.filename ? nt.filename.replace(/\//g, "-") : this.getFilename(), type: nt.type, width: nt.width || 0, scale: nt.scale, svg: rt }, nt.formAttributes);
}
function W() {
return this.styledMode && this.inlineStyles(), this.container.innerHTML;
}
function E() {
var nt = this.userOptions.title && this.userOptions.title.text, rt = this.options.exporting.filename;
return rt ? rt.replace(/\//g, "-") : (typeof nt == "string" && (rt = nt.toLowerCase().replace(/<\/?[^>]+(>|$)/g, "").replace(/[\s_]+/g, "-").replace(
/[^a-z0-9\-]/g,
""
).replace(/^[\-]+/g, "").replace(/[\-]+/g, "-").substr(0, 24).replace(/[\-]+$/g, "")), (!rt || 5 > rt.length) && (rt = "chart"), rt);
}
function X(nt) {
var rt, ct = S(this.options, nt);
ct.plotOptions = S(this.userOptions.plotOptions, nt && nt.plotOptions), ct.time = S(this.userOptions.time, nt && nt.time);
var gt = l("div", null, { position: "absolute", top: "-9999em", width: this.chartWidth + "px", height: this.chartHeight + "px" }, j.body), dt = this.renderTo.style.width, ht = this.renderTo.style.height;
dt = ct.exporting.sourceWidth || ct.chart.width || /px$/.test(dt) && parseInt(dt, 10) || (ct.isGantt ? 800 : 600), ht = ct.exporting.sourceHeight || ct.chart.height || /px$/.test(ht) && parseInt(ht, 10) || 400, O(ct.chart, { animation: !1, renderTo: gt, forExport: !0, renderer: "SVGRenderer", width: dt, height: ht }), ct.exporting.enabled = !1, delete ct.data, ct.series = [], this.series.forEach(function(tt) {
rt = S(tt.userOptions, { animation: !1, enableMouseTracking: !1, showCheckbox: !1, visible: tt.visible }), rt.isInternal || ct.series.push(rt);
});
var at = {};
this.axes.forEach(function(tt) {
tt.userOptions.internalKey || (tt.userOptions.internalKey = u()), tt.options.isInternal || (at[tt.coll] || (at[tt.coll] = !0, ct[tt.coll] = []), ct[tt.coll].push(S(tt.userOptions, { visible: tt.visible })));
});
var J = new this.constructor(ct, this.callback);
return nt && ["xAxis", "yAxis", "series"].forEach(function(tt) {
var ot = {};
nt[tt] && (ot[tt] = nt[tt], J.update(ot));
}), this.axes.forEach(function(tt) {
var ot = R(J.axes, function(yt) {
return yt.options.internalKey === tt.userOptions.internalKey;
}), lt = tt.getExtremes(), pt = lt.userMin;
lt = lt.userMax, ot && (typeof pt < "u" && pt !== ot.min || typeof lt < "u" && lt !== ot.max) && ot.setExtremes(
pt,
lt,
!0,
!1
);
}), ht = J.getChartHTML(), k(this, "getSVG", { chartCopy: J }), ht = this.sanitizeSVG(ht, ct), ct = null, J.destroy(), T(gt), ht;
}
function g(nt, rt) {
var ct = this.options.exporting;
return this.getSVG(S({ chart: { borderRadius: 0 } }, ct.chartOptions, rt, { exporting: { sourceWidth: nt && nt.sourceWidth || ct.sourceWidth, sourceHeight: nt && nt.sourceHeight || ct.sourceHeight } }));
}
function m(nt) {
return nt.replace(/([A-Z])/g, function(rt, ct) {
return "-" + ct.toLowerCase();
});
}
function L() {
function nt(J) {
function tt(St, Dt) {
if (lt = pt = !1, ct.length) {
for (yt = ct.length; yt-- && !pt; )
pt = ct[yt].test(Dt);
lt = !pt;
}
for (Dt === "transform" && St === "none" && (lt = !0), yt = rt.length; yt-- && !lt; )
lt = rt[yt].test(Dt) || typeof St == "function";
lt || Ct[Dt] === St && J.nodeName !== "svg" || gt[J.nodeName][Dt] === St || (q && q.indexOf(Dt) === -1 ? ot += m(Dt) + ":" + St + ";" : St && J.setAttribute(m(Dt), St));
}
var ot = "", lt, pt, yt;
if (J.nodeType === 1 && it.indexOf(J.nodeName) === -1) {
var vt = w.getComputedStyle(J, null), Ct = J.nodeName === "svg" ? {} : w.getComputedStyle(J.parentNode, null);
if (!gt[J.nodeName]) {
dt = at.getElementsByTagName("svg")[0];
var Pt = at.createElementNS(J.namespaceURI, J.nodeName);
dt.appendChild(Pt), gt[J.nodeName] = S(w.getComputedStyle(Pt, null)), J.nodeName === "text" && delete gt.text.fill, dt.removeChild(Pt);
}
if (V.isFirefox || V.isMS)
for (var At in vt)
tt(vt[At], At);
else
v(vt, tt);
ot && (vt = J.getAttribute("style"), J.setAttribute("style", (vt ? vt + ";" : "") + ot)), J.nodeName === "svg" && J.setAttribute("stroke-width", "1px"), J.nodeName !== "text" && [].forEach.call(J.children || J.childNodes, nt);
}
}
var rt = Z, ct = p.inlineWhitelist, gt = {}, dt, ht = j.createElement("iframe");
f(ht, { width: "1px", height: "1px", visibility: "hidden" }), j.body.appendChild(ht);
var at = ht.contentWindow.document;
at.open(), at.write(''), at.close(), nt(this.container.querySelector("svg")), dt.parentNode.removeChild(dt), ht.parentNode.removeChild(ht);
}
function z(nt) {
(this.fixedDiv ? [this.fixedDiv, this.scrollingContainer] : [this.container]).forEach(function(rt) {
nt.appendChild(rt);
});
}
function $() {
var nt = this;
nt.exporting = { update: function(rt, ct) {
nt.isDirtyExporting = !0, S(!0, nt.options.exporting, rt), h(ct, !0) && nt.redraw();
} }, N.compose(nt).navigation.addUpdate(function(rt, ct) {
nt.isDirtyExporting = !0, S(!0, nt.options.navigation, rt), h(ct, !0) && nt.redraw();
});
}
function Q() {
var nt = this;
nt.isPrinting || (et = nt, V.isSafari || nt.beforePrint(), setTimeout(function() {
w.focus(), w.print(), V.isSafari || setTimeout(function() {
nt.afterPrint();
}, 1e3);
}, 1));
}
function A() {
var nt = this, rt = nt.options.exporting, ct = rt.buttons, gt = nt.isDirtyExporting || !nt.exportSVGElements;
nt.buttonOffset = 0, nt.isDirtyExporting && nt.destroyExport(), gt && rt.enabled !== !1 && (nt.exportEvents = [], nt.exportingGroup = nt.exportingGroup || nt.renderer.g("exporting-group").attr({ zIndex: 3 }).add(), v(ct, function(dt) {
nt.addButton(dt);
}), nt.isDirtyExporting = !1);
}
function H(nt, rt) {
var ct = nt.indexOf("") + 6, gt = nt.substr(ct);
return nt = nt.substr(0, ct), rt && rt.exporting && rt.exporting.allowHTML && gt && (gt = '' + gt.replace(/(<(?:img|br).*?(?=>))>/g, "$1 />") + "", nt = nt.replace("", gt + "")), nt = nt.replace(/zIndex="[^"]+"/g, "").replace(/symbolName="[^"]+"/g, "").replace(
/jQuery[0-9]+="[^"]+"/g,
""
).replace(/url\(("|")(.*?)("|");?\)/g, "url($2)").replace(/url\([^#]+#/g, "url(#").replace(/