@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.
@@ -1,192 +0,0 @@
1
- import { g as it } from "./index-C8r4OcCO.js";
2
- function lt(O, B) {
3
- for (var m = 0; m < B.length; m++) {
4
- const x = B[m];
5
- if (typeof x != "string" && !Array.isArray(x)) {
6
- for (const v in x)
7
- if (v !== "default" && !(v in O)) {
8
- const E = Object.getOwnPropertyDescriptor(x, v);
9
- E && Object.defineProperty(O, v, E.get ? E : {
10
- enumerable: !0,
11
- get: () => x[v]
12
- });
13
- }
14
- }
15
- }
16
- return Object.freeze(Object.defineProperty(O, Symbol.toStringTag, { value: "Module" }));
17
- }
18
- var R = { exports: {} }, st = R.exports, T;
19
- function ft() {
20
- return T || (T = 1, function(O, B) {
21
- /**
22
- * Highcharts JS v12.3.0 (2025-06-21)
23
- * @module highcharts/modules/offline-exporting
24
- * @requires highcharts
25
- * @requires highcharts/modules/exporting
26
- *
27
- * Client side exporting module
28
- *
29
- * (c) 2015-2025 Torstein Honsi / Oystein Moseng
30
- *
31
- * License: www.highcharts.com/license
32
- */
33
- (function(m, x) {
34
- O.exports = x(m._Highcharts, m._Highcharts.AST, m._Highcharts.Chart);
35
- })(typeof window > "u" ? st : window, (m, x, v) => (() => {
36
- var E, G = { 660: (t) => {
37
- t.exports = x;
38
- }, 944: (t) => {
39
- t.exports = m;
40
- }, 960: (t) => {
41
- t.exports = v;
42
- } }, P = {};
43
- function f(t) {
44
- var o = P[t];
45
- if (o !== void 0) return o.exports;
46
- var n = P[t] = { exports: {} };
47
- return G[t](n, n.exports, f), n.exports;
48
- }
49
- f.n = (t) => {
50
- var o = t && t.__esModule ? () => t.default : () => t;
51
- return f.d(o, { a: o }), o;
52
- }, f.d = (t, o) => {
53
- for (var n in o) f.o(o, n) && !f.o(t, n) && Object.defineProperty(t, n, { enumerable: !0, get: o[n] });
54
- }, f.o = (t, o) => Object.prototype.hasOwnProperty.call(t, o);
55
- var _ = {};
56
- f.d(_, { default: () => at });
57
- var V = f(944), b = f.n(V);
58
- let { isSafari: I, win: d, win: { document: L } } = b(), { error: z } = b(), H = d.URL || d.webkitURL || d;
59
- function $(t) {
60
- let o = t.replace(/filename=.*;/, "").match(/data:([^;]*)(;base64)?,([A-Z+\d\/]+)/i);
61
- if (o && o.length > 3 && d.atob && d.ArrayBuffer && d.Uint8Array && d.Blob && H.createObjectURL) {
62
- let n = d.atob(o[3]), u = new d.ArrayBuffer(n.length), e = new d.Uint8Array(u);
63
- for (let a = 0; a < e.length; ++a) e[a] = n.charCodeAt(a);
64
- return H.createObjectURL(new d.Blob([e], { type: o[1] }));
65
- }
66
- }
67
- let C = { dataURLtoBlob: $, downloadURL: function(t, o) {
68
- let n = d.navigator, u = L.createElement("a");
69
- if (typeof t != "string" && !(t instanceof String) && n.msSaveOrOpenBlob) return void n.msSaveOrOpenBlob(t, o);
70
- if (t = "" + t, n.userAgent.length > 1e3) throw Error("Input too long");
71
- let e = /Edge\/\d+/.test(n.userAgent);
72
- if ((I && typeof t == "string" && t.indexOf("data:application/pdf") === 0 || e || t.length > 2e6) && !(t = $(t) || "")) throw Error("Failed to convert to blob");
73
- if (u.download !== void 0) u.href = t, u.download = o, L.body.appendChild(u), u.click(), L.body.removeChild(u);
74
- else try {
75
- if (!d.open(t, "chart")) throw Error("Failed to open window");
76
- } catch {
77
- d.location.href = t;
78
- }
79
- }, getScript: function(t) {
80
- return new Promise((o, n) => {
81
- let u = L.getElementsByTagName("head")[0], e = L.createElement("script");
82
- e.type = "text/javascript", e.src = t, e.onload = () => {
83
- o();
84
- }, e.onerror = () => {
85
- n(z(`Error loading script ${t}`));
86
- }, u.appendChild(e);
87
- });
88
- } };
89
- var M = f(660), Z = f.n(M), J = f(960), K = f.n(J);
90
- let Q = { exporting: {} }, { getOptions: W, setOptions: X } = b(), { downloadURL: Y, getScript: q } = C, { composed: tt, doc: et, win: j } = b(), { addEvent: ot, extend: rt, pushUnique: nt } = b();
91
- (function(t) {
92
- async function o(e, a, g, p) {
93
- let l = function(s, h) {
94
- let r, y, i = et.createElement("div");
95
- Z().setElementHTML(i, s);
96
- let F = i.getElementsByTagName("text"), N = function(c, w) {
97
- let A = c;
98
- for (; A && A !== i; ) {
99
- if (A.style[w]) {
100
- let U = A.style[w];
101
- w === "fontSize" && /em$/.test(U) && (U = Math.round(16 * parseFloat(U)) + "px"), c.style[w] = U;
102
- break;
103
- }
104
- A = A.parentNode;
105
- }
106
- };
107
- return [].forEach.call(F, function(c) {
108
- for (["fontFamily", "fontSize"].forEach((w) => {
109
- N(c, w);
110
- }), c.style.fontFamily = h?.normal ? "HighchartsFont" : String(c.style.fontFamily && c.style.fontFamily.split(" ").splice(-1)), r = c.getElementsByTagName("title"), [].forEach.call(r, function(w) {
111
- c.removeChild(w);
112
- }), y = c.getElementsByClassName("highcharts-text-outline"); y.length > 0; ) {
113
- let w = y[0];
114
- w.parentNode && w.parentNode.removeChild(w);
115
- }
116
- }), i.querySelector("svg");
117
- }(e, p);
118
- l && (await n(l, p), Y(await u(l, 0, a), g));
119
- }
120
- async function n(e, a) {
121
- let g, p, l = (s, h) => {
122
- j.jspdf.jsPDF.API.events.push(["initialized", function() {
123
- this.addFileToVFS(s, h), this.addFont(s, "HighchartsFont", s), this.getFontList()?.HighchartsFont || this.setFont("HighchartsFont");
124
- }]);
125
- };
126
- for (let s of (a && (p = e.textContent || "", !/[^\u0000-\u007F\u200B]+/.test(p)) && (a = void 0), ["normal", "italic", "bold", "bolditalic"])) {
127
- let h = a?.[s];
128
- if (h) try {
129
- let r = await j.fetch(h);
130
- if (!r.ok) throw Error(`Failed to fetch font: ${h}`);
131
- let y = await r.blob(), i = new FileReader(), F = await new Promise((N, c) => {
132
- i.onloadend = () => {
133
- typeof i.result == "string" ? N(i.result.split(",")[1]) : c(Error("Failed to read font as base64"));
134
- }, i.onerror = c, i.readAsDataURL(y);
135
- });
136
- l(s, F), s === "normal" && (g = F);
137
- } catch {
138
- }
139
- else g && l(s, g);
140
- }
141
- }
142
- async function u(e, a, g) {
143
- let p = (Number(e.getAttribute("width")) + 2 * a) * g, l = (Number(e.getAttribute("height")) + 2 * a) * g, s = new j.jspdf.jsPDF(l > p ? "p" : "l", "pt", [p, l]);
144
- [].forEach.call(e.querySelectorAll('*[visibility="hidden"]'), function(r) {
145
- r.parentNode.removeChild(r);
146
- });
147
- let h = e.querySelectorAll("linearGradient");
148
- for (let r = 0; r < h.length; r++) {
149
- let y = h[r].querySelectorAll("stop"), i = 0;
150
- for (; i < y.length && y[i].getAttribute("offset") === "0" && y[i + 1].getAttribute("offset") === "0"; ) y[i].remove(), i++;
151
- }
152
- return [].forEach.call(e.querySelectorAll("tspan"), (r) => {
153
- r.textContent === "​" && (r.textContent = " ", r.setAttribute("dx", -5));
154
- }), await s.svg(e, { x: 0, y: 0, width: p, height: l, removeInvalid: !0 }), s.output("datauristring");
155
- }
156
- t.compose = function(e) {
157
- if (ot(e, "downloadSVG", async function(g) {
158
- let { svg: p, exportingOptions: l, exporting: s, preventDefault: h } = g;
159
- if (l?.type === "application/pdf") {
160
- h?.();
161
- try {
162
- let { type: r, filename: y, scale: i, libURL: F } = b().Exporting.prepareImageOptions(l);
163
- r === "application/pdf" && (j.jspdf?.jsPDF || (await q(`${F}jspdf.js`), await q(`${F}svg2pdf.js`)), await o(p, i, y, l?.pdfFont));
164
- } catch (r) {
165
- await s?.fallbackToServer(l, r);
166
- }
167
- }
168
- }), !nt(tt, "OfflineExporting")) return;
169
- rt(K().prototype, { exportChartLocal: async function(g, p) {
170
- await this.exporting?.exportChart(g, p);
171
- } }), X(Q);
172
- let a = W().exporting?.buttons?.contextButton?.menuItems;
173
- a && a.push("downloadPDF");
174
- }, t.downloadSVGLocal = async function(e, a) {
175
- await b().Exporting.prototype.downloadSVG.call(void 0, e, a);
176
- };
177
- })(E || (E = {}));
178
- let D = E, S = b();
179
- S.dataURLtoBlob = S.dataURLtoBlob || C.dataURLtoBlob, S.downloadSVGLocal = D.downloadSVGLocal, S.downloadURL = S.downloadURL || C.downloadURL, D.compose(S.Exporting);
180
- let at = b();
181
- return _.default;
182
- })());
183
- }(R)), R.exports;
184
- }
185
- var k = ft();
186
- const dt = /* @__PURE__ */ it(k), ct = /* @__PURE__ */ lt({
187
- __proto__: null,
188
- default: dt
189
- }, [k]);
190
- export {
191
- ct as o
192
- };