import { ref as Le, reactive as k0, nextTick as fs, openBlock as Je, createElementBlock as qe, normalizeStyle as Tr, createElementVNode as hr, toDisplayString as mn, unref as A0, createCommentVNode as Jn, createTextVNode as zp, Fragment as eh, renderList as ih, normalizeClass as T0, defineCustomElement as Yp } from "vue";
const gs = {
//图表配置
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
}
}, P0 = {
//默认颜色配置
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
}
}, Mn = {
tickPosition: "inside",
lineColor: "#bfbfbf",
tickColor: "#bfbfbf",
tickLength: 5,
ordinal: !1,
type: "linear"
}, Lr = {
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
}, Xp = {
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"
}, E0 = {
年: "Y",
季: "Q",
月: "M",
周: "W",
天: "D"
}, Mp = {
年: "Year",
季: "Season",
月: "Month",
周: "Week",
天: "Day"
};
var Fr = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
function Cn(r) {
return r && r.__esModule && Object.prototype.hasOwnProperty.call(r, "default") ? r.default : r;
}
var Gp = { exports: {} };
(function(r) {
(function(f, E) {
r.exports ? (E.default = E, r.exports = f.document ? E(f) : E) : (f.Highcharts && f.Highcharts.error(16, !0), f.Highcharts = E(f));
})(typeof window < "u" ? window : Fr, function(f) {
function E(y, B, I, Z) {
y.hasOwnProperty(B) || (y[B] = Z.apply(null, I));
}
var h = {};
return E(h, "Core/Globals.js", [], function() {
var y = typeof f < "u" ? f : typeof window < "u" ? window : {}, B;
return function(I) {
I.SVG_NS = "http://www.w3.org/2000/svg", I.product = "Highcharts", I.version = "9.3.3", I.win = y, I.doc = I.win.document, I.svg = I.doc && I.doc.createElementNS && !!I.doc.createElementNS(I.SVG_NS, "svg").createSVGRect, I.userAgent = I.win.navigator && I.win.navigator.userAgent || "", I.isChrome = I.userAgent.indexOf("Chrome") !== -1, I.isFirefox = I.userAgent.indexOf("Firefox") !== -1, I.isMS = /(edge|msie|trident)/i.test(I.userAgent) && !I.win.opera, I.isSafari = !I.isChrome && I.userAgent.indexOf("Safari") !== -1, I.isTouchDevice = /(Mobile|Android|Windows Phone)/.test(I.userAgent), I.isWebKit = I.userAgent.indexOf("AppleWebKit") !== -1, I.deg2rad = 2 * Math.PI / 360, I.hasBidiBug = I.isFirefox && 4 > parseInt(I.userAgent.split("Firefox/")[1], 10), I.hasTouch = !!I.win.TouchEvent, I.marginNames = ["plotTop", "marginRight", "marginBottom", "plotLeft"], I.noop = function() {
}, I.supportsPassiveEvents = function() {
var Z = !1;
if (!I.isMS) {
var F = Object.defineProperty({}, "passive", { get: function() {
Z = !0;
} });
I.win.addEventListener && I.win.removeEventListener && (I.win.addEventListener(
"testPassive",
I.noop,
F
), I.win.removeEventListener("testPassive", I.noop, F));
}
return Z;
}(), I.charts = [], I.dateFormats = {}, I.seriesTypes = {}, I.symbolSizes = {}, I.chartCount = 0;
}(B || (B = {})), B;
}), E(h, "Core/Utilities.js", [h["Core/Globals.js"]], function(y) {
function B(t, o, n, A) {
var _ = o ? "Highcharts error" : "Highcharts warning";
t === 32 && (t = _ + ": Deprecated member");
var D = S(t), j = D ? _ + " #" + t + ": www.highcharts.com/errors/" + t + "/" : t.toString();
if (typeof A < "u") {
var T = "";
D && (j += "?"), b(A, function(X, g) {
T += `
- ` + g + ": " + X, D && (j += encodeURI(g) + "=" + encodeURI(X));
}), j += T;
}
v(y, "displayError", { chart: n, code: t, message: j, params: A }, function() {
if (o)
throw Error(j);
p.console && B.messages.indexOf(j) === -1 && console.warn(j);
}), B.messages.push(j);
}
function I(t, o) {
var n = {};
return b(t, function(A, _) {
H(t[_], !0) && !t.nodeType && o[_] ? (A = I(t[_], o[_]), Object.keys(A).length && (n[_] = A)) : (H(t[_]) || t[_] !== o[_]) && (n[_] = t[_]);
}), n;
}
function Z(t, o) {
return parseInt(t, o || 10);
}
function F(t) {
return typeof t == "string";
}
function U(t) {
return t = Object.prototype.toString.call(t), t === "[object Array]" || t === "[object Array Iterator]";
}
function H(t, o) {
return !!t && typeof t == "object" && (!o || !U(t));
}
function W(t) {
return H(t) && typeof t.nodeType == "number";
}
function R(t) {
var o = t && t.constructor;
return !(!H(t, !0) || W(t) || !o || !o.name || o.name === "Object");
}
function S(t) {
return typeof t == "number" && !isNaN(t) && 1 / 0 > t && -1 / 0 < t;
}
function x(t) {
return typeof t < "u" && t !== null;
}
function d(t, o, n) {
var A;
return F(o) ? x(n) ? t.setAttribute(o, n) : t && t.getAttribute && ((A = t.getAttribute(o)) || o !== "class" || (A = t.getAttribute(o + "Name"))) : b(o, function(_, D) {
x(_) ? t.setAttribute(D, _) : t.removeAttribute(D);
}), A;
}
function u(t, o) {
var n;
t || (t = {});
for (n in o)
t[n] = o[n];
return t;
}
function P() {
for (var t = arguments, o = t.length, n = 0; n < o; n++) {
var A = t[n];
if (typeof A < "u" && A !== null)
return A;
}
}
function O(t, o) {
y.isMS && !y.svg && o && typeof o.opacity < "u" && (o.filter = "alpha(opacity=" + 100 * o.opacity + ")"), u(t.style, o);
}
function N(t, o) {
return 1e14 < t ? t : parseFloat(t.toPrecision(o || 14));
}
function C(t, o, n) {
var A = y.getStyle || C;
if (o === "width")
return o = Math.min(t.offsetWidth, t.scrollWidth), n = t.getBoundingClientRect && t.getBoundingClientRect().width, n < o && n >= o - 1 && (o = Math.floor(n)), Math.max(0, o - (A(t, "padding-left", !0) || 0) - (A(t, "padding-right", !0) || 0));
if (o === "height")
return Math.max(0, Math.min(t.offsetHeight, t.scrollHeight) - (A(t, "padding-top", !0) || 0) - (A(t, "padding-bottom", !0) || 0));
if (p.getComputedStyle || B(27, !0), t = p.getComputedStyle(t, void 0)) {
var _ = t.getPropertyValue(o);
P(n, o !== "opacity") && (_ = Z(_));
}
return _;
}
function b(t, o, n) {
for (var A in t)
Object.hasOwnProperty.call(t, A) && o.call(n || t[A], t[A], A, t);
}
function w(t, o, n) {
function A(T, X) {
var g = t.removeEventListener || y.removeEventListenerPolyfill;
g && g.call(t, T, X, !1);
}
function _(T) {
var X;
if (t.nodeName) {
if (o) {
var g = {};
g[o] = !0;
} else
g = T;
b(g, function(m, L) {
if (T[L])
for (X = T[L].length; X--; )
A(L, T[L][X].fn);
});
}
}
var D = typeof t == "function" && t.prototype || t;
if (Object.hasOwnProperty.call(D, "hcEvents")) {
var j = D.hcEvents;
o ? (D = j[o] || [], n ? (j[o] = D.filter(function(T) {
return n !== T.fn;
}), A(o, n)) : (_(j), j[o] = [])) : (_(j), delete D.hcEvents);
}
}
function v(t, o, n, A) {
if (n = n || {}, c.createEvent && (t.dispatchEvent || t.fireEvent && t !== y)) {
var _ = c.createEvent("Events");
_.initEvent(o, !0, !0), n = u(_, n), t.dispatchEvent ? t.dispatchEvent(n) : t.fireEvent(o, n);
} else if (t.hcEvents) {
n.target || u(n, { preventDefault: function() {
n.defaultPrevented = !0;
}, target: t, type: o }), _ = [];
for (var D = t, j = !1; D.hcEvents; )
Object.hasOwnProperty.call(D, "hcEvents") && D.hcEvents[o] && (_.length && (j = !0), _.unshift.apply(_, D.hcEvents[o])), D = Object.getPrototypeOf(D);
j && _.sort(function(T, X) {
return T.order - X.order;
}), _.forEach(function(T) {
T.fn.call(t, n) === !1 && n.preventDefault();
});
}
A && !n.defaultPrevented && A.call(t, n);
}
var a = y.charts, c = y.doc, p = y.win;
(B || (B = {})).messages = [], Math.easeInOutSine = function(t) {
return -0.5 * (Math.cos(Math.PI * t) - 1);
};
var i = Array.prototype.find ? function(t, o) {
return t.find(o);
} : function(t, o) {
var n, A = t.length;
for (n = 0; n < A; n++)
if (o(t[n], n))
return t[n];
};
b({ map: "map", each: "forEach", grep: "filter", reduce: "reduce", some: "some" }, function(t, o) {
y[o] = function(n) {
var A;
return B(32, !1, void 0, (A = {}, A["Highcharts." + o] = "use Array." + t, A)), Array.prototype[t].apply(n, [].slice.call(arguments, 1));
};
});
var l, s = function() {
var t = Math.random().toString(36).substring(2, 9) + "-", o = 0;
return function() {
return "highcharts-" + (l ? "" : t) + o++;
};
}();
return p.jQuery && (p.jQuery.fn.highcharts = function() {
var t = [].slice.call(arguments);
if (this[0])
return t[0] ? (new y[F(t[0]) ? t.shift() : "Chart"](this[0], t[0], t[1]), this) : a[d(this[0], "data-highcharts-chart")];
}), i = { addEvent: function(t, o, n, A) {
A === void 0 && (A = {});
var _ = typeof t == "function" && t.prototype || t;
Object.hasOwnProperty.call(_, "hcEvents") || (_.hcEvents = {}), _ = _.hcEvents, y.Point && t instanceof y.Point && t.series && t.series.chart && (t.series.chart.runTrackerClick = !0);
var D = t.addEventListener || y.addEventListenerPolyfill;
return D && D.call(t, o, n, y.supportsPassiveEvents ? { passive: A.passive === void 0 ? o.indexOf("touch") !== -1 : A.passive, capture: !1 } : !1), _[o] || (_[o] = []), _[o].push({ fn: n, order: typeof A.order == "number" ? A.order : 1 / 0 }), _[o].sort(function(j, T) {
return j.order - T.order;
}), function() {
w(t, o, n);
};
}, arrayMax: function(t) {
for (var o = t.length, n = t[0]; o--; )
t[o] > n && (n = t[o]);
return n;
}, arrayMin: function(t) {
for (var o = t.length, n = t[0]; o--; )
t[o] < n && (n = t[o]);
return n;
}, attr: d, clamp: function(t, o, n) {
return t > o ? t < n ? t : n : o;
}, cleanRecursively: I, clearTimeout: function(t) {
x(t) && clearTimeout(t);
}, correctFloat: N, createElement: function(t, o, n, A, _) {
return t = c.createElement(t), o && u(t, o), _ && O(t, { padding: "0", border: "none", margin: "0" }), n && O(t, n), A && A.appendChild(t), t;
}, css: O, defined: x, destroyObjectProperties: function(t, o) {
b(t, function(n, A) {
n && n !== o && n.destroy && n.destroy(), delete t[A];
});
}, discardElement: function(t) {
t && t.parentElement && t.parentElement.removeChild(t);
}, erase: function(t, o) {
for (var n = t.length; n--; )
if (t[n] === o) {
t.splice(n, 1);
break;
}
}, error: B, extend: u, extendClass: function(t, o) {
var n = function() {
};
return n.prototype = new t(), u(n.prototype, o), n;
}, find: i, fireEvent: v, getMagnitude: function(t) {
return Math.pow(10, Math.floor(Math.log(t) / Math.LN10));
}, getNestedProperty: function(t, o) {
for (t = t.split("."); t.length && x(o); ) {
var n = t.shift();
if (typeof n > "u" || n === "__proto__" || (o = o[n], !x(o) || typeof o == "function" || typeof o.nodeType == "number" || o === p))
return;
}
return o;
}, getStyle: C, inArray: function(t, o, n) {
return B(32, !1, void 0, { "Highcharts.inArray": "use Array.indexOf" }), o.indexOf(t, n);
}, isArray: U, isClass: R, isDOMElement: W, isFunction: function(t) {
return typeof t == "function";
}, isNumber: S, isObject: H, isString: F, keys: function(t) {
return B(32, !1, void 0, { "Highcharts.keys": "use Object.keys" }), Object.keys(t);
}, merge: function() {
var t, o = arguments, n = {}, A = function(D, j) {
return typeof D != "object" && (D = {}), b(j, function(T, X) {
X !== "__proto__" && X !== "constructor" && (!H(T, !0) || R(T) || W(T) ? D[X] = j[X] : D[X] = A(D[X] || {}, T));
}), D;
};
o[0] === !0 && (n = o[1], o = Array.prototype.slice.call(o, 2));
var _ = o.length;
for (t = 0; t < _; t++)
n = A(n, o[t]);
return n;
}, normalizeTickInterval: function(t, o, n, A, _) {
var D = t;
n = P(n, 1);
var j = t / n;
for (o || (o = _ ? [1, 1.2, 1.5, 2, 2.5, 3, 4, 5, 6, 8, 10] : [1, 2, 2.5, 5, 10], A === !1 && (n === 1 ? o = o.filter(function(T) {
return T % 1 === 0;
}) : 0.1 >= n && (o = [1 / n]))), A = 0; A < o.length && (D = o[A], !(_ && D * n >= t || !_ && j <= (o[A] + (o[A + 1] || o[A])) / 2)); A++)
;
return D = N(D * n, -Math.round(Math.log(1e-3) / Math.LN10));
}, objectEach: b, offset: function(t) {
var o = c.documentElement;
return t = t.parentElement || t.parentNode ? t.getBoundingClientRect() : { top: 0, left: 0, width: 0, height: 0 }, { top: t.top + (p.pageYOffset || o.scrollTop) - (o.clientTop || 0), left: t.left + (p.pageXOffset || o.scrollLeft) - (o.clientLeft || 0), width: t.width, height: t.height };
}, pad: function(t, o, n) {
return Array((o || 2) + 1 - String(t).replace("-", "").length).join(n || "0") + t;
}, pick: P, pInt: Z, relativeLength: function(t, o, n) {
return /%$/.test(t) ? o * parseFloat(t) / 100 + (n || 0) : parseFloat(t);
}, removeEvent: w, splat: function(t) {
return U(t) ? t : [t];
}, stableSort: function(t, o) {
var n = t.length, A, _;
for (_ = 0; _ < n; _++)
t[_].safeI = _;
for (t.sort(function(D, j) {
return A = o(D, j), A === 0 ? D.safeI - j.safeI : A;
}), _ = 0; _ < n; _++)
delete t[_].safeI;
}, syncTimeout: function(t, o, n) {
return 0 < o ? setTimeout(t, o, n) : (t.call(0, n), -1);
}, timeUnits: {
millisecond: 1,
second: 1e3,
minute: 6e4,
hour: 36e5,
day: 864e5,
week: 6048e5,
month: 24192e5,
year: 314496e5
}, uniqueKey: s, useSerialIds: function(t) {
return l = P(t, l);
}, wrap: function(t, o, n) {
var A = t[o];
t[o] = function() {
var _ = Array.prototype.slice.call(arguments), D = arguments, j = this;
return j.proceed = function() {
A.apply(j, arguments.length ? arguments : D);
}, _.unshift(A), _ = n.apply(this, _), j.proceed = null, _;
};
} }, i;
}), E(h, "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" };
}), E(h, "Core/Color/Color.js", [h["Core/Globals.js"], h["Core/Utilities.js"]], function(y, B) {
var I = B.isNumber, Z = B.merge, F = B.pInt;
return B = function() {
function U(H) {
this.rgba = [NaN, NaN, NaN, NaN], this.input = H;
var W = y.Color;
if (W && W !== U)
return new W(H);
if (!(this instanceof U))
return new U(H);
this.init(H);
}
return U.parse = function(H) {
return H ? new U(H) : U.None;
}, U.prototype.init = function(H) {
var W;
if (typeof H == "object" && typeof H.stops < "u")
this.stops = H.stops.map(function(d) {
return new U(d[1]);
});
else if (typeof H == "string") {
if (this.input = H = U.names[H.toLowerCase()] || H, H.charAt(0) === "#") {
var R = H.length, S = parseInt(H.substr(1), 16);
R === 7 ? W = [(S & 16711680) >> 16, (S & 65280) >> 8, S & 255, 1] : R === 4 && (W = [(S & 3840) >> 4 | (S & 3840) >> 8, (S & 240) >> 4 | S & 240, (S & 15) << 4 | S & 15, 1]);
}
if (!W)
for (S = U.parsers.length; S-- && !W; ) {
var x = U.parsers[S];
(R = x.regex.exec(H)) && (W = x.parse(R));
}
}
W && (this.rgba = W);
}, U.prototype.get = function(H) {
var W = this.input, R = this.rgba;
if (typeof W == "object" && typeof this.stops < "u") {
var S = Z(W);
return S.stops = [].slice.call(S.stops), this.stops.forEach(function(x, d) {
S.stops[d] = [S.stops[d][0], x.get(H)];
}), S;
}
return R && I(R[0]) ? H === "rgb" || !H && R[3] === 1 ? "rgb(" + R[0] + "," + R[1] + "," + R[2] + ")" : H === "a" ? "" + R[3] : "rgba(" + R.join(",") + ")" : W;
}, U.prototype.brighten = function(H) {
var W = this.rgba;
if (this.stops)
this.stops.forEach(function(S) {
S.brighten(H);
});
else if (I(H) && H !== 0)
for (var R = 0; 3 > R; R++)
W[R] += F(255 * H), 0 > W[R] && (W[R] = 0), 255 < W[R] && (W[R] = 255);
return this;
}, U.prototype.setOpacity = function(H) {
return this.rgba[3] = H, this;
}, U.prototype.tweenTo = function(H, W) {
var R = this.rgba, S = H.rgba;
return !I(R[0]) || !I(S[0]) ? H.input || "none" : (H = S[3] !== 1 || R[3] !== 1, (H ? "rgba(" : "rgb(") + Math.round(S[0] + (R[0] - S[0]) * (1 - W)) + "," + Math.round(S[1] + (R[1] - S[1]) * (1 - W)) + "," + Math.round(S[2] + (R[2] - S[2]) * (1 - W)) + (H ? "," + (S[3] + (R[3] - S[3]) * (1 - W)) : "") + ")");
}, U.names = { white: "#ffffff", black: "#000000" }, U.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(H) {
return [F(H[1]), F(H[2]), F(H[3]), parseFloat(H[4], 10)];
}
}, { regex: /rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/, parse: function(H) {
return [F(H[1]), F(H[2]), F(H[3]), 1];
} }], U.None = new U(""), U;
}(), B;
}), E(h, "Core/Color/Palettes.js", [], function() {
return { colors: "#7cb5ec #434348 #90ed7d #f7a35c #8085e9 #f15c80 #e4d354 #2b908f #f45b5b #91e8e1".split(" ") };
}), E(h, "Core/Time.js", [h["Core/Globals.js"], h["Core/Utilities.js"]], function(y, B) {
var I = y.win, Z = B.defined, F = B.error, U = B.extend, H = B.isObject, W = B.merge, R = B.objectEach, S = B.pad, x = B.pick, d = B.splat, u = B.timeUnits, P = y.isSafari && I.Intl && I.Intl.DateTimeFormat.prototype.formatRange, O = y.isSafari && I.Intl && !I.Intl.DateTimeFormat.prototype.formatRange;
return B = function() {
function N(C) {
this.options = {}, this.variableTimezone = this.useUTC = !1, this.Date = I.Date, this.getTimezoneOffset = this.timezoneOffsetFunction(), this.update(C);
}
return N.prototype.get = function(C, b) {
if (this.variableTimezone || this.timezoneOffset) {
var w = b.getTime(), v = w - this.getTimezoneOffset(b);
return b.setTime(v), C = b["getUTC" + C](), b.setTime(w), C;
}
return this.useUTC ? b["getUTC" + C]() : b["get" + C]();
}, N.prototype.set = function(C, b, w) {
if (this.variableTimezone || this.timezoneOffset) {
if (C === "Milliseconds" || C === "Seconds" || C === "Minutes" && this.getTimezoneOffset(b) % 36e5 === 0)
return b["setUTC" + C](w);
var v = this.getTimezoneOffset(b);
return v = b.getTime() - v, b.setTime(v), b["setUTC" + C](w), C = this.getTimezoneOffset(b), v = b.getTime() + C, b.setTime(v);
}
return this.useUTC || P && C === "FullYear" ? b["setUTC" + C](w) : b["set" + C](w);
}, N.prototype.update = function(C) {
var b = x(C && C.useUTC, !0);
this.options = C = W(!0, this.options || {}, C), this.Date = C.Date || I.Date || Date, this.timezoneOffset = (this.useUTC = b) && C.timezoneOffset, this.getTimezoneOffset = this.timezoneOffsetFunction(), this.variableTimezone = b && !(!C.getTimezoneOffset && !C.timezone);
}, N.prototype.makeTime = function(C, b, w, v, a, c) {
if (this.useUTC) {
var p = this.Date.UTC.apply(0, arguments), i = this.getTimezoneOffset(p);
p += i;
var l = this.getTimezoneOffset(p);
i !== l ? p += l - i : i - 36e5 !== this.getTimezoneOffset(p - 36e5) || O || (p -= 36e5);
} else
p = new this.Date(C, b, x(w, 1), x(v, 0), x(a, 0), x(c, 0)).getTime();
return p;
}, N.prototype.timezoneOffsetFunction = function() {
var C = this, b = this.options, w = b.getTimezoneOffset, v = b.moment || I.moment;
if (!this.useUTC)
return function(a) {
return 6e4 * new Date(a.toString()).getTimezoneOffset();
};
if (b.timezone) {
if (v)
return function(a) {
return 6e4 * -v.tz(a, b.timezone).utcOffset();
};
F(25);
}
return this.useUTC && w ? function(a) {
return 6e4 * w(a.valueOf());
} : function() {
return 6e4 * (C.timezoneOffset || 0);
};
}, N.prototype.dateFormat = function(C, b, w) {
if (!Z(b) || isNaN(b))
return y.defaultOptions.lang && y.defaultOptions.lang.invalidDate || "";
C = x(C, "%Y-%m-%d %H:%M:%S");
var v = this, a = new this.Date(b), c = this.get("Hours", a), p = this.get("Day", a), i = this.get("Date", a), l = this.get("Month", a), s = this.get("FullYear", a), t = y.defaultOptions.lang, o = t && t.weekdays, n = t && t.shortWeekdays;
return a = U({ a: n ? n[p] : o[p].substr(0, 3), A: o[p], d: S(i), e: S(i, 2, " "), w: p, b: t.shortMonths[l], B: t.months[l], m: S(l + 1), o: l + 1, y: s.toString().substr(2, 2), Y: s, H: S(c), k: c, I: S(c % 12 || 12), l: c % 12 || 12, M: S(this.get("Minutes", a)), p: 12 > c ? "AM" : "PM", P: 12 > c ? "am" : "pm", S: S(a.getSeconds()), L: S(Math.floor(b % 1e3), 3) }, y.dateFormats), R(a, function(A, _) {
for (; C.indexOf("%" + _) !== -1; )
C = C.replace("%" + _, typeof A == "function" ? A.call(v, b) : A);
}), w ? C.substr(0, 1).toUpperCase() + C.substr(1) : C;
}, N.prototype.resolveDTLFormat = function(C) {
return H(C, !0) ? C : (C = d(C), { main: C[0], from: C[1], to: C[2] });
}, N.prototype.getTimeTicks = function(C, b, w, v) {
var a = this, c = [], p = {}, i = new a.Date(b), l = C.unitRange, s = C.count || 1, t;
if (v = x(v, 1), Z(b)) {
if (a.set(
"Milliseconds",
i,
l >= u.second ? 0 : s * Math.floor(a.get("Milliseconds", i) / s)
), l >= u.second && a.set("Seconds", i, l >= u.minute ? 0 : s * Math.floor(a.get("Seconds", i) / s)), l >= u.minute && a.set("Minutes", i, l >= u.hour ? 0 : s * Math.floor(a.get("Minutes", i) / s)), l >= u.hour && a.set("Hours", i, l >= u.day ? 0 : s * Math.floor(a.get("Hours", i) / s)), l >= u.day && a.set("Date", i, l >= u.month ? 1 : Math.max(1, s * Math.floor(a.get("Date", i) / s))), l >= u.month) {
a.set("Month", i, l >= u.year ? 0 : s * Math.floor(a.get("Month", i) / s));
var o = a.get("FullYear", i);
}
l >= u.year && a.set(
"FullYear",
i,
o - o % s
), l === u.week && (o = a.get("Day", i), a.set("Date", i, a.get("Date", i) - o + v + (o < v ? -7 : 0))), o = a.get("FullYear", i), v = a.get("Month", i);
var n = a.get("Date", i), A = a.get("Hours", i);
for (b = i.getTime(), !a.variableTimezone && a.useUTC || !Z(w) || (t = w - b > 4 * u.month || a.getTimezoneOffset(b) !== a.getTimezoneOffset(w)), b = i.getTime(), i = 1; b < w; )
c.push(b), b = l === u.year ? a.makeTime(o + i * s, 0) : l === u.month ? a.makeTime(o, v + i * s) : !t || l !== u.day && l !== u.week ? t && l === u.hour && 1 < s ? a.makeTime(o, v, n, A + i * s) : b + l * s : a.makeTime(o, v, n + i * s * (l === u.day ? 1 : 7)), i++;
c.push(b), l <= u.hour && 1e4 > c.length && c.forEach(function(_) {
_ % 18e5 === 0 && a.dateFormat("%H%M%S%L", _) === "000000000" && (p[_] = "day");
});
}
return c.info = U(C, { higherRanks: p, totalRange: l * s }), c;
}, N.prototype.getDateFormat = function(C, b, w, v) {
var a = this.dateFormat("%m-%d %H:%M:%S.%L", b), c = { millisecond: 15, second: 12, minute: 9, hour: 6, day: 3 }, p = "millisecond";
for (i in u) {
if (C === u.week && +this.dateFormat("%w", b) === w && a.substr(6) === "00:00:00.000") {
var i = "week";
break;
}
if (u[i] > C) {
i = p;
break;
}
if (c[i] && a.substr(c[i]) !== "01-01 00:00:00.000".substr(c[i]))
break;
i !== "week" && (p = i);
}
if (i)
var l = this.resolveDTLFormat(v[i]).main;
return l;
}, N;
}(), B;
}), E(h, "Core/DefaultOptions.js", [h["Core/Chart/ChartDefaults.js"], h["Core/Color/Color.js"], h["Core/Globals.js"], h["Core/Color/Palettes.js"], h["Core/Time.js"], h["Core/Utilities.js"]], function(y, B, I, Z, F, U) {
B = B.parse;
var H = U.merge, W = {
colors: Z.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: I.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: I.isTouchDevice ? 25 : 10,
headerFormat: '{point.key}
',
pointFormat: '● {series.name}: {point.y}
',
backgroundColor: B("#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" }
};
W.chart.styledMode = !1;
var R = new F(H(W.global, W.time));
return y = { defaultOptions: W, defaultTime: R, getOptions: function() {
return W;
}, setOptions: function(S) {
return H(!0, W, S), (S.time || S.global) && (I.time ? I.time.update(H(
W.global,
W.time,
S.global,
S.time
)) : I.time = R), W;
} }, y;
}), E(h, "Core/Animation/Fx.js", [h["Core/Color/Color.js"], h["Core/Globals.js"], h["Core/Utilities.js"]], function(y, B, I) {
var Z = y.parse, F = B.win, U = I.isNumber, H = I.objectEach;
return function() {
function W(R, S, x) {
this.pos = NaN, this.options = S, this.elem = R, this.prop = x;
}
return W.prototype.dSetter = function() {
var R = this.paths, S = R && R[0];
R = R && R[1];
var x = this.now || 0, d = [];
if (x !== 1 && S && R)
if (S.length === R.length && 1 > x)
for (var u = 0; u < R.length; u++) {
for (var P = S[u], O = R[u], N = [], C = 0; C < O.length; C++) {
var b = P[C], w = O[C];
U(b) && U(w) && (O[0] !== "A" || C !== 4 && C !== 5) ? N[C] = b + x * (w - b) : N[C] = w;
}
d.push(N);
}
else
d = R;
else
d = this.toD || [];
this.elem.attr("d", d, void 0, !0);
}, W.prototype.update = function() {
var R = this.elem, S = this.prop, x = this.now, d = this.options.step;
this[S + "Setter"] ? this[S + "Setter"]() : R.attr ? R.element && R.attr(S, x, null, !0) : R.style[S] = x + this.unit, d && d.call(R, x, this);
}, W.prototype.run = function(R, S, x) {
var d = this, u = d.options, P = function(C) {
return P.stopped ? !1 : d.step(C);
}, O = F.requestAnimationFrame || function(C) {
setTimeout(
C,
13
);
}, N = function() {
for (var C = 0; C < W.timers.length; C++)
W.timers[C]() || W.timers.splice(C--, 1);
W.timers.length && O(N);
};
R !== S || this.elem["forceAnimate:" + this.prop] ? (this.startTime = +/* @__PURE__ */ new Date(), this.start = R, this.end = S, this.unit = x, this.now = this.start, this.pos = 0, P.elem = this.elem, P.prop = this.prop, P() && W.timers.push(P) === 1 && O(N)) : (delete u.curAnim[this.prop], u.complete && Object.keys(u.curAnim).length === 0 && u.complete.call(this.elem));
}, W.prototype.step = function(R) {
var S = +/* @__PURE__ */ new Date(), x = this.options, d = this.elem, u = x.complete, P = x.duration, O = x.curAnim;
if (d.attr && !d.element)
R = !1;
else if (R || S >= P + this.startTime) {
this.now = this.end, this.pos = 1, this.update();
var N = O[this.prop] = !0;
H(O, function(C) {
C !== !0 && (N = !1);
}), N && u && u.call(d), R = !1;
} else
this.pos = x.easing((S - this.startTime) / P), this.now = this.start + (this.end - this.start) * this.pos, this.update(), R = !0;
return R;
}, W.prototype.initPath = function(R, S, x) {
function d(a, c) {
for (; a.length < v; ) {
var p = a[0], i = c[v - a.length];
i && p[0] === "M" && (a[0] = i[0] === "C" ? ["C", p[1], p[2], p[1], p[2], p[1], p[2]] : [
"L",
p[1],
p[2]
]), a.unshift(p), N && (p = a.pop(), a.push(a[a.length - 1], p));
}
}
function u(a, c) {
for (; a.length < v; )
if (c = a[Math.floor(a.length / C) - 1].slice(), c[0] === "C" && (c[1] = c[5], c[2] = c[6]), N) {
var p = a[Math.floor(a.length / C)].slice();
a.splice(a.length / 2, 0, c, p);
} else
a.push(c);
}
var P = R.startX, O = R.endX;
x = x.slice();
var N = R.isArea, C = N ? 2 : 1;
if (S = S && S.slice(), !S)
return [x, x];
if (P && O && O.length) {
for (R = 0; R < P.length; R++)
if (P[R] === O[0]) {
var b = R;
break;
} else if (P[0] === O[O.length - P.length + R]) {
b = R;
var w = !0;
break;
} else if (P[P.length - 1] === O[O.length - P.length + R]) {
b = P.length - R;
break;
}
typeof b > "u" && (S = []);
}
if (S.length && U(b)) {
var v = x.length + b * C;
w ? (d(S, x), u(x, S)) : (d(x, S), u(S, x));
}
return [S, x];
}, W.prototype.fillSetter = function() {
W.prototype.strokeSetter.apply(this, arguments);
}, W.prototype.strokeSetter = function() {
this.elem.attr(this.prop, Z(this.start).tweenTo(Z(this.end), this.pos), void 0, !0);
}, W.timers = [], W;
}();
}), E(h, "Core/Animation/AnimationUtilities.js", [h["Core/Animation/Fx.js"], h["Core/Utilities.js"]], function(y, B) {
function I(u) {
return R(u) ? S({ duration: 500, defer: 0 }, u) : { duration: u ? 500 : 0, defer: 0 };
}
function Z(u, P) {
for (var O = y.timers.length; O--; )
y.timers[O].elem !== u || P && P !== y.timers[O].prop || (y.timers[O].stopped = !0);
}
var F = B.defined, U = B.getStyle, H = B.isArray, W = B.isNumber, R = B.isObject, S = B.merge, x = B.objectEach, d = B.pick;
return { animate: function(u, P, O) {
var N, C = "", b, w;
if (!R(O)) {
var v = arguments;
O = { duration: v[2], easing: v[3], complete: v[4] };
}
W(O.duration) || (O.duration = 400), O.easing = typeof O.easing == "function" ? O.easing : Math[O.easing] || Math.easeInOutSine, O.curAnim = S(P), x(P, function(a, c) {
Z(u, c), w = new y(u, O, c), b = void 0, c === "d" && H(P.d) ? (w.paths = w.initPath(u, u.pathArray, P.d), w.toD = P.d, N = 0, b = 1) : u.attr ? N = u.attr(c) : (N = parseFloat(U(u, c)) || 0, c !== "opacity" && (C = "px")), b || (b = a), typeof b == "string" && b.match("px") && (b = b.replace(/px/g, "")), w.run(N, b, C);
});
}, animObject: I, getDeferredAnimation: function(u, P, O) {
var N = I(P), C = 0, b = 0;
return (O ? [O] : u.series).forEach(function(w) {
w = I(w.options.animation), C = P && F(P.defer) ? N.defer : Math.max(C, w.duration + w.defer), b = Math.min(N.duration, w.duration);
}), u.renderer.forExport && (C = 0), { defer: Math.max(0, C - b), duration: Math.min(C, b) };
}, setAnimation: function(u, P) {
P.renderer.globalAnimation = d(u, P.options.chart.animation, !0);
}, stop: Z };
}), E(h, "Core/Renderer/HTML/AST.js", [h["Core/Globals.js"], h["Core/Utilities.js"]], function(y, B) {
var I = y.SVG_NS, Z = B.attr, F = B.createElement, U = B.error, H = B.isFunction, W = B.isString, R = B.objectEach, S = B.splat, x = (B = y.win.trustedTypes) && H(B.createPolicy) && B.createPolicy("highcharts", { createHTML: function(P) {
return P;
} }), d = x ? x.createHTML("") : "";
try {
var u = !!new DOMParser().parseFromString(d, "text/html");
} catch {
u = !1;
}
return H = function() {
function P(O) {
this.nodes = typeof O == "string" ? this.parseMarkup(O) : O;
}
return P.filterUserAttributes = function(O) {
return R(O, function(N, C) {
var b = !0;
P.allowedAttributes.indexOf(C) === -1 && (b = !1), ["background", "dynsrc", "href", "lowsrc", "src"].indexOf(C) !== -1 && (b = W(N) && P.allowedReferences.some(function(w) {
return N.indexOf(w) === 0;
})), b || (U("Highcharts warning: Invalid attribute '" + C + "' in config"), delete O[C]);
}), O;
}, P.setElementHTML = function(O, N) {
O.innerHTML = P.emptyHTML, N && new P(N).addToDOM(O);
}, P.prototype.addToDOM = function(O) {
function N(C, b) {
var w;
return S(C).forEach(function(v) {
var a = v.tagName, c = v.textContent ? y.doc.createTextNode(v.textContent) : void 0;
if (a)
if (a === "#text")
var p = c;
else if (P.allowedTags.indexOf(a) !== -1) {
a = y.doc.createElementNS(a === "svg" ? I : b.namespaceURI || I, a);
var i = v.attributes || {};
R(v, function(l, s) {
s !== "tagName" && s !== "attributes" && s !== "children" && s !== "textContent" && (i[s] = l);
}), Z(a, P.filterUserAttributes(i)), c && a.appendChild(c), N(v.children || [], a), p = a;
} else
U("Highcharts warning: Invalid tagName " + a + " in config");
p && b.appendChild(p), w = p;
}), w;
}
return N(this.nodes, O);
}, P.prototype.parseMarkup = function(O) {
var N = [];
if (O = O.trim(), u)
O = new DOMParser().parseFromString(x ? x.createHTML(O) : O, "text/html");
else {
var C = F("div");
C.innerHTML = O, O = { body: C };
}
var b = function(w, v) {
var a = w.nodeName.toLowerCase(), c = { tagName: a };
if (a === "#text" && (c.textContent = w.textContent || ""), a = w.attributes) {
var p = {};
[].forEach.call(a, function(l) {
p[l.name] = l.value;
}), c.attributes = p;
}
if (w.childNodes.length) {
var i = [];
[].forEach.call(w.childNodes, function(l) {
b(l, i);
}), i.length && (c.children = i);
}
v.push(c);
};
return [].forEach.call(O.body.childNodes, function(w) {
return b(w, N);
}), N;
}, P.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(" "), P.allowedReferences = "https:// http:// mailto: / ../ ./ #".split(" "), P.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(" "), P.emptyHTML = d, P;
}(), H;
}), E(
h,
"Core/FormatUtilities.js",
[h["Core/DefaultOptions.js"], h["Core/Utilities.js"]],
function(y, B) {
function I(S, x, d, u) {
S = +S || 0, x = +x;
var P = Z.lang, O = (S.toString().split(".")[1] || "").split("e")[0].length, N = S.toString().split("e"), C = x;
if (x === -1)
x = Math.min(O, 20);
else if (!H(x))
x = 2;
else if (x && N[1] && 0 > N[1]) {
var b = x + +N[1];
0 <= b ? (N[0] = (+N[0]).toExponential(b).split("e")[0], x = b) : (N[0] = N[0].split(".")[0] || 0, S = 20 > x ? (N[0] * Math.pow(10, N[1])).toFixed(x) : 0, N[1] = 0);
}
b = (Math.abs(N[1] ? N[0] : S) + Math.pow(10, -Math.max(x, O) - 1)).toFixed(x), O = String(R(b));
var w = 3 < O.length ? O.length % 3 : 0;
return d = W(d, P.decimalPoint), u = W(u, P.thousandsSep), S = (0 > S ? "-" : "") + (w ? O.substr(0, w) + u : ""), S = 0 > +N[1] && !C ? "0" : S + O.substr(w).replace(/(\d{3})(?=\d)/g, "$1" + u), x && (S += d + b.slice(-x)), N[1] && +S != 0 && (S += "e" + N[1]), S;
}
var Z = y.defaultOptions, F = y.defaultTime, U = B.getNestedProperty, H = B.isNumber, W = B.pick, R = B.pInt;
return { dateFormat: function(S, x, d) {
return F.dateFormat(S, x, d);
}, format: function(S, x, d) {
var u = "{", P = !1, O = /f$/, N = /\.([0-9])/, C = Z.lang, b = d && d.time || F;
d = d && d.numberFormatter || I;
for (var w = []; S; ) {
var v = S.indexOf(u);
if (v === -1)
break;
var a = S.slice(0, v);
if (P) {
if (a = a.split(":"), u = U(a.shift() || "", x), a.length && typeof u == "number")
if (a = a.join(":"), O.test(a)) {
var c = parseInt((a.match(N) || ["", "-1"])[1], 10);
u !== null && (u = d(u, c, C.decimalPoint, -1 < a.indexOf(",") ? C.thousandsSep : ""));
} else
u = b.dateFormat(a, u);
w.push(u);
} else
w.push(a);
S = S.slice(v + 1), u = (P = !P) ? "}" : "{";
}
return w.push(S), w.join("");
}, numberFormat: I };
}
), E(h, "Core/Renderer/RendererUtilities.js", [h["Core/Utilities.js"]], function(y) {
var B = y.clamp, I = y.pick, Z = y.stableSort, F;
return function(U) {
function H(W, R, S) {
var x = W, d = x.reducedLen || R, u = function(w, v) {
return (v.rank || 0) - (w.rank || 0);
}, P = function(w, v) {
return w.target - v.target;
}, O, N = !0, C = [], b = 0;
for (O = W.length; O--; )
b += W[O].size;
if (b > d) {
for (Z(W, u), b = O = 0; b <= d; )
b += W[O].size, O++;
C = W.splice(O - 1, W.length);
}
for (Z(W, P), W = W.map(function(w) {
return { size: w.size, targets: [w.target], align: I(w.align, 0.5) };
}); N; ) {
for (O = W.length; O--; )
d = W[O], u = (Math.min.apply(0, d.targets) + Math.max.apply(0, d.targets)) / 2, d.pos = B(
u - d.size * d.align,
0,
R - d.size
);
for (O = W.length, N = !1; O--; )
0 < O && W[O - 1].pos + W[O - 1].size > W[O].pos && (W[O - 1].size += W[O].size, W[O - 1].targets = W[O - 1].targets.concat(W[O].targets), W[O - 1].align = 0.5, W[O - 1].pos + W[O - 1].size > R && (W[O - 1].pos = R - W[O - 1].size), W.splice(O, 1), N = !0);
}
return x.push.apply(x, C), O = 0, W.some(function(w) {
var v = 0;
return (w.targets || []).some(function() {
return x[O].pos = w.pos + v, typeof S < "u" && Math.abs(x[O].pos - x[O].target) > S ? (x.slice(0, O + 1).forEach(function(a) {
return delete a.pos;
}), x.reducedLen = (x.reducedLen || R) - 0.1 * R, x.reducedLen > 0.1 * R && H(x, R, S), !0) : (v += x[O].size, O++, !1);
});
}), Z(x, P), x;
}
U.distribute = H;
}(F || (F = {})), F;
}), E(h, "Core/Renderer/SVG/SVGElement.js", [h["Core/Animation/AnimationUtilities.js"], h["Core/Renderer/HTML/AST.js"], h["Core/Color/Color.js"], h["Core/Globals.js"], h["Core/Utilities.js"]], function(y, B, I, Z, F) {
var U = y.animate, H = y.animObject, W = y.stop, R = Z.deg2rad, S = Z.doc, x = Z.noop, d = Z.svg, u = Z.SVG_NS, P = Z.win, O = F.addEvent, N = F.attr, C = F.createElement, b = F.css, w = F.defined, v = F.erase, a = F.extend, c = F.fireEvent, p = F.isArray, i = F.isFunction, l = F.isNumber, s = F.isString, t = F.merge, o = F.objectEach, n = F.pick, A = F.pInt, _ = F.syncTimeout, D = F.uniqueKey;
return y = function() {
function j() {
this.element = void 0, this.onEvents = {}, this.opacity = 1, this.renderer = void 0, this.SVG_NS = u, this.symbolCustomAttribs = "x y width height r start end innerR anchorX anchorY rounded".split(" ");
}
return j.prototype._defaultGetter = function(T) {
return T = n(this[T + "Value"], this[T], this.element ? this.element.getAttribute(T) : null, 0), /^[\-0-9\.]+$/.test(T) && (T = parseFloat(T)), T;
}, j.prototype._defaultSetter = function(T, X, g) {
g.setAttribute(X, T);
}, j.prototype.add = function(T) {
var X = this.renderer, g = this.element;
if (T && (this.parentGroup = T), this.parentInverted = T && T.inverted, typeof this.textStr < "u" && this.element.nodeName === "text" && X.buildText(this), this.added = !0, !T || T.handleZ || this.zIndex)
var m = this.zIndexSetter();
return m || (T ? T.element : X.box).appendChild(g), this.onAdd && this.onAdd(), this;
}, j.prototype.addClass = function(T, X) {
var g = X ? "" : this.attr("class") || "";
return T = (T || "").split(/ /g).reduce(function(m, L) {
return g.indexOf(L) === -1 && m.push(L), m;
}, g ? [g] : []).join(" "), T !== g && this.attr("class", T), this;
}, j.prototype.afterSetters = function() {
this.doTransform && (this.updateTransform(), this.doTransform = !1);
}, j.prototype.align = function(T, X, g) {
var m = {}, L = this.renderer, Y = L.alignedObjects, V, Q, k;
T ? (this.alignOptions = T, this.alignByTranslate = X, (!g || s(g)) && (this.alignTo = V = g || "renderer", v(Y, this), Y.push(this), g = void 0)) : (T = this.alignOptions, X = this.alignByTranslate, V = this.alignTo), g = n(g, L[V], V === "scrollablePlotBox" ? L.plotBox : void 0, L), V = T.align;
var G = T.verticalAlign;
return L = (g.x || 0) + (T.x || 0), Y = (g.y || 0) + (T.y || 0), V === "right" ? Q = 1 : V === "center" && (Q = 2), Q && (L += (g.width - (T.width || 0)) / Q), m[X ? "translateX" : "x"] = Math.round(L), G === "bottom" ? k = 1 : G === "middle" && (k = 2), k && (Y += (g.height - (T.height || 0)) / k), m[X ? "translateY" : "y"] = Math.round(Y), this[this.placed ? "animate" : "attr"](m), this.placed = !0, this.alignAttr = m, this;
}, j.prototype.alignSetter = function(T) {
var X = { left: "start", center: "middle", right: "end" };
X[T] && (this.alignValue = T, this.element.setAttribute(
"text-anchor",
X[T]
));
}, j.prototype.animate = function(T, X, g) {
var m = this, L = H(n(X, this.renderer.globalAnimation, !0));
return X = L.defer, n(S.hidden, S.msHidden, S.webkitHidden, !1) && (L.duration = 0), L.duration !== 0 ? (g && (L.complete = g), _(function() {
m.element && U(m, T, L);
}, X)) : (this.attr(T, void 0, g), o(T, function(Y, V) {
L.step && L.step.call(this, Y, { prop: V, pos: 1, elem: this });
}, this)), this;
}, j.prototype.applyTextOutline = function(T) {
var X = this.element;
T.indexOf("contrast") !== -1 && (T = T.replace(/contrast/g, this.renderer.getContrast(X.style.fill)));
var g = T.split(" ");
if (T = g[g.length - 1], (g = g[0]) && g !== "none" && Z.svg) {
this.fakeTS = !0, this.ySetter = this.xSetter, g = g.replace(/(^[\d\.]+)(.*?)$/g, function(Y, V, Q) {
return 2 * Number(V) + Q;
}), this.removeTextOutline();
var m = S.createElementNS(u, "tspan");
N(m, { class: "highcharts-text-outline", fill: T, stroke: T, "stroke-width": g, "stroke-linejoin": "round" }), [].forEach.call(X.childNodes, function(Y) {
var V = Y.cloneNode(!0);
V.removeAttribute && ["fill", "stroke", "stroke-width", "stroke"].forEach(function(Q) {
return V.removeAttribute(Q);
}), m.appendChild(V);
});
var L = S.createElementNS(u, "tspan");
L.textContent = "", ["x", "y"].forEach(function(Y) {
var V = X.getAttribute(Y);
V && L.setAttribute(Y, V);
}), m.appendChild(L), X.insertBefore(m, X.firstChild);
}
}, j.prototype.attr = function(T, X, g, m) {
var L = this.element, Y = this.symbolCustomAttribs, V, Q = this, k, G;
if (typeof T == "string" && typeof X < "u") {
var z = T;
T = {}, T[z] = X;
}
return typeof T == "string" ? Q = (this[T + "Getter"] || this._defaultGetter).call(this, T, L) : (o(T, function($, q) {
k = !1, m || W(this, q), this.symbolName && Y.indexOf(q) !== -1 && (V || (this.symbolAttr(T), V = !0), k = !0), !this.rotation || q !== "x" && q !== "y" || (this.doTransform = !0), k || (G = this[q + "Setter"] || this._defaultSetter, G.call(this, $, q, L), !this.styledMode && this.shadows && /^(width|height|visibility|x|y|d|transform|cx|cy|r)$/.test(q) && this.updateShadows(q, $, G));
}, this), this.afterSetters()), g && g.call(this), Q;
}, j.prototype.clip = function(T) {
return this.attr("clip-path", T ? "url(" + this.renderer.url + "#" + T.id + ")" : "none");
}, j.prototype.crisp = function(T, X) {
X = X || T.strokeWidth || 0;
var g = Math.round(X) % 2 / 2;
return T.x = Math.floor(T.x || this.x || 0) + g, T.y = Math.floor(T.y || this.y || 0) + g, T.width = Math.floor((T.width || this.width || 0) - 2 * g), T.height = Math.floor((T.height || this.height || 0) - 2 * g), w(T.strokeWidth) && (T.strokeWidth = X), T;
}, j.prototype.complexColor = function(T, X, g) {
var m = this.renderer, L, Y, V, Q, k, G, z, $, q, it, et = [], nt;
c(this.renderer, "complexColor", { args: arguments }, function() {
if (T.radialGradient ? Y = "radialGradient" : T.linearGradient && (Y = "linearGradient"), Y) {
if (V = T[Y], k = m.gradients, G = T.stops, q = g.radialReference, p(V) && (T[Y] = V = { x1: V[0], y1: V[1], x2: V[2], y2: V[3], gradientUnits: "userSpaceOnUse" }), Y === "radialGradient" && q && !w(V.gradientUnits) && (Q = V, V = t(V, m.getRadialAttr(q, Q), { gradientUnits: "userSpaceOnUse" })), o(V, function(ct, gt) {
gt !== "id" && et.push(gt, ct);
}), o(G, function(ct) {
et.push(ct);
}), et = et.join(","), k[et])
it = k[et].attr("id");
else {
V.id = it = D();
var rt = k[et] = m.createElement(Y).attr(V).add(m.defs);
rt.radAttr = Q, rt.stops = [], G.forEach(function(ct) {
ct[1].indexOf("rgba") === 0 ? (L = I.parse(ct[1]), z = L.get("rgb"), $ = L.get("a")) : (z = ct[1], $ = 1), ct = m.createElement("stop").attr({
offset: ct[0],
"stop-color": z,
"stop-opacity": $
}).add(rt), rt.stops.push(ct);
});
}
nt = "url(" + m.url + "#" + it + ")", g.setAttribute(X, nt), g.gradient = et, T.toString = function() {
return nt;
};
}
});
}, j.prototype.css = function(T) {
var X = this.styles, g = {}, m = this.element, L = ["textOutline", "textOverflow", "width"], Y = "", V = !X;
if (T && T.color && (T.fill = T.color), X && o(T, function(G, z) {
X && X[z] !== G && (g[z] = G, V = !0);
}), V) {
if (X && (T = a(X, g)), T) {
if (T.width === null || T.width === "auto")
delete this.textWidth;
else if (m.nodeName.toLowerCase() === "text" && T.width)
var Q = this.textWidth = A(T.width);
}
if (this.styles = T, Q && !d && this.renderer.forExport && delete T.width, m.namespaceURI === this.SVG_NS) {
var k = function(G, z) {
return "-" + z.toLowerCase();
};
o(T, function(G, z) {
L.indexOf(z) === -1 && (Y += z.replace(/([A-Z])/g, k) + ":" + G + ";");
}), Y && N(m, "style", Y);
} else
b(m, T);
this.added && (this.element.nodeName === "text" && this.renderer.buildText(this), T && T.textOutline && this.applyTextOutline(T.textOutline));
}
return this;
}, j.prototype.dashstyleSetter = function(T) {
var X = this["stroke-width"];
if (X === "inherit" && (X = 1), T = T && T.toLowerCase()) {
var g = T.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 (T = g.length; T--; )
g[T] = "" + A(g[T]) * n(X, NaN);
T = g.join(",").replace(/NaN/g, "none"), this.element.setAttribute("stroke-dasharray", T);
}
}, j.prototype.destroy = function() {
var T = this, X = T.element || {}, g = T.renderer, m = X.ownerSVGElement, L = g.isSVG && X.nodeName === "SPAN" && T.parentGroup || void 0;
if (X.onclick = X.onmouseout = X.onmouseover = X.onmousemove = X.point = null, W(T), T.clipPath && m) {
var Y = T.clipPath;
[].forEach.call(m.querySelectorAll("[clip-path],[CLIP-PATH]"), function(V) {
-1 < V.getAttribute("clip-path").indexOf(Y.element.id) && V.removeAttribute("clip-path");
}), T.clipPath = Y.destroy();
}
if (T.stops) {
for (m = 0; m < T.stops.length; m++)
T.stops[m].destroy();
T.stops.length = 0, T.stops = void 0;
}
for (T.safeRemoveChild(X), g.styledMode || T.destroyShadows(); L && L.div && L.div.childNodes.length === 0; )
X = L.parentGroup, T.safeRemoveChild(L.div), delete L.div, L = X;
T.alignTo && v(g.alignedObjects, T), o(T, function(V, Q) {
T[Q] && T[Q].parentGroup === T && T[Q].destroy && T[Q].destroy(), delete T[Q];
});
}, j.prototype.destroyShadows = function() {
(this.shadows || []).forEach(function(T) {
this.safeRemoveChild(T);
}, this), this.shadows = void 0;
}, j.prototype.destroyTextPath = function(T, X) {
var g = T.getElementsByTagName("text")[0];
if (g) {
if (g.removeAttribute("dx"), g.removeAttribute("dy"), X.element.setAttribute("id", ""), this.textPathWrapper && g.getElementsByTagName("textPath").length) {
for (T = this.textPathWrapper.element.childNodes; T.length; )
g.appendChild(T[0]);
g.removeChild(this.textPathWrapper.element);
}
} else
(T.getAttribute("dx") || T.getAttribute("dy")) && (T.removeAttribute("dx"), T.removeAttribute("dy"));
this.textPathWrapper && (this.textPathWrapper = this.textPathWrapper.destroy());
}, j.prototype.dSetter = function(T, X, g) {
p(T) && (typeof T[0] == "string" && (T = this.renderer.pathToSegments(T)), this.pathArray = T, T = T.reduce(function(m, L, Y) {
return L && L.join ? (Y ? m + " " : "") + L.join(" ") : (L || "").toString();
}, "")), /(NaN| {2}|^$)/.test(T) && (T = "M 0 0"), this[X] !== T && (g.setAttribute(X, T), this[X] = T);
}, j.prototype.fadeOut = function(T) {
var X = this;
X.animate({ opacity: 0 }, { duration: n(T, 150), complete: function() {
X.attr({ y: -9999 }).hide();
} });
}, j.prototype.fillSetter = function(T, X, g) {
typeof T == "string" ? g.setAttribute(X, T) : T && this.complexColor(T, X, g);
}, j.prototype.getBBox = function(T, X) {
var g = this.renderer, m = this.element, L = this.styles, Y = this.textStr, V = g.cache, Q = g.cacheKeys, k = m.namespaceURI === this.SVG_NS;
X = n(X, this.rotation, 0);
var G = g.styledMode ? m && j.prototype.getStyle.call(m, "font-size") : L && L.fontSize, z;
if (w(Y)) {
var $ = Y.toString();
$.indexOf("<") === -1 && ($ = $.replace(/[0-9]/g, "0")), $ += ["", X, G, this.textWidth, L && L.textOverflow, L && L.fontWeight].join();
}
if ($ && !T && (z = V[$]), !z) {
if (k || 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"), z = m.getBBox ? a({}, m.getBBox()) : { width: m.offsetWidth, height: m.offsetHeight }, i(q) && q("");
} catch {
}
(!z || 0 > z.width) && (z = {
width: 0,
height: 0
});
} else
z = this.htmlGetBBox();
if (g.isSVG && (T = z.width, g = z.height, k && (z.height = g = { "11px,17": 14, "13px,20": 16 }[(G || "") + "," + Math.round(g)] || g), X && (k = X * R, z.width = Math.abs(g * Math.sin(k)) + Math.abs(T * Math.cos(k)), z.height = Math.abs(g * Math.cos(k)) + Math.abs(T * Math.sin(k)))), $ && (Y === "" || 0 < z.height)) {
for (; 250 < Q.length; )
delete V[Q.shift()];
V[$] || Q.push($), V[$] = z;
}
}
return z;
}, j.prototype.getStyle = function(T) {
return P.getComputedStyle(this.element || this, "").getPropertyValue(T);
}, j.prototype.hasClass = function(T) {
return ("" + this.attr("class")).split(" ").indexOf(T) !== -1;
}, j.prototype.hide = function(T) {
return T ? this.attr({ y: -9999 }) : this.attr({ visibility: "hidden" }), this;
}, j.prototype.htmlGetBBox = function() {
return { height: 0, width: 0, x: 0, y: 0 };
}, j.prototype.init = function(T, X) {
this.element = X === "span" ? C(X) : S.createElementNS(this.SVG_NS, X), this.renderer = T, c(this, "afterInit");
}, j.prototype.invert = function(T) {
return this.inverted = T, this.updateTransform(), this;
}, j.prototype.on = function(T, X) {
var g = this.onEvents;
return g[T] && g[T](), g[T] = O(
this.element,
T,
X
), this;
}, j.prototype.opacitySetter = function(T, X, g) {
this.opacity = T = Number(Number(T).toFixed(3)), g.setAttribute(X, T);
}, j.prototype.removeClass = function(T) {
return this.attr("class", ("" + this.attr("class")).replace(s(T) ? new RegExp("(^| )" + T + "( |$)") : T, " ").replace(/ +/g, " ").trim());
}, j.prototype.removeTextOutline = function() {
var T = this.element.querySelector("tspan.highcharts-text-outline");
T && this.safeRemoveChild(T);
}, j.prototype.safeRemoveChild = function(T) {
var X = T.parentNode;
X && X.removeChild(T);
}, j.prototype.setRadialReference = function(T) {
var X = this.element.gradient && this.renderer.gradients[this.element.gradient];
return this.element.radialReference = T, X && X.radAttr && X.animate(this.renderer.getRadialAttr(T, X.radAttr)), this;
}, j.prototype.setTextPath = function(T, X) {
var g = this.element, m = this.text ? this.text.element : g, L = { textAnchor: "text-anchor" }, Y = !1, V = this.textPathWrapper, Q = !V;
X = t(!0, { enabled: !0, attributes: { dy: -5, startOffset: "50%", textAnchor: "middle" } }, X);
var k = B.filterUserAttributes(X.attributes);
if (T && X && X.enabled) {
V && V.element.parentNode === null ? (Q = !0, V = V.destroy()) : V && this.removeTextOutline.call(V.parentGroup), this.options && this.options.padding && (k.dx = -this.options.padding), V || (this.textPathWrapper = V = this.renderer.createElement("textPath"), Y = !0);
var G = V.element;
if ((X = T.element.getAttribute("id")) || T.element.setAttribute("id", X = D()), Q)
for (m.setAttribute("y", 0), l(k.dx) && m.setAttribute("x", -k.dx), T = [].slice.call(m.childNodes), Q = 0; Q < T.length; Q++) {
var z = T[Q];
z.nodeType !== P.Node.TEXT_NODE && z.nodeName !== "tspan" || G.appendChild(z);
}
Y && V && V.add({ element: m }), G.setAttributeNS("http://www.w3.org/1999/xlink", "href", this.renderer.url + "#" + X), w(k.dy) && (G.parentNode.setAttribute("dy", k.dy), delete k.dy), w(k.dx) && (G.parentNode.setAttribute("dx", k.dx), delete k.dx), o(k, function($, q) {
G.setAttribute(L[q] || q, $);
}), g.removeAttribute("transform"), this.removeTextOutline.call(V), this.text && !this.renderer.styledMode && this.attr({ fill: "none", "stroke-width": 0 }), this.applyTextOutline = this.updateTransform = x;
} else
V && (delete this.updateTransform, delete this.applyTextOutline, this.destroyTextPath(g, T), this.updateTransform(), this.options && this.options.rotation && this.applyTextOutline(this.options.style.textOutline));
return this;
}, j.prototype.shadow = function(T, X, g) {
var m = [], L = this.element, Y = this.oldShadowOptions, V = { color: "#000000", offsetX: this.parentInverted ? -1 : 1, offsetY: this.parentInverted ? -1 : 1, opacity: 0.15, width: 3 }, Q = !1, k;
if (T === !0 ? k = V : typeof T == "object" && (k = a(V, T)), k && (k && Y && o(k, function(it, et) {
it !== Y[et] && (Q = !0);
}), Q && this.destroyShadows(), this.oldShadowOptions = k), !k)
this.destroyShadows();
else if (!this.shadows) {
var G = k.opacity / k.width, z = this.parentInverted ? "translate(" + k.offsetY + ", " + k.offsetX + ")" : "translate(" + k.offsetX + ", " + k.offsetY + ")";
for (V = 1; V <= k.width; V++) {
var $ = L.cloneNode(!1), q = 2 * k.width + 1 - 2 * V;
N($, { stroke: T.color || "#000000", "stroke-opacity": G * V, "stroke-width": q, transform: z, fill: "none" }), $.setAttribute("class", ($.getAttribute("class") || "") + " highcharts-shadow"), g && (N($, "height", Math.max(N($, "height") - q, 0)), $.cutHeight = q), X ? X.element.appendChild($) : L.parentNode && L.parentNode.insertBefore($, L), m.push($);
}
this.shadows = m;
}
return this;
}, j.prototype.show = function(T) {
return this.attr({ visibility: T ? "inherit" : "visible" });
}, j.prototype.strokeSetter = function(T, X, g) {
this[X] = T, this.stroke && this["stroke-width"] ? (j.prototype.fillSetter.call(this, this.stroke, "stroke", g), g.setAttribute("stroke-width", this["stroke-width"]), this.hasStroke = !0) : X === "stroke-width" && T === 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);
}, j.prototype.strokeWidth = function() {
if (!this.renderer.styledMode)
return this["stroke-width"] || 0;
var T = this.getStyle("stroke-width"), X = 0;
if (T.indexOf("px") === T.length - 2)
X = A(T);
else if (T !== "") {
var g = S.createElementNS(u, "rect");
N(g, { width: T, "stroke-width": 0 }), this.element.parentNode.appendChild(g), X = g.getBBox().width, g.parentNode.removeChild(g);
}
return X;
}, j.prototype.symbolAttr = function(T) {
var X = this;
"x y r start end width height innerR anchorX anchorY clockwise".split(" ").forEach(function(g) {
X[g] = n(T[g], X[g]);
}), X.attr({ d: X.renderer.symbols[X.symbolName](X.x, X.y, X.width, X.height, X) });
}, j.prototype.textSetter = function(T) {
T !== this.textStr && (delete this.textPxLength, this.textStr = T, this.added && this.renderer.buildText(this));
}, j.prototype.titleSetter = function(T) {
var X = this.element, g = X.getElementsByTagName("title")[0] || S.createElementNS(this.SVG_NS, "title");
X.insertBefore ? X.insertBefore(g, X.firstChild) : X.appendChild(g), g.textContent = String(n(T, "")).replace(/<[^>]*>/g, "").replace(/</g, "<").replace(
/>/g,
">"
);
}, j.prototype.toFront = function() {
var T = this.element;
return T.parentNode.appendChild(T), this;
}, j.prototype.translate = function(T, X) {
return this.attr({ translateX: T, translateY: X });
}, j.prototype.updateShadows = function(T, X, g) {
var m = this.shadows;
if (m)
for (var L = m.length; L--; )
g.call(m[L], T === "height" ? Math.max(X - (m[L].cutHeight || 0), 0) : T === "d" ? this.d : X, T, m[L]);
}, j.prototype.updateTransform = function() {
var T = this.scaleX, X = this.scaleY, g = this.inverted, m = this.rotation, L = this.matrix, Y = this.element, V = this.translateX || 0, Q = this.translateY || 0;
g && (V += this.width, Q += this.height), V = ["translate(" + V + "," + Q + ")"], w(L) && V.push("matrix(" + L.join(",") + ")"), g ? V.push("rotate(90) scale(-1,1)") : m && V.push("rotate(" + m + " " + n(this.rotationOriginX, Y.getAttribute("x"), 0) + " " + n(this.rotationOriginY, Y.getAttribute("y") || 0) + ")"), (w(T) || w(X)) && V.push("scale(" + n(T, 1) + " " + n(X, 1) + ")"), V.length && Y.setAttribute("transform", V.join(" "));
}, j.prototype.visibilitySetter = function(T, X, g) {
T === "inherit" ? g.removeAttribute(X) : this[X] !== T && g.setAttribute(
X,
T
), this[X] = T;
}, j.prototype.xGetter = function(T) {
return this.element.nodeName === "circle" && (T === "x" ? T = "cx" : T === "y" && (T = "cy")), this._defaultGetter(T);
}, j.prototype.zIndexSetter = function(T, X) {
var g = this.renderer, m = this.parentGroup, L = (m || g).element || g.box, Y = this.element;
g = L === g.box;
var V = !1, Q = this.added, k;
if (w(T) ? (Y.setAttribute("data-z-index", T), T = +T, this[X] === T && (Q = !1)) : w(this[X]) && Y.removeAttribute("data-z-index"), this[X] = T, Q) {
for ((T = this.zIndex) && m && (m.handleZ = !0), X = L.childNodes, k = X.length - 1; 0 <= k && !V; k--) {
m = X[k], Q = m.getAttribute("data-z-index");
var G = !w(Q);
m !== Y && (0 > T && G && !g && !k ? (L.insertBefore(Y, X[k]), V = !0) : (A(Q) <= T || G && (!w(T) || 0 <= T)) && (L.insertBefore(Y, X[k + 1] || null), V = !0));
}
V || (L.insertBefore(Y, X[g ? 3 : 0] || null), V = !0);
}
return V;
}, j;
}(), 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(j, T) {
this[T] = j, this.doTransform = !0;
}, y;
}), E(h, "Core/Renderer/RendererRegistry.js", [h["Core/Globals.js"]], function(y) {
var B;
return function(I) {
I.rendererTypes = {};
var Z;
I.getRendererType = function(F) {
return F === void 0 && (F = Z), I.rendererTypes[F] || I.rendererTypes[Z];
}, I.registerRendererType = function(F, U, H) {
I.rendererTypes[F] = U, (!Z || H) && (Z = F, y.Renderer = U);
};
}(B || (B = {})), B;
}), E(
h,
"Core/Renderer/SVG/SVGLabel.js",
[h["Core/Renderer/SVG/SVGElement.js"], h["Core/Utilities.js"]],
function(y, B) {
var I = this && this.__extends || function() {
var S = function(x, d) {
return S = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(u, P) {
u.__proto__ = P;
} || function(u, P) {
for (var O in P)
P.hasOwnProperty(O) && (u[O] = P[O]);
}, S(x, d);
};
return function(x, d) {
function u() {
this.constructor = x;
}
S(x, d), x.prototype = d === null ? Object.create(d) : (u.prototype = d.prototype, new u());
};
}(), Z = B.defined, F = B.extend, U = B.isNumber, H = B.merge, W = B.pick, R = B.removeEvent;
return function(S) {
function x(d, u, P, O, N, C, b, w, v, a) {
var c = S.call(this) || this;
c.paddingLeftSetter = c.paddingSetter, c.paddingRightSetter = c.paddingSetter, c.init(d, "g"), c.textStr = u, c.x = P, c.y = O, c.anchorX = C, c.anchorY = b, c.baseline = v, c.className = a, c.addClass(a === "button" ? "highcharts-no-tooltip" : "highcharts-label"), a && c.addClass("highcharts-" + a), c.text = d.text(void 0, 0, 0, w).attr({ zIndex: 1 });
var p;
return typeof N == "string" && ((p = /^url\((.*?)\)$/.test(N)) || c.renderer.symbols[N]) && (c.symbolKey = N), c.bBox = x.emptyBBox, c.padding = 3, c.baselineOffset = 0, c.needsBox = d.styledMode || p, c.deferredAttr = {}, c.alignFactor = 0, c;
}
return I(x, S), x.prototype.alignSetter = function(d) {
d = { left: 0, center: 0.5, right: 1 }[d], d !== this.alignFactor && (this.alignFactor = d, this.bBox && U(this.xSetting) && this.attr({ x: this.xSetting }));
}, x.prototype.anchorXSetter = function(d, u) {
this.anchorX = d, this.boxAttr(u, Math.round(d) - this.getCrispAdjust() - this.xSetting);
}, x.prototype.anchorYSetter = function(d, u) {
this.anchorY = d, this.boxAttr(u, d - this.ySetting);
}, x.prototype.boxAttr = function(d, u) {
this.box ? this.box.attr(d, u) : this.deferredAttr[d] = u;
}, x.prototype.css = function(d) {
if (d) {
var u = {};
d = H(d), x.textProps.forEach(function(O) {
typeof d[O] < "u" && (u[O] = d[O], delete d[O]);
}), this.text.css(u);
var P = "width" in u;
"fontSize" in u || "fontWeight" in u ? this.updateTextPadding() : P && this.updateBoxSize();
}
return y.prototype.css.call(this, d);
}, x.prototype.destroy = function() {
R(this.element, "mouseenter"), R(this.element, "mouseleave"), this.text && this.text.destroy(), this.box && (this.box = this.box.destroy()), y.prototype.destroy.call(this);
}, x.prototype.fillSetter = function(d, u) {
d && (this.needsBox = !0), this.fill = d, this.boxAttr(u, d);
}, x.prototype.getBBox = function() {
this.textStr && this.bBox.width === 0 && this.bBox.height === 0 && this.updateBoxSize();
var d = this.padding, u = W(this.paddingLeft, d);
return { width: this.width, height: this.height, x: this.bBox.x - u, y: this.bBox.y - d };
}, 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(d) {
this.heightSetting = d;
}, x.prototype.onAdd = function() {
var d = this.textStr;
this.text.add(this), this.attr({ text: Z(d) ? d : "", x: this.x, y: this.y }), this.box && Z(this.anchorX) && this.attr({ anchorX: this.anchorX, anchorY: this.anchorY });
}, x.prototype.paddingSetter = function(d, u) {
U(d) ? d !== this[u] && (this[u] = d, this.updateTextPadding()) : this[u] = void 0;
}, x.prototype.rSetter = function(d, u) {
this.boxAttr(u, d);
}, x.prototype.shadow = function(d) {
return d && !this.renderer.styledMode && (this.updateBoxSize(), this.box && this.box.shadow(d)), this;
}, x.prototype.strokeSetter = function(d, u) {
this.stroke = d, this.boxAttr(u, d);
}, x.prototype["stroke-widthSetter"] = function(d, u) {
d && (this.needsBox = !0), this["stroke-width"] = d, this.boxAttr(u, d);
}, x.prototype["text-alignSetter"] = function(d) {
this.textAlign = d;
}, x.prototype.textSetter = function(d) {
typeof d < "u" && this.text.attr({ text: d }), this.updateTextPadding();
}, x.prototype.updateBoxSize = function() {
var d = this.text.element.style, u = {}, P = this.padding, O = this.bBox = U(this.widthSetting) && U(this.heightSetting) && !this.textAlign || !Z(this.text.textStr) ? x.emptyBBox : this.text.getBBox();
this.width = this.getPaddedWidth(), this.height = (this.heightSetting || O.height || 0) + 2 * P, d = this.renderer.fontMetrics(d && d.fontSize, this.text), this.baselineOffset = P + Math.min((this.text.firstLineMetrics || d).b, O.height || 1 / 0), this.heightSetting && (this.baselineOffset += (this.heightSetting - d.h) / 2), this.needsBox && (this.box || (P = this.box = this.symbolKey ? this.renderer.symbol(this.symbolKey) : this.renderer.rect(), P.addClass((this.className === "button" ? "" : "highcharts-label-box") + (this.className ? " highcharts-" + this.className + "-box" : "")), P.add(this)), P = this.getCrispAdjust(), u.x = P, u.y = (this.baseline ? -this.baselineOffset : 0) + P, u.width = Math.round(this.width), u.height = Math.round(this.height), this.box.attr(F(u, this.deferredAttr)), this.deferredAttr = {});
}, x.prototype.updateTextPadding = function() {
var d = this.text;
this.updateBoxSize();
var u = this.baseline ? 0 : this.baselineOffset, P = W(this.paddingLeft, this.padding);
Z(this.widthSetting) && this.bBox && (this.textAlign === "center" || this.textAlign === "right") && (P += { center: 0.5, right: 1 }[this.textAlign] * (this.widthSetting - this.bBox.width)), (P !== d.x || u !== d.y) && (d.attr("x", P), d.hasBoxWidthChanged && (this.bBox = d.getBBox(!0)), typeof u < "u" && d.attr("y", u)), d.x = P, d.y = u;
}, x.prototype.widthSetter = function(d) {
this.widthSetting = U(d) ? d : void 0;
}, x.prototype.getPaddedWidth = function() {
var d = this.padding, u = W(this.paddingLeft, d);
return d = W(this.paddingRight, d), (this.widthSetting || this.bBox.width || 0) + u + d;
}, x.prototype.xSetter = function(d) {
this.x = d, this.alignFactor && (d -= this.alignFactor * this.getPaddedWidth(), this["forceAnimate:x"] = !0), this.xSetting = Math.round(d), this.attr("translateX", this.xSetting);
}, x.prototype.ySetter = function(d) {
this.ySetting = this.y = Math.round(d), 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);
}
), E(
h,
"Core/Renderer/SVG/Symbols.js",
[h["Core/Utilities.js"]],
function(y) {
function B(W, R, S, x, d) {
var u = [];
if (d) {
var P = d.start || 0, O = H(d.r, S);
S = H(d.r, x || S);
var N = (d.end || 0) - 1e-3;
x = d.innerR;
var C = H(d.open, 1e-3 > Math.abs((d.end || 0) - P - 2 * Math.PI)), b = Math.cos(P), w = Math.sin(P), v = Math.cos(N), a = Math.sin(N);
P = H(d.longArc, 1e-3 > N - P - Math.PI ? 0 : 1), u.push(["M", W + O * b, R + S * w], ["A", O, S, 0, P, H(d.clockwise, 1), W + O * v, R + S * a]), F(x) && u.push(C ? ["M", W + x * v, R + x * a] : ["L", W + x * v, R + x * a], ["A", x, x, 0, P, F(d.clockwise) ? 1 - d.clockwise : 0, W + x * b, R + x * w]), C || u.push(["Z"]);
}
return u;
}
function I(W, R, S, x, d) {
return d && d.r ? Z(W, R, S, x, d) : [["M", W, R], ["L", W + S, R], ["L", W + S, R + x], ["L", W, R + x], ["Z"]];
}
function Z(W, R, S, x, d) {
return d = d && d.r || 0, [["M", W + d, R], ["L", W + S - d, R], ["C", W + S, R, W + S, R, W + S, R + d], ["L", W + S, R + x - d], ["C", W + S, R + x, W + S, R + x, W + S - d, R + x], ["L", W + d, R + x], ["C", W, R + x, W, R + x, W, R + x - d], ["L", W, R + d], ["C", W, R, W, R, W + d, R]];
}
var F = y.defined, U = y.isNumber, H = y.pick;
return { arc: B, callout: function(W, R, S, x, d) {
var u = Math.min(d && d.r || 0, S, x), P = u + 6, O = d && d.anchorX;
d = d && d.anchorY || 0;
var N = Z(W, R, S, x, { r: u });
return U(O) && (W + O >= S ? d > R + P && d < R + x - P ? N.splice(3, 1, ["L", W + S, d - 6], ["L", W + S + 6, d], ["L", W + S, d + 6], ["L", W + S, R + x - u]) : N.splice(3, 1, ["L", W + S, x / 2], ["L", O, d], ["L", W + S, x / 2], ["L", W + S, R + x - u]) : 0 >= W + O ? d > R + P && d < R + x - P ? N.splice(7, 1, ["L", W, d + 6], ["L", W - 6, d], ["L", W, d - 6], ["L", W, R + u]) : N.splice(7, 1, ["L", W, x / 2], ["L", O, d], ["L", W, x / 2], ["L", W, R + u]) : d && d > x && O > W + P && O < W + S - P ? N.splice(5, 1, ["L", O + 6, R + x], ["L", O, R + x + 6], ["L", O - 6, R + x], ["L", W + u, R + x]) : d && 0 > d && O > W + P && O < W + S - P && N.splice(1, 1, ["L", O - 6, R], ["L", O, R - 6], ["L", O + 6, R], ["L", S - u, R])), N;
}, circle: function(W, R, S, x) {
return B(W + S / 2, R + x / 2, S / 2, x / 2, { start: 0.5 * Math.PI, end: 2.5 * Math.PI, open: !1 });
}, diamond: function(W, R, S, x) {
return [["M", W + S / 2, R], ["L", W + S, R + x / 2], ["L", W + S / 2, R + x], ["L", W, R + x / 2], ["Z"]];
}, rect: I, roundedRect: Z, square: I, triangle: function(W, R, S, x) {
return [["M", W + S / 2, R], ["L", W + S, R + x], ["L", W, R + x], ["Z"]];
}, "triangle-down": function(W, R, S, x) {
return [["M", W, R], ["L", W + S, R], ["L", W + S / 2, R + x], ["Z"]];
} };
}
), E(h, "Core/Renderer/SVG/TextBuilder.js", [h["Core/Renderer/HTML/AST.js"], h["Core/Globals.js"], h["Core/Utilities.js"]], function(y, B, I) {
var Z = B.doc, F = B.SVG_NS, U = B.win, H = I.attr, W = I.isString, R = I.objectEach, S = I.pick;
return function() {
function x(d) {
var u = d.styles;
this.renderer = d.renderer, this.svgElement = d, this.width = d.textWidth, this.textLineHeight = u && u.lineHeight, this.textOutline = u && u.textOutline, this.ellipsis = !(!u || u.textOverflow !== "ellipsis"), this.noWrap = !(!u || u.whiteSpace !== "nowrap"), this.fontSize = u && u.fontSize;
}
return x.prototype.buildSVG = function() {
var d = this.svgElement, u = d.element, P = d.renderer, O = S(d.textStr, "").toString(), N = O.indexOf("<") !== -1, C = u.childNodes;
P = this.width && !d.added && P.box;
var b = //g, w = [O, this.ellipsis, this.noWrap, this.textLineHeight, this.textOutline, this.fontSize, this.width].join();
if (w !== d.textCache) {
for (d.textCache = w, delete d.actualWidth, w = C.length; w--; )
u.removeChild(C[w]);
N || this.ellipsis || this.width || O.indexOf(" ") !== -1 && (!this.noWrap || b.test(O)) ? O !== "" && (P && P.appendChild(u), O = new y(O), this.modifyTree(O.nodes), O.addToDOM(d.element), this.modifyDOM(), this.ellipsis && (u.textContent || "").indexOf("…") !== -1 && d.attr(
"title",
this.unescapeEntities(d.textStr || "", ["<", ">"])
), P && P.removeChild(u)) : u.appendChild(Z.createTextNode(this.unescapeEntities(O))), W(this.textOutline) && d.applyTextOutline && d.applyTextOutline(this.textOutline);
}
}, x.prototype.modifyDOM = function() {
var d = this, u = this.svgElement, P = H(u.element, "x");
u.firstLineMetrics = void 0;
for (var O; (O = u.element.firstChild) && /^[\s\u200B]*$/.test(O.textContent || " "); )
u.element.removeChild(O);
[].forEach.call(u.element.querySelectorAll("tspan.highcharts-br"), function(w, v) {
w.nextSibling && w.previousSibling && (v === 0 && w.previousSibling.nodeType === 1 && (u.firstLineMetrics = u.renderer.fontMetrics(void 0, w.previousSibling)), H(w, { dy: d.getLineHeight(w.nextSibling), x: P }));
});
var N = this.width || 0;
if (N) {
var C = function(w, v) {
var a = w.textContent || "", c = a.replace(/([^\^])-/g, "$1- ").split(" "), p = !d.noWrap && (1 < c.length || 1 < u.element.childNodes.length), i = d.getLineHeight(v), l = 0, s = u.actualWidth;
if (d.ellipsis)
a && d.truncate(w, a, void 0, 0, Math.max(0, N - parseInt(d.fontSize || 12, 10)), function(t, o) {
return t.substring(
0,
o
) + "…";
});
else if (p) {
for (a = [], p = []; v.firstChild && v.firstChild !== w; )
p.push(v.firstChild), v.removeChild(v.firstChild);
for (; c.length; )
c.length && !d.noWrap && 0 < l && (a.push(w.textContent || ""), w.textContent = c.join(" ").replace(/- /g, "-")), d.truncate(w, void 0, c, l === 0 && s || 0, N, function(t, o) {
return c.slice(0, o).join(" ").replace(/- /g, "-");
}), s = u.actualWidth, l++;
p.forEach(function(t) {
v.insertBefore(t, w);
}), a.forEach(function(t) {
v.insertBefore(Z.createTextNode(t), w), t = Z.createElementNS(F, "tspan"), t.textContent = "", H(t, { dy: i, x: P }), v.insertBefore(t, w);
});
}
}, b = function(w) {
[].slice.call(w.childNodes).forEach(function(v) {
v.nodeType === U.Node.TEXT_NODE ? C(v, w) : (v.className.baseVal.indexOf("highcharts-br") !== -1 && (u.actualWidth = 0), b(v));
});
};
b(u.element);
}
}, x.prototype.getLineHeight = function(d) {
var u;
return d = d.nodeType === U.Node.TEXT_NODE ? d.parentElement : d, this.renderer.styledMode || (u = d && /(px|em)$/.test(d.style.fontSize) ? d.style.fontSize : this.fontSize || this.renderer.style.fontSize || 12), this.textLineHeight ? parseInt(
this.textLineHeight.toString(),
10
) : this.renderer.fontMetrics(u, d || this.svgElement.element).h;
}, x.prototype.modifyTree = function(d) {
var u = this, P = function(O, N) {
var C = O.attributes;
C = C === void 0 ? {} : C;
var b = O.children, w = O.tagName, v = u.renderer.styledMode;
w === "b" || w === "strong" ? v ? C.class = "highcharts-strong" : C.style = "font-weight:bold;" + (C.style || "") : (w === "i" || w === "em") && (v ? C.class = "highcharts-emphasized" : C.style = "font-style:italic;" + (C.style || "")), W(C.style) && (C.style = C.style.replace(/(;| |^)color([ :])/, "$1fill$2")), w === "br" ? (C.class = "highcharts-br", O.textContent = "", (N = d[N + 1]) && N.textContent && (N.textContent = N.textContent.replace(/^ +/gm, ""))) : w === "a" && b && b.some(function(a) {
return a.tagName === "#text";
}) && (O.children = [{ children: b, tagName: "tspan" }]), w !== "#text" && w !== "a" && (O.tagName = "tspan"), O.attributes = C, b && b.filter(function(a) {
return a.tagName !== "#text";
}).forEach(P);
};
d.forEach(P);
}, x.prototype.truncate = function(d, u, P, O, N, C) {
var b = this.svgElement, w = b.renderer, v = b.rotation, a = [], c = P ? 1 : 0, p = (u || P || "").length, i = p, l, s = function(o, n) {
n = n || o;
var A = d.parentNode;
if (A && typeof a[n] > "u")
if (A.getSubStringLength)
try {
a[n] = O + A.getSubStringLength(0, P ? n + 1 : n);
} catch {
}
else
w.getSpanWidth && (d.textContent = C(u || P, o), a[n] = O + w.getSpanWidth(b, d));
return a[n];
};
b.rotation = 0;
var t = s(d.textContent.length);
if (O + t > N) {
for (; c <= p; )
i = Math.ceil((c + p) / 2), P && (l = C(P, i)), t = s(i, l && l.length - 1), c === p ? c = p + 1 : t > N ? p = i - 1 : c = i;
p === 0 ? d.textContent = "" : u && p === u.length - 1 || (d.textContent = l || C(u || P, i));
}
P && P.splice(0, i), b.actualWidth = t, b.rotation = v;
}, x.prototype.unescapeEntities = function(d, u) {
return R(this.renderer.escapes, function(P, O) {
u && u.indexOf(P) !== -1 || (d = d.toString().replace(new RegExp(P, "g"), O));
}), d;
}, x;
}();
}), E(h, "Core/Renderer/SVG/SVGRenderer.js", [h["Core/Renderer/HTML/AST.js"], h["Core/Color/Color.js"], h["Core/Globals.js"], h["Core/Renderer/RendererRegistry.js"], h["Core/Renderer/SVG/SVGElement.js"], h["Core/Renderer/SVG/SVGLabel.js"], h["Core/Renderer/SVG/Symbols.js"], h["Core/Renderer/SVG/TextBuilder.js"], h["Core/Utilities.js"]], function(y, B, I, Z, F, U, H, W, R) {
var S = I.charts, x = I.deg2rad, d = I.doc, u = I.isFirefox, P = I.isMS, O = I.isWebKit, N = I.noop, C = I.SVG_NS, b = I.symbolSizes, w = I.win, v = R.addEvent, a = R.attr, c = R.createElement, p = R.css, i = R.defined, l = R.destroyObjectProperties, s = R.extend, t = R.isArray, o = R.isNumber, n = R.isObject, A = R.isString, _ = R.merge, D = R.pick, j = R.pInt, T = R.uniqueKey, X;
return I = function() {
function g(m, L, Y, V, Q, k, G) {
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, Y, V, Q, k, G);
}
return g.prototype.init = function(m, L, Y, V, Q, k, G) {
var z = this.createElement("svg").attr({ version: "1.1", class: "highcharts-root" }), $ = z.element;
G || z.css(this.getStyle(V)), m.appendChild($), a(m, "dir", "ltr"), m.innerHTML.indexOf("xmlns") === -1 && a($, "xmlns", this.SVG_NS), this.isSVG = !0, this.box = $, this.boxWrapper = z, this.alignedObjects = [], this.url = this.getReferenceURL(), this.createElement("desc").add().element.appendChild(d.createTextNode("Created with Highcharts 9.3.3")), this.defs = this.createElement("defs").add(), this.allowHTML = k, this.forExport = Q, this.styledMode = G, this.gradients = {}, this.cache = {}, this.cacheKeys = [], this.imgCount = 0, this.setSize(L, Y, !1);
var q;
u && m.getBoundingClientRect && (L = function() {
p(m, { left: 0, top: 0 }), q = m.getBoundingClientRect(), p(m, { left: Math.ceil(q.left) - q.left + "px", top: Math.ceil(q.top) - q.top + "px" });
}, L(), this.unSubPixelFix = v(w, "resize", L));
}, g.prototype.definition = function(m) {
return new y([m]).addToDOM(this.defs.element);
}, g.prototype.getReferenceURL = function() {
if ((u || O) && d.getElementsByTagName("base").length) {
if (!i(X)) {
var m = T();
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(d.body), p(m, { position: "fixed", top: 0, left: 0, zIndex: 9e5 });
var L = d.elementFromPoint(6, 6);
X = (L && L.id) === "hitme", d.body.removeChild(m);
}
if (X)
return w.location.href.split("#")[0].replace(/<[^>]*>/g, "").replace(/([\('\)])/g, "\\$1").replace(/ /g, "%20");
}
return "";
}, g.prototype.getStyle = function(m) {
return this.style = s({ 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(), l(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 W(m).buildSVG();
}, g.prototype.getContrast = function(m) {
return m = B.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, Y, V, Q, k, G, z, $, q) {
var it = this.label(m, L, Y, $, void 0, void 0, q, void 0, "button"), et = this.styledMode, nt = 0, rt = Q ? _(Q) : {};
if (m = rt && rt.style || {}, rt = y.filterUserAttributes(rt), it.attr(_({ padding: 8, r: 2 }, rt)), !et) {
rt = _({ fill: "#f7f7f7", stroke: "#cccccc", "stroke-width": 1, style: { color: "#333333", cursor: "pointer", fontWeight: "normal" } }, { style: m }, rt);
var ct = rt.style;
delete rt.style, k = _(rt, { fill: "#e6e6e6" }, y.filterUserAttributes(k || {}));
var gt = k.style;
delete k.style, G = _(rt, { fill: "#e6ebf5", style: { color: "#000000", fontWeight: "bold" } }, y.filterUserAttributes(G || {}));
var dt = G.style;
delete G.style, z = _(rt, { style: { color: "#cccccc" } }, y.filterUserAttributes(z || {}));
var lt = z.style;
delete z.style;
}
return v(it.element, P ? "mouseover" : "mouseenter", function() {
nt !== 3 && it.setState(1);
}), v(it.element, P ? "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, k, G, z][at || 0]).css([ct, gt, dt, lt][at || 0]);
}, et || it.attr(rt).css(s({ cursor: "default" }, ct)), it.on("touchstart", function(at) {
return at.stopPropagation();
}).on("click", function(at) {
nt !== 3 && V.call(it, at);
});
}, g.prototype.crispLine = function(m, L, Y) {
Y === void 0 && (Y = "round");
var V = m[0], Q = m[1];
return i(V[1]) && V[1] === Q[1] && (V[1] = Q[1] = Math[Y](V[1]) - L % 2 / 2), i(V[2]) && V[2] === Q[2] && (V[2] = Q[2] = Math[Y](V[2]) + L % 2 / 2), m;
}, g.prototype.path = function(m) {
var L = this.styledMode ? {} : { fill: "none" };
return t(m) ? L.d = m : n(m) && s(L, m), this.createElement("path").attr(L);
}, g.prototype.circle = function(m, L, Y) {
return m = n(m) ? m : typeof m > "u" ? {} : { x: m, y: L, r: Y }, L = this.createElement("circle"), L.xSetter = L.ySetter = function(V, Q, k) {
k.setAttribute("c" + Q, V);
}, L.attr(m);
}, g.prototype.arc = function(m, L, Y, V, Q, k) {
return n(m) ? (V = m, L = V.y, Y = V.r, m = V.x) : V = { innerR: V, start: Q, end: k }, m = this.symbol("arc", m, L, Y, Y, V), m.r = Y, m;
}, g.prototype.rect = function(m, L, Y, V, Q, k) {
Q = n(m) ? m.r : Q;
var G = this.createElement("rect");
return m = n(m) ? m : typeof m > "u" ? {} : { x: m, y: L, width: Math.max(Y, 0), height: Math.max(V, 0) }, this.styledMode || (typeof k < "u" && (m["stroke-width"] = k, m = G.crisp(m)), m.fill = "none"), Q && (m.r = Q), G.rSetter = function(z, $, q) {
G.r = z, a(q, { rx: z, ry: z });
}, G.rGetter = function() {
return G.r || 0;
}, G.attr(m);
}, g.prototype.setSize = function(m, L, Y) {
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: D(
Y,
!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, Y, V, Q, k) {
var G = { preserveAspectRatio: "none" }, z = function(q, it) {
q.setAttributeNS ? q.setAttributeNS("http://www.w3.org/1999/xlink", "href", it) : q.setAttribute("hc-svg-href", it);
};
o(L) && (G.x = L), o(Y) && (G.y = Y), o(V) && (G.width = V), o(Q) && (G.height = Q);
var $ = this.createElement("image").attr(G);
return L = function(q) {
z($.element, m), k.call($, q);
}, k ? (z(
$.element,
"data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw=="
), Y = new w.Image(), v(Y, "load", L), Y.src = m, Y.complete && L({})) : z($.element, m), $;
}, g.prototype.symbol = function(m, L, Y, V, Q, k) {
var G = this, z = /^url\((.*?)\)$/, $ = z.test(m), q = !$ && (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(Y || 0), V || 0, Q || 0, k));
var nt = this.path(et);
G.styledMode || nt.attr("fill", "none"), s(nt, { symbolName: q || void 0, x: L, y: Y, width: V, height: Q }), k && s(nt, k);
} else if ($) {
var rt = m.match(z)[1], ct = nt = this.image(rt);
ct.imgwidth = D(b[rt] && b[rt].width, k && k.width), ct.imgheight = D(b[rt] && b[rt].height, k && k.height);
var gt = function(dt) {
return dt.attr({ width: dt.width, height: dt.height });
};
["width", "height"].forEach(function(dt) {
ct[dt + "Setter"] = function(lt, at) {
var J = this["img" + at];
this[at] = lt, i(J) && (k && k.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 || (lt = ((this[at] || 0) - J) / 2, this.attr(at === "width" ? { translateX: lt } : { translateY: lt })));
};
}), i(L) && ct.attr({ x: L, y: Y }), ct.isImg = !0, i(ct.imgwidth) && i(ct.imgheight) ? gt(ct) : (ct.attr({ width: 0, height: 0 }), c("img", { onload: function() {
var dt = S[G.chartIndex];
this.width === 0 && (p(this, { position: "absolute", top: "-999em" }), d.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), G.imgCount--, !G.imgCount && dt && !dt.hasLoaded && dt.onload();
}, src: rt }), this.imgCount++);
}
return nt;
}, g.prototype.clipRect = function(m, L, Y, V) {
var Q = T() + "-", k = this.createElement("clipPath").attr({ id: Q }).add(this.defs);
return m = this.rect(m, L, Y, V, 0).add(k), m.id = Q, m.clipPath = k, m.count = 0, m;
}, g.prototype.text = function(m, L, Y, V) {
var Q = {};
return V && (this.allowHTML || !this.forExport) ? this.html(m, L, Y) : (Q.x = Math.round(L || 0), Y && (Q.y = Math.round(Y)), i(m) && (Q.text = m), m = this.createElement("text").attr(Q), (!V || this.forExport && !this.allowHTML) && (m.xSetter = function(k, G, z) {
for (var $ = z.getElementsByTagName("tspan"), q = z.getAttribute(G), it = 0, et; it < $.length; it++)
et = $[it], et.getAttribute(G) === q && et.setAttribute(G, k);
z.setAttribute(G, k);
}), m);
}, g.prototype.fontMetrics = function(m, L) {
return m = !this.styledMode && /px/.test(m) || !w.getComputedStyle ? m || L && L.style && L.style.fontSize || this.style && this.style.fontSize : L && F.prototype.getStyle.call(L, "font-size"), m = /px/.test(m) ? j(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, Y) {
var V = m;
return L && Y && (V = Math.max(V * Math.cos(L * x), 4)), { x: -m / 3 * Math.sin(L * x), y: V };
}, g.prototype.pathToSegments = function(m) {
for (var L = [], Y = [], V = { A: 8, C: 7, H: 2, L: 3, M: 3, Q: 5, S: 5, T: 3, V: 2 }, Q = 0; Q < m.length; Q++)
A(Y[0]) && o(m[Q]) && Y.length === V[Y[0].toUpperCase()] && m.splice(Q, 0, Y[0].replace("M", "L").replace("m", "l")), typeof m[Q] == "string" && (Y.length && L.push(Y.slice(0)), Y.length = 0), Y.push(m[Q]);
return L.push(Y.slice(0)), L;
}, g.prototype.label = function(m, L, Y, V, Q, k, G, z, $) {
return new U(this, m, L, Y, V, Q, k, G, z, $);
}, g.prototype.alignElements = function() {
this.alignedObjects.forEach(function(m) {
return m.align();
});
}, g;
}(), s(I.prototype, { Element: F, SVG_NS: C, escapes: { "&": "&", "<": "<", ">": ">", "'": "'", '"': """ }, symbols: H, draw: N }), Z.registerRendererType("svg", I, !0), I;
}), E(h, "Core/Renderer/HTML/HTMLElement.js", [h["Core/Globals.js"], h["Core/Renderer/SVG/SVGElement.js"], h["Core/Utilities.js"]], function(y, B, I) {
var Z = this && this.__extends || function() {
var P = function(O, N) {
return P = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(C, b) {
C.__proto__ = b;
} || function(C, b) {
for (var w in b)
b.hasOwnProperty(w) && (C[w] = b[w]);
}, P(O, N);
};
return function(O, N) {
function C() {
this.constructor = O;
}
P(O, N), O.prototype = N === null ? Object.create(N) : (C.prototype = N.prototype, new C());
};
}(), F = y.isFirefox, U = y.isMS, H = y.isWebKit, W = y.win, R = I.css, S = I.defined, x = I.extend, d = I.pick, u = I.pInt;
return function(P) {
function O() {
return P !== null && P.apply(this, arguments) || this;
}
return Z(O, P), O.compose = function(N) {
if (O.composedClasses.indexOf(N) === -1) {
O.composedClasses.push(N);
var C = O.prototype, b = N.prototype;
b.getSpanCorrection = C.getSpanCorrection, b.htmlCss = C.htmlCss, b.htmlGetBBox = C.htmlGetBBox, b.htmlUpdateTransform = C.htmlUpdateTransform, b.setSpanRotation = C.setSpanRotation;
}
return N;
}, O.prototype.getSpanCorrection = function(N, C, b) {
this.xCorr = -N * b, this.yCorr = -C;
}, O.prototype.htmlCss = function(N) {
var C = this.element.tagName === "SPAN" && N && "width" in N, b = d(C && N.width, void 0);
if (C) {
delete N.width, this.textWidth = b;
var w = !0;
}
return N && N.textOverflow === "ellipsis" && (N.whiteSpace = "nowrap", N.overflow = "hidden"), this.styles = x(this.styles, N), R(this.element, N), w && this.htmlUpdateTransform(), this;
}, O.prototype.htmlGetBBox = function() {
var N = this.element;
return { x: N.offsetLeft, y: N.offsetTop, width: N.offsetWidth, height: N.offsetHeight };
}, O.prototype.htmlUpdateTransform = function() {
if (this.added) {
var N = this.renderer, C = this.element, b = this.translateX || 0, w = this.translateY || 0, v = this.x || 0, a = this.y || 0, c = this.textAlign || "left", p = { left: 0, center: 0.5, right: 1 }[c], i = this.styles;
if (i = i && i.whiteSpace, R(C, { marginLeft: b, marginTop: w }), !N.styledMode && this.shadows && this.shadows.forEach(function(A) {
R(A, { marginLeft: b + 1, marginTop: w + 1 });
}), this.inverted && [].forEach.call(C.childNodes, function(A) {
N.invertChild(A, C);
}), C.tagName === "SPAN") {
var l = this.rotation, s = this.textWidth && u(this.textWidth), t = [l, c, C.innerHTML, this.textWidth, this.textAlign].join(), o = void 0;
if (o = !1, s !== this.oldTextWidth) {
if (this.textPxLength)
var n = this.textPxLength;
else
R(C, { width: "", whiteSpace: i || "nowrap" }), n = C.offsetWidth;
(s > this.oldTextWidth || n > s) && (/[ \-]/.test(C.textContent || C.innerText) || C.style.textOverflow === "ellipsis") && (R(C, { width: n > s || l ? s + "px" : "auto", display: "block", whiteSpace: i || "normal" }), this.oldTextWidth = s, o = !0);
}
this.hasBoxWidthChanged = o, t !== this.cTT && (o = N.fontMetrics(C.style.fontSize, C).b, !S(l) || l === (this.oldRotation || 0) && c === this.oldAlign || this.setSpanRotation(l, p, o), this.getSpanCorrection(!S(l) && this.textPxLength || C.offsetWidth, o, p, l, c)), R(C, { left: v + (this.xCorr || 0) + "px", top: a + (this.yCorr || 0) + "px" }), this.cTT = t, this.oldRotation = l, this.oldAlign = c;
}
} else
this.alignOnAdd = !0;
}, O.prototype.setSpanRotation = function(N, C, b) {
var w = {}, v = U && !/Edge/.test(W.navigator.userAgent) ? "-ms-transform" : H ? "-webkit-transform" : F ? "MozTransform" : W.opera ? "-o-transform" : void 0;
v && (w[v] = w.transform = "rotate(" + N + "deg)", w[v + (F ? "Origin" : "-origin")] = w.transformOrigin = 100 * C + "% " + b + "px", R(this.element, w));
}, O.composedClasses = [], O;
}(B);
}), E(
h,
"Core/Renderer/HTML/HTMLRenderer.js",
[h["Core/Renderer/HTML/AST.js"], h["Core/Renderer/SVG/SVGElement.js"], h["Core/Renderer/SVG/SVGRenderer.js"], h["Core/Utilities.js"]],
function(y, B, I, Z) {
var F = this && this.__extends || function() {
var S = function(x, d) {
return S = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(u, P) {
u.__proto__ = P;
} || function(u, P) {
for (var O in P)
P.hasOwnProperty(O) && (u[O] = P[O]);
}, S(x, d);
};
return function(x, d) {
function u() {
this.constructor = x;
}
S(x, d), x.prototype = d === null ? Object.create(d) : (u.prototype = d.prototype, new u());
};
}(), U = Z.attr, H = Z.createElement, W = Z.extend, R = Z.pick;
return function(S) {
function x() {
return S !== null && S.apply(this, arguments) || this;
}
return F(x, S), x.compose = function(d) {
return x.composedClasses.indexOf(d) === -1 && (x.composedClasses.push(d), d.prototype.html = x.prototype.html), d;
}, x.prototype.html = function(d, u, P) {
var O = this.createElement("span"), N = O.element, C = O.renderer, b = C.isSVG, w = function(v, a) {
["opacity", "visibility"].forEach(function(c) {
v[c + "Setter"] = function(p, i, l) {
var s = v.div ? v.div.style : a;
B.prototype[c + "Setter"].call(this, p, i, l), s && (s[i] = p);
};
}), v.addedSetters = !0;
};
return O.textSetter = function(v) {
v !== this.textStr && (delete this.bBox, delete this.oldTextWidth, y.setElementHTML(this.element, R(v, "")), this.textStr = v, O.doTransform = !0);
}, b && w(O, O.element.style), O.xSetter = O.ySetter = O.alignSetter = O.rotationSetter = function(v, a) {
a === "align" ? O.alignValue = O.textAlign = v : O[a] = v, O.doTransform = !0;
}, O.afterSetters = function() {
this.doTransform && (this.htmlUpdateTransform(), this.doTransform = !1);
}, O.attr({ text: d, x: Math.round(u), y: Math.round(P) }).css({ position: "absolute" }), C.styledMode || O.css({ fontFamily: this.style.fontFamily, fontSize: this.style.fontSize }), N.style.whiteSpace = "nowrap", O.css = O.htmlCss, b && (O.add = function(v) {
var a = C.box.parentNode, c = [];
if (this.parentGroup = v) {
var p = v.div;
if (!p) {
for (; v; )
c.push(v), v = v.parentGroup;
c.reverse().forEach(function(i) {
function l(n, A) {
i[A] = n, A === "translateX" ? o.left = n + "px" : o.top = n + "px", i.doTransform = !0;
}
var s = U(i.element, "class"), t = i.styles || {};
p = i.div = i.div || H("div", s ? { className: s } : 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
}, p || a);
var o = p.style;
W(i, { classSetter: function(n) {
return function(A) {
this.element.setAttribute("class", A), n.className = A;
};
}(p), on: function() {
return c[0].div && O.on.apply({ element: c[0].div, onEvents: i.onEvents }, arguments), i;
}, translateXSetter: l, translateYSetter: l }), i.addedSetters || w(i);
});
}
} else
p = a;
return p.appendChild(N), O.added = !0, O.alignOnAdd && O.htmlUpdateTransform(), O;
}), O;
}, x.composedClasses = [], x;
}(I);
}
), E(h, "Core/Axis/AxisDefaults.js", [], function() {
var y;
return function(B) {
B.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" }, B.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 I = this.axis.chart.numberFormatter;
return I(this.total, -1);
},
style: { color: "#000000", fontSize: "11px", fontWeight: "bold", textOutline: "1px contrast" }
}, gridLineWidth: 1, lineWidth: 0 }, B.defaultLeftAxisOptions = { labels: { x: -15 }, title: { rotation: 270 } }, B.defaultRightAxisOptions = { labels: { x: 15 }, title: { rotation: 90 } }, B.defaultBottomAxisOptions = { labels: { autoRotation: [-45], x: 0 }, margin: 15, title: { rotation: 0 } }, B.defaultTopAxisOptions = { labels: { autoRotation: [-45], x: 0 }, margin: 15, title: { rotation: 0 } };
}(y || (y = {})), y;
}), E(h, "Core/Foundation.js", [h["Core/Utilities.js"]], function(y) {
var B = y.addEvent, I = y.isFunction, Z = y.objectEach, F = y.removeEvent, U;
return function(H) {
H.registerEventOptions = function(W, R) {
W.eventOptions = W.eventOptions || {}, Z(R.events, function(S, x) {
W.eventOptions[x] !== S && (W.eventOptions[x] && (F(W, x, W.eventOptions[x]), delete W.eventOptions[x]), I(S) && (W.eventOptions[x] = S, B(W, x, S)));
});
};
}(U || (U = {})), U;
}), E(
h,
"Core/Axis/Tick.js",
[h["Core/FormatUtilities.js"], h["Core/Globals.js"], h["Core/Utilities.js"]],
function(y, B, I) {
var Z = B.deg2rad, F = I.clamp, U = I.correctFloat, H = I.defined, W = I.destroyObjectProperties, R = I.extend, S = I.fireEvent, x = I.isNumber, d = I.merge, u = I.objectEach, P = I.pick;
return B = function() {
function O(N, C, b, w, v) {
this.isNewLabel = this.isNew = !0, this.axis = N, this.pos = C, this.type = b || "", this.parameters = v || {}, this.tickmarkOffset = this.parameters.tickmarkOffset, this.options = this.parameters.options, S(this, "init"), b || w || this.addLabel();
}
return O.prototype.addLabel = function() {
var N = this, C = N.axis, b = C.options, w = C.chart, v = C.categories, a = C.logarithmic, c = C.names, p = N.pos, i = P(N.options && N.options.labels, b.labels), l = C.tickPositions, s = p === l[0], t = p === l[l.length - 1], o = (!i.step || i.step === 1) && C.tickInterval === 1;
l = l.info;
var n = N.label, A;
if (v = this.parameters.category || (v ? P(v[p], c[p], p) : p), a && x(v) && (v = U(a.lin2log(v))), C.dateTime)
if (l)
var _ = w.time.resolveDTLFormat(b.dateTimeLabelFormats[!b.grid && l.higherRanks[p] || l.unitName]), D = _.main;
else
x(v) && (D = C.dateTime.getXDateFormat(v, b.dateTimeLabelFormats || {}));
N.isFirst = s, N.isLast = t;
var j = {
axis: C,
chart: w,
dateTimeLabelFormat: D,
isFirst: s,
isLast: t,
pos: p,
tick: N,
tickPositionInfo: l,
value: v
};
S(this, "labelFormat", j);
var T = function(g) {
return i.formatter ? i.formatter.call(g, g) : i.format ? (g.text = C.defaultLabelFormatter.call(g), y.format(i.format, g, w)) : C.defaultLabelFormatter.call(g, g);
};
b = T.call(j, j);
var X = _ && _.list;
N.shortenLabel = X ? function() {
for (A = 0; A < X.length; A++)
if (R(j, { dateTimeLabelFormat: X[A] }), n.attr({ text: T.call(j, j) }), n.getBBox().width < C.getSlotWidth(N) - 2 * i.padding)
return;
n.attr({ text: "" });
} : void 0, o && C._addedPlotLB && N.moveLabel(b, i), H(n) || N.movedLabel ? n && n.textStr !== b && !o && (!n.textWidth || i.style.width || n.styles.width || n.css({ width: null }), n.attr({ text: b }), n.textPxLength = n.getBBox().width) : (N.label = n = N.createLabel({ x: 0, y: 0 }, b, i), N.rotation = 0);
}, O.prototype.createLabel = function(N, C, b) {
var w = this.axis, v = w.chart;
return (N = H(C) && b.enabled ? v.renderer.text(C, N.x, N.y, b.useHTML).add(w.labelGroup) : null) && (v.styledMode || N.css(d(b.style)), N.textPxLength = N.getBBox().width), N;
}, O.prototype.destroy = function() {
W(
this,
this.axis
);
}, O.prototype.getPosition = function(N, C, b, w) {
var v = this.axis, a = v.chart, c = w && a.oldChartHeight || a.chartHeight;
return N = { x: N ? U(v.translate(C + b, null, null, w) + v.transB) : v.left + v.offset + (v.opposite ? (w && a.oldChartWidth || a.chartWidth) - v.right - v.left : 0), y: N ? c - v.bottom + v.offset - (v.opposite ? v.height : 0) : U(c - v.translate(C + b, null, null, w) - v.transB) }, N.y = F(N.y, -1e5, 1e5), S(this, "afterGetPosition", { pos: N }), N;
}, O.prototype.getLabelPosition = function(N, C, b, w, v, a, c, p) {
var i = this.axis, l = i.transA, s = i.isLinked && i.linkedParent ? i.linkedParent.reversed : i.reversed, t = i.staggerLines, o = i.tickRotCorr || { x: 0, y: 0 }, n = w || i.reserveSpaceDefault ? 0 : -i.labelOffset * (i.labelAlign === "center" ? 0.5 : 1), A = {}, _ = v.y;
return H(_) || (_ = i.side === 0 ? b.rotation ? -8 : -b.getBBox().height : i.side === 2 ? o.y + 8 : Math.cos(b.rotation * Z) * (o.y - b.getBBox(!1, 0).height / 2)), N = N + v.x + n + o.x - (a && w ? a * l * (s ? -1 : 1) : 0), C = C + _ - (a && !w ? a * l * (s ? 1 : -1) : 0), t && (b = c / (p || 1) % t, i.opposite && (b = t - b - 1), C += i.labelOffset / t * b), A.x = N, A.y = Math.round(C), S(this, "afterGetLabelPosition", { pos: A, tickmarkOffset: a, index: c }), A;
}, O.prototype.getLabelSize = function() {
return this.label ? this.label.getBBox()[this.axis.horiz ? "height" : "width"] : 0;
}, O.prototype.getMarkPath = function(N, C, b, w, v, a) {
return a.crispLine([["M", N, C], ["L", N + (v ? 0 : -b), C + (v ? b : 0)]], w);
}, O.prototype.handleOverflow = function(N) {
var C = this.axis, b = C.options.labels, w = N.x, v = C.chart.chartWidth, a = C.chart.spacing, c = P(C.labelLeft, Math.min(C.pos, a[3]));
a = P(C.labelRight, Math.max(C.isRadial ? 0 : C.pos + C.len, v - a[1]));
var p = this.label, i = this.rotation, l = { left: 0, center: 0.5, right: 1 }[C.labelAlign || p.attr("align")], s = p.getBBox().width, t = C.getSlotWidth(this), o = {}, n = t, A = 1, _;
i || b.overflow !== "justify" ? 0 > i && w - l * s < c ? _ = Math.round(w / Math.cos(i * Z) - c) : 0 < i && w + l * s > a && (_ = Math.round((v - w) / Math.cos(i * Z))) : (v = w + (1 - l) * s, w - l * s < c ? n = N.x + n * (1 - l) - c : v > a && (n = a - N.x + n * l, A = -1), n = Math.min(t, n), n < t && C.labelAlign === "center" && (N.x += A * (t - n - l * (t - Math.min(s, n)))), (s > n || C.autoRotation && (p.styles || {}).width) && (_ = n)), _ && (this.shortenLabel ? this.shortenLabel() : (o.width = Math.floor(_) + "px", (b.style || {}).textOverflow || (o.textOverflow = "ellipsis"), p.css(o)));
}, O.prototype.moveLabel = function(N, C) {
var b = this, w = b.label, v = b.axis, a = v.reversed, c = !1;
if (w && w.textStr === N ? (b.movedLabel = w, c = !0, delete b.label) : u(v.ticks, function(i) {
c || i.isNew || i === b || !i.label || i.label.textStr !== N || (b.movedLabel = i.label, c = !0, i.labelPos = b.movedLabel.xy, delete i.label);
}), !c && (b.labelPos || w)) {
var p = b.labelPos || w.xy;
w = v.horiz ? a ? 0 : v.width + v.left : p.x, v = v.horiz ? p.y : a ? v.width + v.left : 0, b.movedLabel = b.createLabel({ x: w, y: v }, N, C), b.movedLabel && b.movedLabel.attr({ opacity: 0 });
}
}, O.prototype.render = function(N, C, b) {
var w = this.axis, v = w.horiz, a = this.pos, c = P(this.tickmarkOffset, w.tickmarkOffset);
a = this.getPosition(v, a, c, C), c = a.x;
var p = a.y;
w = v && c === w.pos + w.len || !v && p === w.pos ? -1 : 1, v = P(b, this.label && this.label.newOpacity, 1), b = P(b, 1), this.isActive = !0, this.renderGridLine(C, b, w), this.renderMark(a, b, w), this.renderLabel(a, C, v, N), this.isNew = !1, S(this, "afterRender");
}, O.prototype.renderGridLine = function(N, C, b) {
var w = this.axis, v = w.options, a = {}, c = this.pos, p = this.type, i = P(
this.tickmarkOffset,
w.tickmarkOffset
), l = w.chart.renderer, s = this.gridLine, t = v.gridLineWidth, o = v.gridLineColor, n = v.gridLineDashStyle;
this.type === "minor" && (t = v.minorGridLineWidth, o = v.minorGridLineColor, n = v.minorGridLineDashStyle), s || (w.chart.styledMode || (a.stroke = o, a["stroke-width"] = t || 0, a.dashstyle = n), p || (a.zIndex = 1), N && (C = 0), this.gridLine = s = l.path().attr(a).addClass("highcharts-" + (p ? p + "-" : "") + "grid-line").add(w.gridGroup)), s && (b = w.getPlotLinePath({ value: c + i, lineWidth: s.strokeWidth() * b, force: "pass", old: N })) && s[N || this.isNew ? "attr" : "animate"]({ d: b, opacity: C });
}, O.prototype.renderMark = function(N, C, b) {
var w = this.axis, v = w.options, a = w.chart.renderer, c = this.type, p = w.tickSize(c ? c + "Tick" : "tick"), i = N.x;
N = N.y;
var l = P(v[c !== "minor" ? "tickWidth" : "minorTickWidth"], !c && w.isXAxis ? 1 : 0);
v = v[c !== "minor" ? "tickColor" : "minorTickColor"];
var s = this.mark, t = !s;
p && (w.opposite && (p[0] = -p[0]), s || (this.mark = s = a.path().addClass("highcharts-" + (c ? c + "-" : "") + "tick").add(w.axisGroup), w.chart.styledMode || s.attr({ stroke: v, "stroke-width": l })), s[t ? "attr" : "animate"]({ d: this.getMarkPath(
i,
N,
p[0],
s.strokeWidth() * b,
w.horiz,
a
), opacity: C }));
}, O.prototype.renderLabel = function(N, C, b, w) {
var v = this.axis, a = v.horiz, c = v.options, p = this.label, i = c.labels, l = i.step;
v = P(this.tickmarkOffset, v.tickmarkOffset);
var s = N.x;
N = N.y;
var t = !0;
p && x(s) && (p.xy = N = this.getLabelPosition(s, N, p, a, i, v, w, l), this.isFirst && !this.isLast && !c.showFirstLabel || this.isLast && !this.isFirst && !c.showLastLabel ? t = !1 : !a || i.step || i.rotation || C || b === 0 || this.handleOverflow(N), l && w % l && (t = !1), t && x(N.y) ? (N.opacity = b, p[this.isNewLabel ? "attr" : "animate"](N), this.isNewLabel = !1) : (p.attr("y", -9999), this.isNewLabel = !0));
}, O.prototype.replaceMovedLabel = function() {
var N = this.label, C = this.axis, b = C.reversed;
if (N && !this.isNew) {
var w = C.horiz ? b ? C.left : C.width + C.left : N.xy.x;
b = C.horiz ? N.xy.y : b ? C.width + C.top : C.top, N.animate({ x: w, y: b, opacity: 0 }, void 0, N.destroy), delete this.label;
}
C.isDirty = !0, this.label = this.movedLabel, delete this.movedLabel;
}, O;
}(), B;
}
), E(h, "Core/Axis/Axis.js", [
h["Core/Animation/AnimationUtilities.js"],
h["Core/Axis/AxisDefaults.js"],
h["Core/Color/Color.js"],
h["Core/DefaultOptions.js"],
h["Core/Foundation.js"],
h["Core/Globals.js"],
h["Core/Axis/Tick.js"],
h["Core/Utilities.js"]
], function(y, B, I, Z, F, U, H, W) {
var R = y.animObject, S = Z.defaultOptions, x = F.registerEventOptions, d = U.deg2rad, u = W.arrayMax, P = W.arrayMin, O = W.clamp, N = W.correctFloat, C = W.defined, b = W.destroyObjectProperties, w = W.erase, v = W.error, a = W.extend, c = W.fireEvent, p = W.getMagnitude, i = W.isArray, l = W.isNumber, s = W.isString, t = W.merge, o = W.normalizeTickInterval, n = W.objectEach, A = W.pick, _ = W.relativeLength, D = W.removeEvent, j = W.splat, T = W.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 = A(m.opposite, this.opposite), this.side = A(m.side, this.side, this.horiz ? this.opposite ? 0 : 2 : this.opposite ? 1 : 3), this.setOptions(m);
var Y = this.options, V = Y.labels, Q = Y.type;
this.userOptions = m, this.minPixelPadding = 0, this.reversed = A(Y.reversed, this.reversed), this.visible = Y.visible, this.zoomEnabled = Y.zoomEnabled, this.hasNames = Q === "category" || Y.categories === !0, this.categories = Y.categories || this.hasNames, this.names || (this.names = [], this.names.keys = {}), this.plotLinesAndBandsGroups = {}, this.positiveValuesOnly = !!this.logarithmic, this.isLinked = C(Y.linkedTo), this.ticks = {}, this.labelEdge = [], this.minorTicks = {}, this.plotLinesAndBands = [], this.alternateBands = {}, this.len = 0, this.minRange = this.userMinRange = Y.minRange || Y.maxZoom, this.range = Y.range, this.offset = Y.offset || 0, this.min = this.max = null, m = A(Y.crosshair, j(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 = l(V.rotation) ? V.rotation : void 0, x(this, Y), c(this, "afterInit");
}, X.prototype.setOptions = function(g) {
this.options = t(B.defaultXAxisOptions, this.coll === "yAxis" && B.defaultYAxisOptions, [B.defaultTopAxisOptions, B.defaultRightAxisOptions, B.defaultBottomAxisOptions, B.defaultLeftAxisOptions][this.side], t(S[this.coll], g)), c(this, "afterSetOptions", { userOptions: g });
}, X.prototype.defaultLabelFormatter = function(g) {
var m = this.axis;
g = this.chart.numberFormatter;
var L = l(this.value) ? this.value : NaN, Y = m.chart.time, V = this.dateTimeLabelFormat, Q = S.lang, k = Q.numericSymbols;
Q = Q.numericSymbolMagnitude || 1e3;
var G = m.logarithmic ? Math.abs(L) : m.tickInterval, z = k && k.length;
if (m.categories)
var $ = "" + this.value;
else if (V)
$ = Y.dateFormat(V, L);
else if (z && 1e3 <= G)
for (; z-- && typeof $ > "u"; )
m = Math.pow(Q, z + 1), G >= m && 10 * L % m === 0 && k[z] !== null && L !== 0 && ($ = g(L / m, -1) + k[z]);
return typeof $ > "u" && ($ = 1e4 <= Math.abs(L) ? g(L, -1) : g(L, -1, void 0, "")), $;
}, 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(Y) {
if (Y.visible || !m.options.chart.ignoreHiddenSeries) {
var V = Y.options, Q = V.threshold;
if (g.hasVisibleSeries = !0, g.positiveValuesOnly && 0 >= Q && (Q = null), g.isXAxis) {
if (V = Y.xData, V.length) {
V = g.logarithmic ? V.filter(g.validatePositiveValue) : V, L = Y.getXExtremes(V);
var k = L.min, G = L.max;
l(k) || k instanceof Date || (V = V.filter(l), L = Y.getXExtremes(V), k = L.min, G = L.max), V.length && (g.dataMin = Math.min(A(g.dataMin, k), k), g.dataMax = Math.max(A(g.dataMax, G), G));
}
} else
Y = Y.applyExtremes(), l(Y.dataMin) && (k = Y.dataMin, g.dataMin = Math.min(A(g.dataMin, k), k)), l(Y.dataMax) && (G = Y.dataMax, g.dataMax = Math.max(A(g.dataMax, G), G)), C(Q) && (g.threshold = Q), (!V.softThreshold || g.positiveValuesOnly) && (g.softThreshold = !1);
}
});
}), c(this, "afterGetSeriesExtremes");
}, X.prototype.translate = function(g, m, L, Y, V, Q) {
var k = this.linkedParent || this, G = Y && k.old ? k.old.min : k.min, z = k.minPixelPadding;
V = (k.isOrdinal || k.brokenAxis && k.brokenAxis.hasBreaks || k.logarithmic && V) && k.lin2val;
var $ = 1, q = 0;
return Y = Y && k.old ? k.old.transA : k.transA, Y || (Y = k.transA), L && ($ *= -1, q = k.len), k.reversed && ($ *= -1, q -= $ * (k.sector || k.len)), m ? (g = (g * $ + q - z) / Y + G, V && (g = k.lin2val(g))) : (V && (g = k.val2lin(g)), g = l(G) ? $ * (g - G) * Y + q + $ * z + (l(Q) ? Y * 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) : lt = !0), at;
}
var L = this, Y = L.chart, V = L.left, Q = L.top, k = g.old, G = g.value, z = g.lineWidth, $ = k && Y.oldChartHeight || Y.chartHeight, q = k && Y.oldChartWidth || Y.chartWidth, it = L.transB, et = g.translatedValue, nt = g.force, rt, ct, gt, dt, lt;
return g = {
value: G,
lineWidth: z,
old: k,
force: nt,
acrossPanes: g.acrossPanes,
translatedValue: et
}, c(this, "getPlotLinePath", g, function(at) {
et = A(et, L.translate(G, null, null, k)), et = O(et, -1e5, 1e5), rt = gt = Math.round(et + it), ct = dt = Math.round($ - et - it), l(et) ? L.horiz ? (ct = Q, dt = $ - L.bottom, rt = gt = m(rt, V, V + L.width)) : (rt = V, gt = q - L.right, ct = dt = m(ct, Q, Q + L.height)) : (lt = !0, nt = !1), at.path = lt && !nt ? null : Y.renderer.crispLine([["M", rt, ct], ["L", gt, dt]], z || 1);
}), g.path;
}, X.prototype.getLinearTickPositions = function(g, m, L) {
var Y = N(Math.floor(m / g) * g);
L = N(Math.ceil(L / g) * g);
var V = [], Q;
if (N(Y + g) === Y && (Q = 20), this.single)
return [m];
for (m = Y; m <= L && (V.push(m), m = N(m + g, Q), m !== k); )
var k = m;
return V;
}, X.prototype.getMinorTickInterval = function() {
var g = this.options;
return g.minorTicks === !0 ? A(g.minorTickInterval, "auto") : g.minorTicks === !1 ? null : g.minorTickInterval;
}, X.prototype.getMinorTickPositions = function() {
var g = this.options, m = this.tickPositions, L = this.minorTickInterval, Y = this.pointRangePadding || 0, V = this.min - Y;
Y = this.max + Y;
var Q = Y - V, k = [];
if (Q && Q / L < this.len / 3) {
var G = this.logarithmic;
if (G)
this.paddedTicks.forEach(function(z, $, q) {
$ && k.push.apply(
k,
G.getLogTickPositions(L, q[$ - 1], q[$], !0)
);
});
else if (this.dateTime && this.getMinorTickInterval() === "auto")
k = k.concat(this.getTimeTicks(this.dateTime.normalizeTimeTickInterval(L), V, Y, g.startOfWeek));
else
for (g = V + (m[0] - V) % L; g <= Y && g !== k[0]; g += L)
k.push(g);
}
return k.length !== 0 && this.trimTicks(k), k;
}, X.prototype.adjustForMinRange = function() {
var g = this.options, m = this.logarithmic, L = this.min, Y = this.max, V = 0, Q, k, G, z;
if (this.isXAxis && typeof this.minRange > "u" && !m && (C(g.min) || C(g.max) || C(g.floor) || C(g.ceiling) ? this.minRange = null : (this.series.forEach(function(et) {
if (G = et.xData, z = et.xIncrement ? 1 : G.length - 1, 1 < G.length)
for (Q = z; 0 < Q; Q--)
k = G[Q] - G[Q - 1], (!V || k < V) && (V = k);
}), this.minRange = Math.min(5 * V, this.dataMax - this.dataMin))), Y - L < this.minRange) {
var $ = this.dataMax - this.dataMin >= this.minRange, q = this.minRange, it = (q - Y + L) / 2;
it = [L - it, A(g.min, L - it)], $ && (it[2] = this.logarithmic ? this.logarithmic.log2lin(this.dataMin) : this.dataMin), L = u(it), Y = [L + q, A(g.max, L + q)], $ && (Y[2] = m ? m.log2lin(this.dataMax) : this.dataMax), Y = P(Y), Y - L < q && (it[0] = Y - q, it[1] = A(g.min, Y - q), L = u(it));
}
this.min = L, this.max = Y;
}, X.prototype.getClosest = function() {
var g;
return this.categories ? g = 1 : this.series.forEach(function(m) {
var L = m.closestPointRange, Y = m.visible || !m.chart.options.chart.ignoreHiddenSeries;
!m.noSharedTooltip && C(L) && Y && (g = C(g) ? Math.min(g, L) : L);
}), g;
}, X.prototype.nameToX = function(g) {
var m = i(this.categories), L = m ? this.categories : this.names, Y = g.options.x;
if (g.series.requireSorting = !1, C(Y) || (Y = this.options.uniqueNames ? m ? L.indexOf(g.name) : A(L.keys[g.name], -1) : g.series.autoIncrement()), Y === -1) {
if (!m)
var V = L.length;
} else
V = Y;
return typeof V < "u" && (this.names[V] = g.name, this.names.keys[g.name] = V), V;
}, 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(Y, V) {
if (Y && Y.options && typeof Y.name < "u") {
var Q = g.nameToX(Y);
typeof Q < "u" && Q !== Y.x && (Y.x = Q, L.xData[V] = Q);
}
});
}));
}, X.prototype.setAxisTranslation = function() {
var g = this, m = g.max - g.min, L = g.linkedParent, Y = !!g.categories, V = g.isXAxis, Q = g.axisPointRange || 0, k = 0, G = 0, z = g.transA;
if (V || Y || Q) {
var $ = g.getClosest();
L ? (k = L.minPointOffset, G = L.pointRangePadding) : g.series.forEach(function(q) {
var it = Y ? 1 : V ? A(q.options.pointRange, $, 0) : g.axisPointRange || 0, et = q.options.pointPlacement;
Q = Math.max(Q, it), (!g.single || Y) && (q = q.is("xrange") ? !V : V, k = Math.max(k, q && s(et) ? 0 : it / 2), G = Math.max(G, q && et === "on" ? 0 : it));
}), L = g.ordinal && g.ordinal.slope && $ ? g.ordinal.slope / $ : 1, g.minPointOffset = k *= L, g.pointRangePadding = G *= L, g.pointRange = Math.min(Q, g.single && Y ? 1 : m), V && (g.closestPointRange = $);
}
g.translationSlope = g.transA = z = g.staticScale || g.len / (m + G || 1), g.transB = g.horiz ? g.left : g.bottom, g.minPixelPadding = z * k, c(this, "afterSetAxisTranslation");
}, X.prototype.minFromRange = function() {
return this.max - this.range;
}, X.prototype.setTickInterval = function(g) {
var m = this.chart, L = this.logarithmic, Y = this.options, V = this.isXAxis, Q = this.isLinked, k = Y.tickPixelInterval, G = this.categories, z = this.softThreshold, $ = Y.maxPadding, q = Y.minPadding, it = l(Y.tickInterval) && 0 <= Y.tickInterval ? Y.tickInterval : void 0, et = l(this.threshold) ? this.threshold : null;
this.dateTime || G || Q || this.getTickAmount();
var nt = A(this.userMin, Y.min), rt = A(this.userMax, Y.max);
if (Q) {
this.linkedParent = m[this.coll][Y.linkedTo];
var ct = this.linkedParent.getExtremes();
this.min = A(ct.min, ct.dataMin), this.max = A(ct.max, ct.dataMax), Y.type !== this.linkedParent.options.type && v(11, 1, m);
} else {
if (z && C(et)) {
if (this.dataMin >= et)
ct = et, q = 0;
else if (this.dataMax <= et) {
var gt = et;
$ = 0;
}
}
this.min = A(nt, ct, this.dataMin), this.max = A(rt, gt, this.dataMax);
}
if (L && (this.positiveValuesOnly && !g && 0 >= Math.min(this.min, A(this.dataMin, this.min)) && v(10, 1, m), this.min = N(L.log2lin(this.min), 16), this.max = N(L.log2lin(this.max), 16)), this.range && C(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(), !(G || this.axisPointRange || this.stacking && this.stacking.usePercentage || Q) && C(this.min) && C(this.max) && (m = this.max - this.min) && (!C(nt) && q && (this.min -= m * q), !C(rt) && $ && (this.max += m * $)), l(this.userMin) || (l(Y.softMin) && Y.softMin < this.min && (this.min = nt = Y.softMin), l(Y.floor) && (this.min = Math.max(this.min, Y.floor))), l(this.userMax) || (l(Y.softMax) && Y.softMax > this.max && (this.max = rt = Y.softMax), l(Y.ceiling) && (this.max = Math.min(this.max, Y.ceiling))), z && C(this.dataMin) && (et = et || 0, !C(nt) && this.min < et && this.dataMin >= et ? this.min = this.options.minRange ? Math.min(et, this.max - this.minRange) : et : !C(rt) && this.max > et && this.dataMax <= et && (this.max = this.options.minRange ? Math.max(et, this.min + this.minRange) : et)), l(this.min) && l(this.max) && !this.chart.polar && this.min > this.max && (C(this.options.min) ? this.max = this.min : C(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 && k === this.linkedParent.options.tickPixelInterval ? it = this.linkedParent.tickInterval : A(it, this.tickAmount ? (this.max - this.min) / Math.max(this.tickAmount - 1, 1) : void 0, G ? 1 : (this.max - this.min) * k / Math.max(this.len, k)), V && !g) {
var dt = this.min !== (this.old && this.old.min) || this.max !== (this.old && this.old.max);
this.series.forEach(function(lt) {
lt.forceCrop = lt.forceCropping && lt.forceCropping(), lt.processData(dt);
}), c(this, "postProcessData", { hasExtemesChanged: dt });
}
this.setAxisTranslation(), c(this, "initialAxisTranslation"), this.pointRange && !it && (this.tickInterval = Math.max(this.pointRange, this.tickInterval)), g = A(Y.minTickInterval, this.dateTime && !this.series.some(function(lt) {
return lt.noSharedTooltip;
}) ? this.closestPointRange : 0), !it && this.tickInterval < g && (this.tickInterval = g), this.dateTime || this.logarithmic || it || (this.tickInterval = o(this.tickInterval, void 0, p(this.tickInterval), A(Y.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(), Y = this.hasVerticalPanning(), V = this.coll === "colorAxis", Q = (V || !Y) && g.startOnTick;
Y = (V || !Y) && g.endOnTick, V = 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 && C(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, V && (V = V.apply(this, [this.min, this.max]))) && (this.tickPositions = L = V), this.paddedTicks = L.slice(0), this.trimTicks(L, Q, Y), this.isLinked || (this.single && 2 > L.length && !this.categories && !this.series.some(function(k) {
return k.is("heatmap") && k.options.pointPlacement === "between";
}) && (this.min -= 0.5, this.max += 0.5), m || V || this.adjustTickAmount()), c(this, "afterSetTickPositions");
}, X.prototype.trimTicks = function(g, m, L) {
var Y = g[0], V = g[g.length - 1], Q = !this.isOrdinal && this.minPointOffset || 0;
if (c(this, "trimTicks"), !this.isLinked) {
if (m && Y !== -1 / 0)
this.min = Y;
else
for (; this.min - Q > g[0]; )
g.shift();
if (L)
this.max = V;
else
for (; this.max + Q < g[g.length - 1]; )
g.pop();
g.length === 0 && C(Y) && !this.options.tickPositions && g.push((V + Y) / 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(Y) {
var V = Y.options;
V = [Y.horiz ? V.left : V.top, V.width, V.height, V.pane].join(), Y.series.length && (g[V] ? L = !0 : g[V] = 1);
}), L;
}, X.prototype.getTickAmount = function() {
var g = this.options, m = g.tickPixelInterval, L = g.tickAmount;
!C(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, Y = this.tickAmount, V = this.finalTickAmt, Q = L && L.length, k = A(this.threshold, this.softThreshold ? 0 : null);
if (this.hasData() && l(this.min) && l(this.max)) {
if (Q < Y) {
for (; L.length < Y; )
L.length % 2 || this.min === k ? L.push(N(L[L.length - 1] + m)) : L.unshift(N(L[0] - m));
this.transA *= (Q - 1) / (Y - 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 > Y && (this.tickInterval *= 2, this.setTickPositions());
if (C(V)) {
for (m = g = L.length; m--; )
(V === 3 && m % 2 === 1 || 2 >= V && 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(Y) {
g = g || Y.isDirtyData || Y.isDirty, m = m || Y.xAxis && Y.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, Y, V) {
var Q = this, k = Q.chart;
L = A(L, !0), Q.series.forEach(function(G) {
delete G.kdTree;
}), V = a(V, { min: g, max: m }), c(Q, "setExtremes", V, function() {
Q.userMin = g, Q.userMax = m, Q.eventArgs = V, L && k.redraw(Y);
});
}, X.prototype.zoom = function(g, m) {
var L = this, Y = this.dataMin, V = this.dataMax, Q = this.options, k = Math.min(Y, A(Q.min, Y)), G = Math.max(V, A(Q.max, V));
return g = { newMin: g, newMax: m }, c(this, "zoom", g, function(z) {
var $ = z.newMin, q = z.newMax;
($ !== L.min || q !== L.max) && (L.allowZoomOutside || (C(Y) && ($ < k && ($ = k), $ > G && ($ = G)), C(V) && (q < k && (q = k), q > G && (q = G))), L.displayBtn = typeof $ < "u" || typeof q < "u", L.setExtremes($, q, !1, void 0, { trigger: "zoom" })), z.zoomed = !0;
}), g.zoomed;
}, X.prototype.setAxisSize = function() {
var g = this.chart, m = this.options, L = m.offsets || [0, 0, 0, 0], Y = this.horiz, V = this.width = Math.round(_(A(m.width, g.plotWidth - L[3] + L[1]), g.plotWidth)), Q = this.height = Math.round(_(A(m.height, g.plotHeight - L[0] + L[2]), g.plotHeight)), k = this.top = Math.round(_(A(m.top, g.plotTop + L[0]), g.plotHeight, g.plotTop));
m = this.left = Math.round(_(A(m.left, g.plotLeft + L[3]), g.plotWidth, g.plotLeft)), this.bottom = g.chartHeight - Q - k, this.right = g.chartWidth - V - m, this.len = Math.max(Y ? V : Q, 0), this.pos = Y ? m : k;
}, X.prototype.getExtremes = function() {
var g = this.logarithmic;
return { min: g ? N(g.lin2log(this.min)) : this.min, max: g ? N(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 = (A(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 = A(m[g === "tick" ? "tickWidth" : "minorTickWidth"], g === "tick" && this.isXAxis && !this.categories ? 1 : 0), Y = m[g === "tick" ? "tickLength" : "minorTickLength"];
if (L && Y) {
m[g + "Position"] === "inside" && (Y = -Y);
var V = [Y, L];
}
return g = { tickSize: V }, 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, Y = this.len / (((this.categories ? 1 : 0) + this.max - this.min) / L), V = g.rotation, Q = this.labelMetrics(), k = Math.max(this.max - this.min, 0), G = function(nt) {
var rt = nt / (Y || 1);
return rt = 1 < rt ? Math.ceil(rt) : 1, rt * L > k && nt !== 1 / 0 && Y !== 1 / 0 && k && (rt = Math.ceil(k / L)), N(rt * L);
}, z = L, $, q, it = Number.MAX_VALUE;
if (m) {
if (!g.staggerLines && !g.step)
if (l(V))
var et = [V];
else
Y < g.autoRotationLimit && (et = g.autoRotation);
et && et.forEach(function(nt) {
if (nt === V || nt && -90 <= nt && 90 >= nt) {
q = G(Math.abs(Q.h / Math.sin(d * nt)));
var rt = q + Math.abs(nt / 360);
rt < it && (it = rt, $ = nt, z = q);
}
});
} else
g.step || (z = G(Q.h));
return this.autoRotation = et, this.labelRotation = A($, l(V) ? V : 0), z;
}, X.prototype.getSlotWidth = function(g) {
var m = this.chart, L = this.horiz, Y = this.options.labels, V = Math.max(this.tickPositions.length - (this.categories ? 0 : 1), 1), Q = m.margin[3];
if (g && l(g.slotWidth))
return g.slotWidth;
if (L && 2 > Y.step)
return Y.rotation ? 0 : (this.staggerLines || 1) * this.len / V;
if (!L) {
if (g = Y.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, Y = this.ticks, V = this.options.labels, Q = V.style, k = this.horiz, G = this.getSlotWidth(), z = Math.max(1, Math.round(G - 2 * V.padding)), $ = {}, q = this.labelMetrics(), it = Q.textOverflow, et = 0;
if (s(V.rotation) || ($.rotation = V.rotation || 0), L.forEach(function(gt) {
gt = Y[gt], gt.movedLabel && gt.replaceMovedLabel(), gt && gt.label && gt.label.textPxLength > et && (et = gt.label.textPxLength);
}), this.maxLabelLength = et, this.autoRotation)
et > z && et > q.h ? $.rotation = this.labelRotation : this.labelRotation = 0;
else if (G) {
var nt = z;
if (!it) {
var rt = "clip";
for (z = L.length; !k && z--; ) {
var ct = L[z];
(ct = Y[ct].label) && (ct.styles && ct.styles.textOverflow === "ellipsis" ? ct.css({ textOverflow: "clip" }) : ct.textPxLength > G && ct.css({ width: G + "px" }), ct.getBBox().height > this.len / L.length - (q.h - q.f) && (ct.specificTextOverflow = "ellipsis"));
}
}
}
$.rotation && (nt = et > 0.5 * g.chartHeight ? 0.33 * g.chartHeight : et, it || (rt = "ellipsis")), (this.labelAlign = V.align || this.autoLabelAlign(this.labelRotation)) && ($.align = this.labelAlign), L.forEach(function(gt) {
var dt = (gt = Y[gt]) && gt.label, lt = Q.width, at = {};
dt && (dt.attr($), gt.shortenLabel ? gt.shortenLabel() : nt && !lt && 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 && !lt && dt.css({ width: null }), delete dt.specificTextOverflow, gt.rotation = $.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 && C(this.min) && C(this.max);
}, X.prototype.addTitle = function(g) {
var m = this.chart.renderer, L = this.horiz, Y = this.opposite, V = this.options.title, Q = this.chart.styledMode, k;
this.axisTitle || ((k = V.textAlign) || (k = (L ? { low: "left", middle: "center", high: "right" } : { low: Y ? "right" : "left", middle: "center", high: Y ? "left" : "right" })[V.align]), this.axisTitle = m.text(V.text || "", 0, 0, V.useHTML).attr({ zIndex: 7, rotation: V.rotation, align: k }).addClass("highcharts-axis-title"), Q || this.axisTitle.css(t(V.style)), this.axisTitle.add(this.axisGroup), this.axisTitle.isNew = !0), Q || V.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 H(this, g);
}, X.prototype.getOffset = function() {
var g = this, m = this, L = m.chart, Y = m.horiz, V = m.options, Q = m.side, k = m.ticks, G = m.tickPositions, z = m.coll, $ = m.axisParent, q = L.renderer, it = L.inverted && !m.isZAxis ? [1, 0, 3, 2][Q] : Q, et = m.hasData(), nt = V.title, rt = V.labels, ct = L.axisOffset;
L = L.clipOffset;
var gt = [
-1,
1,
1,
-1
][Q], dt = V.className, lt, at = 0, J = 0, tt = 0;
if (m.showAxis = lt = et || V.showEmpty, m.staggerLines = m.horiz && rt.staggerLines || void 0, !m.axisGroup) {
var st = function(pt, yt, vt) {
return q.g(pt).attr({ zIndex: vt }).addClass("highcharts-" + z.toLowerCase() + yt + " " + (g.isRadial ? "highcharts-radial-axis" + yt + " " : "") + (dt || "")).add($);
};
m.gridGroup = st("grid", "-grid", V.gridZIndex), m.axisGroup = st("axis", "", V.zIndex), m.labelGroup = st("axis-labels", "-labels", rt.zIndex);
}
if (et || m.isLinked ? (G.forEach(function(pt) {
m.generateTick(pt);
}), m.renderUnsquish(), m.reserveSpaceDefault = Q === 0 || Q === 2 || { 1: "left", 3: "right" }[Q] === m.labelAlign, A(rt.reserveSpace, m.labelAlign === "center" ? !0 : null, m.reserveSpaceDefault) && G.forEach(function(pt) {
tt = Math.max(k[pt].getLabelSize(), tt);
}), m.staggerLines && (tt *= m.staggerLines), m.labelOffset = tt * (m.opposite ? -1 : 1)) : n(k, function(pt, yt) {
pt.destroy(), delete k[yt];
}), nt && nt.text && nt.enabled !== !1 && (m.addTitle(lt), lt && nt.reserveSpace !== !1)) {
m.titleOffset = at = m.axisTitle.getBBox()[Y ? "height" : "width"];
var ht = nt.offset;
J = C(ht) ? 0 : A(nt.margin, Y ? 5 : 10);
}
m.renderLine(), m.offset = gt * A(
V.offset,
ct[Q] ? ct[Q] + (V.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 * (Y ? A(rt.y, m.tickRotCorr.y + 8 * gt) : rt.x)), m.axisTitleMargin = A(ht, et), m.getMaxLabelDimensions && (m.maxLabelDimensions = m.getMaxLabelDimensions(k, G)), z !== "colorAxis" && (Y = this.tickSize("tick"), ct[Q] = Math.max(ct[Q], (m.axisTitleMargin || 0) + at + gt * m.offset, et, G && G.length && Y ? Y[0] + gt * m.offset : 0), V = !m.axisLine || V.offset ? 0 : 2 * Math.floor(m.axisLine.strokeWidth() / 2), L[it] = Math.max(
L[it],
V
)), c(this, "afterGetOffset");
}, X.prototype.getLinePath = function(g) {
var m = this.chart, L = this.opposite, Y = this.offset, V = this.horiz, Q = this.left + (L ? this.width : 0) + Y;
return Y = m.chartHeight - this.bottom - (L ? this.height : 0) + Y, L && (g *= -1), m.renderer.crispLine([["M", V ? this.left : Q, V ? Y : this.top], ["L", V ? m.chartWidth - this.right : Q, V ? Y : 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, Y = this.len, V = this.options.title, Q = g ? m : L, k = this.opposite, G = this.offset, z = V.x, $ = V.y, q = this.axisTitle, it = this.chart.renderer.fontMetrics(V.style.fontSize, q);
return q = Math.max(q.getBBox(null, 0).height - it.h - 1, 0), Y = { low: Q + (g ? 0 : Y), middle: Q + Y / 2, high: Q + (g ? Y : 0) }[V.align], m = (g ? L + this.height : m) + (g ? 1 : -1) * (k ? -1 : 1) * this.axisTitleMargin + [
-q,
q,
it.f,
-q
][this.side], g = { x: g ? Y + z : m + (k ? this.width : 0) + G + z, y: g ? m + $ - (k ? this.height : 0) + G : Y + $ }, c(this, "afterGetTitlePosition", { titlePosition: g }), g;
}, X.prototype.renderMinorTick = function(g, m) {
var L = this.minorTicks;
L[g] || (L[g] = new H(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 Y = this.ticks;
(!this.isLinked || g >= this.min && g <= this.max || this.grid && this.grid.isColumn) && (Y[g] || (Y[g] = new H(this, g)), L && Y[g].isNew && Y[g].render(m, !0, -1), Y[g].render(m));
}, X.prototype.render = function() {
var g = this, m = g.chart, L = g.logarithmic, Y = g.options, V = g.isLinked, Q = g.tickPositions, k = g.axisTitle, G = g.ticks, z = g.minorTicks, $ = g.alternateBands, q = Y.stackLabels, it = Y.alternateGridColor, et = g.tickmarkOffset, nt = g.axisLine, rt = g.showAxis, ct = R(m.renderer.globalAnimation), gt, dt;
if (g.labelEdge.length = 0, g.overlap = !1, [G, z, $].forEach(function(at) {
n(at, function(J) {
J.isActive = !1;
});
}), g.hasData() || V) {
var lt = g.chart.hasRendered && g.old && l(g.old.min);
g.minorTickInterval && !g.categories && g.getMinorTickPositions().forEach(function(at) {
g.renderMinorTick(
at,
lt
);
}), Q.length && (Q.forEach(function(at, J) {
g.renderTick(at, J, lt);
}), et && (g.min === 0 || g.single) && (G[-1] || (G[-1] = new H(g, -1, null, !0)), G[-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) && ($[at] || ($[at] = new U.PlotLineOrBand(g)), gt = at + et, $[at].options = { from: L ? L.lin2log(gt) : gt, to: L ? L.lin2log(dt) : dt, color: it, className: "highcharts-alternate-grid" }, $[at].render(), $[at].isActive = !0);
}), g._addedPlotLB || (g._addedPlotLB = !0, (Y.plotLines || []).concat(Y.plotBands || []).forEach(function(at) {
g.addPlotBandOrLine(at);
}));
}
[G, z, $].forEach(function(at) {
var J = [], tt = ct.duration;
n(at, function(st, ht) {
st.isActive || (st.render(ht, !1, 0), st.isActive = !1, J.push(ht));
}), T(function() {
for (var st = J.length; st--; )
at[J[st]] && !at[J[st]].isActive && (at[J[st]].destroy(), delete at[J[st]]);
}, at !== $ && m.hasRendered && tt ? tt : 0);
}), nt && (nt[nt.isPlaced ? "animate" : "attr"]({ d: this.getLinePath(nt.strokeWidth()) }), nt.isPlaced = !0, nt[rt ? "show" : "hide"](rt)), k && rt && (Y = g.getTitlePosition(), l(Y.y) ? (k[k.isNew ? "attr" : "animate"](Y), k.isNew = !1) : (k.attr(
"y",
-9999
), k.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, Y = this.eventOptions;
if (c(this, "destroy", { keepEvents: g }), g || D(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 V in m.plotLinesAndBandsGroups)
m.plotLinesAndBandsGroups[V] = m.plotLinesAndBandsGroups[V].destroy();
n(m, function(Q, k) {
m.getKeepProps().indexOf(k) === -1 && delete m[k];
}), this.eventOptions = Y;
}, X.prototype.drawCrosshair = function(g, m) {
var L = this.crosshair, Y = A(L && L.snap, !0), V = this.chart, Q, k = this.cross;
if (c(this, "drawCrosshair", { e: g, point: m }), g || (g = this.cross && this.cross.e), L && (C(m) || !Y) !== !1) {
if (Y ? C(m) && (Q = A(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), C(Q)) {
var G = { value: m && (this.isXAxis ? m.x : A(m.stackY, m.y)), translatedValue: Q };
V.polar && a(G, { isCrosshair: !0, chartX: g && g.chartX, chartY: g && g.chartY, point: m }), G = this.getPlotLinePath(G) || null;
}
if (!C(G)) {
this.hideCrosshair();
return;
}
Y = this.categories && !this.isRadial, k || (this.cross = k = V.renderer.path().addClass("highcharts-crosshair highcharts-crosshair-" + (Y ? "category " : "thin ") + (L.className || "")).attr({ zIndex: A(L.zIndex, 2) }).add(), V.styledMode || (k.attr({ stroke: L.color || (Y ? I.parse("#ccd6eb").setOpacity(0.25).get() : "#cccccc"), "stroke-width": A(L.width, 1) }).css({ "pointer-events": "none" }), L.dashStyle && k.attr({ dashstyle: L.dashStyle }))), k.show().attr({ d: G }), Y && !L.width && k.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 l(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, A(m, !0) && L.redraw();
}, X.prototype.remove = function(g) {
for (var m = this.chart, L = this.coll, Y = this.series, V = Y.length; V--; )
Y[V] && Y[V].remove(!1);
w(m.axes, this), w(m[L], this), m[L].forEach(function(Q, k) {
Q.options.index = Q.userOptions.index = k;
}), this.destroy(), m.isDirtyBox = !0, A(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 = B.defaultXAxisOptions, X.keepProps = "extKey hcEvents names series userMax userMin".split(" "), X;
}(), y;
}), E(h, "Core/Axis/DateTimeAxis.js", [h["Core/Utilities.js"]], function(y) {
var B = y.addEvent, I = y.getMagnitude, Z = y.normalizeTickInterval, F = y.timeUnits, U;
return function(H) {
function W() {
return this.chart.time.getTimeTicks.apply(this.chart.time, arguments);
}
function R(d) {
d.userOptions.type !== "datetime" ? this.dateTime = void 0 : this.dateTime || (this.dateTime = new x(this));
}
var S = [];
H.compose = function(d) {
return S.indexOf(d) === -1 && (S.push(d), d.keepProps.push("dateTime"), d.prototype.getTimeTicks = W, B(
d,
"init",
R
)), d;
};
var x = function() {
function d(u) {
this.axis = u;
}
return d.prototype.normalizeTimeTickInterval = function(u, P) {
var O = P || [["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]];
P = O[O.length - 1];
var N = F[P[0]], C = P[1], b;
for (b = 0; b < O.length && (P = O[b], N = F[P[0]], C = P[1], !(O[b + 1] && u <= (N * C[C.length - 1] + F[O[b + 1][0]]) / 2)); b++)
;
return N === F.year && u < 5 * N && (C = [1, 2, 5]), u = Z(u / N, C, P[0] === "year" ? Math.max(I(u / N), 1) : 1), { unitRange: N, count: u, unitName: P[0] };
}, d.prototype.getXDateFormat = function(u, P) {
var O = this.axis;
return O.closestPointRange ? O.chart.time.getDateFormat(O.closestPointRange, u, O.options.startOfWeek, P) || P.year : P.day;
}, d;
}();
H.Additions = x;
}(U || (U = {})), U;
}), E(h, "Core/Axis/LogarithmicAxis.js", [h["Core/Utilities.js"]], function(y) {
var B = y.addEvent, I = y.getMagnitude, Z = y.normalizeTickInterval, F = y.pick, U;
return function(H) {
function W(d) {
var u = this.logarithmic;
d.userOptions.type !== "logarithmic" ? this.logarithmic = void 0 : u || (this.logarithmic = new x(this));
}
function R() {
var d = this.logarithmic;
d && (this.lin2val = function(u) {
return d.lin2log(u);
}, this.val2lin = function(u) {
return d.log2lin(u);
});
}
var S = [];
H.compose = function(d) {
return S.indexOf(d) === -1 && (S.push(d), d.keepProps.push("logarithmic"), B(d, "init", W), B(d, "afterInit", R)), d;
};
var x = function() {
function d(u) {
this.axis = u;
}
return d.prototype.getLogTickPositions = function(u, P, O, N) {
var C = this.axis, b = C.len, w = C.options, v = [];
if (N || (this.minorAutoInterval = void 0), 0.5 <= u)
u = Math.round(u), v = C.getLinearTickPositions(u, P, O);
else if (0.08 <= u) {
var a = Math.floor(P), c, p = w = void 0;
for (b = 0.3 < u ? [1, 2, 4] : 0.15 < u ? [1, 2, 4, 6, 8] : [1, 2, 3, 4, 5, 6, 7, 8, 9]; a < O + 1 && !p; a++) {
var i = b.length;
for (c = 0; c < i && !p; c++) {
var l = this.log2lin(this.lin2log(a) * b[c]);
l > P && (!N || w <= O) && typeof w < "u" && v.push(w), w > O && (p = !0), w = l;
}
}
} else
P = this.lin2log(P), O = this.lin2log(O), u = N ? C.getMinorTickInterval() : w.tickInterval, u = F(u === "auto" ? null : u, this.minorAutoInterval, w.tickPixelInterval / (N ? 5 : 1) * (O - P) / ((N ? b / C.tickPositions.length : b) || 1)), u = Z(u, void 0, I(u)), v = C.getLinearTickPositions(u, P, O).map(this.log2lin), N || (this.minorAutoInterval = u / 5);
return N || (C.tickInterval = u), v;
}, d.prototype.lin2log = function(u) {
return Math.pow(10, u);
}, d.prototype.log2lin = function(u) {
return Math.log(u) / Math.LN10;
}, d;
}();
H.Additions = x;
}(U || (U = {})), U;
}), E(h, "Core/Axis/PlotLineOrBand/PlotLineOrBandAxis.js", [h["Core/Utilities.js"]], function(y) {
var B = y.erase, I = y.extend, Z = y.isNumber, F;
return function(U) {
var H = [], W;
U.compose = function(S, x) {
return W || (W = S), H.indexOf(x) === -1 && (H.push(x), I(x.prototype, R.prototype)), x;
};
var R = function() {
function S() {
}
return S.prototype.getPlotBandPath = function(x, d, u) {
u === void 0 && (u = this.options);
var P = this.getPlotLinePath({ value: d, force: !0, acrossPanes: u.acrossPanes }), O = [], N = this.horiz;
if (d = !Z(this.min) || !Z(this.max) || x < this.min && d < this.min || x > this.max && d > this.max, x = this.getPlotLinePath({ value: x, force: !0, acrossPanes: u.acrossPanes }), u = 1, x && P) {
if (d) {
var C = x.toString() === P.toString();
u = 0;
}
for (d = 0; d < x.length; d += 2) {
var b = x[d], w = x[d + 1], v = P[d], a = P[d + 1];
b[0] !== "M" && b[0] !== "L" || w[0] !== "M" && w[0] !== "L" || v[0] !== "M" && v[0] !== "L" || a[0] !== "M" && a[0] !== "L" || (N && v[1] === b[1] ? (v[1] += u, a[1] += u) : N || v[2] !== b[2] || (v[2] += u, a[2] += u), O.push(["M", b[1], b[2]], ["L", w[1], w[2]], ["L", a[1], a[2]], ["L", v[1], v[2]], ["Z"])), O.isFlat = C;
}
}
return O;
}, S.prototype.addPlotBand = function(x) {
return this.addPlotBandOrLine(x, "plotBands");
}, S.prototype.addPlotLine = function(x) {
return this.addPlotBandOrLine(x, "plotLines");
}, S.prototype.addPlotBandOrLine = function(x, d) {
var u = this, P = this.userOptions, O = new W(this, x);
if (this.visible && (O = O.render()), O) {
if (this._addedPlotLB || (this._addedPlotLB = !0, (P.plotLines || []).concat(P.plotBands || []).forEach(function(C) {
u.addPlotBandOrLine(C);
})), d) {
var N = P[d] || [];
N.push(x), P[d] = N;
}
this.plotLinesAndBands.push(O);
}
return O;
}, S.prototype.removePlotBandOrLine = function(x) {
var d = this.plotLinesAndBands, u = this.options, P = this.userOptions;
if (d) {
for (var O = d.length; O--; )
d[O].id === x && d[O].destroy();
[u.plotLines || [], P.plotLines || [], u.plotBands || [], P.plotBands || []].forEach(function(N) {
for (O = N.length; O--; )
(N[O] || {}).id === x && B(N, N[O]);
});
}
}, S.prototype.removePlotBand = function(x) {
this.removePlotBandOrLine(x);
}, S.prototype.removePlotLine = function(x) {
this.removePlotBandOrLine(x);
}, S;
}();
}(F || (F = {})), F;
}), E(h, "Core/Axis/PlotLineOrBand/PlotLineOrBand.js", [h["Core/Axis/PlotLineOrBand/PlotLineOrBandAxis.js"], h["Core/Utilities.js"]], function(y, B) {
var I = B.arrayMax, Z = B.arrayMin, F = B.defined, U = B.destroyObjectProperties, H = B.erase, W = B.fireEvent, R = B.merge, S = B.objectEach, x = B.pick;
return B = function() {
function d(u, P) {
this.axis = u, P && (this.options = P, this.id = P.id);
}
return d.compose = function(u) {
return y.compose(d, u);
}, d.prototype.render = function() {
W(this, "render");
var u = this, P = u.axis, O = P.horiz, N = P.logarithmic, C = u.options, b = C.color, w = x(C.zIndex, 0), v = C.events, a = {}, c = P.chart.renderer, p = C.label, i = u.label, l = C.to, s = C.from, t = C.value, o = u.svgElem, n = [], A = F(s) && F(l);
n = F(t);
var _ = !o, D = { class: "highcharts-plot-" + (A ? "band " : "line ") + (C.className || "") }, j = A ? "bands" : "lines";
if (N && (s = N.log2lin(s), l = N.log2lin(l), t = N.log2lin(t)), P.chart.styledMode || (n ? (D.stroke = b || "#999999", D["stroke-width"] = x(C.width, 1), C.dashStyle && (D.dashstyle = C.dashStyle)) : A && (D.fill = b || "#e6ebf5", C.borderWidth && (D.stroke = C.borderColor, D["stroke-width"] = C.borderWidth))), a.zIndex = w, j += "-" + w, (N = P.plotLinesAndBandsGroups[j]) || (P.plotLinesAndBandsGroups[j] = N = c.g("plot-" + j).attr(a).add()), _ && (u.svgElem = o = c.path().attr(D).add(N)), n)
n = P.getPlotLinePath({ value: t, lineWidth: o.strokeWidth(), acrossPanes: C.acrossPanes });
else if (A)
n = P.getPlotBandPath(
s,
l,
C
);
else
return;
return !u.eventsAdded && v && (S(v, function(T, X) {
o.on(X, function(g) {
v[X].apply(u, [g]);
});
}), u.eventsAdded = !0), (_ || !o.d) && n && n.length ? o.attr({ d: n }) : o && (n ? (o.show(!0), o.animate({ d: n })) : o.d && (o.hide(), i && (u.label = i = i.destroy()))), p && (F(p.text) || F(p.formatter)) && n && n.length && 0 < P.width && 0 < P.height && !n.isFlat ? (p = R({ align: O && A && "center", x: O ? !A && 4 : 10, verticalAlign: !O && A && "middle", y: O ? A ? 16 : 10 : A ? 6 : -4, rotation: O && !A && 90 }, p), this.renderLabel(p, n, A, w)) : i && i.hide(), u;
}, d.prototype.renderLabel = function(u, P, O, N) {
var C = this.axis, b = C.chart.renderer, w = this.label;
w || (this.label = w = b.text(this.getLabelText(u), 0, 0, u.useHTML).attr({ align: u.textAlign || u.align, rotation: u.rotation, class: "highcharts-plot-" + (O ? "band" : "line") + "-label " + (u.className || ""), zIndex: N }).add(), C.chart.styledMode || w.css(R({ textOverflow: "ellipsis" }, u.style))), N = P.xBounds || [P[0][1], P[1][1], O ? P[2][1] : P[0][1]], P = P.yBounds || [P[0][2], P[1][2], O ? P[2][2] : P[0][2]], O = Z(N), b = Z(P), w.align(u, !1, { x: O, y: b, width: I(N) - O, height: I(P) - b }), w.alignValue && w.alignValue !== "left" || w.css({ width: (w.rotation === 90 ? C.height - (w.alignAttr.y - C.top) : C.width - (w.alignAttr.x - C.left)) + "px" }), w.show(!0);
}, d.prototype.getLabelText = function(u) {
return F(u.formatter) ? u.formatter.call(this) : u.text;
}, d.prototype.destroy = function() {
H(this.axis.plotLinesAndBands, this), delete this.axis, U(this);
}, d;
}(), B;
}), E(
h,
"Core/Tooltip.js",
[h["Core/FormatUtilities.js"], h["Core/Globals.js"], h["Core/Renderer/RendererUtilities.js"], h["Core/Renderer/RendererRegistry.js"], h["Core/Utilities.js"]],
function(y, B, I, Z, F) {
var U = y.format, H = B.doc, W = I.distribute, R = F.addEvent, S = F.clamp, x = F.css, d = F.defined, u = F.discardElement, P = F.extend, O = F.fireEvent, N = F.isArray, C = F.isNumber, b = F.isString, w = F.merge, v = F.pick, a = F.splat, c = F.syncTimeout;
return y = function() {
function p(i, l) {
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, l);
}
return p.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" } }] }]
});
}, p.prototype.bodyFormatter = function(i) {
return i.map(function(l) {
var s = l.series.tooltipOptions;
return (s[(l.point.formatPrefix || "point") + "Formatter"] || l.point.tooltipFormatter).call(l.point, s[(l.point.formatPrefix || "point") + "Format"] || "");
});
}, p.prototype.cleanSplit = function(i) {
this.chart.series.forEach(function(l) {
var s = l && l.tt;
s && (!s.isActive || i ? l.tt = s.destroy() : s.isActive = !1);
});
}, p.prototype.defaultFormatter = function(i) {
var l = this.points || a(this), s = [i.tooltipFooterHeaderFormatter(l[0])];
return s = s.concat(i.bodyFormatter(l)), s.push(i.tooltipFooterHeaderFormatter(l[0], !0)), s;
}, p.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(), u(this.container)), F.clearTimeout(this.hideTimer), F.clearTimeout(this.tooltipTimeout);
}, p.prototype.getAnchor = function(i, l) {
var s = this.chart, t = s.pointer, o = s.inverted, n = s.plotTop, A = s.plotLeft, _, D, j = 0, T = 0;
return i = a(i), this.followPointer && l ? (typeof l.chartX > "u" && (l = t.normalize(l)), t = [l.chartX - A, l.chartY - n]) : i[0].tooltipPos ? t = i[0].tooltipPos : (i.forEach(function(X) {
_ = X.series.yAxis, D = X.series.xAxis, j += X.plotX || 0, T += X.plotLow ? (X.plotLow + (X.plotHigh || 0)) / 2 : X.plotY || 0, D && _ && (o ? (j += n + s.plotHeight - D.len - D.pos, T += A + s.plotWidth - _.len - _.pos) : (j += D.pos - A, T += _.pos - n));
}), j /= i.length, T /= i.length, t = [o ? s.plotWidth - T : j, o ? s.plotHeight - j : T], this.shared && 1 < i.length && l && (o ? t[0] = l.chartX - A : t[1] = l.chartY - n)), t.map(Math.round);
}, p.prototype.getLabel = function() {
var i = this, l = this.chart.styledMode, s = this.options, t = this.split && this.allowShared, o = "tooltip" + (d(s.className) ? " " + s.className : ""), n = s.style.pointerEvents || (!this.followPointer && s.stickOnContact ? "auto" : "none"), A = function() {
i.inContact = !0;
}, _ = function(Y) {
var V = i.chart.hoverSeries;
i.inContact = i.shouldStickOnContact() && i.chart.pointer.inClass(Y.relatedTarget, "highcharts-tooltip"), !i.inContact && V && V.onMouseOut && V.onMouseOut();
}, D, j = this.chart.renderer;
if (i.label) {
var T = !i.label.hasClass("highcharts-label");
(t && !T || !t && T) && i.destroy();
}
if (!this.label) {
if (this.outside) {
T = this.chart.options.chart.style;
var X = Z.getRendererType();
this.container = D = B.doc.createElement("div"), D.className = "highcharts-tooltip-container", x(D, { position: "absolute", top: "1px", pointerEvents: n, zIndex: Math.max(this.options.style.zIndex || 0, (T && T.zIndex || 0) + 3) }), R(D, "mouseenter", A), R(D, "mouseleave", _), B.doc.body.appendChild(D), this.renderer = j = new X(D, 0, 0, T, void 0, void 0, j.styledMode);
}
if (t ? this.label = j.g(o) : (this.label = j.label("", 0, 0, s.shape, void 0, void 0, s.useHTML, void 0, o).attr({ padding: s.padding, r: s.borderRadius }), l || this.label.attr({
fill: s.backgroundColor,
"stroke-width": s.borderWidth
}).css(s.style).css({ pointerEvents: n }).shadow(s.shadow)), l && s.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(Y) {
m.call(g, i.distance), D.style.left = Y + "px";
}, g.ySetter = function(Y) {
L.call(g, i.distance), D.style.top = Y + "px";
};
}
this.label.on("mouseenter", A).on("mouseleave", _).attr({ zIndex: 8 }).add();
}
return this.label;
}, p.prototype.getPosition = function(i, l, s) {
var t = this.chart, o = this.distance, n = {}, A = t.inverted && s.h || 0, _ = this.outside, D = _ ? H.documentElement.clientWidth - 2 * o : t.chartWidth, j = _ ? Math.max(H.body.scrollHeight, H.documentElement.scrollHeight, H.body.offsetHeight, H.documentElement.offsetHeight, H.documentElement.clientHeight) : t.chartHeight, T = t.pointer.getChartPosition(), X = function(z) {
var $ = z === "x";
return [z, $ ? D : j, $ ? i : l].concat(_ ? [$ ? i * T.scaleX : l * T.scaleY, $ ? T.left - o + (s.plotX + t.plotLeft) * T.scaleX : T.top - o + (s.plotY + t.plotTop) * T.scaleY, 0, $ ? D : j] : [$ ? i : l, $ ? s.plotX + t.plotLeft : s.plotY + t.plotTop, $ ? t.plotLeft : t.plotTop, $ ? t.plotLeft + t.plotWidth : t.plotTop + t.plotHeight]);
}, g = X("y"), m = X("x"), L;
X = !!s.negative, !t.polar && t.hoverSeries && t.hoverSeries.yAxis && t.hoverSeries.yAxis.reversed && (X = !X);
var Y = !this.followPointer && v(s.ttBelow, !t.inverted === X), V = function(z, $, q, it, et, nt, rt) {
var ct = _ ? z === "y" ? o * T.scaleY : o * T.scaleX : o, gt = (q - it) / 2, dt = it < et - o, lt = et + o + it < $, at = et - ct - q + gt;
if (et = et + ct - gt, Y && lt)
n[z] = et;
else if (!Y && dt)
n[z] = at;
else if (dt)
n[z] = Math.min(rt - it, 0 > at - A ? at : at - A);
else if (lt)
n[z] = Math.max(nt, et + A + q > $ ? et : et + A);
else
return !1;
}, Q = function(z, $, q, it, et) {
var nt;
return et < o || et > $ - o ? nt = !1 : n[z] = et < q / 2 ? 1 : et > $ - it / 2 ? $ - it - 2 : et - q / 2, nt;
}, k = function(z) {
var $ = g;
g = m, m = $, L = z;
}, G = function() {
V.apply(0, g) !== !1 ? Q.apply(0, m) !== !1 || L || (k(!0), G()) : L ? n.x = n.y = 0 : (k(!0), G());
};
return (t.inverted || 1 < this.len) && k(), G(), n;
}, p.prototype.hide = function(i) {
var l = this;
F.clearTimeout(this.hideTimer), i = v(i, this.options.hideDelay), this.isHidden || (this.hideTimer = c(function() {
l.getLabel().fadeOut(i && void 0), l.isHidden = !0;
}, i));
}, p.prototype.init = function(i, l) {
this.chart = i, this.options = l, this.crosshairs = [], this.now = { x: 0, y: 0 }, this.isHidden = !0, this.split = l.split && !i.inverted && !i.polar, this.shared = l.shared || this.split, this.outside = v(l.outside, !(!i.scrollablePixelsX && !i.scrollablePixelsY));
}, p.prototype.shouldStickOnContact = function() {
return !(this.followPointer || !this.options.stickOnContact);
}, p.prototype.isStickyOnContact = function() {
return !(!this.shouldStickOnContact() || !this.inContact);
}, p.prototype.move = function(i, l, s, t) {
var o = this, n = o.now, A = o.options.animation !== !1 && !o.isHidden && (1 < Math.abs(i - n.x) || 1 < Math.abs(l - n.y)), _ = o.followPointer || 1 < o.len;
P(n, { x: A ? (2 * n.x + i) / 3 : i, y: A ? (n.y + l) / 2 : l, anchorX: _ ? void 0 : A ? (2 * n.anchorX + s) / 3 : s, anchorY: _ ? void 0 : A ? (n.anchorY + t) / 2 : t }), o.getLabel().attr(n), o.drawTracker(), A && (F.clearTimeout(this.tooltipTimeout), this.tooltipTimeout = setTimeout(function() {
o && o.move(i, l, s, t);
}, 32));
}, p.prototype.refresh = function(i, l) {
var s = this.chart, t = this.options, o = a(i), n = o[0], A = [], _ = t.formatter || this.defaultFormatter, D = this.shared, j = s.styledMode, T = {};
if (t.enabled) {
F.clearTimeout(this.hideTimer), this.allowShared = !(!N(i) && i.series && i.series.noSharedTooltip), this.followPointer = !this.split && n.series.tooltipOptions.followPointer, i = this.getAnchor(i, l);
var X = i[0], g = i[1];
if (D && this.allowShared ? (s.pointer.applyInactiveState(o), o.forEach(function(Y) {
Y.setState("hover"), A.push(Y.getLabelConfig());
}), T = { x: n.category, y: n.y }, T.points = A) : T = n.getLabelConfig(), this.len = A.length, _ = _.call(T, this), D = n.series, this.distance = v(D.tooltipOptions.distance, 16), _ === !1)
this.hide();
else {
if (this.split && this.allowShared)
this.renderSplit(
_,
o
);
else {
var m = X, L = g;
if (l && s.pointer.isDirectTouch && (m = l.chartX - s.plotLeft, L = l.chartY - s.plotTop), s.polar || D.options.clip === !1 || o.some(function(Y) {
return Y.series.shouldShowTooltip(m, L);
}))
l = this.getLabel(), t.style.width && !j || l.css({ width: this.chart.spacingBox.width + "px" }), l.attr({ text: _ && _.join ? _.join("") : _ }), l.removeClass(/highcharts-color-[\d]+/g).addClass("highcharts-color-" + v(n.colorIndex, D.colorIndex)), j || l.attr({ stroke: t.borderColor || n.color || D.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");
}
}, p.prototype.renderSplit = function(i, l) {
function s(lt, at, J, tt, st) {
return st === void 0 && (st = !0), J ? (at = it ? 0 : ct, lt = S(lt - tt / 2, z.left, z.right - tt - (t.outside ? et : 0))) : (at -= nt, lt = st ? lt - tt - Q : lt + Q, lt = S(lt, st ? lt : z.left, z.right)), { x: lt, y: at };
}
var t = this, o = t.chart, n = t.chart, A = n.chartWidth, _ = n.chartHeight, D = n.plotHeight, j = n.plotLeft, T = 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 Y = L.scrollLeft;
L = L.scrollTop;
var V = n.styledMode, Q = t.distance, k = t.options, G = t.options.positioner, z = t.outside && typeof m != "number" ? H.documentElement.getBoundingClientRect() : { left: Y, right: Y + A, top: L, bottom: L + _ }, $ = t.getLabel(), q = this.renderer || o.renderer, it = !(!o.xAxis[0] || !o.xAxis[0].opposite);
o = X.getChartPosition();
var et = o.left;
o = o.top;
var nt = T + L, rt = 0, ct = D - g;
b(i) && (i = [!1, i]), i = i.slice(0, l.length + 1).reduce(function(lt, at, J) {
if (at !== !1 && at !== "") {
J = l[J - 1] || { isHeader: !0, plotX: l[0].plotX, plotY: D, series: {} };
var tt = J.isHeader, st = tt ? t : J.series;
at = at.toString();
var ht = st.tt, pt = J.isHeader, yt = J.series, vt = "highcharts-color-" + v(J.colorIndex, yt.colorIndex, "none");
if (ht || (ht = { padding: k.padding, r: k.borderRadius }, V || (ht.fill = k.backgroundColor, ht["stroke-width"] = k.borderWidth), ht = q.label("", 0, 0, k[pt ? "headerShape" : "shape"], void 0, void 0, k.useHTML).addClass((pt ? "highcharts-tooltip-header " : "") + "highcharts-tooltip-box " + vt).attr(ht).add($)), ht.isActive = !0, ht.attr({ text: at }), V || ht.css(k.style).shadow(k.shadow).attr({ stroke: k.borderColor || J.color || yt.color || "#333333" }), st = st.tt = ht, pt = st.getBBox(), at = pt.width + st.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, ht = J.series, J.isHeader) {
yt = j + yt;
var Ct = T + D / 2;
} else {
var Pt = ht.xAxis, kt = ht.yAxis;
yt = Pt.pos + S(yt, -Q, Pt.len + Q), ht.shouldShowTooltip(0, kt.pos - T + vt, { ignoreX: !0 }) && (Ct = kt.pos + vt);
}
yt = S(yt, z.left - Q, z.right + Q), typeof Ct == "number" ? (pt = pt.height + 1, vt = G ? G.call(t, at, pt, J) : s(
yt,
Ct,
tt,
at
), lt.push({ align: G ? 0 : void 0, anchorX: yt, anchorY: Ct, boxWidth: at, point: J, rank: v(vt.rank, tt ? 1 : 0), size: pt, target: vt.y, tt: st, x: vt.x })) : st.isActive = !1;
}
return lt;
}, []), !G && i.some(function(lt) {
var at = (t.outside ? et : 0) + lt.anchorX;
return at < z.left && at + lt.boxWidth < z.right ? !0 : at < et - z.left + lt.boxWidth && z.right - at > at;
}) && (i = i.map(function(lt) {
var at = s(lt.anchorX, lt.anchorY, lt.point.isHeader, lt.boxWidth, !1);
return P(lt, { target: at.y, x: at.x });
})), t.cleanSplit(), W(i, ct);
var gt = et, dt = et;
i.forEach(function(lt) {
var at = lt.x, J = lt.boxWidth;
lt = lt.isHeader, lt || (t.outside && et + at < gt && (gt = et + at), !lt && t.outside && gt + J > dt && (dt = et + at));
}), i.forEach(function(lt) {
var at = lt.x, J = lt.anchorX, tt = lt.pos, st = lt.point.isHeader;
if (tt = { visibility: typeof tt > "u" ? "hidden" : "inherit", x: at, y: tt + nt, anchorX: J, anchorY: lt.anchorY }, t.outside && at < J) {
var ht = et - gt;
0 < ht && (st || (tt.x = at + ht, tt.anchorX = J + ht), st && (tt.x = (dt - gt) / 2, tt.anchorX = J + ht));
}
lt.tt.attr(tt);
}), i = t.container, g = t.renderer, t.outside && i && g && (n = $.getBBox(), g.setSize(n.width + n.x, n.height + n.y, !1), i.style.left = gt + "px", i.style.top = o + "px");
}, p.prototype.drawTracker = function() {
if (this.followPointer || !this.options.stickOnContact)
this.tracker && this.tracker.destroy();
else {
var i = this.chart, l = this.label, s = this.shared ? i.hoverPoints : i.hoverPoint;
if (l && s) {
var t = { x: 0, y: 0, width: 0, height: 0 };
s = this.getAnchor(s);
var o = l.getBBox();
s[0] += i.plotLeft - l.translateX, s[1] += i.plotTop - l.translateY, t.x = Math.min(0, s[0]), t.y = Math.min(0, s[1]), t.width = 0 > s[0] ? Math.max(Math.abs(s[0]), o.width - s[0]) : Math.max(Math.abs(s[0]), o.width), t.height = 0 > s[1] ? Math.max(Math.abs(s[1]), o.height - Math.abs(s[1])) : Math.max(Math.abs(s[1]), o.height), this.tracker ? this.tracker.attr(t) : (this.tracker = l.renderer.rect(t).addClass("highcharts-tracker").add(l), i.styledMode || this.tracker.attr({ fill: "rgba(0,0,0,0)" }));
}
}
}, p.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}"');
}, p.prototype.tooltipFooterHeaderFormatter = function(i, l) {
var s = i.series, t = s.tooltipOptions, o = s.xAxis, n = o && o.dateTime;
o = {
isFooter: l,
labelConfig: i
};
var A = t.xDateFormat, _ = t[l ? "footerFormat" : "headerFormat"];
return O(this, "headerFormatter", o, function(D) {
n && !A && C(i.key) && (A = n.getXDateFormat(i.key, t.dateTimeLabelFormats)), n && A && (i.point && i.point.tooltipDateKeys || ["key"]).forEach(function(j) {
_ = _.replace("{point." + j + "}", "{point." + j + ":" + A + "}");
}), s.chart.styledMode && (_ = this.styledModeFormat(_)), D.text = U(_, { point: i, series: s }, this.chart);
}), o.text;
}, p.prototype.update = function(i) {
this.destroy(), w(!0, this.chart.options.tooltip.userOptions, i), this.init(this.chart, w(!0, this.options, i));
}, p.prototype.updatePosition = function(i) {
var l = this.chart, s = this.options, t = l.pointer, o = this.getLabel();
t = t.getChartPosition();
var n = (s.positioner || this.getPosition).call(this, o.width, o.height, i), A = i.plotX + l.plotLeft;
i = i.plotY + l.plotTop, this.outside && (s = s.borderWidth + 2 * this.distance, this.renderer.setSize(o.width + s, o.height + s, !1), (t.scaleX !== 1 || t.scaleY !== 1) && (x(this.container, { transform: "scale(" + t.scaleX + ", " + t.scaleY + ")" }), A *= t.scaleX, i *= t.scaleY), A += t.left - n.x, i += t.top - n.y), this.move(Math.round(n.x), Math.round(n.y || 0), A, i);
}, p;
}(), y;
}
), E(h, "Core/Series/Point.js", [h["Core/Renderer/HTML/AST.js"], h["Core/Animation/AnimationUtilities.js"], h["Core/DefaultOptions.js"], h["Core/FormatUtilities.js"], h["Core/Utilities.js"]], function(y, B, I, Z, F) {
var U = B.animObject, H = I.defaultOptions, W = Z.format, R = F.addEvent, S = F.defined, x = F.erase, d = F.extend, u = F.fireEvent, P = F.getNestedProperty, O = F.isArray, N = F.isFunction, C = F.isNumber, b = F.isObject, w = F.merge, v = F.objectEach, a = F.pick, c = F.syncTimeout, p = F.removeEvent, i = F.uniqueKey;
return B = function() {
function l() {
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 l.prototype.animateBeforeDestroy = function() {
var s = this, t = { x: s.startXPos, opacity: 0 }, o = s.getGraphicalProps();
o.singular.forEach(function(n) {
s[n] = s[n].animate(n === "dataLabel" ? {
x: s[n].startXPos,
y: s[n].startYPos,
opacity: 0
} : t);
}), o.plural.forEach(function(n) {
s[n].forEach(function(A) {
A.element && A.animate(d({ x: s.startXPos }, A.startYPos ? { x: A.startXPos, y: A.startYPos } : {}));
});
});
}, l.prototype.applyOptions = function(s, t) {
var o = this.series, n = o.options.pointValKey || o.pointValKey;
return s = l.prototype.optionsToObject.call(this, s), d(this, s), this.options = this.options ? d(this.options, s) : s, s.group && delete this.group, s.dataLabels && delete this.dataLabels, n && (this.y = l.prototype.getNestedProperty.call(this, n)), this.formatPrefix = (this.isNull = a(this.isValid && !this.isValid(), this.x === null || !C(this.y))) ? "null" : "point", this.selected && (this.state = "select"), "name" in this && typeof t > "u" && o.xAxis && o.xAxis.hasNames && (this.x = o.xAxis.nameToX(this)), typeof this.x > "u" && o ? this.x = typeof t > "u" ? o.autoIncrement() : t : C(s.x) && o.options.relativeXValue && (this.x = o.autoIncrement(s.x)), this;
}, l.prototype.destroy = function() {
function s() {
(t.graphic || t.dataLabel || t.dataLabels) && (p(t), t.destroyElements());
for (D in t)
t[D] = null;
}
var t = this, o = t.series, n = o.chart;
o = o.options.dataSorting;
var A = n.hoverPoints, _ = U(t.series.chart.renderer.globalAnimation), D;
t.legendItem && n.legend.destroyItem(t), A && (t.setState(), x(A, t), A.length || (n.hoverPoints = null)), t === n.hoverPoint && t.onMouseOut(), o && o.enabled ? (this.animateBeforeDestroy(), c(s, _.duration)) : s(), n.pointCount--;
}, l.prototype.destroyElements = function(s) {
var t = this;
s = t.getGraphicalProps(s), s.singular.forEach(function(o) {
t[o] = t[o].destroy();
}), s.plural.forEach(function(o) {
t[o].forEach(function(n) {
n.element && n.destroy();
}), delete t[o];
});
}, l.prototype.firePointEvent = function(s, t, o) {
var n = this, A = this.series.options;
(A.point.events[s] || n.options && n.options.events && n.options.events[s]) && n.importEvents(), s === "click" && A.allowPointSelect && (o = function(_) {
n.select && n.select(null, _.ctrlKey || _.metaKey || _.shiftKey);
}), u(n, s, t, o);
}, l.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", "") : "");
}, l.prototype.getGraphicalProps = function(s) {
var t = this, o = [], n = { singular: [], plural: [] }, A;
for (s = s || { graphic: 1, dataLabel: 1 }, s.graphic && o.push("graphic", "upperGraphic", "shadowGroup"), s.dataLabel && o.push("dataLabel", "dataLabelUpper", "connector"), A = o.length; A--; ) {
var _ = o[A];
t[_] && n.singular.push(_);
}
return ["dataLabel", "connector"].forEach(function(D) {
var j = D + "s";
s[D] && t[j] && n.plural.push(j);
}), n;
}, l.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 };
}, l.prototype.getNestedProperty = function(s) {
if (s)
return s.indexOf("custom.") === 0 ? P(s, this.options) : this[s];
}, l.prototype.getZone = function() {
var s = this.series, t = s.zones;
s = s.zoneAxis || "y";
var o, n = 0;
for (o = t[n]; this[s] >= o.value; )
o = t[++n];
return this.nonZonedColor || (this.nonZonedColor = this.color), this.color = o && o.color && !this.options.color ? o.color : this.nonZonedColor, o;
}, l.prototype.hasNewShapeType = function() {
return (this.graphic && (this.graphic.symbolName || this.graphic.element.nodeName)) !== this.shapeType;
}, l.prototype.init = function(s, t, o) {
return this.series = s, this.applyOptions(t, o), this.id = S(this.id) ? this.id : i(), this.resolveColor(), s.chart.pointCount++, u(this, "afterInit"), this;
}, l.prototype.optionsToObject = function(s) {
var t = this.series, o = t.options.keys, n = o || t.pointArrayMap || ["y"], A = n.length, _ = {}, D = 0, j = 0;
if (C(s) || s === null)
_[n[0]] = s;
else if (O(s))
for (!o && s.length > A && (t = typeof s[0], t === "string" ? _.name = s[0] : t === "number" && (_.x = s[0]), D++); j < A; )
o && typeof s[D] > "u" || (0 < n[j].indexOf(".") ? l.prototype.setNestedProperty(_, s[D], n[j]) : _[n[j]] = s[D]), D++, j++;
else
typeof s == "object" && (_ = s, s.dataLabels && (t._hasPointLabels = !0), s.marker && (t._hasPointMarkers = !0));
return _;
}, l.prototype.resolveColor = function() {
var s = this.series, t = s.chart.styledMode, o = s.chart.options.chart.colorCount;
if (delete this.nonZonedColor, s.options.colorByPoint) {
if (!t) {
o = s.options.colors || s.chart.options.colors;
var n = o[s.colorCounter];
o = o.length;
}
t = s.colorCounter, s.colorCounter++, s.colorCounter === o && (s.colorCounter = 0);
} else
t || (n = s.color), t = s.colorIndex;
this.colorIndex = a(this.options.colorIndex, t), this.color = a(this.options.color, n);
}, l.prototype.setNestedProperty = function(s, t, o) {
return o.split(".").reduce(function(n, A, _, D) {
return n[A] = D.length - 1 === _ ? t : b(n[A], !0) ? n[A] : {}, n[A];
}, s), s;
}, l.prototype.tooltipFormatter = function(s) {
var t = this.series, o = t.tooltipOptions, n = a(o.valueDecimals, ""), A = o.valuePrefix || "", _ = o.valueSuffix || "";
return t.chart.styledMode && (s = t.chart.tooltip.styledModeFormat(s)), (t.pointArrayMap || ["y"]).forEach(function(D) {
D = "{point." + D, (A || _) && (s = s.replace(RegExp(D + "}", "g"), A + D + "}" + _)), s = s.replace(RegExp(D + "}", "g"), D + ":,." + n + "f}");
}), W(s, { point: this, series: this.series }, t.chart);
}, l.prototype.update = function(s, t, o, n) {
function A() {
_.applyOptions(s);
var m = j && _.hasDummyGraphic;
m = _.y === null ? !m : m, j && m && (_.graphic = j.destroy(), delete _.hasDummyGraphic), b(s, !0) && (j && j.element && s && s.marker && typeof s.marker.symbol < "u" && (_.graphic = j.destroy()), s && s.dataLabels && _.dataLabel && (_.dataLabel = _.dataLabel.destroy()), _.connector && (_.connector = _.connector.destroy())), g = _.index, D.updateParallelArrays(_, g), X.data[g] = b(X.data[g], !0) || b(s, !0) ? _.options : a(s, X.data[g]), D.isDirty = D.isDirtyData = !0, !D.fixedBox && D.hasCartesianSeries && (T.isDirtyBox = !0), X.legendType === "point" && (T.isDirtyLegend = !0), t && T.redraw(o);
}
var _ = this, D = _.series, j = _.graphic, T = D.chart, X = D.options, g;
t = a(t, !0), n === !1 ? A() : _.firePointEvent("update", { options: s }, A);
}, l.prototype.remove = function(s, t) {
this.series.removePoint(this.series.data.indexOf(this), s, t);
}, l.prototype.select = function(s, t) {
var o = this, n = o.series, A = n.chart;
this.selectedStaging = s = a(s, !o.selected), o.firePointEvent(s ? "select" : "unselect", { accumulate: t }, function() {
o.selected = o.options.selected = s, n.options.data[n.data.indexOf(o)] = o.options, o.setState(s && "select"), t || A.getSelectedPoints().forEach(function(_) {
var D = _.series;
_.selected && _ !== o && (_.selected = _.options.selected = !1, D.options.data[D.data.indexOf(_)] = _.options, _.setState(A.hoverPoints && D.options.inactiveOtherPoints ? "inactive" : ""), _.firePointEvent("unselect"));
});
}), delete this.selectedStaging;
}, l.prototype.onMouseOver = function(s) {
var t = this.series.chart, o = t.pointer;
s = s ? o.normalize(s) : o.getChartCoordinatesFromPoint(this, t.inverted), o.runPointActions(
s,
this
);
}, l.prototype.onMouseOut = function() {
var s = this.series.chart;
this.firePointEvent("mouseOut"), this.series.options.inactiveOtherPoints || (s.hoverPoints || []).forEach(function(t) {
t.setState();
}), s.hoverPoints = s.hoverPoint = null;
}, l.prototype.importEvents = function() {
if (!this.hasImportedEvents) {
var s = this, t = w(s.series.options.point, s.options).events;
s.events = t, v(t, function(o, n) {
N(o) && R(s, n, o);
}), this.hasImportedEvents = !0;
}
}, l.prototype.setState = function(s, t) {
var o = this.series, n = this.state, A = o.options.states[s || "normal"] || {}, _ = H.plotOptions[o.type].marker && o.options.marker, D = _ && _.enabled === !1, j = _ && _.states && _.states[s || "normal"] || {}, T = j.enabled === !1, X = this.marker || {}, g = o.chart, m = _ && o.markerAttribs, L = o.halo, Y, V = o.stateMarkerGraphic;
if (s = s || "", !(s === this.state && !t || this.selected && s !== "select" || A.enabled === !1 || s && (T || D && j.enabled === !1) || s && X.states && X.states[s] && X.states[s].enabled === !1)) {
if (this.state = s, m && (Y = o.markerAttribs(this, s)), this.graphic && !this.hasDummyGraphic) {
if (n && this.graphic.removeClass("highcharts-point-" + n), s && this.graphic.addClass("highcharts-point-" + s), !g.styledMode) {
var Q = o.pointAttribs(this, s), k = a(g.options.chart.animation, A.animation);
o.options.inactiveOtherPoints && C(Q.opacity) && ((this.dataLabels || []).forEach(function(G) {
G && G.animate({ opacity: Q.opacity }, k);
}), this.connector && this.connector.animate({ opacity: Q.opacity }, k)), this.graphic.animate(Q, k);
}
Y && this.graphic.animate(Y, a(g.options.chart.animation, j.animation, _.animation)), V && V.hide();
} else
s && j && (n = X.symbol || o.symbol, V && V.currentSymbol !== n && (V = V.destroy()), Y && (V ? V[t ? "animate" : "attr"]({ x: Y.x, y: Y.y }) : n && (o.stateMarkerGraphic = V = g.renderer.symbol(n, Y.x, Y.y, Y.width, Y.height).add(o.markerGroup), V.currentSymbol = n)), !g.styledMode && V && this.state !== "inactive" && V.attr(o.pointAttribs(this, s))), V && (V[s && this.isInside ? "show" : "hide"](), V.element.point = this, V.addClass(this.getClassName(), !0));
A = A.halo, Y = (V = this.graphic || V) && V.visibility || "inherit", A && A.size && V && Y !== "hidden" && !this.isCluster ? (L || (o.halo = L = g.renderer.path().add(V.parentGroup)), L.show()[t ? "animate" : "attr"]({ d: this.haloPath(A.size) }), L.attr({ class: "highcharts-halo highcharts-color-" + a(this.colorIndex, o.colorIndex) + (this.className ? " " + this.className : ""), visibility: Y, zIndex: -1 }), L.point = this, g.styledMode || L.attr(d({ fill: this.color || o.color, "fill-opacity": A.opacity }, y.filterUserAttributes(A.attributes || {})))) : L && L.point && L.point.haloPath && L.animate({ d: L.point.haloPath(0) }, null, L.hide), u(this, "afterSetState", { state: s });
}
}, l.prototype.haloPath = function(s) {
return this.series.chart.renderer.symbols.circle(Math.floor(this.plotX) - s, this.plotY - s, 2 * s, 2 * s);
}, l;
}(), B;
}), E(h, "Core/Pointer.js", [h["Core/Color/Color.js"], h["Core/Globals.js"], h["Core/Tooltip.js"], h["Core/Utilities.js"]], function(y, B, I, Z) {
var F = y.parse, U = B.charts, H = B.noop, W = Z.addEvent, R = Z.attr, S = Z.css, x = Z.defined, d = Z.extend, u = Z.find, P = Z.fireEvent, O = Z.isNumber, N = Z.isObject, C = Z.objectEach, b = Z.offset, w = Z.pick, v = Z.splat;
return y = function() {
function a(c, p) {
this.lastValidTouch = {}, this.pinchDown = [], this.runChartClick = !1, this.eventsToUnbind = [], this.chart = c, this.hasDragged = !1, this.options = p, this.init(c, p);
}
return a.prototype.applyInactiveState = function(c) {
var p = [], i;
(c || []).forEach(function(l) {
i = l.series, p.push(i), i.linkedParent && p.push(i.linkedParent), i.linkedSeries && (p = p.concat(i.linkedSeries)), i.navigatorSeries && p.push(i.navigatorSeries);
}), this.chart.series.forEach(function(l) {
p.indexOf(l) === -1 ? l.setState("inactive", !0) : l.options.inactiveOtherPoints && l.setAllPointsToState("inactive");
});
}, a.prototype.destroy = function() {
var c = this;
this.eventsToUnbind.forEach(function(p) {
return p();
}), this.eventsToUnbind = [], B.chartCount || (a.unbindDocumentMouseUp && (a.unbindDocumentMouseUp = a.unbindDocumentMouseUp()), a.unbindDocumentTouchEnd && (a.unbindDocumentTouchEnd = a.unbindDocumentTouchEnd())), clearInterval(c.tooltipTimeout), C(c, function(p, i) {
c[i] = void 0;
});
}, a.prototype.drag = function(c) {
var p = this.chart, i = p.options.chart, l = this.zoomHor, s = this.zoomVert, t = p.plotLeft, o = p.plotTop, n = p.plotWidth, A = p.plotHeight, _ = this.mouseDownX || 0, D = this.mouseDownY || 0, j = N(i.panning) ? i.panning && i.panning.enabled : i.panning, T = 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 < o ? g = o : g > o + A && (g = o + A), this.hasDragged = Math.sqrt(Math.pow(_ - X, 2) + Math.pow(D - g, 2)), 10 < this.hasDragged)) {
var L = p.isInsidePlot(_ - t, D - o, { visiblePlotOnly: !0 });
!p.hasCartesianSeries && !p.mapView || !this.zoomX && !this.zoomY || !L || T || m || (this.selectionMarker = m = p.renderer.rect(t, o, l ? 1 : n, s ? 1 : A, 0).attr({ class: "highcharts-selection-marker", zIndex: 7 }).add(), p.styledMode || m.attr({ fill: i.selectionMarkerFill || F("#335cad").setOpacity(0.25).get() })), m && l && (l = X - _, m.attr({ width: Math.abs(l), x: (0 < l ? 0 : l) + _ })), m && s && (l = g - D, m.attr({ height: Math.abs(l), y: (0 < l ? 0 : l) + D })), L && !m && j && p.pan(c, i.panning);
}
}, a.prototype.dragStart = function(c) {
var p = this.chart;
p.mouseIsDown = c.type, p.cancelClick = !1, p.mouseDownX = this.mouseDownX = c.chartX, p.mouseDownY = this.mouseDownY = c.chartY;
}, a.prototype.drop = function(c) {
var p = this, i = this.chart, l = this.hasPinched;
if (this.selectionMarker) {
var s = this.selectionMarker, t = s.attr ? s.attr("x") : s.x, o = s.attr ? s.attr("y") : s.y, n = s.attr ? s.attr("width") : s.width, A = s.attr ? s.attr("height") : s.height, _ = { originalEvent: c, xAxis: [], yAxis: [], x: t, y: o, width: n, height: A }, D = !!i.mapView;
(this.hasDragged || l) && (i.axes.forEach(function(j) {
if (j.zoomEnabled && x(j.min) && (l || p[{ xAxis: "zoomX", yAxis: "zoomY" }[j.coll]]) && O(t) && O(o)) {
var T = j.horiz, X = c.type === "touchend" ? j.minPixelPadding : 0, g = j.toValue((T ? t : o) + X);
T = j.toValue((T ? t + n : o + A) - X), _[j.coll].push({ axis: j, min: Math.min(g, T), max: Math.max(g, T) }), D = !0;
}
}), D && P(i, "selection", _, function(j) {
i.zoom(d(
j,
l ? { animation: !1 } : null
));
})), O(i.index) && (this.selectionMarker = this.selectionMarker.destroy()), l && this.scaleGroups();
}
i && O(i.index) && (S(i.container, { cursor: i._cursor }), i.cancelClick = 10 < this.hasDragged, i.mouseIsDown = this.hasDragged = this.hasPinched = !1, this.pinchDown = []);
}, a.prototype.findNearestKDPoint = function(c, p, i) {
var l = this.chart, s = l.hoverPoint;
if (l = l.tooltip, s && l && l.isStickyOnContact())
return s;
var t;
return c.forEach(function(o) {
var n = !(o.noSharedTooltip && p) && 0 > o.options.findNearestPointBy.indexOf("y");
if (o = o.searchPoint(i, n), (n = N(o, !0) && o.series) && !(n = !N(t, !0))) {
n = t.distX - o.distX;
var A = t.dist - o.dist, _ = (o.series.group && o.series.group.zIndex) - (t.series.group && t.series.group.zIndex);
n = 0 < (n !== 0 && p ? n : A !== 0 ? A : _ !== 0 ? _ : t.series.index > o.series.index ? -1 : 1);
}
n && (t = o);
}), t;
}, a.prototype.getChartCoordinatesFromPoint = function(c, p) {
var i = c.series, l = i.xAxis;
i = i.yAxis;
var s = c.shapeArgs;
if (l && i) {
var t = w(c.clientX, c.plotX), o = c.plotY || 0;
return c.isNode && s && O(s.x) && O(s.y) && (t = s.x, o = s.y), p ? { chartX: i.len + i.pos - o, chartY: l.len + l.pos - t } : { chartX: t + l.pos, chartY: o + i.pos };
}
if (s && s.x && s.y)
return { chartX: s.x, chartY: s.y };
}, a.prototype.getChartPosition = function() {
if (this.chartPosition)
return this.chartPosition;
var c = this.chart.container, p = b(c);
this.chartPosition = { left: p.left, top: p.top, scaleX: 1, scaleY: 1 };
var i = c.offsetWidth;
return c = c.offsetHeight, 2 < i && 2 < c && (this.chartPosition.scaleX = p.width / i, this.chartPosition.scaleY = p.height / c), this.chartPosition;
}, a.prototype.getCoordinates = function(c) {
var p = { xAxis: [], yAxis: [] };
return this.chart.axes.forEach(function(i) {
p[i.isXAxis ? "xAxis" : "yAxis"].push({ axis: i, value: i.toValue(c[i.horiz ? "chartX" : "chartY"]) });
}), p;
}, a.prototype.getHoverData = function(c, p, i, l, s, t) {
var o = [];
l = !(!l || !c);
var n = { chartX: t ? t.chartX : void 0, chartY: t ? t.chartY : void 0, shared: s };
P(this, "beforeGetHoverData", n);
var A = p && !p.stickyTracking ? [p] : i.filter(function(D) {
return n.filter ? n.filter(D) : D.visible && !(!s && D.directTouch) && w(D.options.enableMouseTracking, !0) && D.stickyTracking;
}), _ = l || !t ? c : this.findNearestKDPoint(A, s, t);
return p = _ && _.series, _ && (s && !p.noSharedTooltip ? (A = i.filter(function(D) {
return n.filter ? n.filter(D) : D.visible && !(!s && D.directTouch) && w(D.options.enableMouseTracking, !0) && !D.noSharedTooltip;
}), A.forEach(function(D) {
var j = u(D.points, function(T) {
return T.x === _.x && !T.isNull;
});
N(j) && (D.chart.isBoosting && (j = D.getPoint(j)), o.push(j));
})) : o.push(_)), n = { hoverPoint: _ }, P(this, "afterGetHoverData", n), { hoverPoint: n.hoverPoint, hoverSeries: p, hoverPoints: o };
}, a.prototype.getPointFromEvent = function(c) {
c = c.target;
for (var p; c && !p; )
p = c.point, c = c.parentNode;
return p;
}, a.prototype.onTrackerMouseOut = function(c) {
c = c.relatedTarget || c.toElement;
var p = this.chart.hoverSeries;
this.isDirectTouch = !1, !p || !c || p.stickyTracking || this.inClass(c, "highcharts-tooltip") || this.inClass(c, "highcharts-series-" + p.index) && this.inClass(c, "highcharts-tracker") || p.onMouseOut();
}, a.prototype.inClass = function(c, p) {
for (var i; c; ) {
if (i = R(c, "class")) {
if (i.indexOf(p) !== -1)
return !0;
if (i.indexOf("highcharts-container") !== -1)
return !1;
}
c = c.parentNode;
}
}, a.prototype.init = function(c, p) {
this.options = p, this.chart = c, this.runChartClick = !(!p.chart.events || !p.chart.events.click), this.pinchDown = [], this.lastValidTouch = {}, I && (c.tooltip = new I(c, p.tooltip), this.followTouchMove = w(p.tooltip.followTouchMove, !0)), this.setDOMEvents();
}, a.prototype.normalize = function(c, p) {
var i = c.touches, l = i ? i.length ? i.item(0) : w(i.changedTouches, c.changedTouches)[0] : c;
return p || (p = this.getChartPosition()), i = l.pageX - p.left, l = l.pageY - p.top, i /= p.scaleX, l /= p.scaleY, d(c, { chartX: Math.round(i), chartY: Math.round(l) });
}, a.prototype.onContainerClick = function(c) {
var p = this.chart, i = p.hoverPoint;
c = this.normalize(c);
var l = p.plotLeft, s = p.plotTop;
p.cancelClick || (i && this.inClass(c.target, "highcharts-tracker") ? (P(i.series, "click", d(c, { point: i })), p.hoverPoint && i.firePointEvent("click", c)) : (d(c, this.getCoordinates(c)), p.isInsidePlot(c.chartX - l, c.chartY - s, { visiblePlotOnly: !0 }) && P(p, "click", c)));
}, a.prototype.onContainerMouseDown = function(c) {
var p = ((c.buttons || c.button) & 1) === 1;
c = this.normalize(c), B.isFirefox && c.button !== 0 && this.onContainerMouseMove(c), (typeof c.button > "u" || p) && (this.zoomOption(c), p && c.preventDefault && c.preventDefault(), this.dragStart(c));
}, a.prototype.onContainerMouseLeave = function(c) {
var p = U[w(a.hoverChartIndex, -1)], i = this.chart.tooltip;
i && i.shouldStickOnContact() && this.inClass(c.relatedTarget, "highcharts-tooltip-container") || (c = this.normalize(c), p && (c.relatedTarget || c.toElement) && (p.pointer.reset(), p.pointer.chartPosition = void 0), i && !i.isHidden && this.reset());
}, a.prototype.onContainerMouseEnter = function(c) {
delete this.chartPosition;
}, a.prototype.onContainerMouseMove = function(c) {
var p = this.chart;
c = this.normalize(c), this.setHoverChartIndex(), c.preventDefault || (c.returnValue = !1), (p.mouseIsDown === "mousedown" || this.touchSelect(c)) && this.drag(c), p.openMenu || !this.inClass(c.target, "highcharts-tracker") && !p.isInsidePlot(c.chartX - p.plotLeft, c.chartY - p.plotTop, { visiblePlotOnly: !0 }) || (this.inClass(c.target, "highcharts-no-tooltip") ? this.reset(!1, 0) : this.runPointActions(c));
}, a.prototype.onDocumentTouchEnd = function(c) {
var p = U[w(
a.hoverChartIndex,
-1
)];
p && p.pointer.drop(c);
}, a.prototype.onContainerTouchMove = function(c) {
this.touchSelect(c) ? this.onContainerMouseMove(c) : this.touch(c);
}, a.prototype.onContainerTouchStart = function(c) {
this.touchSelect(c) ? this.onContainerMouseDown(c) : (this.zoomOption(c), this.touch(c, !0));
}, a.prototype.onDocumentMouseMove = function(c) {
var p = this.chart, i = this.chartPosition;
c = this.normalize(c, i);
var l = p.tooltip;
!i || l && l.isStickyOnContact() || p.isInsidePlot(c.chartX - p.plotLeft, c.chartY - p.plotTop, { visiblePlotOnly: !0 }) || this.inClass(c.target, "highcharts-tracker") || this.reset();
}, a.prototype.onDocumentMouseUp = function(c) {
var p = U[w(a.hoverChartIndex, -1)];
p && p.pointer.drop(c);
}, a.prototype.pinch = function(c) {
var p = this, i = p.chart, l = p.pinchDown, s = c.touches || [], t = s.length, o = p.lastValidTouch, n = p.hasZoom, A = {}, _ = t === 1 && (p.inClass(c.target, "highcharts-tracker") && i.runTrackerClick || p.runChartClick), D = {}, j = p.selectionMarker;
1 < t ? p.initiated = !0 : t === 1 && this.followTouchMove && (p.initiated = !1), n && p.initiated && !_ && c.cancelable !== !1 && c.preventDefault(), [].map.call(s, function(T) {
return p.normalize(T);
}), c.type === "touchstart" ? ([].forEach.call(s, function(T, X) {
l[X] = { chartX: T.chartX, chartY: T.chartY };
}), o.x = [l[0].chartX, l[1] && l[1].chartX], o.y = [l[0].chartY, l[1] && l[1].chartY], i.axes.forEach(function(T) {
if (T.zoomEnabled) {
var X = i.bounds[T.horiz ? "h" : "v"], g = T.minPixelPadding, m = T.toPixels(Math.min(w(T.options.min, T.dataMin), T.dataMin)), L = T.toPixels(Math.max(w(T.options.max, T.dataMax), T.dataMax)), Y = Math.max(m, L);
X.min = Math.min(T.pos, Math.min(
m,
L
) - g), X.max = Math.max(T.pos + T.len, Y + g);
}
}), p.res = !0) : p.followTouchMove && t === 1 ? this.runPointActions(p.normalize(c)) : l.length && (P(i, "touchpan", { originalEvent: c }, function() {
j || (p.selectionMarker = j = d({ destroy: H, touch: !0 }, i.plotBox)), p.pinchTranslate(l, s, A, j, D, o), p.hasPinched = n, p.scaleGroups(A, D);
}), p.res && (p.res = !1, this.reset(!1, 0)));
}, a.prototype.pinchTranslate = function(c, p, i, l, s, t) {
this.zoomHor && this.pinchTranslateDirection(!0, c, p, i, l, s, t), this.zoomVert && this.pinchTranslateDirection(!1, c, p, i, l, s, t);
}, a.prototype.pinchTranslateDirection = function(c, p, i, l, s, t, o, n) {
var A = this.chart, _ = c ? "x" : "y", D = c ? "X" : "Y", j = "chart" + D, T = c ? "width" : "height", X = A["plot" + (c ? "Left" : "Top")], g = A.inverted, m = A.bounds[c ? "h" : "v"], L = p.length === 1, Y = p[0][j], V = !L && p[1][j];
p = function() {
typeof $ == "number" && 20 < Math.abs(Y - V) && (G = n || Math.abs(z - $) / Math.abs(Y - V)), k = (X - z) / G + Y, Q = A["plot" + (c ? "Width" : "Height")] / G;
};
var Q, k, G = n || 1, z = i[0][j], $ = !L && i[1][j];
if (p(), i = k, i < m.min) {
i = m.min;
var q = !0;
} else
i + Q > m.max && (i = m.max - Q, q = !0);
q ? (z -= 0.8 * (z - o[_][0]), typeof $ == "number" && ($ -= 0.8 * ($ - o[_][1])), p()) : o[_] = [z, $], g || (t[_] = k - X, t[T] = Q), t = g ? 1 / G : G, s[T] = Q, s[_] = i, l[g ? c ? "scaleY" : "scaleX" : "scale" + D] = G, l["translate" + D] = t * X + (z - t * Y);
}, a.prototype.reset = function(c, p) {
var i = this.chart, l = i.hoverSeries, s = i.hoverPoint, t = i.hoverPoints, o = i.tooltip, n = o && o.shared ? t : s;
c && n && v(n).forEach(function(A) {
A.series.isCartesian && typeof A.plotX > "u" && (c = !1);
}), c ? o && n && v(n).length && (o.refresh(n), o.shared && t ? t.forEach(function(A) {
A.setState(A.state, !0), A.series.isCartesian && (A.series.xAxis.crosshair && A.series.xAxis.drawCrosshair(
null,
A
), A.series.yAxis.crosshair && A.series.yAxis.drawCrosshair(null, A));
}) : s && (s.setState(s.state, !0), i.axes.forEach(function(A) {
A.crosshair && s.series[A.coll] === A && A.drawCrosshair(null, s);
}))) : (s && s.onMouseOut(), t && t.forEach(function(A) {
A.setState();
}), l && l.onMouseOut(), o && o.hide(p), this.unDocMouseMove && (this.unDocMouseMove = this.unDocMouseMove()), i.axes.forEach(function(A) {
A.hideCrosshair();
}), this.hoverX = i.hoverPoints = i.hoverPoint = null);
}, a.prototype.runPointActions = function(c, p) {
var i = this.chart, l = i.tooltip && i.tooltip.options.enabled ? i.tooltip : void 0, s = l ? l.shared : !1, t = p || i.hoverPoint, o = t && t.series || i.hoverSeries;
p = this.getHoverData(t, o, i.series, (!c || c.type !== "touchmove") && (!!p || o && o.directTouch && this.isDirectTouch), s, c), t = p.hoverPoint, o = p.hoverSeries;
var n = p.hoverPoints;
if (p = o && o.tooltipOptions.followPointer && !o.tooltipOptions.split, s = s && o && !o.noSharedTooltip, t && (t !== i.hoverPoint || l && l.isHidden)) {
if ((i.hoverPoints || []).forEach(function(A) {
n.indexOf(A) === -1 && A.setState();
}), i.hoverSeries !== o && o.onMouseOver(), this.applyInactiveState(n), (n || []).forEach(function(A) {
A.setState("hover");
}), i.hoverPoint && i.hoverPoint.firePointEvent("mouseOut"), !t.series)
return;
i.hoverPoints = n, i.hoverPoint = t, t.firePointEvent("mouseOver"), l && l.refresh(s ? n : t, c);
} else
p && l && !l.isHidden && (t = l.getAnchor([{}], c), i.isInsidePlot(t[0], t[1], { visiblePlotOnly: !0 }) && l.updatePosition({ plotX: t[0], plotY: t[1] }));
this.unDocMouseMove || (this.unDocMouseMove = W(i.container.ownerDocument, "mousemove", function(A) {
var _ = U[a.hoverChartIndex];
_ && _.pointer.onDocumentMouseMove(A);
}), this.eventsToUnbind.push(this.unDocMouseMove)), i.axes.forEach(function(A) {
var _ = w((A.crosshair || {}).snap, !0), D;
_ && ((D = i.hoverPoint) && D.series[A.coll] === A || (D = u(n, function(j) {
return j.series[A.coll] === A;
}))), D || !_ ? A.drawCrosshair(c, D) : A.hideCrosshair();
});
}, a.prototype.scaleGroups = function(c, p) {
var i = this.chart;
i.series.forEach(function(l) {
var s = c || l.getPlotBox();
l.group && (l.xAxis && l.xAxis.zoomEnabled || i.mapView) && (l.group.attr(s), l.markerGroup && (l.markerGroup.attr(s), l.markerGroup.clip(p ? i.clipRect : null)), l.dataLabelsGroup && l.dataLabelsGroup.attr(s));
}), i.clipRect.attr(p || i.clipBox);
}, a.prototype.setDOMEvents = function() {
var c = this, p = this.chart.container, i = p.ownerDocument;
p.onmousedown = this.onContainerMouseDown.bind(this), p.onmousemove = this.onContainerMouseMove.bind(this), p.onclick = this.onContainerClick.bind(this), this.eventsToUnbind.push(W(p, "mouseenter", this.onContainerMouseEnter.bind(this))), this.eventsToUnbind.push(W(p, "mouseleave", this.onContainerMouseLeave.bind(this))), a.unbindDocumentMouseUp || (a.unbindDocumentMouseUp = W(i, "mouseup", this.onDocumentMouseUp.bind(this)));
for (var l = this.chart.renderTo.parentElement; l && l.tagName !== "BODY"; )
this.eventsToUnbind.push(W(l, "scroll", function() {
delete c.chartPosition;
})), l = l.parentElement;
B.hasTouch && (this.eventsToUnbind.push(W(p, "touchstart", this.onContainerTouchStart.bind(this), { passive: !1 })), this.eventsToUnbind.push(W(p, "touchmove", this.onContainerTouchMove.bind(this), { passive: !1 })), a.unbindDocumentTouchEnd || (a.unbindDocumentTouchEnd = W(i, "touchend", this.onDocumentTouchEnd.bind(this), { passive: !1 })));
}, a.prototype.setHoverChartIndex = function() {
var c = this.chart, p = B.charts[w(a.hoverChartIndex, -1)];
p && p !== c && p.pointer.onContainerMouseLeave({ relatedTarget: !0 }), p && p.mouseIsDown || (a.hoverChartIndex = c.index);
}, a.prototype.touch = function(c, p) {
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 (p && this.runPointActions(c), c.type === "touchmove") {
p = this.pinchDown;
var l = p[0] ? 4 <= Math.sqrt(Math.pow(p[0].chartX - c.chartX, 2) + Math.pow(p[0].chartY - c.chartY, 2)) : !1;
}
w(l, !0) && this.pinch(c);
} else
p && this.reset();
else
c.touches.length === 2 && this.pinch(c);
}, a.prototype.touchSelect = function(c) {
return !(!this.chart.options.chart.zoomBySingleTouch || !c.touches || c.touches.length !== 1);
}, a.prototype.zoomOption = function(c) {
var p = this.chart, i = p.options.chart;
p = p.inverted;
var l = i.zoomType || "";
/touch/.test(c.type) && (l = w(i.pinchType, l)), this.zoomX = c = /x/.test(l), this.zoomY = i = /y/.test(l), this.zoomHor = c && !p || i && p, this.zoomVert = i && !p || c && p, this.hasZoom = c || i;
}, a;
}(), y;
}), E(h, "Core/MSPointer.js", [h["Core/Globals.js"], h["Core/Pointer.js"], h["Core/Utilities.js"]], function(y, B, I) {
function Z() {
var C = [];
return C.item = function(b) {
return this[b];
}, u(O, function(b) {
C.push({ pageX: b.pageX, pageY: b.pageY, target: b.target });
}), C;
}
function F(C, b, w, v) {
var a = H[B.hoverChartIndex || NaN];
C.pointerType !== "touch" && C.pointerType !== C.MSPOINTER_TYPE_TOUCH || !a || (a = a.pointer, v(C), a[b]({ type: w, target: C.currentTarget, preventDefault: R, touches: Z() }));
}
var U = this && this.__extends || function() {
var C = function(b, w) {
return C = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(v, a) {
v.__proto__ = a;
} || function(v, a) {
for (var c in a)
a.hasOwnProperty(c) && (v[c] = a[c]);
}, C(b, w);
};
return function(b, w) {
function v() {
this.constructor = b;
}
C(b, w), b.prototype = w === null ? Object.create(w) : (v.prototype = w.prototype, new v());
};
}(), H = y.charts, W = y.doc, R = y.noop, S = y.win, x = I.addEvent, d = I.css, u = I.objectEach, P = I.removeEvent, O = {}, N = !!S.PointerEvent;
return function(C) {
function b() {
return C !== null && C.apply(this, arguments) || this;
}
return U(b, C), b.isRequired = function() {
return !(y.hasTouch || !S.PointerEvent && !S.MSPointerEvent);
}, b.prototype.batchMSEvents = function(w) {
w(this.chart.container, N ? "pointerdown" : "MSPointerDown", this.onContainerPointerDown), w(this.chart.container, N ? "pointermove" : "MSPointerMove", this.onContainerPointerMove), w(W, N ? "pointerup" : "MSPointerUp", this.onDocumentPointerUp);
}, b.prototype.destroy = function() {
this.batchMSEvents(P), C.prototype.destroy.call(this);
}, b.prototype.init = function(w, v) {
C.prototype.init.call(this, w, v), this.hasZoom && d(w.container, { "-ms-touch-action": "none", "touch-action": "none" });
}, b.prototype.onContainerPointerDown = function(w) {
F(w, "onContainerTouchStart", "touchstart", function(v) {
O[v.pointerId] = { pageX: v.pageX, pageY: v.pageY, target: v.currentTarget };
});
}, b.prototype.onContainerPointerMove = function(w) {
F(w, "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(w) {
F(w, "onDocumentTouchEnd", "touchend", function(v) {
delete O[v.pointerId];
});
}, b.prototype.setDOMEvents = function() {
C.prototype.setDOMEvents.call(this), (this.hasZoom || this.followTouchMove) && this.batchMSEvents(x);
}, b;
}(B);
}), E(h, "Core/Legend/Legend.js", [
h["Core/Animation/AnimationUtilities.js"],
h["Core/FormatUtilities.js"],
h["Core/Globals.js"],
h["Core/Series/Point.js"],
h["Core/Renderer/RendererUtilities.js"],
h["Core/Utilities.js"]
], function(y, B, I, Z, F, U) {
var H = y.animObject, W = y.setAnimation, R = B.format;
y = I.isFirefox;
var S = I.marginNames;
I = I.win;
var x = F.distribute, d = U.addEvent, u = U.createElement, P = U.css, O = U.defined, N = U.discardElement, C = U.find, b = U.fireEvent, w = U.isNumber, v = U.merge, a = U.pick, c = U.relativeLength, p = U.stableSort, i = U.syncTimeout;
return F = U.wrap, U = function() {
function l(s, 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 = s, this.init(s, t);
}
return l.prototype.init = function(s, t) {
this.chart = s, this.setOptions(t), t.enabled && (this.render(), d(this.chart, "endResize", function() {
this.legend.positionCheckboxes();
}), this.proximate ? this.unchartrender = d(this.chart, "render", function() {
this.legend.proximatePositions(), this.legend.positionItems();
}) : this.unchartrender && this.unchartrender());
}, l.prototype.setOptions = function(s) {
var t = a(s.padding, 8);
this.options = s, this.chart.styledMode || (this.itemStyle = s.itemStyle, this.itemHiddenStyle = v(this.itemStyle, s.itemHiddenStyle)), this.itemMarginTop = s.itemMarginTop || 0, this.itemMarginBottom = s.itemMarginBottom || 0, this.padding = t, this.initialItemY = t - 5, this.symbolWidth = a(
s.symbolWidth,
16
), this.pages = [], this.proximate = s.layout === "proximate" && !this.chart.inverted, this.baseline = void 0;
}, l.prototype.update = function(s, t) {
var o = this.chart;
this.setOptions(v(!0, this.options, s)), this.destroy(), o.isDirtyLegend = o.isDirtyBox = !0, a(t, !0) && o.redraw(), b(this, "afterUpdate");
}, l.prototype.colorizeItem = function(s, t) {
if (s.legendGroup[t ? "removeClass" : "addClass"]("highcharts-legend-item-hidden"), !this.chart.styledMode) {
var o = this.options, n = s.legendItem, A = s.legendLine, _ = s.legendSymbol, D = this.itemHiddenStyle.color;
o = t ? o.itemStyle.color : D;
var j = t && s.color || D, T = s.options && s.options.marker, X = { fill: j };
n && n.css({ fill: o, color: o }), A && A.attr({ stroke: j }), _ && (T && _.isMarker && (X = s.pointAttribs(), t || (X.stroke = X.fill = D)), _.attr(X));
}
b(this, "afterColorizeItem", { item: s, visible: t });
}, l.prototype.positionItems = function() {
this.allItems.forEach(this.positionItem, this), this.chart.isResizing || this.positionCheckboxes();
}, l.prototype.positionItem = function(s) {
var t = this, o = this.options, n = o.symbolPadding, A = !o.rtl, _ = s._legendItemPos;
o = _[0], _ = _[1];
var D = s.checkbox, j = s.legendGroup;
j && j.element && (n = { translateX: A ? o : this.legendWidth - o - 2 * n - 4, translateY: _ }, A = function() {
b(t, "afterPositionItem", { item: s });
}, O(j.translateY) ? j.animate(n, void 0, A) : (j.attr(n), A())), D && (D.x = o, D.y = _);
}, l.prototype.destroyItem = function(s) {
var t = s.checkbox;
["legendItem", "legendLine", "legendSymbol", "legendGroup"].forEach(function(o) {
s[o] && (s[o] = s[o].destroy());
}), t && N(s.checkbox);
}, l.prototype.destroy = function() {
function s(t) {
this[t] && (this[t] = this[t].destroy());
}
this.getAllItems().forEach(function(t) {
[
"legendItem",
"legendGroup"
].forEach(s, t);
}), "clipRect up down pager nav box title group".split(" ").forEach(s, this), this.display = null;
}, l.prototype.positionCheckboxes = function() {
var s = this.group && this.group.alignAttr, t = this.clipHeight || this.legendHeight, o = this.titleHeight;
if (s) {
var n = s.translateY;
this.allItems.forEach(function(A) {
var _ = A.checkbox;
if (_) {
var D = n + o + _.y + (this.scrollOffset || 0) + 3;
P(_, { left: s.translateX + A.checkboxOffset + _.x - 20 + "px", top: D + "px", display: this.proximate || D > n - 6 && D < n + t - 6 ? "" : "none" });
}
}, this);
}
}, l.prototype.renderTitle = function() {
var s = this.options, t = this.padding, o = s.title, n = 0;
o.text && (this.title || (this.title = this.chart.renderer.label(o.text, t - 3, t - 4, null, null, null, s.useHTML, null, "legend-title").attr({ zIndex: 1 }), this.chart.styledMode || this.title.css(o.style), this.title.add(this.group)), o.width || this.title.css({ width: this.maxLegendWidth + "px" }), s = this.title.getBBox(), n = s.height, this.offsetWidth = s.width, this.contentGroup.attr({ translateY: n })), this.titleHeight = n;
}, l.prototype.setText = function(s) {
var t = this.options;
s.legendItem.attr({ text: t.labelFormat ? R(t.labelFormat, s, this.chart) : t.labelFormatter.call(s) });
}, l.prototype.renderItem = function(s) {
var t = this.chart, o = t.renderer, n = this.options, A = this.symbolWidth, _ = n.symbolPadding || 0, D = this.itemStyle, j = this.itemHiddenStyle, T = n.layout === "horizontal" ? a(n.itemDistance, 20) : 0, X = !n.rtl, g = !s.series, m = !g && s.series.drawLegendSymbol ? s.series : s, L = m.options, Y = this.createCheckboxForItem && L && L.showCheckbox, V = n.useHTML, Q = s.options.className, k = s.legendItem;
L = A + _ + T + (Y ? 20 : 0), k || (s.legendGroup = o.g("legend-item").addClass("highcharts-" + m.type + "-series highcharts-color-" + s.colorIndex + (Q ? " " + Q : "") + (g ? " highcharts-series-" + s.index : "")).attr({ zIndex: 1 }).add(this.scrollGroup), s.legendItem = k = o.text("", X ? A + _ : -_, this.baseline || 0, V), t.styledMode || k.css(v(s.visible ? D : j)), k.attr({ align: X ? "left" : "right", zIndex: 2 }).add(s.legendGroup), this.baseline || (this.fontMetrics = o.fontMetrics(t.styledMode ? 12 : D.fontSize, k), this.baseline = this.fontMetrics.f + 3 + this.itemMarginTop, k.attr("y", this.baseline), this.symbolHeight = n.symbolHeight || this.fontMetrics.f, n.squareSymbol && (this.symbolWidth = a(n.symbolWidth, Math.max(this.symbolHeight, 16)), L = this.symbolWidth + _ + T + (Y ? 20 : 0), X && k.attr("x", this.symbolWidth + _))), m.drawLegendSymbol(this, s), this.setItemEvents && this.setItemEvents(s, k, V)), Y && !s.checkbox && this.createCheckboxForItem && this.createCheckboxForItem(s), this.colorizeItem(s, s.visible), !t.styledMode && D.width || k.css({ width: (n.itemWidth || this.widthOption || t.spacingBox.width) - L + "px" }), this.setText(s), t = k.getBBox(), o = this.fontMetrics && this.fontMetrics.h || 0, s.itemWidth = s.checkboxOffset = n.itemWidth || s.legendItemWidth || t.width + L, this.maxItemWidth = Math.max(this.maxItemWidth, s.itemWidth), this.totalItemWidth += s.itemWidth, this.itemHeight = s.itemHeight = Math.round(s.legendItemHeight || (t.height > 1.5 * o ? t.height : o));
}, l.prototype.layoutItem = function(s) {
var t = this.options, o = this.padding, n = t.layout === "horizontal", A = s.itemHeight, _ = this.itemMarginBottom, D = this.itemMarginTop, j = n ? a(t.itemDistance, 20) : 0, T = this.maxLegendWidth;
t = t.alignColumns && this.totalItemWidth > T ? this.maxItemWidth : s.itemWidth, n && this.itemX - o + t > T && (this.itemX = o, this.lastLineHeight && (this.itemY += D + this.lastLineHeight + _), this.lastLineHeight = 0), this.lastItemY = D + this.itemY + _, this.lastLineHeight = Math.max(A, this.lastLineHeight), s._legendItemPos = [this.itemX, this.itemY], n ? this.itemX += t : (this.itemY += D + A + _, this.lastLineHeight = A), this.offsetWidth = this.widthOption || Math.max((n ? this.itemX - o - (s.checkbox ? 0 : j) : t) + o, this.offsetWidth);
}, l.prototype.getAllItems = function() {
var s = [];
return this.chart.series.forEach(function(t) {
var o = t && t.options;
t && a(o.showInLegend, O(o.linkedTo) ? !1 : void 0, !0) && (s = s.concat(t.legendItems || (o.legendType === "point" ? t.data : t)));
}), b(this, "afterGetAllItems", { allItems: s }), s;
}, l.prototype.getAlignment = function() {
var s = this.options;
return this.proximate ? s.align.charAt(0) + "tv" : s.floating ? "" : s.align.charAt(0) + s.verticalAlign.charAt(0) + s.layout.charAt(0);
}, l.prototype.adjustMargins = function(s, t) {
var o = this.chart, n = this.options, A = this.getAlignment();
A && [/(lth|ct|rth)/, /(rtv|rm|rbv)/, /(rbh|cb|lbh)/, /(lbv|lm|ltv)/].forEach(function(_, D) {
_.test(A) && !O(s[D]) && (o[S[D]] = Math.max(o[S[D]], o.legend[(D + 1) % 2 ? "legendHeight" : "legendWidth"] + [1, -1, -1, 1][D] * n[D % 2 ? "x" : "y"] + a(n.margin, 12) + t[D] + (o.titleOffset[D] || 0)));
});
}, l.prototype.proximatePositions = function() {
var s = this.chart, t = [], o = this.options.align === "left";
this.allItems.forEach(function(n) {
var A, _ = o;
if (n.yAxis) {
n.xAxis.options.reversed && (_ = !_), n.points && (A = C(_ ? n.points : n.points.slice(0).reverse(), function(j) {
return w(j.plotY);
})), _ = this.itemMarginTop + n.legendItem.getBBox().height + this.itemMarginBottom;
var D = n.yAxis.top - s.plotTop;
n.visible ? (A = A ? A.plotY : n.yAxis.height, A += D - 0.3 * _) : A = D + n.yAxis.height, t.push({ target: A, size: _, item: n });
}
}, this), x(t, s.plotHeight).forEach(function(n) {
n.item._legendItemPos && (n.item._legendItemPos[1] = s.plotTop - s.spacing[0] + n.pos);
});
}, l.prototype.render = function() {
var s = this.chart, t = s.renderer, o = this.options, n = this.padding, A = this.getAllItems(), _ = this.group, D = this.box;
this.itemX = n, this.itemY = this.initialItemY, this.lastItemY = this.offsetWidth = 0, this.widthOption = c(o.width, s.spacingBox.width - n);
var j = s.spacingBox.width - 2 * n - o.x;
-1 < ["rm", "lm"].indexOf(this.getAlignment().substring(0, 2)) && (j /= 2), this.maxLegendWidth = this.widthOption || j, _ || (this.group = _ = t.g("legend").addClass(o.className || "").attr({ zIndex: 7 }).add(), this.contentGroup = t.g().attr({ zIndex: 1 }).add(_), this.scrollGroup = t.g().add(this.contentGroup)), this.renderTitle(), p(A, function(X, g) {
return (X.options && X.options.legendIndex || 0) - (g.options && g.options.legendIndex || 0);
}), o.reversed && A.reverse(), this.allItems = A, this.display = j = !!A.length, this.itemHeight = this.totalItemWidth = this.maxItemWidth = this.lastLineHeight = 0, A.forEach(this.renderItem, this), A.forEach(this.layoutItem, this), A = (this.widthOption || this.offsetWidth) + n;
var T = this.lastItemY + this.lastLineHeight + this.titleHeight;
T = this.handleOverflow(T), T += n, D || (this.box = D = t.rect().addClass("highcharts-legend-box").attr({ r: o.borderRadius }).add(_), D.isNew = !0), s.styledMode || D.attr({ stroke: o.borderColor, "stroke-width": o.borderWidth || 0, fill: o.backgroundColor || "none" }).shadow(o.shadow), 0 < A && 0 < T && (D[D.isNew ? "attr" : "animate"](D.crisp.call({}, { x: 0, y: 0, width: A, height: T }, D.strokeWidth())), D.isNew = !1), D[j ? "show" : "hide"](), s.styledMode && _.getStyle("display") === "none" && (A = T = 0), this.legendWidth = A, this.legendHeight = T, j && this.align(), this.proximate || this.positionItems(), b(this, "afterRender");
}, l.prototype.align = function(s) {
s === void 0 && (s = this.chart.spacingBox);
var t = this.chart, o = this.options, n = s.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 !== s.y && (s = v(s, { y: n })), this.group.align(v(o, { width: this.legendWidth, height: this.legendHeight, verticalAlign: this.proximate ? "top" : o.verticalAlign }), !0, s);
}, l.prototype.handleOverflow = function(s) {
var t = this, o = this.chart, n = o.renderer, A = this.options, _ = A.y, D = A.verticalAlign === "top", j = this.padding, T = A.maxHeight, X = A.navigation, g = a(X.animation, !0), m = X.arrowSize || 12, L = this.pages, Y = this.allItems, V = function(q) {
typeof q == "number" ? $.attr({ height: q }) : $ && (t.clipRect = $.destroy(), t.contentGroup.clip()), t.contentGroup.div && (t.contentGroup.div.style.clip = q ? "rect(" + j + "px,9999px," + (j + q) + "px,0)" : "auto");
}, Q = function(q) {
return t[q] = n.circle(0, 0, 1.3 * m).translate(m / 2, m / 2).add(z), o.styledMode || t[q].attr("fill", "rgba(0,0,0,0.0001)"), t[q];
}, k, G;
_ = o.spacingBox.height + (D ? -_ : _) - j;
var z = this.nav, $ = this.clipRect;
return A.layout !== "horizontal" || A.verticalAlign === "middle" || A.floating || (_ /= 2), T && (_ = Math.min(_, T)), L.length = 0, s && 0 < _ && s > _ && X.enabled !== !1 ? (this.clipHeight = k = Math.max(_ - 20 - this.titleHeight - j, 0), this.currentPage = a(this.currentPage, 1), this.fullHeight = s, Y.forEach(function(q, it) {
var et = q._legendItemPos[1], nt = Math.round(q.legendItem.getBBox().height), rt = L.length;
(!rt || et - L[rt - 1] > k && (G || et) !== L[rt - 1]) && (L.push(G || et), rt++), q.pageIx = rt - 1, G && (Y[it - 1].pageIx = rt - 1), it === Y.length - 1 && et + nt - L[rt - 1] > k && nt <= k && (L.push(et), q.pageIx = rt), et !== G && (G = et);
}), $ || ($ = t.clipRect = n.clipRect(0, j, 9999, 0), t.contentGroup.clip($)), V(k), z || (this.nav = z = n.g().attr({ zIndex: 1 }).add(this.group), this.up = n.symbol("triangle", 0, 0, m, m).add(z), Q("upTracker").on(
"click",
function() {
t.scroll(-1, g);
}
), this.pager = n.text("", 15, 10).addClass("highcharts-legend-navigation"), o.styledMode || this.pager.css(X.style), this.pager.add(z), this.down = n.symbol("triangle-down", 0, 0, m, m).add(z), Q("downTracker").on("click", function() {
t.scroll(1, g);
})), t.scroll(0), s = _) : z && (V(), this.nav = z.destroy(), this.scrollGroup.attr({ translateY: 1 }), this.clipHeight = 0), s;
}, l.prototype.scroll = function(s, t) {
var o = this, n = this.chart, A = this.pages, _ = A.length, D = this.clipHeight, j = this.options.navigation, T = this.pager, X = this.padding, g = this.currentPage + s;
g > _ && (g = _), 0 < g && (typeof t < "u" && W(t, n), this.nav.attr({ translateX: X, translateY: D + 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" });
}), T.attr({ text: g + "/" + _ }), [this.down, this.downTracker].forEach(
function(m) {
m.attr({ x: 18 + this.pager.getBBox().width, class: g === _ ? "highcharts-legend-nav-inactive" : "highcharts-legend-nav-active" });
},
this
), n.styledMode || (this.up.attr({ fill: g === 1 ? j.inactiveColor : j.activeColor }), this.upTracker.css({ cursor: g === 1 ? "default" : "pointer" }), this.down.attr({ fill: g === _ ? j.inactiveColor : j.activeColor }), this.downTracker.css({ cursor: g === _ ? "default" : "pointer" })), this.scrollOffset = -A[g - 1] + this.initialItemY, this.scrollGroup.animate({ translateY: this.scrollOffset }), this.currentPage = g, this.positionCheckboxes(), s = H(a(t, n.renderer.globalAnimation, !0)), i(function() {
b(o, "afterScroll", { currentPage: g });
}, s.duration));
}, l.prototype.setItemEvents = function(s, t, o) {
var n = this, A = n.chart.renderer.boxWrapper, _ = s instanceof Z, D = "highcharts-legend-" + (_ ? "point" : "series") + "-active", j = n.chart.styledMode, T = function(X) {
n.allItems.forEach(function(g) {
s !== g && [g].concat(g.linkedSeries || []).forEach(function(m) {
m.setState(X, !_);
});
});
};
(o ? [t, s.legendSymbol] : [s.legendGroup]).forEach(function(X) {
X && X.on("mouseover", function() {
s.visible && T("inactive"), s.setState("hover"), s.visible && A.addClass(D), j || t.css(n.options.itemHoverStyle);
}).on("mouseout", function() {
n.chart.styledMode || t.css(v(s.visible ? n.itemStyle : n.itemHiddenStyle)), T(""), A.removeClass(D), s.setState();
}).on("click", function(g) {
var m = function() {
s.setVisible && s.setVisible(), T(s.visible ? "inactive" : "");
};
A.removeClass(D), g = { browserEvent: g }, s.firePointEvent ? s.firePointEvent("legendItemClick", g, m) : b(s, "legendItemClick", g, m);
});
});
}, l.prototype.createCheckboxForItem = function(s) {
s.checkbox = u(
"input",
{ type: "checkbox", className: "highcharts-legend-checkbox", checked: s.selected, defaultChecked: s.selected },
this.options.itemCheckboxStyle,
this.chart.container
), d(s.checkbox, "click", function(t) {
b(s.series || s, "checkboxClick", { checked: t.target.checked, item: s }, function() {
s.select();
});
});
}, l;
}(), (/Trident\/7\.0/.test(I.navigator && I.navigator.userAgent) || y) && F(U.prototype, "positionItem", function(l, s) {
var t = this, o = function() {
s._legendItemPos && l.call(t, s);
};
o(), t.bubbleLegend || setTimeout(o);
}), U;
}), E(
h,
"Core/Series/SeriesRegistry.js",
[h["Core/Globals.js"], h["Core/DefaultOptions.js"], h["Core/Series/Point.js"], h["Core/Utilities.js"]],
function(y, B, I, Z) {
var F = B.defaultOptions, U = Z.error, H = Z.extendClass, W = Z.merge, R;
return function(S) {
function x(d, u) {
var P = F.plotOptions || {}, O = u.defaultOptions;
u.prototype.pointClass || (u.prototype.pointClass = I), u.prototype.type = d, O && (P[d] = O), S.seriesTypes[d] = u;
}
S.seriesTypes = y.seriesTypes, S.getSeries = function(d, u) {
u === void 0 && (u = {});
var P = d.options.chart;
P = u.type || P.type || P.defaultSeriesType || "";
var O = S.seriesTypes[P];
return S || U(17, !0, d, { missingModuleFor: P }), P = new O(), typeof P.init == "function" && P.init(d, u), P;
}, S.registerSeriesType = x, S.seriesType = function(d, u, P, O, N) {
var C = F.plotOptions || {};
return u = u || "", C[d] = W(C[u], P), x(d, H(S.seriesTypes[u] || function() {
}, O)), S.seriesTypes[d].prototype.type = d, N && (S.seriesTypes[d].prototype.pointClass = H(I, N)), S.seriesTypes[d];
};
}(R || (R = {})), R;
}
), E(h, "Core/Chart/Chart.js", [
h["Core/Animation/AnimationUtilities.js"],
h["Core/Axis/Axis.js"],
h["Core/FormatUtilities.js"],
h["Core/Foundation.js"],
h["Core/Globals.js"],
h["Core/Legend/Legend.js"],
h["Core/MSPointer.js"],
h["Core/DefaultOptions.js"],
h["Core/Pointer.js"],
h["Core/Renderer/RendererRegistry.js"],
h["Core/Series/SeriesRegistry.js"],
h["Core/Renderer/SVG/SVGRenderer.js"],
h["Core/Time.js"],
h["Core/Utilities.js"],
h["Core/Renderer/HTML/AST.js"]
], function(y, B, I, Z, F, U, H, W, R, S, x, d, u, P, O) {
var N = y.animate, C = y.animObject, b = y.setAnimation, w = I.numberFormat, v = Z.registerEventOptions, a = F.charts, c = F.doc, p = F.marginNames, i = F.svg, l = F.win, s = W.defaultOptions, t = W.defaultTime, o = x.seriesTypes, n = P.addEvent, A = P.attr, _ = P.cleanRecursively, D = P.createElement, j = P.css, T = P.defined, X = P.discardElement, g = P.erase, m = P.error, L = P.extend, Y = P.find, V = P.fireEvent, Q = P.getStyle, k = P.isArray, G = P.isNumber, z = P.isObject, $ = P.isString, q = P.merge, it = P.objectEach, et = P.pick, nt = P.pInt, rt = P.relativeLength, ct = P.removeEvent, gt = P.splat, dt = P.syncTimeout, lt = P.uniqueKey;
return y = function() {
function at(J, tt, st) {
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, st);
}
return at.chart = function(J, tt, st) {
return new at(J, tt, st);
}, at.prototype.getArgs = function(J, tt, st) {
$(J) || J.nodeName ? (this.renderTo = J, this.init(tt, st)) : this.init(J, tt);
}, at.prototype.init = function(J, tt) {
var st = J.plotOptions || {};
V(this, "init", { args: arguments }, function() {
var ht = q(s, J), pt = ht.chart;
it(ht.plotOptions, function(yt, vt) {
z(yt) && (yt.tooltip = st[vt] && q(st[vt].tooltip) || void 0);
}), ht.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 = ht, this.axes = [], this.series = [], this.time = J.time && Object.keys(J.time).length ? new u(J.time) : F.time, this.numberFormatter = pt.numberFormatter || w, this.styledMode = pt.styledMode, this.hasCartesianSeries = pt.showAxes, this.index = a.length, a.push(this), F.chartCount++, v(this, pt), this.xAxis = [], this.yAxis = [], this.pointCount = this.colorCounter = this.symbolCounter = 0, V(this, "afterInit"), this.firstRender();
});
}, at.prototype.initSeries = function(J) {
var tt = this.options.chart;
tt = J.type || tt.type || tt.defaultSeriesType;
var st = o[tt];
return st || m(17, !0, this, { missingModuleFor: tt }), tt = new st(), 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 st = tt.length; J < st; ++J)
tt[J] && (tt[J].index = J, tt[J].name = tt[J].getName());
}, at.prototype.isInsidePlot = function(J, tt, st) {
st === void 0 && (st = {});
var ht = this.inverted, pt = this.plotBox, yt = this.plotLeft, vt = this.plotTop, Ct = this.scrollablePlotBox, Pt = 0, kt = 0;
st.visiblePlotOnly && this.scrollingContainer && (kt = this.scrollingContainer, Pt = kt.scrollLeft, kt = kt.scrollTop);
var St = st.series;
if (pt = st.visiblePlotOnly && Ct || pt, Ct = st.inverted ? tt : J, tt = st.inverted ? J : tt, J = { x: Ct, y: tt, isInsidePlot: !0 }, !st.ignoreX) {
var Dt = St && (ht ? St.yAxis : St.xAxis) || { pos: yt, len: 1 / 0 };
Ct = st.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 !st.ignoreY && J.isInsidePlot && (ht = St && (ht ? St.xAxis : St.yAxis) || { pos: vt, len: 1 / 0 }, st = st.paneCoordinates ? ht.pos + tt : vt + tt, st >= Math.max(kt + vt, ht.pos) && st <= Math.min(kt + vt + pt.height, ht.pos + ht.len) || (J.isInsidePlot = !1)), V(this, "afterIsInsidePlot", J), J.isInsidePlot;
}, at.prototype.redraw = function(J) {
V(this, "beforeRedraw");
var tt = this.hasCartesianSeries ? this.axes : this.colorAxis || [], st = this.series, ht = this.pointer, pt = this.legend, yt = this.userOptions.legend, vt = this.renderer, Ct = vt.isHidden(), Pt = [], kt = this.isDirtyBox, St = this.isDirtyLegend;
for (this.setResponsive && this.setResponsive(!1), b(this.hasRendered ? J : !1, this), Ct && this.temporaryDisplay(), this.layOutTitles(), J = st.length; J--; ) {
var Dt = st[J];
if (Dt.options.stacking || Dt.options.centerInCategory) {
var Lt = !0;
if (Dt.isDirty) {
var Nt = !0;
break;
}
}
}
if (Nt)
for (J = st.length; J--; )
Dt = st[J], Dt.options.stacking && (Dt.isDirty = !0);
st.forEach(function(Et) {
Et.isDirty && (Et.options.legendType === "point" ? (typeof Et.updateTotals == "function" && Et.updateTotals(), St = !0) : yt && (yt.labelFormatter || yt.labelFormat) && (St = !0)), Et.isDirtyData && V(Et, "updatedData");
}), St && pt && pt.options.enabled && (pt.render(), this.isDirtyLegend = !1), Lt && this.getStacks(), tt.forEach(function(Et) {
Et.updateNames(), Et.setScale();
}), this.getMargins(), tt.forEach(function(Et) {
Et.isDirty && (kt = !0);
}), tt.forEach(function(Et) {
var Kt = Et.min + "," + Et.max;
Et.extKey !== Kt && (Et.extKey = Kt, Pt.push(function() {
V(Et, "afterSetExtremes", L(Et.eventArgs, Et.getExtremes())), delete Et.eventArgs;
})), (kt || Lt) && Et.redraw();
}), kt && this.drawChartBox(), V(this, "predraw"), st.forEach(function(Et) {
(kt || Et.isDirty) && Et.visible && Et.redraw(), Et.isDirtyData = !1;
}), ht && ht.reset(!0), vt.draw(), V(this, "redraw"), V(this, "render"), Ct && this.temporaryDisplay(!0), Pt.forEach(function(Et) {
Et.call();
});
}, at.prototype.get = function(J) {
function tt(yt) {
return yt.id === J || yt.options && yt.options.id === J;
}
for (var st = this.series, ht = Y(this.axes, tt) || Y(this.series, tt), pt = 0; !ht && pt < st.length; pt++)
ht = Y(st[pt].points || [], tt);
return ht;
}, at.prototype.getAxes = function() {
var J = this, tt = this.options, st = tt.xAxis = gt(tt.xAxis || {});
tt = tt.yAxis = gt(tt.yAxis || {}), V(this, "getAxes"), st.forEach(function(ht, pt) {
ht.index = pt, ht.isX = !0;
}), tt.forEach(function(ht, pt) {
ht.index = pt;
}), st.concat(tt).forEach(function(ht) {
new B(J, ht);
}), V(this, "afterGetAxes");
}, at.prototype.getSelectedPoints = function() {
return this.series.reduce(function(J, tt) {
return tt.getPointsCollection().forEach(function(st) {
et(st.selectedStaging, st.selected) && J.push(st);
}), J;
}, []);
}, at.prototype.getSelectedSeries = function() {
return this.series.filter(function(J) {
return J.selected;
});
}, at.prototype.setTitle = function(J, tt, st) {
this.applyDescription("title", J), this.applyDescription("subtitle", tt), this.applyDescription("caption", void 0), this.layOutTitles(st);
}, at.prototype.applyDescription = function(J, tt) {
var st = this, ht = J === "title" ? { color: "#333333", fontSize: this.options.isStock ? "16px" : "18px" } : { color: "#666666" };
ht = this.options[J] = q(!this.styledMode && { style: ht }, this.options[J], tt);
var pt = this[J];
pt && tt && (this[J] = pt = pt.destroy()), ht && !pt && (pt = this.renderer.text(ht.text, 0, 0, ht.useHTML).attr({ align: ht.align, class: "highcharts-" + J, zIndex: ht.zIndex || 4 }).add(), pt.update = function(yt) {
st[{ title: "setTitle", subtitle: "setSubtitle", caption: "setCaption" }[J]](yt);
}, this.styledMode || pt.css(ht.style), this[J] = pt);
}, at.prototype.layOutTitles = function(J) {
var tt = [0, 0, 0], st = this.renderer, ht = 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 kt;
if (vt) {
this.styledMode || (kt = Ct.style && Ct.style.fontSize), kt = st.fontMetrics(kt, vt).b, vt.css({ width: (Ct.width || ht.width + (Ct.widthAdjust || 0)) + "px" });
var St = Math.round(vt.getBBox(Ct.useHTML).height);
vt.align(
L({ y: Pt === "bottom" ? kt : yt + kt, 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, V(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 st = this.renderTo;
T(tt) || (this.containerWidth = Q(st, "width")), T(J) || (this.containerHeight = Q(st, "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 && (j(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), j(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, st = lt(), ht, pt = this.renderTo;
pt || (this.renderTo = pt = tt.renderTo), $(pt) && (this.renderTo = pt = c.getElementById(pt)), pt || m(13, !0, this);
var yt = nt(A(pt, "data-highcharts-chart"));
G(yt) && a[yt] && a[yt].hasRendered && a[yt].destroy(), A(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 (j(pt, { overflow: "hidden" }), this.styledMode || (ht = 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 = st = D("div", { id: st }, ht, pt), this._cursor = st.style.cursor, this.renderer = new (tt.renderer || !i ? S.getRendererType(tt.renderer) : d)(st, 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, V(this, "afterGetContainer");
}, at.prototype.getMargins = function(J) {
var tt = this.spacing, st = this.margin, ht = this.titleOffset;
this.resetMargins(), ht[0] && !T(st[0]) && (this.plotTop = Math.max(this.plotTop, ht[0] + tt[0])), ht[2] && !T(st[2]) && (this.marginBottom = Math.max(this.marginBottom, ht[2] + tt[2])), this.legend && this.legend.display && this.legend.adjustMargins(
st,
tt
), V(this, "getMargins"), J || this.getAxisMargins();
}, at.prototype.getAxisMargins = function() {
var J = this, tt = J.axisOffset = [0, 0, 0, 0], st = J.colorAxis, ht = J.margin, pt = function(yt) {
yt.forEach(function(vt) {
vt.visible && vt.getOffset();
});
};
J.hasCartesianSeries ? pt(J.axes) : st && st.length && pt(st), p.forEach(function(yt, vt) {
T(ht[vt]) || (J[yt] += tt[vt]);
}), J.setChartSize();
}, at.prototype.reflow = function(J) {
var tt = this, st = tt.options.chart, ht = tt.renderTo, pt = T(st.width) && T(st.height), yt = st.width || Q(ht, "width");
st = st.height || Q(ht, "height"), ht = J ? J.target : l, delete tt.pointer.chartPosition, !pt && !tt.isPrinting && yt && st && (ht === l || ht === c) && ((yt !== tt.containerWidth || st !== tt.containerHeight) && (P.clearTimeout(tt.reflowTimeout), tt.reflowTimeout = dt(function() {
tt.container && tt.setSize(void 0, void 0, !1);
}, J ? 100 : 0)), tt.containerWidth = yt, tt.containerHeight = st);
}, at.prototype.setReflow = function(J) {
var tt = this;
J === !1 || this.unbindReflow ? J === !1 && this.unbindReflow && (this.unbindReflow = this.unbindReflow()) : (this.unbindReflow = n(l, "resize", function(st) {
tt.options && tt.reflow(st);
}), n(this, "destroy", this.unbindReflow));
}, at.prototype.setSize = function(J, tt, st) {
var ht = this, pt = ht.renderer;
ht.isResizing += 1, b(st, ht), st = pt.globalAnimation, ht.oldChartHeight = ht.chartHeight, ht.oldChartWidth = ht.chartWidth, typeof J < "u" && (ht.options.chart.width = J), typeof tt < "u" && (ht.options.chart.height = tt), ht.getChartSize(), ht.styledMode || (st ? N : j)(ht.container, { width: ht.chartWidth + "px", height: ht.chartHeight + "px" }, st), ht.setChartSize(!0), pt.setSize(ht.chartWidth, ht.chartHeight, st), ht.axes.forEach(function(yt) {
yt.isDirty = !0, yt.setScale();
}), ht.isDirtyLegend = !0, ht.isDirtyBox = !0, ht.layOutTitles(), ht.getMargins(), ht.redraw(st), ht.oldChartHeight = null, V(ht, "resize"), dt(function() {
ht && V(ht, "endResize", null, function() {
--ht.isResizing;
});
}, C(st).duration);
}, at.prototype.setChartSize = function(J) {
var tt = this.inverted, st = this.renderer, ht = this.chartWidth, pt = this.chartHeight, yt = this.options.chart, vt = this.spacing, Ct = this.clipOffset, Pt, kt, St, Dt;
this.plotLeft = Pt = Math.round(this.plotLeft), this.plotTop = kt = Math.round(this.plotTop), this.plotWidth = St = Math.max(0, Math.round(ht - Pt - this.marginRight)), this.plotHeight = Dt = Math.max(0, Math.round(pt - kt - this.marginBottom)), this.plotSizeX = tt ? Dt : St, this.plotSizeY = tt ? St : Dt, this.plotBorderWidth = yt.plotBorderWidth || 0, this.spacingBox = st.spacingBox = { x: vt[3], y: vt[0], width: ht - vt[3] - vt[1], height: pt - vt[0] - vt[2] }, this.plotBox = st.plotBox = { x: Pt, y: kt, width: St, height: Dt }, tt = 2 * Math.floor(this.plotBorderWidth / 2), ht = Math.ceil(Math.max(tt, Ct[3]) / 2), pt = Math.ceil(Math.max(tt, Ct[0]) / 2), this.clipBox = { x: ht, y: pt, width: Math.floor(this.plotSizeX - Math.max(tt, Ct[1]) / 2 - ht), height: Math.max(0, Math.floor(this.plotSizeY - Math.max(tt, Ct[2]) / 2 - pt)) }, J || (this.axes.forEach(function(Lt) {
Lt.setAxisSize(), Lt.setAxisTranslation();
}), st.alignElements()), V(this, "afterSetChartSize", { skipAxes: J });
}, at.prototype.resetMargins = function() {
V(this, "resetMargins");
var J = this, tt = J.options.chart;
["margin", "spacing"].forEach(function(st) {
var ht = tt[st], pt = z(ht) ? ht : [ht, ht, ht, ht];
["Top", "Right", "Bottom", "Left"].forEach(function(yt, vt) {
J[st][vt] = et(tt[st + yt], pt[vt]);
});
}), p.forEach(function(st, ht) {
J[st] = et(J.margin[ht], J.spacing[ht]);
}), J.axisOffset = [0, 0, 0, 0], J.clipOffset = [0, 0, 0, 0];
}, at.prototype.drawChartBox = function() {
var J = this.options.chart, tt = this.renderer, st = this.chartWidth, ht = this.chartHeight, pt = this.styledMode, yt = this.plotBGImage, vt = J.backgroundColor, Ct = J.plotBackgroundColor, Pt = J.plotBackgroundImage, kt = this.plotLeft, St = this.plotTop, Dt = this.plotWidth, Lt = this.plotHeight, Nt = this.plotBox, Et = this.clipRect, Kt = this.clipBox, Gt = this.chartBackground, Wt = this.plotBackground, Jt = this.plotBorder, be, zt = "animate";
if (Gt || (this.chartBackground = Gt = tt.rect().addClass("highcharts-background").add(), zt = "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[zt]({ x: be / 2, y: be / 2, width: st - be - Vt % 2, height: ht - be - Vt % 2, r: J.borderRadius }), zt = "animate", Wt || (zt = "attr", this.plotBackground = Wt = tt.rect().addClass("highcharts-plot-background").add()), Wt[zt](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, kt, St, Dt, Lt).add())), Et ? Et.animate({ width: Kt.width, height: Kt.height }) : this.clipRect = tt.clipRect(Kt), zt = "animate", Jt || (zt = "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[zt](Jt.crisp({ x: kt, y: St, width: Dt, height: Lt }, -Jt.strokeWidth())), this.isDirtyBox = !1, V(this, "afterDrawChartBox");
}, at.prototype.propFromSeries = function() {
var J = this, tt = J.options.chart, st = J.options.series, ht, pt, yt;
["inverted", "angular", "polar"].forEach(function(vt) {
for (pt = o[tt.type || tt.defaultSeriesType], yt = tt[vt] || pt && pt.prototype[vt], ht = st && st.length; !yt && ht--; )
(pt = o[st[ht].type]) && pt.prototype[vt] && (yt = !0);
J[vt] = yt;
});
}, at.prototype.linkSeries = function() {
var J = this, tt = J.series;
tt.forEach(function(st) {
st.linkedSeries.length = 0;
}), tt.forEach(function(st) {
var ht = st.options.linkedTo;
$(ht) && (ht = ht === ":previous" ? J.series[st.index - 1] : J.get(ht)) && ht.linkedParent !== st && (ht.linkedSeries.push(st), st.linkedParent = ht, ht.enabledDataSorting && st.setDataSortingOptions(), st.visible = et(st.options.visible, ht.options.visible, st.visible));
}), V(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(st) {
var ht = L(tt.style, st.style), pt = nt(ht.left) + J.plotLeft, yt = nt(ht.top) + J.plotTop + 12;
delete ht.left, delete ht.top, J.renderer.text(st.html, pt, yt).attr({ zIndex: 2 }).css(ht).add();
});
}, at.prototype.render = function() {
var J = this.axes, tt = this.colorAxis, st = this.renderer, ht = this.options, pt = function(kt) {
kt.forEach(function(St) {
St.visible && St.render();
});
}, yt = 0;
this.setTitle(), this.legend = new U(this, ht.legend), this.getStacks && this.getStacks(), this.getMargins(!0), this.setChartSize(), ht = this.plotWidth, J.some(function(kt) {
if (kt.horiz && kt.visible && kt.options.labels.enabled && kt.series.length)
return yt = 21, !0;
});
var vt = this.plotHeight = Math.max(this.plotHeight - yt, 0);
J.forEach(function(kt) {
kt.setScale();
}), this.getAxisMargins();
var Ct = 1.1 < ht / this.plotWidth, Pt = 1.05 < vt / this.plotHeight;
(Ct || Pt) && (J.forEach(function(kt) {
(kt.horiz && Ct || !kt.horiz && Pt) && kt.setTickInterval(!0);
}), this.getMargins()), this.drawChartBox(), this.hasCartesianSeries ? pt(J) : tt && tt.length && pt(tt), this.seriesGroup || (this.seriesGroup = st.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, st = q(!0, this.options.credits, J);
st.enabled && !this.credits && (this.credits = this.renderer.text(st.text + (this.mapCredits || ""), 0, 0).addClass("highcharts-credits").on("click", function() {
st.href && (l.location.href = st.href);
}).attr({ align: st.position.align, zIndex: 8 }), tt.styledMode || this.credits.css(st.style), this.credits.add().align(st.position), this.credits.update = function(ht) {
tt.credits = tt.credits.destroy(), tt.addCredits(ht);
});
}, at.prototype.destroy = function() {
var J = this, tt = J.axes, st = J.series, ht = J.container, pt = ht && ht.parentNode, yt;
for (V(J, "destroy"), J.renderer.forExport ? g(a, J) : a[J.index] = void 0, F.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 = st.length; yt--; )
st[yt] = st[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());
}), ht && (ht.innerHTML = O.emptyHTML, ct(ht), pt && X(ht)), 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(), (k(tt.series) ? tt.series : []).forEach(function(st) {
J.initSeries(st);
}), J.linkSeries(), J.setSeriesData(), V(J, "beforeRender"), R && (H.isRequired() ? J.pointer = new H(J, tt) : J.pointer = new R(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), V(this, "load"), V(this, "render"), T(this.index) && this.setReflow(this.options.chart.reflow), this.hasLoaded = !0;
}, at.prototype.addSeries = function(J, tt, st) {
var ht = this, pt;
return J && (tt = et(tt, !0), V(ht, "addSeries", { options: J }, function() {
pt = ht.initSeries(J), ht.isDirtyLegend = !0, ht.linkSeries(), pt.enabledDataSorting && pt.setData(J.data, !1), V(ht, "afterAddSeries", { series: pt }), tt && ht.redraw(st);
})), pt;
}, at.prototype.addAxis = function(J, tt, st, ht) {
return this.createAxis(tt ? "xAxis" : "yAxis", { axis: J, redraw: st, animation: ht });
}, at.prototype.addColorAxis = function(J, tt, st) {
return this.createAxis("colorAxis", { axis: J, redraw: tt, animation: st });
}, at.prototype.createAxis = function(J, tt) {
return J = new B(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, st = tt.options, ht = st.loading, pt = function() {
yt && j(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 = D("div", { className: "highcharts-loading highcharts-loading-hidden" }, null, tt.container)), vt || (tt.loadingSpan = vt = D(
"span",
{ className: "highcharts-loading-inner" },
null,
yt
), n(tt, "redraw", pt)), yt.className = "highcharts-loading", O.setElementHTML(vt, et(J, st.lang.loading, "")), tt.styledMode || (j(yt, L(ht.style, { zIndex: 10 })), j(vt, ht.labelStyle), tt.loadingShown || (j(yt, { opacity: 0, display: "" }), N(yt, { opacity: ht.style.opacity || 0.5 }, { duration: ht.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 || N(tt, { opacity: 0 }, {
duration: J.loading.hideDuration || 100,
complete: function() {
j(tt, { display: "none" });
}
})), this.loadingShown = !1;
}, at.prototype.update = function(J, tt, st, ht) {
var pt = this, yt = { credits: "addCredits", title: "setTitle", subtitle: "setSubtitle", caption: "setCaption" }, vt = J.isResponsiveOptions, Ct = [], Pt, kt;
V(pt, "update", { options: J }), vt || pt.setResponsive(!1, !0), J = _(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(Lt, 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 : kt = !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 u(J.time)), q(!0, pt.options.time, J.time)), it(J, function(Lt, Nt) {
pt[Nt] && typeof pt[Nt].update == "function" ? pt[Nt].update(Lt, !1) : typeof pt[yt[Nt]] == "function" ? pt[yt[Nt]](Lt) : 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(Lt) {
if (J[Lt]) {
var Nt = [];
pt[Lt].forEach(function(Et, Kt) {
Et.options.isInternal || Nt.push(et(Et.options.index, Kt));
}), gt(J[Lt]).forEach(function(Et, Kt) {
var Gt = T(Et.id), Wt;
Gt && (Wt = pt.get(Et.id)), !Wt && pt[Lt] && (Wt = pt[Lt][Nt ? Nt[Kt] : Kt]) && Gt && T(Wt.options.id) && (Wt = void 0), Wt && Wt.coll === Lt && (Wt.update(Et, !1), st && (Wt.touched = !0)), !Wt && st && pt.collectionsWithInit[Lt] && (pt.collectionsWithInit[Lt][0].apply(pt, [Et].concat(pt.collectionsWithInit[Lt][1] || []).concat([!1])).touched = !0);
}), st && pt[Lt].forEach(function(Et) {
Et.touched || Et.options.isInternal ? delete Et.touched : Ct.push(Et);
});
}
}), Ct.forEach(function(Lt) {
Lt.chart && Lt.remove && Lt.remove(!1);
}), Dt && pt.axes.forEach(function(Lt) {
Lt.update({}, !1);
}), Pt && pt.getSeriesOrderByLinks().forEach(function(Lt) {
Lt.chart && Lt.update({}, !1);
}, this), Dt = St && St.width, St = St && ($(St.height) ? rt(St.height, Dt || pt.chartWidth) : St.height), kt || G(Dt) && Dt !== pt.chartWidth || G(St) && St !== pt.chartHeight ? pt.setSize(Dt, St, ht) : et(tt, !0) && pt.redraw(ht), V(pt, "afterUpdate", { options: J, redraw: tt, animation: ht });
}, 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, st = s.lang, ht = tt.options.chart.resetZoomButton, pt = ht.theme, yt = pt.states, vt = ht.relativeTo === "chart" || ht.relativeTo === "spacingBox" ? null : "scrollablePlotBox";
V(this, "beforeShowResetZoom", null, function() {
tt.resetZoomButton = tt.renderer.button(st.resetZoom, null, null, J, pt, yt && yt.hover).attr({ align: ht.position.align, title: st.resetZoomTitle }).addClass("highcharts-reset-zoom").add().align(ht.position, !1, vt);
}), V(this, "afterShowResetZoom");
}, at.prototype.zoomOut = function() {
V(this, "selection", { resetSelection: !0 }, this.zoom);
}, at.prototype.zoom = function(J) {
var tt = this, st = tt.pointer, ht = tt.inverted ? st.mouseDownX : st.mouseDownY, pt = !1, yt;
!J || J.resetSelection ? (tt.axes.forEach(function(Ct) {
yt = Ct.zoom();
}), st.initiated = !1) : J.xAxis.concat(J.yAxis).forEach(function(Ct) {
var Pt = Ct.axis, kt = tt.inverted ? Pt.left : Pt.top, St = tt.inverted ? kt + Pt.width : kt + Pt.height, Dt = Pt.isXAxis, Lt = !1;
(!Dt && ht >= kt && ht <= St || Dt || !T(ht)) && (Lt = !0), st[Dt ? "zoomX" : "zoomY"] && Lt && (yt = Pt.zoom(Ct.min, Ct.max), Pt.displayBtn && (pt = !0));
});
var vt = tt.resetZoomButton;
pt && !vt ? tt.showResetZoom() : !pt && z(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 st = this, ht = st.hoverPoints;
tt = typeof tt == "object" ? tt : { enabled: tt, type: "x" };
var pt = st.options.chart, yt = st.options.mapNavigation && st.options.mapNavigation.enabled;
pt && pt.panning && (pt.panning = tt);
var vt = tt.type, Ct;
V(this, "pan", { originalEvent: J }, function() {
ht && ht.forEach(function(St) {
St.setState();
});
var Pt = st.xAxis;
vt === "xy" ? Pt = Pt.concat(st.yAxis) : vt === "y" && (Pt = st.yAxis);
var kt = {};
Pt.forEach(function(St) {
if (St.options.panningEnabled && !St.options.isInternal) {
var Dt = St.horiz, Lt = J[Dt ? "chartX" : "chartY"];
Dt = Dt ? "mouseDownX" : "mouseDownY";
var Nt = st[Dt], Et = St.minPointOffset || 0, Kt = St.reversed && !st.inverted || !St.reversed && st.inverted ? -1 : 1, Gt = St.getExtremes(), Wt = St.toValue(Nt - Lt, !0) + Et * Kt, Jt = St.toValue(Nt + St.len - Lt, !0) - (Et * Kt || St.isXAxis && St.pointRangePadding || 0), be = Jt < Wt;
Kt = St.hasVerticalPanning(), Nt = be ? Jt : Wt, Wt = be ? Wt : Jt;
var zt = St.panningState;
!Kt || St.isXAxis || zt && !zt.isDirty || St.series.forEach(function(Vt) {
var Me = Vt.getProcessedData(!0);
Me = Vt.getExtremes(Me.yData, !0), zt || (zt = { startMin: Number.MAX_VALUE, startMax: -Number.MAX_VALUE }), G(Me.dataMin) && G(Me.dataMax) && (zt.startMin = Math.min(et(Vt.options.threshold, 1 / 0), Me.dataMin, zt.startMin), zt.startMax = Math.max(et(Vt.options.threshold, -1 / 0), Me.dataMax, zt.startMax));
}), Kt = Math.min(et(zt && zt.startMin, Gt.dataMin), Et ? Gt.min : St.toValue(St.toPixels(Gt.min) - St.minPixelPadding)), Jt = Math.max(et(zt && zt.startMax, Gt.dataMax), Et ? Gt.max : St.toValue(St.toPixels(Gt.max) + St.minPixelPadding)), St.panningState = zt, St.isOrdinal || (Et = Kt - Nt, 0 < Et && (Wt += Et, Nt = Kt), Et = Wt - Jt, 0 < Et && (Wt = Jt, Nt -= Et), St.series.length && Nt !== Gt.min && Wt !== Gt.max && Nt >= Kt && Wt <= Jt && (St.setExtremes(Nt, Wt, !1, !1, { trigger: "pan" }), st.resetZoomButton || yt || Nt === Kt || Wt === Jt || !vt.match("y") || (st.showResetZoom(), St.displayBtn = !1), Ct = !0), kt[Dt] = Lt);
}
}), it(kt, function(St, Dt) {
st[Dt] = St;
}), Ct && st.redraw(!1), j(st.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;
}), E(h, "Core/Legend/LegendSymbol.js", [h["Core/Utilities.js"]], function(y) {
var B = y.merge, I = y.pick, Z;
return function(F) {
F.drawLineMarker = function(U) {
var H = this.options, W = U.symbolWidth, R = U.symbolHeight, S = R / 2, x = this.chart.renderer, d = this.legendGroup;
U = U.baseline - Math.round(0.3 * U.fontMetrics.b);
var u = {}, P = H.marker;
this.chart.styledMode || (u = { "stroke-width": H.lineWidth || 0 }, H.dashStyle && (u.dashstyle = H.dashStyle)), this.legendLine = x.path([["M", 0, U], ["L", W, U]]).addClass("highcharts-graph").attr(u).add(d), P && P.enabled !== !1 && W && (H = Math.min(I(P.radius, S), S), this.symbol.indexOf("url") === 0 && (P = B(P, { width: R, height: R }), H = 0), this.legendSymbol = W = x.symbol(this.symbol, W / 2 - H, U - H, 2 * H, 2 * H, P).addClass("highcharts-point").add(d), W.isMarker = !0);
}, F.drawRectangle = function(U, H) {
var W = U.symbolHeight, R = U.options.squareSymbol;
H.legendSymbol = this.chart.renderer.rect(R ? (U.symbolWidth - W) / 2 : 0, U.baseline - W + 1, R ? W : U.symbolWidth, W, I(U.options.symbolRadius, W / 2)).addClass("highcharts-point").attr({ zIndex: 3 }).add(H.legendGroup);
};
}(Z || (Z = {})), Z;
}), E(h, "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" };
}), E(h, "Core/Series/Series.js", [
h["Core/Animation/AnimationUtilities.js"],
h["Core/DefaultOptions.js"],
h["Core/Foundation.js"],
h["Core/Globals.js"],
h["Core/Legend/LegendSymbol.js"],
h["Core/Series/Point.js"],
h["Core/Series/SeriesDefaults.js"],
h["Core/Series/SeriesRegistry.js"],
h["Core/Renderer/SVG/SVGElement.js"],
h["Core/Utilities.js"]
], function(y, B, I, Z, F, U, H, W, R, S) {
var x = y.animObject, d = y.setAnimation, u = B.defaultOptions, P = I.registerEventOptions, O = Z.hasTouch, N = Z.svg, C = Z.win, b = W.seriesTypes, w = S.addEvent, v = S.arrayMax, a = S.arrayMin, c = S.clamp, p = S.cleanRecursively, i = S.correctFloat, l = S.defined, s = S.erase, t = S.error, o = S.extend, n = S.find, A = S.fireEvent, _ = S.getNestedProperty, D = S.isArray, j = S.isNumber, T = S.isString, X = S.merge, g = S.objectEach, m = S.pick, L = S.removeEvent, Y = S.splat, V = S.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(k, G) {
A(this, "init", { options: G });
var z = this, $ = k.series;
this.eventsToUnbind = [], z.chart = k, z.options = z.setOptions(G), G = z.options, z.linkedSeries = [], z.bindAxes(), o(z, { name: G.name, state: "", visible: G.visible !== !1, selected: G.selected === !0 }), P(this, G);
var q = G.events;
(q && q.click || G.point && G.point.events && G.point.events.click || G.allowPointSelect) && (k.runTrackerClick = !0), z.getColor(), z.getSymbol(), z.parallelArrays.forEach(function(et) {
z[et + "Data"] || (z[et + "Data"] = []);
}), z.isCartesian && (k.hasCartesianSeries = !0);
var it;
$.length && (it = $[$.length - 1]), z._i = m(it && it._i, -1) + 1, z.opacity = z.options.opacity, k.orderSeries(this.insert($)), G.dataSorting && G.dataSorting.enabled ? z.setDataSortingOptions() : z.points || z.data || z.setData(G.data, !1), A(this, "afterInit");
}, Q.prototype.is = function(k) {
return b[k] && this instanceof b[k];
}, Q.prototype.insert = function(k) {
var G = this.options.index, z;
if (j(G)) {
for (z = k.length; z--; )
if (G >= m(k[z].options.index, k[z]._i)) {
k.splice(z + 1, 0, this);
break;
}
z === -1 && k.unshift(this), z += 1;
} else
k.push(this);
return m(z, k.length - 1);
}, Q.prototype.bindAxes = function() {
var k = this, G = k.options, z = k.chart, $;
A(this, "bindAxes", null, function() {
(k.axisTypes || []).forEach(function(q) {
var it = 0;
z[q].forEach(function(et) {
$ = et.options, (G[q] === it && !$.isInternal || typeof G[q] < "u" && G[q] === $.id || typeof G[q] > "u" && $.index === 0) && (k.insert(et.series), k[q] = et, et.isDirty = !0), $.isInternal || it++;
}), k[q] || k.optionalAxis === q || t(18, !0, z);
});
}), A(this, "afterBindAxes");
}, Q.prototype.updateParallelArrays = function(k, G) {
var z = k.series, $ = arguments, q = j(G) ? function(it) {
var et = it === "y" && z.toYData ? z.toYData(k) : k[it];
z[it + "Data"][G] = et;
} : function(it) {
Array.prototype[G].apply(z[it + "Data"], Array.prototype.slice.call($, 2));
};
z.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(k) {
var G = this.options, z = G.pointIntervalUnit, $ = G.relativeXValue, q = this.chart.time, it = this.xIncrement, et;
return it = m(it, G.pointStart, 0), this.pointInterval = et = m(this.pointInterval, G.pointInterval, 1), $ && j(k) && (et *= k), z && (G = new q.Date(it), z === "day" ? q.set("Date", G, q.get("Date", G) + et) : z === "month" ? q.set("Month", G, q.get("Month", G) + et) : z === "year" && q.set("FullYear", G, q.get("FullYear", G) + et), et = G.getTime() - it), $ && j(k) ? it + et : (this.xIncrement = it + et, it);
}, Q.prototype.setDataSortingOptions = function() {
var k = this.options;
o(this, { requireSorting: !1, sorted: !1, enabledDataSorting: !0, allowDG: !1 }), l(k.pointRange) || (k.pointRange = 1);
}, Q.prototype.setOptions = function(k) {
var G = this.chart, z = G.options, $ = z.plotOptions, q = G.userOptions || {};
k = X(k), G = G.styledMode;
var it = { plotOptions: $, userOptions: k };
A(this, "setOptions", it);
var et = it.plotOptions[this.type], nt = q.plotOptions || {};
return this.userOptions = it.userOptions, q = X(et, $.series, q.plotOptions && q.plotOptions[this.type], k), this.tooltipOptions = X(u.tooltip, u.plotOptions.series && u.plotOptions.series.tooltip, u.plotOptions[this.type].tooltip, z.tooltip.userOptions, $.series && $.series.tooltip, $[this.type].tooltip, k.tooltip), this.stickyTracking = m(k.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, $ = this.zones = (q.zones || []).slice(), !q.negativeColor && !q.negativeFillColor || q.zones || (z = { value: q[this.zoneAxis + "Threshold"] || q.threshold || 0, className: "highcharts-negative" }, G || (z.color = q.negativeColor, z.fillColor = q.negativeFillColor), $.push(z)), $.length && l($[$.length - 1].value) && $.push(G ? {} : { color: this.color, fillColor: this.fillColor }), A(this, "afterSetOptions", { options: q }), q;
}, Q.prototype.getName = function() {
return m(this.options.name, "Series " + (this.index + 1));
}, Q.prototype.getCyclic = function(k, G, z) {
var $ = this.chart, q = this.userOptions, it = k + "Index", et = k + "Counter", nt = z ? z.length : m($.options.chart[k + "Count"], $[k + "Count"]);
if (!G) {
var rt = m(q[it], q["_" + it]);
l(rt) || ($.series.length || ($[et] = 0), q["_" + it] = rt = $[et] % nt, $[et] += 1), z && (G = z[rt]);
}
typeof rt < "u" && (this[it] = rt), this[k] = G;
}, Q.prototype.getColor = function() {
this.chart.styledMode ? this.getCyclic("color") : this.options.colorByPoint ? this.color = "#cccccc" : this.getCyclic("color", this.options.color || u.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(k, G) {
var z = k.id, $ = k.x, q = this.points, it = this.options.dataSorting, et, nt;
if (z)
it = this.chart.get(z), it instanceof U && (et = it);
else if ((this.linkedParent || this.enabledDataSorting || this.options.relativeXValue) && (et = function(ct) {
return !ct.touched && ct.index === k.index;
}, it && it.matchByName ? et = function(ct) {
return !ct.touched && ct.name === k.name;
} : this.options.relativeXValue && (et = function(ct) {
return !ct.touched && ct.options.x === k.x;
}), et = n(q, et), !et))
return;
if (et) {
var rt = et && et.index;
typeof rt < "u" && (nt = !0);
}
return typeof rt > "u" && j($) && (rt = this.xData.indexOf($, G)), rt !== -1 && typeof rt < "u" && this.cropped && (rt = rt >= this.cropStart ? rt - this.cropStart : rt), !nt && j(rt) && q[rt] && q[rt].touched && (rt = void 0), rt;
}, Q.prototype.updateData = function(k, G) {
var z = this.options, $ = z.dataSorting, q = this.points, it = [], et = this.requireSorting, nt = k.length === q.length, rt, ct, gt, dt = !0;
if (this.xIncrement = null, k.forEach(function(lt, at) {
var J = l(lt) && this.pointClass.prototype.optionsToObject.call({ series: this }, lt) || {}, tt = J.x;
J.id || j(tt) ? (J = this.findPointIndex(J, gt), J === -1 || typeof J > "u" ? it.push(lt) : q[J] && lt !== z.data[J] ? (q[J].update(lt, !1, null, !1), q[J].touched = !0, et && (gt = J + 1)) : q[J] && (q[J].touched = !0), (!nt || at !== J || $ && $.enabled || this.hasDerivedData) && (rt = !0)) : it.push(lt);
}, this), rt)
for (k = q.length; k--; )
(ct = q[k]) && !ct.touched && ct.remove && ct.remove(!1, G);
else
!nt || $ && $.enabled ? dt = !1 : (k.forEach(function(lt, at) {
lt !== q[at].y && q[at].update && q[at].update(
lt,
!1,
null,
!1
);
}), it.length = 0);
return q.forEach(function(lt) {
lt && (lt.touched = !1);
}), dt ? (it.forEach(function(lt) {
this.addPoint(lt, !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(k, G, 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, lt = this.xData, at = this.yData, J = q.pointArrayMap;
J = J && J.length;
var tt = nt.keys, st, ht = 0, pt = 1, yt = null;
k = k || [];
var vt = k.length;
if (G = m(G, !0), ct && ct.enabled && (k = this.sortData(k)), $ !== !1 && vt && et && !q.cropped && !q.hasGroupedData && q.visible && !q.isSeriesBoosting && (st = this.updateData(k, z)), !st) {
if (q.xIncrement = null, q.colorCounter = 0, this.parallelArrays.forEach(function(Ct) {
q[Ct + "Data"].length = 0;
}), dt && vt > dt)
if (yt = q.getFirstValidPoint(k), j(yt))
for (z = 0; z < vt; z++)
lt[z] = this.autoIncrement(), at[z] = k[z];
else if (D(yt))
if (J)
if (yt.length === J)
for (z = 0; z < vt; z++)
lt[z] = this.autoIncrement(), at[z] = k[z];
else
for (z = 0; z < vt; z++)
$ = k[z], lt[z] = $[0], at[z] = $.slice(
1,
J + 1
);
else if (tt && (ht = tt.indexOf("x"), pt = tt.indexOf("y"), ht = 0 <= ht ? ht : 0, pt = 0 <= pt ? pt : 1), yt.length === 1 && (pt = 0), ht === pt)
for (z = 0; z < vt; z++)
lt[z] = this.autoIncrement(), at[z] = k[z][pt];
else
for (z = 0; z < vt; z++)
$ = k[z], lt[z] = $[ht], at[z] = $[pt];
else
t(12, !1, rt);
else
for (z = 0; z < vt; z++)
typeof k[z] < "u" && ($ = { series: q }, q.pointClass.prototype.applyOptions.apply($, [k[z]]), q.updateParallelArrays($, z));
for (at && T(at[0]) && t(14, !0, rt), q.data = [], q.options.data = q.userOptions.data = k, z = et; z--; )
it[z] && it[z].destroy && it[z].destroy();
gt && (gt.minRange = gt.userMinRange), q.isDirty = rt.isDirtyBox = !0, q.isDirtyData = !!it, z = !1;
}
nt.legendType === "point" && (this.processData(), this.generatePoints()), G && rt.redraw(z);
}, Q.prototype.sortData = function(k) {
var G = this, z = G.options.dataSorting.sortKey || "y", $ = function(q, it) {
return l(it) && q.pointClass.prototype.optionsToObject.call({ series: q }, it) || {};
};
return k.forEach(function(q, it) {
k[it] = $(G, q), k[it].index = it;
}, this), k.concat().sort(function(q, it) {
return q = _(z, q), it = _(z, it), it < q ? -1 : it > q ? 1 : 0;
}).forEach(function(q, it) {
q.x = it;
}, this), G.linkedSeries && G.linkedSeries.forEach(function(q) {
var it = q.options, et = it.data;
it.dataSorting && it.dataSorting.enabled || !et || (et.forEach(function(nt, rt) {
et[rt] = $(q, nt), k[rt] && (et[rt].x = k[rt].x, et[rt].index = rt);
}), q.setData(et, !1));
}), k;
}, Q.prototype.getProcessedData = function(k) {
var G = this.xAxis, z = this.options, $ = z.cropThreshold, q = k || this.getExtremesFromAll || z.getExtremesFromAll, it = this.isCartesian;
k = G && G.val2lin, z = !(!G || !G.logarithmic);
var et = 0, nt = this.xData, rt = this.yData, ct = this.requireSorting, gt = !1, dt = nt.length;
if (G) {
gt = G.getExtremes();
var lt = gt.min, at = gt.max;
gt = G.categories && !G.names.length;
}
if (it && this.sorted && !q && (!$ || dt > $ || this.forceCrop)) {
if (nt[dt - 1] < lt || nt[0] > at)
nt = [], rt = [];
else if (this.yData && (nt[0] < lt || nt[dt - 1] > at)) {
var J = this.cropData(this.xData, this.yData, lt, at);
nt = J.xData, rt = J.yData, et = J.start, J = !0;
}
}
for ($ = nt.length || 1; --$; )
if (G = z ? k(nt[$]) - k(nt[$ - 1]) : nt[$] - nt[$ - 1], 0 < G && (typeof tt > "u" || G < tt))
var tt = G;
else
0 > G && ct && !gt && (t(15, !1, this.chart), ct = !1);
return { xData: nt, yData: rt, cropped: J, cropStart: et, closestPointRange: tt };
}, Q.prototype.processData = function(k) {
var G = this.xAxis;
if (this.isCartesian && !this.isDirty && !G.isDirty && !this.yAxis.isDirty && !k)
return !1;
k = this.getProcessedData(), this.cropped = k.cropped, this.cropStart = k.cropStart, this.processedXData = k.xData, this.processedYData = k.yData, this.closestPointRange = this.basePointRange = k.closestPointRange, A(this, "afterProcessData");
}, Q.prototype.cropData = function(k, G, z, $, q) {
var it = k.length, et, nt = 0, rt = it;
for (q = m(q, this.cropShoulder), et = 0; et < it; et++)
if (k[et] >= z) {
nt = Math.max(0, et - q);
break;
}
for (z = et; z < it; z++)
if (k[z] > $) {
rt = z + q;
break;
}
return { xData: k.slice(nt, rt), yData: G.slice(
nt,
rt
), start: nt, end: rt };
}, Q.prototype.generatePoints = function() {
var k = this.options, G = k.data, z = this.processedXData, $ = this.processedYData, q = this.pointClass, it = z.length, et = this.cropStart || 0, nt = this.hasGroupedData, rt = k.keys, ct = [];
k = k.dataGrouping && k.dataGrouping.groupAll ? et : 0;
var gt, dt, lt = this.data;
if (!lt && !nt) {
var at = [];
at.length = G.length, lt = 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, [z[dt]].concat(Y($[dt])));
J.dataGroup = this.groupMap[k + dt], J.dataGroup.options && (J.options = J.dataGroup.options, o(J, J.dataGroup.options), delete J.dataLabels);
} else
(J = lt[at]) || typeof G[at] > "u" || (lt[at] = J = new q().init(this, G[at], z[dt]));
J && (J.index = nt ? k + dt : at, ct[dt] = J);
}
if (this.options.keys = rt, lt && (it !== (gt = lt.length) || nt))
for (dt = 0; dt < gt; dt++)
dt !== et || nt || (dt += it), lt[dt] && (lt[dt].destroyElements(), lt[dt].plotX = void 0);
this.data = lt, this.points = ct, A(this, "afterGeneratePoints");
}, Q.prototype.getXExtremes = function(k) {
return { min: a(k), max: v(k) };
}, Q.prototype.getExtremes = function(k, G) {
var z = this.xAxis, $ = this.yAxis, q = this.processedXData || this.xData, it = [], et = this.requireSorting ? this.cropShoulder : 0;
$ = $ ? $.positiveValuesOnly : !1;
var nt, rt = 0, ct = 0, gt = 0;
k = k || this.stackedYData || this.processedYData || [];
var dt = k.length;
if (z) {
var lt = z.getExtremes();
rt = lt.min, ct = lt.max;
}
for (nt = 0; nt < dt; nt++) {
var at = q[nt];
lt = k[nt];
var J = (j(lt) || D(lt)) && (lt.length || 0 < lt || !$);
if (at = G || this.getExtremesFromAll || this.options.getExtremesFromAll || this.cropped || !z || (q[nt + et] || at) >= rt && (q[nt - et] || at) <= ct, J && at)
if (J = lt.length)
for (; J--; )
j(lt[J]) && (it[gt++] = lt[J]);
else
it[gt++] = lt;
}
return k = { activeYData: it, dataMin: a(it), dataMax: v(it) }, A(this, "afterGetExtremes", { dataExtremes: k }), k;
}, Q.prototype.applyExtremes = function() {
var k = this.getExtremes();
return this.dataMin = k.dataMin, this.dataMax = k.dataMax, k;
}, Q.prototype.getFirstValidPoint = function(k) {
for (var G = k.length, z = 0, $ = null; $ === null && z < G; )
$ = k[z], z++;
return $;
}, Q.prototype.translate = function() {
this.processedXData || this.processData(), this.generatePoints();
var k = this.options, G = k.stacking, z = this.xAxis, $ = z.categories, q = this.enabledDataSorting, it = this.yAxis, et = this.points, nt = et.length, rt = this.pointPlacementToXValue(), ct = !!rt, gt = k.threshold, dt = k.startFromThreshold ? gt : 0, lt = this.zoneAxis || "y", at, J, tt = Number.MAX_VALUE;
for (at = 0; at < nt; at++) {
var st = et[at], ht = st.x, pt = void 0, yt = void 0, vt = st.y, Ct = st.low, Pt = G && it.stacking && it.stacking.stacks[(this.negStacks && vt < (dt ? 0 : gt) ? "-" : "") + this.stackKey];
if ((it.positiveValuesOnly && !it.validatePositiveValue(vt) || z.positiveValuesOnly && !z.validatePositiveValue(ht)) && (st.isNull = !0), st.plotX = J = i(c(z.translate(ht, 0, 0, 0, 1, rt, this.type === "flags"), -1e5, 1e5)), G && this.visible && Pt && Pt[ht]) {
var kt = this.getStackIndicator(
kt,
ht,
this.index
);
st.isNull || (pt = Pt[ht], yt = pt.points[kt.key]);
}
if (D(yt) && (Ct = yt[0], vt = yt[1], Ct === dt && kt.key === Pt[ht].base && (Ct = m(j(gt) && gt, it.min)), it.positiveValuesOnly && 0 >= Ct && (Ct = null), st.total = st.stackTotal = pt.total, st.percentage = pt.total && st.y / pt.total * 100, st.stackY = vt, this.irregularWidths || pt.setOffset(this.pointXOffset || 0, this.barW || 0)), st.yBottom = l(Ct) ? c(it.translate(Ct, 0, 1, 0, 1), -1e5, 1e5) : null, this.dataModify && (vt = this.dataModify.modifyValue(vt, at)), st.plotY = void 0, j(vt) && (pt = it.translate(vt, !1, !0, !1, !0), typeof pt < "u" && (st.plotY = c(
pt,
-1e5,
1e5
))), st.isInside = this.isPointInside(st), st.clientX = ct ? i(z.translate(ht, 0, 0, 0, 1, rt)) : J, st.negative = st[lt] < (k[lt + "Threshold"] || gt || 0), st.category = $ && typeof $[st.x] < "u" ? $[st.x] : st.x, !st.isNull && st.visible !== !1) {
typeof St < "u" && (tt = Math.min(tt, Math.abs(J - St)));
var St = J;
}
st.zone = this.zones.length ? st.getZone() : void 0, !st.graphic && this.group && q && (st.isNew = !0);
}
this.closestPointRangePx = tt, A(this, "afterTranslate");
}, Q.prototype.getValidPoints = function(k, G, z) {
var $ = this.chart;
return (k || this.points || []).filter(function(q) {
return G && !$.isInsidePlot(q.plotX, q.plotY, { inverted: $.inverted }) ? !1 : q.visible !== !1 && (z || !q.isNull);
});
}, Q.prototype.getClipBox = function() {
var k = this.chart, G = this.xAxis, z = this.yAxis, $ = X(k.clipBox);
return G && G.len !== k.plotSizeX && ($.width = G.len), z && z.len !== k.plotSizeY && ($.height = z.len), $;
}, Q.prototype.getSharedClipKey = function() {
return this.sharedClipKey = (this.options.xAxis || 0) + "," + (this.options.yAxis || 0);
}, Q.prototype.setClip = function() {
var k = this.chart, G = this.group, z = this.markerGroup, $ = k.sharedClips;
k = k.renderer;
var q = this.getClipBox(), it = this.getSharedClipKey(), et = $[it];
et ? et.animate(q) : $[it] = et = k.clipRect(q), G && G.clip(this.options.clip === !1 ? void 0 : et), z && z.clip();
}, Q.prototype.animate = function(k) {
var G = this.chart, z = this.group, $ = this.markerGroup, q = G.inverted, it = x(this.options.animation), et = [this.getSharedClipKey(), it.duration, it.easing, it.defer].join(), nt = G.sharedClips[et], rt = G.sharedClips[et + "m"];
if (k && z)
it = this.getClipBox(), nt ? nt.attr("height", it.height) : (it.width = 0, q && (it.x = G.plotHeight), nt = G.renderer.clipRect(it), G.sharedClips[et] = nt, rt = G.renderer.clipRect({ x: q ? (G.plotSizeX || 0) + 99 : -99, y: q ? -G.plotLeft : -G.plotTop, width: 99, height: q ? G.chartWidth : G.chartHeight }), G.sharedClips[et + "m"] = rt), z.clip(nt), $ && $.clip(rt);
else if (nt && !nt.hasClass("highcharts-animating")) {
G = this.getClipBox();
var ct = it.step;
$ && $.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(G, it);
}
}, Q.prototype.afterAnimate = function() {
var k = this;
this.setClip(), g(
this.chart.sharedClips,
function(G, z, $) {
G && !k.chart.container.querySelector('[clip-path="url(#' + G.id + ')"]') && (G.destroy(), delete $[z]);
}
), this.finishedAnimating = !0, A(this, "afterAnimate");
}, Q.prototype.drawPoints = function() {
var k = this.points, G = this.chart, z = this.options.marker, $ = this[this.specialGroup] || this.markerGroup, q = this.xAxis, it = m(z.enabled, !q || q.isRadial ? !0 : null, this.closestPointRangePx >= z.enabledThreshold * z.radius), et, nt;
if (z.enabled !== !1 || this._hasPointMarkers)
for (et = 0; et < k.length; et++) {
var rt = k[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 lt = 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 = G.renderer.symbol(lt, at.x, at.y, at.width, at.height, dt ? gt : z).add($), this.enabledDataSorting && G.hasRendered && (nt.attr({ x: rt.startXPos }), ct = "animate")), nt && ct === "animate" && nt[J ? "show" : "hide"](J).animate(at), nt && !G.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(k, G) {
var z = this.options, $ = z.marker, q = k.marker || {}, it = q.symbol || $.symbol, et = m(q.radius, $.radius);
return G && ($ = $.states[G], G = q.states && q.states[G], et = m(G && G.radius, $ && $.radius, et + ($ && $.radiusPlus || 0))), k.hasImage = it && it.indexOf("url") === 0, k.hasImage && (et = 0), k = { x: z.crisp ? Math.floor(k.plotX - et) : k.plotX - et, y: k.plotY - et }, et && (k.width = k.height = 2 * et), k;
}, Q.prototype.pointAttribs = function(k, G) {
var z = this.options.marker, $ = k && k.options, q = $ && $.marker || {}, it = $ && $.color, et = k && k.color, nt = k && k.zone && k.zone.color, rt = this.color;
return k = m(q.lineWidth, z.lineWidth), $ = 1, rt = it || nt || et || rt, it = q.fillColor || z.fillColor || rt, et = q.lineColor || z.lineColor || rt, G = G || "normal", z = z.states[G] || {}, G = q.states && q.states[G] || {}, k = m(G.lineWidth, z.lineWidth, k + m(G.lineWidthPlus, z.lineWidthPlus, 0)), it = G.fillColor || z.fillColor || it, et = G.lineColor || z.lineColor || et, $ = m(G.opacity, z.opacity, $), { stroke: et, "stroke-width": k, fill: it, opacity: $ };
}, Q.prototype.destroy = function(k) {
var G = this, z = G.chart, $ = /AppleWebKit\/533/.test(C.navigator.userAgent), q = G.data || [], it, et, nt, rt;
for (A(G, "destroy"), this.removeEvents(k), (G.axisTypes || []).forEach(function(ct) {
(rt = G[ct]) && rt.series && (s(rt.series, G), rt.isDirty = rt.forceRedraw = !0);
}), G.legendItem && G.chart.legend.destroyItem(G), et = q.length; et--; )
(nt = q[et]) && nt.destroy && nt.destroy();
G.clips && G.clips.forEach(function(ct) {
return ct.destroy();
}), S.clearTimeout(G.animationTimeout), g(G, function(ct, gt) {
ct instanceof R && !ct.survive && (it = $ && gt === "group" ? "hide" : "destroy", ct[it]());
}), z.hoverSeries === G && (z.hoverSeries = void 0), s(z.series, G), z.orderSeries(), g(G, function(ct, gt) {
k && gt === "hcEvents" || delete G[gt];
});
}, Q.prototype.applyZones = function() {
var k = this, G = this.chart, z = G.renderer, $ = this.zones, q = this.clips || [], it = this.graph, et = this.area, nt = Math.max(G.chartWidth, G.chartHeight), rt = this[(this.zoneAxis || "y") + "Axis"], ct = G.inverted, gt, dt, lt, at, J, tt, st, ht, pt = !1;
if ($.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();
$.forEach(function(Pt, kt) {
gt = yt ? vt ? G.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 ? (lt = { x: ct ? tt : J, y: 0, width: at, height: nt }, vt || (lt.x = G.plotHeight - lt.x)) : (lt = { x: 0, y: ct ? tt : J, width: nt, height: at }, vt && (lt.y = G.plotWidth - lt.y)), ct && z.isVML && (lt = rt.isXAxis ? {
x: 0,
y: yt ? J : tt,
height: lt.width,
width: G.chartWidth
} : { x: lt.y - G.plotLeft - G.spacingBox.x, y: 0, width: lt.height, height: G.chartHeight }), q[kt] ? q[kt].animate(lt) : q[kt] = z.clipRect(lt), st = k["zone-area-" + kt], ht = k["zone-graph-" + kt], it && ht && ht.clip(q[kt]), et && st && st.clip(q[kt]), pt = Pt.value > Ct.max, k.resetZones && dt === 0 && (dt = void 0);
}), this.clips = q;
} else
k.visible && (it && it.show(!0), et && et.show(!0));
}, Q.prototype.invertGroups = function(k) {
function G() {
["group", "markerGroup"].forEach(function(q) {
z[q] && ($.renderer.isVML && z[q].attr({ width: z.yAxis.len, height: z.xAxis.len }), z[q].width = z.yAxis.len, z[q].height = z.xAxis.len, z[q].invert(z.isRadialSeries ? !1 : k));
});
}
var z = this, $ = z.chart;
z.xAxis && (z.eventsToUnbind.push(w($, "resize", G)), G(), z.invertGroups = G);
}, Q.prototype.plotGroup = function(k, G, z, $, q) {
var it = this[k], et = !it;
return z = { visibility: z, zIndex: $ || 0.1 }, typeof this.opacity > "u" || this.chart.styledMode || this.state === "inactive" || (z.opacity = this.opacity), et && (this[k] = it = this.chart.renderer.g().add(q)), it.addClass("highcharts-" + G + " highcharts-series-" + this.index + " highcharts-" + this.type + "-series " + (l(this.colorIndex) ? "highcharts-color-" + this.colorIndex + " " : "") + (this.options.className || "") + (it.hasClass("highcharts-tracker") ? " highcharts-tracker" : ""), !0), it.attr(z)[et ? "attr" : "animate"](this.getPlotBox()), it;
}, Q.prototype.getPlotBox = function() {
var k = this.chart, G = this.xAxis, z = this.yAxis;
return k.inverted && (G = z, z = this.xAxis), { translateX: G ? G.left : k.plotLeft, translateY: z ? z.top : k.plotTop, scaleX: 1, scaleY: 1 };
}, Q.prototype.removeEvents = function(k) {
k || L(this), this.eventsToUnbind.length && (this.eventsToUnbind.forEach(function(G) {
G();
}), this.eventsToUnbind.length = 0);
}, Q.prototype.render = function() {
var k = this, G = k.chart, z = k.options, $ = x(z.animation), q = k.visible ? "inherit" : "hidden", it = z.zIndex, et = k.hasRendered, nt = G.seriesGroup, rt = G.inverted;
G = !k.finishedAnimating && G.renderer.isSVG ? $.duration : 0, A(this, "render");
var ct = k.plotGroup("group", "series", q, it, nt);
k.markerGroup = k.plotGroup("markerGroup", "markers", q, it, nt), z.clip !== !1 && k.setClip(), k.animate && G && k.animate(!0), ct.inverted = m(k.invertible, k.isCartesian) ? rt : !1, k.drawGraph && (k.drawGraph(), k.applyZones()), k.visible && k.drawPoints(), k.drawDataLabels && k.drawDataLabels(), k.redrawPoints && k.redrawPoints(), k.drawTracker && k.options.enableMouseTracking !== !1 && k.drawTracker(), k.invertGroups(rt), k.animate && G && k.animate(), et || (G && $.defer && (G += $.defer), k.animationTimeout = V(function() {
k.afterAnimate();
}, G || 0)), k.isDirty = !1, k.hasRendered = !0, A(k, "afterRender");
}, Q.prototype.redraw = function() {
var k = this.chart, G = this.isDirty || this.isDirtyData, z = this.group, $ = this.xAxis, q = this.yAxis;
z && (k.inverted && z.attr({
width: k.plotWidth,
height: k.plotHeight
}), z.animate({ translateX: m($ && $.left, k.plotLeft), translateY: m(q && q.top, k.plotTop) })), this.translate(), this.render(), G && delete this.kdTree;
}, Q.prototype.searchPoint = function(k, G) {
var z = this.xAxis, $ = this.yAxis, q = this.chart.inverted;
return this.searchKDTree({ clientX: q ? z.len - k.chartY + z.pos : k.chartX - z.pos, plotY: q ? $.len - k.chartX + $.pos : k.chartY - $.pos }, G, k);
}, Q.prototype.buildKDTree = function(k) {
function G(q, it, et) {
var nt = q && q.length;
if (nt) {
var rt = z.kdAxisArray[it % et];
return q.sort(function(ct, gt) {
return ct[rt] - gt[rt];
}), nt = Math.floor(nt / 2), { point: q[nt], left: G(q.slice(0, nt), it + 1, et), right: G(q.slice(nt + 1), it + 1, et) };
}
}
this.buildingKdTree = !0;
var z = this, $ = -1 < z.options.findNearestPointBy.indexOf("y") ? 2 : 1;
delete z.kdTree, V(function() {
z.kdTree = G(z.getValidPoints(null, !z.directTouch), $, $), z.buildingKdTree = !1;
}, z.options.kdNow || k && k.type === "touchstart" ? 0 : 1);
}, Q.prototype.searchKDTree = function(k, G, z) {
function $(rt, ct, gt, dt) {
var lt = ct.point, at = q.kdAxisArray[gt % dt], J = lt, tt = l(rt[it]) && l(lt[it]) ? Math.pow(rt[it] - lt[it], 2) : null, st = l(rt[et]) && l(lt[et]) ? Math.pow(rt[et] - lt[et], 2) : null;
return st = (tt || 0) + (st || 0), lt.dist = l(st) ? Math.sqrt(st) : Number.MAX_VALUE, lt.distX = l(tt) ? Math.sqrt(tt) : Number.MAX_VALUE, at = rt[at] - lt[at], st = 0 > at ? "left" : "right", tt = 0 > at ? "right" : "left", ct[st] && (st = $(rt, ct[st], gt + 1, dt), J = st[nt] < J[nt] ? st : lt), ct[tt] && Math.sqrt(at * at) < J[nt] && (rt = $(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 = G ? "distX" : "dist";
if (G = -1 < q.options.findNearestPointBy.indexOf("y") ? 2 : 1, this.kdTree || this.buildingKdTree || this.buildKDTree(z), this.kdTree)
return $(
k,
this.kdTree,
G,
G
);
}, Q.prototype.pointPlacementToXValue = function() {
var k = this.options, G = k.pointRange, z = this.xAxis;
return k = k.pointPlacement, k === "between" && (k = z.reversed ? -0.5 : 0.5), j(k) ? k * (G || z.pointRange) : 0;
}, Q.prototype.isPointInside = function(k) {
var G = this.chart, z = this.xAxis, $ = this.yAxis;
return typeof k.plotY < "u" && typeof k.plotX < "u" && 0 <= k.plotY && k.plotY <= ($ ? $.len : G.plotHeight) && 0 <= k.plotX && k.plotX <= (z ? z.len : G.plotWidth);
}, Q.prototype.drawTracker = function() {
var k = this, G = k.options, z = G.trackByArea, $ = [].concat(z ? k.areaPath : k.graphPath), q = k.chart, it = q.pointer, et = q.renderer, nt = q.options.tooltip.snap, rt = k.tracker, ct = function(dt) {
q.hoverSeries !== k && k.onMouseOver();
}, gt = "rgba(192,192,192," + (N ? 1e-4 : 2e-3) + ")";
rt ? rt.attr({ d: $ }) : k.graph && (k.tracker = et.path($).attr({ visibility: k.visible ? "visible" : "hidden", zIndex: 2 }).addClass(z ? "highcharts-tracker-area" : "highcharts-tracker-line").add(k.group), q.styledMode || k.tracker.attr({ "stroke-linecap": "round", "stroke-linejoin": "round", stroke: gt, fill: z ? gt : "none", "stroke-width": k.graph.strokeWidth() + (z ? 0 : 2 * nt) }), [k.tracker, k.markerGroup, k.dataLabelsGroup].forEach(function(dt) {
dt && (dt.addClass("highcharts-tracker").on("mouseover", ct).on("mouseout", function(lt) {
it.onTrackerMouseOut(lt);
}), G.cursor && !q.styledMode && dt.css({ cursor: G.cursor }), O) && dt.on("touchstart", ct);
})), A(this, "afterDrawTracker");
}, Q.prototype.addPoint = function(k, G, 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;
G = m(G, !0);
var lt = { series: this };
this.pointClass.prototype.applyOptions.apply(
lt,
[k]
);
var at = lt.x, J = gt.length;
if (this.requireSorting && at < gt[J - 1])
for (dt = !0; J && gt[J - 1] > at; )
J--;
this.updateParallelArrays(lt, "splice", J, 0, 0), this.updateParallelArrays(lt, J), rt && lt.name && (rt[at] = lt.name), ct.splice(J, 0, k), dt && (this.data.splice(J, 0, null), this.processData()), it.legendType === "point" && this.generatePoints(), z && (et[0] && et[0].remove ? et[0].remove(!1) : (et.shift(), this.updateParallelArrays(lt, "shift"), ct.shift())), q !== !1 && A(this, "addPoint", { point: lt }), this.isDirtyData = this.isDirty = !0, G && nt.redraw($);
}, Q.prototype.removePoint = function(k, G, z) {
var $ = this, q = $.data, it = q[k], et = $.points, nt = $.chart, rt = function() {
et && et.length === q.length && et.splice(k, 1), q.splice(k, 1), $.options.data.splice(k, 1), $.updateParallelArrays(it || { series: $ }, "splice", k, 1), it && it.destroy(), $.isDirty = !0, $.isDirtyData = !0, G && nt.redraw();
};
d(z, nt), G = m(G, !0), it ? it.firePointEvent("remove", null, rt) : rt();
}, Q.prototype.remove = function(k, G, z, $) {
function q() {
it.destroy($), et.isDirtyLegend = et.isDirtyBox = !0, et.linkSeries(), m(k, !0) && et.redraw(G);
}
var it = this, et = it.chart;
z !== !1 ? A(
it,
"remove",
null,
q
) : q();
}, Q.prototype.update = function(k, G) {
k = p(k, this.userOptions), A(this, "update", { options: k });
var z = this, $ = z.chart, q = z.userOptions, it = z.initialType || z.type, et = $.options.plotOptions, nt = b[it].prototype, rt = z.finishedAnimating && { animation: !1 }, ct = {}, gt, dt = ["eventOptions", "navigatorSeries", "baseSeries"], lt = k.type || q.type || $.options.chart.type, at = !(this.hasDerivedData || lt && lt !== this.type || typeof k.pointStart < "u" || typeof k.pointInterval < "u" || typeof k.relativeXValue < "u" || z.hasOptionChanged("dataGrouping") || z.hasOptionChanged("pointStart") || z.hasOptionChanged("pointInterval") || z.hasOptionChanged("pointIntervalUnit") || z.hasOptionChanged("keys"));
if (lt = lt || it, at && (dt.push("data", "isDirtyData", "points", "processedXData", "processedYData", "xIncrement", "cropped", "_hasPointMarkers", "_hasPointLabels", "clips", "nodes", "layout", "mapMap", "mapData", "minY", "maxY", "minX", "maxX"), k.visible !== !1 && dt.push("area", "graph"), z.parallelArrays.forEach(function(tt) {
dt.push(tt + "Data");
}), k.data && (k.dataSorting && o(z.options.dataSorting, k.dataSorting), this.setData(k.data, !1))), k = X(q, rt, { index: typeof q.index > "u" ? z.index : q.index, pointStart: m(et && et.series && et.series.pointStart, q.pointStart, z.xData[0]) }, !at && { data: z.options.data }, k), at && k.data && (k.data = z.options.data), dt = ["group", "markerGroup", "dataLabelsGroup", "transformGroup"].concat(dt), dt.forEach(function(tt) {
dt[tt] = z[tt], delete z[tt];
}), et = !1, b[lt]) {
if (et = lt !== z.type, z.remove(!1, !1, !1, !0), et)
if (Object.setPrototypeOf)
Object.setPrototypeOf(z, b[lt].prototype);
else {
rt = Object.hasOwnProperty.call(z, "hcEvents") && z.hcEvents;
for (gt in nt)
z[gt] = void 0;
o(z, b[lt].prototype), rt ? z.hcEvents = rt : delete z.hcEvents;
}
} else
t(17, !0, $, { missingModuleFor: lt });
if (dt.forEach(function(tt) {
z[tt] = dt[tt];
}), z.init($, k), at && this.points) {
var J = z.options;
J.visible === !1 ? (ct.graphic = 1, ct.dataLabel = 1) : z._hasPointLabels || (k = J.marker, nt = J.dataLabels, !k || k.enabled !== !1 && (q.marker && q.marker.symbol) === k.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 && $.legend.destroyItem(tt));
}, this);
}
z.initialType = it, $.linkSeries(), et && z.linkedSeries.length && (z.isDirtyData = !0), A(this, "afterUpdate"), m(G, !0) && $.redraw(at ? void 0 : !1);
}, Q.prototype.setName = function(k) {
this.name = this.options.name = this.userOptions.name = k, this.chart.isDirtyLegend = !0;
}, Q.prototype.hasOptionChanged = function(k) {
var G = this.options[k], z = this.chart.options.plotOptions, $ = this.userOptions[k];
return $ ? G !== $ : G !== m(
z && z[this.type] && z[this.type][k],
z && z.series && z.series[k],
G
);
}, Q.prototype.onMouseOver = function() {
var k = this.chart, G = k.hoverSeries;
k.pointer.setHoverChartIndex(), G && G !== this && G.onMouseOut(), this.options.events.mouseOver && A(this, "mouseOver"), this.setState("hover"), k.hoverSeries = this;
}, Q.prototype.onMouseOut = function() {
var k = this.options, G = this.chart, z = G.tooltip, $ = G.hoverPoint;
G.hoverSeries = null, $ && $.onMouseOut(), this && k.events.mouseOut && A(this, "mouseOut"), !z || this.stickyTracking || z.shared && !this.noSharedTooltip || z.hide(), G.series.forEach(function(q) {
q.setState(
"",
!0
);
});
}, Q.prototype.setState = function(k, G) {
var z = this, $ = z.options, q = z.graph, it = $.inactiveOtherPoints, et = $.states, nt = m(et[k || "normal"] && et[k || "normal"].animation, z.chart.options.chart.animation), rt = $.lineWidth, ct = 0, gt = $.opacity;
if (k = k || "", z.state !== k && ([z.group, z.markerGroup, z.dataLabelsGroup].forEach(function(dt) {
dt && (z.state && dt.removeClass("highcharts-series-" + z.state), k && dt.addClass("highcharts-series-" + k));
}), z.state = k, !z.chart.styledMode)) {
if (et[k] && et[k].enabled === !1)
return;
if (k && (rt = et[k].lineWidth || rt + (et[k].lineWidthPlus || 0), gt = m(et[k].opacity, gt)), q && !q.dashstyle)
for ($ = { "stroke-width": rt }, q.animate($, nt); z["zone-graph-" + ct]; )
z["zone-graph-" + ct].animate($, nt), ct += 1;
it || [z.group, z.markerGroup, z.dataLabelsGroup, z.labelBySeries].forEach(function(dt) {
dt && dt.animate({ opacity: gt }, nt);
});
}
G && it && z.points && z.setAllPointsToState(k || void 0);
}, Q.prototype.setAllPointsToState = function(k) {
this.points.forEach(function(G) {
G.setState && G.setState(k);
});
}, Q.prototype.setVisible = function(k, G) {
var z = this, $ = z.chart, q = z.legendItem, it = $.options.chart.ignoreHiddenSeries, et = z.visible, nt = (z.visible = k = z.options.visible = z.userOptions.visible = typeof k > "u" ? !et : k) ? "show" : "hide";
["group", "dataLabelsGroup", "markerGroup", "tracker", "tt"].forEach(function(rt) {
z[rt] && z[rt][nt]();
}), ($.hoverSeries === z || ($.hoverPoint && $.hoverPoint.series) === z) && z.onMouseOut(), q && $.legend.colorizeItem(z, k), z.isDirty = !0, z.options.stacking && $.series.forEach(function(rt) {
rt.options.stacking && rt.visible && (rt.isDirty = !0);
}), z.linkedSeries.forEach(function(rt) {
rt.setVisible(k, !1);
}), it && ($.isDirtyBox = !0), A(z, nt), G !== !1 && $.redraw();
}, Q.prototype.show = function() {
this.setVisible(!0);
}, Q.prototype.hide = function() {
this.setVisible(!1);
}, Q.prototype.select = function(k) {
this.selected = k = this.options.selected = typeof k > "u" ? !this.selected : k, this.checkbox && (this.checkbox.checked = k), A(this, k ? "select" : "unselect");
}, Q.prototype.shouldShowTooltip = function(k, G, z) {
return z === void 0 && (z = {}), z.series = this, z.visiblePlotOnly = !0, this.chart.isInsidePlot(k, G, z);
}, Q.defaultOptions = H, Q;
}(), o(y.prototype, { axisTypes: [
"xAxis",
"yAxis"
], coll: "series", colorCounter: 0, cropShoulder: 1, directTouch: !1, drawLegendSymbol: F.drawLineMarker, isCartesian: !0, kdAxisArray: ["clientX", "plotY"], parallelArrays: ["x", "y"], pointClass: U, requireSorting: !0, sorted: !0 }), W.series = y, y;
}), E(h, "Extensions/ScrollablePlotArea.js", [h["Core/Animation/AnimationUtilities.js"], h["Core/Axis/Axis.js"], h["Core/Chart/Chart.js"], h["Core/Series/Series.js"], h["Core/Renderer/RendererRegistry.js"], h["Core/Utilities.js"]], function(y, B, I, Z, F, U) {
var H = y.stop, W = U.addEvent, R = U.createElement, S = U.merge, x = U.pick;
W(I, "afterSetChartSize", function(d) {
var u = this.options.chart.scrollablePlotArea, P = u && u.minWidth;
if (u = u && u.minHeight, !this.renderer.forExport) {
if (P) {
if (this.scrollablePixelsX = P = Math.max(0, P - this.chartWidth)) {
this.scrollablePlotBox = this.renderer.scrollablePlotBox = S(this.plotBox), this.plotBox.width = this.plotWidth += P, this.inverted ? this.clipBox.height += P : this.clipBox.width += P;
var O = { 1: { name: "right", value: P } };
}
} else
u && (this.scrollablePixelsY = P = Math.max(
0,
u - this.chartHeight
)) && (this.scrollablePlotBox = this.renderer.scrollablePlotBox = S(this.plotBox), this.plotBox.height = this.plotHeight += P, this.inverted ? this.clipBox.width += P : this.clipBox.height += P, O = { 2: { name: "bottom", value: P } });
O && !d.skipAxes && this.axes.forEach(function(N) {
O[N.side] ? N.getPlotLinePath = function() {
var C = O[N.side].name, b = this[C];
this[C] = b - O[N.side].value;
var w = B.prototype.getPlotLinePath.apply(this, arguments);
return this[C] = b, w;
} : (N.setAxisSize(), N.setAxisTranslation());
});
}
}), W(I, "render", function() {
this.scrollablePixelsX || this.scrollablePixelsY ? (this.setUpScrolling && this.setUpScrolling(), this.applyFixed()) : this.fixedDiv && this.applyFixed();
}), I.prototype.setUpScrolling = function() {
var d = this, u = { WebkitOverflowScrolling: "touch", overflowX: "hidden", overflowY: "hidden" };
this.scrollablePixelsX && (u.overflowX = "auto"), this.scrollablePixelsY && (u.overflowY = "auto"), this.scrollingParent = R("div", { className: "highcharts-scrolling-parent" }, { position: "relative" }, this.renderTo), this.scrollingContainer = R(
"div",
{ className: "highcharts-scrolling" },
u,
this.scrollingParent
), W(this.scrollingContainer, "scroll", function() {
d.pointer && delete d.pointer.chartPosition;
}), this.innerContainer = R("div", { className: "highcharts-inner-container" }, null, this.scrollingContainer), this.innerContainer.appendChild(this.container), this.setUpScrolling = null;
}, I.prototype.moveFixedElements = function() {
var d = this.container, u = this.fixedRenderer, P = ".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 && P.push(O + ":not(.highcharts-radial-axis)", O + "-labels:not(.highcharts-radial-axis-labels)"), P.forEach(function(N) {
[].forEach.call(d.querySelectorAll(N), function(C) {
(C.namespaceURI === u.SVG_NS ? u.box : u.box.parentNode).appendChild(C), C.style.pointerEvents = "auto";
});
});
}, I.prototype.applyFixed = function() {
var d = !this.fixedDiv, u = this.options.chart, P = u.scrollablePlotArea, O = F.getRendererType();
d ? (this.fixedDiv = R("div", { className: "highcharts-fixed" }, { position: "absolute", overflow: "hidden", pointerEvents: "none", zIndex: (u.style && u.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 = u = new O(
this.fixedDiv,
this.chartWidth,
this.chartHeight,
this.options.chart.style
), this.scrollableMask = u.path().attr({ fill: this.options.chart.backgroundColor || "#fff", "fill-opacity": x(P.opacity, 0.85), zIndex: -1 }).addClass("highcharts-scrollable-mask").add(), W(this, "afterShowResetZoom", this.moveFixedElements), W(this, "afterDrilldown", this.moveFixedElements), W(this, "afterLayOutTitles", this.moveFixedElements)) : this.fixedRenderer.setSize(this.chartWidth, this.chartHeight), (this.scrollableDirty || d) && (this.scrollableDirty = !1, this.moveFixedElements()), u = this.chartWidth + (this.scrollablePixelsX || 0), O = this.chartHeight + (this.scrollablePixelsY || 0), H(this.container), this.container.style.width = u + "px", this.container.style.height = O + "px", this.renderer.boxWrapper.attr({ width: u, height: O, viewBox: [0, 0, u, O].join(" ") }), this.chartBackground.attr({ width: u, height: O }), this.scrollingContainer.style.height = this.chartHeight + "px", d && (P.scrollPositionX && (this.scrollingContainer.scrollLeft = this.scrollablePixelsX * P.scrollPositionX), P.scrollPositionY && (this.scrollingContainer.scrollTop = this.scrollablePixelsY * P.scrollPositionY)), O = this.axisOffset, d = this.plotTop - O[0] - 1, P = this.plotLeft - O[3] - 1, u = this.plotTop + this.plotHeight + O[2] + 1, O = this.plotLeft + this.plotWidth + O[1] + 1;
var N = this.plotLeft + this.plotWidth - (this.scrollablePixelsX || 0), C = this.plotTop + this.plotHeight - (this.scrollablePixelsY || 0);
d = this.scrollablePixelsX ? [["M", 0, d], ["L", this.plotLeft - 1, d], ["L", this.plotLeft - 1, u], ["L", 0, u], ["Z"], ["M", N, d], ["L", this.chartWidth, d], ["L", this.chartWidth, u], ["L", N, u], ["Z"]] : this.scrollablePixelsY ? [["M", P, 0], ["L", P, this.plotTop - 1], ["L", O, this.plotTop - 1], ["L", O, 0], ["Z"], ["M", P, C], ["L", P, this.chartHeight], ["L", O, this.chartHeight], ["L", O, C], ["Z"]] : [["M", 0, 0]], this.redrawTrigger !== "adjustHeight" && this.scrollableMask.attr({ d });
}, W(B, "afterInit", function() {
this.chart.scrollableDirty = !0;
}), W(Z, "show", function() {
this.chart.scrollableDirty = !0;
});
}), E(h, "Core/Axis/StackingAxis.js", [h["Core/Animation/AnimationUtilities.js"], h["Core/Axis/Axis.js"], h["Core/Utilities.js"]], function(y, B, I) {
var Z = y.getDeferredAnimation, F = I.addEvent, U = I.destroyObjectProperties, H = I.fireEvent, W = I.isNumber, R = I.objectEach, S;
return function(x) {
function d() {
var N = this.stacking;
if (N) {
var C = N.stacks;
R(C, function(b, w) {
U(b), C[w] = null;
}), N && N.stackTotalGroup && N.stackTotalGroup.destroy();
}
}
function u() {
this.stacking || (this.stacking = new O(this));
}
var P = [];
x.compose = function(N) {
return P.indexOf(N) === -1 && (P.push(N), F(N, "init", u), F(N, "destroy", d)), N;
};
var O = function() {
function N(C) {
this.oldStacks = {}, this.stacks = {}, this.stacksTouched = 0, this.axis = C;
}
return N.prototype.buildStacks = function() {
var C = this.axis, b = C.series, w = C.options.reversedStacks, v = b.length, a;
if (!C.isXAxis) {
for (this.usePercentage = !1, a = v; a--; ) {
var c = b[w ? a : v - a - 1];
c.setStackedPoints(), c.setGroupedPoints();
}
for (a = 0; a < v; a++)
b[a].modifyStacks();
H(C, "afterBuildStacks");
}
}, N.prototype.cleanStacks = function() {
if (!this.axis.isXAxis) {
if (this.oldStacks)
var C = this.stacks = this.oldStacks;
R(C, function(b) {
R(b, function(w) {
w.cumulative = w.total;
});
});
}
}, N.prototype.resetStacks = function() {
var C = this, b = C.stacks;
C.axis.isXAxis || R(b, function(w) {
R(
w,
function(v, a) {
W(v.touched) && v.touched < C.stacksTouched ? (v.destroy(), delete w[a]) : (v.total = null, v.cumulative = null);
}
);
});
}, N.prototype.renderStackTotals = function() {
var C = this.axis, b = C.chart, w = b.renderer, v = this.stacks;
C = Z(b, C.options.stackLabels && C.options.stackLabels.animation || !1);
var a = this.stackTotalGroup = this.stackTotalGroup || w.g("stack-labels").attr({ visibility: "visible", zIndex: 6, opacity: 0 }).add();
a.translate(b.plotLeft, b.plotTop), R(v, function(c) {
R(c, function(p) {
p.render(a);
});
}), a.animate(
{ opacity: 1 },
C
);
}, N;
}();
x.Additions = O;
}(S || (S = {})), S;
}), E(h, "Extensions/Stacking.js", [h["Core/Axis/Axis.js"], h["Core/Chart/Chart.js"], h["Core/FormatUtilities.js"], h["Core/Globals.js"], h["Core/Series/Series.js"], h["Core/Axis/StackingAxis.js"], h["Core/Utilities.js"]], function(y, B, I, Z, F, U, H) {
var W = I.format, R = H.correctFloat, S = H.defined, x = H.destroyObjectProperties, d = H.isArray, u = H.isNumber, P = H.objectEach, O = H.pick, N = function() {
function C(b, w, v, a, c) {
var p = b.chart.inverted;
this.axis = b, this.isNegative = v, this.options = w = w || {}, this.x = a, this.total = null, this.points = {}, this.hasValidPoints = !1, this.stack = c, this.rightCliff = this.leftCliff = 0, this.alignOptions = { align: w.align || (p ? v ? "left" : "right" : "center"), verticalAlign: w.verticalAlign || (p ? "middle" : v ? "bottom" : "top"), y: w.y, x: w.x }, this.textAlign = w.textAlign || (p ? v ? "right" : "left" : "center");
}
return C.prototype.destroy = function() {
x(this, this.axis);
}, C.prototype.render = function(b) {
var w = this.axis.chart, v = this.options, a = v.format;
a = a ? W(a, this, w) : v.formatter.call(this), this.label ? this.label.attr({
text: a,
visibility: "hidden"
}) : (this.label = w.renderer.label(a, null, null, v.shape, null, null, v.useHTML, !1, "stack-labels"), a = { r: v.borderRadius || 0, text: a, rotation: v.rotation, padding: O(v.padding, 5), visibility: "hidden" }, w.styledMode || (a.fill = v.backgroundColor, a.stroke = v.borderColor, a["stroke-width"] = v.borderWidth, this.label.css(v.style)), this.label.attr(a), this.label.added || this.label.add(b)), this.label.labelrank = w.plotSizeY;
}, C.prototype.setOffset = function(b, w, v, a, c) {
var p = this.axis, i = p.chart;
a = p.translate(p.stacking.usePercentage ? 100 : a || this.total, 0, 0, 0, 1), v = p.translate(v || 0), v = S(a) && Math.abs(a - v), b = O(c, i.xAxis[0].translate(this.x)) + b, p = S(a) && this.getStackBox(i, this, b, a, w, v, p), w = this.label, v = this.isNegative, b = O(this.options.overflow, "justify") === "justify";
var l = this.textAlign;
w && p && (c = w.getBBox(), a = w.padding, l = l === "left" ? i.inverted ? -a : a : l === "right" ? c.width : i.inverted && l === "center" ? c.width / 2 : i.inverted ? v ? c.width + a : -a : c.width / 2, v = i.inverted ? c.height / 2 : v ? -a : c.height, this.alignOptions.x = O(this.options.x, 0), this.alignOptions.y = O(this.options.y, 0), p.x -= l, p.y -= v, w.align(this.alignOptions, null, p), i.isInsidePlot(w.alignAttr.x + l - this.alignOptions.x, w.alignAttr.y + v - this.alignOptions.y) ? w.show() : (w.alignAttr.y = -9999, b = !1), b && F.prototype.justifyDataLabel.call(this.axis, w, this.alignOptions, w.alignAttr, c, p), w.attr({ x: w.alignAttr.x, y: w.alignAttr.y }), O(!b && this.options.crop, !0) && ((i = u(w.x) && u(w.y) && i.isInsidePlot(w.x - a + w.width, w.y) && i.isInsidePlot(w.x + a, w.y)) || w.hide()));
}, C.prototype.getStackBox = function(b, w, v, a, c, p, i) {
var l = w.axis.reversed, s = b.inverted, t = i.height + i.pos - (s ? b.plotLeft : b.plotTop);
return w = w.isNegative && !l || !w.isNegative && l, { x: s ? w ? a - i.right : a - p + i.pos - b.plotLeft : v + b.xAxis[0].transB - b.plotLeft, y: s ? i.height - v - c : w ? t - a - p : t - a, width: s ? p : c, height: s ? c : p };
}, C;
}();
return B.prototype.getStacks = function() {
var C = this, b = C.inverted;
C.yAxis.forEach(function(w) {
w.stacking && w.stacking.stacks && w.hasVisibleSeries && (w.stacking.oldStacks = w.stacking.stacks);
}), C.series.forEach(function(w) {
var v = w.xAxis && w.xAxis.options || {};
!w.options.stacking || w.visible !== !0 && C.options.chart.ignoreHiddenSeries !== !1 || (w.stackKey = [w.type, O(w.options.stack, ""), b ? v.top : v.left, b ? v.height : v.width].join());
});
}, U.compose(y), F.prototype.setGroupedPoints = function() {
var C = this.yAxis.stacking;
this.options.centerInCategory && (this.is("column") || this.is("columnrange")) && !this.options.stacking && 1 < this.chart.series.length ? F.prototype.setStackedPoints.call(this, "group") : C && P(C.stacks, function(b, w) {
w.slice(-5) === "group" && (P(b, function(v) {
return v.destroy();
}), delete C.stacks[w]);
});
}, F.prototype.setStackedPoints = function(C) {
var b = C || this.options.stacking;
if (b && (this.visible === !0 || this.chart.options.chart.ignoreHiddenSeries === !1)) {
var w = this.processedXData, v = this.processedYData, a = [], c = v.length, p = this.options, i = p.threshold, l = O(p.startFromThreshold && i, 0);
p = p.stack, C = C ? this.type + "," + b : this.stackKey;
var s = "-" + C, t = this.negStacks, o = this.yAxis, n = o.stacking.stacks, A = o.stacking.oldStacks, _, D;
for (o.stacking.stacksTouched += 1, D = 0; D < c; D++) {
var j = w[D], T = v[D], X = this.getStackIndicator(
X,
j,
this.index
), g = X.key, m = (_ = t && T < (l ? 0 : i)) ? s : C;
n[m] || (n[m] = {}), n[m][j] || (A[m] && A[m][j] ? (n[m][j] = A[m][j], n[m][j].total = null) : n[m][j] = new N(o, o.options.stackLabels, _, j, p)), m = n[m][j], T !== null ? (m.points[g] = m.points[this.index] = [O(m.cumulative, l)], S(m.cumulative) || (m.base = g), m.touched = o.stacking.stacksTouched, 0 < X.index && this.singleStacks === !1 && (m.points[g][0] = m.points[this.index + "," + j + ",0"][0])) : m.points[g] = m.points[this.index] = null, b === "percent" ? (_ = _ ? C : s, t && n[_] && n[_][j] ? (_ = n[_][j], m.total = _.total = Math.max(_.total, m.total) + Math.abs(T) || 0) : m.total = R(m.total + (Math.abs(T) || 0))) : b === "group" ? (d(T) && (T = T[0]), T !== null && (m.total = (m.total || 0) + 1)) : m.total = R(m.total + (T || 0)), m.cumulative = b === "group" ? (m.total || 1) - 1 : O(m.cumulative, l) + (T || 0), T !== null && (m.points[g].push(m.cumulative), a[D] = m.cumulative, m.hasValidPoints = !0);
}
b === "percent" && (o.stacking.usePercentage = !0), b !== "group" && (this.stackedYData = a), o.stacking.oldStacks = {};
}
}, F.prototype.modifyStacks = function() {
var C = this, b = C.stackKey, w = C.yAxis.stacking.stacks, v = C.processedXData, a, c = C.options.stacking;
C[c + "Stacker"] && [b, "-" + b].forEach(function(p) {
for (var i = v.length, l, s; i--; )
l = v[i], a = C.getStackIndicator(a, l, C.index, p), (s = (l = w[p] && w[p][l]) && l.points[a.key]) && C[c + "Stacker"](s, l, i);
});
}, F.prototype.percentStacker = function(C, b, w) {
b = b.total ? 100 / b.total : 0, C[0] = R(C[0] * b), C[1] = R(C[1] * b), this.stackedYData[w] = C[1];
}, F.prototype.getStackIndicator = function(C, b, w, v) {
return !S(C) || C.x !== b || v && C.key !== v ? C = { x: b, index: 0, key: v } : C.index++, C.key = [w, b, C.index].join(), C;
}, Z.StackItem = N, Z.StackItem;
}), E(h, "Series/Line/LineSeries.js", [h["Core/Series/Series.js"], h["Core/Series/SeriesRegistry.js"], h["Core/Utilities.js"]], function(y, B, I) {
var Z = this && this.__extends || function() {
var H = function(W, R) {
return H = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(S, x) {
S.__proto__ = x;
} || function(S, x) {
for (var d in x)
x.hasOwnProperty(d) && (S[d] = x[d]);
}, H(W, R);
};
return function(W, R) {
function S() {
this.constructor = W;
}
H(W, R), W.prototype = R === null ? Object.create(R) : (S.prototype = R.prototype, new S());
};
}(), F = I.defined, U = I.merge;
return I = function(H) {
function W() {
var R = H !== null && H.apply(this, arguments) || this;
return R.data = void 0, R.options = void 0, R.points = void 0, R;
}
return Z(W, H), W.prototype.drawGraph = function() {
var R = this, S = this.options, x = (this.gappedPath || this.getGraphPath).call(this), d = this.chart.styledMode, u = [["graph", "highcharts-graph"]];
d || u[0].push(S.lineColor || this.color || "#cccccc", S.dashStyle), u = R.getZonesGraphs(u), u.forEach(function(P, O) {
var N = P[0], C = R[N], b = C ? "animate" : "attr";
C ? (C.endX = R.preventGraphAnimation ? null : x.xMap, C.animate({ d: x })) : x.length && (R[N] = C = R.chart.renderer.path(x).addClass(P[1]).attr({ zIndex: 1 }).add(R.group)), C && !d && (N = { stroke: P[2], "stroke-width": S.lineWidth, fill: R.fillGraph && R.color || "none" }, P[3] ? N.dashstyle = P[3] : S.linecap !== "square" && (N["stroke-linecap"] = N["stroke-linejoin"] = "round"), C[b](N).shadow(2 > O && S.shadow)), C && (C.startX = x.xMap, C.isArea = x.isArea);
});
}, W.prototype.getGraphPath = function(R, S, x) {
var d = this, u = d.options, P = [], O = [], N, C = u.step;
R = R || d.points;
var b = R.reversed;
return b && R.reverse(), (C = { right: 1, center: 2 }[C] || C && 3) && b && (C = 4 - C), R = this.getValidPoints(R, !1, !(u.connectNulls && !S && !x)), R.forEach(function(w, v) {
var a = w.plotX, c = w.plotY, p = R[v - 1];
(w.leftCliff || p && p.rightCliff) && !x && (N = !0), w.isNull && !F(S) && 0 < v ? N = !u.connectNulls : w.isNull && !S ? N = !0 : (v === 0 || N ? v = [["M", w.plotX, w.plotY]] : d.getPointSpline ? v = [d.getPointSpline(R, w, v)] : C ? (v = C === 1 ? [["L", p.plotX, c]] : C === 2 ? [["L", (p.plotX + a) / 2, p.plotY], ["L", (p.plotX + a) / 2, c]] : [["L", a, p.plotY]], v.push(["L", a, c])) : v = [["L", a, c]], O.push(w.x), C && (O.push(w.x), C === 2 && O.push(w.x)), P.push.apply(P, v), N = !1);
}), P.xMap = O, d.graphPath = P;
}, W.prototype.getZonesGraphs = function(R) {
return this.zones.forEach(function(S, x) {
x = ["zone-graph-" + x, "highcharts-graph highcharts-zone-graph-" + x + " " + (S.className || "")], this.chart.styledMode || x.push(S.color || this.color, S.dashStyle || this.options.dashStyle), R.push(x);
}, this), R;
}, W.defaultOptions = U(y.defaultOptions, {}), W;
}(y), B.registerSeriesType("line", I), I;
}), E(h, "Series/Area/AreaSeries.js", [
h["Core/Color/Color.js"],
h["Core/Legend/LegendSymbol.js"],
h["Core/Series/SeriesRegistry.js"],
h["Core/Utilities.js"]
], function(y, B, I, Z) {
var F = this && this.__extends || function() {
var x = function(d, u) {
return x = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(P, O) {
P.__proto__ = O;
} || function(P, O) {
for (var N in O)
O.hasOwnProperty(N) && (P[N] = O[N]);
}, x(d, u);
};
return function(d, u) {
function P() {
this.constructor = d;
}
x(d, u), d.prototype = u === null ? Object.create(u) : (P.prototype = u.prototype, new P());
};
}(), U = y.parse, H = I.seriesTypes.line;
y = Z.extend;
var W = Z.merge, R = Z.objectEach, S = Z.pick;
return Z = function(x) {
function d() {
var u = x !== null && x.apply(this, arguments) || this;
return u.data = void 0, u.options = void 0, u.points = void 0, u;
}
return F(d, x), d.prototype.drawGraph = function() {
this.areaPath = [], x.prototype.drawGraph.apply(this);
var u = this, P = this.areaPath, O = this.options, N = [["area", "highcharts-area", this.color, O.fillColor]];
this.zones.forEach(function(C, b) {
N.push(["zone-area-" + b, "highcharts-area highcharts-zone-area-" + b + " " + C.className, C.color || u.color, C.fillColor || O.fillColor]);
}), N.forEach(function(C) {
var b = C[0], w = u[b], v = w ? "animate" : "attr", a = {};
w ? (w.endX = u.preventGraphAnimation ? null : P.xMap, w.animate({ d: P })) : (a.zIndex = 0, w = u[b] = u.chart.renderer.path(P).addClass(C[1]).add(u.group), w.isArea = !0), u.chart.styledMode || (a.fill = S(C[3], U(C[2]).setOpacity(S(O.fillOpacity, 0.75)).get())), w[v](a), w.startX = P.xMap, w.shiftUnit = O.step ? 2 : 1;
});
}, d.prototype.getGraphPath = function(u) {
var P = H.prototype.getGraphPath, O = this.options, N = O.stacking, C = this.yAxis, b, w = [], v = [], a = this.index, c = C.stacking.stacks[this.stackKey], p = O.threshold, i = Math.round(C.getThreshold(O.threshold));
O = S(O.connectNulls, N === "percent");
var l = function(n, A, _) {
var D = u[n];
n = N && c[D.x].points[a];
var j = D[_ + "Null"] || 0;
if (_ = D[_ + "Cliff"] || 0, D = !0, _ || j) {
var T = (j ? n[0] : n[1]) + _, X = n[0] + _;
D = !!j;
} else
!N && u[A] && u[A].isNull && (T = X = p);
typeof T < "u" && (v.push({ plotX: t, plotY: T === null ? i : C.getThreshold(T), isNull: D, isCliff: !0 }), w.push({ plotX: t, plotY: X === null ? i : C.getThreshold(X), doCurve: !1 }));
};
for (u = u || this.points, N && (u = this.getStackPoints(u)), b = 0; b < u.length; b++) {
N || (u[b].leftCliff = u[b].rightCliff = u[b].leftNull = u[b].rightNull = void 0);
var s = u[b].isNull, t = S(u[b].rectPlotX, u[b].plotX), o = N ? S(u[b].yBottom, i) : i;
(!s || O) && (O || l(b, b - 1, "left"), s && !N && O || (v.push(u[b]), w.push({ x: b, plotX: t, plotY: o })), O || l(b, b + 1, "right"));
}
return b = P.call(this, v, !0, !0), w.reversed = !0, s = P.call(this, w, !0, !0), (o = s[0]) && o[0] === "M" && (s[0] = ["L", o[1], o[2]]), s = b.concat(s), s.length && s.push(["Z"]), P = P.call(this, v, !1, O), s.xMap = b.xMap, this.areaPath = s, P;
}, d.prototype.getStackPoints = function(u) {
var P = this, O = [], N = [], C = this.xAxis, b = this.yAxis, w = b.stacking.stacks[this.stackKey], v = {}, a = b.series, c = a.length, p = b.options.reversedStacks ? 1 : -1, i = a.indexOf(P);
if (u = u || this.points, this.options.stacking) {
for (var l = 0; l < u.length; l++)
u[l].leftNull = u[l].rightNull = void 0, v[u[l].x] = u[l];
R(w, function(t, o) {
t.total !== null && N.push(o);
}), N.sort(function(t, o) {
return t - o;
});
var s = a.map(function(t) {
return t.visible;
});
N.forEach(function(t, o) {
var n = 0, A, _;
if (v[t] && !v[t].isNull)
O.push(v[t]), [-1, 1].forEach(function(j) {
var T = j === 1 ? "rightNull" : "leftNull", X = 0, g = w[N[o + j]];
if (g)
for (var m = i; 0 <= m && m < c; ) {
var L = a[m].index;
A = g.points[L], A || (L === P.index ? v[t][T] = !0 : s[m] && (_ = w[t].points[L]) && (X -= _[1] - _[0])), m += p;
}
v[t][j === 1 ? "rightCliff" : "leftCliff"] = X;
});
else {
for (var D = i; 0 <= D && D < c; ) {
if (A = w[t].points[a[D].index]) {
n = A[1];
break;
}
D += p;
}
n = S(n, 0), n = b.translate(n, 0, 1, 0, 1), O.push({ isNull: !0, plotX: C.translate(t, 0, 0, 0, 1), x: t, plotY: n, yBottom: n });
}
});
}
return O;
}, d.defaultOptions = W(H.defaultOptions, { threshold: 0 }), d;
}(H), y(Z.prototype, {
singleStacks: !1,
drawLegendSymbol: B.drawRectangle
}), I.registerSeriesType("area", Z), Z;
}), E(h, "Series/Spline/SplineSeries.js", [h["Core/Series/SeriesRegistry.js"], h["Core/Utilities.js"]], function(y, B) {
var I = this && this.__extends || function() {
var H = function(W, R) {
return H = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(S, x) {
S.__proto__ = x;
} || function(S, x) {
for (var d in x)
x.hasOwnProperty(d) && (S[d] = x[d]);
}, H(W, R);
};
return function(W, R) {
function S() {
this.constructor = W;
}
H(W, R), W.prototype = R === null ? Object.create(R) : (S.prototype = R.prototype, new S());
};
}(), Z = y.seriesTypes.line, F = B.merge, U = B.pick;
return B = function(H) {
function W() {
var R = H !== null && H.apply(this, arguments) || this;
return R.data = void 0, R.options = void 0, R.points = void 0, R;
}
return I(W, H), W.prototype.getPointSpline = function(R, S, x) {
var d = S.plotX || 0, u = S.plotY || 0, P = R[x - 1];
if (x = R[x + 1], P && !P.isNull && P.doCurve !== !1 && !S.isCliff && x && !x.isNull && x.doCurve !== !1 && !S.isCliff) {
R = P.plotY || 0;
var O = x.plotX || 0;
x = x.plotY || 0;
var N = 0, C = (1.5 * d + (P.plotX || 0)) / 2.5, b = (1.5 * u + R) / 2.5;
O = (1.5 * d + O) / 2.5;
var w = (1.5 * u + x) / 2.5;
O !== C && (N = (w - b) * (O - d) / (O - C) + u - w), b += N, w += N, b > R && b > u ? (b = Math.max(R, u), w = 2 * u - b) : b < R && b < u && (b = Math.min(R, u), w = 2 * u - b), w > x && w > u ? (w = Math.max(x, u), b = 2 * u - w) : w < x && w < u && (w = Math.min(x, u), b = 2 * u - w), S.rightContX = O, S.rightContY = w;
}
return S = ["C", U(P.rightContX, P.plotX, 0), U(P.rightContY, P.plotY, 0), U(C, d, 0), U(b, u, 0), d, u], P.rightContX = P.rightContY = void 0, S;
}, W.defaultOptions = F(Z.defaultOptions), W;
}(Z), y.registerSeriesType("spline", B), B;
}), E(
h,
"Series/AreaSpline/AreaSplineSeries.js",
[h["Series/Area/AreaSeries.js"], h["Series/Spline/SplineSeries.js"], h["Core/Legend/LegendSymbol.js"], h["Core/Series/SeriesRegistry.js"], h["Core/Utilities.js"]],
function(y, B, I, Z, F) {
var U = this && this.__extends || function() {
var S = function(x, d) {
return S = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(u, P) {
u.__proto__ = P;
} || function(u, P) {
for (var O in P)
P.hasOwnProperty(O) && (u[O] = P[O]);
}, S(x, d);
};
return function(x, d) {
function u() {
this.constructor = x;
}
S(x, d), x.prototype = d === null ? Object.create(d) : (u.prototype = d.prototype, new u());
};
}(), H = y.prototype, W = F.extend, R = F.merge;
return F = function(S) {
function x() {
var d = S !== null && S.apply(this, arguments) || this;
return d.data = void 0, d.points = void 0, d.options = void 0, d;
}
return U(x, S), x.defaultOptions = R(B.defaultOptions, y.defaultOptions), x;
}(B), W(F.prototype, { getGraphPath: H.getGraphPath, getStackPoints: H.getStackPoints, drawGraph: H.drawGraph, drawLegendSymbol: I.drawRectangle }), Z.registerSeriesType("areaspline", F), F;
}
), E(h, "Series/Column/ColumnSeries.js", [
h["Core/Animation/AnimationUtilities.js"],
h["Core/Color/Color.js"],
h["Core/Globals.js"],
h["Core/Legend/LegendSymbol.js"],
h["Core/Series/Series.js"],
h["Core/Series/SeriesRegistry.js"],
h["Core/Utilities.js"]
], function(y, B, I, Z, F, U, H) {
var W = this && this.__extends || function() {
var c = function(p, i) {
return c = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(l, s) {
l.__proto__ = s;
} || function(l, s) {
for (var t in s)
s.hasOwnProperty(t) && (l[t] = s[t]);
}, c(p, i);
};
return function(p, i) {
function l() {
this.constructor = p;
}
c(p, i), p.prototype = i === null ? Object.create(i) : (l.prototype = i.prototype, new l());
};
}(), R = y.animObject, S = B.parse, x = I.hasTouch;
y = I.noop;
var d = H.clamp, u = H.css, P = H.defined, O = H.extend, N = H.fireEvent, C = H.isArray, b = H.isNumber, w = H.merge, v = H.pick, a = H.objectEach;
return H = function(c) {
function p() {
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 W(p, c), p.prototype.animate = function(i) {
var l = this, s = this.yAxis, t = l.options, o = this.chart.inverted, n = {}, A = o ? "translateX" : "translateY";
if (i)
n.scaleY = 1e-3, i = d(s.toPixels(t.threshold), s.pos, s.pos + s.len), o ? n.translateX = i - s.len : n.translateY = i, l.clipBox && l.setClip(), l.group.attr(n);
else {
var _ = Number(l.group.attr(A));
l.group.animate({ scaleY: 1 }, O(R(l.options.animation), { step: function(D, j) {
l.group && (n[A] = _ + j.pos * (s.pos - _), l.group.attr(n));
} }));
}
}, p.prototype.init = function(i, l) {
c.prototype.init.apply(this, arguments);
var s = this;
i = s.chart, i.hasRendered && i.series.forEach(function(t) {
t.type === s.type && (t.isDirty = !0);
});
}, p.prototype.getColumnMetrics = function() {
var i = this, l = i.options, s = i.xAxis, t = i.yAxis, o = s.options.reversedStacks;
o = s.reversed && !o || !s.reversed && o;
var n = {}, A, _ = 0;
l.grouping === !1 ? _ = 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") {
A = X.stackKey, typeof n[A] > "u" && (n[A] = _++);
var L = n[A];
} else
m.grouping !== !1 && (L = _++);
X.columnIndex = L;
}
});
var D = Math.min(Math.abs(s.transA) * (s.ordinal && s.ordinal.slope || l.pointRange || s.closestPointRange || s.tickInterval || 1), s.len), j = D * l.groupPadding, T = (D - 2 * j) / (_ || 1);
return l = Math.min(l.maxPointWidth || s.len, v(l.pointWidth, T * (1 - 2 * l.pointPadding))), i.columnMetrics = { width: l, offset: (T - l) / 2 + (j + ((i.columnIndex || 0) + (o ? 1 : 0)) * T - D / 2) * (o ? -1 : 1), paddedWidth: T, columnCount: _ }, i.columnMetrics;
}, p.prototype.crispCol = function(i, l, s, t) {
var o = this.chart, n = this.borderWidth, A = -(n % 2 ? 0.5 : 0);
return n = n % 2 ? 0.5 : 1, o.inverted && o.renderer.isVML && (n += 1), this.options.crisp && (s = Math.round(i + s) + A, i = Math.round(i) + A, s -= i), t = Math.round(l + t) + n, A = 0.5 >= Math.abs(l) && 0.5 < t, l = Math.round(l) + n, t -= l, A && t && (--l, t += 1), { x: i, y: l, width: s, height: t };
}, p.prototype.adjustForMissingColumns = function(i, l, s, t) {
var o = this, n = this.options.stacking;
if (!s.isNull && 1 < t.columnCount) {
var A = 0, _ = 0;
a(this.yAxis.stacking && this.yAxis.stacking.stacks, function(D) {
if (typeof s.x == "number" && (D = D[s.x.toString()])) {
var j = D.points[o.index], T = D.total;
n ? (j && (A = _), D.hasValidPoints && _++) : C(j) && (A = j[1], _ = T || 0);
}
}), i = (s.plotX || 0) + ((_ - 1) * t.paddedWidth + l) / 2 - l - A * t.paddedWidth;
}
return i;
}, p.prototype.translate = function() {
var i = this, l = i.chart, s = i.options, t = i.dense = 2 > i.closestPointRange * i.xAxis.transA;
t = i.borderWidth = v(s.borderWidth, t ? 0 : 1);
var o = i.xAxis, n = i.yAxis, A = s.threshold, _ = i.translatedThreshold = n.getThreshold(A), D = v(s.minPointLength, 5), j = i.getColumnMetrics(), T = j.width, X = i.pointXOffset = j.offset, g = i.dataMin, m = i.dataMax, L = i.barW = Math.max(T, 1 + 2 * t);
l.inverted && (_ -= 0.5), s.pointPadding && (L = Math.ceil(L)), F.prototype.translate.apply(i), i.points.forEach(function(Y) {
var V = v(Y.yBottom, _), Q = 999 + Math.abs(V), k = Y.plotX || 0;
Q = d(Y.plotY, -Q, n.len + Q);
var G = Math.min(Q, V), z = Math.max(Q, V) - G, $ = T, q = k + X, it = L;
D && Math.abs(z) < D && (z = D, k = !n.reversed && !Y.negative || n.reversed && Y.negative, b(A) && b(m) && Y.y === A && m <= A && (n.min || 0) < A && (g !== m || (n.max || 0) <= A) && (k = !k), G = Math.abs(G - _) > D ? V - D : _ - (k ? D : 0)), P(Y.options.pointWidth) && ($ = it = Math.ceil(Y.options.pointWidth), q -= Math.round(($ - T) / 2)), s.centerInCategory && (q = i.adjustForMissingColumns(q, $, Y, j)), Y.barX = q, Y.pointWidth = $, Y.tooltipPos = l.inverted ? [d(n.len + n.pos - l.plotLeft - Q, n.pos - l.plotLeft, n.len + n.pos - l.plotLeft), o.len + o.pos - l.plotTop - q - it / 2, z] : [o.left - l.plotLeft + q + it / 2, d(Q + n.pos - l.plotTop, n.pos - l.plotTop, n.len + n.pos - l.plotTop), z], Y.shapeType = i.pointClass.prototype.shapeType || "rect", Y.shapeArgs = i.crispCol.apply(i, Y.isNull ? [q, _, it, 0] : [q, G, it, z]);
});
}, p.prototype.drawGraph = function() {
this.group[this.dense ? "addClass" : "removeClass"]("highcharts-dense-data");
}, p.prototype.pointAttribs = function(i, l) {
var s = this.options, t = this.pointAttrToOptions || {}, o = t.stroke || "borderColor", n = t["stroke-width"] || "borderWidth", A = i && i.color || this.color, _ = i && i[o] || s[o] || A;
t = i && i.options.dashStyle || s.dashStyle;
var D = i && i[n] || s[n] || this[n] || 0, j = v(i && i.opacity, s.opacity, 1);
if (i && this.zones.length) {
var T = i.getZone();
A = i.options.color || T && (T.color || i.nonZonedColor) || this.color, T && (_ = T.borderColor || _, t = T.dashStyle || t, D = T.borderWidth || D);
}
return l && i && (i = w(s.states[l], i.options.states && i.options.states[l] || {}), l = i.brightness, A = i.color || typeof l < "u" && S(A).brighten(i.brightness).get() || A, _ = i[o] || _, D = i[n] || D, t = i.dashStyle || t, j = v(i.opacity, j)), o = { fill: A, stroke: _, "stroke-width": D, opacity: j }, t && (o.dashstyle = t), o;
}, p.prototype.drawPoints = function() {
var i = this, l = this.chart, s = i.options, t = l.renderer, o = s.animationLimit || 250, n;
i.points.forEach(function(A) {
var _ = A.graphic, D = !!_, j = _ && l.pointCount < o ? "animate" : "attr";
b(A.plotY) && A.y !== null ? (n = A.shapeArgs, _ && A.hasNewShapeType() && (_ = _.destroy()), i.enabledDataSorting && (A.startXPos = i.xAxis.reversed ? -(n && n.width || 0) : i.xAxis.width), _ || (A.graphic = _ = t[A.shapeType](n).add(A.group || i.group)) && i.enabledDataSorting && l.hasRendered && l.pointCount < o && (_.attr({ x: A.startXPos }), D = !0, j = "animate"), _ && D && _[j](w(n)), s.borderRadius && _[j]({ r: s.borderRadius }), l.styledMode || _[j](i.pointAttribs(A, A.selected && "select")).shadow(A.allowShadow !== !1 && s.shadow, null, s.stacking && !s.borderRadius), _ && (_.addClass(A.getClassName(), !0), _.attr({ visibility: A.visible ? "inherit" : "hidden" }))) : _ && (A.graphic = _.destroy());
});
}, p.prototype.drawTracker = function() {
var i = this, l = i.chart, s = l.pointer, t = function(n) {
var A = s.getPointFromEvent(n);
typeof A < "u" && (s.isDirectTouch = !0, A.onMouseOver(n));
}, o;
i.points.forEach(function(n) {
o = C(n.dataLabels) ? n.dataLabels : n.dataLabel ? [n.dataLabel] : [], n.graphic && (n.graphic.element.point = n), o.forEach(function(A) {
A.div ? A.div.point = n : A.element.point = n;
});
}), i._hasTracking || (i.trackerGroups.forEach(function(n) {
i[n] && (i[n].addClass("highcharts-tracker").on("mouseover", t).on("mouseout", function(A) {
s.onTrackerMouseOut(A);
}), x && i[n].on(
"touchstart",
t
), !l.styledMode && i.options.cursor && i[n].css(u).css({ cursor: i.options.cursor }));
}), i._hasTracking = !0), N(this, "afterDrawTracker");
}, p.prototype.remove = function() {
var i = this, l = i.chart;
l.hasRendered && l.series.forEach(function(s) {
s.type === i.type && (s.isDirty = !0);
}), F.prototype.remove.apply(i, arguments);
}, p.defaultOptions = w(F.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" }), p;
}(F), O(H.prototype, { cropShoulder: 0, directTouch: !0, drawLegendSymbol: Z.drawRectangle, getSymbol: y, negStacks: !0, trackerGroups: ["group", "dataLabelsGroup"] }), U.registerSeriesType("column", H), H;
}), E(h, "Core/Series/DataLabel.js", [
h["Core/Animation/AnimationUtilities.js"],
h["Core/FormatUtilities.js"],
h["Core/Utilities.js"]
], function(y, B, I) {
var Z = y.getDeferredAnimation, F = B.format, U = I.defined, H = I.extend, W = I.fireEvent, R = I.isArray, S = I.merge, x = I.objectEach, d = I.pick, u = I.splat, P;
return function(O) {
function N(p, i, l, s, t) {
var o = this, n = this.chart, A = this.isCartesian && n.inverted, _ = this.enabledDataSorting, D = d(p.dlBox && p.dlBox.centerX, p.plotX, -9999), j = d(p.plotY, -9999), T = i.getBBox(), X = l.rotation, g = l.align, m = n.isInsidePlot(D, Math.round(j), { inverted: A, paneCoordinates: !0, series: o }), L = function(k) {
_ && o.xAxis && !Y && o.setDataLabelStartPos(
p,
i,
t,
m,
k
);
}, Y = d(l.overflow, _ ? "none" : "justify") === "justify", V = this.visible && p.visible !== !1 && (p.series.forceDL || _ && !Y || m || d(l.inside, !!this.options.stacking) && s && n.isInsidePlot(D, A ? s.x + 1 : s.y + s.height - 1, { inverted: A, paneCoordinates: !0, series: o }));
if (V) {
var Q = n.renderer.fontMetrics(n.styledMode ? void 0 : l.style.fontSize, i).b;
s = H({ x: A ? this.yAxis.len - j : D, y: Math.round(A ? this.xAxis.len - D : j), width: 0, height: 0 }, s), H(l, { width: T.width, height: T.height }), X ? (Y = !1, D = n.renderer.rotCorr(Q, X), D = { x: s.x + (l.x || 0) + s.width / 2 + D.x, y: s.y + (l.y || 0) + { top: 0, middle: 0.5, bottom: 1 }[l.verticalAlign] * s.height }, L(D), i[t ? "attr" : "animate"](D).attr({ align: g }), L = (X + 720) % 360, L = 180 < L && 360 > L, g === "left" ? D.y -= L ? T.height : 0 : g === "center" ? (D.x -= T.width / 2, D.y -= T.height / 2) : g === "right" && (D.x -= T.width, D.y -= L ? 0 : T.height), i.placed = !0, i.alignAttr = D) : (L(s), i.align(l, void 0, s), D = i.alignAttr), Y && 0 <= s.height ? this.justifyDataLabel(i, l, D, T, s, t) : d(l.crop, !0) && (V = n.isInsidePlot(D.x, D.y, { paneCoordinates: !0, series: o }) && n.isInsidePlot(D.x + T.width, D.y + T.height, {
paneCoordinates: !0,
series: o
})), l.shape && !X && i[t ? "attr" : "animate"]({ anchorX: A ? n.plotWidth - p.plotY : p.plotX, anchorY: A ? n.plotHeight - p.plotX : p.plotY });
}
t && _ && (i.placed = !1), V || _ && !Y || (i.hide(!0), i.placed = !1);
}
function C(p, i) {
var l = i.filter;
return l ? (i = l.operator, p = p[l.property], l = l.value, i === ">" && p > l || i === "<" && p < l || i === ">=" && p >= l || i === "<=" && p <= l || i === "==" && p == l || i === "===" && p === l) : !0;
}
function b() {
var p = this, i = p.chart, l = p.options, s = p.points, t = p.hasRendered || 0, o = i.renderer, n = l.dataLabels, A, _ = n.animation;
if (_ = n.defer ? Z(
i,
_,
p
) : { 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[p.type] && i.options.plotOptions[p.type].dataLabels), n), W(this, "drawDataLabels"), R(n) || n.enabled || p._hasPointLabels) {
var D = p.plotGroup("dataLabelsGroup", "data-labels", t ? "inherit" : "hidden", n.zIndex || 6);
D.attr({ opacity: +t }), !t && (t = p.dataLabelsGroup) && (p.visible && D.show(!0), t[l.animation ? "animate" : "attr"]({ opacity: 1 }, _)), s.forEach(function(j) {
A = u(v(n, j.dlOptions || j.options && j.options.dataLabels)), A.forEach(function(T, X) {
var g = T.enabled && (!j.isNull || j.dataLabelOnNull) && C(j, T), m = j.connectors ? j.connectors[X] : j.connector, L = j.dataLabels ? j.dataLabels[X] : j.dataLabel, Y = d(T.distance, j.labelDistance), V = !L;
if (g) {
var Q = j.getLabelConfig(), k = d(T[j.formatPrefix + "Format"], T.format);
Q = U(k) ? F(k, Q, i) : (T[j.formatPrefix + "Formatter"] || T.formatter).call(Q, T), k = T.style;
var G = T.rotation;
i.styledMode || (k.color = d(T.color, k.color, p.color, "#000000"), k.color === "contrast" ? (j.contrastColor = o.getContrast(j.color || p.color), k.color = !U(Y) && T.inside || 0 > Y || l.stacking ? j.contrastColor : "#000000") : delete j.contrastColor, l.cursor && (k.cursor = l.cursor));
var z = { r: T.borderRadius || 0, rotation: G, padding: T.padding, zIndex: 1 };
i.styledMode || (z.fill = T.backgroundColor, z.stroke = T.borderColor, z["stroke-width"] = T.borderWidth), x(z, function($, q) {
typeof $ > "u" && delete z[q];
});
}
!L || g && U(Q) && !!L.div == !!T.useHTML || (j.dataLabel = L = j.dataLabel && j.dataLabel.destroy(), j.dataLabels && (j.dataLabels.length === 1 ? delete j.dataLabels : delete j.dataLabels[X]), X || delete j.dataLabel, m && (j.connector = j.connector.destroy(), j.connectors && (j.connectors.length === 1 ? delete j.connectors : delete j.connectors[X]))), g && U(Q) && (L ? z.text = Q : (j.dataLabels = j.dataLabels || [], L = j.dataLabels[X] = G ? o.text(Q, 0, -9999, T.useHTML).addClass("highcharts-data-label") : o.label(Q, 0, -9999, T.shape, null, null, T.useHTML, null, "data-label"), X || (j.dataLabel = L), L.addClass(" highcharts-data-label-color-" + j.colorIndex + " " + (T.className || "") + (T.useHTML ? " highcharts-tracker" : ""))), L.options = T, L.attr(z), i.styledMode || L.css(k).shadow(T.shadow), L.added || L.add(D), T.textPath && !T.useHTML && (L.setTextPath(j.getDataLabelPath && j.getDataLabelPath(L) || j.graphic, T.textPath), j.dataLabelPath && !T.textPath.enabled && (j.dataLabelPath = j.dataLabelPath.destroy())), p.alignDataLabel(j, L, T, null, V));
});
});
}
W(this, "afterDrawDataLabels");
}
function w(p, i, l, s, t, o) {
var n = this.chart, A = i.align, _ = i.verticalAlign, D = p.box ? 0 : p.padding || 0, j = i.x;
j = j === void 0 ? 0 : j;
var T = i.y;
T = T === void 0 ? 0 : T;
var X = (l.x || 0) + D;
if (0 > X) {
A === "right" && 0 <= j ? (i.align = "left", i.inside = !0) : j -= X;
var g = !0;
}
return X = (l.x || 0) + s.width - D, X > n.plotWidth && (A === "left" && 0 >= j ? (i.align = "right", i.inside = !0) : j += n.plotWidth - X, g = !0), X = l.y + D, 0 > X && (_ === "bottom" && 0 <= T ? (i.verticalAlign = "top", i.inside = !0) : T -= X, g = !0), X = (l.y || 0) + s.height - D, X > n.plotHeight && (_ === "top" && 0 >= T ? (i.verticalAlign = "bottom", i.inside = !0) : T += n.plotHeight - X, g = !0), g && (i.x = j, i.y = T, p.placed = !o, p.align(i, void 0, t)), g;
}
function v(p, i) {
var l = [], s;
if (R(p) && !R(i))
l = p.map(function(t) {
return S(t, i);
});
else if (R(i) && !R(p))
l = i.map(function(t) {
return S(p, t);
});
else if (R(p) || R(i))
for (s = Math.max(p.length, i.length); s--; )
l[s] = S(p[s], i[s]);
else
l = S(p, i);
return l;
}
function a(p, i, l, s, t) {
var o = this.chart, n = o.inverted, A = this.xAxis, _ = A.reversed, D = n ? i.height / 2 : i.width / 2;
p = (p = p.pointWidth) ? p / 2 : 0, i.startXPos = n ? t.x : _ ? -D - p : A.width - D + p, i.startYPos = n ? _ ? this.yAxis.height - D + p : -D - p : t.y, s ? i.visibility === "hidden" && (i.show(), i.attr({ opacity: 0 }).animate({ opacity: 1 })) : i.attr({ opacity: 1 }).animate(
{ opacity: 0 },
void 0,
i.hide
), o.hasRendered && (l && i.attr({ x: i.startXPos, y: i.startYPos }), i.placed = !0);
}
var c = [];
O.compose = function(p) {
if (c.indexOf(p) === -1) {
var i = p.prototype;
c.push(p), i.alignDataLabel = N, i.drawDataLabels = b, i.justifyDataLabel = w, i.setDataLabelStartPos = a;
}
};
}(P || (P = {})), P;
}), E(h, "Series/Column/ColumnDataLabel.js", [h["Core/Series/DataLabel.js"], h["Core/Series/SeriesRegistry.js"], h["Core/Utilities.js"]], function(y, B, I) {
var Z = B.series, F = I.merge, U = I.pick, H;
return function(W) {
function R(x, d, u, P, O) {
var N = this.chart.inverted, C = x.series, b = (C.xAxis ? C.xAxis.len : this.chart.plotSizeX) || 0;
C = (C.yAxis ? C.yAxis.len : this.chart.plotSizeY) || 0;
var w = x.dlBox || x.shapeArgs, v = U(x.below, x.plotY > U(this.translatedThreshold, C)), a = U(u.inside, !!this.options.stacking);
w && (P = F(w), 0 > P.y && (P.height += P.y, P.y = 0), w = P.y + P.height - C, 0 < w && w < P.height && (P.height -= w), N && (P = { x: C - P.y - P.height, y: b - P.x - P.width, width: P.height, height: P.width }), a || (N ? (P.x += v ? 0 : P.width, P.width = 0) : (P.y += v ? P.height : 0, P.height = 0))), u.align = U(u.align, !N || a ? "center" : v ? "right" : "left"), u.verticalAlign = U(u.verticalAlign, N || a ? "middle" : v ? "top" : "bottom"), Z.prototype.alignDataLabel.call(this, x, d, u, P, O), u.inside && x.contrastColor && d.css({ color: x.contrastColor });
}
var S = [];
W.compose = function(x) {
y.compose(Z), S.indexOf(x) === -1 && (S.push(x), x.prototype.alignDataLabel = R);
};
}(H || (H = {})), H;
}), E(h, "Series/Bar/BarSeries.js", [h["Series/Column/ColumnSeries.js"], h["Core/Series/SeriesRegistry.js"], h["Core/Utilities.js"]], function(y, B, I) {
var Z = this && this.__extends || function() {
var H = function(W, R) {
return H = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(S, x) {
S.__proto__ = x;
} || function(S, x) {
for (var d in x)
x.hasOwnProperty(d) && (S[d] = x[d]);
}, H(W, R);
};
return function(W, R) {
function S() {
this.constructor = W;
}
H(W, R), W.prototype = R === null ? Object.create(R) : (S.prototype = R.prototype, new S());
};
}(), F = I.extend, U = I.merge;
return I = function(H) {
function W() {
var R = H !== null && H.apply(this, arguments) || this;
return R.data = void 0, R.options = void 0, R.points = void 0, R;
}
return Z(W, H), W.defaultOptions = U(
y.defaultOptions,
{}
), W;
}(y), F(I.prototype, { inverted: !0 }), B.registerSeriesType("bar", I), I;
}), E(h, "Series/Scatter/ScatterSeries.js", [h["Series/Column/ColumnSeries.js"], h["Series/Line/LineSeries.js"], h["Core/Series/SeriesRegistry.js"], h["Core/Utilities.js"]], function(y, B, I, Z) {
var F = this && this.__extends || function() {
var R = function(S, x) {
return R = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d, u) {
d.__proto__ = u;
} || function(d, u) {
for (var P in u)
u.hasOwnProperty(P) && (d[P] = u[P]);
}, R(S, x);
};
return function(S, x) {
function d() {
this.constructor = S;
}
R(S, x), S.prototype = x === null ? Object.create(x) : (d.prototype = x.prototype, new d());
};
}(), U = Z.addEvent, H = Z.extend, W = Z.merge;
return Z = function(R) {
function S() {
var x = R !== null && R.apply(this, arguments) || this;
return x.data = void 0, x.options = void 0, x.points = void 0, x;
}
return F(S, R), S.prototype.applyJitter = function() {
var x = this, d = this.options.jitter, u = this.points.length;
d && this.points.forEach(function(P, O) {
["x", "y"].forEach(function(N, C) {
var b = "plot" + N.toUpperCase();
if (d[N] && !P.isNull) {
var w = x[N + "Axis"], v = d[N] * w.transA;
if (w && !w.isLog) {
var a = Math.max(0, P[b] - v);
w = Math.min(w.len, P[b] + v), C = 1e4 * Math.sin(O + C * u), P[b] = a + (w - a) * (C - Math.floor(C)), N === "x" && (P.clientX = P.plotX);
}
}
});
});
}, S.prototype.drawGraph = function() {
this.options.lineWidth ? R.prototype.drawGraph.call(this) : this.graph && (this.graph = this.graph.destroy());
}, S.defaultOptions = W(B.defaultOptions, { lineWidth: 0, findNearestPointBy: "xy", jitter: { x: 0, y: 0 }, marker: { enabled: !0 }, tooltip: {
headerFormat: '● {series.name}
',
pointFormat: "x: {point.x}
y: {point.y}
"
} }), S;
}(B), H(Z.prototype, { drawTracker: y.prototype.drawTracker, sorted: !1, requireSorting: !1, noSharedTooltip: !0, trackerGroups: ["group", "markerGroup", "dataLabelsGroup"], takeOrdinalPosition: !1 }), U(Z, "afterTranslate", function() {
this.applyJitter();
}), I.registerSeriesType("scatter", Z), Z;
}), E(h, "Series/CenteredUtilities.js", [h["Core/Globals.js"], h["Core/Series/Series.js"], h["Core/Utilities.js"]], function(y, B, I) {
var Z = y.deg2rad, F = I.isNumber, U = I.pick, H = I.relativeLength, W;
return function(R) {
R.getCenter = function() {
var S = this.options, x = this.chart, d = 2 * (S.slicedOffset || 0), u = x.plotWidth - 2 * d, P = x.plotHeight - 2 * d, O = S.center, N = Math.min(u, P), C = S.size, b = S.innerSize || 0;
for (typeof C == "string" && (C = parseFloat(C)), typeof b == "string" && (b = parseFloat(b)), S = [U(O[0], "50%"), U(O[1], "50%"), U(C && 0 > C ? void 0 : S.size, "100%"), U(b && 0 > b ? void 0 : S.innerSize || 0, "0%")], !x.angular || this instanceof B || (S[3] = 0), O = 0; 4 > O; ++O)
C = S[O], x = 2 > O || O === 2 && /%$/.test(C), S[O] = H(C, [u, P, N, S[2]][O]) + (x ? d : 0);
return S[3] > S[2] && (S[3] = S[2]), S;
}, R.getStartAndEndRadians = function(S, x) {
return S = F(S) ? S : 0, x = F(x) && x > S && 360 > x - S ? x : S + 360, { start: Z * (S + -90), end: Z * (x + -90) };
};
}(W || (W = {})), W;
}), E(h, "Series/Pie/PiePoint.js", [h["Core/Animation/AnimationUtilities.js"], h["Core/Series/Point.js"], h["Core/Utilities.js"]], function(y, B, I) {
var Z = this && this.__extends || function() {
var x = function(d, u) {
return x = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(P, O) {
P.__proto__ = O;
} || function(P, O) {
for (var N in O)
O.hasOwnProperty(N) && (P[N] = O[N]);
}, x(d, u);
};
return function(d, u) {
function P() {
this.constructor = d;
}
x(d, u), d.prototype = u === null ? Object.create(u) : (P.prototype = u.prototype, new P());
};
}(), F = y.setAnimation, U = I.addEvent, H = I.defined;
y = I.extend;
var W = I.isNumber, R = I.pick, S = I.relativeLength;
return B = function(x) {
function d() {
var u = x !== null && x.apply(this, arguments) || this;
return u.labelDistance = void 0, u.options = void 0, u.series = void 0, u;
}
return Z(d, x), d.prototype.getConnectorPath = function() {
var u = this.labelPosition, P = this.series.options.dataLabels, O = this.connectorShapes, N = P.connectorShape;
return O[N] && (N = O[N]), N.call(this, { x: u.final.x, y: u.final.y, alignment: u.alignment }, u.connectorPosition, P);
}, d.prototype.getTranslate = function() {
return this.sliced ? this.slicedTranslation : { translateX: 0, translateY: 0 };
}, d.prototype.haloPath = function(u) {
var P = this.shapeArgs;
return this.sliced || !this.visible ? [] : this.series.chart.renderer.symbols.arc(P.x, P.y, P.r + u, P.r + u, { innerR: P.r - 1, start: P.start, end: P.end });
}, d.prototype.init = function() {
var u = this;
x.prototype.init.apply(
this,
arguments
), this.name = R(this.name, "Slice");
var P = function(O) {
u.slice(O.type === "select");
};
return U(this, "select", P), U(this, "unselect", P), this;
}, d.prototype.isValid = function() {
return W(this.y) && 0 <= this.y;
}, d.prototype.setVisible = function(u, P) {
var O = this, N = this.series, C = N.chart, b = N.options.ignoreHiddenPoint;
P = R(P, b), u !== this.visible && (this.visible = this.options.visible = u = typeof u > "u" ? !this.visible : u, N.options.data[N.data.indexOf(this)] = this.options, ["graphic", "dataLabel", "connector", "shadowGroup"].forEach(function(w) {
O[w] && O[w][u ? "show" : "hide"](u);
}), this.legendItem && C.legend.colorizeItem(this, u), u || this.state !== "hover" || this.setState(""), b && (N.isDirty = !0), P && C.redraw());
}, d.prototype.slice = function(u, P, O) {
var N = this.series;
F(O, N.chart), R(P, !0), this.sliced = this.options.sliced = H(u) ? u : !this.sliced, N.options.data[N.data.indexOf(this)] = this.options, this.graphic && this.graphic.animate(this.getTranslate()), this.shadowGroup && this.shadowGroup.animate(this.getTranslate());
}, d;
}(B), y(B.prototype, { connectorShapes: { fixedOffset: function(x, d, u) {
var P = d.breakAt;
return d = d.touchingSliceAt, [["M", x.x, x.y], u.softConnector ? ["C", x.x + (x.alignment === "left" ? -5 : 5), x.y, 2 * P.x - d.x, 2 * P.y - d.y, P.x, P.y] : ["L", P.x, P.y], ["L", d.x, d.y]];
}, straight: function(x, d) {
return d = d.touchingSliceAt, [["M", x.x, x.y], ["L", d.x, d.y]];
}, crookedLine: function(x, d, u) {
d = d.touchingSliceAt;
var P = this.series, O = P.center[0], N = P.chart.plotWidth, C = P.chart.plotLeft;
P = x.alignment;
var b = this.shapeArgs.r;
return u = S(u.crookDistance, 1), N = P === "left" ? O + b + (N + C - O - b) * (1 - u) : C + (O - b) * u, u = ["L", N, x.y], O = !0, (P === "left" ? N > x.x || N < d.x : N < x.x || N > d.x) && (O = !1), x = [["M", x.x, x.y]], O && x.push(u), x.push(["L", d.x, d.y]), x;
} } }), B;
}), E(h, "Series/Pie/PieSeries.js", [h["Series/CenteredUtilities.js"], h["Series/Column/ColumnSeries.js"], h["Core/Globals.js"], h["Core/Legend/LegendSymbol.js"], h["Series/Pie/PiePoint.js"], h["Core/Series/Series.js"], h["Core/Series/SeriesRegistry.js"], h["Core/Renderer/SVG/Symbols.js"], h["Core/Utilities.js"]], function(y, B, I, Z, F, U, H, W, R) {
var S = this && this.__extends || function() {
var b = function(w, v) {
return b = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(a, c) {
a.__proto__ = c;
} || function(a, c) {
for (var p in c)
c.hasOwnProperty(p) && (a[p] = c[p]);
}, b(w, v);
};
return function(w, v) {
function a() {
this.constructor = w;
}
b(w, v), w.prototype = v === null ? Object.create(v) : (a.prototype = v.prototype, new a());
};
}(), x = y.getStartAndEndRadians;
I = I.noop;
var d = R.clamp, u = R.extend, P = R.fireEvent, O = R.merge, N = R.pick, C = R.relativeLength;
return R = function(b) {
function w() {
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 S(w, b), w.prototype.animate = function(v) {
var a = this, c = a.points, p = a.startAngleRad;
v || c.forEach(function(i) {
var l = i.graphic, s = i.shapeArgs;
l && s && (l.attr({ r: N(i.startR, a.center && a.center[3] / 2), start: p, end: p }), l.animate({ r: s.r, start: s.start, end: s.end }, a.options.animation));
});
}, w.prototype.drawEmpty = function() {
var v = this.startAngleRad, a = this.endAngleRad, c = this.options;
if (this.total === 0 && this.center) {
var p = this.center[0], i = this.center[1];
this.graph || (this.graph = this.chart.renderer.arc(p, i, this.center[1] / 2, 0, v, a).addClass("highcharts-empty-series").add(this.group)), this.graph.attr({ d: W.arc(p, i, this.center[2] / 2, 0, { start: v, end: a, 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());
}, w.prototype.drawPoints = function() {
var v = this.chart.renderer;
this.points.forEach(function(a) {
a.graphic && a.hasNewShapeType() && (a.graphic = a.graphic.destroy()), a.graphic || (a.graphic = v[a.shapeType](a.shapeArgs).add(a.series.group), a.delayedRendering = !0);
});
}, w.prototype.generatePoints = function() {
b.prototype.generatePoints.call(this), this.updateTotals();
}, w.prototype.getX = function(v, a, c) {
var p = this.center, i = this.radii ? this.radii[c.index] || 0 : p[2] / 2;
return v = Math.asin(d((v - p[1]) / (i + c.labelDistance), -1, 1)), p[0] + (a ? -1 : 1) * Math.cos(v) * (i + c.labelDistance) + (0 < c.labelDistance ? (a ? -1 : 1) * this.options.dataLabels.padding : 0);
}, w.prototype.hasData = function() {
return !!this.processedXData.length;
}, w.prototype.redrawPoints = function() {
var v = this, a = v.chart, c = a.renderer, p = v.options.shadow, i, l, s, t;
this.drawEmpty(), !p || v.shadowGroup || a.styledMode || (v.shadowGroup = c.g("shadow").attr({ zIndex: -1 }).add(v.group)), v.points.forEach(function(o) {
var n = {};
if (l = o.graphic, !o.isNull && l) {
var A = void 0;
t = o.shapeArgs, i = o.getTranslate(), a.styledMode || (A = o.shadowGroup, p && !A && (A = o.shadowGroup = c.g("shadow").add(v.shadowGroup)), A && A.attr(i), s = v.pointAttribs(o, o.selected && "select")), o.delayedRendering ? (l.setRadialReference(v.center).attr(t).attr(i), a.styledMode || l.attr(s).attr({ "stroke-linejoin": "round" }).shadow(p, A), o.delayedRendering = !1) : (l.setRadialReference(v.center), a.styledMode || O(!0, n, s), O(!0, n, t, i), l.animate(n)), l.attr({ visibility: o.visible ? "inherit" : "hidden" }), l.addClass(o.getClassName(), !0);
} else
l && (o.graphic = l.destroy());
});
}, w.prototype.sortByAngle = function(v, a) {
v.sort(function(c, p) {
return typeof c.angle < "u" && (p.angle - c.angle) * a;
});
}, w.prototype.translate = function(v) {
this.generatePoints();
var a = this.options, c = a.slicedOffset, p = c + (a.borderWidth || 0), i = x(a.startAngle, a.endAngle), l = this.startAngleRad = i.start;
i = (this.endAngleRad = i.end) - l;
var s = this.points, t = a.dataLabels.distance;
a = a.ignoreHiddenPoint;
var o = s.length, n, A = 0;
for (v || (this.center = v = this.getCenter()), n = 0; n < o; n++) {
var _ = s[n], D = l + A * i;
!_.isValid() || a && !_.visible || (A += _.percentage / 100);
var j = l + A * i, T = { x: v[0], y: v[1], r: v[2] / 2, innerR: v[3] / 2, start: Math.round(1e3 * D) / 1e3, end: Math.round(1e3 * j) / 1e3 };
_.shapeType = "arc", _.shapeArgs = T, _.labelDistance = N(_.options.dataLabels && _.options.dataLabels.distance, t), _.labelDistance = C(_.labelDistance, T.r), this.maxLabelDistance = Math.max(this.maxLabelDistance || 0, _.labelDistance), j = (j + D) / 2, j > 1.5 * Math.PI ? j -= 2 * Math.PI : j < -Math.PI / 2 && (j += 2 * Math.PI), _.slicedTranslation = { translateX: Math.round(Math.cos(j) * c), translateY: Math.round(Math.sin(j) * c) }, T = Math.cos(j) * v[2] / 2;
var X = Math.sin(j) * v[2] / 2;
_.tooltipPos = [v[0] + 0.7 * T, v[1] + 0.7 * X], _.half = j < -Math.PI / 2 || j > Math.PI / 2 ? 1 : 0, _.angle = j, D = Math.min(p, _.labelDistance / 5), _.labelPosition = { natural: { x: v[0] + T + Math.cos(j) * _.labelDistance, y: v[1] + X + Math.sin(j) * _.labelDistance }, final: {}, alignment: 0 > _.labelDistance ? "center" : _.half ? "right" : "left", connectorPosition: { breakAt: { x: v[0] + T + Math.cos(j) * D, y: v[1] + X + Math.sin(j) * D }, touchingSliceAt: { x: v[0] + T, y: v[1] + X } } };
}
P(this, "afterTranslate");
}, w.prototype.updateTotals = function() {
var v = this.points, a = v.length, c = this.options.ignoreHiddenPoint, p, i = 0;
for (p = 0; p < a; p++) {
var l = v[p];
!l.isValid() || c && !l.visible || (i += l.y);
}
for (this.total = i, p = 0; p < a; p++)
l = v[p], l.percentage = 0 < i && (l.visible || !c) ? l.y / i * 100 : 0, l.total = i;
}, w.defaultOptions = O(U.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 } }
}), w;
}(U), u(R.prototype, { axisTypes: [], directTouch: !0, drawGraph: void 0, drawLegendSymbol: Z.drawRectangle, drawTracker: B.prototype.drawTracker, getCenter: y.getCenter, getSymbol: I, isCartesian: !1, noSharedTooltip: !0, pointAttribs: B.prototype.pointAttribs, pointClass: F, requireSorting: !1, searchPoint: I, trackerGroups: ["group", "dataLabelsGroup"] }), H.registerSeriesType("pie", R), R;
}), E(h, "Series/Pie/PieDataLabel.js", [
h["Core/Series/DataLabel.js"],
h["Core/Globals.js"],
h["Core/Renderer/RendererUtilities.js"],
h["Core/Series/SeriesRegistry.js"],
h["Core/Utilities.js"]
], function(y, B, I, Z, F) {
var U = B.noop, H = I.distribute, W = Z.series, R = F.arrayMax, S = F.clamp, x = F.defined, d = F.merge, u = F.pick, P = F.relativeLength, O;
return function(N) {
function C() {
var c = this, p = c.data, i = c.chart, l = c.options.dataLabels || {}, s = l.connectorPadding, t = i.plotWidth, o = i.plotHeight, n = i.plotLeft, A = Math.round(i.chartWidth / 3), _ = c.center, D = _[2] / 2, j = _[1], T = [[], []], X = [0, 0, 0, 0], g = c.dataLabelPositioners, m, L, Y, V, Q, k, G, z, $, q, it, et;
c.visible && (l.enabled || c._hasPointLabels) && (p.forEach(function(nt) {
nt.dataLabel && nt.visible && nt.dataLabel.shortened && (nt.dataLabel.attr({ width: "auto" }).css({ width: "auto", textOverflow: "clip" }), nt.dataLabel.shortened = !1);
}), W.prototype.drawDataLabels.apply(c), p.forEach(function(nt) {
nt.dataLabel && (nt.visible ? (T[nt.half].push(nt), nt.dataLabel._pos = null, !x(l.style.width) && !x(nt.options.dataLabels && nt.options.dataLabels.style && nt.options.dataLabels.style.width) && nt.dataLabel.getBBox().width > A && (nt.dataLabel.css({ width: Math.round(0.7 * A) + "px" }), nt.dataLabel.shortened = !0)) : (nt.dataLabel = nt.dataLabel.destroy(), nt.dataLabels && nt.dataLabels.length === 1 && delete nt.dataLabels));
}), T.forEach(function(nt, rt) {
var ct = nt.length, gt = [], dt;
if (ct) {
if (c.sortByAngle(nt, rt - 0.5), 0 < c.maxLabelDistance) {
var lt = Math.max(0, j - D - c.maxLabelDistance), at = Math.min(j + D + c.maxLabelDistance, i.plotHeight);
nt.forEach(function(J) {
0 < J.labelDistance && J.dataLabel && (J.top = Math.max(0, j - D - J.labelDistance), J.bottom = Math.min(j + D + 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));
}), lt = at + dt - lt, H(gt, lt, lt / 5);
}
for (it = 0; it < ct; it++) {
if (m = nt[it], k = m.labelPosition, V = m.dataLabel, q = m.visible === !1 ? "hidden" : "inherit", $ = lt = k.natural.y, gt && x(m.distributeBox) && (typeof m.distributeBox.pos > "u" ? q = "hidden" : (G = m.distributeBox.size, $ = g.radialDistributionY(m))), delete m.positionIndex, l.justify)
z = g.justify(m, D, _);
else
switch (l.alignTo) {
case "connectors":
z = g.alignToConnectors(nt, rt, t, n);
break;
case "plotEdges":
z = g.alignToPlotEdges(V, rt, t, n);
break;
default:
z = g.radialDistributionX(c, m, $, lt);
}
V._attr = { visibility: q, align: k.alignment }, et = m.options.dataLabels || {}, V._pos = { x: z + u(et.x, l.x) + ({ left: s, right: -s }[k.alignment] || 0), y: $ + u(et.y, l.y) - 10 }, k.final.x = z, k.final.y = $, u(l.crop, !0) && (Q = V.getBBox().width, lt = null, z - Q < s && rt === 1 ? (lt = Math.round(Q - z + s), X[3] = Math.max(lt, X[3])) : z + Q > t - s && rt === 0 && (lt = Math.round(z + Q - t + s), X[1] = Math.max(lt, X[1])), 0 > $ - G / 2 ? X[0] = Math.max(Math.round(-$ + G / 2), X[0]) : $ + G / 2 > o && (X[2] = Math.max(Math.round($ + G / 2 - o), X[2])), V.sideOverflow = lt);
}
}
}), R(X) === 0 || this.verifyDataLabelOverflow(X)) && (this.placeDataLabels(), this.points.forEach(function(nt) {
if (et = d(l, nt.options.dataLabels), L = u(et.connectorWidth, 1)) {
var rt;
Y = nt.connector, (V = nt.dataLabel) && V._pos && nt.visible && 0 < nt.labelDistance ? (q = V._attr.visibility, (rt = !Y) && (nt.connector = Y = i.renderer.path().addClass("highcharts-data-label-connector highcharts-color-" + nt.colorIndex + (nt.className ? " " + nt.className : "")).add(c.dataLabelsGroup), i.styledMode || Y.attr({ "stroke-width": L, stroke: et.connectorColor || nt.color || "#666666" })), Y[rt ? "attr" : "animate"]({ d: nt.getConnectorPath() }), Y.attr("visibility", q)) : Y && (nt.connector = Y.destroy());
}
}));
}
function b() {
this.points.forEach(function(c) {
var p = c.dataLabel, i;
p && c.visible && ((i = p._pos) ? (p.sideOverflow && (p._attr.width = Math.max(p.getBBox().width - p.sideOverflow, 0), p.css({ width: p._attr.width + "px", textOverflow: (this.options.dataLabels.style || {}).textOverflow || "ellipsis" }), p.shortened = !0), p.attr(p._attr), p[p.moved ? "animate" : "attr"](i), p.moved = !0) : p && p.attr({ y: -9999 })), delete c.distributeBox;
}, this);
}
function w(c) {
var p = this.center, i = this.options, l = i.center, s = i.minSize || 80, t = i.size !== null;
if (!t) {
if (l[0] !== null)
var o = Math.max(p[2] - Math.max(c[1], c[3]), s);
else
o = Math.max(p[2] - c[1] - c[3], s), p[0] += (c[3] - c[1]) / 2;
l[1] !== null ? o = S(o, s, p[2] - Math.max(c[0], c[2])) : (o = S(o, s, p[2] - c[0] - c[2]), p[1] += (c[0] - c[2]) / 2), o < p[2] ? (p[2] = o, p[3] = Math.min(P(i.innerSize || 0, o), o), this.translate(p), this.drawDataLabels && this.drawDataLabels()) : t = !0;
}
return t;
}
var v = [], a = { radialDistributionY: function(c) {
return c.top + c.distributeBox.pos;
}, radialDistributionX: function(c, p, i, l) {
return c.getX(i < p.top + 2 || i > p.bottom - 2 ? l : i, p.half, p);
}, justify: function(c, p, i) {
return i[0] + (c.half ? -1 : 1) * (p + c.labelDistance);
}, alignToPlotEdges: function(c, p, i, l) {
return c = c.getBBox().width, p ? c + l : i - c - l;
}, alignToConnectors: function(c, p, i, l) {
var s = 0, t;
return c.forEach(function(o) {
t = o.dataLabel.getBBox().width, t > s && (s = t);
}), p ? s + l : i - s - l;
} };
N.compose = function(c) {
y.compose(W), v.indexOf(c) === -1 && (v.push(c), c = c.prototype, c.dataLabelPositioners = a, c.alignDataLabel = U, c.drawDataLabels = C, c.placeDataLabels = b, c.verifyDataLabelOverflow = w);
};
}(O || (O = {})), O;
}), E(h, "Extensions/OverlappingDataLabels.js", [h["Core/Chart/Chart.js"], h["Core/Utilities.js"]], function(y, B) {
function I(S, x) {
var d = !1;
if (S) {
var u = S.newOpacity;
S.oldOpacity !== u && (S.alignAttr && S.placed ? (S[u ? "removeClass" : "addClass"]("highcharts-data-label-hidden"), d = !0, S.alignAttr.opacity = u, S[S.isOld ? "animate" : "attr"](S.alignAttr, null, function() {
x.styledMode || S.css({ pointerEvents: u ? "auto" : "none" });
}), F(x, "afterHideOverlappingLabel")) : S.attr({ opacity: u })), S.isOld = !0;
}
return d;
}
var Z = B.addEvent, F = B.fireEvent, U = B.isArray, H = B.isNumber, W = B.objectEach, R = B.pick;
Z(y, "render", function() {
var S = this, x = [];
(this.labelCollectors || []).forEach(function(d) {
x = x.concat(d());
}), (this.yAxis || []).forEach(function(d) {
d.stacking && d.options.stackLabels && !d.options.stackLabels.allowOverlap && W(d.stacking.stacks, function(u) {
W(u, function(P) {
P.label && P.label.visibility !== "hidden" && x.push(P.label);
});
});
}), (this.series || []).forEach(function(d) {
var u = d.options.dataLabels;
d.visible && (u.enabled !== !1 || d._hasPointLabels) && (u = function(P) {
return P.forEach(function(O) {
O.visible && (U(O.dataLabels) ? O.dataLabels : O.dataLabel ? [O.dataLabel] : []).forEach(function(N) {
var C = N.options;
N.labelrank = R(C.labelrank, O.labelrank, O.shapeArgs && O.shapeArgs.height), C.allowOverlap ? (N.oldOpacity = N.opacity, N.newOpacity = 1, I(N, S)) : x.push(N);
});
});
}, u(d.nodes || []), u(d.points));
}), this.hideOverlappingLabels(x);
}), y.prototype.hideOverlappingLabels = function(S) {
var x = this, d = S.length, u = x.renderer, P, O, N, C = !1, b = function(a) {
var c, p = a.box ? 0 : a.padding || 0, i = c = 0, l;
if (a && (!a.alignAttr || a.placed)) {
var s = a.alignAttr || { x: a.attr("x"), y: a.attr("y") }, t = a.parentGroup;
a.width || (c = a.getBBox(), a.width = c.width, a.height = c.height, c = u.fontMetrics(null, a.element).h);
var o = a.width - 2 * p;
return (l = { left: "0", center: "0.5", right: "1" }[a.alignValue]) ? i = +l * o : H(a.x) && Math.round(a.x) !== a.translateX && (i = a.x - a.translateX), { x: s.x + (t.translateX || 0) + p - (i || 0), y: s.y + (t.translateY || 0) + p - c, width: a.width - 2 * p, height: a.height - 2 * p };
}
};
for (O = 0; O < d; O++)
(P = S[O]) && (P.oldOpacity = P.opacity, P.newOpacity = 1, P.absoluteBox = b(P));
for (S.sort(function(a, c) {
return (c.labelrank || 0) - (a.labelrank || 0);
}), O = 0; O < d; O++) {
var w = (b = S[O]) && b.absoluteBox;
for (P = O + 1; P < d; ++P) {
var v = (N = S[P]) && N.absoluteBox;
!w || !v || b === N || b.newOpacity === 0 || N.newOpacity === 0 || v.x >= w.x + w.width || v.x + v.width <= w.x || v.y >= w.y + w.height || v.y + v.height <= w.y || ((b.labelrank < N.labelrank ? b : N).newOpacity = 0);
}
}
S.forEach(function(a) {
I(a, x) && (C = !0);
}), C && F(x, "afterHideAllOverlappingLabels");
};
}), E(
h,
"Core/Responsive.js",
[h["Core/Utilities.js"]],
function(y) {
var B = y.extend, I = y.find, Z = y.isArray, F = y.isObject, U = y.merge, H = y.objectEach, W = y.pick, R = y.splat, S = y.uniqueKey, x;
return function(d) {
var u = [];
d.compose = function(O) {
return u.indexOf(O) === -1 && (u.push(O), B(O.prototype, P.prototype)), O;
};
var P = function() {
function O() {
}
return O.prototype.currentOptions = function(N) {
function C(v, a, c, p) {
var i;
H(v, function(l, s) {
if (!p && -1 < b.collectionsWithUpdate.indexOf(s) && a[s])
for (l = R(l), c[s] = [], i = 0; i < Math.max(l.length, a[s].length); i++)
a[s][i] && (l[i] === void 0 ? c[s][i] = a[s][i] : (c[s][i] = {}, C(l[i], a[s][i], c[s][i], p + 1)));
else
F(l) ? (c[s] = Z(l) ? [] : {}, C(l, a[s] || {}, c[s], p + 1)) : c[s] = typeof a[s] > "u" ? null : a[s];
});
}
var b = this, w = {};
return C(N, this.options, w, 0), w;
}, O.prototype.matchResponsiveRule = function(N, C) {
var b = N.condition;
(b.callback || function() {
return this.chartWidth <= W(b.maxWidth, Number.MAX_VALUE) && this.chartHeight <= W(b.maxHeight, Number.MAX_VALUE) && this.chartWidth >= W(b.minWidth, 0) && this.chartHeight >= W(b.minHeight, 0);
}).call(this) && C.push(N._id);
}, O.prototype.setResponsive = function(N, C) {
var b = this, w = this.options.responsive, v = this.currentResponsive, a = [];
!C && w && w.rules && w.rules.forEach(function(c) {
typeof c._id > "u" && (c._id = S()), b.matchResponsiveRule(c, a);
}, this), C = U.apply(void 0, a.map(function(c) {
return I((w || {}).rules || [], function(p) {
return p._id === c;
});
}).map(function(c) {
return c && c.chartOptions;
})), C.isResponsiveOptions = !0, a = a.toString() || void 0, a !== (v && v.ruleIds) && (v && this.update(v.undoOptions, N, !0), a ? (v = this.currentOptions(C), v.isResponsiveOptions = !0, this.currentResponsive = { ruleIds: a, mergedOptions: C, undoOptions: v }, this.update(C, N, !0)) : this.currentResponsive = void 0);
}, O;
}();
}(x || (x = {})), x;
}
), E(h, "masters/highcharts.src.js", [
h["Core/Globals.js"],
h["Core/Utilities.js"],
h["Core/DefaultOptions.js"],
h["Core/Animation/Fx.js"],
h["Core/Animation/AnimationUtilities.js"],
h["Core/Renderer/HTML/AST.js"],
h["Core/FormatUtilities.js"],
h["Core/Renderer/RendererUtilities.js"],
h["Core/Renderer/SVG/SVGElement.js"],
h["Core/Renderer/SVG/SVGRenderer.js"],
h["Core/Renderer/HTML/HTMLElement.js"],
h["Core/Renderer/HTML/HTMLRenderer.js"],
h["Core/Axis/Axis.js"],
h["Core/Axis/DateTimeAxis.js"],
h["Core/Axis/LogarithmicAxis.js"],
h["Core/Axis/PlotLineOrBand/PlotLineOrBand.js"],
h["Core/Axis/Tick.js"],
h["Core/Tooltip.js"],
h["Core/Series/Point.js"],
h["Core/Pointer.js"],
h["Core/MSPointer.js"],
h["Core/Legend/Legend.js"],
h["Core/Chart/Chart.js"],
h["Core/Series/Series.js"],
h["Core/Series/SeriesRegistry.js"],
h["Series/Column/ColumnSeries.js"],
h["Series/Column/ColumnDataLabel.js"],
h["Series/Pie/PieSeries.js"],
h["Series/Pie/PieDataLabel.js"],
h["Core/Series/DataLabel.js"],
h["Core/Responsive.js"],
h["Core/Color/Color.js"],
h["Core/Time.js"]
], function(y, B, I, Z, F, U, H, W, R, S, x, d, u, P, O, N, C, b, w, v, a, c, p, i, l, s, t, o, n, A, _, D, j) {
return y.animate = F.animate, y.animObject = F.animObject, y.getDeferredAnimation = F.getDeferredAnimation, y.setAnimation = F.setAnimation, y.stop = F.stop, y.timers = Z.timers, y.AST = U, y.Axis = u, y.Chart = p, y.chart = p.chart, y.Fx = Z, y.Legend = c, y.PlotLineOrBand = N, y.Point = w, y.Pointer = a.isRequired() ? a : v, y.Series = i, y.SVGElement = R, y.SVGRenderer = S, y.Tick = C, y.Time = j, y.Tooltip = b, y.Color = D, y.color = D.parse, d.compose(S), x.compose(R), y.defaultOptions = I.defaultOptions, y.getOptions = I.getOptions, y.time = I.defaultTime, y.setOptions = I.setOptions, y.dateFormat = H.dateFormat, y.format = H.format, y.numberFormat = H.numberFormat, y.addEvent = B.addEvent, y.arrayMax = B.arrayMax, y.arrayMin = B.arrayMin, y.attr = B.attr, y.clearTimeout = B.clearTimeout, y.correctFloat = B.correctFloat, y.createElement = B.createElement, y.css = B.css, y.defined = B.defined, y.destroyObjectProperties = B.destroyObjectProperties, y.discardElement = B.discardElement, y.distribute = W.distribute, y.erase = B.erase, y.error = B.error, y.extend = B.extend, y.extendClass = B.extendClass, y.find = B.find, y.fireEvent = B.fireEvent, y.getMagnitude = B.getMagnitude, y.getStyle = B.getStyle, y.inArray = B.inArray, y.isArray = B.isArray, y.isClass = B.isClass, y.isDOMElement = B.isDOMElement, y.isFunction = B.isFunction, y.isNumber = B.isNumber, y.isObject = B.isObject, y.isString = B.isString, y.keys = B.keys, y.merge = B.merge, y.normalizeTickInterval = B.normalizeTickInterval, y.objectEach = B.objectEach, y.offset = B.offset, y.pad = B.pad, y.pick = B.pick, y.pInt = B.pInt, y.relativeLength = B.relativeLength, y.removeEvent = B.removeEvent, y.seriesType = l.seriesType, y.splat = B.splat, y.stableSort = B.stableSort, y.syncTimeout = B.syncTimeout, y.timeUnits = B.timeUnits, y.uniqueKey = B.uniqueKey, y.useSerialIds = B.useSerialIds, y.wrap = B.wrap, t.compose(s), A.compose(i), P.compose(u), O.compose(u), n.compose(o), N.compose(u), _.compose(p), y;
}), E(h, "Core/Axis/OrdinalAxis.js", [
h["Core/Axis/Axis.js"],
h["Core/Globals.js"],
h["Core/Series/Series.js"],
h["Core/Utilities.js"]
], function(y, B, I, Z) {
var F = Z.addEvent, U = Z.correctFloat, H = Z.css, W = Z.defined, R = Z.error, S = Z.pick, x = Z.timeUnits, d = [], u;
return function(P) {
function O(t, o, n, A, _, D, j) {
_ === void 0 && (_ = []), D === void 0 && (D = 0);
var T = {}, X = this.options.tickPixelInterval, g = this.chart.time, m = [], L, Y, V = 0, Q = [], k = -Number.MAX_VALUE;
if (!this.options.ordinal && !this.options.breaks || !_ || 3 > _.length || typeof o > "u")
return g.getTimeTicks.apply(g, arguments);
var G = _.length;
for (L = 0; L < G; L++) {
var z = L && _[L - 1] > n;
if (_[L] < o && (V = L), L === G - 1 || _[L + 1] - _[L] > 5 * D || z) {
if (_[L] > k) {
for (Y = g.getTimeTicks(t, _[V], _[L], A); Y.length && Y[0] <= k; )
Y.shift();
Y.length && (k = Y[Y.length - 1]), m.push(Q.length), Q = Q.concat(Y);
}
V = L + 1;
}
if (z)
break;
}
if (Y) {
if (Y = Y.info, j && Y.unitRange <= x.hour) {
for (L = Q.length - 1, V = 1; V < L; V++)
if (g.dateFormat("%d", Q[V]) !== g.dateFormat("%d", Q[V - 1])) {
T[Q[V]] = "day";
var $ = !0;
}
$ && (T[Q[0]] = "day"), Y.higherRanks = T;
}
Y.segmentStarts = m, Q.info = Y;
} else
R(12, !1, this.chart);
if (j && W(X)) {
for (Y = Q.length, g = [], V = [], L = void 0, $ = Y; $--; )
m = this.translate(Q[$]), L && (V[$] = L - m), g[$] = L = m;
for (V.sort(), V = V[Math.floor(V.length / 2)], V < 0.6 * X && (V = null), $ = Q[Y - 1] > n ? Y - 1 : Y, L = void 0; $--; )
m = g[$], Y = Math.abs(L - m), L && Y < 0.8 * X && (V === null || Y < 0.8 * V) ? (T[Q[$]] && !T[Q[$ + 1]] ? (Y = $ + 1, L = m) : Y = $, Q.splice(Y, 1)) : L = m;
}
return Q;
}
function N(t) {
var o = this.ordinal.positions;
if (!o)
return t;
var n = o.length - 1;
if (0 > t)
t = o[0];
else if (t > n)
t = o[n];
else {
n = Math.floor(t);
var A = t - n;
}
return typeof A < "u" && typeof o[n] < "u" ? o[n] + (A ? A * (o[n + 1] - o[n]) : 0) : t;
}
function C(t) {
var o = this.ordinal, n = o.positions;
if (!n)
return t;
var A = (t - (this.old ? this.old.min : this.min)) * (this.old ? this.old.transA : this.transA) + this.minPixelPadding;
if (0 < A && A < this.left + this.len || (o.extendedOrdinalPositions || (o.extendedOrdinalPositions = o.getExtendedPositions()), n = o.extendedOrdinalPositions), n && n.length) {
if (t = o.getIndexOfPoint(A, n), o = U(t % 1), 0 <= t && t < n.length - 1)
return n[Math.floor(t)] + o * (n[Math.ceil(t)] - n[Math.floor(t)]);
o = n.length, A = n[0], n = n[o - 1];
var _ = (n - A) / (o - 1);
return 0 > t ? A + _ * t : n + _ * (t - o);
}
return t;
}
function b(t, o) {
var n = P.Additions.findIndexOf(t, o, !0);
return t[n] === o ? n : n + (o - t[n]) / (t[n + 1] - t[n]);
}
function w() {
this.ordinal || (this.ordinal = new P.Additions(this));
}
function v() {
this.isXAxis && W(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 && W(this.userMin) && (this.min += this.options.overscroll));
}
function a() {
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 p(t) {
var o = this.xAxis[0], n = o.options.overscroll, A = t.originalEvent.chartX, _ = this.options.chart.panning, D = !1;
if (_ && _.type !== "y" && o.options.ordinal && o.series.length) {
var j = this.mouseDownX, T = o.getExtremes(), X = T.dataMax, g = T.min, m = T.max, L = this.hoverPoints, Y = o.closestPointRange || o.ordinal && o.ordinal.overscrollPointsRange;
j = (j - A) / (o.translationSlope * (o.ordinal.slope || Y)), Y = { ordinal: { positions: o.ordinal.getExtendedPositions() } };
var V = o.index2val, Q = o.val2lin, k = void 0, G = k = void 0, z = void 0;
Y.ordinal.positions ? 1 < Math.abs(j) && (L && L.forEach(function($) {
$.setState();
}), 0 > j ? (G = Y, z = o.ordinal.positions ? o : Y) : (G = o.ordinal.positions ? o : Y, z = Y), k = z.ordinal.positions, X > k[k.length - 1] && k.push(X), this.fixedRange = m - g, k = o.navigatorAxis.toFixedRange(void 0, void 0, V.apply(G, [Q.apply(G, [g, !0]) + j]), V.apply(z, [Q.apply(z, [m, !0]) + j])), k.min >= Math.min(
T.dataMin,
g
) && k.max <= Math.max(X, m) + n && o.setExtremes(k.min, k.max, !0, !1, { trigger: "pan" }), this.mouseDownX = A, H(this.container, { cursor: "move" })) : D = !0;
} else
D = !0;
D || _ && /y/.test(_.type) ? n && (o.max = o.dataMax + n) : t.preventDefault();
}
function i() {
var t = this.xAxis;
t && t.options.ordinal && (delete t.ordinal.index, delete t.ordinal.extendedOrdinalPositions);
}
function l(t, o) {
var n = this.ordinal, A = n.positions, _ = n.slope, D = n.extendedOrdinalPositions;
if (!A)
return t;
var j = A.length;
if (A[0] <= t && A[j - 1] >= t)
t = b(A, t);
else {
if (D || (D = n.getExtendedPositions && n.getExtendedPositions(), n.extendedOrdinalPositions = D), !D || !D.length)
return t;
j = D.length, _ || (_ = (D[j - 1] - D[0]) / j), A = b(D, A[0]), t >= D[0] && t <= D[j - 1] ? t = b(D, t) - A : t < D[0] ? (t = D[0] - t, t = -A - t / _) : (t -= D[j - 1], t = t / _ + j - A);
}
return o ? t : _ * (t || 0) + n.offset;
}
P.compose = function(t, o, n) {
if (d.indexOf(t) === -1) {
d.push(t);
var A = t.prototype;
A.getTimeTicks = O, A.index2val = N, A.lin2val = C, A.val2lin = l, A.ordinal2lin = A.val2lin, F(t, "afterInit", w), F(t, "foundExtremes", v), F(t, "afterSetScale", a), F(t, "initialAxisTranslation", c);
}
return d.indexOf(n) === -1 && (d.push(n), F(n, "pan", p)), d.indexOf(o) === -1 && (d.push(o), F(o, "updatedData", i)), t;
};
var s = function() {
function t(o) {
this.index = {}, this.axis = o;
}
return t.prototype.beforeSetTickPositions = function() {
var o = this.axis, n = o.ordinal, A = o.getExtremes(), _ = A.min, D = A.max, j = o.isXAxis && !!o.options.breaks;
A = o.options.ordinal;
var T = o.chart.options.chart.ignoreHiddenSeries, X, g, m = [], L = Number.MAX_VALUE, Y = !1;
if (A || j) {
o.series.forEach(function(k, G) {
if (X = [], !(T && k.visible === !1 || k.takeOrdinalPosition === !1 && !j) && (m = m.concat(k.processedXData), V = m.length, m.sort(function(z, $) {
return z - $;
}), L = Math.min(L, S(k.closestPointRange, L)), V)) {
for (G = 0; G < V - 1; )
m[G] !== m[G + 1] && X.push(m[G + 1]), G++;
X[0] !== m[0] && X.unshift(m[0]), m = X;
}
});
var V = m.length;
if (2 < V) {
var Q = m[1] - m[0];
for (g = V - 1; g-- && !Y; )
m[g + 1] - m[g] !== Q && (Y = !0);
!o.options.keepOrdinalPadding && (m[0] - _ > Q || D - m[m.length - 1] > Q) && (Y = !0);
} else
o.options.overscroll && (V === 2 ? L = m[1] - m[0] : V === 1 ? (L = o.options.overscroll, m = [m[0], m[0] + L]) : L = n.overscrollPointsRange);
Y || o.forceOrdinal ? (o.options.overscroll && (n.overscrollPointsRange = L, m = m.concat(n.getOverscrollPositions())), n.positions = m, Q = o.ordinal2lin(Math.max(_, m[0]), !0), g = Math.max(o.ordinal2lin(Math.min(D, m[m.length - 1]), !0), 1), n.slope = D = (D - _) / (g - Q), n.offset = _ - Q * D) : (n.overscrollPointsRange = S(o.closestPointRange, n.overscrollPointsRange), n.positions = o.ordinal.slope = n.offset = void 0);
}
o.isOrdinal = A && Y, n.groupIntervalFactor = null;
}, t.findIndexOf = function(o, n, A) {
for (var _ = 0, D = o.length - 1, j; _ < D; )
j = Math.ceil((_ + D) / 2), o[j] <= n ? _ = j : D = j - 1;
return o[_] === n || A ? _ : -1;
}, t.prototype.getExtendedPositions = function() {
var o = this, n = o.axis, A = n.constructor.prototype, _ = n.chart, D = n.series[0].currentDataGrouping, j = D ? D.count + D.unitName : "raw", T = n.options.overscroll, X = n.getExtremes(), g = void 0, m = o.index;
if (m || (m = o.index = {}), !m[j]) {
var L = {
series: [],
chart: _,
forceOrdinal: !1,
getExtremes: function() {
return { min: X.dataMin, max: X.dataMax + T };
},
getGroupPixelWidth: A.getGroupPixelWidth,
getTimeTicks: A.getTimeTicks,
options: { ordinal: !0 },
ordinal: { getGroupIntervalFactor: this.getGroupIntervalFactor },
ordinal2lin: A.ordinal2lin,
getIndexOfPoint: A.getIndexOfPoint,
val2lin: A.val2lin
};
L.ordinal.axis = L, n.series.forEach(function(Y) {
g = { xAxis: L, xData: Y.xData.slice(), chart: _, destroyGroupedData: B.noop, getProcessedData: I.prototype.getProcessedData, applyGrouping: I.prototype.applyGrouping }, g.xData = g.xData.concat(o.getOverscrollPositions()), g.options = { dataGrouping: D ? { firstAnchor: "firstPoint", anchor: "middle", lastAnchor: "lastPoint", enabled: !0, forced: !0, approximation: "open", units: [[D.unitName, [D.count]]] } : { enabled: !1 } }, L.series.push(g), Y.processData.apply(g);
}), g.closestPointRange !== g.basePointRange && g.currentDataGrouping && (L.forceOrdinal = !0), n.ordinal.beforeSetTickPositions.apply({ axis: L }), m[j] = L.ordinal.positions;
}
return m[j];
}, t.prototype.getGroupIntervalFactor = function(o, n, A) {
A = A.processedXData;
var _ = A.length, D = [], j = this.groupIntervalFactor;
if (!j) {
for (j = 0; j < _ - 1; j++)
D[j] = A[j + 1] - A[j];
D.sort(function(T, X) {
return T - X;
}), D = D[Math.floor(_ / 2)], o = Math.max(o, A[0]), n = Math.min(n, A[_ - 1]), this.groupIntervalFactor = j = _ * D / (n - o);
}
return j;
}, t.prototype.getIndexOfPoint = function(o, n) {
var A = this.axis, _ = this.positions ? this.positions[0] : 0, D = A.series[0].points && A.series[0].points[0] && A.series[0].points[0].plotX || A.minPixelPadding;
return 1 < A.series.length && A.series.forEach(function(j) {
j.points && W(j.points[0]) && W(j.points[0].plotX) && j.points[0].plotX < D && (D = j.points[0].plotX);
}), o = (o - D) / (A.translationSlope * (this.slope || A.closestPointRange || this.overscrollPointsRange)), t.findIndexOf(n, _) + o;
}, t.prototype.getOverscrollPositions = function() {
var o = this.axis, n = o.options.overscroll, A = this.overscrollPointsRange, _ = [], D = o.dataMax;
if (W(A))
for (; D <= o.dataMax + n; )
D += A, _.push(D);
return _;
}, t.prototype.postProcessTickInterval = function(o) {
var n = this.axis, A = this.slope;
return A ? n.options.breaks ? n.closestPointRange || o : o / (A / n.closestPointRange) : o;
}, t;
}();
P.Additions = s;
}(u || (u = {})), u;
}), E(h, "Series/DataModifyComposition.js", [h["Core/Axis/Axis.js"], h["Core/Series/Point.js"], h["Core/Series/Series.js"], h["Core/Utilities.js"]], function(y, B, I, Z) {
var F = B.prototype.tooltipFormatter, U = Z.addEvent, H = Z.arrayMax, W = Z.arrayMin, R = Z.correctFloat, S = Z.defined, x = Z.isArray, d = Z.isNumber, u = Z.isString, P = Z.pick, O;
return function(N) {
function C(o, n, A) {
this.isXAxis || (this.series.forEach(function(_) {
o === "compare" && typeof n != "boolean" ? _.setCompare(n, !1) : o !== "cumulative" || u(n) || _.setCumulative(n, !1);
}), P(A, !0) && this.chart.redraw());
}
function b(o) {
var n = this, A = n.series.chart.numberFormatter, _ = function(D) {
o = o.replace("{point." + D + "}", (0 < n[D] && D === "change" ? "+" : "") + A(n[D], P(n.series.tooltipOptions.changeDecimals, 2)));
};
return S(n.change) && _("change"), S(n.cumulativeSum) && _("cumulativeSum"), F.apply(this, [o]);
}
function w() {
var o = this.options.compare;
if (o === "percent" || o === "value" || this.options.cumulative) {
var n = new t(this);
o === "percent" || o === "value" ? n.initCompare(o) : n.initCumulative();
}
this.dataModify = n;
}
function v(o) {
o = o.dataExtremes;
var n = o.activeYData;
if (this.dataModify && o) {
var A = void 0;
this.options.compare ? A = [this.dataModify.modifyValue(o.dataMin), this.dataModify.modifyValue(o.dataMax)] : this.options.cumulative && x(n) && 2 <= n.length && (A = t.getCumulativeExtremes(n)), A && (o.dataMin = W(A), o.dataMax = H(A));
}
}
function a(o, n) {
this.options.compare = this.userOptions.compare = o, this.update({}, P(n, !0)), !this.dataModify || o !== "value" && o !== "percent" ? this.points.forEach(function(A) {
delete A.change;
}) : this.dataModify.initCompare(o);
}
function c() {
if (this.xAxis && this.processedYData && this.dataModify) {
var o = this.processedXData, n = this.processedYData, A = n.length, _ = this.options.compareStart === !0 ? 0 : 1, D = -1, j;
for (this.pointArrayMap && (D = this.pointArrayMap.indexOf(this.options.pointValKey || this.pointValKey || "y")), j = 0; j < A - _; j++) {
var T = n[j] && -1 < D ? n[j][D] : n[j];
if (d(T) && T !== 0 && o[j + _] >= (this.xAxis.min || 0)) {
this.dataModify.compareValue = T;
break;
}
}
}
}
function p(o, n) {
this.setModifier("compare", o, n);
}
function i(o, n) {
o = P(o, !1), this.options.cumulative = this.userOptions.cumulative = o, this.update({}, P(n, !0)), this.dataModify ? this.dataModify.initCumulative() : this.points.forEach(function(A) {
delete A.cumulativeSum;
});
}
function l(o, n) {
this.setModifier("cumulative", o, n);
}
var s = [];
N.compose = function(o, n, A) {
if (s.indexOf(o) === -1) {
s.push(o);
var _ = o.prototype;
_.setCompare = a, _.setCumulative = i, U(o, "afterInit", w), U(o, "afterGetExtremes", v), U(o, "afterProcessData", c);
}
return s.indexOf(n) === -1 && (s.push(n), n = n.prototype, n.setCompare = p, n.setModifier = C, n.setCumulative = l), s.indexOf(A) === -1 && (s.push(A), A.prototype.tooltipFormatter = b), o;
};
var t = function() {
function o(n) {
this.series = n;
}
return o.prototype.modifyValue = function() {
return 0;
}, o.getCumulativeExtremes = function(n) {
var A = 1 / 0, _ = -1 / 0;
return n.reduce(function(D, j) {
return j = D + j, A = Math.min(A, j, D), _ = Math.max(
_,
j,
D
), j;
}), [A, _];
}, o.prototype.initCompare = function(n) {
this.modifyValue = function(A, _) {
A === null && (A = 0);
var D = this.compareValue;
return typeof A < "u" && typeof D < "u" ? (A = n === "value" ? A - D : A / D * 100 - (this.series.options.compareBase === 100 ? 0 : 100), typeof _ < "u" && (_ = this.series.points[_]) && (_.change = A), A) : 0;
};
}, o.prototype.initCumulative = function() {
this.modifyValue = function(n, A) {
if (n === null && (n = 0), n !== void 0 && A !== void 0) {
var _ = 0 < A ? this.series.points[A - 1] : null;
return _ && _.cumulativeSum && (n = R(_.cumulativeSum + n)), (A = this.series.points[A]) && (A.cumulativeSum = n), n;
}
return 0;
};
}, o;
}();
N.Additions = t;
}(O || (O = {})), O;
}), E(h, "Core/Axis/BrokenAxis.js", [h["Extensions/Stacking.js"], h["Core/Utilities.js"]], function(y, B) {
var I = B.addEvent, Z = B.find, F = B.fireEvent, U = B.isArray, H = B.isNumber, W = B.pick, R;
return function(S) {
function x() {
typeof this.brokenAxis < "u" && this.brokenAxis.setBreaks(this.options.breaks, !1);
}
function d() {
this.brokenAxis && this.brokenAxis.hasBreaks && (this.options.ordinal = !1);
}
function u() {
var a = this.brokenAxis;
if (a && a.hasBreaks) {
for (var c = this.tickPositions, p = this.tickPositions.info, i = [], l = 0; l < c.length; l++)
a.isInAnyBreak(c[l]) || i.push(c[l]);
this.tickPositions = i, this.tickPositions.info = p;
}
}
function P() {
this.brokenAxis || (this.brokenAxis = new v(this));
}
function O() {
var a = this.options.connectNulls, c = this.points, p = this.xAxis, i = this.yAxis;
if (this.isDirty)
for (var l = c.length; l--; ) {
var s = c[l], t = !(s.y === null && a === !1) && (p && p.brokenAxis && p.brokenAxis.isInAnyBreak(s.x, !0) || i && i.brokenAxis && i.brokenAxis.isInAnyBreak(s.y, !0));
s.visible = t ? !1 : s.options.visible !== !1;
}
}
function N() {
this.drawBreaks(this.xAxis, ["x"]), this.drawBreaks(this.yAxis, W(this.pointArrayMap, ["y"]));
}
function C(a, c) {
var p = this, i = p.points, l, s, t, o;
if (a && a.brokenAxis && a.brokenAxis.hasBreaks) {
var n = a.brokenAxis;
c.forEach(function(A) {
l = n && n.breakArray || [], s = a.isXAxis ? a.min : W(p.options.threshold, a.min), i.forEach(function(_) {
o = W(_["stack" + A.toUpperCase()], _[A]), l.forEach(function(D) {
H(s) && H(o) && (t = !1, s < D.from && o > D.to || s > D.from && o < D.from ? t = "pointBreak" : (s < D.from && o > D.from && o < D.to || s > D.from && o > D.to && o < D.from) && (t = "pointInBreak"), t && F(a, t, { point: _, brk: D }));
});
});
});
}
}
function b() {
var a = this.currentDataGrouping, c = a && a.gapSize;
a = this.points.slice();
var p = this.yAxis, i = this.options.gapSize, l = a.length - 1, s;
if (i && 0 < l)
for (this.options.gapUnit !== "value" && (i *= this.basePointRange), c && c > i && c >= this.basePointRange && (i = c), s = void 0; l--; )
s && s.visible !== !1 || (s = a[l + 1]), c = a[l], s.visible !== !1 && c.visible !== !1 && (s.x - c.x > i && (s = (c.x + s.x) / 2, a.splice(l + 1, 0, { isNull: !0, x: s }), p.stacking && this.options.stacking && (s = p.stacking.stacks[this.stackKey][s] = new y(p, p.options.stackLabels, !1, s, this.stack), s.total = 0)), s = c);
return this.getGraphPath(a);
}
var w = [];
S.compose = function(a, c) {
if (w.indexOf(a) === -1 && (w.push(a), a.keepProps.push("brokenAxis"), I(a, "init", P), I(a, "afterInit", x), I(a, "afterSetTickPositions", u), I(a, "afterSetOptions", d)), w.indexOf(c) === -1) {
w.push(c);
var p = c.prototype;
p.drawBreaks = C, p.gappedPath = b, I(c, "afterGeneratePoints", O), I(
c,
"afterRender",
N
);
}
return a;
};
var v = function() {
function a(c) {
this.hasBreaks = !1, this.axis = c;
}
return a.isInBreak = function(c, p) {
var i = c.repeat || 1 / 0, l = c.from, s = c.to - c.from;
return p = p >= l ? (p - l) % i : i - (l - p) % i, c.inclusive ? p <= s : p < s && p !== 0;
}, a.lin2Val = function(c) {
var p = this.brokenAxis;
if (p = p && p.breakArray, !p || !H(c))
return c;
var i;
for (i = 0; i < p.length; i++) {
var l = p[i];
if (l.from >= c)
break;
(l.to < c || a.isInBreak(l, c)) && (c += l.len);
}
return c;
}, a.val2Lin = function(c) {
var p = this.brokenAxis;
if (p = p && p.breakArray, !p || !H(c))
return c;
var i = c, l;
for (l = 0; l < p.length; l++) {
var s = p[l];
if (s.to <= c)
i -= s.len;
else {
if (s.from >= c)
break;
if (a.isInBreak(s, c)) {
i -= c - s.from;
break;
}
}
}
return i;
}, a.prototype.findBreakAt = function(c, p) {
return Z(p, function(i) {
return i.from < c && c < i.to;
});
}, a.prototype.isInAnyBreak = function(c, p) {
var i = this.axis, l = i.options.breaks || [], s = l.length, t;
if (s && H(c)) {
for (; s--; )
if (a.isInBreak(l[s], c)) {
var o = !0;
t || (t = W(l[s].showPoints, !i.isXAxis));
}
var n = o && p ? o && !t : o;
}
return n;
}, a.prototype.setBreaks = function(c, p) {
var i = this, l = i.axis, s = U(c) && !!c.length;
l.isDirty = i.hasBreaks !== s, i.hasBreaks = s, l.options.breaks = l.userOptions.breaks = c, l.forceRedraw = !0, l.series.forEach(function(t) {
t.isDirty = !0;
}), s || l.val2lin !== a.val2Lin || (delete l.val2lin, delete l.lin2val), s && (l.userOptions.ordinal = !1, l.lin2val = a.lin2Val, l.val2lin = a.val2Lin, l.setExtremes = function(t, o, n, A, _) {
if (i.hasBreaks) {
for (var D = this.options.breaks || [], j; j = i.findBreakAt(t, D); )
t = j.to;
for (; j = i.findBreakAt(o, D); )
o = j.from;
o < t && (o = t);
}
l.constructor.prototype.setExtremes.call(this, t, o, n, A, _);
}, l.setAxisTranslation = function() {
if (l.constructor.prototype.setAxisTranslation.call(this), i.unitLength = void 0, i.hasBreaks) {
var t = l.options.breaks || [], o = [], n = [], A = W(l.pointRangePadding, 0), _ = 0, D, j = l.userMin || l.min, T = l.userMax || l.max, X;
t.forEach(function(L) {
D = L.repeat || 1 / 0, H(j) && H(T) && (a.isInBreak(L, j) && (j += L.to % D - j % D), a.isInBreak(L, T) && (T -= T % D - L.from % D));
}), t.forEach(function(L) {
if (m = L.from, D = L.repeat || 1 / 0, H(j) && H(T)) {
for (; m - D > j; )
m -= D;
for (; m < j; )
m += D;
for (X = m; X < T; X += D)
o.push({ value: X, move: "in" }), o.push({ value: X + L.to - L.from, move: "out", size: L.breakSize });
}
}), o.sort(function(L, Y) {
return L.value === Y.value ? (L.move === "in" ? 0 : 1) - (Y.move === "in" ? 0 : 1) : L.value - Y.value;
});
var g = 0, m = j;
o.forEach(function(L) {
g += L.move === "in" ? 1 : -1, g === 1 && L.move === "in" && (m = L.value), g === 0 && H(m) && (n.push({ from: m, to: L.value, len: L.value - m - (L.size || 0) }), _ += L.value - m - (L.size || 0));
}), i.breakArray = n, H(j) && H(T) && H(l.min) && (i.unitLength = T - j - _ + A, F(l, "afterBreaks"), l.staticScale ? l.transA = l.staticScale : i.unitLength && (l.transA *= (T - l.min + A) / i.unitLength), A && (l.minPixelPadding = l.transA * (l.minPointOffset || 0)), l.min = j, l.max = T);
}
}), W(p, !0) && l.chart.redraw();
}, a;
}();
S.Additions = v;
}(R || (R = {})), R;
}), E(h, "masters/modules/broken-axis.src.js", [h["Core/Globals.js"], h["Core/Axis/BrokenAxis.js"]], function(y, B) {
B.compose(y.Axis, y.Series);
}), E(h, "Extensions/DataGrouping.js", [
h["Core/Axis/Axis.js"],
h["Core/Axis/DateTimeAxis.js"],
h["Core/FormatUtilities.js"],
h["Core/Globals.js"],
h["Core/Series/Point.js"],
h["Core/Series/Series.js"],
h["Core/Tooltip.js"],
h["Core/DefaultOptions.js"],
h["Core/Utilities.js"]
], function(y, B, I, Z, F, U, H, W, R) {
var S = I.format, x = U.prototype;
I = R.addEvent;
var d = R.arrayMax, u = R.arrayMin, P = R.correctFloat, O = R.defined, N = R.error, C = R.extend, b = R.isNumber, w = R.merge, v = R.pick, a = Z.approximations = {
sum: function(t) {
var o = t.length;
if (!o && t.hasNulls)
var n = null;
else if (o)
for (n = 0; o--; )
n += t[o];
return n;
},
average: function(t) {
var o = t.length;
return t = a.sum(t), b(t) && o && (t = P(t / o)), t;
},
averages: function() {
var t = [];
return [].forEach.call(arguments, function(o) {
t.push(a.average(o));
}), 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 ? d(t) : t.hasNulls ? null : void 0;
},
low: function(t) {
return t.length ? u(t) : t.hasNulls ? null : void 0;
},
close: function(t) {
return t.length ? t[t.length - 1] : t.hasNulls ? null : void 0;
},
hlc: function(t, o, n) {
if (t = a.high(t), o = a.low(o), n = a.close(n), b(t) || b(o) || b(n))
return [t, o, n];
},
ohlc: function(t, o, n, A) {
if (t = a.open(t), o = a.high(o), n = a.low(n), A = a.close(A), b(t) || b(o) || b(n) || b(A))
return [t, o, n, A];
},
range: function(t, o) {
if (t = a.low(t), o = a.high(o), b(t) || b(o))
return [t, o];
if (t === null && o === null)
return null;
}
};
R = function(t, o, n, A) {
var _ = this, D = _.data, j = _.options && _.options.data, T = [], X = [], g = [], m = t.length, L = !!o, Y = [], V = _.pointArrayMap, Q = V && V.length, k = ["x"].concat(V || ["y"]), G = this.options.dataGrouping && this.options.dataGrouping.groupAll, z = 0, $ = 0, q;
A = typeof A == "function" ? A : a[A] ? a[A] : a[_.getDGApproximation && _.getDGApproximation() || "average"], Q ? V.forEach(function() {
Y.push([]);
}) : Y.push([]);
var it = Q || 1;
for (q = 0; q <= m && !(t[q] >= n[0]); q++)
;
for (q; q <= m; q++) {
for (; typeof n[z + 1] < "u" && t[q] >= n[z + 1] || q === m; ) {
var et = n[z];
_.dataGroupInfo = { start: G ? $ : _.cropStart + $, length: Y[0].length };
var nt = A.apply(_, Y);
for (_.pointClass && !O(_.dataGroupInfo.options) && (_.dataGroupInfo.options = w(_.pointClass.prototype.optionsToObject.call({ series: _ }, _.options.data[_.cropStart + $])), k.forEach(function(ct) {
delete _.dataGroupInfo.options[ct];
})), typeof nt < "u" && (T.push(et), X.push(nt), g.push(_.dataGroupInfo)), $ = q, et = 0; et < it; et++)
Y[et].length = 0, Y[et].hasNulls = !1;
if (z += 1, q === m)
break;
}
if (q === m)
break;
if (V) {
et = _.options.dataGrouping && _.options.dataGrouping.groupAll ? q : _.cropStart + q, nt = D && D[et] || _.pointClass.prototype.applyOptions.apply({ series: _ }, [j[et]]);
var rt = void 0;
for (et = 0; et < Q; et++)
rt = nt[V[et]], b(rt) ? Y[et].push(rt) : rt === null && (Y[et].hasNulls = !0);
} else
et = L ? o[q] : null, b(et) ? Y[0].push(et) : et === null && (Y[0].hasNulls = !0);
}
return { groupedXData: T, groupedYData: X, groupMap: g };
};
var c = { approximations: a, groupData: R }, p = 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"] } }, l = {
line: {},
spline: {},
area: {},
areaspline: {},
arearange: {},
column: { groupPixelWidth: 10 },
columnrange: { groupPixelWidth: 10 },
candlestick: { groupPixelWidth: 10 },
ohlc: { groupPixelWidth: 5 },
hlc: { groupPixelWidth: 5 },
heikinashi: { groupPixelWidth: 10 }
}, s = Z.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 = R, x.applyGrouping = function(t) {
var o = this.chart, n = this.options.dataGrouping, A = this.allowDG !== !1 && n && v(n.enabled, o.options.isStock), _ = this.visible || !o.options.chart.ignoreHiddenSeries, D, j = this.currentDataGrouping, T = !1;
if (A && !this.requireSorting && (this.requireSorting = T = !0), t = !!(this.isCartesian && !this.isDirty && !this.xAxis.isDirty && !this.yAxis.isDirty && !t) || !A, T && (this.requireSorting = !1), !t) {
this.destroyGroupedData(), A = n.groupAll ? this.xData : this.processedXData;
var X = n.groupAll ? this.yData : this.processedYData;
t = o.plotSizeX, T = this.xAxis;
var g = T.options.ordinal, m = this.groupPixelWidth;
if (m && A && A.length) {
this.isDirty = D = !0, this.points = null;
var L = T.getExtremes(), Y = L.min;
L = L.max, g = g && T.ordinal && T.ordinal.getGroupIntervalFactor(Y, L, this) || 1, t = T.getTimeTicks(B.Additions.prototype.normalizeTimeTickInterval(m * (L - Y) / t * g, n.units || s), Math.min(Y, A[0]), Math.max(L, A[A.length - 1]), T.options.startOfWeek, A, this.closestPointRange), m = x.groupData.apply(this, [A, X, t, n.approximation]), A = m.groupedXData, X = m.groupedYData, g = 0, n && n.smoothed && A.length && (n.firstAnchor = "firstPoint", n.anchor = "middle", n.lastAnchor = "lastPoint", N(32, !1, o, { "dataGrouping.smoothed": "use dataGrouping.anchor" })), o = A;
var V = this.options.dataGrouping;
if (Y = this.currentDataGrouping && this.currentDataGrouping.gapSize, V && this.xData && Y && this.groupMap) {
var Q = o.length - 1, k = V.anchor, G = v(V.firstAnchor, k);
if (V = v(V.lastAnchor, k), k && k !== "start") {
var z = Y * { middle: 0.5, end: 1 }[k];
for (k = o.length - 1; k-- && 0 < k; )
o[k] += z;
}
if (G && G !== "start" && this.xData[0] >= o[0]) {
k = this.groupMap[0].start, z = this.groupMap[0].length;
var $ = void 0;
b(k) && b(z) && ($ = k + (z - 1)), o[0] = { middle: o[0] + 0.5 * Y, end: o[0] + Y, firstPoint: this.xData[0], lastPoint: $ && this.xData[$] }[G];
}
V && V !== "start" && Y && o[Q] >= L - Y && (L = this.groupMap[this.groupMap.length - 1].start, o[Q] = { middle: o[Q] + 0.5 * Y, end: o[Q] + Y, firstPoint: L && this.xData[L], lastPoint: this.xData[this.xData.length - 1] }[V]);
}
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, _ && (_ = A, O(_[0]) && b(T.min) && b(T.dataMin) && _[0] < T.min && ((!O(T.options.min) && T.min <= T.dataMin || T.min === T.dataMin) && (T.min = Math.min(_[0], T.min)), T.dataMin = Math.min(_[0], T.dataMin)), O(_[_.length - 1]) && b(T.max) && b(T.dataMax) && _[_.length - 1] > T.max && ((!O(T.options.max) && b(T.dataMax) && T.max >= T.dataMax || T.max === T.dataMax) && (T.max = Math.max(_[_.length - 1], T.max)), T.dataMax = Math.max(_[_.length - 1], T.dataMax))), n.groupAll && (this.allGroupedData = X, n = this.cropData(A, X, T.min, T.max, 1), A = n.xData, X = n.yData, this.cropStart = n.start), this.processedXData = A, this.processedYData = X;
} else
this.groupMap = null;
this.hasGroupedData = D, this.currentDataGrouping = L, this.preventGraphAnimation = (j && j.totalRange) !== (L && L.totalRange);
}
}, x.destroyGroupedData = function() {
this.groupedData && (this.groupedData.forEach(function(t, o) {
t && (this.groupedData[o] = t.destroy ? t.destroy() : null);
}, this), this.groupedData.length = 0);
}, x.generatePoints = function() {
p.apply(this), this.destroyGroupedData(), this.groupedData = this.hasGroupedData ? this.points : null;
}, y.prototype.applyGrouping = function(t) {
var o = this;
o.series.forEach(function(n) {
n.groupPixelWidth = void 0, n.groupPixelWidth = o.getGroupPixelWidth && o.getGroupPixelWidth(), n.groupPixelWidth && (n.hasProcessed = !0), n.applyGrouping(!!t.hasExtemesChanged);
});
}, y.prototype.getGroupPixelWidth = function() {
var t = this.series, o = t.length, n, A = 0, _ = !1, D;
for (n = o; n--; )
(D = t[n].options.dataGrouping) && (A = Math.max(A, v(D.groupPixelWidth, i.groupPixelWidth)));
for (n = o; n--; )
(D = t[n].options.dataGrouping) && (o = (t[n].processedXData || t[n].data).length, (t[n].groupPixelWidth || o > this.chart.plotSizeX / A || o && D.forced) && (_ = !0));
return _ ? A : 0;
}, y.prototype.setDataGrouping = function(t, o) {
var n;
if (o = v(o, !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(A) {
A.dataGrouping = t;
}, !1);
this.ordinal && (this.ordinal.slope = void 0), o && this.chart.redraw();
}, I(y, "postProcessData", y.prototype.applyGrouping), I(F, "update", function() {
if (this.dataGroup)
return N(
24,
!1,
this.series.chart
), !1;
}), I(H, "headerFormatter", function(t) {
var o = this.chart, n = o.time, A = t.labelConfig, _ = A.series, D = _.tooltipOptions, j = _.options.dataGrouping, T = D.xDateFormat, X = _.xAxis, g = D[t.isFooter ? "footerFormat" : "headerFormat"];
if (X && X.options.type === "datetime" && j && b(A.key)) {
var m = _.currentDataGrouping;
if (j = j.dateTimeLabelFormats || i.dateTimeLabelFormats, m)
if (D = j[m.unitName], m.count === 1)
T = D[0];
else {
T = D[1];
var L = D[2];
}
else
!T && j && X.dateTime && (T = X.dateTime.getXDateFormat(A.x, D.dateTimeLabelFormats));
T = n.dateFormat(T, A.key), L && (T += n.dateFormat(L, A.key + m.totalRange - 1)), _.chart.styledMode && (g = this.styledModeFormat(g)), t.text = S(g, { point: C(A.point, { key: T }), series: _ }, o), t.preventDefault();
}
}), I(U, "destroy", x.destroyGroupedData), I(U, "afterSetOptions", function(t) {
t = t.options;
var o = this.type, n = this.chart.options.plotOptions, A = W.defaultOptions.plotOptions[o].dataGrouping, _ = this.useCommonDataGrouping && i;
if (n && (l[o] || _)) {
A || (A = w(i, l[o]));
var D = this.chart.rangeSelector;
t.dataGrouping = w(
_,
A,
n.series && n.series.dataGrouping,
n[o].dataGrouping,
this.userOptions.dataGrouping,
!t.isInternal && D && b(D.selected) && D.buttonOptions[D.selected].dataGrouping
);
}
}), I(y, "afterSetScale", function() {
this.series.forEach(function(t) {
t.hasProcessed = !1;
});
}), Z.dataGrouping = c, c;
}), E(h, "Series/HLC/HLCPoint.js", [h["Core/Series/SeriesRegistry.js"]], function(y) {
var B = this && this.__extends || function() {
var I = function(Z, F) {
return I = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(U, H) {
U.__proto__ = H;
} || function(U, H) {
for (var W in H)
H.hasOwnProperty(W) && (U[W] = H[W]);
}, I(Z, F);
};
return function(Z, F) {
function U() {
this.constructor = Z;
}
I(Z, F), Z.prototype = F === null ? Object.create(F) : (U.prototype = F.prototype, new U());
};
}();
return function(I) {
function Z() {
var F = I !== null && I.apply(this, arguments) || this;
return F.close = void 0, F.high = void 0, F.low = void 0, F.options = void 0, F.plotClose = void 0, F.series = void 0, F;
}
return B(Z, I), Z;
}(y.seriesTypes.column.prototype.pointClass);
}), E(
h,
"Series/HLC/HLCSeries.js",
[h["Series/HLC/HLCPoint.js"], h["Core/Series/SeriesRegistry.js"], h["Core/Utilities.js"]],
function(y, B, I) {
var Z = this && this.__extends || function() {
var W = function(R, S) {
return W = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(x, d) {
x.__proto__ = d;
} || function(x, d) {
for (var u in d)
d.hasOwnProperty(u) && (x[u] = d[u]);
}, W(R, S);
};
return function(R, S) {
function x() {
this.constructor = R;
}
W(R, S), R.prototype = S === null ? Object.create(S) : (x.prototype = S.prototype, new x());
};
}(), F = B.seriesTypes.column, U = I.extend, H = I.merge;
return I = function(W) {
function R() {
var S = W !== null && W.apply(this, arguments) || this;
return S.data = void 0, S.options = void 0, S.points = void 0, S.yData = void 0, S;
}
return Z(R, W), R.prototype.extendStem = function(S, x, d) {
var u = S[0];
S = S[1], typeof u[2] == "number" && (u[2] = Math.max(d + x, u[2])), typeof S[2] == "number" && (S[2] = Math.min(d - x, S[2]));
}, R.prototype.getPointPath = function(S, x) {
x = x.strokeWidth();
var d = S.series, u = x % 2 / 2, P = Math.round(S.plotX) - u, O = Math.round(S.shapeArgs.width / 2), N = [["M", P, Math.round(S.yBottom)], ["L", P, Math.round(S.plotHigh)]];
return S.close !== null && (S = Math.round(S.plotClose) + u, N.push(["M", P, S], ["L", P + O, S]), d.extendStem(N, x / 2, S)), N;
}, R.prototype.drawSinglePoint = function(S) {
var x = S.series, d = x.chart, u = S.graphic, P = !u;
typeof S.plotY < "u" && (u || (S.graphic = u = d.renderer.path().add(x.group)), d.styledMode || u.attr(x.pointAttribs(S, S.selected && "select")), x = x.getPointPath(S, u), u[P ? "attr" : "animate"]({ d: x }).addClass(S.getClassName(), !0));
}, R.prototype.drawPoints = function() {
this.points.forEach(this.drawSinglePoint);
}, R.prototype.init = function() {
W.prototype.init.apply(this, arguments), this.options.stacking = void 0;
}, R.prototype.pointAttribs = function(S, x) {
return S = W.prototype.pointAttribs.call(this, S, x), delete S.fill, S;
}, R.prototype.toYData = function(S) {
return [S.high, S.low, S.close];
}, R.prototype.translate = function() {
var S = this, x = S.yAxis, d = this.pointArrayMap && this.pointArrayMap.slice() || [], u = d.map(function(P) {
return "plot" + (P.charAt(0).toUpperCase() + P.slice(1));
});
u.push("yBottom"), d.push("low"), W.prototype.translate.apply(S), S.points.forEach(function(P) {
d.forEach(function(O, N) {
O = P[O], O !== null && (S.dataModify && (O = S.dataModify.modifyValue(O)), P[u[N]] = x.toPixels(O, !0));
}), P.tooltipPos[1] = P.plotHigh + x.pos - S.chart.plotTop;
});
}, R.defaultOptions = H(F.defaultOptions, { lineWidth: 1, tooltip: { pointFormat: '● {series.name}
High: {point.high}
Low: {point.low}
Close: {point.close}
' }, threshold: null, states: { hover: { lineWidth: 3 } }, stickyTracking: !0 }), R;
}(F), U(I.prototype, { animate: null, directTouch: !1, pointArrayMap: ["high", "low", "close"], pointAttrToOptions: {
stroke: "color",
"stroke-width": "lineWidth"
}, pointValKey: "close" }), I.prototype.pointClass = y, B.registerSeriesType("hlc", I), I;
}
), E(h, "Series/OHLC/OHLCPoint.js", [h["Core/Series/SeriesRegistry.js"]], function(y) {
var B = this && this.__extends || function() {
var I = function(Z, F) {
return I = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(U, H) {
U.__proto__ = H;
} || function(U, H) {
for (var W in H)
H.hasOwnProperty(W) && (U[W] = H[W]);
}, I(Z, F);
};
return function(Z, F) {
function U() {
this.constructor = Z;
}
I(Z, F), Z.prototype = F === null ? Object.create(F) : (U.prototype = F.prototype, new U());
};
}();
return function(I) {
function Z() {
var F = I !== null && I.apply(this, arguments) || this;
return F.open = void 0, F.options = void 0, F.plotOpen = void 0, F.series = void 0, F;
}
return B(Z, I), Z.prototype.getClassName = function() {
return I.prototype.getClassName.call(this) + (this.open < this.close ? " highcharts-point-up" : " highcharts-point-down");
}, Z.prototype.resolveUpColor = function() {
this.open < this.close && !this.options.color && this.series.options.upColor && (this.color = this.series.options.upColor);
}, Z.prototype.resolveColor = function() {
I.prototype.resolveColor.call(this), this.resolveUpColor();
}, Z.prototype.getZone = function() {
var F = I.prototype.getZone.call(this);
return this.resolveUpColor(), F;
}, Z.prototype.applyOptions = function() {
return I.prototype.applyOptions.apply(this, arguments), this.resolveColor && this.resolveColor(), this;
}, Z;
}(y.seriesTypes.hlc.prototype.pointClass);
}), E(
h,
"Series/OHLC/OHLCSeries.js",
[h["Series/OHLC/OHLCPoint.js"], h["Core/Series/SeriesRegistry.js"], h["Core/Utilities.js"]],
function(y, B, I) {
var Z = this && this.__extends || function() {
var x = function(d, u) {
return x = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(P, O) {
P.__proto__ = O;
} || function(P, O) {
for (var N in O)
O.hasOwnProperty(N) && (P[N] = O[N]);
}, x(d, u);
};
return function(d, u) {
function P() {
this.constructor = d;
}
x(d, u), d.prototype = u === null ? Object.create(u) : (P.prototype = u.prototype, new P());
};
}(), F = B.series, U = B.seriesTypes.hlc, H = I.addEvent, W = I.extend, R = I.merge, S = function(x) {
function d() {
var u = x !== null && x.apply(this, arguments) || this;
return u.data = void 0, u.options = void 0, u.points = void 0, u;
}
return Z(d, x), d.prototype.getPointPath = function(u, P) {
var O = x.prototype.getPointPath.call(this, u, P);
P = P.strokeWidth();
var N = P % 2 / 2, C = Math.round(u.plotX) - N, b = Math.round(u.shapeArgs.width / 2);
return u.open !== null && (u = Math.round(u.plotOpen) + N, O.push(["M", C, u], ["L", C - b, u]), x.prototype.extendStem.call(this, O, P / 2, u)), O;
}, d.prototype.pointAttribs = function(u, P) {
P = x.prototype.pointAttribs.call(this, u, P);
var O = this.options;
return delete P.fill, !u.options.color && O.upColor && u.open < u.close && (P.stroke = O.upColor), P;
}, d.prototype.toYData = function(u) {
return [u.open, u.high, u.low, u.close];
}, d.defaultOptions = R(U.defaultOptions, { tooltip: { pointFormat: '● {series.name}
Open: {point.open}
High: {point.high}
Low: {point.low}
Close: {point.close}
' } }), d;
}(U);
return W(S.prototype, { pointArrayMap: ["open", "high", "low", "close"] }), S.prototype.pointClass = y, B.registerSeriesType("ohlc", S), H(F, "init", function(x) {
x = x.options, x.useOhlcData && x.id !== "highcharts-navigator-series" && W(this, { pointValKey: S.prototype.pointValKey, pointArrayMap: S.prototype.pointArrayMap, toYData: S.prototype.toYData });
}), H(F, "afterSetOptions", function(x) {
x = x.options;
var d = x.dataGrouping;
d && x.useOhlcData && x.id !== "highcharts-navigator-series" && (d.approximation = "ohlc");
}), S;
}
), E(h, "Series/Candlestick/CandlestickSeries.js", [h["Core/DefaultOptions.js"], h["Core/Series/SeriesRegistry.js"], h["Core/Utilities.js"]], function(y, B, I) {
var Z = this && this.__extends || function() {
var R = function(S, x) {
return R = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d, u) {
d.__proto__ = u;
} || function(d, u) {
for (var P in u)
u.hasOwnProperty(P) && (d[P] = u[P]);
}, R(S, x);
};
return function(S, x) {
function d() {
this.constructor = S;
}
R(S, x), S.prototype = x === null ? Object.create(x) : (d.prototype = x.prototype, new d());
};
}(), F = y.defaultOptions;
y = B.seriesTypes;
var U = y.column, H = y.ohlc, W = I.merge;
return I = function(R) {
function S() {
var x = R !== null && R.apply(this, arguments) || this;
return x.data = void 0, x.options = void 0, x.points = void 0, x;
}
return Z(S, R), S.prototype.pointAttribs = function(x, d) {
var u = U.prototype.pointAttribs.call(this, x, d), P = this.options, O = x.open < x.close, N = P.lineColor || this.color, C = x.color || this.color;
return u["stroke-width"] = P.lineWidth, u.fill = x.options.color || O && P.upColor || C, u.stroke = x.options.lineColor || O && P.upLineColor || N, d && (x = P.states[d], u.fill = x.color || u.fill, u.stroke = x.lineColor || u.stroke, u["stroke-width"] = x.lineWidth || u["stroke-width"]), u;
}, S.prototype.drawPoints = function() {
var x = this, d = x.chart, u = x.yAxis.reversed;
x.points.forEach(function(P) {
var O = P.graphic, N = !O;
if (typeof P.plotY < "u") {
O || (P.graphic = O = d.renderer.path().add(x.group)), x.chart.styledMode || O.attr(x.pointAttribs(P, P.selected && "select")).shadow(x.options.shadow);
var C = O.strokeWidth() % 2 / 2, b = Math.round(P.plotX) - C, w = P.plotOpen, v = P.plotClose, a = Math.min(w, v);
w = Math.max(w, v);
var c = Math.round(P.shapeArgs.width / 2);
v = u ? w !== P.yBottom : Math.round(a) !== Math.round(P.plotHigh);
var p = u ? Math.round(a) !== Math.round(P.plotHigh) : w !== P.yBottom;
a = Math.round(a) + C, w = Math.round(w) + C, C = [], C.push(["M", b - c, w], ["L", b - c, a], ["L", b + c, a], ["L", b + c, w], ["Z"], ["M", b, a], ["L", b, v ? Math.round(u ? P.yBottom : P.plotHigh) : a], ["M", b, w], ["L", b, p ? Math.round(u ? P.plotHigh : P.yBottom) : w]), O[N ? "attr" : "animate"]({ d: C }).addClass(P.getClassName(), !0);
}
});
}, S.defaultOptions = W(H.defaultOptions, F.plotOptions, { states: { hover: { lineWidth: 2 } }, tooltip: F.plotOptions.ohlc.tooltip, threshold: null, lineColor: "#000000", lineWidth: 1, upColor: "#ffffff", stickyTracking: !0 }), S;
}(H), B.registerSeriesType("candlestick", I), I;
}), E(h, "Series/Flags/FlagsPoint.js", [h["Core/Series/SeriesRegistry.js"], h["Core/Utilities.js"]], function(y, B) {
var I = this && this.__extends || function() {
var F = function(U, H) {
return F = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(W, R) {
W.__proto__ = R;
} || function(W, R) {
for (var S in R)
R.hasOwnProperty(S) && (W[S] = R[S]);
}, F(U, H);
};
return function(U, H) {
function W() {
this.constructor = U;
}
F(U, H), U.prototype = H === null ? Object.create(H) : (W.prototype = H.prototype, new W());
};
}(), Z = B.isNumber;
return function(F) {
function U() {
var H = F !== null && F.apply(this, arguments) || this;
return H.options = void 0, H.series = void 0, H;
}
return I(U, F), U.prototype.isValid = function() {
return Z(this.y) || typeof this.y > "u";
}, U.prototype.hasNewShapeType = function() {
var H = this.options.shape || this.series.options.shape;
return this.graphic && H && H !== this.graphic.symbolKey;
}, U;
}(y.seriesTypes.column.prototype.pointClass);
}), E(h, "Series/OnSeriesComposition.js", [
h["Series/Column/ColumnSeries.js"],
h["Core/Series/Series.js"],
h["Core/Utilities.js"]
], function(y, B, I) {
var Z = y.prototype, F = B.prototype, U = I.defined, H = I.stableSort, W;
return function(R) {
function S() {
return F.getPlotBox.call(this.options.onSeries && this.chart.get(this.options.onSeries) || this);
}
function x() {
Z.translate.apply(this);
var u = this, P = u.options, O = u.chart, N = u.points, C = P.onSeries, b = (C = C && O.get(C)) && C.options.step, w = C && C.points, v = O.inverted, a = u.xAxis, c = u.yAxis;
O = N.length - 1;
var p;
P = P.onKey || "y";
var i = w && w.length, l = 0, s;
if (C && C.visible && i) {
l = (C.pointXOffset || 0) + (C.barW || 0) / 2;
var t = C.currentDataGrouping, o = w[i - 1].x + (t ? t.totalRange : 0);
for (H(N, function(_, D) {
return _.x - D.x;
}), P = "plot" + P[0].toUpperCase() + P.substr(1); i-- && N[O]; ) {
var n = w[i];
if (t = N[O], t.y = n.y, n.x <= t.x && typeof n[P] < "u") {
if (t.x <= o && (t.plotY = n[P], n.x < t.x && !b && (s = w[i + 1]) && typeof s[P] < "u")) {
var A = (t.x - n.x) / (s.x - n.x);
t.plotY += A * (s[P] - n[P]), t.y += A * (s.y - n.y);
}
if (O--, i++, 0 > O)
break;
}
}
}
N.forEach(function(_, D) {
if (_.plotX += l, (typeof _.plotY > "u" || v) && (0 <= _.plotX && _.plotX <= a.len ? v ? (_.plotY = a.translate(_.x, 0, 1, 0, 1), _.plotX = U(_.y) ? c.translate(_.y, 0, 0, 0, 1) : 0) : _.plotY = (a.opposite ? 0 : u.yAxis.len) + a.offset : _.shapeArgs = {}), (p = N[D - 1]) && p.plotX === _.plotX) {
typeof p.stackIndex > "u" && (p.stackIndex = 0);
var j = p.stackIndex + 1;
}
_.stackIndex = j;
}), this.onSeries = C;
}
var d = [];
R.compose = function(u) {
if (d.indexOf(u) === -1) {
d.push(u);
var P = u.prototype;
P.getPlotBox = S, P.translate = x;
}
return u;
}, R.getPlotBox = S, R.translate = x;
}(W || (W = {})), W;
}), E(
h,
"Series/Flags/FlagsSymbols.js",
[h["Core/Renderer/RendererRegistry.js"], h["Core/Renderer/SVG/SVGRenderer.js"]],
function(y, B) {
function I(F) {
Z[F + "pin"] = function(U, H, W, R, S) {
var x = S && S.anchorX;
S = S && S.anchorY, F === "circle" && R > W && (U -= Math.round((R - W) / 2), W = R);
var d = Z[F](U, H, W, R);
if (x && S) {
var u = x;
F === "circle" ? u = U + W / 2 : (U = d[0], W = d[1], U[0] === "M" && W[0] === "L" && (u = (U[1] + W[1]) / 2)), d.push(["M", u, H > S ? H : H + R], ["L", x, S]), d = d.concat(Z.circle(x - 1, S - 1, 2, 2));
}
return d;
};
}
var Z = B.prototype.symbols;
return Z.flag = function(F, U, H, W, R) {
var S = R && R.anchorX || F;
R = R && R.anchorY || U;
var x = Z.circle(S - 1, R - 1, 2, 2);
return x.push(["M", S, R], ["L", F, U + W], ["L", F, U], ["L", F + H, U], ["L", F + H, U + W], ["L", F, U + W], ["Z"]), x;
}, I("circle"), I("square"), y = y.getRendererType(), y !== B && (y.prototype.symbols.circlepin = Z.circlepin, y.prototype.symbols.flag = Z.flag, y.prototype.symbols.squarepin = Z.squarepin), Z;
}
), E(h, "Series/Flags/FlagsSeries.js", [
h["Series/Flags/FlagsPoint.js"],
h["Core/Globals.js"],
h["Series/OnSeriesComposition.js"],
h["Core/Renderer/RendererUtilities.js"],
h["Core/Series/SeriesRegistry.js"],
h["Core/Renderer/SVG/SVGElement.js"],
h["Core/Utilities.js"]
], function(y, B, I, Z, F, U, H) {
var W = this && this.__extends || function() {
var C = function(b, w) {
return C = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(v, a) {
v.__proto__ = a;
} || function(v, a) {
for (var c in a)
a.hasOwnProperty(c) && (v[c] = a[c]);
}, C(b, w);
};
return function(b, w) {
function v() {
this.constructor = b;
}
C(b, w), b.prototype = w === null ? Object.create(w) : (v.prototype = w.prototype, new v());
};
}();
B = B.noop;
var R = Z.distribute, S = F.series, x = F.seriesTypes.column, d = H.addEvent, u = H.defined;
Z = H.extend;
var P = H.merge, O = H.objectEach, N = H.wrap;
return H = function(C) {
function b() {
var w = C !== null && C.apply(this, arguments) || this;
return w.data = void 0, w.options = void 0, w.points = void 0, w;
}
return W(b, C), b.prototype.animate = function(w) {
w && this.setClip();
}, b.prototype.drawPoints = function() {
var w = this.points, v = this.chart, a = v.renderer, c = v.inverted, p = this.options, i = p.y, l, s = this.yAxis, t = {}, o = [];
for (l = w.length; l--; ) {
var n = w[l], A = (c ? n.plotY : n.plotX) > this.xAxis.len, _ = n.plotX, D = n.stackIndex, j = n.options.shape || p.shape, T = n.plotY;
typeof T < "u" && (T = n.plotY + i - (typeof D < "u" && D * p.stackDistance)), n.anchorX = D ? void 0 : n.plotX;
var X = D ? void 0 : n.plotY, g = j !== "flag";
D = n.graphic, typeof T < "u" && 0 <= _ && !A ? (D && n.hasNewShapeType() && (D = D.destroy()), D || (D = n.graphic = a.label("", null, null, j, null, null, p.useHTML).addClass("highcharts-point").add(this.markerGroup), n.graphic.div && (n.graphic.div.point = n), D.isNew = !0), D.attr({
align: g ? "center" : "left",
width: p.width,
height: p.height,
"text-align": p.textAlign
}), v.styledMode || D.attr(this.pointAttribs(n)).css(P(p.style, n.style)).shadow(p.shadow), 0 < _ && (_ -= D.strokeWidth() % 2), j = { y: T, anchorY: X }, p.allowOverlapX && (j.x = _, j.anchorX = n.anchorX), D.attr({ text: n.options.title || p.title || "A" })[D.isNew ? "attr" : "animate"](j), p.allowOverlapX || (t[n.plotX] ? t[n.plotX].size = Math.max(t[n.plotX].size, D.width) : t[n.plotX] = { align: g ? 0.5 : 0, size: D.width, target: _, anchorX: _ }), n.tooltipPos = [_, T + s.pos - v.plotTop]) : D && (n.graphic = D.destroy());
}
if (!p.allowOverlapX) {
var m = 100;
O(t, function(L) {
L.plotX = L.anchorX, o.push(L), m = Math.max(L.size, m);
}), R(o, c ? s.len : this.xAxis.len, m), w.forEach(function(L) {
var Y = L.graphic && t[L.plotX];
Y && (L.graphic[L.graphic.isNew ? "attr" : "animate"]({ x: Y.pos + Y.align * Y.size, anchorX: L.anchorX }), u(Y.pos) ? L.graphic.isNew = !1 : (L.graphic.attr({ x: -9999, anchorX: -9999 }), L.graphic.isNew = !0));
});
}
p.useHTML && N(this.markerGroup, "on", function(L) {
return U.prototype.on.apply(L.apply(this, [].slice.call(arguments, 1)), [].slice.call(arguments, 1));
});
}, b.prototype.drawTracker = function() {
var w = this.points;
C.prototype.drawTracker.call(this), w.forEach(function(v) {
var a = v.graphic;
a && (v.unbindMouseOver && v.unbindMouseOver(), v.unbindMouseOver = d(a.element, "mouseover", function() {
0 < v.stackIndex && !v.raised && (v._y = a.y, a.attr({ y: v._y - 8 }), v.raised = !0), w.forEach(function(c) {
c !== v && c.raised && c.graphic && (c.graphic.attr({ y: c._y }), c.raised = !1);
});
}));
});
}, b.prototype.pointAttribs = function(w, v) {
var a = this.options, c = w && w.color || this.color, p = a.lineColor, i = w && w.lineWidth;
return w = w && w.fillColor || a.fillColor, v && (w = a.states[v].fillColor, p = a.states[v].lineColor, i = a.states[v].lineWidth), { fill: w || c, stroke: p || c, "stroke-width": i || a.lineWidth || 0 };
}, b.prototype.setClip = function() {
S.prototype.setClip.apply(this, arguments), this.options.clip !== !1 && this.sharedClipKey && this.markerGroup && this.markerGroup.clip(this.chart.sharedClips[this.sharedClipKey]);
}, b.defaultOptions = P(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), I.compose(H), Z(H.prototype, { allowDG: !1, forceCrop: !0, invertible: !1, noSharedTooltip: !0, pointClass: y, sorted: !1, takeOrdinalPosition: !1, trackerGroups: ["markerGroup"], buildKDTree: B, init: S.prototype.init, invertGroups: B }), F.registerSeriesType("flags", H), H;
}), E(h, "Core/Axis/ScrollbarAxis.js", [h["Core/Utilities.js"]], function(y) {
var B = y.addEvent, I = y.defined, Z = y.pick;
return function() {
function F() {
}
return F.compose = function(U, H) {
if (F.composed.indexOf(U) === -1)
F.composed.push(U);
else
return U;
var W = function(R) {
var S = Z(R.options && R.options.min, R.min), x = Z(R.options && R.options.max, R.max);
return { axisMin: S, axisMax: x, scrollMin: I(R.dataMin) ? Math.min(S, R.min, R.dataMin, Z(R.threshold, 1 / 0)) : S, scrollMax: I(R.dataMax) ? Math.max(x, R.max, R.dataMax, Z(R.threshold, -1 / 0)) : x };
};
return B(U, "afterInit", function() {
var R = this;
R.options && R.options.scrollbar && R.options.scrollbar.enabled && (R.options.scrollbar.vertical = !R.horiz, R.options.startOnTick = R.options.endOnTick = !1, R.scrollbar = new H(R.chart.renderer, R.options.scrollbar, R.chart), B(R.scrollbar, "changed", function(S) {
var x = W(R), d = x.axisMax, u = x.scrollMin, P = x.scrollMax - u;
I(x.axisMin) && I(d) && (R.horiz && !R.reversed || !R.horiz && R.reversed ? (x = u + P * this.to, u += P * this.from) : (x = u + P * (1 - this.from), u += P * (1 - this.to)), this.shouldUpdateExtremes(S.DOMType) ? R.setExtremes(u, x, !0, S.DOMType !== "mousemove" && S.DOMType !== "touchmove", S) : this.setRange(
this.from,
this.to
));
}));
}), B(U, "afterRender", function() {
var R = W(this), S = R.scrollMin, x = R.scrollMax;
R = this.scrollbar;
var d = this.axisTitleMargin + (this.titleOffset || 0), u = this.chart.scrollbarsOffsets, P = this.options.margin || 0;
R && (this.horiz ? (this.opposite || (u[1] += d), R.position(this.left, this.top + this.height + 2 + u[1] - (this.opposite ? P : 0), this.width, this.height), this.opposite || (u[1] += P), d = 1) : (this.opposite && (u[0] += d), R.position(
R.options.opposite ? this.left + this.width + 2 + u[0] - (this.opposite ? 0 : P) : this.opposite ? 0 : P,
this.top,
this.width,
this.height
), this.opposite && (u[0] += P), d = 0), u[d] += R.size + R.options.margin, isNaN(S) || isNaN(x) || !I(this.min) || !I(this.max) || this.min === this.max ? R.setRange(0, 1) : (u = (this.min - S) / (x - S), S = (this.max - S) / (x - S), this.horiz && !this.reversed || !this.horiz && this.reversed ? R.setRange(u, S) : R.setRange(1 - S, 1 - u)));
}), B(U, "afterGetOffset", function() {
var R = this.scrollbar && !this.scrollbar.options.opposite;
R = this.horiz ? 2 : R ? 3 : 1;
var S = this.scrollbar;
S && (this.chart.scrollbarsOffsets = [0, 0], this.chart.axisOffset[R] += S.size + S.options.margin);
}), U;
}, F.composed = [], F;
}();
}), E(h, "Core/ScrollbarDefaults.js", [h["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
};
}), E(h, "Core/Scrollbar.js", [h["Core/DefaultOptions.js"], h["Core/Globals.js"], h["Core/Axis/ScrollbarAxis.js"], h["Core/ScrollbarDefaults.js"], h["Core/Utilities.js"]], function(y, B, I, Z, F) {
var U = y.defaultOptions, H = F.addEvent, W = F.correctFloat, R = F.defined, S = F.destroyObjectProperties, x = F.fireEvent, d = F.merge, u = F.pick, P = F.removeEvent;
return y = function() {
function O(N, C, 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(N, C, b);
}
return O.compose = function(N) {
I.compose(N, O);
}, O.swapXY = function(N, C) {
return C && N.forEach(function(b) {
for (var w = b.length, v, a = 0; a < w; a += 2)
v = b[a + 1], typeof v == "number" && (b[a + 1] = b[a + 2], b[a + 2] = v);
}), N;
}, O.prototype.addEvents = function() {
var N = this.options.inverted ? [1, 0] : [0, 1], C = this.scrollbarButtons, b = this.scrollbarGroup.element, w = this.track.element, v = this.mouseDownHandler.bind(this), a = this.mouseMoveHandler.bind(this), c = this.mouseUpHandler.bind(this);
N = [[C[N[0]].element, "click", this.buttonToMinClick.bind(this)], [C[N[1]].element, "click", this.buttonToMaxClick.bind(this)], [w, "click", this.trackClick.bind(this)], [b, "mousedown", v], [b.ownerDocument, "mousemove", a], [b.ownerDocument, "mouseup", c]], B.hasTouch && N.push(
[b, "touchstart", v],
[b.ownerDocument, "touchmove", a],
[b.ownerDocument, "touchend", c]
), N.forEach(function(p) {
H.apply(null, p);
}), this._events = N;
}, O.prototype.buttonToMaxClick = function(N) {
var C = (this.to - this.from) * u(this.options.step, 0.2);
this.updatePosition(this.from + C, this.to + C), x(this, "changed", { from: this.from, to: this.to, trigger: "scrollbar", DOMEvent: N });
}, O.prototype.buttonToMinClick = function(N) {
var C = W(this.to - this.from) * u(this.options.step, 0.2);
this.updatePosition(W(this.from - C), W(this.to - C)), x(this, "changed", {
from: this.from,
to: this.to,
trigger: "scrollbar",
DOMEvent: N
});
}, O.prototype.cursorToScrollbarPosition = function(N) {
var C = this.options;
return C = C.minWidth > this.calculatedWidth ? C.minWidth : 0, { chartX: (N.chartX - this.x - this.xOffset) / (this.barWidth - C), chartY: (N.chartY - this.y - this.yOffset) / (this.barWidth - C) };
}, O.prototype.destroy = function() {
var N = this, C = N.chart.scroller;
N.removeEvents(), ["track", "scrollbarRifles", "scrollbar", "scrollbarGroup", "group"].forEach(function(b) {
N[b] && N[b].destroy && (N[b] = N[b].destroy());
}), C && N === C.scrollbar && (C.scrollbar = null, S(C.scrollbarButtons));
}, O.prototype.drawScrollbarButton = function(N) {
var C = this.renderer, b = this.scrollbarButtons, w = this.options, v = this.size, a = C.g().add(this.group);
b.push(a), a = C.rect().addClass("highcharts-scrollbar-button").add(a), this.chart.styledMode || a.attr({ stroke: w.buttonBorderColor, "stroke-width": w.buttonBorderWidth, fill: w.buttonBackgroundColor }), a.attr(a.crisp({ x: -0.5, y: -0.5, width: v + 1, height: v + 1, r: w.buttonBorderRadius }, a.strokeWidth())), a = C.path(O.swapXY([["M", v / 2 + (N ? -1 : 1), v / 2 - 3], ["L", v / 2 + (N ? -1 : 1), v / 2 + 3], ["L", v / 2 + (N ? 2 : -2), v / 2]], w.vertical)).addClass("highcharts-scrollbar-arrow").add(b[N]), this.chart.styledMode || a.attr({ fill: w.buttonArrowColor });
}, O.prototype.init = function(N, C, b) {
this.scrollbarButtons = [], this.renderer = N, this.userOptions = C, this.options = d(Z, U.scrollbar, C), this.chart = b, this.size = u(this.options.size, this.options.height), C.enabled && (this.render(), this.addEvents());
}, O.prototype.mouseDownHandler = function(N) {
N = this.chart.pointer.normalize(N), N = this.cursorToScrollbarPosition(N), this.chartX = N.chartX, this.chartY = N.chartY, this.initPositions = [this.from, this.to], this.grabbedCenter = !0;
}, O.prototype.mouseMoveHandler = function(N) {
var C = this.chart.pointer.normalize(N), b = this.options.vertical ? "chartY" : "chartX", w = this.initPositions || [];
!this.grabbedCenter || N.touches && N.touches[0][b] === 0 || (C = this.cursorToScrollbarPosition(C)[b], b = this[b], b = C - b, this.hasDragged = !0, this.updatePosition(w[0] + b, w[1] + b), this.hasDragged && x(this, "changed", { from: this.from, to: this.to, trigger: "scrollbar", DOMType: N.type, DOMEvent: N }));
}, O.prototype.mouseUpHandler = function(N) {
this.hasDragged && x(this, "changed", { from: this.from, to: this.to, trigger: "scrollbar", DOMType: N.type, DOMEvent: N }), this.grabbedCenter = this.hasDragged = this.chartX = this.chartY = null;
}, O.prototype.position = function(N, C, b, w) {
var v = this.options.vertical, a = this.rendered ? "animate" : "attr", c = 0;
this.x = N, this.y = C + this.trackBorderWidth, this.width = b, this.xOffset = this.height = w, this.yOffset = c, v ? (this.width = this.yOffset = b = c = this.size, this.xOffset = C = 0, this.barWidth = w - 2 * b, this.x = N += this.options.margin) : (this.height = this.xOffset = w = C = this.size, this.barWidth = b - 2 * w, this.y += this.options.margin), this.group[a]({ translateX: N, translateY: this.y }), this.track[a]({ width: b, height: w }), this.scrollbarButtons[1][a]({ translateX: v ? 0 : b - C, translateY: v ? w - c : 0 });
}, O.prototype.removeEvents = function() {
this._events.forEach(function(N) {
P.apply(null, N);
}), this._events.length = 0;
}, O.prototype.render = function() {
var N = this.renderer, C = this.options, b = this.size, w = this.chart.styledMode, v = N.g("scrollbar").attr({ zIndex: C.zIndex, translateY: -99999 }).add();
this.group = v, this.track = N.rect().addClass("highcharts-scrollbar-track").attr({ x: 0, r: C.trackBorderRadius || 0, height: b, width: b }).add(v), w || this.track.attr({ fill: C.trackBackgroundColor, stroke: C.trackBorderColor, "stroke-width": C.trackBorderWidth }), this.trackBorderWidth = this.track.strokeWidth(), this.track.attr({ y: -this.trackBorderWidth % 2 / 2 }), this.scrollbarGroup = N.g().add(v), this.scrollbar = N.rect().addClass("highcharts-scrollbar-thumb").attr({ height: b, width: b, r: C.barBorderRadius || 0 }).add(this.scrollbarGroup), this.scrollbarRifles = N.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]], C.vertical)).addClass("highcharts-scrollbar-rifles").add(this.scrollbarGroup), w || (this.scrollbar.attr({ fill: C.barBackgroundColor, stroke: C.barBorderColor, "stroke-width": C.barBorderWidth }), this.scrollbarRifles.attr({ stroke: C.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(N, C) {
var b = this.options, w = b.vertical, v = b.minWidth, a = this.barWidth, c = !this.rendered || this.hasDragged || this.chart.navigator && this.chart.navigator.hasDragged ? "attr" : "animate";
if (R(a)) {
var p = a * Math.min(C, 1);
N = Math.max(N, 0);
var i = Math.ceil(a * N);
this.calculatedWidth = p = W(p - i), p < v && (i = (a - v + p) * N, p = v), v = Math.floor(i + this.xOffset + this.yOffset), a = p / 2 - 0.5, this.from = N, this.to = C, w ? (this.scrollbarGroup[c]({ translateY: v }), this.scrollbar[c]({ height: p }), this.scrollbarRifles[c]({ translateY: a }), this.scrollbarTop = v, this.scrollbarLeft = 0) : (this.scrollbarGroup[c]({ translateX: v }), this.scrollbar[c]({ width: p }), this.scrollbarRifles[c]({ translateX: a }), this.scrollbarLeft = v, this.scrollbarTop = 0), 12 >= p ? this.scrollbarRifles.hide() : this.scrollbarRifles.show(!0), b.showFull === !1 && (0 >= N && 1 <= C ? this.group.hide() : this.group.show()), this.rendered = !0;
}
}, O.prototype.shouldUpdateExtremes = function(N) {
return u(this.options.liveRedraw, B.svg && !B.isTouchDevice && !this.chart.isBoosting) || N === "mouseup" || N === "touchend" || !R(N);
}, O.prototype.trackClick = function(N) {
var C = this.chart.pointer.normalize(N), b = this.to - this.from, w = this.y + this.scrollbarTop, v = this.x + this.scrollbarLeft;
this.options.vertical && C.chartY > w || !this.options.vertical && C.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: N });
}, O.prototype.update = function(N) {
this.destroy(), this.init(this.chart.renderer, d(
!0,
this.options,
N
), this.chart);
}, O.prototype.updatePosition = function(N, C) {
1 < C && (N = W(1 - W(C - N)), C = 1), 0 > N && (C = W(C - N), N = 0), this.from = N, this.to = C;
}, O.defaultOptions = Z, O;
}(), U.scrollbar = d(!0, y.defaultOptions, U.scrollbar), y;
}), E(h, "Core/Axis/NavigatorAxis.js", [h["Core/Globals.js"], h["Core/Utilities.js"]], function(y, B) {
var I = y.isTouchDevice, Z = B.addEvent, F = B.correctFloat, U = B.defined, H = B.isNumber, W = B.pick, R = function() {
function S(x) {
this.axis = x;
}
return S.prototype.destroy = function() {
this.axis = void 0;
}, S.prototype.toFixedRange = function(x, d, u, P) {
var O = this.axis, N = O.chart;
N = N && N.fixedRange;
var C = (O.pointRange || 0) / 2;
return x = W(u, O.translate(x, !0, !O.horiz)), d = W(P, O.translate(d, !0, !O.horiz)), O = N && (d - x) / N, U(u) || (x = F(x + C)), U(P) || (d = F(d - C)), 0.7 < O && 1.3 > O && (P ? x = d - N : d = x + N), H(x) && H(d) || (x = d = void 0), { min: x, max: d };
}, S;
}();
return function() {
function S() {
}
return S.compose = function(x) {
x.keepProps.push("navigatorAxis"), Z(x, "init", function() {
this.navigatorAxis || (this.navigatorAxis = new R(this));
}), Z(x, "zoom", function(d) {
var u = this.chart.options, P = u.navigator, O = this.navigatorAxis, N = u.chart.pinchType, C = u.rangeSelector;
u = u.chart.zoomType, this.isXAxis && (P && P.enabled || C && C.enabled) && (u === "y" ? d.zoomed = !1 : (!I && u === "xy" || I && N === "xy") && this.options.range && (P = O.previousZoom, U(d.newMin) ? O.previousZoom = [this.min, this.max] : P && (d.newMin = P[0], d.newMax = P[1], O.previousZoom = void 0))), typeof d.zoomed < "u" && d.preventDefault();
});
}, S.AdditionsClass = R, S;
}();
}), E(h, "Core/Navigator.js", [
h["Core/Axis/Axis.js"],
h["Core/Chart/Chart.js"],
h["Core/Color/Color.js"],
h["Core/Globals.js"],
h["Core/Axis/NavigatorAxis.js"],
h["Core/DefaultOptions.js"],
h["Core/Renderer/RendererRegistry.js"],
h["Core/Scrollbar.js"],
h["Core/Series/Series.js"],
h["Core/Series/SeriesRegistry.js"],
h["Core/Utilities.js"]
], function(y, B, I, Z, F, U, H, W, R, S, x) {
I = I.parse;
var d = Z.hasTouch, u = Z.isTouchDevice, P = U.defaultOptions, O = x.addEvent, N = x.clamp, C = x.correctFloat, b = x.defined, w = x.destroyObjectProperties, v = x.erase, a = x.extend, c = x.find, p = x.isArray, i = x.isNumber, l = x.merge, s = x.pick, t = x.removeEvent, o = x.splat, n = function(_) {
for (var D = [], j = 1; j < arguments.length; j++)
D[j - 1] = arguments[j];
if (D = [].filter.call(D, i), D.length)
return Math[_].apply(0, D);
};
U = typeof S.seriesTypes.areaspline > "u" ? "line" : "areaspline", a(P, { 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: I("#6685c2").setOpacity(0.3).get(), outlineColor: "#cccccc", outlineWidth: 1, series: {
type: U,
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 } } }), H.getRendererType().prototype.symbols["navigator-handle"] = function(_, D, j, T, X) {
return _ = (X && X.width || 0) / 2, D = Math.round(_ / 3) + 0.5, X = X && X.height || 0, [["M", -_ - 1, 0.5], ["L", _, 0.5], ["L", _, X + 0.5], ["L", -_ - 1, X + 0.5], ["L", -_ - 1, 0.5], ["M", -D, 4], ["L", -D, X - 3], ["M", D - 1, 4], ["L", D - 1, X - 3]];
};
var A = function() {
function _(D) {
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(D);
}
return _.prototype.drawHandle = function(D, j, T, X) {
var g = this.navigatorOptions.handles.height;
this.handles[j][X](T ? { translateX: Math.round(this.left + this.height / 2), translateY: Math.round(this.top + parseInt(D, 10) + 0.5 - g) } : { translateX: Math.round(this.left + parseInt(D, 10)), translateY: Math.round(this.top + this.height / 2 - g / 2 - 1) });
}, _.prototype.drawOutline = function(D, j, T, X) {
var g = this.navigatorOptions.maskInside, m = this.outline.strokeWidth(), L = m / 2, Y = m % 2 / 2;
m = this.outlineHeight;
var V = this.scrollbarHeight || 0, Q = this.size, k = this.left - V, G = this.top;
T ? (k -= L, T = G + j + Y, j = G + D + Y, Y = [["M", k + m, G - V - Y], ["L", k + m, T], ["L", k, T], ["L", k, j], ["L", k + m, j], ["L", k + m, G + Q + V]], g && Y.push(["M", k + m, T - L], ["L", k + m, j + L])) : (D += k + V - Y, j += k + V - Y, G += L, Y = [["M", k, G], ["L", D, G], ["L", D, G + m], ["L", j, G + m], ["L", j, G], ["L", k + Q + 2 * V, G]], g && Y.push(["M", D - L, G], ["L", j + L, G])), this.outline[X]({ d: Y });
}, _.prototype.drawMasks = function(D, j, T, X) {
var g = this.left, m = this.top, L = this.height;
if (T)
var Y = [g, g, g], V = [m, m + D, m + j], Q = [L, L, L], k = [D, j - D, this.size - j];
else
Y = [g, g + D, g + j], V = [m, m, m], Q = [D, j - D, this.size - j], k = [L, L, L];
this.shades.forEach(function(G, z) {
G[X]({ x: Y[z], y: V[z], width: Q[z], height: k[z] });
});
}, _.prototype.renderElements = function() {
var D = this, j = D.navigatorOptions, T = j.maskInside, X = D.chart, g = X.renderer, m, L = { cursor: X.inverted ? "ns-resize" : "ew-resize" };
D.navigatorGroup = m = g.g("navigator").attr({ zIndex: 8, visibility: "hidden" }).add(), [!T, T, !T].forEach(function(Y, V) {
D.shades[V] = g.rect().addClass("highcharts-navigator-mask" + (V === 1 ? "-inside" : "-outside")).add(m), X.styledMode || D.shades[V].attr({ fill: Y ? j.maskFill : "rgba(0,0,0,0)" }).css(V === 1 && L);
}), D.outline = g.path().addClass("highcharts-navigator-outline").add(m), X.styledMode || D.outline.attr({ "stroke-width": j.outlineWidth, stroke: j.outlineColor }), j.handles.enabled && [0, 1].forEach(function(Y) {
if (j.handles.inverted = X.inverted, D.handles[Y] = g.symbol(j.handles.symbols[Y], -j.handles.width / 2 - 1, 0, j.handles.width, j.handles.height, j.handles), D.handles[Y].attr({ zIndex: 7 - Y }).addClass("highcharts-navigator-handle highcharts-navigator-handle-" + ["left", "right"][Y]).add(m), !X.styledMode) {
var V = j.handles;
D.handles[Y].attr({ fill: V.backgroundColor, stroke: V.borderColor, "stroke-width": V.lineWidth }).css(L);
}
});
}, _.prototype.update = function(D) {
(this.series || []).forEach(function(j) {
j.baseSeries && delete j.baseSeries.navigatorSeries;
}), this.destroy(), l(!0, this.chart.options.navigator, this.options, D), this.init(this.chart);
}, _.prototype.render = function(D, j, T, X) {
var g = this.chart, m = this.scrollbarHeight, L, Y = this.xAxis, V = Y.pointRange || 0, Q = Y.navigatorAxis.fake ? g.xAxis[0] : Y, k = this.navigatorEnabled, G, z = this.rendered, $ = g.inverted, q = g.xAxis[0].minRange, it = g.xAxis[0].options.maxRange;
if (!this.hasDragged || b(T)) {
if (D = C(D - V / 2), j = C(j + V / 2), !i(D) || !i(j))
if (z)
T = 0, X = s(Y.width, Q.width);
else
return;
this.left = s(Y.left, g.plotLeft + m + ($ ? g.plotWidth : 0)), this.size = G = L = s(Y.len, ($ ? g.plotHeight : g.plotWidth) - 2 * m), g = $ ? m : L + 2 * m, T = s(T, Y.toPixels(D, !0)), X = s(X, Y.toPixels(j, !0)), i(T) && Math.abs(T) !== 1 / 0 || (T = 0, X = g), D = Y.toValue(T, !0), j = Y.toValue(X, !0);
var et = Math.abs(C(j - D));
et < q ? this.grabbedLeft ? T = Y.toPixels(j - q - V, !0) : this.grabbedRight && (X = Y.toPixels(D + q + V, !0)) : b(it) && C(et - V) > it && (this.grabbedLeft ? T = Y.toPixels(j - it - V, !0) : this.grabbedRight && (X = Y.toPixels(D + it + V, !0))), this.zoomedMax = N(Math.max(T, X), 0, G), this.zoomedMin = N(this.fixedWidth ? this.zoomedMax - this.fixedWidth : Math.min(T, X), 0, G), this.range = this.zoomedMax - this.zoomedMin, G = Math.round(this.zoomedMax), T = Math.round(this.zoomedMin), k && (this.navigatorGroup.attr({ visibility: "visible" }), z = z && !this.hasDragged ? "animate" : "attr", this.drawMasks(T, G, $, z), this.drawOutline(T, G, $, z), this.navigatorOptions.handles.enabled && (this.drawHandle(T, 0, $, z), this.drawHandle(G, 1, $, z))), this.scrollbar && ($ ? ($ = this.top - m, Q = this.left - m + (k || !Q.opposite ? 0 : (Q.titleOffset || 0) + Q.axisTitleMargin), m = L + 2 * m) : ($ = this.top + (k ? this.height : -m), Q = this.left - m), this.scrollbar.position(Q, $, g, m), this.scrollbar.setRange(this.zoomedMin / (L || 1), this.zoomedMax / (L || 1))), this.rendered = !0;
}
}, _.prototype.addMouseEvents = function() {
var D = this, j = D.chart, T = j.container, X = [], g, m;
D.mouseMoveHandler = g = function(L) {
D.onMouseMove(L);
}, D.mouseUpHandler = m = function(L) {
D.onMouseUp(L);
}, X = D.getPartsEvents("mousedown"), X.push(O(j.renderTo, "mousemove", g), O(T.ownerDocument, "mouseup", m)), d && (X.push(O(j.renderTo, "touchmove", g), O(T.ownerDocument, "touchend", m)), X.concat(D.getPartsEvents("touchstart"))), D.eventsToUnbind = X, D.series && D.series[0] && X.push(O(D.series[0].xAxis, "foundExtremes", function() {
j.navigator.modifyNavigatorAxisExtremes();
}));
}, _.prototype.getPartsEvents = function(D) {
var j = this, T = [];
return ["shades", "handles"].forEach(function(X) {
j[X].forEach(function(g, m) {
T.push(O(g.element, D, function(L) {
j[X + "Mousedown"](L, m);
}));
});
}), T;
}, _.prototype.shadesMousedown = function(D, j) {
D = this.chart.pointer.normalize(D);
var T = this.chart, X = this.xAxis, g = this.zoomedMin, m = this.left, L = this.size, Y = this.range, V = D.chartX;
if (T.inverted && (V = D.chartY, m = this.top), j === 1)
this.grabbedCenter = V, this.fixedWidth = Y, this.dragOffset = V - g;
else {
if (D = V - m - Y / 2, j === 0)
D = Math.max(0, D);
else if (j === 2 && D + Y >= L)
if (D = L - Y, this.reversedExtremes) {
D -= Y;
var Q = this.getUnionExtremes().dataMin;
} else
var k = this.getUnionExtremes().dataMax;
D !== g && (this.fixedWidth = Y, j = X.navigatorAxis.toFixedRange(D, D + Y, Q, k), b(j.min) && T.xAxis[0].setExtremes(Math.min(j.min, j.max), Math.max(j.min, j.max), !0, null, { trigger: "navigator" }));
}
}, _.prototype.handlesMousedown = function(D, j) {
this.chart.pointer.normalize(D), D = this.chart;
var T = D.xAxis[0], X = this.reversedExtremes;
j === 0 ? (this.grabbedLeft = !0, this.otherHandlePos = this.zoomedMax, this.fixedExtreme = X ? T.min : T.max) : (this.grabbedRight = !0, this.otherHandlePos = this.zoomedMin, this.fixedExtreme = X ? T.max : T.min), D.fixedRange = null;
}, _.prototype.onMouseMove = function(D) {
var j = this, T = j.chart, X = j.left, g = j.navigatorSize, m = j.range, L = j.dragOffset, Y = T.inverted;
D.touches && D.touches[0].pageX === 0 || (D = T.pointer.normalize(D), T = D.chartX, Y && (X = j.top, T = D.chartY), j.grabbedLeft ? (j.hasDragged = !0, j.render(0, 0, T - X, j.otherHandlePos)) : j.grabbedRight ? (j.hasDragged = !0, j.render(0, 0, j.otherHandlePos, T - X)) : j.grabbedCenter && (j.hasDragged = !0, T < L ? T = L : T > g + L - m && (T = g + L - m), j.render(0, 0, T - L, T - L + m)), j.hasDragged && j.scrollbar && s(j.scrollbar.options.liveRedraw, Z.svg && !u && !this.chart.isBoosting) && (D.DOMType = D.type, setTimeout(function() {
j.onMouseUp(D);
}, 0)));
}, _.prototype.onMouseUp = function(D) {
var j = this.chart, T = this.xAxis, X = this.scrollbar, g = D.DOMEvent || D, m = j.inverted, L = this.rendered && !this.hasDragged ? "animate" : "attr";
if (this.hasDragged && (!X || !X.hasDragged) || D.trigger === "scrollbar") {
if (X = this.getUnionExtremes(), this.zoomedMin === this.otherHandlePos)
var Y = this.fixedExtreme;
else if (this.zoomedMax === this.otherHandlePos)
var V = this.fixedExtreme;
this.zoomedMax === this.size && (V = this.reversedExtremes ? X.dataMin : X.dataMax), this.zoomedMin === 0 && (Y = this.reversedExtremes ? X.dataMax : X.dataMin), T = T.navigatorAxis.toFixedRange(this.zoomedMin, this.zoomedMax, Y, V), b(T.min) && j.xAxis[0].setExtremes(Math.min(T.min, T.max), Math.max(T.min, T.max), !0, this.hasDragged ? !1 : null, { trigger: "navigator", triggerOp: "navigator-drag", DOMEvent: g });
}
D.DOMType !== "mousemove" && D.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) && (j = Math.round(this.zoomedMin), D = Math.round(this.zoomedMax), this.shades && this.drawMasks(j, D, m, L), this.outline && this.drawOutline(j, D, m, L), this.navigatorOptions.handles.enabled && Object.keys(this.handles).length === this.handles.length && (this.drawHandle(j, 0, m, L), this.drawHandle(D, 1, m, L)));
}, _.prototype.removeEvents = function() {
this.eventsToUnbind && (this.eventsToUnbind.forEach(function(D) {
D();
}), this.eventsToUnbind = void 0), this.removeBaseSeriesEvents();
}, _.prototype.removeBaseSeriesEvents = function() {
var D = this.baseSeries || [];
this.navigatorEnabled && D[0] && (this.navigatorOptions.adaptToUpdatedData !== !1 && D.forEach(function(j) {
t(j, "updatedData", this.updatedDataHandler);
}, this), D[0].xAxis && t(D[0].xAxis, "foundExtremes", this.modifyBaseAxisExtremes));
}, _.prototype.init = function(D) {
var j = D.options, T = j.navigator, X = T.enabled, g = j.scrollbar, m = g.enabled;
j = X ? T.height : 0;
var L = m ? g.height : 0;
this.handles = [], this.shades = [], this.chart = D, this.setBaseSeries(), this.height = j, this.scrollbarHeight = L, this.scrollbarEnabled = m, this.navigatorEnabled = X, this.navigatorOptions = T, this.scrollbarOptions = g, this.outlineHeight = j + L, this.opposite = s(T.opposite, !(X || !D.inverted));
var Y = this;
X = Y.baseSeries, g = D.xAxis.length, m = D.yAxis.length;
var V = X && X[0] && X[0].xAxis || D.xAxis[0] || { options: {} };
D.isDirtyBox = !0, Y.navigatorEnabled ? (Y.xAxis = new y(D, l(
{ breaks: V.options.breaks, ordinal: V.options.ordinal },
T.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 },
D.inverted ? { offsets: [L, 0, -L, 0], width: j } : { offsets: [0, -L, 0, L], height: j }
)), Y.yAxis = new y(D, l(T.yAxis, { id: "navigator-y-axis", alignTicks: !1, offset: 0, index: m, isInternal: !0, reversed: s(T.yAxis && T.yAxis.reversed, D.yAxis[0] && D.yAxis[0].reversed, !1), zoomEnabled: !1 }, D.inverted ? { width: j } : { height: j })), X || T.series.data ? Y.updateNavigatorSeries(!1) : D.series.length === 0 && (Y.unbindRedraw = O(D, "beforeRedraw", function() {
0 < D.series.length && !Y.series && (Y.setBaseSeries(), Y.unbindRedraw());
})), Y.reversedExtremes = D.inverted && !Y.xAxis.reversed || !D.inverted && Y.xAxis.reversed, Y.renderElements(), Y.addMouseEvents()) : (Y.xAxis = {
chart: D,
navigatorAxis: { fake: !0 },
translate: function(Q, k) {
var G = D.xAxis[0], z = G.getExtremes(), $ = G.len - 2 * L, q = n("min", G.options.min, z.dataMin);
return G = n("max", G.options.max, z.dataMax) - q, k ? Q * G / $ + q : $ * (Q - q) / G;
},
toPixels: function(Q) {
return this.translate(Q);
},
toValue: function(Q) {
return this.translate(Q, !0);
}
}, Y.xAxis.navigatorAxis.axis = Y.xAxis, Y.xAxis.navigatorAxis.toFixedRange = F.AdditionsClass.prototype.toFixedRange.bind(Y.xAxis.navigatorAxis)), D.options.scrollbar.enabled && (D.scrollbar = Y.scrollbar = new W(D.renderer, l(D.options.scrollbar, { margin: Y.navigatorEnabled ? 0 : 10, vertical: D.inverted }), D), O(Y.scrollbar, "changed", function(Q) {
var k = Y.size, G = k * this.to;
k *= this.from, Y.hasDragged = Y.scrollbar.hasDragged, Y.render(0, 0, k, G), this.shouldUpdateExtremes(Q.DOMType) && setTimeout(function() {
Y.onMouseUp(Q);
});
})), Y.addBaseSeriesEvents(), Y.addChartEvents();
}, _.prototype.getUnionExtremes = function(D) {
var j = this.chart.xAxis[0], T = this.xAxis, X = T.options, g = j.options, m;
return D && j.dataMin === null || (m = { dataMin: s(X && X.min, n("min", g.min, j.dataMin, T.dataMin, T.min)), dataMax: s(X && X.max, n("max", g.max, j.dataMax, T.dataMax, T.max)) }), m;
}, _.prototype.setBaseSeries = function(D, j) {
var T = this.chart, X = this.baseSeries = [];
D = D || T.options && T.options.navigator.baseSeries || (T.series.length ? c(
T.series,
function(g) {
return !g.options.isInternal;
}
).index : 0), (T.series || []).forEach(function(g, m) {
g.options.isInternal || !g.options.showInNavigator && (m !== D && g.options.id !== D || g.options.showInNavigator === !1) || X.push(g);
}), this.xAxis && !this.xAxis.navigatorAxis.fake && this.updateNavigatorSeries(!0, j);
}, _.prototype.updateNavigatorSeries = function(D, j) {
var T = this, X = T.chart, g = T.baseSeries, m, L, Y = T.navigatorOptions.series, V, 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 } }
}, k = T.series = (T.series || []).filter(function(G) {
var z = G.baseSeries;
return 0 > g.indexOf(z) ? (z && (t(z, "updatedData", T.updatedDataHandler), delete z.navigatorSeries), G.chart && G.destroy(), !1) : !0;
});
g && g.length && g.forEach(function(G) {
var z = G.navigatorSeries, $ = a({ color: G.color, visible: G.visible }, p(Y) ? P.navigator.series : Y);
z && T.navigatorOptions.adaptToUpdatedData === !1 || (Q.name = "Navigator " + g.length, m = G.options || {}, V = m.navigatorOptions || {}, $.dataLabels = o($.dataLabels), L = l(m, Q, $, V), L.pointRange = s($.pointRange, V.pointRange, P.plotOptions[L.type || "line"].pointRange), $ = V.data || $.data, T.hasNavigatorData = T.hasNavigatorData || !!$, L.data = $ || m.data && m.data.slice(0), z && z.options ? z.update(L, j) : (G.navigatorSeries = X.initSeries(L), G.navigatorSeries.baseSeries = G, k.push(G.navigatorSeries)));
}), (Y.data && (!g || !g.length) || p(Y)) && (T.hasNavigatorData = !1, Y = o(Y), Y.forEach(function(G, z) {
Q.name = "Navigator " + (k.length + 1), L = l(
P.navigator.series,
{ color: X.series[z] && !X.series[z].options.isInternal && X.series[z].color || X.options.colors[z] || X.options.colors[0] },
Q,
G
), L.data = G.data, L.data && (T.hasNavigatorData = !0, k.push(X.initSeries(L)));
})), D && this.addBaseSeriesEvents();
}, _.prototype.addBaseSeriesEvents = function() {
var D = this, j = D.baseSeries || [];
j[0] && j[0].xAxis && j[0].eventsToUnbind.push(O(j[0].xAxis, "foundExtremes", this.modifyBaseAxisExtremes)), j.forEach(function(T) {
T.eventsToUnbind.push(O(T, "show", function() {
this.navigatorSeries && this.navigatorSeries.setVisible(
!0,
!1
);
})), T.eventsToUnbind.push(O(T, "hide", function() {
this.navigatorSeries && this.navigatorSeries.setVisible(!1, !1);
})), this.navigatorOptions.adaptToUpdatedData !== !1 && T.xAxis && T.eventsToUnbind.push(O(T, "updatedData", this.updatedDataHandler)), T.eventsToUnbind.push(O(T, "remove", function() {
this.navigatorSeries && (v(D.series, this.navigatorSeries), b(this.navigatorSeries.options) && this.navigatorSeries.remove(!1), delete this.navigatorSeries);
}));
}, this);
}, _.prototype.getBaseSeriesMin = function(D) {
return this.baseSeries.reduce(function(j, T) {
return Math.min(j, T.xData ? T.xData[0] : j);
}, D);
}, _.prototype.modifyNavigatorAxisExtremes = function() {
var D = this.xAxis, j;
typeof D.getExtremes < "u" && (!(j = this.getUnionExtremes(!0)) || j.dataMin === D.min && j.dataMax === D.max || (D.min = j.dataMin, D.max = j.dataMax));
}, _.prototype.modifyBaseAxisExtremes = function() {
var D = this.chart.navigator, j = this.getExtremes(), T = j.dataMin, X = j.dataMax;
j = j.max - j.min;
var g = D.stickToMin, m = D.stickToMax, L = s(this.options.overscroll, 0), Y = D.series && D.series[0], V = !!this.setExtremes;
if (!this.eventArgs || this.eventArgs.trigger !== "rangeSelectorButton") {
if (g)
var Q = T, k = Q + j;
m && (k = X + L, g || (Q = Math.max(T, k - j, D.getBaseSeriesMin(Y && Y.xData ? Y.xData[0] : -Number.MAX_VALUE)))), V && (g || m) && i(Q) && (this.min = this.userMin = Q, this.max = this.userMax = k);
}
D.stickToMin = D.stickToMax = null;
}, _.prototype.updatedDataHandler = function() {
var D = this.chart.navigator, j = this.navigatorSeries;
D.stickToMax = D.reversedExtremes ? Math.round(D.zoomedMin) === 0 : Math.round(D.zoomedMax) >= Math.round(D.size), D.stickToMin = D.shouldStickToMin(
this,
D
), j && !D.hasNavigatorData && (j.options.pointStart = this.xData[0], j.setData(this.options.data, !1, null, !1));
}, _.prototype.shouldStickToMin = function(D, j) {
j = j.getBaseSeriesMin(D.xData[0]);
var T = D.xAxis;
D = T.max;
var X = T.min;
return T = T.options.range, i(D) && i(X) ? T && 0 < D - j ? D - j < T : X <= j : !1;
}, _.prototype.addChartEvents = function() {
this.eventsToUnbind || (this.eventsToUnbind = []), this.eventsToUnbind.push(O(this.chart, "redraw", function() {
var D = this.navigator, j = D && (D.baseSeries && D.baseSeries[0] && D.baseSeries[0].xAxis || this.xAxis[0]);
j && D.render(j.min, j.max);
}), O(this.chart, "getMargins", function() {
var D = this.navigator, j = D.opposite ? "plotTop" : "marginBottom";
this.inverted && (j = D.opposite ? "marginRight" : "plotLeft"), this[j] = (this[j] || 0) + (D.navigatorEnabled || !this.inverted ? D.outlineHeight : 0) + D.navigatorOptions.margin;
}));
}, _.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(D) {
D.destroy && D.destroy();
}), "series xAxis yAxis shades outline scrollbarTrack scrollbarRifles scrollbarGroup scrollbar navigatorGroup rendered".split(" ").forEach(function(D) {
this[D] && this[D].destroy && this[D].destroy(), this[D] = null;
}, this), [this.handles].forEach(function(D) {
w(D);
}, this);
}, _;
}();
return Z.Navigator || (Z.Navigator = A, F.compose(y), O(B, "beforeShowResetZoom", function() {
var _ = this.options, D = _.navigator, j = _.rangeSelector;
if ((D && D.enabled || j && j.enabled) && (!u && _.chart.zoomType === "x" || u && _.chart.pinchType === "x"))
return !1;
}), O(B, "beforeRender", function() {
var _ = this.options;
(_.navigator.enabled || _.scrollbar.enabled) && (this.scroller = this.navigator = new A(this));
}), O(B, "afterSetChartSize", function() {
var _ = this.legend, D = this.navigator;
if (D) {
var j = _ && _.options, T = D.xAxis, X = D.yAxis, g = D.scrollbarHeight;
this.inverted ? (D.left = D.opposite ? this.chartWidth - g - D.height : this.spacing[3] + g, D.top = this.plotTop + g) : (D.left = s(T.left, this.plotLeft + g), D.top = D.navigatorOptions.top || this.chartHeight - D.height - g - this.spacing[2] - (this.rangeSelector && this.extraBottomMargin ? this.rangeSelector.getHeight() : 0) - (j && j.verticalAlign === "bottom" && j.layout !== "proximate" && j.enabled && !j.floating ? _.legendHeight + s(j.margin, 10) : 0) - (this.titleOffset ? this.titleOffset[2] : 0)), T && X && (this.inverted ? T.options.left = X.options.left = D.left : T.options.top = X.options.top = D.top, T.setAxisSize(), X.setAxisSize());
}
}), O(B, "update", function(_) {
var D = _.options.navigator || {}, j = _.options.scrollbar || {};
this.navigator || this.scroller || !D.enabled && !j.enabled || (l(
!0,
this.options.navigator,
D
), l(!0, this.options.scrollbar, j), delete _.options.navigator, delete _.options.scrollbar);
}), O(B, "afterUpdate", function(_) {
this.navigator || this.scroller || !this.options.navigator.enabled && !this.options.scrollbar.enabled || (this.scroller = this.navigator = new A(this), s(_.redraw, !0) && this.redraw(_.animation));
}), O(B, "afterAddSeries", function() {
this.navigator && this.navigator.setBaseSeries(null, !1);
}), O(R, "afterUpdate", function() {
this.chart.navigator && !this.options.isInternal && this.chart.navigator.setBaseSeries(
null,
!1
);
}), B.prototype.callbacks.push(function(_) {
var D = _.navigator;
D && _.xAxis[0] && (_ = _.xAxis[0].getExtremes(), D.render(_.min, _.max));
})), Z.Navigator = A, Z.Navigator;
}), E(h, "Extensions/RangeSelector.js", [h["Core/Axis/Axis.js"], h["Core/Chart/Chart.js"], h["Core/Globals.js"], h["Core/DefaultOptions.js"], h["Core/Renderer/SVG/SVGElement.js"], h["Core/Utilities.js"]], function(y, B, I, Z, F, U) {
function H(o) {
if (o.indexOf("%L") !== -1)
return "text";
var n = "aAdewbBmoyY".split("").some(function(_) {
return o.indexOf("%" + _) !== -1;
}), A = "HkIlMS".split("").some(function(_) {
return o.indexOf("%" + _) !== -1;
});
return n && A ? "datetime-local" : n ? "date" : A ? "time" : "text";
}
var W = Z.defaultOptions, R = U.addEvent, S = U.createElement, x = U.css, d = U.defined, u = U.destroyObjectProperties, P = U.discardElement, O = U.extend, N = U.find, C = U.fireEvent, b = U.isNumber, w = U.merge, v = U.objectEach, a = U.pad, c = U.pick, p = U.pInt, i = U.splat;
O(W, { 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(W.lang, { rangeSelectorZoom: "Zoom", rangeSelectorFrom: "", rangeSelectorTo: "→" });
var l = function() {
function o(n) {
this.buttons = void 0, this.buttonOptions = o.prototype.defaultButtons, this.initialButtonGroupWidth = 0, this.options = void 0, this.chart = n, this.init(n);
}
return o.prototype.clickButton = function(n, A) {
var _ = this.chart, D = this.buttonOptions[n], j = _.xAxis[0], T = _.scroller && _.scroller.getUnionExtremes() || j || {}, X = T.dataMin, g = T.dataMax, m = j && Math.round(Math.min(j.max, c(g, j.max))), L = D.type;
T = D._range;
var Y, V = D.dataGrouping;
if (X !== null && g !== null) {
if (_.fixedRange = T, this.setSelected(n), V && (this.forcedDataGrouping = !0, y.prototype.setDataGrouping.call(j || { chart: this.chart }, V, !1), this.frozenStates = D.preserveDataGrouping), L === "month" || L === "year")
if (j) {
L = { range: D, max: m, chart: _, dataMin: X, dataMax: g };
var Q = j.minFromRange.call(L);
b(L.newMax) && (m = L.newMax);
} else
T = D;
else if (T)
Q = Math.max(m - T, X), m = Math.min(Q + T, g);
else if (L === "ytd")
if (j)
typeof g > "u" && (X = Number.MAX_VALUE, g = Number.MIN_VALUE, _.series.forEach(function($) {
$ = $.xData, X = Math.min($[0], X), g = Math.max($[$.length - 1], g);
}), A = !1), m = this.getYTDExtremes(
g,
X,
_.time.useUTC
), Q = Y = m.min, m = m.max;
else {
this.deferredYTDClick = n;
return;
}
else
L === "all" && j && (_.navigator && _.navigator.baseSeries[0] && (_.navigator.baseSeries[0].xAxis.options.range = void 0), Q = X, m = g);
if (d(Q) && (Q += D._offsetMin), d(m) && (m += D._offsetMax), this.dropdown && (this.dropdown.selectedIndex = n + 1), j)
j.setExtremes(Q, m, c(A, !0), void 0, { trigger: "rangeSelectorButton", rangeSelectorButton: D });
else {
var k = i(_.options.xAxis)[0], G = k.range;
k.range = T;
var z = k.min;
k.min = Y, R(_, "load", function() {
k.range = G, k.min = z;
});
}
C(
this,
"afterBtnClick"
);
}
}, o.prototype.setSelected = function(n) {
this.selected = this.options.selected = n;
}, o.prototype.init = function(n) {
var A = this, _ = n.options.rangeSelector, D = _.buttons || A.defaultButtons.slice(), j = _.selected, T = function() {
var X = A.minInput, g = A.maxInput;
X && X.blur && C(X, "blur"), g && g.blur && C(g, "blur");
};
A.chart = n, A.options = _, A.buttons = [], A.buttonOptions = D, this.eventsToUnbind = [], this.eventsToUnbind.push(R(n.container, "mousedown", T)), this.eventsToUnbind.push(R(n, "resize", T)), D.forEach(A.computeButtonRange), typeof j < "u" && D[j] && this.clickButton(j, !1), this.eventsToUnbind.push(R(n, "load", function() {
n.xAxis && n.xAxis[0] && R(n.xAxis[0], "setExtremes", function(X) {
this.max - this.min !== n.fixedRange && X.trigger !== "rangeSelectorButton" && X.trigger !== "updatedData" && A.forcedDataGrouping && !A.frozenStates && this.setDataGrouping(!1, !1);
});
}));
}, o.prototype.updateButtonStates = function() {
var n = this, A = this.chart, _ = this.dropdown, D = A.xAxis[0], j = Math.round(D.max - D.min), T = !D.hasVisibleSeries, X = A.scroller && A.scroller.getUnionExtremes() || D, g = X.dataMin, m = X.dataMax;
A = n.getYTDExtremes(m, g, A.time.useUTC);
var L = A.min, Y = A.max, V = n.selected, Q = b(V), k = n.options.allButtonsEnabled, G = n.buttons;
n.buttonOptions.forEach(function(z, $) {
var q = z._range, it = z.type, et = z.count || 1, nt = G[$], rt = 0, ct = z._offsetMax - z._offsetMin;
z = $ === V;
var gt = q > m - g, dt = q < D.minRange, lt = !1, at = !1;
q = q === j, (it === "month" || it === "year") && j + 36e5 >= 864e5 * { month: 28, year: 365 }[it] * et - ct && j - 36e5 <= 864e5 * { month: 31, year: 366 }[it] * et + ct ? q = !0 : it === "ytd" ? (q = Y - L + ct === j, lt = !z) : it === "all" && (q = D.max - D.min >= m - g, at = !z && Q && q), it = !k && (gt || dt || at || T), et = z && q || q && !Q && !lt || z && n.frozenStates, it ? rt = 3 : et && (Q = !0, rt = 2), nt.state !== rt && (nt.setState(rt), _ && (_.options[$ + 1].disabled = it, rt === 2 && (_.selectedIndex = $ + 1)), rt === 0 && V === $ && n.setSelected());
});
}, o.prototype.computeButtonRange = function(n) {
var A = n.type, _ = n.count || 1, D = { millisecond: 1, second: 1e3, minute: 6e4, hour: 36e5, day: 864e5, week: 6048e5 };
D[A] ? n._range = D[A] * _ : (A === "month" || A === "year") && (n._range = 864e5 * { month: 30, year: 365 }[A] * _), n._offsetMin = c(n.offsetMin, 0), n._offsetMax = c(n.offsetMax, 0), n._range += n._offsetMax - n._offsetMin;
}, o.prototype.getInputValue = function(n) {
n = n === "min" ? this.minInput : this.maxInput;
var A = this.chart.options.rangeSelector, _ = this.chart.time;
return n ? (n.type === "text" && A.inputDateParser || this.defaultInputDateParser)(n.value, _.useUTC, _) : 0;
}, o.prototype.setInputValue = function(n, A) {
var _ = this.options, D = this.chart.time, j = n === "min" ? this.minInput : this.maxInput;
if (n = n === "min" ? this.minDateBox : this.maxDateBox, j) {
var T = j.getAttribute("data-hc-time");
T = d(T) ? Number(T) : void 0, d(A) && (d(T) && j.setAttribute("data-hc-time-previous", T), j.setAttribute("data-hc-time", A), T = A), j.value = D.dateFormat(this.inputTypeFormats[j.type] || _.inputEditDateFormat, T), n && n.attr({ text: D.dateFormat(_.inputDateFormat, T) });
}
}, o.prototype.setInputExtremes = function(n, A, _) {
if (n = n === "min" ? this.minInput : this.maxInput) {
var D = this.inputTypeFormats[n.type], j = this.chart.time;
D && (A = j.dateFormat(D, A), n.min !== A && (n.min = A), _ = j.dateFormat(D, _), n.max !== _ && (n.max = _));
}
}, o.prototype.showInput = function(n) {
var A = n === "min" ? this.minDateBox : this.maxDateBox;
if ((n = n === "min" ? this.minInput : this.maxInput) && A && this.inputGroup) {
var _ = n.type === "text", D = this.inputGroup, j = D.translateX;
D = D.translateY;
var T = this.options.inputBoxWidth;
x(n, { width: _ ? A.width + (T ? -2 : 20) + "px" : "auto", height: _ ? A.height - 2 + "px" : "auto", border: "2px solid silver" }), _ && T ? x(n, { left: j + A.x + "px", top: D + "px" }) : x(n, { left: Math.min(Math.round(A.x + j - (n.offsetWidth - A.width) / 2), this.chart.chartWidth - n.offsetWidth) + "px", top: D - (n.offsetHeight - A.height) / 2 + "px" });
}
}, o.prototype.hideInput = function(n) {
(n = n === "min" ? this.minInput : this.maxInput) && x(n, { top: "-9999em", border: 0, width: "1px", height: "1px" });
}, o.prototype.defaultInputDateParser = function(n, A, _) {
var D = n.split("/").join("-").split(" ").join("T");
if (D.indexOf("T") === -1 && (D += "T00:00"), A)
D += "Z";
else {
var j;
(j = I.isSafari) && (j = D, j = !(6 < j.length && (j.lastIndexOf("-") === j.length - 6 || j.lastIndexOf("+") === j.length - 6))), j && (j = new Date(D).getTimezoneOffset() / 60, D += 0 >= j ? "+" + a(-j) + ":00" : "-" + a(j) + ":00");
}
return D = Date.parse(D), b(D) || (n = n.split("-"), D = Date.UTC(p(n[0]), p(n[1]) - 1, p(n[2]))), _ && A && b(D) && (D += _.getTimezoneOffset(D)), D;
}, o.prototype.drawInput = function(n) {
function A() {
var k = T.getInputValue(n), G = _.xAxis[0], z = _.scroller && _.scroller.xAxis ? _.scroller.xAxis : G, $ = z.dataMin;
z = z.dataMax;
var q = T.maxInput, it = T.minInput;
k !== Number(V.getAttribute("data-hc-time-previous")) && b(k) && (V.setAttribute("data-hc-time-previous", k), L && q && b($) ? k > Number(q.getAttribute("data-hc-time")) ? k = void 0 : k < $ && (k = $) : it && b(z) && (k < Number(it.getAttribute("data-hc-time")) ? k = void 0 : k > z && (k = z)), typeof k < "u" && G.setExtremes(L ? k : G.min, L ? G.max : k, void 0, void 0, { trigger: "rangeSelectorInput" }));
}
var _ = this.chart, D = this.div, j = this.inputGroup, T = this, X = _.renderer.style || {}, g = _.renderer, m = _.options.rangeSelector, L = n === "min", Y = W.lang[L ? "rangeSelectorFrom" : "rangeSelectorTo"] || "";
Y = g.label(Y, 0).addClass("highcharts-range-label").attr({ padding: Y ? 2 : 0, height: Y ? m.inputBoxHeight : 0 }).add(j), g = g.label("", 0).addClass("highcharts-range-input").attr({ padding: 2, width: m.inputBoxWidth, height: m.inputBoxHeight, "text-align": "center" }).on(
"click",
function() {
T.showInput(n), T[n + "Input"].focus();
}
), _.styledMode || g.attr({ stroke: m.inputBoxBorderColor, "stroke-width": 1 }), g.add(j);
var V = S("input", { name: n, className: "highcharts-range-selector" }, void 0, D);
V.setAttribute("type", H(m.inputDateFormat || "%b %e, %Y")), _.styledMode || (Y.css(w(X, m.labelStyle)), g.css(w({ color: "#333333" }, X, m.inputStyle)), x(V, 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))), V.onfocus = function() {
T.showInput(n);
}, V.onblur = function() {
V === I.doc.activeElement && A(), T.hideInput(n), T.setInputValue(n), V.blur();
};
var Q = !1;
return V.onchange = function() {
Q || (A(), T.hideInput(n), V.blur());
}, V.onkeypress = function(k) {
k.keyCode === 13 && A();
}, V.onkeydown = function(k) {
Q = !0, k.keyCode !== 38 && k.keyCode !== 40 || A();
}, V.onkeyup = function() {
Q = !1;
}, { dateBox: g, input: V, label: Y };
}, o.prototype.getPosition = function() {
var n = this.chart, A = n.options.rangeSelector;
return n = A.verticalAlign === "top" ? n.plotTop - n.axisOffset[0] : 0, { buttonTop: n + A.buttonPosition.y, inputTop: n + A.inputPosition.y - 10 };
}, o.prototype.getYTDExtremes = function(n, A, _) {
var D = this.chart.time, j = new D.Date(n), T = D.get("FullYear", j);
return _ = _ ? D.Date.UTC(T, 0, 1) : +new D.Date(T, 0, 1), A = Math.max(A, _), j = j.getTime(), { max: Math.min(n || j, j), min: A };
}, o.prototype.render = function(n, A) {
var _ = this.chart, D = _.renderer, j = _.container, T = _.options, X = T.rangeSelector, g = c(T.chart.style && T.chart.style.zIndex, 0) + 1;
if (T = X.inputEnabled, X.enabled !== !1) {
if (this.rendered || (this.group = D.g("range-selector-group").attr({ zIndex: 7 }).add(), this.div = S("div", void 0, { position: "relative", height: 0, zIndex: g }), this.buttonOptions.length && this.renderButtons(), j.parentNode && j.parentNode.insertBefore(this.div, j), T && (this.inputGroup = D.g("input-group").add(this.group), D = this.drawInput("min"), this.minDateBox = D.dateBox, this.minLabel = D.label, this.minInput = D.input, D = this.drawInput("max"), this.maxDateBox = D.dateBox, this.maxLabel = D.label, this.maxInput = D.input)), T && (this.setInputValue(
"min",
n
), this.setInputValue("max", A), n = _.scroller && _.scroller.getUnionExtremes() || _.xAxis[0] || {}, d(n.dataMin) && d(n.dataMax) && (_ = _.xAxis[0].minRange || 0, this.setInputExtremes("min", n.dataMin, Math.min(n.dataMax, this.getInputValue("max")) - _), this.setInputExtremes("max", Math.max(n.dataMin, this.getInputValue("min")) + _, n.dataMax)), this.inputGroup)) {
var m = 0;
[this.minLabel, this.minDateBox, this.maxLabel, this.maxDateBox].forEach(function(L) {
if (L) {
var Y = L.getBBox().width;
Y && (L.attr({ x: m }), m += Y + X.inputSpacing);
}
});
}
this.alignElements(), this.rendered = !0;
}
}, o.prototype.renderButtons = function() {
var n = this, A = this.buttons, _ = this.options, D = W.lang, j = this.chart.renderer, T = w(_.buttonTheme), X = T && T.states, g = T.width || 28;
delete T.width, delete T.states, this.buttonGroup = j.g("range-selector-buttons").add(this.group);
var m = this.dropdown = S("select", void 0, { position: "absolute", width: "1px", height: "1px", padding: 0, border: 0, top: "-9999em", cursor: "pointer", opacity: 1e-4 }, this.div);
R(m, "touchstart", function() {
m.style.fontSize = "16px";
}), [[I.isMS ? "mouseover" : "mouseenter"], [I.isMS ? "mouseout" : "mouseleave"], ["change", "click"]].forEach(function(L) {
var Y = L[0], V = L[1];
R(m, Y, function() {
var Q = A[n.currentButtonIndex()];
Q && C(Q.element, V || Y);
});
}), this.zoomText = j.label(D && D.rangeSelectorZoom || "", 0).attr({ padding: _.buttonTheme.padding, height: _.buttonTheme.height, paddingLeft: 0, paddingRight: 0 }).add(this.buttonGroup), this.chart.styledMode || (this.zoomText.css(_.labelStyle), T["stroke-width"] = c(T["stroke-width"], 0)), S(
"option",
{ textContent: this.zoomText.textStr, disabled: !0 },
void 0,
m
), this.buttonOptions.forEach(function(L, Y) {
S("option", { textContent: L.title || L.text }, void 0, m), A[Y] = j.button(L.text, 0, 0, function(V) {
var Q = L.events && L.events.click, k;
Q && (k = Q.call(L, V)), k !== !1 && n.clickButton(Y), n.isActive = !0;
}, T, X && X.hover, X && X.select, X && X.disabled).attr({ "text-align": "center", width: g }).add(n.buttonGroup), L.title && A[Y].attr("title", L.title);
});
}, o.prototype.alignElements = function() {
var n = this, A = this.buttonGroup, _ = this.buttons, D = this.chart, j = this.group, T = this.inputGroup, X = this.options, g = this.zoomText, m = D.options, L = m.exporting && m.exporting.enabled !== !1 && m.navigation && m.navigation.buttonOptions;
m = X.buttonPosition;
var Y = X.inputPosition, V = X.verticalAlign, Q = function($, q) {
return L && n.titleCollision(D) && V === "top" && q.align === "right" && q.y - $.getBBox().height - 12 < (L.y || 0) + (L.height || 0) + D.spacing[0] ? -40 : 0;
}, k = D.plotLeft;
if (j && m && Y) {
var G = m.x - D.spacing[3];
if (A) {
if (this.positionButtons(), !this.initialButtonGroupWidth) {
var z = 0;
g && (z += g.getBBox().width + 5), _.forEach(function($, q) {
z += $.width, q !== _.length - 1 && (z += X.buttonSpacing);
}), this.initialButtonGroupWidth = z;
}
k -= D.spacing[3], this.updateButtonStates(), g = Q(A, m), this.alignButtonGroup(g), j.placed = A.placed = D.hasLoaded;
}
A = 0, T && (A = Q(T, Y), Y.align === "left" ? G = k : Y.align === "right" && (G = -Math.max(D.axisOffset[1], -A)), T.align({ y: Y.y, width: T.getBBox().width, align: Y.align, x: Y.x + G - 2 }, !0, D.spacingBox), T.placed = D.hasLoaded), this.handleCollision(A), j.align({ verticalAlign: V }, !0, D.spacingBox), T = j.alignAttr.translateY, A = j.getBBox().height + 20, Q = 0, V === "bottom" && (Q = (Q = D.legend && D.legend.options) && Q.verticalAlign === "bottom" && Q.enabled && !Q.floating ? D.legend.legendHeight + c(Q.margin, 10) : 0, A = A + Q - 20, Q = T - A - (X.floating ? 0 : X.y) - (D.titleOffset ? D.titleOffset[2] : 0) - 10), V === "top" ? (X.floating && (Q = 0), D.titleOffset && D.titleOffset[0] && (Q = D.titleOffset[0]), Q += D.margin[0] - D.spacing[0] || 0) : V === "middle" && (Y.y === m.y ? Q = T : (Y.y || m.y) && (Q = 0 > Y.y || 0 > m.y ? Q - Math.min(Y.y, m.y) : T - A)), j.translate(X.x, X.y + Math.floor(Q)), m = this.minInput, Y = this.maxInput, T = this.dropdown, X.inputEnabled && m && Y && (m.style.marginTop = j.translateY + "px", Y.style.marginTop = j.translateY + "px"), T && (T.style.marginTop = j.translateY + "px");
}
}, o.prototype.alignButtonGroup = function(n, A) {
var _ = this.chart, D = this.buttonGroup, j = this.options.buttonPosition, T = _.plotLeft - _.spacing[3], X = j.x - _.spacing[3];
j.align === "right" ? X += n - T : j.align === "center" && (X -= T / 2), D && D.align({ y: j.y, width: c(A, this.initialButtonGroupWidth), align: j.align, x: X }, !0, _.spacingBox);
}, o.prototype.positionButtons = function() {
var n = this.buttons, A = this.chart, _ = this.options, D = this.zoomText, j = A.hasLoaded ? "animate" : "attr", T = _.buttonPosition, X = A.plotLeft, g = X;
D && D.visibility !== "hidden" && (D[j]({ x: c(X + T.x, X) }), g += T.x + D.getBBox().width + 5), this.buttonOptions.forEach(function(m, L) {
n[L].visibility !== "hidden" ? (n[L][j]({ x: g }), g += n[L].width + _.buttonSpacing) : n[L][j]({ x: X });
});
}, o.prototype.handleCollision = function(n) {
var A = this, _ = this.chart, D = this.buttonGroup, j = this.inputGroup, T = this.options, X = T.buttonPosition, g = T.dropdown, m = T.inputPosition;
T = function() {
var V = 0;
return A.buttons.forEach(function(Q) {
Q = Q.getBBox(), Q.width > V && (V = Q.width);
}), V;
};
var L = function(V) {
if (j && D) {
var Q = j.alignAttr.translateX + j.alignOptions.x - n + j.getBBox().x + 2, k = j.alignOptions.width, G = D.alignAttr.translateX + D.getBBox().x;
return G + V > Q && Q + k > G && X.y < m.y + j.getBBox().height;
}
return !1;
}, Y = function() {
j && D && j.attr({ translateX: j.alignAttr.translateX + (_.axisOffset[1] >= -n ? 0 : -n), translateY: j.alignAttr.translateY + D.getBBox().height + 10 });
};
if (D) {
if (g === "always") {
this.collapseButtons(n), L(T()) && Y();
return;
}
g === "never" && this.expandButtons();
}
j && D ? m.align === X.align || L(this.initialButtonGroupWidth + 20) ? g === "responsive" ? (this.collapseButtons(n), L(T()) && Y()) : Y() : g === "responsive" && this.expandButtons() : D && g === "responsive" && (this.initialButtonGroupWidth > _.plotWidth ? this.collapseButtons(n) : this.expandButtons());
}, o.prototype.collapseButtons = function(n) {
var A = this.buttons, _ = this.buttonOptions, D = this.chart, j = this.dropdown, T = this.options, X = this.zoomText, g = D.userOptions.rangeSelector && D.userOptions.rangeSelector.buttonTheme || {}, m = function(Y) {
return { text: Y ? Y + " ▾" : "▾", width: "auto", paddingLeft: c(T.buttonTheme.paddingLeft, g.padding, 8), paddingRight: c(T.buttonTheme.paddingRight, g.padding, 8) };
};
X && X.hide();
var L = !1;
_.forEach(function(Y, V) {
V = A[V], V.state !== 2 ? V.hide() : (V.show(), V.attr(m(Y.text)), L = !0);
}), L || (j && (j.selectedIndex = 0), A[0].show(), A[0].attr(m(this.zoomText && this.zoomText.textStr))), _ = T.buttonPosition.align, this.positionButtons(), _ !== "right" && _ !== "center" || this.alignButtonGroup(n, A[this.currentButtonIndex()].getBBox().width), this.showDropdown();
}, o.prototype.expandButtons = function() {
var n = this.buttons, A = this.buttonOptions, _ = this.options, D = this.zoomText;
this.hideDropdown(), D && D.show(), A.forEach(function(j, T) {
T = n[T], T.show(), T.attr({ text: j.text, width: _.buttonTheme.width || 28, paddingLeft: c(_.buttonTheme.paddingLeft, "unset"), paddingRight: c(_.buttonTheme.paddingRight, "unset") }), 2 > T.state && T.setState(0);
}), this.positionButtons();
}, o.prototype.currentButtonIndex = function() {
var n = this.dropdown;
return n && 0 < n.selectedIndex ? n.selectedIndex - 1 : 0;
}, o.prototype.showDropdown = function() {
var n = this.buttonGroup, A = this.buttons, _ = this.chart, D = this.dropdown;
if (n && D) {
var j = n.translateX;
n = n.translateY, A = A[this.currentButtonIndex()].getBBox(), x(D, { left: _.plotLeft + j + "px", top: n + 0.5 + "px", width: A.width + "px", height: A.height + "px" }), this.hasVisibleDropdown = !0;
}
}, o.prototype.hideDropdown = function() {
var n = this.dropdown;
n && (x(n, { top: "-9999em", width: "1px", height: "1px" }), this.hasVisibleDropdown = !1);
}, o.prototype.getHeight = function() {
var n = this.options, A = this.group, _ = n.y, D = n.buttonPosition.y, j = n.inputPosition.y;
return n.height ? n.height : (this.alignElements(), n = A ? A.getBBox(!0).height + 13 + _ : 0, A = Math.min(j, D), (0 > j && 0 > D || 0 < j && 0 < D) && (n += Math.abs(A)), n);
}, o.prototype.titleCollision = function(n) {
return !(n.options.title.text || n.options.subtitle.text);
}, o.prototype.update = function(n) {
var A = this.chart;
w(!0, A.options.rangeSelector, n), this.destroy(), this.init(A), this.render();
}, o.prototype.destroy = function() {
var n = this, A = n.minInput, _ = n.maxInput;
n.eventsToUnbind && (n.eventsToUnbind.forEach(function(D) {
return D();
}), n.eventsToUnbind = void 0), u(n.buttons), A && (A.onfocus = A.onblur = A.onchange = null), _ && (_.onfocus = _.onblur = _.onchange = null), v(n, function(D, j) {
D && j !== "chart" && (D instanceof F ? D.destroy() : D instanceof window.HTMLElement && P(D)), D !== o.prototype[j] && (n[j] = null);
}, this);
}, o;
}();
if (l.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" }
], l.prototype.inputTypeFormats = { "datetime-local": "%Y-%m-%dT%H:%M:%S", date: "%Y-%m-%d", time: "%H:%M:%S" }, y.prototype.minFromRange = function() {
var o = this.range, n = o.type, A = this.max, _ = this.chart.time, D = function(g, m) {
var L = n === "year" ? "FullYear" : "Month", Y = new _.Date(g), V = _.get(L, Y);
return _.set(L, Y, V + m), V === _.get(L, Y) && _.set("Date", Y, 0), Y.getTime() - g;
};
if (b(o))
var j = A - o, T = o;
else
j = A + D(A, -o.count), this.chart && (this.chart.fixedRange = A - j);
var X = c(this.dataMin, Number.MIN_VALUE);
return b(j) || (j = X), j <= X && (j = X, typeof T > "u" && (T = D(j, o.count)), this.newMax = Math.min(j + T, this.dataMax)), b(A) || (j = void 0), j;
}, !I.RangeSelector) {
var s = [], t = function(o) {
function n() {
_ && (A = o.xAxis[0].getExtremes(), D = o.legend, T = _ && _.options.verticalAlign, b(A.min) && _.render(A.min, A.max), D.display && T === "top" && T === D.options.verticalAlign && (j = w(o.spacingBox), j.y = D.options.layout === "vertical" ? o.plotTop : j.y + _.getHeight(), D.group.placed = !1, D.align(j)));
}
var A, _ = o.rangeSelector, D, j, T;
_ && (N(s, function(X) {
return X[0] === o;
}) || s.push([o, [R(o.xAxis[0], "afterSetExtremes", function(X) {
_ && _.render(X.min, X.max);
}), R(o, "redraw", n)]]), n());
};
R(B, "afterGetContainer", function() {
this.options.rangeSelector && this.options.rangeSelector.enabled && (this.rangeSelector = new l(this));
}), R(B, "beforeRender", function() {
var o = this.axes, n = this.rangeSelector;
n && (b(n.deferredYTDClick) && (n.clickButton(n.deferredYTDClick), delete n.deferredYTDClick), o.forEach(function(A) {
A.updateNames(), A.setScale();
}), this.getAxisMargins(), n.render(), o = n.options.verticalAlign, n.options.floating || (o === "bottom" ? this.extraBottomMargin = !0 : o !== "middle" && (this.extraTopMargin = !0)));
}), R(B, "update", function(o) {
var n = o.options.rangeSelector;
o = this.rangeSelector;
var A = this.extraBottomMargin, _ = this.extraTopMargin;
n && n.enabled && !d(o) && this.options.rangeSelector && (this.options.rangeSelector.enabled = !0, this.rangeSelector = o = new l(this)), this.extraTopMargin = this.extraBottomMargin = !1, o && (t(this), n = n && n.verticalAlign || o.options && o.options.verticalAlign, o.options.floating || (n === "bottom" ? this.extraBottomMargin = !0 : n !== "middle" && (this.extraTopMargin = !0)), this.extraBottomMargin !== A || this.extraTopMargin !== _) && (this.isDirtyBox = !0);
}), R(B, "render", function() {
var o = this.rangeSelector;
o && !o.options.floating && (o.render(), o = o.options.verticalAlign, o === "bottom" ? this.extraBottomMargin = !0 : o !== "middle" && (this.extraTopMargin = !0));
}), R(B, "getMargins", function() {
var o = this.rangeSelector;
o && (o = o.getHeight(), this.extraTopMargin && (this.plotTop += o), this.extraBottomMargin && (this.marginBottom += o));
}), B.prototype.callbacks.push(t), R(B, "destroy", function() {
for (var o = 0; o < s.length; o++) {
var n = s[o];
if (n[0] === this) {
n[1].forEach(function(A) {
return A();
}), s.splice(o, 1);
break;
}
}
}), I.RangeSelector = l;
}
return l;
}), E(
h,
"Core/Chart/StockChart.js",
[h["Core/Animation/AnimationUtilities.js"], h["Core/Axis/Axis.js"], h["Core/Chart/Chart.js"], h["Core/FormatUtilities.js"], h["Core/DefaultOptions.js"], h["Core/Series/Series.js"], h["Core/Renderer/SVG/SVGRenderer.js"], h["Core/Utilities.js"]],
function(y, B, I, Z, F, U, H, W) {
function R(p, i) {
return p === "xAxis" ? { minPadding: 0, maxPadding: 0, overscroll: 0, ordinal: !0, title: { text: null }, labels: { overflow: "justify" }, showLastLabel: !0 } : p === "yAxis" ? { labels: { y: -2 }, opposite: a(i.opposite, !0), showLastLabel: !(!i.categories && i.type !== "category"), title: { text: null } } : {};
}
function S(p, i) {
if (p === "xAxis") {
p = u();
var l = { type: "datetime", categories: void 0 };
return a(i.navigator && i.navigator.enabled, p.navigator.enabled, !0) && (l.startOnTick = !1, l.endOnTick = !1), l;
}
return {};
}
var x = this && this.__extends || function() {
var p = function(i, l) {
return p = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(s, t) {
s.__proto__ = t;
} || function(s, t) {
for (var o in t)
t.hasOwnProperty(o) && (s[o] = t[o]);
}, p(i, l);
};
return function(i, l) {
function s() {
this.constructor = i;
}
p(i, l), i.prototype = l === null ? Object.create(l) : (s.prototype = l.prototype, new s());
};
}(), d = Z.format, u = F.getOptions;
y = W.addEvent;
var P = W.clamp, O = W.defined, N = W.extend, C = W.find, b = W.isNumber, w = W.isString, v = W.merge, a = W.pick, c = W.splat;
return W = function(p) {
function i() {
return p !== null && p.apply(this, arguments) || this;
}
return x(i, p), i.prototype.init = function(l, s) {
var t = u(), o = l.xAxis, n = l.yAxis, A = a(l.navigator && l.navigator.enabled, t.navigator.enabled, !0);
l.xAxis = l.yAxis = void 0, A = v({ chart: { panning: { enabled: !0, type: "x" }, pinchType: "x" }, navigator: { enabled: A }, scrollbar: { enabled: a(t.scrollbar && t.scrollbar.enabled, !0) }, rangeSelector: { enabled: a(t.rangeSelector.enabled, !0) }, title: { text: null }, tooltip: { split: a(t.tooltip.split, !0), crosshairs: !0 }, legend: { enabled: !1 } }, l, { isStock: !0 }), l.xAxis = o, l.yAxis = n, A.xAxis = c(l.xAxis || {}).map(function(_, D) {
return v(R("xAxis", _), t.xAxis, t.xAxis && t.xAxis[D], _, S("xAxis", l));
}), A.yAxis = c(l.yAxis || {}).map(function(_, D) {
return v(R("yAxis", _), t.yAxis, t.yAxis && t.yAxis[D], _);
}), p.prototype.init.call(this, A, s);
}, i.prototype.createAxis = function(l, s) {
return s.axis = v(R(l, s.axis), s.axis, S(l, this.userOptions)), p.prototype.createAxis.call(this, l, s);
}, i;
}(I), function(p) {
p.stockChart = function(i, l, s) {
return new p(i, l, s);
};
}(W || (W = {})), y(U, "setOptions", function(p) {
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 && (p.plotOptions[this.type] = v(p.plotOptions[this.type], i)));
}), y(B, "autoLabelAlign", function(p) {
var i = this.chart, l = this.options;
i = i._labelPanes = i._labelPanes || {};
var s = this.options.labels;
this.chart.options.isStock && this.coll === "yAxis" && (l = l.top + "," + l.height, !i[l] && s.enabled && (s.x === 15 && (s.x = 0), typeof s.align > "u" && (s.align = "right"), i[l] = this, p.align = "right", p.preventDefault()));
}), y(B, "destroy", function() {
var p = this.chart, i = this.options && this.options.top + "," + this.options.height;
i && p._labelPanes && p._labelPanes[i] === this && delete p._labelPanes[i];
}), y(B, "getPlotLinePath", function(p) {
function i(G) {
var z = G === "xAxis" ? "yAxis" : "xAxis";
return G = l.options[z], b(G) ? [t[z][G]] : w(G) ? [t.get(G)] : s.map(function($) {
return $[z];
});
}
var l = this, s = this.isLinked && !this.series ? this.linkedParent.series : this.series, t = l.chart, o = t.renderer, n = l.left, A = l.top, _, D, j, T, X = [], g = [], m = p.translatedValue, L = p.value, Y = p.force;
if (t.options.isStock && p.acrossPanes !== !1 && l.coll === "xAxis" || l.coll === "yAxis") {
p.preventDefault(), g = i(l.coll);
var V = l.isXAxis ? t.yAxis : t.xAxis;
V.forEach(function(G) {
if (!O(G.options.id) || G.options.id.indexOf("navigator") === -1) {
var z = G.isXAxis ? "yAxis" : "xAxis";
z = O(G.options[z]) ? t[z][G.options[z]] : t[z][0], l === z && g.push(G);
}
});
var Q = g.length ? [] : [l.isXAxis ? t.yAxis[0] : t.xAxis[0]];
g.forEach(function(G) {
Q.indexOf(G) !== -1 || C(Q, function(z) {
return z.pos === G.pos && z.len === G.len;
}) || Q.push(G);
});
var k = a(m, l.translate(L, null, null, p.old));
b(k) && (l.horiz ? Q.forEach(function(G) {
var z;
D = G.pos, T = D + G.len, _ = j = Math.round(k + l.transB), Y !== "pass" && (_ < n || _ > n + l.width) && (Y ? _ = j = P(_, n, n + l.width) : z = !0), z || X.push(["M", _, D], ["L", j, T]);
}) : Q.forEach(function(G) {
var z;
_ = G.pos, j = _ + G.len, D = T = Math.round(A + l.height - k), Y !== "pass" && (D < A || D > A + l.height) && (Y ? D = T = P(D, A, A + l.height) : z = !0), z || X.push(["M", _, D], ["L", j, T]);
})), p.path = 0 < X.length ? o.crispPolyLine(X, p.lineWidth || 1) : null;
}
}), H.prototype.crispPolyLine = function(p, i) {
for (var l = 0; l < p.length; l += 2) {
var s = p[l], t = p[l + 1];
s[1] === t[1] && (s[1] = t[1] = Math.round(s[1]) - i % 2 / 2), s[2] === t[2] && (s[2] = t[2] = Math.round(s[2]) + i % 2 / 2);
}
return p;
}, y(B, "afterHideCrosshair", function() {
this.crossLabel && (this.crossLabel = this.crossLabel.hide());
}), y(B, "afterDrawCrosshair", function(p) {
var i, l;
if (this.crosshair && this.crosshair.label && this.crosshair.label.enabled && this.cross && b(this.min) && b(this.max)) {
var s = this.chart, t = this.logarithmic, o = this.crosshair.label, n = this.horiz, A = this.opposite, _ = this.left, D = this.top, j = this.crossLabel, T = o.format, X = "", g = this.options.tickPosition === "inside", m = this.crosshair.snap !== !1, L = 0, Y = p.e || this.cross && this.cross.e;
p = p.point;
var V = this.min, Q = this.max;
t && (V = t.lin2log(V), Q = t.lin2log(Q)), t = n ? "center" : A ? this.labelAlign === "right" ? "right" : "left" : this.labelAlign === "left" ? "left" : "center", j || (j = this.crossLabel = s.renderer.label("", 0, void 0, o.shape || "callout").addClass("highcharts-crosshair-label highcharts-color-" + (p ? p.series.colorIndex : this.series[0] && this.series[0].colorIndex)).attr({ align: o.align || t, padding: a(o.padding, 8), r: a(o.borderRadius, 3), zIndex: 2 }).add(this.labelGroup), s.styledMode || j.attr({ fill: o.backgroundColor || p && p.series && p.series.color || "#666666", stroke: o.borderColor || "", "stroke-width": o.borderWidth || 0 }).css(N({ color: "#ffffff", fontWeight: "normal", fontSize: "11px", textAlign: "center" }, o.style || {}))), n ? (t = m ? (p.plotX || 0) + _ : Y.chartX, D += A ? 0 : this.height) : (t = A ? this.width + _ : 0, D = m ? (p.plotY || 0) + D : Y.chartY), T || o.formatter || (this.dateTime && (X = "%b %d, %Y"), T = "{value" + (X ? ":" + X : "") + "}"), X = m ? this.isXAxis ? p.x : p.y : this.toValue(n ? Y.chartX : Y.chartY), m = p ? p.series.isPointInside(p) : b(X) && X > V && X < Q, Y = "", T ? Y = d(T, { value: X }, s) : o.formatter && b(X) && (Y = o.formatter.call(this, X)), j.attr({ text: Y, x: t, y: D, visibility: m ? "visible" : "hidden" }), o = j.getBBox(), b(j.y) && (n ? (g && !A || !g && A) && (D = j.y - o.height) : D = j.y - o.height / 2), n ? (i = _ - o.x, l = _ + this.width - o.x) : (i = this.labelAlign === "left" ? _ : 0, l = this.labelAlign === "right" ? _ + this.width : s.chartWidth), j.translateX < i && (L = i - j.translateX), j.translateX + o.width >= l && (L = -(j.translateX + o.width - l)), j.attr({ x: t + L, y: D, anchorX: n ? t : this.opposite ? 0 : s.chartWidth, anchorY: n ? this.opposite ? s.chartHeight : 0 : D + o.height / 2 });
}
}), U.prototype.forceCropping = function() {
var p = this.chart, i = this.options.dataGrouping;
return this.allowDG !== !1 && i && a(i.enabled, p.options.isStock);
}, y(I, "update", function(p) {
p = p.options, "scrollbar" in p && this.navigator && (v(!0, this.options.scrollbar, p.scrollbar), this.navigator.update({}, !1), delete p.scrollbar);
}), W;
}
), E(h, "masters/modules/stock.src.js", [
h["Core/Globals.js"],
h["Core/Axis/OrdinalAxis.js"],
h["Series/DataModifyComposition.js"],
h["Core/Scrollbar.js"],
h["Core/Chart/StockChart.js"]
], function(y, B, I, Z, F) {
y.Scrollbar = Z, y.StockChart = y.stockChart = F.stockChart, Z.compose(y.Axis), B.compose(y.Axis, y.Series, y.Chart), I.compose(y.Series, y.Axis, y.Point);
}), E(h, "masters/highstock.src.js", [h["masters/highcharts.src.js"]], function(y) {
return y.product = "Highstock", y;
}), h["masters/highstock.src.js"]._modules = h, h["masters/highstock.src.js"];
});
})(Gp);
var O0 = Gp.exports;
const Sn = /* @__PURE__ */ Cn(O0);
var Hp = { exports: {} };
(function(r) {
(function(f, E) {
r.exports ? (E.default = E, r.exports = f.document ? E(f) : E) : (f.Highcharts && f.Highcharts.error(16, !0), f.Highcharts = E(f));
})(typeof window < "u" ? window : Fr, function(f) {
function E(y, B, I, Z) {
y.hasOwnProperty(B) || (y[B] = Z.apply(null, I));
}
var h = {};
return E(h, "Core/Globals.js", [], function() {
var y = typeof f < "u" ? f : typeof window < "u" ? window : {}, B;
return function(I) {
I.SVG_NS = "http://www.w3.org/2000/svg", I.product = "Highcharts", I.version = "9.3.3", I.win = y, I.doc = I.win.document, I.svg = I.doc && I.doc.createElementNS && !!I.doc.createElementNS(I.SVG_NS, "svg").createSVGRect, I.userAgent = I.win.navigator && I.win.navigator.userAgent || "", I.isChrome = I.userAgent.indexOf("Chrome") !== -1, I.isFirefox = I.userAgent.indexOf("Firefox") !== -1, I.isMS = /(edge|msie|trident)/i.test(I.userAgent) && !I.win.opera, I.isSafari = !I.isChrome && I.userAgent.indexOf("Safari") !== -1, I.isTouchDevice = /(Mobile|Android|Windows Phone)/.test(I.userAgent), I.isWebKit = I.userAgent.indexOf("AppleWebKit") !== -1, I.deg2rad = 2 * Math.PI / 360, I.hasBidiBug = I.isFirefox && 4 > parseInt(I.userAgent.split("Firefox/")[1], 10), I.hasTouch = !!I.win.TouchEvent, I.marginNames = ["plotTop", "marginRight", "marginBottom", "plotLeft"], I.noop = function() {
}, I.supportsPassiveEvents = function() {
var Z = !1;
if (!I.isMS) {
var F = Object.defineProperty({}, "passive", { get: function() {
Z = !0;
} });
I.win.addEventListener && I.win.removeEventListener && (I.win.addEventListener(
"testPassive",
I.noop,
F
), I.win.removeEventListener("testPassive", I.noop, F));
}
return Z;
}(), I.charts = [], I.dateFormats = {}, I.seriesTypes = {}, I.symbolSizes = {}, I.chartCount = 0;
}(B || (B = {})), B;
}), E(h, "Core/Utilities.js", [h["Core/Globals.js"]], function(y) {
function B(t, o, n, A) {
var _ = o ? "Highcharts error" : "Highcharts warning";
t === 32 && (t = _ + ": Deprecated member");
var D = S(t), j = D ? _ + " #" + t + ": www.highcharts.com/errors/" + t + "/" : t.toString();
if (typeof A < "u") {
var T = "";
D && (j += "?"), b(A, function(X, g) {
T += `
- ` + g + ": " + X, D && (j += encodeURI(g) + "=" + encodeURI(X));
}), j += T;
}
v(y, "displayError", { chart: n, code: t, message: j, params: A }, function() {
if (o)
throw Error(j);
p.console && B.messages.indexOf(j) === -1 && console.warn(j);
}), B.messages.push(j);
}
function I(t, o) {
var n = {};
return b(t, function(A, _) {
H(t[_], !0) && !t.nodeType && o[_] ? (A = I(t[_], o[_]), Object.keys(A).length && (n[_] = A)) : (H(t[_]) || t[_] !== o[_]) && (n[_] = t[_]);
}), n;
}
function Z(t, o) {
return parseInt(t, o || 10);
}
function F(t) {
return typeof t == "string";
}
function U(t) {
return t = Object.prototype.toString.call(t), t === "[object Array]" || t === "[object Array Iterator]";
}
function H(t, o) {
return !!t && typeof t == "object" && (!o || !U(t));
}
function W(t) {
return H(t) && typeof t.nodeType == "number";
}
function R(t) {
var o = t && t.constructor;
return !(!H(t, !0) || W(t) || !o || !o.name || o.name === "Object");
}
function S(t) {
return typeof t == "number" && !isNaN(t) && 1 / 0 > t && -1 / 0 < t;
}
function x(t) {
return typeof t < "u" && t !== null;
}
function d(t, o, n) {
var A;
return F(o) ? x(n) ? t.setAttribute(o, n) : t && t.getAttribute && ((A = t.getAttribute(o)) || o !== "class" || (A = t.getAttribute(o + "Name"))) : b(o, function(_, D) {
x(_) ? t.setAttribute(D, _) : t.removeAttribute(D);
}), A;
}
function u(t, o) {
var n;
t || (t = {});
for (n in o)
t[n] = o[n];
return t;
}
function P() {
for (var t = arguments, o = t.length, n = 0; n < o; n++) {
var A = t[n];
if (typeof A < "u" && A !== null)
return A;
}
}
function O(t, o) {
y.isMS && !y.svg && o && typeof o.opacity < "u" && (o.filter = "alpha(opacity=" + 100 * o.opacity + ")"), u(t.style, o);
}
function N(t, o) {
return 1e14 < t ? t : parseFloat(t.toPrecision(o || 14));
}
function C(t, o, n) {
var A = y.getStyle || C;
if (o === "width")
return o = Math.min(t.offsetWidth, t.scrollWidth), n = t.getBoundingClientRect && t.getBoundingClientRect().width, n < o && n >= o - 1 && (o = Math.floor(n)), Math.max(0, o - (A(t, "padding-left", !0) || 0) - (A(t, "padding-right", !0) || 0));
if (o === "height")
return Math.max(0, Math.min(t.offsetHeight, t.scrollHeight) - (A(t, "padding-top", !0) || 0) - (A(t, "padding-bottom", !0) || 0));
if (p.getComputedStyle || B(27, !0), t = p.getComputedStyle(t, void 0)) {
var _ = t.getPropertyValue(o);
P(n, o !== "opacity") && (_ = Z(_));
}
return _;
}
function b(t, o, n) {
for (var A in t)
Object.hasOwnProperty.call(t, A) && o.call(n || t[A], t[A], A, t);
}
function w(t, o, n) {
function A(T, X) {
var g = t.removeEventListener || y.removeEventListenerPolyfill;
g && g.call(t, T, X, !1);
}
function _(T) {
var X;
if (t.nodeName) {
if (o) {
var g = {};
g[o] = !0;
} else
g = T;
b(g, function(m, L) {
if (T[L])
for (X = T[L].length; X--; )
A(L, T[L][X].fn);
});
}
}
var D = typeof t == "function" && t.prototype || t;
if (Object.hasOwnProperty.call(D, "hcEvents")) {
var j = D.hcEvents;
o ? (D = j[o] || [], n ? (j[o] = D.filter(function(T) {
return n !== T.fn;
}), A(o, n)) : (_(j), j[o] = [])) : (_(j), delete D.hcEvents);
}
}
function v(t, o, n, A) {
if (n = n || {}, c.createEvent && (t.dispatchEvent || t.fireEvent && t !== y)) {
var _ = c.createEvent("Events");
_.initEvent(o, !0, !0), n = u(_, n), t.dispatchEvent ? t.dispatchEvent(n) : t.fireEvent(o, n);
} else if (t.hcEvents) {
n.target || u(n, { preventDefault: function() {
n.defaultPrevented = !0;
}, target: t, type: o }), _ = [];
for (var D = t, j = !1; D.hcEvents; )
Object.hasOwnProperty.call(D, "hcEvents") && D.hcEvents[o] && (_.length && (j = !0), _.unshift.apply(_, D.hcEvents[o])), D = Object.getPrototypeOf(D);
j && _.sort(function(T, X) {
return T.order - X.order;
}), _.forEach(function(T) {
T.fn.call(t, n) === !1 && n.preventDefault();
});
}
A && !n.defaultPrevented && A.call(t, n);
}
var a = y.charts, c = y.doc, p = y.win;
(B || (B = {})).messages = [], Math.easeInOutSine = function(t) {
return -0.5 * (Math.cos(Math.PI * t) - 1);
};
var i = Array.prototype.find ? function(t, o) {
return t.find(o);
} : function(t, o) {
var n, A = t.length;
for (n = 0; n < A; n++)
if (o(t[n], n))
return t[n];
};
b({ map: "map", each: "forEach", grep: "filter", reduce: "reduce", some: "some" }, function(t, o) {
y[o] = function(n) {
var A;
return B(32, !1, void 0, (A = {}, A["Highcharts." + o] = "use Array." + t, A)), Array.prototype[t].apply(n, [].slice.call(arguments, 1));
};
});
var l, s = function() {
var t = Math.random().toString(36).substring(2, 9) + "-", o = 0;
return function() {
return "highcharts-" + (l ? "" : t) + o++;
};
}();
return p.jQuery && (p.jQuery.fn.highcharts = function() {
var t = [].slice.call(arguments);
if (this[0])
return t[0] ? (new y[F(t[0]) ? t.shift() : "Chart"](this[0], t[0], t[1]), this) : a[d(this[0], "data-highcharts-chart")];
}), i = { addEvent: function(t, o, n, A) {
A === void 0 && (A = {});
var _ = typeof t == "function" && t.prototype || t;
Object.hasOwnProperty.call(_, "hcEvents") || (_.hcEvents = {}), _ = _.hcEvents, y.Point && t instanceof y.Point && t.series && t.series.chart && (t.series.chart.runTrackerClick = !0);
var D = t.addEventListener || y.addEventListenerPolyfill;
return D && D.call(t, o, n, y.supportsPassiveEvents ? { passive: A.passive === void 0 ? o.indexOf("touch") !== -1 : A.passive, capture: !1 } : !1), _[o] || (_[o] = []), _[o].push({ fn: n, order: typeof A.order == "number" ? A.order : 1 / 0 }), _[o].sort(function(j, T) {
return j.order - T.order;
}), function() {
w(t, o, n);
};
}, arrayMax: function(t) {
for (var o = t.length, n = t[0]; o--; )
t[o] > n && (n = t[o]);
return n;
}, arrayMin: function(t) {
for (var o = t.length, n = t[0]; o--; )
t[o] < n && (n = t[o]);
return n;
}, attr: d, clamp: function(t, o, n) {
return t > o ? t < n ? t : n : o;
}, cleanRecursively: I, clearTimeout: function(t) {
x(t) && clearTimeout(t);
}, correctFloat: N, createElement: function(t, o, n, A, _) {
return t = c.createElement(t), o && u(t, o), _ && O(t, { padding: "0", border: "none", margin: "0" }), n && O(t, n), A && A.appendChild(t), t;
}, css: O, defined: x, destroyObjectProperties: function(t, o) {
b(t, function(n, A) {
n && n !== o && n.destroy && n.destroy(), delete t[A];
});
}, discardElement: function(t) {
t && t.parentElement && t.parentElement.removeChild(t);
}, erase: function(t, o) {
for (var n = t.length; n--; )
if (t[n] === o) {
t.splice(n, 1);
break;
}
}, error: B, extend: u, extendClass: function(t, o) {
var n = function() {
};
return n.prototype = new t(), u(n.prototype, o), n;
}, find: i, fireEvent: v, getMagnitude: function(t) {
return Math.pow(10, Math.floor(Math.log(t) / Math.LN10));
}, getNestedProperty: function(t, o) {
for (t = t.split("."); t.length && x(o); ) {
var n = t.shift();
if (typeof n > "u" || n === "__proto__" || (o = o[n], !x(o) || typeof o == "function" || typeof o.nodeType == "number" || o === p))
return;
}
return o;
}, getStyle: C, inArray: function(t, o, n) {
return B(32, !1, void 0, { "Highcharts.inArray": "use Array.indexOf" }), o.indexOf(t, n);
}, isArray: U, isClass: R, isDOMElement: W, isFunction: function(t) {
return typeof t == "function";
}, isNumber: S, isObject: H, isString: F, keys: function(t) {
return B(32, !1, void 0, { "Highcharts.keys": "use Object.keys" }), Object.keys(t);
}, merge: function() {
var t, o = arguments, n = {}, A = function(D, j) {
return typeof D != "object" && (D = {}), b(j, function(T, X) {
X !== "__proto__" && X !== "constructor" && (!H(T, !0) || R(T) || W(T) ? D[X] = j[X] : D[X] = A(D[X] || {}, T));
}), D;
};
o[0] === !0 && (n = o[1], o = Array.prototype.slice.call(o, 2));
var _ = o.length;
for (t = 0; t < _; t++)
n = A(n, o[t]);
return n;
}, normalizeTickInterval: function(t, o, n, A, _) {
var D = t;
n = P(n, 1);
var j = t / n;
for (o || (o = _ ? [1, 1.2, 1.5, 2, 2.5, 3, 4, 5, 6, 8, 10] : [1, 2, 2.5, 5, 10], A === !1 && (n === 1 ? o = o.filter(function(T) {
return T % 1 === 0;
}) : 0.1 >= n && (o = [1 / n]))), A = 0; A < o.length && (D = o[A], !(_ && D * n >= t || !_ && j <= (o[A] + (o[A + 1] || o[A])) / 2)); A++)
;
return D = N(D * n, -Math.round(Math.log(1e-3) / Math.LN10));
}, objectEach: b, offset: function(t) {
var o = c.documentElement;
return t = t.parentElement || t.parentNode ? t.getBoundingClientRect() : { top: 0, left: 0, width: 0, height: 0 }, { top: t.top + (p.pageYOffset || o.scrollTop) - (o.clientTop || 0), left: t.left + (p.pageXOffset || o.scrollLeft) - (o.clientLeft || 0), width: t.width, height: t.height };
}, pad: function(t, o, n) {
return Array((o || 2) + 1 - String(t).replace("-", "").length).join(n || "0") + t;
}, pick: P, pInt: Z, relativeLength: function(t, o, n) {
return /%$/.test(t) ? o * parseFloat(t) / 100 + (n || 0) : parseFloat(t);
}, removeEvent: w, splat: function(t) {
return U(t) ? t : [t];
}, stableSort: function(t, o) {
var n = t.length, A, _;
for (_ = 0; _ < n; _++)
t[_].safeI = _;
for (t.sort(function(D, j) {
return A = o(D, j), A === 0 ? D.safeI - j.safeI : A;
}), _ = 0; _ < n; _++)
delete t[_].safeI;
}, syncTimeout: function(t, o, n) {
return 0 < o ? setTimeout(t, o, n) : (t.call(0, n), -1);
}, timeUnits: {
millisecond: 1,
second: 1e3,
minute: 6e4,
hour: 36e5,
day: 864e5,
week: 6048e5,
month: 24192e5,
year: 314496e5
}, uniqueKey: s, useSerialIds: function(t) {
return l = P(t, l);
}, wrap: function(t, o, n) {
var A = t[o];
t[o] = function() {
var _ = Array.prototype.slice.call(arguments), D = arguments, j = this;
return j.proceed = function() {
A.apply(j, arguments.length ? arguments : D);
}, _.unshift(A), _ = n.apply(this, _), j.proceed = null, _;
};
} }, i;
}), E(h, "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" };
}), E(h, "Core/Color/Color.js", [h["Core/Globals.js"], h["Core/Utilities.js"]], function(y, B) {
var I = B.isNumber, Z = B.merge, F = B.pInt;
return B = function() {
function U(H) {
this.rgba = [NaN, NaN, NaN, NaN], this.input = H;
var W = y.Color;
if (W && W !== U)
return new W(H);
if (!(this instanceof U))
return new U(H);
this.init(H);
}
return U.parse = function(H) {
return H ? new U(H) : U.None;
}, U.prototype.init = function(H) {
var W;
if (typeof H == "object" && typeof H.stops < "u")
this.stops = H.stops.map(function(d) {
return new U(d[1]);
});
else if (typeof H == "string") {
if (this.input = H = U.names[H.toLowerCase()] || H, H.charAt(0) === "#") {
var R = H.length, S = parseInt(H.substr(1), 16);
R === 7 ? W = [(S & 16711680) >> 16, (S & 65280) >> 8, S & 255, 1] : R === 4 && (W = [(S & 3840) >> 4 | (S & 3840) >> 8, (S & 240) >> 4 | S & 240, (S & 15) << 4 | S & 15, 1]);
}
if (!W)
for (S = U.parsers.length; S-- && !W; ) {
var x = U.parsers[S];
(R = x.regex.exec(H)) && (W = x.parse(R));
}
}
W && (this.rgba = W);
}, U.prototype.get = function(H) {
var W = this.input, R = this.rgba;
if (typeof W == "object" && typeof this.stops < "u") {
var S = Z(W);
return S.stops = [].slice.call(S.stops), this.stops.forEach(function(x, d) {
S.stops[d] = [S.stops[d][0], x.get(H)];
}), S;
}
return R && I(R[0]) ? H === "rgb" || !H && R[3] === 1 ? "rgb(" + R[0] + "," + R[1] + "," + R[2] + ")" : H === "a" ? "" + R[3] : "rgba(" + R.join(",") + ")" : W;
}, U.prototype.brighten = function(H) {
var W = this.rgba;
if (this.stops)
this.stops.forEach(function(S) {
S.brighten(H);
});
else if (I(H) && H !== 0)
for (var R = 0; 3 > R; R++)
W[R] += F(255 * H), 0 > W[R] && (W[R] = 0), 255 < W[R] && (W[R] = 255);
return this;
}, U.prototype.setOpacity = function(H) {
return this.rgba[3] = H, this;
}, U.prototype.tweenTo = function(H, W) {
var R = this.rgba, S = H.rgba;
return !I(R[0]) || !I(S[0]) ? H.input || "none" : (H = S[3] !== 1 || R[3] !== 1, (H ? "rgba(" : "rgb(") + Math.round(S[0] + (R[0] - S[0]) * (1 - W)) + "," + Math.round(S[1] + (R[1] - S[1]) * (1 - W)) + "," + Math.round(S[2] + (R[2] - S[2]) * (1 - W)) + (H ? "," + (S[3] + (R[3] - S[3]) * (1 - W)) : "") + ")");
}, U.names = { white: "#ffffff", black: "#000000" }, U.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(H) {
return [F(H[1]), F(H[2]), F(H[3]), parseFloat(H[4], 10)];
}
}, { regex: /rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/, parse: function(H) {
return [F(H[1]), F(H[2]), F(H[3]), 1];
} }], U.None = new U(""), U;
}(), B;
}), E(h, "Core/Color/Palettes.js", [], function() {
return { colors: "#7cb5ec #434348 #90ed7d #f7a35c #8085e9 #f15c80 #e4d354 #2b908f #f45b5b #91e8e1".split(" ") };
}), E(h, "Core/Time.js", [h["Core/Globals.js"], h["Core/Utilities.js"]], function(y, B) {
var I = y.win, Z = B.defined, F = B.error, U = B.extend, H = B.isObject, W = B.merge, R = B.objectEach, S = B.pad, x = B.pick, d = B.splat, u = B.timeUnits, P = y.isSafari && I.Intl && I.Intl.DateTimeFormat.prototype.formatRange, O = y.isSafari && I.Intl && !I.Intl.DateTimeFormat.prototype.formatRange;
return B = function() {
function N(C) {
this.options = {}, this.variableTimezone = this.useUTC = !1, this.Date = I.Date, this.getTimezoneOffset = this.timezoneOffsetFunction(), this.update(C);
}
return N.prototype.get = function(C, b) {
if (this.variableTimezone || this.timezoneOffset) {
var w = b.getTime(), v = w - this.getTimezoneOffset(b);
return b.setTime(v), C = b["getUTC" + C](), b.setTime(w), C;
}
return this.useUTC ? b["getUTC" + C]() : b["get" + C]();
}, N.prototype.set = function(C, b, w) {
if (this.variableTimezone || this.timezoneOffset) {
if (C === "Milliseconds" || C === "Seconds" || C === "Minutes" && this.getTimezoneOffset(b) % 36e5 === 0)
return b["setUTC" + C](w);
var v = this.getTimezoneOffset(b);
return v = b.getTime() - v, b.setTime(v), b["setUTC" + C](w), C = this.getTimezoneOffset(b), v = b.getTime() + C, b.setTime(v);
}
return this.useUTC || P && C === "FullYear" ? b["setUTC" + C](w) : b["set" + C](w);
}, N.prototype.update = function(C) {
var b = x(C && C.useUTC, !0);
this.options = C = W(!0, this.options || {}, C), this.Date = C.Date || I.Date || Date, this.timezoneOffset = (this.useUTC = b) && C.timezoneOffset, this.getTimezoneOffset = this.timezoneOffsetFunction(), this.variableTimezone = b && !(!C.getTimezoneOffset && !C.timezone);
}, N.prototype.makeTime = function(C, b, w, v, a, c) {
if (this.useUTC) {
var p = this.Date.UTC.apply(0, arguments), i = this.getTimezoneOffset(p);
p += i;
var l = this.getTimezoneOffset(p);
i !== l ? p += l - i : i - 36e5 !== this.getTimezoneOffset(p - 36e5) || O || (p -= 36e5);
} else
p = new this.Date(C, b, x(w, 1), x(v, 0), x(a, 0), x(c, 0)).getTime();
return p;
}, N.prototype.timezoneOffsetFunction = function() {
var C = this, b = this.options, w = b.getTimezoneOffset, v = b.moment || I.moment;
if (!this.useUTC)
return function(a) {
return 6e4 * new Date(a.toString()).getTimezoneOffset();
};
if (b.timezone) {
if (v)
return function(a) {
return 6e4 * -v.tz(a, b.timezone).utcOffset();
};
F(25);
}
return this.useUTC && w ? function(a) {
return 6e4 * w(a.valueOf());
} : function() {
return 6e4 * (C.timezoneOffset || 0);
};
}, N.prototype.dateFormat = function(C, b, w) {
if (!Z(b) || isNaN(b))
return y.defaultOptions.lang && y.defaultOptions.lang.invalidDate || "";
C = x(C, "%Y-%m-%d %H:%M:%S");
var v = this, a = new this.Date(b), c = this.get("Hours", a), p = this.get("Day", a), i = this.get("Date", a), l = this.get("Month", a), s = this.get("FullYear", a), t = y.defaultOptions.lang, o = t && t.weekdays, n = t && t.shortWeekdays;
return a = U({ a: n ? n[p] : o[p].substr(0, 3), A: o[p], d: S(i), e: S(i, 2, " "), w: p, b: t.shortMonths[l], B: t.months[l], m: S(l + 1), o: l + 1, y: s.toString().substr(2, 2), Y: s, H: S(c), k: c, I: S(c % 12 || 12), l: c % 12 || 12, M: S(this.get("Minutes", a)), p: 12 > c ? "AM" : "PM", P: 12 > c ? "am" : "pm", S: S(a.getSeconds()), L: S(Math.floor(b % 1e3), 3) }, y.dateFormats), R(a, function(A, _) {
for (; C.indexOf("%" + _) !== -1; )
C = C.replace("%" + _, typeof A == "function" ? A.call(v, b) : A);
}), w ? C.substr(0, 1).toUpperCase() + C.substr(1) : C;
}, N.prototype.resolveDTLFormat = function(C) {
return H(C, !0) ? C : (C = d(C), { main: C[0], from: C[1], to: C[2] });
}, N.prototype.getTimeTicks = function(C, b, w, v) {
var a = this, c = [], p = {}, i = new a.Date(b), l = C.unitRange, s = C.count || 1, t;
if (v = x(v, 1), Z(b)) {
if (a.set(
"Milliseconds",
i,
l >= u.second ? 0 : s * Math.floor(a.get("Milliseconds", i) / s)
), l >= u.second && a.set("Seconds", i, l >= u.minute ? 0 : s * Math.floor(a.get("Seconds", i) / s)), l >= u.minute && a.set("Minutes", i, l >= u.hour ? 0 : s * Math.floor(a.get("Minutes", i) / s)), l >= u.hour && a.set("Hours", i, l >= u.day ? 0 : s * Math.floor(a.get("Hours", i) / s)), l >= u.day && a.set("Date", i, l >= u.month ? 1 : Math.max(1, s * Math.floor(a.get("Date", i) / s))), l >= u.month) {
a.set("Month", i, l >= u.year ? 0 : s * Math.floor(a.get("Month", i) / s));
var o = a.get("FullYear", i);
}
l >= u.year && a.set(
"FullYear",
i,
o - o % s
), l === u.week && (o = a.get("Day", i), a.set("Date", i, a.get("Date", i) - o + v + (o < v ? -7 : 0))), o = a.get("FullYear", i), v = a.get("Month", i);
var n = a.get("Date", i), A = a.get("Hours", i);
for (b = i.getTime(), !a.variableTimezone && a.useUTC || !Z(w) || (t = w - b > 4 * u.month || a.getTimezoneOffset(b) !== a.getTimezoneOffset(w)), b = i.getTime(), i = 1; b < w; )
c.push(b), b = l === u.year ? a.makeTime(o + i * s, 0) : l === u.month ? a.makeTime(o, v + i * s) : !t || l !== u.day && l !== u.week ? t && l === u.hour && 1 < s ? a.makeTime(o, v, n, A + i * s) : b + l * s : a.makeTime(o, v, n + i * s * (l === u.day ? 1 : 7)), i++;
c.push(b), l <= u.hour && 1e4 > c.length && c.forEach(function(_) {
_ % 18e5 === 0 && a.dateFormat("%H%M%S%L", _) === "000000000" && (p[_] = "day");
});
}
return c.info = U(C, { higherRanks: p, totalRange: l * s }), c;
}, N.prototype.getDateFormat = function(C, b, w, v) {
var a = this.dateFormat("%m-%d %H:%M:%S.%L", b), c = { millisecond: 15, second: 12, minute: 9, hour: 6, day: 3 }, p = "millisecond";
for (i in u) {
if (C === u.week && +this.dateFormat("%w", b) === w && a.substr(6) === "00:00:00.000") {
var i = "week";
break;
}
if (u[i] > C) {
i = p;
break;
}
if (c[i] && a.substr(c[i]) !== "01-01 00:00:00.000".substr(c[i]))
break;
i !== "week" && (p = i);
}
if (i)
var l = this.resolveDTLFormat(v[i]).main;
return l;
}, N;
}(), B;
}), E(h, "Core/DefaultOptions.js", [h["Core/Chart/ChartDefaults.js"], h["Core/Color/Color.js"], h["Core/Globals.js"], h["Core/Color/Palettes.js"], h["Core/Time.js"], h["Core/Utilities.js"]], function(y, B, I, Z, F, U) {
B = B.parse;
var H = U.merge, W = {
colors: Z.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: I.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: I.isTouchDevice ? 25 : 10,
headerFormat: '{point.key}
',
pointFormat: '● {series.name}: {point.y}
',
backgroundColor: B("#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" }
};
W.chart.styledMode = !1;
var R = new F(H(W.global, W.time));
return y = { defaultOptions: W, defaultTime: R, getOptions: function() {
return W;
}, setOptions: function(S) {
return H(!0, W, S), (S.time || S.global) && (I.time ? I.time.update(H(
W.global,
W.time,
S.global,
S.time
)) : I.time = R), W;
} }, y;
}), E(h, "Core/Animation/Fx.js", [h["Core/Color/Color.js"], h["Core/Globals.js"], h["Core/Utilities.js"]], function(y, B, I) {
var Z = y.parse, F = B.win, U = I.isNumber, H = I.objectEach;
return function() {
function W(R, S, x) {
this.pos = NaN, this.options = S, this.elem = R, this.prop = x;
}
return W.prototype.dSetter = function() {
var R = this.paths, S = R && R[0];
R = R && R[1];
var x = this.now || 0, d = [];
if (x !== 1 && S && R)
if (S.length === R.length && 1 > x)
for (var u = 0; u < R.length; u++) {
for (var P = S[u], O = R[u], N = [], C = 0; C < O.length; C++) {
var b = P[C], w = O[C];
U(b) && U(w) && (O[0] !== "A" || C !== 4 && C !== 5) ? N[C] = b + x * (w - b) : N[C] = w;
}
d.push(N);
}
else
d = R;
else
d = this.toD || [];
this.elem.attr("d", d, void 0, !0);
}, W.prototype.update = function() {
var R = this.elem, S = this.prop, x = this.now, d = this.options.step;
this[S + "Setter"] ? this[S + "Setter"]() : R.attr ? R.element && R.attr(S, x, null, !0) : R.style[S] = x + this.unit, d && d.call(R, x, this);
}, W.prototype.run = function(R, S, x) {
var d = this, u = d.options, P = function(C) {
return P.stopped ? !1 : d.step(C);
}, O = F.requestAnimationFrame || function(C) {
setTimeout(
C,
13
);
}, N = function() {
for (var C = 0; C < W.timers.length; C++)
W.timers[C]() || W.timers.splice(C--, 1);
W.timers.length && O(N);
};
R !== S || this.elem["forceAnimate:" + this.prop] ? (this.startTime = +/* @__PURE__ */ new Date(), this.start = R, this.end = S, this.unit = x, this.now = this.start, this.pos = 0, P.elem = this.elem, P.prop = this.prop, P() && W.timers.push(P) === 1 && O(N)) : (delete u.curAnim[this.prop], u.complete && Object.keys(u.curAnim).length === 0 && u.complete.call(this.elem));
}, W.prototype.step = function(R) {
var S = +/* @__PURE__ */ new Date(), x = this.options, d = this.elem, u = x.complete, P = x.duration, O = x.curAnim;
if (d.attr && !d.element)
R = !1;
else if (R || S >= P + this.startTime) {
this.now = this.end, this.pos = 1, this.update();
var N = O[this.prop] = !0;
H(O, function(C) {
C !== !0 && (N = !1);
}), N && u && u.call(d), R = !1;
} else
this.pos = x.easing((S - this.startTime) / P), this.now = this.start + (this.end - this.start) * this.pos, this.update(), R = !0;
return R;
}, W.prototype.initPath = function(R, S, x) {
function d(a, c) {
for (; a.length < v; ) {
var p = a[0], i = c[v - a.length];
i && p[0] === "M" && (a[0] = i[0] === "C" ? ["C", p[1], p[2], p[1], p[2], p[1], p[2]] : [
"L",
p[1],
p[2]
]), a.unshift(p), N && (p = a.pop(), a.push(a[a.length - 1], p));
}
}
function u(a, c) {
for (; a.length < v; )
if (c = a[Math.floor(a.length / C) - 1].slice(), c[0] === "C" && (c[1] = c[5], c[2] = c[6]), N) {
var p = a[Math.floor(a.length / C)].slice();
a.splice(a.length / 2, 0, c, p);
} else
a.push(c);
}
var P = R.startX, O = R.endX;
x = x.slice();
var N = R.isArea, C = N ? 2 : 1;
if (S = S && S.slice(), !S)
return [x, x];
if (P && O && O.length) {
for (R = 0; R < P.length; R++)
if (P[R] === O[0]) {
var b = R;
break;
} else if (P[0] === O[O.length - P.length + R]) {
b = R;
var w = !0;
break;
} else if (P[P.length - 1] === O[O.length - P.length + R]) {
b = P.length - R;
break;
}
typeof b > "u" && (S = []);
}
if (S.length && U(b)) {
var v = x.length + b * C;
w ? (d(S, x), u(x, S)) : (d(x, S), u(S, x));
}
return [S, x];
}, W.prototype.fillSetter = function() {
W.prototype.strokeSetter.apply(this, arguments);
}, W.prototype.strokeSetter = function() {
this.elem.attr(this.prop, Z(this.start).tweenTo(Z(this.end), this.pos), void 0, !0);
}, W.timers = [], W;
}();
}), E(h, "Core/Animation/AnimationUtilities.js", [h["Core/Animation/Fx.js"], h["Core/Utilities.js"]], function(y, B) {
function I(u) {
return R(u) ? S({ duration: 500, defer: 0 }, u) : { duration: u ? 500 : 0, defer: 0 };
}
function Z(u, P) {
for (var O = y.timers.length; O--; )
y.timers[O].elem !== u || P && P !== y.timers[O].prop || (y.timers[O].stopped = !0);
}
var F = B.defined, U = B.getStyle, H = B.isArray, W = B.isNumber, R = B.isObject, S = B.merge, x = B.objectEach, d = B.pick;
return { animate: function(u, P, O) {
var N, C = "", b, w;
if (!R(O)) {
var v = arguments;
O = { duration: v[2], easing: v[3], complete: v[4] };
}
W(O.duration) || (O.duration = 400), O.easing = typeof O.easing == "function" ? O.easing : Math[O.easing] || Math.easeInOutSine, O.curAnim = S(P), x(P, function(a, c) {
Z(u, c), w = new y(u, O, c), b = void 0, c === "d" && H(P.d) ? (w.paths = w.initPath(u, u.pathArray, P.d), w.toD = P.d, N = 0, b = 1) : u.attr ? N = u.attr(c) : (N = parseFloat(U(u, c)) || 0, c !== "opacity" && (C = "px")), b || (b = a), typeof b == "string" && b.match("px") && (b = b.replace(/px/g, "")), w.run(N, b, C);
});
}, animObject: I, getDeferredAnimation: function(u, P, O) {
var N = I(P), C = 0, b = 0;
return (O ? [O] : u.series).forEach(function(w) {
w = I(w.options.animation), C = P && F(P.defer) ? N.defer : Math.max(C, w.duration + w.defer), b = Math.min(N.duration, w.duration);
}), u.renderer.forExport && (C = 0), { defer: Math.max(0, C - b), duration: Math.min(C, b) };
}, setAnimation: function(u, P) {
P.renderer.globalAnimation = d(u, P.options.chart.animation, !0);
}, stop: Z };
}), E(h, "Core/Renderer/HTML/AST.js", [h["Core/Globals.js"], h["Core/Utilities.js"]], function(y, B) {
var I = y.SVG_NS, Z = B.attr, F = B.createElement, U = B.error, H = B.isFunction, W = B.isString, R = B.objectEach, S = B.splat, x = (B = y.win.trustedTypes) && H(B.createPolicy) && B.createPolicy("highcharts", { createHTML: function(P) {
return P;
} }), d = x ? x.createHTML("") : "";
try {
var u = !!new DOMParser().parseFromString(d, "text/html");
} catch {
u = !1;
}
return H = function() {
function P(O) {
this.nodes = typeof O == "string" ? this.parseMarkup(O) : O;
}
return P.filterUserAttributes = function(O) {
return R(O, function(N, C) {
var b = !0;
P.allowedAttributes.indexOf(C) === -1 && (b = !1), ["background", "dynsrc", "href", "lowsrc", "src"].indexOf(C) !== -1 && (b = W(N) && P.allowedReferences.some(function(w) {
return N.indexOf(w) === 0;
})), b || (U("Highcharts warning: Invalid attribute '" + C + "' in config"), delete O[C]);
}), O;
}, P.setElementHTML = function(O, N) {
O.innerHTML = P.emptyHTML, N && new P(N).addToDOM(O);
}, P.prototype.addToDOM = function(O) {
function N(C, b) {
var w;
return S(C).forEach(function(v) {
var a = v.tagName, c = v.textContent ? y.doc.createTextNode(v.textContent) : void 0;
if (a)
if (a === "#text")
var p = c;
else if (P.allowedTags.indexOf(a) !== -1) {
a = y.doc.createElementNS(a === "svg" ? I : b.namespaceURI || I, a);
var i = v.attributes || {};
R(v, function(l, s) {
s !== "tagName" && s !== "attributes" && s !== "children" && s !== "textContent" && (i[s] = l);
}), Z(a, P.filterUserAttributes(i)), c && a.appendChild(c), N(v.children || [], a), p = a;
} else
U("Highcharts warning: Invalid tagName " + a + " in config");
p && b.appendChild(p), w = p;
}), w;
}
return N(this.nodes, O);
}, P.prototype.parseMarkup = function(O) {
var N = [];
if (O = O.trim(), u)
O = new DOMParser().parseFromString(x ? x.createHTML(O) : O, "text/html");
else {
var C = F("div");
C.innerHTML = O, O = { body: C };
}
var b = function(w, v) {
var a = w.nodeName.toLowerCase(), c = { tagName: a };
if (a === "#text" && (c.textContent = w.textContent || ""), a = w.attributes) {
var p = {};
[].forEach.call(a, function(l) {
p[l.name] = l.value;
}), c.attributes = p;
}
if (w.childNodes.length) {
var i = [];
[].forEach.call(w.childNodes, function(l) {
b(l, i);
}), i.length && (c.children = i);
}
v.push(c);
};
return [].forEach.call(O.body.childNodes, function(w) {
return b(w, N);
}), N;
}, P.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(" "), P.allowedReferences = "https:// http:// mailto: / ../ ./ #".split(" "), P.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(" "), P.emptyHTML = d, P;
}(), H;
}), E(
h,
"Core/FormatUtilities.js",
[h["Core/DefaultOptions.js"], h["Core/Utilities.js"]],
function(y, B) {
function I(S, x, d, u) {
S = +S || 0, x = +x;
var P = Z.lang, O = (S.toString().split(".")[1] || "").split("e")[0].length, N = S.toString().split("e"), C = x;
if (x === -1)
x = Math.min(O, 20);
else if (!H(x))
x = 2;
else if (x && N[1] && 0 > N[1]) {
var b = x + +N[1];
0 <= b ? (N[0] = (+N[0]).toExponential(b).split("e")[0], x = b) : (N[0] = N[0].split(".")[0] || 0, S = 20 > x ? (N[0] * Math.pow(10, N[1])).toFixed(x) : 0, N[1] = 0);
}
b = (Math.abs(N[1] ? N[0] : S) + Math.pow(10, -Math.max(x, O) - 1)).toFixed(x), O = String(R(b));
var w = 3 < O.length ? O.length % 3 : 0;
return d = W(d, P.decimalPoint), u = W(u, P.thousandsSep), S = (0 > S ? "-" : "") + (w ? O.substr(0, w) + u : ""), S = 0 > +N[1] && !C ? "0" : S + O.substr(w).replace(/(\d{3})(?=\d)/g, "$1" + u), x && (S += d + b.slice(-x)), N[1] && +S != 0 && (S += "e" + N[1]), S;
}
var Z = y.defaultOptions, F = y.defaultTime, U = B.getNestedProperty, H = B.isNumber, W = B.pick, R = B.pInt;
return { dateFormat: function(S, x, d) {
return F.dateFormat(S, x, d);
}, format: function(S, x, d) {
var u = "{", P = !1, O = /f$/, N = /\.([0-9])/, C = Z.lang, b = d && d.time || F;
d = d && d.numberFormatter || I;
for (var w = []; S; ) {
var v = S.indexOf(u);
if (v === -1)
break;
var a = S.slice(0, v);
if (P) {
if (a = a.split(":"), u = U(a.shift() || "", x), a.length && typeof u == "number")
if (a = a.join(":"), O.test(a)) {
var c = parseInt((a.match(N) || ["", "-1"])[1], 10);
u !== null && (u = d(u, c, C.decimalPoint, -1 < a.indexOf(",") ? C.thousandsSep : ""));
} else
u = b.dateFormat(a, u);
w.push(u);
} else
w.push(a);
S = S.slice(v + 1), u = (P = !P) ? "}" : "{";
}
return w.push(S), w.join("");
}, numberFormat: I };
}
), E(h, "Core/Renderer/RendererUtilities.js", [h["Core/Utilities.js"]], function(y) {
var B = y.clamp, I = y.pick, Z = y.stableSort, F;
return function(U) {
function H(W, R, S) {
var x = W, d = x.reducedLen || R, u = function(w, v) {
return (v.rank || 0) - (w.rank || 0);
}, P = function(w, v) {
return w.target - v.target;
}, O, N = !0, C = [], b = 0;
for (O = W.length; O--; )
b += W[O].size;
if (b > d) {
for (Z(W, u), b = O = 0; b <= d; )
b += W[O].size, O++;
C = W.splice(O - 1, W.length);
}
for (Z(W, P), W = W.map(function(w) {
return { size: w.size, targets: [w.target], align: I(w.align, 0.5) };
}); N; ) {
for (O = W.length; O--; )
d = W[O], u = (Math.min.apply(0, d.targets) + Math.max.apply(0, d.targets)) / 2, d.pos = B(
u - d.size * d.align,
0,
R - d.size
);
for (O = W.length, N = !1; O--; )
0 < O && W[O - 1].pos + W[O - 1].size > W[O].pos && (W[O - 1].size += W[O].size, W[O - 1].targets = W[O - 1].targets.concat(W[O].targets), W[O - 1].align = 0.5, W[O - 1].pos + W[O - 1].size > R && (W[O - 1].pos = R - W[O - 1].size), W.splice(O, 1), N = !0);
}
return x.push.apply(x, C), O = 0, W.some(function(w) {
var v = 0;
return (w.targets || []).some(function() {
return x[O].pos = w.pos + v, typeof S < "u" && Math.abs(x[O].pos - x[O].target) > S ? (x.slice(0, O + 1).forEach(function(a) {
return delete a.pos;
}), x.reducedLen = (x.reducedLen || R) - 0.1 * R, x.reducedLen > 0.1 * R && H(x, R, S), !0) : (v += x[O].size, O++, !1);
});
}), Z(x, P), x;
}
U.distribute = H;
}(F || (F = {})), F;
}), E(h, "Core/Renderer/SVG/SVGElement.js", [h["Core/Animation/AnimationUtilities.js"], h["Core/Renderer/HTML/AST.js"], h["Core/Color/Color.js"], h["Core/Globals.js"], h["Core/Utilities.js"]], function(y, B, I, Z, F) {
var U = y.animate, H = y.animObject, W = y.stop, R = Z.deg2rad, S = Z.doc, x = Z.noop, d = Z.svg, u = Z.SVG_NS, P = Z.win, O = F.addEvent, N = F.attr, C = F.createElement, b = F.css, w = F.defined, v = F.erase, a = F.extend, c = F.fireEvent, p = F.isArray, i = F.isFunction, l = F.isNumber, s = F.isString, t = F.merge, o = F.objectEach, n = F.pick, A = F.pInt, _ = F.syncTimeout, D = F.uniqueKey;
return y = function() {
function j() {
this.element = void 0, this.onEvents = {}, this.opacity = 1, this.renderer = void 0, this.SVG_NS = u, this.symbolCustomAttribs = "x y width height r start end innerR anchorX anchorY rounded".split(" ");
}
return j.prototype._defaultGetter = function(T) {
return T = n(this[T + "Value"], this[T], this.element ? this.element.getAttribute(T) : null, 0), /^[\-0-9\.]+$/.test(T) && (T = parseFloat(T)), T;
}, j.prototype._defaultSetter = function(T, X, g) {
g.setAttribute(X, T);
}, j.prototype.add = function(T) {
var X = this.renderer, g = this.element;
if (T && (this.parentGroup = T), this.parentInverted = T && T.inverted, typeof this.textStr < "u" && this.element.nodeName === "text" && X.buildText(this), this.added = !0, !T || T.handleZ || this.zIndex)
var m = this.zIndexSetter();
return m || (T ? T.element : X.box).appendChild(g), this.onAdd && this.onAdd(), this;
}, j.prototype.addClass = function(T, X) {
var g = X ? "" : this.attr("class") || "";
return T = (T || "").split(/ /g).reduce(function(m, L) {
return g.indexOf(L) === -1 && m.push(L), m;
}, g ? [g] : []).join(" "), T !== g && this.attr("class", T), this;
}, j.prototype.afterSetters = function() {
this.doTransform && (this.updateTransform(), this.doTransform = !1);
}, j.prototype.align = function(T, X, g) {
var m = {}, L = this.renderer, Y = L.alignedObjects, V, Q, k;
T ? (this.alignOptions = T, this.alignByTranslate = X, (!g || s(g)) && (this.alignTo = V = g || "renderer", v(Y, this), Y.push(this), g = void 0)) : (T = this.alignOptions, X = this.alignByTranslate, V = this.alignTo), g = n(g, L[V], V === "scrollablePlotBox" ? L.plotBox : void 0, L), V = T.align;
var G = T.verticalAlign;
return L = (g.x || 0) + (T.x || 0), Y = (g.y || 0) + (T.y || 0), V === "right" ? Q = 1 : V === "center" && (Q = 2), Q && (L += (g.width - (T.width || 0)) / Q), m[X ? "translateX" : "x"] = Math.round(L), G === "bottom" ? k = 1 : G === "middle" && (k = 2), k && (Y += (g.height - (T.height || 0)) / k), m[X ? "translateY" : "y"] = Math.round(Y), this[this.placed ? "animate" : "attr"](m), this.placed = !0, this.alignAttr = m, this;
}, j.prototype.alignSetter = function(T) {
var X = { left: "start", center: "middle", right: "end" };
X[T] && (this.alignValue = T, this.element.setAttribute(
"text-anchor",
X[T]
));
}, j.prototype.animate = function(T, X, g) {
var m = this, L = H(n(X, this.renderer.globalAnimation, !0));
return X = L.defer, n(S.hidden, S.msHidden, S.webkitHidden, !1) && (L.duration = 0), L.duration !== 0 ? (g && (L.complete = g), _(function() {
m.element && U(m, T, L);
}, X)) : (this.attr(T, void 0, g), o(T, function(Y, V) {
L.step && L.step.call(this, Y, { prop: V, pos: 1, elem: this });
}, this)), this;
}, j.prototype.applyTextOutline = function(T) {
var X = this.element;
T.indexOf("contrast") !== -1 && (T = T.replace(/contrast/g, this.renderer.getContrast(X.style.fill)));
var g = T.split(" ");
if (T = g[g.length - 1], (g = g[0]) && g !== "none" && Z.svg) {
this.fakeTS = !0, this.ySetter = this.xSetter, g = g.replace(/(^[\d\.]+)(.*?)$/g, function(Y, V, Q) {
return 2 * Number(V) + Q;
}), this.removeTextOutline();
var m = S.createElementNS(u, "tspan");
N(m, { class: "highcharts-text-outline", fill: T, stroke: T, "stroke-width": g, "stroke-linejoin": "round" }), [].forEach.call(X.childNodes, function(Y) {
var V = Y.cloneNode(!0);
V.removeAttribute && ["fill", "stroke", "stroke-width", "stroke"].forEach(function(Q) {
return V.removeAttribute(Q);
}), m.appendChild(V);
});
var L = S.createElementNS(u, "tspan");
L.textContent = "", ["x", "y"].forEach(function(Y) {
var V = X.getAttribute(Y);
V && L.setAttribute(Y, V);
}), m.appendChild(L), X.insertBefore(m, X.firstChild);
}
}, j.prototype.attr = function(T, X, g, m) {
var L = this.element, Y = this.symbolCustomAttribs, V, Q = this, k, G;
if (typeof T == "string" && typeof X < "u") {
var z = T;
T = {}, T[z] = X;
}
return typeof T == "string" ? Q = (this[T + "Getter"] || this._defaultGetter).call(this, T, L) : (o(T, function($, q) {
k = !1, m || W(this, q), this.symbolName && Y.indexOf(q) !== -1 && (V || (this.symbolAttr(T), V = !0), k = !0), !this.rotation || q !== "x" && q !== "y" || (this.doTransform = !0), k || (G = this[q + "Setter"] || this._defaultSetter, G.call(this, $, q, L), !this.styledMode && this.shadows && /^(width|height|visibility|x|y|d|transform|cx|cy|r)$/.test(q) && this.updateShadows(q, $, G));
}, this), this.afterSetters()), g && g.call(this), Q;
}, j.prototype.clip = function(T) {
return this.attr("clip-path", T ? "url(" + this.renderer.url + "#" + T.id + ")" : "none");
}, j.prototype.crisp = function(T, X) {
X = X || T.strokeWidth || 0;
var g = Math.round(X) % 2 / 2;
return T.x = Math.floor(T.x || this.x || 0) + g, T.y = Math.floor(T.y || this.y || 0) + g, T.width = Math.floor((T.width || this.width || 0) - 2 * g), T.height = Math.floor((T.height || this.height || 0) - 2 * g), w(T.strokeWidth) && (T.strokeWidth = X), T;
}, j.prototype.complexColor = function(T, X, g) {
var m = this.renderer, L, Y, V, Q, k, G, z, $, q, it, et = [], nt;
c(this.renderer, "complexColor", { args: arguments }, function() {
if (T.radialGradient ? Y = "radialGradient" : T.linearGradient && (Y = "linearGradient"), Y) {
if (V = T[Y], k = m.gradients, G = T.stops, q = g.radialReference, p(V) && (T[Y] = V = { x1: V[0], y1: V[1], x2: V[2], y2: V[3], gradientUnits: "userSpaceOnUse" }), Y === "radialGradient" && q && !w(V.gradientUnits) && (Q = V, V = t(V, m.getRadialAttr(q, Q), { gradientUnits: "userSpaceOnUse" })), o(V, function(ct, gt) {
gt !== "id" && et.push(gt, ct);
}), o(G, function(ct) {
et.push(ct);
}), et = et.join(","), k[et])
it = k[et].attr("id");
else {
V.id = it = D();
var rt = k[et] = m.createElement(Y).attr(V).add(m.defs);
rt.radAttr = Q, rt.stops = [], G.forEach(function(ct) {
ct[1].indexOf("rgba") === 0 ? (L = I.parse(ct[1]), z = L.get("rgb"), $ = L.get("a")) : (z = ct[1], $ = 1), ct = m.createElement("stop").attr({
offset: ct[0],
"stop-color": z,
"stop-opacity": $
}).add(rt), rt.stops.push(ct);
});
}
nt = "url(" + m.url + "#" + it + ")", g.setAttribute(X, nt), g.gradient = et, T.toString = function() {
return nt;
};
}
});
}, j.prototype.css = function(T) {
var X = this.styles, g = {}, m = this.element, L = ["textOutline", "textOverflow", "width"], Y = "", V = !X;
if (T && T.color && (T.fill = T.color), X && o(T, function(G, z) {
X && X[z] !== G && (g[z] = G, V = !0);
}), V) {
if (X && (T = a(X, g)), T) {
if (T.width === null || T.width === "auto")
delete this.textWidth;
else if (m.nodeName.toLowerCase() === "text" && T.width)
var Q = this.textWidth = A(T.width);
}
if (this.styles = T, Q && !d && this.renderer.forExport && delete T.width, m.namespaceURI === this.SVG_NS) {
var k = function(G, z) {
return "-" + z.toLowerCase();
};
o(T, function(G, z) {
L.indexOf(z) === -1 && (Y += z.replace(/([A-Z])/g, k) + ":" + G + ";");
}), Y && N(m, "style", Y);
} else
b(m, T);
this.added && (this.element.nodeName === "text" && this.renderer.buildText(this), T && T.textOutline && this.applyTextOutline(T.textOutline));
}
return this;
}, j.prototype.dashstyleSetter = function(T) {
var X = this["stroke-width"];
if (X === "inherit" && (X = 1), T = T && T.toLowerCase()) {
var g = T.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 (T = g.length; T--; )
g[T] = "" + A(g[T]) * n(X, NaN);
T = g.join(",").replace(/NaN/g, "none"), this.element.setAttribute("stroke-dasharray", T);
}
}, j.prototype.destroy = function() {
var T = this, X = T.element || {}, g = T.renderer, m = X.ownerSVGElement, L = g.isSVG && X.nodeName === "SPAN" && T.parentGroup || void 0;
if (X.onclick = X.onmouseout = X.onmouseover = X.onmousemove = X.point = null, W(T), T.clipPath && m) {
var Y = T.clipPath;
[].forEach.call(m.querySelectorAll("[clip-path],[CLIP-PATH]"), function(V) {
-1 < V.getAttribute("clip-path").indexOf(Y.element.id) && V.removeAttribute("clip-path");
}), T.clipPath = Y.destroy();
}
if (T.stops) {
for (m = 0; m < T.stops.length; m++)
T.stops[m].destroy();
T.stops.length = 0, T.stops = void 0;
}
for (T.safeRemoveChild(X), g.styledMode || T.destroyShadows(); L && L.div && L.div.childNodes.length === 0; )
X = L.parentGroup, T.safeRemoveChild(L.div), delete L.div, L = X;
T.alignTo && v(g.alignedObjects, T), o(T, function(V, Q) {
T[Q] && T[Q].parentGroup === T && T[Q].destroy && T[Q].destroy(), delete T[Q];
});
}, j.prototype.destroyShadows = function() {
(this.shadows || []).forEach(function(T) {
this.safeRemoveChild(T);
}, this), this.shadows = void 0;
}, j.prototype.destroyTextPath = function(T, X) {
var g = T.getElementsByTagName("text")[0];
if (g) {
if (g.removeAttribute("dx"), g.removeAttribute("dy"), X.element.setAttribute("id", ""), this.textPathWrapper && g.getElementsByTagName("textPath").length) {
for (T = this.textPathWrapper.element.childNodes; T.length; )
g.appendChild(T[0]);
g.removeChild(this.textPathWrapper.element);
}
} else
(T.getAttribute("dx") || T.getAttribute("dy")) && (T.removeAttribute("dx"), T.removeAttribute("dy"));
this.textPathWrapper && (this.textPathWrapper = this.textPathWrapper.destroy());
}, j.prototype.dSetter = function(T, X, g) {
p(T) && (typeof T[0] == "string" && (T = this.renderer.pathToSegments(T)), this.pathArray = T, T = T.reduce(function(m, L, Y) {
return L && L.join ? (Y ? m + " " : "") + L.join(" ") : (L || "").toString();
}, "")), /(NaN| {2}|^$)/.test(T) && (T = "M 0 0"), this[X] !== T && (g.setAttribute(X, T), this[X] = T);
}, j.prototype.fadeOut = function(T) {
var X = this;
X.animate({ opacity: 0 }, { duration: n(T, 150), complete: function() {
X.attr({ y: -9999 }).hide();
} });
}, j.prototype.fillSetter = function(T, X, g) {
typeof T == "string" ? g.setAttribute(X, T) : T && this.complexColor(T, X, g);
}, j.prototype.getBBox = function(T, X) {
var g = this.renderer, m = this.element, L = this.styles, Y = this.textStr, V = g.cache, Q = g.cacheKeys, k = m.namespaceURI === this.SVG_NS;
X = n(X, this.rotation, 0);
var G = g.styledMode ? m && j.prototype.getStyle.call(m, "font-size") : L && L.fontSize, z;
if (w(Y)) {
var $ = Y.toString();
$.indexOf("<") === -1 && ($ = $.replace(/[0-9]/g, "0")), $ += ["", X, G, this.textWidth, L && L.textOverflow, L && L.fontWeight].join();
}
if ($ && !T && (z = V[$]), !z) {
if (k || 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"), z = m.getBBox ? a({}, m.getBBox()) : { width: m.offsetWidth, height: m.offsetHeight }, i(q) && q("");
} catch {
}
(!z || 0 > z.width) && (z = {
width: 0,
height: 0
});
} else
z = this.htmlGetBBox();
if (g.isSVG && (T = z.width, g = z.height, k && (z.height = g = { "11px,17": 14, "13px,20": 16 }[(G || "") + "," + Math.round(g)] || g), X && (k = X * R, z.width = Math.abs(g * Math.sin(k)) + Math.abs(T * Math.cos(k)), z.height = Math.abs(g * Math.cos(k)) + Math.abs(T * Math.sin(k)))), $ && (Y === "" || 0 < z.height)) {
for (; 250 < Q.length; )
delete V[Q.shift()];
V[$] || Q.push($), V[$] = z;
}
}
return z;
}, j.prototype.getStyle = function(T) {
return P.getComputedStyle(this.element || this, "").getPropertyValue(T);
}, j.prototype.hasClass = function(T) {
return ("" + this.attr("class")).split(" ").indexOf(T) !== -1;
}, j.prototype.hide = function(T) {
return T ? this.attr({ y: -9999 }) : this.attr({ visibility: "hidden" }), this;
}, j.prototype.htmlGetBBox = function() {
return { height: 0, width: 0, x: 0, y: 0 };
}, j.prototype.init = function(T, X) {
this.element = X === "span" ? C(X) : S.createElementNS(this.SVG_NS, X), this.renderer = T, c(this, "afterInit");
}, j.prototype.invert = function(T) {
return this.inverted = T, this.updateTransform(), this;
}, j.prototype.on = function(T, X) {
var g = this.onEvents;
return g[T] && g[T](), g[T] = O(
this.element,
T,
X
), this;
}, j.prototype.opacitySetter = function(T, X, g) {
this.opacity = T = Number(Number(T).toFixed(3)), g.setAttribute(X, T);
}, j.prototype.removeClass = function(T) {
return this.attr("class", ("" + this.attr("class")).replace(s(T) ? new RegExp("(^| )" + T + "( |$)") : T, " ").replace(/ +/g, " ").trim());
}, j.prototype.removeTextOutline = function() {
var T = this.element.querySelector("tspan.highcharts-text-outline");
T && this.safeRemoveChild(T);
}, j.prototype.safeRemoveChild = function(T) {
var X = T.parentNode;
X && X.removeChild(T);
}, j.prototype.setRadialReference = function(T) {
var X = this.element.gradient && this.renderer.gradients[this.element.gradient];
return this.element.radialReference = T, X && X.radAttr && X.animate(this.renderer.getRadialAttr(T, X.radAttr)), this;
}, j.prototype.setTextPath = function(T, X) {
var g = this.element, m = this.text ? this.text.element : g, L = { textAnchor: "text-anchor" }, Y = !1, V = this.textPathWrapper, Q = !V;
X = t(!0, { enabled: !0, attributes: { dy: -5, startOffset: "50%", textAnchor: "middle" } }, X);
var k = B.filterUserAttributes(X.attributes);
if (T && X && X.enabled) {
V && V.element.parentNode === null ? (Q = !0, V = V.destroy()) : V && this.removeTextOutline.call(V.parentGroup), this.options && this.options.padding && (k.dx = -this.options.padding), V || (this.textPathWrapper = V = this.renderer.createElement("textPath"), Y = !0);
var G = V.element;
if ((X = T.element.getAttribute("id")) || T.element.setAttribute("id", X = D()), Q)
for (m.setAttribute("y", 0), l(k.dx) && m.setAttribute("x", -k.dx), T = [].slice.call(m.childNodes), Q = 0; Q < T.length; Q++) {
var z = T[Q];
z.nodeType !== P.Node.TEXT_NODE && z.nodeName !== "tspan" || G.appendChild(z);
}
Y && V && V.add({ element: m }), G.setAttributeNS("http://www.w3.org/1999/xlink", "href", this.renderer.url + "#" + X), w(k.dy) && (G.parentNode.setAttribute("dy", k.dy), delete k.dy), w(k.dx) && (G.parentNode.setAttribute("dx", k.dx), delete k.dx), o(k, function($, q) {
G.setAttribute(L[q] || q, $);
}), g.removeAttribute("transform"), this.removeTextOutline.call(V), this.text && !this.renderer.styledMode && this.attr({ fill: "none", "stroke-width": 0 }), this.applyTextOutline = this.updateTransform = x;
} else
V && (delete this.updateTransform, delete this.applyTextOutline, this.destroyTextPath(g, T), this.updateTransform(), this.options && this.options.rotation && this.applyTextOutline(this.options.style.textOutline));
return this;
}, j.prototype.shadow = function(T, X, g) {
var m = [], L = this.element, Y = this.oldShadowOptions, V = { color: "#000000", offsetX: this.parentInverted ? -1 : 1, offsetY: this.parentInverted ? -1 : 1, opacity: 0.15, width: 3 }, Q = !1, k;
if (T === !0 ? k = V : typeof T == "object" && (k = a(V, T)), k && (k && Y && o(k, function(it, et) {
it !== Y[et] && (Q = !0);
}), Q && this.destroyShadows(), this.oldShadowOptions = k), !k)
this.destroyShadows();
else if (!this.shadows) {
var G = k.opacity / k.width, z = this.parentInverted ? "translate(" + k.offsetY + ", " + k.offsetX + ")" : "translate(" + k.offsetX + ", " + k.offsetY + ")";
for (V = 1; V <= k.width; V++) {
var $ = L.cloneNode(!1), q = 2 * k.width + 1 - 2 * V;
N($, { stroke: T.color || "#000000", "stroke-opacity": G * V, "stroke-width": q, transform: z, fill: "none" }), $.setAttribute("class", ($.getAttribute("class") || "") + " highcharts-shadow"), g && (N($, "height", Math.max(N($, "height") - q, 0)), $.cutHeight = q), X ? X.element.appendChild($) : L.parentNode && L.parentNode.insertBefore($, L), m.push($);
}
this.shadows = m;
}
return this;
}, j.prototype.show = function(T) {
return this.attr({ visibility: T ? "inherit" : "visible" });
}, j.prototype.strokeSetter = function(T, X, g) {
this[X] = T, this.stroke && this["stroke-width"] ? (j.prototype.fillSetter.call(this, this.stroke, "stroke", g), g.setAttribute("stroke-width", this["stroke-width"]), this.hasStroke = !0) : X === "stroke-width" && T === 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);
}, j.prototype.strokeWidth = function() {
if (!this.renderer.styledMode)
return this["stroke-width"] || 0;
var T = this.getStyle("stroke-width"), X = 0;
if (T.indexOf("px") === T.length - 2)
X = A(T);
else if (T !== "") {
var g = S.createElementNS(u, "rect");
N(g, { width: T, "stroke-width": 0 }), this.element.parentNode.appendChild(g), X = g.getBBox().width, g.parentNode.removeChild(g);
}
return X;
}, j.prototype.symbolAttr = function(T) {
var X = this;
"x y r start end width height innerR anchorX anchorY clockwise".split(" ").forEach(function(g) {
X[g] = n(T[g], X[g]);
}), X.attr({ d: X.renderer.symbols[X.symbolName](X.x, X.y, X.width, X.height, X) });
}, j.prototype.textSetter = function(T) {
T !== this.textStr && (delete this.textPxLength, this.textStr = T, this.added && this.renderer.buildText(this));
}, j.prototype.titleSetter = function(T) {
var X = this.element, g = X.getElementsByTagName("title")[0] || S.createElementNS(this.SVG_NS, "title");
X.insertBefore ? X.insertBefore(g, X.firstChild) : X.appendChild(g), g.textContent = String(n(T, "")).replace(/<[^>]*>/g, "").replace(/</g, "<").replace(
/>/g,
">"
);
}, j.prototype.toFront = function() {
var T = this.element;
return T.parentNode.appendChild(T), this;
}, j.prototype.translate = function(T, X) {
return this.attr({ translateX: T, translateY: X });
}, j.prototype.updateShadows = function(T, X, g) {
var m = this.shadows;
if (m)
for (var L = m.length; L--; )
g.call(m[L], T === "height" ? Math.max(X - (m[L].cutHeight || 0), 0) : T === "d" ? this.d : X, T, m[L]);
}, j.prototype.updateTransform = function() {
var T = this.scaleX, X = this.scaleY, g = this.inverted, m = this.rotation, L = this.matrix, Y = this.element, V = this.translateX || 0, Q = this.translateY || 0;
g && (V += this.width, Q += this.height), V = ["translate(" + V + "," + Q + ")"], w(L) && V.push("matrix(" + L.join(",") + ")"), g ? V.push("rotate(90) scale(-1,1)") : m && V.push("rotate(" + m + " " + n(this.rotationOriginX, Y.getAttribute("x"), 0) + " " + n(this.rotationOriginY, Y.getAttribute("y") || 0) + ")"), (w(T) || w(X)) && V.push("scale(" + n(T, 1) + " " + n(X, 1) + ")"), V.length && Y.setAttribute("transform", V.join(" "));
}, j.prototype.visibilitySetter = function(T, X, g) {
T === "inherit" ? g.removeAttribute(X) : this[X] !== T && g.setAttribute(
X,
T
), this[X] = T;
}, j.prototype.xGetter = function(T) {
return this.element.nodeName === "circle" && (T === "x" ? T = "cx" : T === "y" && (T = "cy")), this._defaultGetter(T);
}, j.prototype.zIndexSetter = function(T, X) {
var g = this.renderer, m = this.parentGroup, L = (m || g).element || g.box, Y = this.element;
g = L === g.box;
var V = !1, Q = this.added, k;
if (w(T) ? (Y.setAttribute("data-z-index", T), T = +T, this[X] === T && (Q = !1)) : w(this[X]) && Y.removeAttribute("data-z-index"), this[X] = T, Q) {
for ((T = this.zIndex) && m && (m.handleZ = !0), X = L.childNodes, k = X.length - 1; 0 <= k && !V; k--) {
m = X[k], Q = m.getAttribute("data-z-index");
var G = !w(Q);
m !== Y && (0 > T && G && !g && !k ? (L.insertBefore(Y, X[k]), V = !0) : (A(Q) <= T || G && (!w(T) || 0 <= T)) && (L.insertBefore(Y, X[k + 1] || null), V = !0));
}
V || (L.insertBefore(Y, X[g ? 3 : 0] || null), V = !0);
}
return V;
}, j;
}(), 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(j, T) {
this[T] = j, this.doTransform = !0;
}, y;
}), E(h, "Core/Renderer/RendererRegistry.js", [h["Core/Globals.js"]], function(y) {
var B;
return function(I) {
I.rendererTypes = {};
var Z;
I.getRendererType = function(F) {
return F === void 0 && (F = Z), I.rendererTypes[F] || I.rendererTypes[Z];
}, I.registerRendererType = function(F, U, H) {
I.rendererTypes[F] = U, (!Z || H) && (Z = F, y.Renderer = U);
};
}(B || (B = {})), B;
}), E(
h,
"Core/Renderer/SVG/SVGLabel.js",
[h["Core/Renderer/SVG/SVGElement.js"], h["Core/Utilities.js"]],
function(y, B) {
var I = this && this.__extends || function() {
var S = function(x, d) {
return S = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(u, P) {
u.__proto__ = P;
} || function(u, P) {
for (var O in P)
P.hasOwnProperty(O) && (u[O] = P[O]);
}, S(x, d);
};
return function(x, d) {
function u() {
this.constructor = x;
}
S(x, d), x.prototype = d === null ? Object.create(d) : (u.prototype = d.prototype, new u());
};
}(), Z = B.defined, F = B.extend, U = B.isNumber, H = B.merge, W = B.pick, R = B.removeEvent;
return function(S) {
function x(d, u, P, O, N, C, b, w, v, a) {
var c = S.call(this) || this;
c.paddingLeftSetter = c.paddingSetter, c.paddingRightSetter = c.paddingSetter, c.init(d, "g"), c.textStr = u, c.x = P, c.y = O, c.anchorX = C, c.anchorY = b, c.baseline = v, c.className = a, c.addClass(a === "button" ? "highcharts-no-tooltip" : "highcharts-label"), a && c.addClass("highcharts-" + a), c.text = d.text(void 0, 0, 0, w).attr({ zIndex: 1 });
var p;
return typeof N == "string" && ((p = /^url\((.*?)\)$/.test(N)) || c.renderer.symbols[N]) && (c.symbolKey = N), c.bBox = x.emptyBBox, c.padding = 3, c.baselineOffset = 0, c.needsBox = d.styledMode || p, c.deferredAttr = {}, c.alignFactor = 0, c;
}
return I(x, S), x.prototype.alignSetter = function(d) {
d = { left: 0, center: 0.5, right: 1 }[d], d !== this.alignFactor && (this.alignFactor = d, this.bBox && U(this.xSetting) && this.attr({ x: this.xSetting }));
}, x.prototype.anchorXSetter = function(d, u) {
this.anchorX = d, this.boxAttr(u, Math.round(d) - this.getCrispAdjust() - this.xSetting);
}, x.prototype.anchorYSetter = function(d, u) {
this.anchorY = d, this.boxAttr(u, d - this.ySetting);
}, x.prototype.boxAttr = function(d, u) {
this.box ? this.box.attr(d, u) : this.deferredAttr[d] = u;
}, x.prototype.css = function(d) {
if (d) {
var u = {};
d = H(d), x.textProps.forEach(function(O) {
typeof d[O] < "u" && (u[O] = d[O], delete d[O]);
}), this.text.css(u);
var P = "width" in u;
"fontSize" in u || "fontWeight" in u ? this.updateTextPadding() : P && this.updateBoxSize();
}
return y.prototype.css.call(this, d);
}, x.prototype.destroy = function() {
R(this.element, "mouseenter"), R(this.element, "mouseleave"), this.text && this.text.destroy(), this.box && (this.box = this.box.destroy()), y.prototype.destroy.call(this);
}, x.prototype.fillSetter = function(d, u) {
d && (this.needsBox = !0), this.fill = d, this.boxAttr(u, d);
}, x.prototype.getBBox = function() {
this.textStr && this.bBox.width === 0 && this.bBox.height === 0 && this.updateBoxSize();
var d = this.padding, u = W(this.paddingLeft, d);
return { width: this.width, height: this.height, x: this.bBox.x - u, y: this.bBox.y - d };
}, 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(d) {
this.heightSetting = d;
}, x.prototype.onAdd = function() {
var d = this.textStr;
this.text.add(this), this.attr({ text: Z(d) ? d : "", x: this.x, y: this.y }), this.box && Z(this.anchorX) && this.attr({ anchorX: this.anchorX, anchorY: this.anchorY });
}, x.prototype.paddingSetter = function(d, u) {
U(d) ? d !== this[u] && (this[u] = d, this.updateTextPadding()) : this[u] = void 0;
}, x.prototype.rSetter = function(d, u) {
this.boxAttr(u, d);
}, x.prototype.shadow = function(d) {
return d && !this.renderer.styledMode && (this.updateBoxSize(), this.box && this.box.shadow(d)), this;
}, x.prototype.strokeSetter = function(d, u) {
this.stroke = d, this.boxAttr(u, d);
}, x.prototype["stroke-widthSetter"] = function(d, u) {
d && (this.needsBox = !0), this["stroke-width"] = d, this.boxAttr(u, d);
}, x.prototype["text-alignSetter"] = function(d) {
this.textAlign = d;
}, x.prototype.textSetter = function(d) {
typeof d < "u" && this.text.attr({ text: d }), this.updateTextPadding();
}, x.prototype.updateBoxSize = function() {
var d = this.text.element.style, u = {}, P = this.padding, O = this.bBox = U(this.widthSetting) && U(this.heightSetting) && !this.textAlign || !Z(this.text.textStr) ? x.emptyBBox : this.text.getBBox();
this.width = this.getPaddedWidth(), this.height = (this.heightSetting || O.height || 0) + 2 * P, d = this.renderer.fontMetrics(d && d.fontSize, this.text), this.baselineOffset = P + Math.min((this.text.firstLineMetrics || d).b, O.height || 1 / 0), this.heightSetting && (this.baselineOffset += (this.heightSetting - d.h) / 2), this.needsBox && (this.box || (P = this.box = this.symbolKey ? this.renderer.symbol(this.symbolKey) : this.renderer.rect(), P.addClass((this.className === "button" ? "" : "highcharts-label-box") + (this.className ? " highcharts-" + this.className + "-box" : "")), P.add(this)), P = this.getCrispAdjust(), u.x = P, u.y = (this.baseline ? -this.baselineOffset : 0) + P, u.width = Math.round(this.width), u.height = Math.round(this.height), this.box.attr(F(u, this.deferredAttr)), this.deferredAttr = {});
}, x.prototype.updateTextPadding = function() {
var d = this.text;
this.updateBoxSize();
var u = this.baseline ? 0 : this.baselineOffset, P = W(this.paddingLeft, this.padding);
Z(this.widthSetting) && this.bBox && (this.textAlign === "center" || this.textAlign === "right") && (P += { center: 0.5, right: 1 }[this.textAlign] * (this.widthSetting - this.bBox.width)), (P !== d.x || u !== d.y) && (d.attr("x", P), d.hasBoxWidthChanged && (this.bBox = d.getBBox(!0)), typeof u < "u" && d.attr("y", u)), d.x = P, d.y = u;
}, x.prototype.widthSetter = function(d) {
this.widthSetting = U(d) ? d : void 0;
}, x.prototype.getPaddedWidth = function() {
var d = this.padding, u = W(this.paddingLeft, d);
return d = W(this.paddingRight, d), (this.widthSetting || this.bBox.width || 0) + u + d;
}, x.prototype.xSetter = function(d) {
this.x = d, this.alignFactor && (d -= this.alignFactor * this.getPaddedWidth(), this["forceAnimate:x"] = !0), this.xSetting = Math.round(d), this.attr("translateX", this.xSetting);
}, x.prototype.ySetter = function(d) {
this.ySetting = this.y = Math.round(d), 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);
}
), E(
h,
"Core/Renderer/SVG/Symbols.js",
[h["Core/Utilities.js"]],
function(y) {
function B(W, R, S, x, d) {
var u = [];
if (d) {
var P = d.start || 0, O = H(d.r, S);
S = H(d.r, x || S);
var N = (d.end || 0) - 1e-3;
x = d.innerR;
var C = H(d.open, 1e-3 > Math.abs((d.end || 0) - P - 2 * Math.PI)), b = Math.cos(P), w = Math.sin(P), v = Math.cos(N), a = Math.sin(N);
P = H(d.longArc, 1e-3 > N - P - Math.PI ? 0 : 1), u.push(["M", W + O * b, R + S * w], ["A", O, S, 0, P, H(d.clockwise, 1), W + O * v, R + S * a]), F(x) && u.push(C ? ["M", W + x * v, R + x * a] : ["L", W + x * v, R + x * a], ["A", x, x, 0, P, F(d.clockwise) ? 1 - d.clockwise : 0, W + x * b, R + x * w]), C || u.push(["Z"]);
}
return u;
}
function I(W, R, S, x, d) {
return d && d.r ? Z(W, R, S, x, d) : [["M", W, R], ["L", W + S, R], ["L", W + S, R + x], ["L", W, R + x], ["Z"]];
}
function Z(W, R, S, x, d) {
return d = d && d.r || 0, [["M", W + d, R], ["L", W + S - d, R], ["C", W + S, R, W + S, R, W + S, R + d], ["L", W + S, R + x - d], ["C", W + S, R + x, W + S, R + x, W + S - d, R + x], ["L", W + d, R + x], ["C", W, R + x, W, R + x, W, R + x - d], ["L", W, R + d], ["C", W, R, W, R, W + d, R]];
}
var F = y.defined, U = y.isNumber, H = y.pick;
return { arc: B, callout: function(W, R, S, x, d) {
var u = Math.min(d && d.r || 0, S, x), P = u + 6, O = d && d.anchorX;
d = d && d.anchorY || 0;
var N = Z(W, R, S, x, { r: u });
return U(O) && (W + O >= S ? d > R + P && d < R + x - P ? N.splice(3, 1, ["L", W + S, d - 6], ["L", W + S + 6, d], ["L", W + S, d + 6], ["L", W + S, R + x - u]) : N.splice(3, 1, ["L", W + S, x / 2], ["L", O, d], ["L", W + S, x / 2], ["L", W + S, R + x - u]) : 0 >= W + O ? d > R + P && d < R + x - P ? N.splice(7, 1, ["L", W, d + 6], ["L", W - 6, d], ["L", W, d - 6], ["L", W, R + u]) : N.splice(7, 1, ["L", W, x / 2], ["L", O, d], ["L", W, x / 2], ["L", W, R + u]) : d && d > x && O > W + P && O < W + S - P ? N.splice(5, 1, ["L", O + 6, R + x], ["L", O, R + x + 6], ["L", O - 6, R + x], ["L", W + u, R + x]) : d && 0 > d && O > W + P && O < W + S - P && N.splice(1, 1, ["L", O - 6, R], ["L", O, R - 6], ["L", O + 6, R], ["L", S - u, R])), N;
}, circle: function(W, R, S, x) {
return B(W + S / 2, R + x / 2, S / 2, x / 2, { start: 0.5 * Math.PI, end: 2.5 * Math.PI, open: !1 });
}, diamond: function(W, R, S, x) {
return [["M", W + S / 2, R], ["L", W + S, R + x / 2], ["L", W + S / 2, R + x], ["L", W, R + x / 2], ["Z"]];
}, rect: I, roundedRect: Z, square: I, triangle: function(W, R, S, x) {
return [["M", W + S / 2, R], ["L", W + S, R + x], ["L", W, R + x], ["Z"]];
}, "triangle-down": function(W, R, S, x) {
return [["M", W, R], ["L", W + S, R], ["L", W + S / 2, R + x], ["Z"]];
} };
}
), E(h, "Core/Renderer/SVG/TextBuilder.js", [h["Core/Renderer/HTML/AST.js"], h["Core/Globals.js"], h["Core/Utilities.js"]], function(y, B, I) {
var Z = B.doc, F = B.SVG_NS, U = B.win, H = I.attr, W = I.isString, R = I.objectEach, S = I.pick;
return function() {
function x(d) {
var u = d.styles;
this.renderer = d.renderer, this.svgElement = d, this.width = d.textWidth, this.textLineHeight = u && u.lineHeight, this.textOutline = u && u.textOutline, this.ellipsis = !(!u || u.textOverflow !== "ellipsis"), this.noWrap = !(!u || u.whiteSpace !== "nowrap"), this.fontSize = u && u.fontSize;
}
return x.prototype.buildSVG = function() {
var d = this.svgElement, u = d.element, P = d.renderer, O = S(d.textStr, "").toString(), N = O.indexOf("<") !== -1, C = u.childNodes;
P = this.width && !d.added && P.box;
var b = //g, w = [O, this.ellipsis, this.noWrap, this.textLineHeight, this.textOutline, this.fontSize, this.width].join();
if (w !== d.textCache) {
for (d.textCache = w, delete d.actualWidth, w = C.length; w--; )
u.removeChild(C[w]);
N || this.ellipsis || this.width || O.indexOf(" ") !== -1 && (!this.noWrap || b.test(O)) ? O !== "" && (P && P.appendChild(u), O = new y(O), this.modifyTree(O.nodes), O.addToDOM(d.element), this.modifyDOM(), this.ellipsis && (u.textContent || "").indexOf("…") !== -1 && d.attr(
"title",
this.unescapeEntities(d.textStr || "", ["<", ">"])
), P && P.removeChild(u)) : u.appendChild(Z.createTextNode(this.unescapeEntities(O))), W(this.textOutline) && d.applyTextOutline && d.applyTextOutline(this.textOutline);
}
}, x.prototype.modifyDOM = function() {
var d = this, u = this.svgElement, P = H(u.element, "x");
u.firstLineMetrics = void 0;
for (var O; (O = u.element.firstChild) && /^[\s\u200B]*$/.test(O.textContent || " "); )
u.element.removeChild(O);
[].forEach.call(u.element.querySelectorAll("tspan.highcharts-br"), function(w, v) {
w.nextSibling && w.previousSibling && (v === 0 && w.previousSibling.nodeType === 1 && (u.firstLineMetrics = u.renderer.fontMetrics(void 0, w.previousSibling)), H(w, { dy: d.getLineHeight(w.nextSibling), x: P }));
});
var N = this.width || 0;
if (N) {
var C = function(w, v) {
var a = w.textContent || "", c = a.replace(/([^\^])-/g, "$1- ").split(" "), p = !d.noWrap && (1 < c.length || 1 < u.element.childNodes.length), i = d.getLineHeight(v), l = 0, s = u.actualWidth;
if (d.ellipsis)
a && d.truncate(w, a, void 0, 0, Math.max(0, N - parseInt(d.fontSize || 12, 10)), function(t, o) {
return t.substring(
0,
o
) + "…";
});
else if (p) {
for (a = [], p = []; v.firstChild && v.firstChild !== w; )
p.push(v.firstChild), v.removeChild(v.firstChild);
for (; c.length; )
c.length && !d.noWrap && 0 < l && (a.push(w.textContent || ""), w.textContent = c.join(" ").replace(/- /g, "-")), d.truncate(w, void 0, c, l === 0 && s || 0, N, function(t, o) {
return c.slice(0, o).join(" ").replace(/- /g, "-");
}), s = u.actualWidth, l++;
p.forEach(function(t) {
v.insertBefore(t, w);
}), a.forEach(function(t) {
v.insertBefore(Z.createTextNode(t), w), t = Z.createElementNS(F, "tspan"), t.textContent = "", H(t, { dy: i, x: P }), v.insertBefore(t, w);
});
}
}, b = function(w) {
[].slice.call(w.childNodes).forEach(function(v) {
v.nodeType === U.Node.TEXT_NODE ? C(v, w) : (v.className.baseVal.indexOf("highcharts-br") !== -1 && (u.actualWidth = 0), b(v));
});
};
b(u.element);
}
}, x.prototype.getLineHeight = function(d) {
var u;
return d = d.nodeType === U.Node.TEXT_NODE ? d.parentElement : d, this.renderer.styledMode || (u = d && /(px|em)$/.test(d.style.fontSize) ? d.style.fontSize : this.fontSize || this.renderer.style.fontSize || 12), this.textLineHeight ? parseInt(
this.textLineHeight.toString(),
10
) : this.renderer.fontMetrics(u, d || this.svgElement.element).h;
}, x.prototype.modifyTree = function(d) {
var u = this, P = function(O, N) {
var C = O.attributes;
C = C === void 0 ? {} : C;
var b = O.children, w = O.tagName, v = u.renderer.styledMode;
w === "b" || w === "strong" ? v ? C.class = "highcharts-strong" : C.style = "font-weight:bold;" + (C.style || "") : (w === "i" || w === "em") && (v ? C.class = "highcharts-emphasized" : C.style = "font-style:italic;" + (C.style || "")), W(C.style) && (C.style = C.style.replace(/(;| |^)color([ :])/, "$1fill$2")), w === "br" ? (C.class = "highcharts-br", O.textContent = "", (N = d[N + 1]) && N.textContent && (N.textContent = N.textContent.replace(/^ +/gm, ""))) : w === "a" && b && b.some(function(a) {
return a.tagName === "#text";
}) && (O.children = [{ children: b, tagName: "tspan" }]), w !== "#text" && w !== "a" && (O.tagName = "tspan"), O.attributes = C, b && b.filter(function(a) {
return a.tagName !== "#text";
}).forEach(P);
};
d.forEach(P);
}, x.prototype.truncate = function(d, u, P, O, N, C) {
var b = this.svgElement, w = b.renderer, v = b.rotation, a = [], c = P ? 1 : 0, p = (u || P || "").length, i = p, l, s = function(o, n) {
n = n || o;
var A = d.parentNode;
if (A && typeof a[n] > "u")
if (A.getSubStringLength)
try {
a[n] = O + A.getSubStringLength(0, P ? n + 1 : n);
} catch {
}
else
w.getSpanWidth && (d.textContent = C(u || P, o), a[n] = O + w.getSpanWidth(b, d));
return a[n];
};
b.rotation = 0;
var t = s(d.textContent.length);
if (O + t > N) {
for (; c <= p; )
i = Math.ceil((c + p) / 2), P && (l = C(P, i)), t = s(i, l && l.length - 1), c === p ? c = p + 1 : t > N ? p = i - 1 : c = i;
p === 0 ? d.textContent = "" : u && p === u.length - 1 || (d.textContent = l || C(u || P, i));
}
P && P.splice(0, i), b.actualWidth = t, b.rotation = v;
}, x.prototype.unescapeEntities = function(d, u) {
return R(this.renderer.escapes, function(P, O) {
u && u.indexOf(P) !== -1 || (d = d.toString().replace(new RegExp(P, "g"), O));
}), d;
}, x;
}();
}), E(h, "Core/Renderer/SVG/SVGRenderer.js", [h["Core/Renderer/HTML/AST.js"], h["Core/Color/Color.js"], h["Core/Globals.js"], h["Core/Renderer/RendererRegistry.js"], h["Core/Renderer/SVG/SVGElement.js"], h["Core/Renderer/SVG/SVGLabel.js"], h["Core/Renderer/SVG/Symbols.js"], h["Core/Renderer/SVG/TextBuilder.js"], h["Core/Utilities.js"]], function(y, B, I, Z, F, U, H, W, R) {
var S = I.charts, x = I.deg2rad, d = I.doc, u = I.isFirefox, P = I.isMS, O = I.isWebKit, N = I.noop, C = I.SVG_NS, b = I.symbolSizes, w = I.win, v = R.addEvent, a = R.attr, c = R.createElement, p = R.css, i = R.defined, l = R.destroyObjectProperties, s = R.extend, t = R.isArray, o = R.isNumber, n = R.isObject, A = R.isString, _ = R.merge, D = R.pick, j = R.pInt, T = R.uniqueKey, X;
return I = function() {
function g(m, L, Y, V, Q, k, G) {
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, Y, V, Q, k, G);
}
return g.prototype.init = function(m, L, Y, V, Q, k, G) {
var z = this.createElement("svg").attr({ version: "1.1", class: "highcharts-root" }), $ = z.element;
G || z.css(this.getStyle(V)), m.appendChild($), a(m, "dir", "ltr"), m.innerHTML.indexOf("xmlns") === -1 && a($, "xmlns", this.SVG_NS), this.isSVG = !0, this.box = $, this.boxWrapper = z, this.alignedObjects = [], this.url = this.getReferenceURL(), this.createElement("desc").add().element.appendChild(d.createTextNode("Created with Highcharts 9.3.3")), this.defs = this.createElement("defs").add(), this.allowHTML = k, this.forExport = Q, this.styledMode = G, this.gradients = {}, this.cache = {}, this.cacheKeys = [], this.imgCount = 0, this.setSize(L, Y, !1);
var q;
u && m.getBoundingClientRect && (L = function() {
p(m, { left: 0, top: 0 }), q = m.getBoundingClientRect(), p(m, { left: Math.ceil(q.left) - q.left + "px", top: Math.ceil(q.top) - q.top + "px" });
}, L(), this.unSubPixelFix = v(w, "resize", L));
}, g.prototype.definition = function(m) {
return new y([m]).addToDOM(this.defs.element);
}, g.prototype.getReferenceURL = function() {
if ((u || O) && d.getElementsByTagName("base").length) {
if (!i(X)) {
var m = T();
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(d.body), p(m, { position: "fixed", top: 0, left: 0, zIndex: 9e5 });
var L = d.elementFromPoint(6, 6);
X = (L && L.id) === "hitme", d.body.removeChild(m);
}
if (X)
return w.location.href.split("#")[0].replace(/<[^>]*>/g, "").replace(/([\('\)])/g, "\\$1").replace(/ /g, "%20");
}
return "";
}, g.prototype.getStyle = function(m) {
return this.style = s({ 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(), l(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 W(m).buildSVG();
}, g.prototype.getContrast = function(m) {
return m = B.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, Y, V, Q, k, G, z, $, q) {
var it = this.label(m, L, Y, $, void 0, void 0, q, void 0, "button"), et = this.styledMode, nt = 0, rt = Q ? _(Q) : {};
if (m = rt && rt.style || {}, rt = y.filterUserAttributes(rt), it.attr(_({ padding: 8, r: 2 }, rt)), !et) {
rt = _({ fill: "#f7f7f7", stroke: "#cccccc", "stroke-width": 1, style: { color: "#333333", cursor: "pointer", fontWeight: "normal" } }, { style: m }, rt);
var ct = rt.style;
delete rt.style, k = _(rt, { fill: "#e6e6e6" }, y.filterUserAttributes(k || {}));
var gt = k.style;
delete k.style, G = _(rt, { fill: "#e6ebf5", style: { color: "#000000", fontWeight: "bold" } }, y.filterUserAttributes(G || {}));
var dt = G.style;
delete G.style, z = _(rt, { style: { color: "#cccccc" } }, y.filterUserAttributes(z || {}));
var lt = z.style;
delete z.style;
}
return v(it.element, P ? "mouseover" : "mouseenter", function() {
nt !== 3 && it.setState(1);
}), v(it.element, P ? "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, k, G, z][at || 0]).css([ct, gt, dt, lt][at || 0]);
}, et || it.attr(rt).css(s({ cursor: "default" }, ct)), it.on("touchstart", function(at) {
return at.stopPropagation();
}).on("click", function(at) {
nt !== 3 && V.call(it, at);
});
}, g.prototype.crispLine = function(m, L, Y) {
Y === void 0 && (Y = "round");
var V = m[0], Q = m[1];
return i(V[1]) && V[1] === Q[1] && (V[1] = Q[1] = Math[Y](V[1]) - L % 2 / 2), i(V[2]) && V[2] === Q[2] && (V[2] = Q[2] = Math[Y](V[2]) + L % 2 / 2), m;
}, g.prototype.path = function(m) {
var L = this.styledMode ? {} : { fill: "none" };
return t(m) ? L.d = m : n(m) && s(L, m), this.createElement("path").attr(L);
}, g.prototype.circle = function(m, L, Y) {
return m = n(m) ? m : typeof m > "u" ? {} : { x: m, y: L, r: Y }, L = this.createElement("circle"), L.xSetter = L.ySetter = function(V, Q, k) {
k.setAttribute("c" + Q, V);
}, L.attr(m);
}, g.prototype.arc = function(m, L, Y, V, Q, k) {
return n(m) ? (V = m, L = V.y, Y = V.r, m = V.x) : V = { innerR: V, start: Q, end: k }, m = this.symbol("arc", m, L, Y, Y, V), m.r = Y, m;
}, g.prototype.rect = function(m, L, Y, V, Q, k) {
Q = n(m) ? m.r : Q;
var G = this.createElement("rect");
return m = n(m) ? m : typeof m > "u" ? {} : { x: m, y: L, width: Math.max(Y, 0), height: Math.max(V, 0) }, this.styledMode || (typeof k < "u" && (m["stroke-width"] = k, m = G.crisp(m)), m.fill = "none"), Q && (m.r = Q), G.rSetter = function(z, $, q) {
G.r = z, a(q, { rx: z, ry: z });
}, G.rGetter = function() {
return G.r || 0;
}, G.attr(m);
}, g.prototype.setSize = function(m, L, Y) {
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: D(
Y,
!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, Y, V, Q, k) {
var G = { preserveAspectRatio: "none" }, z = function(q, it) {
q.setAttributeNS ? q.setAttributeNS("http://www.w3.org/1999/xlink", "href", it) : q.setAttribute("hc-svg-href", it);
};
o(L) && (G.x = L), o(Y) && (G.y = Y), o(V) && (G.width = V), o(Q) && (G.height = Q);
var $ = this.createElement("image").attr(G);
return L = function(q) {
z($.element, m), k.call($, q);
}, k ? (z(
$.element,
"data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw=="
), Y = new w.Image(), v(Y, "load", L), Y.src = m, Y.complete && L({})) : z($.element, m), $;
}, g.prototype.symbol = function(m, L, Y, V, Q, k) {
var G = this, z = /^url\((.*?)\)$/, $ = z.test(m), q = !$ && (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(Y || 0), V || 0, Q || 0, k));
var nt = this.path(et);
G.styledMode || nt.attr("fill", "none"), s(nt, { symbolName: q || void 0, x: L, y: Y, width: V, height: Q }), k && s(nt, k);
} else if ($) {
var rt = m.match(z)[1], ct = nt = this.image(rt);
ct.imgwidth = D(b[rt] && b[rt].width, k && k.width), ct.imgheight = D(b[rt] && b[rt].height, k && k.height);
var gt = function(dt) {
return dt.attr({ width: dt.width, height: dt.height });
};
["width", "height"].forEach(function(dt) {
ct[dt + "Setter"] = function(lt, at) {
var J = this["img" + at];
this[at] = lt, i(J) && (k && k.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 || (lt = ((this[at] || 0) - J) / 2, this.attr(at === "width" ? { translateX: lt } : { translateY: lt })));
};
}), i(L) && ct.attr({ x: L, y: Y }), ct.isImg = !0, i(ct.imgwidth) && i(ct.imgheight) ? gt(ct) : (ct.attr({ width: 0, height: 0 }), c("img", { onload: function() {
var dt = S[G.chartIndex];
this.width === 0 && (p(this, { position: "absolute", top: "-999em" }), d.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), G.imgCount--, !G.imgCount && dt && !dt.hasLoaded && dt.onload();
}, src: rt }), this.imgCount++);
}
return nt;
}, g.prototype.clipRect = function(m, L, Y, V) {
var Q = T() + "-", k = this.createElement("clipPath").attr({ id: Q }).add(this.defs);
return m = this.rect(m, L, Y, V, 0).add(k), m.id = Q, m.clipPath = k, m.count = 0, m;
}, g.prototype.text = function(m, L, Y, V) {
var Q = {};
return V && (this.allowHTML || !this.forExport) ? this.html(m, L, Y) : (Q.x = Math.round(L || 0), Y && (Q.y = Math.round(Y)), i(m) && (Q.text = m), m = this.createElement("text").attr(Q), (!V || this.forExport && !this.allowHTML) && (m.xSetter = function(k, G, z) {
for (var $ = z.getElementsByTagName("tspan"), q = z.getAttribute(G), it = 0, et; it < $.length; it++)
et = $[it], et.getAttribute(G) === q && et.setAttribute(G, k);
z.setAttribute(G, k);
}), m);
}, g.prototype.fontMetrics = function(m, L) {
return m = !this.styledMode && /px/.test(m) || !w.getComputedStyle ? m || L && L.style && L.style.fontSize || this.style && this.style.fontSize : L && F.prototype.getStyle.call(L, "font-size"), m = /px/.test(m) ? j(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, Y) {
var V = m;
return L && Y && (V = Math.max(V * Math.cos(L * x), 4)), { x: -m / 3 * Math.sin(L * x), y: V };
}, g.prototype.pathToSegments = function(m) {
for (var L = [], Y = [], V = { A: 8, C: 7, H: 2, L: 3, M: 3, Q: 5, S: 5, T: 3, V: 2 }, Q = 0; Q < m.length; Q++)
A(Y[0]) && o(m[Q]) && Y.length === V[Y[0].toUpperCase()] && m.splice(Q, 0, Y[0].replace("M", "L").replace("m", "l")), typeof m[Q] == "string" && (Y.length && L.push(Y.slice(0)), Y.length = 0), Y.push(m[Q]);
return L.push(Y.slice(0)), L;
}, g.prototype.label = function(m, L, Y, V, Q, k, G, z, $) {
return new U(this, m, L, Y, V, Q, k, G, z, $);
}, g.prototype.alignElements = function() {
this.alignedObjects.forEach(function(m) {
return m.align();
});
}, g;
}(), s(I.prototype, { Element: F, SVG_NS: C, escapes: { "&": "&", "<": "<", ">": ">", "'": "'", '"': """ }, symbols: H, draw: N }), Z.registerRendererType("svg", I, !0), I;
}), E(h, "Core/Renderer/HTML/HTMLElement.js", [h["Core/Globals.js"], h["Core/Renderer/SVG/SVGElement.js"], h["Core/Utilities.js"]], function(y, B, I) {
var Z = this && this.__extends || function() {
var P = function(O, N) {
return P = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(C, b) {
C.__proto__ = b;
} || function(C, b) {
for (var w in b)
b.hasOwnProperty(w) && (C[w] = b[w]);
}, P(O, N);
};
return function(O, N) {
function C() {
this.constructor = O;
}
P(O, N), O.prototype = N === null ? Object.create(N) : (C.prototype = N.prototype, new C());
};
}(), F = y.isFirefox, U = y.isMS, H = y.isWebKit, W = y.win, R = I.css, S = I.defined, x = I.extend, d = I.pick, u = I.pInt;
return function(P) {
function O() {
return P !== null && P.apply(this, arguments) || this;
}
return Z(O, P), O.compose = function(N) {
if (O.composedClasses.indexOf(N) === -1) {
O.composedClasses.push(N);
var C = O.prototype, b = N.prototype;
b.getSpanCorrection = C.getSpanCorrection, b.htmlCss = C.htmlCss, b.htmlGetBBox = C.htmlGetBBox, b.htmlUpdateTransform = C.htmlUpdateTransform, b.setSpanRotation = C.setSpanRotation;
}
return N;
}, O.prototype.getSpanCorrection = function(N, C, b) {
this.xCorr = -N * b, this.yCorr = -C;
}, O.prototype.htmlCss = function(N) {
var C = this.element.tagName === "SPAN" && N && "width" in N, b = d(C && N.width, void 0);
if (C) {
delete N.width, this.textWidth = b;
var w = !0;
}
return N && N.textOverflow === "ellipsis" && (N.whiteSpace = "nowrap", N.overflow = "hidden"), this.styles = x(this.styles, N), R(this.element, N), w && this.htmlUpdateTransform(), this;
}, O.prototype.htmlGetBBox = function() {
var N = this.element;
return { x: N.offsetLeft, y: N.offsetTop, width: N.offsetWidth, height: N.offsetHeight };
}, O.prototype.htmlUpdateTransform = function() {
if (this.added) {
var N = this.renderer, C = this.element, b = this.translateX || 0, w = this.translateY || 0, v = this.x || 0, a = this.y || 0, c = this.textAlign || "left", p = { left: 0, center: 0.5, right: 1 }[c], i = this.styles;
if (i = i && i.whiteSpace, R(C, { marginLeft: b, marginTop: w }), !N.styledMode && this.shadows && this.shadows.forEach(function(A) {
R(A, { marginLeft: b + 1, marginTop: w + 1 });
}), this.inverted && [].forEach.call(C.childNodes, function(A) {
N.invertChild(A, C);
}), C.tagName === "SPAN") {
var l = this.rotation, s = this.textWidth && u(this.textWidth), t = [l, c, C.innerHTML, this.textWidth, this.textAlign].join(), o = void 0;
if (o = !1, s !== this.oldTextWidth) {
if (this.textPxLength)
var n = this.textPxLength;
else
R(C, { width: "", whiteSpace: i || "nowrap" }), n = C.offsetWidth;
(s > this.oldTextWidth || n > s) && (/[ \-]/.test(C.textContent || C.innerText) || C.style.textOverflow === "ellipsis") && (R(C, { width: n > s || l ? s + "px" : "auto", display: "block", whiteSpace: i || "normal" }), this.oldTextWidth = s, o = !0);
}
this.hasBoxWidthChanged = o, t !== this.cTT && (o = N.fontMetrics(C.style.fontSize, C).b, !S(l) || l === (this.oldRotation || 0) && c === this.oldAlign || this.setSpanRotation(l, p, o), this.getSpanCorrection(!S(l) && this.textPxLength || C.offsetWidth, o, p, l, c)), R(C, { left: v + (this.xCorr || 0) + "px", top: a + (this.yCorr || 0) + "px" }), this.cTT = t, this.oldRotation = l, this.oldAlign = c;
}
} else
this.alignOnAdd = !0;
}, O.prototype.setSpanRotation = function(N, C, b) {
var w = {}, v = U && !/Edge/.test(W.navigator.userAgent) ? "-ms-transform" : H ? "-webkit-transform" : F ? "MozTransform" : W.opera ? "-o-transform" : void 0;
v && (w[v] = w.transform = "rotate(" + N + "deg)", w[v + (F ? "Origin" : "-origin")] = w.transformOrigin = 100 * C + "% " + b + "px", R(this.element, w));
}, O.composedClasses = [], O;
}(B);
}), E(
h,
"Core/Renderer/HTML/HTMLRenderer.js",
[h["Core/Renderer/HTML/AST.js"], h["Core/Renderer/SVG/SVGElement.js"], h["Core/Renderer/SVG/SVGRenderer.js"], h["Core/Utilities.js"]],
function(y, B, I, Z) {
var F = this && this.__extends || function() {
var S = function(x, d) {
return S = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(u, P) {
u.__proto__ = P;
} || function(u, P) {
for (var O in P)
P.hasOwnProperty(O) && (u[O] = P[O]);
}, S(x, d);
};
return function(x, d) {
function u() {
this.constructor = x;
}
S(x, d), x.prototype = d === null ? Object.create(d) : (u.prototype = d.prototype, new u());
};
}(), U = Z.attr, H = Z.createElement, W = Z.extend, R = Z.pick;
return function(S) {
function x() {
return S !== null && S.apply(this, arguments) || this;
}
return F(x, S), x.compose = function(d) {
return x.composedClasses.indexOf(d) === -1 && (x.composedClasses.push(d), d.prototype.html = x.prototype.html), d;
}, x.prototype.html = function(d, u, P) {
var O = this.createElement("span"), N = O.element, C = O.renderer, b = C.isSVG, w = function(v, a) {
["opacity", "visibility"].forEach(function(c) {
v[c + "Setter"] = function(p, i, l) {
var s = v.div ? v.div.style : a;
B.prototype[c + "Setter"].call(this, p, i, l), s && (s[i] = p);
};
}), v.addedSetters = !0;
};
return O.textSetter = function(v) {
v !== this.textStr && (delete this.bBox, delete this.oldTextWidth, y.setElementHTML(this.element, R(v, "")), this.textStr = v, O.doTransform = !0);
}, b && w(O, O.element.style), O.xSetter = O.ySetter = O.alignSetter = O.rotationSetter = function(v, a) {
a === "align" ? O.alignValue = O.textAlign = v : O[a] = v, O.doTransform = !0;
}, O.afterSetters = function() {
this.doTransform && (this.htmlUpdateTransform(), this.doTransform = !1);
}, O.attr({ text: d, x: Math.round(u), y: Math.round(P) }).css({ position: "absolute" }), C.styledMode || O.css({ fontFamily: this.style.fontFamily, fontSize: this.style.fontSize }), N.style.whiteSpace = "nowrap", O.css = O.htmlCss, b && (O.add = function(v) {
var a = C.box.parentNode, c = [];
if (this.parentGroup = v) {
var p = v.div;
if (!p) {
for (; v; )
c.push(v), v = v.parentGroup;
c.reverse().forEach(function(i) {
function l(n, A) {
i[A] = n, A === "translateX" ? o.left = n + "px" : o.top = n + "px", i.doTransform = !0;
}
var s = U(i.element, "class"), t = i.styles || {};
p = i.div = i.div || H("div", s ? { className: s } : 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
}, p || a);
var o = p.style;
W(i, { classSetter: function(n) {
return function(A) {
this.element.setAttribute("class", A), n.className = A;
};
}(p), on: function() {
return c[0].div && O.on.apply({ element: c[0].div, onEvents: i.onEvents }, arguments), i;
}, translateXSetter: l, translateYSetter: l }), i.addedSetters || w(i);
});
}
} else
p = a;
return p.appendChild(N), O.added = !0, O.alignOnAdd && O.htmlUpdateTransform(), O;
}), O;
}, x.composedClasses = [], x;
}(I);
}
), E(h, "Core/Axis/AxisDefaults.js", [], function() {
var y;
return function(B) {
B.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" }, B.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 I = this.axis.chart.numberFormatter;
return I(this.total, -1);
},
style: { color: "#000000", fontSize: "11px", fontWeight: "bold", textOutline: "1px contrast" }
}, gridLineWidth: 1, lineWidth: 0 }, B.defaultLeftAxisOptions = { labels: { x: -15 }, title: { rotation: 270 } }, B.defaultRightAxisOptions = { labels: { x: 15 }, title: { rotation: 90 } }, B.defaultBottomAxisOptions = { labels: { autoRotation: [-45], x: 0 }, margin: 15, title: { rotation: 0 } }, B.defaultTopAxisOptions = { labels: { autoRotation: [-45], x: 0 }, margin: 15, title: { rotation: 0 } };
}(y || (y = {})), y;
}), E(h, "Core/Foundation.js", [h["Core/Utilities.js"]], function(y) {
var B = y.addEvent, I = y.isFunction, Z = y.objectEach, F = y.removeEvent, U;
return function(H) {
H.registerEventOptions = function(W, R) {
W.eventOptions = W.eventOptions || {}, Z(R.events, function(S, x) {
W.eventOptions[x] !== S && (W.eventOptions[x] && (F(W, x, W.eventOptions[x]), delete W.eventOptions[x]), I(S) && (W.eventOptions[x] = S, B(W, x, S)));
});
};
}(U || (U = {})), U;
}), E(
h,
"Core/Axis/Tick.js",
[h["Core/FormatUtilities.js"], h["Core/Globals.js"], h["Core/Utilities.js"]],
function(y, B, I) {
var Z = B.deg2rad, F = I.clamp, U = I.correctFloat, H = I.defined, W = I.destroyObjectProperties, R = I.extend, S = I.fireEvent, x = I.isNumber, d = I.merge, u = I.objectEach, P = I.pick;
return B = function() {
function O(N, C, b, w, v) {
this.isNewLabel = this.isNew = !0, this.axis = N, this.pos = C, this.type = b || "", this.parameters = v || {}, this.tickmarkOffset = this.parameters.tickmarkOffset, this.options = this.parameters.options, S(this, "init"), b || w || this.addLabel();
}
return O.prototype.addLabel = function() {
var N = this, C = N.axis, b = C.options, w = C.chart, v = C.categories, a = C.logarithmic, c = C.names, p = N.pos, i = P(N.options && N.options.labels, b.labels), l = C.tickPositions, s = p === l[0], t = p === l[l.length - 1], o = (!i.step || i.step === 1) && C.tickInterval === 1;
l = l.info;
var n = N.label, A;
if (v = this.parameters.category || (v ? P(v[p], c[p], p) : p), a && x(v) && (v = U(a.lin2log(v))), C.dateTime)
if (l)
var _ = w.time.resolveDTLFormat(b.dateTimeLabelFormats[!b.grid && l.higherRanks[p] || l.unitName]), D = _.main;
else
x(v) && (D = C.dateTime.getXDateFormat(v, b.dateTimeLabelFormats || {}));
N.isFirst = s, N.isLast = t;
var j = {
axis: C,
chart: w,
dateTimeLabelFormat: D,
isFirst: s,
isLast: t,
pos: p,
tick: N,
tickPositionInfo: l,
value: v
};
S(this, "labelFormat", j);
var T = function(g) {
return i.formatter ? i.formatter.call(g, g) : i.format ? (g.text = C.defaultLabelFormatter.call(g), y.format(i.format, g, w)) : C.defaultLabelFormatter.call(g, g);
};
b = T.call(j, j);
var X = _ && _.list;
N.shortenLabel = X ? function() {
for (A = 0; A < X.length; A++)
if (R(j, { dateTimeLabelFormat: X[A] }), n.attr({ text: T.call(j, j) }), n.getBBox().width < C.getSlotWidth(N) - 2 * i.padding)
return;
n.attr({ text: "" });
} : void 0, o && C._addedPlotLB && N.moveLabel(b, i), H(n) || N.movedLabel ? n && n.textStr !== b && !o && (!n.textWidth || i.style.width || n.styles.width || n.css({ width: null }), n.attr({ text: b }), n.textPxLength = n.getBBox().width) : (N.label = n = N.createLabel({ x: 0, y: 0 }, b, i), N.rotation = 0);
}, O.prototype.createLabel = function(N, C, b) {
var w = this.axis, v = w.chart;
return (N = H(C) && b.enabled ? v.renderer.text(C, N.x, N.y, b.useHTML).add(w.labelGroup) : null) && (v.styledMode || N.css(d(b.style)), N.textPxLength = N.getBBox().width), N;
}, O.prototype.destroy = function() {
W(
this,
this.axis
);
}, O.prototype.getPosition = function(N, C, b, w) {
var v = this.axis, a = v.chart, c = w && a.oldChartHeight || a.chartHeight;
return N = { x: N ? U(v.translate(C + b, null, null, w) + v.transB) : v.left + v.offset + (v.opposite ? (w && a.oldChartWidth || a.chartWidth) - v.right - v.left : 0), y: N ? c - v.bottom + v.offset - (v.opposite ? v.height : 0) : U(c - v.translate(C + b, null, null, w) - v.transB) }, N.y = F(N.y, -1e5, 1e5), S(this, "afterGetPosition", { pos: N }), N;
}, O.prototype.getLabelPosition = function(N, C, b, w, v, a, c, p) {
var i = this.axis, l = i.transA, s = i.isLinked && i.linkedParent ? i.linkedParent.reversed : i.reversed, t = i.staggerLines, o = i.tickRotCorr || { x: 0, y: 0 }, n = w || i.reserveSpaceDefault ? 0 : -i.labelOffset * (i.labelAlign === "center" ? 0.5 : 1), A = {}, _ = v.y;
return H(_) || (_ = i.side === 0 ? b.rotation ? -8 : -b.getBBox().height : i.side === 2 ? o.y + 8 : Math.cos(b.rotation * Z) * (o.y - b.getBBox(!1, 0).height / 2)), N = N + v.x + n + o.x - (a && w ? a * l * (s ? -1 : 1) : 0), C = C + _ - (a && !w ? a * l * (s ? 1 : -1) : 0), t && (b = c / (p || 1) % t, i.opposite && (b = t - b - 1), C += i.labelOffset / t * b), A.x = N, A.y = Math.round(C), S(this, "afterGetLabelPosition", { pos: A, tickmarkOffset: a, index: c }), A;
}, O.prototype.getLabelSize = function() {
return this.label ? this.label.getBBox()[this.axis.horiz ? "height" : "width"] : 0;
}, O.prototype.getMarkPath = function(N, C, b, w, v, a) {
return a.crispLine([["M", N, C], ["L", N + (v ? 0 : -b), C + (v ? b : 0)]], w);
}, O.prototype.handleOverflow = function(N) {
var C = this.axis, b = C.options.labels, w = N.x, v = C.chart.chartWidth, a = C.chart.spacing, c = P(C.labelLeft, Math.min(C.pos, a[3]));
a = P(C.labelRight, Math.max(C.isRadial ? 0 : C.pos + C.len, v - a[1]));
var p = this.label, i = this.rotation, l = { left: 0, center: 0.5, right: 1 }[C.labelAlign || p.attr("align")], s = p.getBBox().width, t = C.getSlotWidth(this), o = {}, n = t, A = 1, _;
i || b.overflow !== "justify" ? 0 > i && w - l * s < c ? _ = Math.round(w / Math.cos(i * Z) - c) : 0 < i && w + l * s > a && (_ = Math.round((v - w) / Math.cos(i * Z))) : (v = w + (1 - l) * s, w - l * s < c ? n = N.x + n * (1 - l) - c : v > a && (n = a - N.x + n * l, A = -1), n = Math.min(t, n), n < t && C.labelAlign === "center" && (N.x += A * (t - n - l * (t - Math.min(s, n)))), (s > n || C.autoRotation && (p.styles || {}).width) && (_ = n)), _ && (this.shortenLabel ? this.shortenLabel() : (o.width = Math.floor(_) + "px", (b.style || {}).textOverflow || (o.textOverflow = "ellipsis"), p.css(o)));
}, O.prototype.moveLabel = function(N, C) {
var b = this, w = b.label, v = b.axis, a = v.reversed, c = !1;
if (w && w.textStr === N ? (b.movedLabel = w, c = !0, delete b.label) : u(v.ticks, function(i) {
c || i.isNew || i === b || !i.label || i.label.textStr !== N || (b.movedLabel = i.label, c = !0, i.labelPos = b.movedLabel.xy, delete i.label);
}), !c && (b.labelPos || w)) {
var p = b.labelPos || w.xy;
w = v.horiz ? a ? 0 : v.width + v.left : p.x, v = v.horiz ? p.y : a ? v.width + v.left : 0, b.movedLabel = b.createLabel({ x: w, y: v }, N, C), b.movedLabel && b.movedLabel.attr({ opacity: 0 });
}
}, O.prototype.render = function(N, C, b) {
var w = this.axis, v = w.horiz, a = this.pos, c = P(this.tickmarkOffset, w.tickmarkOffset);
a = this.getPosition(v, a, c, C), c = a.x;
var p = a.y;
w = v && c === w.pos + w.len || !v && p === w.pos ? -1 : 1, v = P(b, this.label && this.label.newOpacity, 1), b = P(b, 1), this.isActive = !0, this.renderGridLine(C, b, w), this.renderMark(a, b, w), this.renderLabel(a, C, v, N), this.isNew = !1, S(this, "afterRender");
}, O.prototype.renderGridLine = function(N, C, b) {
var w = this.axis, v = w.options, a = {}, c = this.pos, p = this.type, i = P(
this.tickmarkOffset,
w.tickmarkOffset
), l = w.chart.renderer, s = this.gridLine, t = v.gridLineWidth, o = v.gridLineColor, n = v.gridLineDashStyle;
this.type === "minor" && (t = v.minorGridLineWidth, o = v.minorGridLineColor, n = v.minorGridLineDashStyle), s || (w.chart.styledMode || (a.stroke = o, a["stroke-width"] = t || 0, a.dashstyle = n), p || (a.zIndex = 1), N && (C = 0), this.gridLine = s = l.path().attr(a).addClass("highcharts-" + (p ? p + "-" : "") + "grid-line").add(w.gridGroup)), s && (b = w.getPlotLinePath({ value: c + i, lineWidth: s.strokeWidth() * b, force: "pass", old: N })) && s[N || this.isNew ? "attr" : "animate"]({ d: b, opacity: C });
}, O.prototype.renderMark = function(N, C, b) {
var w = this.axis, v = w.options, a = w.chart.renderer, c = this.type, p = w.tickSize(c ? c + "Tick" : "tick"), i = N.x;
N = N.y;
var l = P(v[c !== "minor" ? "tickWidth" : "minorTickWidth"], !c && w.isXAxis ? 1 : 0);
v = v[c !== "minor" ? "tickColor" : "minorTickColor"];
var s = this.mark, t = !s;
p && (w.opposite && (p[0] = -p[0]), s || (this.mark = s = a.path().addClass("highcharts-" + (c ? c + "-" : "") + "tick").add(w.axisGroup), w.chart.styledMode || s.attr({ stroke: v, "stroke-width": l })), s[t ? "attr" : "animate"]({ d: this.getMarkPath(
i,
N,
p[0],
s.strokeWidth() * b,
w.horiz,
a
), opacity: C }));
}, O.prototype.renderLabel = function(N, C, b, w) {
var v = this.axis, a = v.horiz, c = v.options, p = this.label, i = c.labels, l = i.step;
v = P(this.tickmarkOffset, v.tickmarkOffset);
var s = N.x;
N = N.y;
var t = !0;
p && x(s) && (p.xy = N = this.getLabelPosition(s, N, p, a, i, v, w, l), this.isFirst && !this.isLast && !c.showFirstLabel || this.isLast && !this.isFirst && !c.showLastLabel ? t = !1 : !a || i.step || i.rotation || C || b === 0 || this.handleOverflow(N), l && w % l && (t = !1), t && x(N.y) ? (N.opacity = b, p[this.isNewLabel ? "attr" : "animate"](N), this.isNewLabel = !1) : (p.attr("y", -9999), this.isNewLabel = !0));
}, O.prototype.replaceMovedLabel = function() {
var N = this.label, C = this.axis, b = C.reversed;
if (N && !this.isNew) {
var w = C.horiz ? b ? C.left : C.width + C.left : N.xy.x;
b = C.horiz ? N.xy.y : b ? C.width + C.top : C.top, N.animate({ x: w, y: b, opacity: 0 }, void 0, N.destroy), delete this.label;
}
C.isDirty = !0, this.label = this.movedLabel, delete this.movedLabel;
}, O;
}(), B;
}
), E(h, "Core/Axis/Axis.js", [
h["Core/Animation/AnimationUtilities.js"],
h["Core/Axis/AxisDefaults.js"],
h["Core/Color/Color.js"],
h["Core/DefaultOptions.js"],
h["Core/Foundation.js"],
h["Core/Globals.js"],
h["Core/Axis/Tick.js"],
h["Core/Utilities.js"]
], function(y, B, I, Z, F, U, H, W) {
var R = y.animObject, S = Z.defaultOptions, x = F.registerEventOptions, d = U.deg2rad, u = W.arrayMax, P = W.arrayMin, O = W.clamp, N = W.correctFloat, C = W.defined, b = W.destroyObjectProperties, w = W.erase, v = W.error, a = W.extend, c = W.fireEvent, p = W.getMagnitude, i = W.isArray, l = W.isNumber, s = W.isString, t = W.merge, o = W.normalizeTickInterval, n = W.objectEach, A = W.pick, _ = W.relativeLength, D = W.removeEvent, j = W.splat, T = W.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 = A(m.opposite, this.opposite), this.side = A(m.side, this.side, this.horiz ? this.opposite ? 0 : 2 : this.opposite ? 1 : 3), this.setOptions(m);
var Y = this.options, V = Y.labels, Q = Y.type;
this.userOptions = m, this.minPixelPadding = 0, this.reversed = A(Y.reversed, this.reversed), this.visible = Y.visible, this.zoomEnabled = Y.zoomEnabled, this.hasNames = Q === "category" || Y.categories === !0, this.categories = Y.categories || this.hasNames, this.names || (this.names = [], this.names.keys = {}), this.plotLinesAndBandsGroups = {}, this.positiveValuesOnly = !!this.logarithmic, this.isLinked = C(Y.linkedTo), this.ticks = {}, this.labelEdge = [], this.minorTicks = {}, this.plotLinesAndBands = [], this.alternateBands = {}, this.len = 0, this.minRange = this.userMinRange = Y.minRange || Y.maxZoom, this.range = Y.range, this.offset = Y.offset || 0, this.min = this.max = null, m = A(Y.crosshair, j(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 = l(V.rotation) ? V.rotation : void 0, x(this, Y), c(this, "afterInit");
}, X.prototype.setOptions = function(g) {
this.options = t(B.defaultXAxisOptions, this.coll === "yAxis" && B.defaultYAxisOptions, [B.defaultTopAxisOptions, B.defaultRightAxisOptions, B.defaultBottomAxisOptions, B.defaultLeftAxisOptions][this.side], t(S[this.coll], g)), c(this, "afterSetOptions", { userOptions: g });
}, X.prototype.defaultLabelFormatter = function(g) {
var m = this.axis;
g = this.chart.numberFormatter;
var L = l(this.value) ? this.value : NaN, Y = m.chart.time, V = this.dateTimeLabelFormat, Q = S.lang, k = Q.numericSymbols;
Q = Q.numericSymbolMagnitude || 1e3;
var G = m.logarithmic ? Math.abs(L) : m.tickInterval, z = k && k.length;
if (m.categories)
var $ = "" + this.value;
else if (V)
$ = Y.dateFormat(V, L);
else if (z && 1e3 <= G)
for (; z-- && typeof $ > "u"; )
m = Math.pow(Q, z + 1), G >= m && 10 * L % m === 0 && k[z] !== null && L !== 0 && ($ = g(L / m, -1) + k[z]);
return typeof $ > "u" && ($ = 1e4 <= Math.abs(L) ? g(L, -1) : g(L, -1, void 0, "")), $;
}, 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(Y) {
if (Y.visible || !m.options.chart.ignoreHiddenSeries) {
var V = Y.options, Q = V.threshold;
if (g.hasVisibleSeries = !0, g.positiveValuesOnly && 0 >= Q && (Q = null), g.isXAxis) {
if (V = Y.xData, V.length) {
V = g.logarithmic ? V.filter(g.validatePositiveValue) : V, L = Y.getXExtremes(V);
var k = L.min, G = L.max;
l(k) || k instanceof Date || (V = V.filter(l), L = Y.getXExtremes(V), k = L.min, G = L.max), V.length && (g.dataMin = Math.min(A(g.dataMin, k), k), g.dataMax = Math.max(A(g.dataMax, G), G));
}
} else
Y = Y.applyExtremes(), l(Y.dataMin) && (k = Y.dataMin, g.dataMin = Math.min(A(g.dataMin, k), k)), l(Y.dataMax) && (G = Y.dataMax, g.dataMax = Math.max(A(g.dataMax, G), G)), C(Q) && (g.threshold = Q), (!V.softThreshold || g.positiveValuesOnly) && (g.softThreshold = !1);
}
});
}), c(this, "afterGetSeriesExtremes");
}, X.prototype.translate = function(g, m, L, Y, V, Q) {
var k = this.linkedParent || this, G = Y && k.old ? k.old.min : k.min, z = k.minPixelPadding;
V = (k.isOrdinal || k.brokenAxis && k.brokenAxis.hasBreaks || k.logarithmic && V) && k.lin2val;
var $ = 1, q = 0;
return Y = Y && k.old ? k.old.transA : k.transA, Y || (Y = k.transA), L && ($ *= -1, q = k.len), k.reversed && ($ *= -1, q -= $ * (k.sector || k.len)), m ? (g = (g * $ + q - z) / Y + G, V && (g = k.lin2val(g))) : (V && (g = k.val2lin(g)), g = l(G) ? $ * (g - G) * Y + q + $ * z + (l(Q) ? Y * 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) : lt = !0), at;
}
var L = this, Y = L.chart, V = L.left, Q = L.top, k = g.old, G = g.value, z = g.lineWidth, $ = k && Y.oldChartHeight || Y.chartHeight, q = k && Y.oldChartWidth || Y.chartWidth, it = L.transB, et = g.translatedValue, nt = g.force, rt, ct, gt, dt, lt;
return g = {
value: G,
lineWidth: z,
old: k,
force: nt,
acrossPanes: g.acrossPanes,
translatedValue: et
}, c(this, "getPlotLinePath", g, function(at) {
et = A(et, L.translate(G, null, null, k)), et = O(et, -1e5, 1e5), rt = gt = Math.round(et + it), ct = dt = Math.round($ - et - it), l(et) ? L.horiz ? (ct = Q, dt = $ - L.bottom, rt = gt = m(rt, V, V + L.width)) : (rt = V, gt = q - L.right, ct = dt = m(ct, Q, Q + L.height)) : (lt = !0, nt = !1), at.path = lt && !nt ? null : Y.renderer.crispLine([["M", rt, ct], ["L", gt, dt]], z || 1);
}), g.path;
}, X.prototype.getLinearTickPositions = function(g, m, L) {
var Y = N(Math.floor(m / g) * g);
L = N(Math.ceil(L / g) * g);
var V = [], Q;
if (N(Y + g) === Y && (Q = 20), this.single)
return [m];
for (m = Y; m <= L && (V.push(m), m = N(m + g, Q), m !== k); )
var k = m;
return V;
}, X.prototype.getMinorTickInterval = function() {
var g = this.options;
return g.minorTicks === !0 ? A(g.minorTickInterval, "auto") : g.minorTicks === !1 ? null : g.minorTickInterval;
}, X.prototype.getMinorTickPositions = function() {
var g = this.options, m = this.tickPositions, L = this.minorTickInterval, Y = this.pointRangePadding || 0, V = this.min - Y;
Y = this.max + Y;
var Q = Y - V, k = [];
if (Q && Q / L < this.len / 3) {
var G = this.logarithmic;
if (G)
this.paddedTicks.forEach(function(z, $, q) {
$ && k.push.apply(
k,
G.getLogTickPositions(L, q[$ - 1], q[$], !0)
);
});
else if (this.dateTime && this.getMinorTickInterval() === "auto")
k = k.concat(this.getTimeTicks(this.dateTime.normalizeTimeTickInterval(L), V, Y, g.startOfWeek));
else
for (g = V + (m[0] - V) % L; g <= Y && g !== k[0]; g += L)
k.push(g);
}
return k.length !== 0 && this.trimTicks(k), k;
}, X.prototype.adjustForMinRange = function() {
var g = this.options, m = this.logarithmic, L = this.min, Y = this.max, V = 0, Q, k, G, z;
if (this.isXAxis && typeof this.minRange > "u" && !m && (C(g.min) || C(g.max) || C(g.floor) || C(g.ceiling) ? this.minRange = null : (this.series.forEach(function(et) {
if (G = et.xData, z = et.xIncrement ? 1 : G.length - 1, 1 < G.length)
for (Q = z; 0 < Q; Q--)
k = G[Q] - G[Q - 1], (!V || k < V) && (V = k);
}), this.minRange = Math.min(5 * V, this.dataMax - this.dataMin))), Y - L < this.minRange) {
var $ = this.dataMax - this.dataMin >= this.minRange, q = this.minRange, it = (q - Y + L) / 2;
it = [L - it, A(g.min, L - it)], $ && (it[2] = this.logarithmic ? this.logarithmic.log2lin(this.dataMin) : this.dataMin), L = u(it), Y = [L + q, A(g.max, L + q)], $ && (Y[2] = m ? m.log2lin(this.dataMax) : this.dataMax), Y = P(Y), Y - L < q && (it[0] = Y - q, it[1] = A(g.min, Y - q), L = u(it));
}
this.min = L, this.max = Y;
}, X.prototype.getClosest = function() {
var g;
return this.categories ? g = 1 : this.series.forEach(function(m) {
var L = m.closestPointRange, Y = m.visible || !m.chart.options.chart.ignoreHiddenSeries;
!m.noSharedTooltip && C(L) && Y && (g = C(g) ? Math.min(g, L) : L);
}), g;
}, X.prototype.nameToX = function(g) {
var m = i(this.categories), L = m ? this.categories : this.names, Y = g.options.x;
if (g.series.requireSorting = !1, C(Y) || (Y = this.options.uniqueNames ? m ? L.indexOf(g.name) : A(L.keys[g.name], -1) : g.series.autoIncrement()), Y === -1) {
if (!m)
var V = L.length;
} else
V = Y;
return typeof V < "u" && (this.names[V] = g.name, this.names.keys[g.name] = V), V;
}, 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(Y, V) {
if (Y && Y.options && typeof Y.name < "u") {
var Q = g.nameToX(Y);
typeof Q < "u" && Q !== Y.x && (Y.x = Q, L.xData[V] = Q);
}
});
}));
}, X.prototype.setAxisTranslation = function() {
var g = this, m = g.max - g.min, L = g.linkedParent, Y = !!g.categories, V = g.isXAxis, Q = g.axisPointRange || 0, k = 0, G = 0, z = g.transA;
if (V || Y || Q) {
var $ = g.getClosest();
L ? (k = L.minPointOffset, G = L.pointRangePadding) : g.series.forEach(function(q) {
var it = Y ? 1 : V ? A(q.options.pointRange, $, 0) : g.axisPointRange || 0, et = q.options.pointPlacement;
Q = Math.max(Q, it), (!g.single || Y) && (q = q.is("xrange") ? !V : V, k = Math.max(k, q && s(et) ? 0 : it / 2), G = Math.max(G, q && et === "on" ? 0 : it));
}), L = g.ordinal && g.ordinal.slope && $ ? g.ordinal.slope / $ : 1, g.minPointOffset = k *= L, g.pointRangePadding = G *= L, g.pointRange = Math.min(Q, g.single && Y ? 1 : m), V && (g.closestPointRange = $);
}
g.translationSlope = g.transA = z = g.staticScale || g.len / (m + G || 1), g.transB = g.horiz ? g.left : g.bottom, g.minPixelPadding = z * k, c(this, "afterSetAxisTranslation");
}, X.prototype.minFromRange = function() {
return this.max - this.range;
}, X.prototype.setTickInterval = function(g) {
var m = this.chart, L = this.logarithmic, Y = this.options, V = this.isXAxis, Q = this.isLinked, k = Y.tickPixelInterval, G = this.categories, z = this.softThreshold, $ = Y.maxPadding, q = Y.minPadding, it = l(Y.tickInterval) && 0 <= Y.tickInterval ? Y.tickInterval : void 0, et = l(this.threshold) ? this.threshold : null;
this.dateTime || G || Q || this.getTickAmount();
var nt = A(this.userMin, Y.min), rt = A(this.userMax, Y.max);
if (Q) {
this.linkedParent = m[this.coll][Y.linkedTo];
var ct = this.linkedParent.getExtremes();
this.min = A(ct.min, ct.dataMin), this.max = A(ct.max, ct.dataMax), Y.type !== this.linkedParent.options.type && v(11, 1, m);
} else {
if (z && C(et)) {
if (this.dataMin >= et)
ct = et, q = 0;
else if (this.dataMax <= et) {
var gt = et;
$ = 0;
}
}
this.min = A(nt, ct, this.dataMin), this.max = A(rt, gt, this.dataMax);
}
if (L && (this.positiveValuesOnly && !g && 0 >= Math.min(this.min, A(this.dataMin, this.min)) && v(10, 1, m), this.min = N(L.log2lin(this.min), 16), this.max = N(L.log2lin(this.max), 16)), this.range && C(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(), !(G || this.axisPointRange || this.stacking && this.stacking.usePercentage || Q) && C(this.min) && C(this.max) && (m = this.max - this.min) && (!C(nt) && q && (this.min -= m * q), !C(rt) && $ && (this.max += m * $)), l(this.userMin) || (l(Y.softMin) && Y.softMin < this.min && (this.min = nt = Y.softMin), l(Y.floor) && (this.min = Math.max(this.min, Y.floor))), l(this.userMax) || (l(Y.softMax) && Y.softMax > this.max && (this.max = rt = Y.softMax), l(Y.ceiling) && (this.max = Math.min(this.max, Y.ceiling))), z && C(this.dataMin) && (et = et || 0, !C(nt) && this.min < et && this.dataMin >= et ? this.min = this.options.minRange ? Math.min(et, this.max - this.minRange) : et : !C(rt) && this.max > et && this.dataMax <= et && (this.max = this.options.minRange ? Math.max(et, this.min + this.minRange) : et)), l(this.min) && l(this.max) && !this.chart.polar && this.min > this.max && (C(this.options.min) ? this.max = this.min : C(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 && k === this.linkedParent.options.tickPixelInterval ? it = this.linkedParent.tickInterval : A(it, this.tickAmount ? (this.max - this.min) / Math.max(this.tickAmount - 1, 1) : void 0, G ? 1 : (this.max - this.min) * k / Math.max(this.len, k)), V && !g) {
var dt = this.min !== (this.old && this.old.min) || this.max !== (this.old && this.old.max);
this.series.forEach(function(lt) {
lt.forceCrop = lt.forceCropping && lt.forceCropping(), lt.processData(dt);
}), c(this, "postProcessData", { hasExtemesChanged: dt });
}
this.setAxisTranslation(), c(this, "initialAxisTranslation"), this.pointRange && !it && (this.tickInterval = Math.max(this.pointRange, this.tickInterval)), g = A(Y.minTickInterval, this.dateTime && !this.series.some(function(lt) {
return lt.noSharedTooltip;
}) ? this.closestPointRange : 0), !it && this.tickInterval < g && (this.tickInterval = g), this.dateTime || this.logarithmic || it || (this.tickInterval = o(this.tickInterval, void 0, p(this.tickInterval), A(Y.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(), Y = this.hasVerticalPanning(), V = this.coll === "colorAxis", Q = (V || !Y) && g.startOnTick;
Y = (V || !Y) && g.endOnTick, V = 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 && C(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, V && (V = V.apply(this, [this.min, this.max]))) && (this.tickPositions = L = V), this.paddedTicks = L.slice(0), this.trimTicks(L, Q, Y), this.isLinked || (this.single && 2 > L.length && !this.categories && !this.series.some(function(k) {
return k.is("heatmap") && k.options.pointPlacement === "between";
}) && (this.min -= 0.5, this.max += 0.5), m || V || this.adjustTickAmount()), c(this, "afterSetTickPositions");
}, X.prototype.trimTicks = function(g, m, L) {
var Y = g[0], V = g[g.length - 1], Q = !this.isOrdinal && this.minPointOffset || 0;
if (c(this, "trimTicks"), !this.isLinked) {
if (m && Y !== -1 / 0)
this.min = Y;
else
for (; this.min - Q > g[0]; )
g.shift();
if (L)
this.max = V;
else
for (; this.max + Q < g[g.length - 1]; )
g.pop();
g.length === 0 && C(Y) && !this.options.tickPositions && g.push((V + Y) / 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(Y) {
var V = Y.options;
V = [Y.horiz ? V.left : V.top, V.width, V.height, V.pane].join(), Y.series.length && (g[V] ? L = !0 : g[V] = 1);
}), L;
}, X.prototype.getTickAmount = function() {
var g = this.options, m = g.tickPixelInterval, L = g.tickAmount;
!C(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, Y = this.tickAmount, V = this.finalTickAmt, Q = L && L.length, k = A(this.threshold, this.softThreshold ? 0 : null);
if (this.hasData() && l(this.min) && l(this.max)) {
if (Q < Y) {
for (; L.length < Y; )
L.length % 2 || this.min === k ? L.push(N(L[L.length - 1] + m)) : L.unshift(N(L[0] - m));
this.transA *= (Q - 1) / (Y - 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 > Y && (this.tickInterval *= 2, this.setTickPositions());
if (C(V)) {
for (m = g = L.length; m--; )
(V === 3 && m % 2 === 1 || 2 >= V && 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(Y) {
g = g || Y.isDirtyData || Y.isDirty, m = m || Y.xAxis && Y.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, Y, V) {
var Q = this, k = Q.chart;
L = A(L, !0), Q.series.forEach(function(G) {
delete G.kdTree;
}), V = a(V, { min: g, max: m }), c(Q, "setExtremes", V, function() {
Q.userMin = g, Q.userMax = m, Q.eventArgs = V, L && k.redraw(Y);
});
}, X.prototype.zoom = function(g, m) {
var L = this, Y = this.dataMin, V = this.dataMax, Q = this.options, k = Math.min(Y, A(Q.min, Y)), G = Math.max(V, A(Q.max, V));
return g = { newMin: g, newMax: m }, c(this, "zoom", g, function(z) {
var $ = z.newMin, q = z.newMax;
($ !== L.min || q !== L.max) && (L.allowZoomOutside || (C(Y) && ($ < k && ($ = k), $ > G && ($ = G)), C(V) && (q < k && (q = k), q > G && (q = G))), L.displayBtn = typeof $ < "u" || typeof q < "u", L.setExtremes($, q, !1, void 0, { trigger: "zoom" })), z.zoomed = !0;
}), g.zoomed;
}, X.prototype.setAxisSize = function() {
var g = this.chart, m = this.options, L = m.offsets || [0, 0, 0, 0], Y = this.horiz, V = this.width = Math.round(_(A(m.width, g.plotWidth - L[3] + L[1]), g.plotWidth)), Q = this.height = Math.round(_(A(m.height, g.plotHeight - L[0] + L[2]), g.plotHeight)), k = this.top = Math.round(_(A(m.top, g.plotTop + L[0]), g.plotHeight, g.plotTop));
m = this.left = Math.round(_(A(m.left, g.plotLeft + L[3]), g.plotWidth, g.plotLeft)), this.bottom = g.chartHeight - Q - k, this.right = g.chartWidth - V - m, this.len = Math.max(Y ? V : Q, 0), this.pos = Y ? m : k;
}, X.prototype.getExtremes = function() {
var g = this.logarithmic;
return { min: g ? N(g.lin2log(this.min)) : this.min, max: g ? N(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 = (A(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 = A(m[g === "tick" ? "tickWidth" : "minorTickWidth"], g === "tick" && this.isXAxis && !this.categories ? 1 : 0), Y = m[g === "tick" ? "tickLength" : "minorTickLength"];
if (L && Y) {
m[g + "Position"] === "inside" && (Y = -Y);
var V = [Y, L];
}
return g = { tickSize: V }, 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, Y = this.len / (((this.categories ? 1 : 0) + this.max - this.min) / L), V = g.rotation, Q = this.labelMetrics(), k = Math.max(this.max - this.min, 0), G = function(nt) {
var rt = nt / (Y || 1);
return rt = 1 < rt ? Math.ceil(rt) : 1, rt * L > k && nt !== 1 / 0 && Y !== 1 / 0 && k && (rt = Math.ceil(k / L)), N(rt * L);
}, z = L, $, q, it = Number.MAX_VALUE;
if (m) {
if (!g.staggerLines && !g.step)
if (l(V))
var et = [V];
else
Y < g.autoRotationLimit && (et = g.autoRotation);
et && et.forEach(function(nt) {
if (nt === V || nt && -90 <= nt && 90 >= nt) {
q = G(Math.abs(Q.h / Math.sin(d * nt)));
var rt = q + Math.abs(nt / 360);
rt < it && (it = rt, $ = nt, z = q);
}
});
} else
g.step || (z = G(Q.h));
return this.autoRotation = et, this.labelRotation = A($, l(V) ? V : 0), z;
}, X.prototype.getSlotWidth = function(g) {
var m = this.chart, L = this.horiz, Y = this.options.labels, V = Math.max(this.tickPositions.length - (this.categories ? 0 : 1), 1), Q = m.margin[3];
if (g && l(g.slotWidth))
return g.slotWidth;
if (L && 2 > Y.step)
return Y.rotation ? 0 : (this.staggerLines || 1) * this.len / V;
if (!L) {
if (g = Y.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, Y = this.ticks, V = this.options.labels, Q = V.style, k = this.horiz, G = this.getSlotWidth(), z = Math.max(1, Math.round(G - 2 * V.padding)), $ = {}, q = this.labelMetrics(), it = Q.textOverflow, et = 0;
if (s(V.rotation) || ($.rotation = V.rotation || 0), L.forEach(function(gt) {
gt = Y[gt], gt.movedLabel && gt.replaceMovedLabel(), gt && gt.label && gt.label.textPxLength > et && (et = gt.label.textPxLength);
}), this.maxLabelLength = et, this.autoRotation)
et > z && et > q.h ? $.rotation = this.labelRotation : this.labelRotation = 0;
else if (G) {
var nt = z;
if (!it) {
var rt = "clip";
for (z = L.length; !k && z--; ) {
var ct = L[z];
(ct = Y[ct].label) && (ct.styles && ct.styles.textOverflow === "ellipsis" ? ct.css({ textOverflow: "clip" }) : ct.textPxLength > G && ct.css({ width: G + "px" }), ct.getBBox().height > this.len / L.length - (q.h - q.f) && (ct.specificTextOverflow = "ellipsis"));
}
}
}
$.rotation && (nt = et > 0.5 * g.chartHeight ? 0.33 * g.chartHeight : et, it || (rt = "ellipsis")), (this.labelAlign = V.align || this.autoLabelAlign(this.labelRotation)) && ($.align = this.labelAlign), L.forEach(function(gt) {
var dt = (gt = Y[gt]) && gt.label, lt = Q.width, at = {};
dt && (dt.attr($), gt.shortenLabel ? gt.shortenLabel() : nt && !lt && 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 && !lt && dt.css({ width: null }), delete dt.specificTextOverflow, gt.rotation = $.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 && C(this.min) && C(this.max);
}, X.prototype.addTitle = function(g) {
var m = this.chart.renderer, L = this.horiz, Y = this.opposite, V = this.options.title, Q = this.chart.styledMode, k;
this.axisTitle || ((k = V.textAlign) || (k = (L ? { low: "left", middle: "center", high: "right" } : { low: Y ? "right" : "left", middle: "center", high: Y ? "left" : "right" })[V.align]), this.axisTitle = m.text(V.text || "", 0, 0, V.useHTML).attr({ zIndex: 7, rotation: V.rotation, align: k }).addClass("highcharts-axis-title"), Q || this.axisTitle.css(t(V.style)), this.axisTitle.add(this.axisGroup), this.axisTitle.isNew = !0), Q || V.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 H(this, g);
}, X.prototype.getOffset = function() {
var g = this, m = this, L = m.chart, Y = m.horiz, V = m.options, Q = m.side, k = m.ticks, G = m.tickPositions, z = m.coll, $ = m.axisParent, q = L.renderer, it = L.inverted && !m.isZAxis ? [1, 0, 3, 2][Q] : Q, et = m.hasData(), nt = V.title, rt = V.labels, ct = L.axisOffset;
L = L.clipOffset;
var gt = [
-1,
1,
1,
-1
][Q], dt = V.className, lt, at = 0, J = 0, tt = 0;
if (m.showAxis = lt = et || V.showEmpty, m.staggerLines = m.horiz && rt.staggerLines || void 0, !m.axisGroup) {
var st = function(pt, yt, vt) {
return q.g(pt).attr({ zIndex: vt }).addClass("highcharts-" + z.toLowerCase() + yt + " " + (g.isRadial ? "highcharts-radial-axis" + yt + " " : "") + (dt || "")).add($);
};
m.gridGroup = st("grid", "-grid", V.gridZIndex), m.axisGroup = st("axis", "", V.zIndex), m.labelGroup = st("axis-labels", "-labels", rt.zIndex);
}
if (et || m.isLinked ? (G.forEach(function(pt) {
m.generateTick(pt);
}), m.renderUnsquish(), m.reserveSpaceDefault = Q === 0 || Q === 2 || { 1: "left", 3: "right" }[Q] === m.labelAlign, A(rt.reserveSpace, m.labelAlign === "center" ? !0 : null, m.reserveSpaceDefault) && G.forEach(function(pt) {
tt = Math.max(k[pt].getLabelSize(), tt);
}), m.staggerLines && (tt *= m.staggerLines), m.labelOffset = tt * (m.opposite ? -1 : 1)) : n(k, function(pt, yt) {
pt.destroy(), delete k[yt];
}), nt && nt.text && nt.enabled !== !1 && (m.addTitle(lt), lt && nt.reserveSpace !== !1)) {
m.titleOffset = at = m.axisTitle.getBBox()[Y ? "height" : "width"];
var ht = nt.offset;
J = C(ht) ? 0 : A(nt.margin, Y ? 5 : 10);
}
m.renderLine(), m.offset = gt * A(V.offset, ct[Q] ? ct[Q] + (V.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 * (Y ? A(rt.y, m.tickRotCorr.y + 8 * gt) : rt.x)), m.axisTitleMargin = A(ht, et), m.getMaxLabelDimensions && (m.maxLabelDimensions = m.getMaxLabelDimensions(k, G)), z !== "colorAxis" && (Y = this.tickSize("tick"), ct[Q] = Math.max(ct[Q], (m.axisTitleMargin || 0) + at + gt * m.offset, et, G && G.length && Y ? Y[0] + gt * m.offset : 0), V = !m.axisLine || V.offset ? 0 : 2 * Math.floor(m.axisLine.strokeWidth() / 2), L[it] = Math.max(L[it], V)), c(this, "afterGetOffset");
}, X.prototype.getLinePath = function(g) {
var m = this.chart, L = this.opposite, Y = this.offset, V = this.horiz, Q = this.left + (L ? this.width : 0) + Y;
return Y = m.chartHeight - this.bottom - (L ? this.height : 0) + Y, L && (g *= -1), m.renderer.crispLine([["M", V ? this.left : Q, V ? Y : this.top], ["L", V ? m.chartWidth - this.right : Q, V ? Y : 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, Y = this.len, V = this.options.title, Q = g ? m : L, k = this.opposite, G = this.offset, z = V.x, $ = V.y, q = this.axisTitle, it = this.chart.renderer.fontMetrics(V.style.fontSize, q);
return q = Math.max(q.getBBox(null, 0).height - it.h - 1, 0), Y = { low: Q + (g ? 0 : Y), middle: Q + Y / 2, high: Q + (g ? Y : 0) }[V.align], m = (g ? L + this.height : m) + (g ? 1 : -1) * (k ? -1 : 1) * this.axisTitleMargin + [-q, q, it.f, -q][this.side], g = { x: g ? Y + z : m + (k ? this.width : 0) + G + z, y: g ? m + $ - (k ? this.height : 0) + G : Y + $ }, c(this, "afterGetTitlePosition", { titlePosition: g }), g;
}, X.prototype.renderMinorTick = function(g, m) {
var L = this.minorTicks;
L[g] || (L[g] = new H(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 Y = this.ticks;
(!this.isLinked || g >= this.min && g <= this.max || this.grid && this.grid.isColumn) && (Y[g] || (Y[g] = new H(this, g)), L && Y[g].isNew && Y[g].render(
m,
!0,
-1
), Y[g].render(m));
}, X.prototype.render = function() {
var g = this, m = g.chart, L = g.logarithmic, Y = g.options, V = g.isLinked, Q = g.tickPositions, k = g.axisTitle, G = g.ticks, z = g.minorTicks, $ = g.alternateBands, q = Y.stackLabels, it = Y.alternateGridColor, et = g.tickmarkOffset, nt = g.axisLine, rt = g.showAxis, ct = R(m.renderer.globalAnimation), gt, dt;
if (g.labelEdge.length = 0, g.overlap = !1, [G, z, $].forEach(function(at) {
n(at, function(J) {
J.isActive = !1;
});
}), g.hasData() || V) {
var lt = g.chart.hasRendered && g.old && l(g.old.min);
g.minorTickInterval && !g.categories && g.getMinorTickPositions().forEach(function(at) {
g.renderMinorTick(at, lt);
}), Q.length && (Q.forEach(function(at, J) {
g.renderTick(at, J, lt);
}), et && (g.min === 0 || g.single) && (G[-1] || (G[-1] = new H(g, -1, null, !0)), G[-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) && ($[at] || ($[at] = new U.PlotLineOrBand(g)), gt = at + et, $[at].options = { from: L ? L.lin2log(gt) : gt, to: L ? L.lin2log(dt) : dt, color: it, className: "highcharts-alternate-grid" }, $[at].render(), $[at].isActive = !0);
}), g._addedPlotLB || (g._addedPlotLB = !0, (Y.plotLines || []).concat(Y.plotBands || []).forEach(function(at) {
g.addPlotBandOrLine(at);
}));
}
[G, z, $].forEach(function(at) {
var J = [], tt = ct.duration;
n(at, function(st, ht) {
st.isActive || (st.render(ht, !1, 0), st.isActive = !1, J.push(ht));
}), T(function() {
for (var st = J.length; st--; )
at[J[st]] && !at[J[st]].isActive && (at[J[st]].destroy(), delete at[J[st]]);
}, at !== $ && m.hasRendered && tt ? tt : 0);
}), nt && (nt[nt.isPlaced ? "animate" : "attr"]({ d: this.getLinePath(nt.strokeWidth()) }), nt.isPlaced = !0, nt[rt ? "show" : "hide"](rt)), k && rt && (Y = g.getTitlePosition(), l(Y.y) ? (k[k.isNew ? "attr" : "animate"](Y), k.isNew = !1) : (k.attr("y", -9999), k.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, Y = this.eventOptions;
if (c(this, "destroy", { keepEvents: g }), g || D(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 V in m.plotLinesAndBandsGroups)
m.plotLinesAndBandsGroups[V] = m.plotLinesAndBandsGroups[V].destroy();
n(m, function(Q, k) {
m.getKeepProps().indexOf(k) === -1 && delete m[k];
}), this.eventOptions = Y;
}, X.prototype.drawCrosshair = function(g, m) {
var L = this.crosshair, Y = A(L && L.snap, !0), V = this.chart, Q, k = this.cross;
if (c(this, "drawCrosshair", { e: g, point: m }), g || (g = this.cross && this.cross.e), L && (C(m) || !Y) !== !1) {
if (Y ? C(m) && (Q = A(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), C(Q)) {
var G = { value: m && (this.isXAxis ? m.x : A(m.stackY, m.y)), translatedValue: Q };
V.polar && a(G, { isCrosshair: !0, chartX: g && g.chartX, chartY: g && g.chartY, point: m }), G = this.getPlotLinePath(G) || null;
}
if (!C(G)) {
this.hideCrosshair();
return;
}
Y = this.categories && !this.isRadial, k || (this.cross = k = V.renderer.path().addClass("highcharts-crosshair highcharts-crosshair-" + (Y ? "category " : "thin ") + (L.className || "")).attr({ zIndex: A(L.zIndex, 2) }).add(), V.styledMode || (k.attr({ stroke: L.color || (Y ? I.parse("#ccd6eb").setOpacity(0.25).get() : "#cccccc"), "stroke-width": A(L.width, 1) }).css({ "pointer-events": "none" }), L.dashStyle && k.attr({ dashstyle: L.dashStyle }))), k.show().attr({ d: G }), Y && !L.width && k.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 l(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, A(m, !0) && L.redraw();
}, X.prototype.remove = function(g) {
for (var m = this.chart, L = this.coll, Y = this.series, V = Y.length; V--; )
Y[V] && Y[V].remove(!1);
w(m.axes, this), w(m[L], this), m[L].forEach(function(Q, k) {
Q.options.index = Q.userOptions.index = k;
}), this.destroy(), m.isDirtyBox = !0, A(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 = B.defaultXAxisOptions, X.keepProps = "extKey hcEvents names series userMax userMin".split(" "), X;
}(), y;
}), E(h, "Core/Axis/DateTimeAxis.js", [h["Core/Utilities.js"]], function(y) {
var B = y.addEvent, I = y.getMagnitude, Z = y.normalizeTickInterval, F = y.timeUnits, U;
return function(H) {
function W() {
return this.chart.time.getTimeTicks.apply(this.chart.time, arguments);
}
function R(d) {
d.userOptions.type !== "datetime" ? this.dateTime = void 0 : this.dateTime || (this.dateTime = new x(this));
}
var S = [];
H.compose = function(d) {
return S.indexOf(d) === -1 && (S.push(d), d.keepProps.push("dateTime"), d.prototype.getTimeTicks = W, B(d, "init", R)), d;
};
var x = function() {
function d(u) {
this.axis = u;
}
return d.prototype.normalizeTimeTickInterval = function(u, P) {
var O = P || [["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]];
P = O[O.length - 1];
var N = F[P[0]], C = P[1], b;
for (b = 0; b < O.length && (P = O[b], N = F[P[0]], C = P[1], !(O[b + 1] && u <= (N * C[C.length - 1] + F[O[b + 1][0]]) / 2)); b++)
;
return N === F.year && u < 5 * N && (C = [1, 2, 5]), u = Z(u / N, C, P[0] === "year" ? Math.max(I(u / N), 1) : 1), { unitRange: N, count: u, unitName: P[0] };
}, d.prototype.getXDateFormat = function(u, P) {
var O = this.axis;
return O.closestPointRange ? O.chart.time.getDateFormat(O.closestPointRange, u, O.options.startOfWeek, P) || P.year : P.day;
}, d;
}();
H.Additions = x;
}(U || (U = {})), U;
}), E(h, "Core/Axis/LogarithmicAxis.js", [h["Core/Utilities.js"]], function(y) {
var B = y.addEvent, I = y.getMagnitude, Z = y.normalizeTickInterval, F = y.pick, U;
return function(H) {
function W(d) {
var u = this.logarithmic;
d.userOptions.type !== "logarithmic" ? this.logarithmic = void 0 : u || (this.logarithmic = new x(this));
}
function R() {
var d = this.logarithmic;
d && (this.lin2val = function(u) {
return d.lin2log(u);
}, this.val2lin = function(u) {
return d.log2lin(u);
});
}
var S = [];
H.compose = function(d) {
return S.indexOf(d) === -1 && (S.push(d), d.keepProps.push("logarithmic"), B(d, "init", W), B(d, "afterInit", R)), d;
};
var x = function() {
function d(u) {
this.axis = u;
}
return d.prototype.getLogTickPositions = function(u, P, O, N) {
var C = this.axis, b = C.len, w = C.options, v = [];
if (N || (this.minorAutoInterval = void 0), 0.5 <= u)
u = Math.round(u), v = C.getLinearTickPositions(u, P, O);
else if (0.08 <= u) {
var a = Math.floor(P), c, p = w = void 0;
for (b = 0.3 < u ? [1, 2, 4] : 0.15 < u ? [1, 2, 4, 6, 8] : [1, 2, 3, 4, 5, 6, 7, 8, 9]; a < O + 1 && !p; a++) {
var i = b.length;
for (c = 0; c < i && !p; c++) {
var l = this.log2lin(this.lin2log(a) * b[c]);
l > P && (!N || w <= O) && typeof w < "u" && v.push(w), w > O && (p = !0), w = l;
}
}
} else
P = this.lin2log(P), O = this.lin2log(O), u = N ? C.getMinorTickInterval() : w.tickInterval, u = F(u === "auto" ? null : u, this.minorAutoInterval, w.tickPixelInterval / (N ? 5 : 1) * (O - P) / ((N ? b / C.tickPositions.length : b) || 1)), u = Z(u, void 0, I(u)), v = C.getLinearTickPositions(u, P, O).map(this.log2lin), N || (this.minorAutoInterval = u / 5);
return N || (C.tickInterval = u), v;
}, d.prototype.lin2log = function(u) {
return Math.pow(10, u);
}, d.prototype.log2lin = function(u) {
return Math.log(u) / Math.LN10;
}, d;
}();
H.Additions = x;
}(U || (U = {})), U;
}), E(h, "Core/Axis/PlotLineOrBand/PlotLineOrBandAxis.js", [h["Core/Utilities.js"]], function(y) {
var B = y.erase, I = y.extend, Z = y.isNumber, F;
return function(U) {
var H = [], W;
U.compose = function(S, x) {
return W || (W = S), H.indexOf(x) === -1 && (H.push(x), I(x.prototype, R.prototype)), x;
};
var R = function() {
function S() {
}
return S.prototype.getPlotBandPath = function(x, d, u) {
u === void 0 && (u = this.options);
var P = this.getPlotLinePath({ value: d, force: !0, acrossPanes: u.acrossPanes }), O = [], N = this.horiz;
if (d = !Z(this.min) || !Z(this.max) || x < this.min && d < this.min || x > this.max && d > this.max, x = this.getPlotLinePath({ value: x, force: !0, acrossPanes: u.acrossPanes }), u = 1, x && P) {
if (d) {
var C = x.toString() === P.toString();
u = 0;
}
for (d = 0; d < x.length; d += 2) {
var b = x[d], w = x[d + 1], v = P[d], a = P[d + 1];
b[0] !== "M" && b[0] !== "L" || w[0] !== "M" && w[0] !== "L" || v[0] !== "M" && v[0] !== "L" || a[0] !== "M" && a[0] !== "L" || (N && v[1] === b[1] ? (v[1] += u, a[1] += u) : N || v[2] !== b[2] || (v[2] += u, a[2] += u), O.push(["M", b[1], b[2]], ["L", w[1], w[2]], ["L", a[1], a[2]], ["L", v[1], v[2]], ["Z"])), O.isFlat = C;
}
}
return O;
}, S.prototype.addPlotBand = function(x) {
return this.addPlotBandOrLine(x, "plotBands");
}, S.prototype.addPlotLine = function(x) {
return this.addPlotBandOrLine(
x,
"plotLines"
);
}, S.prototype.addPlotBandOrLine = function(x, d) {
var u = this, P = this.userOptions, O = new W(this, x);
if (this.visible && (O = O.render()), O) {
if (this._addedPlotLB || (this._addedPlotLB = !0, (P.plotLines || []).concat(P.plotBands || []).forEach(function(C) {
u.addPlotBandOrLine(C);
})), d) {
var N = P[d] || [];
N.push(x), P[d] = N;
}
this.plotLinesAndBands.push(O);
}
return O;
}, S.prototype.removePlotBandOrLine = function(x) {
var d = this.plotLinesAndBands, u = this.options, P = this.userOptions;
if (d) {
for (var O = d.length; O--; )
d[O].id === x && d[O].destroy();
[u.plotLines || [], P.plotLines || [], u.plotBands || [], P.plotBands || []].forEach(function(N) {
for (O = N.length; O--; )
(N[O] || {}).id === x && B(N, N[O]);
});
}
}, S.prototype.removePlotBand = function(x) {
this.removePlotBandOrLine(x);
}, S.prototype.removePlotLine = function(x) {
this.removePlotBandOrLine(x);
}, S;
}();
}(F || (F = {})), F;
}), E(h, "Core/Axis/PlotLineOrBand/PlotLineOrBand.js", [h["Core/Axis/PlotLineOrBand/PlotLineOrBandAxis.js"], h["Core/Utilities.js"]], function(y, B) {
var I = B.arrayMax, Z = B.arrayMin, F = B.defined, U = B.destroyObjectProperties, H = B.erase, W = B.fireEvent, R = B.merge, S = B.objectEach, x = B.pick;
return B = function() {
function d(u, P) {
this.axis = u, P && (this.options = P, this.id = P.id);
}
return d.compose = function(u) {
return y.compose(d, u);
}, d.prototype.render = function() {
W(this, "render");
var u = this, P = u.axis, O = P.horiz, N = P.logarithmic, C = u.options, b = C.color, w = x(C.zIndex, 0), v = C.events, a = {}, c = P.chart.renderer, p = C.label, i = u.label, l = C.to, s = C.from, t = C.value, o = u.svgElem, n = [], A = F(s) && F(l);
n = F(t);
var _ = !o, D = { class: "highcharts-plot-" + (A ? "band " : "line ") + (C.className || "") }, j = A ? "bands" : "lines";
if (N && (s = N.log2lin(s), l = N.log2lin(l), t = N.log2lin(t)), P.chart.styledMode || (n ? (D.stroke = b || "#999999", D["stroke-width"] = x(C.width, 1), C.dashStyle && (D.dashstyle = C.dashStyle)) : A && (D.fill = b || "#e6ebf5", C.borderWidth && (D.stroke = C.borderColor, D["stroke-width"] = C.borderWidth))), a.zIndex = w, j += "-" + w, (N = P.plotLinesAndBandsGroups[j]) || (P.plotLinesAndBandsGroups[j] = N = c.g("plot-" + j).attr(a).add()), _ && (u.svgElem = o = c.path().attr(D).add(N)), n)
n = P.getPlotLinePath({
value: t,
lineWidth: o.strokeWidth(),
acrossPanes: C.acrossPanes
});
else if (A)
n = P.getPlotBandPath(s, l, C);
else
return;
return !u.eventsAdded && v && (S(v, function(T, X) {
o.on(X, function(g) {
v[X].apply(u, [g]);
});
}), u.eventsAdded = !0), (_ || !o.d) && n && n.length ? o.attr({ d: n }) : o && (n ? (o.show(!0), o.animate({ d: n })) : o.d && (o.hide(), i && (u.label = i = i.destroy()))), p && (F(p.text) || F(p.formatter)) && n && n.length && 0 < P.width && 0 < P.height && !n.isFlat ? (p = R({ align: O && A && "center", x: O ? !A && 4 : 10, verticalAlign: !O && A && "middle", y: O ? A ? 16 : 10 : A ? 6 : -4, rotation: O && !A && 90 }, p), this.renderLabel(
p,
n,
A,
w
)) : i && i.hide(), u;
}, d.prototype.renderLabel = function(u, P, O, N) {
var C = this.axis, b = C.chart.renderer, w = this.label;
w || (this.label = w = b.text(this.getLabelText(u), 0, 0, u.useHTML).attr({ align: u.textAlign || u.align, rotation: u.rotation, class: "highcharts-plot-" + (O ? "band" : "line") + "-label " + (u.className || ""), zIndex: N }).add(), C.chart.styledMode || w.css(R({ textOverflow: "ellipsis" }, u.style))), N = P.xBounds || [P[0][1], P[1][1], O ? P[2][1] : P[0][1]], P = P.yBounds || [P[0][2], P[1][2], O ? P[2][2] : P[0][2]], O = Z(N), b = Z(P), w.align(
u,
!1,
{ x: O, y: b, width: I(N) - O, height: I(P) - b }
), w.alignValue && w.alignValue !== "left" || w.css({ width: (w.rotation === 90 ? C.height - (w.alignAttr.y - C.top) : C.width - (w.alignAttr.x - C.left)) + "px" }), w.show(!0);
}, d.prototype.getLabelText = function(u) {
return F(u.formatter) ? u.formatter.call(this) : u.text;
}, d.prototype.destroy = function() {
H(this.axis.plotLinesAndBands, this), delete this.axis, U(this);
}, d;
}(), B;
}), E(h, "Core/Tooltip.js", [
h["Core/FormatUtilities.js"],
h["Core/Globals.js"],
h["Core/Renderer/RendererUtilities.js"],
h["Core/Renderer/RendererRegistry.js"],
h["Core/Utilities.js"]
], function(y, B, I, Z, F) {
var U = y.format, H = B.doc, W = I.distribute, R = F.addEvent, S = F.clamp, x = F.css, d = F.defined, u = F.discardElement, P = F.extend, O = F.fireEvent, N = F.isArray, C = F.isNumber, b = F.isString, w = F.merge, v = F.pick, a = F.splat, c = F.syncTimeout;
return y = function() {
function p(i, l) {
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, l);
}
return p.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" } }] }] });
}, p.prototype.bodyFormatter = function(i) {
return i.map(function(l) {
var s = l.series.tooltipOptions;
return (s[(l.point.formatPrefix || "point") + "Formatter"] || l.point.tooltipFormatter).call(l.point, s[(l.point.formatPrefix || "point") + "Format"] || "");
});
}, p.prototype.cleanSplit = function(i) {
this.chart.series.forEach(function(l) {
var s = l && l.tt;
s && (!s.isActive || i ? l.tt = s.destroy() : s.isActive = !1);
});
}, p.prototype.defaultFormatter = function(i) {
var l = this.points || a(this), s = [i.tooltipFooterHeaderFormatter(l[0])];
return s = s.concat(i.bodyFormatter(l)), s.push(i.tooltipFooterHeaderFormatter(
l[0],
!0
)), s;
}, p.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(), u(this.container)), F.clearTimeout(this.hideTimer), F.clearTimeout(this.tooltipTimeout);
}, p.prototype.getAnchor = function(i, l) {
var s = this.chart, t = s.pointer, o = s.inverted, n = s.plotTop, A = s.plotLeft, _, D, j = 0, T = 0;
return i = a(i), this.followPointer && l ? (typeof l.chartX > "u" && (l = t.normalize(l)), t = [l.chartX - A, l.chartY - n]) : i[0].tooltipPos ? t = i[0].tooltipPos : (i.forEach(function(X) {
_ = X.series.yAxis, D = X.series.xAxis, j += X.plotX || 0, T += X.plotLow ? (X.plotLow + (X.plotHigh || 0)) / 2 : X.plotY || 0, D && _ && (o ? (j += n + s.plotHeight - D.len - D.pos, T += A + s.plotWidth - _.len - _.pos) : (j += D.pos - A, T += _.pos - n));
}), j /= i.length, T /= i.length, t = [o ? s.plotWidth - T : j, o ? s.plotHeight - j : T], this.shared && 1 < i.length && l && (o ? t[0] = l.chartX - A : t[1] = l.chartY - n)), t.map(Math.round);
}, p.prototype.getLabel = function() {
var i = this, l = this.chart.styledMode, s = this.options, t = this.split && this.allowShared, o = "tooltip" + (d(s.className) ? " " + s.className : ""), n = s.style.pointerEvents || (!this.followPointer && s.stickOnContact ? "auto" : "none"), A = function() {
i.inContact = !0;
}, _ = function(Y) {
var V = i.chart.hoverSeries;
i.inContact = i.shouldStickOnContact() && i.chart.pointer.inClass(Y.relatedTarget, "highcharts-tooltip"), !i.inContact && V && V.onMouseOut && V.onMouseOut();
}, D, j = this.chart.renderer;
if (i.label) {
var T = !i.label.hasClass("highcharts-label");
(t && !T || !t && T) && i.destroy();
}
if (!this.label) {
if (this.outside) {
T = this.chart.options.chart.style;
var X = Z.getRendererType();
this.container = D = B.doc.createElement("div"), D.className = "highcharts-tooltip-container", x(D, { position: "absolute", top: "1px", pointerEvents: n, zIndex: Math.max(this.options.style.zIndex || 0, (T && T.zIndex || 0) + 3) }), R(D, "mouseenter", A), R(D, "mouseleave", _), B.doc.body.appendChild(D), this.renderer = j = new X(D, 0, 0, T, void 0, void 0, j.styledMode);
}
if (t ? this.label = j.g(o) : (this.label = j.label("", 0, 0, s.shape, void 0, void 0, s.useHTML, void 0, o).attr({ padding: s.padding, r: s.borderRadius }), l || this.label.attr({ fill: s.backgroundColor, "stroke-width": s.borderWidth }).css(s.style).css({ pointerEvents: n }).shadow(s.shadow)), l && s.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(Y) {
m.call(g, i.distance), D.style.left = Y + "px";
}, g.ySetter = function(Y) {
L.call(g, i.distance), D.style.top = Y + "px";
};
}
this.label.on("mouseenter", A).on("mouseleave", _).attr({ zIndex: 8 }).add();
}
return this.label;
}, p.prototype.getPosition = function(i, l, s) {
var t = this.chart, o = this.distance, n = {}, A = t.inverted && s.h || 0, _ = this.outside, D = _ ? H.documentElement.clientWidth - 2 * o : t.chartWidth, j = _ ? Math.max(H.body.scrollHeight, H.documentElement.scrollHeight, H.body.offsetHeight, H.documentElement.offsetHeight, H.documentElement.clientHeight) : t.chartHeight, T = t.pointer.getChartPosition(), X = function(z) {
var $ = z === "x";
return [z, $ ? D : j, $ ? i : l].concat(_ ? [$ ? i * T.scaleX : l * T.scaleY, $ ? T.left - o + (s.plotX + t.plotLeft) * T.scaleX : T.top - o + (s.plotY + t.plotTop) * T.scaleY, 0, $ ? D : j] : [$ ? i : l, $ ? s.plotX + t.plotLeft : s.plotY + t.plotTop, $ ? t.plotLeft : t.plotTop, $ ? t.plotLeft + t.plotWidth : t.plotTop + t.plotHeight]);
}, g = X("y"), m = X("x"), L;
X = !!s.negative, !t.polar && t.hoverSeries && t.hoverSeries.yAxis && t.hoverSeries.yAxis.reversed && (X = !X);
var Y = !this.followPointer && v(s.ttBelow, !t.inverted === X), V = function(z, $, q, it, et, nt, rt) {
var ct = _ ? z === "y" ? o * T.scaleY : o * T.scaleX : o, gt = (q - it) / 2, dt = it < et - o, lt = et + o + it < $, at = et - ct - q + gt;
if (et = et + ct - gt, Y && lt)
n[z] = et;
else if (!Y && dt)
n[z] = at;
else if (dt)
n[z] = Math.min(rt - it, 0 > at - A ? at : at - A);
else if (lt)
n[z] = Math.max(nt, et + A + q > $ ? et : et + A);
else
return !1;
}, Q = function(z, $, q, it, et) {
var nt;
return et < o || et > $ - o ? nt = !1 : n[z] = et < q / 2 ? 1 : et > $ - it / 2 ? $ - it - 2 : et - q / 2, nt;
}, k = function(z) {
var $ = g;
g = m, m = $, L = z;
}, G = function() {
V.apply(0, g) !== !1 ? Q.apply(0, m) !== !1 || L || (k(!0), G()) : L ? n.x = n.y = 0 : (k(!0), G());
};
return (t.inverted || 1 < this.len) && k(), G(), n;
}, p.prototype.hide = function(i) {
var l = this;
F.clearTimeout(this.hideTimer), i = v(i, this.options.hideDelay), this.isHidden || (this.hideTimer = c(function() {
l.getLabel().fadeOut(i && void 0), l.isHidden = !0;
}, i));
}, p.prototype.init = function(i, l) {
this.chart = i, this.options = l, this.crosshairs = [], this.now = { x: 0, y: 0 }, this.isHidden = !0, this.split = l.split && !i.inverted && !i.polar, this.shared = l.shared || this.split, this.outside = v(l.outside, !(!i.scrollablePixelsX && !i.scrollablePixelsY));
}, p.prototype.shouldStickOnContact = function() {
return !(this.followPointer || !this.options.stickOnContact);
}, p.prototype.isStickyOnContact = function() {
return !(!this.shouldStickOnContact() || !this.inContact);
}, p.prototype.move = function(i, l, s, t) {
var o = this, n = o.now, A = o.options.animation !== !1 && !o.isHidden && (1 < Math.abs(i - n.x) || 1 < Math.abs(l - n.y)), _ = o.followPointer || 1 < o.len;
P(n, { x: A ? (2 * n.x + i) / 3 : i, y: A ? (n.y + l) / 2 : l, anchorX: _ ? void 0 : A ? (2 * n.anchorX + s) / 3 : s, anchorY: _ ? void 0 : A ? (n.anchorY + t) / 2 : t }), o.getLabel().attr(n), o.drawTracker(), A && (F.clearTimeout(this.tooltipTimeout), this.tooltipTimeout = setTimeout(function() {
o && o.move(i, l, s, t);
}, 32));
}, p.prototype.refresh = function(i, l) {
var s = this.chart, t = this.options, o = a(i), n = o[0], A = [], _ = t.formatter || this.defaultFormatter, D = this.shared, j = s.styledMode, T = {};
if (t.enabled) {
F.clearTimeout(this.hideTimer), this.allowShared = !(!N(i) && i.series && i.series.noSharedTooltip), this.followPointer = !this.split && n.series.tooltipOptions.followPointer, i = this.getAnchor(i, l);
var X = i[0], g = i[1];
if (D && this.allowShared ? (s.pointer.applyInactiveState(o), o.forEach(function(Y) {
Y.setState("hover"), A.push(Y.getLabelConfig());
}), T = { x: n.category, y: n.y }, T.points = A) : T = n.getLabelConfig(), this.len = A.length, _ = _.call(T, this), D = n.series, this.distance = v(
D.tooltipOptions.distance,
16
), _ === !1)
this.hide();
else {
if (this.split && this.allowShared)
this.renderSplit(_, o);
else {
var m = X, L = g;
if (l && s.pointer.isDirectTouch && (m = l.chartX - s.plotLeft, L = l.chartY - s.plotTop), s.polar || D.options.clip === !1 || o.some(function(Y) {
return Y.series.shouldShowTooltip(m, L);
}))
l = this.getLabel(), t.style.width && !j || l.css({ width: this.chart.spacingBox.width + "px" }), l.attr({ text: _ && _.join ? _.join("") : _ }), l.removeClass(/highcharts-color-[\d]+/g).addClass("highcharts-color-" + v(n.colorIndex, D.colorIndex)), j || l.attr({ stroke: t.borderColor || n.color || D.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");
}
}, p.prototype.renderSplit = function(i, l) {
function s(lt, at, J, tt, st) {
return st === void 0 && (st = !0), J ? (at = it ? 0 : ct, lt = S(lt - tt / 2, z.left, z.right - tt - (t.outside ? et : 0))) : (at -= nt, lt = st ? lt - tt - Q : lt + Q, lt = S(lt, st ? lt : z.left, z.right)), { x: lt, y: at };
}
var t = this, o = t.chart, n = t.chart, A = n.chartWidth, _ = n.chartHeight, D = n.plotHeight, j = n.plotLeft, T = 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 Y = L.scrollLeft;
L = L.scrollTop;
var V = n.styledMode, Q = t.distance, k = t.options, G = t.options.positioner, z = t.outside && typeof m != "number" ? H.documentElement.getBoundingClientRect() : { left: Y, right: Y + A, top: L, bottom: L + _ }, $ = t.getLabel(), q = this.renderer || o.renderer, it = !(!o.xAxis[0] || !o.xAxis[0].opposite);
o = X.getChartPosition();
var et = o.left;
o = o.top;
var nt = T + L, rt = 0, ct = D - g;
b(i) && (i = [!1, i]), i = i.slice(0, l.length + 1).reduce(function(lt, at, J) {
if (at !== !1 && at !== "") {
J = l[J - 1] || { isHeader: !0, plotX: l[0].plotX, plotY: D, series: {} };
var tt = J.isHeader, st = tt ? t : J.series;
at = at.toString();
var ht = st.tt, pt = J.isHeader, yt = J.series, vt = "highcharts-color-" + v(J.colorIndex, yt.colorIndex, "none");
if (ht || (ht = { padding: k.padding, r: k.borderRadius }, V || (ht.fill = k.backgroundColor, ht["stroke-width"] = k.borderWidth), ht = q.label("", 0, 0, k[pt ? "headerShape" : "shape"], void 0, void 0, k.useHTML).addClass((pt ? "highcharts-tooltip-header " : "") + "highcharts-tooltip-box " + vt).attr(ht).add($)), ht.isActive = !0, ht.attr({ text: at }), V || ht.css(k.style).shadow(k.shadow).attr({ stroke: k.borderColor || J.color || yt.color || "#333333" }), st = st.tt = ht, pt = st.getBBox(), at = pt.width + st.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, ht = J.series, J.isHeader) {
yt = j + yt;
var Ct = T + D / 2;
} else {
var Pt = ht.xAxis, kt = ht.yAxis;
yt = Pt.pos + S(yt, -Q, Pt.len + Q), ht.shouldShowTooltip(0, kt.pos - T + vt, { ignoreX: !0 }) && (Ct = kt.pos + vt);
}
yt = S(
yt,
z.left - Q,
z.right + Q
), typeof Ct == "number" ? (pt = pt.height + 1, vt = G ? G.call(t, at, pt, J) : s(yt, Ct, tt, at), lt.push({ align: G ? 0 : void 0, anchorX: yt, anchorY: Ct, boxWidth: at, point: J, rank: v(vt.rank, tt ? 1 : 0), size: pt, target: vt.y, tt: st, x: vt.x })) : st.isActive = !1;
}
return lt;
}, []), !G && i.some(function(lt) {
var at = (t.outside ? et : 0) + lt.anchorX;
return at < z.left && at + lt.boxWidth < z.right ? !0 : at < et - z.left + lt.boxWidth && z.right - at > at;
}) && (i = i.map(function(lt) {
var at = s(lt.anchorX, lt.anchorY, lt.point.isHeader, lt.boxWidth, !1);
return P(lt, { target: at.y, x: at.x });
})), t.cleanSplit(), W(i, ct);
var gt = et, dt = et;
i.forEach(function(lt) {
var at = lt.x, J = lt.boxWidth;
lt = lt.isHeader, lt || (t.outside && et + at < gt && (gt = et + at), !lt && t.outside && gt + J > dt && (dt = et + at));
}), i.forEach(function(lt) {
var at = lt.x, J = lt.anchorX, tt = lt.pos, st = lt.point.isHeader;
if (tt = { visibility: typeof tt > "u" ? "hidden" : "inherit", x: at, y: tt + nt, anchorX: J, anchorY: lt.anchorY }, t.outside && at < J) {
var ht = et - gt;
0 < ht && (st || (tt.x = at + ht, tt.anchorX = J + ht), st && (tt.x = (dt - gt) / 2, tt.anchorX = J + ht));
}
lt.tt.attr(tt);
}), i = t.container, g = t.renderer, t.outside && i && g && (n = $.getBBox(), g.setSize(n.width + n.x, n.height + n.y, !1), i.style.left = gt + "px", i.style.top = o + "px");
}, p.prototype.drawTracker = function() {
if (this.followPointer || !this.options.stickOnContact)
this.tracker && this.tracker.destroy();
else {
var i = this.chart, l = this.label, s = this.shared ? i.hoverPoints : i.hoverPoint;
if (l && s) {
var t = { x: 0, y: 0, width: 0, height: 0 };
s = this.getAnchor(s);
var o = l.getBBox();
s[0] += i.plotLeft - l.translateX, s[1] += i.plotTop - l.translateY, t.x = Math.min(0, s[0]), t.y = Math.min(0, s[1]), t.width = 0 > s[0] ? Math.max(Math.abs(s[0]), o.width - s[0]) : Math.max(
Math.abs(s[0]),
o.width
), t.height = 0 > s[1] ? Math.max(Math.abs(s[1]), o.height - Math.abs(s[1])) : Math.max(Math.abs(s[1]), o.height), this.tracker ? this.tracker.attr(t) : (this.tracker = l.renderer.rect(t).addClass("highcharts-tracker").add(l), i.styledMode || this.tracker.attr({ fill: "rgba(0,0,0,0)" }));
}
}
}, p.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}"');
}, p.prototype.tooltipFooterHeaderFormatter = function(i, l) {
var s = i.series, t = s.tooltipOptions, o = s.xAxis, n = o && o.dateTime;
o = { isFooter: l, labelConfig: i };
var A = t.xDateFormat, _ = t[l ? "footerFormat" : "headerFormat"];
return O(this, "headerFormatter", o, function(D) {
n && !A && C(i.key) && (A = n.getXDateFormat(i.key, t.dateTimeLabelFormats)), n && A && (i.point && i.point.tooltipDateKeys || ["key"]).forEach(function(j) {
_ = _.replace("{point." + j + "}", "{point." + j + ":" + A + "}");
}), s.chart.styledMode && (_ = this.styledModeFormat(_)), D.text = U(_, { point: i, series: s }, this.chart);
}), o.text;
}, p.prototype.update = function(i) {
this.destroy(), w(!0, this.chart.options.tooltip.userOptions, i), this.init(this.chart, w(!0, this.options, i));
}, p.prototype.updatePosition = function(i) {
var l = this.chart, s = this.options, t = l.pointer, o = this.getLabel();
t = t.getChartPosition();
var n = (s.positioner || this.getPosition).call(this, o.width, o.height, i), A = i.plotX + l.plotLeft;
i = i.plotY + l.plotTop, this.outside && (s = s.borderWidth + 2 * this.distance, this.renderer.setSize(o.width + s, o.height + s, !1), (t.scaleX !== 1 || t.scaleY !== 1) && (x(this.container, { transform: "scale(" + t.scaleX + ", " + t.scaleY + ")" }), A *= t.scaleX, i *= t.scaleY), A += t.left - n.x, i += t.top - n.y), this.move(Math.round(n.x), Math.round(n.y || 0), A, i);
}, p;
}(), y;
}), E(h, "Core/Series/Point.js", [h["Core/Renderer/HTML/AST.js"], h["Core/Animation/AnimationUtilities.js"], h["Core/DefaultOptions.js"], h["Core/FormatUtilities.js"], h["Core/Utilities.js"]], function(y, B, I, Z, F) {
var U = B.animObject, H = I.defaultOptions, W = Z.format, R = F.addEvent, S = F.defined, x = F.erase, d = F.extend, u = F.fireEvent, P = F.getNestedProperty, O = F.isArray, N = F.isFunction, C = F.isNumber, b = F.isObject, w = F.merge, v = F.objectEach, a = F.pick, c = F.syncTimeout, p = F.removeEvent, i = F.uniqueKey;
return B = function() {
function l() {
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 l.prototype.animateBeforeDestroy = function() {
var s = this, t = { x: s.startXPos, opacity: 0 }, o = s.getGraphicalProps();
o.singular.forEach(function(n) {
s[n] = s[n].animate(n === "dataLabel" ? { x: s[n].startXPos, y: s[n].startYPos, opacity: 0 } : t);
}), o.plural.forEach(function(n) {
s[n].forEach(function(A) {
A.element && A.animate(d({ x: s.startXPos }, A.startYPos ? { x: A.startXPos, y: A.startYPos } : {}));
});
});
}, l.prototype.applyOptions = function(s, t) {
var o = this.series, n = o.options.pointValKey || o.pointValKey;
return s = l.prototype.optionsToObject.call(this, s), d(this, s), this.options = this.options ? d(this.options, s) : s, s.group && delete this.group, s.dataLabels && delete this.dataLabels, n && (this.y = l.prototype.getNestedProperty.call(
this,
n
)), this.formatPrefix = (this.isNull = a(this.isValid && !this.isValid(), this.x === null || !C(this.y))) ? "null" : "point", this.selected && (this.state = "select"), "name" in this && typeof t > "u" && o.xAxis && o.xAxis.hasNames && (this.x = o.xAxis.nameToX(this)), typeof this.x > "u" && o ? this.x = typeof t > "u" ? o.autoIncrement() : t : C(s.x) && o.options.relativeXValue && (this.x = o.autoIncrement(s.x)), this;
}, l.prototype.destroy = function() {
function s() {
(t.graphic || t.dataLabel || t.dataLabels) && (p(t), t.destroyElements());
for (D in t)
t[D] = null;
}
var t = this, o = t.series, n = o.chart;
o = o.options.dataSorting;
var A = n.hoverPoints, _ = U(t.series.chart.renderer.globalAnimation), D;
t.legendItem && n.legend.destroyItem(t), A && (t.setState(), x(A, t), A.length || (n.hoverPoints = null)), t === n.hoverPoint && t.onMouseOut(), o && o.enabled ? (this.animateBeforeDestroy(), c(s, _.duration)) : s(), n.pointCount--;
}, l.prototype.destroyElements = function(s) {
var t = this;
s = t.getGraphicalProps(s), s.singular.forEach(function(o) {
t[o] = t[o].destroy();
}), s.plural.forEach(function(o) {
t[o].forEach(function(n) {
n.element && n.destroy();
}), delete t[o];
});
}, l.prototype.firePointEvent = function(s, t, o) {
var n = this, A = this.series.options;
(A.point.events[s] || n.options && n.options.events && n.options.events[s]) && n.importEvents(), s === "click" && A.allowPointSelect && (o = function(_) {
n.select && n.select(null, _.ctrlKey || _.metaKey || _.shiftKey);
}), u(n, s, t, o);
}, l.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", "") : "");
}, l.prototype.getGraphicalProps = function(s) {
var t = this, o = [], n = { singular: [], plural: [] }, A;
for (s = s || { graphic: 1, dataLabel: 1 }, s.graphic && o.push("graphic", "upperGraphic", "shadowGroup"), s.dataLabel && o.push("dataLabel", "dataLabelUpper", "connector"), A = o.length; A--; ) {
var _ = o[A];
t[_] && n.singular.push(_);
}
return ["dataLabel", "connector"].forEach(function(D) {
var j = D + "s";
s[D] && t[j] && n.plural.push(j);
}), n;
}, l.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 };
}, l.prototype.getNestedProperty = function(s) {
if (s)
return s.indexOf("custom.") === 0 ? P(s, this.options) : this[s];
}, l.prototype.getZone = function() {
var s = this.series, t = s.zones;
s = s.zoneAxis || "y";
var o, n = 0;
for (o = t[n]; this[s] >= o.value; )
o = t[++n];
return this.nonZonedColor || (this.nonZonedColor = this.color), this.color = o && o.color && !this.options.color ? o.color : this.nonZonedColor, o;
}, l.prototype.hasNewShapeType = function() {
return (this.graphic && (this.graphic.symbolName || this.graphic.element.nodeName)) !== this.shapeType;
}, l.prototype.init = function(s, t, o) {
return this.series = s, this.applyOptions(t, o), this.id = S(this.id) ? this.id : i(), this.resolveColor(), s.chart.pointCount++, u(this, "afterInit"), this;
}, l.prototype.optionsToObject = function(s) {
var t = this.series, o = t.options.keys, n = o || t.pointArrayMap || ["y"], A = n.length, _ = {}, D = 0, j = 0;
if (C(s) || s === null)
_[n[0]] = s;
else if (O(s))
for (!o && s.length > A && (t = typeof s[0], t === "string" ? _.name = s[0] : t === "number" && (_.x = s[0]), D++); j < A; )
o && typeof s[D] > "u" || (0 < n[j].indexOf(".") ? l.prototype.setNestedProperty(_, s[D], n[j]) : _[n[j]] = s[D]), D++, j++;
else
typeof s == "object" && (_ = s, s.dataLabels && (t._hasPointLabels = !0), s.marker && (t._hasPointMarkers = !0));
return _;
}, l.prototype.resolveColor = function() {
var s = this.series, t = s.chart.styledMode, o = s.chart.options.chart.colorCount;
if (delete this.nonZonedColor, s.options.colorByPoint) {
if (!t) {
o = s.options.colors || s.chart.options.colors;
var n = o[s.colorCounter];
o = o.length;
}
t = s.colorCounter, s.colorCounter++, s.colorCounter === o && (s.colorCounter = 0);
} else
t || (n = s.color), t = s.colorIndex;
this.colorIndex = a(this.options.colorIndex, t), this.color = a(this.options.color, n);
}, l.prototype.setNestedProperty = function(s, t, o) {
return o.split(".").reduce(function(n, A, _, D) {
return n[A] = D.length - 1 === _ ? t : b(n[A], !0) ? n[A] : {}, n[A];
}, s), s;
}, l.prototype.tooltipFormatter = function(s) {
var t = this.series, o = t.tooltipOptions, n = a(o.valueDecimals, ""), A = o.valuePrefix || "", _ = o.valueSuffix || "";
return t.chart.styledMode && (s = t.chart.tooltip.styledModeFormat(s)), (t.pointArrayMap || ["y"]).forEach(function(D) {
D = "{point." + D, (A || _) && (s = s.replace(RegExp(D + "}", "g"), A + D + "}" + _)), s = s.replace(RegExp(D + "}", "g"), D + ":,." + n + "f}");
}), W(s, { point: this, series: this.series }, t.chart);
}, l.prototype.update = function(s, t, o, n) {
function A() {
_.applyOptions(s);
var m = j && _.hasDummyGraphic;
m = _.y === null ? !m : m, j && m && (_.graphic = j.destroy(), delete _.hasDummyGraphic), b(s, !0) && (j && j.element && s && s.marker && typeof s.marker.symbol < "u" && (_.graphic = j.destroy()), s && s.dataLabels && _.dataLabel && (_.dataLabel = _.dataLabel.destroy()), _.connector && (_.connector = _.connector.destroy())), g = _.index, D.updateParallelArrays(_, g), X.data[g] = b(X.data[g], !0) || b(s, !0) ? _.options : a(s, X.data[g]), D.isDirty = D.isDirtyData = !0, !D.fixedBox && D.hasCartesianSeries && (T.isDirtyBox = !0), X.legendType === "point" && (T.isDirtyLegend = !0), t && T.redraw(o);
}
var _ = this, D = _.series, j = _.graphic, T = D.chart, X = D.options, g;
t = a(t, !0), n === !1 ? A() : _.firePointEvent("update", { options: s }, A);
}, l.prototype.remove = function(s, t) {
this.series.removePoint(this.series.data.indexOf(this), s, t);
}, l.prototype.select = function(s, t) {
var o = this, n = o.series, A = n.chart;
this.selectedStaging = s = a(s, !o.selected), o.firePointEvent(s ? "select" : "unselect", { accumulate: t }, function() {
o.selected = o.options.selected = s, n.options.data[n.data.indexOf(o)] = o.options, o.setState(s && "select"), t || A.getSelectedPoints().forEach(function(_) {
var D = _.series;
_.selected && _ !== o && (_.selected = _.options.selected = !1, D.options.data[D.data.indexOf(_)] = _.options, _.setState(A.hoverPoints && D.options.inactiveOtherPoints ? "inactive" : ""), _.firePointEvent("unselect"));
});
}), delete this.selectedStaging;
}, l.prototype.onMouseOver = function(s) {
var t = this.series.chart, o = t.pointer;
s = s ? o.normalize(s) : o.getChartCoordinatesFromPoint(this, t.inverted), o.runPointActions(
s,
this
);
}, l.prototype.onMouseOut = function() {
var s = this.series.chart;
this.firePointEvent("mouseOut"), this.series.options.inactiveOtherPoints || (s.hoverPoints || []).forEach(function(t) {
t.setState();
}), s.hoverPoints = s.hoverPoint = null;
}, l.prototype.importEvents = function() {
if (!this.hasImportedEvents) {
var s = this, t = w(s.series.options.point, s.options).events;
s.events = t, v(t, function(o, n) {
N(o) && R(s, n, o);
}), this.hasImportedEvents = !0;
}
}, l.prototype.setState = function(s, t) {
var o = this.series, n = this.state, A = o.options.states[s || "normal"] || {}, _ = H.plotOptions[o.type].marker && o.options.marker, D = _ && _.enabled === !1, j = _ && _.states && _.states[s || "normal"] || {}, T = j.enabled === !1, X = this.marker || {}, g = o.chart, m = _ && o.markerAttribs, L = o.halo, Y, V = o.stateMarkerGraphic;
if (s = s || "", !(s === this.state && !t || this.selected && s !== "select" || A.enabled === !1 || s && (T || D && j.enabled === !1) || s && X.states && X.states[s] && X.states[s].enabled === !1)) {
if (this.state = s, m && (Y = o.markerAttribs(this, s)), this.graphic && !this.hasDummyGraphic) {
if (n && this.graphic.removeClass("highcharts-point-" + n), s && this.graphic.addClass("highcharts-point-" + s), !g.styledMode) {
var Q = o.pointAttribs(this, s), k = a(g.options.chart.animation, A.animation);
o.options.inactiveOtherPoints && C(Q.opacity) && ((this.dataLabels || []).forEach(function(G) {
G && G.animate({ opacity: Q.opacity }, k);
}), this.connector && this.connector.animate({ opacity: Q.opacity }, k)), this.graphic.animate(Q, k);
}
Y && this.graphic.animate(Y, a(g.options.chart.animation, j.animation, _.animation)), V && V.hide();
} else
s && j && (n = X.symbol || o.symbol, V && V.currentSymbol !== n && (V = V.destroy()), Y && (V ? V[t ? "animate" : "attr"]({ x: Y.x, y: Y.y }) : n && (o.stateMarkerGraphic = V = g.renderer.symbol(n, Y.x, Y.y, Y.width, Y.height).add(o.markerGroup), V.currentSymbol = n)), !g.styledMode && V && this.state !== "inactive" && V.attr(o.pointAttribs(this, s))), V && (V[s && this.isInside ? "show" : "hide"](), V.element.point = this, V.addClass(this.getClassName(), !0));
A = A.halo, Y = (V = this.graphic || V) && V.visibility || "inherit", A && A.size && V && Y !== "hidden" && !this.isCluster ? (L || (o.halo = L = g.renderer.path().add(V.parentGroup)), L.show()[t ? "animate" : "attr"]({ d: this.haloPath(A.size) }), L.attr({ class: "highcharts-halo highcharts-color-" + a(this.colorIndex, o.colorIndex) + (this.className ? " " + this.className : ""), visibility: Y, zIndex: -1 }), L.point = this, g.styledMode || L.attr(d({ fill: this.color || o.color, "fill-opacity": A.opacity }, y.filterUserAttributes(A.attributes || {})))) : L && L.point && L.point.haloPath && L.animate({ d: L.point.haloPath(0) }, null, L.hide), u(this, "afterSetState", { state: s });
}
}, l.prototype.haloPath = function(s) {
return this.series.chart.renderer.symbols.circle(Math.floor(this.plotX) - s, this.plotY - s, 2 * s, 2 * s);
}, l;
}(), B;
}), E(h, "Core/Pointer.js", [h["Core/Color/Color.js"], h["Core/Globals.js"], h["Core/Tooltip.js"], h["Core/Utilities.js"]], function(y, B, I, Z) {
var F = y.parse, U = B.charts, H = B.noop, W = Z.addEvent, R = Z.attr, S = Z.css, x = Z.defined, d = Z.extend, u = Z.find, P = Z.fireEvent, O = Z.isNumber, N = Z.isObject, C = Z.objectEach, b = Z.offset, w = Z.pick, v = Z.splat;
return y = function() {
function a(c, p) {
this.lastValidTouch = {}, this.pinchDown = [], this.runChartClick = !1, this.eventsToUnbind = [], this.chart = c, this.hasDragged = !1, this.options = p, this.init(c, p);
}
return a.prototype.applyInactiveState = function(c) {
var p = [], i;
(c || []).forEach(function(l) {
i = l.series, p.push(i), i.linkedParent && p.push(i.linkedParent), i.linkedSeries && (p = p.concat(i.linkedSeries)), i.navigatorSeries && p.push(i.navigatorSeries);
}), this.chart.series.forEach(function(l) {
p.indexOf(l) === -1 ? l.setState("inactive", !0) : l.options.inactiveOtherPoints && l.setAllPointsToState("inactive");
});
}, a.prototype.destroy = function() {
var c = this;
this.eventsToUnbind.forEach(function(p) {
return p();
}), this.eventsToUnbind = [], B.chartCount || (a.unbindDocumentMouseUp && (a.unbindDocumentMouseUp = a.unbindDocumentMouseUp()), a.unbindDocumentTouchEnd && (a.unbindDocumentTouchEnd = a.unbindDocumentTouchEnd())), clearInterval(c.tooltipTimeout), C(c, function(p, i) {
c[i] = void 0;
});
}, a.prototype.drag = function(c) {
var p = this.chart, i = p.options.chart, l = this.zoomHor, s = this.zoomVert, t = p.plotLeft, o = p.plotTop, n = p.plotWidth, A = p.plotHeight, _ = this.mouseDownX || 0, D = this.mouseDownY || 0, j = N(i.panning) ? i.panning && i.panning.enabled : i.panning, T = 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 < o ? g = o : g > o + A && (g = o + A), this.hasDragged = Math.sqrt(Math.pow(_ - X, 2) + Math.pow(D - g, 2)), 10 < this.hasDragged)) {
var L = p.isInsidePlot(_ - t, D - o, { visiblePlotOnly: !0 });
!p.hasCartesianSeries && !p.mapView || !this.zoomX && !this.zoomY || !L || T || m || (this.selectionMarker = m = p.renderer.rect(t, o, l ? 1 : n, s ? 1 : A, 0).attr({ class: "highcharts-selection-marker", zIndex: 7 }).add(), p.styledMode || m.attr({ fill: i.selectionMarkerFill || F("#335cad").setOpacity(0.25).get() })), m && l && (l = X - _, m.attr({ width: Math.abs(l), x: (0 < l ? 0 : l) + _ })), m && s && (l = g - D, m.attr({ height: Math.abs(l), y: (0 < l ? 0 : l) + D })), L && !m && j && p.pan(c, i.panning);
}
}, a.prototype.dragStart = function(c) {
var p = this.chart;
p.mouseIsDown = c.type, p.cancelClick = !1, p.mouseDownX = this.mouseDownX = c.chartX, p.mouseDownY = this.mouseDownY = c.chartY;
}, a.prototype.drop = function(c) {
var p = this, i = this.chart, l = this.hasPinched;
if (this.selectionMarker) {
var s = this.selectionMarker, t = s.attr ? s.attr("x") : s.x, o = s.attr ? s.attr("y") : s.y, n = s.attr ? s.attr("width") : s.width, A = s.attr ? s.attr("height") : s.height, _ = { originalEvent: c, xAxis: [], yAxis: [], x: t, y: o, width: n, height: A }, D = !!i.mapView;
(this.hasDragged || l) && (i.axes.forEach(function(j) {
if (j.zoomEnabled && x(j.min) && (l || p[{ xAxis: "zoomX", yAxis: "zoomY" }[j.coll]]) && O(t) && O(o)) {
var T = j.horiz, X = c.type === "touchend" ? j.minPixelPadding : 0, g = j.toValue((T ? t : o) + X);
T = j.toValue((T ? t + n : o + A) - X), _[j.coll].push({ axis: j, min: Math.min(g, T), max: Math.max(g, T) }), D = !0;
}
}), D && P(i, "selection", _, function(j) {
i.zoom(d(
j,
l ? { animation: !1 } : null
));
})), O(i.index) && (this.selectionMarker = this.selectionMarker.destroy()), l && this.scaleGroups();
}
i && O(i.index) && (S(i.container, { cursor: i._cursor }), i.cancelClick = 10 < this.hasDragged, i.mouseIsDown = this.hasDragged = this.hasPinched = !1, this.pinchDown = []);
}, a.prototype.findNearestKDPoint = function(c, p, i) {
var l = this.chart, s = l.hoverPoint;
if (l = l.tooltip, s && l && l.isStickyOnContact())
return s;
var t;
return c.forEach(function(o) {
var n = !(o.noSharedTooltip && p) && 0 > o.options.findNearestPointBy.indexOf("y");
if (o = o.searchPoint(i, n), (n = N(o, !0) && o.series) && !(n = !N(t, !0))) {
n = t.distX - o.distX;
var A = t.dist - o.dist, _ = (o.series.group && o.series.group.zIndex) - (t.series.group && t.series.group.zIndex);
n = 0 < (n !== 0 && p ? n : A !== 0 ? A : _ !== 0 ? _ : t.series.index > o.series.index ? -1 : 1);
}
n && (t = o);
}), t;
}, a.prototype.getChartCoordinatesFromPoint = function(c, p) {
var i = c.series, l = i.xAxis;
i = i.yAxis;
var s = c.shapeArgs;
if (l && i) {
var t = w(c.clientX, c.plotX), o = c.plotY || 0;
return c.isNode && s && O(s.x) && O(s.y) && (t = s.x, o = s.y), p ? { chartX: i.len + i.pos - o, chartY: l.len + l.pos - t } : { chartX: t + l.pos, chartY: o + i.pos };
}
if (s && s.x && s.y)
return { chartX: s.x, chartY: s.y };
}, a.prototype.getChartPosition = function() {
if (this.chartPosition)
return this.chartPosition;
var c = this.chart.container, p = b(c);
this.chartPosition = { left: p.left, top: p.top, scaleX: 1, scaleY: 1 };
var i = c.offsetWidth;
return c = c.offsetHeight, 2 < i && 2 < c && (this.chartPosition.scaleX = p.width / i, this.chartPosition.scaleY = p.height / c), this.chartPosition;
}, a.prototype.getCoordinates = function(c) {
var p = { xAxis: [], yAxis: [] };
return this.chart.axes.forEach(function(i) {
p[i.isXAxis ? "xAxis" : "yAxis"].push({ axis: i, value: i.toValue(c[i.horiz ? "chartX" : "chartY"]) });
}), p;
}, a.prototype.getHoverData = function(c, p, i, l, s, t) {
var o = [];
l = !(!l || !c);
var n = { chartX: t ? t.chartX : void 0, chartY: t ? t.chartY : void 0, shared: s };
P(this, "beforeGetHoverData", n);
var A = p && !p.stickyTracking ? [p] : i.filter(function(D) {
return n.filter ? n.filter(D) : D.visible && !(!s && D.directTouch) && w(D.options.enableMouseTracking, !0) && D.stickyTracking;
}), _ = l || !t ? c : this.findNearestKDPoint(A, s, t);
return p = _ && _.series, _ && (s && !p.noSharedTooltip ? (A = i.filter(function(D) {
return n.filter ? n.filter(D) : D.visible && !(!s && D.directTouch) && w(D.options.enableMouseTracking, !0) && !D.noSharedTooltip;
}), A.forEach(function(D) {
var j = u(D.points, function(T) {
return T.x === _.x && !T.isNull;
});
N(j) && (D.chart.isBoosting && (j = D.getPoint(j)), o.push(j));
})) : o.push(_)), n = { hoverPoint: _ }, P(this, "afterGetHoverData", n), { hoverPoint: n.hoverPoint, hoverSeries: p, hoverPoints: o };
}, a.prototype.getPointFromEvent = function(c) {
c = c.target;
for (var p; c && !p; )
p = c.point, c = c.parentNode;
return p;
}, a.prototype.onTrackerMouseOut = function(c) {
c = c.relatedTarget || c.toElement;
var p = this.chart.hoverSeries;
this.isDirectTouch = !1, !p || !c || p.stickyTracking || this.inClass(c, "highcharts-tooltip") || this.inClass(c, "highcharts-series-" + p.index) && this.inClass(c, "highcharts-tracker") || p.onMouseOut();
}, a.prototype.inClass = function(c, p) {
for (var i; c; ) {
if (i = R(c, "class")) {
if (i.indexOf(p) !== -1)
return !0;
if (i.indexOf("highcharts-container") !== -1)
return !1;
}
c = c.parentNode;
}
}, a.prototype.init = function(c, p) {
this.options = p, this.chart = c, this.runChartClick = !(!p.chart.events || !p.chart.events.click), this.pinchDown = [], this.lastValidTouch = {}, I && (c.tooltip = new I(c, p.tooltip), this.followTouchMove = w(p.tooltip.followTouchMove, !0)), this.setDOMEvents();
}, a.prototype.normalize = function(c, p) {
var i = c.touches, l = i ? i.length ? i.item(0) : w(i.changedTouches, c.changedTouches)[0] : c;
return p || (p = this.getChartPosition()), i = l.pageX - p.left, l = l.pageY - p.top, i /= p.scaleX, l /= p.scaleY, d(c, { chartX: Math.round(i), chartY: Math.round(l) });
}, a.prototype.onContainerClick = function(c) {
var p = this.chart, i = p.hoverPoint;
c = this.normalize(c);
var l = p.plotLeft, s = p.plotTop;
p.cancelClick || (i && this.inClass(c.target, "highcharts-tracker") ? (P(i.series, "click", d(c, { point: i })), p.hoverPoint && i.firePointEvent("click", c)) : (d(c, this.getCoordinates(c)), p.isInsidePlot(c.chartX - l, c.chartY - s, { visiblePlotOnly: !0 }) && P(p, "click", c)));
}, a.prototype.onContainerMouseDown = function(c) {
var p = ((c.buttons || c.button) & 1) === 1;
c = this.normalize(c), B.isFirefox && c.button !== 0 && this.onContainerMouseMove(c), (typeof c.button > "u" || p) && (this.zoomOption(c), p && c.preventDefault && c.preventDefault(), this.dragStart(c));
}, a.prototype.onContainerMouseLeave = function(c) {
var p = U[w(a.hoverChartIndex, -1)], i = this.chart.tooltip;
i && i.shouldStickOnContact() && this.inClass(c.relatedTarget, "highcharts-tooltip-container") || (c = this.normalize(c), p && (c.relatedTarget || c.toElement) && (p.pointer.reset(), p.pointer.chartPosition = void 0), i && !i.isHidden && this.reset());
}, a.prototype.onContainerMouseEnter = function(c) {
delete this.chartPosition;
}, a.prototype.onContainerMouseMove = function(c) {
var p = this.chart;
c = this.normalize(c), this.setHoverChartIndex(), c.preventDefault || (c.returnValue = !1), (p.mouseIsDown === "mousedown" || this.touchSelect(c)) && this.drag(c), p.openMenu || !this.inClass(c.target, "highcharts-tracker") && !p.isInsidePlot(c.chartX - p.plotLeft, c.chartY - p.plotTop, { visiblePlotOnly: !0 }) || (this.inClass(c.target, "highcharts-no-tooltip") ? this.reset(!1, 0) : this.runPointActions(c));
}, a.prototype.onDocumentTouchEnd = function(c) {
var p = U[w(
a.hoverChartIndex,
-1
)];
p && p.pointer.drop(c);
}, a.prototype.onContainerTouchMove = function(c) {
this.touchSelect(c) ? this.onContainerMouseMove(c) : this.touch(c);
}, a.prototype.onContainerTouchStart = function(c) {
this.touchSelect(c) ? this.onContainerMouseDown(c) : (this.zoomOption(c), this.touch(c, !0));
}, a.prototype.onDocumentMouseMove = function(c) {
var p = this.chart, i = this.chartPosition;
c = this.normalize(c, i);
var l = p.tooltip;
!i || l && l.isStickyOnContact() || p.isInsidePlot(c.chartX - p.plotLeft, c.chartY - p.plotTop, { visiblePlotOnly: !0 }) || this.inClass(c.target, "highcharts-tracker") || this.reset();
}, a.prototype.onDocumentMouseUp = function(c) {
var p = U[w(a.hoverChartIndex, -1)];
p && p.pointer.drop(c);
}, a.prototype.pinch = function(c) {
var p = this, i = p.chart, l = p.pinchDown, s = c.touches || [], t = s.length, o = p.lastValidTouch, n = p.hasZoom, A = {}, _ = t === 1 && (p.inClass(c.target, "highcharts-tracker") && i.runTrackerClick || p.runChartClick), D = {}, j = p.selectionMarker;
1 < t ? p.initiated = !0 : t === 1 && this.followTouchMove && (p.initiated = !1), n && p.initiated && !_ && c.cancelable !== !1 && c.preventDefault(), [].map.call(s, function(T) {
return p.normalize(T);
}), c.type === "touchstart" ? ([].forEach.call(s, function(T, X) {
l[X] = { chartX: T.chartX, chartY: T.chartY };
}), o.x = [l[0].chartX, l[1] && l[1].chartX], o.y = [l[0].chartY, l[1] && l[1].chartY], i.axes.forEach(function(T) {
if (T.zoomEnabled) {
var X = i.bounds[T.horiz ? "h" : "v"], g = T.minPixelPadding, m = T.toPixels(Math.min(w(T.options.min, T.dataMin), T.dataMin)), L = T.toPixels(Math.max(w(T.options.max, T.dataMax), T.dataMax)), Y = Math.max(m, L);
X.min = Math.min(T.pos, Math.min(
m,
L
) - g), X.max = Math.max(T.pos + T.len, Y + g);
}
}), p.res = !0) : p.followTouchMove && t === 1 ? this.runPointActions(p.normalize(c)) : l.length && (P(i, "touchpan", { originalEvent: c }, function() {
j || (p.selectionMarker = j = d({ destroy: H, touch: !0 }, i.plotBox)), p.pinchTranslate(l, s, A, j, D, o), p.hasPinched = n, p.scaleGroups(A, D);
}), p.res && (p.res = !1, this.reset(!1, 0)));
}, a.prototype.pinchTranslate = function(c, p, i, l, s, t) {
this.zoomHor && this.pinchTranslateDirection(!0, c, p, i, l, s, t), this.zoomVert && this.pinchTranslateDirection(!1, c, p, i, l, s, t);
}, a.prototype.pinchTranslateDirection = function(c, p, i, l, s, t, o, n) {
var A = this.chart, _ = c ? "x" : "y", D = c ? "X" : "Y", j = "chart" + D, T = c ? "width" : "height", X = A["plot" + (c ? "Left" : "Top")], g = A.inverted, m = A.bounds[c ? "h" : "v"], L = p.length === 1, Y = p[0][j], V = !L && p[1][j];
p = function() {
typeof $ == "number" && 20 < Math.abs(Y - V) && (G = n || Math.abs(z - $) / Math.abs(Y - V)), k = (X - z) / G + Y, Q = A["plot" + (c ? "Width" : "Height")] / G;
};
var Q, k, G = n || 1, z = i[0][j], $ = !L && i[1][j];
if (p(), i = k, i < m.min) {
i = m.min;
var q = !0;
} else
i + Q > m.max && (i = m.max - Q, q = !0);
q ? (z -= 0.8 * (z - o[_][0]), typeof $ == "number" && ($ -= 0.8 * ($ - o[_][1])), p()) : o[_] = [z, $], g || (t[_] = k - X, t[T] = Q), t = g ? 1 / G : G, s[T] = Q, s[_] = i, l[g ? c ? "scaleY" : "scaleX" : "scale" + D] = G, l["translate" + D] = t * X + (z - t * Y);
}, a.prototype.reset = function(c, p) {
var i = this.chart, l = i.hoverSeries, s = i.hoverPoint, t = i.hoverPoints, o = i.tooltip, n = o && o.shared ? t : s;
c && n && v(n).forEach(function(A) {
A.series.isCartesian && typeof A.plotX > "u" && (c = !1);
}), c ? o && n && v(n).length && (o.refresh(n), o.shared && t ? t.forEach(function(A) {
A.setState(A.state, !0), A.series.isCartesian && (A.series.xAxis.crosshair && A.series.xAxis.drawCrosshair(
null,
A
), A.series.yAxis.crosshair && A.series.yAxis.drawCrosshair(null, A));
}) : s && (s.setState(s.state, !0), i.axes.forEach(function(A) {
A.crosshair && s.series[A.coll] === A && A.drawCrosshair(null, s);
}))) : (s && s.onMouseOut(), t && t.forEach(function(A) {
A.setState();
}), l && l.onMouseOut(), o && o.hide(p), this.unDocMouseMove && (this.unDocMouseMove = this.unDocMouseMove()), i.axes.forEach(function(A) {
A.hideCrosshair();
}), this.hoverX = i.hoverPoints = i.hoverPoint = null);
}, a.prototype.runPointActions = function(c, p) {
var i = this.chart, l = i.tooltip && i.tooltip.options.enabled ? i.tooltip : void 0, s = l ? l.shared : !1, t = p || i.hoverPoint, o = t && t.series || i.hoverSeries;
p = this.getHoverData(t, o, i.series, (!c || c.type !== "touchmove") && (!!p || o && o.directTouch && this.isDirectTouch), s, c), t = p.hoverPoint, o = p.hoverSeries;
var n = p.hoverPoints;
if (p = o && o.tooltipOptions.followPointer && !o.tooltipOptions.split, s = s && o && !o.noSharedTooltip, t && (t !== i.hoverPoint || l && l.isHidden)) {
if ((i.hoverPoints || []).forEach(function(A) {
n.indexOf(A) === -1 && A.setState();
}), i.hoverSeries !== o && o.onMouseOver(), this.applyInactiveState(n), (n || []).forEach(function(A) {
A.setState("hover");
}), i.hoverPoint && i.hoverPoint.firePointEvent("mouseOut"), !t.series)
return;
i.hoverPoints = n, i.hoverPoint = t, t.firePointEvent("mouseOver"), l && l.refresh(s ? n : t, c);
} else
p && l && !l.isHidden && (t = l.getAnchor([{}], c), i.isInsidePlot(t[0], t[1], { visiblePlotOnly: !0 }) && l.updatePosition({ plotX: t[0], plotY: t[1] }));
this.unDocMouseMove || (this.unDocMouseMove = W(i.container.ownerDocument, "mousemove", function(A) {
var _ = U[a.hoverChartIndex];
_ && _.pointer.onDocumentMouseMove(A);
}), this.eventsToUnbind.push(this.unDocMouseMove)), i.axes.forEach(function(A) {
var _ = w((A.crosshair || {}).snap, !0), D;
_ && ((D = i.hoverPoint) && D.series[A.coll] === A || (D = u(n, function(j) {
return j.series[A.coll] === A;
}))), D || !_ ? A.drawCrosshair(c, D) : A.hideCrosshair();
});
}, a.prototype.scaleGroups = function(c, p) {
var i = this.chart;
i.series.forEach(function(l) {
var s = c || l.getPlotBox();
l.group && (l.xAxis && l.xAxis.zoomEnabled || i.mapView) && (l.group.attr(s), l.markerGroup && (l.markerGroup.attr(s), l.markerGroup.clip(p ? i.clipRect : null)), l.dataLabelsGroup && l.dataLabelsGroup.attr(s));
}), i.clipRect.attr(p || i.clipBox);
}, a.prototype.setDOMEvents = function() {
var c = this, p = this.chart.container, i = p.ownerDocument;
p.onmousedown = this.onContainerMouseDown.bind(this), p.onmousemove = this.onContainerMouseMove.bind(this), p.onclick = this.onContainerClick.bind(this), this.eventsToUnbind.push(W(p, "mouseenter", this.onContainerMouseEnter.bind(this))), this.eventsToUnbind.push(W(p, "mouseleave", this.onContainerMouseLeave.bind(this))), a.unbindDocumentMouseUp || (a.unbindDocumentMouseUp = W(i, "mouseup", this.onDocumentMouseUp.bind(this)));
for (var l = this.chart.renderTo.parentElement; l && l.tagName !== "BODY"; )
this.eventsToUnbind.push(W(l, "scroll", function() {
delete c.chartPosition;
})), l = l.parentElement;
B.hasTouch && (this.eventsToUnbind.push(W(p, "touchstart", this.onContainerTouchStart.bind(this), { passive: !1 })), this.eventsToUnbind.push(W(p, "touchmove", this.onContainerTouchMove.bind(this), { passive: !1 })), a.unbindDocumentTouchEnd || (a.unbindDocumentTouchEnd = W(i, "touchend", this.onDocumentTouchEnd.bind(this), { passive: !1 })));
}, a.prototype.setHoverChartIndex = function() {
var c = this.chart, p = B.charts[w(a.hoverChartIndex, -1)];
p && p !== c && p.pointer.onContainerMouseLeave({ relatedTarget: !0 }), p && p.mouseIsDown || (a.hoverChartIndex = c.index);
}, a.prototype.touch = function(c, p) {
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 (p && this.runPointActions(c), c.type === "touchmove") {
p = this.pinchDown;
var l = p[0] ? 4 <= Math.sqrt(Math.pow(p[0].chartX - c.chartX, 2) + Math.pow(p[0].chartY - c.chartY, 2)) : !1;
}
w(l, !0) && this.pinch(c);
} else
p && this.reset();
else
c.touches.length === 2 && this.pinch(c);
}, a.prototype.touchSelect = function(c) {
return !(!this.chart.options.chart.zoomBySingleTouch || !c.touches || c.touches.length !== 1);
}, a.prototype.zoomOption = function(c) {
var p = this.chart, i = p.options.chart;
p = p.inverted;
var l = i.zoomType || "";
/touch/.test(c.type) && (l = w(i.pinchType, l)), this.zoomX = c = /x/.test(l), this.zoomY = i = /y/.test(l), this.zoomHor = c && !p || i && p, this.zoomVert = i && !p || c && p, this.hasZoom = c || i;
}, a;
}(), y;
}), E(h, "Core/MSPointer.js", [h["Core/Globals.js"], h["Core/Pointer.js"], h["Core/Utilities.js"]], function(y, B, I) {
function Z() {
var C = [];
return C.item = function(b) {
return this[b];
}, u(O, function(b) {
C.push({ pageX: b.pageX, pageY: b.pageY, target: b.target });
}), C;
}
function F(C, b, w, v) {
var a = H[B.hoverChartIndex || NaN];
C.pointerType !== "touch" && C.pointerType !== C.MSPOINTER_TYPE_TOUCH || !a || (a = a.pointer, v(C), a[b]({ type: w, target: C.currentTarget, preventDefault: R, touches: Z() }));
}
var U = this && this.__extends || function() {
var C = function(b, w) {
return C = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(v, a) {
v.__proto__ = a;
} || function(v, a) {
for (var c in a)
a.hasOwnProperty(c) && (v[c] = a[c]);
}, C(b, w);
};
return function(b, w) {
function v() {
this.constructor = b;
}
C(b, w), b.prototype = w === null ? Object.create(w) : (v.prototype = w.prototype, new v());
};
}(), H = y.charts, W = y.doc, R = y.noop, S = y.win, x = I.addEvent, d = I.css, u = I.objectEach, P = I.removeEvent, O = {}, N = !!S.PointerEvent;
return function(C) {
function b() {
return C !== null && C.apply(this, arguments) || this;
}
return U(b, C), b.isRequired = function() {
return !(y.hasTouch || !S.PointerEvent && !S.MSPointerEvent);
}, b.prototype.batchMSEvents = function(w) {
w(this.chart.container, N ? "pointerdown" : "MSPointerDown", this.onContainerPointerDown), w(this.chart.container, N ? "pointermove" : "MSPointerMove", this.onContainerPointerMove), w(W, N ? "pointerup" : "MSPointerUp", this.onDocumentPointerUp);
}, b.prototype.destroy = function() {
this.batchMSEvents(P), C.prototype.destroy.call(this);
}, b.prototype.init = function(w, v) {
C.prototype.init.call(this, w, v), this.hasZoom && d(w.container, { "-ms-touch-action": "none", "touch-action": "none" });
}, b.prototype.onContainerPointerDown = function(w) {
F(w, "onContainerTouchStart", "touchstart", function(v) {
O[v.pointerId] = { pageX: v.pageX, pageY: v.pageY, target: v.currentTarget };
});
}, b.prototype.onContainerPointerMove = function(w) {
F(w, "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(w) {
F(w, "onDocumentTouchEnd", "touchend", function(v) {
delete O[v.pointerId];
});
}, b.prototype.setDOMEvents = function() {
C.prototype.setDOMEvents.call(this), (this.hasZoom || this.followTouchMove) && this.batchMSEvents(x);
}, b;
}(B);
}), E(h, "Core/Legend/Legend.js", [
h["Core/Animation/AnimationUtilities.js"],
h["Core/FormatUtilities.js"],
h["Core/Globals.js"],
h["Core/Series/Point.js"],
h["Core/Renderer/RendererUtilities.js"],
h["Core/Utilities.js"]
], function(y, B, I, Z, F, U) {
var H = y.animObject, W = y.setAnimation, R = B.format;
y = I.isFirefox;
var S = I.marginNames;
I = I.win;
var x = F.distribute, d = U.addEvent, u = U.createElement, P = U.css, O = U.defined, N = U.discardElement, C = U.find, b = U.fireEvent, w = U.isNumber, v = U.merge, a = U.pick, c = U.relativeLength, p = U.stableSort, i = U.syncTimeout;
return F = U.wrap, U = function() {
function l(s, 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 = s, this.init(s, t);
}
return l.prototype.init = function(s, t) {
this.chart = s, this.setOptions(t), t.enabled && (this.render(), d(this.chart, "endResize", function() {
this.legend.positionCheckboxes();
}), this.proximate ? this.unchartrender = d(this.chart, "render", function() {
this.legend.proximatePositions(), this.legend.positionItems();
}) : this.unchartrender && this.unchartrender());
}, l.prototype.setOptions = function(s) {
var t = a(s.padding, 8);
this.options = s, this.chart.styledMode || (this.itemStyle = s.itemStyle, this.itemHiddenStyle = v(this.itemStyle, s.itemHiddenStyle)), this.itemMarginTop = s.itemMarginTop || 0, this.itemMarginBottom = s.itemMarginBottom || 0, this.padding = t, this.initialItemY = t - 5, this.symbolWidth = a(
s.symbolWidth,
16
), this.pages = [], this.proximate = s.layout === "proximate" && !this.chart.inverted, this.baseline = void 0;
}, l.prototype.update = function(s, t) {
var o = this.chart;
this.setOptions(v(!0, this.options, s)), this.destroy(), o.isDirtyLegend = o.isDirtyBox = !0, a(t, !0) && o.redraw(), b(this, "afterUpdate");
}, l.prototype.colorizeItem = function(s, t) {
if (s.legendGroup[t ? "removeClass" : "addClass"]("highcharts-legend-item-hidden"), !this.chart.styledMode) {
var o = this.options, n = s.legendItem, A = s.legendLine, _ = s.legendSymbol, D = this.itemHiddenStyle.color;
o = t ? o.itemStyle.color : D;
var j = t && s.color || D, T = s.options && s.options.marker, X = { fill: j };
n && n.css({ fill: o, color: o }), A && A.attr({ stroke: j }), _ && (T && _.isMarker && (X = s.pointAttribs(), t || (X.stroke = X.fill = D)), _.attr(X));
}
b(this, "afterColorizeItem", { item: s, visible: t });
}, l.prototype.positionItems = function() {
this.allItems.forEach(this.positionItem, this), this.chart.isResizing || this.positionCheckboxes();
}, l.prototype.positionItem = function(s) {
var t = this, o = this.options, n = o.symbolPadding, A = !o.rtl, _ = s._legendItemPos;
o = _[0], _ = _[1];
var D = s.checkbox, j = s.legendGroup;
j && j.element && (n = { translateX: A ? o : this.legendWidth - o - 2 * n - 4, translateY: _ }, A = function() {
b(t, "afterPositionItem", { item: s });
}, O(j.translateY) ? j.animate(n, void 0, A) : (j.attr(n), A())), D && (D.x = o, D.y = _);
}, l.prototype.destroyItem = function(s) {
var t = s.checkbox;
["legendItem", "legendLine", "legendSymbol", "legendGroup"].forEach(function(o) {
s[o] && (s[o] = s[o].destroy());
}), t && N(s.checkbox);
}, l.prototype.destroy = function() {
function s(t) {
this[t] && (this[t] = this[t].destroy());
}
this.getAllItems().forEach(function(t) {
[
"legendItem",
"legendGroup"
].forEach(s, t);
}), "clipRect up down pager nav box title group".split(" ").forEach(s, this), this.display = null;
}, l.prototype.positionCheckboxes = function() {
var s = this.group && this.group.alignAttr, t = this.clipHeight || this.legendHeight, o = this.titleHeight;
if (s) {
var n = s.translateY;
this.allItems.forEach(function(A) {
var _ = A.checkbox;
if (_) {
var D = n + o + _.y + (this.scrollOffset || 0) + 3;
P(_, { left: s.translateX + A.checkboxOffset + _.x - 20 + "px", top: D + "px", display: this.proximate || D > n - 6 && D < n + t - 6 ? "" : "none" });
}
}, this);
}
}, l.prototype.renderTitle = function() {
var s = this.options, t = this.padding, o = s.title, n = 0;
o.text && (this.title || (this.title = this.chart.renderer.label(o.text, t - 3, t - 4, null, null, null, s.useHTML, null, "legend-title").attr({ zIndex: 1 }), this.chart.styledMode || this.title.css(o.style), this.title.add(this.group)), o.width || this.title.css({ width: this.maxLegendWidth + "px" }), s = this.title.getBBox(), n = s.height, this.offsetWidth = s.width, this.contentGroup.attr({ translateY: n })), this.titleHeight = n;
}, l.prototype.setText = function(s) {
var t = this.options;
s.legendItem.attr({ text: t.labelFormat ? R(t.labelFormat, s, this.chart) : t.labelFormatter.call(s) });
}, l.prototype.renderItem = function(s) {
var t = this.chart, o = t.renderer, n = this.options, A = this.symbolWidth, _ = n.symbolPadding || 0, D = this.itemStyle, j = this.itemHiddenStyle, T = n.layout === "horizontal" ? a(n.itemDistance, 20) : 0, X = !n.rtl, g = !s.series, m = !g && s.series.drawLegendSymbol ? s.series : s, L = m.options, Y = this.createCheckboxForItem && L && L.showCheckbox, V = n.useHTML, Q = s.options.className, k = s.legendItem;
L = A + _ + T + (Y ? 20 : 0), k || (s.legendGroup = o.g("legend-item").addClass("highcharts-" + m.type + "-series highcharts-color-" + s.colorIndex + (Q ? " " + Q : "") + (g ? " highcharts-series-" + s.index : "")).attr({ zIndex: 1 }).add(this.scrollGroup), s.legendItem = k = o.text("", X ? A + _ : -_, this.baseline || 0, V), t.styledMode || k.css(v(s.visible ? D : j)), k.attr({ align: X ? "left" : "right", zIndex: 2 }).add(s.legendGroup), this.baseline || (this.fontMetrics = o.fontMetrics(t.styledMode ? 12 : D.fontSize, k), this.baseline = this.fontMetrics.f + 3 + this.itemMarginTop, k.attr("y", this.baseline), this.symbolHeight = n.symbolHeight || this.fontMetrics.f, n.squareSymbol && (this.symbolWidth = a(n.symbolWidth, Math.max(this.symbolHeight, 16)), L = this.symbolWidth + _ + T + (Y ? 20 : 0), X && k.attr("x", this.symbolWidth + _))), m.drawLegendSymbol(this, s), this.setItemEvents && this.setItemEvents(s, k, V)), Y && !s.checkbox && this.createCheckboxForItem && this.createCheckboxForItem(s), this.colorizeItem(s, s.visible), !t.styledMode && D.width || k.css({ width: (n.itemWidth || this.widthOption || t.spacingBox.width) - L + "px" }), this.setText(s), t = k.getBBox(), o = this.fontMetrics && this.fontMetrics.h || 0, s.itemWidth = s.checkboxOffset = n.itemWidth || s.legendItemWidth || t.width + L, this.maxItemWidth = Math.max(this.maxItemWidth, s.itemWidth), this.totalItemWidth += s.itemWidth, this.itemHeight = s.itemHeight = Math.round(s.legendItemHeight || (t.height > 1.5 * o ? t.height : o));
}, l.prototype.layoutItem = function(s) {
var t = this.options, o = this.padding, n = t.layout === "horizontal", A = s.itemHeight, _ = this.itemMarginBottom, D = this.itemMarginTop, j = n ? a(t.itemDistance, 20) : 0, T = this.maxLegendWidth;
t = t.alignColumns && this.totalItemWidth > T ? this.maxItemWidth : s.itemWidth, n && this.itemX - o + t > T && (this.itemX = o, this.lastLineHeight && (this.itemY += D + this.lastLineHeight + _), this.lastLineHeight = 0), this.lastItemY = D + this.itemY + _, this.lastLineHeight = Math.max(A, this.lastLineHeight), s._legendItemPos = [this.itemX, this.itemY], n ? this.itemX += t : (this.itemY += D + A + _, this.lastLineHeight = A), this.offsetWidth = this.widthOption || Math.max((n ? this.itemX - o - (s.checkbox ? 0 : j) : t) + o, this.offsetWidth);
}, l.prototype.getAllItems = function() {
var s = [];
return this.chart.series.forEach(function(t) {
var o = t && t.options;
t && a(o.showInLegend, O(o.linkedTo) ? !1 : void 0, !0) && (s = s.concat(t.legendItems || (o.legendType === "point" ? t.data : t)));
}), b(this, "afterGetAllItems", { allItems: s }), s;
}, l.prototype.getAlignment = function() {
var s = this.options;
return this.proximate ? s.align.charAt(0) + "tv" : s.floating ? "" : s.align.charAt(0) + s.verticalAlign.charAt(0) + s.layout.charAt(0);
}, l.prototype.adjustMargins = function(s, t) {
var o = this.chart, n = this.options, A = this.getAlignment();
A && [/(lth|ct|rth)/, /(rtv|rm|rbv)/, /(rbh|cb|lbh)/, /(lbv|lm|ltv)/].forEach(function(_, D) {
_.test(A) && !O(s[D]) && (o[S[D]] = Math.max(o[S[D]], o.legend[(D + 1) % 2 ? "legendHeight" : "legendWidth"] + [1, -1, -1, 1][D] * n[D % 2 ? "x" : "y"] + a(n.margin, 12) + t[D] + (o.titleOffset[D] || 0)));
});
}, l.prototype.proximatePositions = function() {
var s = this.chart, t = [], o = this.options.align === "left";
this.allItems.forEach(function(n) {
var A, _ = o;
if (n.yAxis) {
n.xAxis.options.reversed && (_ = !_), n.points && (A = C(_ ? n.points : n.points.slice(0).reverse(), function(j) {
return w(j.plotY);
})), _ = this.itemMarginTop + n.legendItem.getBBox().height + this.itemMarginBottom;
var D = n.yAxis.top - s.plotTop;
n.visible ? (A = A ? A.plotY : n.yAxis.height, A += D - 0.3 * _) : A = D + n.yAxis.height, t.push({ target: A, size: _, item: n });
}
}, this), x(t, s.plotHeight).forEach(function(n) {
n.item._legendItemPos && (n.item._legendItemPos[1] = s.plotTop - s.spacing[0] + n.pos);
});
}, l.prototype.render = function() {
var s = this.chart, t = s.renderer, o = this.options, n = this.padding, A = this.getAllItems(), _ = this.group, D = this.box;
this.itemX = n, this.itemY = this.initialItemY, this.lastItemY = this.offsetWidth = 0, this.widthOption = c(o.width, s.spacingBox.width - n);
var j = s.spacingBox.width - 2 * n - o.x;
-1 < ["rm", "lm"].indexOf(this.getAlignment().substring(0, 2)) && (j /= 2), this.maxLegendWidth = this.widthOption || j, _ || (this.group = _ = t.g("legend").addClass(o.className || "").attr({ zIndex: 7 }).add(), this.contentGroup = t.g().attr({ zIndex: 1 }).add(_), this.scrollGroup = t.g().add(this.contentGroup)), this.renderTitle(), p(A, function(X, g) {
return (X.options && X.options.legendIndex || 0) - (g.options && g.options.legendIndex || 0);
}), o.reversed && A.reverse(), this.allItems = A, this.display = j = !!A.length, this.itemHeight = this.totalItemWidth = this.maxItemWidth = this.lastLineHeight = 0, A.forEach(this.renderItem, this), A.forEach(this.layoutItem, this), A = (this.widthOption || this.offsetWidth) + n;
var T = this.lastItemY + this.lastLineHeight + this.titleHeight;
T = this.handleOverflow(T), T += n, D || (this.box = D = t.rect().addClass("highcharts-legend-box").attr({ r: o.borderRadius }).add(_), D.isNew = !0), s.styledMode || D.attr({ stroke: o.borderColor, "stroke-width": o.borderWidth || 0, fill: o.backgroundColor || "none" }).shadow(o.shadow), 0 < A && 0 < T && (D[D.isNew ? "attr" : "animate"](D.crisp.call({}, { x: 0, y: 0, width: A, height: T }, D.strokeWidth())), D.isNew = !1), D[j ? "show" : "hide"](), s.styledMode && _.getStyle("display") === "none" && (A = T = 0), this.legendWidth = A, this.legendHeight = T, j && this.align(), this.proximate || this.positionItems(), b(this, "afterRender");
}, l.prototype.align = function(s) {
s === void 0 && (s = this.chart.spacingBox);
var t = this.chart, o = this.options, n = s.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 !== s.y && (s = v(s, { y: n })), this.group.align(v(o, { width: this.legendWidth, height: this.legendHeight, verticalAlign: this.proximate ? "top" : o.verticalAlign }), !0, s);
}, l.prototype.handleOverflow = function(s) {
var t = this, o = this.chart, n = o.renderer, A = this.options, _ = A.y, D = A.verticalAlign === "top", j = this.padding, T = A.maxHeight, X = A.navigation, g = a(X.animation, !0), m = X.arrowSize || 12, L = this.pages, Y = this.allItems, V = function(q) {
typeof q == "number" ? $.attr({ height: q }) : $ && (t.clipRect = $.destroy(), t.contentGroup.clip()), t.contentGroup.div && (t.contentGroup.div.style.clip = q ? "rect(" + j + "px,9999px," + (j + q) + "px,0)" : "auto");
}, Q = function(q) {
return t[q] = n.circle(0, 0, 1.3 * m).translate(m / 2, m / 2).add(z), o.styledMode || t[q].attr("fill", "rgba(0,0,0,0.0001)"), t[q];
}, k, G;
_ = o.spacingBox.height + (D ? -_ : _) - j;
var z = this.nav, $ = this.clipRect;
return A.layout !== "horizontal" || A.verticalAlign === "middle" || A.floating || (_ /= 2), T && (_ = Math.min(_, T)), L.length = 0, s && 0 < _ && s > _ && X.enabled !== !1 ? (this.clipHeight = k = Math.max(_ - 20 - this.titleHeight - j, 0), this.currentPage = a(this.currentPage, 1), this.fullHeight = s, Y.forEach(function(q, it) {
var et = q._legendItemPos[1], nt = Math.round(q.legendItem.getBBox().height), rt = L.length;
(!rt || et - L[rt - 1] > k && (G || et) !== L[rt - 1]) && (L.push(G || et), rt++), q.pageIx = rt - 1, G && (Y[it - 1].pageIx = rt - 1), it === Y.length - 1 && et + nt - L[rt - 1] > k && nt <= k && (L.push(et), q.pageIx = rt), et !== G && (G = et);
}), $ || ($ = t.clipRect = n.clipRect(0, j, 9999, 0), t.contentGroup.clip($)), V(k), z || (this.nav = z = n.g().attr({ zIndex: 1 }).add(this.group), this.up = n.symbol("triangle", 0, 0, m, m).add(z), Q("upTracker").on(
"click",
function() {
t.scroll(-1, g);
}
), this.pager = n.text("", 15, 10).addClass("highcharts-legend-navigation"), o.styledMode || this.pager.css(X.style), this.pager.add(z), this.down = n.symbol("triangle-down", 0, 0, m, m).add(z), Q("downTracker").on("click", function() {
t.scroll(1, g);
})), t.scroll(0), s = _) : z && (V(), this.nav = z.destroy(), this.scrollGroup.attr({ translateY: 1 }), this.clipHeight = 0), s;
}, l.prototype.scroll = function(s, t) {
var o = this, n = this.chart, A = this.pages, _ = A.length, D = this.clipHeight, j = this.options.navigation, T = this.pager, X = this.padding, g = this.currentPage + s;
g > _ && (g = _), 0 < g && (typeof t < "u" && W(t, n), this.nav.attr({ translateX: X, translateY: D + 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" });
}), T.attr({ text: g + "/" + _ }), [this.down, this.downTracker].forEach(
function(m) {
m.attr({ x: 18 + this.pager.getBBox().width, class: g === _ ? "highcharts-legend-nav-inactive" : "highcharts-legend-nav-active" });
},
this
), n.styledMode || (this.up.attr({ fill: g === 1 ? j.inactiveColor : j.activeColor }), this.upTracker.css({ cursor: g === 1 ? "default" : "pointer" }), this.down.attr({ fill: g === _ ? j.inactiveColor : j.activeColor }), this.downTracker.css({ cursor: g === _ ? "default" : "pointer" })), this.scrollOffset = -A[g - 1] + this.initialItemY, this.scrollGroup.animate({ translateY: this.scrollOffset }), this.currentPage = g, this.positionCheckboxes(), s = H(a(t, n.renderer.globalAnimation, !0)), i(function() {
b(o, "afterScroll", { currentPage: g });
}, s.duration));
}, l.prototype.setItemEvents = function(s, t, o) {
var n = this, A = n.chart.renderer.boxWrapper, _ = s instanceof Z, D = "highcharts-legend-" + (_ ? "point" : "series") + "-active", j = n.chart.styledMode, T = function(X) {
n.allItems.forEach(function(g) {
s !== g && [g].concat(g.linkedSeries || []).forEach(function(m) {
m.setState(X, !_);
});
});
};
(o ? [t, s.legendSymbol] : [s.legendGroup]).forEach(function(X) {
X && X.on("mouseover", function() {
s.visible && T("inactive"), s.setState("hover"), s.visible && A.addClass(D), j || t.css(n.options.itemHoverStyle);
}).on("mouseout", function() {
n.chart.styledMode || t.css(v(s.visible ? n.itemStyle : n.itemHiddenStyle)), T(""), A.removeClass(D), s.setState();
}).on("click", function(g) {
var m = function() {
s.setVisible && s.setVisible(), T(s.visible ? "inactive" : "");
};
A.removeClass(D), g = { browserEvent: g }, s.firePointEvent ? s.firePointEvent("legendItemClick", g, m) : b(s, "legendItemClick", g, m);
});
});
}, l.prototype.createCheckboxForItem = function(s) {
s.checkbox = u(
"input",
{ type: "checkbox", className: "highcharts-legend-checkbox", checked: s.selected, defaultChecked: s.selected },
this.options.itemCheckboxStyle,
this.chart.container
), d(s.checkbox, "click", function(t) {
b(s.series || s, "checkboxClick", { checked: t.target.checked, item: s }, function() {
s.select();
});
});
}, l;
}(), (/Trident\/7\.0/.test(I.navigator && I.navigator.userAgent) || y) && F(U.prototype, "positionItem", function(l, s) {
var t = this, o = function() {
s._legendItemPos && l.call(t, s);
};
o(), t.bubbleLegend || setTimeout(o);
}), U;
}), E(
h,
"Core/Series/SeriesRegistry.js",
[h["Core/Globals.js"], h["Core/DefaultOptions.js"], h["Core/Series/Point.js"], h["Core/Utilities.js"]],
function(y, B, I, Z) {
var F = B.defaultOptions, U = Z.error, H = Z.extendClass, W = Z.merge, R;
return function(S) {
function x(d, u) {
var P = F.plotOptions || {}, O = u.defaultOptions;
u.prototype.pointClass || (u.prototype.pointClass = I), u.prototype.type = d, O && (P[d] = O), S.seriesTypes[d] = u;
}
S.seriesTypes = y.seriesTypes, S.getSeries = function(d, u) {
u === void 0 && (u = {});
var P = d.options.chart;
P = u.type || P.type || P.defaultSeriesType || "";
var O = S.seriesTypes[P];
return S || U(17, !0, d, { missingModuleFor: P }), P = new O(), typeof P.init == "function" && P.init(d, u), P;
}, S.registerSeriesType = x, S.seriesType = function(d, u, P, O, N) {
var C = F.plotOptions || {};
return u = u || "", C[d] = W(C[u], P), x(d, H(S.seriesTypes[u] || function() {
}, O)), S.seriesTypes[d].prototype.type = d, N && (S.seriesTypes[d].prototype.pointClass = H(I, N)), S.seriesTypes[d];
};
}(R || (R = {})), R;
}
), E(h, "Core/Chart/Chart.js", [
h["Core/Animation/AnimationUtilities.js"],
h["Core/Axis/Axis.js"],
h["Core/FormatUtilities.js"],
h["Core/Foundation.js"],
h["Core/Globals.js"],
h["Core/Legend/Legend.js"],
h["Core/MSPointer.js"],
h["Core/DefaultOptions.js"],
h["Core/Pointer.js"],
h["Core/Renderer/RendererRegistry.js"],
h["Core/Series/SeriesRegistry.js"],
h["Core/Renderer/SVG/SVGRenderer.js"],
h["Core/Time.js"],
h["Core/Utilities.js"],
h["Core/Renderer/HTML/AST.js"]
], function(y, B, I, Z, F, U, H, W, R, S, x, d, u, P, O) {
var N = y.animate, C = y.animObject, b = y.setAnimation, w = I.numberFormat, v = Z.registerEventOptions, a = F.charts, c = F.doc, p = F.marginNames, i = F.svg, l = F.win, s = W.defaultOptions, t = W.defaultTime, o = x.seriesTypes, n = P.addEvent, A = P.attr, _ = P.cleanRecursively, D = P.createElement, j = P.css, T = P.defined, X = P.discardElement, g = P.erase, m = P.error, L = P.extend, Y = P.find, V = P.fireEvent, Q = P.getStyle, k = P.isArray, G = P.isNumber, z = P.isObject, $ = P.isString, q = P.merge, it = P.objectEach, et = P.pick, nt = P.pInt, rt = P.relativeLength, ct = P.removeEvent, gt = P.splat, dt = P.syncTimeout, lt = P.uniqueKey;
return y = function() {
function at(J, tt, st) {
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, st);
}
return at.chart = function(J, tt, st) {
return new at(J, tt, st);
}, at.prototype.getArgs = function(J, tt, st) {
$(J) || J.nodeName ? (this.renderTo = J, this.init(tt, st)) : this.init(J, tt);
}, at.prototype.init = function(J, tt) {
var st = J.plotOptions || {};
V(this, "init", { args: arguments }, function() {
var ht = q(s, J), pt = ht.chart;
it(ht.plotOptions, function(yt, vt) {
z(yt) && (yt.tooltip = st[vt] && q(st[vt].tooltip) || void 0);
}), ht.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 = ht, this.axes = [], this.series = [], this.time = J.time && Object.keys(J.time).length ? new u(J.time) : F.time, this.numberFormatter = pt.numberFormatter || w, this.styledMode = pt.styledMode, this.hasCartesianSeries = pt.showAxes, this.index = a.length, a.push(this), F.chartCount++, v(this, pt), this.xAxis = [], this.yAxis = [], this.pointCount = this.colorCounter = this.symbolCounter = 0, V(this, "afterInit"), this.firstRender();
});
}, at.prototype.initSeries = function(J) {
var tt = this.options.chart;
tt = J.type || tt.type || tt.defaultSeriesType;
var st = o[tt];
return st || m(17, !0, this, { missingModuleFor: tt }), tt = new st(), 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 st = tt.length; J < st; ++J)
tt[J] && (tt[J].index = J, tt[J].name = tt[J].getName());
}, at.prototype.isInsidePlot = function(J, tt, st) {
st === void 0 && (st = {});
var ht = this.inverted, pt = this.plotBox, yt = this.plotLeft, vt = this.plotTop, Ct = this.scrollablePlotBox, Pt = 0, kt = 0;
st.visiblePlotOnly && this.scrollingContainer && (kt = this.scrollingContainer, Pt = kt.scrollLeft, kt = kt.scrollTop);
var St = st.series;
if (pt = st.visiblePlotOnly && Ct || pt, Ct = st.inverted ? tt : J, tt = st.inverted ? J : tt, J = { x: Ct, y: tt, isInsidePlot: !0 }, !st.ignoreX) {
var Dt = St && (ht ? St.yAxis : St.xAxis) || { pos: yt, len: 1 / 0 };
Ct = st.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 !st.ignoreY && J.isInsidePlot && (ht = St && (ht ? St.xAxis : St.yAxis) || { pos: vt, len: 1 / 0 }, st = st.paneCoordinates ? ht.pos + tt : vt + tt, st >= Math.max(kt + vt, ht.pos) && st <= Math.min(kt + vt + pt.height, ht.pos + ht.len) || (J.isInsidePlot = !1)), V(this, "afterIsInsidePlot", J), J.isInsidePlot;
}, at.prototype.redraw = function(J) {
V(this, "beforeRedraw");
var tt = this.hasCartesianSeries ? this.axes : this.colorAxis || [], st = this.series, ht = this.pointer, pt = this.legend, yt = this.userOptions.legend, vt = this.renderer, Ct = vt.isHidden(), Pt = [], kt = this.isDirtyBox, St = this.isDirtyLegend;
for (this.setResponsive && this.setResponsive(!1), b(this.hasRendered ? J : !1, this), Ct && this.temporaryDisplay(), this.layOutTitles(), J = st.length; J--; ) {
var Dt = st[J];
if (Dt.options.stacking || Dt.options.centerInCategory) {
var Lt = !0;
if (Dt.isDirty) {
var Nt = !0;
break;
}
}
}
if (Nt)
for (J = st.length; J--; )
Dt = st[J], Dt.options.stacking && (Dt.isDirty = !0);
st.forEach(function(Et) {
Et.isDirty && (Et.options.legendType === "point" ? (typeof Et.updateTotals == "function" && Et.updateTotals(), St = !0) : yt && (yt.labelFormatter || yt.labelFormat) && (St = !0)), Et.isDirtyData && V(Et, "updatedData");
}), St && pt && pt.options.enabled && (pt.render(), this.isDirtyLegend = !1), Lt && this.getStacks(), tt.forEach(function(Et) {
Et.updateNames(), Et.setScale();
}), this.getMargins(), tt.forEach(function(Et) {
Et.isDirty && (kt = !0);
}), tt.forEach(function(Et) {
var Kt = Et.min + "," + Et.max;
Et.extKey !== Kt && (Et.extKey = Kt, Pt.push(function() {
V(Et, "afterSetExtremes", L(Et.eventArgs, Et.getExtremes())), delete Et.eventArgs;
})), (kt || Lt) && Et.redraw();
}), kt && this.drawChartBox(), V(this, "predraw"), st.forEach(function(Et) {
(kt || Et.isDirty) && Et.visible && Et.redraw(), Et.isDirtyData = !1;
}), ht && ht.reset(!0), vt.draw(), V(this, "redraw"), V(this, "render"), Ct && this.temporaryDisplay(!0), Pt.forEach(function(Et) {
Et.call();
});
}, at.prototype.get = function(J) {
function tt(yt) {
return yt.id === J || yt.options && yt.options.id === J;
}
for (var st = this.series, ht = Y(this.axes, tt) || Y(this.series, tt), pt = 0; !ht && pt < st.length; pt++)
ht = Y(st[pt].points || [], tt);
return ht;
}, at.prototype.getAxes = function() {
var J = this, tt = this.options, st = tt.xAxis = gt(tt.xAxis || {});
tt = tt.yAxis = gt(tt.yAxis || {}), V(this, "getAxes"), st.forEach(function(ht, pt) {
ht.index = pt, ht.isX = !0;
}), tt.forEach(function(ht, pt) {
ht.index = pt;
}), st.concat(tt).forEach(function(ht) {
new B(J, ht);
}), V(this, "afterGetAxes");
}, at.prototype.getSelectedPoints = function() {
return this.series.reduce(function(J, tt) {
return tt.getPointsCollection().forEach(function(st) {
et(st.selectedStaging, st.selected) && J.push(st);
}), J;
}, []);
}, at.prototype.getSelectedSeries = function() {
return this.series.filter(function(J) {
return J.selected;
});
}, at.prototype.setTitle = function(J, tt, st) {
this.applyDescription("title", J), this.applyDescription("subtitle", tt), this.applyDescription(
"caption",
void 0
), this.layOutTitles(st);
}, at.prototype.applyDescription = function(J, tt) {
var st = this, ht = J === "title" ? { color: "#333333", fontSize: this.options.isStock ? "16px" : "18px" } : { color: "#666666" };
ht = this.options[J] = q(!this.styledMode && { style: ht }, this.options[J], tt);
var pt = this[J];
pt && tt && (this[J] = pt = pt.destroy()), ht && !pt && (pt = this.renderer.text(ht.text, 0, 0, ht.useHTML).attr({ align: ht.align, class: "highcharts-" + J, zIndex: ht.zIndex || 4 }).add(), pt.update = function(yt) {
st[{ title: "setTitle", subtitle: "setSubtitle", caption: "setCaption" }[J]](yt);
}, this.styledMode || pt.css(ht.style), this[J] = pt);
}, at.prototype.layOutTitles = function(J) {
var tt = [0, 0, 0], st = this.renderer, ht = 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 kt;
if (vt) {
this.styledMode || (kt = Ct.style && Ct.style.fontSize), kt = st.fontMetrics(kt, vt).b, vt.css({ width: (Ct.width || ht.width + (Ct.widthAdjust || 0)) + "px" });
var St = Math.round(vt.getBBox(Ct.useHTML).height);
vt.align(L({ y: Pt === "bottom" ? kt : yt + kt, 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, V(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 st = this.renderTo;
T(tt) || (this.containerWidth = Q(st, "width")), T(J) || (this.containerHeight = Q(st, "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 && (j(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), j(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, st = lt(), ht, pt = this.renderTo;
pt || (this.renderTo = pt = tt.renderTo), $(pt) && (this.renderTo = pt = c.getElementById(pt)), pt || m(13, !0, this);
var yt = nt(A(pt, "data-highcharts-chart"));
G(yt) && a[yt] && a[yt].hasRendered && a[yt].destroy(), A(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 (j(pt, { overflow: "hidden" }), this.styledMode || (ht = 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 = st = D("div", { id: st }, ht, pt), this._cursor = st.style.cursor, this.renderer = new (tt.renderer || !i ? S.getRendererType(tt.renderer) : d)(st, 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, V(this, "afterGetContainer");
}, at.prototype.getMargins = function(J) {
var tt = this.spacing, st = this.margin, ht = this.titleOffset;
this.resetMargins(), ht[0] && !T(st[0]) && (this.plotTop = Math.max(this.plotTop, ht[0] + tt[0])), ht[2] && !T(st[2]) && (this.marginBottom = Math.max(this.marginBottom, ht[2] + tt[2])), this.legend && this.legend.display && this.legend.adjustMargins(
st,
tt
), V(this, "getMargins"), J || this.getAxisMargins();
}, at.prototype.getAxisMargins = function() {
var J = this, tt = J.axisOffset = [0, 0, 0, 0], st = J.colorAxis, ht = J.margin, pt = function(yt) {
yt.forEach(function(vt) {
vt.visible && vt.getOffset();
});
};
J.hasCartesianSeries ? pt(J.axes) : st && st.length && pt(st), p.forEach(function(yt, vt) {
T(ht[vt]) || (J[yt] += tt[vt]);
}), J.setChartSize();
}, at.prototype.reflow = function(J) {
var tt = this, st = tt.options.chart, ht = tt.renderTo, pt = T(st.width) && T(st.height), yt = st.width || Q(ht, "width");
st = st.height || Q(ht, "height"), ht = J ? J.target : l, delete tt.pointer.chartPosition, !pt && !tt.isPrinting && yt && st && (ht === l || ht === c) && ((yt !== tt.containerWidth || st !== tt.containerHeight) && (P.clearTimeout(tt.reflowTimeout), tt.reflowTimeout = dt(function() {
tt.container && tt.setSize(void 0, void 0, !1);
}, J ? 100 : 0)), tt.containerWidth = yt, tt.containerHeight = st);
}, at.prototype.setReflow = function(J) {
var tt = this;
J === !1 || this.unbindReflow ? J === !1 && this.unbindReflow && (this.unbindReflow = this.unbindReflow()) : (this.unbindReflow = n(l, "resize", function(st) {
tt.options && tt.reflow(st);
}), n(this, "destroy", this.unbindReflow));
}, at.prototype.setSize = function(J, tt, st) {
var ht = this, pt = ht.renderer;
ht.isResizing += 1, b(st, ht), st = pt.globalAnimation, ht.oldChartHeight = ht.chartHeight, ht.oldChartWidth = ht.chartWidth, typeof J < "u" && (ht.options.chart.width = J), typeof tt < "u" && (ht.options.chart.height = tt), ht.getChartSize(), ht.styledMode || (st ? N : j)(ht.container, { width: ht.chartWidth + "px", height: ht.chartHeight + "px" }, st), ht.setChartSize(!0), pt.setSize(ht.chartWidth, ht.chartHeight, st), ht.axes.forEach(function(yt) {
yt.isDirty = !0, yt.setScale();
}), ht.isDirtyLegend = !0, ht.isDirtyBox = !0, ht.layOutTitles(), ht.getMargins(), ht.redraw(st), ht.oldChartHeight = null, V(ht, "resize"), dt(function() {
ht && V(ht, "endResize", null, function() {
--ht.isResizing;
});
}, C(st).duration);
}, at.prototype.setChartSize = function(J) {
var tt = this.inverted, st = this.renderer, ht = this.chartWidth, pt = this.chartHeight, yt = this.options.chart, vt = this.spacing, Ct = this.clipOffset, Pt, kt, St, Dt;
this.plotLeft = Pt = Math.round(this.plotLeft), this.plotTop = kt = Math.round(this.plotTop), this.plotWidth = St = Math.max(0, Math.round(ht - Pt - this.marginRight)), this.plotHeight = Dt = Math.max(0, Math.round(pt - kt - this.marginBottom)), this.plotSizeX = tt ? Dt : St, this.plotSizeY = tt ? St : Dt, this.plotBorderWidth = yt.plotBorderWidth || 0, this.spacingBox = st.spacingBox = { x: vt[3], y: vt[0], width: ht - vt[3] - vt[1], height: pt - vt[0] - vt[2] }, this.plotBox = st.plotBox = { x: Pt, y: kt, width: St, height: Dt }, tt = 2 * Math.floor(this.plotBorderWidth / 2), ht = Math.ceil(Math.max(tt, Ct[3]) / 2), pt = Math.ceil(Math.max(tt, Ct[0]) / 2), this.clipBox = { x: ht, y: pt, width: Math.floor(this.plotSizeX - Math.max(tt, Ct[1]) / 2 - ht), height: Math.max(0, Math.floor(this.plotSizeY - Math.max(tt, Ct[2]) / 2 - pt)) }, J || (this.axes.forEach(function(Lt) {
Lt.setAxisSize(), Lt.setAxisTranslation();
}), st.alignElements()), V(this, "afterSetChartSize", { skipAxes: J });
}, at.prototype.resetMargins = function() {
V(this, "resetMargins");
var J = this, tt = J.options.chart;
["margin", "spacing"].forEach(function(st) {
var ht = tt[st], pt = z(ht) ? ht : [ht, ht, ht, ht];
["Top", "Right", "Bottom", "Left"].forEach(function(yt, vt) {
J[st][vt] = et(tt[st + yt], pt[vt]);
});
}), p.forEach(function(st, ht) {
J[st] = et(J.margin[ht], J.spacing[ht]);
}), J.axisOffset = [0, 0, 0, 0], J.clipOffset = [0, 0, 0, 0];
}, at.prototype.drawChartBox = function() {
var J = this.options.chart, tt = this.renderer, st = this.chartWidth, ht = this.chartHeight, pt = this.styledMode, yt = this.plotBGImage, vt = J.backgroundColor, Ct = J.plotBackgroundColor, Pt = J.plotBackgroundImage, kt = this.plotLeft, St = this.plotTop, Dt = this.plotWidth, Lt = this.plotHeight, Nt = this.plotBox, Et = this.clipRect, Kt = this.clipBox, Gt = this.chartBackground, Wt = this.plotBackground, Jt = this.plotBorder, be, zt = "animate";
if (Gt || (this.chartBackground = Gt = tt.rect().addClass("highcharts-background").add(), zt = "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[zt]({ x: be / 2, y: be / 2, width: st - be - Vt % 2, height: ht - be - Vt % 2, r: J.borderRadius }), zt = "animate", Wt || (zt = "attr", this.plotBackground = Wt = tt.rect().addClass("highcharts-plot-background").add()), Wt[zt](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, kt, St, Dt, Lt).add())), Et ? Et.animate({ width: Kt.width, height: Kt.height }) : this.clipRect = tt.clipRect(Kt), zt = "animate", Jt || (zt = "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[zt](Jt.crisp({ x: kt, y: St, width: Dt, height: Lt }, -Jt.strokeWidth())), this.isDirtyBox = !1, V(this, "afterDrawChartBox");
}, at.prototype.propFromSeries = function() {
var J = this, tt = J.options.chart, st = J.options.series, ht, pt, yt;
["inverted", "angular", "polar"].forEach(function(vt) {
for (pt = o[tt.type || tt.defaultSeriesType], yt = tt[vt] || pt && pt.prototype[vt], ht = st && st.length; !yt && ht--; )
(pt = o[st[ht].type]) && pt.prototype[vt] && (yt = !0);
J[vt] = yt;
});
}, at.prototype.linkSeries = function() {
var J = this, tt = J.series;
tt.forEach(function(st) {
st.linkedSeries.length = 0;
}), tt.forEach(function(st) {
var ht = st.options.linkedTo;
$(ht) && (ht = ht === ":previous" ? J.series[st.index - 1] : J.get(ht)) && ht.linkedParent !== st && (ht.linkedSeries.push(st), st.linkedParent = ht, ht.enabledDataSorting && st.setDataSortingOptions(), st.visible = et(st.options.visible, ht.options.visible, st.visible));
}), V(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(st) {
var ht = L(tt.style, st.style), pt = nt(ht.left) + J.plotLeft, yt = nt(ht.top) + J.plotTop + 12;
delete ht.left, delete ht.top, J.renderer.text(st.html, pt, yt).attr({ zIndex: 2 }).css(ht).add();
});
}, at.prototype.render = function() {
var J = this.axes, tt = this.colorAxis, st = this.renderer, ht = this.options, pt = function(kt) {
kt.forEach(function(St) {
St.visible && St.render();
});
}, yt = 0;
this.setTitle(), this.legend = new U(this, ht.legend), this.getStacks && this.getStacks(), this.getMargins(!0), this.setChartSize(), ht = this.plotWidth, J.some(function(kt) {
if (kt.horiz && kt.visible && kt.options.labels.enabled && kt.series.length)
return yt = 21, !0;
});
var vt = this.plotHeight = Math.max(this.plotHeight - yt, 0);
J.forEach(function(kt) {
kt.setScale();
}), this.getAxisMargins();
var Ct = 1.1 < ht / this.plotWidth, Pt = 1.05 < vt / this.plotHeight;
(Ct || Pt) && (J.forEach(function(kt) {
(kt.horiz && Ct || !kt.horiz && Pt) && kt.setTickInterval(!0);
}), this.getMargins()), this.drawChartBox(), this.hasCartesianSeries ? pt(J) : tt && tt.length && pt(tt), this.seriesGroup || (this.seriesGroup = st.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, st = q(!0, this.options.credits, J);
st.enabled && !this.credits && (this.credits = this.renderer.text(st.text + (this.mapCredits || ""), 0, 0).addClass("highcharts-credits").on("click", function() {
st.href && (l.location.href = st.href);
}).attr({ align: st.position.align, zIndex: 8 }), tt.styledMode || this.credits.css(st.style), this.credits.add().align(st.position), this.credits.update = function(ht) {
tt.credits = tt.credits.destroy(), tt.addCredits(ht);
});
}, at.prototype.destroy = function() {
var J = this, tt = J.axes, st = J.series, ht = J.container, pt = ht && ht.parentNode, yt;
for (V(J, "destroy"), J.renderer.forExport ? g(a, J) : a[J.index] = void 0, F.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 = st.length; yt--; )
st[yt] = st[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());
}), ht && (ht.innerHTML = O.emptyHTML, ct(ht), pt && X(ht)), 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(), (k(tt.series) ? tt.series : []).forEach(function(st) {
J.initSeries(st);
}), J.linkSeries(), J.setSeriesData(), V(J, "beforeRender"), R && (H.isRequired() ? J.pointer = new H(J, tt) : J.pointer = new R(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), V(this, "load"), V(this, "render"), T(this.index) && this.setReflow(this.options.chart.reflow), this.hasLoaded = !0;
}, at.prototype.addSeries = function(J, tt, st) {
var ht = this, pt;
return J && (tt = et(tt, !0), V(ht, "addSeries", { options: J }, function() {
pt = ht.initSeries(J), ht.isDirtyLegend = !0, ht.linkSeries(), pt.enabledDataSorting && pt.setData(J.data, !1), V(ht, "afterAddSeries", { series: pt }), tt && ht.redraw(st);
})), pt;
}, at.prototype.addAxis = function(J, tt, st, ht) {
return this.createAxis(tt ? "xAxis" : "yAxis", { axis: J, redraw: st, animation: ht });
}, at.prototype.addColorAxis = function(J, tt, st) {
return this.createAxis(
"colorAxis",
{ axis: J, redraw: tt, animation: st }
);
}, at.prototype.createAxis = function(J, tt) {
return J = new B(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, st = tt.options, ht = st.loading, pt = function() {
yt && j(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 = D("div", { className: "highcharts-loading highcharts-loading-hidden" }, null, tt.container)), vt || (tt.loadingSpan = vt = D("span", { className: "highcharts-loading-inner" }, null, yt), n(tt, "redraw", pt)), yt.className = "highcharts-loading", O.setElementHTML(vt, et(J, st.lang.loading, "")), tt.styledMode || (j(yt, L(ht.style, { zIndex: 10 })), j(vt, ht.labelStyle), tt.loadingShown || (j(yt, { opacity: 0, display: "" }), N(yt, { opacity: ht.style.opacity || 0.5 }, { duration: ht.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 || N(tt, { opacity: 0 }, { duration: J.loading.hideDuration || 100, complete: function() {
j(tt, { display: "none" });
} })), this.loadingShown = !1;
}, at.prototype.update = function(J, tt, st, ht) {
var pt = this, yt = { credits: "addCredits", title: "setTitle", subtitle: "setSubtitle", caption: "setCaption" }, vt = J.isResponsiveOptions, Ct = [], Pt, kt;
V(pt, "update", { options: J }), vt || pt.setResponsive(!1, !0), J = _(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(Lt, 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 : kt = !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 u(J.time)), q(
!0,
pt.options.time,
J.time
)), it(J, function(Lt, Nt) {
pt[Nt] && typeof pt[Nt].update == "function" ? pt[Nt].update(Lt, !1) : typeof pt[yt[Nt]] == "function" ? pt[yt[Nt]](Lt) : 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(Lt) {
if (J[Lt]) {
var Nt = [];
pt[Lt].forEach(function(Et, Kt) {
Et.options.isInternal || Nt.push(et(Et.options.index, Kt));
}), gt(J[Lt]).forEach(function(Et, Kt) {
var Gt = T(Et.id), Wt;
Gt && (Wt = pt.get(Et.id)), !Wt && pt[Lt] && (Wt = pt[Lt][Nt ? Nt[Kt] : Kt]) && Gt && T(Wt.options.id) && (Wt = void 0), Wt && Wt.coll === Lt && (Wt.update(Et, !1), st && (Wt.touched = !0)), !Wt && st && pt.collectionsWithInit[Lt] && (pt.collectionsWithInit[Lt][0].apply(pt, [Et].concat(pt.collectionsWithInit[Lt][1] || []).concat([!1])).touched = !0);
}), st && pt[Lt].forEach(function(Et) {
Et.touched || Et.options.isInternal ? delete Et.touched : Ct.push(Et);
});
}
}), Ct.forEach(function(Lt) {
Lt.chart && Lt.remove && Lt.remove(!1);
}), Dt && pt.axes.forEach(function(Lt) {
Lt.update({}, !1);
}), Pt && pt.getSeriesOrderByLinks().forEach(function(Lt) {
Lt.chart && Lt.update({}, !1);
}, this), Dt = St && St.width, St = St && ($(St.height) ? rt(St.height, Dt || pt.chartWidth) : St.height), kt || G(Dt) && Dt !== pt.chartWidth || G(St) && St !== pt.chartHeight ? pt.setSize(Dt, St, ht) : et(tt, !0) && pt.redraw(ht), V(pt, "afterUpdate", { options: J, redraw: tt, animation: ht });
}, 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, st = s.lang, ht = tt.options.chart.resetZoomButton, pt = ht.theme, yt = pt.states, vt = ht.relativeTo === "chart" || ht.relativeTo === "spacingBox" ? null : "scrollablePlotBox";
V(this, "beforeShowResetZoom", null, function() {
tt.resetZoomButton = tt.renderer.button(st.resetZoom, null, null, J, pt, yt && yt.hover).attr({ align: ht.position.align, title: st.resetZoomTitle }).addClass("highcharts-reset-zoom").add().align(ht.position, !1, vt);
}), V(this, "afterShowResetZoom");
}, at.prototype.zoomOut = function() {
V(this, "selection", { resetSelection: !0 }, this.zoom);
}, at.prototype.zoom = function(J) {
var tt = this, st = tt.pointer, ht = tt.inverted ? st.mouseDownX : st.mouseDownY, pt = !1, yt;
!J || J.resetSelection ? (tt.axes.forEach(function(Ct) {
yt = Ct.zoom();
}), st.initiated = !1) : J.xAxis.concat(J.yAxis).forEach(function(Ct) {
var Pt = Ct.axis, kt = tt.inverted ? Pt.left : Pt.top, St = tt.inverted ? kt + Pt.width : kt + Pt.height, Dt = Pt.isXAxis, Lt = !1;
(!Dt && ht >= kt && ht <= St || Dt || !T(ht)) && (Lt = !0), st[Dt ? "zoomX" : "zoomY"] && Lt && (yt = Pt.zoom(Ct.min, Ct.max), Pt.displayBtn && (pt = !0));
});
var vt = tt.resetZoomButton;
pt && !vt ? tt.showResetZoom() : !pt && z(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 st = this, ht = st.hoverPoints;
tt = typeof tt == "object" ? tt : { enabled: tt, type: "x" };
var pt = st.options.chart, yt = st.options.mapNavigation && st.options.mapNavigation.enabled;
pt && pt.panning && (pt.panning = tt);
var vt = tt.type, Ct;
V(this, "pan", { originalEvent: J }, function() {
ht && ht.forEach(function(St) {
St.setState();
});
var Pt = st.xAxis;
vt === "xy" ? Pt = Pt.concat(st.yAxis) : vt === "y" && (Pt = st.yAxis);
var kt = {};
Pt.forEach(function(St) {
if (St.options.panningEnabled && !St.options.isInternal) {
var Dt = St.horiz, Lt = J[Dt ? "chartX" : "chartY"];
Dt = Dt ? "mouseDownX" : "mouseDownY";
var Nt = st[Dt], Et = St.minPointOffset || 0, Kt = St.reversed && !st.inverted || !St.reversed && st.inverted ? -1 : 1, Gt = St.getExtremes(), Wt = St.toValue(Nt - Lt, !0) + Et * Kt, Jt = St.toValue(Nt + St.len - Lt, !0) - (Et * Kt || St.isXAxis && St.pointRangePadding || 0), be = Jt < Wt;
Kt = St.hasVerticalPanning(), Nt = be ? Jt : Wt, Wt = be ? Wt : Jt;
var zt = St.panningState;
!Kt || St.isXAxis || zt && !zt.isDirty || St.series.forEach(function(Vt) {
var Me = Vt.getProcessedData(!0);
Me = Vt.getExtremes(Me.yData, !0), zt || (zt = { startMin: Number.MAX_VALUE, startMax: -Number.MAX_VALUE }), G(Me.dataMin) && G(Me.dataMax) && (zt.startMin = Math.min(et(Vt.options.threshold, 1 / 0), Me.dataMin, zt.startMin), zt.startMax = Math.max(et(Vt.options.threshold, -1 / 0), Me.dataMax, zt.startMax));
}), Kt = Math.min(et(zt && zt.startMin, Gt.dataMin), Et ? Gt.min : St.toValue(St.toPixels(Gt.min) - St.minPixelPadding)), Jt = Math.max(et(zt && zt.startMax, Gt.dataMax), Et ? Gt.max : St.toValue(St.toPixels(Gt.max) + St.minPixelPadding)), St.panningState = zt, St.isOrdinal || (Et = Kt - Nt, 0 < Et && (Wt += Et, Nt = Kt), Et = Wt - Jt, 0 < Et && (Wt = Jt, Nt -= Et), St.series.length && Nt !== Gt.min && Wt !== Gt.max && Nt >= Kt && Wt <= Jt && (St.setExtremes(
Nt,
Wt,
!1,
!1,
{ trigger: "pan" }
), st.resetZoomButton || yt || Nt === Kt || Wt === Jt || !vt.match("y") || (st.showResetZoom(), St.displayBtn = !1), Ct = !0), kt[Dt] = Lt);
}
}), it(kt, function(St, Dt) {
st[Dt] = St;
}), Ct && st.redraw(!1), j(st.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;
}), E(h, "Core/Legend/LegendSymbol.js", [h["Core/Utilities.js"]], function(y) {
var B = y.merge, I = y.pick, Z;
return function(F) {
F.drawLineMarker = function(U) {
var H = this.options, W = U.symbolWidth, R = U.symbolHeight, S = R / 2, x = this.chart.renderer, d = this.legendGroup;
U = U.baseline - Math.round(0.3 * U.fontMetrics.b);
var u = {}, P = H.marker;
this.chart.styledMode || (u = { "stroke-width": H.lineWidth || 0 }, H.dashStyle && (u.dashstyle = H.dashStyle)), this.legendLine = x.path([["M", 0, U], ["L", W, U]]).addClass("highcharts-graph").attr(u).add(d), P && P.enabled !== !1 && W && (H = Math.min(I(P.radius, S), S), this.symbol.indexOf("url") === 0 && (P = B(P, { width: R, height: R }), H = 0), this.legendSymbol = W = x.symbol(this.symbol, W / 2 - H, U - H, 2 * H, 2 * H, P).addClass("highcharts-point").add(d), W.isMarker = !0);
}, F.drawRectangle = function(U, H) {
var W = U.symbolHeight, R = U.options.squareSymbol;
H.legendSymbol = this.chart.renderer.rect(R ? (U.symbolWidth - W) / 2 : 0, U.baseline - W + 1, R ? W : U.symbolWidth, W, I(U.options.symbolRadius, W / 2)).addClass("highcharts-point").attr({ zIndex: 3 }).add(H.legendGroup);
};
}(Z || (Z = {})), Z;
}), E(h, "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" };
}), E(h, "Core/Series/Series.js", [
h["Core/Animation/AnimationUtilities.js"],
h["Core/DefaultOptions.js"],
h["Core/Foundation.js"],
h["Core/Globals.js"],
h["Core/Legend/LegendSymbol.js"],
h["Core/Series/Point.js"],
h["Core/Series/SeriesDefaults.js"],
h["Core/Series/SeriesRegistry.js"],
h["Core/Renderer/SVG/SVGElement.js"],
h["Core/Utilities.js"]
], function(y, B, I, Z, F, U, H, W, R, S) {
var x = y.animObject, d = y.setAnimation, u = B.defaultOptions, P = I.registerEventOptions, O = Z.hasTouch, N = Z.svg, C = Z.win, b = W.seriesTypes, w = S.addEvent, v = S.arrayMax, a = S.arrayMin, c = S.clamp, p = S.cleanRecursively, i = S.correctFloat, l = S.defined, s = S.erase, t = S.error, o = S.extend, n = S.find, A = S.fireEvent, _ = S.getNestedProperty, D = S.isArray, j = S.isNumber, T = S.isString, X = S.merge, g = S.objectEach, m = S.pick, L = S.removeEvent, Y = S.splat, V = S.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(k, G) {
A(this, "init", { options: G });
var z = this, $ = k.series;
this.eventsToUnbind = [], z.chart = k, z.options = z.setOptions(G), G = z.options, z.linkedSeries = [], z.bindAxes(), o(z, { name: G.name, state: "", visible: G.visible !== !1, selected: G.selected === !0 }), P(this, G);
var q = G.events;
(q && q.click || G.point && G.point.events && G.point.events.click || G.allowPointSelect) && (k.runTrackerClick = !0), z.getColor(), z.getSymbol(), z.parallelArrays.forEach(function(et) {
z[et + "Data"] || (z[et + "Data"] = []);
}), z.isCartesian && (k.hasCartesianSeries = !0);
var it;
$.length && (it = $[$.length - 1]), z._i = m(it && it._i, -1) + 1, z.opacity = z.options.opacity, k.orderSeries(this.insert($)), G.dataSorting && G.dataSorting.enabled ? z.setDataSortingOptions() : z.points || z.data || z.setData(G.data, !1), A(this, "afterInit");
}, Q.prototype.is = function(k) {
return b[k] && this instanceof b[k];
}, Q.prototype.insert = function(k) {
var G = this.options.index, z;
if (j(G)) {
for (z = k.length; z--; )
if (G >= m(k[z].options.index, k[z]._i)) {
k.splice(z + 1, 0, this);
break;
}
z === -1 && k.unshift(this), z += 1;
} else
k.push(this);
return m(z, k.length - 1);
}, Q.prototype.bindAxes = function() {
var k = this, G = k.options, z = k.chart, $;
A(this, "bindAxes", null, function() {
(k.axisTypes || []).forEach(function(q) {
var it = 0;
z[q].forEach(function(et) {
$ = et.options, (G[q] === it && !$.isInternal || typeof G[q] < "u" && G[q] === $.id || typeof G[q] > "u" && $.index === 0) && (k.insert(et.series), k[q] = et, et.isDirty = !0), $.isInternal || it++;
}), k[q] || k.optionalAxis === q || t(18, !0, z);
});
}), A(this, "afterBindAxes");
}, Q.prototype.updateParallelArrays = function(k, G) {
var z = k.series, $ = arguments, q = j(G) ? function(it) {
var et = it === "y" && z.toYData ? z.toYData(k) : k[it];
z[it + "Data"][G] = et;
} : function(it) {
Array.prototype[G].apply(z[it + "Data"], Array.prototype.slice.call($, 2));
};
z.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(k) {
var G = this.options, z = G.pointIntervalUnit, $ = G.relativeXValue, q = this.chart.time, it = this.xIncrement, et;
return it = m(it, G.pointStart, 0), this.pointInterval = et = m(this.pointInterval, G.pointInterval, 1), $ && j(k) && (et *= k), z && (G = new q.Date(it), z === "day" ? q.set("Date", G, q.get("Date", G) + et) : z === "month" ? q.set("Month", G, q.get("Month", G) + et) : z === "year" && q.set("FullYear", G, q.get("FullYear", G) + et), et = G.getTime() - it), $ && j(k) ? it + et : (this.xIncrement = it + et, it);
}, Q.prototype.setDataSortingOptions = function() {
var k = this.options;
o(this, { requireSorting: !1, sorted: !1, enabledDataSorting: !0, allowDG: !1 }), l(k.pointRange) || (k.pointRange = 1);
}, Q.prototype.setOptions = function(k) {
var G = this.chart, z = G.options, $ = z.plotOptions, q = G.userOptions || {};
k = X(k), G = G.styledMode;
var it = { plotOptions: $, userOptions: k };
A(this, "setOptions", it);
var et = it.plotOptions[this.type], nt = q.plotOptions || {};
return this.userOptions = it.userOptions, q = X(et, $.series, q.plotOptions && q.plotOptions[this.type], k), this.tooltipOptions = X(u.tooltip, u.plotOptions.series && u.plotOptions.series.tooltip, u.plotOptions[this.type].tooltip, z.tooltip.userOptions, $.series && $.series.tooltip, $[this.type].tooltip, k.tooltip), this.stickyTracking = m(k.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, $ = this.zones = (q.zones || []).slice(), !q.negativeColor && !q.negativeFillColor || q.zones || (z = { value: q[this.zoneAxis + "Threshold"] || q.threshold || 0, className: "highcharts-negative" }, G || (z.color = q.negativeColor, z.fillColor = q.negativeFillColor), $.push(z)), $.length && l($[$.length - 1].value) && $.push(G ? {} : { color: this.color, fillColor: this.fillColor }), A(this, "afterSetOptions", { options: q }), q;
}, Q.prototype.getName = function() {
return m(this.options.name, "Series " + (this.index + 1));
}, Q.prototype.getCyclic = function(k, G, z) {
var $ = this.chart, q = this.userOptions, it = k + "Index", et = k + "Counter", nt = z ? z.length : m($.options.chart[k + "Count"], $[k + "Count"]);
if (!G) {
var rt = m(q[it], q["_" + it]);
l(rt) || ($.series.length || ($[et] = 0), q["_" + it] = rt = $[et] % nt, $[et] += 1), z && (G = z[rt]);
}
typeof rt < "u" && (this[it] = rt), this[k] = G;
}, Q.prototype.getColor = function() {
this.chart.styledMode ? this.getCyclic("color") : this.options.colorByPoint ? this.color = "#cccccc" : this.getCyclic("color", this.options.color || u.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(k, G) {
var z = k.id, $ = k.x, q = this.points, it = this.options.dataSorting, et, nt;
if (z)
it = this.chart.get(z), it instanceof U && (et = it);
else if ((this.linkedParent || this.enabledDataSorting || this.options.relativeXValue) && (et = function(ct) {
return !ct.touched && ct.index === k.index;
}, it && it.matchByName ? et = function(ct) {
return !ct.touched && ct.name === k.name;
} : this.options.relativeXValue && (et = function(ct) {
return !ct.touched && ct.options.x === k.x;
}), et = n(q, et), !et))
return;
if (et) {
var rt = et && et.index;
typeof rt < "u" && (nt = !0);
}
return typeof rt > "u" && j($) && (rt = this.xData.indexOf($, G)), rt !== -1 && typeof rt < "u" && this.cropped && (rt = rt >= this.cropStart ? rt - this.cropStart : rt), !nt && j(rt) && q[rt] && q[rt].touched && (rt = void 0), rt;
}, Q.prototype.updateData = function(k, G) {
var z = this.options, $ = z.dataSorting, q = this.points, it = [], et = this.requireSorting, nt = k.length === q.length, rt, ct, gt, dt = !0;
if (this.xIncrement = null, k.forEach(function(lt, at) {
var J = l(lt) && this.pointClass.prototype.optionsToObject.call({ series: this }, lt) || {}, tt = J.x;
J.id || j(tt) ? (J = this.findPointIndex(J, gt), J === -1 || typeof J > "u" ? it.push(lt) : q[J] && lt !== z.data[J] ? (q[J].update(lt, !1, null, !1), q[J].touched = !0, et && (gt = J + 1)) : q[J] && (q[J].touched = !0), (!nt || at !== J || $ && $.enabled || this.hasDerivedData) && (rt = !0)) : it.push(lt);
}, this), rt)
for (k = q.length; k--; )
(ct = q[k]) && !ct.touched && ct.remove && ct.remove(!1, G);
else
!nt || $ && $.enabled ? dt = !1 : (k.forEach(function(lt, at) {
lt !== q[at].y && q[at].update && q[at].update(
lt,
!1,
null,
!1
);
}), it.length = 0);
return q.forEach(function(lt) {
lt && (lt.touched = !1);
}), dt ? (it.forEach(function(lt) {
this.addPoint(lt, !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(k, G, 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, lt = this.xData, at = this.yData, J = q.pointArrayMap;
J = J && J.length;
var tt = nt.keys, st, ht = 0, pt = 1, yt = null;
k = k || [];
var vt = k.length;
if (G = m(G, !0), ct && ct.enabled && (k = this.sortData(k)), $ !== !1 && vt && et && !q.cropped && !q.hasGroupedData && q.visible && !q.isSeriesBoosting && (st = this.updateData(k, z)), !st) {
if (q.xIncrement = null, q.colorCounter = 0, this.parallelArrays.forEach(function(Ct) {
q[Ct + "Data"].length = 0;
}), dt && vt > dt)
if (yt = q.getFirstValidPoint(k), j(yt))
for (z = 0; z < vt; z++)
lt[z] = this.autoIncrement(), at[z] = k[z];
else if (D(yt))
if (J)
if (yt.length === J)
for (z = 0; z < vt; z++)
lt[z] = this.autoIncrement(), at[z] = k[z];
else
for (z = 0; z < vt; z++)
$ = k[z], lt[z] = $[0], at[z] = $.slice(
1,
J + 1
);
else if (tt && (ht = tt.indexOf("x"), pt = tt.indexOf("y"), ht = 0 <= ht ? ht : 0, pt = 0 <= pt ? pt : 1), yt.length === 1 && (pt = 0), ht === pt)
for (z = 0; z < vt; z++)
lt[z] = this.autoIncrement(), at[z] = k[z][pt];
else
for (z = 0; z < vt; z++)
$ = k[z], lt[z] = $[ht], at[z] = $[pt];
else
t(12, !1, rt);
else
for (z = 0; z < vt; z++)
typeof k[z] < "u" && ($ = { series: q }, q.pointClass.prototype.applyOptions.apply($, [k[z]]), q.updateParallelArrays($, z));
for (at && T(at[0]) && t(14, !0, rt), q.data = [], q.options.data = q.userOptions.data = k, z = et; z--; )
it[z] && it[z].destroy && it[z].destroy();
gt && (gt.minRange = gt.userMinRange), q.isDirty = rt.isDirtyBox = !0, q.isDirtyData = !!it, z = !1;
}
nt.legendType === "point" && (this.processData(), this.generatePoints()), G && rt.redraw(z);
}, Q.prototype.sortData = function(k) {
var G = this, z = G.options.dataSorting.sortKey || "y", $ = function(q, it) {
return l(it) && q.pointClass.prototype.optionsToObject.call({ series: q }, it) || {};
};
return k.forEach(function(q, it) {
k[it] = $(G, q), k[it].index = it;
}, this), k.concat().sort(function(q, it) {
return q = _(z, q), it = _(z, it), it < q ? -1 : it > q ? 1 : 0;
}).forEach(function(q, it) {
q.x = it;
}, this), G.linkedSeries && G.linkedSeries.forEach(function(q) {
var it = q.options, et = it.data;
it.dataSorting && it.dataSorting.enabled || !et || (et.forEach(function(nt, rt) {
et[rt] = $(q, nt), k[rt] && (et[rt].x = k[rt].x, et[rt].index = rt);
}), q.setData(et, !1));
}), k;
}, Q.prototype.getProcessedData = function(k) {
var G = this.xAxis, z = this.options, $ = z.cropThreshold, q = k || this.getExtremesFromAll || z.getExtremesFromAll, it = this.isCartesian;
k = G && G.val2lin, z = !(!G || !G.logarithmic);
var et = 0, nt = this.xData, rt = this.yData, ct = this.requireSorting, gt = !1, dt = nt.length;
if (G) {
gt = G.getExtremes();
var lt = gt.min, at = gt.max;
gt = G.categories && !G.names.length;
}
if (it && this.sorted && !q && (!$ || dt > $ || this.forceCrop)) {
if (nt[dt - 1] < lt || nt[0] > at)
nt = [], rt = [];
else if (this.yData && (nt[0] < lt || nt[dt - 1] > at)) {
var J = this.cropData(this.xData, this.yData, lt, at);
nt = J.xData, rt = J.yData, et = J.start, J = !0;
}
}
for ($ = nt.length || 1; --$; )
if (G = z ? k(nt[$]) - k(nt[$ - 1]) : nt[$] - nt[$ - 1], 0 < G && (typeof tt > "u" || G < tt))
var tt = G;
else
0 > G && ct && !gt && (t(15, !1, this.chart), ct = !1);
return { xData: nt, yData: rt, cropped: J, cropStart: et, closestPointRange: tt };
}, Q.prototype.processData = function(k) {
var G = this.xAxis;
if (this.isCartesian && !this.isDirty && !G.isDirty && !this.yAxis.isDirty && !k)
return !1;
k = this.getProcessedData(), this.cropped = k.cropped, this.cropStart = k.cropStart, this.processedXData = k.xData, this.processedYData = k.yData, this.closestPointRange = this.basePointRange = k.closestPointRange, A(this, "afterProcessData");
}, Q.prototype.cropData = function(k, G, z, $, q) {
var it = k.length, et, nt = 0, rt = it;
for (q = m(q, this.cropShoulder), et = 0; et < it; et++)
if (k[et] >= z) {
nt = Math.max(0, et - q);
break;
}
for (z = et; z < it; z++)
if (k[z] > $) {
rt = z + q;
break;
}
return { xData: k.slice(nt, rt), yData: G.slice(
nt,
rt
), start: nt, end: rt };
}, Q.prototype.generatePoints = function() {
var k = this.options, G = k.data, z = this.processedXData, $ = this.processedYData, q = this.pointClass, it = z.length, et = this.cropStart || 0, nt = this.hasGroupedData, rt = k.keys, ct = [];
k = k.dataGrouping && k.dataGrouping.groupAll ? et : 0;
var gt, dt, lt = this.data;
if (!lt && !nt) {
var at = [];
at.length = G.length, lt = 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, [z[dt]].concat(Y($[dt])));
J.dataGroup = this.groupMap[k + dt], J.dataGroup.options && (J.options = J.dataGroup.options, o(J, J.dataGroup.options), delete J.dataLabels);
} else
(J = lt[at]) || typeof G[at] > "u" || (lt[at] = J = new q().init(this, G[at], z[dt]));
J && (J.index = nt ? k + dt : at, ct[dt] = J);
}
if (this.options.keys = rt, lt && (it !== (gt = lt.length) || nt))
for (dt = 0; dt < gt; dt++)
dt !== et || nt || (dt += it), lt[dt] && (lt[dt].destroyElements(), lt[dt].plotX = void 0);
this.data = lt, this.points = ct, A(this, "afterGeneratePoints");
}, Q.prototype.getXExtremes = function(k) {
return { min: a(k), max: v(k) };
}, Q.prototype.getExtremes = function(k, G) {
var z = this.xAxis, $ = this.yAxis, q = this.processedXData || this.xData, it = [], et = this.requireSorting ? this.cropShoulder : 0;
$ = $ ? $.positiveValuesOnly : !1;
var nt, rt = 0, ct = 0, gt = 0;
k = k || this.stackedYData || this.processedYData || [];
var dt = k.length;
if (z) {
var lt = z.getExtremes();
rt = lt.min, ct = lt.max;
}
for (nt = 0; nt < dt; nt++) {
var at = q[nt];
lt = k[nt];
var J = (j(lt) || D(lt)) && (lt.length || 0 < lt || !$);
if (at = G || this.getExtremesFromAll || this.options.getExtremesFromAll || this.cropped || !z || (q[nt + et] || at) >= rt && (q[nt - et] || at) <= ct, J && at)
if (J = lt.length)
for (; J--; )
j(lt[J]) && (it[gt++] = lt[J]);
else
it[gt++] = lt;
}
return k = { activeYData: it, dataMin: a(it), dataMax: v(it) }, A(this, "afterGetExtremes", { dataExtremes: k }), k;
}, Q.prototype.applyExtremes = function() {
var k = this.getExtremes();
return this.dataMin = k.dataMin, this.dataMax = k.dataMax, k;
}, Q.prototype.getFirstValidPoint = function(k) {
for (var G = k.length, z = 0, $ = null; $ === null && z < G; )
$ = k[z], z++;
return $;
}, Q.prototype.translate = function() {
this.processedXData || this.processData(), this.generatePoints();
var k = this.options, G = k.stacking, z = this.xAxis, $ = z.categories, q = this.enabledDataSorting, it = this.yAxis, et = this.points, nt = et.length, rt = this.pointPlacementToXValue(), ct = !!rt, gt = k.threshold, dt = k.startFromThreshold ? gt : 0, lt = this.zoneAxis || "y", at, J, tt = Number.MAX_VALUE;
for (at = 0; at < nt; at++) {
var st = et[at], ht = st.x, pt = void 0, yt = void 0, vt = st.y, Ct = st.low, Pt = G && it.stacking && it.stacking.stacks[(this.negStacks && vt < (dt ? 0 : gt) ? "-" : "") + this.stackKey];
if ((it.positiveValuesOnly && !it.validatePositiveValue(vt) || z.positiveValuesOnly && !z.validatePositiveValue(ht)) && (st.isNull = !0), st.plotX = J = i(c(z.translate(ht, 0, 0, 0, 1, rt, this.type === "flags"), -1e5, 1e5)), G && this.visible && Pt && Pt[ht]) {
var kt = this.getStackIndicator(
kt,
ht,
this.index
);
st.isNull || (pt = Pt[ht], yt = pt.points[kt.key]);
}
if (D(yt) && (Ct = yt[0], vt = yt[1], Ct === dt && kt.key === Pt[ht].base && (Ct = m(j(gt) && gt, it.min)), it.positiveValuesOnly && 0 >= Ct && (Ct = null), st.total = st.stackTotal = pt.total, st.percentage = pt.total && st.y / pt.total * 100, st.stackY = vt, this.irregularWidths || pt.setOffset(this.pointXOffset || 0, this.barW || 0)), st.yBottom = l(Ct) ? c(it.translate(Ct, 0, 1, 0, 1), -1e5, 1e5) : null, this.dataModify && (vt = this.dataModify.modifyValue(vt, at)), st.plotY = void 0, j(vt) && (pt = it.translate(vt, !1, !0, !1, !0), typeof pt < "u" && (st.plotY = c(
pt,
-1e5,
1e5
))), st.isInside = this.isPointInside(st), st.clientX = ct ? i(z.translate(ht, 0, 0, 0, 1, rt)) : J, st.negative = st[lt] < (k[lt + "Threshold"] || gt || 0), st.category = $ && typeof $[st.x] < "u" ? $[st.x] : st.x, !st.isNull && st.visible !== !1) {
typeof St < "u" && (tt = Math.min(tt, Math.abs(J - St)));
var St = J;
}
st.zone = this.zones.length ? st.getZone() : void 0, !st.graphic && this.group && q && (st.isNew = !0);
}
this.closestPointRangePx = tt, A(this, "afterTranslate");
}, Q.prototype.getValidPoints = function(k, G, z) {
var $ = this.chart;
return (k || this.points || []).filter(function(q) {
return G && !$.isInsidePlot(q.plotX, q.plotY, { inverted: $.inverted }) ? !1 : q.visible !== !1 && (z || !q.isNull);
});
}, Q.prototype.getClipBox = function() {
var k = this.chart, G = this.xAxis, z = this.yAxis, $ = X(k.clipBox);
return G && G.len !== k.plotSizeX && ($.width = G.len), z && z.len !== k.plotSizeY && ($.height = z.len), $;
}, Q.prototype.getSharedClipKey = function() {
return this.sharedClipKey = (this.options.xAxis || 0) + "," + (this.options.yAxis || 0);
}, Q.prototype.setClip = function() {
var k = this.chart, G = this.group, z = this.markerGroup, $ = k.sharedClips;
k = k.renderer;
var q = this.getClipBox(), it = this.getSharedClipKey(), et = $[it];
et ? et.animate(q) : $[it] = et = k.clipRect(q), G && G.clip(this.options.clip === !1 ? void 0 : et), z && z.clip();
}, Q.prototype.animate = function(k) {
var G = this.chart, z = this.group, $ = this.markerGroup, q = G.inverted, it = x(this.options.animation), et = [this.getSharedClipKey(), it.duration, it.easing, it.defer].join(), nt = G.sharedClips[et], rt = G.sharedClips[et + "m"];
if (k && z)
it = this.getClipBox(), nt ? nt.attr("height", it.height) : (it.width = 0, q && (it.x = G.plotHeight), nt = G.renderer.clipRect(it), G.sharedClips[et] = nt, rt = G.renderer.clipRect({ x: q ? (G.plotSizeX || 0) + 99 : -99, y: q ? -G.plotLeft : -G.plotTop, width: 99, height: q ? G.chartWidth : G.chartHeight }), G.sharedClips[et + "m"] = rt), z.clip(nt), $ && $.clip(rt);
else if (nt && !nt.hasClass("highcharts-animating")) {
G = this.getClipBox();
var ct = it.step;
$ && $.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(G, it);
}
}, Q.prototype.afterAnimate = function() {
var k = this;
this.setClip(), g(
this.chart.sharedClips,
function(G, z, $) {
G && !k.chart.container.querySelector('[clip-path="url(#' + G.id + ')"]') && (G.destroy(), delete $[z]);
}
), this.finishedAnimating = !0, A(this, "afterAnimate");
}, Q.prototype.drawPoints = function() {
var k = this.points, G = this.chart, z = this.options.marker, $ = this[this.specialGroup] || this.markerGroup, q = this.xAxis, it = m(z.enabled, !q || q.isRadial ? !0 : null, this.closestPointRangePx >= z.enabledThreshold * z.radius), et, nt;
if (z.enabled !== !1 || this._hasPointMarkers)
for (et = 0; et < k.length; et++) {
var rt = k[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 lt = 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 = G.renderer.symbol(lt, at.x, at.y, at.width, at.height, dt ? gt : z).add($), this.enabledDataSorting && G.hasRendered && (nt.attr({ x: rt.startXPos }), ct = "animate")), nt && ct === "animate" && nt[J ? "show" : "hide"](J).animate(at), nt && !G.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(k, G) {
var z = this.options, $ = z.marker, q = k.marker || {}, it = q.symbol || $.symbol, et = m(q.radius, $.radius);
return G && ($ = $.states[G], G = q.states && q.states[G], et = m(G && G.radius, $ && $.radius, et + ($ && $.radiusPlus || 0))), k.hasImage = it && it.indexOf("url") === 0, k.hasImage && (et = 0), k = { x: z.crisp ? Math.floor(k.plotX - et) : k.plotX - et, y: k.plotY - et }, et && (k.width = k.height = 2 * et), k;
}, Q.prototype.pointAttribs = function(k, G) {
var z = this.options.marker, $ = k && k.options, q = $ && $.marker || {}, it = $ && $.color, et = k && k.color, nt = k && k.zone && k.zone.color, rt = this.color;
return k = m(q.lineWidth, z.lineWidth), $ = 1, rt = it || nt || et || rt, it = q.fillColor || z.fillColor || rt, et = q.lineColor || z.lineColor || rt, G = G || "normal", z = z.states[G] || {}, G = q.states && q.states[G] || {}, k = m(G.lineWidth, z.lineWidth, k + m(G.lineWidthPlus, z.lineWidthPlus, 0)), it = G.fillColor || z.fillColor || it, et = G.lineColor || z.lineColor || et, $ = m(G.opacity, z.opacity, $), { stroke: et, "stroke-width": k, fill: it, opacity: $ };
}, Q.prototype.destroy = function(k) {
var G = this, z = G.chart, $ = /AppleWebKit\/533/.test(C.navigator.userAgent), q = G.data || [], it, et, nt, rt;
for (A(G, "destroy"), this.removeEvents(k), (G.axisTypes || []).forEach(function(ct) {
(rt = G[ct]) && rt.series && (s(rt.series, G), rt.isDirty = rt.forceRedraw = !0);
}), G.legendItem && G.chart.legend.destroyItem(G), et = q.length; et--; )
(nt = q[et]) && nt.destroy && nt.destroy();
G.clips && G.clips.forEach(function(ct) {
return ct.destroy();
}), S.clearTimeout(G.animationTimeout), g(G, function(ct, gt) {
ct instanceof R && !ct.survive && (it = $ && gt === "group" ? "hide" : "destroy", ct[it]());
}), z.hoverSeries === G && (z.hoverSeries = void 0), s(z.series, G), z.orderSeries(), g(G, function(ct, gt) {
k && gt === "hcEvents" || delete G[gt];
});
}, Q.prototype.applyZones = function() {
var k = this, G = this.chart, z = G.renderer, $ = this.zones, q = this.clips || [], it = this.graph, et = this.area, nt = Math.max(G.chartWidth, G.chartHeight), rt = this[(this.zoneAxis || "y") + "Axis"], ct = G.inverted, gt, dt, lt, at, J, tt, st, ht, pt = !1;
if ($.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();
$.forEach(function(Pt, kt) {
gt = yt ? vt ? G.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 ? (lt = { x: ct ? tt : J, y: 0, width: at, height: nt }, vt || (lt.x = G.plotHeight - lt.x)) : (lt = { x: 0, y: ct ? tt : J, width: nt, height: at }, vt && (lt.y = G.plotWidth - lt.y)), ct && z.isVML && (lt = rt.isXAxis ? {
x: 0,
y: yt ? J : tt,
height: lt.width,
width: G.chartWidth
} : { x: lt.y - G.plotLeft - G.spacingBox.x, y: 0, width: lt.height, height: G.chartHeight }), q[kt] ? q[kt].animate(lt) : q[kt] = z.clipRect(lt), st = k["zone-area-" + kt], ht = k["zone-graph-" + kt], it && ht && ht.clip(q[kt]), et && st && st.clip(q[kt]), pt = Pt.value > Ct.max, k.resetZones && dt === 0 && (dt = void 0);
}), this.clips = q;
} else
k.visible && (it && it.show(!0), et && et.show(!0));
}, Q.prototype.invertGroups = function(k) {
function G() {
["group", "markerGroup"].forEach(function(q) {
z[q] && ($.renderer.isVML && z[q].attr({ width: z.yAxis.len, height: z.xAxis.len }), z[q].width = z.yAxis.len, z[q].height = z.xAxis.len, z[q].invert(z.isRadialSeries ? !1 : k));
});
}
var z = this, $ = z.chart;
z.xAxis && (z.eventsToUnbind.push(w($, "resize", G)), G(), z.invertGroups = G);
}, Q.prototype.plotGroup = function(k, G, z, $, q) {
var it = this[k], et = !it;
return z = { visibility: z, zIndex: $ || 0.1 }, typeof this.opacity > "u" || this.chart.styledMode || this.state === "inactive" || (z.opacity = this.opacity), et && (this[k] = it = this.chart.renderer.g().add(q)), it.addClass("highcharts-" + G + " highcharts-series-" + this.index + " highcharts-" + this.type + "-series " + (l(this.colorIndex) ? "highcharts-color-" + this.colorIndex + " " : "") + (this.options.className || "") + (it.hasClass("highcharts-tracker") ? " highcharts-tracker" : ""), !0), it.attr(z)[et ? "attr" : "animate"](this.getPlotBox()), it;
}, Q.prototype.getPlotBox = function() {
var k = this.chart, G = this.xAxis, z = this.yAxis;
return k.inverted && (G = z, z = this.xAxis), { translateX: G ? G.left : k.plotLeft, translateY: z ? z.top : k.plotTop, scaleX: 1, scaleY: 1 };
}, Q.prototype.removeEvents = function(k) {
k || L(this), this.eventsToUnbind.length && (this.eventsToUnbind.forEach(function(G) {
G();
}), this.eventsToUnbind.length = 0);
}, Q.prototype.render = function() {
var k = this, G = k.chart, z = k.options, $ = x(z.animation), q = k.visible ? "inherit" : "hidden", it = z.zIndex, et = k.hasRendered, nt = G.seriesGroup, rt = G.inverted;
G = !k.finishedAnimating && G.renderer.isSVG ? $.duration : 0, A(this, "render");
var ct = k.plotGroup("group", "series", q, it, nt);
k.markerGroup = k.plotGroup("markerGroup", "markers", q, it, nt), z.clip !== !1 && k.setClip(), k.animate && G && k.animate(!0), ct.inverted = m(k.invertible, k.isCartesian) ? rt : !1, k.drawGraph && (k.drawGraph(), k.applyZones()), k.visible && k.drawPoints(), k.drawDataLabels && k.drawDataLabels(), k.redrawPoints && k.redrawPoints(), k.drawTracker && k.options.enableMouseTracking !== !1 && k.drawTracker(), k.invertGroups(rt), k.animate && G && k.animate(), et || (G && $.defer && (G += $.defer), k.animationTimeout = V(function() {
k.afterAnimate();
}, G || 0)), k.isDirty = !1, k.hasRendered = !0, A(k, "afterRender");
}, Q.prototype.redraw = function() {
var k = this.chart, G = this.isDirty || this.isDirtyData, z = this.group, $ = this.xAxis, q = this.yAxis;
z && (k.inverted && z.attr({
width: k.plotWidth,
height: k.plotHeight
}), z.animate({ translateX: m($ && $.left, k.plotLeft), translateY: m(q && q.top, k.plotTop) })), this.translate(), this.render(), G && delete this.kdTree;
}, Q.prototype.searchPoint = function(k, G) {
var z = this.xAxis, $ = this.yAxis, q = this.chart.inverted;
return this.searchKDTree({ clientX: q ? z.len - k.chartY + z.pos : k.chartX - z.pos, plotY: q ? $.len - k.chartX + $.pos : k.chartY - $.pos }, G, k);
}, Q.prototype.buildKDTree = function(k) {
function G(q, it, et) {
var nt = q && q.length;
if (nt) {
var rt = z.kdAxisArray[it % et];
return q.sort(function(ct, gt) {
return ct[rt] - gt[rt];
}), nt = Math.floor(nt / 2), { point: q[nt], left: G(q.slice(0, nt), it + 1, et), right: G(q.slice(nt + 1), it + 1, et) };
}
}
this.buildingKdTree = !0;
var z = this, $ = -1 < z.options.findNearestPointBy.indexOf("y") ? 2 : 1;
delete z.kdTree, V(function() {
z.kdTree = G(z.getValidPoints(null, !z.directTouch), $, $), z.buildingKdTree = !1;
}, z.options.kdNow || k && k.type === "touchstart" ? 0 : 1);
}, Q.prototype.searchKDTree = function(k, G, z) {
function $(rt, ct, gt, dt) {
var lt = ct.point, at = q.kdAxisArray[gt % dt], J = lt, tt = l(rt[it]) && l(lt[it]) ? Math.pow(rt[it] - lt[it], 2) : null, st = l(rt[et]) && l(lt[et]) ? Math.pow(rt[et] - lt[et], 2) : null;
return st = (tt || 0) + (st || 0), lt.dist = l(st) ? Math.sqrt(st) : Number.MAX_VALUE, lt.distX = l(tt) ? Math.sqrt(tt) : Number.MAX_VALUE, at = rt[at] - lt[at], st = 0 > at ? "left" : "right", tt = 0 > at ? "right" : "left", ct[st] && (st = $(rt, ct[st], gt + 1, dt), J = st[nt] < J[nt] ? st : lt), ct[tt] && Math.sqrt(at * at) < J[nt] && (rt = $(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 = G ? "distX" : "dist";
if (G = -1 < q.options.findNearestPointBy.indexOf("y") ? 2 : 1, this.kdTree || this.buildingKdTree || this.buildKDTree(z), this.kdTree)
return $(
k,
this.kdTree,
G,
G
);
}, Q.prototype.pointPlacementToXValue = function() {
var k = this.options, G = k.pointRange, z = this.xAxis;
return k = k.pointPlacement, k === "between" && (k = z.reversed ? -0.5 : 0.5), j(k) ? k * (G || z.pointRange) : 0;
}, Q.prototype.isPointInside = function(k) {
var G = this.chart, z = this.xAxis, $ = this.yAxis;
return typeof k.plotY < "u" && typeof k.plotX < "u" && 0 <= k.plotY && k.plotY <= ($ ? $.len : G.plotHeight) && 0 <= k.plotX && k.plotX <= (z ? z.len : G.plotWidth);
}, Q.prototype.drawTracker = function() {
var k = this, G = k.options, z = G.trackByArea, $ = [].concat(z ? k.areaPath : k.graphPath), q = k.chart, it = q.pointer, et = q.renderer, nt = q.options.tooltip.snap, rt = k.tracker, ct = function(dt) {
q.hoverSeries !== k && k.onMouseOver();
}, gt = "rgba(192,192,192," + (N ? 1e-4 : 2e-3) + ")";
rt ? rt.attr({ d: $ }) : k.graph && (k.tracker = et.path($).attr({ visibility: k.visible ? "visible" : "hidden", zIndex: 2 }).addClass(z ? "highcharts-tracker-area" : "highcharts-tracker-line").add(k.group), q.styledMode || k.tracker.attr({ "stroke-linecap": "round", "stroke-linejoin": "round", stroke: gt, fill: z ? gt : "none", "stroke-width": k.graph.strokeWidth() + (z ? 0 : 2 * nt) }), [k.tracker, k.markerGroup, k.dataLabelsGroup].forEach(function(dt) {
dt && (dt.addClass("highcharts-tracker").on("mouseover", ct).on("mouseout", function(lt) {
it.onTrackerMouseOut(lt);
}), G.cursor && !q.styledMode && dt.css({ cursor: G.cursor }), O) && dt.on("touchstart", ct);
})), A(this, "afterDrawTracker");
}, Q.prototype.addPoint = function(k, G, 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;
G = m(G, !0);
var lt = { series: this };
this.pointClass.prototype.applyOptions.apply(
lt,
[k]
);
var at = lt.x, J = gt.length;
if (this.requireSorting && at < gt[J - 1])
for (dt = !0; J && gt[J - 1] > at; )
J--;
this.updateParallelArrays(lt, "splice", J, 0, 0), this.updateParallelArrays(lt, J), rt && lt.name && (rt[at] = lt.name), ct.splice(J, 0, k), dt && (this.data.splice(J, 0, null), this.processData()), it.legendType === "point" && this.generatePoints(), z && (et[0] && et[0].remove ? et[0].remove(!1) : (et.shift(), this.updateParallelArrays(lt, "shift"), ct.shift())), q !== !1 && A(this, "addPoint", { point: lt }), this.isDirtyData = this.isDirty = !0, G && nt.redraw($);
}, Q.prototype.removePoint = function(k, G, z) {
var $ = this, q = $.data, it = q[k], et = $.points, nt = $.chart, rt = function() {
et && et.length === q.length && et.splice(k, 1), q.splice(k, 1), $.options.data.splice(k, 1), $.updateParallelArrays(it || { series: $ }, "splice", k, 1), it && it.destroy(), $.isDirty = !0, $.isDirtyData = !0, G && nt.redraw();
};
d(z, nt), G = m(G, !0), it ? it.firePointEvent("remove", null, rt) : rt();
}, Q.prototype.remove = function(k, G, z, $) {
function q() {
it.destroy($), et.isDirtyLegend = et.isDirtyBox = !0, et.linkSeries(), m(k, !0) && et.redraw(G);
}
var it = this, et = it.chart;
z !== !1 ? A(
it,
"remove",
null,
q
) : q();
}, Q.prototype.update = function(k, G) {
k = p(k, this.userOptions), A(this, "update", { options: k });
var z = this, $ = z.chart, q = z.userOptions, it = z.initialType || z.type, et = $.options.plotOptions, nt = b[it].prototype, rt = z.finishedAnimating && { animation: !1 }, ct = {}, gt, dt = ["eventOptions", "navigatorSeries", "baseSeries"], lt = k.type || q.type || $.options.chart.type, at = !(this.hasDerivedData || lt && lt !== this.type || typeof k.pointStart < "u" || typeof k.pointInterval < "u" || typeof k.relativeXValue < "u" || z.hasOptionChanged("dataGrouping") || z.hasOptionChanged("pointStart") || z.hasOptionChanged("pointInterval") || z.hasOptionChanged("pointIntervalUnit") || z.hasOptionChanged("keys"));
if (lt = lt || it, at && (dt.push("data", "isDirtyData", "points", "processedXData", "processedYData", "xIncrement", "cropped", "_hasPointMarkers", "_hasPointLabels", "clips", "nodes", "layout", "mapMap", "mapData", "minY", "maxY", "minX", "maxX"), k.visible !== !1 && dt.push("area", "graph"), z.parallelArrays.forEach(function(tt) {
dt.push(tt + "Data");
}), k.data && (k.dataSorting && o(z.options.dataSorting, k.dataSorting), this.setData(k.data, !1))), k = X(q, rt, { index: typeof q.index > "u" ? z.index : q.index, pointStart: m(et && et.series && et.series.pointStart, q.pointStart, z.xData[0]) }, !at && { data: z.options.data }, k), at && k.data && (k.data = z.options.data), dt = ["group", "markerGroup", "dataLabelsGroup", "transformGroup"].concat(dt), dt.forEach(function(tt) {
dt[tt] = z[tt], delete z[tt];
}), et = !1, b[lt]) {
if (et = lt !== z.type, z.remove(!1, !1, !1, !0), et)
if (Object.setPrototypeOf)
Object.setPrototypeOf(z, b[lt].prototype);
else {
rt = Object.hasOwnProperty.call(z, "hcEvents") && z.hcEvents;
for (gt in nt)
z[gt] = void 0;
o(z, b[lt].prototype), rt ? z.hcEvents = rt : delete z.hcEvents;
}
} else
t(17, !0, $, { missingModuleFor: lt });
if (dt.forEach(function(tt) {
z[tt] = dt[tt];
}), z.init($, k), at && this.points) {
var J = z.options;
J.visible === !1 ? (ct.graphic = 1, ct.dataLabel = 1) : z._hasPointLabels || (k = J.marker, nt = J.dataLabels, !k || k.enabled !== !1 && (q.marker && q.marker.symbol) === k.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 && $.legend.destroyItem(tt));
}, this);
}
z.initialType = it, $.linkSeries(), et && z.linkedSeries.length && (z.isDirtyData = !0), A(this, "afterUpdate"), m(G, !0) && $.redraw(at ? void 0 : !1);
}, Q.prototype.setName = function(k) {
this.name = this.options.name = this.userOptions.name = k, this.chart.isDirtyLegend = !0;
}, Q.prototype.hasOptionChanged = function(k) {
var G = this.options[k], z = this.chart.options.plotOptions, $ = this.userOptions[k];
return $ ? G !== $ : G !== m(
z && z[this.type] && z[this.type][k],
z && z.series && z.series[k],
G
);
}, Q.prototype.onMouseOver = function() {
var k = this.chart, G = k.hoverSeries;
k.pointer.setHoverChartIndex(), G && G !== this && G.onMouseOut(), this.options.events.mouseOver && A(this, "mouseOver"), this.setState("hover"), k.hoverSeries = this;
}, Q.prototype.onMouseOut = function() {
var k = this.options, G = this.chart, z = G.tooltip, $ = G.hoverPoint;
G.hoverSeries = null, $ && $.onMouseOut(), this && k.events.mouseOut && A(this, "mouseOut"), !z || this.stickyTracking || z.shared && !this.noSharedTooltip || z.hide(), G.series.forEach(function(q) {
q.setState(
"",
!0
);
});
}, Q.prototype.setState = function(k, G) {
var z = this, $ = z.options, q = z.graph, it = $.inactiveOtherPoints, et = $.states, nt = m(et[k || "normal"] && et[k || "normal"].animation, z.chart.options.chart.animation), rt = $.lineWidth, ct = 0, gt = $.opacity;
if (k = k || "", z.state !== k && ([z.group, z.markerGroup, z.dataLabelsGroup].forEach(function(dt) {
dt && (z.state && dt.removeClass("highcharts-series-" + z.state), k && dt.addClass("highcharts-series-" + k));
}), z.state = k, !z.chart.styledMode)) {
if (et[k] && et[k].enabled === !1)
return;
if (k && (rt = et[k].lineWidth || rt + (et[k].lineWidthPlus || 0), gt = m(et[k].opacity, gt)), q && !q.dashstyle)
for ($ = { "stroke-width": rt }, q.animate($, nt); z["zone-graph-" + ct]; )
z["zone-graph-" + ct].animate($, nt), ct += 1;
it || [z.group, z.markerGroup, z.dataLabelsGroup, z.labelBySeries].forEach(function(dt) {
dt && dt.animate({ opacity: gt }, nt);
});
}
G && it && z.points && z.setAllPointsToState(k || void 0);
}, Q.prototype.setAllPointsToState = function(k) {
this.points.forEach(function(G) {
G.setState && G.setState(k);
});
}, Q.prototype.setVisible = function(k, G) {
var z = this, $ = z.chart, q = z.legendItem, it = $.options.chart.ignoreHiddenSeries, et = z.visible, nt = (z.visible = k = z.options.visible = z.userOptions.visible = typeof k > "u" ? !et : k) ? "show" : "hide";
["group", "dataLabelsGroup", "markerGroup", "tracker", "tt"].forEach(function(rt) {
z[rt] && z[rt][nt]();
}), ($.hoverSeries === z || ($.hoverPoint && $.hoverPoint.series) === z) && z.onMouseOut(), q && $.legend.colorizeItem(z, k), z.isDirty = !0, z.options.stacking && $.series.forEach(function(rt) {
rt.options.stacking && rt.visible && (rt.isDirty = !0);
}), z.linkedSeries.forEach(function(rt) {
rt.setVisible(k, !1);
}), it && ($.isDirtyBox = !0), A(z, nt), G !== !1 && $.redraw();
}, Q.prototype.show = function() {
this.setVisible(!0);
}, Q.prototype.hide = function() {
this.setVisible(!1);
}, Q.prototype.select = function(k) {
this.selected = k = this.options.selected = typeof k > "u" ? !this.selected : k, this.checkbox && (this.checkbox.checked = k), A(this, k ? "select" : "unselect");
}, Q.prototype.shouldShowTooltip = function(k, G, z) {
return z === void 0 && (z = {}), z.series = this, z.visiblePlotOnly = !0, this.chart.isInsidePlot(k, G, z);
}, Q.defaultOptions = H, Q;
}(), o(y.prototype, { axisTypes: [
"xAxis",
"yAxis"
], coll: "series", colorCounter: 0, cropShoulder: 1, directTouch: !1, drawLegendSymbol: F.drawLineMarker, isCartesian: !0, kdAxisArray: ["clientX", "plotY"], parallelArrays: ["x", "y"], pointClass: U, requireSorting: !0, sorted: !0 }), W.series = y, y;
}), E(h, "Extensions/ScrollablePlotArea.js", [h["Core/Animation/AnimationUtilities.js"], h["Core/Axis/Axis.js"], h["Core/Chart/Chart.js"], h["Core/Series/Series.js"], h["Core/Renderer/RendererRegistry.js"], h["Core/Utilities.js"]], function(y, B, I, Z, F, U) {
var H = y.stop, W = U.addEvent, R = U.createElement, S = U.merge, x = U.pick;
W(I, "afterSetChartSize", function(d) {
var u = this.options.chart.scrollablePlotArea, P = u && u.minWidth;
if (u = u && u.minHeight, !this.renderer.forExport) {
if (P) {
if (this.scrollablePixelsX = P = Math.max(0, P - this.chartWidth)) {
this.scrollablePlotBox = this.renderer.scrollablePlotBox = S(this.plotBox), this.plotBox.width = this.plotWidth += P, this.inverted ? this.clipBox.height += P : this.clipBox.width += P;
var O = { 1: { name: "right", value: P } };
}
} else
u && (this.scrollablePixelsY = P = Math.max(
0,
u - this.chartHeight
)) && (this.scrollablePlotBox = this.renderer.scrollablePlotBox = S(this.plotBox), this.plotBox.height = this.plotHeight += P, this.inverted ? this.clipBox.width += P : this.clipBox.height += P, O = { 2: { name: "bottom", value: P } });
O && !d.skipAxes && this.axes.forEach(function(N) {
O[N.side] ? N.getPlotLinePath = function() {
var C = O[N.side].name, b = this[C];
this[C] = b - O[N.side].value;
var w = B.prototype.getPlotLinePath.apply(this, arguments);
return this[C] = b, w;
} : (N.setAxisSize(), N.setAxisTranslation());
});
}
}), W(I, "render", function() {
this.scrollablePixelsX || this.scrollablePixelsY ? (this.setUpScrolling && this.setUpScrolling(), this.applyFixed()) : this.fixedDiv && this.applyFixed();
}), I.prototype.setUpScrolling = function() {
var d = this, u = { WebkitOverflowScrolling: "touch", overflowX: "hidden", overflowY: "hidden" };
this.scrollablePixelsX && (u.overflowX = "auto"), this.scrollablePixelsY && (u.overflowY = "auto"), this.scrollingParent = R("div", { className: "highcharts-scrolling-parent" }, { position: "relative" }, this.renderTo), this.scrollingContainer = R(
"div",
{ className: "highcharts-scrolling" },
u,
this.scrollingParent
), W(this.scrollingContainer, "scroll", function() {
d.pointer && delete d.pointer.chartPosition;
}), this.innerContainer = R("div", { className: "highcharts-inner-container" }, null, this.scrollingContainer), this.innerContainer.appendChild(this.container), this.setUpScrolling = null;
}, I.prototype.moveFixedElements = function() {
var d = this.container, u = this.fixedRenderer, P = ".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 && P.push(O + ":not(.highcharts-radial-axis)", O + "-labels:not(.highcharts-radial-axis-labels)"), P.forEach(function(N) {
[].forEach.call(d.querySelectorAll(N), function(C) {
(C.namespaceURI === u.SVG_NS ? u.box : u.box.parentNode).appendChild(C), C.style.pointerEvents = "auto";
});
});
}, I.prototype.applyFixed = function() {
var d = !this.fixedDiv, u = this.options.chart, P = u.scrollablePlotArea, O = F.getRendererType();
d ? (this.fixedDiv = R("div", { className: "highcharts-fixed" }, { position: "absolute", overflow: "hidden", pointerEvents: "none", zIndex: (u.style && u.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 = u = new O(
this.fixedDiv,
this.chartWidth,
this.chartHeight,
this.options.chart.style
), this.scrollableMask = u.path().attr({ fill: this.options.chart.backgroundColor || "#fff", "fill-opacity": x(P.opacity, 0.85), zIndex: -1 }).addClass("highcharts-scrollable-mask").add(), W(this, "afterShowResetZoom", this.moveFixedElements), W(this, "afterDrilldown", this.moveFixedElements), W(this, "afterLayOutTitles", this.moveFixedElements)) : this.fixedRenderer.setSize(this.chartWidth, this.chartHeight), (this.scrollableDirty || d) && (this.scrollableDirty = !1, this.moveFixedElements()), u = this.chartWidth + (this.scrollablePixelsX || 0), O = this.chartHeight + (this.scrollablePixelsY || 0), H(this.container), this.container.style.width = u + "px", this.container.style.height = O + "px", this.renderer.boxWrapper.attr({ width: u, height: O, viewBox: [0, 0, u, O].join(" ") }), this.chartBackground.attr({ width: u, height: O }), this.scrollingContainer.style.height = this.chartHeight + "px", d && (P.scrollPositionX && (this.scrollingContainer.scrollLeft = this.scrollablePixelsX * P.scrollPositionX), P.scrollPositionY && (this.scrollingContainer.scrollTop = this.scrollablePixelsY * P.scrollPositionY)), O = this.axisOffset, d = this.plotTop - O[0] - 1, P = this.plotLeft - O[3] - 1, u = this.plotTop + this.plotHeight + O[2] + 1, O = this.plotLeft + this.plotWidth + O[1] + 1;
var N = this.plotLeft + this.plotWidth - (this.scrollablePixelsX || 0), C = this.plotTop + this.plotHeight - (this.scrollablePixelsY || 0);
d = this.scrollablePixelsX ? [["M", 0, d], ["L", this.plotLeft - 1, d], ["L", this.plotLeft - 1, u], ["L", 0, u], ["Z"], ["M", N, d], ["L", this.chartWidth, d], ["L", this.chartWidth, u], ["L", N, u], ["Z"]] : this.scrollablePixelsY ? [["M", P, 0], ["L", P, this.plotTop - 1], ["L", O, this.plotTop - 1], ["L", O, 0], ["Z"], ["M", P, C], ["L", P, this.chartHeight], ["L", O, this.chartHeight], ["L", O, C], ["Z"]] : [["M", 0, 0]], this.redrawTrigger !== "adjustHeight" && this.scrollableMask.attr({ d });
}, W(B, "afterInit", function() {
this.chart.scrollableDirty = !0;
}), W(Z, "show", function() {
this.chart.scrollableDirty = !0;
});
}), E(h, "Core/Axis/StackingAxis.js", [h["Core/Animation/AnimationUtilities.js"], h["Core/Axis/Axis.js"], h["Core/Utilities.js"]], function(y, B, I) {
var Z = y.getDeferredAnimation, F = I.addEvent, U = I.destroyObjectProperties, H = I.fireEvent, W = I.isNumber, R = I.objectEach, S;
return function(x) {
function d() {
var N = this.stacking;
if (N) {
var C = N.stacks;
R(C, function(b, w) {
U(b), C[w] = null;
}), N && N.stackTotalGroup && N.stackTotalGroup.destroy();
}
}
function u() {
this.stacking || (this.stacking = new O(this));
}
var P = [];
x.compose = function(N) {
return P.indexOf(N) === -1 && (P.push(N), F(N, "init", u), F(N, "destroy", d)), N;
};
var O = function() {
function N(C) {
this.oldStacks = {}, this.stacks = {}, this.stacksTouched = 0, this.axis = C;
}
return N.prototype.buildStacks = function() {
var C = this.axis, b = C.series, w = C.options.reversedStacks, v = b.length, a;
if (!C.isXAxis) {
for (this.usePercentage = !1, a = v; a--; ) {
var c = b[w ? a : v - a - 1];
c.setStackedPoints(), c.setGroupedPoints();
}
for (a = 0; a < v; a++)
b[a].modifyStacks();
H(C, "afterBuildStacks");
}
}, N.prototype.cleanStacks = function() {
if (!this.axis.isXAxis) {
if (this.oldStacks)
var C = this.stacks = this.oldStacks;
R(C, function(b) {
R(b, function(w) {
w.cumulative = w.total;
});
});
}
}, N.prototype.resetStacks = function() {
var C = this, b = C.stacks;
C.axis.isXAxis || R(b, function(w) {
R(
w,
function(v, a) {
W(v.touched) && v.touched < C.stacksTouched ? (v.destroy(), delete w[a]) : (v.total = null, v.cumulative = null);
}
);
});
}, N.prototype.renderStackTotals = function() {
var C = this.axis, b = C.chart, w = b.renderer, v = this.stacks;
C = Z(b, C.options.stackLabels && C.options.stackLabels.animation || !1);
var a = this.stackTotalGroup = this.stackTotalGroup || w.g("stack-labels").attr({ visibility: "visible", zIndex: 6, opacity: 0 }).add();
a.translate(b.plotLeft, b.plotTop), R(v, function(c) {
R(c, function(p) {
p.render(a);
});
}), a.animate(
{ opacity: 1 },
C
);
}, N;
}();
x.Additions = O;
}(S || (S = {})), S;
}), E(h, "Extensions/Stacking.js", [h["Core/Axis/Axis.js"], h["Core/Chart/Chart.js"], h["Core/FormatUtilities.js"], h["Core/Globals.js"], h["Core/Series/Series.js"], h["Core/Axis/StackingAxis.js"], h["Core/Utilities.js"]], function(y, B, I, Z, F, U, H) {
var W = I.format, R = H.correctFloat, S = H.defined, x = H.destroyObjectProperties, d = H.isArray, u = H.isNumber, P = H.objectEach, O = H.pick, N = function() {
function C(b, w, v, a, c) {
var p = b.chart.inverted;
this.axis = b, this.isNegative = v, this.options = w = w || {}, this.x = a, this.total = null, this.points = {}, this.hasValidPoints = !1, this.stack = c, this.rightCliff = this.leftCliff = 0, this.alignOptions = { align: w.align || (p ? v ? "left" : "right" : "center"), verticalAlign: w.verticalAlign || (p ? "middle" : v ? "bottom" : "top"), y: w.y, x: w.x }, this.textAlign = w.textAlign || (p ? v ? "right" : "left" : "center");
}
return C.prototype.destroy = function() {
x(this, this.axis);
}, C.prototype.render = function(b) {
var w = this.axis.chart, v = this.options, a = v.format;
a = a ? W(a, this, w) : v.formatter.call(this), this.label ? this.label.attr({
text: a,
visibility: "hidden"
}) : (this.label = w.renderer.label(a, null, null, v.shape, null, null, v.useHTML, !1, "stack-labels"), a = { r: v.borderRadius || 0, text: a, rotation: v.rotation, padding: O(v.padding, 5), visibility: "hidden" }, w.styledMode || (a.fill = v.backgroundColor, a.stroke = v.borderColor, a["stroke-width"] = v.borderWidth, this.label.css(v.style)), this.label.attr(a), this.label.added || this.label.add(b)), this.label.labelrank = w.plotSizeY;
}, C.prototype.setOffset = function(b, w, v, a, c) {
var p = this.axis, i = p.chart;
a = p.translate(p.stacking.usePercentage ? 100 : a || this.total, 0, 0, 0, 1), v = p.translate(v || 0), v = S(a) && Math.abs(a - v), b = O(c, i.xAxis[0].translate(this.x)) + b, p = S(a) && this.getStackBox(i, this, b, a, w, v, p), w = this.label, v = this.isNegative, b = O(this.options.overflow, "justify") === "justify";
var l = this.textAlign;
w && p && (c = w.getBBox(), a = w.padding, l = l === "left" ? i.inverted ? -a : a : l === "right" ? c.width : i.inverted && l === "center" ? c.width / 2 : i.inverted ? v ? c.width + a : -a : c.width / 2, v = i.inverted ? c.height / 2 : v ? -a : c.height, this.alignOptions.x = O(this.options.x, 0), this.alignOptions.y = O(this.options.y, 0), p.x -= l, p.y -= v, w.align(this.alignOptions, null, p), i.isInsidePlot(w.alignAttr.x + l - this.alignOptions.x, w.alignAttr.y + v - this.alignOptions.y) ? w.show() : (w.alignAttr.y = -9999, b = !1), b && F.prototype.justifyDataLabel.call(this.axis, w, this.alignOptions, w.alignAttr, c, p), w.attr({ x: w.alignAttr.x, y: w.alignAttr.y }), O(!b && this.options.crop, !0) && ((i = u(w.x) && u(w.y) && i.isInsidePlot(w.x - a + w.width, w.y) && i.isInsidePlot(w.x + a, w.y)) || w.hide()));
}, C.prototype.getStackBox = function(b, w, v, a, c, p, i) {
var l = w.axis.reversed, s = b.inverted, t = i.height + i.pos - (s ? b.plotLeft : b.plotTop);
return w = w.isNegative && !l || !w.isNegative && l, { x: s ? w ? a - i.right : a - p + i.pos - b.plotLeft : v + b.xAxis[0].transB - b.plotLeft, y: s ? i.height - v - c : w ? t - a - p : t - a, width: s ? p : c, height: s ? c : p };
}, C;
}();
return B.prototype.getStacks = function() {
var C = this, b = C.inverted;
C.yAxis.forEach(function(w) {
w.stacking && w.stacking.stacks && w.hasVisibleSeries && (w.stacking.oldStacks = w.stacking.stacks);
}), C.series.forEach(function(w) {
var v = w.xAxis && w.xAxis.options || {};
!w.options.stacking || w.visible !== !0 && C.options.chart.ignoreHiddenSeries !== !1 || (w.stackKey = [w.type, O(w.options.stack, ""), b ? v.top : v.left, b ? v.height : v.width].join());
});
}, U.compose(y), F.prototype.setGroupedPoints = function() {
var C = this.yAxis.stacking;
this.options.centerInCategory && (this.is("column") || this.is("columnrange")) && !this.options.stacking && 1 < this.chart.series.length ? F.prototype.setStackedPoints.call(this, "group") : C && P(C.stacks, function(b, w) {
w.slice(-5) === "group" && (P(b, function(v) {
return v.destroy();
}), delete C.stacks[w]);
});
}, F.prototype.setStackedPoints = function(C) {
var b = C || this.options.stacking;
if (b && (this.visible === !0 || this.chart.options.chart.ignoreHiddenSeries === !1)) {
var w = this.processedXData, v = this.processedYData, a = [], c = v.length, p = this.options, i = p.threshold, l = O(p.startFromThreshold && i, 0);
p = p.stack, C = C ? this.type + "," + b : this.stackKey;
var s = "-" + C, t = this.negStacks, o = this.yAxis, n = o.stacking.stacks, A = o.stacking.oldStacks, _, D;
for (o.stacking.stacksTouched += 1, D = 0; D < c; D++) {
var j = w[D], T = v[D], X = this.getStackIndicator(
X,
j,
this.index
), g = X.key, m = (_ = t && T < (l ? 0 : i)) ? s : C;
n[m] || (n[m] = {}), n[m][j] || (A[m] && A[m][j] ? (n[m][j] = A[m][j], n[m][j].total = null) : n[m][j] = new N(o, o.options.stackLabels, _, j, p)), m = n[m][j], T !== null ? (m.points[g] = m.points[this.index] = [O(m.cumulative, l)], S(m.cumulative) || (m.base = g), m.touched = o.stacking.stacksTouched, 0 < X.index && this.singleStacks === !1 && (m.points[g][0] = m.points[this.index + "," + j + ",0"][0])) : m.points[g] = m.points[this.index] = null, b === "percent" ? (_ = _ ? C : s, t && n[_] && n[_][j] ? (_ = n[_][j], m.total = _.total = Math.max(_.total, m.total) + Math.abs(T) || 0) : m.total = R(m.total + (Math.abs(T) || 0))) : b === "group" ? (d(T) && (T = T[0]), T !== null && (m.total = (m.total || 0) + 1)) : m.total = R(m.total + (T || 0)), m.cumulative = b === "group" ? (m.total || 1) - 1 : O(m.cumulative, l) + (T || 0), T !== null && (m.points[g].push(m.cumulative), a[D] = m.cumulative, m.hasValidPoints = !0);
}
b === "percent" && (o.stacking.usePercentage = !0), b !== "group" && (this.stackedYData = a), o.stacking.oldStacks = {};
}
}, F.prototype.modifyStacks = function() {
var C = this, b = C.stackKey, w = C.yAxis.stacking.stacks, v = C.processedXData, a, c = C.options.stacking;
C[c + "Stacker"] && [b, "-" + b].forEach(function(p) {
for (var i = v.length, l, s; i--; )
l = v[i], a = C.getStackIndicator(a, l, C.index, p), (s = (l = w[p] && w[p][l]) && l.points[a.key]) && C[c + "Stacker"](s, l, i);
});
}, F.prototype.percentStacker = function(C, b, w) {
b = b.total ? 100 / b.total : 0, C[0] = R(C[0] * b), C[1] = R(C[1] * b), this.stackedYData[w] = C[1];
}, F.prototype.getStackIndicator = function(C, b, w, v) {
return !S(C) || C.x !== b || v && C.key !== v ? C = { x: b, index: 0, key: v } : C.index++, C.key = [w, b, C.index].join(), C;
}, Z.StackItem = N, Z.StackItem;
}), E(h, "Series/Line/LineSeries.js", [h["Core/Series/Series.js"], h["Core/Series/SeriesRegistry.js"], h["Core/Utilities.js"]], function(y, B, I) {
var Z = this && this.__extends || function() {
var H = function(W, R) {
return H = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(S, x) {
S.__proto__ = x;
} || function(S, x) {
for (var d in x)
x.hasOwnProperty(d) && (S[d] = x[d]);
}, H(W, R);
};
return function(W, R) {
function S() {
this.constructor = W;
}
H(W, R), W.prototype = R === null ? Object.create(R) : (S.prototype = R.prototype, new S());
};
}(), F = I.defined, U = I.merge;
return I = function(H) {
function W() {
var R = H !== null && H.apply(this, arguments) || this;
return R.data = void 0, R.options = void 0, R.points = void 0, R;
}
return Z(W, H), W.prototype.drawGraph = function() {
var R = this, S = this.options, x = (this.gappedPath || this.getGraphPath).call(this), d = this.chart.styledMode, u = [["graph", "highcharts-graph"]];
d || u[0].push(S.lineColor || this.color || "#cccccc", S.dashStyle), u = R.getZonesGraphs(u), u.forEach(function(P, O) {
var N = P[0], C = R[N], b = C ? "animate" : "attr";
C ? (C.endX = R.preventGraphAnimation ? null : x.xMap, C.animate({ d: x })) : x.length && (R[N] = C = R.chart.renderer.path(x).addClass(P[1]).attr({ zIndex: 1 }).add(R.group)), C && !d && (N = { stroke: P[2], "stroke-width": S.lineWidth, fill: R.fillGraph && R.color || "none" }, P[3] ? N.dashstyle = P[3] : S.linecap !== "square" && (N["stroke-linecap"] = N["stroke-linejoin"] = "round"), C[b](N).shadow(2 > O && S.shadow)), C && (C.startX = x.xMap, C.isArea = x.isArea);
});
}, W.prototype.getGraphPath = function(R, S, x) {
var d = this, u = d.options, P = [], O = [], N, C = u.step;
R = R || d.points;
var b = R.reversed;
return b && R.reverse(), (C = { right: 1, center: 2 }[C] || C && 3) && b && (C = 4 - C), R = this.getValidPoints(R, !1, !(u.connectNulls && !S && !x)), R.forEach(function(w, v) {
var a = w.plotX, c = w.plotY, p = R[v - 1];
(w.leftCliff || p && p.rightCliff) && !x && (N = !0), w.isNull && !F(S) && 0 < v ? N = !u.connectNulls : w.isNull && !S ? N = !0 : (v === 0 || N ? v = [["M", w.plotX, w.plotY]] : d.getPointSpline ? v = [d.getPointSpline(R, w, v)] : C ? (v = C === 1 ? [["L", p.plotX, c]] : C === 2 ? [["L", (p.plotX + a) / 2, p.plotY], ["L", (p.plotX + a) / 2, c]] : [["L", a, p.plotY]], v.push(["L", a, c])) : v = [["L", a, c]], O.push(w.x), C && (O.push(w.x), C === 2 && O.push(w.x)), P.push.apply(P, v), N = !1);
}), P.xMap = O, d.graphPath = P;
}, W.prototype.getZonesGraphs = function(R) {
return this.zones.forEach(function(S, x) {
x = ["zone-graph-" + x, "highcharts-graph highcharts-zone-graph-" + x + " " + (S.className || "")], this.chart.styledMode || x.push(S.color || this.color, S.dashStyle || this.options.dashStyle), R.push(x);
}, this), R;
}, W.defaultOptions = U(y.defaultOptions, {}), W;
}(y), B.registerSeriesType("line", I), I;
}), E(h, "Series/Area/AreaSeries.js", [
h["Core/Color/Color.js"],
h["Core/Legend/LegendSymbol.js"],
h["Core/Series/SeriesRegistry.js"],
h["Core/Utilities.js"]
], function(y, B, I, Z) {
var F = this && this.__extends || function() {
var x = function(d, u) {
return x = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(P, O) {
P.__proto__ = O;
} || function(P, O) {
for (var N in O)
O.hasOwnProperty(N) && (P[N] = O[N]);
}, x(d, u);
};
return function(d, u) {
function P() {
this.constructor = d;
}
x(d, u), d.prototype = u === null ? Object.create(u) : (P.prototype = u.prototype, new P());
};
}(), U = y.parse, H = I.seriesTypes.line;
y = Z.extend;
var W = Z.merge, R = Z.objectEach, S = Z.pick;
return Z = function(x) {
function d() {
var u = x !== null && x.apply(this, arguments) || this;
return u.data = void 0, u.options = void 0, u.points = void 0, u;
}
return F(d, x), d.prototype.drawGraph = function() {
this.areaPath = [], x.prototype.drawGraph.apply(this);
var u = this, P = this.areaPath, O = this.options, N = [["area", "highcharts-area", this.color, O.fillColor]];
this.zones.forEach(function(C, b) {
N.push(["zone-area-" + b, "highcharts-area highcharts-zone-area-" + b + " " + C.className, C.color || u.color, C.fillColor || O.fillColor]);
}), N.forEach(function(C) {
var b = C[0], w = u[b], v = w ? "animate" : "attr", a = {};
w ? (w.endX = u.preventGraphAnimation ? null : P.xMap, w.animate({ d: P })) : (a.zIndex = 0, w = u[b] = u.chart.renderer.path(P).addClass(C[1]).add(u.group), w.isArea = !0), u.chart.styledMode || (a.fill = S(C[3], U(C[2]).setOpacity(S(O.fillOpacity, 0.75)).get())), w[v](a), w.startX = P.xMap, w.shiftUnit = O.step ? 2 : 1;
});
}, d.prototype.getGraphPath = function(u) {
var P = H.prototype.getGraphPath, O = this.options, N = O.stacking, C = this.yAxis, b, w = [], v = [], a = this.index, c = C.stacking.stacks[this.stackKey], p = O.threshold, i = Math.round(C.getThreshold(O.threshold));
O = S(O.connectNulls, N === "percent");
var l = function(n, A, _) {
var D = u[n];
n = N && c[D.x].points[a];
var j = D[_ + "Null"] || 0;
if (_ = D[_ + "Cliff"] || 0, D = !0, _ || j) {
var T = (j ? n[0] : n[1]) + _, X = n[0] + _;
D = !!j;
} else
!N && u[A] && u[A].isNull && (T = X = p);
typeof T < "u" && (v.push({ plotX: t, plotY: T === null ? i : C.getThreshold(T), isNull: D, isCliff: !0 }), w.push({ plotX: t, plotY: X === null ? i : C.getThreshold(X), doCurve: !1 }));
};
for (u = u || this.points, N && (u = this.getStackPoints(u)), b = 0; b < u.length; b++) {
N || (u[b].leftCliff = u[b].rightCliff = u[b].leftNull = u[b].rightNull = void 0);
var s = u[b].isNull, t = S(u[b].rectPlotX, u[b].plotX), o = N ? S(u[b].yBottom, i) : i;
(!s || O) && (O || l(b, b - 1, "left"), s && !N && O || (v.push(u[b]), w.push({ x: b, plotX: t, plotY: o })), O || l(b, b + 1, "right"));
}
return b = P.call(this, v, !0, !0), w.reversed = !0, s = P.call(this, w, !0, !0), (o = s[0]) && o[0] === "M" && (s[0] = ["L", o[1], o[2]]), s = b.concat(s), s.length && s.push(["Z"]), P = P.call(this, v, !1, O), s.xMap = b.xMap, this.areaPath = s, P;
}, d.prototype.getStackPoints = function(u) {
var P = this, O = [], N = [], C = this.xAxis, b = this.yAxis, w = b.stacking.stacks[this.stackKey], v = {}, a = b.series, c = a.length, p = b.options.reversedStacks ? 1 : -1, i = a.indexOf(P);
if (u = u || this.points, this.options.stacking) {
for (var l = 0; l < u.length; l++)
u[l].leftNull = u[l].rightNull = void 0, v[u[l].x] = u[l];
R(w, function(t, o) {
t.total !== null && N.push(o);
}), N.sort(function(t, o) {
return t - o;
});
var s = a.map(function(t) {
return t.visible;
});
N.forEach(function(t, o) {
var n = 0, A, _;
if (v[t] && !v[t].isNull)
O.push(v[t]), [-1, 1].forEach(function(j) {
var T = j === 1 ? "rightNull" : "leftNull", X = 0, g = w[N[o + j]];
if (g)
for (var m = i; 0 <= m && m < c; ) {
var L = a[m].index;
A = g.points[L], A || (L === P.index ? v[t][T] = !0 : s[m] && (_ = w[t].points[L]) && (X -= _[1] - _[0])), m += p;
}
v[t][j === 1 ? "rightCliff" : "leftCliff"] = X;
});
else {
for (var D = i; 0 <= D && D < c; ) {
if (A = w[t].points[a[D].index]) {
n = A[1];
break;
}
D += p;
}
n = S(n, 0), n = b.translate(n, 0, 1, 0, 1), O.push({ isNull: !0, plotX: C.translate(t, 0, 0, 0, 1), x: t, plotY: n, yBottom: n });
}
});
}
return O;
}, d.defaultOptions = W(H.defaultOptions, { threshold: 0 }), d;
}(H), y(Z.prototype, {
singleStacks: !1,
drawLegendSymbol: B.drawRectangle
}), I.registerSeriesType("area", Z), Z;
}), E(h, "Series/Spline/SplineSeries.js", [h["Core/Series/SeriesRegistry.js"], h["Core/Utilities.js"]], function(y, B) {
var I = this && this.__extends || function() {
var H = function(W, R) {
return H = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(S, x) {
S.__proto__ = x;
} || function(S, x) {
for (var d in x)
x.hasOwnProperty(d) && (S[d] = x[d]);
}, H(W, R);
};
return function(W, R) {
function S() {
this.constructor = W;
}
H(W, R), W.prototype = R === null ? Object.create(R) : (S.prototype = R.prototype, new S());
};
}(), Z = y.seriesTypes.line, F = B.merge, U = B.pick;
return B = function(H) {
function W() {
var R = H !== null && H.apply(this, arguments) || this;
return R.data = void 0, R.options = void 0, R.points = void 0, R;
}
return I(W, H), W.prototype.getPointSpline = function(R, S, x) {
var d = S.plotX || 0, u = S.plotY || 0, P = R[x - 1];
if (x = R[x + 1], P && !P.isNull && P.doCurve !== !1 && !S.isCliff && x && !x.isNull && x.doCurve !== !1 && !S.isCliff) {
R = P.plotY || 0;
var O = x.plotX || 0;
x = x.plotY || 0;
var N = 0, C = (1.5 * d + (P.plotX || 0)) / 2.5, b = (1.5 * u + R) / 2.5;
O = (1.5 * d + O) / 2.5;
var w = (1.5 * u + x) / 2.5;
O !== C && (N = (w - b) * (O - d) / (O - C) + u - w), b += N, w += N, b > R && b > u ? (b = Math.max(R, u), w = 2 * u - b) : b < R && b < u && (b = Math.min(R, u), w = 2 * u - b), w > x && w > u ? (w = Math.max(x, u), b = 2 * u - w) : w < x && w < u && (w = Math.min(x, u), b = 2 * u - w), S.rightContX = O, S.rightContY = w;
}
return S = ["C", U(P.rightContX, P.plotX, 0), U(P.rightContY, P.plotY, 0), U(C, d, 0), U(b, u, 0), d, u], P.rightContX = P.rightContY = void 0, S;
}, W.defaultOptions = F(Z.defaultOptions), W;
}(Z), y.registerSeriesType("spline", B), B;
}), E(
h,
"Series/AreaSpline/AreaSplineSeries.js",
[h["Series/Area/AreaSeries.js"], h["Series/Spline/SplineSeries.js"], h["Core/Legend/LegendSymbol.js"], h["Core/Series/SeriesRegistry.js"], h["Core/Utilities.js"]],
function(y, B, I, Z, F) {
var U = this && this.__extends || function() {
var S = function(x, d) {
return S = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(u, P) {
u.__proto__ = P;
} || function(u, P) {
for (var O in P)
P.hasOwnProperty(O) && (u[O] = P[O]);
}, S(x, d);
};
return function(x, d) {
function u() {
this.constructor = x;
}
S(x, d), x.prototype = d === null ? Object.create(d) : (u.prototype = d.prototype, new u());
};
}(), H = y.prototype, W = F.extend, R = F.merge;
return F = function(S) {
function x() {
var d = S !== null && S.apply(this, arguments) || this;
return d.data = void 0, d.points = void 0, d.options = void 0, d;
}
return U(x, S), x.defaultOptions = R(B.defaultOptions, y.defaultOptions), x;
}(B), W(F.prototype, { getGraphPath: H.getGraphPath, getStackPoints: H.getStackPoints, drawGraph: H.drawGraph, drawLegendSymbol: I.drawRectangle }), Z.registerSeriesType("areaspline", F), F;
}
), E(h, "Series/Column/ColumnSeries.js", [
h["Core/Animation/AnimationUtilities.js"],
h["Core/Color/Color.js"],
h["Core/Globals.js"],
h["Core/Legend/LegendSymbol.js"],
h["Core/Series/Series.js"],
h["Core/Series/SeriesRegistry.js"],
h["Core/Utilities.js"]
], function(y, B, I, Z, F, U, H) {
var W = this && this.__extends || function() {
var c = function(p, i) {
return c = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(l, s) {
l.__proto__ = s;
} || function(l, s) {
for (var t in s)
s.hasOwnProperty(t) && (l[t] = s[t]);
}, c(p, i);
};
return function(p, i) {
function l() {
this.constructor = p;
}
c(p, i), p.prototype = i === null ? Object.create(i) : (l.prototype = i.prototype, new l());
};
}(), R = y.animObject, S = B.parse, x = I.hasTouch;
y = I.noop;
var d = H.clamp, u = H.css, P = H.defined, O = H.extend, N = H.fireEvent, C = H.isArray, b = H.isNumber, w = H.merge, v = H.pick, a = H.objectEach;
return H = function(c) {
function p() {
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 W(p, c), p.prototype.animate = function(i) {
var l = this, s = this.yAxis, t = l.options, o = this.chart.inverted, n = {}, A = o ? "translateX" : "translateY";
if (i)
n.scaleY = 1e-3, i = d(s.toPixels(t.threshold), s.pos, s.pos + s.len), o ? n.translateX = i - s.len : n.translateY = i, l.clipBox && l.setClip(), l.group.attr(n);
else {
var _ = Number(l.group.attr(A));
l.group.animate({ scaleY: 1 }, O(R(l.options.animation), { step: function(D, j) {
l.group && (n[A] = _ + j.pos * (s.pos - _), l.group.attr(n));
} }));
}
}, p.prototype.init = function(i, l) {
c.prototype.init.apply(this, arguments);
var s = this;
i = s.chart, i.hasRendered && i.series.forEach(function(t) {
t.type === s.type && (t.isDirty = !0);
});
}, p.prototype.getColumnMetrics = function() {
var i = this, l = i.options, s = i.xAxis, t = i.yAxis, o = s.options.reversedStacks;
o = s.reversed && !o || !s.reversed && o;
var n = {}, A, _ = 0;
l.grouping === !1 ? _ = 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") {
A = X.stackKey, typeof n[A] > "u" && (n[A] = _++);
var L = n[A];
} else
m.grouping !== !1 && (L = _++);
X.columnIndex = L;
}
});
var D = Math.min(Math.abs(s.transA) * (s.ordinal && s.ordinal.slope || l.pointRange || s.closestPointRange || s.tickInterval || 1), s.len), j = D * l.groupPadding, T = (D - 2 * j) / (_ || 1);
return l = Math.min(l.maxPointWidth || s.len, v(l.pointWidth, T * (1 - 2 * l.pointPadding))), i.columnMetrics = { width: l, offset: (T - l) / 2 + (j + ((i.columnIndex || 0) + (o ? 1 : 0)) * T - D / 2) * (o ? -1 : 1), paddedWidth: T, columnCount: _ }, i.columnMetrics;
}, p.prototype.crispCol = function(i, l, s, t) {
var o = this.chart, n = this.borderWidth, A = -(n % 2 ? 0.5 : 0);
return n = n % 2 ? 0.5 : 1, o.inverted && o.renderer.isVML && (n += 1), this.options.crisp && (s = Math.round(i + s) + A, i = Math.round(i) + A, s -= i), t = Math.round(l + t) + n, A = 0.5 >= Math.abs(l) && 0.5 < t, l = Math.round(l) + n, t -= l, A && t && (--l, t += 1), { x: i, y: l, width: s, height: t };
}, p.prototype.adjustForMissingColumns = function(i, l, s, t) {
var o = this, n = this.options.stacking;
if (!s.isNull && 1 < t.columnCount) {
var A = 0, _ = 0;
a(this.yAxis.stacking && this.yAxis.stacking.stacks, function(D) {
if (typeof s.x == "number" && (D = D[s.x.toString()])) {
var j = D.points[o.index], T = D.total;
n ? (j && (A = _), D.hasValidPoints && _++) : C(j) && (A = j[1], _ = T || 0);
}
}), i = (s.plotX || 0) + ((_ - 1) * t.paddedWidth + l) / 2 - l - A * t.paddedWidth;
}
return i;
}, p.prototype.translate = function() {
var i = this, l = i.chart, s = i.options, t = i.dense = 2 > i.closestPointRange * i.xAxis.transA;
t = i.borderWidth = v(s.borderWidth, t ? 0 : 1);
var o = i.xAxis, n = i.yAxis, A = s.threshold, _ = i.translatedThreshold = n.getThreshold(A), D = v(s.minPointLength, 5), j = i.getColumnMetrics(), T = j.width, X = i.pointXOffset = j.offset, g = i.dataMin, m = i.dataMax, L = i.barW = Math.max(T, 1 + 2 * t);
l.inverted && (_ -= 0.5), s.pointPadding && (L = Math.ceil(L)), F.prototype.translate.apply(i), i.points.forEach(function(Y) {
var V = v(Y.yBottom, _), Q = 999 + Math.abs(V), k = Y.plotX || 0;
Q = d(Y.plotY, -Q, n.len + Q);
var G = Math.min(Q, V), z = Math.max(Q, V) - G, $ = T, q = k + X, it = L;
D && Math.abs(z) < D && (z = D, k = !n.reversed && !Y.negative || n.reversed && Y.negative, b(A) && b(m) && Y.y === A && m <= A && (n.min || 0) < A && (g !== m || (n.max || 0) <= A) && (k = !k), G = Math.abs(G - _) > D ? V - D : _ - (k ? D : 0)), P(Y.options.pointWidth) && ($ = it = Math.ceil(Y.options.pointWidth), q -= Math.round(($ - T) / 2)), s.centerInCategory && (q = i.adjustForMissingColumns(q, $, Y, j)), Y.barX = q, Y.pointWidth = $, Y.tooltipPos = l.inverted ? [d(n.len + n.pos - l.plotLeft - Q, n.pos - l.plotLeft, n.len + n.pos - l.plotLeft), o.len + o.pos - l.plotTop - q - it / 2, z] : [o.left - l.plotLeft + q + it / 2, d(Q + n.pos - l.plotTop, n.pos - l.plotTop, n.len + n.pos - l.plotTop), z], Y.shapeType = i.pointClass.prototype.shapeType || "rect", Y.shapeArgs = i.crispCol.apply(i, Y.isNull ? [q, _, it, 0] : [q, G, it, z]);
});
}, p.prototype.drawGraph = function() {
this.group[this.dense ? "addClass" : "removeClass"]("highcharts-dense-data");
}, p.prototype.pointAttribs = function(i, l) {
var s = this.options, t = this.pointAttrToOptions || {}, o = t.stroke || "borderColor", n = t["stroke-width"] || "borderWidth", A = i && i.color || this.color, _ = i && i[o] || s[o] || A;
t = i && i.options.dashStyle || s.dashStyle;
var D = i && i[n] || s[n] || this[n] || 0, j = v(i && i.opacity, s.opacity, 1);
if (i && this.zones.length) {
var T = i.getZone();
A = i.options.color || T && (T.color || i.nonZonedColor) || this.color, T && (_ = T.borderColor || _, t = T.dashStyle || t, D = T.borderWidth || D);
}
return l && i && (i = w(s.states[l], i.options.states && i.options.states[l] || {}), l = i.brightness, A = i.color || typeof l < "u" && S(A).brighten(i.brightness).get() || A, _ = i[o] || _, D = i[n] || D, t = i.dashStyle || t, j = v(i.opacity, j)), o = { fill: A, stroke: _, "stroke-width": D, opacity: j }, t && (o.dashstyle = t), o;
}, p.prototype.drawPoints = function() {
var i = this, l = this.chart, s = i.options, t = l.renderer, o = s.animationLimit || 250, n;
i.points.forEach(function(A) {
var _ = A.graphic, D = !!_, j = _ && l.pointCount < o ? "animate" : "attr";
b(A.plotY) && A.y !== null ? (n = A.shapeArgs, _ && A.hasNewShapeType() && (_ = _.destroy()), i.enabledDataSorting && (A.startXPos = i.xAxis.reversed ? -(n && n.width || 0) : i.xAxis.width), _ || (A.graphic = _ = t[A.shapeType](n).add(A.group || i.group)) && i.enabledDataSorting && l.hasRendered && l.pointCount < o && (_.attr({ x: A.startXPos }), D = !0, j = "animate"), _ && D && _[j](w(n)), s.borderRadius && _[j]({ r: s.borderRadius }), l.styledMode || _[j](i.pointAttribs(A, A.selected && "select")).shadow(A.allowShadow !== !1 && s.shadow, null, s.stacking && !s.borderRadius), _ && (_.addClass(A.getClassName(), !0), _.attr({ visibility: A.visible ? "inherit" : "hidden" }))) : _ && (A.graphic = _.destroy());
});
}, p.prototype.drawTracker = function() {
var i = this, l = i.chart, s = l.pointer, t = function(n) {
var A = s.getPointFromEvent(n);
typeof A < "u" && (s.isDirectTouch = !0, A.onMouseOver(n));
}, o;
i.points.forEach(function(n) {
o = C(n.dataLabels) ? n.dataLabels : n.dataLabel ? [n.dataLabel] : [], n.graphic && (n.graphic.element.point = n), o.forEach(function(A) {
A.div ? A.div.point = n : A.element.point = n;
});
}), i._hasTracking || (i.trackerGroups.forEach(function(n) {
i[n] && (i[n].addClass("highcharts-tracker").on("mouseover", t).on("mouseout", function(A) {
s.onTrackerMouseOut(A);
}), x && i[n].on(
"touchstart",
t
), !l.styledMode && i.options.cursor && i[n].css(u).css({ cursor: i.options.cursor }));
}), i._hasTracking = !0), N(this, "afterDrawTracker");
}, p.prototype.remove = function() {
var i = this, l = i.chart;
l.hasRendered && l.series.forEach(function(s) {
s.type === i.type && (s.isDirty = !0);
}), F.prototype.remove.apply(i, arguments);
}, p.defaultOptions = w(F.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" }), p;
}(F), O(H.prototype, { cropShoulder: 0, directTouch: !0, drawLegendSymbol: Z.drawRectangle, getSymbol: y, negStacks: !0, trackerGroups: ["group", "dataLabelsGroup"] }), U.registerSeriesType("column", H), H;
}), E(h, "Core/Series/DataLabel.js", [
h["Core/Animation/AnimationUtilities.js"],
h["Core/FormatUtilities.js"],
h["Core/Utilities.js"]
], function(y, B, I) {
var Z = y.getDeferredAnimation, F = B.format, U = I.defined, H = I.extend, W = I.fireEvent, R = I.isArray, S = I.merge, x = I.objectEach, d = I.pick, u = I.splat, P;
return function(O) {
function N(p, i, l, s, t) {
var o = this, n = this.chart, A = this.isCartesian && n.inverted, _ = this.enabledDataSorting, D = d(p.dlBox && p.dlBox.centerX, p.plotX, -9999), j = d(p.plotY, -9999), T = i.getBBox(), X = l.rotation, g = l.align, m = n.isInsidePlot(D, Math.round(j), { inverted: A, paneCoordinates: !0, series: o }), L = function(k) {
_ && o.xAxis && !Y && o.setDataLabelStartPos(
p,
i,
t,
m,
k
);
}, Y = d(l.overflow, _ ? "none" : "justify") === "justify", V = this.visible && p.visible !== !1 && (p.series.forceDL || _ && !Y || m || d(l.inside, !!this.options.stacking) && s && n.isInsidePlot(D, A ? s.x + 1 : s.y + s.height - 1, { inverted: A, paneCoordinates: !0, series: o }));
if (V) {
var Q = n.renderer.fontMetrics(n.styledMode ? void 0 : l.style.fontSize, i).b;
s = H({ x: A ? this.yAxis.len - j : D, y: Math.round(A ? this.xAxis.len - D : j), width: 0, height: 0 }, s), H(l, { width: T.width, height: T.height }), X ? (Y = !1, D = n.renderer.rotCorr(Q, X), D = { x: s.x + (l.x || 0) + s.width / 2 + D.x, y: s.y + (l.y || 0) + { top: 0, middle: 0.5, bottom: 1 }[l.verticalAlign] * s.height }, L(D), i[t ? "attr" : "animate"](D).attr({ align: g }), L = (X + 720) % 360, L = 180 < L && 360 > L, g === "left" ? D.y -= L ? T.height : 0 : g === "center" ? (D.x -= T.width / 2, D.y -= T.height / 2) : g === "right" && (D.x -= T.width, D.y -= L ? 0 : T.height), i.placed = !0, i.alignAttr = D) : (L(s), i.align(l, void 0, s), D = i.alignAttr), Y && 0 <= s.height ? this.justifyDataLabel(i, l, D, T, s, t) : d(l.crop, !0) && (V = n.isInsidePlot(D.x, D.y, { paneCoordinates: !0, series: o }) && n.isInsidePlot(D.x + T.width, D.y + T.height, {
paneCoordinates: !0,
series: o
})), l.shape && !X && i[t ? "attr" : "animate"]({ anchorX: A ? n.plotWidth - p.plotY : p.plotX, anchorY: A ? n.plotHeight - p.plotX : p.plotY });
}
t && _ && (i.placed = !1), V || _ && !Y || (i.hide(!0), i.placed = !1);
}
function C(p, i) {
var l = i.filter;
return l ? (i = l.operator, p = p[l.property], l = l.value, i === ">" && p > l || i === "<" && p < l || i === ">=" && p >= l || i === "<=" && p <= l || i === "==" && p == l || i === "===" && p === l) : !0;
}
function b() {
var p = this, i = p.chart, l = p.options, s = p.points, t = p.hasRendered || 0, o = i.renderer, n = l.dataLabels, A, _ = n.animation;
if (_ = n.defer ? Z(
i,
_,
p
) : { 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[p.type] && i.options.plotOptions[p.type].dataLabels), n), W(this, "drawDataLabels"), R(n) || n.enabled || p._hasPointLabels) {
var D = p.plotGroup("dataLabelsGroup", "data-labels", t ? "inherit" : "hidden", n.zIndex || 6);
D.attr({ opacity: +t }), !t && (t = p.dataLabelsGroup) && (p.visible && D.show(!0), t[l.animation ? "animate" : "attr"]({ opacity: 1 }, _)), s.forEach(function(j) {
A = u(v(n, j.dlOptions || j.options && j.options.dataLabels)), A.forEach(function(T, X) {
var g = T.enabled && (!j.isNull || j.dataLabelOnNull) && C(j, T), m = j.connectors ? j.connectors[X] : j.connector, L = j.dataLabels ? j.dataLabels[X] : j.dataLabel, Y = d(T.distance, j.labelDistance), V = !L;
if (g) {
var Q = j.getLabelConfig(), k = d(T[j.formatPrefix + "Format"], T.format);
Q = U(k) ? F(k, Q, i) : (T[j.formatPrefix + "Formatter"] || T.formatter).call(Q, T), k = T.style;
var G = T.rotation;
i.styledMode || (k.color = d(T.color, k.color, p.color, "#000000"), k.color === "contrast" ? (j.contrastColor = o.getContrast(j.color || p.color), k.color = !U(Y) && T.inside || 0 > Y || l.stacking ? j.contrastColor : "#000000") : delete j.contrastColor, l.cursor && (k.cursor = l.cursor));
var z = { r: T.borderRadius || 0, rotation: G, padding: T.padding, zIndex: 1 };
i.styledMode || (z.fill = T.backgroundColor, z.stroke = T.borderColor, z["stroke-width"] = T.borderWidth), x(z, function($, q) {
typeof $ > "u" && delete z[q];
});
}
!L || g && U(Q) && !!L.div == !!T.useHTML || (j.dataLabel = L = j.dataLabel && j.dataLabel.destroy(), j.dataLabels && (j.dataLabels.length === 1 ? delete j.dataLabels : delete j.dataLabels[X]), X || delete j.dataLabel, m && (j.connector = j.connector.destroy(), j.connectors && (j.connectors.length === 1 ? delete j.connectors : delete j.connectors[X]))), g && U(Q) && (L ? z.text = Q : (j.dataLabels = j.dataLabels || [], L = j.dataLabels[X] = G ? o.text(Q, 0, -9999, T.useHTML).addClass("highcharts-data-label") : o.label(Q, 0, -9999, T.shape, null, null, T.useHTML, null, "data-label"), X || (j.dataLabel = L), L.addClass(" highcharts-data-label-color-" + j.colorIndex + " " + (T.className || "") + (T.useHTML ? " highcharts-tracker" : ""))), L.options = T, L.attr(z), i.styledMode || L.css(k).shadow(T.shadow), L.added || L.add(D), T.textPath && !T.useHTML && (L.setTextPath(j.getDataLabelPath && j.getDataLabelPath(L) || j.graphic, T.textPath), j.dataLabelPath && !T.textPath.enabled && (j.dataLabelPath = j.dataLabelPath.destroy())), p.alignDataLabel(j, L, T, null, V));
});
});
}
W(this, "afterDrawDataLabels");
}
function w(p, i, l, s, t, o) {
var n = this.chart, A = i.align, _ = i.verticalAlign, D = p.box ? 0 : p.padding || 0, j = i.x;
j = j === void 0 ? 0 : j;
var T = i.y;
T = T === void 0 ? 0 : T;
var X = (l.x || 0) + D;
if (0 > X) {
A === "right" && 0 <= j ? (i.align = "left", i.inside = !0) : j -= X;
var g = !0;
}
return X = (l.x || 0) + s.width - D, X > n.plotWidth && (A === "left" && 0 >= j ? (i.align = "right", i.inside = !0) : j += n.plotWidth - X, g = !0), X = l.y + D, 0 > X && (_ === "bottom" && 0 <= T ? (i.verticalAlign = "top", i.inside = !0) : T -= X, g = !0), X = (l.y || 0) + s.height - D, X > n.plotHeight && (_ === "top" && 0 >= T ? (i.verticalAlign = "bottom", i.inside = !0) : T += n.plotHeight - X, g = !0), g && (i.x = j, i.y = T, p.placed = !o, p.align(i, void 0, t)), g;
}
function v(p, i) {
var l = [], s;
if (R(p) && !R(i))
l = p.map(function(t) {
return S(t, i);
});
else if (R(i) && !R(p))
l = i.map(function(t) {
return S(p, t);
});
else if (R(p) || R(i))
for (s = Math.max(p.length, i.length); s--; )
l[s] = S(p[s], i[s]);
else
l = S(p, i);
return l;
}
function a(p, i, l, s, t) {
var o = this.chart, n = o.inverted, A = this.xAxis, _ = A.reversed, D = n ? i.height / 2 : i.width / 2;
p = (p = p.pointWidth) ? p / 2 : 0, i.startXPos = n ? t.x : _ ? -D - p : A.width - D + p, i.startYPos = n ? _ ? this.yAxis.height - D + p : -D - p : t.y, s ? i.visibility === "hidden" && (i.show(), i.attr({ opacity: 0 }).animate({ opacity: 1 })) : i.attr({ opacity: 1 }).animate(
{ opacity: 0 },
void 0,
i.hide
), o.hasRendered && (l && i.attr({ x: i.startXPos, y: i.startYPos }), i.placed = !0);
}
var c = [];
O.compose = function(p) {
if (c.indexOf(p) === -1) {
var i = p.prototype;
c.push(p), i.alignDataLabel = N, i.drawDataLabels = b, i.justifyDataLabel = w, i.setDataLabelStartPos = a;
}
};
}(P || (P = {})), P;
}), E(h, "Series/Column/ColumnDataLabel.js", [h["Core/Series/DataLabel.js"], h["Core/Series/SeriesRegistry.js"], h["Core/Utilities.js"]], function(y, B, I) {
var Z = B.series, F = I.merge, U = I.pick, H;
return function(W) {
function R(x, d, u, P, O) {
var N = this.chart.inverted, C = x.series, b = (C.xAxis ? C.xAxis.len : this.chart.plotSizeX) || 0;
C = (C.yAxis ? C.yAxis.len : this.chart.plotSizeY) || 0;
var w = x.dlBox || x.shapeArgs, v = U(x.below, x.plotY > U(this.translatedThreshold, C)), a = U(u.inside, !!this.options.stacking);
w && (P = F(w), 0 > P.y && (P.height += P.y, P.y = 0), w = P.y + P.height - C, 0 < w && w < P.height && (P.height -= w), N && (P = { x: C - P.y - P.height, y: b - P.x - P.width, width: P.height, height: P.width }), a || (N ? (P.x += v ? 0 : P.width, P.width = 0) : (P.y += v ? P.height : 0, P.height = 0))), u.align = U(u.align, !N || a ? "center" : v ? "right" : "left"), u.verticalAlign = U(u.verticalAlign, N || a ? "middle" : v ? "top" : "bottom"), Z.prototype.alignDataLabel.call(this, x, d, u, P, O), u.inside && x.contrastColor && d.css({ color: x.contrastColor });
}
var S = [];
W.compose = function(x) {
y.compose(Z), S.indexOf(x) === -1 && (S.push(x), x.prototype.alignDataLabel = R);
};
}(H || (H = {})), H;
}), E(h, "Series/Bar/BarSeries.js", [h["Series/Column/ColumnSeries.js"], h["Core/Series/SeriesRegistry.js"], h["Core/Utilities.js"]], function(y, B, I) {
var Z = this && this.__extends || function() {
var H = function(W, R) {
return H = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(S, x) {
S.__proto__ = x;
} || function(S, x) {
for (var d in x)
x.hasOwnProperty(d) && (S[d] = x[d]);
}, H(W, R);
};
return function(W, R) {
function S() {
this.constructor = W;
}
H(W, R), W.prototype = R === null ? Object.create(R) : (S.prototype = R.prototype, new S());
};
}(), F = I.extend, U = I.merge;
return I = function(H) {
function W() {
var R = H !== null && H.apply(this, arguments) || this;
return R.data = void 0, R.options = void 0, R.points = void 0, R;
}
return Z(W, H), W.defaultOptions = U(
y.defaultOptions,
{}
), W;
}(y), F(I.prototype, { inverted: !0 }), B.registerSeriesType("bar", I), I;
}), E(h, "Series/Scatter/ScatterSeries.js", [h["Series/Column/ColumnSeries.js"], h["Series/Line/LineSeries.js"], h["Core/Series/SeriesRegistry.js"], h["Core/Utilities.js"]], function(y, B, I, Z) {
var F = this && this.__extends || function() {
var R = function(S, x) {
return R = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d, u) {
d.__proto__ = u;
} || function(d, u) {
for (var P in u)
u.hasOwnProperty(P) && (d[P] = u[P]);
}, R(S, x);
};
return function(S, x) {
function d() {
this.constructor = S;
}
R(S, x), S.prototype = x === null ? Object.create(x) : (d.prototype = x.prototype, new d());
};
}(), U = Z.addEvent, H = Z.extend, W = Z.merge;
return Z = function(R) {
function S() {
var x = R !== null && R.apply(this, arguments) || this;
return x.data = void 0, x.options = void 0, x.points = void 0, x;
}
return F(S, R), S.prototype.applyJitter = function() {
var x = this, d = this.options.jitter, u = this.points.length;
d && this.points.forEach(function(P, O) {
["x", "y"].forEach(function(N, C) {
var b = "plot" + N.toUpperCase();
if (d[N] && !P.isNull) {
var w = x[N + "Axis"], v = d[N] * w.transA;
if (w && !w.isLog) {
var a = Math.max(0, P[b] - v);
w = Math.min(w.len, P[b] + v), C = 1e4 * Math.sin(O + C * u), P[b] = a + (w - a) * (C - Math.floor(C)), N === "x" && (P.clientX = P.plotX);
}
}
});
});
}, S.prototype.drawGraph = function() {
this.options.lineWidth ? R.prototype.drawGraph.call(this) : this.graph && (this.graph = this.graph.destroy());
}, S.defaultOptions = W(B.defaultOptions, { lineWidth: 0, findNearestPointBy: "xy", jitter: { x: 0, y: 0 }, marker: { enabled: !0 }, tooltip: {
headerFormat: '● {series.name}
',
pointFormat: "x: {point.x}
y: {point.y}
"
} }), S;
}(B), H(Z.prototype, { drawTracker: y.prototype.drawTracker, sorted: !1, requireSorting: !1, noSharedTooltip: !0, trackerGroups: ["group", "markerGroup", "dataLabelsGroup"], takeOrdinalPosition: !1 }), U(Z, "afterTranslate", function() {
this.applyJitter();
}), I.registerSeriesType("scatter", Z), Z;
}), E(h, "Series/CenteredUtilities.js", [h["Core/Globals.js"], h["Core/Series/Series.js"], h["Core/Utilities.js"]], function(y, B, I) {
var Z = y.deg2rad, F = I.isNumber, U = I.pick, H = I.relativeLength, W;
return function(R) {
R.getCenter = function() {
var S = this.options, x = this.chart, d = 2 * (S.slicedOffset || 0), u = x.plotWidth - 2 * d, P = x.plotHeight - 2 * d, O = S.center, N = Math.min(u, P), C = S.size, b = S.innerSize || 0;
for (typeof C == "string" && (C = parseFloat(C)), typeof b == "string" && (b = parseFloat(b)), S = [U(O[0], "50%"), U(O[1], "50%"), U(C && 0 > C ? void 0 : S.size, "100%"), U(b && 0 > b ? void 0 : S.innerSize || 0, "0%")], !x.angular || this instanceof B || (S[3] = 0), O = 0; 4 > O; ++O)
C = S[O], x = 2 > O || O === 2 && /%$/.test(C), S[O] = H(C, [u, P, N, S[2]][O]) + (x ? d : 0);
return S[3] > S[2] && (S[3] = S[2]), S;
}, R.getStartAndEndRadians = function(S, x) {
return S = F(S) ? S : 0, x = F(x) && x > S && 360 > x - S ? x : S + 360, { start: Z * (S + -90), end: Z * (x + -90) };
};
}(W || (W = {})), W;
}), E(h, "Series/Pie/PiePoint.js", [h["Core/Animation/AnimationUtilities.js"], h["Core/Series/Point.js"], h["Core/Utilities.js"]], function(y, B, I) {
var Z = this && this.__extends || function() {
var x = function(d, u) {
return x = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(P, O) {
P.__proto__ = O;
} || function(P, O) {
for (var N in O)
O.hasOwnProperty(N) && (P[N] = O[N]);
}, x(d, u);
};
return function(d, u) {
function P() {
this.constructor = d;
}
x(d, u), d.prototype = u === null ? Object.create(u) : (P.prototype = u.prototype, new P());
};
}(), F = y.setAnimation, U = I.addEvent, H = I.defined;
y = I.extend;
var W = I.isNumber, R = I.pick, S = I.relativeLength;
return B = function(x) {
function d() {
var u = x !== null && x.apply(this, arguments) || this;
return u.labelDistance = void 0, u.options = void 0, u.series = void 0, u;
}
return Z(d, x), d.prototype.getConnectorPath = function() {
var u = this.labelPosition, P = this.series.options.dataLabels, O = this.connectorShapes, N = P.connectorShape;
return O[N] && (N = O[N]), N.call(this, { x: u.final.x, y: u.final.y, alignment: u.alignment }, u.connectorPosition, P);
}, d.prototype.getTranslate = function() {
return this.sliced ? this.slicedTranslation : { translateX: 0, translateY: 0 };
}, d.prototype.haloPath = function(u) {
var P = this.shapeArgs;
return this.sliced || !this.visible ? [] : this.series.chart.renderer.symbols.arc(P.x, P.y, P.r + u, P.r + u, { innerR: P.r - 1, start: P.start, end: P.end });
}, d.prototype.init = function() {
var u = this;
x.prototype.init.apply(
this,
arguments
), this.name = R(this.name, "Slice");
var P = function(O) {
u.slice(O.type === "select");
};
return U(this, "select", P), U(this, "unselect", P), this;
}, d.prototype.isValid = function() {
return W(this.y) && 0 <= this.y;
}, d.prototype.setVisible = function(u, P) {
var O = this, N = this.series, C = N.chart, b = N.options.ignoreHiddenPoint;
P = R(P, b), u !== this.visible && (this.visible = this.options.visible = u = typeof u > "u" ? !this.visible : u, N.options.data[N.data.indexOf(this)] = this.options, ["graphic", "dataLabel", "connector", "shadowGroup"].forEach(function(w) {
O[w] && O[w][u ? "show" : "hide"](u);
}), this.legendItem && C.legend.colorizeItem(this, u), u || this.state !== "hover" || this.setState(""), b && (N.isDirty = !0), P && C.redraw());
}, d.prototype.slice = function(u, P, O) {
var N = this.series;
F(O, N.chart), R(P, !0), this.sliced = this.options.sliced = H(u) ? u : !this.sliced, N.options.data[N.data.indexOf(this)] = this.options, this.graphic && this.graphic.animate(this.getTranslate()), this.shadowGroup && this.shadowGroup.animate(this.getTranslate());
}, d;
}(B), y(B.prototype, { connectorShapes: { fixedOffset: function(x, d, u) {
var P = d.breakAt;
return d = d.touchingSliceAt, [["M", x.x, x.y], u.softConnector ? ["C", x.x + (x.alignment === "left" ? -5 : 5), x.y, 2 * P.x - d.x, 2 * P.y - d.y, P.x, P.y] : ["L", P.x, P.y], ["L", d.x, d.y]];
}, straight: function(x, d) {
return d = d.touchingSliceAt, [["M", x.x, x.y], ["L", d.x, d.y]];
}, crookedLine: function(x, d, u) {
d = d.touchingSliceAt;
var P = this.series, O = P.center[0], N = P.chart.plotWidth, C = P.chart.plotLeft;
P = x.alignment;
var b = this.shapeArgs.r;
return u = S(u.crookDistance, 1), N = P === "left" ? O + b + (N + C - O - b) * (1 - u) : C + (O - b) * u, u = ["L", N, x.y], O = !0, (P === "left" ? N > x.x || N < d.x : N < x.x || N > d.x) && (O = !1), x = [["M", x.x, x.y]], O && x.push(u), x.push(["L", d.x, d.y]), x;
} } }), B;
}), E(h, "Series/Pie/PieSeries.js", [h["Series/CenteredUtilities.js"], h["Series/Column/ColumnSeries.js"], h["Core/Globals.js"], h["Core/Legend/LegendSymbol.js"], h["Series/Pie/PiePoint.js"], h["Core/Series/Series.js"], h["Core/Series/SeriesRegistry.js"], h["Core/Renderer/SVG/Symbols.js"], h["Core/Utilities.js"]], function(y, B, I, Z, F, U, H, W, R) {
var S = this && this.__extends || function() {
var b = function(w, v) {
return b = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(a, c) {
a.__proto__ = c;
} || function(a, c) {
for (var p in c)
c.hasOwnProperty(p) && (a[p] = c[p]);
}, b(w, v);
};
return function(w, v) {
function a() {
this.constructor = w;
}
b(w, v), w.prototype = v === null ? Object.create(v) : (a.prototype = v.prototype, new a());
};
}(), x = y.getStartAndEndRadians;
I = I.noop;
var d = R.clamp, u = R.extend, P = R.fireEvent, O = R.merge, N = R.pick, C = R.relativeLength;
return R = function(b) {
function w() {
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 S(w, b), w.prototype.animate = function(v) {
var a = this, c = a.points, p = a.startAngleRad;
v || c.forEach(function(i) {
var l = i.graphic, s = i.shapeArgs;
l && s && (l.attr({ r: N(i.startR, a.center && a.center[3] / 2), start: p, end: p }), l.animate({ r: s.r, start: s.start, end: s.end }, a.options.animation));
});
}, w.prototype.drawEmpty = function() {
var v = this.startAngleRad, a = this.endAngleRad, c = this.options;
if (this.total === 0 && this.center) {
var p = this.center[0], i = this.center[1];
this.graph || (this.graph = this.chart.renderer.arc(p, i, this.center[1] / 2, 0, v, a).addClass("highcharts-empty-series").add(this.group)), this.graph.attr({ d: W.arc(p, i, this.center[2] / 2, 0, { start: v, end: a, 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());
}, w.prototype.drawPoints = function() {
var v = this.chart.renderer;
this.points.forEach(function(a) {
a.graphic && a.hasNewShapeType() && (a.graphic = a.graphic.destroy()), a.graphic || (a.graphic = v[a.shapeType](a.shapeArgs).add(a.series.group), a.delayedRendering = !0);
});
}, w.prototype.generatePoints = function() {
b.prototype.generatePoints.call(this), this.updateTotals();
}, w.prototype.getX = function(v, a, c) {
var p = this.center, i = this.radii ? this.radii[c.index] || 0 : p[2] / 2;
return v = Math.asin(d((v - p[1]) / (i + c.labelDistance), -1, 1)), p[0] + (a ? -1 : 1) * Math.cos(v) * (i + c.labelDistance) + (0 < c.labelDistance ? (a ? -1 : 1) * this.options.dataLabels.padding : 0);
}, w.prototype.hasData = function() {
return !!this.processedXData.length;
}, w.prototype.redrawPoints = function() {
var v = this, a = v.chart, c = a.renderer, p = v.options.shadow, i, l, s, t;
this.drawEmpty(), !p || v.shadowGroup || a.styledMode || (v.shadowGroup = c.g("shadow").attr({ zIndex: -1 }).add(v.group)), v.points.forEach(function(o) {
var n = {};
if (l = o.graphic, !o.isNull && l) {
var A = void 0;
t = o.shapeArgs, i = o.getTranslate(), a.styledMode || (A = o.shadowGroup, p && !A && (A = o.shadowGroup = c.g("shadow").add(v.shadowGroup)), A && A.attr(i), s = v.pointAttribs(o, o.selected && "select")), o.delayedRendering ? (l.setRadialReference(v.center).attr(t).attr(i), a.styledMode || l.attr(s).attr({ "stroke-linejoin": "round" }).shadow(p, A), o.delayedRendering = !1) : (l.setRadialReference(v.center), a.styledMode || O(!0, n, s), O(!0, n, t, i), l.animate(n)), l.attr({ visibility: o.visible ? "inherit" : "hidden" }), l.addClass(o.getClassName(), !0);
} else
l && (o.graphic = l.destroy());
});
}, w.prototype.sortByAngle = function(v, a) {
v.sort(function(c, p) {
return typeof c.angle < "u" && (p.angle - c.angle) * a;
});
}, w.prototype.translate = function(v) {
this.generatePoints();
var a = this.options, c = a.slicedOffset, p = c + (a.borderWidth || 0), i = x(a.startAngle, a.endAngle), l = this.startAngleRad = i.start;
i = (this.endAngleRad = i.end) - l;
var s = this.points, t = a.dataLabels.distance;
a = a.ignoreHiddenPoint;
var o = s.length, n, A = 0;
for (v || (this.center = v = this.getCenter()), n = 0; n < o; n++) {
var _ = s[n], D = l + A * i;
!_.isValid() || a && !_.visible || (A += _.percentage / 100);
var j = l + A * i, T = { x: v[0], y: v[1], r: v[2] / 2, innerR: v[3] / 2, start: Math.round(1e3 * D) / 1e3, end: Math.round(1e3 * j) / 1e3 };
_.shapeType = "arc", _.shapeArgs = T, _.labelDistance = N(_.options.dataLabels && _.options.dataLabels.distance, t), _.labelDistance = C(_.labelDistance, T.r), this.maxLabelDistance = Math.max(this.maxLabelDistance || 0, _.labelDistance), j = (j + D) / 2, j > 1.5 * Math.PI ? j -= 2 * Math.PI : j < -Math.PI / 2 && (j += 2 * Math.PI), _.slicedTranslation = { translateX: Math.round(Math.cos(j) * c), translateY: Math.round(Math.sin(j) * c) }, T = Math.cos(j) * v[2] / 2;
var X = Math.sin(j) * v[2] / 2;
_.tooltipPos = [v[0] + 0.7 * T, v[1] + 0.7 * X], _.half = j < -Math.PI / 2 || j > Math.PI / 2 ? 1 : 0, _.angle = j, D = Math.min(p, _.labelDistance / 5), _.labelPosition = { natural: { x: v[0] + T + Math.cos(j) * _.labelDistance, y: v[1] + X + Math.sin(j) * _.labelDistance }, final: {}, alignment: 0 > _.labelDistance ? "center" : _.half ? "right" : "left", connectorPosition: { breakAt: { x: v[0] + T + Math.cos(j) * D, y: v[1] + X + Math.sin(j) * D }, touchingSliceAt: { x: v[0] + T, y: v[1] + X } } };
}
P(this, "afterTranslate");
}, w.prototype.updateTotals = function() {
var v = this.points, a = v.length, c = this.options.ignoreHiddenPoint, p, i = 0;
for (p = 0; p < a; p++) {
var l = v[p];
!l.isValid() || c && !l.visible || (i += l.y);
}
for (this.total = i, p = 0; p < a; p++)
l = v[p], l.percentage = 0 < i && (l.visible || !c) ? l.y / i * 100 : 0, l.total = i;
}, w.defaultOptions = O(U.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 } }
}), w;
}(U), u(R.prototype, { axisTypes: [], directTouch: !0, drawGraph: void 0, drawLegendSymbol: Z.drawRectangle, drawTracker: B.prototype.drawTracker, getCenter: y.getCenter, getSymbol: I, isCartesian: !1, noSharedTooltip: !0, pointAttribs: B.prototype.pointAttribs, pointClass: F, requireSorting: !1, searchPoint: I, trackerGroups: ["group", "dataLabelsGroup"] }), H.registerSeriesType("pie", R), R;
}), E(h, "Series/Pie/PieDataLabel.js", [
h["Core/Series/DataLabel.js"],
h["Core/Globals.js"],
h["Core/Renderer/RendererUtilities.js"],
h["Core/Series/SeriesRegistry.js"],
h["Core/Utilities.js"]
], function(y, B, I, Z, F) {
var U = B.noop, H = I.distribute, W = Z.series, R = F.arrayMax, S = F.clamp, x = F.defined, d = F.merge, u = F.pick, P = F.relativeLength, O;
return function(N) {
function C() {
var c = this, p = c.data, i = c.chart, l = c.options.dataLabels || {}, s = l.connectorPadding, t = i.plotWidth, o = i.plotHeight, n = i.plotLeft, A = Math.round(i.chartWidth / 3), _ = c.center, D = _[2] / 2, j = _[1], T = [[], []], X = [0, 0, 0, 0], g = c.dataLabelPositioners, m, L, Y, V, Q, k, G, z, $, q, it, et;
c.visible && (l.enabled || c._hasPointLabels) && (p.forEach(function(nt) {
nt.dataLabel && nt.visible && nt.dataLabel.shortened && (nt.dataLabel.attr({ width: "auto" }).css({ width: "auto", textOverflow: "clip" }), nt.dataLabel.shortened = !1);
}), W.prototype.drawDataLabels.apply(c), p.forEach(function(nt) {
nt.dataLabel && (nt.visible ? (T[nt.half].push(nt), nt.dataLabel._pos = null, !x(l.style.width) && !x(nt.options.dataLabels && nt.options.dataLabels.style && nt.options.dataLabels.style.width) && nt.dataLabel.getBBox().width > A && (nt.dataLabel.css({ width: Math.round(0.7 * A) + "px" }), nt.dataLabel.shortened = !0)) : (nt.dataLabel = nt.dataLabel.destroy(), nt.dataLabels && nt.dataLabels.length === 1 && delete nt.dataLabels));
}), T.forEach(function(nt, rt) {
var ct = nt.length, gt = [], dt;
if (ct) {
if (c.sortByAngle(nt, rt - 0.5), 0 < c.maxLabelDistance) {
var lt = Math.max(0, j - D - c.maxLabelDistance), at = Math.min(j + D + c.maxLabelDistance, i.plotHeight);
nt.forEach(function(J) {
0 < J.labelDistance && J.dataLabel && (J.top = Math.max(0, j - D - J.labelDistance), J.bottom = Math.min(j + D + 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));
}), lt = at + dt - lt, H(gt, lt, lt / 5);
}
for (it = 0; it < ct; it++) {
if (m = nt[it], k = m.labelPosition, V = m.dataLabel, q = m.visible === !1 ? "hidden" : "inherit", $ = lt = k.natural.y, gt && x(m.distributeBox) && (typeof m.distributeBox.pos > "u" ? q = "hidden" : (G = m.distributeBox.size, $ = g.radialDistributionY(m))), delete m.positionIndex, l.justify)
z = g.justify(m, D, _);
else
switch (l.alignTo) {
case "connectors":
z = g.alignToConnectors(nt, rt, t, n);
break;
case "plotEdges":
z = g.alignToPlotEdges(V, rt, t, n);
break;
default:
z = g.radialDistributionX(c, m, $, lt);
}
V._attr = { visibility: q, align: k.alignment }, et = m.options.dataLabels || {}, V._pos = { x: z + u(et.x, l.x) + ({ left: s, right: -s }[k.alignment] || 0), y: $ + u(et.y, l.y) - 10 }, k.final.x = z, k.final.y = $, u(l.crop, !0) && (Q = V.getBBox().width, lt = null, z - Q < s && rt === 1 ? (lt = Math.round(Q - z + s), X[3] = Math.max(lt, X[3])) : z + Q > t - s && rt === 0 && (lt = Math.round(z + Q - t + s), X[1] = Math.max(lt, X[1])), 0 > $ - G / 2 ? X[0] = Math.max(Math.round(-$ + G / 2), X[0]) : $ + G / 2 > o && (X[2] = Math.max(Math.round($ + G / 2 - o), X[2])), V.sideOverflow = lt);
}
}
}), R(X) === 0 || this.verifyDataLabelOverflow(X)) && (this.placeDataLabels(), this.points.forEach(function(nt) {
if (et = d(l, nt.options.dataLabels), L = u(et.connectorWidth, 1)) {
var rt;
Y = nt.connector, (V = nt.dataLabel) && V._pos && nt.visible && 0 < nt.labelDistance ? (q = V._attr.visibility, (rt = !Y) && (nt.connector = Y = i.renderer.path().addClass("highcharts-data-label-connector highcharts-color-" + nt.colorIndex + (nt.className ? " " + nt.className : "")).add(c.dataLabelsGroup), i.styledMode || Y.attr({ "stroke-width": L, stroke: et.connectorColor || nt.color || "#666666" })), Y[rt ? "attr" : "animate"]({ d: nt.getConnectorPath() }), Y.attr("visibility", q)) : Y && (nt.connector = Y.destroy());
}
}));
}
function b() {
this.points.forEach(function(c) {
var p = c.dataLabel, i;
p && c.visible && ((i = p._pos) ? (p.sideOverflow && (p._attr.width = Math.max(p.getBBox().width - p.sideOverflow, 0), p.css({ width: p._attr.width + "px", textOverflow: (this.options.dataLabels.style || {}).textOverflow || "ellipsis" }), p.shortened = !0), p.attr(p._attr), p[p.moved ? "animate" : "attr"](i), p.moved = !0) : p && p.attr({ y: -9999 })), delete c.distributeBox;
}, this);
}
function w(c) {
var p = this.center, i = this.options, l = i.center, s = i.minSize || 80, t = i.size !== null;
if (!t) {
if (l[0] !== null)
var o = Math.max(p[2] - Math.max(c[1], c[3]), s);
else
o = Math.max(p[2] - c[1] - c[3], s), p[0] += (c[3] - c[1]) / 2;
l[1] !== null ? o = S(o, s, p[2] - Math.max(c[0], c[2])) : (o = S(o, s, p[2] - c[0] - c[2]), p[1] += (c[0] - c[2]) / 2), o < p[2] ? (p[2] = o, p[3] = Math.min(P(i.innerSize || 0, o), o), this.translate(p), this.drawDataLabels && this.drawDataLabels()) : t = !0;
}
return t;
}
var v = [], a = { radialDistributionY: function(c) {
return c.top + c.distributeBox.pos;
}, radialDistributionX: function(c, p, i, l) {
return c.getX(i < p.top + 2 || i > p.bottom - 2 ? l : i, p.half, p);
}, justify: function(c, p, i) {
return i[0] + (c.half ? -1 : 1) * (p + c.labelDistance);
}, alignToPlotEdges: function(c, p, i, l) {
return c = c.getBBox().width, p ? c + l : i - c - l;
}, alignToConnectors: function(c, p, i, l) {
var s = 0, t;
return c.forEach(function(o) {
t = o.dataLabel.getBBox().width, t > s && (s = t);
}), p ? s + l : i - s - l;
} };
N.compose = function(c) {
y.compose(W), v.indexOf(c) === -1 && (v.push(c), c = c.prototype, c.dataLabelPositioners = a, c.alignDataLabel = U, c.drawDataLabels = C, c.placeDataLabels = b, c.verifyDataLabelOverflow = w);
};
}(O || (O = {})), O;
}), E(h, "Extensions/OverlappingDataLabels.js", [h["Core/Chart/Chart.js"], h["Core/Utilities.js"]], function(y, B) {
function I(S, x) {
var d = !1;
if (S) {
var u = S.newOpacity;
S.oldOpacity !== u && (S.alignAttr && S.placed ? (S[u ? "removeClass" : "addClass"]("highcharts-data-label-hidden"), d = !0, S.alignAttr.opacity = u, S[S.isOld ? "animate" : "attr"](S.alignAttr, null, function() {
x.styledMode || S.css({ pointerEvents: u ? "auto" : "none" });
}), F(x, "afterHideOverlappingLabel")) : S.attr({ opacity: u })), S.isOld = !0;
}
return d;
}
var Z = B.addEvent, F = B.fireEvent, U = B.isArray, H = B.isNumber, W = B.objectEach, R = B.pick;
Z(y, "render", function() {
var S = this, x = [];
(this.labelCollectors || []).forEach(function(d) {
x = x.concat(d());
}), (this.yAxis || []).forEach(function(d) {
d.stacking && d.options.stackLabels && !d.options.stackLabels.allowOverlap && W(d.stacking.stacks, function(u) {
W(u, function(P) {
P.label && P.label.visibility !== "hidden" && x.push(P.label);
});
});
}), (this.series || []).forEach(function(d) {
var u = d.options.dataLabels;
d.visible && (u.enabled !== !1 || d._hasPointLabels) && (u = function(P) {
return P.forEach(function(O) {
O.visible && (U(O.dataLabels) ? O.dataLabels : O.dataLabel ? [O.dataLabel] : []).forEach(function(N) {
var C = N.options;
N.labelrank = R(C.labelrank, O.labelrank, O.shapeArgs && O.shapeArgs.height), C.allowOverlap ? (N.oldOpacity = N.opacity, N.newOpacity = 1, I(N, S)) : x.push(N);
});
});
}, u(d.nodes || []), u(d.points));
}), this.hideOverlappingLabels(x);
}), y.prototype.hideOverlappingLabels = function(S) {
var x = this, d = S.length, u = x.renderer, P, O, N, C = !1, b = function(a) {
var c, p = a.box ? 0 : a.padding || 0, i = c = 0, l;
if (a && (!a.alignAttr || a.placed)) {
var s = a.alignAttr || { x: a.attr("x"), y: a.attr("y") }, t = a.parentGroup;
a.width || (c = a.getBBox(), a.width = c.width, a.height = c.height, c = u.fontMetrics(null, a.element).h);
var o = a.width - 2 * p;
return (l = { left: "0", center: "0.5", right: "1" }[a.alignValue]) ? i = +l * o : H(a.x) && Math.round(a.x) !== a.translateX && (i = a.x - a.translateX), { x: s.x + (t.translateX || 0) + p - (i || 0), y: s.y + (t.translateY || 0) + p - c, width: a.width - 2 * p, height: a.height - 2 * p };
}
};
for (O = 0; O < d; O++)
(P = S[O]) && (P.oldOpacity = P.opacity, P.newOpacity = 1, P.absoluteBox = b(P));
for (S.sort(function(a, c) {
return (c.labelrank || 0) - (a.labelrank || 0);
}), O = 0; O < d; O++) {
var w = (b = S[O]) && b.absoluteBox;
for (P = O + 1; P < d; ++P) {
var v = (N = S[P]) && N.absoluteBox;
!w || !v || b === N || b.newOpacity === 0 || N.newOpacity === 0 || v.x >= w.x + w.width || v.x + v.width <= w.x || v.y >= w.y + w.height || v.y + v.height <= w.y || ((b.labelrank < N.labelrank ? b : N).newOpacity = 0);
}
}
S.forEach(function(a) {
I(a, x) && (C = !0);
}), C && F(x, "afterHideAllOverlappingLabels");
};
}), E(
h,
"Core/Responsive.js",
[h["Core/Utilities.js"]],
function(y) {
var B = y.extend, I = y.find, Z = y.isArray, F = y.isObject, U = y.merge, H = y.objectEach, W = y.pick, R = y.splat, S = y.uniqueKey, x;
return function(d) {
var u = [];
d.compose = function(O) {
return u.indexOf(O) === -1 && (u.push(O), B(O.prototype, P.prototype)), O;
};
var P = function() {
function O() {
}
return O.prototype.currentOptions = function(N) {
function C(v, a, c, p) {
var i;
H(v, function(l, s) {
if (!p && -1 < b.collectionsWithUpdate.indexOf(s) && a[s])
for (l = R(l), c[s] = [], i = 0; i < Math.max(l.length, a[s].length); i++)
a[s][i] && (l[i] === void 0 ? c[s][i] = a[s][i] : (c[s][i] = {}, C(l[i], a[s][i], c[s][i], p + 1)));
else
F(l) ? (c[s] = Z(l) ? [] : {}, C(l, a[s] || {}, c[s], p + 1)) : c[s] = typeof a[s] > "u" ? null : a[s];
});
}
var b = this, w = {};
return C(N, this.options, w, 0), w;
}, O.prototype.matchResponsiveRule = function(N, C) {
var b = N.condition;
(b.callback || function() {
return this.chartWidth <= W(b.maxWidth, Number.MAX_VALUE) && this.chartHeight <= W(b.maxHeight, Number.MAX_VALUE) && this.chartWidth >= W(b.minWidth, 0) && this.chartHeight >= W(b.minHeight, 0);
}).call(this) && C.push(N._id);
}, O.prototype.setResponsive = function(N, C) {
var b = this, w = this.options.responsive, v = this.currentResponsive, a = [];
!C && w && w.rules && w.rules.forEach(function(c) {
typeof c._id > "u" && (c._id = S()), b.matchResponsiveRule(c, a);
}, this), C = U.apply(void 0, a.map(function(c) {
return I((w || {}).rules || [], function(p) {
return p._id === c;
});
}).map(function(c) {
return c && c.chartOptions;
})), C.isResponsiveOptions = !0, a = a.toString() || void 0, a !== (v && v.ruleIds) && (v && this.update(v.undoOptions, N, !0), a ? (v = this.currentOptions(C), v.isResponsiveOptions = !0, this.currentResponsive = { ruleIds: a, mergedOptions: C, undoOptions: v }, this.update(C, N, !0)) : this.currentResponsive = void 0);
}, O;
}();
}(x || (x = {})), x;
}
), E(h, "masters/highcharts.src.js", [
h["Core/Globals.js"],
h["Core/Utilities.js"],
h["Core/DefaultOptions.js"],
h["Core/Animation/Fx.js"],
h["Core/Animation/AnimationUtilities.js"],
h["Core/Renderer/HTML/AST.js"],
h["Core/FormatUtilities.js"],
h["Core/Renderer/RendererUtilities.js"],
h["Core/Renderer/SVG/SVGElement.js"],
h["Core/Renderer/SVG/SVGRenderer.js"],
h["Core/Renderer/HTML/HTMLElement.js"],
h["Core/Renderer/HTML/HTMLRenderer.js"],
h["Core/Axis/Axis.js"],
h["Core/Axis/DateTimeAxis.js"],
h["Core/Axis/LogarithmicAxis.js"],
h["Core/Axis/PlotLineOrBand/PlotLineOrBand.js"],
h["Core/Axis/Tick.js"],
h["Core/Tooltip.js"],
h["Core/Series/Point.js"],
h["Core/Pointer.js"],
h["Core/MSPointer.js"],
h["Core/Legend/Legend.js"],
h["Core/Chart/Chart.js"],
h["Core/Series/Series.js"],
h["Core/Series/SeriesRegistry.js"],
h["Series/Column/ColumnSeries.js"],
h["Series/Column/ColumnDataLabel.js"],
h["Series/Pie/PieSeries.js"],
h["Series/Pie/PieDataLabel.js"],
h["Core/Series/DataLabel.js"],
h["Core/Responsive.js"],
h["Core/Color/Color.js"],
h["Core/Time.js"]
], function(y, B, I, Z, F, U, H, W, R, S, x, d, u, P, O, N, C, b, w, v, a, c, p, i, l, s, t, o, n, A, _, D, j) {
return y.animate = F.animate, y.animObject = F.animObject, y.getDeferredAnimation = F.getDeferredAnimation, y.setAnimation = F.setAnimation, y.stop = F.stop, y.timers = Z.timers, y.AST = U, y.Axis = u, y.Chart = p, y.chart = p.chart, y.Fx = Z, y.Legend = c, y.PlotLineOrBand = N, y.Point = w, y.Pointer = a.isRequired() ? a : v, y.Series = i, y.SVGElement = R, y.SVGRenderer = S, y.Tick = C, y.Time = j, y.Tooltip = b, y.Color = D, y.color = D.parse, d.compose(S), x.compose(R), y.defaultOptions = I.defaultOptions, y.getOptions = I.getOptions, y.time = I.defaultTime, y.setOptions = I.setOptions, y.dateFormat = H.dateFormat, y.format = H.format, y.numberFormat = H.numberFormat, y.addEvent = B.addEvent, y.arrayMax = B.arrayMax, y.arrayMin = B.arrayMin, y.attr = B.attr, y.clearTimeout = B.clearTimeout, y.correctFloat = B.correctFloat, y.createElement = B.createElement, y.css = B.css, y.defined = B.defined, y.destroyObjectProperties = B.destroyObjectProperties, y.discardElement = B.discardElement, y.distribute = W.distribute, y.erase = B.erase, y.error = B.error, y.extend = B.extend, y.extendClass = B.extendClass, y.find = B.find, y.fireEvent = B.fireEvent, y.getMagnitude = B.getMagnitude, y.getStyle = B.getStyle, y.inArray = B.inArray, y.isArray = B.isArray, y.isClass = B.isClass, y.isDOMElement = B.isDOMElement, y.isFunction = B.isFunction, y.isNumber = B.isNumber, y.isObject = B.isObject, y.isString = B.isString, y.keys = B.keys, y.merge = B.merge, y.normalizeTickInterval = B.normalizeTickInterval, y.objectEach = B.objectEach, y.offset = B.offset, y.pad = B.pad, y.pick = B.pick, y.pInt = B.pInt, y.relativeLength = B.relativeLength, y.removeEvent = B.removeEvent, y.seriesType = l.seriesType, y.splat = B.splat, y.stableSort = B.stableSort, y.syncTimeout = B.syncTimeout, y.timeUnits = B.timeUnits, y.uniqueKey = B.uniqueKey, y.useSerialIds = B.useSerialIds, y.wrap = B.wrap, t.compose(s), A.compose(i), P.compose(u), O.compose(u), n.compose(o), N.compose(u), _.compose(p), y;
}), h["masters/highcharts.src.js"]._modules = h, h["masters/highcharts.src.js"];
});
})(Hp);
var L0 = Hp.exports;
const to = /* @__PURE__ */ Cn(L0);
var Fp = { exports: {} };
(function(r) {
(function(f) {
r.exports ? (f.default = f, r.exports = f) : f(typeof Highcharts < "u" ? Highcharts : void 0);
})(function(f) {
function E(h, y, B, I) {
h.hasOwnProperty(y) || (h[y] = I.apply(null, B));
}
f = f ? f._modules : {}, E(f, "Extensions/Pane.js", [
f["Core/Chart/Chart.js"],
f["Series/CenteredUtilities.js"],
f["Core/Globals.js"],
f["Core/Pointer.js"],
f["Core/Utilities.js"]
], function(h, y, B, I, Z) {
function F(x, d, u) {
return Math.sqrt(Math.pow(x - u[0], 2) + Math.pow(d - u[1], 2)) <= u[2] / 2;
}
var U = Z.addEvent, H = Z.extend, W = Z.merge, R = Z.pick, S = Z.splat;
return h.prototype.collectionsWithUpdate.push("pane"), Z = function() {
function x(d, u) {
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(d, u);
}
return x.prototype.init = function(d, u) {
this.chart = u, this.background = [], u.pane.push(this), this.setOptions(d);
}, x.prototype.setOptions = function(d) {
this.options = W(this.defaultOptions, this.chart.angular ? { background: {} } : void 0, d);
}, x.prototype.render = function() {
var d = this.options, u = this.options.background, P = this.chart.renderer;
if (this.group || (this.group = P.g("pane-group").attr({ zIndex: d.zIndex || 0 }).add()), this.updateCenter(), u)
for (u = S(u), d = Math.max(u.length, this.background.length || 0), P = 0; P < d; P++)
u[P] && this.axis ? this.renderBackground(W(this.defaultBackgroundOptions, u[P]), P) : this.background[P] && (this.background[P] = this.background[P].destroy(), this.background.splice(P, 1));
}, x.prototype.renderBackground = function(d, u) {
var P = "animate", O = { class: "highcharts-pane " + (d.className || "") };
this.chart.styledMode || H(O, { fill: d.backgroundColor, stroke: d.borderColor, "stroke-width": d.borderWidth }), this.background[u] || (this.background[u] = this.chart.renderer.path().add(this.group), P = "attr"), this.background[u][P]({ d: this.axis.getPlotBandPath(d.from, d.to, d) }).attr(O);
}, x.prototype.updateCenter = function(d) {
this.center = (d || this.axis || {}).center = y.getCenter.call(this);
}, x.prototype.update = function(d, u) {
W(!0, this.options, d), this.setOptions(this.options), this.render(), this.chart.axes.forEach(function(P) {
P.pane === this && (P.pane = null, P.update({}, u));
}, this);
}, x;
}(), h.prototype.getHoverPane = function(x) {
var d = this, u;
return x && d.pane.forEach(function(P) {
var O = x.chartX - d.plotLeft, N = x.chartY - d.plotTop;
F(d.inverted ? N : O, d.inverted ? O : N, P.center) && (u = P);
}), u;
}, U(h, "afterIsInsidePlot", function(x) {
this.polar && (x.isInsidePlot = this.pane.some(function(d) {
return F(x.x, x.y, d.center);
}));
}), U(I, "beforeGetHoverData", function(x) {
var d = this.chart;
d.polar ? (d.hoverPane = d.getHoverPane(x), x.filter = function(u) {
return u.visible && !(!x.shared && u.directTouch) && R(u.options.enableMouseTracking, !0) && (!d.hoverPane || u.xAxis.pane === d.hoverPane);
}) : d.hoverPane = void 0;
}), U(
I,
"afterGetHoverData",
function(x) {
var d = this.chart;
x.hoverPoint && x.hoverPoint.plotX && x.hoverPoint.plotY && d.hoverPane && !F(x.hoverPoint.plotX, x.hoverPoint.plotY, d.hoverPane.center) && (x.hoverPoint = void 0);
}
), B.Pane = Z, B.Pane;
}), E(f, "Core/Axis/RadialAxis.js", [f["Core/Axis/AxisDefaults.js"], f["Core/DefaultOptions.js"], f["Core/Globals.js"], f["Core/Utilities.js"]], function(h, y, B, I) {
var Z = y.defaultOptions, F = B.noop, U = I.addEvent, H = I.correctFloat, W = I.defined, R = I.extend, S = I.fireEvent, x = I.merge, d = I.pick, u = I.relativeLength, P = I.wrap, O;
return function(N) {
function C() {
this.autoConnect = this.isCircular && typeof d(this.userMax, this.options.max) > "u" && H(this.endAngleRad - this.startAngleRad) === H(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 $ = this;
return function() {
if ($.isRadial && $.tickPositions && $.options.labels && $.options.labels.allowOverlap !== !0)
return $.tickPositions.map(function(q) {
return $.ticks[q] && $.ticks[q].label;
}).filter(function(q) {
return !!q;
});
};
}
function w() {
return F;
}
function v($, q, it) {
var et = this.pane.center, nt = $.value;
if (this.isCircular) {
if (W(nt))
$.point && (rt = $.point.shapeArgs || {}, rt.start && (nt = this.chart.inverted ? this.translate($.point.rectPlotY, !0) : $.point.x));
else {
var rt = $.chartX || 0, ct = $.chartY || 0;
nt = this.translate(Math.atan2(ct - it, rt - q) - this.startAngleRad, !0);
}
$ = this.getPosition(nt), rt = $.x, ct = $.y;
} else
W(nt) || (rt = $.chartX, ct = $.chartY), W(rt) && W(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 a($, q, it) {
$ = this.pane.center;
var et = this.chart, nt = this.left || 0, rt = this.top || 0, ct = d(q, $[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 + $[0], rt + $[1], ct, ct, { start: this.startAngleRad, end: this.endAngleRad, open: !0, innerR: 0 }), q.xBounds = [nt + $[0]], q.yBounds = [rt + $[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 p($, 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), lt = this.left || 0, at = this.top || 0, J = /%$/, tt = this.isCircular, st = d(nt(it.outerRadius), gt), ht = nt(it.innerRadius);
if (nt = d(nt(it.thickness), 10), this.options.gridLineInterpolation === "polygon")
dt = this.getPlotLinePath({ value: $ }).concat(this.getPlotLinePath({ value: q, reverse: !0 }));
else {
if ($ = Math.max($, this.min), q = Math.min(q, this.max), $ = this.translate($), q = this.translate(q), tt || (st = $ || 0, ht = q || 0), it.shape !== "circle" && tt)
it = ct + ($ || 0), ct += q || 0;
else {
it = -Math.PI / 2, ct = 1.5 * Math.PI;
var pt = !0;
}
st -= dt, dt = et.renderer.symbols.arc(lt + rt[0], at + rt[1], st, st, { start: Math.min(it, ct), end: Math.max(it, ct), innerR: d(ht, st - (nt - dt)), open: pt }), tt && (tt = (ct + it) / 2, lt = lt + rt[0] + rt[2] / 2 * Math.cos(tt), dt.xBounds = tt > -Math.PI / 2 && tt < Math.PI / 2 ? [lt, et.plotWidth] : [0, lt], 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($) {
var q = this, it = this.pane.center, et = this.chart, nt = et.inverted, rt = $.reverse, ct = this.pane.options.background ? this.pane.options.background[0] || this.pane.options.background : {}, gt = ct.innerRadius || "0%", dt = ct.outerRadius || "100%", lt = it[0] + et.plotLeft, at = it[1] + et.plotTop, J = this.height, tt = $.isCrosshair;
ct = it[3] / 2;
var st = $.value, ht, pt = this.getPosition(st), yt = pt.x;
if (pt = pt.y, tt && (pt = this.getCrosshairPosition($, lt, at), st = pt[0], yt = pt[1], pt = pt[2]), this.isCircular)
st = Math.sqrt(Math.pow(yt - lt, 2) + Math.pow(pt - at, 2)), rt = typeof gt == "string" ? u(gt, 1) : gt / st, et = typeof dt == "string" ? u(dt, 1) : dt / st, it && ct && (ct /= st, rt < ct && (rt = ct), et < ct && (et = ct)), it = [["M", lt + rt * (yt - lt), at - rt * (at - pt)], ["L", yt - (1 - et) * (yt - lt), pt + (1 - et) * (at - pt)]];
else if ((st = this.translate(st)) && (0 > st || st > J) && (st = 0), this.options.gridLineInterpolation === "circle")
it = this.getLinePath(0, st, ct);
else if (it = [], et[nt ? "yAxis" : "xAxis"].forEach(function(vt) {
vt.pane === q.pane && (ht = vt);
}), ht)
for (lt = ht.tickPositions, ht.autoConnect && (lt = lt.concat([lt[0]])), rt && (lt = lt.slice().reverse()), st && (st += ct), at = 0; at < lt.length; at++)
ct = ht.getPosition(lt[at], st), it.push(at ? ["L", ct.x, ct.y] : ["M", ct.x, ct.y]);
return it;
}
function l($, q) {
return $ = this.translate($), this.postTranslate(this.isCircular ? $ : this.angleRad, d(this.isCircular ? q : 0 > $ ? 0 : $, this.center[2] / 2) - this.offset);
}
function s() {
var $ = this.center, q = this.chart, it = this.options.title;
return { x: q.plotLeft + $[0] + (it.x || 0), y: q.plotTop + $[1] - { high: 0.5, middle: 0.25, low: 0 }[it.align] * $[2] + (it.y || 0) };
}
function t($) {
$.beforeSetTickPositions = C, $.createLabelCollector = b, $.getCrosshairPosition = v, $.getLinePath = a, $.getOffset = c, $.getPlotBandPath = p, $.getPlotLinePath = i, $.getPosition = l, $.getTitlePosition = s, $.postTranslate = X, $.setAxisSize = m, $.setAxisTranslation = L, $.setOptions = Y;
}
function o() {
var $ = this.chart, q = this.options, it = this.pane, et = it && it.options;
$.angular && this.isXAxis || !it || !$.angular && !$.polar || (this.angleRad = (q.angle || 0) * Math.PI / 180, this.startAngleRad = (et.startAngle - 90) * Math.PI / 180, this.endAngleRad = (d(et.endAngle, et.startAngle + 360) - 90) * Math.PI / 180, this.offset = q.offset || 0);
}
function n($) {
this.isRadial && ($.align = void 0, $.preventDefault());
}
function A() {
if (this.chart && this.chart.labelCollectors) {
var $ = this.labelCollector ? this.chart.labelCollectors.indexOf(this.labelCollector) : -1;
0 <= $ && this.chart.labelCollectors.splice($, 1);
}
}
function _($) {
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;
$ = $.userOptions.pane || 0, $ = this.pane = q.pane && q.pane[$];
var lt;
ct === "colorAxis" ? this.isRadial = !1 : (et ? (gt ? (this.isHidden = !0, this.createLabelCollector = w, this.getOffset = F, this.render = this.redraw = g, this.setTitle = this.setCategories = this.setScale = F) : t(this), (lt = !rt) && (this.defaultPolarOptions = G)) : nt && (t(this), this.defaultPolarOptions = (lt = this.horiz) ? k : x(ct === "xAxis" ? h.defaultXAxisOptions : h.defaultYAxisOptions, z), it && ct === "yAxis" && (this.defaultPolarOptions.stackLabels = h.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, $ && lt && ($.axis = this), this.isCircular = lt);
}
function D() {
this.isRadial && this.beforeSetTickPositions();
}
function j($) {
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 = W(nt.y) ? 0 : 0.3 * -et.height, dt = nt.y, lt = 20, at = nt.align, J = "end", tt = 0 > ct ? ct + 360 : ct, st = tt, ht = 0, pt = 0;
if (it.isRadial) {
var yt = it.getPosition(this.pos, it.center[2] / 2 + u(d(nt.distance, -25), it.center[2] / 2, -it.center[2] / 2));
nt.rotation === "auto" ? q.attr({ rotation: rt }) : W(dt) || (dt = it.chart.renderer.fontMetrics(q.styles && q.styles.fontSize).b - et.height / 2), W(at) || (it.isCircular ? (et.width > it.len * it.tickInterval / (it.max - it.min) && (lt = 0), at = rt > lt && rt < 180 - lt ? "left" : rt > 180 + lt && rt < 360 - lt ? "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 < st && 360 >= st && (st = 360 - st), (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 < st && 110 > st && (at = "center"), 15 > tt || 180 <= tt && 195 > tt ? ht = 0.3 * et.height : 15 <= tt && 35 >= tt ? ht = J === "start" ? 0 : 0.75 * et.height : 195 <= tt && 215 >= tt ? ht = J === "start" ? 0.75 * et.height : 0 : 35 < tt && 90 >= tt ? ht = J === "start" ? 0.25 * -et.height : et.height : 215 < tt && 270 >= tt && (ht = J === "start" ? et.height : 0.25 * -et.height), 15 > st ? pt = J === "start" ? 0.15 * -et.height : 0.15 * et.height : 165 < st && 180 >= st && (pt = J === "start" ? 0.15 * et.height : 0.15 * -et.height), q.attr({ align: at }), q.translate(
pt,
ht + gt
)), $.pos.x = yt.x + (nt.x || 0), $.pos.y = yt.y + (dt || 0);
}
}
}
function T($) {
this.axis.getPosition && R($.pos, this.axis.getPosition(this.pos));
}
function X($, q) {
var it = this.chart, et = this.center;
return $ = this.startAngleRad + $, { x: it.plotLeft + et[0] + Math.cos($) * q, y: it.plotTop + et[1] + Math.sin($) * q };
}
function g() {
this.isDirty = !1;
}
function m() {
if (this.constructor.prototype.setAxisSize.call(this), this.isRadial) {
this.pane.updateCenter(this);
var $ = this.center = this.pane.center.slice();
if (this.isCircular)
this.sector = this.endAngleRad - this.startAngleRad;
else {
var q = this.postTranslate(this.angleRad, $[3] / 2);
$[0] = q.x - this.chart.plotLeft, $[1] = q.y - this.chart.plotTop;
}
this.len = this.width = this.height = ($[2] - $[3]) * d(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 Y($) {
$ = this.options = x(this.constructor.defaultOptions, this.defaultPolarOptions, Z[this.coll], $), $.plotBands || ($.plotBands = []), S(this, "afterSetOptions");
}
function V($, q, it, et, nt, rt, ct) {
var gt = this.axis;
return gt.isRadial ? ($ = gt.getPosition(this.pos, gt.center[2] / 2 + et), q = ["M", q, it, "L", $.x, $.y]) : q = $.call(this, q, it, et, nt, rt, ct), q;
}
var Q = [], k = { gridLineWidth: 1, labels: { align: void 0, distance: 15, x: 0, y: void 0, style: { textOverflow: "none" } }, maxPadding: 0, minPadding: 0, showLastLabel: !1, tickLength: 0 }, G = {
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
}, z = { gridLineInterpolation: "circle", gridLineWidth: 1, labels: { align: "right", x: -3, y: -2 }, showLastLabel: !1, title: { x: 4, text: null, rotation: 90 } };
N.compose = function($, q) {
return Q.indexOf($) === -1 && (Q.push($), U($, "afterInit", o), U($, "autoLabelAlign", n), U($, "destroy", A), U($, "init", _), U($, "initialAxisTranslation", D)), Q.indexOf(q) === -1 && (Q.push(q), U(
q,
"afterGetLabelPosition",
j
), U(q, "afterGetPosition", T), P(q.prototype, "getMarkPath", V)), $;
};
}(O || (O = {})), O;
}), E(f, "Series/AreaRange/AreaRangePoint.js", [f["Series/Area/AreaSeries.js"], f["Core/Series/Point.js"], f["Core/Utilities.js"]], function(h, y, B) {
var I = this && this.__extends || function() {
var H = function(W, R) {
return H = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(S, x) {
S.__proto__ = x;
} || function(S, x) {
for (var d in x)
x.hasOwnProperty(d) && (S[d] = x[d]);
}, H(W, R);
};
return function(W, R) {
function S() {
this.constructor = W;
}
H(W, R), W.prototype = R === null ? Object.create(R) : (S.prototype = R.prototype, new S());
};
}(), Z = y.prototype, F = B.defined, U = B.isNumber;
return function(H) {
function W() {
var R = H !== null && H.apply(this, arguments) || this;
return R.high = void 0, R.low = void 0, R.options = void 0, R.plotHigh = void 0, R.plotLow = void 0, R.plotHighX = void 0, R.plotLowX = void 0, R.plotX = void 0, R.series = void 0, R;
}
return I(W, H), W.prototype.setState = function() {
var R = this.state, S = this.series, x = S.chart.polar;
F(this.plotHigh) || (this.plotHigh = S.yAxis.toPixels(
this.high,
!0
)), F(this.plotLow) || (this.plotLow = this.plotY = S.yAxis.toPixels(this.low, !0)), S.stateMarkerGraphic && (S.lowerStateMarkerGraphic = S.stateMarkerGraphic, S.stateMarkerGraphic = S.upperStateMarkerGraphic), this.graphic = this.upperGraphic, this.plotY = this.plotHigh, x && (this.plotX = this.plotHighX), Z.setState.apply(this, arguments), this.state = R, this.plotY = this.plotLow, this.graphic = this.lowerGraphic, x && (this.plotX = this.plotLowX), S.stateMarkerGraphic && (S.upperStateMarkerGraphic = S.stateMarkerGraphic, S.stateMarkerGraphic = S.lowerStateMarkerGraphic, S.lowerStateMarkerGraphic = void 0), Z.setState.apply(this, arguments);
}, W.prototype.haloPath = function() {
var R = this.series.chart.polar, S = [];
return this.plotY = this.plotLow, R && (this.plotX = this.plotLowX), this.isInside && (S = Z.haloPath.apply(this, arguments)), this.plotY = this.plotHigh, R && (this.plotX = this.plotHighX), this.isTopInside && (S = S.concat(Z.haloPath.apply(this, arguments))), S;
}, W.prototype.isValid = function() {
return U(this.low) && U(this.high);
}, W;
}(h.prototype.pointClass);
}), E(
f,
"Series/AreaRange/AreaRangeSeries.js",
[f["Series/AreaRange/AreaRangePoint.js"], f["Series/Area/AreaSeries.js"], f["Series/Column/ColumnSeries.js"], f["Core/Globals.js"], f["Core/Series/Series.js"], f["Core/Series/SeriesRegistry.js"], f["Core/Utilities.js"]],
function(h, y, B, I, Z, F, U) {
var H = this && this.__extends || function() {
var N = function(C, b) {
return N = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(w, v) {
w.__proto__ = v;
} || function(w, v) {
for (var a in v)
v.hasOwnProperty(a) && (w[a] = v[a]);
}, N(C, b);
};
return function(C, b) {
function w() {
this.constructor = C;
}
N(C, b), C.prototype = b === null ? Object.create(b) : (w.prototype = b.prototype, new w());
};
}(), W = y.prototype, R = B.prototype;
B = I.noop;
var S = Z.prototype, x = U.defined, d = U.extend, u = U.isArray, P = U.pick, O = U.merge;
return Z = function(N) {
function C() {
var b = N !== null && N.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 H(C, N), C.prototype.toYData = function(b) {
return [b.low, b.high];
}, C.prototype.highToXY = function(b) {
var w = this.chart, v = this.xAxis.postTranslate(b.rectPlotX || 0, this.yAxis.len - b.plotHigh);
b.plotHighX = v.x - w.plotLeft, b.plotHigh = v.y - w.plotTop, b.plotLowX = b.plotX;
}, C.prototype.translate = function() {
var b = this, w = b.yAxis;
W.translate.apply(b), b.points.forEach(function(v) {
var a = v.high, c = v.plotY;
v.isNull ? v.plotY = null : (v.plotLow = c, v.plotHigh = w.translate(b.dataModify ? b.dataModify.modifyValue(a) : a, 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];
});
}, C.prototype.getGraphPath = function(b) {
var w = [], v = [], a, c = W.getGraphPath, p = this.options, i = this.chart.polar, l = i && p.connectEnds !== !1, s = p.connectNulls, t = p.step;
for (b = b || this.points, a = b.length; a--; ) {
var o = b[a], n = i ? { plotX: o.rectPlotX, plotY: o.yBottom, doCurve: !1 } : { plotX: o.plotX, plotY: o.plotY, doCurve: !1 };
o.isNull || l || s || b[a + 1] && !b[a + 1].isNull || v.push(n);
var A = { polarPlotY: o.polarPlotY, rectPlotX: o.rectPlotX, yBottom: o.yBottom, plotX: P(
o.plotHighX,
o.plotX
), plotY: o.plotHigh, isNull: o.isNull };
v.push(A), w.push(A), o.isNull || l || s || b[a - 1] && !b[a - 1].isNull || v.push(n);
}
return b = c.call(this, b), t && (t === !0 && (t = "left"), p.step = { left: "right", center: "center", right: "left" }[t]), w = c.call(this, w), v = c.call(this, v), p.step = t, p = [].concat(b, w), !this.chart.polar && v[0] && v[0][0] === "M" && (v[0] = ["L", v[0][1], v[0][2]]), this.graphPath = p, this.areaPath = b.concat(v), p.isArea = !0, p.xMap = b.xMap, this.areaPath.xMap = b.xMap, p;
}, C.prototype.drawDataLabels = function() {
var b = this.points, w = b.length, v, a = [], c = this.options.dataLabels, p, i = this.chart.inverted;
if (c) {
if (u(c))
var l = c[0] || { enabled: !1 }, s = c[1] || { enabled: !1 };
else
l = d({}, c), l.x = c.xHigh, l.y = c.yHigh, s = d({}, c), s.x = c.xLow, s.y = c.yLow;
if (l.enabled || this._hasPointLabels) {
for (v = w; v--; )
if (p = b[v]) {
var t = l.inside ? p.plotHigh < p.plotLow : p.plotHigh > p.plotLow;
p.y = p.high, p._plotY = p.plotY, p.plotY = p.plotHigh, a[v] = p.dataLabel, p.dataLabel = p.dataLabelUpper, p.below = t, i ? l.align || (l.align = t ? "right" : "left") : l.verticalAlign || (l.verticalAlign = t ? "top" : "bottom");
}
for (this.options.dataLabels = l, S.drawDataLabels && S.drawDataLabels.apply(this, arguments), v = w; v--; )
(p = b[v]) && (p.dataLabelUpper = p.dataLabel, p.dataLabel = a[v], delete p.dataLabels, p.y = p.low, p.plotY = p._plotY);
}
if (s.enabled || this._hasPointLabels) {
for (v = w; v--; )
(p = b[v]) && (t = s.inside ? p.plotHigh < p.plotLow : p.plotHigh > p.plotLow, p.below = !t, i ? s.align || (s.align = t ? "left" : "right") : s.verticalAlign || (s.verticalAlign = t ? "bottom" : "top"));
this.options.dataLabels = s, S.drawDataLabels && S.drawDataLabels.apply(this, arguments);
}
if (l.enabled)
for (v = w; v--; )
(p = b[v]) && (p.dataLabels = [p.dataLabelUpper, p.dataLabel].filter(function(o) {
return !!o;
}));
this.options.dataLabels = c;
}
}, C.prototype.alignDataLabel = function() {
R.alignDataLabel.apply(this, arguments);
}, C.prototype.drawPoints = function() {
var b = this.points.length, w;
for (S.drawPoints.apply(this, arguments), w = 0; w < b; ) {
var v = this.points[w];
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 = P(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), w++;
}
for (S.drawPoints.apply(this, arguments), w = 0; w < b; )
v = this.points[w], v.upperGraphic = v.graphic, v.graphic = v.lowerGraphic, v.origProps && (d(v, v.origProps), delete v.origProps), w++;
}, C.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 }
}), C;
}(y), d(Z.prototype, { pointArrayMap: ["low", "high"], pointValKey: "low", deferTranslatePolar: !0, pointClass: h, setStackedPoints: B }), F.registerSeriesType("arearange", Z), Z;
}
), E(f, "Series/AreaSplineRange/AreaSplineRangeSeries.js", [
f["Series/AreaRange/AreaRangeSeries.js"],
f["Core/Series/SeriesRegistry.js"],
f["Core/Utilities.js"]
], function(h, y, B) {
var I = this && this.__extends || function() {
var H = function(W, R) {
return H = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(S, x) {
S.__proto__ = x;
} || function(S, x) {
for (var d in x)
x.hasOwnProperty(d) && (S[d] = x[d]);
}, H(W, R);
};
return function(W, R) {
function S() {
this.constructor = W;
}
H(W, R), W.prototype = R === null ? Object.create(R) : (S.prototype = R.prototype, new S());
};
}(), Z = y.seriesTypes.spline, F = B.merge;
B = B.extend;
var U = function(H) {
function W() {
var R = H !== null && H.apply(this, arguments) || this;
return R.options = void 0, R.data = void 0, R.points = void 0, R;
}
return I(W, H), W.defaultOptions = F(h.defaultOptions), W;
}(h);
return B(U.prototype, { getPointSpline: Z.prototype.getPointSpline }), y.registerSeriesType("areasplinerange", U), U;
}), E(f, "Series/BoxPlot/BoxPlotSeries.js", [f["Series/Column/ColumnSeries.js"], f["Core/Globals.js"], f["Core/Series/SeriesRegistry.js"], f["Core/Utilities.js"]], function(h, y, B, I) {
var Z = this && this.__extends || function() {
var W = function(R, S) {
return W = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(x, d) {
x.__proto__ = d;
} || function(x, d) {
for (var u in d)
d.hasOwnProperty(u) && (x[u] = d[u]);
}, W(R, S);
};
return function(R, S) {
function x() {
this.constructor = R;
}
W(R, S), R.prototype = S === null ? Object.create(S) : (x.prototype = S.prototype, new x());
};
}();
y = y.noop;
var F = I.extend, U = I.merge, H = I.pick;
return I = function(W) {
function R() {
var S = W !== null && W.apply(this, arguments) || this;
return S.data = void 0, S.options = void 0, S.points = void 0, S;
}
return Z(R, W), R.prototype.pointAttribs = function() {
return {};
}, R.prototype.translate = function() {
var S = this.yAxis, x = this.pointArrayMap;
W.prototype.translate.apply(this), this.points.forEach(function(d) {
x.forEach(function(u) {
d[u] !== null && (d[u + "Plot"] = S.translate(d[u], 0, 1, 0, 1));
}), d.plotHigh = d.highPlot;
});
}, R.prototype.drawPoints = function() {
var S = this, x = S.options, d = S.chart, u = d.renderer, P, O, N, C, b, w, v = 0, a, c, p, i, l = S.doQuartiles !== !1, s, t = S.options.whiskerLength;
S.points.forEach(function(o) {
var n = o.graphic, A = n ? "animate" : "attr", _ = o.shapeArgs, D = {}, j = {}, T = {}, X = {}, g = o.color || S.color;
typeof o.plotY < "u" && (a = Math.round(_.width), c = Math.floor(_.x), p = c + a, i = Math.round(a / 2), P = Math.floor(l ? o.q1Plot : o.lowPlot), O = Math.floor(l ? o.q3Plot : o.lowPlot), N = Math.floor(o.highPlot), C = Math.floor(o.lowPlot), n || (o.graphic = n = u.g("point").add(S.group), o.stem = u.path().addClass("highcharts-boxplot-stem").add(n), t && (o.whiskers = u.path().addClass("highcharts-boxplot-whisker").add(n)), l && (o.box = u.path(void 0).addClass("highcharts-boxplot-box").add(n)), o.medianShape = u.path(void 0).addClass("highcharts-boxplot-median").add(n)), d.styledMode || (j.stroke = o.stemColor || x.stemColor || g, j["stroke-width"] = H(o.stemWidth, x.stemWidth, x.lineWidth), j.dashstyle = o.stemDashStyle || x.stemDashStyle || x.dashStyle, o.stem.attr(j), t && (T.stroke = o.whiskerColor || x.whiskerColor || g, T["stroke-width"] = H(o.whiskerWidth, x.whiskerWidth, x.lineWidth), T.dashstyle = o.whiskerDashStyle || x.whiskerDashStyle || x.dashStyle, o.whiskers.attr(T)), l && (D.fill = o.fillColor || x.fillColor || g, D.stroke = x.lineColor || g, D["stroke-width"] = x.lineWidth || 0, D.dashstyle = o.boxDashStyle || x.boxDashStyle || x.dashStyle, o.box.attr(D)), X.stroke = o.medianColor || x.medianColor || g, X["stroke-width"] = H(o.medianWidth, x.medianWidth, x.lineWidth), X.dashstyle = o.medianDashStyle || x.medianDashStyle || x.dashStyle, o.medianShape.attr(X)), w = o.stem.strokeWidth() % 2 / 2, v = c + i + w, n = [["M", v, O], ["L", v, N], ["M", v, P], ["L", v, C]], o.stem[A]({ d: n }), l && (w = o.box.strokeWidth() % 2 / 2, P = Math.floor(P) + w, O = Math.floor(O) + w, c += w, p += w, n = [["M", c, O], ["L", c, P], ["L", p, P], ["L", p, O], ["L", c, O], ["Z"]], o.box[A]({ d: n })), t && (w = o.whiskers.strokeWidth() % 2 / 2, N += w, C += w, s = /%$/.test(t) ? i * parseFloat(t) / 100 : t / 2, n = [["M", v - s, N], ["L", v + s, N], ["M", v - s, C], ["L", v + s, C]], o.whiskers[A]({ d: n })), b = Math.round(o.medianPlot), w = o.medianShape.strokeWidth() % 2 / 2, b += w, n = [["M", c, b], ["L", p, b]], o.medianShape[A]({ d: n }));
});
}, R.prototype.toYData = function(S) {
return [S.low, S.q1, S.median, S.q3, S.high];
}, R.defaultOptions = U(h.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
}), R;
}(h), F(I.prototype, { pointArrayMap: ["low", "q1", "median", "q3", "high"], pointValKey: "high", drawDataLabels: y, setStackedPoints: y }), B.registerSeriesType("boxplot", I), I;
}), E(f, "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 };
}), E(f, "Series/Bubble/BubbleLegendItem.js", [f["Core/Color/Color.js"], f["Core/FormatUtilities.js"], f["Core/Globals.js"], f["Core/Utilities.js"]], function(h, y, B, I) {
var Z = h.parse, F = B.noop, U = I.arrayMax, H = I.arrayMin, W = I.isNumber, R = I.merge, S = I.pick, x = I.stableSort;
return function() {
function d(u, P) {
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 = F, this.init(u, P);
}
return d.prototype.init = function(u, P) {
this.options = u, this.visible = !0, this.chart = P.chart, this.legend = P;
}, d.prototype.addToLegend = function(u) {
u.splice(
this.options.legendIndex,
0,
this
);
}, d.prototype.drawLegendSymbol = function(u) {
var P = this.chart, O = this.options, N = S(u.options.itemDistance, 20), C = O.ranges, b = O.connectorDistance;
this.fontMetrics = P.renderer.fontMetrics(O.labels.style.fontSize), C && C.length && W(C[0].value) ? (x(C, function(w, v) {
return v.value - w.value;
}), this.ranges = C, this.setOptions(), this.render(), u = this.getMaxLabelSize(), C = this.ranges[0].radius, P = 2 * C, b = b - C + u.width, b = 0 < b ? b : 0, this.maxLabel = u, this.movementX = O.labels.align === "left" ? b : 0, this.legendItemWidth = P + b + N, this.legendItemHeight = P + this.fontMetrics.h / 2) : u.options.bubbleLegend.autoRanges = !0;
}, d.prototype.setOptions = function() {
var u = this.ranges, P = this.options, O = this.chart.series[P.seriesIndex], N = this.legend.baseline, C = { zIndex: P.zIndex, "stroke-width": P.borderWidth }, b = { zIndex: P.zIndex, "stroke-width": P.connectorWidth }, w = { align: this.legend.options.rtl || P.labels.align === "left" ? "right" : "left", zIndex: P.zIndex }, v = O.options.marker.fillOpacity, a = this.chart.styledMode;
u.forEach(function(c, p) {
a || (C.stroke = S(c.borderColor, P.borderColor, O.color), C.fill = S(c.color, P.color, v !== 1 ? Z(O.color).setOpacity(v).get("rgba") : O.color), b.stroke = S(c.connectorColor, P.connectorColor, O.color)), u[p].radius = this.getRangeRadius(c.value), u[p] = R(u[p], { center: u[0].radius - u[p].radius + N }), a || R(!0, u[p], { bubbleAttribs: R(C), connectorAttribs: R(b), labelAttribs: w });
}, this);
}, d.prototype.getRangeRadius = function(u) {
var P = this.options;
return this.chart.series[this.options.seriesIndex].getRadius.call(
this,
P.ranges[P.ranges.length - 1].value,
P.ranges[0].value,
P.minSize,
P.maxSize,
u
);
}, d.prototype.render = function() {
var u = this.chart.renderer, P = this.options.zThreshold;
this.symbols || (this.symbols = { connectors: [], bubbleItems: [], labels: [] }), this.legendSymbol = u.g("bubble-legend"), this.legendItem = u.g("bubble-legend-item"), this.legendSymbol.translateX = 0, this.legendSymbol.translateY = 0, this.ranges.forEach(function(O) {
O.value >= P && this.renderRange(O);
}, this), this.legendSymbol.add(this.legendItem), this.legendItem.add(this.legendGroup), this.hideOverlappingLabels();
}, d.prototype.renderRange = function(u) {
var P = this.options, O = P.labels, N = this.chart, C = N.series[P.seriesIndex], b = N.renderer, w = this.symbols;
N = w.labels;
var v = u.center, a = Math.abs(u.radius), c = P.connectorDistance || 0, p = O.align, i = P.connectorWidth, l = this.ranges[0].radius || 0, s = v - a - P.borderWidth / 2 + i / 2, t = this.fontMetrics;
t = t.f / 2 - (t.h - t.f) / 2;
var o = b.styledMode;
c = this.legend.options.rtl || p === "left" ? -c : c, p === "center" && (c = 0, P.connectorDistance = 0, u.labelAttribs.align = "center"), p = s + P.labels.y;
var n = l + c + P.labels.x;
w.bubbleItems.push(b.circle(
l,
v + ((s % 1 ? 1 : 0.5) - (i % 2 ? 0 : 0.5)),
a
).attr(o ? {} : u.bubbleAttribs).addClass((o ? "highcharts-color-" + C.colorIndex + " " : "") + "highcharts-bubble-legend-symbol " + (P.className || "")).add(this.legendSymbol)), w.connectors.push(b.path(b.crispLine([["M", l, s], ["L", l + c, s]], P.connectorWidth)).attr(o ? {} : u.connectorAttribs).addClass((o ? "highcharts-color-" + this.options.seriesIndex + " " : "") + "highcharts-bubble-legend-connectors " + (P.connectorClassName || "")).add(this.legendSymbol)), u = b.text(this.formatLabel(u), n, p + t).attr(o ? {} : u.labelAttribs).css(o ? {} : O.style).addClass("highcharts-bubble-legend-labels " + (P.labels.className || "")).add(this.legendSymbol), N.push(u), u.placed = !0, u.alignAttr = { x: n, y: p + t };
}, d.prototype.getMaxLabelSize = function() {
var u, P;
return this.symbols.labels.forEach(function(O) {
P = O.getBBox(!0), u = u ? P.width > u.width ? P : u : P;
}), u || {};
}, d.prototype.formatLabel = function(u) {
var P = this.options, O = P.labels.formatter;
P = P.labels.format;
var N = this.chart.numberFormatter;
return P ? y.format(P, u) : O ? O.call(u) : N(u.value, 1);
}, d.prototype.hideOverlappingLabels = function() {
var u = this.chart, P = this.symbols;
!this.options.labels.allowOverlap && P && (u.hideOverlappingLabels(P.labels), P.labels.forEach(function(O, N) {
O.newOpacity ? O.newOpacity !== O.oldOpacity && P.connectors[N].show() : P.connectors[N].hide();
}));
}, d.prototype.getRanges = function() {
var u = this.legend.bubbleLegend, P = u.options.ranges, O, N = Number.MAX_VALUE, C = -Number.MAX_VALUE;
u.chart.series.forEach(function(w) {
w.isBubble && !w.ignoreSeries && (O = w.zData.filter(W), O.length && (N = S(w.options.zMin, Math.min(N, Math.max(
H(O),
w.options.displayNegative === !1 ? w.options.zThreshold : -Number.MAX_VALUE
))), C = S(w.options.zMax, Math.max(C, U(O)))));
});
var b = N === C ? [{ value: C }] : [{ value: N }, { value: (N + C) / 2 }, { value: C, autoRanges: !0 }];
return P.length && P[0].radius && b.reverse(), b.forEach(function(w, v) {
P && P[v] && (b[v] = R(P[v], w));
}), b;
}, d.prototype.predictBubbleSizes = function() {
var u = this.chart, P = this.fontMetrics, O = u.legend.options, N = O.floating, C = (O = O.layout === "horizontal") ? u.legend.lastLineHeight : 0, b = u.plotSizeX, w = u.plotSizeY, v = u.series[this.options.seriesIndex], a = v.getPxExtremes();
u = Math.ceil(a.minPxSize), a = Math.ceil(a.maxPxSize);
var c = Math.min(w, b);
return v = v.options.maxSize, N || !/%$/.test(v) ? P = a : (v = parseFloat(v), P = (c + C - P.h / 2) * v / 100 / (v / 100 + 1), (O && w - P >= b || !O && b - P >= w) && (P = a)), [u, Math.ceil(P)];
}, d.prototype.updateRanges = function(u, P) {
var O = this.legend.options.bubbleLegend;
O.minSize = u, O.maxSize = P, O.ranges = this.getRanges();
}, d.prototype.correctSizes = function() {
var u = this.legend, P = this.chart.series[this.options.seriesIndex].getPxExtremes();
1 < Math.abs(Math.ceil(P.maxPxSize) - this.options.maxSize) && (this.updateRanges(this.options.minSize, P.maxPxSize), u.render());
}, d;
}();
}), E(f, "Series/Bubble/BubbleLegendComposition.js", [f["Series/Bubble/BubbleLegendDefaults.js"], f["Series/Bubble/BubbleLegendItem.js"], f["Core/DefaultOptions.js"], f["Core/Utilities.js"]], function(h, y, B, I) {
var Z = B.setOptions, F = I.addEvent, U = I.objectEach, H = I.wrap, W;
return function(R) {
function S(C, b, w) {
var v = this.legend, a = 0 <= x(this);
if (v && v.options.enabled && v.bubbleLegend && v.options.bubbleLegend.autoRanges && a) {
var c = v.bubbleLegend.options;
a = v.bubbleLegend.predictBubbleSizes(), v.bubbleLegend.updateRanges(a[0], a[1]), c.placed || (v.group.placed = !1, v.allItems.forEach(function(p) {
p.legendGroup.translateY = null;
})), v.render(), this.getMargins(), this.axes.forEach(function(p) {
p.visible && p.render(), c.placed || (p.setScale(), p.updateNames(), U(p.ticks, function(i) {
i.isNew = !0, i.isNewLabel = !0;
}));
}), c.placed = !0, this.getMargins(), C.call(this, b, w), v.bubbleLegend.correctSizes(), O(v, d(v));
} else
C.call(this, b, w), v && v.options.enabled && v.bubbleLegend && (v.render(), O(v, d(v)));
}
function x(C) {
C = C.series;
for (var b = 0; b < C.length; ) {
if (C[b] && C[b].isBubble && C[b].visible && C[b].zData.length)
return b;
b++;
}
return -1;
}
function d(C) {
C = C.allItems;
var b = [], w = C.length, v, a = 0;
for (v = 0; v < w; v++)
if (C[v].legendItemHeight && (C[v].itemHeight = C[v].legendItemHeight), C[v] === C[w - 1] || C[v + 1] && C[v]._legendItemPos[1] !== C[v + 1]._legendItemPos[1]) {
b.push({ height: 0 });
var c = b[b.length - 1];
for (a; a <= v; a++)
C[a].itemHeight > c.height && (c.height = C[a].itemHeight);
c.step = v;
}
return b;
}
function u(C) {
var b = this.bubbleLegend, w = this.options, v = w.bubbleLegend, a = x(this.chart);
b && b.ranges && b.ranges.length && (v.ranges.length && (v.autoRanges = !!v.ranges[0].autoRanges), this.destroyItem(b)), 0 <= a && w.enabled && v.enabled && (v.seriesIndex = a, this.bubbleLegend = new y(v, this), this.bubbleLegend.addToLegend(C.allItems));
}
function P() {
var C = this.chart, b = this.visible, w = this.chart.legend;
w && w.bubbleLegend && (this.visible = !b, this.ignoreSeries = b, C = 0 <= x(C), w.bubbleLegend.visible !== C && (w.update({ bubbleLegend: { enabled: C } }), w.bubbleLegend.visible = C), this.visible = b);
}
function O(C, b) {
var w = C.options.rtl, v, a, c, p = 0;
C.allItems.forEach(function(i, l) {
v = i.legendGroup.translateX, a = i._legendItemPos[1], ((c = i.movementX) || w && i.ranges) && (c = w ? v - i.options.maxSize / 2 : v + c, i.legendGroup.attr({ translateX: c })), l > b[p].step && p++, i.legendGroup.attr({ translateY: Math.round(a + b[p].height / 2) }), i._legendItemPos[1] = a + b[p].height / 2;
});
}
var N = [];
R.compose = function(C, b, w) {
N.indexOf(C) === -1 && (N.push(C), Z({ legend: { bubbleLegend: h } }), H(C.prototype, "drawChartBox", S)), N.indexOf(b) === -1 && (N.push(b), F(b, "afterGetAllItems", u)), N.indexOf(w) === -1 && (N.push(w), F(w, "legendItemClick", P));
};
}(W || (W = {})), W;
}), E(f, "Series/Bubble/BubblePoint.js", [f["Core/Series/Point.js"], f["Core/Series/SeriesRegistry.js"], f["Core/Utilities.js"]], function(h, y, B) {
var I = this && this.__extends || function() {
var Z = function(F, U) {
return Z = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(H, W) {
H.__proto__ = W;
} || function(H, W) {
for (var R in W)
W.hasOwnProperty(R) && (H[R] = W[R]);
}, Z(F, U);
};
return function(F, U) {
function H() {
this.constructor = F;
}
Z(F, U), F.prototype = U === null ? Object.create(U) : (H.prototype = U.prototype, new H());
};
}();
return B = B.extend, y = function(Z) {
function F() {
var U = Z !== null && Z.apply(this, arguments) || this;
return U.options = void 0, U.series = void 0, U;
}
return I(F, Z), F.prototype.haloPath = function(U) {
return h.prototype.haloPath.call(this, U === 0 ? 0 : (this.marker && this.marker.radius || 0) + U);
}, F;
}(y.seriesTypes.scatter.prototype.pointClass), B(y.prototype, { ttBelow: !1 }), y;
}), E(f, "Series/Bubble/BubbleSeries.js", [
f["Core/Axis/Axis.js"],
f["Series/Bubble/BubbleLegendComposition.js"],
f["Series/Bubble/BubblePoint.js"],
f["Core/Color/Color.js"],
f["Core/Globals.js"],
f["Core/Series/Series.js"],
f["Core/Series/SeriesRegistry.js"],
f["Core/Utilities.js"]
], function(h, y, B, I, Z, F, U, H) {
var W = this && this.__extends || function() {
var w = function(v, a) {
return w = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(c, p) {
c.__proto__ = p;
} || function(c, p) {
for (var i in p)
p.hasOwnProperty(i) && (c[i] = p[i]);
}, w(v, a);
};
return function(v, a) {
function c() {
this.constructor = v;
}
w(v, a), v.prototype = a === null ? Object.create(a) : (c.prototype = a.prototype, new c());
};
}(), R = I.parse;
I = Z.noop;
var S = U.seriesTypes;
Z = S.column;
var x = S.scatter;
S = H.addEvent;
var d = H.arrayMax, u = H.arrayMin, P = H.clamp, O = H.extend, N = H.isNumber, C = H.merge, b = H.pick;
return H = function(w) {
function v() {
var a = w !== null && w.apply(this, arguments) || this;
return a.data = void 0, a.maxPxSize = void 0, a.minPxSize = void 0, a.options = void 0, a.points = void 0, a.radii = void 0, a.yData = void 0, a.zData = void 0, a;
}
return W(v, w), v.prototype.animate = function(a) {
!a && this.points.length < this.options.animationLimit && this.points.forEach(function(c) {
var p = c.graphic;
p && p.width && (this.hasRendered || p.attr({ x: c.plotX, y: c.plotY, width: 1, height: 1 }), p.animate(this.markerAttribs(c), this.options.animation));
}, this);
}, v.prototype.getRadii = function() {
var a = this, c = this.zData, p = this.yData, i = [], l = this.chart.bubbleZExtremes, s = this.getPxExtremes(), t = s.minPxSize, o = s.maxPxSize;
if (!l) {
var n = Number.MAX_VALUE, A = -Number.MAX_VALUE, _;
this.chart.series.forEach(function(T) {
T.bubblePadding && (T.visible || !a.chart.options.chart.ignoreHiddenSeries) && (T = T.getZExtremes()) && (n = Math.min(n || T.zMin, T.zMin), A = Math.max(A || T.zMax, T.zMax), _ = !0);
}), _ ? (l = { zMin: n, zMax: A }, this.chart.bubbleZExtremes = l) : l = { zMin: 0, zMax: 0 };
}
var D = 0;
for (s = c.length; D < s; D++) {
var j = c[D];
i.push(this.getRadius(l.zMin, l.zMax, t, o, j, p[D]));
}
this.radii = i;
}, v.prototype.getRadius = function(a, c, p, i, l, s) {
var t = this.options, o = t.sizeBy !== "width", n = t.zThreshold, A = c - a, _ = 0.5;
if (s === null || l === null)
return null;
if (N(l)) {
if (t.sizeByAbsoluteValue && (l = Math.abs(l - n), A = Math.max(c - n, Math.abs(a - n)), a = 0), l < a)
return p / 2 - 1;
0 < A && (_ = (l - a) / A);
}
return o && 0 <= _ && (_ = Math.sqrt(_)), Math.ceil(p + _ * (i - p)) / 2;
}, v.prototype.hasData = function() {
return !!this.processedXData.length;
}, v.prototype.pointAttribs = function(a, c) {
var p = this.options.marker.fillOpacity;
return a = F.prototype.pointAttribs.call(this, a, c), p !== 1 && (a.fill = R(a.fill).setOpacity(p).get("rgba")), a;
}, v.prototype.translate = function() {
w.prototype.translate.call(this), this.getRadii(), this.translateBubble();
}, v.prototype.translateBubble = function() {
for (var a = this.data, c = this.radii, p = this.getPxExtremes().minPxSize, i = a.length; i--; ) {
var l = a[i], s = c ? c[i] : 0;
N(s) && s >= p / 2 ? (l.marker = O(l.marker, { radius: s, width: 2 * s, height: 2 * s }), l.dlBox = { x: l.plotX - s, y: l.plotY - s, width: 2 * s, height: 2 * s }) : l.shapeArgs = l.plotY = l.dlBox = void 0;
}
}, v.prototype.getPxExtremes = function() {
var a = Math.min(this.chart.plotWidth, this.chart.plotHeight), c = function(i) {
if (typeof i == "string") {
var l = /%$/.test(i);
i = parseInt(i, 10);
}
return l ? a * i / 100 : i;
}, p = c(b(this.options.minSize, 8));
return c = Math.max(c(b(this.options.maxSize, "20%")), p), {
minPxSize: p,
maxPxSize: c
};
}, v.prototype.getZExtremes = function() {
var a = this.options, c = (this.zData || []).filter(N);
if (c.length) {
var p = b(a.zMin, P(u(c), a.displayNegative === !1 ? a.zThreshold || 0 : -Number.MAX_VALUE, Number.MAX_VALUE));
if (a = b(a.zMax, d(c)), N(p) && N(a))
return { zMin: p, zMax: a };
}
}, v.compose = y.compose, v.defaultOptions = C(x.defaultOptions, { dataLabels: { formatter: function() {
var a = this.series.chart.numberFormatter, c = this.point.z;
return N(c) ? a(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(H.prototype, {
alignDataLabel: Z.prototype.alignDataLabel,
applyZones: I,
bubblePadding: !0,
buildKDTree: I,
directTouch: !0,
isBubble: !0,
pointArrayMap: ["y", "z"],
pointClass: B,
parallelArrays: ["x", "y", "z"],
trackerGroups: ["group", "dataLabelsGroup"],
specialGroup: "group",
zoneAxis: "z"
}), S(H, "updatedData", function(w) {
delete w.target.chart.bubbleZExtremes;
}), h.prototype.beforePadding = function() {
var w = this, v = this.len, a = this.chart, c = 0, p = v, i = this.isXAxis, l = i ? "xData" : "yData", s = this.min, t = this.max - s, o = v / t, n;
this.series.forEach(function(A) {
if (A.bubblePadding && (A.visible || !a.options.chart.ignoreHiddenSeries)) {
n = w.allowZoomOutside = !0;
var _ = A[l];
if (i && A.getRadii(0, 0, A), 0 < t) {
for (var D = _.length; D--; )
if (N(_[D]) && w.dataMin <= _[D] && _[D] <= w.max) {
var j = A.radii && A.radii[D] || 0;
c = Math.min((_[D] - s) * o - j, c), p = Math.max((_[D] - s) * o + j, p);
}
}
}
}), n && 0 < t && !this.logarithmic && (p -= v, o *= (v + Math.max(0, c) - Math.min(p, v)) / v, [["min", "userMin", c], ["max", "userMax", p]].forEach(function(A) {
typeof b(w.options[A[0]], w[A[1]]) > "u" && (w[A[0]] += A[2] / o);
}));
}, U.registerSeriesType("bubble", H), H;
}), E(f, "Series/ColumnRange/ColumnRangePoint.js", [f["Core/Series/SeriesRegistry.js"], f["Core/Utilities.js"]], function(h, y) {
var B = this && this.__extends || function() {
var U = function(H, W) {
return U = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(R, S) {
R.__proto__ = S;
} || function(R, S) {
for (var x in S)
S.hasOwnProperty(x) && (R[x] = S[x]);
}, U(H, W);
};
return function(H, W) {
function R() {
this.constructor = H;
}
U(H, W), H.prototype = W === null ? Object.create(W) : (R.prototype = W.prototype, new R());
};
}(), I = h.seriesTypes;
h = I.column.prototype.pointClass;
var Z = y.extend, F = y.isNumber;
return y = function(U) {
function H() {
var W = U !== null && U.apply(this, arguments) || this;
return W.series = void 0, W.options = void 0, W.barX = void 0, W.pointWidth = void 0, W.shapeType = void 0, W;
}
return B(H, U), H.prototype.isValid = function() {
return F(this.low);
}, H;
}(I.arearange.prototype.pointClass), Z(y.prototype, { setState: h.prototype.setState }), y;
}), E(f, "Series/ColumnRange/ColumnRangeSeries.js", [f["Series/ColumnRange/ColumnRangePoint.js"], f["Core/Globals.js"], f["Core/Series/SeriesRegistry.js"], f["Core/Utilities.js"]], function(h, y, B, I) {
var Z = this && this.__extends || function() {
var P = function(O, N) {
return P = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(C, b) {
C.__proto__ = b;
} || function(C, b) {
for (var w in b)
b.hasOwnProperty(w) && (C[w] = b[w]);
}, P(O, N);
};
return function(O, N) {
function C() {
this.constructor = O;
}
P(O, N), O.prototype = N === null ? Object.create(N) : (C.prototype = N.prototype, new C());
};
}();
y = y.noop;
var F = B.seriesTypes, U = F.arearange, H = F.column, W = H.prototype, R = U.prototype, S = I.clamp, x = I.merge, d = I.pick;
I = I.extend;
var u = { pointRange: null, marker: null, states: { hover: { halo: !1 } } };
return F = function(P) {
function O() {
var N = P !== null && P.apply(this, arguments) || this;
return N.data = void 0, N.points = void 0, N.options = void 0, N;
}
return Z(O, P), O.prototype.setOptions = function() {
return x(!0, arguments[0], { stacking: void 0 }), R.setOptions.apply(this, arguments);
}, O.prototype.translate = function() {
var N = this, C = N.yAxis, b = N.xAxis, w = b.startAngleRad, v, a = N.chart, c = N.xAxis.isRadial, p = Math.max(a.chartWidth, a.chartHeight) + 999, i;
W.translate.apply(N), N.points.forEach(function(l) {
var s = l.shapeArgs || {}, t = N.options.minPointLength;
l.plotHigh = i = S(C.translate(l.high, 0, 1, 0, 1), -p, p), l.plotLow = S(l.plotY, -p, p);
var o = i, n = d(
l.rectPlotY,
l.plotY
) - i;
Math.abs(n) < t ? (t -= n, n += t, o -= t / 2) : 0 > n && (n *= -1, o -= n), c ? (v = l.barX + w, l.shapeType = "arc", l.shapeArgs = N.polarArc(o + n, o, v, v + l.pointWidth)) : (s.height = n, s.y = o, t = s.x, t = t === void 0 ? 0 : t, s = s.width, s = s === void 0 ? 0 : s, l.tooltipPos = a.inverted ? [C.len + C.pos - a.plotLeft - o - n / 2, b.len + b.pos - a.plotTop - t - s / 2, n] : [b.left - a.plotLeft + t + s / 2, C.pos - a.plotTop + o + n / 2, n]);
});
}, O.prototype.crispCol = function() {
return W.crispCol.apply(this, arguments);
}, O.prototype.drawPoints = function() {
return W.drawPoints.apply(this, arguments);
}, O.prototype.drawTracker = function() {
return W.drawTracker.apply(this, arguments);
}, O.prototype.getColumnMetrics = function() {
return W.getColumnMetrics.apply(this, arguments);
}, O.prototype.pointAttribs = function() {
return W.pointAttribs.apply(this, arguments);
}, O.prototype.adjustForMissingColumns = function() {
return W.adjustForMissingColumns.apply(this, arguments);
}, O.prototype.animate = function() {
return W.animate.apply(this, arguments);
}, O.prototype.translate3dPoints = function() {
return W.translate3dPoints.apply(this, arguments);
}, O.prototype.translate3dShapes = function() {
return W.translate3dShapes.apply(this, arguments);
}, O.defaultOptions = x(H.defaultOptions, U.defaultOptions, u), O;
}(U), I(F.prototype, { directTouch: !0, trackerGroups: ["group", "dataLabelsGroup"], drawGraph: y, getSymbol: y, polarArc: function() {
return W.polarArc.apply(this, arguments);
}, pointClass: h }), B.registerSeriesType("columnrange", F), F;
}), E(f, "Series/ColumnPyramid/ColumnPyramidSeries.js", [f["Series/Column/ColumnSeries.js"], f["Core/Series/SeriesRegistry.js"], f["Core/Utilities.js"]], function(h, y, B) {
var I = this && this.__extends || function() {
var W = function(R, S) {
return W = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(x, d) {
x.__proto__ = d;
} || function(x, d) {
for (var u in d)
d.hasOwnProperty(u) && (x[u] = d[u]);
}, W(R, S);
};
return function(R, S) {
function x() {
this.constructor = R;
}
W(R, S), R.prototype = S === null ? Object.create(S) : (x.prototype = S.prototype, new x());
};
}(), Z = h.prototype, F = B.clamp, U = B.merge, H = B.pick;
return B = function(W) {
function R() {
var S = W !== null && W.apply(this, arguments) || this;
return S.data = void 0, S.options = void 0, S.points = void 0, S;
}
return I(R, W), R.prototype.translate = function() {
var S = this, x = S.chart, d = S.options, u = S.dense = 2 > S.closestPointRange * S.xAxis.transA;
u = S.borderWidth = H(d.borderWidth, u ? 0 : 1);
var P = S.yAxis, O = d.threshold, N = S.translatedThreshold = P.getThreshold(O), C = H(d.minPointLength, 5), b = S.getColumnMetrics(), w = b.width, v = S.barW = Math.max(w, 1 + 2 * u), a = S.pointXOffset = b.offset;
x.inverted && (N -= 0.5), d.pointPadding && (v = Math.ceil(v)), Z.translate.apply(S), S.points.forEach(function(c) {
var p = H(c.yBottom, N), i = 999 + Math.abs(p), l = F(c.plotY, -i, P.len + i);
i = c.plotX + a;
var s = v / 2, t = Math.min(l, p);
p = Math.max(l, p) - t;
var o;
c.barX = i, c.pointWidth = w, c.tooltipPos = x.inverted ? [P.len + P.pos - x.plotLeft - l, S.xAxis.len - i - s, p] : [i + s, l + P.pos - x.plotTop, p], l = O + (c.total || c.y), d.stacking === "percent" && (l = O + (0 > c.y) ? -100 : 100), l = P.toPixels(l, !0);
var n = (o = x.plotHeight - l - (x.plotHeight - N)) ? s * (t - l) / o : 0, A = o ? s * (t + p - l) / o : 0;
o = i - n + s, n = i + n + s;
var _ = i + A + s;
A = i - A + s;
var D = t - C, j = t + p;
0 > c.y && (D = t, j = t + p + C), x.inverted && (_ = P.width - t, o = l - (P.width - N), n = s * (l - _) / o, A = s * (l - (_ - p)) / o, o = i + s + n, n = o - 2 * n, _ = i - A + s, A = i + A + s, D = t, j = t + p - C, 0 > c.y && (j = t + p + C)), c.shapeType = "path", c.shapeArgs = { x: o, y: D, width: n - o, height: p, d: [["M", o, D], ["L", n, D], ["L", _, j], ["L", A, j], ["Z"]] };
});
}, R.defaultOptions = U(h.defaultOptions, {}), R;
}(h), y.registerSeriesType("columnpyramid", B), B;
}), E(f, "Series/ErrorBar/ErrorBarSeries.js", [f["Series/BoxPlot/BoxPlotSeries.js"], f["Series/Column/ColumnSeries.js"], f["Core/Series/SeriesRegistry.js"], f["Core/Utilities.js"]], function(h, y, B, I) {
var Z = this && this.__extends || function() {
var W = function(R, S) {
return W = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(x, d) {
x.__proto__ = d;
} || function(x, d) {
for (var u in d)
d.hasOwnProperty(u) && (x[u] = d[u]);
}, W(R, S);
};
return function(R, S) {
function x() {
this.constructor = R;
}
W(R, S), R.prototype = S === null ? Object.create(S) : (x.prototype = S.prototype, new x());
};
}(), F = B.seriesTypes.arearange, U = I.merge;
I = I.extend;
var H = function(W) {
function R() {
var S = W !== null && W.apply(this, arguments) || this;
return S.data = void 0, S.options = void 0, S.points = void 0, S;
}
return Z(R, W), R.prototype.getColumnMetrics = function() {
return this.linkedParent && this.linkedParent.columnMetrics || y.prototype.getColumnMetrics.call(this);
}, R.prototype.drawDataLabels = function() {
var S = this.pointValKey;
F && (F.prototype.drawDataLabels.call(this), this.data.forEach(function(x) {
x.y = x[S];
}));
}, R.prototype.toYData = function(S) {
return [S.low, S.high];
}, R.defaultOptions = U(h.defaultOptions, {
color: "#000000",
grouping: !1,
linkedTo: ":previous",
tooltip: { pointFormat: '● {series.name}: {point.low} - {point.high}
' },
whiskerWidth: null
}), R;
}(h);
return I(H.prototype, { pointArrayMap: ["low", "high"], pointValKey: "high", doQuartiles: !1 }), B.registerSeriesType("errorbar", H), H;
}), E(f, "Series/Gauge/GaugePoint.js", [f["Core/Series/SeriesRegistry.js"]], function(h) {
var y = this && this.__extends || function() {
var B = function(I, Z) {
return B = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(F, U) {
F.__proto__ = U;
} || function(F, U) {
for (var H in U)
U.hasOwnProperty(H) && (F[H] = U[H]);
}, B(I, Z);
};
return function(I, Z) {
function F() {
this.constructor = I;
}
B(I, Z), I.prototype = Z === null ? Object.create(Z) : (F.prototype = Z.prototype, new F());
};
}();
return function(B) {
function I() {
var Z = B !== null && B.apply(this, arguments) || this;
return Z.options = void 0, Z.series = void 0, Z.shapeArgs = void 0, Z;
}
return y(I, B), I.prototype.setState = function(Z) {
this.state = Z;
}, I;
}(h.series.prototype.pointClass);
}), E(f, "Series/Gauge/GaugeSeries.js", [f["Series/Gauge/GaugePoint.js"], f["Core/Globals.js"], f["Core/Series/SeriesRegistry.js"], f["Core/Utilities.js"]], function(h, y, B, I) {
var Z = this && this.__extends || function() {
var u = function(P, O) {
return u = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(N, C) {
N.__proto__ = C;
} || function(N, C) {
for (var b in C)
C.hasOwnProperty(b) && (N[b] = C[b]);
}, u(P, O);
};
return function(P, O) {
function N() {
this.constructor = P;
}
u(P, O), P.prototype = O === null ? Object.create(O) : (N.prototype = O.prototype, new N());
};
}();
y = y.noop;
var F = B.series, U = B.seriesTypes.column, H = I.clamp, W = I.isNumber, R = I.extend, S = I.merge, x = I.pick, d = I.pInt;
return I = function(u) {
function P() {
var O = u !== null && u.apply(this, arguments) || this;
return O.data = void 0, O.points = void 0, O.options = void 0, O.yAxis = void 0, O;
}
return Z(P, u), P.prototype.translate = function() {
var O = this.yAxis, N = this.options, C = O.center;
this.generatePoints(), this.points.forEach(function(b) {
var w = S(N.dial, b.dial), v = d(x(w.radius, "80%")) * C[2] / 200, a = d(x(w.baseLength, "70%")) * v / 100, c = d(x(w.rearLength, "10%")) * v / 100, p = w.baseWidth || 3, i = w.topWidth || 1, l = N.overshoot, s = O.startAngleRad + O.translate(b.y, null, null, null, !0);
(W(l) || N.wrap === !1) && (l = W(l) ? l / 180 * Math.PI : 0, s = H(
s,
O.startAngleRad - l,
O.endAngleRad + l
)), s = 180 * s / Math.PI, b.shapeType = "path", b.shapeArgs = { d: w.path || [["M", -c, -p / 2], ["L", a, -p / 2], ["L", v, -i / 2], ["L", v, i / 2], ["L", a, p / 2], ["L", -c, p / 2], ["Z"]], translateX: C[0], translateY: C[1], rotation: s }, b.plotX = C[0], b.plotY = C[1];
});
}, P.prototype.drawPoints = function() {
var O = this, N = O.chart, C = O.yAxis.center, b = O.pivot, w = O.options, v = w.pivot, a = N.renderer;
O.points.forEach(function(c) {
var p = c.graphic, i = c.shapeArgs, l = i.d, s = S(w.dial, c.dial);
p ? (p.animate(i), i.d = l) : c.graphic = a[c.shapeType](i).attr({
rotation: i.rotation,
zIndex: 1
}).addClass("highcharts-dial").add(O.group), N.styledMode || c.graphic[p ? "animate" : "attr"]({ stroke: s.borderColor || "none", "stroke-width": s.borderWidth || 0, fill: s.backgroundColor || "#000000" });
}), b ? b.animate({ translateX: C[0], translateY: C[1] }) : (O.pivot = a.circle(0, 0, x(v.radius, 5)).attr({ zIndex: 2 }).addClass("highcharts-pivot").translate(C[0], C[1]).add(O.group), N.styledMode || O.pivot.attr({ "stroke-width": v.borderWidth || 0, stroke: v.borderColor || "#cccccc", fill: v.backgroundColor || "#000000" }));
}, P.prototype.animate = function(O) {
var N = this;
O || N.points.forEach(function(C) {
var b = C.graphic;
b && (b.attr({ rotation: 180 * N.yAxis.startAngleRad / Math.PI }), b.animate({ rotation: C.shapeArgs.rotation }, N.options.animation));
});
}, P.prototype.render = function() {
this.group = this.plotGroup("group", "series", this.visible ? "visible" : "hidden", this.options.zIndex, this.chart.seriesGroup), F.prototype.render.call(this), this.group.clip(this.chart.clipRect);
}, P.prototype.setData = function(O, N) {
F.prototype.setData.call(this, O, !1), this.processData(), this.generatePoints(), x(N, !0) && this.chart.redraw();
}, P.prototype.hasData = function() {
return !!this.points.length;
}, P.defaultOptions = S(F.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 }), P;
}(F), R(I.prototype, { angular: !0, directTouch: !0, drawGraph: y, drawTracker: U.prototype.drawTracker, fixedBox: !0, forceDL: !0, noSharedTooltip: !0, pointClass: h, trackerGroups: [
"group",
"dataLabelsGroup"
] }), B.registerSeriesType("gauge", I), I;
}), E(f, "Series/PackedBubble/PackedBubblePoint.js", [f["Core/Chart/Chart.js"], f["Core/Series/Point.js"], f["Core/Series/SeriesRegistry.js"]], function(h, y, B) {
var I = this && this.__extends || function() {
var Z = function(F, U) {
return Z = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(H, W) {
H.__proto__ = W;
} || function(H, W) {
for (var R in W)
W.hasOwnProperty(R) && (H[R] = W[R]);
}, Z(F, U);
};
return function(F, U) {
function H() {
this.constructor = F;
}
Z(F, U), F.prototype = U === null ? Object.create(U) : (H.prototype = U.prototype, new H());
};
}();
return function(Z) {
function F() {
var U = Z !== null && Z.apply(this, arguments) || this;
return U.degree = NaN, U.mass = NaN, U.radius = NaN, U.options = void 0, U.series = void 0, U.value = null, U;
}
return I(F, Z), F.prototype.destroy = function() {
return this.series.layout && this.series.layout.removeElementFromCollection(this, this.series.layout.nodes), y.prototype.destroy.apply(this, arguments);
}, F.prototype.firePointEvent = function() {
var U = this.series.options;
if (this.isParentNode && U.parentNode) {
var H = U.allowPointSelect;
U.allowPointSelect = U.parentNode.allowPointSelect, y.prototype.firePointEvent.apply(this, arguments), U.allowPointSelect = H;
} else
y.prototype.firePointEvent.apply(this, arguments);
}, F.prototype.select = function() {
var U = this.series.chart;
this.isParentNode ? (U.getSelectedPoints = U.getSelectedParentNodes, y.prototype.select.apply(this, arguments), U.getSelectedPoints = h.prototype.getSelectedPoints) : y.prototype.select.apply(this, arguments);
}, F;
}(B.seriesTypes.bubble.prototype.pointClass);
}), E(f, "Series/Networkgraph/DraggableNodes.js", [f["Core/Chart/Chart.js"], f["Core/Globals.js"], f["Core/Utilities.js"]], function(h, y, B) {
var I = B.addEvent;
y.dragNodesMixin = { onMouseDown: function(Z, F) {
F = this.chart.pointer.normalize(F), Z.fixedPosition = { chartX: F.chartX, chartY: F.chartY, plotX: Z.plotX, plotY: Z.plotY }, Z.inDragMode = !0;
}, onMouseMove: function(Z, F) {
if (Z.fixedPosition && Z.inDragMode) {
var U = this.chart, H = U.pointer.normalize(F);
F = Z.fixedPosition.chartX - H.chartX, H = Z.fixedPosition.chartY - H.chartY;
var W = void 0, R = void 0, S = U.graphLayoutsLookup;
(5 < Math.abs(F) || 5 < Math.abs(H)) && (W = Z.fixedPosition.plotX - F, R = Z.fixedPosition.plotY - H, U.isInsidePlot(W, R) && (Z.plotX = W, Z.plotY = R, Z.hasDragged = !0, this.redrawHalo(Z), S.forEach(function(x) {
x.restartSimulation();
})));
}
}, onMouseUp: function(Z, F) {
Z.fixedPosition && (Z.hasDragged && (this.layout.enableSimulation ? this.layout.start() : this.chart.redraw()), Z.inDragMode = Z.hasDragged = !1, this.options.fixedDraggable || delete Z.fixedPosition);
}, redrawHalo: function(Z) {
Z && this.halo && this.halo.attr({ d: Z.haloPath(this.options.states.hover.halo.size) });
} }, I(h, "load", function() {
var Z = this, F, U, H;
Z.container && (F = I(Z.container, "mousedown", function(W) {
var R = Z.hoverPoint;
R && R.series && R.series.hasDraggableNodes && R.series.options.draggable && (R.series.onMouseDown(R, W), U = I(Z.container, "mousemove", function(S) {
return R && R.series && R.series.onMouseMove(R, S);
}), H = I(Z.container.ownerDocument, "mouseup", function(S) {
return U(), H(), R && R.series && R.series.onMouseUp(R, S);
}));
})), I(Z, "destroy", function() {
F();
});
});
}), E(
f,
"Series/Networkgraph/Integrations.js",
[f["Core/Globals.js"]],
function(h) {
h.networkgraphIntegrations = { verlet: { attractiveForceFunction: function(y, B) {
return (B - y) / y;
}, repulsiveForceFunction: function(y, B) {
return (B - y) / y * (B > y ? 1 : 0);
}, barycenter: function() {
var y = this.options.gravitationalConstant, B = this.barycenter.xFactor, I = this.barycenter.yFactor;
B = (B - (this.box.left + this.box.width) / 2) * y, I = (I - (this.box.top + this.box.height) / 2) * y, this.nodes.forEach(function(Z) {
Z.fixedPosition || (Z.plotX -= B / Z.mass / Z.degree, Z.plotY -= I / Z.mass / Z.degree);
});
}, repulsive: function(y, B, I) {
B = B * this.diffTemperature / y.mass / y.degree, y.fixedPosition || (y.plotX += I.x * B, y.plotY += I.y * B);
}, attractive: function(y, B, I) {
var Z = y.getMass(), F = -I.x * B * this.diffTemperature;
B = -I.y * B * this.diffTemperature, y.fromNode.fixedPosition || (y.fromNode.plotX -= F * Z.fromNode / y.fromNode.degree, y.fromNode.plotY -= B * Z.fromNode / y.fromNode.degree), y.toNode.fixedPosition || (y.toNode.plotX += F * Z.toNode / y.toNode.degree, y.toNode.plotY += B * Z.toNode / y.toNode.degree);
}, integrate: function(y, B) {
var I = -y.options.friction, Z = y.options.maxSpeed, F = (B.plotX + B.dispX - B.prevX) * I;
I *= B.plotY + B.dispY - B.prevY;
var U = Math.abs, H = U(F) / (F || 1);
U = U(I) / (I || 1), F = H * Math.min(Z, Math.abs(F)), I = U * Math.min(Z, Math.abs(I)), B.prevX = B.plotX + B.dispX, B.prevY = B.plotY + B.dispY, B.plotX += F, B.plotY += I, B.temperature = y.vectorLength({ x: F, y: I });
}, getK: function(y) {
return Math.pow(y.box.width * y.box.height / y.nodes.length, 0.5);
} }, euler: { attractiveForceFunction: function(y, B) {
return y * y / B;
}, repulsiveForceFunction: function(y, B) {
return B * B / y;
}, barycenter: function() {
var y = this.options.gravitationalConstant, B = this.barycenter.xFactor, I = this.barycenter.yFactor;
this.nodes.forEach(function(Z) {
if (!Z.fixedPosition) {
var F = Z.getDegree();
F *= 1 + F / 2, Z.dispX += (B - Z.plotX) * y * F / Z.degree, Z.dispY += (I - Z.plotY) * y * F / Z.degree;
}
});
}, repulsive: function(y, B, I, Z) {
y.dispX += I.x / Z * B / y.degree, y.dispY += I.y / Z * B / y.degree;
}, attractive: function(y, B, I, Z) {
var F = y.getMass(), U = I.x / Z * B;
B *= I.y / Z, y.fromNode.fixedPosition || (y.fromNode.dispX -= U * F.fromNode / y.fromNode.degree, y.fromNode.dispY -= B * F.fromNode / y.fromNode.degree), y.toNode.fixedPosition || (y.toNode.dispX += U * F.toNode / y.toNode.degree, y.toNode.dispY += B * F.toNode / y.toNode.degree);
}, integrate: function(y, B) {
B.dispX += B.dispX * y.options.friction, B.dispY += B.dispY * y.options.friction;
var I = B.temperature = y.vectorLength({ x: B.dispX, y: B.dispY });
I !== 0 && (B.plotX += B.dispX / I * Math.min(Math.abs(B.dispX), y.temperature), B.plotY += B.dispY / I * Math.min(Math.abs(B.dispY), y.temperature));
}, getK: function(y) {
return Math.pow(y.box.width * y.box.height / y.nodes.length, 0.3);
} } };
}
), E(
f,
"Series/Networkgraph/QuadTree.js",
[f["Core/Globals.js"], f["Core/Utilities.js"]],
function(h, y) {
y = y.extend;
var B = h.QuadTreeNode = function(I) {
this.box = I, this.boxSize = Math.min(I.width, I.height), this.nodes = [], this.body = this.isInternal = !1, this.isEmpty = !0;
};
y(B.prototype, { insert: function(I, Z) {
this.isInternal ? this.nodes[this.getBoxPosition(I)].insert(I, Z - 1) : (this.isEmpty = !1, this.body ? Z ? (this.isInternal = !0, this.divideBox(), this.body !== !0 && (this.nodes[this.getBoxPosition(this.body)].insert(this.body, Z - 1), this.body = !0), this.nodes[this.getBoxPosition(I)].insert(I, Z - 1)) : (Z = new B({
top: I.plotX,
left: I.plotY,
width: 0.1,
height: 0.1
}), Z.body = I, Z.isInternal = !1, this.nodes.push(Z)) : (this.isInternal = !1, this.body = I));
}, updateMassAndCenter: function() {
var I = 0, Z = 0, F = 0;
this.isInternal ? (this.nodes.forEach(function(U) {
U.isEmpty || (I += U.mass, Z += U.plotX * U.mass, F += U.plotY * U.mass);
}), Z /= I, F /= I) : this.body && (I = this.body.mass, Z = this.body.plotX, F = this.body.plotY), this.mass = I, this.plotX = Z, this.plotY = F;
}, divideBox: function() {
var I = this.box.width / 2, Z = this.box.height / 2;
this.nodes[0] = new B({
left: this.box.left,
top: this.box.top,
width: I,
height: Z
}), this.nodes[1] = new B({ left: this.box.left + I, top: this.box.top, width: I, height: Z }), this.nodes[2] = new B({ left: this.box.left + I, top: this.box.top + Z, width: I, height: Z }), this.nodes[3] = new B({ left: this.box.left, top: this.box.top + Z, width: I, height: Z });
}, getBoxPosition: function(I) {
var Z = I.plotY < this.box.top + this.box.height / 2;
return I.plotX < this.box.left + this.box.width / 2 ? Z ? 0 : 3 : Z ? 1 : 2;
} }), h = h.QuadTree = function(I, Z, F, U) {
this.box = { left: I, top: Z, width: F, height: U }, this.maxDepth = 25, this.root = new B(
this.box,
"0"
), this.root.isInternal = !0, this.root.isRoot = !0, this.root.divideBox();
}, y(h.prototype, { insertNodes: function(I) {
I.forEach(function(Z) {
this.root.insert(Z, this.maxDepth);
}, this);
}, visitNodeRecursive: function(I, Z, F) {
var U;
I || (I = this.root), I === this.root && Z && (U = Z(I)), U !== !1 && (I.nodes.forEach(function(H) {
if (H.isInternal) {
if (Z && (U = Z(H)), U === !1)
return;
this.visitNodeRecursive(H, Z, F);
} else
H.body && Z && Z(H.body);
F && F(H);
}, this), I === this.root && F && F(I));
}, calculateMassAndCenter: function() {
this.visitNodeRecursive(
null,
null,
function(I) {
I.updateMassAndCenter();
}
);
} });
}
), E(f, "Series/Networkgraph/Layouts.js", [f["Core/Chart/Chart.js"], f["Core/Animation/AnimationUtilities.js"], f["Core/Globals.js"], f["Core/Utilities.js"]], function(h, y, B, I) {
var Z = y.setAnimation;
y = I.addEvent;
var F = I.clamp, U = I.defined, H = I.extend, W = I.isFunction, R = I.pick;
B.layouts = { "reingold-fruchterman": function() {
} }, H(B.layouts["reingold-fruchterman"].prototype, {
init: function(S) {
this.options = S, this.nodes = [], this.links = [], this.series = [], this.box = {
x: 0,
y: 0,
width: 0,
height: 0
}, this.setInitialRendering(!0), this.integration = B.networkgraphIntegrations[S.integration], this.enableSimulation = S.enableSimulation, this.attractiveForce = R(S.attractiveForce, this.integration.attractiveForceFunction), this.repulsiveForce = R(S.repulsiveForce, this.integration.repulsiveForceFunction), this.approximation = S.approximation;
},
updateSimulation: function(S) {
this.enableSimulation = R(S, this.options.enableSimulation);
},
start: function() {
var S = this.series, x = this.options;
this.currentStep = 0, this.forces = S[0] && S[0].forces || [], this.chart = S[0] && S[0].chart, this.initialRendering && (this.initPositions(), S.forEach(function(d) {
d.finishedAnimating = !0, d.render();
})), this.setK(), this.resetSimulation(x), this.enableSimulation && this.step();
},
step: function() {
var S = this, x = this.series;
S.currentStep++, S.approximation === "barnes-hut" && (S.createQuadTree(), S.quadTree.calculateMassAndCenter()), S.forces.forEach(function(d) {
S[d + "Forces"](S.temperature);
}), S.applyLimits(S.temperature), S.temperature = S.coolDown(
S.startTemperature,
S.diffTemperature,
S.currentStep
), S.prevSystemTemperature = S.systemTemperature, S.systemTemperature = S.getSystemTemperature(), S.enableSimulation && (x.forEach(function(d) {
d.chart && d.render();
}), S.maxIterations-- && isFinite(S.temperature) && !S.isStable() ? (S.simulation && B.win.cancelAnimationFrame(S.simulation), S.simulation = B.win.requestAnimationFrame(function() {
S.step();
})) : S.simulation = !1);
},
stop: function() {
this.simulation && B.win.cancelAnimationFrame(this.simulation);
},
setArea: function(S, x, d, u) {
this.box = {
left: S,
top: x,
width: d,
height: u
};
},
setK: function() {
this.k = this.options.linkLength || this.integration.getK(this);
},
addElementsToCollection: function(S, x) {
S.forEach(function(d) {
x.indexOf(d) === -1 && x.push(d);
});
},
removeElementFromCollection: function(S, x) {
S = x.indexOf(S), S !== -1 && x.splice(S, 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(S) {
this.maxIterations = R(S, 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(S) {
this.initialRendering = S;
},
createQuadTree: function() {
this.quadTree = new B.QuadTree(this.box.left, this.box.top, this.box.width, this.box.height), this.quadTree.insertNodes(this.nodes);
},
initPositions: function() {
var S = this.options.initialPositions;
W(S) ? (S.call(this), this.nodes.forEach(function(x) {
U(x.prevX) || (x.prevX = x.plotX), U(x.prevY) || (x.prevY = x.plotY), x.dispX = 0, x.dispY = 0;
})) : S === "circle" ? this.setCircularPositions() : this.setRandomPositions();
},
setCircularPositions: function() {
function S(b) {
b.linksFrom.forEach(function(w) {
N[w.toNode.id] || (N[w.toNode.id] = !0, O.push(w.toNode), S(w.toNode));
});
}
var x = this.box, d = this.nodes, u = 2 * Math.PI / (d.length + 1), P = d.filter(function(b) {
return b.linksTo.length === 0;
}), O = [], N = {}, C = this.options.initialPositionRadius;
P.forEach(function(b) {
O.push(b), S(b);
}), O.length ? d.forEach(function(b) {
O.indexOf(b) === -1 && O.push(b);
}) : O = d, O.forEach(function(b, w) {
b.plotX = b.prevX = R(b.plotX, x.width / 2 + C * Math.cos(w * u)), b.plotY = b.prevY = R(b.plotY, x.height / 2 + C * Math.sin(w * u)), b.dispX = 0, b.dispY = 0;
});
},
setRandomPositions: function() {
function S(P) {
return P = P * P / Math.PI, P -= Math.floor(P);
}
var x = this.box, d = this.nodes, u = d.length + 1;
d.forEach(function(P, O) {
P.plotX = P.prevX = R(P.plotX, x.width * S(O)), P.plotY = P.prevY = R(P.plotY, x.height * S(u + O)), P.dispX = 0, P.dispY = 0;
});
},
force: function(S) {
this.integration[S].apply(this, Array.prototype.slice.call(arguments, 1));
},
barycenterForces: function() {
this.getBarycenter(), this.force("barycenter");
},
getBarycenter: function() {
var S = 0, x = 0, d = 0;
return this.nodes.forEach(function(u) {
x += u.plotX * u.mass, d += u.plotY * u.mass, S += u.mass;
}), this.barycenter = { x, y: d, xFactor: x / S, yFactor: d / S };
},
barnesHutApproximation: function(S, x) {
var d = this.getDistXY(S, x), u = this.vectorLength(d);
if (S !== x && u !== 0)
if (x.isInternal)
if (x.boxSize / u < this.options.theta && u !== 0) {
var P = this.repulsiveForce(u, this.k);
this.force("repulsive", S, P * x.mass, d, u);
var O = !1;
} else
O = !0;
else
P = this.repulsiveForce(u, this.k), this.force("repulsive", S, P * x.mass, d, u);
return O;
},
repulsiveForces: function() {
var S = this;
S.approximation === "barnes-hut" ? S.nodes.forEach(function(x) {
S.quadTree.visitNodeRecursive(
null,
function(d) {
return S.barnesHutApproximation(x, d);
}
);
}) : S.nodes.forEach(function(x) {
S.nodes.forEach(function(d) {
if (x !== d && !x.fixedPosition) {
var u = S.getDistXY(x, d), P = S.vectorLength(u);
if (P !== 0) {
var O = S.repulsiveForce(P, S.k);
S.force("repulsive", x, O * d.mass, u, P);
}
}
});
});
},
attractiveForces: function() {
var S = this, x, d, u;
S.links.forEach(function(P) {
P.fromNode && P.toNode && (x = S.getDistXY(P.fromNode, P.toNode), d = S.vectorLength(x), d !== 0 && (u = S.attractiveForce(d, S.k), S.force("attractive", P, u, x, d)));
});
},
applyLimits: function() {
var S = this;
S.nodes.forEach(function(x) {
x.fixedPosition || (S.integration.integrate(S, x), S.applyLimitBox(x, S.box), x.dispX = 0, x.dispY = 0);
});
},
applyLimitBox: function(S, x) {
var d = S.radius;
S.plotX = F(S.plotX, x.left + d, x.width - d), S.plotY = F(S.plotY, x.top + d, x.height - d);
},
coolDown: function(S, x, d) {
return S - x * d;
},
isStable: function() {
return 1e-5 > Math.abs(this.systemTemperature - this.prevSystemTemperature) || 0 >= this.temperature;
},
getSystemTemperature: function() {
return this.nodes.reduce(function(S, x) {
return S + x.temperature;
}, 0);
},
vectorLength: function(S) {
return Math.sqrt(S.x * S.x + S.y * S.y);
},
getDistR: function(S, x) {
return S = this.getDistXY(S, x), this.vectorLength(S);
},
getDistXY: function(S, x) {
var d = S.plotX - x.plotX;
return S = S.plotY - x.plotY, { x: d, y: S, absX: Math.abs(d), absY: Math.abs(S) };
}
}), y(h, "predraw", function() {
this.graphLayoutsLookup && this.graphLayoutsLookup.forEach(function(S) {
S.stop();
});
}), y(h, "render", function() {
function S(u) {
u.maxIterations-- && isFinite(u.temperature) && !u.isStable() && !u.enableSimulation && (u.beforeStep && u.beforeStep(), u.step(), d = !1, x = !0);
}
var x = !1;
if (this.graphLayoutsLookup) {
for (Z(!1, this), this.graphLayoutsLookup.forEach(function(u) {
u.start();
}); !d; ) {
var d = !0;
this.graphLayoutsLookup.forEach(S);
}
x && this.series.forEach(function(u) {
u && u.layout && u.render();
});
}
}), y(h, "beforePrint", function() {
this.graphLayoutsLookup && (this.graphLayoutsLookup.forEach(function(S) {
S.updateSimulation(!1);
}), this.redraw());
}), y(h, "afterPrint", function() {
this.graphLayoutsLookup && this.graphLayoutsLookup.forEach(function(S) {
S.updateSimulation();
}), this.redraw();
});
}), E(f, "Series/PackedBubble/PackedBubbleComposition.js", [f["Core/Chart/Chart.js"], f["Core/Globals.js"], f["Core/Utilities.js"]], function(h, y, B) {
var I = y.layouts["reingold-fruchterman"], Z = B.addEvent, F = B.extendClass, U = B.pick;
h.prototype.getSelectedParentNodes = function() {
var H = [];
return this.series.forEach(function(W) {
W.parentNode && W.parentNode.selected && H.push(W.parentNode);
}), H;
}, y.networkgraphIntegrations.packedbubble = { repulsiveForceFunction: function(H, W, R, S) {
return Math.min(H, (R.marker.radius + S.marker.radius) / 2);
}, barycenter: function() {
var H = this, W = H.options.gravitationalConstant, R = H.box, S = H.nodes, x, d;
S.forEach(function(u) {
H.options.splitSeries && !u.isParentNode ? (x = u.series.parentNode.plotX, d = u.series.parentNode.plotY) : (x = R.width / 2, d = R.height / 2), u.fixedPosition || (u.plotX -= (u.plotX - x) * W / (u.mass * Math.sqrt(S.length)), u.plotY -= (u.plotY - d) * W / (u.mass * Math.sqrt(S.length)));
});
}, repulsive: function(H, W, R, S) {
var x = W * this.diffTemperature / H.mass / H.degree;
W = R.x * x, R = R.y * x, H.fixedPosition || (H.plotX += W, H.plotY += R), S.fixedPosition || (S.plotX -= W, S.plotY -= R);
}, integrate: y.networkgraphIntegrations.verlet.integrate, getK: y.noop }, y.layouts.packedbubble = F(I, { beforeStep: function() {
this.options.marker && this.series.forEach(function(H) {
H && H.calculateParentRadius();
});
}, isStable: function() {
var H = Math.abs(this.prevSystemTemperature - this.systemTemperature);
return 1 > Math.abs(10 * this.systemTemperature / Math.sqrt(this.nodes.length)) && 1e-5 > H || 0 >= this.temperature;
}, setCircularPositions: function() {
var H = this, W = H.box, R = H.nodes, S = 2 * Math.PI / (R.length + 1), x, d, u = H.options.initialPositionRadius;
R.forEach(function(P, O) {
H.options.splitSeries && !P.isParentNode ? (x = P.series.parentNode.plotX, d = P.series.parentNode.plotY) : (x = W.width / 2, d = W.height / 2), P.plotX = P.prevX = U(P.plotX, x + u * Math.cos(P.index || O * S)), P.plotY = P.prevY = U(P.plotY, d + u * Math.sin(P.index || O * S)), P.dispX = 0, P.dispY = 0;
});
}, repulsiveForces: function() {
var H = this, W, R, S, x = H.options.bubblePadding;
H.nodes.forEach(function(d) {
d.degree = d.mass, d.neighbours = 0, H.nodes.forEach(function(u) {
W = 0, d === u || d.fixedPosition || !H.options.seriesInteraction && d.series !== u.series || (S = H.getDistXY(d, u), R = H.vectorLength(S) - (d.marker.radius + u.marker.radius + x), 0 > R && (d.degree += 0.01, d.neighbours++, W = H.repulsiveForce(-R / Math.sqrt(d.neighbours), H.k, d, u)), H.force("repulsive", d, W * u.mass, S, u, R));
});
});
}, applyLimitBox: function(H) {
if (this.options.splitSeries && !H.isParentNode && this.options.parentNodeLimit) {
var W = this.getDistXY(H, H.series.parentNode), R = H.series.parentNodeRadius - H.marker.radius - this.vectorLength(W);
0 > R && R > -2 * H.marker.radius && (H.plotX -= 0.01 * W.x, H.plotY -= 0.01 * W.y);
}
I.prototype.applyLimitBox.apply(this, arguments);
} }), Z(h, "beforeRedraw", function() {
this.allDataPoints && delete this.allDataPoints;
});
}), E(f, "Series/PackedBubble/PackedBubbleSeries.js", [f["Core/Color/Color.js"], f["Core/Globals.js"], f["Series/PackedBubble/PackedBubblePoint.js"], f["Core/Series/SeriesRegistry.js"], f["Core/Utilities.js"]], function(h, y, B, I, Z) {
var F = this && this.__extends || function() {
var w = function(v, a) {
return w = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(c, p) {
c.__proto__ = p;
} || function(c, p) {
for (var i in p)
p.hasOwnProperty(i) && (c[i] = p[i]);
}, w(v, a);
};
return function(v, a) {
function c() {
this.constructor = v;
}
w(v, a), v.prototype = a === null ? Object.create(a) : (c.prototype = a.prototype, new c());
};
}(), U = h.parse, H = I.series, W = I.seriesTypes.bubble, R = Z.addEvent, S = Z.clamp, x = Z.defined, d = Z.extend, u = Z.fireEvent, P = Z.isArray, O = Z.isNumber, N = Z.merge, C = Z.pick, b = y.dragNodesMixin;
return h = function(w) {
function v() {
var a = w !== null && w.apply(this, arguments) || this;
return a.chart = void 0, a.data = void 0, a.layout = void 0, a.options = void 0, a.points = void 0, a.xData = void 0, a;
}
return F(v, w), v.prototype.accumulateAllPoints = function(a) {
var c = a.chart, p = [], i, l;
for (i = 0; i < c.series.length; i++)
if (a = c.series[i], a.is("packedbubble") && a.visible || !c.options.chart.ignoreHiddenSeries)
for (l = 0; l < a.yData.length; l++)
p.push([null, null, a.yData[l], a.index, l, { id: l, marker: { radius: 0 } }]);
return p;
}, v.prototype.addLayout = function() {
var a = this.options.layoutAlgorithm, c = this.chart.graphLayoutsStorage, p = this.chart.graphLayoutsLookup, i = this.chart.options.chart;
c || (this.chart.graphLayoutsStorage = c = {}, this.chart.graphLayoutsLookup = p = []);
var l = c[a.type];
l || (a.enableSimulation = x(i.forExport) ? !i.forExport : a.enableSimulation, c[a.type] = l = new y.layouts[a.type](), l.init(a), p.splice(l.index, 0, l)), this.layout = l, this.points.forEach(function(s) {
s.mass = 2, s.degree = 1, s.collisionNmb = 1;
}), l.setArea(0, 0, this.chart.plotWidth, this.chart.plotHeight), l.addElementsToCollection([this], l.series), l.addElementsToCollection(this.points, l.nodes);
}, v.prototype.addSeriesLayout = function() {
var a = this.options.layoutAlgorithm, c = this.chart.graphLayoutsStorage, p = this.chart.graphLayoutsLookup, i = N(a, a.parentNodeOptions, { enableSimulation: this.layout.options.enableSimulation }), l = c[a.type + "-series"];
l || (c[a.type + "-series"] = l = new y.layouts[a.type](), l.init(i), p.splice(l.index, 0, l)), this.parentNodeLayout = l, this.createParentNodes();
}, v.prototype.calculateParentRadius = function() {
var a = this.seriesBox();
this.parentNodeRadius = S(Math.sqrt(2 * this.parentNodeMass / Math.PI) + 20, 20, a ? Math.max(Math.sqrt(Math.pow(
a.width,
2
) + Math.pow(a.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 a = this.options.zMin, c = this.options.zMax, p = 1 / 0, i = -1 / 0;
return a && c ? [a, c] : (this.chart.series.forEach(function(l) {
l.yData.forEach(function(s) {
x(s) && (s > i && (i = s), s < p && (p = s));
});
}), a = C(a, p), c = C(c, i), [a, c]);
}, v.prototype.checkOverlap = function(a, c) {
var p = a[0] - c[0], i = a[1] - c[1];
return -1e-3 > Math.sqrt(p * p + i * i) - Math.abs(a[2] + c[2]);
}, v.prototype.createParentNodes = function() {
var a = this, c = a.chart, p = a.parentNodeLayout, i, l = a.parentNode, s = a.pointClass, t = a.layout.options, o = { radius: a.parentNodeRadius, lineColor: a.color, fillColor: U(a.color).brighten(0.4).get() };
t.parentNodeOptions && (o = N(t.parentNodeOptions.marker || {}, o)), a.parentNodeMass = 0, a.points.forEach(function(n) {
a.parentNodeMass += Math.PI * Math.pow(n.marker.radius, 2);
}), a.calculateParentRadius(), p.nodes.forEach(function(n) {
n.seriesIndex === a.index && (i = !0);
}), p.setArea(0, 0, c.plotWidth, c.plotHeight), i || (l || (l = new s().init(this, { mass: a.parentNodeRadius / 2, marker: o, dataLabels: { inside: !1 }, states: { normal: { marker: o }, hover: { marker: o } }, dataLabelOnNull: !0, degree: a.parentNodeRadius, isParentNode: !0, seriesIndex: a.index })), a.parentNode && (l.plotX = a.parentNode.plotX, l.plotY = a.parentNode.plotY), a.parentNode = l, p.addElementsToCollection([a], p.series), p.addElementsToCollection([l], p.nodes));
}, v.prototype.deferLayout = function() {
var a = this.options.layoutAlgorithm;
this.visible && (this.addLayout(), a.splitSeries && this.addSeriesLayout());
}, v.prototype.destroy = function() {
this.chart.graphLayoutsLookup && this.chart.graphLayoutsLookup.forEach(function(a) {
a.removeElementFromCollection(this, a.series);
}, this), this.parentNode && this.parentNodeLayout && (this.parentNodeLayout.removeElementFromCollection(this.parentNode, this.parentNodeLayout.nodes), this.parentNode.dataLabel && (this.parentNode.dataLabel = this.parentNode.dataLabel.destroy())), H.prototype.destroy.apply(this, arguments);
}, v.prototype.drawDataLabels = function() {
var a = this.options.dataLabels.textPath, c = this.points;
H.prototype.drawDataLabels.apply(this, arguments), this.parentNode && (this.parentNode.formatPrefix = "parentNode", this.points = [this.parentNode], this.options.dataLabels.textPath = this.options.dataLabels.parentNodeTextPath, H.prototype.drawDataLabels.apply(this, arguments), this.points = c, this.options.dataLabels.textPath = a);
}, v.prototype.drawGraph = function() {
if (this.layout && this.layout.options.splitSeries) {
var a = this.chart, c = this.layout.options.parentNodeOptions.marker, p = { fill: c.fillColor || U(this.color).brighten(0.4).get(), opacity: c.fillOpacity, stroke: c.lineColor || this.color, "stroke-width": C(c.lineWidth, this.options.lineWidth) };
this.parentNodesGroup || (this.parentNodesGroup = this.plotGroup("parentNodesGroup", "parentNode", this.visible ? "inherit" : "hidden", 0.1, a.seriesGroup), this.group.attr({ zIndex: 2 })), this.calculateParentRadius(), c = N({
x: this.parentNode.plotX - this.parentNodeRadius,
y: this.parentNode.plotY - this.parentNodeRadius,
width: 2 * this.parentNodeRadius,
height: 2 * this.parentNodeRadius
}, p), this.parentNode.graphic || (this.graph = this.parentNode.graphic = a.renderer.symbol(p.symbol).add(this.parentNodesGroup)), this.parentNode.graphic.attr(c);
}
}, v.prototype.drawTracker = function() {
var a = this.parentNode;
if (w.prototype.drawTracker.call(this), a) {
var c = P(a.dataLabels) ? a.dataLabels : a.dataLabel ? [a.dataLabel] : [];
a.graphic && (a.graphic.element.point = a), c.forEach(function(p) {
p.div ? p.div.point = a : p.element.point = a;
});
}
}, v.prototype.getPointRadius = function() {
var a = this, c = a.chart, p = a.options, i = p.useSimulation, l = Math.min(c.plotWidth, c.plotHeight), s = {}, t = [], o = c.allDataPoints, n, A, _, D;
["minSize", "maxSize"].forEach(function(T) {
var X = parseInt(p[T], 10), g = /%$/.test(p[T]);
s[T] = g ? l * X / 100 : X * Math.sqrt(o.length);
}), c.minRadius = n = s.minSize / Math.sqrt(o.length), c.maxRadius = A = s.maxSize / Math.sqrt(o.length);
var j = i ? a.calculateZExtremes() : [n, A];
(o || []).forEach(function(T, X) {
_ = i ? S(T[2], j[0], j[1]) : T[2], D = a.getRadius(j[0], j[1], n, A, _), D === 0 && (D = null), o[X][2] = D, t.push(D);
}), a.radii = t;
}, v.prototype.init = function() {
return H.prototype.init.apply(this, arguments), this.eventsToUnbind.push(R(this, "updatedData", function() {
this.chart.series.forEach(function(a) {
a.type === this.type && (a.isDirty = !0);
}, this);
})), this;
}, v.prototype.onMouseUp = function(a) {
if (a.fixedPosition && !a.removed) {
var c, p, i = this.layout, l = this.parentNodeLayout;
l && i.options.dragBetweenSeries && l.nodes.forEach(function(s) {
a && a.marker && s !== a.series.parentNode && (c = i.getDistXY(a, s), p = i.vectorLength(c) - s.marker.radius - a.marker.radius, 0 > p && (s.series.addPoint(N(a.options, { plotX: a.plotX, plotY: a.plotY }), !1), i.removeElementFromCollection(a, i.nodes), a.remove()));
}), b.onMouseUp.apply(this, arguments);
}
}, v.prototype.placeBubbles = function(a) {
var c = this.checkOverlap, p = this.positionBubble, i = [], l = 1, s = 0, t = 0, o = [], n;
if (a = a.sort(function(A, _) {
return _[2] - A[2];
}), a.length) {
if (i.push([[0, 0, a[0][2], a[0][3], a[0][4]]]), 1 < a.length)
for (i.push([[0, 0 - a[1][2] - a[0][2], a[1][2], a[1][3], a[1][4]]]), n = 2; n < a.length; n++)
a[n][2] = a[n][2] || 1, o = p(i[l][s], i[l - 1][t], a[n]), c(o, i[l][0]) ? (i.push([]), t = 0, i[l + 1].push(p(i[l][s], i[l][0], a[n])), l++, s = 0) : 1 < l && i[l - 1][t + 1] && c(o, i[l - 1][t + 1]) ? (t++, i[l].push(p(i[l][s], i[l - 1][t], a[n])), s++) : (s++, i[l].push(o));
this.chart.stages = i, this.chart.rawPositions = [].concat.apply([], i), this.resizeRadius(), o = this.chart.rawPositions;
}
return o;
}, v.prototype.pointAttribs = function(a, c) {
var p = this.options, i = p.marker;
return a && a.isParentNode && p.layoutAlgorithm && p.layoutAlgorithm.parentNodeOptions && (i = p.layoutAlgorithm.parentNodeOptions.marker), p = i.fillOpacity, a = H.prototype.pointAttribs.call(this, a, c), p !== 1 && (a["fill-opacity"] = p), a;
}, v.prototype.positionBubble = function(a, c, p) {
var i = Math.sqrt, l = Math.asin, s = Math.acos, t = Math.pow, o = Math.abs;
return i = i(t(a[0] - c[0], 2) + t(a[1] - c[1], 2)), s = s((t(i, 2) + t(p[2] + c[2], 2) - t(p[2] + a[2], 2)) / (2 * (p[2] + c[2]) * i)), l = l(o(a[0] - c[0]) / i), a = (0 > a[1] - c[1] ? 0 : Math.PI) + s + l * (0 > (a[0] - c[0]) * (a[1] - c[1]) ? 1 : -1), [c[0] + (c[2] + p[2]) * Math.sin(a), c[1] - (c[2] + p[2]) * Math.cos(a), p[2], p[3], p[4]];
}, v.prototype.render = function() {
var a = [];
H.prototype.render.apply(this, arguments), this.options.dataLabels.allowOverlap || (this.data.forEach(function(c) {
P(c.dataLabels) && c.dataLabels.forEach(function(p) {
a.push(p);
});
}), this.options.useSimulation && this.chart.hideOverlappingLabels(a));
}, v.prototype.resizeRadius = function() {
var a = this.chart, c = a.rawPositions, p = Math.min, i = Math.max, l = a.plotLeft, s = a.plotTop, t = a.plotHeight, o = a.plotWidth, n, A, _, D = n = Number.POSITIVE_INFINITY, j = A = Number.NEGATIVE_INFINITY;
for (_ = 0; _ < c.length; _++) {
var T = c[_][2];
D = p(
D,
c[_][0] - T
), j = i(j, c[_][0] + T), n = p(n, c[_][1] - T), A = i(A, c[_][1] + T);
}
if (_ = [j - D, A - n], p = p.apply([], [(o - l) / _[0], (t - s) / _[1]]), 1e-10 < Math.abs(p - 1)) {
for (_ = 0; _ < c.length; _++)
c[_][2] *= p;
this.placeBubbles(c);
} else
a.diffY = t / 2 + s - n - (A - n) / 2, a.diffX = o / 2 + l - D - (j - D) / 2;
}, v.prototype.seriesBox = function() {
var a = this.chart, c = Math.max, p = Math.min, i, l = [a.plotLeft, a.plotLeft + a.plotWidth, a.plotTop, a.plotTop + a.plotHeight];
return this.data.forEach(function(s) {
x(s.plotX) && x(s.plotY) && s.marker.radius && (i = s.marker.radius, l[0] = p(l[0], s.plotX - i), l[1] = c(l[1], s.plotX + i), l[2] = p(l[2], s.plotY - i), l[3] = c(l[3], s.plotY + i));
}), O(l.width / l.height) ? l : null;
}, v.prototype.setVisible = function() {
var a = this;
H.prototype.setVisible.apply(a, arguments), a.parentNodeLayout && a.graph ? a.visible ? (a.graph.show(), a.parentNode.dataLabel && a.parentNode.dataLabel.show()) : (a.graph.hide(), a.parentNodeLayout.removeElementFromCollection(a.parentNode, a.parentNodeLayout.nodes), a.parentNode.dataLabel && a.parentNode.dataLabel.hide()) : a.layout && (a.visible ? a.layout.addElementsToCollection(
a.points,
a.layout.nodes
) : a.points.forEach(function(c) {
a.layout.removeElementFromCollection(c, a.layout.nodes);
}));
}, v.prototype.translate = function() {
var a = this.chart, c = this.data, p = this.index, i, l = this.options.useSimulation;
if (this.processedXData = this.xData, this.generatePoints(), x(a.allDataPoints) || (a.allDataPoints = this.accumulateAllPoints(this), this.getPointRadius()), l)
var s = a.allDataPoints;
else
s = this.placeBubbles(a.allDataPoints), this.options.draggable = !1;
for (i = 0; i < s.length; i++)
if (s[i][3] === p) {
var t = c[s[i][4]], o = C(s[i][2], void 0);
l || (t.plotX = s[i][0] - a.plotLeft + a.diffX, t.plotY = s[i][1] - a.plotTop + a.diffY), O(o) && (t.marker = d(t.marker, { radius: o, width: 2 * o, height: 2 * o }), t.radius = o);
}
l && this.deferLayout(), u(this, "afterTranslate");
}, v.defaultOptions = N(W.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 a = this.series.chart.numberFormatter, c = this.point.value;
return O(c) ? a(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;
}(W), d(h.prototype, {
alignDataLabel: H.prototype.alignDataLabel,
axisTypes: [],
directTouch: !0,
forces: ["barycenter", "repulsive"],
hasDraggableNodes: !0,
isCartesian: !1,
noSharedTooltip: !0,
onMouseDown: b.onMouseDown,
onMouseMove: b.onMouseMove,
pointArrayMap: ["value"],
pointClass: B,
pointValKey: "value",
redrawHalo: b.redrawHalo,
requireSorting: !1,
searchPoint: y.noop,
trackerGroups: ["group", "dataLabelsGroup", "parentNodesGroup"]
}), I.registerSeriesType("packedbubble", h), h;
}), E(f, "Series/Polygon/PolygonSeries.js", [f["Core/Globals.js"], f["Core/Legend/LegendSymbol.js"], f["Core/Series/SeriesRegistry.js"], f["Core/Utilities.js"]], function(h, y, B, I) {
var Z = this && this.__extends || function() {
var x = function(d, u) {
return x = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(P, O) {
P.__proto__ = O;
} || function(P, O) {
for (var N in O)
O.hasOwnProperty(N) && (P[N] = O[N]);
}, x(d, u);
};
return function(d, u) {
function P() {
this.constructor = d;
}
x(d, u), d.prototype = u === null ? Object.create(u) : (P.prototype = u.prototype, new P());
};
}();
h = h.noop;
var F = B.series, U = B.seriesTypes, H = U.area, W = U.line, R = U.scatter;
U = I.extend;
var S = I.merge;
return I = function(x) {
function d() {
var u = x !== null && x.apply(this, arguments) || this;
return u.data = void 0, u.options = void 0, u.points = void 0, u;
}
return Z(d, x), d.prototype.getGraphPath = function() {
for (var u = W.prototype.getGraphPath.call(this), P = u.length + 1; P--; )
(P === u.length || u[P][0] === "M") && 0 < P && u.splice(P, 0, ["Z"]);
return this.areaPath = u;
}, d.prototype.drawGraph = function() {
this.options.fillColor = this.color, H.prototype.drawGraph.call(this);
}, d.defaultOptions = S(R.defaultOptions, { marker: { enabled: !1, states: { hover: { enabled: !1 } } }, stickyTracking: !1, tooltip: { followPointer: !0, pointFormat: "" }, trackByArea: !0 }), d;
}(R), U(I.prototype, { type: "polygon", drawLegendSymbol: y.drawRectangle, drawTracker: F.prototype.drawTracker, setStackedPoints: h }), B.registerSeriesType("polygon", I), I;
}), E(f, "Core/Axis/WaterfallAxis.js", [f["Extensions/Stacking.js"], f["Core/Utilities.js"]], function(h, y) {
var B = y.addEvent, I = y.objectEach, Z;
return function(F) {
function U() {
var x = this.waterfall.stacks;
x && (x.changed = !1, delete x.alreadyChanged);
}
function H() {
var x = this.options.stackLabels;
x && x.enabled && this.waterfall.stacks && this.waterfall.renderStackTotals();
}
function W() {
for (var x = this.axes, d = this.series, u = d.length; u--; )
d[u].options.stacking && (x.forEach(function(P) {
P.isXAxis || (P.waterfall.stacks.changed = !0);
}), u = 0);
}
function R() {
this.waterfall || (this.waterfall = new S(this));
}
var S = function() {
function x(d) {
this.axis = d, this.stacks = { changed: !1 };
}
return x.prototype.renderStackTotals = function() {
var d = this.axis, u = d.waterfall.stacks, P = d.stacking && d.stacking.stackTotalGroup, O = new h(d, d.options.stackLabels, !1, 0, void 0);
this.dummyStackItem = O, I(u, function(N) {
I(N, function(C) {
O.total = C.stackTotal, C.label && (O.label = C.label), h.prototype.render.call(O, P), C.label = O.label, delete O.label;
});
}), O.total = null;
}, x;
}();
F.Composition = S, F.compose = function(x, d) {
B(x, "init", R), B(x, "afterBuildStacks", U), B(x, "afterRender", H), B(d, "beforeRedraw", W);
};
}(Z || (Z = {})), Z;
}), E(f, "Series/Waterfall/WaterfallPoint.js", [f["Series/Column/ColumnSeries.js"], f["Core/Series/Point.js"], f["Core/Utilities.js"]], function(h, y, B) {
var I = this && this.__extends || function() {
var F = function(U, H) {
return F = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(W, R) {
W.__proto__ = R;
} || function(W, R) {
for (var S in R)
R.hasOwnProperty(S) && (W[S] = R[S]);
}, F(U, H);
};
return function(U, H) {
function W() {
this.constructor = U;
}
F(U, H), U.prototype = H === null ? Object.create(H) : (W.prototype = H.prototype, new W());
};
}(), Z = B.isNumber;
return function(F) {
function U() {
var H = F !== null && F.apply(this, arguments) || this;
return H.options = void 0, H.series = void 0, H;
}
return I(U, F), U.prototype.getClassName = function() {
var H = y.prototype.getClassName.call(this);
return this.isSum ? H += " highcharts-sum" : this.isIntermediateSum && (H += " highcharts-intermediate-sum"), H;
}, U.prototype.isValid = function() {
return Z(this.y) || this.isSum || !!this.isIntermediateSum;
}, U;
}(h.prototype.pointClass);
}), E(f, "Series/Waterfall/WaterfallSeries.js", [f["Core/Axis/Axis.js"], f["Core/Chart/Chart.js"], f["Core/Series/SeriesRegistry.js"], f["Core/Utilities.js"], f["Core/Axis/WaterfallAxis.js"], f["Series/Waterfall/WaterfallPoint.js"]], function(h, y, B, I, Z, F) {
var U = this && this.__extends || function() {
var C = function(b, w) {
return C = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(v, a) {
v.__proto__ = a;
} || function(v, a) {
for (var c in a)
a.hasOwnProperty(c) && (v[c] = a[c]);
}, C(b, w);
};
return function(b, w) {
function v() {
this.constructor = b;
}
C(b, w), b.prototype = w === null ? Object.create(w) : (v.prototype = w.prototype, new v());
};
}(), H = B.seriesTypes, W = H.column, R = H.line, S = I.arrayMax, x = I.arrayMin, d = I.correctFloat;
H = I.extend;
var u = I.isNumber, P = I.merge, O = I.objectEach, N = I.pick;
return I = function(C) {
function b() {
var w = C !== null && C.apply(this, arguments) || this;
return w.chart = void 0, w.data = void 0, w.options = void 0, w.points = void 0, w.stackedYNeg = void 0, w.stackedYPos = void 0, w.stackKey = void 0, w.xData = void 0, w.yAxis = void 0, w.yData = void 0, w;
}
return U(b, C), b.prototype.generatePoints = function() {
var w;
W.prototype.generatePoints.apply(this);
var v = 0;
for (w = this.points.length; v < w; v++) {
var a = this.points[v], c = this.processedYData[v];
(a.isIntermediateSum || a.isSum) && (a.y = d(c));
}
}, b.prototype.translate = function() {
var w = this.options, v = this.yAxis, a = N(w.minPointLength, 5), c = a / 2, p = w.threshold || 0, i = p, l = p;
w = w.stacking;
var s = v.waterfall.stacks[this.stackKey];
W.prototype.translate.apply(this);
for (var t = this.points, o = 0; o < t.length; o++) {
var n = t[o], A = this.processedYData[o], _ = n.shapeArgs;
if (_ && u(A)) {
var D = [0, A], j = n.y;
if (w) {
if (s) {
if (D = s[o], w === "overlap") {
var T = D.stackState[D.stateIndex--];
T = 0 <= j ? T : T - j, Object.hasOwnProperty.call(D, "absolutePos") && delete D.absolutePos, Object.hasOwnProperty.call(D, "absoluteNeg") && delete D.absoluteNeg;
} else
0 <= j ? (T = D.threshold + D.posTotal, D.posTotal -= j) : (T = D.threshold + D.negTotal, D.negTotal -= j, T -= j), !D.posTotal && Object.hasOwnProperty.call(D, "absolutePos") && (D.posTotal = D.absolutePos, delete D.absolutePos), !D.negTotal && Object.hasOwnProperty.call(D, "absoluteNeg") && (D.negTotal = D.absoluteNeg, delete D.absoluteNeg);
n.isSum || (D.connectorThreshold = D.threshold + D.stackTotal), v.reversed ? (A = 0 <= j ? T - j : T + j, j = T) : (A = T, j = T - j), n.below = A <= p, _.y = v.translate(A, !1, !0, !1, !0) || 0, _.height = Math.abs(_.y - (v.translate(j, !1, !0, !1, !0) || 0)), (j = v.waterfall.dummyStackItem) && (j.x = o, j.label = s[o].label, j.setOffset(this.pointXOffset || 0, this.barW || 0, this.stackedYNeg[o], this.stackedYPos[o]));
}
} else
T = Math.max(i, i + j) + D[0], _.y = v.translate(
T,
!1,
!0,
!1,
!0
) || 0, n.isSum ? (_.y = v.translate(D[1], !1, !0, !1, !0) || 0, _.height = Math.min(v.translate(D[0], !1, !0, !1, !0) || 0, v.len) - _.y, n.below = D[1] <= p) : n.isIntermediateSum ? (0 <= j ? (A = D[1] + l, j = l) : (A = l, j = D[1] + l), v.reversed && (A ^= j, j ^= A, A ^= j), _.y = v.translate(A, !1, !0, !1, !0) || 0, _.height = Math.abs(_.y - Math.min(v.translate(j, !1, !0, !1, !0) || 0, v.len)), l += D[1], n.below = A <= p) : (_.height = 0 < A ? (v.translate(i, !1, !0, !1, !0) || 0) - _.y : (v.translate(i, !1, !0, !1, !0) || 0) - (v.translate(i - A, !1, !0, !1, !0) || 0), i += A, n.below = i < p), 0 > _.height && (_.y += _.height, _.height *= -1);
n.plotY = _.y = Math.round(_.y || 0) - this.borderWidth % 2 / 2, _.height = Math.max(Math.round(_.height || 0), 1e-3), n.yBottom = _.y + _.height, _.height <= a && !n.isNull ? (_.height = a, _.y -= c, n.plotY = _.y, n.minPointLengthOffset = 0 > n.y ? -c : c) : (n.isNull && (_.width = 0), n.minPointLengthOffset = 0), j = n.plotY + (n.negative ? _.height : 0), n.below && (n.plotY += _.height), n.tooltipPos && (this.chart.inverted ? n.tooltipPos[0] = v.len - j : n.tooltipPos[1] = j);
}
}
}, b.prototype.processData = function(w) {
var v = this.options, a = this.yData, c = v.data, p = a.length, i = v.threshold || 0, l, s, t, o, n;
for (n = s = l = t = o = 0; n < p; n++) {
var A = a[n], _ = c && c[n] ? c[n] : {};
A === "sum" || _.isSum ? a[n] = d(s) : A === "intermediateSum" || _.isIntermediateSum ? (a[n] = d(l), l = 0) : (s += A, l += A), t = Math.min(s, t), o = Math.max(s, o);
}
C.prototype.processData.call(this, w), v.stacking || (this.dataMin = t + i, this.dataMax = o);
}, b.prototype.toYData = function(w) {
return w.isSum ? "sum" : w.isIntermediateSum ? "intermediateSum" : w.y;
}, b.prototype.updateParallelArrays = function(w, v) {
C.prototype.updateParallelArrays.call(this, w, v), (this.yData[0] === "sum" || this.yData[0] === "intermediateSum") && (this.yData[0] = null);
}, b.prototype.pointAttribs = function(w, v) {
var a = this.options.upColor;
return a && !w.options.color && (w.color = 0 < w.y ? a : null), w = W.prototype.pointAttribs.call(this, w, v), delete w.dashstyle, w;
}, b.prototype.getGraphPath = function() {
return [["M", 0, 0]];
}, b.prototype.getCrispPath = function() {
var w = this.data, v = this.yAxis, a = w.length, c = Math.round(this.graph.strokeWidth()) % 2 / 2, p = Math.round(this.borderWidth) % 2 / 2, i = this.xAxis.reversed, l = this.yAxis.reversed, s = this.options.stacking, t = [], o;
for (o = 1; o < a; o++) {
var n = w[o].shapeArgs, A = w[o - 1], _ = w[o - 1].shapeArgs, D = v.waterfall.stacks[this.stackKey], j = 0 < A.y ? -_.height : 0;
D && _ && n && (D = D[o - 1], s ? (D = D.connectorThreshold, j = Math.round(v.translate(D, 0, 1, 0, 1) + (l ? j : 0)) - c) : j = _.y + A.minPointLengthOffset + p - c, t.push(["M", (_.x || 0) + (i ? 0 : _.width || 0), j], ["L", (n.x || 0) + (i && n.width || 0), j])), _ && t.length && (!s && 0 > A.y && !l || 0 < A.y && l) && ((A = t[t.length - 2]) && typeof A[2] == "number" && (A[2] += _.height || 0), (A = t[t.length - 1]) && typeof A[2] == "number" && (A[2] += _.height || 0));
}
return t;
}, b.prototype.drawGraph = function() {
R.prototype.drawGraph.call(this), this.graph.attr({ d: this.getCrispPath() });
}, b.prototype.setStackedPoints = function() {
function w(V, Q, k, G) {
if (Y)
for (k; k < Y; k++)
X.stackState[k] += G;
else
X.stackState[0] = V, Y = X.stackState.length;
X.stackState.push(X.stackState[Y - 1] + Q);
}
var v = this.options, a = this.yAxis.waterfall.stacks, c = v.threshold, p = c || 0, i = p, l = this.stackKey, s = this.xData, t = s.length, o, n, A;
this.yAxis.stacking.usePercentage = !1;
var _ = n = A = p;
if (this.visible || !this.chart.options.chart.ignoreHiddenSeries) {
var D = a.changed;
(o = a.alreadyChanged) && 0 > o.indexOf(l) && (D = !0), a[l] || (a[l] = {}), o = a[l];
for (var j = 0; j < t; j++) {
var T = s[j];
(!o[T] || D) && (o[T] = { negTotal: 0, posTotal: 0, stackTotal: 0, threshold: 0, stateIndex: 0, stackState: [], label: D && o[T] ? o[T].label : void 0 });
var X = o[T], g = this.yData[j];
0 <= g ? X.posTotal += g : X.negTotal += g;
var m = v.data[j];
T = X.absolutePos = X.posTotal;
var L = X.absoluteNeg = X.negTotal;
X.stackTotal = T + L;
var Y = X.stackState.length;
m && m.isIntermediateSum ? (w(A, n, 0, A), A = n, n = c, p ^= i, i ^= p, p ^= i) : m && m.isSum ? (w(c, _, Y), p = c) : (w(p, g, 0, _), m && (_ += g, n += g)), X.stateIndex++, X.threshold = p, p += X.stackTotal;
}
a.changed = !1, a.alreadyChanged || (a.alreadyChanged = []), a.alreadyChanged.push(l);
}
}, b.prototype.getExtremes = function() {
var w = this.options.stacking;
if (w) {
var v = this.yAxis;
v = v.waterfall.stacks;
var a = this.stackedYNeg = [], c = this.stackedYPos = [];
return w === "overlap" ? O(v[this.stackKey], function(p) {
a.push(x(p.stackState)), c.push(S(p.stackState));
}) : O(v[this.stackKey], function(p) {
a.push(p.negTotal + p.threshold), c.push(p.posTotal + p.threshold);
}), { dataMin: x(a), dataMax: S(c) };
}
return { dataMin: this.dataMin, dataMax: this.dataMax };
}, b.defaultOptions = P(W.defaultOptions, { dataLabels: { inside: !0 }, lineWidth: 1, lineColor: "#333333", dashStyle: "Dot", borderColor: "#333333", states: { hover: { lineWidthPlus: 0 } } }), b;
}(W), H(I.prototype, { getZonesGraphs: R.prototype.getZonesGraphs, pointValKey: "y", showLine: !0, pointClass: F }), B.registerSeriesType("waterfall", I), Z.compose(h, y), I;
}), E(f, "Extensions/Polar.js", [
f["Core/Animation/AnimationUtilities.js"],
f["Core/Chart/Chart.js"],
f["Core/Globals.js"],
f["Extensions/Pane.js"],
f["Core/Pointer.js"],
f["Core/Series/Series.js"],
f["Core/Series/SeriesRegistry.js"],
f["Core/Renderer/SVG/SVGRenderer.js"],
f["Core/Utilities.js"]
], function(h, y, B, I, Z, F, U, H, W) {
var R = h.animObject;
U = U.seriesTypes;
var S = W.addEvent, x = W.defined, d = W.find, u = W.isNumber, P = W.pick, O = W.splat, N = W.uniqueKey;
h = W.wrap;
var C = F.prototype;
Z = Z.prototype, C.searchPointByAngle = function(v) {
var a = this.chart, c = this.xAxis.pane.center;
return this.searchKDTree({ clientX: 180 + -180 / Math.PI * Math.atan2(v.chartX - c[0] - a.plotLeft, v.chartY - c[1] - a.plotTop) });
}, C.getConnectors = function(v, a, c, p) {
var i = p ? 1 : 0, l = 0 <= a && a <= v.length - 1 ? a : 0 > a ? v.length - 1 + a : 0;
a = 0 > l - 1 ? v.length - (1 + i) : l - 1, i = l + 1 > v.length - 1 ? i : l + 1;
var s = v[a];
i = v[i];
var t = s.plotX;
s = s.plotY;
var o = i.plotX, n = i.plotY;
i = v[l].plotX, l = v[l].plotY, t = (1.5 * i + t) / 2.5, s = (1.5 * l + s) / 2.5, o = (1.5 * i + o) / 2.5;
var A = (1.5 * l + n) / 2.5;
n = Math.sqrt(Math.pow(t - i, 2) + Math.pow(s - l, 2));
var _ = Math.sqrt(Math.pow(o - i, 2) + Math.pow(A - l, 2));
return t = Math.atan2(s - l, t - i), A = Math.PI / 2 + (t + Math.atan2(A - l, o - i)) / 2, Math.abs(t - A) > Math.PI / 2 && (A -= Math.PI), t = i + Math.cos(A) * n, s = l + Math.sin(A) * n, o = i + Math.cos(Math.PI + A) * _, A = l + Math.sin(Math.PI + A) * _, i = { rightContX: o, rightContY: A, leftContX: t, leftContY: s, plotX: i, plotY: l }, c && (i.prevPointCont = this.getConnectors(v, a, !1, p)), i;
}, C.toXY = function(v) {
var a = this.chart, c = this.xAxis, p = this.yAxis, i = v.plotX, l = v.plotY, s = v.series, t = a.inverted, o = v.y, n = t ? i : p.len - l;
t && s && !s.isRadialBar && (v.plotY = l = typeof o == "number" && p.translate(o) || 0), v.rectPlotX = i, v.rectPlotY = l, p.center && (n += p.center[3] / 2), u(l) && (p = t ? p.postTranslate(l, n) : c.postTranslate(i, n), v.plotX = v.polarPlotX = p.x - a.plotLeft, v.plotY = v.polarPlotY = p.y - a.plotTop), this.kdByAngle ? (a = (i / Math.PI * 180 + c.pane.options.startAngle) % 360, 0 > a && (a += 360), v.clientX = a) : v.clientX = v.plotX;
}, U.spline && (h(U.spline.prototype, "getPointSpline", function(v, a, c, p) {
return this.chart.polar ? p ? (v = this.getConnectors(a, p, !0, this.connectEnds), a = v.prevPointCont && v.prevPointCont.rightContX, c = v.prevPointCont && v.prevPointCont.rightContY, v = ["C", u(a) ? a : v.plotX, u(c) ? c : v.plotY, u(v.leftContX) ? v.leftContX : v.plotX, u(v.leftContY) ? v.leftContY : v.plotY, v.plotX, v.plotY]) : v = ["M", c.plotX, c.plotY] : v = v.call(this, a, c, p), v;
}), U.areasplinerange && (U.areasplinerange.prototype.getPointSpline = U.spline.prototype.getPointSpline)), S(F, "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 a = this.points, c = a.length; c--; )
this.toXY(a[c]), !v.hasParallelCoordinates && !this.yAxis.reversed && a[c].y < this.yAxis.min && (a[c].isNull = !0);
this.hasClipCircleSetter || (this.hasClipCircleSetter = !!this.eventsToUnbind.push(S(this, "afterRender", function() {
if (v.polar) {
var p = this.yAxis.pane.center;
this.clipCircle ? this.clipCircle.animate({ x: p[0], y: p[1], r: p[2] / 2, innerR: p[3] / 2 }) : this.clipCircle = v.renderer.clipCircle(p[0], p[1], p[2] / 2, p[3] / 2), this.group.clip(this.clipCircle), this.setClip = B.noop;
}
})));
}
}, { order: 2 }), h(
U.line.prototype,
"getGraphPath",
function(v, a) {
var c = this, p;
if (this.chart.polar) {
for (a = a || this.points, p = 0; p < a.length; p++)
if (!a[p].isNull) {
var i = p;
break;
}
if (this.options.connectEnds !== !1 && typeof i < "u") {
this.connectEnds = !0, a.splice(a.length, 0, a[i]);
var l = !0;
}
a.forEach(function(s) {
typeof s.polarPlotY > "u" && c.toXY(s);
});
}
return p = v.apply(this, [].slice.call(arguments, 1)), l && a.pop(), p;
}
);
var b = function(v, a) {
var c = this, p = this.chart, i = this.options.animation, l = this.group, s = this.markerGroup, t = this.xAxis && this.xAxis.center, o = p.plotLeft, n = p.plotTop, A, _, D, j;
if (p.polar) {
if (c.isRadialBar)
a || (c.startAngleRad = P(c.translatedThreshold, c.xAxis.startAngleRad), B.seriesTypes.pie.prototype.animate.call(c, a));
else if (p.renderer.isSVG)
if (i = R(i), c.is("column")) {
if (!a) {
var T = t[3] / 2;
c.points.forEach(function(X) {
A = X.graphic, D = (_ = X.shapeArgs) && _.r, j = _ && _.innerR, A && _ && (A.attr({ r: T, innerR: T }), A.animate({ r: D, innerR: j }, c.options.animation));
});
}
} else
a ? (v = { translateX: t[0] + o, translateY: t[1] + n, scaleX: 1e-3, scaleY: 1e-3 }, l.attr(v), s && s.attr(v)) : (v = { translateX: o, translateY: n, scaleX: 1, scaleY: 1 }, l.animate(v, i), s && s.animate(v, i));
} else
v.call(this, a);
};
if (h(C, "animate", b), U.column) {
var w = U.arearange.prototype;
U = U.column.prototype, U.polarArc = function(v, a, c, p) {
var i = this.xAxis.center, l = this.yAxis.len, s = i[3] / 2;
return a = l - a + s, v = l - P(v, l) + s, this.yAxis.reversed && (0 > a && (a = s), 0 > v && (v = s)), { x: i[0], y: i[1], r: a, innerR: v, start: c, end: p };
}, h(U, "animate", b), h(U, "translate", function(v) {
var a = this.options, c = a.stacking, p = this.chart, i = this.xAxis, l = this.yAxis, s = l.reversed, t = l.center, o = i.startAngleRad, n = i.endAngleRad - o;
if (this.preventPostTranslate = !0, v.call(this), i.isRadial) {
v = this.points, i = v.length;
var A = l.translate(l.min), _ = l.translate(l.max);
if (a = a.threshold || 0, p.inverted && u(a)) {
var D = l.translate(a);
x(D) && (0 > D ? D = 0 : D > n && (D = n), this.translatedThreshold = D + o);
}
for (; i--; ) {
a = v[i];
var j = a.barX, T = a.x, X = a.y;
if (a.shapeType = "arc", p.inverted) {
if (a.plotY = l.translate(X), c && l.stacking) {
if (X = l.stacking.stacks[(0 > X ? "-" : "") + this.stackKey], this.visible && X && X[T] && !a.isNull) {
var g = X[T].points[this.getStackIndicator(void 0, T, this.index).key], m = l.translate(g[0]);
g = l.translate(g[1]), x(m) && (m = W.clamp(m, 0, n));
}
} else
m = D, g = a.plotY;
m > g && (g = [m, m = g][0]), s ? g > A ? g = A : m < _ ? m = _ : (m > A || g < _) && (m = g = n) : m < A ? m = A : g > _ ? g = _ : (g < A || m > _) && (m = g = 0), l.min > l.max && (m = g = s ? n : 0), m += o, g += o, t && (a.barX = j += t[3] / 2), T = Math.max(j, 0), X = Math.max(j + a.pointWidth, 0), a.shapeArgs = { x: t && t[0], y: t && t[1], r: X, innerR: T, start: m, end: g }, a.opacity = m === g ? 0 : void 0, a.plotY = (x(this.translatedThreshold) && (m < this.translatedThreshold ? m : g)) - o;
} else
m = j + o, a.shapeArgs = this.polarArc(a.yBottom, a.plotY, m, m + a.pointWidth);
this.toXY(a), p.inverted ? (j = l.postTranslate(a.rectPlotY, j + a.pointWidth / 2), a.tooltipPos = [j.x - p.plotLeft, j.y - p.plotTop]) : a.tooltipPos = [a.plotX, a.plotY], t && (a.ttBelow = a.plotY > t[1]);
}
}
}), U.findAlignments = function(v, a) {
return a.align === null && (a.align = 20 < v && 160 > v ? "left" : 200 < v && 340 > v ? "right" : "center"), a.verticalAlign === null && (a.verticalAlign = 45 > v || 315 < v ? "bottom" : 135 < v && 225 > v ? "top" : "middle"), a;
}, w && (w.findAlignments = U.findAlignments), h(U, "alignDataLabel", function(v, a, c, p, i, l) {
var s = this.chart, t = P(p.inside, !!this.options.stacking);
s.polar ? (v = a.rectPlotX / Math.PI * 180, s.inverted ? (this.forceDL = s.isInsidePlot(a.plotX, Math.round(a.plotY)), t && a.shapeArgs ? (i = a.shapeArgs, i = this.yAxis.postTranslate(((i.start || 0) + (i.end || 0)) / 2 - this.xAxis.startAngleRad, a.barX + a.pointWidth / 2), i = { x: i.x - s.plotLeft, y: i.y - s.plotTop }) : a.tooltipPos && (i = { x: a.tooltipPos[0], y: a.tooltipPos[1] }), p.align = P(p.align, "center"), p.verticalAlign = P(
p.verticalAlign,
"middle"
)) : this.findAlignments && (p = this.findAlignments(v, p)), C.alignDataLabel.call(this, a, c, p, i, l), this.isRadialBar && a.shapeArgs && a.shapeArgs.start === a.shapeArgs.end && c.hide(!0)) : v.call(this, a, c, p, i, l);
});
}
h(Z, "getCoordinates", function(v, a) {
var c = this.chart, p = { xAxis: [], yAxis: [] };
return c.polar ? c.axes.forEach(function(i) {
var l = i.isXAxis, s = i.center;
if (i.coll !== "colorAxis") {
var t = a.chartX - s[0] - c.plotLeft;
s = a.chartY - s[1] - c.plotTop, p[l ? "xAxis" : "yAxis"].push({ axis: i, value: i.translate(l ? Math.PI - Math.atan2(t, s) : Math.sqrt(Math.pow(
t,
2
) + Math.pow(s, 2)), !0) });
}
}) : p = v.call(this, a), p;
}), H.prototype.clipCircle = function(v, a, c, p) {
var i = N(), l = this.createElement("clipPath").attr({ id: i }).add(this.defs);
return v = p ? this.arc(v, a, c, p, 0, 2 * Math.PI).add(l) : this.circle(v, a, c).add(l), v.id = i, v.clipPath = l, v;
}, S(y, "getAxes", function() {
this.pane || (this.pane = []), this.options.pane = O(this.options.pane), this.options.pane.forEach(function(v) {
new I(v, this);
}, this);
}), S(y, "afterDrawChartBox", function() {
this.pane.forEach(function(v) {
v.render();
});
}), S(
F,
"afterInit",
function() {
var v = this.chart;
v.inverted && v.polar && (this.isRadialSeries = !0, this.is("column") && (this.isRadialBar = !0));
}
), h(y.prototype, "get", function(v, a) {
return d(this.pane || [], function(c) {
return c.options.id === a;
}) || v.call(this, a);
});
}), E(f, "masters/highcharts-more.src.js", [f["Core/Globals.js"], f["Core/Axis/RadialAxis.js"], f["Series/Bubble/BubbleSeries.js"]], function(h, y, B) {
y.compose(h.Axis, h.Tick), B.compose(h.Chart, h.Legend, h.Series);
});
});
})(Fp);
var _0 = Fp.exports;
const D0 = /* @__PURE__ */ Cn(_0);
var Up = { exports: {} };
(function(r) {
(function(f) {
r.exports ? (f.default = f, r.exports = f) : f(typeof Highcharts < "u" ? Highcharts : void 0);
})(function(f) {
function E(h, y, B, I) {
h.hasOwnProperty(y) || (h[y] = I.apply(null, B));
}
f = f ? f._modules : {}, E(
f,
"Extensions/FullScreen.js",
[f["Core/Chart/Chart.js"], f["Core/Globals.js"], f["Core/Renderer/HTML/AST.js"], f["Core/Utilities.js"]],
function(h, y, B, I) {
var Z = I.addEvent;
return I = function() {
function F(U) {
this.chart = U, this.isOpen = !1, U = U.renderTo, this.browserProps || (typeof U.requestFullscreen == "function" ? this.browserProps = { fullscreenChange: "fullscreenchange", requestFullscreen: "requestFullscreen", exitFullscreen: "exitFullscreen" } : U.mozRequestFullScreen ? this.browserProps = { fullscreenChange: "mozfullscreenchange", requestFullscreen: "mozRequestFullScreen", exitFullscreen: "mozCancelFullScreen" } : U.webkitRequestFullScreen ? this.browserProps = {
fullscreenChange: "webkitfullscreenchange",
requestFullscreen: "webkitRequestFullScreen",
exitFullscreen: "webkitExitFullscreen"
} : U.msRequestFullscreen && (this.browserProps = { fullscreenChange: "MSFullscreenChange", requestFullscreen: "msRequestFullscreen", exitFullscreen: "msExitFullscreen" }));
}
return F.prototype.close = function() {
var U = this.chart, H = U.options.chart;
this.isOpen && this.browserProps && U.container.ownerDocument instanceof Document && U.container.ownerDocument[this.browserProps.exitFullscreen](), this.unbindFullscreenEvent && (this.unbindFullscreenEvent = this.unbindFullscreenEvent()), U.setSize(this.origWidth, this.origHeight, !1), this.origHeight = this.origWidth = void 0, H.width = this.origWidthOption, H.height = this.origHeightOption, this.origHeightOption = this.origWidthOption = void 0, this.isOpen = !1, this.setButtonText();
}, F.prototype.open = function() {
var U = this, H = U.chart, W = H.options.chart;
if (W && (U.origWidthOption = W.width, U.origHeightOption = W.height), U.origWidth = H.chartWidth, U.origHeight = H.chartHeight, U.browserProps) {
var R = Z(
H.container.ownerDocument,
U.browserProps.fullscreenChange,
function() {
U.isOpen ? (U.isOpen = !1, U.close()) : (H.setSize(null, null, !1), U.isOpen = !0, U.setButtonText());
}
), S = Z(H, "destroy", R);
U.unbindFullscreenEvent = function() {
R(), S();
}, (W = H.renderTo[U.browserProps.requestFullscreen]()) && W.catch(function() {
alert("Full screen is not supported inside a frame.");
});
}
}, F.prototype.setButtonText = function() {
var U = this.chart, H = U.exportDivElements, W = U.options.exporting, R = W && W.buttons && W.buttons.contextButton.menuItems;
U = U.options.lang, W && W.menuItemDefinitions && U && U.exitFullscreen && U.viewFullscreen && R && H && (H = H[R.indexOf("viewFullscreen")]) && B.setElementHTML(H, this.isOpen ? U.exitFullscreen : W.menuItemDefinitions.viewFullscreen.text || U.viewFullscreen);
}, F.prototype.toggle = function() {
this.isOpen ? this.close() : this.open();
}, F;
}(), y.Fullscreen = I, Z(h, "beforeRender", function() {
this.fullscreen = new y.Fullscreen(this);
}), y.Fullscreen;
}
), E(f, "Core/Chart/ChartNavigationComposition.js", [], function() {
var h;
return function(y) {
y.compose = function(I) {
return I.navigation || (I.navigation = new B(I)), I;
};
var B = function() {
function I(Z) {
this.updates = [], this.chart = Z;
}
return I.prototype.addUpdate = function(Z) {
this.chart.navigation.updates.push(Z);
}, I.prototype.update = function(Z, F) {
var U = this;
this.updates.forEach(function(H) {
H.call(U.chart, Z, F);
});
}, I;
}();
y.Additions = B;
}(h || (h = {})), h;
}), E(f, "Extensions/Exporting/ExportingDefaults.js", [f["Core/Globals.js"]], function(h) {
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: h.isTouchDevice ? "14px" : "11px", transition: "background 250ms, color 250ms" }, menuItemHoverStyle: {
background: "#335cad",
color: "#ffffff"
} } };
}), E(f, "Extensions/Exporting/ExportingSymbols.js", [], function() {
var h;
return function(y) {
function B(F, U, H, W) {
return [["M", F, U + 2.5], ["L", F + H, U + 2.5], ["M", F, U + W / 2 + 0.5], ["L", F + H, U + W / 2 + 0.5], ["M", F, U + W - 1.5], ["L", F + H, U + W - 1.5]];
}
function I(F, U, H, W) {
return F = W / 3 - 2, W = [], W = W.concat(this.circle(H - F, U, F, F), this.circle(H - F, U + F + 4, F, F), this.circle(H - F, U + 2 * (F + 4), F, F));
}
var Z = [];
y.compose = function(F) {
Z.indexOf(F) === -1 && (Z.push(F), F = F.prototype.symbols, F.menu = B, F.menuball = I.bind(F));
};
}(h || (h = {})), h;
}), E(f, "Core/HttpUtilities.js", [f["Core/Globals.js"], f["Core/Utilities.js"]], function(h, y) {
var B = h.doc, I = y.createElement, Z = y.discardElement, F = y.merge, U = y.objectEach, H = { ajax: function(W) {
var R = F(!0, { url: !1, type: "get", dataType: "json", success: !1, error: !1, data: !1, headers: {} }, W);
W = { json: "application/json", xml: "application/xml", text: "text/plain", octet: "application/octet-stream" };
var S = new XMLHttpRequest();
if (!R.url)
return !1;
S.open(R.type.toUpperCase(), R.url, !0), R.headers["Content-Type"] || S.setRequestHeader(
"Content-Type",
W[R.dataType] || W.text
), U(R.headers, function(x, d) {
S.setRequestHeader(d, x);
}), S.onreadystatechange = function() {
if (S.readyState === 4) {
if (S.status === 200) {
var x = S.responseText;
if (R.dataType === "json")
try {
x = JSON.parse(x);
} catch (d) {
R.error && R.error(S, d);
return;
}
return R.success && R.success(x);
}
R.error && R.error(S, S.responseText);
}
};
try {
R.data = JSON.stringify(R.data);
} catch {
}
S.send(R.data || !0);
}, getJSON: function(W, R) {
H.ajax({ url: W, success: R, dataType: "json", headers: { "Content-Type": "text/plain" } });
}, post: function(W, R, S) {
var x = I("form", F({ method: "post", action: W, enctype: "multipart/form-data" }, S), { display: "none" }, B.body);
U(R, function(d, u) {
I("input", { type: "hidden", name: u, value: d }, null, x);
}), x.submit(), Z(x);
} };
return H;
}), E(f, "Extensions/Exporting/Exporting.js", [
f["Core/Renderer/HTML/AST.js"],
f["Core/Chart/Chart.js"],
f["Core/Chart/ChartNavigationComposition.js"],
f["Core/DefaultOptions.js"],
f["Extensions/Exporting/ExportingDefaults.js"],
f["Extensions/Exporting/ExportingSymbols.js"],
f["Core/Globals.js"],
f["Core/HttpUtilities.js"],
f["Core/Utilities.js"]
], function(h, y, B, I, Z, F, U, H, W) {
y = I.defaultOptions;
var R = U.doc, S = U.win, x = W.addEvent, d = W.css, u = W.createElement, P = W.discardElement, O = W.extend, N = W.find, C = W.fireEvent, b = W.isObject, w = W.merge, v = W.objectEach, a = W.pick, c = W.removeEvent, p = W.uniqueKey, i;
return function(l) {
function s(nt) {
var rt = this, ct = rt.renderer, gt = w(rt.options.navigation.buttonOptions, nt), dt = gt.onclick, lt = 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, st = tt && tt.hover;
tt = tt && tt.select;
var ht;
rt.styledMode || (J.fill = a(J.fill, "#ffffff"), J.stroke = a(J.stroke, "none")), delete J.states, dt ? ht = function(vt) {
vt && vt.stopPropagation(), dt.call(rt, vt);
} : lt && (ht = function(vt) {
vt && vt.stopPropagation(), rt.contextMenu(pt.menuClassName, lt, pt.translateX, pt.translateY, pt.width, pt.height, pt), pt.setState(2);
}), gt.text && gt.symbol ? J.paddingLeft = a(J.paddingLeft, 30) : gt.text || O(J, { width: gt.width, height: gt.height, padding: 0 }), rt.styledMode || (J["stroke-linecap"] = "round", J.fill = a(J.fill, "#ffffff"), J.stroke = a(J.stroke, "none"));
var pt = ct.button(gt.text, 0, 0, ht, J, st, tt).addClass(nt.className).attr({ title: a(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: a(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, C(this, "afterPrint");
}
}
function o() {
var nt = R.body, rt = this.options.exporting.printMaxWidth, ct = { childNodes: nt.childNodes, origDisplay: [], resetParams: void 0 };
this.isPrinting = !0, this.pointer.reset(null, 0), C(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 A(nt, rt, ct, gt, dt, lt, at) {
var J = this, tt = J.options.navigation, st = J.chartWidth, ht = J.chartHeight, pt = "cache-" + nt, yt = Math.max(dt, lt), vt = J[pt];
if (!vt) {
J.exportContextMenu = J[pt] = vt = u("div", { className: nt }, { position: "absolute", zIndex: 1e3, padding: yt + "px", pointerEvents: "auto" }, J.fixedDiv || J.container);
var Ct = u("ul", { className: "highcharts-menu" }, { listStyle: "none", margin: 0, padding: 0 }, vt);
J.styledMode || d(Ct, O(
{ MozBoxShadow: "3px 3px 10px #888", WebkitBoxShadow: "3px 3px 10px #888", boxShadow: "3px 3px 10px #888" },
tt.menuStyle
)), vt.hideMenu = function() {
d(vt, { display: "none" }), at && at.setState(0), J.openMenu = !1, d(J.renderTo, { overflow: "hidden" }), d(J.container, { overflow: "hidden" }), W.clearTimeout(vt.hideTimer), C(J, "exportMenuHidden");
}, J.exportEvents.push(x(vt, "mouseleave", function() {
vt.hideTimer = S.setTimeout(vt.hideMenu, 500);
}), x(vt, "mouseenter", function() {
W.clearTimeout(vt.hideTimer);
}), x(R, "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 kt = void 0;
Pt.separator ? kt = u("hr", void 0, void 0, Ct) : (Pt.textKey === "viewData" && J.isDataTableVisible && (Pt.textKey = "hideData"), kt = u("li", { className: "highcharts-menu-item", onclick: function(St) {
St && St.stopPropagation(), vt.hideMenu(), Pt.onclick && Pt.onclick.apply(J, arguments);
} }, void 0, Ct), h.setElementHTML(kt, Pt.text || J.options.lang[Pt.textKey]), J.styledMode || (kt.onmouseover = function() {
d(this, tt.menuItemHoverStyle);
}, kt.onmouseout = function() {
d(this, tt.menuItemStyle);
}, d(kt, O({ cursor: "pointer" }, tt.menuItemStyle)))), J.exportDivElements.push(kt);
}
}), J.exportDivElements.push(Ct, vt), J.exportMenuWidth = vt.offsetWidth, J.exportMenuHeight = vt.offsetHeight;
}
rt = { display: "block" }, ct + J.exportMenuWidth > st ? rt.right = st - ct - dt - yt + "px" : rt.left = ct - yt + "px", gt + lt + J.exportMenuHeight > ht && at.alignOptions.verticalAlign !== "top" ? rt.bottom = ht - gt - yt + "px" : rt.top = gt + lt - yt + "px", d(vt, rt), d(J.renderTo, { overflow: "" }), d(J.container, { overflow: "" }), J.openMenu = !0, C(J, "exportMenuShown");
}
function _(nt) {
var rt = nt ? nt.target : this, ct = rt.exportSVGElements, gt = rt.exportDivElements;
nt = rt.exportEvents;
var dt;
ct && (ct.forEach(function(lt, at) {
lt && (lt.onclick = lt.ontouchstart = null, dt = "cache-" + lt.menuClassName, rt[dt] && delete rt[dt], ct[at] = lt.destroy());
}), ct.length = 0), rt.exportingGroup && (rt.exportingGroup.destroy(), delete rt.exportingGroup), gt && (gt.forEach(function(lt, at) {
lt && (W.clearTimeout(lt.hideTimer), c(lt, "mouseleave"), gt[at] = lt.onmouseout = lt.onmouseover = lt.ontouchstart = lt.onclick = null, P(lt));
}), gt.length = 0), nt && (nt.forEach(function(lt) {
lt();
}), nt.length = 0);
}
function D(nt, rt) {
rt = this.getSVGForExport(nt, rt), nt = w(this.options.exporting, nt), H.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 j() {
return this.styledMode && this.inlineStyles(), this.container.innerHTML;
}
function T() {
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 = w(this.options, nt);
ct.plotOptions = w(this.userOptions.plotOptions, nt && nt.plotOptions), ct.time = w(this.userOptions.time, nt && nt.time);
var gt = u("div", null, { position: "absolute", top: "-9999em", width: this.chartWidth + "px", height: this.chartHeight + "px" }, R.body), dt = this.renderTo.style.width, lt = this.renderTo.style.height;
dt = ct.exporting.sourceWidth || ct.chart.width || /px$/.test(dt) && parseInt(dt, 10) || (ct.isGantt ? 800 : 600), lt = ct.exporting.sourceHeight || ct.chart.height || /px$/.test(lt) && parseInt(lt, 10) || 400, O(ct.chart, { animation: !1, renderTo: gt, forExport: !0, renderer: "SVGRenderer", width: dt, height: lt }), ct.exporting.enabled = !1, delete ct.data, ct.series = [], this.series.forEach(function(tt) {
rt = w(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 = p()), tt.options.isInternal || (at[tt.coll] || (at[tt.coll] = !0, ct[tt.coll] = []), ct[tt.coll].push(w(tt.userOptions, { visible: tt.visible })));
});
var J = new this.constructor(ct, this.callback);
return nt && ["xAxis", "yAxis", "series"].forEach(function(tt) {
var st = {};
nt[tt] && (st[tt] = nt[tt], J.update(st));
}), this.axes.forEach(function(tt) {
var st = N(J.axes, function(yt) {
return yt.options.internalKey === tt.userOptions.internalKey;
}), ht = tt.getExtremes(), pt = ht.userMin;
ht = ht.userMax, st && (typeof pt < "u" && pt !== st.min || typeof ht < "u" && ht !== st.max) && st.setExtremes(
pt,
ht,
!0,
!1
);
}), lt = J.getChartHTML(), C(this, "getSVG", { chartCopy: J }), lt = this.sanitizeSVG(lt, ct), ct = null, J.destroy(), P(gt), lt;
}
function g(nt, rt) {
var ct = this.options.exporting;
return this.getSVG(w({ 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 (ht = pt = !1, ct.length) {
for (yt = ct.length; yt-- && !pt; )
pt = ct[yt].test(Dt);
ht = !pt;
}
for (Dt === "transform" && St === "none" && (ht = !0), yt = rt.length; yt-- && !ht; )
ht = rt[yt].test(Dt) || typeof St == "function";
ht || Ct[Dt] === St && J.nodeName !== "svg" || gt[J.nodeName][Dt] === St || (q && q.indexOf(Dt) === -1 ? st += m(Dt) + ":" + St + ";" : St && J.setAttribute(m(Dt), St));
}
var st = "", ht, pt, yt;
if (J.nodeType === 1 && it.indexOf(J.nodeName) === -1) {
var vt = S.getComputedStyle(J, null), Ct = J.nodeName === "svg" ? {} : S.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] = w(S.getComputedStyle(Pt, null)), J.nodeName === "text" && delete gt.text.fill, dt.removeChild(Pt);
}
if (U.isFirefox || U.isMS)
for (var kt in vt)
tt(vt[kt], kt);
else
v(vt, tt);
st && (vt = J.getAttribute("style"), J.setAttribute("style", (vt ? vt + ";" : "") + st)), J.nodeName === "svg" && J.setAttribute("stroke-width", "1px"), J.nodeName !== "text" && [].forEach.call(J.children || J.childNodes, nt);
}
}
var rt = $, ct = l.inlineWhitelist, gt = {}, dt, lt = R.createElement("iframe");
d(lt, { width: "1px", height: "1px", visibility: "hidden" }), R.body.appendChild(lt);
var at = lt.contentWindow.document;
at.open(), at.write(''), at.close(), nt(this.container.querySelector("svg")), dt.parentNode.removeChild(dt), lt.parentNode.removeChild(lt);
}
function Y(nt) {
(this.fixedDiv ? [this.fixedDiv, this.scrollingContainer] : [this.container]).forEach(function(rt) {
nt.appendChild(rt);
});
}
function V() {
var nt = this;
nt.exporting = { update: function(rt, ct) {
nt.isDirtyExporting = !0, w(!0, nt.options.exporting, rt), a(ct, !0) && nt.redraw();
} }, B.compose(nt).navigation.addUpdate(function(rt, ct) {
nt.isDirtyExporting = !0, w(!0, nt.options.navigation, rt), a(ct, !0) && nt.redraw();
});
}
function Q() {
var nt = this;
nt.isPrinting || (et = nt, U.isSafari || nt.beforePrint(), setTimeout(function() {
S.focus(), S.print(), U.isSafari || setTimeout(function() {
nt.afterPrint();
}, 1e3);
}, 1));
}
function k() {
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 G(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(/