@mobileaction/action-kit 1.59.0-beta.20260824072801 → 1.59.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.
- package/dist/action-kit.mjs +1 -1
- package/dist/annotations-BotVbqYk.js +1275 -0
- package/dist/components/badge/stories/basic.stories.d.ts +2 -2
- package/dist/components/badge/stories/blue.stories.d.ts +2 -2
- package/dist/components/badge/stories/dark.stories.d.ts +2 -2
- package/dist/components/badge/stories/green.stories.d.ts +2 -2
- package/dist/components/badge/stories/orange.stories.d.ts +2 -2
- package/dist/components/badge/stories/pink.stories.d.ts +2 -2
- package/dist/components/badge/stories/purple.stories.d.ts +2 -2
- package/dist/components/badge/stories/red.stories.d.ts +2 -2
- package/dist/components/badge/stories/teal.stories.d.ts +2 -2
- package/dist/components/badge/stories/yellow.stories.d.ts +2 -2
- package/dist/components/cascader/stories/default.stories.d.ts +16 -16
- package/dist/export-data-BR_-2Q3f.js +332 -0
- package/dist/exporting-DR0s0ify.js +601 -0
- package/dist/funnel-DL7kiG31.js +134 -0
- package/dist/{index-6Py-WZ9e.js → index-CBkR2AwI.js} +2355 -2349
- package/dist/map-CMb83okh.js +1731 -0
- package/dist/offline-exporting-YDP5IlMX.js +192 -0
- package/dist/stock-CBVAQBFc.js +2054 -0
- package/dist/venn-D6eKe_-O.js +453 -0
- package/dist/wordcloud-t7GdM2hM.js +227 -0
- package/package.json +30 -15
- package/dist/annotations-DSkf_ftr.js +0 -1496
- package/dist/export-data-DCTe5P_S.js +0 -404
- package/dist/exporting-DQGEobM-.js +0 -739
- package/dist/funnel-CqFEWYxB.js +0 -201
- package/dist/map-DAB70ark.js +0 -1928
- package/dist/offline-exporting-aCzMDQAJ.js +0 -203
- package/dist/stock-CYJWuEFp.js +0 -2216
- package/dist/venn-Dec0FzLN.js +0 -498
- package/dist/wordcloud-CjsQdxnL.js +0 -268
|
@@ -1,739 +0,0 @@
|
|
|
1
|
-
import { g as Mt } from "./index-6Py-WZ9e.js";
|
|
2
|
-
function jt(U, Y) {
|
|
3
|
-
for (var R = 0; R < Y.length; R++) {
|
|
4
|
-
const A = Y[R];
|
|
5
|
-
if (typeof A != "string" && !Array.isArray(A)) {
|
|
6
|
-
for (const L in A)
|
|
7
|
-
if (L !== "default" && !(L in U)) {
|
|
8
|
-
const M = Object.getOwnPropertyDescriptor(A, L);
|
|
9
|
-
M && Object.defineProperty(U, L, M.get ? M : {
|
|
10
|
-
enumerable: !0,
|
|
11
|
-
get: () => A[L]
|
|
12
|
-
});
|
|
13
|
-
}
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
return Object.freeze(Object.defineProperty(U, Symbol.toStringTag, { value: "Module" }));
|
|
17
|
-
}
|
|
18
|
-
var X = { exports: {} }, Ht = X.exports, gt;
|
|
19
|
-
function It() {
|
|
20
|
-
return gt || (gt = 1, (function(U, Y) {
|
|
21
|
-
/**
|
|
22
|
-
* Highcharts JS v12.6.0 (2026-04-13)
|
|
23
|
-
* @module highcharts/modules/exporting
|
|
24
|
-
* @requires highcharts
|
|
25
|
-
*
|
|
26
|
-
* Exporting module
|
|
27
|
-
*
|
|
28
|
-
* (c) 2010-2026 Highsoft AS
|
|
29
|
-
* Author: Torstein Hønsi
|
|
30
|
-
*
|
|
31
|
-
* A commercial license may be required depending on use.
|
|
32
|
-
* See www.highcharts.com/license
|
|
33
|
-
*/
|
|
34
|
-
(function(R, A) {
|
|
35
|
-
U.exports = A(R._Highcharts, R._Highcharts.AST, R._Highcharts.Chart);
|
|
36
|
-
})("u" < typeof window ? Ht : window, (R, A, L) => (() => {
|
|
37
|
-
var M, Z, yt = { 660: (r) => {
|
|
38
|
-
r.exports = A;
|
|
39
|
-
}, 944: (r) => {
|
|
40
|
-
r.exports = R;
|
|
41
|
-
}, 960: (r) => {
|
|
42
|
-
r.exports = L;
|
|
43
|
-
} }, it = {};
|
|
44
|
-
function b(r) {
|
|
45
|
-
var t = it[r];
|
|
46
|
-
if (t !== void 0) return t.exports;
|
|
47
|
-
var e = it[r] = { exports: {} };
|
|
48
|
-
return yt[r](e, e.exports, b), e.exports;
|
|
49
|
-
}
|
|
50
|
-
b.n = (r) => {
|
|
51
|
-
var t = r && r.__esModule ? () => r.default : () => r;
|
|
52
|
-
return b.d(t, { a: t }), t;
|
|
53
|
-
}, b.d = (r, t) => {
|
|
54
|
-
for (var e in t) b.o(t, e) && !b.o(r, e) && Object.defineProperty(r, e, { enumerable: !0, get: t[e] });
|
|
55
|
-
}, b.o = (r, t) => Object.prototype.hasOwnProperty.call(r, t);
|
|
56
|
-
var ot = {};
|
|
57
|
-
b.d(ot, { default: () => Lt });
|
|
58
|
-
var $ = b(944), S = b.n($), xt = b(660), W = b.n(xt), vt = b(960), wt = b.n(vt), rt = M || (M = {});
|
|
59
|
-
rt.compose = function(r) {
|
|
60
|
-
return r.navigation || (r.navigation = new lt(r)), r;
|
|
61
|
-
};
|
|
62
|
-
class lt {
|
|
63
|
-
constructor(t) {
|
|
64
|
-
this.updates = [], this.chart = t;
|
|
65
|
-
}
|
|
66
|
-
addUpdate(t) {
|
|
67
|
-
this.chart.navigation.updates.push(t);
|
|
68
|
-
}
|
|
69
|
-
update(t, e) {
|
|
70
|
-
this.updates.forEach((n) => {
|
|
71
|
-
n.call(this.chart, t, e);
|
|
72
|
-
});
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
rt.Additions = lt;
|
|
76
|
-
let bt = M, { isSafari: St, win: E, win: { document: B } } = S(), at = E.URL || E.webkitURL || E;
|
|
77
|
-
function Q(r, t) {
|
|
78
|
-
let e = E.navigator, n = B.createElement("a");
|
|
79
|
-
if (typeof r != "string" && !(r instanceof String) && e.msSaveOrOpenBlob) return void e.msSaveOrOpenBlob(r, t);
|
|
80
|
-
if (r = "" + r, e.userAgent.length > 1e3) throw Error("Input too long");
|
|
81
|
-
let i = /Edge\/\d+/.test(e.userAgent);
|
|
82
|
-
if ((St && typeof r == "string" && r.indexOf("data:application/pdf") === 0 || i || r.length > 2e6) && !(r = (function(l) {
|
|
83
|
-
let o = l.replace(/filename=.*;/, "").match(/data:([^;]*)(;base64)?,([A-Z+\d\/]+)/i);
|
|
84
|
-
if (o && o.length > 3 && E.atob && E.ArrayBuffer && E.Uint8Array && E.Blob && at.createObjectURL) {
|
|
85
|
-
let s = E.atob(o[3]), a = new E.ArrayBuffer(s.length), c = new E.Uint8Array(a);
|
|
86
|
-
for (let p = 0; p < c.length; ++p) c[p] = s.charCodeAt(p);
|
|
87
|
-
return at.createObjectURL(new E.Blob([c], { type: o[1] }));
|
|
88
|
-
}
|
|
89
|
-
})(r) || "")) throw Error("Failed to convert to blob");
|
|
90
|
-
if (n.download !== void 0) n.href = r, n.download = t, B.body.appendChild(n), n.click(), B.body.removeChild(n);
|
|
91
|
-
else try {
|
|
92
|
-
if (!E.open(r, "chart")) throw Error("Failed to open window");
|
|
93
|
-
} catch {
|
|
94
|
-
E.location.href = r;
|
|
95
|
-
}
|
|
96
|
-
}
|
|
97
|
-
let { isTouchDevice: Et } = S(), Ot = { exporting: { allowTableSorting: !0, libURL: "https://code.highcharts.com/12.6.0/lib/", local: !0, type: "image/png", url: `https://export-svg.highcharts.com?v=${S().version}`, pdfFont: { normal: void 0, bold: void 0, bolditalic: void 0, italic: void 0 }, printMaxWidth: 780, scale: 2, buttons: { contextButton: { className: "highcharts-contextbutton", menuClassName: "highcharts-contextmenu", symbol: "menu", titleKey: "contextButtonTitle", menuItems: ["viewFullscreen", "printChart", "separator", "downloadPNG", "downloadJPEG", "downloadSVG"] } }, menuItemDefinitions: { viewFullscreen: { textKey: "viewFullscreen", onclick: function() {
|
|
98
|
-
this.fullscreen?.toggle();
|
|
99
|
-
} }, printChart: { textKey: "printChart", onclick: function() {
|
|
100
|
-
this.exporting?.print();
|
|
101
|
-
} }, separator: { separator: !0 }, downloadPNG: { textKey: "downloadPNG", onclick: async function() {
|
|
102
|
-
await this.exporting?.exportChart();
|
|
103
|
-
} }, downloadJPEG: { textKey: "downloadJPEG", onclick: async function() {
|
|
104
|
-
await this.exporting?.exportChart({ type: "image/jpeg" });
|
|
105
|
-
} }, downloadPDF: { textKey: "downloadPDF", onclick: async function() {
|
|
106
|
-
await this.exporting?.exportChart({ type: "application/pdf" });
|
|
107
|
-
} }, downloadSVG: { textKey: "downloadSVG", onclick: async function() {
|
|
108
|
-
await this.exporting?.exportChart({ type: "image/svg+xml" });
|
|
109
|
-
} } } }, lang: { viewFullscreen: "View in full screen", exitFullscreen: "Exit from full screen", printChart: "Print chart", downloadPNG: "Download PNG image", downloadJPEG: "Download JPEG image", downloadPDF: "Download PDF document", downloadSVG: "Download SVG vector image", contextButtonTitle: "Chart context menu" }, navigation: { buttonOptions: { symbolSize: 14, symbolX: 14.5, symbolY: 13.5, align: "right", buttonSpacing: 5, height: 28, y: -5, verticalAlign: "top", width: 28, symbolFill: "#666666", symbolStroke: "#666666", symbolStrokeWidth: 3, theme: { fill: "#ffffff", padding: 5, stroke: "none", "stroke-linecap": "round" } }, menuStyle: { border: "none", borderRadius: "3px", background: "#ffffff", padding: "0.5em" }, menuItemStyle: { background: "none", borderRadius: "3px", color: "#333333", padding: "0.5em", fontSize: Et ? "0.9em" : "0.8em", transition: "background 250ms, color 250ms" }, menuItemHoverStyle: { background: "#f2f2f2" } } };
|
|
110
|
-
(function(r) {
|
|
111
|
-
let t = [];
|
|
112
|
-
function e(i, l, o, s) {
|
|
113
|
-
return [["M", i, l + 2.5], ["L", i + o, l + 2.5], ["M", i, l + s / 2 + 0.5], ["L", i + o, l + s / 2 + 0.5], ["M", i, l + s - 1.5], ["L", i + o, l + s - 1.5]];
|
|
114
|
-
}
|
|
115
|
-
function n(i, l, o, s) {
|
|
116
|
-
let a = s / 3 - 2;
|
|
117
|
-
return [].concat(this.circle(o - a, l, a, a), this.circle(o - a, l + a + 4, a, a), this.circle(o - a, l + 2 * (a + 4), a, a));
|
|
118
|
-
}
|
|
119
|
-
r.compose = function(i) {
|
|
120
|
-
if (t.indexOf(i) === -1) {
|
|
121
|
-
t.push(i);
|
|
122
|
-
let l = i.prototype.symbols;
|
|
123
|
-
l.menu = e, l.menuball = n.bind(l);
|
|
124
|
-
}
|
|
125
|
-
};
|
|
126
|
-
})(Z || (Z = {}));
|
|
127
|
-
let Ct = Z, { doc: _, win: $t } = S();
|
|
128
|
-
function C(r, t, e, n = {}) {
|
|
129
|
-
let i = typeof r == "function" && r.prototype || r;
|
|
130
|
-
Object.hasOwnProperty.call(i, "hcEvents") || (i.hcEvents = {});
|
|
131
|
-
let l = i.hcEvents;
|
|
132
|
-
S().Point && r instanceof S().Point && r.series && r.series.chart && (r.series.chart.runTrackerClick = !0);
|
|
133
|
-
let o = r.addEventListener;
|
|
134
|
-
o && o.call(r, t, e, !!S().supportsPassiveEvents && { passive: n.passive === void 0 ? t.indexOf("touch") !== -1 : n.passive, capture: !1 }), l[t] || (l[t] = []);
|
|
135
|
-
let s = { fn: e, order: typeof n.order == "number" ? n.order : 1 / 0 };
|
|
136
|
-
return l[t].push(s), l[t].sort((a, c) => a.order - c.order), function() {
|
|
137
|
-
ht(r, t, e);
|
|
138
|
-
};
|
|
139
|
-
}
|
|
140
|
-
function H(r, t, e, n, i) {
|
|
141
|
-
let l = _.createElement(r);
|
|
142
|
-
return t && P(l, t), e && T(l, e), n && n.appendChild(l), l;
|
|
143
|
-
}
|
|
144
|
-
function T(r, t) {
|
|
145
|
-
P(r.style, t);
|
|
146
|
-
}
|
|
147
|
-
function tt(r) {
|
|
148
|
-
r?.parentElement?.removeChild(r);
|
|
149
|
-
}
|
|
150
|
-
function P(r, t) {
|
|
151
|
-
let e;
|
|
152
|
-
for (e in r || (r = {}), t) r[e] = t[e];
|
|
153
|
-
return r;
|
|
154
|
-
}
|
|
155
|
-
function D(r, t, e, n) {
|
|
156
|
-
if (e = e || {}, _?.createEvent && (r.dispatchEvent || r.fireEvent && r !== S())) {
|
|
157
|
-
let i = _.createEvent("Events");
|
|
158
|
-
i.initEvent(t, !0, !0), e = P(i, e), r.dispatchEvent ? r.dispatchEvent(e) : r.fireEvent(t, e);
|
|
159
|
-
} else if (r.hcEvents) {
|
|
160
|
-
e.target || P(e, { preventDefault: function() {
|
|
161
|
-
e.defaultPrevented = !0;
|
|
162
|
-
}, target: r, type: t });
|
|
163
|
-
let i = [], l = r, o = !1;
|
|
164
|
-
for (; l.hcEvents; ) Object.hasOwnProperty.call(l, "hcEvents") && l.hcEvents[t] && (i.length && (o = !0), i.unshift.apply(i, l.hcEvents[t])), l = Object.getPrototypeOf(l);
|
|
165
|
-
o && i.sort((s, a) => s.order - a.order), i.forEach((s) => {
|
|
166
|
-
s.fn.call(r, e, r) === !1 && e.preventDefault();
|
|
167
|
-
});
|
|
168
|
-
}
|
|
169
|
-
n && !e.defaultPrevented && n.call(r, e);
|
|
170
|
-
}
|
|
171
|
-
let Tt = Array.prototype.find ? function(r, t) {
|
|
172
|
-
return r.find(t);
|
|
173
|
-
} : function(r, t) {
|
|
174
|
-
let e, n = r.length;
|
|
175
|
-
for (e = 0; e < n; e++) if (t(r[e], e)) return r[e];
|
|
176
|
-
};
|
|
177
|
-
function et(r) {
|
|
178
|
-
r != null && clearTimeout(r);
|
|
179
|
-
}
|
|
180
|
-
function st(r) {
|
|
181
|
-
return z(r) && typeof r.nodeType == "number";
|
|
182
|
-
}
|
|
183
|
-
function ct(r) {
|
|
184
|
-
let t = Object.prototype.toString.call(r);
|
|
185
|
-
return t === "[object Array]" || t === "[object Array Iterator]";
|
|
186
|
-
}
|
|
187
|
-
function z(r, t) {
|
|
188
|
-
return !!r && typeof r == "object" && (!t || !ct(r));
|
|
189
|
-
}
|
|
190
|
-
function F(r, ...t) {
|
|
191
|
-
let e, n = [r, ...t], i = {}, l = function(s, a) {
|
|
192
|
-
return typeof s != "object" && (s = {}), G(a, function(c, p) {
|
|
193
|
-
if (p !== "__proto__" && p !== "constructor") {
|
|
194
|
-
let f;
|
|
195
|
-
!z(c, !0) || (f = c?.constructor, z(c, !0) && !st(c) && f?.name && f.name !== "Object") || st(c) ? s[p] = a[p] : s[p] = l(s[p] || {}, c);
|
|
196
|
-
}
|
|
197
|
-
}), s;
|
|
198
|
-
};
|
|
199
|
-
r === !0 && (i = n[1], n = Array.prototype.slice.call(n, 2));
|
|
200
|
-
let o = n.length;
|
|
201
|
-
for (e = 0; e < o; e++) i = l(i, n[e]);
|
|
202
|
-
return i;
|
|
203
|
-
}
|
|
204
|
-
function G(r, t, e) {
|
|
205
|
-
for (let n in r) Object.hasOwnProperty.call(r, n) && t.call(r[n], r[n], n, r);
|
|
206
|
-
}
|
|
207
|
-
function V() {
|
|
208
|
-
let r = arguments, t = r.length;
|
|
209
|
-
for (let e = 0; e < t; e++) {
|
|
210
|
-
let n = r[e];
|
|
211
|
-
if (n != null) return n;
|
|
212
|
-
}
|
|
213
|
-
}
|
|
214
|
-
function pt(r, t) {
|
|
215
|
-
return 0 > r.indexOf(t) && !!r.push(t);
|
|
216
|
-
}
|
|
217
|
-
function ht(r, t, e) {
|
|
218
|
-
function n(o, s) {
|
|
219
|
-
let a = r.removeEventListener;
|
|
220
|
-
a && a.call(r, o, s, !1);
|
|
221
|
-
}
|
|
222
|
-
function i(o) {
|
|
223
|
-
let s, a;
|
|
224
|
-
r.nodeName && (t ? (s = {})[t] = !0 : s = o, G(s, function(c, p) {
|
|
225
|
-
if (o[p]) for (a = o[p].length; a--; ) n(p, o[p][a].fn);
|
|
226
|
-
}));
|
|
227
|
-
}
|
|
228
|
-
let l = typeof r == "function" && r.prototype || r;
|
|
229
|
-
if (Object.hasOwnProperty.call(l, "hcEvents")) {
|
|
230
|
-
let o = l.hcEvents;
|
|
231
|
-
if (t) {
|
|
232
|
-
let s = o[t] || [];
|
|
233
|
-
e ? (o[t] = s.filter(function(a) {
|
|
234
|
-
return e !== a.fn;
|
|
235
|
-
}), n(t, e)) : (i(o), o[t] = []);
|
|
236
|
-
} else i(o), delete l.hcEvents;
|
|
237
|
-
}
|
|
238
|
-
}
|
|
239
|
-
let { composed: kt } = S();
|
|
240
|
-
function Pt() {
|
|
241
|
-
this.fullscreen = new ut(this);
|
|
242
|
-
}
|
|
243
|
-
class ut {
|
|
244
|
-
static compose(t) {
|
|
245
|
-
pt(kt, "Fullscreen") && C(t, "beforeRender", Pt);
|
|
246
|
-
}
|
|
247
|
-
constructor(t) {
|
|
248
|
-
this.chart = t, this.isOpen = !1;
|
|
249
|
-
const e = t.renderTo;
|
|
250
|
-
!this.browserProps && (typeof e.requestFullscreen == "function" ? this.browserProps = { fullscreenChange: "fullscreenchange", requestFullscreen: "requestFullscreen", exitFullscreen: "exitFullscreen" } : e.mozRequestFullScreen ? this.browserProps = { fullscreenChange: "mozfullscreenchange", requestFullscreen: "mozRequestFullScreen", exitFullscreen: "mozCancelFullScreen" } : e.webkitRequestFullScreen ? this.browserProps = { fullscreenChange: "webkitfullscreenchange", requestFullscreen: "webkitRequestFullScreen", exitFullscreen: "webkitExitFullscreen" } : e.msRequestFullscreen && (this.browserProps = { fullscreenChange: "MSFullscreenChange", requestFullscreen: "msRequestFullscreen", exitFullscreen: "msExitFullscreen" }));
|
|
251
|
-
}
|
|
252
|
-
close() {
|
|
253
|
-
let t = this, e = t.chart, n = e.options.chart;
|
|
254
|
-
D(e, "fullscreenClose", void 0, function() {
|
|
255
|
-
t.isOpen && t.browserProps && e.container.ownerDocument instanceof Document && e.container.ownerDocument[t.browserProps.exitFullscreen](), t.unbindFullscreenEvent && (t.unbindFullscreenEvent = t.unbindFullscreenEvent()), e.setSize(t.origWidth, t.origHeight, !1), t.origWidth = void 0, t.origHeight = void 0, n.width = t.origWidthOption, n.height = t.origHeightOption, t.origWidthOption = void 0, t.origHeightOption = void 0, t.isOpen = !1, t.setButtonText();
|
|
256
|
-
});
|
|
257
|
-
}
|
|
258
|
-
open() {
|
|
259
|
-
let t = this, e = t.chart, n = e.options.chart;
|
|
260
|
-
D(e, "fullscreenOpen", void 0, function() {
|
|
261
|
-
if (n && (t.origWidthOption = n.width, t.origHeightOption = n.height), t.origWidth = e.chartWidth, t.origHeight = e.chartHeight, t.browserProps) {
|
|
262
|
-
let i = C(e.container.ownerDocument, t.browserProps.fullscreenChange, function() {
|
|
263
|
-
t.isOpen ? (t.isOpen = !1, t.close()) : (e.setSize(null, null, !1), t.isOpen = !0, t.setButtonText());
|
|
264
|
-
}), l = C(e, "destroy", i);
|
|
265
|
-
t.unbindFullscreenEvent = () => {
|
|
266
|
-
i(), l();
|
|
267
|
-
};
|
|
268
|
-
let o = e.renderTo[t.browserProps.requestFullscreen]();
|
|
269
|
-
o && o.catch(function() {
|
|
270
|
-
alert("Full screen is not supported inside a frame.");
|
|
271
|
-
});
|
|
272
|
-
}
|
|
273
|
-
});
|
|
274
|
-
}
|
|
275
|
-
setButtonText() {
|
|
276
|
-
let t = this.chart, e = t.exporting?.divElements, n = t.options.exporting, i = n && n.buttons && n.buttons.contextButton.menuItems, l = t.options.lang;
|
|
277
|
-
if (n?.menuItemDefinitions && l?.exitFullscreen && l.viewFullscreen && i && e) {
|
|
278
|
-
let o = e[i.indexOf("viewFullscreen")];
|
|
279
|
-
o && W().setElementHTML(o, this.isOpen ? l.exitFullscreen : n.menuItemDefinitions.viewFullscreen?.textKey || l.viewFullscreen);
|
|
280
|
-
}
|
|
281
|
-
}
|
|
282
|
-
toggle() {
|
|
283
|
-
this.isOpen ? this.close() : this.open();
|
|
284
|
-
}
|
|
285
|
-
}
|
|
286
|
-
let { win: dt } = S(), K = { ajax: function(r) {
|
|
287
|
-
let t = { json: "application/json", xml: "application/xml", text: "text/plain", octet: "application/octet-stream" }, e = new XMLHttpRequest();
|
|
288
|
-
function n(i, l) {
|
|
289
|
-
r.error && r.error(i, l);
|
|
290
|
-
}
|
|
291
|
-
if (!r.url) return !1;
|
|
292
|
-
e.open((r.type || "get").toUpperCase(), r.url, !0), r.headers?.["Content-Type"] || e.setRequestHeader("Content-Type", t[r.dataType || "json"] || t.text), G(r.headers, function(i, l) {
|
|
293
|
-
e.setRequestHeader(l, i);
|
|
294
|
-
}), r.responseType && (e.responseType = r.responseType), e.onreadystatechange = function() {
|
|
295
|
-
let i;
|
|
296
|
-
if (e.readyState === 4) {
|
|
297
|
-
if (e.status === 200) {
|
|
298
|
-
if (r.responseType !== "blob" && (i = e.responseText, r.dataType === "json")) try {
|
|
299
|
-
i = JSON.parse(i);
|
|
300
|
-
} catch (l) {
|
|
301
|
-
if (l instanceof Error) return n(e, l);
|
|
302
|
-
}
|
|
303
|
-
return r.success?.(i, e);
|
|
304
|
-
}
|
|
305
|
-
n(e, e.responseText);
|
|
306
|
-
}
|
|
307
|
-
}, r.data && typeof r.data != "string" && (r.data = JSON.stringify(r.data)), e.send(r.data);
|
|
308
|
-
}, getJSON: function(r, t) {
|
|
309
|
-
K.ajax({ url: r, success: t, dataType: "json", headers: { "Content-Type": "text/plain" } });
|
|
310
|
-
} };
|
|
311
|
-
K.post = async function(r, t, e) {
|
|
312
|
-
let n = new dt.FormData();
|
|
313
|
-
G(t, function(l, o) {
|
|
314
|
-
n.append(o, l);
|
|
315
|
-
}), n.append("b64", "true");
|
|
316
|
-
let i = await dt.fetch(r, { method: "POST", body: n, ...e });
|
|
317
|
-
if (i.ok) {
|
|
318
|
-
let l = await i.text(), o = document.createElement("a");
|
|
319
|
-
o.href = `data:${t.type};base64,${l}`, o.download = t.filename, o.click(), tt(o);
|
|
320
|
-
}
|
|
321
|
-
};
|
|
322
|
-
let { defaultOptions: Ft, setOptions: Nt } = S(), { composed: Rt, doc: j, isFirefox: At, isMS: q, isSafari: J, SVG_NS: Dt, win: v } = S();
|
|
323
|
-
W().allowedAttributes.push("data-z-index", "fill-opacity", "filter", "preserveAspectRatio", "rx", "ry", "stroke-dasharray", "stroke-linejoin", "stroke-opacity", "text-anchor", "transform", "transform-origin", "version", "viewBox", "visibility", "xmlns", "xmlns:xlink"), W().allowedTags.push("desc", "clippath", "fedropshadow", "femorphology", "g", "image");
|
|
324
|
-
let ft = v.URL || v.webkitURL || v;
|
|
325
|
-
class u {
|
|
326
|
-
constructor(t, e) {
|
|
327
|
-
this.options = {}, this.chart = t, this.options = e, this.btnCount = 0, this.buttonOffset = 0, this.divElements = [], this.svgElements = [];
|
|
328
|
-
}
|
|
329
|
-
static hyphenate(t) {
|
|
330
|
-
return t.replace(/[A-Z]/g, function(e) {
|
|
331
|
-
return "-" + e.toLowerCase();
|
|
332
|
-
});
|
|
333
|
-
}
|
|
334
|
-
static async imageToDataURL(t, e, n) {
|
|
335
|
-
let i = await u.loadImage(t), l = j.createElement("canvas"), o = l?.getContext("2d");
|
|
336
|
-
if (o) return l.height = i.height * e, l.width = i.width * e, o.drawImage(i, 0, 0, l.width, l.height), l.toDataURL(n);
|
|
337
|
-
throw Error("No canvas found!");
|
|
338
|
-
}
|
|
339
|
-
static async fetchCSS(t) {
|
|
340
|
-
try {
|
|
341
|
-
let e = await fetch(t), n = await e.text(), i = new CSSStyleSheet();
|
|
342
|
-
return i.replaceSync(n), i;
|
|
343
|
-
} catch {
|
|
344
|
-
(0, $.error)(`Warning: Failed to fetch CSS from ${t}`, !1);
|
|
345
|
-
}
|
|
346
|
-
}
|
|
347
|
-
static async handleStyleSheet(t, e) {
|
|
348
|
-
try {
|
|
349
|
-
for (let n of Array.from(t.cssRules)) {
|
|
350
|
-
if (n instanceof CSSImportRule) {
|
|
351
|
-
let i = await u.fetchCSS(n.href);
|
|
352
|
-
i && await u.handleStyleSheet(i, e);
|
|
353
|
-
}
|
|
354
|
-
if (n instanceof CSSFontFaceRule) {
|
|
355
|
-
let i = n.cssText;
|
|
356
|
-
if (t.href) {
|
|
357
|
-
let l = t.href, o = /url\(\s*(['"]?)(?![a-z]+:|\/\/)([^'")]+?)\1\s*\)/gi;
|
|
358
|
-
i = i.replace(o, (s, a, c) => {
|
|
359
|
-
let p = new URL(c, l).href;
|
|
360
|
-
return `url(${a}${p}${a})`;
|
|
361
|
-
});
|
|
362
|
-
}
|
|
363
|
-
e.push(i);
|
|
364
|
-
}
|
|
365
|
-
}
|
|
366
|
-
} catch {
|
|
367
|
-
if (t.href) {
|
|
368
|
-
let n = await u.fetchCSS(t.href);
|
|
369
|
-
n && await u.handleStyleSheet(n, e);
|
|
370
|
-
}
|
|
371
|
-
}
|
|
372
|
-
}
|
|
373
|
-
static async fetchStyleSheets() {
|
|
374
|
-
let t = [];
|
|
375
|
-
for (let e of Array.from(j.styleSheets)) await u.handleStyleSheet(e, t);
|
|
376
|
-
return t;
|
|
377
|
-
}
|
|
378
|
-
static async inlineFonts(t) {
|
|
379
|
-
let e = await u.fetchStyleSheets(), n = /url\(([^)]+)\)/g, i = [], l = e.join(`
|
|
380
|
-
`), o;
|
|
381
|
-
for (; o = n.exec(l); ) {
|
|
382
|
-
let p = o[1].replace(/['"]/g, "");
|
|
383
|
-
i.includes(p) || i.push(p);
|
|
384
|
-
}
|
|
385
|
-
let s = (p) => {
|
|
386
|
-
let f = "", h = new Uint8Array(p);
|
|
387
|
-
for (let y = 0; y < h.byteLength; y++) f += String.fromCharCode(h[y]);
|
|
388
|
-
return btoa(f);
|
|
389
|
-
}, a = {};
|
|
390
|
-
for (let p of i) try {
|
|
391
|
-
let f = await fetch(p), h = f.headers.get("Content-Type") || "", y = s(await f.arrayBuffer());
|
|
392
|
-
a[p] = `data:${h};base64,${y}`;
|
|
393
|
-
} catch {
|
|
394
|
-
}
|
|
395
|
-
l = l.replace(n, (p, f) => {
|
|
396
|
-
let h = f.replace(/['"]/g, "");
|
|
397
|
-
return `url(${a[h] || h})`;
|
|
398
|
-
});
|
|
399
|
-
let c = document.createElementNS("http://www.w3.org/2000/svg", "style");
|
|
400
|
-
return c.textContent = l, t.append(c), t;
|
|
401
|
-
}
|
|
402
|
-
static loadImage(t) {
|
|
403
|
-
return new Promise((e, n) => {
|
|
404
|
-
let i = new v.Image();
|
|
405
|
-
i.crossOrigin = "Anonymous", i.onload = () => {
|
|
406
|
-
setTimeout(() => {
|
|
407
|
-
e(i);
|
|
408
|
-
}, u.loadEventDeferDelay);
|
|
409
|
-
}, i.onerror = (l) => {
|
|
410
|
-
n(l);
|
|
411
|
-
}, i.src = t;
|
|
412
|
-
});
|
|
413
|
-
}
|
|
414
|
-
static prepareImageOptions(t) {
|
|
415
|
-
let e = t?.type || "image/png", n = t?.libURL || Ft.exporting?.libURL;
|
|
416
|
-
return { type: e, filename: (t?.filename || "chart") + "." + (e === "image/svg+xml" ? "svg" : e.split("/")[1]), scale: t?.scale || 1, libURL: n?.slice(-1) !== "/" ? n + "/" : n };
|
|
417
|
-
}
|
|
418
|
-
static sanitizeSVG(t, e) {
|
|
419
|
-
let n = t.indexOf("</svg>") + 6, i = t.indexOf("<foreignObject") > -1, l = t.substr(n);
|
|
420
|
-
return t = t.substr(0, n), i ? t = t.replace(/(<(?:img|br).*?(?=\>))>/g, "$1 />").replace(/(<svg(?![^>]*xmlns=)[^>]*)>/g, '$1 xmlns="http://www.w3.org/2000/svg">') : l && e?.exporting?.allowHTML && (l = '<foreignObject x="0" y="0" width="' + e.chart.width + '" height="' + e.chart.height + '"><body xmlns="http://www.w3.org/1999/xhtml">' + l.replace(/(<(?:img|br).*?(?=\>))>/g, "$1 />").replace(/(<svg(?![^>]*xmlns=)[^>]*)>/g, '$1 xmlns="http://www.w3.org/2000/svg">') + "</body></foreignObject>", t = t.replace("</svg>", l + "</svg>")), t = t.replace(/zIndex="[^"]+"/g, "").replace(/symbolName="[^"]+"/g, "").replace(/jQuery\d+="[^"]+"/g, "").replace(/url\(("|")(.*?)("|")\;?\)/g, "url($2)").replace(/url\([^#]+#/g, "url(#").replace(/<svg /, '<svg xmlns:xlink="http://www.w3.org/1999/xlink" ').replace(/ (NS\d+\:)?href=/g, " xlink:href=").replace(/(<image[^>]*) xlink:href=/g, "$1 href=").replace(/\n+/g, " ").replace(/ /g, " ").replace(/­/g, "");
|
|
421
|
-
}
|
|
422
|
-
static svgToDataURL(t) {
|
|
423
|
-
let e = v.navigator.userAgent, n = e.indexOf("WebKit") > -1 && 0 > e.indexOf("Chrome");
|
|
424
|
-
try {
|
|
425
|
-
if (!n && t.indexOf("<foreignObject") === -1) return ft.createObjectURL(new v.Blob([t], { type: "image/svg+xml;charset-utf-16" }));
|
|
426
|
-
} catch {
|
|
427
|
-
}
|
|
428
|
-
return "data:image/svg+xml;charset=UTF-8," + encodeURIComponent(t);
|
|
429
|
-
}
|
|
430
|
-
addButton(t) {
|
|
431
|
-
let e, n = this, i = n.chart, l = i.renderer, o = F(i.options.navigation?.buttonOptions, t), s = o.onclick, a = o.menuItems, c = o.symbolSize || 12;
|
|
432
|
-
if (o.enabled === !1 || !o.theme) return;
|
|
433
|
-
let p = i.styledMode ? {} : o.theme, f = () => {
|
|
434
|
-
};
|
|
435
|
-
s ? f = function(y) {
|
|
436
|
-
y && y.stopPropagation(), s.call(i, y, i);
|
|
437
|
-
} : a && (f = function(y) {
|
|
438
|
-
y && y.stopPropagation(), n.contextMenu(h.menuClassName, a, h.translateX || 0, h.translateY || 0, h.width || 0, h.height || 0, h), h.setState(2);
|
|
439
|
-
}), o.text && o.symbol ? p.paddingLeft = V(p.paddingLeft, 30) : o.text || P(p, { width: o.width, height: o.height, padding: 0 });
|
|
440
|
-
let h = l.button(o.text || "", 0, 0, f, p, void 0, void 0, void 0, void 0, o.useHTML).addClass(t.className || "").attr({ title: V(i.options.lang[o._titleKey || o.titleKey], "") });
|
|
441
|
-
h.menuClassName = t.menuClassName || "highcharts-menu-" + n.btnCount++, o.symbol && (e = l.symbol(o.symbol, Math.round((o.symbolX || 0) - c / 2), Math.round((o.symbolY || 0) - c / 2), c, c, { width: c, height: c }).addClass("highcharts-button-symbol").attr({ zIndex: 1 }).add(h), i.styledMode || e.attr({ stroke: o.symbolStroke, fill: o.symbolFill, "stroke-width": o.symbolStrokeWidth || 1 })), h.add(n.group).align(P(o, { width: h.width, x: V(o.x, n.buttonOffset) }), !0, "spacingBox"), n.buttonOffset += ((h.width || 0) + (o.buttonSpacing || 0)) * (o.align === "right" ? -1 : 1), n.svgElements.push(h, e);
|
|
442
|
-
}
|
|
443
|
-
afterPrint() {
|
|
444
|
-
let t = this.chart;
|
|
445
|
-
if (!this.printReverseInfo) return;
|
|
446
|
-
let { childNodes: e, origDisplay: n, resetParams: i } = this.printReverseInfo;
|
|
447
|
-
this.moveContainers(t.renderTo), [].forEach.call(e, function(l, o) {
|
|
448
|
-
l.nodeType === 1 && (l.style.display = n[o] || "");
|
|
449
|
-
}), this.isPrinting = !1, i && t.setSize.apply(t, i), delete this.printReverseInfo, u.printingChart = void 0, D(t, "afterPrint");
|
|
450
|
-
}
|
|
451
|
-
beforePrint() {
|
|
452
|
-
let t = this.chart, e = j.body, n = this.options.printMaxWidth, i = { childNodes: e.childNodes, origDisplay: [], resetParams: void 0 };
|
|
453
|
-
this.isPrinting = !0, t.pointer?.reset(void 0, 0), D(t, "beforePrint"), n && t.chartWidth > n && (i.resetParams = [t.options.chart.width, void 0, !1], t.setSize(n, void 0, !1)), [].forEach.call(i.childNodes, function(l, o) {
|
|
454
|
-
l.nodeType === 1 && (i.origDisplay[o] = l.style.display, l.style.display = "none");
|
|
455
|
-
}), this.moveContainers(e), this.printReverseInfo = i;
|
|
456
|
-
}
|
|
457
|
-
contextMenu(t, e, n, i, l, o, s) {
|
|
458
|
-
let a = this, c = a.chart, p = c.options.navigation, f = c.chartWidth, h = c.chartHeight, y = "cache-" + t, d = Math.max(l, o), w, g = c[y];
|
|
459
|
-
g || (a.contextMenuEl = c[y] = g = H("div", { className: t }, { position: "absolute", zIndex: 1e3, padding: d + "px", pointerEvents: "auto", ...c.renderer.style }, c.scrollablePlotArea?.fixedDiv || c.container), w = H("ul", { className: "highcharts-menu" }, c.styledMode ? {} : { listStyle: "none", margin: 0, padding: 0 }, g), c.styledMode || T(w, P({ MozBoxShadow: "3px 3px 10px #0008", WebkitBoxShadow: "3px 3px 10px #0008", boxShadow: "3px 3px 10px #0008" }, p?.menuStyle || {})), g.hideMenu = function() {
|
|
460
|
-
T(g, { display: "none" }), s && s.setState(0), c.exporting && (c.exporting.openMenu = !1), T(c.renderTo, { overflow: "hidden" }), T(c.container, { overflow: "hidden" }), et(g.hideTimer), D(c, "exportMenuHidden");
|
|
461
|
-
}, a.events?.push(C(g, "mouseleave", function() {
|
|
462
|
-
g.hideTimer = v.setTimeout(g.hideMenu, 500);
|
|
463
|
-
}), C(g, "mouseenter", function() {
|
|
464
|
-
et(g.hideTimer);
|
|
465
|
-
}), C(j, "mouseup", function(m) {
|
|
466
|
-
c.pointer?.inClass(m.target, t) || g.hideMenu();
|
|
467
|
-
}), C(g, "click", function() {
|
|
468
|
-
c.exporting?.openMenu && g.hideMenu();
|
|
469
|
-
})), e.forEach(function(m) {
|
|
470
|
-
if (typeof m == "string" && a.options.menuItemDefinitions?.[m] && (m = a.options.menuItemDefinitions[m]), z(m, !0)) {
|
|
471
|
-
let O;
|
|
472
|
-
m.separator ? O = H("hr", void 0, void 0, w) : (m.textKey === "viewData" && a.isDataTableVisible && (m.textKey = "hideData"), O = H("li", { className: "highcharts-menu-item", onclick: function(k) {
|
|
473
|
-
k && k.stopPropagation(), g.hideMenu(), typeof m != "string" && m.onclick && m.onclick.apply(c, arguments);
|
|
474
|
-
} }, void 0, w), W().setElementHTML(O, m.text || c.options.lang[m.textKey]), c.styledMode || (O.onmouseover = function() {
|
|
475
|
-
T(this, p?.menuItemHoverStyle || {});
|
|
476
|
-
}, O.onmouseout = function() {
|
|
477
|
-
T(this, p?.menuItemStyle || {});
|
|
478
|
-
}, T(O, P({ cursor: "pointer" }, p?.menuItemStyle || {})))), a.divElements.push(O);
|
|
479
|
-
}
|
|
480
|
-
}), a.divElements.push(w, g), a.menuHeight = g.offsetHeight, a.menuWidth = g.offsetWidth);
|
|
481
|
-
let x = { display: "block" };
|
|
482
|
-
n + (a.menuWidth || 0) > f ? x.right = f - n - l - d + "px" : x.left = n - d + "px", i + o + (a.menuHeight || 0) > h && s.alignOptions?.verticalAlign !== "top" ? x.bottom = h - i - d + "px" : x.top = i + o - d + "px", T(g, x), T(c.renderTo, { overflow: "" }), T(c.container, { overflow: "" }), c.exporting && (c.exporting.openMenu = !0), D(c, "exportMenuShown");
|
|
483
|
-
}
|
|
484
|
-
destroy(t) {
|
|
485
|
-
let e, n = t ? t.target : this.chart, { divElements: i, events: l, svgElements: o } = this;
|
|
486
|
-
o.forEach((s, a) => {
|
|
487
|
-
s && (s.onclick = s.ontouchstart = null, n[e = "cache-" + s.menuClassName] && delete n[e], o[a] = s.destroy());
|
|
488
|
-
}), o.length = 0, this.group && (this.group.destroy(), delete this.group), i.forEach(function(s, a) {
|
|
489
|
-
s && (et(s.hideTimer), ht(s, "mouseleave"), i[a] = s.onmouseout = s.onmouseover = s.ontouchstart = s.onclick = null, tt(s));
|
|
490
|
-
}), i.length = 0, l && (l.forEach(function(s) {
|
|
491
|
-
s();
|
|
492
|
-
}), l.length = 0);
|
|
493
|
-
}
|
|
494
|
-
async downloadSVG(t, e) {
|
|
495
|
-
let n, i = { svg: t, exportingOptions: e, exporting: this };
|
|
496
|
-
if (D(u.prototype, "downloadSVG", i), i.defaultPrevented) return;
|
|
497
|
-
let { type: l, filename: o, scale: s, libURL: a } = u.prepareImageOptions(e);
|
|
498
|
-
if (l === "application/pdf") throw Error("Offline exporting logic for PDF type is not found.");
|
|
499
|
-
if (l === "image/svg+xml") {
|
|
500
|
-
if (v.MSBlobBuilder !== void 0) {
|
|
501
|
-
let p = new v.MSBlobBuilder();
|
|
502
|
-
p.append(t), n = p.getBlob("image/svg+xml");
|
|
503
|
-
} else n = u.svgToDataURL(t);
|
|
504
|
-
Q(n, o);
|
|
505
|
-
} else {
|
|
506
|
-
n = u.svgToDataURL(t);
|
|
507
|
-
try {
|
|
508
|
-
u.objectURLRevoke = !0;
|
|
509
|
-
let p = await u.imageToDataURL(n, s, l);
|
|
510
|
-
Q(p, o);
|
|
511
|
-
} catch (p) {
|
|
512
|
-
if (p.message === "No canvas found!") throw p;
|
|
513
|
-
if (t.length > 1e8) throw Error("Input too long");
|
|
514
|
-
let f = j.createElement("canvas"), h = f.getContext("2d"), y = t.match(/^<svg[^>]*\s{,1000}width\s{,1000}=\s{,1000}\"?(\d+)\"?[^>]*>/), d = t.match(/^<svg[^>]*\s{0,1000}height\s{,1000}=\s{,1000}\"?(\d+)\"?[^>]*>/);
|
|
515
|
-
if (h && y && d) {
|
|
516
|
-
let w = y[1] * s, g = d[1] * s;
|
|
517
|
-
if (f.width = w, f.height = g, !v.canvg) {
|
|
518
|
-
var c;
|
|
519
|
-
u.objectURLRevoke = !0, await (c = a + "canvg.js", new Promise((x, m) => {
|
|
520
|
-
let O = B.getElementsByTagName("head")[0], k = B.createElement("script");
|
|
521
|
-
k.type = "text/javascript", k.src = c, k.onload = () => {
|
|
522
|
-
x();
|
|
523
|
-
}, k.onerror = () => {
|
|
524
|
-
let I = `Error loading script ${c}`;
|
|
525
|
-
(0, $.error)(I), m(Error(I));
|
|
526
|
-
}, O.appendChild(k);
|
|
527
|
-
}));
|
|
528
|
-
}
|
|
529
|
-
v.canvg.Canvg.fromString(h, t).start(), Q(v.navigator.msSaveOrOpenBlob ? f.msToBlob() : f.toDataURL(l), o);
|
|
530
|
-
}
|
|
531
|
-
} finally {
|
|
532
|
-
if (u.objectURLRevoke) try {
|
|
533
|
-
ft.revokeObjectURL(n);
|
|
534
|
-
} catch {
|
|
535
|
-
}
|
|
536
|
-
}
|
|
537
|
-
}
|
|
538
|
-
}
|
|
539
|
-
async exportChart(t, e) {
|
|
540
|
-
if ((t = F(this.options, t)).local) await this.localExport(t, e || {});
|
|
541
|
-
else {
|
|
542
|
-
let n = await this.getSVGForExport(t, e);
|
|
543
|
-
t.url && await K.post(t.url, { filename: t.filename ? t.filename.replace(/\//g, "-") : this.getFilename(), type: t.type, width: t.width, scale: t.scale, svg: n }, t.fetchOptions);
|
|
544
|
-
}
|
|
545
|
-
}
|
|
546
|
-
async fallbackToServer(t, e) {
|
|
547
|
-
t.fallbackToExportServer === !1 ? t.error ? t.error(t, e) : (0, $.error)(28, !0) : t.type === "application/pdf" && (t.local = !1, await this.exportChart(t));
|
|
548
|
-
}
|
|
549
|
-
getChartHTML(t) {
|
|
550
|
-
let e = this.chart;
|
|
551
|
-
return t && this.inlineStyles(), this.resolveCSSVariables(), e.container.querySelectorAll("canvas").forEach(function(n) {
|
|
552
|
-
let i = n.toDataURL("image/png"), l = n.parentNode, o = e.renderer.image(i, 0, 0, n.width, n.height);
|
|
553
|
-
T(o.element, { width: n.style.width, height: n.style.height }), l.parentNode.insertBefore(o.element, l), l.remove();
|
|
554
|
-
}), e.container.innerHTML;
|
|
555
|
-
}
|
|
556
|
-
getFilename() {
|
|
557
|
-
let t = this.chart.userOptions.title?.text, e = this.options.filename;
|
|
558
|
-
return e ? e.replace(/\//g, "-") : (typeof t == "string" && (e = t.toLowerCase().replace(/<\/?[^>]+(>|$)/g, "").replace(/[\s_]+/g, "-").replace(/[^a-z\d\-]/g, "").replace(/^[\-]+/g, "").replace(/[\-]+/g, "-").substr(0, 24).replace(/[\-]+$/g, "")), (!e || e.length < 5) && (e = "chart"), e);
|
|
559
|
-
}
|
|
560
|
-
getSVG(t, e) {
|
|
561
|
-
let n = this.chart, i, l, o = F(n.options, t);
|
|
562
|
-
o.plotOptions = F(n.userOptions.plotOptions, t?.plotOptions), o.time = F(n.userOptions.time, t?.time);
|
|
563
|
-
let s = H("div", void 0, { position: "absolute", top: "-9999em", width: n.chartWidth + "px", height: n.chartHeight + "px" }, j.body), a = n.renderTo.style.width, c = n.renderTo.style.height, p = o.exporting?.sourceWidth || o.chart.width || /px$/.test(a) && parseInt(a, 10) || (o.isGantt ? 800 : 600), f = o.exporting?.sourceHeight || o.chart.height || /px$/.test(c) && parseInt(c, 10) || 400;
|
|
564
|
-
P(o.chart, { animation: !1, renderTo: s, forExport: !0, renderer: "SVGRenderer", width: p, height: f }), o.exporting && (o.exporting.enabled = !1), delete o.data, o.series = [], n.series.forEach(function(d) {
|
|
565
|
-
(l = F(d.userOptions, { animation: !1, enableMouseTracking: !1, showCheckbox: !1, visible: d.visible })).isInternal || o?.series?.push(l);
|
|
566
|
-
});
|
|
567
|
-
let h = {};
|
|
568
|
-
n.axes.forEach(function(d) {
|
|
569
|
-
d.userOptions.internalKey || (d.userOptions.internalKey = (0, $.uniqueKey)()), o && !d.options.isInternal && (h[d.coll] || (h[d.coll] = !0, o[d.coll] = []), o[d.coll].push(F(d.userOptions, { visible: d.visible, type: d.type, uniqueNames: d.uniqueNames })));
|
|
570
|
-
}), o.colorAxis = n.userOptions.colorAxis;
|
|
571
|
-
let y = (d) => {
|
|
572
|
-
t && ["xAxis", "yAxis", "series"].forEach(function(g) {
|
|
573
|
-
t[g] && d.update({ [g]: t[g] });
|
|
574
|
-
}), n.axes.forEach(function(g) {
|
|
575
|
-
let x = Tt(d.axes, (O) => O.options.internalKey === g.userOptions.internalKey);
|
|
576
|
-
if (x) {
|
|
577
|
-
var m;
|
|
578
|
-
let O = g.getExtremes(), k = (ct(m = t?.[g.coll] || {}) ? m : [m])[0], I = "min" in k ? k.min : O.userMin, nt = "max" in k ? k.max : O.userMax;
|
|
579
|
-
(I !== void 0 && I !== x.min || nt !== void 0 && nt !== x.max) && x.setExtremes(I ?? void 0, nt ?? void 0, !0, !1);
|
|
580
|
-
}
|
|
581
|
-
});
|
|
582
|
-
let w = d.exporting;
|
|
583
|
-
return w?.options.applyStyleSheets && this.applyShadowDOMStyles(d), i = w?.getChartHTML(n.styledMode || o?.exporting?.applyStyleSheets) || "", D(n, "getSVG", { chartCopy: d }), i = u.sanitizeSVG(i, o), o = void 0, d.destroy(), tt(s), i;
|
|
584
|
-
};
|
|
585
|
-
return e ? new Promise((d) => new n.constructor(o || {}, function(w) {
|
|
586
|
-
n.callback?.call(this, w), d(y(this));
|
|
587
|
-
})) : y(new n.constructor(o, n.callback));
|
|
588
|
-
}
|
|
589
|
-
applyShadowDOMStyles(t) {
|
|
590
|
-
let e = this.chart, n = [], i = e.container, l;
|
|
591
|
-
for (; i && (!(l = i.getRootNode()) || typeof l.host != "object"); ) i = i.parentNode, l = null;
|
|
592
|
-
l?.querySelectorAll("style").forEach((o) => {
|
|
593
|
-
let s = o.cloneNode(!0);
|
|
594
|
-
t.container.appendChild(s), n.push(s);
|
|
595
|
-
}), C(e, "getSVG", () => {
|
|
596
|
-
n.forEach((o) => {
|
|
597
|
-
o.remove();
|
|
598
|
-
});
|
|
599
|
-
});
|
|
600
|
-
}
|
|
601
|
-
async getSVGForExport(t, e) {
|
|
602
|
-
let n = this.options;
|
|
603
|
-
return await this.getSVG(F({ chart: { borderRadius: 0 } }, n.chartOptions, e, { exporting: { sourceWidth: t?.sourceWidth || n.sourceWidth, sourceHeight: t?.sourceHeight || n.sourceHeight } }), !0);
|
|
604
|
-
}
|
|
605
|
-
inlineStyles() {
|
|
606
|
-
let t, e = u.inlineDenylist, n = u.inlineAllowlist, i = {}, l = H("iframe", void 0, { width: "1px", height: "1px", visibility: "hidden" }, j.body), o = l.contentWindow?.document;
|
|
607
|
-
o && o.body.appendChild(o.createElementNS(Dt, "svg")), (function s(a) {
|
|
608
|
-
let c, p, f, h, y, d, w = {};
|
|
609
|
-
if (o && a.nodeType === 1 && u.unstyledElements.indexOf(a.nodeName) === -1) {
|
|
610
|
-
if (c = v.getComputedStyle(a, null), p = a.nodeName === "svg" ? {} : v.getComputedStyle(a.parentNode, null), !i[a.nodeName]) {
|
|
611
|
-
t = o.getElementsByTagName("svg")[0], f = o.createElementNS(a.namespaceURI, a.nodeName), t.appendChild(f);
|
|
612
|
-
let g = v.getComputedStyle(f, null), x = {};
|
|
613
|
-
for (let m in g) m.length < 1e3 && typeof g[m] == "string" && !/^\d+$/.test(m) && (x[m] = g[m]);
|
|
614
|
-
i[a.nodeName] = x, a.nodeName === "text" && delete i.text.fill, t.removeChild(f);
|
|
615
|
-
}
|
|
616
|
-
for (let g in c) (At || q || J || Object.hasOwnProperty.call(c, g)) && (function(x, m) {
|
|
617
|
-
if (h = y = !1, n.length) {
|
|
618
|
-
for (d = n.length; d-- && !y; ) y = n[d].test(m);
|
|
619
|
-
h = !y;
|
|
620
|
-
}
|
|
621
|
-
for (m === "transform" && x === "none" && (h = !0), d = e.length; d-- && !h; ) {
|
|
622
|
-
if (m.length > 1e3) throw Error("Input too long");
|
|
623
|
-
h = e[d].test(m) || typeof x == "function";
|
|
624
|
-
}
|
|
625
|
-
!h && (p[m] !== x || a.nodeName === "svg") && i[a.nodeName][m] !== x && (u.inlineToAttributes && u.inlineToAttributes.indexOf(m) === -1 ? w[m] = x : x && a.setAttribute(u.hyphenate(m), x));
|
|
626
|
-
})(c[g], g);
|
|
627
|
-
if (T(a, w), a.nodeName === "svg" && a.setAttribute("stroke-width", "1px"), a.nodeName === "text") return;
|
|
628
|
-
[].forEach.call(a.children || a.childNodes, s);
|
|
629
|
-
}
|
|
630
|
-
})(this.chart.container.querySelector("svg")), t.parentNode.removeChild(t), l.parentNode.removeChild(l);
|
|
631
|
-
}
|
|
632
|
-
async localExport(t, e) {
|
|
633
|
-
let n = this.chart, i, l, o = null, s;
|
|
634
|
-
if (q && n.styledMode && !u.inlineAllowlist.length && u.inlineAllowlist.push(/^blockSize/, /^border/, /^caretColor/, /^color/, /^columnRule/, /^columnRuleColor/, /^cssFloat/, /^cursor/, /^fill$/, /^fillOpacity/, /^font/, /^inlineSize/, /^length/, /^lineHeight/, /^opacity/, /^outline/, /^parentRule/, /^rx$/, /^ry$/, /^stroke/, /^textAlign/, /^textAnchor/, /^textDecoration/, /^transform/, /^vectorEffect/, /^visibility/, /^x$/, /^y$/), q && (t.type === "application/pdf" || n.container.getElementsByTagName("image").length && t.type !== "image/svg+xml") || t.type === "application/pdf" && [].some.call(n.container.getElementsByTagName("image"), function(c) {
|
|
635
|
-
let p = c.getAttribute("href");
|
|
636
|
-
return p !== "" && typeof p == "string" && p.indexOf("data:") !== 0;
|
|
637
|
-
})) return void await this.fallbackToServer(t, Error("Image type not supported for this chart/browser."));
|
|
638
|
-
let a = C(n, "getSVG", (c) => {
|
|
639
|
-
l = c.chartCopy.options, s = (i = c.chartCopy.container.cloneNode(!0)) && i.getElementsByTagName("image") || [];
|
|
640
|
-
});
|
|
641
|
-
try {
|
|
642
|
-
let c;
|
|
643
|
-
for (let h of (await this.getSVGForExport(t, e), s ? Array.from(s) : [])) if (o = h.getAttributeNS("http://www.w3.org/1999/xlink", "href")) {
|
|
644
|
-
u.objectURLRevoke = !1;
|
|
645
|
-
let y = await u.imageToDataURL(o, t?.scale || 1, t?.type || "image/png");
|
|
646
|
-
h.setAttributeNS("http://www.w3.org/1999/xlink", "href", y);
|
|
647
|
-
} else h.parentNode.removeChild(h);
|
|
648
|
-
let p = i?.querySelector("svg");
|
|
649
|
-
p && !t.chartOptions?.chart?.style?.fontFamily && await u.inlineFonts(p);
|
|
650
|
-
let f = (c = i?.innerHTML, u.sanitizeSVG(c || "", l));
|
|
651
|
-
if (f.indexOf("<foreignObject") > -1 && t.type !== "image/svg+xml" && (q || t.type === "application/pdf")) throw Error("Image type not supported for charts with embedded HTML");
|
|
652
|
-
return await this.downloadSVG(f, P({ filename: this.getFilename() }, t)), f;
|
|
653
|
-
} catch (c) {
|
|
654
|
-
await this.fallbackToServer(t, c);
|
|
655
|
-
} finally {
|
|
656
|
-
a();
|
|
657
|
-
}
|
|
658
|
-
}
|
|
659
|
-
moveContainers(t) {
|
|
660
|
-
let e = this.chart, { scrollablePlotArea: n } = e;
|
|
661
|
-
(n ? [n.fixedDiv, n.scrollingContainer] : [e.container]).forEach(function(i) {
|
|
662
|
-
t.appendChild(i);
|
|
663
|
-
});
|
|
664
|
-
}
|
|
665
|
-
print() {
|
|
666
|
-
let t = this.chart;
|
|
667
|
-
this.isPrinting || (u.printingChart = t, J || this.beforePrint(), setTimeout(() => {
|
|
668
|
-
v.focus(), v.print(), J || setTimeout(() => {
|
|
669
|
-
t.exporting?.afterPrint();
|
|
670
|
-
}, 1e3);
|
|
671
|
-
}, 1));
|
|
672
|
-
}
|
|
673
|
-
render() {
|
|
674
|
-
let t = this, { chart: e, options: n } = t, i = t?.isDirty || !t?.svgElements.length;
|
|
675
|
-
t.buttonOffset = 0, t.isDirty && t.destroy(), i && n.enabled !== !1 && (t.events = [], t.group || (t.group = e.renderer.g("exporting-group").attr({ zIndex: 3 }).add()), G(n?.buttons, function(l) {
|
|
676
|
-
t.addButton(l);
|
|
677
|
-
}), t.isDirty = !1);
|
|
678
|
-
}
|
|
679
|
-
resolveCSSVariables() {
|
|
680
|
-
Array.from(this.chart.container.querySelectorAll("*")).forEach((t) => {
|
|
681
|
-
["color", "fill", "stop-color", "stroke"].forEach((e) => {
|
|
682
|
-
t.getAttribute(e)?.includes("var(") && t.setAttribute(e, getComputedStyle(t).getPropertyValue(e)), t.style?.[e]?.includes("var(") && (t.style[e] = getComputedStyle(t).getPropertyValue(e));
|
|
683
|
-
});
|
|
684
|
-
});
|
|
685
|
-
}
|
|
686
|
-
update(t, e) {
|
|
687
|
-
this.isDirty = !0, F(!0, this.options, t), V(e, !0) && this.chart.redraw();
|
|
688
|
-
}
|
|
689
|
-
}
|
|
690
|
-
u.inlineAllowlist = [], u.inlineDenylist = [/-/, /^(clipPath|cssText|d|height|width)$/, /^font$/, /[lL]ogical(Width|Height)$/, /^parentRule$/, /^(cssRules|ownerRules)$/, /perspective/, /TapHighlightColor/, /^transition/, /^length$/, /^\d+$/], u.inlineToAttributes = ["fill", "stroke", "strokeLinecap", "strokeLinejoin", "strokeWidth", "textAnchor", "x", "y"], u.loadEventDeferDelay = 150 * !!q, u.unstyledElements = ["clipPath", "defs", "desc"], (function(r) {
|
|
691
|
-
function t(i) {
|
|
692
|
-
let l = i.exporting;
|
|
693
|
-
l && (l.render(), C(i, "redraw", function() {
|
|
694
|
-
this.exporting?.render();
|
|
695
|
-
}), C(i, "destroy", function() {
|
|
696
|
-
this.exporting?.destroy();
|
|
697
|
-
}));
|
|
698
|
-
}
|
|
699
|
-
function e() {
|
|
700
|
-
let i = this;
|
|
701
|
-
i.options.exporting && (i.exporting = new r(i, i.options.exporting), bt.compose(i).navigation.addUpdate((l, o) => {
|
|
702
|
-
i.exporting && (i.exporting.isDirty = !0, F(!0, i.options.navigation, l), V(o, !0) && i.redraw());
|
|
703
|
-
}));
|
|
704
|
-
}
|
|
705
|
-
function n({ alignTo: i, key: l, textPxLength: o }) {
|
|
706
|
-
let s = this.options.exporting, { align: a, buttonSpacing: c = 0, verticalAlign: p, width: f = 0 } = F(this.options.navigation?.buttonOptions, s?.buttons?.contextButton), h = i.width - o, y = f + c;
|
|
707
|
-
(s?.enabled ?? !0) && l === "title" && a === "right" && p === "top" && h < 2 * y && (h < y ? i.width -= y : this.title?.alignValue !== "left" && (i.x -= y - h / 2));
|
|
708
|
-
}
|
|
709
|
-
r.compose = function(i, l) {
|
|
710
|
-
Ct.compose(l), ut.compose(i), pt(Rt, "Exporting") && (P(wt().prototype, { exportChart: async function(o, s) {
|
|
711
|
-
await this.exporting?.exportChart(o, s);
|
|
712
|
-
}, getChartHTML: function(o) {
|
|
713
|
-
return this.exporting?.getChartHTML(o);
|
|
714
|
-
}, getFilename: function() {
|
|
715
|
-
return this.exporting?.getFilename();
|
|
716
|
-
}, getSVG: function(o) {
|
|
717
|
-
return this.exporting?.getSVG(o, !1);
|
|
718
|
-
}, print: function() {
|
|
719
|
-
return this.exporting?.print();
|
|
720
|
-
} }), i.prototype.callbacks.push(t), C(i, "afterInit", e), C(i, "layOutTitle", n), J && v.matchMedia("print").addListener(function(o) {
|
|
721
|
-
r.printingChart && (o.matches ? r.printingChart.exporting?.beforePrint() : r.printingChart.exporting?.afterPrint());
|
|
722
|
-
}), Nt(Ot));
|
|
723
|
-
};
|
|
724
|
-
})(u || (u = {}));
|
|
725
|
-
let N = S();
|
|
726
|
-
N.Exporting = u, N.HttpUtilities = N.HttpUtilities || K, N.ajax = N.HttpUtilities.ajax, N.getJSON = N.HttpUtilities.getJSON, N.post = N.HttpUtilities.post, u.compose(N.Chart, N.Renderer);
|
|
727
|
-
let Lt = S();
|
|
728
|
-
return ot.default;
|
|
729
|
-
})());
|
|
730
|
-
})(X)), X.exports;
|
|
731
|
-
}
|
|
732
|
-
var mt = It();
|
|
733
|
-
const Ut = /* @__PURE__ */ Mt(mt), Gt = /* @__PURE__ */ jt({
|
|
734
|
-
__proto__: null,
|
|
735
|
-
default: Ut
|
|
736
|
-
}, [mt]);
|
|
737
|
-
export {
|
|
738
|
-
Gt as e
|
|
739
|
-
};
|