@mobileaction/action-kit 1.57.0 → 1.57.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,2076 @@
1
+ import { g as va } from "./index-bTz35Vhl.js";
2
+ function ya(Ct, ee) {
3
+ for (var X = 0; X < ee.length; X++) {
4
+ const tt = ee[X];
5
+ if (typeof tt != "string" && !Array.isArray(tt)) {
6
+ for (const dt in tt)
7
+ if (dt !== "default" && !(dt in Ct)) {
8
+ const Pt = Object.getOwnPropertyDescriptor(tt, dt);
9
+ Pt && Object.defineProperty(Ct, dt, Pt.get ? Pt : {
10
+ enumerable: !0,
11
+ get: () => tt[dt]
12
+ });
13
+ }
14
+ }
15
+ }
16
+ return Object.freeze(Object.defineProperty(Ct, Symbol.toStringTag, { value: "Module" }));
17
+ }
18
+ var te = { exports: {} }, Ma = te.exports, is;
19
+ function Aa() {
20
+ return is || (is = 1, function(Ct, ee) {
21
+ /**
22
+ * Highstock JS v12.5.0 (2026-01-12)
23
+ * @module highcharts/modules/stock
24
+ * @requires highcharts
25
+ *
26
+ * Highcharts Stock as a plugin for Highcharts
27
+ *
28
+ * (c) 2010-2026 Highsoft AS
29
+ * Author: Torstein Honsi
30
+ *
31
+ * A commercial license may be required depending on use.
32
+ * See www.highcharts.com/license
33
+ */
34
+ (function(X, tt) {
35
+ Ct.exports = tt(X._Highcharts, X._Highcharts.Point, X._Highcharts.Series, X._Highcharts.Axis, X._Highcharts.Color, X._Highcharts.SeriesRegistry, X._Highcharts.RendererRegistry, X._Highcharts.SVGRenderer, X._Highcharts.SVGElement, X._Highcharts.Templating, X._Highcharts.Chart, X._Highcharts.Series.types.column, X._Highcharts.StackItem);
36
+ })("u" < typeof window ? Ma : window, (X, tt, dt, Pt, os, rs, as, ns, ls, hs, ds, ps, us) => (() => {
37
+ let ie, se, We, oe;
38
+ var re, ae, ne, le, he, de, pe, ue, ce, cs = { 28: (a) => {
39
+ a.exports = ls;
40
+ }, 184: (a) => {
41
+ a.exports = us;
42
+ }, 260: (a) => {
43
+ a.exports = tt;
44
+ }, 448: (a) => {
45
+ a.exports = ps;
46
+ }, 512: (a) => {
47
+ a.exports = rs;
48
+ }, 532: (a) => {
49
+ a.exports = Pt;
50
+ }, 540: (a) => {
51
+ a.exports = ns;
52
+ }, 608: (a) => {
53
+ a.exports = as;
54
+ }, 620: (a) => {
55
+ a.exports = os;
56
+ }, 820: (a) => {
57
+ a.exports = dt;
58
+ }, 944: (a) => {
59
+ a.exports = X;
60
+ }, 960: (a) => {
61
+ a.exports = ds;
62
+ }, 984: (a) => {
63
+ a.exports = hs;
64
+ } }, Xe = {};
65
+ function I(a) {
66
+ var t = Xe[a];
67
+ if (t !== void 0) return t.exports;
68
+ var e = Xe[a] = { exports: {} };
69
+ return cs[a](e, e.exports, I), e.exports;
70
+ }
71
+ I.n = (a) => {
72
+ var t = a && a.__esModule ? () => a.default : () => a;
73
+ return I.d(t, { a: t }), t;
74
+ }, I.d = (a, t) => {
75
+ for (var e in t) I.o(t, e) && !I.o(a, e) && Object.defineProperty(a, e, { enumerable: !0, get: t[e] });
76
+ }, I.o = (a, t) => Object.prototype.hasOwnProperty.call(a, t);
77
+ var He = {};
78
+ I.d(He, { default: () => ba });
79
+ var gs = I(944), C = I.n(gs), fs = I(260), ms = I.n(fs), xs = I(820), Ye = I.n(xs);
80
+ let { tooltipFormatter: bs } = ms().prototype, { addEvent: ge, arrayMax: vs, arrayMin: ys, correctFloat: Ms, defined: Ne, isArray: As, isNumber: ks, isString: ws, pick: vt } = C();
81
+ (function(a) {
82
+ function t(l, r, n) {
83
+ !this.isXAxis && (this.series.forEach(function(h) {
84
+ l === "compare" && typeof r != "boolean" ? h.setCompare(r, !1) : l !== "cumulative" || ws(r) || h.setCumulative(r, !1);
85
+ }), vt(n, !0) && this.chart.redraw());
86
+ }
87
+ function e(l) {
88
+ let r = this, { numberFormatter: n } = r.series.chart, h = function(g) {
89
+ l = l.replace("{point." + g + "}", (r[g] > 0 && g === "change" ? "+" : "") + n(r[g], vt(r.series.tooltipOptions.changeDecimals, 2)));
90
+ };
91
+ return Ne(r.change) && h("change"), Ne(r.cumulativeSum) && h("cumulativeSum"), bs.apply(this, [l]);
92
+ }
93
+ function i() {
94
+ let l, r = this.options.linkedTo, n = this.chart;
95
+ if (r) {
96
+ let g = r === ":previous" ? n.series[this.index - 1] : n.get(r);
97
+ g instanceof Ye() && (this.options.compare = vt(this.userOptions.compare, g.options.compare));
98
+ }
99
+ let h = this.options.compare;
100
+ (h === "percent" || h === "value" || this.options.cumulative) && (l = new f(this), h === "percent" || h === "value" ? l.initCompare(h) : l.initCumulative()), this.dataModify = l;
101
+ }
102
+ function s(l) {
103
+ let r = l.dataExtremes, n = r.activeYData;
104
+ if (this.dataModify && r) {
105
+ let h;
106
+ this.options.compare ? h = [this.dataModify.modifyValue(r.dataMin), this.dataModify.modifyValue(r.dataMax)] : this.options.cumulative && As(n) && n.length >= 2 && (h = f.getCumulativeExtremes(n)), h && (r.dataMin = ys(h), r.dataMax = vs(h));
107
+ }
108
+ }
109
+ function o(l, r) {
110
+ this.options.compare = this.userOptions.compare = l, this.update({}, vt(r, !0)), this.dataModify && (l === "value" || l === "percent") ? this.dataModify.initCompare(l) : this.points.forEach((n) => {
111
+ delete n.change;
112
+ });
113
+ }
114
+ function d() {
115
+ let l = this.getColumn(this.pointArrayMap && (this.options.pointValKey || this.pointValKey) || "y", !0);
116
+ if (this.xAxis && l.length && this.dataModify) {
117
+ let r = this.getColumn("x", !0), n = this.dataTable.rowCount, h = +(this.options.compareStart !== !0);
118
+ for (let g = 0; g < n - h; g++) {
119
+ let m = l[g];
120
+ if (ks(m) && m !== 0 && r[g + h] >= (this.xAxis.min || 0)) {
121
+ this.dataModify.compareValue = m;
122
+ break;
123
+ }
124
+ }
125
+ }
126
+ }
127
+ function p(l, r) {
128
+ this.setModifier("compare", l, r);
129
+ }
130
+ function u(l, r) {
131
+ l = vt(l, !1), this.options.cumulative = this.userOptions.cumulative = l, this.update({}, vt(r, !0)), this.dataModify ? this.dataModify.initCumulative() : this.points.forEach((n) => {
132
+ delete n.cumulativeSum;
133
+ });
134
+ }
135
+ function c(l, r) {
136
+ this.setModifier("cumulative", l, r);
137
+ }
138
+ a.compose = function(l, r, n) {
139
+ let h = r.prototype, g = n.prototype, m = l.prototype;
140
+ return m.setCompare || (m.setCompare = o, m.setCumulative = u, ge(l, "afterInit", i), ge(l, "afterGetExtremes", s), ge(l, "afterProcessData", d)), h.setCompare || (h.setCompare = p, h.setModifier = t, h.setCumulative = c, g.tooltipFormatter = e), l;
141
+ };
142
+ class f {
143
+ constructor(r) {
144
+ this.series = r;
145
+ }
146
+ modifyValue() {
147
+ return 0;
148
+ }
149
+ static getCumulativeExtremes(r) {
150
+ let n = 1 / 0, h = -1 / 0;
151
+ return r.reduce((g, m) => {
152
+ let x = g + m;
153
+ return n = Math.min(n, x, g), h = Math.max(h, x, g), x;
154
+ }), [n, h];
155
+ }
156
+ initCompare(r) {
157
+ this.modifyValue = function(n, h) {
158
+ n === null && (n = 0);
159
+ let g = this.compareValue;
160
+ if (n !== void 0 && g !== void 0) {
161
+ if (r === "value" ? n -= g : n = n / g * 100 - 100 * (this.series.options.compareBase !== 100), h !== void 0) {
162
+ let m = this.series.points[h];
163
+ m && (m.change = n);
164
+ }
165
+ return n;
166
+ }
167
+ return 0;
168
+ };
169
+ }
170
+ initCumulative() {
171
+ this.modifyValue = function(r, n) {
172
+ if (r === null && (r = 0), r !== void 0 && n !== void 0) {
173
+ let h = n > 0 ? this.series.points[n - 1] : null;
174
+ h && h.cumulativeSum && (r = Ms(h.cumulativeSum + r));
175
+ let g = this.series.points[n], m = g.series.options.cumulativeStart, x = g.x <= this.series.xAxis.max && g.x >= this.series.xAxis.min;
176
+ return g && (!m || x ? g.cumulativeSum = r : g.cumulativeSum = void 0), r;
177
+ }
178
+ return 0;
179
+ };
180
+ }
181
+ }
182
+ a.Additions = f;
183
+ })(ae || (ae = {}));
184
+ let Ss = ae;
185
+ var Ts = I(532), fe = I.n(Ts);
186
+ let { isTouchDevice: Fe } = C(), { addEvent: yt, merge: Ue, pick: me } = C(), Es = [];
187
+ function Os() {
188
+ this.navigator && this.navigator.setBaseSeries(null, !1);
189
+ }
190
+ function Bs() {
191
+ let a, t, e, i = this.legend, s = this.navigator;
192
+ if (s) {
193
+ a = i && i.options, t = s.xAxis, e = s.yAxis;
194
+ let { scrollbarHeight: o, scrollButtonSize: d } = s;
195
+ this.inverted ? (s.left = s.opposite ? this.chartWidth - o - s.height : this.spacing[3] + o, s.top = this.plotTop + d) : (s.left = me(t.left, this.plotLeft + d), s.top = s.navigatorOptions.top || this.chartHeight - s.height - o - (this.scrollbar?.options.margin || 0) - this.spacing[2] - (this.rangeSelector && this.extraBottomMargin ? this.rangeSelector.getHeight() : 0) - (a && a.verticalAlign === "bottom" && a.layout !== "proximate" && a.enabled && !a.floating ? i.legendHeight + me(a.margin, 10) : 0) - (this.titleOffset ? this.titleOffset[2] : 0)), t && e && (this.inverted ? t.options.left = e.options.left = s.left : t.options.top = e.options.top = s.top, t.setAxisSize(), e.setAxisSize());
196
+ }
197
+ }
198
+ function Cs(a) {
199
+ !this.navigator && !this.scroller && (this.options.navigator.enabled || this.options.scrollbar.enabled) && (this.scroller = this.navigator = new ie(this), me(a.redraw, !0) && this.redraw(a.animation));
200
+ }
201
+ function Ps() {
202
+ let a = this.options;
203
+ (a.navigator.enabled || a.scrollbar.enabled) && (this.scroller = this.navigator = new ie(this));
204
+ }
205
+ function Ds() {
206
+ let a = this.options, t = a.navigator, e = a.rangeSelector;
207
+ if ((t && t.enabled || e && e.enabled) && (!Fe && this.zooming.type === "x" || Fe && this.zooming.pinchType === "x")) return !1;
208
+ }
209
+ function Rs(a) {
210
+ let t = a.navigator;
211
+ if (t && a.xAxis[0]) {
212
+ let e = a.xAxis[0].getExtremes();
213
+ t.render(e.min, e.max);
214
+ }
215
+ }
216
+ function Gs(a) {
217
+ let t = a.options.navigator || {}, e = a.options.scrollbar || {};
218
+ !this.navigator && !this.scroller && (t.enabled || e.enabled) && (Ue(!0, this.options.navigator, t), Ue(!0, this.options.scrollbar, e), delete a.options.navigator, delete a.options.scrollbar);
219
+ }
220
+ let Is = function(a, t) {
221
+ if (C().pushUnique(Es, a)) {
222
+ let e = a.prototype;
223
+ ie = t, e.callbacks.push(Rs), yt(a, "afterAddSeries", Os), yt(a, "afterSetChartSize", Bs), yt(a, "afterUpdate", Cs), yt(a, "beforeRender", Ps), yt(a, "beforeShowResetZoom", Ds), yt(a, "update", Gs);
224
+ }
225
+ }, { isTouchDevice: zs } = C(), { addEvent: Ve, correctFloat: _e, defined: xe, isNumber: je, pick: qe } = C();
226
+ function Ls() {
227
+ this.navigatorAxis || (this.navigatorAxis = new be(this));
228
+ }
229
+ function Ws(a) {
230
+ let t, e = this.chart, i = e.options, s = i.navigator, o = this.navigatorAxis, d = e.zooming.pinchType, p = i.rangeSelector, u = e.zooming.type;
231
+ if (this.isXAxis && (s?.enabled || p?.enabled)) {
232
+ if (u === "y" && a.trigger === "zoom") t = !1;
233
+ else if ((a.trigger === "zoom" && u === "xy" || zs && d === "xy") && this.options.range) {
234
+ let c = o.previousZoom;
235
+ xe(a.min) ? o.previousZoom = [this.min, this.max] : c && (a.min = c[0], a.max = c[1], o.previousZoom = void 0);
236
+ }
237
+ }
238
+ t !== void 0 && a.preventDefault();
239
+ }
240
+ class be {
241
+ static compose(t) {
242
+ t.keepProps.includes("navigatorAxis") || (t.keepProps.push("navigatorAxis"), Ve(t, "init", Ls), Ve(t, "setExtremes", Ws));
243
+ }
244
+ constructor(t) {
245
+ this.axis = t;
246
+ }
247
+ destroy() {
248
+ this.axis = void 0;
249
+ }
250
+ toFixedRange(t, e, i, s) {
251
+ let o = this.axis, d = (o.pointRange || 0) / 2, p = qe(i, o.translate(t, !0, !o.horiz)), u = qe(s, o.translate(e, !0, !o.horiz));
252
+ return xe(i) || (p = _e(p + d)), xe(s) || (u = _e(u - d)), je(p) && je(u) || (p = u = void 0), { min: p, max: u };
253
+ }
254
+ }
255
+ var Xs = I(620), Hs = I.n(Xs), Ys = I(512), j = I.n(Ys);
256
+ let { parse: Ns } = Hs(), { seriesTypes: Fs } = j(), ve = { height: 40, margin: 22, maskInside: !0, handles: { width: 7, borderRadius: 0, height: 15, symbols: ["navigator-handle", "navigator-handle"], enabled: !0, lineWidth: 1, backgroundColor: "#f2f2f2", borderColor: "#999999" }, maskFill: Ns("#667aff").setOpacity(0.3).get(), outlineColor: "#999999", outlineWidth: 1, series: { type: Fs.areaspline === void 0 ? "line" : "areaspline", fillOpacity: 0.05, lineWidth: 1, compare: null, sonification: { enabled: !1 }, 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: { className: "highcharts-navigator-xaxis", tickLength: 0, lineWidth: 0, gridLineColor: "#e6e6e6", id: "navigator-x-axis", gridLineWidth: 1, tickPixelInterval: 200, labels: { align: "left", style: { color: "#000000", fontSize: "0.7em", opacity: 0.6, textOutline: "2px contrast" }, x: 3, y: -4 }, crosshair: !1 }, yAxis: { className: "highcharts-navigator-yaxis", gridLineWidth: 0, startOnTick: !1, endOnTick: !1, minPadding: 0.1, id: "navigator-y-axis", maxPadding: 0.1, labels: { enabled: !1 }, crosshair: !1, title: { text: void 0 }, tickLength: 0, tickWidth: 0 } }, { defined: wa, isNumber: Sa, pick: Ta } = C(), { relativeLength: Us } = C(), Vs = { "navigator-handle": function(a, t, e, i, s = {}) {
257
+ var o, d, p, u;
258
+ let c = s.width ? s.width / 2 : e, f = Us(s.borderRadius || 0, Math.min(2 * c, i));
259
+ return [["M", -1.5, (i = s.height || i) / 2 - 3.5], ["L", -1.5, i / 2 + 4.5], ["M", 0.5, i / 2 - 3.5], ["L", 0.5, i / 2 + 4.5], ...(o = -c - 1, d = 2 * c + 1, p = i, u = { r: f }, u?.r ? function(l, r, n, h, g) {
260
+ let m = g?.r || 0;
261
+ return [["M", l + m, r], ["L", l + n - m, r], ["A", m, m, 0, 0, 1, l + n, r + m], ["L", l + n, r + h - m], ["A", m, m, 0, 0, 1, l + n - m, r + h], ["L", l + m, r + h], ["A", m, m, 0, 0, 1, l, r + h - m], ["L", l, r + m], ["A", m, m, 0, 0, 1, l + m, r], ["Z"]];
262
+ }(o, 0.5, d, p, u) : [["M", o, 0.5], ["L", o + d, 0.5], ["L", o + d, 0.5 + p], ["L", o, 0.5 + p], ["Z"]])];
263
+ } };
264
+ var _s = I(608), Ze = I.n(_s);
265
+ let { defined: Ke } = C(), $e = { setFixedRange: function(a) {
266
+ let t = this.xAxis[0];
267
+ Ke(t.dataMax) && Ke(t.dataMin) && a ? this.fixedRange = Math.min(a, t.dataMax - t.dataMin) : this.fixedRange = a;
268
+ } }, { defaultOptions: js } = C(), { composed: qs } = C(), { getRendererType: Zs } = Ze(), { setFixedRange: Ks } = $e, { addEvent: $s, extend: Je, pushUnique: Js } = C();
269
+ function Qs() {
270
+ this.chart.navigator && !this.options.isInternal && this.chart.navigator.setBaseSeries(null, !1);
271
+ }
272
+ let to = function(a, t, e) {
273
+ be.compose(t), Js(qs, "Navigator") && (a.prototype.setFixedRange = Ks, Je(Zs().prototype.symbols, Vs), Je(js, { navigator: ve }), $s(e, "afterUpdate", Qs));
274
+ }, { composed: eo } = C(), { addEvent: Yt, correctFloat: Qe, defined: pt, pick: ti, pushUnique: io } = C();
275
+ (function(a) {
276
+ let t;
277
+ function e(d) {
278
+ let p = ti(d.options?.min, d.min), u = ti(d.options?.max, d.max);
279
+ return { axisMin: p, axisMax: u, scrollMin: pt(d.dataMin) ? Math.min(p, d.min ?? 1 / 0, d.dataMin, d.threshold ?? 1 / 0) : p, scrollMax: d.treeGrid?.adjustedMax ?? (pt(d.dataMax) ? Math.max(u, d.max ?? -1 / 0, d.dataMax, d.threshold ?? -1 / 0) : u) };
280
+ }
281
+ function i() {
282
+ let d = this.scrollbar, p = d && !d.options.opposite, u = this.horiz ? 2 : p ? 3 : 1;
283
+ d && (this.chart.scrollbarsOffsets = [0, 0], this.chart.axisOffset[u] += d.size + (d.options.margin || 0));
284
+ }
285
+ function s() {
286
+ let d = this;
287
+ d.options?.scrollbar?.enabled && (d.options.scrollbar.vertical = !d.horiz, d.options.startOnTick = d.options.endOnTick = !1, d.scrollbar = new t(d.chart.renderer, d.options.scrollbar, d.chart), Yt(d.scrollbar, "changed", function(p) {
288
+ let u, c, { axisMin: f, axisMax: l, scrollMin: r, scrollMax: n } = e(d), h = d.toPixels(r), g = d.toPixels(n) - h;
289
+ if (pt(f) && pt(l)) if (d.horiz && !d.reversed || !d.horiz && d.reversed ? (u = Math.min(n, d.toValue(h + g * this.to)), c = Math.max(r, d.toValue(h + g * this.from))) : (u = Math.min(n, d.toValue(h + g * (1 - this.from))), c = Math.max(r, d.toValue(h + g * (1 - this.to)))), this.shouldUpdateExtremes(p.DOMType)) {
290
+ let m = p.DOMType !== "mousemove" && p.DOMType !== "touchmove" && void 0;
291
+ d.setExtremes(Qe(c), Qe(u), !0, m, p);
292
+ } else this.setRange(this.from, this.to);
293
+ }));
294
+ }
295
+ function o() {
296
+ let d, p, u, { scrollMin: c, scrollMax: f } = e(this), l = this.scrollbar, r = (this.axisTitleMargin || 0) + (this.titleOffset || 0), n = this.chart.scrollbarsOffsets, h = this.options.margin || 0;
297
+ if (l && n) {
298
+ if (this.horiz) this.opposite || (n[1] += r), l.position(this.left, this.top + this.height + 2 + n[1] - (this.opposite ? h : 0), this.width, this.height), this.opposite || (n[1] += h), d = 1;
299
+ else {
300
+ let g;
301
+ this.opposite && (n[0] += r), g = l.options.opposite ? this.left + this.width + 2 + n[0] - (this.opposite ? 0 : h) : this.opposite ? 0 : h, l.position(g, this.top, this.width, this.height), this.opposite && (n[0] += h), d = 0;
302
+ }
303
+ if (n[d] += l.size + (l.options.margin || 0), isNaN(c) || isNaN(f) || !pt(this.min) || !pt(this.max) || pt(this.dataMin) && this.dataMin === this.dataMax) l.setRange(0, 1);
304
+ else if (this.min === this.max) {
305
+ let g = this.pointRange / (this.dataMax + 1);
306
+ p = g * this.min, u = g * (this.max + 1), l.setRange(p, u);
307
+ } else p = (this.toPixels(this.min) - this.toPixels(c)) / (this.toPixels(f) - this.toPixels(c)), u = (this.toPixels(this.max) - this.toPixels(c)) / (this.toPixels(f) - this.toPixels(c)), this.horiz && !this.reversed || !this.horiz && this.reversed ? l.setRange(p, u) : l.setRange(1 - u, 1 - p);
308
+ }
309
+ }
310
+ a.compose = function(d, p) {
311
+ io(eo, "Axis.Scrollbar") && (t = p, Yt(d, "afterGetOffset", i), Yt(d, "afterInit", s), Yt(d, "afterRender", o));
312
+ };
313
+ })(ne || (ne = {}));
314
+ let so = ne, Nt = { height: 10, barBorderRadius: 5, buttonBorderRadius: 0, buttonsEnabled: !1, liveRedraw: void 0, margin: void 0, minWidth: 6, opposite: !0, step: 0.2, zIndex: 3, barBackgroundColor: "#cccccc", barBorderWidth: 0, barBorderColor: "#cccccc", buttonArrowColor: "#333333", buttonBackgroundColor: "#e6e6e6", buttonBorderColor: "#cccccc", buttonBorderWidth: 1, rifleColor: "none", trackBackgroundColor: "rgba(255, 255, 255, 0.001)", trackBorderColor: "#cccccc", trackBorderRadius: 5, trackBorderWidth: 1 }, { defaultOptions: ei } = C(), { composed: oo } = C(), { addEvent: ro, correctFloat: ut, crisp: Ft, defined: ii, destroyObjectProperties: ao, extend: no, fireEvent: Dt, merge: si, pick: Rt, pushUnique: lo, removeEvent: ho } = C();
315
+ class ct {
316
+ static compose(t) {
317
+ so.compose(t, ct), lo(oo, "Scrollbar") && no(ei, { scrollbar: Nt });
318
+ }
319
+ static swapXY(t, e) {
320
+ return e && t.forEach((i) => {
321
+ let s, o = i.length;
322
+ for (let d = 0; d < o; d += 2) typeof (s = i[d + 1]) == "number" && (i[d + 1] = i[d + 2], i[d + 2] = s);
323
+ }), t;
324
+ }
325
+ constructor(t, e, i) {
326
+ this._events = [], this.chartX = 0, this.chartY = 0, this.from = 0, this.scrollbarButtons = [], this.scrollbarLeft = 0, this.scrollbarStrokeWidth = 1, this.scrollbarTop = 0, this.size = 0, this.to = 0, this.trackBorderWidth = 1, this.x = 0, this.y = 0, this.init(t, e, i);
327
+ }
328
+ addEvents() {
329
+ let t = this.options.inverted ? [1, 0] : [0, 1], e = this.scrollbarButtons, i = this.scrollbarGroup.element, s = this.track.element, o = this.mouseDownHandler.bind(this), d = this.mouseMoveHandler.bind(this), p = this.mouseUpHandler.bind(this), u = [[e[t[0]].element, "click", this.buttonToMinClick.bind(this)], [e[t[1]].element, "click", this.buttonToMaxClick.bind(this)], [s, "click", this.trackClick.bind(this)], [i, "mousedown", o], [i.ownerDocument, "mousemove", d], [i.ownerDocument, "mouseup", p], [i, "touchstart", o], [i.ownerDocument, "touchmove", d], [i.ownerDocument, "touchend", p]];
330
+ u.forEach(function(c) {
331
+ ro.apply(null, c);
332
+ }), this._events = u;
333
+ }
334
+ buttonToMaxClick(t) {
335
+ let e = (this.to - this.from) * Rt(this.options.step, 0.2);
336
+ this.updatePosition(this.from + e, this.to + e), Dt(this, "changed", { from: this.from, to: this.to, trigger: "scrollbar", DOMEvent: t });
337
+ }
338
+ buttonToMinClick(t) {
339
+ let e = ut(this.to - this.from) * Rt(this.options.step, 0.2);
340
+ this.updatePosition(ut(this.from - e), ut(this.to - e)), Dt(this, "changed", { from: this.from, to: this.to, trigger: "scrollbar", DOMEvent: t });
341
+ }
342
+ cursorToScrollbarPosition(t) {
343
+ let e = this.options, i = e.minWidth > this.calculatedWidth ? e.minWidth : 0;
344
+ return { chartX: (t.chartX - this.x - this.xOffset) / (this.barWidth - i), chartY: (t.chartY - this.y - this.yOffset) / (this.barWidth - i) };
345
+ }
346
+ destroy() {
347
+ let t = this, e = t.chart.scroller;
348
+ t.removeEvents(), ["track", "scrollbarRifles", "scrollbar", "scrollbarGroup", "group"].forEach(function(i) {
349
+ t[i] && t[i].destroy && (t[i] = t[i].destroy());
350
+ }), e && t === e.scrollbar && (e.scrollbar = null, ao(e.scrollbarButtons));
351
+ }
352
+ drawScrollbarButton(t) {
353
+ let e = this.renderer, i = this.scrollbarButtons, s = this.options, o = this.size, d = e.g().add(this.group);
354
+ if (i.push(d), s.buttonsEnabled) {
355
+ let p = e.rect().addClass("highcharts-scrollbar-button").add(d);
356
+ this.chart.styledMode || p.attr({ stroke: s.buttonBorderColor, "stroke-width": s.buttonBorderWidth, fill: s.buttonBackgroundColor }), p.attr(p.crisp({ x: -0.5, y: -0.5, width: o, height: o, r: s.buttonBorderRadius }, p.strokeWidth()));
357
+ let u = e.path(ct.swapXY([["M", o / 2 + (t ? -1 : 1), o / 2 - 3], ["L", o / 2 + (t ? -1 : 1), o / 2 + 3], ["L", o / 2 + (t ? 2 : -2), o / 2]], s.vertical)).addClass("highcharts-scrollbar-arrow").add(i[t]);
358
+ this.chart.styledMode || u.attr({ fill: s.buttonArrowColor });
359
+ }
360
+ }
361
+ init(t, e, i) {
362
+ this.scrollbarButtons = [], this.renderer = t, this.userOptions = e, this.options = si(Nt, ei.scrollbar, e), this.options.margin = Rt(this.options.margin, 10), this.chart = i, this.size = Rt(this.options.size, this.options.height), e.enabled && (this.render(), this.addEvents());
363
+ }
364
+ mouseDownHandler(t) {
365
+ let e = this.chart.pointer?.normalize(t) || t, i = this.cursorToScrollbarPosition(e);
366
+ this.chartX = i.chartX, this.chartY = i.chartY, this.initPositions = [this.from, this.to], this.grabbedCenter = !0;
367
+ }
368
+ mouseMoveHandler(t) {
369
+ let e, i = this.chart.pointer?.normalize(t) || t, s = this.options.vertical ? "chartY" : "chartX", o = this.initPositions || [];
370
+ this.grabbedCenter && (!t.touches || t.touches[0][s] !== 0) && (e = this.cursorToScrollbarPosition(i)[s] - this[s], this.hasDragged = !0, this.updatePosition(o[0] + e, o[1] + e), this.hasDragged && Dt(this, "changed", { from: this.from, to: this.to, trigger: "scrollbar", DOMType: t.type, DOMEvent: t }));
371
+ }
372
+ mouseUpHandler(t) {
373
+ this.hasDragged && Dt(this, "changed", { from: this.from, to: this.to, trigger: "scrollbar", DOMType: t.type, DOMEvent: t }), this.grabbedCenter = this.hasDragged = this.chartX = this.chartY = null;
374
+ }
375
+ position(t, e, i, s) {
376
+ let { buttonsEnabled: o, margin: d = 0, vertical: p } = this.options, u = this.rendered ? "animate" : "attr", c = s, f = 0;
377
+ this.group.show(), this.x = t, this.y = e + this.trackBorderWidth, this.width = i, this.height = s, this.xOffset = c, this.yOffset = f, p ? (this.width = this.yOffset = i = f = this.size, this.xOffset = c = 0, this.yOffset = f = o ? this.size : 0, this.barWidth = s - (o ? 2 * i : 0), this.x = t += d) : (this.height = s = this.size, this.xOffset = c = o ? this.size : 0, this.barWidth = i - (o ? 2 * s : 0), this.y = this.y + d), this.group[u]({ translateX: t, translateY: this.y }), this.track[u]({ width: i, height: s }), this.scrollbarButtons[1][u]({ translateX: p ? 0 : i - c, translateY: p ? s - f : 0 });
378
+ }
379
+ removeEvents() {
380
+ this._events.forEach(function(t) {
381
+ ho.apply(null, t);
382
+ }), this._events.length = 0;
383
+ }
384
+ render() {
385
+ let t = this.renderer, e = this.options, i = this.size, s = this.chart.styledMode, o = t.g("scrollbar").attr({ zIndex: e.zIndex }).hide().add();
386
+ this.group = o, this.track = t.rect().addClass("highcharts-scrollbar-track").attr({ r: e.trackBorderRadius || 0, height: i, width: i }).add(o), s || this.track.attr({ fill: e.trackBackgroundColor, stroke: e.trackBorderColor, "stroke-width": e.trackBorderWidth });
387
+ let d = this.trackBorderWidth = this.track.strokeWidth();
388
+ this.track.attr({ x: -Ft(0, d), y: -Ft(0, d) }), this.scrollbarGroup = t.g().add(o), this.scrollbar = t.rect().addClass("highcharts-scrollbar-thumb").attr({ height: i - d, width: i - d, r: e.barBorderRadius || 0 }).add(this.scrollbarGroup), this.scrollbarRifles = t.path(ct.swapXY([["M", -3, i / 4], ["L", -3, 2 * i / 3], ["M", 0, i / 4], ["L", 0, 2 * i / 3], ["M", 3, i / 4], ["L", 3, 2 * i / 3]], e.vertical)).addClass("highcharts-scrollbar-rifles").add(this.scrollbarGroup), s || (this.scrollbar.attr({ fill: e.barBackgroundColor, stroke: e.barBorderColor, "stroke-width": e.barBorderWidth }), this.scrollbarRifles.attr({ stroke: e.rifleColor, "stroke-width": 1 })), this.scrollbarStrokeWidth = this.scrollbar.strokeWidth(), this.scrollbarGroup.translate(-Ft(0, this.scrollbarStrokeWidth), -Ft(0, this.scrollbarStrokeWidth)), this.drawScrollbarButton(0), this.drawScrollbarButton(1);
389
+ }
390
+ setRange(t, e) {
391
+ let i, s, o = this.options, d = o.vertical, p = o.minWidth, u = this.barWidth, c = !this.rendered || this.hasDragged || this.chart.navigator && this.chart.navigator.hasDragged ? "attr" : "animate";
392
+ if (!ii(u)) return;
393
+ let f = u * Math.min(e, 1);
394
+ i = Math.ceil(u * (t = Math.max(t, 0))), this.calculatedWidth = s = ut(f - i), s < p && (i = (u - p + s) * t, s = p);
395
+ let l = Math.floor(i + this.xOffset + this.yOffset), r = s / 2 - 0.5;
396
+ this.from = t, this.to = e, d ? (this.scrollbarGroup[c]({ translateY: l }), this.scrollbar[c]({ height: s }), this.scrollbarRifles[c]({ translateY: r }), this.scrollbarTop = l, this.scrollbarLeft = 0) : (this.scrollbarGroup[c]({ translateX: l }), this.scrollbar[c]({ width: s }), this.scrollbarRifles[c]({ translateX: r }), this.scrollbarLeft = l, this.scrollbarTop = 0), s <= 12 ? this.scrollbarRifles.hide() : this.scrollbarRifles.show(), o.showFull === !1 && (t <= 0 && e >= 1 ? this.group.hide() : this.group.show()), this.rendered = !0;
397
+ }
398
+ shouldUpdateExtremes(t) {
399
+ return Rt(this.options.liveRedraw, C().svg && !C().isTouchDevice && !this.chart.boosted) || t === "mouseup" || t === "touchend" || !ii(t);
400
+ }
401
+ trackClick(t) {
402
+ let e = this.chart.pointer?.normalize(t) || t, i = this.to - this.from, s = this.y + this.scrollbarTop, o = this.x + this.scrollbarLeft;
403
+ this.options.vertical && e.chartY > s || !this.options.vertical && e.chartX > o ? this.updatePosition(this.from + i, this.to + i) : this.updatePosition(this.from - i, this.to - i), Dt(this, "changed", { from: this.from, to: this.to, trigger: "scrollbar", DOMEvent: t });
404
+ }
405
+ update(t) {
406
+ this.destroy(), this.init(this.chart.renderer, si(!0, this.options, t), this.chart);
407
+ }
408
+ updatePosition(t, e) {
409
+ e > 1 && (t = ut(1 - ut(e - t)), e = 1), t < 0 && (e = ut(e - t), t = 0), this.from = t, this.to = e;
410
+ }
411
+ }
412
+ ct.defaultOptions = Nt;
413
+ var po = I(540), uo = I.n(po);
414
+ let { defaultOptions: ye } = C(), { isTouchDevice: co } = C(), { prototype: { symbols: oi } } = uo(), { addEvent: Y, clamp: ri, correctFloat: Ut, defined: Mt, destroyObjectProperties: go, erase: At, extend: fo, find: mo, fireEvent: Me, isArray: ai, isNumber: K, merge: kt, pick: q, removeEvent: Vt, splat: ni } = C();
415
+ function _t(a, ...t) {
416
+ let e = [].filter.call(t, K);
417
+ if (e.length) return Math[a].apply(0, e);
418
+ }
419
+ class jt {
420
+ static compose(t, e, i) {
421
+ Is(t, jt), to(t, e, i);
422
+ }
423
+ constructor(t) {
424
+ this.isDirty = !1, this.scrollbarHeight = 0, this.init(t);
425
+ }
426
+ drawHandle(t, e, i, s) {
427
+ let o = this.navigatorOptions.handles.height;
428
+ this.handles[e][s](i ? { translateX: Math.round(this.left + this.height / 2), translateY: Math.round(this.top + parseInt(t, 10) + 0.5 - o) } : { translateX: Math.round(this.left + parseInt(t, 10)), translateY: Math.round(this.top + this.height / 2 - o / 2 - 1) });
429
+ }
430
+ drawOutline(t, e, i, s) {
431
+ let o = this.navigatorOptions.maskInside, d = this.outline.strokeWidth(), p = d / 2, u = d % 2 / 2, c = this.scrollButtonSize, f = this.size, l = this.top, r = this.height, n = l - p, h = l + r, g = this.left, m, x;
432
+ i ? (m = l + e + u, e = l + t + u, x = [["M", g + r, l - c - u], ["L", g + r, m], ["L", g, m], ["M", g, e], ["L", g + r, e], ["L", g + r, l + f + c]], o && x.push(["M", g + r, m - p], ["L", g + r, e + p])) : (g -= c, t += g + c - u, e += g + c - u, x = [["M", g, n], ["L", t, n], ["L", t, h], ["M", e, h], ["L", e, n], ["L", g + f + 2 * c, n]], o && x.push(["M", t - p, n], ["L", e + p, n])), this.outline[s]({ d: x });
433
+ }
434
+ drawMasks(t, e, i, s) {
435
+ let o, d, p, u, c = this.left, f = this.top, l = this.height;
436
+ i ? (p = [c, c, c], u = [f, f + t, f + e], d = [l, l, l], o = [t, e - t, this.size - e]) : (p = [c, c + t, c + e], u = [f, f, f], d = [t, e - t, this.size - e], o = [l, l, l]), this.shades.forEach((r, n) => {
437
+ r[s]({ x: p[n], y: u[n], width: d[n], height: o[n] });
438
+ });
439
+ }
440
+ renderElements() {
441
+ let t = this, e = t.navigatorOptions, i = e.maskInside, s = t.chart, o = s.inverted, d = s.renderer, p = { cursor: o ? "ns-resize" : "ew-resize" }, u = t.navigatorGroup ?? (t.navigatorGroup = d.g("navigator").attr({ zIndex: 8, visibility: "hidden" }).add());
442
+ if ([!i, i, !i].forEach((c, f) => {
443
+ let l = t.shades[f] ?? (t.shades[f] = d.rect().addClass("highcharts-navigator-mask" + (f === 1 ? "-inside" : "-outside")).add(u));
444
+ s.styledMode || (l.attr({ fill: c ? e.maskFill : "rgba(0,0,0,0)" }), f === 1 && l.css(p));
445
+ }), t.outline || (t.outline = d.path().addClass("highcharts-navigator-outline").add(u)), s.styledMode || t.outline.attr({ "stroke-width": e.outlineWidth, stroke: e.outlineColor }), e.handles?.enabled) {
446
+ let c = e.handles, { height: f, width: l } = c;
447
+ [0, 1].forEach((r) => {
448
+ let n = c.symbols[r];
449
+ if (t.handles[r] && t.handles[r].symbolUrl === n) {
450
+ if (!t.handles[r].isImg && t.handles[r].symbolName !== n) {
451
+ let h = oi[n].call(oi, -l / 2 - 1, 0, l, f);
452
+ t.handles[r].attr({ d: h }), t.handles[r].symbolName = n;
453
+ }
454
+ } else t.handles[r]?.destroy(), t.handles[r] = d.symbol(n, -l / 2 - 1, 0, l, f, c), t.handles[r].attr({ zIndex: 7 - r }).addClass("highcharts-navigator-handle highcharts-navigator-handle-" + ["left", "right"][r]).add(u), t.addMouseEvents();
455
+ s.inverted && t.handles[r].attr({ rotation: 90, rotationOriginX: Math.floor(-l / 2), rotationOriginY: (f + l) / 2 }), s.styledMode || t.handles[r].attr({ fill: c.backgroundColor, stroke: c.borderColor, "stroke-width": c.lineWidth, width: c.width, height: c.height, x: -l / 2 - 1, y: 0 }).css(p);
456
+ });
457
+ }
458
+ }
459
+ update(t, e = !1) {
460
+ let i = this.chart, s = i.options.chart.inverted !== i.scrollbar?.options.vertical;
461
+ if (kt(!0, i.options.navigator, t), this.navigatorOptions = i.options.navigator || {}, this.setOpposite(), Mt(t.enabled) || s) return this.destroy(), this.navigatorEnabled = t.enabled || this.navigatorEnabled, this.init(i);
462
+ if (this.navigatorEnabled && (this.isDirty = !0, t.adaptToUpdatedData === !1 && this.baseSeries.forEach((o) => {
463
+ Vt(o, "updatedData", this.updatedDataHandler);
464
+ }, this), t.adaptToUpdatedData && this.baseSeries.forEach((o) => {
465
+ o.eventsToUnbind.push(Y(o, "updatedData", this.updatedDataHandler));
466
+ }, this), (t.series || t.baseSeries) && this.setBaseSeries(void 0, !1), t.height || t.xAxis || t.yAxis)) {
467
+ this.height = t.height ?? this.height;
468
+ let o = this.getXAxisOffsets();
469
+ this.xAxis.update({ ...t.xAxis, offsets: o, [i.inverted ? "width" : "height"]: this.height, [i.inverted ? "height" : "width"]: void 0 }, !1), this.yAxis.update({ ...t.yAxis, [i.inverted ? "width" : "height"]: this.height }, !1);
470
+ }
471
+ e && i.redraw();
472
+ }
473
+ render(t, e, i, s) {
474
+ let o = this.chart, d = this.xAxis, p = d.pointRange || 0, u = d.navigatorAxis.fake ? o.xAxis[0] : d, c = this.navigatorEnabled, f = this.rendered, l = o.inverted, r = o.xAxis[0].minRange, n = o.xAxis[0].options.maxRange, h = this.scrollButtonSize, g, m, x, b = this.scrollbarHeight, A, y;
475
+ if (this.hasDragged && !Mt(i)) return;
476
+ if (this.isDirty && this.renderElements(), t = Ut(t - p / 2), e = Ut(e + p / 2), !K(t) || !K(e)) if (f) i = 0, s = q(d.width, u.width);
477
+ else return;
478
+ this.left = q(d.left, o.plotLeft + h + (l ? o.plotWidth : 0));
479
+ let k = this.size = A = q(d.len, (l ? o.plotHeight : o.plotWidth) - 2 * h);
480
+ g = l ? b : A + 2 * h, i = q(i, d.toPixels(t, !0)), s = q(s, d.toPixels(e, !0)), K(i) && Math.abs(i) !== 1 / 0 || (i = 0, s = g);
481
+ let M = d.toValue(i, !0), v = d.toValue(s, !0), S = Math.abs(Ut(v - M));
482
+ S < r ? this.grabbedLeft ? i = d.toPixels(v - r - p, !0) : this.grabbedRight && (s = d.toPixels(M + r + p, !0)) : Mt(n) && Ut(S - p) > n && (this.grabbedLeft ? i = d.toPixels(v - n - p, !0) : this.grabbedRight && (s = d.toPixels(M + n + p, !0))), this.zoomedMax = ri(Math.max(i, s), 0, k), this.zoomedMin = ri(this.fixedWidth ? this.zoomedMax - this.fixedWidth : Math.min(i, s), 0, k), this.range = this.zoomedMax - this.zoomedMin, k = Math.round(this.zoomedMax);
483
+ let T = Math.round(this.zoomedMin);
484
+ c && (this.navigatorGroup.attr({ visibility: "inherit" }), y = f && !this.hasDragged ? "animate" : "attr", this.drawMasks(T, k, l, y), this.drawOutline(T, k, l, y), this.navigatorOptions.handles.enabled && (this.drawHandle(T, 0, l, y), this.drawHandle(k, 1, l, y))), this.scrollbar && (l ? (x = this.top - h, m = this.left - b + (c || !u.opposite ? 0 : (u.titleOffset || 0) + u.axisTitleMargin), b = A + 2 * h) : (x = this.top + (c ? this.height : -b), m = this.left - h), this.scrollbar.position(m, x, g, b), this.scrollbar.setRange(this.zoomedMin / (A || 1), this.zoomedMax / (A || 1))), this.rendered = !0, this.isDirty = !1, Me(this, "afterRender");
485
+ }
486
+ addMouseEvents() {
487
+ let t = this, e = t.chart, i = e.container, s = [], o, d;
488
+ t.mouseMoveHandler = o = function(p) {
489
+ t.onMouseMove(p);
490
+ }, t.mouseUpHandler = d = function(p) {
491
+ t.onMouseUp(p);
492
+ }, (s = t.getPartsEvents("mousedown")).push(Y(e.renderTo, "mousemove", o), Y(i.ownerDocument, "mouseup", d), Y(e.renderTo, "touchmove", o), Y(i.ownerDocument, "touchend", d)), s.concat(t.getPartsEvents("touchstart")), t.eventsToUnbind = s, t.series && t.series[0] && s.push(Y(t.series[0].xAxis, "foundExtremes", function() {
493
+ e.navigator.modifyNavigatorAxisExtremes();
494
+ }));
495
+ }
496
+ getPartsEvents(t) {
497
+ let e = this, i = [];
498
+ return ["shades", "handles"].forEach(function(s) {
499
+ e[s].forEach(function(o, d) {
500
+ i.push(Y(o.element, t, function(p) {
501
+ e[s + "Mousedown"](p, d);
502
+ }));
503
+ });
504
+ }), i;
505
+ }
506
+ shadesMousedown(t, e) {
507
+ t = this.chart.pointer?.normalize(t) || t;
508
+ let i = this.chart, s = this.xAxis, o = this.zoomedMin, d = this.size, p = this.range, u = this.left, c = t.chartX, f, l, r, n;
509
+ i.inverted && (c = t.chartY, u = this.top), e === 1 ? (this.grabbedCenter = c, this.fixedWidth = p, this.dragOffset = c - o) : (n = c - u - p / 2, e === 0 ? n = Math.max(0, n) : e === 2 && n + p >= d && (n = d - p, this.reversedExtremes ? (n -= p, l = this.getUnionExtremes().dataMin) : f = this.getUnionExtremes().dataMax), n !== o && (this.fixedWidth = p, Mt((r = s.navigatorAxis.toFixedRange(n, n + p, l, f)).min) && Me(this, "setRange", { min: Math.min(r.min, r.max), max: Math.max(r.min, r.max), redraw: !0, eventArguments: { trigger: "navigator" } })));
510
+ }
511
+ handlesMousedown(t, e) {
512
+ t = this.chart.pointer?.normalize(t) || t;
513
+ let i = this.chart, s = i.xAxis[0], o = this.reversedExtremes;
514
+ e === 0 ? (this.grabbedLeft = !0, this.otherHandlePos = this.zoomedMax, this.fixedExtreme = o ? s.min : s.max) : (this.grabbedRight = !0, this.otherHandlePos = this.zoomedMin, this.fixedExtreme = o ? s.max : s.min), i.setFixedRange(void 0);
515
+ }
516
+ onMouseMove(t) {
517
+ let e = this, i = e.chart, s = e.navigatorSize, o = e.range, d = e.dragOffset, p = i.inverted, u = e.left, c;
518
+ (!t.touches || t.touches[0].pageX !== 0) && (c = (t = i.pointer?.normalize(t) || t).chartX, p && (u = e.top, c = t.chartY), e.grabbedLeft ? (e.hasDragged = !0, e.render(0, 0, c - u, e.otherHandlePos)) : e.grabbedRight ? (e.hasDragged = !0, e.render(0, 0, e.otherHandlePos, c - u)) : e.grabbedCenter && (e.hasDragged = !0, c < d ? c = d : c > s + d - o && (c = s + d - o), e.render(0, 0, c - d, c - d + o)), e.hasDragged && e.scrollbar && q(e.scrollbar.options.liveRedraw, !co && !this.chart.boosted) && (t.DOMType = t.type, setTimeout(function() {
519
+ e.onMouseUp(t);
520
+ }, 0)));
521
+ }
522
+ onMouseUp(t) {
523
+ let e, i, s, o, d, p, u = this.chart, c = this.xAxis, f = this.scrollbar, l = t.DOMEvent || t, r = u.inverted, n = this.rendered && !this.hasDragged ? "animate" : "attr";
524
+ (this.hasDragged && (!f || !f.hasDragged) || t.trigger === "scrollbar") && (s = this.getUnionExtremes(), this.zoomedMin === this.otherHandlePos ? o = this.fixedExtreme : this.zoomedMax === this.otherHandlePos && (d = this.fixedExtreme), this.zoomedMax === this.size && (d = this.reversedExtremes ? s.dataMin : s.dataMax), this.zoomedMin === 0 && (o = this.reversedExtremes ? s.dataMax : s.dataMin), Mt((p = c.navigatorAxis.toFixedRange(this.zoomedMin, this.zoomedMax, o, d)).min) && Me(this, "setRange", { min: Math.min(p.min, p.max), max: Math.max(p.min, p.max), redraw: !0, animation: !this.hasDragged && null, eventArguments: { trigger: "navigator", triggerOp: "navigator-drag", DOMEvent: l } })), t.DOMType !== "mousemove" && t.DOMType !== "touchmove" && (this.grabbedLeft = this.grabbedRight = this.grabbedCenter = this.fixedWidth = this.fixedExtreme = this.otherHandlePos = this.hasDragged = this.dragOffset = null), this.navigatorEnabled && K(this.zoomedMin) && K(this.zoomedMax) && (i = Math.round(this.zoomedMin), e = Math.round(this.zoomedMax), this.shades && this.drawMasks(i, e, r, n), this.outline && this.drawOutline(i, e, r, n), this.navigatorOptions.handles.enabled && Object.keys(this.handles).length === this.handles.length && (this.drawHandle(i, 0, r, n), this.drawHandle(e, 1, r, n)));
525
+ }
526
+ removeEvents() {
527
+ this.eventsToUnbind && (this.eventsToUnbind.forEach(function(t) {
528
+ t();
529
+ }), this.eventsToUnbind = void 0), this.removeBaseSeriesEvents();
530
+ }
531
+ removeBaseSeriesEvents() {
532
+ let t = this.baseSeries || [];
533
+ this.navigatorEnabled && t[0] && (this.navigatorOptions.adaptToUpdatedData !== !1 && t.forEach(function(e) {
534
+ Vt(e, "updatedData", this.updatedDataHandler);
535
+ }, this), t[0].xAxis && Vt(t[0].xAxis, "foundExtremes", this.modifyBaseAxisExtremes));
536
+ }
537
+ getXAxisOffsets() {
538
+ return this.chart.inverted ? [this.scrollButtonSize, 0, -this.scrollButtonSize, 0] : [0, -this.scrollButtonSize, 0, this.scrollButtonSize];
539
+ }
540
+ init(t) {
541
+ let e = t.options, i = e.navigator || {}, s = i.enabled, o = e.scrollbar || {}, d = o.enabled, p = s && i.height || 0, u = d && o.height || 0, c = o.buttonsEnabled && u || 0;
542
+ this.handles = [], this.shades = [], this.chart = t, this.setBaseSeries(), this.height = p, this.scrollbarHeight = u, this.scrollButtonSize = c, this.scrollbarEnabled = d, this.navigatorEnabled = s, this.navigatorOptions = i, this.scrollbarOptions = o, this.setOpposite();
543
+ let f = this, l = f.baseSeries, r = t.xAxis.length, n = t.yAxis.length, h = l && l[0] && l[0].xAxis || t.xAxis[0] || { options: {} };
544
+ if (t.isDirtyBox = !0, f.navigatorEnabled) {
545
+ let g = this.getXAxisOffsets();
546
+ f.xAxis = new (fe())(t, kt({ breaks: h.options.breaks, ordinal: h.options.ordinal, overscroll: h.options.overscroll }, i.xAxis, { type: "datetime", yAxis: i.yAxis?.id, index: r, isInternal: !0, offset: 0, keepOrdinalPadding: !0, startOnTick: !1, endOnTick: !1, minPadding: h.options.ordinal ? 0 : h.options.minPadding, maxPadding: h.options.ordinal ? 0 : h.options.maxPadding, zoomEnabled: !1 }, t.inverted ? { offsets: g, width: p } : { offsets: g, height: p }), "xAxis"), f.yAxis = new (fe())(t, kt(i.yAxis, { alignTicks: !1, offset: 0, index: n, isInternal: !0, reversed: q(i.yAxis && i.yAxis.reversed, t.yAxis[0] && t.yAxis[0].reversed, !1), zoomEnabled: !1 }, t.inverted ? { width: p } : { height: p }), "yAxis"), l || i.series.data ? f.updateNavigatorSeries(!1) : t.series.length === 0 && (f.unbindRedraw = Y(t, "beforeRedraw", function() {
547
+ t.series.length > 0 && !f.series && (f.setBaseSeries(), f.unbindRedraw());
548
+ })), f.reversedExtremes = t.inverted && !f.xAxis.reversed || !t.inverted && f.xAxis.reversed, f.renderElements(), f.addMouseEvents();
549
+ } else f.xAxis = { chart: t, navigatorAxis: { fake: !0 }, translate: function(g, m) {
550
+ let x = t.xAxis[0], b = x.getExtremes(), A = x.len - 2 * c, y = _t("min", x.options.min, b.dataMin), k = _t("max", x.options.max, b.dataMax) - y;
551
+ return m ? g * k / A + y : A * (g - y) / k;
552
+ }, toPixels: function(g) {
553
+ return this.translate(g);
554
+ }, toValue: function(g) {
555
+ return this.translate(g, !0);
556
+ } }, f.xAxis.navigatorAxis.axis = f.xAxis, f.xAxis.navigatorAxis.toFixedRange = be.prototype.toFixedRange.bind(f.xAxis.navigatorAxis);
557
+ if (t.options.scrollbar?.enabled) {
558
+ let g = kt(t.options.scrollbar, { vertical: t.inverted });
559
+ K(g.margin) || (g.margin = t.inverted ? -3 : 3), t.scrollbar = f.scrollbar = new ct(t.renderer, g, t), Y(f.scrollbar, "changed", function(m) {
560
+ let x = f.size, b = x * this.to, A = x * this.from;
561
+ f.hasDragged = f.scrollbar.hasDragged, f.render(0, 0, A, b), this.shouldUpdateExtremes(m.DOMType) && setTimeout(function() {
562
+ f.onMouseUp(m);
563
+ });
564
+ });
565
+ }
566
+ f.addBaseSeriesEvents(), f.addChartEvents();
567
+ }
568
+ setOpposite() {
569
+ let t = this.navigatorOptions, e = this.navigatorEnabled, i = this.chart;
570
+ this.opposite = q(t.opposite, !!(!e && i.inverted));
571
+ }
572
+ getUnionExtremes(t) {
573
+ let e, i = this.chart.xAxis[0], s = this.chart.time, o = this.xAxis, d = o.options, p = i.options;
574
+ return t && i.dataMin === null || (e = { dataMin: q(s.parse(d?.min), _t("min", s.parse(p.min), i.dataMin, o.dataMin, o.min)), dataMax: q(s.parse(d?.max), _t("max", s.parse(p.max), i.dataMax, o.dataMax, o.max)) }), e;
575
+ }
576
+ setBaseSeries(t, e) {
577
+ let i = this.chart, s = this.baseSeries = [];
578
+ t = t || i.options && i.options.navigator.baseSeries || (i.series.length ? mo(i.series, (o) => !o.options.isInternal).index : 0), (i.series || []).forEach((o, d) => {
579
+ !o.options.isInternal && (o.options.showInNavigator || (d === t || o.options.id === t) && o.options.showInNavigator !== !1) && s.push(o);
580
+ }), this.xAxis && !this.xAxis.navigatorAxis.fake && this.updateNavigatorSeries(!0, e);
581
+ }
582
+ updateNavigatorSeries(t, e) {
583
+ let i = this, s = i.chart, o = i.baseSeries, d = { enableMouseTracking: !1, index: null, linkedTo: null, group: "nav", padXAxis: !1, xAxis: this.navigatorOptions.xAxis?.id, yAxis: this.navigatorOptions.yAxis?.id, showInLegend: !1, stacking: void 0, isInternal: !0, states: { inactive: { opacity: 1 } } }, p = i.series = (i.series || []).filter((r) => {
584
+ let n = r.baseSeries;
585
+ return !(0 > o.indexOf(n)) || (n && (Vt(n, "updatedData", i.updatedDataHandler), delete n.navigatorSeries), r.chart && r.destroy(), !1);
586
+ }), u, c, f = i.navigatorOptions.series, l;
587
+ o && o.length && o.forEach((r) => {
588
+ let n = r.navigatorSeries, h = fo({ color: r.color, visible: r.visible }, ai(f) ? ye.navigator.series : f);
589
+ if (n && i.navigatorOptions.adaptToUpdatedData === !1) return;
590
+ d.name = "Navigator " + o.length, l = (u = r.options || {}).navigatorOptions || {}, h.dataLabels = ni(h.dataLabels), (c = kt(u, d, h, l)).pointRange = q(h.pointRange, l.pointRange, ye.plotOptions[c.type || "line"].pointRange);
591
+ let g = l.data || h.data;
592
+ i.hasNavigatorData = i.hasNavigatorData || !!g, c.data = g || u.data?.slice(0), n && n.options ? n.update(c, e) : (r.navigatorSeries = s.initSeries(c), s.setSortedData(), r.navigatorSeries.baseSeries = r, p.push(r.navigatorSeries));
593
+ }), (f.data && !(o && o.length) || ai(f)) && (i.hasNavigatorData = !1, (f = ni(f)).forEach((r, n) => {
594
+ d.name = "Navigator " + (p.length + 1), (c = kt(ye.navigator.series, { color: s.series[n] && !s.series[n].options.isInternal && s.series[n].color || s.options.colors[n] || s.options.colors[0] }, d, r)).data = r.data, c.data && (i.hasNavigatorData = !0, p.push(s.initSeries(c)));
595
+ })), t && this.addBaseSeriesEvents();
596
+ }
597
+ addBaseSeriesEvents() {
598
+ let t = this, e = t.baseSeries || [];
599
+ e[0] && e[0].xAxis && e[0].eventsToUnbind.push(Y(e[0].xAxis, "foundExtremes", this.modifyBaseAxisExtremes)), e.forEach((i) => {
600
+ i.eventsToUnbind.push(Y(i, "show", function() {
601
+ this.navigatorSeries && this.navigatorSeries.setVisible(!0, !1);
602
+ })), i.eventsToUnbind.push(Y(i, "hide", function() {
603
+ this.navigatorSeries && this.navigatorSeries.setVisible(!1, !1);
604
+ })), this.navigatorOptions.adaptToUpdatedData !== !1 && i.xAxis && i.eventsToUnbind.push(Y(i, "updatedData", this.updatedDataHandler)), i.eventsToUnbind.push(Y(i, "remove", function() {
605
+ e && At(e, i), this.navigatorSeries && t.series && (At(t.series, this.navigatorSeries), Mt(this.navigatorSeries.options) && this.navigatorSeries.remove(!1), delete this.navigatorSeries);
606
+ }));
607
+ });
608
+ }
609
+ getBaseSeriesMin(t) {
610
+ return this.baseSeries.reduce(function(e, i) {
611
+ return Math.min(e, i.getColumn("x")[0] ?? e);
612
+ }, t);
613
+ }
614
+ modifyNavigatorAxisExtremes() {
615
+ let t = this.xAxis;
616
+ if (t.getExtremes !== void 0) {
617
+ let e = this.getUnionExtremes(!0);
618
+ e && (e.dataMin !== t.min || e.dataMax !== t.max) && (t.min = e.dataMin, t.max = e.dataMax);
619
+ }
620
+ }
621
+ modifyBaseAxisExtremes() {
622
+ let t, e, i = this.chart.navigator, s = this.getExtremes(), o = s.min, d = s.max, p = s.dataMin, u = s.dataMax, c = d - o, f = i.stickToMin, l = i.stickToMax, r = q(this.ordinal?.convertOverscroll(this.options.overscroll), 0), n = i.series && i.series[0], h = !!this.setExtremes;
623
+ !(this.eventArgs && this.eventArgs.trigger === "rangeSelectorButton") && (f && (t = (e = p) + c), l && (t = u + r, f || (e = Math.max(p, t - c, i.getBaseSeriesMin(n && n.xData ? n.xData[0] : -Number.MAX_VALUE)))), h && (f || l) && K(e) && (this.min = this.userMin = e, this.max = this.userMax = t)), i.stickToMin = i.stickToMax = null;
624
+ }
625
+ updatedDataHandler() {
626
+ let t = this.chart.navigator, e = this.navigatorSeries, i = t.reversedExtremes ? Math.round(t.zoomedMin) === 0 : Math.round(t.zoomedMax) >= Math.round(t.size);
627
+ t.stickToMax = q(this.chart.options.navigator && this.chart.options.navigator.stickToMax, i), t.stickToMin = t.shouldStickToMin(this, t), e && !t.hasNavigatorData && (e.options.pointStart = this.getColumn("x")[0], e.setData(this.options.data, !1, null, !1));
628
+ }
629
+ shouldStickToMin(t, e) {
630
+ let i = e.getBaseSeriesMin(t.getColumn("x")[0]), s = t.xAxis, o = s.max, d = s.min, p = s.options.range;
631
+ return !!(K(o) && K(d)) && (p && o - i > 0 ? o - i < p : d <= i);
632
+ }
633
+ addChartEvents() {
634
+ this.eventsToUnbind || (this.eventsToUnbind = []), this.eventsToUnbind.push(Y(this.chart, "redraw", function() {
635
+ let t = this.navigator, e = t && (t.baseSeries && t.baseSeries[0] && t.baseSeries[0].xAxis || this.xAxis[0]);
636
+ e && t.render(e.min, e.max);
637
+ }), Y(this.chart, "getMargins", function() {
638
+ let t = this.navigator, e = t.opposite ? "plotTop" : "marginBottom";
639
+ this.inverted && (e = t.opposite ? "marginRight" : "plotLeft"), this[e] = (this[e] || 0) + (t.navigatorEnabled || !this.inverted ? t.height + (this.scrollbar?.options.margin || 0) + t.scrollbarHeight : 0) + (t.navigatorOptions.margin || 0);
640
+ }), Y(jt, "setRange", function(t) {
641
+ this.chart.xAxis[0].setExtremes(t.min, t.max, t.redraw, t.animation, t.eventArguments);
642
+ }));
643
+ }
644
+ destroy() {
645
+ this.removeEvents(), this.xAxis && (At(this.chart.xAxis, this.xAxis), At(this.chart.axes, this.xAxis)), this.yAxis && (At(this.chart.yAxis, this.yAxis), At(this.chart.axes, this.yAxis)), (this.series || []).forEach((t) => {
646
+ t.destroy && t.destroy();
647
+ }), ["series", "xAxis", "yAxis", "shades", "outline", "scrollbarTrack", "scrollbarRifles", "scrollbarGroup", "scrollbar", "navigatorGroup", "rendered"].forEach((t) => {
648
+ this[t] && this[t].destroy && this[t].destroy(), this[t] = null;
649
+ }), [this.handles].forEach((t) => {
650
+ go(t);
651
+ }), this.baseSeries.forEach((t) => {
652
+ t.navigatorSeries = void 0;
653
+ }), this.navigatorEnabled = !1;
654
+ }
655
+ }
656
+ (re = le || (le = {})).setLength = function(a, t, e) {
657
+ return Array.isArray(a) ? (a.length = t, a) : a[e ? "subarray" : "slice"](0, t);
658
+ }, re.splice = function(a, t, e, i, s = []) {
659
+ if (Array.isArray(a)) return Array.isArray(s) || (s = Array.from(s)), { removed: a.splice(t, e, ...s), array: a };
660
+ let o = Object.getPrototypeOf(a).constructor, d = a[i ? "subarray" : "slice"](t, t + e), p = new o(a.length - e + s.length);
661
+ return p.set(a.subarray(0, t), 0), p.set(s, t), p.set(a.subarray(t + e), t + s.length), { removed: d, array: p };
662
+ }, re.convertToNumber = function(a, t) {
663
+ switch (typeof a) {
664
+ case "boolean":
665
+ return +!!a;
666
+ case "number":
667
+ return isNaN(a) && !t ? null : a;
668
+ default:
669
+ return isNaN(a = parseFloat(`${a ?? ""}`)) && !t ? null : a;
670
+ }
671
+ };
672
+ let { setLength: xo, splice: li } = le, { fireEvent: Ae, objectEach: Gt, uniqueKey: It } = C(), hi = class {
673
+ constructor(a = {}) {
674
+ this.autoId = !a.id, this.columns = {}, this.id = a.id || It(), this.rowCount = 0, this.versionTag = It();
675
+ let t = 0;
676
+ Gt(a.columns || {}, (e, i) => {
677
+ this.columns[i] = e.slice(), t = Math.max(t, e.length);
678
+ }), this.applyRowCount(t);
679
+ }
680
+ applyRowCount(a) {
681
+ this.rowCount = a, Gt(this.columns, (t, e) => {
682
+ t.length !== a && (this.columns[e] = xo(t, a));
683
+ });
684
+ }
685
+ deleteRows(a, t = 1) {
686
+ if (t > 0 && a < this.rowCount) {
687
+ let e = 0;
688
+ Gt(this.columns, (i, s) => {
689
+ this.columns[s] = li(i, a, t).array, e = i.length;
690
+ }), this.rowCount = e;
691
+ }
692
+ Ae(this, "afterDeleteRows", { rowIndex: a, rowCount: t }), this.versionTag = It();
693
+ }
694
+ getColumn(a, t) {
695
+ return this.columns[a];
696
+ }
697
+ getColumns(a, t) {
698
+ return (a || Object.keys(this.columns)).reduce((e, i) => (e[i] = this.columns[i], e), {});
699
+ }
700
+ getRow(a, t) {
701
+ return (t || Object.keys(this.columns)).map((e) => this.columns[e]?.[a]);
702
+ }
703
+ setColumn(a, t = [], e = 0, i) {
704
+ this.setColumns({ [a]: t }, e, i);
705
+ }
706
+ setColumns(a, t, e) {
707
+ let i = this.rowCount;
708
+ Gt(a, (s, o) => {
709
+ this.columns[o] = s.slice(), i = s.length;
710
+ }), this.applyRowCount(i), e?.silent || (Ae(this, "afterSetColumns"), this.versionTag = It());
711
+ }
712
+ setRow(a, t = this.rowCount, e, i) {
713
+ let { columns: s } = this, o = e ? this.rowCount + 1 : t + 1, d = Object.keys(a);
714
+ if (i?.addColumns !== !1) for (let p = 0, u = d.length; p < u; p++) {
715
+ let c = d[p];
716
+ s[c] || (s[c] = []);
717
+ }
718
+ Gt(s, (p, u) => {
719
+ p || i?.addColumns === !1 || (p = Array(o)), p && (e ? p = li(p, t, 0, !0, [a[u] ?? null]).array : p[t] = a[u] ?? null, s[u] = p);
720
+ }), o > this.rowCount && this.applyRowCount(o), i?.silent || (Ae(this, "afterSetRows"), this.versionTag = It());
721
+ }
722
+ getModified() {
723
+ return this.modified || this;
724
+ }
725
+ }, { addEvent: gt, correctFloat: qt, css: bo, defined: rt, error: vo, isNumber: zt, pick: ke, timeUnits: yo, isString: Mo } = C();
726
+ (function(a) {
727
+ function t(r, n, h, g, m = [], x = 0, b) {
728
+ let A = {}, y = this.options.tickPixelInterval, k = this.chart.time, M = [], v, S, T, B, w, E = 0, P = [], O = -Number.MAX_VALUE;
729
+ if (!this.options.ordinal && !this.options.breaks || !m || m.length < 3 || n === void 0) return k.getTimeTicks.apply(k, arguments);
730
+ let D = m.length;
731
+ for (v = 0; v < D; v++) {
732
+ if (w = v && m[v - 1] > h, m[v] < n && (E = v), v === D - 1 || m[v + 1] - m[v] > 5 * x || w) {
733
+ if (m[v] > O) {
734
+ for (S = k.getTimeTicks(r, m[E], m[v], g); S.length && S[0] <= O; ) S.shift();
735
+ S.length && (O = S[S.length - 1]), M.push(P.length), P = P.concat(S);
736
+ }
737
+ E = v + 1;
738
+ }
739
+ if (w) break;
740
+ }
741
+ if (S) {
742
+ if (B = S.info, b && B.unitRange <= yo.hour) {
743
+ for (E = 1, v = P.length - 1; E < v; E++) k.dateFormat("%d", P[E]) !== k.dateFormat("%d", P[E - 1]) && (A[P[E]] = "day", T = !0);
744
+ T && (A[P[0]] = "day"), B.higherRanks = A;
745
+ }
746
+ B.segmentStarts = M, P.info = B;
747
+ } else vo(12, !1, this.chart);
748
+ if (b && rt(y)) {
749
+ let R = P.length, H = [], L = [], z, W, N, lt, Ot, _ = R;
750
+ for (; _--; ) W = this.translate(P[_]), N && (L[_] = N - W), H[_] = N = W;
751
+ for (L.sort((Bt, Qt) => Bt - Qt), (lt = L[Math.floor(L.length / 2)]) < 0.6 * y && (lt = null), _ = P[R - 1] > h ? R - 1 : R, N = void 0; _--; ) Ot = Math.abs(N - (W = H[_])), N && Ot < 0.8 * y && (lt === null || Ot < 0.8 * lt) ? (A[P[_]] && !A[P[_ + 1]] ? (z = _ + 1, N = W) : z = _, P.splice(z, 1)) : N = W;
752
+ }
753
+ return P;
754
+ }
755
+ function e(r) {
756
+ let n = this.ordinal.positions;
757
+ if (!n) return r;
758
+ let h = n.length - 1, g;
759
+ return r < 0 ? r = n[0] : r > h ? r = n[h] : (h = Math.floor(r), g = r - h), g !== void 0 && n[h] !== void 0 ? n[h] + (g ? g * (n[h + 1] - n[h]) : 0) : r;
760
+ }
761
+ function i(r) {
762
+ let n = this.ordinal, h = this.old ? this.old.min : this.min, g = this.old ? this.old.transA : this.transA, m = n.getExtendedPositions();
763
+ if (m?.length) {
764
+ let x = qt((r - h) * g + this.minPixelPadding), b = qt(n.getIndexOfPoint(x, m)), A = qt(b % 1);
765
+ if (b >= 0 && b <= m.length - 1) {
766
+ let y = m[Math.floor(b)], k = m[Math.ceil(b)];
767
+ return m[Math.floor(b)] + A * (k - y);
768
+ }
769
+ }
770
+ return r;
771
+ }
772
+ function s(r, n) {
773
+ let h = a.Additions.findIndexOf(r, n, !0);
774
+ if (r[h] === n) return h;
775
+ let g = (n - r[h]) / (r[h + 1] - r[h]);
776
+ return h + g;
777
+ }
778
+ function o() {
779
+ this.ordinal || (this.ordinal = new a.Additions(this));
780
+ }
781
+ function d() {
782
+ let { eventArgs: r, options: n } = this;
783
+ if (this.isXAxis && rt(n.overscroll) && n.overscroll !== 0 && zt(this.max) && zt(this.min) && (this.options.ordinal && !this.ordinal.originalOrdinalRange && this.ordinal.getExtendedPositions(!1), this.isFullRange = rt(this.dataMin) && rt(this.dataMax) && this.max - this.min == this.dataMax - this.dataMin, this.max === this.dataMax && (r?.trigger !== "pan" || this.isInternal) && r?.trigger !== "navigator")) {
784
+ let h = this.ordinal.convertOverscroll(n.overscroll);
785
+ this.max += h, !this.isInternal && rt(this.userMin) && r?.trigger !== "mousewheel" && (this.min += h);
786
+ }
787
+ }
788
+ function p() {
789
+ this.horiz && !this.isDirty && (this.isDirty = this.isOrdinal && this.chart.navigator && !this.chart.navigator.adaptToUpdatedData);
790
+ }
791
+ function u() {
792
+ this.ordinal && (this.ordinal.beforeSetTickPositions(), this.tickInterval = this.ordinal.postProcessTickInterval(this.tickInterval));
793
+ }
794
+ function c(r) {
795
+ let n = this.xAxis[0], h = n.ordinal.convertOverscroll(n.options.overscroll), g = r.originalEvent.chartX, m = this.options.chart.panning, x = !1;
796
+ if (m?.type !== "y" && n.options.ordinal && n.series.length && (!r.touches || r.touches.length <= 1)) {
797
+ let b, A, y = this.mouseDownX, k = n.getExtremes(), M = k.dataMin, v = k.dataMax, S = k.min, T = k.max, B = this.hoverPoints, w = n.closestPointRange || n.ordinal?.overscrollPointsRange, E = Math.round((y - g) / (n.translationSlope * (n.ordinal.slope || w))), P = n.ordinal.getExtendedPositions(), O = { ordinal: { positions: P, extendedOrdinalPositions: P } }, D = n.index2val, R = n.val2lin;
798
+ if (S <= M && E <= 0 || T >= v + h && E >= 0) return void r.preventDefault();
799
+ O.ordinal.positions ? Math.abs(E) > 1 && (B && B.forEach(function(H) {
800
+ H.setState();
801
+ }), A = O.ordinal.positions, h && (A = O.ordinal.positions = A.concat(n.ordinal.getOverscrollPositions())), v > A[A.length - 1] && A.push(v), this.setFixedRange(T - S), (b = n.navigatorAxis.toFixedRange(void 0, void 0, D.apply(O, [R.apply(O, [S, !0]) + E]), D.apply(O, [R.apply(O, [T, !0]) + E]))).min >= Math.min(A[0], S) && b.max <= Math.max(A[A.length - 1], T) + h && n.setExtremes(b.min, b.max, !0, !1, { trigger: "pan" }), this.mouseDownX = g, bo(this.container, { cursor: "move" })) : x = !0;
802
+ } else x = !0;
803
+ x || m && /y/.test(m.type) ? h && zt(n.dataMax) && (n.max = n.dataMax + h) : r.preventDefault();
804
+ }
805
+ function f() {
806
+ let r = this.xAxis;
807
+ r?.options.ordinal && (delete r.ordinal.index, delete r.ordinal.originalOrdinalRange);
808
+ }
809
+ function l(r, n) {
810
+ let h, g = this.ordinal, m = g.positions, x = g.slope, b;
811
+ if (!m) return r;
812
+ let A = m.length;
813
+ if (m[0] <= r && m[A - 1] >= r) h = s(m, r);
814
+ else {
815
+ if (b = g.getExtendedPositions?.(), !b?.length) return r;
816
+ let y = b.length;
817
+ x || (x = (b[y - 1] - b[0]) / y);
818
+ let k = s(b, m[0]);
819
+ if (r >= b[0] && r <= b[y - 1]) h = s(b, r) - k;
820
+ else {
821
+ if (!n) return r;
822
+ h = r < b[0] ? -k - (b[0] - r) / x : (r - b[y - 1]) / x + y - k;
823
+ }
824
+ }
825
+ return n ? h : x * (h || 0) + g.offset;
826
+ }
827
+ a.compose = function(r, n, h) {
828
+ let g = r.prototype;
829
+ return g.ordinal2lin || (g.getTimeTicks = t, g.index2val = e, g.lin2val = i, g.val2lin = l, g.ordinal2lin = g.val2lin, gt(r, "afterInit", o), gt(r, "foundExtremes", d), gt(r, "afterSetScale", p), gt(r, "initialAxisTranslation", u), gt(h, "pan", c), gt(h, "touchpan", c), gt(n, "updatedData", f)), r;
830
+ }, a.Additions = class {
831
+ constructor(r) {
832
+ this.index = {}, this.axis = r;
833
+ }
834
+ beforeSetTickPositions() {
835
+ let r = this.axis, n = r.ordinal, h = r.getExtremes(), g = h.min, m = h.max, x = r.brokenAxis?.hasBreaks, b = r.options.ordinal, A = r.options.overscroll && r.ordinal.convertOverscroll(r.options.overscroll) || 0, y, k, M, v, S, T, B, w = [], E = Number.MAX_VALUE, P = !1, O = !1, D = !1;
836
+ if (b || x) {
837
+ let R = 0;
838
+ if (r.series.forEach(function(H, L) {
839
+ let z = H.getColumn("x", !0);
840
+ if (k = [], L > 0 && H.options.id !== "highcharts-navigator-series" && z.length > 1 && (O = R !== z[1] - z[0]), R = z[1] - z[0], H.boosted && (D = H.boosted), H.reserveSpace() && (H.takeOrdinalPosition !== !1 || x) && (y = (w = w.concat(z)).length, w.sort(function(W, N) {
841
+ return W - N;
842
+ }), E = Math.min(E, ke(H.closestPointRange, E)), y)) {
843
+ for (L = 0; L < y - 1; ) w[L] !== w[L + 1] && k.push(w[L + 1]), L++;
844
+ k[0] !== w[0] && k.unshift(w[0]), w = k;
845
+ }
846
+ }), r.ordinal.originalOrdinalRange || (r.ordinal.originalOrdinalRange = (w.length - 1) * E), O && D && (w.pop(), w.shift()), (y = w.length) > 2) {
847
+ for (M = w[1] - w[0], B = y - 1; B-- && !P; ) w[B + 1] - w[B] !== M && (P = !0);
848
+ !r.options.keepOrdinalPadding && (w[0] - g > M || m - A - w[y - 1] > M) && (P = !0);
849
+ } else r.options.overscroll && (y === 2 ? E = w[1] - w[0] : y === 1 ? (E = A, w = [w[0], w[0] + E]) : E = n.overscrollPointsRange);
850
+ P || r.forceOrdinal ? (r.options.overscroll && (n.overscrollPointsRange = E, w = w.concat(n.getOverscrollPositions())), n.positions = w, v = r.ordinal2lin(Math.max(g, w[0]), !0), S = Math.max(r.ordinal2lin(Math.min(m, w[w.length - 1]), !0), 1), n.slope = T = (m - g) / (S - v), n.offset = g - v * T) : (n.overscrollPointsRange = ke(r.closestPointRange, n.overscrollPointsRange), n.positions = r.ordinal.slope = n.offset = void 0);
851
+ }
852
+ r.isOrdinal = b && P, n.groupIntervalFactor = null;
853
+ }
854
+ static findIndexOf(r, n, h) {
855
+ let g = 0, m = r.length - 1, x;
856
+ for (; g < m; ) r[x = Math.ceil((g + m) / 2)] <= n ? g = x : m = x - 1;
857
+ return r[g] === n || h ? g : -1;
858
+ }
859
+ getExtendedPositions(r = !0) {
860
+ let n = this, h = n.axis, g = h.constructor.prototype, m = h.chart, x = h.series.reduce((v, S) => {
861
+ let T = S.currentDataGrouping;
862
+ return v + (T ? T.count + T.unitName : "raw");
863
+ }, ""), b = r ? h.ordinal.convertOverscroll(h.options.overscroll) : 0, A = h.getExtremes(), y, k, M = n.index;
864
+ return M || (M = n.index = {}), !M[x] && ((y = { series: [], chart: m, forceOrdinal: !1, getExtremes: function() {
865
+ return { min: A.dataMin, max: A.dataMax + b };
866
+ }, applyGrouping: g.applyGrouping, getGroupPixelWidth: g.getGroupPixelWidth, getTimeTicks: g.getTimeTicks, options: { ordinal: !0 }, ordinal: { getGroupIntervalFactor: this.getGroupIntervalFactor }, ordinal2lin: g.ordinal2lin, getIndexOfPoint: g.getIndexOfPoint, val2lin: g.val2lin }).ordinal.axis = y, h.series.forEach((v) => {
867
+ if (v.takeOrdinalPosition === !1) return;
868
+ k = { xAxis: y, chart: m, groupPixelWidth: v.groupPixelWidth, destroyGroupedData: C().noop, getColumn: v.getColumn, applyGrouping: v.applyGrouping, getProcessedData: v.getProcessedData, reserveSpace: v.reserveSpace, visible: v.visible };
869
+ let S = v.getColumn("x").concat(r ? n.getOverscrollPositions() : []);
870
+ k.dataTable = new hi({ columns: { x: S } }), k.options = { ...v.options, dataGrouping: v.currentDataGrouping ? { firstAnchor: v.options.dataGrouping?.firstAnchor, anchor: v.options.dataGrouping?.anchor, lastAnchor: v.options.dataGrouping?.firstAnchor, enabled: !0, forced: !0, approximation: "open", units: [[v.currentDataGrouping.unitName, [v.currentDataGrouping.count]]] } : { enabled: !1 } }, y.series.push(k), v.processData.apply(k);
871
+ }), y.applyGrouping({ hasExtremesChanged: !0 }), k?.closestPointRange !== k?.basePointRange && k.currentDataGrouping && (y.forceOrdinal = !0), h.ordinal.beforeSetTickPositions.apply({ axis: y }), !h.ordinal.originalOrdinalRange && y.ordinal.originalOrdinalRange && (h.ordinal.originalOrdinalRange = y.ordinal.originalOrdinalRange), y.ordinal.positions && (M[x] = y.ordinal.positions)), M[x];
872
+ }
873
+ getGroupIntervalFactor(r, n, h) {
874
+ let g = h.getColumn("x", !0), m = g.length, x = [], b, A, y = this.groupIntervalFactor;
875
+ if (!y) {
876
+ for (A = 0; A < m - 1; A++) x[A] = g[A + 1] - g[A];
877
+ x.sort(function(k, M) {
878
+ return k - M;
879
+ }), b = x[Math.floor(m / 2)], r = Math.max(r, g[0]), n = Math.min(n, g[m - 1]), this.groupIntervalFactor = y = m * b / (n - r);
880
+ }
881
+ return y;
882
+ }
883
+ getIndexOfPoint(r, n) {
884
+ let h = this.axis, g = h.min, m = h.minPixelPadding;
885
+ return s(n, g) + qt((r - m) / (h.translationSlope * (this.slope || h.closestPointRange || this.overscrollPointsRange)));
886
+ }
887
+ getOverscrollPositions() {
888
+ let r = this.axis, n = this.convertOverscroll(r.options.overscroll), h = this.overscrollPointsRange, g = [], m = r.dataMax;
889
+ if (rt(h)) for (; m < r.dataMax + n; ) g.push(m += h);
890
+ return g;
891
+ }
892
+ postProcessTickInterval(r) {
893
+ let n = this.axis, h = this.slope, g = n.closestPointRange;
894
+ return h && g ? n.options.breaks ? g || r : r / (h / g) : r;
895
+ }
896
+ convertOverscroll(r = 0) {
897
+ let n = this, h = n.axis, g = function(m) {
898
+ return ke(n.originalOrdinalRange, rt(h.dataMax) && rt(h.dataMin) ? h.dataMax - h.dataMin : 0) * m;
899
+ };
900
+ if (Mo(r)) {
901
+ let m = parseInt(r, 10);
902
+ if (h.isFullRange === !1 && zt(h.min) && zt(h.max) && (this.originalOrdinalRange = h.max - h.min), /%$/.test(r)) return g(m / 100);
903
+ if (/px/.test(r)) {
904
+ let x = Math.min(m, 0.9 * h.len) / h.len;
905
+ return g(x / (h.isFullRange ? 1 - x : 1));
906
+ }
907
+ return 0;
908
+ }
909
+ return r;
910
+ }
911
+ };
912
+ })(he || (he = {}));
913
+ let Ao = he, ko = { rangeSelectorZoom: "Zoom", rangeSelectorFrom: "", rangeSelectorTo: "→", rangeSelector: { allText: "All", allTitle: "View all", monthText: "{count}m", monthTitle: "View {count} {#eq count 1}month{else}months{/eq}", yearText: "{count}y", yearTitle: "View {count} {#eq count 1}year{else}years{/eq}", ytdText: "YTD", ytdTitle: "View year to date" } }, di = { allButtonsEnabled: !1, buttons: [{ type: "month", count: 1 }, { type: "month", count: 3 }, { type: "month", count: 6 }, { type: "ytd" }, { type: "year", count: 1 }, { type: "all" }], 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: "%[ebY]", 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: "#334eff", cursor: "pointer", fontSize: "0.8em" }, labelStyle: { color: "#666666", fontSize: "0.8em" } }, { defaultOptions: pi } = C(), { composed: wo } = C(), { addEvent: ft, defined: So, extend: ui, isNumber: mt, merge: To, pick: ci, pushUnique: Eo } = C(), we = [];
914
+ function Oo() {
915
+ let a, t, e = this.range, i = e.type, s = this.max, o = this.chart.time, d = function(u, c) {
916
+ let f = o.toParts(u), l = f.slice();
917
+ i === "year" ? l[0] += c : l[1] += c;
918
+ let r = o.makeTime.apply(o, l), n = o.toParts(r);
919
+ return i === "month" && f[1] === n[1] && Math.abs(c) === 1 && (l[0] = f[0], l[1] = f[1], l[2] = 0), (r = o.makeTime.apply(o, l)) - u;
920
+ };
921
+ mt(e) ? (a = s - e, t = e) : e && (a = s + d(s, -(e.count || 1)), this.chart && this.chart.setFixedRange(s - a));
922
+ let p = ci(this.dataMin, 5e-324);
923
+ return mt(a) || (a = p), a <= p && (a = p, t === void 0 && (t = d(a, e.count)), this.newMax = Math.min(a + t, ci(this.dataMax, Number.MAX_VALUE))), mt(s) ? !mt(e) && e && e._offsetMin && (a += e._offsetMin) : a = void 0, a;
924
+ }
925
+ function Bo() {
926
+ this.rangeSelector?.redrawElements();
927
+ }
928
+ function Co() {
929
+ this.options.rangeSelector && this.options.rangeSelector.enabled && (this.rangeSelector = new se(this));
930
+ }
931
+ function Po() {
932
+ let a = this.rangeSelector;
933
+ if (a) {
934
+ mt(a.deferredYTDClick) && (a.clickButton(a.deferredYTDClick), delete a.deferredYTDClick);
935
+ let t = a.options.verticalAlign;
936
+ a.options.floating || (t === "bottom" ? this.extraBottomMargin = !0 : t === "top" && (this.extraTopMargin = !0));
937
+ }
938
+ }
939
+ function gi() {
940
+ let a, t = this.rangeSelector;
941
+ if (!t) return;
942
+ let e = this.xAxis[0].getExtremes(), i = this.legend, s = t && t.options.verticalAlign;
943
+ mt(e.min) && t.render(e.min, e.max), i.display && s === "top" && s === i.options.verticalAlign && (a = To(this.spacingBox), i.options.layout === "vertical" ? a.y = this.plotTop : a.y += t.getHeight(), i.group.placed = !1, i.align(a));
944
+ }
945
+ function Do() {
946
+ for (let a = 0, t = we.length; a < t; ++a) {
947
+ let e = we[a];
948
+ if (e[0] === this) {
949
+ e[1].forEach((i) => i()), we.splice(a, 1);
950
+ return;
951
+ }
952
+ }
953
+ }
954
+ function Ro() {
955
+ let a = this.rangeSelector;
956
+ if (a?.options?.enabled) {
957
+ let { min: t, max: e } = this.xAxis[0].getExtremes();
958
+ mt(t) && a.inputGroup && a.inputGroup.getBBox().width < 20 && a.render(t, e);
959
+ let i = a.getHeight(), s = a.options.verticalAlign;
960
+ a.options.floating || (s === "bottom" ? this.marginBottom += i : s !== "middle" && (this.plotTop += i));
961
+ }
962
+ }
963
+ function Go(a) {
964
+ let t = a.options.rangeSelector, e = this.extraBottomMargin, i = this.extraTopMargin, s = this.rangeSelector;
965
+ if (t && t.enabled && !So(s) && this.options.rangeSelector && (this.options.rangeSelector.enabled = !0, this.rangeSelector = s = new se(this)), this.extraBottomMargin = !1, this.extraTopMargin = !1, s) {
966
+ let o = t && t.verticalAlign || s.options && s.options.verticalAlign;
967
+ s.options.floating || (o === "bottom" ? this.extraBottomMargin = !0 : o !== "middle" && (this.extraTopMargin = !0)), (this.extraBottomMargin !== e || this.extraTopMargin !== i) && (this.isDirtyBox = !0);
968
+ }
969
+ }
970
+ let Io = function(a, t, e) {
971
+ if (se = e, Eo(wo, "RangeSelector")) {
972
+ let i = t.prototype;
973
+ a.prototype.minFromRange = Oo, ft(t, "afterGetContainer", Co), ft(t, "beforeRender", Po), ft(t, "destroy", Do), ft(t, "getMargins", Ro), ft(t, "redraw", gi), ft(t, "update", Go), ft(t, "beforeRedraw", Bo), i.callbacks.push(gi), ui(pi, { rangeSelector: di }), ui(pi.lang, ko);
974
+ }
975
+ };
976
+ var zo = I(28), fi = I.n(zo), Lo = I(984), Se = I.n(Lo);
977
+ let { defaultOptions: Te } = C(), { format: mi } = Se(), { addEvent: $, createElement: Lt, css: et, defined: it, destroyObjectProperties: Wo, discardElement: Xo, extend: xi, fireEvent: wt, isNumber: U, isString: Ee, merge: at, objectEach: Ho, pick: J, splat: Yo } = C();
978
+ function bi(a) {
979
+ let t = (s) => RegExp(`%[[a-zA-Z]*${s}`).test(a);
980
+ if (Ee(a) ? a.indexOf("%L") !== -1 : a.fractionalSecondDigits) return "text";
981
+ let e = Ee(a) ? ["a", "A", "d", "e", "w", "b", "B", "m", "o", "y", "Y"].some(t) : a.dateStyle || a.day || a.month || a.year, i = Ee(a) ? ["H", "k", "I", "l", "M", "S"].some(t) : a.timeStyle || a.hour || a.minute || a.second;
982
+ return e && i ? "datetime-local" : e ? "date" : i ? "time" : "text";
983
+ }
984
+ class Wt {
985
+ static compose(t, e) {
986
+ Io(t, e, Wt);
987
+ }
988
+ constructor(t) {
989
+ this.isDirty = !1, this.buttonOptions = [], this.initialButtonGroupWidth = 0, this.maxButtonWidth = () => {
990
+ let e = 0;
991
+ return this.buttons.forEach((i) => {
992
+ let s = i.getBBox();
993
+ s.width > e && (e = s.width);
994
+ }), e;
995
+ }, this.init(t);
996
+ }
997
+ clickButton(t, e) {
998
+ let i = this.chart, s = this.buttonOptions[t], o = i.xAxis[0], d = i.scroller && i.scroller.getUnionExtremes() || o || {}, p = s.type, u = s.dataGrouping, c = d.dataMin, f = d.dataMax, l, r = U(o?.max) ? Math.round(Math.min(o.max, f ?? o.max)) : void 0, n, h = s._range, g, m, x, b = !0;
999
+ if (c !== null && f !== null) {
1000
+ if (this.setSelected(t), u && (this.forcedDataGrouping = !0, fe().prototype.setDataGrouping.call(o || { chart: this.chart }, u, !1), this.frozenStates = s.preserveDataGrouping), p === "month" || p === "year") o ? (m = { range: s, max: r, chart: i, dataMin: c, dataMax: f }, l = o.minFromRange.call(m), U(m.newMax) && (r = m.newMax), b = !1) : h = s;
1001
+ else if (h) U(r) && (r = Math.min((l = Math.max(r - h, c)) + h, f), b = !1);
1002
+ else if (p === "ytd") if (o) !o.hasData() || U(f) && U(c) || (c = Number.MAX_VALUE, f = -Number.MAX_VALUE, i.series.forEach((A) => {
1003
+ let y = A.getColumn("x");
1004
+ y.length && (c = Math.min(y[0], c), f = Math.max(y[y.length - 1], f));
1005
+ }), e = !1), U(f) && U(c) && (l = g = (x = this.getYTDExtremes(f, c)).min, r = x.max);
1006
+ else {
1007
+ this.deferredYTDClick = t;
1008
+ return;
1009
+ }
1010
+ else p === "all" && o && (i.navigator && i.navigator.baseSeries[0] && (i.navigator.baseSeries[0].xAxis.options.range = void 0), l = c, r = f);
1011
+ if (b && s._offsetMin && it(l) && (l += s._offsetMin), s._offsetMax && it(r) && (r += s._offsetMax), this.dropdown && (this.dropdown.selectedIndex = t + 1), o) (U(l) || U(r)) && (o.setExtremes(l, r, J(e, !0), void 0, { trigger: "rangeSelectorButton", rangeSelectorButton: s }), i.setFixedRange(s._range));
1012
+ else {
1013
+ n = Yo(i.options.xAxis || {})[0];
1014
+ let A = $(i, "afterCreateAxes", function() {
1015
+ let y = i.xAxis[0];
1016
+ y.range = y.options.range = h, y.min = y.options.min = g;
1017
+ });
1018
+ $(i, "load", function() {
1019
+ let y = i.xAxis[0];
1020
+ i.setFixedRange(s._range), y.options.range = n.range, y.options.min = n.min, A();
1021
+ });
1022
+ }
1023
+ wt(this, "afterBtnClick");
1024
+ }
1025
+ }
1026
+ setSelected(t) {
1027
+ this.selected = this.options.selected = t;
1028
+ }
1029
+ init(t) {
1030
+ let e = this, i = t.options.rangeSelector, s = t.options.lang, o = i.buttons, d = i.selected, p = function() {
1031
+ let u = e.minInput, c = e.maxInput;
1032
+ u && u.blur && wt(u, "blur"), c && c.blur && wt(c, "blur");
1033
+ };
1034
+ e.chart = t, e.options = i, e.buttons = [], e.buttonOptions = o.map((u) => (u.type && s.rangeSelector && (u.text ?? (u.text = s.rangeSelector[`${u.type}Text`]), u.title ?? (u.title = s.rangeSelector[`${u.type}Title`])), u.text = mi(u.text, { count: u.count || 1 }), u.title = mi(u.title, { count: u.count || 1 }), u)), this.eventsToUnbind = [], this.eventsToUnbind.push($(t.container, "mousedown", p)), this.eventsToUnbind.push($(t, "resize", p)), o.forEach(e.computeButtonRange), d !== void 0 && o[d] && this.clickButton(d, !1), this.eventsToUnbind.push($(t, "load", function() {
1035
+ t.xAxis && t.xAxis[0] && $(t.xAxis[0], "setExtremes", function(u) {
1036
+ U(this.max) && U(this.min) && this.max - this.min !== t.fixedRange && u.trigger !== "rangeSelectorButton" && u.trigger !== "updatedData" && e.forcedDataGrouping && !e.frozenStates && this.setDataGrouping(!1, !1);
1037
+ });
1038
+ })), this.createElements();
1039
+ }
1040
+ updateButtonStates() {
1041
+ let t = this, e = this.chart, i = this.dropdown, s = this.dropdownLabel, o = e.xAxis[0], d = Math.round(o.max - o.min), p = !o.hasVisibleSeries, u = 24 * 36e5, c = e.scroller && e.scroller.getUnionExtremes() || o, f = c.dataMin, l = c.dataMax, r = t.getYTDExtremes(l, f), n = r.min, h = r.max, g = t.selected, m = t.options.allButtonsEnabled, x = Array(t.buttonOptions.length).fill(0), b = U(g), A = t.buttons, y = !1, k = null;
1042
+ t.buttonOptions.forEach((M, v) => {
1043
+ let S = M._range, T = M.type, B = M.count || 1, w = M._offsetMax - M._offsetMin, E = v === g, P = S > l - f, O = S < o.minRange, D = !1, R = S === d;
1044
+ if (E && P && (y = !0), o.isOrdinal && o.ordinal?.positions && S && d < S) {
1045
+ let z = o.ordinal.positions;
1046
+ z[z.length - 1] - z[0] > S && (R = !0);
1047
+ } else (T === "month" || T === "year") && d + 36e5 >= { month: 28, year: 365 }[T] * u * B - w && d - 36e5 <= { month: 31, year: 366 }[T] * u * B + w ? R = !0 : T === "ytd" ? (R = h - n + w === d, D = !E) : T === "all" && (R = o.max - o.min >= l - f);
1048
+ let H = !m && !(y && T === "all") && (P || O || p), L = y && T === "all" || !D && R || E && t.frozenStates;
1049
+ H ? x[v] = 3 : L && (!b || v === g) && (k = v);
1050
+ }), k !== null ? (x[k] = 2, t.setSelected(k), this.dropdown && (this.dropdown.selectedIndex = k + 1)) : (t.setSelected(), this.dropdown && (this.dropdown.selectedIndex = -1), s && (s.setState(0), s.attr({ text: (Te.lang.rangeSelectorZoom || "") + " ▾" })));
1051
+ for (let M = 0; M < x.length; M++) {
1052
+ let v = x[M], S = A[M];
1053
+ if (S.state !== v && (S.setState(v), i)) {
1054
+ i.options[M + 1].disabled = v === 3, v === 2 && (s && (s.setState(2), s.attr({ text: t.buttonOptions[M].text + " ▾" })), i.selectedIndex = M + 1);
1055
+ let T = s.getBBox();
1056
+ et(i, { width: `${T.width}px`, height: `${T.height}px` });
1057
+ }
1058
+ }
1059
+ }
1060
+ computeButtonRange(t) {
1061
+ let e = t.type, i = t.count || 1, s = { millisecond: 1, second: 1e3, minute: 6e4, hour: 36e5, day: 864e5, week: 6048e5 };
1062
+ s[e] ? t._range = s[e] * i : (e === "month" || e === "year") && (t._range = 24 * { month: 30, year: 365 }[e] * 36e5 * i), t._offsetMin = J(t.offsetMin, 0), t._offsetMax = J(t.offsetMax, 0), t._range += t._offsetMax - t._offsetMin;
1063
+ }
1064
+ getInputValue(t) {
1065
+ let e = t === "min" ? this.minInput : this.maxInput, i = this.chart.options.rangeSelector, s = this.chart.time;
1066
+ return e ? (e.type === "text" && i.inputDateParser || this.defaultInputDateParser)(e.value, s.timezone === "UTC", s) : 0;
1067
+ }
1068
+ setInputValue(t, e) {
1069
+ let i = this.options, s = this.chart.time, o = t === "min" ? this.minInput : this.maxInput, d = t === "min" ? this.minDateBox : this.maxDateBox;
1070
+ if (o) {
1071
+ o.setAttribute("type", bi(i.inputDateFormat || "%e %b %Y"));
1072
+ let p = o.getAttribute("data-hc-time"), u = it(p) ? Number(p) : void 0;
1073
+ if (it(e)) {
1074
+ let c = u;
1075
+ it(c) && o.setAttribute("data-hc-time-previous", c), o.setAttribute("data-hc-time", e), u = e;
1076
+ }
1077
+ o.value = s.dateFormat(this.inputTypeFormats[o.type] || i.inputEditDateFormat, u), d && d.attr({ text: s.dateFormat(i.inputDateFormat, u) });
1078
+ }
1079
+ }
1080
+ setInputExtremes(t, e, i) {
1081
+ let s = t === "min" ? this.minInput : this.maxInput;
1082
+ if (s) {
1083
+ let o = this.inputTypeFormats[s.type], d = this.chart.time;
1084
+ if (o) {
1085
+ let p = d.dateFormat(o, e);
1086
+ s.min !== p && (s.min = p);
1087
+ let u = d.dateFormat(o, i);
1088
+ s.max !== u && (s.max = u);
1089
+ }
1090
+ }
1091
+ }
1092
+ showInput(t) {
1093
+ let e = t === "min" ? this.minDateBox : this.maxDateBox, i = t === "min" ? this.minInput : this.maxInput;
1094
+ if (i && e && this.inputGroup) {
1095
+ let s = i.type === "text", { translateX: o = 0, translateY: d = 0 } = this.inputGroup, { x: p = 0, width: u = 0, height: c = 0 } = e, { inputBoxWidth: f } = this.options;
1096
+ et(i, { width: s ? u + (f ? -2 : 20) + "px" : "auto", height: c - 2 + "px", border: "2px solid silver" }), s && f ? et(i, { left: o + p + "px", top: d + "px" }) : et(i, { left: Math.min(Math.round(p + o - (i.offsetWidth - u) / 2), this.chart.chartWidth - i.offsetWidth) + "px", top: d - (i.offsetHeight - c) / 2 + "px" });
1097
+ }
1098
+ }
1099
+ hideInput(t) {
1100
+ let e = t === "min" ? this.minInput : this.maxInput;
1101
+ e && et(e, { top: "-9999em", border: 0, width: "1px", height: "1px" });
1102
+ }
1103
+ defaultInputDateParser(t, e, i) {
1104
+ return i?.parse(t) || 0;
1105
+ }
1106
+ drawInput(t) {
1107
+ let { chart: e, div: i, inputGroup: s } = this, o = this, d = e.renderer.style || {}, p = e.renderer, u = e.options.rangeSelector, c = Te.lang, f = t === "min";
1108
+ function l(x) {
1109
+ let { maxInput: b, minInput: A } = o, y = e.xAxis[0], k = e.scroller?.getUnionExtremes() || y, M = k.dataMin, v = k.dataMax, S = e.xAxis[0].getExtremes()[x], T = o.getInputValue(x);
1110
+ U(T) && T !== S && (f && b && U(M) ? T > Number(b.getAttribute("data-hc-time")) ? T = void 0 : T < M && (T = M) : A && U(v) && (T < Number(A.getAttribute("data-hc-time")) ? T = void 0 : T > v && (T = v)), T !== void 0 && y.setExtremes(f ? T : y.min, f ? y.max : T, void 0, void 0, { trigger: "rangeSelectorInput" }));
1111
+ }
1112
+ let r = c[f ? "rangeSelectorFrom" : "rangeSelectorTo"] || "", n = p.label(r, 0).addClass("highcharts-range-label").attr({ padding: 2 * !!r, height: r ? u.inputBoxHeight : 0 }).add(s), h = p.label("", 0).addClass("highcharts-range-input").attr({ padding: 2, width: u.inputBoxWidth, height: u.inputBoxHeight, "text-align": "center" }).on("click", function() {
1113
+ o.showInput(t), o[t + "Input"].focus();
1114
+ });
1115
+ e.styledMode || h.attr({ stroke: u.inputBoxBorderColor, "stroke-width": 1 }), h.add(s);
1116
+ let g = Lt("input", { name: t, className: "highcharts-range-selector" }, void 0, i);
1117
+ g.setAttribute("type", bi(u.inputDateFormat || "%e %b %Y")), e.styledMode || (n.css(at(d, u.labelStyle)), h.css(at({ color: "#333333" }, d, u.inputStyle)), et(g, xi({ position: "absolute", border: 0, boxShadow: "0 0 15px rgba(0,0,0,0.3)", width: "1px", height: "1px", padding: 0, textAlign: "center", fontSize: d.fontSize, fontFamily: d.fontFamily, top: "-9999em" }, u.inputStyle))), g.onfocus = () => {
1118
+ o.showInput(t);
1119
+ }, g.onblur = () => {
1120
+ g === C().doc.activeElement && l(t), o.hideInput(t), o.setInputValue(t), g.blur();
1121
+ };
1122
+ let m = !1;
1123
+ return g.onchange = () => {
1124
+ m || (l(t), o.hideInput(t), g.blur());
1125
+ }, g.onkeypress = (x) => {
1126
+ x.keyCode === 13 && l(t);
1127
+ }, g.onkeydown = (x) => {
1128
+ m = !0, (x.key === "ArrowUp" || x.key === "ArrowDown" || x.key === "Tab") && l(t);
1129
+ }, g.onkeyup = () => {
1130
+ m = !1;
1131
+ }, { dateBox: h, input: g, label: n };
1132
+ }
1133
+ getPosition() {
1134
+ let t = this.chart, e = t.options.rangeSelector, i = e.verticalAlign === "top" ? t.plotTop - t.axisOffset[0] : 0;
1135
+ return { buttonTop: i + e.buttonPosition.y, inputTop: i + e.inputPosition.y - 10 };
1136
+ }
1137
+ getYTDExtremes(t, e) {
1138
+ let i = this.chart.time, s = i.toParts(t)[0];
1139
+ return { max: t, min: Math.max(e, i.makeTime(s, 0)) };
1140
+ }
1141
+ createElements() {
1142
+ let t = this.chart, e = t.renderer, i = t.container, s = t.options, o = s.rangeSelector, d = o.inputEnabled, p = J(s.chart.style?.zIndex, 0) + 1;
1143
+ o.enabled !== !1 && (this.group = e.g("range-selector-group").attr({ zIndex: 7 }).add(), this.div = Lt("div", void 0, { position: "relative", height: 0, zIndex: p }), this.buttonOptions.length && this.renderButtons(), i.parentNode && i.parentNode.insertBefore(this.div, i), d && this.createInputs());
1144
+ }
1145
+ createInputs() {
1146
+ this.inputGroup = this.chart.renderer.g("input-group").add(this.group);
1147
+ let t = this.drawInput("min");
1148
+ this.minDateBox = t.dateBox, this.minLabel = t.label, this.minInput = t.input;
1149
+ let e = this.drawInput("max");
1150
+ this.maxDateBox = e.dateBox, this.maxLabel = e.label, this.maxInput = e.input;
1151
+ }
1152
+ render(t, e) {
1153
+ if (this.options.enabled === !1) return;
1154
+ let i = this.chart, s = i.options.rangeSelector;
1155
+ if (s.inputEnabled) {
1156
+ this.inputGroup || this.createInputs(), this.setInputValue("min", t), this.setInputValue("max", e), this.chart.styledMode || (this.maxLabel?.css(s.labelStyle), this.minLabel?.css(s.labelStyle));
1157
+ let o = i.scroller && i.scroller.getUnionExtremes() || i.xAxis[0] || {};
1158
+ if (it(o.dataMin) && it(o.dataMax)) {
1159
+ let d = i.xAxis[0].minRange || 0;
1160
+ this.setInputExtremes("min", o.dataMin, Math.min(o.dataMax, this.getInputValue("max")) - d), this.setInputExtremes("max", Math.max(o.dataMin, this.getInputValue("min")) + d, o.dataMax);
1161
+ }
1162
+ if (this.inputGroup) {
1163
+ let d = 0;
1164
+ [this.minLabel, this.minDateBox, this.maxLabel, this.maxDateBox].forEach((p) => {
1165
+ if (p) {
1166
+ let { width: u } = p.getBBox();
1167
+ u && (p.attr({ x: d }), d += u + s.inputSpacing);
1168
+ }
1169
+ });
1170
+ }
1171
+ } else this.inputGroup && (this.inputGroup.destroy(), delete this.inputGroup);
1172
+ !this.chart.styledMode && this.zoomText && this.zoomText.css(s.labelStyle), this.alignElements(), this.updateButtonStates();
1173
+ }
1174
+ renderButtons() {
1175
+ var t;
1176
+ let { chart: e, options: i } = this, s = Te.lang, o = e.renderer, d = at(i.buttonTheme), p = d && d.states;
1177
+ delete d.width, delete d.states, this.buttonGroup = o.g("range-selector-buttons").add(this.group);
1178
+ let u = this.dropdown = Lt("select", void 0, { position: "absolute", padding: 0, border: 0, cursor: "pointer", opacity: 1e-4 }, this.div), c = e.userOptions.rangeSelector?.buttonTheme;
1179
+ this.dropdownLabel = o.button("", 0, 0, () => {
1180
+ }, at(d, { "stroke-width": J(d["stroke-width"], 0), width: "auto", paddingLeft: J(i.buttonTheme.paddingLeft, c?.padding, 8), paddingRight: J(i.buttonTheme.paddingRight, c?.padding, 8) }), p && p.hover, p && p.select, p && p.disabled).hide().add(this.group), $(u, "touchstart", () => {
1181
+ u.style.fontSize = "16px";
1182
+ });
1183
+ let f = C().isMS ? "mouseover" : "mouseenter", l = C().isMS ? "mouseout" : "mouseleave";
1184
+ $(u, f, () => {
1185
+ wt(this.dropdownLabel.element, f);
1186
+ }), $(u, l, () => {
1187
+ wt(this.dropdownLabel.element, l);
1188
+ }), $(u, "change", () => {
1189
+ wt(this.buttons[u.selectedIndex - 1].element, "click");
1190
+ }), this.zoomText = o.label(s.rangeSelectorZoom || "", 0).attr({ padding: i.buttonTheme.padding, height: i.buttonTheme.height, paddingLeft: 0, paddingRight: 0 }).add(this.buttonGroup), this.chart.styledMode || (this.zoomText.css(i.labelStyle), (t = i.buttonTheme)["stroke-width"] ?? (t["stroke-width"] = 0)), Lt("option", { textContent: this.zoomText.textStr, disabled: !0 }, void 0, u), this.createButtons();
1191
+ }
1192
+ createButtons() {
1193
+ let { options: t } = this, e = at(t.buttonTheme), i = e && e.states, s = e.width || 28;
1194
+ delete e.width, delete e.states, this.buttonOptions.forEach((o, d) => {
1195
+ this.createButton(o, d, s, i);
1196
+ });
1197
+ }
1198
+ createButton(t, e, i, s) {
1199
+ let { dropdown: o, buttons: d, chart: p, options: u } = this, c = p.renderer, f = at(u.buttonTheme);
1200
+ o?.add(Lt("option", { textContent: t.title || t.text }), e + 2), d[e] = c.button(t.text ?? "", 0, 0, (l) => {
1201
+ let r, n = t.events && t.events.click;
1202
+ n && (r = n.call(t, l)), r !== !1 && this.clickButton(e), this.isActive = !0;
1203
+ }, f, s && s.hover, s && s.select, s && s.disabled).attr({ "text-align": "center", width: i }).add(this.buttonGroup), t.title && d[e].attr("title", t.title);
1204
+ }
1205
+ alignElements() {
1206
+ let { buttonGroup: t, buttons: e, chart: i, group: s, inputGroup: o, options: d, zoomText: p } = this, u = i.options, c = u.exporting && u.exporting.enabled !== !1 && u.navigation && u.navigation.buttonOptions, { buttonPosition: f, inputPosition: l, verticalAlign: r } = d, n = (g, m, x) => c && this.titleCollision(i) && r === "top" && x && m.y - g.getBBox().height - 12 < (c.y || 0) + (c.height || 0) + i.spacing[0] ? -40 : 0, h = i.plotLeft;
1207
+ if (s && f && l) {
1208
+ let g = f.x - i.spacing[3];
1209
+ if (t) {
1210
+ if (this.positionButtons(), !this.initialButtonGroupWidth) {
1211
+ let S = 0;
1212
+ p && (S += p.getBBox().width + 5), e.forEach((T, B) => {
1213
+ S += T.width || 0, B !== e.length - 1 && (S += d.buttonSpacing);
1214
+ }), this.initialButtonGroupWidth = S;
1215
+ }
1216
+ h -= i.spacing[3];
1217
+ let v = n(t, f, f.align === "right" || l.align === "right");
1218
+ this.alignButtonGroup(v), this.buttonGroup?.translateY && this.dropdownLabel.attr({ y: this.buttonGroup.translateY }), s.placed = t.placed = i.hasLoaded;
1219
+ }
1220
+ let m = 0;
1221
+ d.inputEnabled && o && (m = n(o, l, f.align === "right" || l.align === "right"), l.align === "left" ? g = h : l.align === "right" && (g = -Math.max(i.axisOffset[1], -m)), o.align({ y: l.y, width: o.getBBox().width, align: l.align, x: l.x + g - 2 }, !0, i.spacingBox), o.placed = i.hasLoaded), this.handleCollision(m), s.align({ verticalAlign: r }, !0, i.spacingBox);
1222
+ let x = s.alignAttr.translateY, b = s.getBBox().height + 20, A = 0;
1223
+ if (r === "bottom") {
1224
+ let v = i.legend && i.legend.options;
1225
+ A = x - (b = b + (v && v.verticalAlign === "bottom" && v.enabled && !v.floating ? i.legend.legendHeight + J(v.margin, 10) : 0) - 20) - (d.floating ? 0 : d.y) - (i.titleOffset ? i.titleOffset[2] : 0) - 10;
1226
+ }
1227
+ r === "top" ? (d.floating && (A = 0), i.titleOffset && i.titleOffset[0] && (A = i.titleOffset[0]), A += i.margin[0] - i.spacing[0] || 0) : r === "middle" && (l.y === f.y ? A = x : (l.y || f.y) && (l.y < 0 || f.y < 0 ? A -= Math.min(l.y, f.y) : A = x - b)), s.translate(d.x, d.y + Math.floor(A));
1228
+ let { minInput: y, maxInput: k, dropdown: M } = this;
1229
+ d.inputEnabled && y && k && (y.style.marginTop = s.translateY + "px", k.style.marginTop = s.translateY + "px"), M && (M.style.marginTop = s.translateY + "px");
1230
+ }
1231
+ }
1232
+ redrawElements() {
1233
+ let t = this.chart, { inputBoxHeight: e, inputBoxBorderColor: i } = this.options;
1234
+ if (this.maxDateBox?.attr({ height: e }), this.minDateBox?.attr({ height: e }), t.styledMode || (this.maxDateBox?.attr({ stroke: i }), this.minDateBox?.attr({ stroke: i })), this.isDirty) {
1235
+ this.isDirty = !1, this.isCollapsed = void 0;
1236
+ let s = this.options.buttons ?? [], o = Math.min(s.length, this.buttonOptions.length), { dropdown: d, options: p } = this, u = at(p.buttonTheme), c = u && u.states, f = u.width || 28;
1237
+ if (s.length < this.buttonOptions.length) for (let l = this.buttonOptions.length - 1; l >= s.length; l--)
1238
+ this.buttons.pop()?.destroy(), this.dropdown?.options.remove(l + 1);
1239
+ for (let l = o - 1; l >= 0; l--) {
1240
+ let r = s[l];
1241
+ this.buttons[l].destroy(), d?.options.remove(l + 1), this.createButton(r, l, f, c), this.computeButtonRange(r);
1242
+ }
1243
+ if (s.length > this.buttonOptions.length) for (let l = this.buttonOptions.length; l < s.length; l++) this.createButton(s[l], l, f, c), this.computeButtonRange(s[l]);
1244
+ this.buttonOptions = this.options.buttons ?? [], it(this.options.selected) && this.buttons.length && this.clickButton(this.options.selected, !1);
1245
+ }
1246
+ }
1247
+ alignButtonGroup(t, e) {
1248
+ let { chart: i, options: s, buttonGroup: o, dropdown: d, dropdownLabel: p } = this, { buttonPosition: u } = s, c = i.plotLeft - i.spacing[3], f = u.x - i.spacing[3], l = i.plotLeft;
1249
+ u.align === "right" ? (f += t - c, this.hasVisibleDropdown && (l = i.chartWidth + t - this.maxButtonWidth() - 20)) : u.align === "center" && (f -= c / 2, this.hasVisibleDropdown && (l = i.chartWidth / 2 - this.maxButtonWidth())), d && et(d, { left: l + "px", top: o?.translateY + "px" }), p?.attr({ x: l }), o && o.align({ y: u.y, width: J(e, this.initialButtonGroupWidth), align: u.align, x: f }, !0, i.spacingBox);
1250
+ }
1251
+ positionButtons() {
1252
+ let { buttons: t, chart: e, options: i, zoomText: s } = this, o = e.hasLoaded ? "animate" : "attr", { buttonPosition: d } = i, p = e.plotLeft, u = p;
1253
+ s && s.visibility !== "hidden" && (s[o]({ x: J(p + d.x, p) }), u += d.x + s.getBBox().width + 5);
1254
+ for (let c = 0, f = this.buttonOptions.length; c < f; ++c) t[c].visibility !== "hidden" ? (t[c][o]({ x: u }), u += (t[c].width || 0) + i.buttonSpacing) : t[c][o]({ x: p });
1255
+ }
1256
+ handleCollision(t) {
1257
+ let { chart: e, buttonGroup: i, inputGroup: s, initialButtonGroupWidth: o } = this, { buttonPosition: d, dropdown: p, inputPosition: u } = this.options, c = () => {
1258
+ s && i && s.attr({ translateX: s.alignAttr.translateX + (e.axisOffset[1] >= -t ? 0 : -t), translateY: s.alignAttr.translateY + i.getBBox().height + 10 });
1259
+ };
1260
+ s && i ? u.align === d.align ? (c(), o > e.plotWidth + t - 20 ? this.collapseButtons() : this.expandButtons()) : o - t + s.getBBox().width > e.plotWidth ? p === "responsive" || p === "always" ? this.collapseButtons() : c() : this.expandButtons() : i && p === "responsive" && (o > e.plotWidth ? this.collapseButtons() : this.expandButtons()), i && (p === "always" && this.collapseButtons(), p === "never" && this.expandButtons()), this.alignButtonGroup(t);
1261
+ }
1262
+ collapseButtons() {
1263
+ let { buttons: t, zoomText: e } = this;
1264
+ this.isCollapsed !== !0 && (this.isCollapsed = !0, e.hide(), t.forEach((i) => void i.hide()), this.showDropdown());
1265
+ }
1266
+ expandButtons() {
1267
+ let { buttons: t, zoomText: e } = this;
1268
+ this.isCollapsed !== !1 && (this.isCollapsed = !1, this.hideDropdown(), e.show(), t.forEach((i) => void i.show()), this.positionButtons());
1269
+ }
1270
+ showDropdown() {
1271
+ let { buttonGroup: t, dropdownLabel: e, dropdown: i } = this;
1272
+ t && i && (e.show(), et(i, { visibility: "inherit" }), this.hasVisibleDropdown = !0);
1273
+ }
1274
+ hideDropdown() {
1275
+ let { dropdown: t } = this;
1276
+ t && (this.dropdownLabel.hide(), et(t, { visibility: "hidden" }), this.hasVisibleDropdown = !1);
1277
+ }
1278
+ getHeight() {
1279
+ let t = this.options, e = this.group, i = t.inputPosition, s = t.buttonPosition, o = t.y, d = s.y, p = i.y, u = 0;
1280
+ if (t.height) return t.height;
1281
+ this.alignElements(), u = e ? e.getBBox(!0).height + 13 + o : 0;
1282
+ let c = Math.min(p, d);
1283
+ return (p < 0 && d < 0 || p > 0 && d > 0) && (u += Math.abs(c)), u;
1284
+ }
1285
+ titleCollision(t) {
1286
+ return !(t.options.title.text || t.options.subtitle.text);
1287
+ }
1288
+ update(t, e = !0) {
1289
+ let i = this.chart;
1290
+ if (at(!0, this.options, t), this.options.selected && this.options.selected >= this.options.buttons.length && (this.options.selected = void 0, i.options.rangeSelector.selected = void 0), it(t.enabled)) return this.destroy(), this.init(i);
1291
+ this.isDirty = !!t.buttons || !!t.buttonTheme, e && this.render();
1292
+ }
1293
+ destroy() {
1294
+ let t = this, e = t.minInput, i = t.maxInput;
1295
+ t.eventsToUnbind && (t.eventsToUnbind.forEach((s) => s()), t.eventsToUnbind = void 0), Wo(t.buttons), e && (e.onfocus = e.onblur = e.onchange = null), i && (i.onfocus = i.onblur = i.onchange = null), Ho(t, function(s, o) {
1296
+ s && o !== "chart" && (s instanceof fi() ? s.destroy() : s instanceof window.HTMLElement && Xo(s), delete t[o]), s !== Wt.prototype[o] && (t[o] = null);
1297
+ }, this), this.buttons = [];
1298
+ }
1299
+ }
1300
+ xi(Wt.prototype, { inputTypeFormats: { "datetime-local": "%Y-%m-%dT%H:%M:%S", date: "%Y-%m-%d", time: "%H:%M:%S" } });
1301
+ var No = I(960), vi = I.n(No);
1302
+ let { format: Fo } = Se(), { getOptions: yi } = C(), { setFixedRange: Uo } = $e, { addEvent: xt, clamp: Vo, crisp: Mi, defined: Oe, extend: _o, find: jo, isNumber: nt, isString: qo, merge: St, pick: st, splat: Ai } = C();
1303
+ function Be(a, t, e) {
1304
+ return a === "xAxis" ? { minPadding: 0, maxPadding: 0, overscroll: 0, ordinal: !0 } : a === "yAxis" ? { labels: { y: -2 }, opposite: e.opposite ?? t.opposite ?? !0, showLastLabel: !!(t.categories || t.type === "category"), title: { text: void 0 } } : {};
1305
+ }
1306
+ function ki(a, t) {
1307
+ if (a === "xAxis") {
1308
+ let e = st(t.navigator?.enabled, ve.enabled, !0), i = { type: "datetime", categories: void 0 };
1309
+ return e && (i.startOnTick = !1, i.endOnTick = !1), i;
1310
+ }
1311
+ return {};
1312
+ }
1313
+ class Ce extends vi() {
1314
+ init(t, e) {
1315
+ let i = yi(), s = t.xAxis, o = t.yAxis, d = st(t.navigator?.enabled, ve.enabled, !0);
1316
+ t.xAxis = t.yAxis = void 0;
1317
+ let p = St({ chart: { panning: { enabled: !0, type: "x" }, zooming: { pinchType: "x", mouseWheel: { type: "x" } } }, navigator: { enabled: d }, scrollbar: { enabled: st(Nt.enabled, !0) }, rangeSelector: { enabled: st(di.enabled, !0) }, title: { text: null }, tooltip: { split: st(i.tooltip?.split, !0), crosshairs: !0 }, legend: { enabled: !1 } }, t, { isStock: !0 });
1318
+ t.xAxis = s, t.yAxis = o, p.xAxis = Ai(t.xAxis || {}).map((u) => St(Be("xAxis", u, i.xAxis), u, ki("xAxis", t))), p.yAxis = Ai(t.yAxis || {}).map((u) => St(Be("yAxis", u, i.yAxis), u)), super.init(p, e);
1319
+ }
1320
+ createAxis(t, e) {
1321
+ return e.axis = St(Be(t, e.axis, yi()[t]), e.axis, ki(t, this.userOptions)), super.createAxis(t, e);
1322
+ }
1323
+ }
1324
+ xt(vi(), "update", function(a) {
1325
+ let t = a.options;
1326
+ "scrollbar" in t && this.navigator && (St(!0, this.options.scrollbar, t.scrollbar), this.navigator.update({ enabled: !!this.navigator.navigatorEnabled }), delete t.scrollbar);
1327
+ }), function(a) {
1328
+ function t(c) {
1329
+ if (!(this.crosshair?.label?.enabled && this.cross && nt(this.min) && nt(this.max))) return;
1330
+ let f = this.chart, l = this.logarithmic, r = this.crosshair.label, n = this.horiz, h = this.opposite, g = this.left, m = this.top, x = this.width, b = this.options.tickPosition === "inside", A = this.crosshair.snap !== !1, y = c.e || this.cross?.e, k = c.point, M = this.crossLabel, v, S, T = r.format, B = "", w, E = 0, P = this.min, O = this.max;
1331
+ l && (P = l.lin2log(this.min), O = l.lin2log(this.max));
1332
+ let D = n ? "center" : h ? this.labelAlign === "right" ? "right" : "left" : this.labelAlign === "left" ? "left" : "center";
1333
+ !M && (M = this.crossLabel = f.renderer.label("", 0, void 0, r.shape || "callout").addClass("highcharts-crosshair-label highcharts-color-" + (k?.series ? k.series.colorIndex : this.series[0] && this.series[0].colorIndex)).attr({ align: r.align || D, padding: st(r.padding, 8), r: st(r.borderRadius, 3), zIndex: 2 }).add(this.labelGroup), f.styledMode || M.attr({ fill: r.backgroundColor || k?.series?.color || "#666666", stroke: r.borderColor || "", "stroke-width": r.borderWidth || 0 }).css(_o({ color: "#ffffff", fontWeight: "normal", fontSize: "0.7em", textAlign: "center" }, r.style || {}))), n ? (v = A ? (k.plotX || 0) + g : y.chartX, S = m + (h ? 0 : this.height)) : (v = g + this.offset + (h ? x : 0), S = A ? (k.plotY || 0) + m : y.chartY), T || r.formatter || (this.dateTime && (B = "%b %d, %Y"), T = "{value" + (B ? ":" + B : "") + "}");
1334
+ let R = A ? this.isXAxis ? k.x : k.y : this.toValue(n ? y.chartX : y.chartY), H = k?.series ? k.series.isPointInside(k) : nt(R) && R > P && R < O, L = "";
1335
+ T ? L = Fo(T, { value: R }, f) : r.formatter && nt(R) && (L = r.formatter.call(this, R)), M.attr({ text: L, x: v, y: S, visibility: H ? "inherit" : "hidden" });
1336
+ let z = M.getBBox();
1337
+ !nt(M.x) || n || h || (v = M.x - z.width / 2), nt(M.y) && (n ? (b && !h || !b && h) && (S = M.y - z.height) : S = M.y - z.height / 2), w = n ? { left: g, right: g + this.width } : { left: this.labelAlign === "left" ? g : 0, right: this.labelAlign === "right" ? g + this.width : f.chartWidth };
1338
+ let W = M.translateX || 0;
1339
+ W < w.left && (E = w.left - W), W + z.width >= w.right && (E = -(W + z.width - w.right)), M.attr({ x: Math.max(0, v + E), y: Math.max(0, S), anchorX: n ? v : this.opposite ? 0 : f.chartWidth, anchorY: n ? this.opposite ? f.chartHeight : 0 : S + z.height / 2 });
1340
+ }
1341
+ function e() {
1342
+ this.crossLabel && (this.crossLabel = this.crossLabel.hide());
1343
+ }
1344
+ function i(c) {
1345
+ let f = this.chart, l = this.options, r = f._labelPanes = f._labelPanes || {}, n = l.labels;
1346
+ if (f.options.isStock && this.coll === "yAxis") {
1347
+ let h = l.top + "," + l.height;
1348
+ !r[h] && n.enabled && (n.distance === 15 && this.side === 1 && (n.distance = 0), n.align === void 0 && (n.align = "right"), r[h] = this, c.align = "right", c.preventDefault());
1349
+ }
1350
+ }
1351
+ function s() {
1352
+ let c = this.chart, f = this.options && this.options.top + "," + this.options.height;
1353
+ f && c._labelPanes && c._labelPanes[f] === this && delete c._labelPanes[f];
1354
+ }
1355
+ function o(c) {
1356
+ let f = this.isLinked && !this.series && this.linkedParent ? this.linkedParent.series : this.series, { chart: l, horiz: r } = this, n = l.renderer, h = [], { acrossPanes: g = !0, force: m, translatedValue: x, value: b } = c, A = (this.isXAxis ? l.yAxis : l.xAxis) || [];
1357
+ function y(S, T, B) {
1358
+ h.push(["M", r ? S : T, r ? T : S], ["L", r ? S : B, r ? B : S]);
1359
+ }
1360
+ let k = [], M, v;
1361
+ if (l.options.isStock && (this.coll === "xAxis" || this.coll === "yAxis")) {
1362
+ let S, T;
1363
+ for (let B of (c.preventDefault(), S = this.coll === "xAxis" ? "yAxis" : "xAxis", T = this.options[S], k = g && !this.options.isInternal ? A.filter((w) => !w.options.isInternal) : nt(T) ? [l[S][T]] : qo(T) ? [l.get(T)] : f.map((w) => w[S]), A)) if (!B.options.isInternal) {
1364
+ let w = B.isXAxis ? "yAxis" : "xAxis";
1365
+ this === (Oe(B.options[w]) && l[w][B.options[w]]) && k.push(B);
1366
+ }
1367
+ for (let B of (M = k.length ? [] : [this.isXAxis ? l.yAxis[0] : l.xAxis[0]], k)) M.indexOf(B) !== -1 || jo(M, (w) => w.pos === B.pos && w.len === B.len) || M.push(B);
1368
+ if (nt(v = st(x, this.translate(b || 0, void 0, void 0, c.old)))) {
1369
+ let B, w = r ? v + this.pos : this.pos + this.len - v;
1370
+ if (m !== "pass" && (w < this.pos || w > this.pos + this.len) && (m ? w = Vo(w, this.pos, this.pos + this.len) : B = !0), !B) {
1371
+ let E = r ? "top" : "left", P = r ? "height" : "width";
1372
+ if (!g && (this.options[E] || this.options[P])) y(w, this[E], this[E] + this[P]);
1373
+ else for (let O of M) y(w, O.pos, O.pos + O.len);
1374
+ }
1375
+ }
1376
+ c.path = h.length > 0 ? n.crispPolyLine(h, c.lineWidth || 1) : void 0;
1377
+ }
1378
+ }
1379
+ function d(c) {
1380
+ if (this.chart.options.isStock) {
1381
+ let f;
1382
+ this.is("column") || this.is("columnrange") ? f = { borderWidth: 0, shadow: !1 } : this.is("scatter") || this.is("sma") || (f = { marker: { enabled: !1, radius: 2 } }), f && (c.plotOptions[this.type] = St(c.plotOptions[this.type], f));
1383
+ }
1384
+ }
1385
+ function p() {
1386
+ let c = this.chart, f = this.options.dataGrouping;
1387
+ return this.allowDG !== !1 && f && st(f.enabled, c.options.isStock);
1388
+ }
1389
+ function u(c, f) {
1390
+ for (let l = 0; l < c.length; l += 2) {
1391
+ let r = c[l], n = c[l + 1];
1392
+ Oe(r[1]) && r[1] === n[1] && (r[1] = n[1] = Mi(r[1], f)), Oe(r[2]) && r[2] === n[2] && (r[2] = n[2] = Mi(r[2], f));
1393
+ }
1394
+ return c;
1395
+ }
1396
+ a.compose = function(c, f, l, r) {
1397
+ let n = l.prototype;
1398
+ n.forceCropping || (xt(f, "afterDrawCrosshair", t), xt(f, "afterHideCrosshair", e), xt(f, "autoLabelAlign", i), xt(f, "destroy", s), xt(f, "getPlotLinePath", o), c.prototype.setFixedRange = Uo, n.forceCropping = p, xt(l, "setOptions", d), r.prototype.crispPolyLine = u);
1399
+ }, a.stockChart = function(c, f, l) {
1400
+ return new a(c, f, l);
1401
+ };
1402
+ }(Ce || (Ce = {}));
1403
+ let wi = Ce, { column: { prototype: { pointClass: Zo } } } = j().seriesTypes, { column: Si } = j().seriesTypes, { crisp: Ti, extend: Ei, merge: Ko } = C(), { defaultOptions: $o } = C();
1404
+ class Pe extends Si {
1405
+ extendStem(t, e, i) {
1406
+ let s = t[0], o = t[1];
1407
+ typeof s[2] == "number" && (s[2] = Math.max(i + e, s[2])), typeof o[2] == "number" && (o[2] = Math.min(i - e, o[2]));
1408
+ }
1409
+ getPointPath(t, e) {
1410
+ let i = e.strokeWidth(), s = t.series, o = Ti(t.plotX || 0, i), d = Math.round(t.shapeArgs.width / 2), p = [["M", o, Math.round(t.yBottom)], ["L", o, Math.round(t.plotHigh)]];
1411
+ if (t.close !== null) {
1412
+ let u = Ti(t.plotClose, i);
1413
+ p.push(["M", o, u], ["L", o + d, u]), s.extendStem(p, i / 2, u);
1414
+ }
1415
+ return p;
1416
+ }
1417
+ drawSinglePoint(t) {
1418
+ let e = t.series, i = e.chart, s, o = t.graphic;
1419
+ t.plotY !== void 0 && (o || (t.graphic = o = i.renderer.path().add(e.group)), i.styledMode || o.attr(e.pointAttribs(t, t.selected && "select")), s = e.getPointPath(t, o), o[o ? "animate" : "attr"]({ d: s }).addClass(t.getClassName(), !0));
1420
+ }
1421
+ drawPoints() {
1422
+ this.points.forEach(this.drawSinglePoint);
1423
+ }
1424
+ init() {
1425
+ super.init.apply(this, arguments), this.options.stacking = void 0;
1426
+ }
1427
+ pointAttribs(t, e) {
1428
+ let i = super.pointAttribs.call(this, t, e);
1429
+ return delete i.fill, i;
1430
+ }
1431
+ toYData(t) {
1432
+ return [t.high, t.low, t.close];
1433
+ }
1434
+ translate() {
1435
+ let t = this, e = t.yAxis, i = this.pointArrayMap && this.pointArrayMap.slice() || [], s = i.map((o) => `plot${o.charAt(0).toUpperCase() + o.slice(1)}`);
1436
+ s.push("yBottom"), i.push("low"), super.translate.apply(t), t.points.forEach(function(o) {
1437
+ i.forEach(function(d, p) {
1438
+ let u = o[d];
1439
+ u !== null && (t.dataModify && (u = t.dataModify.modifyValue(u)), o[s[p]] = e.toPixels(u, !0));
1440
+ }), o.tooltipPos[1] = o.plotHigh + e.pos - t.chart.plotTop;
1441
+ });
1442
+ }
1443
+ }
1444
+ Pe.defaultOptions = Ko(Si.defaultOptions, { lineWidth: 1, tooltip: { pointFormat: '<span style="color:{point.color}">●</span> <b> {series.name}</b><br/>{series.chart.options.lang.stockHigh}: {point.high}<br/>{series.chart.options.lang.stockLow}: {point.low}<br/>{series.chart.options.lang.stockClose}: {point.close}<br/>' }, threshold: null, states: { hover: { lineWidth: 3 } }, stickyTracking: !0 }), Ei(Pe.prototype, { pointClass: class extends Zo {
1445
+ }, animate: null, directTouch: !1, keysAffectYAxis: ["low", "high"], pointArrayMap: ["high", "low", "close"], pointAttrToOptions: { stroke: "color", "stroke-width": "lineWidth" }, pointValKey: "close" }), Ei($o.lang, { stockOpen: "Open", stockHigh: "High", stockLow: "Low", stockClose: "Close" }), j().registerSeriesType("hlc", Pe);
1446
+ let { seriesTypes: { hlc: Jo } } = j();
1447
+ class Qo extends Jo.prototype.pointClass {
1448
+ getClassName() {
1449
+ return super.getClassName.call(this) + (this.open < this.close ? " highcharts-point-up" : " highcharts-point-down");
1450
+ }
1451
+ resolveUpColor() {
1452
+ this.open < this.close && !this.options.color && this.series.options.upColor && (this.color = this.series.options.upColor);
1453
+ }
1454
+ resolveColor() {
1455
+ super.resolveColor(), this.series.is("heikinashi") || this.resolveUpColor();
1456
+ }
1457
+ getZone() {
1458
+ let t = super.getZone();
1459
+ return this.resolveUpColor(), t;
1460
+ }
1461
+ applyOptions() {
1462
+ return super.applyOptions.apply(this, arguments), this.resolveColor && this.resolveColor(), this;
1463
+ }
1464
+ }
1465
+ let { composed: tr } = C(), { hlc: Oi } = j().seriesTypes, { addEvent: Bi, crisp: Ci, extend: Pi, merge: er, pushUnique: ir } = C();
1466
+ function sr(a) {
1467
+ let t = a.options, e = t.dataGrouping;
1468
+ e && t.useOhlcData && t.id !== "highcharts-navigator-series" && (e.approximation = "ohlc");
1469
+ }
1470
+ function or(a) {
1471
+ let t = a.options;
1472
+ t.useOhlcData && t.id !== "highcharts-navigator-series" && Pi(this, { pointValKey: bt.prototype.pointValKey, pointArrayMap: bt.prototype.pointArrayMap, toYData: bt.prototype.toYData });
1473
+ }
1474
+ class bt extends Oi {
1475
+ static compose(t) {
1476
+ ir(tr, "OHLCSeries") && (Bi(t, "afterSetOptions", sr), Bi(t, "init", or));
1477
+ }
1478
+ getPointPath(t, e) {
1479
+ let i = super.getPointPath(t, e), s = e.strokeWidth(), o = Ci(t.plotX || 0, s), d = Math.round(t.shapeArgs.width / 2);
1480
+ if (t.open !== null) {
1481
+ let p = Ci(t.plotOpen, s);
1482
+ i.push(["M", o, p], ["L", o - d, p]), super.extendStem(i, s / 2, p);
1483
+ }
1484
+ return i;
1485
+ }
1486
+ pointAttribs(t, e) {
1487
+ let i = super.pointAttribs.call(this, t, e), s = this.options;
1488
+ return delete i.fill, !t.options.color && s.upColor && t.open < t.close && (i.stroke = s.upColor), i;
1489
+ }
1490
+ toYData(t) {
1491
+ return [t.open, t.high, t.low, t.close];
1492
+ }
1493
+ }
1494
+ bt.defaultOptions = er(Oi.defaultOptions, { tooltip: { pointFormat: '<span style="color:{point.color}">●</span> <b> {series.name}</b><br/>{series.chart.options.lang.stockOpen}: {point.open}<br/>{series.chart.options.lang.stockHigh}: {point.high}<br/>{series.chart.options.lang.stockLow}: {point.low}<br/>{series.chart.options.lang.stockClose}: {point.close}<br/>' } }), Pi(bt.prototype, { pointClass: Qo, pointArrayMap: ["open", "high", "low", "close"] }), j().registerSeriesType("ohlc", bt);
1495
+ let { column: rr, ohlc: De } = j().seriesTypes, { crisp: Re, merge: ar } = C();
1496
+ class Di extends De {
1497
+ pointAttribs(t, e) {
1498
+ let i = rr.prototype.pointAttribs.call(this, t, e), s = this.options, o = t.open < t.close, d = s.lineColor || this.color, p = t.color || this.color;
1499
+ if (i["stroke-width"] = s.lineWidth, i.fill = t.options.color || o && s.upColor || p, i.stroke = t.options.lineColor || o && s.upLineColor || d, e) {
1500
+ let u = s.states[e];
1501
+ i.fill = u.color || i.fill, i.stroke = u.lineColor || i.stroke, i["stroke-width"] = u.lineWidth || i["stroke-width"];
1502
+ }
1503
+ return i;
1504
+ }
1505
+ drawPoints() {
1506
+ let t = this.points, e = this.chart, i = this.yAxis.reversed;
1507
+ for (let s of t) {
1508
+ let o = s.graphic, d, p, u, c, f, l, r, n, h, g = !o;
1509
+ if (s.plotY !== void 0) {
1510
+ o || (s.graphic = o = e.renderer.path().add(this.group)), this.chart.styledMode || o.attr(this.pointAttribs(s, s.selected && "select")).shadow(this.options.shadow);
1511
+ let m = o.strokeWidth();
1512
+ r = Re(s.plotX || 0, m), u = Math.min(d = s.plotOpen, p = s.plotClose), c = Math.max(d, p), h = Math.round(s.shapeArgs.width / 2), f = i ? c !== s.yBottom : Math.round(u) !== Math.round(s.plotHigh || 0), l = i ? Math.round(u) !== Math.round(s.plotHigh || 0) : c !== s.yBottom, u = Re(u, m), c = Re(c, m), (n = []).push(["M", r - h, c], ["L", r - h, u], ["L", r + h, u], ["L", r + h, c], ["Z"], ["M", r, u], ["L", r, f ? Math.round(i ? s.yBottom : s.plotHigh) : u], ["M", r, c], ["L", r, l ? Math.round(i ? s.plotHigh : s.yBottom) : c]), o[g ? "attr" : "animate"]({ d: n }).addClass(s.getClassName(), !0);
1513
+ }
1514
+ }
1515
+ }
1516
+ }
1517
+ Di.defaultOptions = ar(De.defaultOptions, { tooltip: De.defaultOptions.tooltip }, { states: { hover: { lineWidth: 2 } }, threshold: null, lineColor: "#000000", lineWidth: 1, upColor: "#ffffff", stickyTracking: !0 }), j().registerSeriesType("candlestick", Di);
1518
+ let { column: { prototype: { pointClass: nr } } } = j().seriesTypes, { isNumber: lr } = C(), hr = class extends nr {
1519
+ constructor() {
1520
+ super(...arguments), this.ttBelow = !1;
1521
+ }
1522
+ isValid() {
1523
+ return lr(this.y) || this.y === void 0;
1524
+ }
1525
+ hasNewShapeType() {
1526
+ let a = this.options.shape || this.series.options.shape;
1527
+ return this.graphic && a && a !== this.graphic.symbolKey;
1528
+ }
1529
+ };
1530
+ (function(a) {
1531
+ let t = [];
1532
+ function e(s, o, d, p, u) {
1533
+ let c = u && u.anchorX || s, f = u && u.anchorY || o, l = this.circle(c - 1, f - 1, 2, 2);
1534
+ return l.push(["M", c, f], ["L", s, o + p], ["L", s, o], ["L", s + d, o], ["L", s + d, o + p], ["L", s, o + p], ["Z"]), l;
1535
+ }
1536
+ function i(s, o) {
1537
+ s[o + "pin"] = function(d, p, u, c, f) {
1538
+ let l, r = f && f.anchorX, n = f && f.anchorY;
1539
+ if (o === "circle" && c > u && (d -= Math.round((c - u) / 2), u = c), l = s[o](d, p, u, c, f), r && n) {
1540
+ let h = r;
1541
+ if (o === "circle") h = d + u / 2;
1542
+ else {
1543
+ let m = l[0], x = l[1];
1544
+ m[0] === "M" && x[0] === "L" && (h = (m[1] + x[1]) / 2);
1545
+ }
1546
+ let g = p > n ? p : p + c;
1547
+ l.push(["M", h, g], ["L", r, n]), l = l.concat(s.circle(r - 1, n - 1, 2, 2));
1548
+ }
1549
+ return l;
1550
+ };
1551
+ }
1552
+ a.compose = function(s) {
1553
+ if (t.indexOf(s) === -1) {
1554
+ t.push(s);
1555
+ let d = s.prototype.symbols;
1556
+ d.flag = e, i(d, "circle"), i(d, "square");
1557
+ }
1558
+ let o = Ze().getRendererType();
1559
+ t.indexOf(o) && t.push(o);
1560
+ };
1561
+ })(de || (de = {}));
1562
+ let dr = de;
1563
+ var pr = I(448), ur = I.n(pr);
1564
+ let { composed: cr } = C(), { prototype: gr } = ur(), { prototype: fr } = Ye(), { defined: Ge, pushUnique: mr, stableSort: xr } = C();
1565
+ var Ie = pe || (pe = {});
1566
+ function Ri(a) {
1567
+ return fr.getPlotBox.call(this.options.onSeries && this.chart.get(this.options.onSeries) || this, a);
1568
+ }
1569
+ function Gi() {
1570
+ gr.translate.apply(this);
1571
+ let a = this, t = a.options, e = a.chart, i = a.points, s = t.onSeries, o = s && e.get(s), d = o && o.options.step, p = o && o.points, u = e.inverted, c = a.xAxis, f = a.yAxis, l = i.length - 1, r, n, h = t.onKey || "y", g = p && p.length, m = 0, x, b, A, y, k;
1572
+ if (o && o.visible && g) {
1573
+ for (m = (o.pointXOffset || 0) + (o.barW || 0) / 2, y = o.currentDataGrouping, b = p[g - 1].x + (y ? y.totalRange : 0), xr(i, (M, v) => M.x - v.x), h = "plot" + h[0].toUpperCase() + h.substr(1); g-- && i[l]; ) if (x = p[g], (r = i[l]).y = x.y, x.x <= r.x && x[h] !== void 0) {
1574
+ if (r.x <= b && (r.plotY = x[h], x.x < r.x && !d && (A = p[g + 1])) && A[h] !== void 0) if (Ge(r.plotX) && o.is("spline")) {
1575
+ let M = [x.plotX || 0, x.plotY || 0], v = [A.plotX || 0, A.plotY || 0], S = x.controlPoints?.high || M, T = A.controlPoints?.low || v, B = (O, D) => Math.pow(1 - O, 3) * M[D] + 3 * (1 - O) * (1 - O) * O * S[D] + 3 * (1 - O) * O * O * T[D] + O * O * O * v[D], w = 0, E = 1, P;
1576
+ for (let O = 0; O < 100; O++) {
1577
+ let D = (w + E) / 2, R = B(D, 0);
1578
+ if (R === null) break;
1579
+ if (0.25 > Math.abs(R - r.plotX)) {
1580
+ P = D;
1581
+ break;
1582
+ }
1583
+ R < r.plotX ? w = D : E = D;
1584
+ }
1585
+ Ge(P) && (r.plotY = B(P, 1), r.y = f.toValue(r.plotY, !0));
1586
+ } else k = (r.x - x.x) / (A.x - x.x), r.plotY += k * (A[h] - x[h]), r.y += k * (A.y - x.y);
1587
+ if (l--, g++, l < 0) break;
1588
+ }
1589
+ }
1590
+ i.forEach((M, v) => {
1591
+ let S;
1592
+ M.plotX += m, (M.plotY === void 0 || u) && (M.plotX >= 0 && M.plotX <= c.len ? u ? (M.plotY = c.translate(M.x, 0, 1, 0, 1), M.plotX = Ge(M.y) ? f.translate(M.y, 0, 0, 0, 1) : 0) : M.plotY = (c.opposite ? 0 : a.yAxis.len) + c.offset : M.shapeArgs = {}), (n = i[v - 1]) && n.plotX === M.plotX && (n.stackIndex === void 0 && (n.stackIndex = 0), S = n.stackIndex + 1), M.stackIndex = S;
1593
+ }), this.onSeries = o;
1594
+ }
1595
+ Ie.compose = function(a) {
1596
+ if (mr(cr, "OnSeries")) {
1597
+ let t = a.prototype;
1598
+ t.getPlotBox = Ri, t.translate = Gi;
1599
+ }
1600
+ return a;
1601
+ }, Ie.getPlotBox = Ri, Ie.translate = Gi;
1602
+ let br = pe, { noop: vr } = C(), { distribute: yr } = C(), { series: Ii, seriesTypes: { column: zi } } = j(), { addEvent: Mr, defined: Ar, extend: kr, isNumber: wr, merge: Li, objectEach: Sr, wrap: Tr } = C();
1603
+ class Tt extends zi {
1604
+ animate(t) {
1605
+ t && this.setClip();
1606
+ }
1607
+ drawPoints() {
1608
+ let t, e, i, s, o, d, p, u, c, f, l, r = this.points, n = this.chart, h = n.renderer, g = n.inverted, m = this.options, x = m.y, b = this.yAxis, A = {}, y = [], k = wr(m.borderRadius) ? m.borderRadius : 0;
1609
+ for (s = r.length; s--; ) o = r[s], f = (g ? o.plotY : o.plotX) > this.xAxis.len, t = o.plotX, p = o.stackIndex, i = o.options.shape || m.shape, (e = o.plotY) !== void 0 && (e = o.plotY + x - (p !== void 0 && p * m.stackDistance)), o.anchorX = p ? void 0 : o.plotX, u = p ? void 0 : o.plotY, l = i !== "flag", d = o.graphic, e !== void 0 && t >= 0 && !f ? (d && o.hasNewShapeType() && (d = d.destroy()), d || (d = o.graphic = h.label("", 0, void 0, i, void 0, void 0, m.useHTML).addClass(o.getClassName()).add(this.markerGroup), o.graphic.div && (o.graphic.div.point = o), d.isNew = !0), d.attr({ align: l ? "center" : "left", width: m.width, height: m.height, "text-align": m.textAlign, r: k }), n.styledMode || d.attr(this.pointAttribs(o)).css(Li(m.style, o.style)).shadow(m.shadow), t > 0 && (t -= d.strokeWidth() % 2), c = { y: e, anchorY: u }, m.allowOverlapX && (c.x = t, c.anchorX = o.anchorX), d.attr({ text: o.options.title ?? m.title ?? "A" })[d.isNew ? "attr" : "animate"](c), m.allowOverlapX || (A[o.plotX] ? A[o.plotX].size = Math.max(A[o.plotX].size, d.width || 0) : A[o.plotX] = { align: 0.5 * !!l, size: d.width || 0, target: t, anchorX: t }), o.tooltipPos = [t, e + b.pos - n.plotTop]) : d && (o.graphic = d.destroy());
1610
+ if (!m.allowOverlapX) {
1611
+ let M = 100;
1612
+ for (let v of (Sr(A, function(S) {
1613
+ S.plotX = S.anchorX, y.push(S), M = Math.max(S.size, M);
1614
+ }), yr(y, g ? b.len : this.xAxis.len, M), r)) {
1615
+ let S = v.plotX, T = v.graphic, B = T && A[S];
1616
+ B && T && (Ar(B.pos) ? T[T.isNew ? "attr" : "animate"]({ x: B.pos + (B.align || 0) * B.size, anchorX: v.anchorX }).show().isNew = !1 : T.hide().isNew = !0);
1617
+ }
1618
+ }
1619
+ m.useHTML && this.markerGroup && Tr(this.markerGroup, "on", function(M) {
1620
+ return fi().prototype.on.apply(M.apply(this, [].slice.call(arguments, 1)), [].slice.call(arguments, 1));
1621
+ });
1622
+ }
1623
+ drawTracker() {
1624
+ let t = this.points;
1625
+ for (let e of (super.drawTracker(), t)) {
1626
+ let i = e.graphic;
1627
+ i && (e.unbindMouseOver && e.unbindMouseOver(), e.unbindMouseOver = Mr(i.element, "mouseover", function() {
1628
+ for (let s of (e.stackIndex > 0 && !e.raised && (e._y = i.y, i.attr({ y: e._y - 8 }), e.raised = !0), t)) s !== e && s.raised && s.graphic && (s.graphic.attr({ y: s._y }), s.raised = !1);
1629
+ }));
1630
+ }
1631
+ }
1632
+ pointAttribs(t, e) {
1633
+ let i = this.options, s = t && t.color || this.color, o = i.lineColor, d = t && t.lineWidth, p = t && t.fillColor || i.fillColor;
1634
+ return e && (p = i.states[e].fillColor, o = i.states[e].lineColor, d = i.states[e].lineWidth), { fill: p || s, stroke: o || s, "stroke-width": d || i.lineWidth || 0 };
1635
+ }
1636
+ setClip() {
1637
+ Ii.prototype.setClip.apply(this, arguments), this.options.clip !== !1 && this.sharedClipKey && this.markerGroup && this.markerGroup.clip(this.chart.sharedClips[this.sharedClipKey]);
1638
+ }
1639
+ }
1640
+ Tt.compose = dr.compose, Tt.defaultOptions = Li(zi.defaultOptions, { borderRadius: 0, 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: "#ccd3ff" } }, style: { color: "#000000", fontSize: "0.7em", fontWeight: "bold" } }), br.compose(Tt), kr(Tt.prototype, { allowDG: !1, forceCrop: !0, invertible: !1, noSharedTooltip: !0, pointClass: hr, sorted: !1, takeOrdinalPosition: !1, trackerGroups: ["markerGroup"], buildKDTree: vr, init: Ii.prototype.init }), j().registerSeriesType("flags", Tt);
1641
+ var Er = I(184), Or = I.n(Er);
1642
+ let { addEvent: Et, find: Br, fireEvent: Wi, isArray: Cr, isNumber: F, pick: Zt } = C();
1643
+ (function(a) {
1644
+ function t() {
1645
+ this.brokenAxis !== void 0 && this.brokenAxis.setBreaks(this.options.breaks, !1);
1646
+ }
1647
+ function e() {
1648
+ Object.keys(this.options.breaks?.[0] || {}).length && (this.options.ordinal = !1);
1649
+ }
1650
+ function i() {
1651
+ let f = this.brokenAxis;
1652
+ if (f?.hasBreaks) {
1653
+ let l = this.tickPositions, r = this.tickPositions.info, n = [];
1654
+ for (let h = 0; h < l.length; h++) f.isInAnyBreak(l[h]) || n.push(l[h]);
1655
+ this.tickPositions = n, this.tickPositions.info = r;
1656
+ }
1657
+ }
1658
+ function s() {
1659
+ this.brokenAxis || (this.brokenAxis = new c(this));
1660
+ }
1661
+ function o() {
1662
+ let { isDirty: f, options: { connectNulls: l }, points: r, xAxis: n, yAxis: h } = this;
1663
+ if (f) {
1664
+ let g = r.length;
1665
+ for (; g--; ) {
1666
+ let m = r[g], x = (m.y !== null || l !== !1) && (n?.brokenAxis?.isInAnyBreak(m.x, !0) || h?.brokenAxis?.isInAnyBreak(m.y, !0));
1667
+ m.visible = !x && m.options.visible !== !1;
1668
+ }
1669
+ }
1670
+ }
1671
+ function d() {
1672
+ this.drawBreaks(this.xAxis, ["x"]), this.drawBreaks(this.yAxis, Zt(this.pointArrayMap, ["y"]));
1673
+ }
1674
+ function p(f, l) {
1675
+ let r, n, h, g = this, m = g.points;
1676
+ if (f?.brokenAxis?.hasBreaks) {
1677
+ let x = f.brokenAxis;
1678
+ l.forEach(function(b) {
1679
+ r = x?.breakArray || [], n = f.isXAxis ? f.min : Zt(g.options.threshold, f.min), m.forEach(function(A) {
1680
+ h = A["stack" + b.toUpperCase()] ?? A[b], r.forEach(function(y) {
1681
+ if (F(n) && F(h)) {
1682
+ let k = "";
1683
+ n < y.from && h > y.to || n > y.from && h < y.from ? k = "pointBreak" : (n < y.from && h > y.from && h < y.to || n > y.from && h > y.to && h < y.from) && (k = "pointInBreak"), k && Wi(f, k, { point: A, brk: y });
1684
+ }
1685
+ });
1686
+ });
1687
+ });
1688
+ }
1689
+ }
1690
+ function u() {
1691
+ let f = this.currentDataGrouping, l = f?.gapSize, r = this.points.slice(), n = this.yAxis, h = this.options.gapSize, g = r.length - 1;
1692
+ if (h && g > 0) {
1693
+ let m, x;
1694
+ for (this.options.gapUnit !== "value" && (h *= this.basePointRange), l && l > h && l >= this.basePointRange && (h = l); g--; ) if (x && x.visible !== !1 || (x = r[g + 1]), m = r[g], x.visible !== !1 && m.visible !== !1) {
1695
+ if (x.x - m.x > h) {
1696
+ let b = (m.x + x.x) / 2;
1697
+ r.splice(g + 1, 0, { isNull: !0, x: b }), n.stacking && this.options.stacking && ((n.stacking.stacks[this.stackKey][b] = new (Or())(n, n.options.stackLabels, !1, b, this.stack ?? "")).total = 0);
1698
+ }
1699
+ x = m;
1700
+ }
1701
+ }
1702
+ return this.getGraphPath(r);
1703
+ }
1704
+ a.compose = function(f, l) {
1705
+ if (!f.keepProps.includes("brokenAxis")) {
1706
+ f.keepProps.push("brokenAxis"), Et(f, "init", s), Et(f, "afterInit", t), Et(f, "afterSetTickPositions", i), Et(f, "afterSetOptions", e);
1707
+ let r = l.prototype;
1708
+ r.drawBreaks = p, r.gappedPath = u, Et(l, "afterGeneratePoints", o), Et(l, "afterRender", d);
1709
+ }
1710
+ return f;
1711
+ };
1712
+ class c {
1713
+ static isInBreak(l, r) {
1714
+ let n = l.repeat || 1 / 0, h = l.from, g = l.to - l.from, m = r >= h ? (r - h) % n : n - (h - r) % n;
1715
+ return l.inclusive ? m <= g : m < g && m !== 0;
1716
+ }
1717
+ static lin2Val(l) {
1718
+ let r = this.min || 0, n = this.brokenAxis, h = n?.breakArray;
1719
+ if (!h?.length || !F(l)) return l;
1720
+ let g = l;
1721
+ if (l > r) for (let m of h) {
1722
+ if (m.from > g) break;
1723
+ (m.to <= g && m.to > r || c.isInBreak(m, g)) && (g += m.len);
1724
+ }
1725
+ else if (l < r) for (let m of h) {
1726
+ if (m.from > r) break;
1727
+ (m.from >= g && m.from < r || c.isInBreak(m, g)) && (g -= m.len);
1728
+ }
1729
+ return g;
1730
+ }
1731
+ static val2Lin(l) {
1732
+ let r = this.min || 0, n = this.brokenAxis, h = n?.breakArray;
1733
+ if (!h?.length || !F(l)) return l;
1734
+ let g = l;
1735
+ if (l > r)
1736
+ for (let m of h) if (m.to <= l && m.to > r) g -= m.len;
1737
+ else {
1738
+ if (m.from > l) break;
1739
+ if (c.isInBreak(m, l)) {
1740
+ g -= l - m.from;
1741
+ break;
1742
+ }
1743
+ }
1744
+ else if (l < r)
1745
+ for (let m of h) if (m.from >= l && m.from < r) g += m.len;
1746
+ else {
1747
+ if (m.from > r) break;
1748
+ if (c.isInBreak(m, l)) {
1749
+ g += m.to - l;
1750
+ break;
1751
+ }
1752
+ }
1753
+ return g;
1754
+ }
1755
+ constructor(l) {
1756
+ this.axis = l;
1757
+ }
1758
+ findBreakAt(l, r) {
1759
+ return Br(r, function(n) {
1760
+ return n.from < l && l < n.to;
1761
+ });
1762
+ }
1763
+ isInAnyBreak(l, r) {
1764
+ let n = this.axis, h = n.options.breaks || [], g = h.length, m, x, b;
1765
+ if (g && F(l)) {
1766
+ for (; g--; ) c.isInBreak(h[g], l) && (m = !0, x || (x = Zt(h[g].showPoints, !n.isXAxis)));
1767
+ b = m && r ? m && !x : m;
1768
+ }
1769
+ return b;
1770
+ }
1771
+ setBreaks(l, r) {
1772
+ let n = this, h = n.axis, g = h.chart.time, m = Cr(l) && !!Object.keys(l?.[0] || {}).length;
1773
+ h.isDirty = (n.hasBreaks ?? !1) !== m, n.hasBreaks = m, l?.forEach((x) => {
1774
+ x.from = g.parse(x.from) || 0, x.to = g.parse(x.to) || 0;
1775
+ }), l !== h.options.breaks && (h.options.breaks = h.userOptions.breaks = l), h.forceRedraw = !0, h.series.forEach(function(x) {
1776
+ x.isDirty = !0;
1777
+ }), m || h.val2lin !== c.val2Lin || (delete h.val2lin, delete h.lin2val), m && (h.userOptions.ordinal = !1, h.lin2val = c.lin2Val, h.val2lin = c.val2Lin, h.setExtremes = function(x, b, A, y, k) {
1778
+ if (n.hasBreaks && !h.treeGrid?.tree) {
1779
+ let M, v = this.brokenAxis.breakArray || [];
1780
+ for (; M = n.findBreakAt(x, v); ) x = M.to;
1781
+ for (; M = n.findBreakAt(b, v); ) b = M.from;
1782
+ b < x && (b = x);
1783
+ }
1784
+ h.constructor.prototype.setExtremes.call(this, x, b, A, y, k);
1785
+ }, h.setAxisTranslation = function() {
1786
+ if (h.constructor.prototype.setAxisTranslation.call(this), n.unitLength = void 0, n.hasBreaks) {
1787
+ let x = h.options.breaks || [], b = [], A = [], y = h.pointRangePadding ?? 0, k = 0, M, v, S = h.userMin ?? h.min, T = h.userMax ?? h.max, B = h.dataMin ?? S, w = h.dataMax ?? T, E, P;
1788
+ F(h.threshold) && (B = Math.min(B ?? h.threshold, h.threshold), w = Math.max(w ?? h.threshold, h.threshold)), h.treeGrid?.tree || x.forEach(function(O) {
1789
+ v = O.repeat || 1 / 0, F(S) && F(T) && (c.isInBreak(O, S) && (S += O.to % v - S % v), c.isInBreak(O, T) && (T -= T % v - O.from % v));
1790
+ }), F(B) && F(w) && x.forEach(function(O) {
1791
+ for (E = O.from, v = O.repeat || 1 / 0; E - v > B; ) E -= v;
1792
+ for (; E < B; ) E += v;
1793
+ for (P = E; P < w; P += v) b.push({ value: P, move: "in" }), b.push({ value: P + O.to - O.from, move: "out", size: O.breakSize });
1794
+ }), b.sort(function(O, D) {
1795
+ return O.value === D.value ? (O.move !== "in") - (D.move !== "in") : O.value - D.value;
1796
+ }), M = 0, E = B, b.forEach((O) => {
1797
+ (M += O.move === "in" ? 1 : -1) === 1 && O.move === "in" && (E = O.value), M === 0 && F(E) && (A.push({ from: E, to: O.value, len: O.value - E - (O.size || 0) }), F(S) && F(T) && E < T && O.value > S && (k += O.value - E - (O.size || 0)));
1798
+ }), n.breakArray = A, F(S) && F(T) && F(h.min) && (n.unitLength = T - S - k + y, Wi(h, "afterBreaks"), h.staticScale ? h.transA = h.staticScale : n.unitLength && (h.transA *= (T - h.min + y) / n.unitLength), y && (h.minPixelPadding = h.transA * (h.minPointOffset || 0)), h.min = S, h.max = T);
1799
+ }
1800
+ }), Zt(r, !0) && h.chart.redraw();
1801
+ }
1802
+ }
1803
+ a.Additions = c;
1804
+ })(ue || (ue = {}));
1805
+ let Pr = ue, Xt = C();
1806
+ Xt.BrokenAxis = Xt.BrokenAxis || Pr, Xt.BrokenAxis.compose(Xt.Axis, Xt.Series);
1807
+ let V = {}, { arrayMax: Dr, arrayMin: Rr, correctFloat: Gr, extend: Ir, isNumber: Q } = C();
1808
+ function Xi(a) {
1809
+ let t = a.length, e = Hi(a);
1810
+ return Q(e) && t && (e = Gr(e / t)), e;
1811
+ }
1812
+ function Hi(a) {
1813
+ let t = a.length, e;
1814
+ if (!t && a.hasNulls) e = null;
1815
+ else if (t) for (e = 0; t--; ) e += a[t];
1816
+ return e;
1817
+ }
1818
+ let Yi = { average: Xi, averages: function() {
1819
+ let a = [];
1820
+ return [].forEach.call(arguments, function(t) {
1821
+ a.push(Xi(t));
1822
+ }), a[0] === void 0 ? void 0 : a;
1823
+ }, close: function(a) {
1824
+ return a.length ? a[a.length - 1] : a.hasNulls ? null : void 0;
1825
+ }, high: function(a) {
1826
+ return a.length ? Dr(a) : a.hasNulls ? null : void 0;
1827
+ }, hlc: function(a, t, e) {
1828
+ if (a = V.high(a), t = V.low(t), e = V.close(e), Q(a) || Q(t) || Q(e)) return [a, t, e];
1829
+ }, low: function(a) {
1830
+ return a.length ? Rr(a) : a.hasNulls ? null : void 0;
1831
+ }, ohlc: function(a, t, e, i) {
1832
+ if (a = V.open(a), t = V.high(t), e = V.low(e), i = V.close(i), Q(a) || Q(t) || Q(e) || Q(i)) return [a, t, e, i];
1833
+ }, open: function(a) {
1834
+ return a.length ? a[0] : a.hasNulls ? null : void 0;
1835
+ }, range: function(a, t) {
1836
+ return a = V.low(a), t = V.high(t), Q(a) || Q(t) ? [a, t] : a === null && t === null ? null : void 0;
1837
+ }, sum: Hi };
1838
+ Ir(V, Yi);
1839
+ let Kt = { groupPixelWidth: 2, dateTimeLabelFormats: { millisecond: ["%[AebHMSL]", "%[AebHMSL]", "-%[HMSL]"], second: ["%[AebHMS]", "%[AebHMS]", "-%[HMS]"], minute: ["%[AebHM]", "%[AebHM]", "-%[HM]"], hour: ["%[AebHM]", "%[AebHM]", "-%[HM]"], day: ["%[AebY]", "%[Aeb]", "-%[AebY]"], week: ["%v %[AebY]", "%[Aeb]", "-%[AebY]"], month: ["%[BY]", "%[B]", "-%[BY]"], year: ["%Y", "%Y", "-%Y"] } }, Ni = { line: {}, spline: {}, area: {}, areaspline: {}, arearange: {}, column: { groupPixelWidth: 10 }, columnrange: { groupPixelWidth: 10 }, candlestick: { groupPixelWidth: 10 }, ohlc: { groupPixelWidth: 5 }, hlc: { groupPixelWidth: 5 }, heikinashi: { groupPixelWidth: 10 } }, zr = [["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]], { addEvent: Fi, extend: Lr, merge: Wr, pick: Ui } = C();
1840
+ function Vi(a) {
1841
+ let t = this, e = t.series;
1842
+ e.forEach(function(i) {
1843
+ i.groupPixelWidth = void 0;
1844
+ }), e.forEach(function(i) {
1845
+ i.groupPixelWidth = t.getGroupPixelWidth && t.getGroupPixelWidth(), i.groupPixelWidth && (i.hasProcessed = !0), i.applyGrouping(!!a.hasExtremesChanged);
1846
+ });
1847
+ }
1848
+ function Xr() {
1849
+ let a = this.series, t = a.length, e = 0, i = !1, s, o;
1850
+ for (; t--; ) (o = a[t].options.dataGrouping) && (e = Math.max(e, Ui(o.groupPixelWidth, Kt.groupPixelWidth)), s = (a[t].dataTable.getModified() || a[t].dataTable).rowCount, (a[t].groupPixelWidth || s > this.chart.plotSizeX / e || s && o.forced) && (i = !0));
1851
+ return i ? e : 0;
1852
+ }
1853
+ function Hr() {
1854
+ this.series.forEach(function(a) {
1855
+ a.hasProcessed = !1;
1856
+ });
1857
+ }
1858
+ function Yr(a, t) {
1859
+ let e;
1860
+ if (t = Ui(t, !0), a || (a = { forced: !1, units: null }), this instanceof We) for (e = this.series.length; e--; ) this.series[e].update({ dataGrouping: a }, !1);
1861
+ else this.chart.options.series.forEach(function(i) {
1862
+ i.dataGrouping = typeof a == "boolean" ? a : Wr(a, i.dataGrouping);
1863
+ });
1864
+ this.ordinal && (this.ordinal.slope = void 0), t && this.chart.redraw();
1865
+ }
1866
+ let Nr = function(a) {
1867
+ We = a;
1868
+ let t = a.prototype;
1869
+ t.applyGrouping || (Fi(a, "afterSetScale", Hr), Fi(a, "postProcessData", Vi), Lr(t, { applyGrouping: Vi, getGroupPixelWidth: Xr, setDataGrouping: Yr }));
1870
+ }, { addEvent: Fr, getMagnitude: Ur, normalizeTickInterval: Vr, timeUnits: $t } = C();
1871
+ (function(a) {
1872
+ function t() {
1873
+ return this.chart.time.getTimeTicks.apply(this.chart.time, arguments);
1874
+ }
1875
+ function e() {
1876
+ if (this.type !== "datetime") {
1877
+ this.dateTime = void 0;
1878
+ return;
1879
+ }
1880
+ this.dateTime || (this.dateTime = new i(this));
1881
+ }
1882
+ a.compose = function(s) {
1883
+ return s.keepProps.includes("dateTime") || (s.keepProps.push("dateTime"), s.prototype.getTimeTicks = t, Fr(s, "afterSetType", e)), s;
1884
+ };
1885
+ class i {
1886
+ constructor(o) {
1887
+ this.axis = o;
1888
+ }
1889
+ normalizeTimeTickInterval(o, d) {
1890
+ let p = d || [["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]], u = p[p.length - 1], c = $t[u[0]], f = u[1], l;
1891
+ for (l = 0; l < p.length && (c = $t[(u = p[l])[0]], f = u[1], !p[l + 1] || !(o <= (c * f[f.length - 1] + $t[p[l + 1][0]]) / 2)); l++) ;
1892
+ c === $t.year && o < 5 * c && (f = [1, 2, 5]);
1893
+ let r = Vr(o / c, f, u[0] === "year" ? Math.max(Ur(o / c), 1) : 1);
1894
+ return { unitRange: c, count: r, unitName: u[0] };
1895
+ }
1896
+ getXDateFormat(o, d) {
1897
+ let { axis: p } = this, u = p.chart.time;
1898
+ return p.closestPointRange ? u.getDateFormat(p.closestPointRange, o, p.options.startOfWeek, d) || u.resolveDTLFormat(d.year).main : u.resolveDTLFormat(d.day).main;
1899
+ }
1900
+ }
1901
+ a.Additions = i;
1902
+ })(ce || (ce = {}));
1903
+ let _r = ce, { series: { prototype: _i } } = j(), { addEvent: ze, defined: Ht, error: ji, extend: jr, isNumber: Z, merge: Le, pick: qr, splat: Zr } = C(), Kr = _i.generatePoints;
1904
+ function $r(a) {
1905
+ var t, e, i;
1906
+ let s, o, d = this.chart, p = this.options.dataGrouping, u = this.allowDG !== !1 && p && qr(p.enabled, d.options.isStock), c = this.reserveSpace(), f = this.currentDataGrouping, l, r, n = !1;
1907
+ u && !this.requireSorting && (this.requireSorting = n = !0);
1908
+ let h = (t = this, e = a, !!(t.isCartesian && !t.isDirty && !t.xAxis.isDirty && !t.yAxis.isDirty && !e) || !u);
1909
+ if (n && (this.requireSorting = !1), h) return;
1910
+ this.destroyGroupedData();
1911
+ let g = p.groupAll ? this.dataTable : this.dataTable.getModified() || this.dataTable, m = this.getColumn("x", !p.groupAll), x = d.plotSizeX, b = this.xAxis, A = b.getExtremes(), y = b.options.ordinal, k = this.groupPixelWidth;
1912
+ if (k && m && g.rowCount && x && Z(A.min)) {
1913
+ o = !0, this.isDirty = !0, this.points = null;
1914
+ let M = A.min, v = A.max, S = y && b.ordinal && b.ordinal.getGroupIntervalFactor(M, v, this) || 1, T = k * (v - M) / x * S, B = b.getTimeTicks(_r.Additions.prototype.normalizeTimeTickInterval(T, p.units || zr), Math.min(M, m[0]), Math.max(v, m[m.length - 1]), b.options.startOfWeek, m, this.closestPointRange), w = _i.groupData.apply(this, [g, B, p.approximation]), E = w.modified, P = E.getColumn("x", !0), O = 0;
1915
+ for (p?.smoothed && E.rowCount && (p.firstAnchor = "firstPoint", p.anchor = "middle", p.lastAnchor = "lastPoint", ji(32, !1, d, { "dataGrouping.smoothed": "use dataGrouping.anchor" })), s = 1; s < B.length; s++) B.info.segmentStarts && B.info.segmentStarts.indexOf(s) !== -1 || (O = Math.max(B[s] - B[s - 1], O));
1916
+ (l = B.info).gapSize = O, this.closestPointRange = B.info.totalRange, this.groupMap = w.groupMap, this.currentDataGrouping = l, function(D, R, H) {
1917
+ let L = D.options.dataGrouping, z = D.currentDataGrouping && D.currentDataGrouping.gapSize, W = D.getColumn("x");
1918
+ if (!(L && W.length && z && D.groupMap)) return;
1919
+ let N = R.length - 1, lt = L.anchor, Ot = L.firstAnchor, _ = L.lastAnchor, Bt = R.length - 1, Qt = 0;
1920
+ if (Ot && W[0] >= R[0]) {
1921
+ let ht;
1922
+ Qt++;
1923
+ let ts = D.groupMap[0].start, es = D.groupMap[0].length;
1924
+ Z(ts) && Z(es) && (ht = ts + (es - 1)), R[0] = { start: R[0], middle: R[0] + 0.5 * z, end: R[0] + z, firstPoint: W[0], lastPoint: ht && W[ht] }[Ot];
1925
+ }
1926
+ if (N > 0 && _ && z && R[N] >= H - z) {
1927
+ Bt--;
1928
+ let ht = D.groupMap[D.groupMap.length - 1].start;
1929
+ R[N] = { start: R[N], middle: R[N] + 0.5 * z, end: R[N] + z, firstPoint: ht && W[ht], lastPoint: W[W.length - 1] }[_];
1930
+ }
1931
+ if (lt && lt !== "start") {
1932
+ let ht = z * { middle: 0.5, end: 1 }[lt];
1933
+ for (; Bt >= Qt; ) R[Bt] += ht, Bt--;
1934
+ }
1935
+ }(this, P || [], v), c && P && (Ht((i = P)[0]) && Z(b.min) && Z(b.dataMin) && i[0] < b.min && ((!Ht(b.options.min) && b.min <= b.dataMin || b.min === b.dataMin) && (b.min = Math.min(i[0], b.min)), b.dataMin = Math.min(i[0], b.dataMin)), Ht(i[i.length - 1]) && Z(b.max) && Z(b.dataMax) && i[i.length - 1] > b.max && ((!Ht(b.options.max) && Z(b.dataMax) && b.max >= b.dataMax || b.max === b.dataMax) && (b.max = Math.max(i[i.length - 1], b.max)), b.dataMax = Math.max(i[i.length - 1], b.dataMax))), p.groupAll && (this.allGroupedTable = E, P = (E = (r = this.cropData(E, b.min || 0, b.max || 0)).modified).getColumn("x"), this.cropStart = r.start), this.dataTable.modified = E;
1936
+ } else this.groupMap = void 0, this.currentDataGrouping = void 0;
1937
+ this.hasGroupedData = o, this.preventGraphAnimation = (f && f.totalRange) !== (l && l.totalRange);
1938
+ }
1939
+ function qi() {
1940
+ this.groupedData && (this.groupedData.forEach(function(a, t) {
1941
+ a && (this.groupedData[t] = a.destroy ? a.destroy() : null);
1942
+ }, this), this.groupedData.length = 0, delete this.allGroupedTable);
1943
+ }
1944
+ function Jr() {
1945
+ Kr.apply(this), this.destroyGroupedData(), this.groupedData = this.hasGroupedData ? this.points : null;
1946
+ }
1947
+ function Qr() {
1948
+ return this.is("arearange") ? "range" : this.is("ohlc") ? "ohlc" : this.is("hlc") ? "hlc" : this.is("column") || this.options.cumulative ? "sum" : "average";
1949
+ }
1950
+ function Zi(a, t, e) {
1951
+ let i = a.getColumn("x", !0) || [], s = a.getColumn("y", !0), o = this, d = o.data, p = o.options && o.options.data, u = [], c = new hi(), f = [], l = a.rowCount, r = !!s, n = [], h = o.pointArrayMap, g = h && h.length, m = ["x"].concat(h || ["y"]), x = (h || ["y"]).map(() => []), b = this.options.dataGrouping && this.options.dataGrouping.groupAll, A, y, k, M = 0, v = 0, S = typeof e == "function" ? e : e && V[e] ? V[e] : V[o.getDGApproximation && o.getDGApproximation() || "average"];
1952
+ if (g) {
1953
+ let w = h.length;
1954
+ for (; w--; ) n.push([]);
1955
+ } else n.push([]);
1956
+ let T = g || 1;
1957
+ for (let w = 0; w <= l; w++) if (!(i[w] < t[0])) {
1958
+ for (; t[M + 1] !== void 0 && i[w] >= t[M + 1] || w === l; ) {
1959
+ if (A = t[M], o.dataGroupInfo = { start: b ? v : o.cropStart + v, length: n[0].length, groupStart: A }, k = S.apply(o, n), o.pointClass && !Ht(o.dataGroupInfo.options) && (o.dataGroupInfo.options = Le(o.pointClass.prototype.optionsToObject.call({ series: o }, o.options.data[o.cropStart + v])), m.forEach(function(E) {
1960
+ delete o.dataGroupInfo.options[E];
1961
+ })), k !== void 0) {
1962
+ u.push(A);
1963
+ let E = Zr(k);
1964
+ for (let P = 0; P < E.length; P++) x[P].push(E[P]);
1965
+ f.push(o.dataGroupInfo);
1966
+ }
1967
+ v = w;
1968
+ for (let E = 0; E < T; E++) n[E].length = 0, n[E].hasNulls = !1;
1969
+ if (M += 1, w === l) break;
1970
+ }
1971
+ if (w === l) break;
1972
+ if (h) {
1973
+ let E, P = b ? w : o.cropStart + w, O = d && d[P] || o.pointClass.prototype.applyOptions.apply({ series: o }, [p[P]]);
1974
+ for (let D = 0; D < g; D++) Z(E = O[h[D]]) ? n[D].push(E) : E === null && (n[D].hasNulls = !0);
1975
+ } else Z(y = r ? s[w] : null) ? n[0].push(y) : y === null && (n[0].hasNulls = !0);
1976
+ }
1977
+ let B = { x: u };
1978
+ return (h || ["y"]).forEach((w, E) => {
1979
+ B[w] = x[E];
1980
+ }), c.setColumns(B), { groupMap: f, modified: c };
1981
+ }
1982
+ function ta(a) {
1983
+ let t = a.options, e = this.type, i = this.chart.options.plotOptions, s = this.useCommonDataGrouping && Kt, o = C().defaultOptions.plotOptions[e].dataGrouping;
1984
+ if (i && (Ni[e] || s)) {
1985
+ let d = this.chart.rangeSelector;
1986
+ o || (o = Le(Kt, Ni[e])), t.dataGrouping = Le(s, o, i.series && i.series.dataGrouping, i[e].dataGrouping, this.userOptions.dataGrouping, !t.isInternal && d && Z(d.selected) && d.buttonOptions[d.selected].dataGrouping);
1987
+ }
1988
+ }
1989
+ let ea = function(a) {
1990
+ let t = a.prototype;
1991
+ t.applyGrouping || (ze(a.prototype.pointClass, "update", function() {
1992
+ if (this.dataGroup) return ji(24, !1, this.series.chart), !1;
1993
+ }), ze(a, "afterSetOptions", ta), ze(a, "destroy", qi), jr(t, { applyGrouping: $r, destroyGroupedData: qi, generatePoints: Jr, getDGApproximation: Qr, groupData: Zi }));
1994
+ }, { format: ia } = Se(), { composed: sa } = C(), { addEvent: oa, extend: ra, isNumber: aa, pick: na, pushUnique: la } = C();
1995
+ function ha(a) {
1996
+ let t = this.chart, e = t.time, i = a.point, s = i.series, o = s.options, d = s.tooltipOptions, p = o.dataGrouping, u = s.xAxis, c = d.xDateFormat || "", f, l, r, n, h, g = d[a.isFooter ? "footerFormat" : "headerFormat"];
1997
+ if (u && u.options.type === "datetime" && p && aa(i.key)) {
1998
+ l = s.currentDataGrouping, r = p.dateTimeLabelFormats || Kt.dateTimeLabelFormats, l ? (n = r[l.unitName], l.count === 1 ? c = n[0] : (c = n[1], f = n[2])) : !c && r && u.dateTime && (c = u.dateTime.getXDateFormat(i.x, d.dateTimeLabelFormats));
1999
+ let m = na(s.groupMap?.[i.index].groupStart, i.key), x = m + (l?.totalRange || 0) - 1;
2000
+ h = e.dateFormat(c, m), f && (h += e.dateFormat(f, x)), s.chart.styledMode && (g = this.styledModeFormat(g)), a.text = ia(g, { point: ra(i, { key: h }), series: s }, t), a.preventDefault();
2001
+ }
2002
+ }
2003
+ /**
2004
+ * @license Highstock JS v12.5.0 (2026-01-12)
2005
+ * @module highcharts/modules/datagrouping
2006
+ * @requires highcharts
2007
+ *
2008
+ * Data grouping module
2009
+ *
2010
+ * (c) 2010-2026 Highsoft AS
2011
+ * Author: Torstein Hønsi
2012
+ *
2013
+ * A commercial license may be required depending on use.
2014
+ * See www.highcharts.com/license
2015
+ */
2016
+ let ot = C();
2017
+ ot.dataGrouping = ot.dataGrouping || {}, ot.dataGrouping.approximationDefaults = ot.dataGrouping.approximationDefaults || Yi, ot.dataGrouping.approximations = ot.dataGrouping.approximations || V, { compose: function(a, t, e) {
2018
+ Nr(a), ea(t), e && la(sa, "DataGrouping") && oa(e, "headerFormatter", ha);
2019
+ }, groupData: Zi }.compose(ot.Axis, ot.Series, ot.Tooltip);
2020
+ let { defined: Ea, isNumber: Ki, pick: da } = C(), { addEvent: $i, isObject: pa, pick: ua, defined: ca, merge: ga } = C(), { getAssignedAxis: Ji } = { getAssignedAxis: function(a) {
2021
+ return a.filter((t) => {
2022
+ let e = t.axis.getExtremes(), i = e.min, s = e.max, o = da(t.axis.minPointOffset, 0);
2023
+ return Ki(i) && Ki(s) && t.value >= i - o && t.value <= s + o && !t.axis.options.isInternal;
2024
+ })[0];
2025
+ } }, Qi = [], fa = { enabled: !0, sensitivity: 1.1, showResetButton: !1 }, ma = function(a, t, e, i, s, o, d) {
2026
+ let p = ua(d.type, a.zooming.type, ""), u = [];
2027
+ p === "x" ? u = e : p === "y" ? u = i : p === "xy" && (u = a.axes);
2028
+ let c = a.transform({ axes: u, to: { x: s - 5, y: o - 5, width: 10, height: 10 }, from: { x: s - 5 * t, y: o - 5 * t, width: 10 * t, height: 10 * t }, trigger: "mousewheel", allowResetButton: d.showResetButton });
2029
+ return c && (ca(oe) && clearTimeout(oe), oe = setTimeout(() => {
2030
+ a.pointer?.drop();
2031
+ }, 400)), c;
2032
+ };
2033
+ function xa() {
2034
+ var a;
2035
+ let t = (pa(a = this.zooming.mouseWheel) || (a = { enabled: a ?? !0 }), ga(fa, a));
2036
+ t.enabled && $i(this.container, "wheel", (e) => {
2037
+ e = this.pointer?.normalize(e) || e;
2038
+ let { pointer: i } = this, s = i && !i.inClass(e.target, "highcharts-no-mousewheel");
2039
+ if (this.isInsidePlot(e.chartX - this.plotLeft, e.chartY - this.plotTop) && s) {
2040
+ let o = t.sensitivity || 1.1, d = e.detail || (e.deltaY || 0) / 120, p = Ji(i.getCoordinates(e).xAxis), u = Ji(i.getCoordinates(e).yAxis);
2041
+ ma(this, Math.pow(o, d), p ? [p.axis] : this.xAxis, u ? [u.axis] : this.yAxis, e.chartX, e.chartY, t) && e.preventDefault?.();
2042
+ }
2043
+ });
2044
+ }
2045
+ /**
2046
+ * @license Highcharts JS v12.5.0 (2026-01-12)
2047
+ * @module highcharts/modules/mouse-wheel-zoom
2048
+ * @requires highcharts
2049
+ *
2050
+ * Mousewheel zoom module
2051
+ *
2052
+ * (c) 2023-2026 Highsoft AS
2053
+ * Author: Askel Eirik Johansson
2054
+ *
2055
+ * A commercial license may be required depending on use.
2056
+ * See www.highcharts.com/license
2057
+ */
2058
+ let Jt = C();
2059
+ Jt.MouseWheelZoom = Jt.MouseWheelZoom || { compose: function(a) {
2060
+ Qi.indexOf(a) === -1 && (Qi.push(a), $i(a, "afterGetContainer", xa));
2061
+ } }, Jt.MouseWheelZoom.compose(Jt.Chart);
2062
+ let G = C();
2063
+ G.Navigator = G.Navigator || jt, G.OrdinalAxis = G.OrdinalAxis || Ao, G.RangeSelector = G.RangeSelector || Wt, G.Scrollbar = G.Scrollbar || ct, G.stockChart = G.stockChart || wi.stockChart, G.StockChart = G.StockChart || G.stockChart, G.extend(G.StockChart, wi), Ss.compose(G.Series, G.Axis, G.Point), Tt.compose(G.Renderer), bt.compose(G.Series), G.Navigator.compose(G.Chart, G.Axis, G.Series), G.OrdinalAxis.compose(G.Axis, G.Series, G.Chart), G.RangeSelector.compose(G.Axis, G.Chart), G.Scrollbar.compose(G.Axis), G.StockChart.compose(G.Chart, G.Axis, G.Series, G.SVGRenderer);
2064
+ let ba = C();
2065
+ return He.default;
2066
+ })());
2067
+ }(te)), te.exports;
2068
+ }
2069
+ var ss = Aa();
2070
+ const ka = /* @__PURE__ */ va(ss), Ba = /* @__PURE__ */ ya({
2071
+ __proto__: null,
2072
+ default: ka
2073
+ }, [ss]);
2074
+ export {
2075
+ Ba as s
2076
+ };