@oardi/ts-utils 0.0.13 → 0.0.15
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/enums/index.d.ts +3 -0
- package/enums/index.d.ts.map +1 -0
- package/enums/loggertype.enum.d.ts +8 -0
- package/enums/loggertype.enum.d.ts.map +1 -0
- package/helpers/clipboard.helper.d.ts +2 -0
- package/helpers/clipboard.helper.d.ts.map +1 -0
- package/helpers/csv.helper.d.ts +6 -0
- package/helpers/csv.helper.d.ts.map +1 -0
- package/helpers/download.helper.d.ts +4 -6
- package/helpers/download.helper.d.ts.map +1 -1
- package/helpers/file.helper.d.ts +16 -0
- package/helpers/file.helper.d.ts.map +1 -0
- package/helpers/index.d.ts +6 -0
- package/helpers/index.d.ts.map +1 -1
- package/helpers/local-storage.helper.d.ts +8 -0
- package/helpers/local-storage.helper.d.ts.map +1 -0
- package/helpers/logger.helper.d.ts +9 -0
- package/helpers/logger.helper.d.ts.map +1 -0
- package/helpers/token.helper.d.ts +7 -0
- package/helpers/token.helper.d.ts.map +1 -0
- package/index.cjs.js +9 -9
- package/index.es.js +953 -937
- package/index.umd.js +9 -9
- package/package.json +1 -1
- package/services/browser.service.d.ts +2 -1
- package/services/browser.service.d.ts.map +1 -1
- package/services/index.d.ts +0 -5
- package/services/index.d.ts.map +1 -1
- package/types/index.d.ts +3 -2
- package/types/index.d.ts.map +1 -1
- package/services/clipboard.service.d.ts +0 -4
- package/services/clipboard.service.d.ts.map +0 -1
- package/services/file.service.d.ts +0 -11
- package/services/file.service.d.ts.map +0 -1
- package/services/local.service.d.ts +0 -8
- package/services/local.service.d.ts.map +0 -1
- package/services/logger.service.d.ts +0 -24
- package/services/logger.service.d.ts.map +0 -1
- package/services/token.service.d.ts +0 -10
- package/services/token.service.d.ts.map +0 -1
- package/types/dictionary.type.d.ts +0 -2
- package/types/dictionary.type.d.ts.map +0 -1
- package/types/size.type.d.ts +0 -2
- package/types/size.type.d.ts.map +0 -1
package/index.es.js
CHANGED
|
@@ -1,603 +1,24 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
if ("showSaveFilePicker" in window && s?.showSaveFilePicker)
|
|
4
|
-
try {
|
|
5
|
-
const q = await (await window.showSaveFilePicker({
|
|
6
|
-
suggestedName: r,
|
|
7
|
-
types: [{ description: "Datei", accept: { [l]: [`.${De(r)}`] } }]
|
|
8
|
-
})).createWritable();
|
|
9
|
-
await q.write($), await q.close();
|
|
10
|
-
return;
|
|
11
|
-
} catch {
|
|
12
|
-
}
|
|
13
|
-
const C = URL.createObjectURL($), j = document.createElement("a");
|
|
14
|
-
j.href = C, j.download = r, j.rel = "noopener", j.style.display = "none", document.body.appendChild(j), Ae(j), window.setTimeout(() => {
|
|
15
|
-
document.body.removeChild(j), URL.revokeObjectURL(C);
|
|
16
|
-
}, 0), Ie() && window.open(C, "_blank", "noopener,noreferrer");
|
|
17
|
-
}
|
|
18
|
-
function Re(i, r) {
|
|
19
|
-
if (i instanceof Blob)
|
|
20
|
-
return i.type ? i : new Blob([i], { type: r });
|
|
21
|
-
if (i instanceof ArrayBuffer || i instanceof Uint8Array) {
|
|
22
|
-
const s = i instanceof Uint8Array ? i : new Uint8Array(i);
|
|
23
|
-
return new Blob([s], { type: r });
|
|
24
|
-
}
|
|
25
|
-
return new Blob([i], { type: r || "text/plain;charset=utf-8" });
|
|
26
|
-
}
|
|
27
|
-
function Le(i) {
|
|
28
|
-
switch (De(i).toLowerCase()) {
|
|
29
|
-
case "txt":
|
|
30
|
-
return "text/plain;charset=utf-8";
|
|
31
|
-
case "csv":
|
|
32
|
-
return "text/csv;charset=utf-8";
|
|
33
|
-
case "json":
|
|
34
|
-
return "application/json;charset=utf-8";
|
|
35
|
-
case "pdf":
|
|
36
|
-
return "application/pdf";
|
|
37
|
-
case "png":
|
|
38
|
-
return "image/png";
|
|
39
|
-
case "jpg":
|
|
40
|
-
case "jpeg":
|
|
41
|
-
return "image/jpeg";
|
|
42
|
-
case "svg":
|
|
43
|
-
return "image/svg+xml";
|
|
44
|
-
case "zip":
|
|
45
|
-
return "application/zip";
|
|
46
|
-
default:
|
|
47
|
-
return "application/octet-stream";
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
function De(i) {
|
|
51
|
-
const r = i.lastIndexOf(".");
|
|
52
|
-
return r >= 0 && r < i.length - 1 ? i.slice(r + 1) : "";
|
|
53
|
-
}
|
|
54
|
-
function Ae(i) {
|
|
55
|
-
const r = document.createEvent("MouseEvents");
|
|
56
|
-
r.initMouseEvent("click", !0, !0, window, 0, 0, 0, 0, 0, !1, !1, !1, !1, 0, null), i.dispatchEvent(r);
|
|
57
|
-
}
|
|
58
|
-
function Ie() {
|
|
59
|
-
const i = navigator.userAgent, r = /iPad|iPhone|iPod/.test(i), s = /^((?!chrome|android).)*safari/i.test(i);
|
|
60
|
-
return r || s;
|
|
61
|
-
}
|
|
62
|
-
class Qe {
|
|
63
|
-
static getEnumValue(r, s) {
|
|
64
|
-
if (s in r)
|
|
65
|
-
return r[s];
|
|
66
|
-
throw Error(`${s} not found in ${r}`);
|
|
67
|
-
}
|
|
68
|
-
static getKeyValues(r) {
|
|
69
|
-
return Object.keys(r).filter((s) => !isNaN(Number(s))).map((s) => ({
|
|
70
|
-
key: Number(s),
|
|
71
|
-
value: r[s]
|
|
72
|
-
}));
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
const Te = (i, r, s) => i.localeCompare(r) * (s ? 1 : -1), Fe = (i, r) => i < r ? -1 : i === r ? 0 : 1, je = (i, r, s) => Fe(i, r) * (s ? 1 : -1), ze = (i, r, s) => {
|
|
76
|
-
let l = 0;
|
|
77
|
-
return typeof i == "string" && typeof r == "string" ? l = Te(i, r, s) : l = je(i, r, s), l;
|
|
78
|
-
}, Be = (i, r, s, l) => {
|
|
79
|
-
const $ = s(i), C = s(r);
|
|
80
|
-
return ze($, C, l);
|
|
81
|
-
};
|
|
82
|
-
Array.prototype.distinct = function(i) {
|
|
83
|
-
const r = this;
|
|
84
|
-
return i ? r.filter((l, $, C) => C.findIndex((j) => i(j, l)) === $) : r.filter((l, $, C) => C.indexOf(l) === $);
|
|
85
|
-
};
|
|
86
|
-
Array.prototype.filterBy = function(i) {
|
|
87
|
-
return this.filter((r) => {
|
|
88
|
-
let s = !1;
|
|
89
|
-
return i && r[i] ? s = r[i] === i : s = r === i, s;
|
|
90
|
-
});
|
|
91
|
-
};
|
|
92
|
-
Array.prototype.first = function() {
|
|
93
|
-
return this?.length > 0 ? this[0] : null;
|
|
94
|
-
};
|
|
95
|
-
Array.prototype.groupBy = function(i) {
|
|
96
|
-
return this.reduce((r, s) => {
|
|
97
|
-
const l = i(s);
|
|
98
|
-
return (r[l] = r[l] || []).push(s), r;
|
|
99
|
-
}, {});
|
|
100
|
-
};
|
|
101
|
-
Array.prototype.orderBy = function(i, r = !0) {
|
|
102
|
-
return this?.sort((s, l) => Be(s, l, i, r)), this;
|
|
103
|
-
};
|
|
104
|
-
Array.prototype.removeBy = function(i, r) {
|
|
105
|
-
return this.filter((s) => i(s) !== r);
|
|
106
|
-
};
|
|
107
|
-
function Ce(i) {
|
|
108
|
-
return i && i.__esModule && Object.prototype.hasOwnProperty.call(i, "default") ? i.default : i;
|
|
109
|
-
}
|
|
110
|
-
var ye = { exports: {} }, We = ye.exports, Se;
|
|
111
|
-
function Ue() {
|
|
112
|
-
return Se || (Se = 1, (function(i, r) {
|
|
113
|
-
(function(s, l) {
|
|
114
|
-
i.exports = l();
|
|
115
|
-
})(We, (function() {
|
|
116
|
-
var s = 1e3, l = 6e4, $ = 36e5, C = "millisecond", j = "second", H = "minute", q = "hour", w = "day", P = "week", W = "month", X = "quarter", K = "year", Q = "date", ee = "Invalid Date", ie = /^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/, he = /\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g, le = { name: "en", weekdays: "Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"), months: "January_February_March_April_May_June_July_August_September_October_November_December".split("_"), ordinal: function(m) {
|
|
117
|
-
var f = ["th", "st", "nd", "rd"], c = m % 100;
|
|
118
|
-
return "[" + m + (f[(c - 20) % 10] || f[c] || f[0]) + "]";
|
|
119
|
-
} }, oe = function(m, f, c) {
|
|
120
|
-
var a = String(m);
|
|
121
|
-
return !a || a.length >= f ? m : "" + Array(f + 1 - a.length).join(c) + m;
|
|
122
|
-
}, me = { s: oe, z: function(m) {
|
|
123
|
-
var f = -m.utcOffset(), c = Math.abs(f), a = Math.floor(c / 60), u = c % 60;
|
|
124
|
-
return (f <= 0 ? "+" : "-") + oe(a, 2, "0") + ":" + oe(u, 2, "0");
|
|
125
|
-
}, m: function m(f, c) {
|
|
126
|
-
if (f.date() < c.date()) return -m(c, f);
|
|
127
|
-
var a = 12 * (c.year() - f.year()) + (c.month() - f.month()), u = f.clone().add(a, W), h = c - u < 0, y = f.clone().add(a + (h ? -1 : 1), W);
|
|
128
|
-
return +(-(a + (c - u) / (h ? u - y : y - u)) || 0);
|
|
129
|
-
}, a: function(m) {
|
|
130
|
-
return m < 0 ? Math.ceil(m) || 0 : Math.floor(m);
|
|
131
|
-
}, p: function(m) {
|
|
132
|
-
return { M: W, y: K, w: P, d: w, D: Q, h: q, m: H, s: j, ms: C, Q: X }[m] || String(m || "").toLowerCase().replace(/s$/, "");
|
|
133
|
-
}, u: function(m) {
|
|
134
|
-
return m === void 0;
|
|
135
|
-
} }, se = "en", Y = {};
|
|
136
|
-
Y[se] = le;
|
|
137
|
-
var R = "$isDayjsObject", e = function(m) {
|
|
138
|
-
return m instanceof g || !(!m || !m[R]);
|
|
139
|
-
}, t = function m(f, c, a) {
|
|
140
|
-
var u;
|
|
141
|
-
if (!f) return se;
|
|
142
|
-
if (typeof f == "string") {
|
|
143
|
-
var h = f.toLowerCase();
|
|
144
|
-
Y[h] && (u = h), c && (Y[h] = c, u = h);
|
|
145
|
-
var y = f.split("-");
|
|
146
|
-
if (!u && y.length > 1) return m(y[0]);
|
|
147
|
-
} else {
|
|
148
|
-
var p = f.name;
|
|
149
|
-
Y[p] = f, u = p;
|
|
150
|
-
}
|
|
151
|
-
return !a && u && (se = u), u || !a && se;
|
|
152
|
-
}, n = function(m, f) {
|
|
153
|
-
if (e(m)) return m.clone();
|
|
154
|
-
var c = typeof f == "object" ? f : {};
|
|
155
|
-
return c.date = m, c.args = arguments, new g(c);
|
|
156
|
-
}, o = me;
|
|
157
|
-
o.l = t, o.i = e, o.w = function(m, f) {
|
|
158
|
-
return n(m, { locale: f.$L, utc: f.$u, x: f.$x, $offset: f.$offset });
|
|
159
|
-
};
|
|
160
|
-
var g = (function() {
|
|
161
|
-
function m(c) {
|
|
162
|
-
this.$L = t(c.locale, null, !0), this.parse(c), this.$x = this.$x || c.x || {}, this[R] = !0;
|
|
163
|
-
}
|
|
164
|
-
var f = m.prototype;
|
|
165
|
-
return f.parse = function(c) {
|
|
166
|
-
this.$d = (function(a) {
|
|
167
|
-
var u = a.date, h = a.utc;
|
|
168
|
-
if (u === null) return /* @__PURE__ */ new Date(NaN);
|
|
169
|
-
if (o.u(u)) return /* @__PURE__ */ new Date();
|
|
170
|
-
if (u instanceof Date) return new Date(u);
|
|
171
|
-
if (typeof u == "string" && !/Z$/i.test(u)) {
|
|
172
|
-
var y = u.match(ie);
|
|
173
|
-
if (y) {
|
|
174
|
-
var p = y[2] - 1 || 0, _ = (y[7] || "0").substring(0, 3);
|
|
175
|
-
return h ? new Date(Date.UTC(y[1], p, y[3] || 1, y[4] || 0, y[5] || 0, y[6] || 0, _)) : new Date(y[1], p, y[3] || 1, y[4] || 0, y[5] || 0, y[6] || 0, _);
|
|
176
|
-
}
|
|
177
|
-
}
|
|
178
|
-
return new Date(u);
|
|
179
|
-
})(c), this.init();
|
|
180
|
-
}, f.init = function() {
|
|
181
|
-
var c = this.$d;
|
|
182
|
-
this.$y = c.getFullYear(), this.$M = c.getMonth(), this.$D = c.getDate(), this.$W = c.getDay(), this.$H = c.getHours(), this.$m = c.getMinutes(), this.$s = c.getSeconds(), this.$ms = c.getMilliseconds();
|
|
183
|
-
}, f.$utils = function() {
|
|
184
|
-
return o;
|
|
185
|
-
}, f.isValid = function() {
|
|
186
|
-
return this.$d.toString() !== ee;
|
|
187
|
-
}, f.isSame = function(c, a) {
|
|
188
|
-
var u = n(c);
|
|
189
|
-
return this.startOf(a) <= u && u <= this.endOf(a);
|
|
190
|
-
}, f.isAfter = function(c, a) {
|
|
191
|
-
return n(c) < this.startOf(a);
|
|
192
|
-
}, f.isBefore = function(c, a) {
|
|
193
|
-
return this.endOf(a) < n(c);
|
|
194
|
-
}, f.$g = function(c, a, u) {
|
|
195
|
-
return o.u(c) ? this[a] : this.set(u, c);
|
|
196
|
-
}, f.unix = function() {
|
|
197
|
-
return Math.floor(this.valueOf() / 1e3);
|
|
198
|
-
}, f.valueOf = function() {
|
|
199
|
-
return this.$d.getTime();
|
|
200
|
-
}, f.startOf = function(c, a) {
|
|
201
|
-
var u = this, h = !!o.u(a) || a, y = o.p(c), p = function(E, O) {
|
|
202
|
-
var v = o.w(u.$u ? Date.UTC(u.$y, O, E) : new Date(u.$y, O, E), u);
|
|
203
|
-
return h ? v : v.endOf(w);
|
|
204
|
-
}, _ = function(E, O) {
|
|
205
|
-
return o.w(u.toDate()[E].apply(u.toDate("s"), (h ? [0, 0, 0, 0] : [23, 59, 59, 999]).slice(O)), u);
|
|
206
|
-
}, d = this.$W, x = this.$M, M = this.$D, T = "set" + (this.$u ? "UTC" : "");
|
|
207
|
-
switch (y) {
|
|
208
|
-
case K:
|
|
209
|
-
return h ? p(1, 0) : p(31, 11);
|
|
210
|
-
case W:
|
|
211
|
-
return h ? p(1, x) : p(0, x + 1);
|
|
212
|
-
case P:
|
|
213
|
-
var B = this.$locale().weekStart || 0, k = (d < B ? d + 7 : d) - B;
|
|
214
|
-
return p(h ? M - k : M + (6 - k), x);
|
|
215
|
-
case w:
|
|
216
|
-
case Q:
|
|
217
|
-
return _(T + "Hours", 0);
|
|
218
|
-
case q:
|
|
219
|
-
return _(T + "Minutes", 1);
|
|
220
|
-
case H:
|
|
221
|
-
return _(T + "Seconds", 2);
|
|
222
|
-
case j:
|
|
223
|
-
return _(T + "Milliseconds", 3);
|
|
224
|
-
default:
|
|
225
|
-
return this.clone();
|
|
226
|
-
}
|
|
227
|
-
}, f.endOf = function(c) {
|
|
228
|
-
return this.startOf(c, !1);
|
|
229
|
-
}, f.$set = function(c, a) {
|
|
230
|
-
var u, h = o.p(c), y = "set" + (this.$u ? "UTC" : ""), p = (u = {}, u[w] = y + "Date", u[Q] = y + "Date", u[W] = y + "Month", u[K] = y + "FullYear", u[q] = y + "Hours", u[H] = y + "Minutes", u[j] = y + "Seconds", u[C] = y + "Milliseconds", u)[h], _ = h === w ? this.$D + (a - this.$W) : a;
|
|
231
|
-
if (h === W || h === K) {
|
|
232
|
-
var d = this.clone().set(Q, 1);
|
|
233
|
-
d.$d[p](_), d.init(), this.$d = d.set(Q, Math.min(this.$D, d.daysInMonth())).$d;
|
|
234
|
-
} else p && this.$d[p](_);
|
|
235
|
-
return this.init(), this;
|
|
236
|
-
}, f.set = function(c, a) {
|
|
237
|
-
return this.clone().$set(c, a);
|
|
238
|
-
}, f.get = function(c) {
|
|
239
|
-
return this[o.p(c)]();
|
|
240
|
-
}, f.add = function(c, a) {
|
|
241
|
-
var u, h = this;
|
|
242
|
-
c = Number(c);
|
|
243
|
-
var y = o.p(a), p = function(x) {
|
|
244
|
-
var M = n(h);
|
|
245
|
-
return o.w(M.date(M.date() + Math.round(x * c)), h);
|
|
246
|
-
};
|
|
247
|
-
if (y === W) return this.set(W, this.$M + c);
|
|
248
|
-
if (y === K) return this.set(K, this.$y + c);
|
|
249
|
-
if (y === w) return p(1);
|
|
250
|
-
if (y === P) return p(7);
|
|
251
|
-
var _ = (u = {}, u[H] = l, u[q] = $, u[j] = s, u)[y] || 1, d = this.$d.getTime() + c * _;
|
|
252
|
-
return o.w(d, this);
|
|
253
|
-
}, f.subtract = function(c, a) {
|
|
254
|
-
return this.add(-1 * c, a);
|
|
255
|
-
}, f.format = function(c) {
|
|
256
|
-
var a = this, u = this.$locale();
|
|
257
|
-
if (!this.isValid()) return u.invalidDate || ee;
|
|
258
|
-
var h = c || "YYYY-MM-DDTHH:mm:ssZ", y = o.z(this), p = this.$H, _ = this.$m, d = this.$M, x = u.weekdays, M = u.months, T = u.meridiem, B = function(O, v, L, F) {
|
|
259
|
-
return O && (O[v] || O(a, h)) || L[v].slice(0, F);
|
|
260
|
-
}, k = function(O) {
|
|
261
|
-
return o.s(p % 12 || 12, O, "0");
|
|
262
|
-
}, E = T || function(O, v, L) {
|
|
263
|
-
var F = O < 12 ? "AM" : "PM";
|
|
264
|
-
return L ? F.toLowerCase() : F;
|
|
265
|
-
};
|
|
266
|
-
return h.replace(he, (function(O, v) {
|
|
267
|
-
return v || (function(L) {
|
|
268
|
-
switch (L) {
|
|
269
|
-
case "YY":
|
|
270
|
-
return String(a.$y).slice(-2);
|
|
271
|
-
case "YYYY":
|
|
272
|
-
return o.s(a.$y, 4, "0");
|
|
273
|
-
case "M":
|
|
274
|
-
return d + 1;
|
|
275
|
-
case "MM":
|
|
276
|
-
return o.s(d + 1, 2, "0");
|
|
277
|
-
case "MMM":
|
|
278
|
-
return B(u.monthsShort, d, M, 3);
|
|
279
|
-
case "MMMM":
|
|
280
|
-
return B(M, d);
|
|
281
|
-
case "D":
|
|
282
|
-
return a.$D;
|
|
283
|
-
case "DD":
|
|
284
|
-
return o.s(a.$D, 2, "0");
|
|
285
|
-
case "d":
|
|
286
|
-
return String(a.$W);
|
|
287
|
-
case "dd":
|
|
288
|
-
return B(u.weekdaysMin, a.$W, x, 2);
|
|
289
|
-
case "ddd":
|
|
290
|
-
return B(u.weekdaysShort, a.$W, x, 3);
|
|
291
|
-
case "dddd":
|
|
292
|
-
return x[a.$W];
|
|
293
|
-
case "H":
|
|
294
|
-
return String(p);
|
|
295
|
-
case "HH":
|
|
296
|
-
return o.s(p, 2, "0");
|
|
297
|
-
case "h":
|
|
298
|
-
return k(1);
|
|
299
|
-
case "hh":
|
|
300
|
-
return k(2);
|
|
301
|
-
case "a":
|
|
302
|
-
return E(p, _, !0);
|
|
303
|
-
case "A":
|
|
304
|
-
return E(p, _, !1);
|
|
305
|
-
case "m":
|
|
306
|
-
return String(_);
|
|
307
|
-
case "mm":
|
|
308
|
-
return o.s(_, 2, "0");
|
|
309
|
-
case "s":
|
|
310
|
-
return String(a.$s);
|
|
311
|
-
case "ss":
|
|
312
|
-
return o.s(a.$s, 2, "0");
|
|
313
|
-
case "SSS":
|
|
314
|
-
return o.s(a.$ms, 3, "0");
|
|
315
|
-
case "Z":
|
|
316
|
-
return y;
|
|
317
|
-
}
|
|
318
|
-
return null;
|
|
319
|
-
})(O) || y.replace(":", "");
|
|
320
|
-
}));
|
|
321
|
-
}, f.utcOffset = function() {
|
|
322
|
-
return 15 * -Math.round(this.$d.getTimezoneOffset() / 15);
|
|
323
|
-
}, f.diff = function(c, a, u) {
|
|
324
|
-
var h, y = this, p = o.p(a), _ = n(c), d = (_.utcOffset() - this.utcOffset()) * l, x = this - _, M = function() {
|
|
325
|
-
return o.m(y, _);
|
|
326
|
-
};
|
|
327
|
-
switch (p) {
|
|
328
|
-
case K:
|
|
329
|
-
h = M() / 12;
|
|
330
|
-
break;
|
|
331
|
-
case W:
|
|
332
|
-
h = M();
|
|
333
|
-
break;
|
|
334
|
-
case X:
|
|
335
|
-
h = M() / 3;
|
|
336
|
-
break;
|
|
337
|
-
case P:
|
|
338
|
-
h = (x - d) / 6048e5;
|
|
339
|
-
break;
|
|
340
|
-
case w:
|
|
341
|
-
h = (x - d) / 864e5;
|
|
342
|
-
break;
|
|
343
|
-
case q:
|
|
344
|
-
h = x / $;
|
|
345
|
-
break;
|
|
346
|
-
case H:
|
|
347
|
-
h = x / l;
|
|
348
|
-
break;
|
|
349
|
-
case j:
|
|
350
|
-
h = x / s;
|
|
351
|
-
break;
|
|
352
|
-
default:
|
|
353
|
-
h = x;
|
|
354
|
-
}
|
|
355
|
-
return u ? h : o.a(h);
|
|
356
|
-
}, f.daysInMonth = function() {
|
|
357
|
-
return this.endOf(W).$D;
|
|
358
|
-
}, f.$locale = function() {
|
|
359
|
-
return Y[this.$L];
|
|
360
|
-
}, f.locale = function(c, a) {
|
|
361
|
-
if (!c) return this.$L;
|
|
362
|
-
var u = this.clone(), h = t(c, a, !0);
|
|
363
|
-
return h && (u.$L = h), u;
|
|
364
|
-
}, f.clone = function() {
|
|
365
|
-
return o.w(this.$d, this);
|
|
366
|
-
}, f.toDate = function() {
|
|
367
|
-
return new Date(this.valueOf());
|
|
368
|
-
}, f.toJSON = function() {
|
|
369
|
-
return this.isValid() ? this.toISOString() : null;
|
|
370
|
-
}, f.toISOString = function() {
|
|
371
|
-
return this.$d.toISOString();
|
|
372
|
-
}, f.toString = function() {
|
|
373
|
-
return this.$d.toUTCString();
|
|
374
|
-
}, m;
|
|
375
|
-
})(), b = g.prototype;
|
|
376
|
-
return n.prototype = b, [["$ms", C], ["$s", j], ["$m", H], ["$H", q], ["$W", w], ["$M", W], ["$y", K], ["$D", Q]].forEach((function(m) {
|
|
377
|
-
b[m[1]] = function(f) {
|
|
378
|
-
return this.$g(f, m[0], m[1]);
|
|
379
|
-
};
|
|
380
|
-
})), n.extend = function(m, f) {
|
|
381
|
-
return m.$i || (m(f, g, n), m.$i = !0), n;
|
|
382
|
-
}, n.locale = t, n.isDayjs = e, n.unix = function(m) {
|
|
383
|
-
return n(1e3 * m);
|
|
384
|
-
}, n.en = Y[se], n.Ls = Y, n.p = {}, n;
|
|
385
|
-
}));
|
|
386
|
-
})(ye)), ye.exports;
|
|
387
|
-
}
|
|
388
|
-
var Pe = Ue();
|
|
389
|
-
const G = /* @__PURE__ */ Ce(Pe);
|
|
390
|
-
var _e = { exports: {} }, Ye = _e.exports, Ee;
|
|
391
|
-
function Ne() {
|
|
392
|
-
return Ee || (Ee = 1, (function(i, r) {
|
|
393
|
-
(function(s, l) {
|
|
394
|
-
i.exports = l();
|
|
395
|
-
})(Ye, (function() {
|
|
396
|
-
var s = { LTS: "h:mm:ss A", LT: "h:mm A", L: "MM/DD/YYYY", LL: "MMMM D, YYYY", LLL: "MMMM D, YYYY h:mm A", LLLL: "dddd, MMMM D, YYYY h:mm A" };
|
|
397
|
-
return function(l, $, C) {
|
|
398
|
-
var j = $.prototype, H = j.format;
|
|
399
|
-
C.en.formats = s, j.format = function(q) {
|
|
400
|
-
q === void 0 && (q = "YYYY-MM-DDTHH:mm:ssZ");
|
|
401
|
-
var w = this.$locale().formats, P = (function(W, X) {
|
|
402
|
-
return W.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g, (function(K, Q, ee) {
|
|
403
|
-
var ie = ee && ee.toUpperCase();
|
|
404
|
-
return Q || X[ee] || s[ee] || X[ie].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g, (function(he, le, oe) {
|
|
405
|
-
return le || oe.slice(1);
|
|
406
|
-
}));
|
|
407
|
-
}));
|
|
408
|
-
})(q, w === void 0 ? {} : w);
|
|
409
|
-
return H.call(this, P);
|
|
410
|
-
};
|
|
411
|
-
};
|
|
412
|
-
}));
|
|
413
|
-
})(_e)), _e.exports;
|
|
414
|
-
}
|
|
415
|
-
var He = Ne();
|
|
416
|
-
const qe = /* @__PURE__ */ Ce(He);
|
|
417
|
-
G.extend(qe);
|
|
418
|
-
Date.prototype.isAfter = function(i, r) {
|
|
419
|
-
return G(this).isAfter(i, r);
|
|
420
|
-
};
|
|
421
|
-
Date.prototype.isBefore = function(i, r) {
|
|
422
|
-
return G(this).isBefore(i, r);
|
|
423
|
-
};
|
|
424
|
-
Date.prototype.format = function(i) {
|
|
425
|
-
return G(this).format(i);
|
|
426
|
-
};
|
|
427
|
-
Date.prototype.isValid = function() {
|
|
428
|
-
return G(this).isValid();
|
|
429
|
-
};
|
|
430
|
-
Date.prototype.add = function(i, r) {
|
|
431
|
-
return G(this).add(i, r).toDate();
|
|
432
|
-
};
|
|
433
|
-
Date.prototype.subtract = function(i, r) {
|
|
434
|
-
return G(this).subtract(i, r).toDate();
|
|
435
|
-
};
|
|
436
|
-
Date.prototype.firstDayOfMonth = function() {
|
|
437
|
-
return G(this).startOf("month").toDate();
|
|
438
|
-
};
|
|
439
|
-
Date.prototype.lastDayOfMonth = function() {
|
|
440
|
-
return G(this).endOf("month").toDate();
|
|
441
|
-
};
|
|
442
|
-
Date.prototype.set = function(i, r) {
|
|
443
|
-
return G(this).set(i, r).toDate();
|
|
444
|
-
};
|
|
445
|
-
Date.prototype.diff = function(i, r) {
|
|
446
|
-
return G(this).diff(i, r);
|
|
447
|
-
};
|
|
448
|
-
String.prototype.capitalize = function() {
|
|
449
|
-
return this.charAt(0).toUpperCase() + this.slice(1);
|
|
450
|
-
};
|
|
451
|
-
String.prototype.isNumber = function() {
|
|
452
|
-
return !isNaN(Number(this)) && this.trim() !== "";
|
|
453
|
-
};
|
|
454
|
-
String.prototype.isEmpty = function() {
|
|
455
|
-
return this === void 0 || !this || this.length === 0;
|
|
456
|
-
};
|
|
457
|
-
var V = /* @__PURE__ */ ((i) => (i.opera = "opera", i.firefox = "firefox", i.safari = "safari", i.ie = "ie", i.edge = "edge", i.edg = "edg", i.electron = "electron", i.chrome = "chrome", i.iOsSafari = "iOsSafari", i.edgiOs = "edgiOs", i.headlessChrome = "headlessChrome", i))(V || {});
|
|
458
|
-
const de = {
|
|
459
|
-
xs: 0,
|
|
460
|
-
sm: 576,
|
|
461
|
-
md: 768,
|
|
462
|
-
lg: 992,
|
|
463
|
-
xl: 1200,
|
|
464
|
-
xxl: 1400,
|
|
465
|
-
xxxl: 1600
|
|
466
|
-
};
|
|
467
|
-
class Ve {
|
|
468
|
-
screenWidth = 0;
|
|
469
|
-
lastBreakpoint;
|
|
470
|
-
resizeListener;
|
|
471
|
-
breakpointChangeCallbacks = /* @__PURE__ */ new Set();
|
|
472
|
-
// feuert nur bei Breakpoint-Änderung
|
|
473
|
-
onResizeCallbacks = /* @__PURE__ */ new Set();
|
|
474
|
-
// feuert bei jedem throttled Resize
|
|
475
|
-
rafId = null;
|
|
476
|
-
emitTimeoutId = null;
|
|
477
|
-
// für debounce der onResizeCallbacks
|
|
478
|
-
pendingWidth;
|
|
479
|
-
pendingBreakpoint;
|
|
480
|
-
duplicateThresholdMs = 60;
|
|
481
|
-
constructor() {
|
|
482
|
-
typeof window < "u" && (this.screenWidth = window.innerWidth, this.resizeListener = this.onResize.bind(this), window.addEventListener("resize", this.resizeListener, { passive: !0 }), this.lastBreakpoint = this.getBreakpointByScreenWidth(this.screenWidth));
|
|
483
|
-
}
|
|
484
|
-
destroy() {
|
|
485
|
-
typeof window < "u" && window.removeEventListener("resize", this.resizeListener), this.breakpointChangeCallbacks.clear(), this.onResizeCallbacks.clear(), this.rafId !== null && (cancelAnimationFrame(this.rafId), this.rafId = null);
|
|
486
|
-
}
|
|
487
|
-
getCurrentBreakpoint() {
|
|
488
|
-
return this.lastBreakpoint;
|
|
489
|
-
}
|
|
490
|
-
getCurrentScreenWidth() {
|
|
491
|
-
return this.screenWidth;
|
|
492
|
-
}
|
|
493
|
-
onBreakpointChange(r) {
|
|
494
|
-
this.breakpointChangeCallbacks.add(r);
|
|
495
|
-
}
|
|
496
|
-
offBreakpointChange(r) {
|
|
497
|
-
this.breakpointChangeCallbacks.delete(r);
|
|
498
|
-
}
|
|
499
|
-
onResizeChange(r) {
|
|
500
|
-
this.onResizeCallbacks.add(r);
|
|
501
|
-
}
|
|
502
|
-
offResizeChange(r) {
|
|
503
|
-
this.onResizeCallbacks.delete(r);
|
|
504
|
-
}
|
|
505
|
-
getCurrentBrowser() {
|
|
506
|
-
const r = navigator.userAgent.toLowerCase();
|
|
507
|
-
if (this.isOpera()) return V.opera;
|
|
508
|
-
if (this.isFirefox()) return V.firefox;
|
|
509
|
-
if (this.isSafari()) return V.safari;
|
|
510
|
-
if (this.isIE()) return V.ie;
|
|
511
|
-
if (this.isEdge()) return V.edge;
|
|
512
|
-
if (this.isEdg()) return V.edg;
|
|
513
|
-
if (this.isElectron(r)) return V.electron;
|
|
514
|
-
if (this.isChrome()) return V.chrome;
|
|
515
|
-
if (this.isIOsSafari(r)) return V.iOsSafari;
|
|
516
|
-
if (this.isEdgiOs(r)) return V.edgiOs;
|
|
517
|
-
if (this.isHeadlessChrome(r)) return V.headlessChrome;
|
|
518
|
-
throw new Error("Browser could not be detected: " + r);
|
|
519
|
-
}
|
|
520
|
-
getBreakpointByScreenWidth(r = this.screenWidth) {
|
|
521
|
-
let s = "xs";
|
|
522
|
-
for (const l of Object.keys(de))
|
|
523
|
-
de[l] <= r && (s = l);
|
|
524
|
-
return { breakpoint: s, screenWidth: de[s] };
|
|
525
|
-
}
|
|
526
|
-
isScreenGreaterThan(r) {
|
|
527
|
-
return this.screenWidth > de[r];
|
|
528
|
-
}
|
|
529
|
-
isScreenSmallerThan(r) {
|
|
530
|
-
return this.screenWidth < de[r];
|
|
531
|
-
}
|
|
532
|
-
getBreakpoint(r) {
|
|
533
|
-
return {
|
|
534
|
-
breakpoint: r,
|
|
535
|
-
screenWidth: de[r]
|
|
536
|
-
};
|
|
537
|
-
}
|
|
538
|
-
isOpera() {
|
|
539
|
-
return typeof window < "u" && (!!window.opr && !!window.opr.addons || !!window.opera || navigator.userAgent.includes("OPR/"));
|
|
540
|
-
}
|
|
541
|
-
isFirefox() {
|
|
542
|
-
return typeof globalThis.InstallTrigger < "u";
|
|
543
|
-
}
|
|
544
|
-
isSafari() {
|
|
545
|
-
return typeof window > "u" ? !1 : /constructor/i.test(window.HTMLElement) || ((r) => r.toString() === "[object SafariRemoteNotification]")(
|
|
546
|
-
!window.safari || window.safari && window.safari.pushNotification
|
|
547
|
-
);
|
|
548
|
-
}
|
|
549
|
-
isIE() {
|
|
550
|
-
return typeof document > "u" ? !1 : !!document.documentMode;
|
|
551
|
-
}
|
|
552
|
-
isEdge() {
|
|
553
|
-
return typeof window > "u" ? !1 : !this.isIE() && !!window.StyleMedia;
|
|
554
|
-
}
|
|
555
|
-
isEdg() {
|
|
556
|
-
return typeof navigator > "u" ? !1 : navigator.userAgent.toLowerCase().includes("edg");
|
|
557
|
-
}
|
|
558
|
-
isElectron(r) {
|
|
559
|
-
return r.includes("electron");
|
|
560
|
-
}
|
|
561
|
-
isChrome() {
|
|
562
|
-
return typeof window > "u" ? !1 : !!window.chrome && !this.isOpera() && !this.isEdge() && !this.isEdg() && !this.isFirefox() && !this.isSafari() && !this.isIE();
|
|
563
|
-
}
|
|
564
|
-
isIOsSafari(r) {
|
|
565
|
-
return r.includes("iphone") || r.includes("ipad") || r.includes("macintosh") && typeof document < "u" && "ontouchend" in document && r.includes("safari");
|
|
566
|
-
}
|
|
567
|
-
isEdgiOs(r) {
|
|
568
|
-
return r.includes("edgios");
|
|
569
|
-
}
|
|
570
|
-
isHeadlessChrome(r) {
|
|
571
|
-
return r.includes("headlesschrome");
|
|
572
|
-
}
|
|
573
|
-
onResize = () => {
|
|
574
|
-
if (typeof window > "u") return;
|
|
575
|
-
const r = window.innerWidth, s = this.getBreakpointByScreenWidth(r);
|
|
576
|
-
this.lastBreakpoint?.breakpoint !== s?.breakpoint && (this.lastBreakpoint = s, s && this.breakpointChangeCallbacks.forEach((l) => l(s))), this.pendingWidth = r, this.pendingBreakpoint = s, this.emitTimeoutId && clearTimeout(this.emitTimeoutId), this.emitTimeoutId = window.setTimeout(() => {
|
|
577
|
-
this.pendingBreakpoint && this.onResizeCallbacks.forEach((l) => l(this.pendingWidth, this.pendingBreakpoint)), this.pendingWidth = void 0, this.pendingBreakpoint = void 0, this.emitTimeoutId = null;
|
|
578
|
-
}, this.duplicateThresholdMs);
|
|
579
|
-
};
|
|
1
|
+
function Ze(s) {
|
|
2
|
+
return navigator.clipboard.writeText(s);
|
|
580
3
|
}
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
return navigator.clipboard.writeText(r);
|
|
584
|
-
}
|
|
4
|
+
function Re(s) {
|
|
5
|
+
return s && s.__esModule && Object.prototype.hasOwnProperty.call(s, "default") ? s.default : s;
|
|
585
6
|
}
|
|
586
|
-
var
|
|
7
|
+
var ve = { exports: {} };
|
|
587
8
|
/* @license
|
|
588
9
|
Papa Parse
|
|
589
10
|
v5.5.3
|
|
590
11
|
https://github.com/mholt/PapaParse
|
|
591
12
|
License: MIT
|
|
592
13
|
*/
|
|
593
|
-
var
|
|
594
|
-
function
|
|
595
|
-
return Oe || (Oe = 1, (function(
|
|
596
|
-
((
|
|
597
|
-
|
|
598
|
-
})(
|
|
599
|
-
var l = typeof self < "u" ? self : typeof window < "u" ? window : l !== void 0 ? l : {},
|
|
600
|
-
function
|
|
14
|
+
var Ae = ve.exports, Oe;
|
|
15
|
+
function Ie() {
|
|
16
|
+
return Oe || (Oe = 1, (function(s, r) {
|
|
17
|
+
((i, l) => {
|
|
18
|
+
s.exports = l();
|
|
19
|
+
})(Ae, function i() {
|
|
20
|
+
var l = typeof self < "u" ? self : typeof window < "u" ? window : l !== void 0 ? l : {}, x, M = !l.document && !!l.postMessage, I = l.IS_PAPA_WORKER || !1, P = {}, Y = 0, w = {};
|
|
21
|
+
function N(e) {
|
|
601
22
|
this._handle = null, this._finished = !1, this._completed = !1, this._halted = !1, this._input = null, this._baseIndex = 0, this._partialLine = "", this._rowCount = 0, this._start = 0, this._nextChunk = null, this.isFirstChunk = !0, this._completeResults = { data: [], errors: [], meta: {} }, (function(t) {
|
|
602
23
|
var n = se(t);
|
|
603
24
|
n.chunkSize = parseInt(n.chunkSize), t.step || t.chunk || (n.chunkSize = null), this._handle = new ee(n), (this._handle.streamer = this)._config = n;
|
|
@@ -607,24 +28,24 @@ function Je() {
|
|
|
607
28
|
let b = this._config.newline;
|
|
608
29
|
b || (g = this._config.quoteChar || '"', b = this._handle.guessLineEndings(t, g)), t = [...t.split(b).slice(o)].join(b);
|
|
609
30
|
}
|
|
610
|
-
this.isFirstChunk &&
|
|
31
|
+
this.isFirstChunk && $(this._config.beforeFirstChunk) && (g = this._config.beforeFirstChunk(t)) !== void 0 && (t = g), this.isFirstChunk = !1, this._halted = !1;
|
|
611
32
|
var o = this._partialLine + t, g = (this._partialLine = "", this._handle.parse(o, this._baseIndex, !this._finished));
|
|
612
33
|
if (!this._handle.paused() && !this._handle.aborted()) {
|
|
613
|
-
if (t = g.meta.cursor, o = (this._finished || (this._partialLine = o.substring(t - this._baseIndex), this._baseIndex = t), g && g.data && (this._rowCount += g.data.length), this._finished || this._config.preview && this._rowCount >= this._config.preview),
|
|
614
|
-
else if (
|
|
34
|
+
if (t = g.meta.cursor, o = (this._finished || (this._partialLine = o.substring(t - this._baseIndex), this._baseIndex = t), g && g.data && (this._rowCount += g.data.length), this._finished || this._config.preview && this._rowCount >= this._config.preview), I) l.postMessage({ results: g, workerId: w.WORKER_ID, finished: o });
|
|
35
|
+
else if ($(this._config.chunk) && !n) {
|
|
615
36
|
if (this._config.chunk(g, this._handle), this._handle.paused() || this._handle.aborted()) return void (this._halted = !0);
|
|
616
37
|
this._completeResults = g = void 0;
|
|
617
38
|
}
|
|
618
|
-
return this._config.step || this._config.chunk || (this._completeResults.data = this._completeResults.data.concat(g.data), this._completeResults.errors = this._completeResults.errors.concat(g.errors), this._completeResults.meta = g.meta), this._completed || !o ||
|
|
39
|
+
return this._config.step || this._config.chunk || (this._completeResults.data = this._completeResults.data.concat(g.data), this._completeResults.errors = this._completeResults.errors.concat(g.errors), this._completeResults.meta = g.meta), this._completed || !o || !$(this._config.complete) || g && g.meta.aborted || (this._config.complete(this._completeResults, this._input), this._completed = !0), o || g && g.meta.paused || this._nextChunk(), g;
|
|
619
40
|
}
|
|
620
41
|
this._halted = !0;
|
|
621
42
|
}, this._sendError = function(t) {
|
|
622
|
-
|
|
43
|
+
$(this._config.error) ? this._config.error(t) : I && this._config.error && l.postMessage({ workerId: w.WORKER_ID, error: t, finished: !1 });
|
|
623
44
|
};
|
|
624
45
|
}
|
|
625
46
|
function W(e) {
|
|
626
47
|
var t;
|
|
627
|
-
(e = e || {}).chunkSize || (e.chunkSize = w.RemoteChunkSize),
|
|
48
|
+
(e = e || {}).chunkSize || (e.chunkSize = w.RemoteChunkSize), N.call(this, e), this._nextChunk = M ? function() {
|
|
628
49
|
this._readChunk(), this._chunkLoaded();
|
|
629
50
|
} : function() {
|
|
630
51
|
this._readChunk();
|
|
@@ -633,7 +54,7 @@ function Je() {
|
|
|
633
54
|
}, this._readChunk = function() {
|
|
634
55
|
if (this._finished) this._chunkLoaded();
|
|
635
56
|
else {
|
|
636
|
-
if (t = new XMLHttpRequest(), this._config.withCredentials && (t.withCredentials = this._config.withCredentials),
|
|
57
|
+
if (t = new XMLHttpRequest(), this._config.withCredentials && (t.withCredentials = this._config.withCredentials), M || (t.onload = H(this._chunkLoaded, this), t.onerror = H(this._chunkError, this)), t.open(this._config.downloadRequestBody ? "POST" : "GET", this._input, !M), this._config.downloadRequestHeaders) {
|
|
637
58
|
var n, o = this._config.downloadRequestHeaders;
|
|
638
59
|
for (n in o) t.setRequestHeader(n, o[n]);
|
|
639
60
|
}
|
|
@@ -644,7 +65,7 @@ function Je() {
|
|
|
644
65
|
} catch (b) {
|
|
645
66
|
this._chunkError(b.message);
|
|
646
67
|
}
|
|
647
|
-
|
|
68
|
+
M && t.status === 0 && this._chunkError();
|
|
648
69
|
}
|
|
649
70
|
}, this._chunkLoaded = function() {
|
|
650
71
|
t.readyState === 4 && (t.status < 200 || 400 <= t.status ? this._chunkError() : (this._start += this._config.chunkSize || t.responseText.length, this._finished = !this._config.chunkSize || this._start >= ((n) => (n = n.getResponseHeader("Content-Range")) !== null ? parseInt(n.substring(n.lastIndexOf("/") + 1)) : -1)(t), this.parseChunk(t.responseText)));
|
|
@@ -653,10 +74,10 @@ function Je() {
|
|
|
653
74
|
};
|
|
654
75
|
}
|
|
655
76
|
function X(e) {
|
|
656
|
-
(e = e || {}).chunkSize || (e.chunkSize = w.LocalChunkSize),
|
|
77
|
+
(e = e || {}).chunkSize || (e.chunkSize = w.LocalChunkSize), N.call(this, e);
|
|
657
78
|
var t, n, o = typeof FileReader < "u";
|
|
658
79
|
this.stream = function(g) {
|
|
659
|
-
this._input = g, n = g.slice || g.webkitSlice || g.mozSlice, o ? ((t = new FileReader()).onload =
|
|
80
|
+
this._input = g, n = g.slice || g.webkitSlice || g.mozSlice, o ? ((t = new FileReader()).onload = H(this._chunkLoaded, this), t.onerror = H(this._chunkError, this)) : t = new FileReaderSync(), this._nextChunk();
|
|
660
81
|
}, this._nextChunk = function() {
|
|
661
82
|
this._finished || this._config.preview && !(this._rowCount < this._config.preview) || this._readChunk();
|
|
662
83
|
}, this._readChunk = function() {
|
|
@@ -670,7 +91,7 @@ function Je() {
|
|
|
670
91
|
}
|
|
671
92
|
function K(e) {
|
|
672
93
|
var t;
|
|
673
|
-
|
|
94
|
+
N.call(this, e = e || {}), this.stream = function(n) {
|
|
674
95
|
return t = n, this._nextChunk();
|
|
675
96
|
}, this._nextChunk = function() {
|
|
676
97
|
var n, o;
|
|
@@ -678,100 +99,100 @@ function Je() {
|
|
|
678
99
|
};
|
|
679
100
|
}
|
|
680
101
|
function Q(e) {
|
|
681
|
-
|
|
102
|
+
N.call(this, e = e || {});
|
|
682
103
|
var t = [], n = !0, o = !1;
|
|
683
104
|
this.pause = function() {
|
|
684
|
-
|
|
105
|
+
N.prototype.pause.apply(this, arguments), this._input.pause();
|
|
685
106
|
}, this.resume = function() {
|
|
686
|
-
|
|
107
|
+
N.prototype.resume.apply(this, arguments), this._input.resume();
|
|
687
108
|
}, this.stream = function(g) {
|
|
688
109
|
this._input = g, this._input.on("data", this._streamData), this._input.on("end", this._streamEnd), this._input.on("error", this._streamError);
|
|
689
110
|
}, this._checkIsFinished = function() {
|
|
690
111
|
o && t.length === 1 && (this._finished = !0);
|
|
691
112
|
}, this._nextChunk = function() {
|
|
692
113
|
this._checkIsFinished(), t.length ? this.parseChunk(t.shift()) : n = !0;
|
|
693
|
-
}, this._streamData =
|
|
114
|
+
}, this._streamData = H(function(g) {
|
|
694
115
|
try {
|
|
695
116
|
t.push(typeof g == "string" ? g : g.toString(this._config.encoding)), n && (n = !1, this._checkIsFinished(), this.parseChunk(t.shift()));
|
|
696
117
|
} catch (b) {
|
|
697
118
|
this._streamError(b);
|
|
698
119
|
}
|
|
699
|
-
}, this), this._streamError =
|
|
120
|
+
}, this), this._streamError = H(function(g) {
|
|
700
121
|
this._streamCleanUp(), this._sendError(g);
|
|
701
|
-
}, this), this._streamEnd =
|
|
122
|
+
}, this), this._streamEnd = H(function() {
|
|
702
123
|
this._streamCleanUp(), o = !0, this._streamData("");
|
|
703
|
-
}, this), this._streamCleanUp =
|
|
124
|
+
}, this), this._streamCleanUp = H(function() {
|
|
704
125
|
this._input.removeListener("data", this._streamData), this._input.removeListener("end", this._streamEnd), this._input.removeListener("error", this._streamError);
|
|
705
126
|
}, this);
|
|
706
127
|
}
|
|
707
128
|
function ee(e) {
|
|
708
|
-
var t, n, o, g, b = Math.pow(2, 53), m = -b,
|
|
709
|
-
function
|
|
129
|
+
var t, n, o, g, b = Math.pow(2, 53), m = -b, c = /^\s*-?(\d+\.?|\.\d+|\d+\.\d+)([eE][-+]?\d+)?\s*$/, f = /^((\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d\.\d+([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z)))$/, a = this, u = 0, h = 0, y = !1, p = !1, _ = [], d = { data: [], errors: [], meta: {} };
|
|
130
|
+
function D(k) {
|
|
710
131
|
return e.skipEmptyLines === "greedy" ? k.join("").trim() === "" : k.length === 1 && k[0].length === 0;
|
|
711
132
|
}
|
|
712
|
-
function
|
|
713
|
-
if (d && o && (
|
|
714
|
-
return !
|
|
715
|
-
})),
|
|
716
|
-
let v = function(
|
|
717
|
-
|
|
133
|
+
function R() {
|
|
134
|
+
if (d && o && (j("Delimiter", "UndetectableDelimiter", "Unable to auto-detect delimiting character; defaulted to '" + w.DefaultDelimiter + "'"), o = !1), e.skipEmptyLines && (d.data = d.data.filter(function(v) {
|
|
135
|
+
return !D(v);
|
|
136
|
+
})), F()) {
|
|
137
|
+
let v = function(A, z) {
|
|
138
|
+
$(e.transformHeader) && (A = e.transformHeader(A, z)), _.push(A);
|
|
718
139
|
};
|
|
719
140
|
if (d) if (Array.isArray(d.data[0])) {
|
|
720
|
-
for (var k = 0;
|
|
141
|
+
for (var k = 0; F() && k < d.data.length; k++) d.data[k].forEach(v);
|
|
721
142
|
d.data.splice(0, 1);
|
|
722
143
|
} else d.data.forEach(v);
|
|
723
144
|
}
|
|
724
|
-
function E(v,
|
|
725
|
-
for (var
|
|
726
|
-
var
|
|
727
|
-
if (
|
|
145
|
+
function E(v, A) {
|
|
146
|
+
for (var z = e.header ? {} : [], L = 0; L < v.length; L++) {
|
|
147
|
+
var T = L, C = v[L], C = ((Z, S) => ((B) => (e.dynamicTypingFunction && e.dynamicTyping[B] === void 0 && (e.dynamicTyping[B] = e.dynamicTypingFunction(B)), (e.dynamicTyping[B] || e.dynamicTyping) === !0))(Z) ? S === "true" || S === "TRUE" || S !== "false" && S !== "FALSE" && (((B) => {
|
|
148
|
+
if (c.test(B) && (B = parseFloat(B), m < B && B < b))
|
|
728
149
|
return 1;
|
|
729
|
-
})(S) ? parseFloat(S) :
|
|
730
|
-
|
|
150
|
+
})(S) ? parseFloat(S) : f.test(S) ? new Date(S) : S === "" ? null : S) : S)(T = e.header ? L >= _.length ? "__parsed_extra" : _[L] : T, C = e.transform ? e.transform(C, T) : C);
|
|
151
|
+
T === "__parsed_extra" ? (z[T] = z[T] || [], z[T].push(C)) : z[T] = C;
|
|
731
152
|
}
|
|
732
|
-
return e.header && (
|
|
153
|
+
return e.header && (L > _.length ? j("FieldMismatch", "TooManyFields", "Too many fields: expected " + _.length + " fields but parsed " + L, h + A) : L < _.length && j("FieldMismatch", "TooFewFields", "Too few fields: expected " + _.length + " fields but parsed " + L, h + A)), z;
|
|
733
154
|
}
|
|
734
155
|
var O;
|
|
735
156
|
d && (e.header || e.dynamicTyping || e.transform) && (O = 1, !d.data.length || Array.isArray(d.data[0]) ? (d.data = d.data.map(E), O = d.data.length) : d.data = E(d.data, 0), e.header && d.meta && (d.meta.fields = _), h += O);
|
|
736
157
|
}
|
|
737
|
-
function
|
|
158
|
+
function F() {
|
|
738
159
|
return e.header && _.length === 0;
|
|
739
160
|
}
|
|
740
|
-
function
|
|
161
|
+
function j(k, E, O, v) {
|
|
741
162
|
k = { type: k, code: E, message: O }, v !== void 0 && (k.row = v), d.errors.push(k);
|
|
742
163
|
}
|
|
743
|
-
|
|
744
|
-
d = k,
|
|
164
|
+
$(e.step) && (g = e.step, e.step = function(k) {
|
|
165
|
+
d = k, F() ? R() : (R(), d.data.length !== 0 && (u += k.data.length, e.preview && u > e.preview ? n.abort() : (d.data = d.data[0], g(d, a))));
|
|
745
166
|
}), this.parse = function(k, E, O) {
|
|
746
|
-
var v = e.quoteChar || '"', v = (e.newline || (e.newline = this.guessLineEndings(k, v)), o = !1, e.delimiter ?
|
|
747
|
-
var Z, S,
|
|
748
|
-
|
|
749
|
-
for (var
|
|
750
|
-
for (var te,
|
|
751
|
-
0 < J.data.length && (re /= J.data.length - U), (S === void 0 ||
|
|
167
|
+
var v = e.quoteChar || '"', v = (e.newline || (e.newline = this.guessLineEndings(k, v)), o = !1, e.delimiter ? $(e.delimiter) && (e.delimiter = e.delimiter(k), d.meta.delimiter = e.delimiter) : ((v = ((A, z, L, T, C) => {
|
|
168
|
+
var Z, S, B, ue;
|
|
169
|
+
C = C || [",", " ", "|", ";", w.RECORD_SEP, w.UNIT_SEP];
|
|
170
|
+
for (var fe = 0; fe < C.length; fe++) {
|
|
171
|
+
for (var te, me = C[fe], q = 0, re = 0, U = 0, J = (B = void 0, new he({ comments: T, delimiter: me, newline: z, preview: 10 }).parse(A)), ae = 0; ae < J.data.length; ae++) L && D(J.data[ae]) ? U++ : (te = J.data[ae].length, re += te, B === void 0 ? B = te : 0 < te && (q += Math.abs(te - B), B = te));
|
|
172
|
+
0 < J.data.length && (re /= J.data.length - U), (S === void 0 || q <= S) && (ue === void 0 || ue < re) && 1.99 < re && (S = q, Z = me, ue = re);
|
|
752
173
|
}
|
|
753
174
|
return { successful: !!(e.delimiter = Z), bestDelimiter: Z };
|
|
754
175
|
})(k, e.newline, e.skipEmptyLines, e.comments, e.delimitersToGuess)).successful ? e.delimiter = v.bestDelimiter : (o = !0, e.delimiter = w.DefaultDelimiter), d.meta.delimiter = e.delimiter), se(e));
|
|
755
|
-
return e.preview && e.header && v.preview++, t = k, n = new he(v), d = n.parse(t, E, O),
|
|
176
|
+
return e.preview && e.header && v.preview++, t = k, n = new he(v), d = n.parse(t, E, O), R(), y ? { meta: { paused: !0 } } : d || { meta: { paused: !1 } };
|
|
756
177
|
}, this.paused = function() {
|
|
757
178
|
return y;
|
|
758
179
|
}, this.pause = function() {
|
|
759
|
-
y = !0, n.abort(), t =
|
|
180
|
+
y = !0, n.abort(), t = $(e.chunk) ? "" : t.substring(n.getCharIndex());
|
|
760
181
|
}, this.resume = function() {
|
|
761
182
|
a.streamer._halted ? (y = !1, a.streamer.parseChunk(t, !0)) : setTimeout(a.resume, 3);
|
|
762
183
|
}, this.aborted = function() {
|
|
763
184
|
return p;
|
|
764
185
|
}, this.abort = function() {
|
|
765
|
-
p = !0, n.abort(), d.meta.aborted = !0,
|
|
766
|
-
}, this.guessLineEndings = function(
|
|
767
|
-
|
|
768
|
-
var v = new RegExp(ie(v) + "([^]*?)" + ie(v), "gm"), O = (
|
|
769
|
-
`),
|
|
770
|
-
if (O.length === 1 ||
|
|
186
|
+
p = !0, n.abort(), d.meta.aborted = !0, $(e.complete) && e.complete(d), t = "";
|
|
187
|
+
}, this.guessLineEndings = function(A, v) {
|
|
188
|
+
A = A.substring(0, 1048576);
|
|
189
|
+
var v = new RegExp(ie(v) + "([^]*?)" + ie(v), "gm"), O = (A = A.replace(v, "")).split("\r"), v = A.split(`
|
|
190
|
+
`), A = 1 < v.length && v[0].length < O[0].length;
|
|
191
|
+
if (O.length === 1 || A) return `
|
|
771
192
|
`;
|
|
772
|
-
for (var
|
|
773
|
-
` &&
|
|
774
|
-
return
|
|
193
|
+
for (var z = 0, L = 0; L < O.length; L++) O[L][0] === `
|
|
194
|
+
` && z++;
|
|
195
|
+
return z >= O.length / 2 ? `\r
|
|
775
196
|
` : "\r";
|
|
776
197
|
};
|
|
777
198
|
}
|
|
@@ -779,7 +200,7 @@ function Je() {
|
|
|
779
200
|
return e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
780
201
|
}
|
|
781
202
|
function he(e) {
|
|
782
|
-
var t = (e = e || {}).delimiter, n = e.newline, o = e.comments, g = e.step, b = e.preview, m = e.fastMode,
|
|
203
|
+
var t = (e = e || {}).delimiter, n = e.newline, o = e.comments, g = e.step, b = e.preview, m = e.fastMode, c = null, f = !1, a = e.quoteChar == null ? '"' : e.quoteChar, u = a;
|
|
783
204
|
if (e.escapeChar !== void 0 && (u = e.escapeChar), (typeof t != "string" || -1 < w.BAD_DELIMITERS.indexOf(t)) && (t = ","), o === t) throw new Error("Comment character same as delimiter");
|
|
784
205
|
o === !0 ? o = "#" : (typeof o != "string" || -1 < w.BAD_DELIMITERS.indexOf(o)) && (o = !1), n !== `
|
|
785
206
|
` && n !== "\r" && n !== `\r
|
|
@@ -788,335 +209,930 @@ function Je() {
|
|
|
788
209
|
var h = 0, y = !1;
|
|
789
210
|
this.parse = function(p, _, d) {
|
|
790
211
|
if (typeof p != "string") throw new Error("Input must be a string");
|
|
791
|
-
var
|
|
792
|
-
if (!p) return
|
|
212
|
+
var D = p.length, R = t.length, F = n.length, j = o.length, k = $(g), E = [], O = [], v = [], A = h = 0;
|
|
213
|
+
if (!p) return q();
|
|
793
214
|
if (m || m !== !1 && p.indexOf(a) === -1) {
|
|
794
|
-
for (var
|
|
795
|
-
if (v =
|
|
796
|
-
else if (d) return
|
|
797
|
-
if (!o || v.substring(0,
|
|
215
|
+
for (var z = p.split(n), L = 0; L < z.length; L++) {
|
|
216
|
+
if (v = z[L], h += v.length, L !== z.length - 1) h += n.length;
|
|
217
|
+
else if (d) return q();
|
|
218
|
+
if (!o || v.substring(0, j) !== o) {
|
|
798
219
|
if (k) {
|
|
799
|
-
if (E = [], ue(v.split(t)), re(), y) return
|
|
220
|
+
if (E = [], ue(v.split(t)), re(), y) return q();
|
|
800
221
|
} else ue(v.split(t));
|
|
801
|
-
if (b && b <=
|
|
222
|
+
if (b && b <= L) return E = E.slice(0, b), q(!0);
|
|
223
|
+
}
|
|
224
|
+
}
|
|
225
|
+
return q();
|
|
226
|
+
}
|
|
227
|
+
for (var T = p.indexOf(t, h), C = p.indexOf(n, h), Z = new RegExp(ie(u) + ie(a), "g"), S = p.indexOf(a, h); ; ) if (p[h] === a) for (S = h, h++; ; ) {
|
|
228
|
+
if ((S = p.indexOf(a, S + 1)) === -1) return d || O.push({ type: "Quotes", code: "MissingQuotes", message: "Quoted field unterminated", row: E.length, index: h }), te();
|
|
229
|
+
if (S === D - 1) return te(p.substring(h, S).replace(Z, a));
|
|
230
|
+
if (a === u && p[S + 1] === u) S++;
|
|
231
|
+
else if (a === u || S === 0 || p[S - 1] !== u) {
|
|
232
|
+
T !== -1 && T < S + 1 && (T = p.indexOf(t, S + 1));
|
|
233
|
+
var B = fe((C = C !== -1 && C < S + 1 ? p.indexOf(n, S + 1) : C) === -1 ? T : Math.min(T, C));
|
|
234
|
+
if (p.substr(S + 1 + B, R) === t) {
|
|
235
|
+
v.push(p.substring(h, S).replace(Z, a)), p[h = S + 1 + B + R] !== a && (S = p.indexOf(a, h)), T = p.indexOf(t, h), C = p.indexOf(n, h);
|
|
236
|
+
break;
|
|
237
|
+
}
|
|
238
|
+
if (B = fe(C), p.substring(S + 1 + B, S + 1 + B + F) === n) {
|
|
239
|
+
if (v.push(p.substring(h, S).replace(Z, a)), me(S + 1 + B + F), T = p.indexOf(t, h), S = p.indexOf(a, h), k && (re(), y)) return q();
|
|
240
|
+
if (b && E.length >= b) return q(!0);
|
|
241
|
+
break;
|
|
802
242
|
}
|
|
243
|
+
O.push({ type: "Quotes", code: "InvalidQuotes", message: "Trailing quote on quoted field is malformed", row: E.length, index: h }), S++;
|
|
244
|
+
}
|
|
245
|
+
}
|
|
246
|
+
else if (o && v.length === 0 && p.substring(h, h + j) === o) {
|
|
247
|
+
if (C === -1) return q();
|
|
248
|
+
h = C + F, C = p.indexOf(n, h), T = p.indexOf(t, h);
|
|
249
|
+
} else if (T !== -1 && (T < C || C === -1)) v.push(p.substring(h, T)), h = T + R, T = p.indexOf(t, h);
|
|
250
|
+
else {
|
|
251
|
+
if (C === -1) break;
|
|
252
|
+
if (v.push(p.substring(h, C)), me(C + F), k && (re(), y)) return q();
|
|
253
|
+
if (b && E.length >= b) return q(!0);
|
|
254
|
+
}
|
|
255
|
+
return te();
|
|
256
|
+
function ue(U) {
|
|
257
|
+
E.push(U), A = h;
|
|
258
|
+
}
|
|
259
|
+
function fe(U) {
|
|
260
|
+
var J = 0;
|
|
261
|
+
return J = U !== -1 && (U = p.substring(S + 1, U)) && U.trim() === "" ? U.length : J;
|
|
262
|
+
}
|
|
263
|
+
function te(U) {
|
|
264
|
+
return d || (U === void 0 && (U = p.substring(h)), v.push(U), h = D, ue(v), k && re()), q();
|
|
265
|
+
}
|
|
266
|
+
function me(U) {
|
|
267
|
+
h = U, ue(v), v = [], C = p.indexOf(n, h);
|
|
268
|
+
}
|
|
269
|
+
function q(U) {
|
|
270
|
+
if (e.header && !_ && E.length && !f) {
|
|
271
|
+
var J = E[0], ae = /* @__PURE__ */ Object.create(null), Se = new Set(J);
|
|
272
|
+
let Ee = !1;
|
|
273
|
+
for (let le = 0; le < J.length; le++) {
|
|
274
|
+
let ne = J[le];
|
|
275
|
+
if (ae[ne = $(e.transformHeader) ? e.transformHeader(ne, le) : ne]) {
|
|
276
|
+
let ye, xe = ae[ne];
|
|
277
|
+
for (; ye = ne + "_" + xe, xe++, Se.has(ye); ) ;
|
|
278
|
+
Se.add(ye), J[le] = ye, ae[ne]++, Ee = !0, (c = c === null ? {} : c)[ye] = ne;
|
|
279
|
+
} else ae[ne] = 1, J[le] = ne;
|
|
280
|
+
Se.add(ne);
|
|
281
|
+
}
|
|
282
|
+
Ee && console.warn("Duplicate headers found and renamed."), f = !0;
|
|
283
|
+
}
|
|
284
|
+
return { data: E, errors: O, meta: { delimiter: t, linebreak: n, aborted: y, truncated: !!U, cursor: A + (_ || 0), renamedHeaders: c } };
|
|
285
|
+
}
|
|
286
|
+
function re() {
|
|
287
|
+
g(q()), E = [], O = [];
|
|
288
|
+
}
|
|
289
|
+
}, this.abort = function() {
|
|
290
|
+
y = !0;
|
|
291
|
+
}, this.getCharIndex = function() {
|
|
292
|
+
return h;
|
|
293
|
+
};
|
|
294
|
+
}
|
|
295
|
+
function ge(e) {
|
|
296
|
+
var t = e.data, n = P[t.workerId], o = !1;
|
|
297
|
+
if (t.error) n.userError(t.error, t.file);
|
|
298
|
+
else if (t.results && t.results.data) {
|
|
299
|
+
var g = { abort: function() {
|
|
300
|
+
o = !0, oe(t.workerId, { data: [], errors: [], meta: { aborted: !0 } });
|
|
301
|
+
}, pause: we, resume: we };
|
|
302
|
+
if ($(n.userStep)) {
|
|
303
|
+
for (var b = 0; b < t.results.data.length && (n.userStep({ data: t.results.data[b], errors: t.results.errors, meta: t.results.meta }, g), !o); b++) ;
|
|
304
|
+
delete t.results;
|
|
305
|
+
} else $(n.userChunk) && (n.userChunk(t.results, g, t.file), delete t.results);
|
|
306
|
+
}
|
|
307
|
+
t.finished && !o && oe(t.workerId, t.results);
|
|
308
|
+
}
|
|
309
|
+
function oe(e, t) {
|
|
310
|
+
var n = P[e];
|
|
311
|
+
$(n.userComplete) && n.userComplete(t), n.terminate(), delete P[e];
|
|
312
|
+
}
|
|
313
|
+
function we() {
|
|
314
|
+
throw new Error("Not implemented.");
|
|
315
|
+
}
|
|
316
|
+
function se(e) {
|
|
317
|
+
if (typeof e != "object" || e === null) return e;
|
|
318
|
+
var t, n = Array.isArray(e) ? [] : {};
|
|
319
|
+
for (t in e) n[t] = se(e[t]);
|
|
320
|
+
return n;
|
|
321
|
+
}
|
|
322
|
+
function H(e, t) {
|
|
323
|
+
return function() {
|
|
324
|
+
e.apply(t, arguments);
|
|
325
|
+
};
|
|
326
|
+
}
|
|
327
|
+
function $(e) {
|
|
328
|
+
return typeof e == "function";
|
|
329
|
+
}
|
|
330
|
+
return w.parse = function(e, t) {
|
|
331
|
+
var n = (t = t || {}).dynamicTyping || !1;
|
|
332
|
+
if ($(n) && (t.dynamicTypingFunction = n, n = {}), t.dynamicTyping = n, t.transform = !!$(t.transform) && t.transform, !t.worker || !w.WORKERS_SUPPORTED) return n = null, w.NODE_STREAM_INPUT, typeof e == "string" ? (e = ((o) => o.charCodeAt(0) !== 65279 ? o : o.slice(1))(e), n = new (t.download ? W : K)(t)) : e.readable === !0 && $(e.read) && $(e.on) ? n = new Q(t) : (l.File && e instanceof File || e instanceof Object) && (n = new X(t)), n.stream(e);
|
|
333
|
+
(n = (() => {
|
|
334
|
+
var o;
|
|
335
|
+
return !!w.WORKERS_SUPPORTED && (o = (() => {
|
|
336
|
+
var g = l.URL || l.webkitURL || null, b = i.toString();
|
|
337
|
+
return w.BLOB_URL || (w.BLOB_URL = g.createObjectURL(new Blob(["var global = (function() { if (typeof self !== 'undefined') { return self; } if (typeof window !== 'undefined') { return window; } if (typeof global !== 'undefined') { return global; } return {}; })(); global.IS_PAPA_WORKER=true; ", "(", b, ")();"], { type: "text/javascript" })));
|
|
338
|
+
})(), (o = new l.Worker(o)).onmessage = ge, o.id = Y++, P[o.id] = o);
|
|
339
|
+
})()).userStep = t.step, n.userChunk = t.chunk, n.userComplete = t.complete, n.userError = t.error, t.step = $(t.step), t.chunk = $(t.chunk), t.complete = $(t.complete), t.error = $(t.error), delete t.worker, n.postMessage({ input: e, config: t, workerId: n.id });
|
|
340
|
+
}, w.unparse = function(e, t) {
|
|
341
|
+
var n = !1, o = !0, g = ",", b = `\r
|
|
342
|
+
`, m = '"', c = m + m, f = !1, a = null, u = !1, h = ((() => {
|
|
343
|
+
if (typeof t == "object") {
|
|
344
|
+
if (typeof t.delimiter != "string" || w.BAD_DELIMITERS.filter(function(_) {
|
|
345
|
+
return t.delimiter.indexOf(_) !== -1;
|
|
346
|
+
}).length || (g = t.delimiter), typeof t.quotes != "boolean" && typeof t.quotes != "function" && !Array.isArray(t.quotes) || (n = t.quotes), typeof t.skipEmptyLines != "boolean" && typeof t.skipEmptyLines != "string" || (f = t.skipEmptyLines), typeof t.newline == "string" && (b = t.newline), typeof t.quoteChar == "string" && (m = t.quoteChar), typeof t.header == "boolean" && (o = t.header), Array.isArray(t.columns)) {
|
|
347
|
+
if (t.columns.length === 0) throw new Error("Option columns is empty");
|
|
348
|
+
a = t.columns;
|
|
803
349
|
}
|
|
804
|
-
|
|
350
|
+
t.escapeChar !== void 0 && (c = t.escapeChar + m), t.escapeFormulae instanceof RegExp ? u = t.escapeFormulae : typeof t.escapeFormulae == "boolean" && t.escapeFormulae && (u = /^[=+\-@\t\r].*$/);
|
|
805
351
|
}
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
352
|
+
})(), new RegExp(ie(m), "g"));
|
|
353
|
+
if (typeof e == "string" && (e = JSON.parse(e)), Array.isArray(e)) {
|
|
354
|
+
if (!e.length || Array.isArray(e[0])) return y(null, e, f);
|
|
355
|
+
if (typeof e[0] == "object") return y(a || Object.keys(e[0]), e, f);
|
|
356
|
+
} else if (typeof e == "object") return typeof e.data == "string" && (e.data = JSON.parse(e.data)), Array.isArray(e.data) && (e.fields || (e.fields = e.meta && e.meta.fields || a), e.fields || (e.fields = Array.isArray(e.data[0]) ? e.fields : typeof e.data[0] == "object" ? Object.keys(e.data[0]) : []), Array.isArray(e.data[0]) || typeof e.data[0] == "object" || (e.data = [e.data])), y(e.fields || [], e.data || [], f);
|
|
357
|
+
throw new Error("Unable to serialize unrecognized input");
|
|
358
|
+
function y(_, d, D) {
|
|
359
|
+
var R = "", F = (typeof _ == "string" && (_ = JSON.parse(_)), typeof d == "string" && (d = JSON.parse(d)), Array.isArray(_) && 0 < _.length), j = !Array.isArray(d[0]);
|
|
360
|
+
if (F && o) {
|
|
361
|
+
for (var k = 0; k < _.length; k++) 0 < k && (R += g), R += p(_[k], k);
|
|
362
|
+
0 < d.length && (R += b);
|
|
363
|
+
}
|
|
364
|
+
for (var E = 0; E < d.length; E++) {
|
|
365
|
+
var O = (F ? _ : d[E]).length, v = !1, A = F ? Object.keys(d[E]).length === 0 : d[E].length === 0;
|
|
366
|
+
if (D && !F && (v = D === "greedy" ? d[E].join("").trim() === "" : d[E].length === 1 && d[E][0].length === 0), D === "greedy" && F) {
|
|
367
|
+
for (var z = [], L = 0; L < O; L++) {
|
|
368
|
+
var T = j ? _[L] : L;
|
|
369
|
+
z.push(d[E][T]);
|
|
816
370
|
}
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
371
|
+
v = z.join("").trim() === "";
|
|
372
|
+
}
|
|
373
|
+
if (!v) {
|
|
374
|
+
for (var C = 0; C < O; C++) {
|
|
375
|
+
0 < C && !A && (R += g);
|
|
376
|
+
var Z = F && j ? _[C] : C;
|
|
377
|
+
R += p(d[E][Z], C);
|
|
821
378
|
}
|
|
822
|
-
|
|
379
|
+
E < d.length - 1 && (!D || 0 < O && !A) && (R += b);
|
|
823
380
|
}
|
|
824
381
|
}
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
382
|
+
return R;
|
|
383
|
+
}
|
|
384
|
+
function p(_, d) {
|
|
385
|
+
var D, R;
|
|
386
|
+
return _ == null ? "" : _.constructor === Date ? JSON.stringify(_).slice(1, 25) : (R = !1, u && typeof _ == "string" && u.test(_) && (_ = "'" + _, R = !0), D = _.toString().replace(h, c), (R = R || n === !0 || typeof n == "function" && n(_, d) || Array.isArray(n) && n[d] || ((F, j) => {
|
|
387
|
+
for (var k = 0; k < j.length; k++) if (-1 < F.indexOf(j[k])) return !0;
|
|
388
|
+
return !1;
|
|
389
|
+
})(D, w.BAD_DELIMITERS) || -1 < D.indexOf(g) || D.charAt(0) === " " || D.charAt(D.length - 1) === " ") ? m + D + m : D);
|
|
390
|
+
}
|
|
391
|
+
}, w.RECORD_SEP = "", w.UNIT_SEP = "", w.BYTE_ORDER_MARK = "\uFEFF", w.BAD_DELIMITERS = ["\r", `
|
|
392
|
+
`, '"', w.BYTE_ORDER_MARK], w.WORKERS_SUPPORTED = !M && !!l.Worker, w.NODE_STREAM_INPUT = 1, w.LocalChunkSize = 10485760, w.RemoteChunkSize = 5242880, w.DefaultDelimiter = ",", w.Parser = he, w.ParserHandle = ee, w.NetworkStreamer = W, w.FileStreamer = X, w.StringStreamer = K, w.ReadableStreamStreamer = Q, l.jQuery && ((x = l.jQuery).fn.parse = function(e) {
|
|
393
|
+
var t = e.config || {}, n = [];
|
|
394
|
+
return this.each(function(b) {
|
|
395
|
+
if (!(x(this).prop("tagName").toUpperCase() === "INPUT" && x(this).attr("type").toLowerCase() === "file" && l.FileReader) || !this.files || this.files.length === 0) return !0;
|
|
396
|
+
for (var m = 0; m < this.files.length; m++) n.push({ file: this.files[m], inputElem: this, instanceConfig: x.extend({}, t) });
|
|
397
|
+
}), o(), this;
|
|
398
|
+
function o() {
|
|
399
|
+
if (n.length === 0) $(e.complete) && e.complete();
|
|
829
400
|
else {
|
|
830
|
-
|
|
831
|
-
if (
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
var
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
return d || (U === void 0 && (U = p.substring(h)), v.push(U), h = x, ue(v), k && re()), N();
|
|
401
|
+
var b, m, c, f, a = n[0];
|
|
402
|
+
if ($(e.before)) {
|
|
403
|
+
var u = e.before(a.file, a.inputElem);
|
|
404
|
+
if (typeof u == "object") {
|
|
405
|
+
if (u.action === "abort") return b = "AbortError", m = a.file, c = a.inputElem, f = u.reason, void ($(e.error) && e.error({ name: b }, m, c, f));
|
|
406
|
+
if (u.action === "skip") return void g();
|
|
407
|
+
typeof u.config == "object" && (a.instanceConfig = x.extend(a.instanceConfig, u.config));
|
|
408
|
+
} else if (u === "skip") return void g();
|
|
409
|
+
}
|
|
410
|
+
var h = a.instanceConfig.complete;
|
|
411
|
+
a.instanceConfig.complete = function(y) {
|
|
412
|
+
$(h) && h(y, a.file, a.inputElem), g();
|
|
413
|
+
}, w.parse(a.file, a.instanceConfig);
|
|
844
414
|
}
|
|
845
|
-
|
|
846
|
-
|
|
415
|
+
}
|
|
416
|
+
function g() {
|
|
417
|
+
n.splice(0, 1), o();
|
|
418
|
+
}
|
|
419
|
+
}), I && (l.onmessage = function(e) {
|
|
420
|
+
e = e.data, w.WORKER_ID === void 0 && e && (w.WORKER_ID = e.workerId), typeof e.input == "string" ? l.postMessage({ workerId: w.WORKER_ID, results: w.parse(e.input, e.config), finished: !0 }) : (l.File && e.input instanceof File || e.input instanceof Object) && (e = w.parse(e.input, e.config)) && l.postMessage({ workerId: w.WORKER_ID, results: e, finished: !0 });
|
|
421
|
+
}), (W.prototype = Object.create(N.prototype)).constructor = W, (X.prototype = Object.create(N.prototype)).constructor = X, (K.prototype = Object.create(K.prototype)).constructor = K, (Q.prototype = Object.create(N.prototype)).constructor = Q, w;
|
|
422
|
+
});
|
|
423
|
+
})(ve)), ve.exports;
|
|
424
|
+
}
|
|
425
|
+
var De = Ie();
|
|
426
|
+
class Ge {
|
|
427
|
+
static unparse(r, i) {
|
|
428
|
+
return De.unparse(r, i);
|
|
429
|
+
}
|
|
430
|
+
static parse(r) {
|
|
431
|
+
return new Promise((i, l) => {
|
|
432
|
+
De.parse(r, {
|
|
433
|
+
header: !0,
|
|
434
|
+
complete: (x) => i(x),
|
|
435
|
+
error: (x) => l(x)
|
|
436
|
+
});
|
|
437
|
+
});
|
|
438
|
+
}
|
|
439
|
+
}
|
|
440
|
+
async function Le(s, r, i) {
|
|
441
|
+
const l = i?.mimeType ?? Fe(r), x = Te(s, l);
|
|
442
|
+
if ("showSaveFilePicker" in window && i?.showSaveFilePicker)
|
|
443
|
+
try {
|
|
444
|
+
const Y = await (await window.showSaveFilePicker({
|
|
445
|
+
suggestedName: r,
|
|
446
|
+
types: [{ description: "Datei", accept: { [l]: [`.${$e(r)}`] } }]
|
|
447
|
+
})).createWritable();
|
|
448
|
+
await Y.write(x), await Y.close();
|
|
449
|
+
return;
|
|
450
|
+
} catch {
|
|
451
|
+
}
|
|
452
|
+
const M = URL.createObjectURL(x), I = document.createElement("a");
|
|
453
|
+
I.href = M, I.download = r, I.rel = "noopener", I.style.display = "none", document.body.appendChild(I), ze(I), window.setTimeout(() => {
|
|
454
|
+
document.body.removeChild(I), URL.revokeObjectURL(M);
|
|
455
|
+
}, 0), Be() && window.open(M, "_blank", "noopener,noreferrer");
|
|
456
|
+
}
|
|
457
|
+
function Te(s, r) {
|
|
458
|
+
if (s instanceof Blob)
|
|
459
|
+
return s.type ? s : new Blob([s], { type: r });
|
|
460
|
+
if (s instanceof ArrayBuffer || s instanceof Uint8Array) {
|
|
461
|
+
const i = s instanceof Uint8Array ? s : new Uint8Array(s);
|
|
462
|
+
return new Blob([i], { type: r });
|
|
463
|
+
}
|
|
464
|
+
return new Blob([s], { type: r || "text/plain;charset=utf-8" });
|
|
465
|
+
}
|
|
466
|
+
function Fe(s) {
|
|
467
|
+
switch ($e(s).toLowerCase()) {
|
|
468
|
+
case "txt":
|
|
469
|
+
return "text/plain;charset=utf-8";
|
|
470
|
+
case "csv":
|
|
471
|
+
return "text/csv;charset=utf-8";
|
|
472
|
+
case "json":
|
|
473
|
+
return "application/json;charset=utf-8";
|
|
474
|
+
case "pdf":
|
|
475
|
+
return "application/pdf";
|
|
476
|
+
case "png":
|
|
477
|
+
return "image/png";
|
|
478
|
+
case "jpg":
|
|
479
|
+
case "jpeg":
|
|
480
|
+
return "image/jpeg";
|
|
481
|
+
case "svg":
|
|
482
|
+
return "image/svg+xml";
|
|
483
|
+
case "zip":
|
|
484
|
+
return "application/zip";
|
|
485
|
+
default:
|
|
486
|
+
return "application/octet-stream";
|
|
487
|
+
}
|
|
488
|
+
}
|
|
489
|
+
function $e(s) {
|
|
490
|
+
const r = s.lastIndexOf(".");
|
|
491
|
+
return r >= 0 && r < s.length - 1 ? s.slice(r + 1) : "";
|
|
492
|
+
}
|
|
493
|
+
function ze(s) {
|
|
494
|
+
const r = document.createEvent("MouseEvents");
|
|
495
|
+
r.initMouseEvent("click", !0, !0, window, 0, 0, 0, 0, 0, !1, !1, !1, !1, 0, null), s.dispatchEvent(r);
|
|
496
|
+
}
|
|
497
|
+
function Be() {
|
|
498
|
+
const s = navigator.userAgent, r = /iPad|iPhone|iPod/.test(s), i = /^((?!chrome|android).)*safari/i.test(s);
|
|
499
|
+
return r || i;
|
|
500
|
+
}
|
|
501
|
+
class Xe {
|
|
502
|
+
static getEnumValue(r, i) {
|
|
503
|
+
if (i in r)
|
|
504
|
+
return r[i];
|
|
505
|
+
throw Error(`${i} not found in ${r}`);
|
|
506
|
+
}
|
|
507
|
+
static getKeyValues(r) {
|
|
508
|
+
return Object.keys(r).filter((i) => !isNaN(Number(i))).map((i) => ({
|
|
509
|
+
key: Number(i),
|
|
510
|
+
value: r[i]
|
|
511
|
+
}));
|
|
512
|
+
}
|
|
513
|
+
}
|
|
514
|
+
class et {
|
|
515
|
+
static getFileExtension(r) {
|
|
516
|
+
let i = "";
|
|
517
|
+
const l = r.lastIndexOf(".");
|
|
518
|
+
return l > 0 && l < r.length - 1 && (i = `.${r.substring(l + 1).toLowerCase()}`), i;
|
|
519
|
+
}
|
|
520
|
+
/**
|
|
521
|
+
* read content from a file or blob
|
|
522
|
+
*/
|
|
523
|
+
static readAsText(r) {
|
|
524
|
+
const i = new FileReader();
|
|
525
|
+
return new Promise((l, x) => {
|
|
526
|
+
i.onload = () => {
|
|
527
|
+
i.onload = null, i.onerror = null, typeof i.result == "string" ? l(i.result) : x(new Error("Unexpected result type"));
|
|
528
|
+
}, i.onerror = () => {
|
|
529
|
+
const M = i.error ?? new Error("FileReader error");
|
|
530
|
+
i.onload = null, i.onerror = null, x(M);
|
|
531
|
+
}, i.readAsText(r);
|
|
532
|
+
});
|
|
533
|
+
}
|
|
534
|
+
static readAsArrayBuffer(r) {
|
|
535
|
+
const i = new FileReader();
|
|
536
|
+
return new Promise((l, x) => {
|
|
537
|
+
i.onload = () => {
|
|
538
|
+
i.onload = null, i.onerror = null, i.result instanceof ArrayBuffer ? l(i.result) : x(new Error("Unexpected result type"));
|
|
539
|
+
}, i.onerror = () => {
|
|
540
|
+
const M = i.error ?? new Error("FileReader error");
|
|
541
|
+
i.onload = null, i.onerror = null, x(M);
|
|
542
|
+
}, i.readAsArrayBuffer(r);
|
|
543
|
+
});
|
|
544
|
+
}
|
|
545
|
+
static readAsDataUrl(r) {
|
|
546
|
+
const i = new FileReader();
|
|
547
|
+
return new Promise((l, x) => {
|
|
548
|
+
i.onload = (M) => {
|
|
549
|
+
l(M);
|
|
550
|
+
}, i.onerror = (M) => x(M), i.readAsDataURL(r);
|
|
551
|
+
});
|
|
552
|
+
}
|
|
553
|
+
/** usage:
|
|
554
|
+
* const file = new File(['Hello'], 'test.txt');
|
|
555
|
+
* FileHelper.formatFileSize(file.size);
|
|
556
|
+
* */
|
|
557
|
+
static formatFileSize(r, i = 2, l) {
|
|
558
|
+
if (r === 0)
|
|
559
|
+
return "0 Bytes";
|
|
560
|
+
const x = 1024, M = ["Bytes", "KB", "MB", "GB", "TB"];
|
|
561
|
+
let I = Math.floor(Math.log(r) / Math.log(x));
|
|
562
|
+
l && M.includes(l) && (I = M.indexOf(l));
|
|
563
|
+
const P = r / Math.pow(x, I);
|
|
564
|
+
return `${parseFloat(P.toFixed(i))} ${M[I]}`;
|
|
565
|
+
}
|
|
566
|
+
static save(r, i, l) {
|
|
567
|
+
const x = new Blob([r], { type: l });
|
|
568
|
+
Le(x, i);
|
|
569
|
+
}
|
|
570
|
+
}
|
|
571
|
+
class _e {
|
|
572
|
+
static set(r, i) {
|
|
573
|
+
localStorage.setItem(r, JSON.stringify(i));
|
|
574
|
+
}
|
|
575
|
+
static get(r) {
|
|
576
|
+
let i = null;
|
|
577
|
+
const l = localStorage.getItem(r);
|
|
578
|
+
return l && (i = JSON.parse(l)), i;
|
|
579
|
+
}
|
|
580
|
+
static remove(r) {
|
|
581
|
+
let i = !!_e.get(r);
|
|
582
|
+
return i && localStorage.removeItem(r), i;
|
|
583
|
+
}
|
|
584
|
+
static removeAll() {
|
|
585
|
+
localStorage.clear();
|
|
586
|
+
}
|
|
587
|
+
static getKeysBy(r) {
|
|
588
|
+
return Object.keys(localStorage).filter((i) => i.startsWith(r));
|
|
589
|
+
}
|
|
590
|
+
}
|
|
591
|
+
var de = /* @__PURE__ */ ((s) => (s.log = "log", s.info = "info", s.warn = "warn", s.debug = "debug", s.error = "error", s))(de || {});
|
|
592
|
+
class pe {
|
|
593
|
+
static log(...r) {
|
|
594
|
+
pe.doLog(de.log, r);
|
|
595
|
+
}
|
|
596
|
+
static info(...r) {
|
|
597
|
+
pe.doLog(de.info, r);
|
|
598
|
+
}
|
|
599
|
+
static warn(...r) {
|
|
600
|
+
pe.doLog(de.warn, r);
|
|
601
|
+
}
|
|
602
|
+
static debug(...r) {
|
|
603
|
+
pe.doLog(de.debug, r);
|
|
604
|
+
}
|
|
605
|
+
static error(...r) {
|
|
606
|
+
pe.doLog(de.error, r);
|
|
607
|
+
}
|
|
608
|
+
static doLog(r, i) {
|
|
609
|
+
console[r].apply(console, i);
|
|
610
|
+
}
|
|
611
|
+
}
|
|
612
|
+
const je = (s, r, i) => s.localeCompare(r) * (i ? 1 : -1), We = (s, r) => s < r ? -1 : s === r ? 0 : 1, Ue = (s, r, i) => We(s, r) * (i ? 1 : -1), Pe = (s, r, i) => {
|
|
613
|
+
let l = 0;
|
|
614
|
+
return typeof s == "string" && typeof r == "string" ? l = je(s, r, i) : l = Ue(s, r, i), l;
|
|
615
|
+
}, Ye = (s, r, i, l) => {
|
|
616
|
+
const x = i(s), M = i(r);
|
|
617
|
+
return Pe(x, M, l);
|
|
618
|
+
};
|
|
619
|
+
class tt {
|
|
620
|
+
static get(r) {
|
|
621
|
+
return _e.get(r);
|
|
622
|
+
}
|
|
623
|
+
static set(r, i) {
|
|
624
|
+
_e.set(r, i);
|
|
625
|
+
}
|
|
626
|
+
static remove(r) {
|
|
627
|
+
_e.remove(r);
|
|
628
|
+
}
|
|
629
|
+
}
|
|
630
|
+
Array.prototype.distinct = function(s) {
|
|
631
|
+
const r = this;
|
|
632
|
+
return s ? r.filter((l, x, M) => M.findIndex((I) => s(I, l)) === x) : r.filter((l, x, M) => M.indexOf(l) === x);
|
|
633
|
+
};
|
|
634
|
+
Array.prototype.filterBy = function(s) {
|
|
635
|
+
return this.filter((r) => {
|
|
636
|
+
let i = !1;
|
|
637
|
+
return s && r[s] ? i = r[s] === s : i = r === s, i;
|
|
638
|
+
});
|
|
639
|
+
};
|
|
640
|
+
Array.prototype.first = function() {
|
|
641
|
+
return this?.length > 0 ? this[0] : null;
|
|
642
|
+
};
|
|
643
|
+
Array.prototype.groupBy = function(s) {
|
|
644
|
+
return this.reduce((r, i) => {
|
|
645
|
+
const l = s(i);
|
|
646
|
+
return (r[l] = r[l] || []).push(i), r;
|
|
647
|
+
}, {});
|
|
648
|
+
};
|
|
649
|
+
Array.prototype.orderBy = function(s, r = !0) {
|
|
650
|
+
return this?.sort((i, l) => Ye(i, l, s, r)), this;
|
|
651
|
+
};
|
|
652
|
+
Array.prototype.removeBy = function(s, r) {
|
|
653
|
+
return this.filter((i) => s(i) !== r);
|
|
654
|
+
};
|
|
655
|
+
var ke = { exports: {} }, Ne = ke.exports, Ce;
|
|
656
|
+
function He() {
|
|
657
|
+
return Ce || (Ce = 1, (function(s, r) {
|
|
658
|
+
(function(i, l) {
|
|
659
|
+
s.exports = l();
|
|
660
|
+
})(Ne, (function() {
|
|
661
|
+
var i = 1e3, l = 6e4, x = 36e5, M = "millisecond", I = "second", P = "minute", Y = "hour", w = "day", N = "week", W = "month", X = "quarter", K = "year", Q = "date", ee = "Invalid Date", ie = /^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/, he = /\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g, ge = { name: "en", weekdays: "Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"), months: "January_February_March_April_May_June_July_August_September_October_November_December".split("_"), ordinal: function(m) {
|
|
662
|
+
var c = ["th", "st", "nd", "rd"], f = m % 100;
|
|
663
|
+
return "[" + m + (c[(f - 20) % 10] || c[f] || c[0]) + "]";
|
|
664
|
+
} }, oe = function(m, c, f) {
|
|
665
|
+
var a = String(m);
|
|
666
|
+
return !a || a.length >= c ? m : "" + Array(c + 1 - a.length).join(f) + m;
|
|
667
|
+
}, we = { s: oe, z: function(m) {
|
|
668
|
+
var c = -m.utcOffset(), f = Math.abs(c), a = Math.floor(f / 60), u = f % 60;
|
|
669
|
+
return (c <= 0 ? "+" : "-") + oe(a, 2, "0") + ":" + oe(u, 2, "0");
|
|
670
|
+
}, m: function m(c, f) {
|
|
671
|
+
if (c.date() < f.date()) return -m(f, c);
|
|
672
|
+
var a = 12 * (f.year() - c.year()) + (f.month() - c.month()), u = c.clone().add(a, W), h = f - u < 0, y = c.clone().add(a + (h ? -1 : 1), W);
|
|
673
|
+
return +(-(a + (f - u) / (h ? u - y : y - u)) || 0);
|
|
674
|
+
}, a: function(m) {
|
|
675
|
+
return m < 0 ? Math.ceil(m) || 0 : Math.floor(m);
|
|
676
|
+
}, p: function(m) {
|
|
677
|
+
return { M: W, y: K, w: N, d: w, D: Q, h: Y, m: P, s: I, ms: M, Q: X }[m] || String(m || "").toLowerCase().replace(/s$/, "");
|
|
678
|
+
}, u: function(m) {
|
|
679
|
+
return m === void 0;
|
|
680
|
+
} }, se = "en", H = {};
|
|
681
|
+
H[se] = ge;
|
|
682
|
+
var $ = "$isDayjsObject", e = function(m) {
|
|
683
|
+
return m instanceof g || !(!m || !m[$]);
|
|
684
|
+
}, t = function m(c, f, a) {
|
|
685
|
+
var u;
|
|
686
|
+
if (!c) return se;
|
|
687
|
+
if (typeof c == "string") {
|
|
688
|
+
var h = c.toLowerCase();
|
|
689
|
+
H[h] && (u = h), f && (H[h] = f, u = h);
|
|
690
|
+
var y = c.split("-");
|
|
691
|
+
if (!u && y.length > 1) return m(y[0]);
|
|
692
|
+
} else {
|
|
693
|
+
var p = c.name;
|
|
694
|
+
H[p] = c, u = p;
|
|
695
|
+
}
|
|
696
|
+
return !a && u && (se = u), u || !a && se;
|
|
697
|
+
}, n = function(m, c) {
|
|
698
|
+
if (e(m)) return m.clone();
|
|
699
|
+
var f = typeof c == "object" ? c : {};
|
|
700
|
+
return f.date = m, f.args = arguments, new g(f);
|
|
701
|
+
}, o = we;
|
|
702
|
+
o.l = t, o.i = e, o.w = function(m, c) {
|
|
703
|
+
return n(m, { locale: c.$L, utc: c.$u, x: c.$x, $offset: c.$offset });
|
|
704
|
+
};
|
|
705
|
+
var g = (function() {
|
|
706
|
+
function m(f) {
|
|
707
|
+
this.$L = t(f.locale, null, !0), this.parse(f), this.$x = this.$x || f.x || {}, this[$] = !0;
|
|
708
|
+
}
|
|
709
|
+
var c = m.prototype;
|
|
710
|
+
return c.parse = function(f) {
|
|
711
|
+
this.$d = (function(a) {
|
|
712
|
+
var u = a.date, h = a.utc;
|
|
713
|
+
if (u === null) return /* @__PURE__ */ new Date(NaN);
|
|
714
|
+
if (o.u(u)) return /* @__PURE__ */ new Date();
|
|
715
|
+
if (u instanceof Date) return new Date(u);
|
|
716
|
+
if (typeof u == "string" && !/Z$/i.test(u)) {
|
|
717
|
+
var y = u.match(ie);
|
|
718
|
+
if (y) {
|
|
719
|
+
var p = y[2] - 1 || 0, _ = (y[7] || "0").substring(0, 3);
|
|
720
|
+
return h ? new Date(Date.UTC(y[1], p, y[3] || 1, y[4] || 0, y[5] || 0, y[6] || 0, _)) : new Date(y[1], p, y[3] || 1, y[4] || 0, y[5] || 0, y[6] || 0, _);
|
|
721
|
+
}
|
|
722
|
+
}
|
|
723
|
+
return new Date(u);
|
|
724
|
+
})(f), this.init();
|
|
725
|
+
}, c.init = function() {
|
|
726
|
+
var f = this.$d;
|
|
727
|
+
this.$y = f.getFullYear(), this.$M = f.getMonth(), this.$D = f.getDate(), this.$W = f.getDay(), this.$H = f.getHours(), this.$m = f.getMinutes(), this.$s = f.getSeconds(), this.$ms = f.getMilliseconds();
|
|
728
|
+
}, c.$utils = function() {
|
|
729
|
+
return o;
|
|
730
|
+
}, c.isValid = function() {
|
|
731
|
+
return this.$d.toString() !== ee;
|
|
732
|
+
}, c.isSame = function(f, a) {
|
|
733
|
+
var u = n(f);
|
|
734
|
+
return this.startOf(a) <= u && u <= this.endOf(a);
|
|
735
|
+
}, c.isAfter = function(f, a) {
|
|
736
|
+
return n(f) < this.startOf(a);
|
|
737
|
+
}, c.isBefore = function(f, a) {
|
|
738
|
+
return this.endOf(a) < n(f);
|
|
739
|
+
}, c.$g = function(f, a, u) {
|
|
740
|
+
return o.u(f) ? this[a] : this.set(u, f);
|
|
741
|
+
}, c.unix = function() {
|
|
742
|
+
return Math.floor(this.valueOf() / 1e3);
|
|
743
|
+
}, c.valueOf = function() {
|
|
744
|
+
return this.$d.getTime();
|
|
745
|
+
}, c.startOf = function(f, a) {
|
|
746
|
+
var u = this, h = !!o.u(a) || a, y = o.p(f), p = function(E, O) {
|
|
747
|
+
var v = o.w(u.$u ? Date.UTC(u.$y, O, E) : new Date(u.$y, O, E), u);
|
|
748
|
+
return h ? v : v.endOf(w);
|
|
749
|
+
}, _ = function(E, O) {
|
|
750
|
+
return o.w(u.toDate()[E].apply(u.toDate("s"), (h ? [0, 0, 0, 0] : [23, 59, 59, 999]).slice(O)), u);
|
|
751
|
+
}, d = this.$W, D = this.$M, R = this.$D, F = "set" + (this.$u ? "UTC" : "");
|
|
752
|
+
switch (y) {
|
|
753
|
+
case K:
|
|
754
|
+
return h ? p(1, 0) : p(31, 11);
|
|
755
|
+
case W:
|
|
756
|
+
return h ? p(1, D) : p(0, D + 1);
|
|
757
|
+
case N:
|
|
758
|
+
var j = this.$locale().weekStart || 0, k = (d < j ? d + 7 : d) - j;
|
|
759
|
+
return p(h ? R - k : R + (6 - k), D);
|
|
760
|
+
case w:
|
|
761
|
+
case Q:
|
|
762
|
+
return _(F + "Hours", 0);
|
|
763
|
+
case Y:
|
|
764
|
+
return _(F + "Minutes", 1);
|
|
765
|
+
case P:
|
|
766
|
+
return _(F + "Seconds", 2);
|
|
767
|
+
case I:
|
|
768
|
+
return _(F + "Milliseconds", 3);
|
|
769
|
+
default:
|
|
770
|
+
return this.clone();
|
|
847
771
|
}
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
772
|
+
}, c.endOf = function(f) {
|
|
773
|
+
return this.startOf(f, !1);
|
|
774
|
+
}, c.$set = function(f, a) {
|
|
775
|
+
var u, h = o.p(f), y = "set" + (this.$u ? "UTC" : ""), p = (u = {}, u[w] = y + "Date", u[Q] = y + "Date", u[W] = y + "Month", u[K] = y + "FullYear", u[Y] = y + "Hours", u[P] = y + "Minutes", u[I] = y + "Seconds", u[M] = y + "Milliseconds", u)[h], _ = h === w ? this.$D + (a - this.$W) : a;
|
|
776
|
+
if (h === W || h === K) {
|
|
777
|
+
var d = this.clone().set(Q, 1);
|
|
778
|
+
d.$d[p](_), d.init(), this.$d = d.set(Q, Math.min(this.$D, d.daysInMonth())).$d;
|
|
779
|
+
} else p && this.$d[p](_);
|
|
780
|
+
return this.init(), this;
|
|
781
|
+
}, c.set = function(f, a) {
|
|
782
|
+
return this.clone().$set(f, a);
|
|
783
|
+
}, c.get = function(f) {
|
|
784
|
+
return this[o.p(f)]();
|
|
785
|
+
}, c.add = function(f, a) {
|
|
786
|
+
var u, h = this;
|
|
787
|
+
f = Number(f);
|
|
788
|
+
var y = o.p(a), p = function(D) {
|
|
789
|
+
var R = n(h);
|
|
790
|
+
return o.w(R.date(R.date() + Math.round(D * f)), h);
|
|
791
|
+
};
|
|
792
|
+
if (y === W) return this.set(W, this.$M + f);
|
|
793
|
+
if (y === K) return this.set(K, this.$y + f);
|
|
794
|
+
if (y === w) return p(1);
|
|
795
|
+
if (y === N) return p(7);
|
|
796
|
+
var _ = (u = {}, u[P] = l, u[Y] = x, u[I] = i, u)[y] || 1, d = this.$d.getTime() + f * _;
|
|
797
|
+
return o.w(d, this);
|
|
798
|
+
}, c.subtract = function(f, a) {
|
|
799
|
+
return this.add(-1 * f, a);
|
|
800
|
+
}, c.format = function(f) {
|
|
801
|
+
var a = this, u = this.$locale();
|
|
802
|
+
if (!this.isValid()) return u.invalidDate || ee;
|
|
803
|
+
var h = f || "YYYY-MM-DDTHH:mm:ssZ", y = o.z(this), p = this.$H, _ = this.$m, d = this.$M, D = u.weekdays, R = u.months, F = u.meridiem, j = function(O, v, A, z) {
|
|
804
|
+
return O && (O[v] || O(a, h)) || A[v].slice(0, z);
|
|
805
|
+
}, k = function(O) {
|
|
806
|
+
return o.s(p % 12 || 12, O, "0");
|
|
807
|
+
}, E = F || function(O, v, A) {
|
|
808
|
+
var z = O < 12 ? "AM" : "PM";
|
|
809
|
+
return A ? z.toLowerCase() : z;
|
|
810
|
+
};
|
|
811
|
+
return h.replace(he, (function(O, v) {
|
|
812
|
+
return v || (function(A) {
|
|
813
|
+
switch (A) {
|
|
814
|
+
case "YY":
|
|
815
|
+
return String(a.$y).slice(-2);
|
|
816
|
+
case "YYYY":
|
|
817
|
+
return o.s(a.$y, 4, "0");
|
|
818
|
+
case "M":
|
|
819
|
+
return d + 1;
|
|
820
|
+
case "MM":
|
|
821
|
+
return o.s(d + 1, 2, "0");
|
|
822
|
+
case "MMM":
|
|
823
|
+
return j(u.monthsShort, d, R, 3);
|
|
824
|
+
case "MMMM":
|
|
825
|
+
return j(R, d);
|
|
826
|
+
case "D":
|
|
827
|
+
return a.$D;
|
|
828
|
+
case "DD":
|
|
829
|
+
return o.s(a.$D, 2, "0");
|
|
830
|
+
case "d":
|
|
831
|
+
return String(a.$W);
|
|
832
|
+
case "dd":
|
|
833
|
+
return j(u.weekdaysMin, a.$W, D, 2);
|
|
834
|
+
case "ddd":
|
|
835
|
+
return j(u.weekdaysShort, a.$W, D, 3);
|
|
836
|
+
case "dddd":
|
|
837
|
+
return D[a.$W];
|
|
838
|
+
case "H":
|
|
839
|
+
return String(p);
|
|
840
|
+
case "HH":
|
|
841
|
+
return o.s(p, 2, "0");
|
|
842
|
+
case "h":
|
|
843
|
+
return k(1);
|
|
844
|
+
case "hh":
|
|
845
|
+
return k(2);
|
|
846
|
+
case "a":
|
|
847
|
+
return E(p, _, !0);
|
|
848
|
+
case "A":
|
|
849
|
+
return E(p, _, !1);
|
|
850
|
+
case "m":
|
|
851
|
+
return String(_);
|
|
852
|
+
case "mm":
|
|
853
|
+
return o.s(_, 2, "0");
|
|
854
|
+
case "s":
|
|
855
|
+
return String(a.$s);
|
|
856
|
+
case "ss":
|
|
857
|
+
return o.s(a.$s, 2, "0");
|
|
858
|
+
case "SSS":
|
|
859
|
+
return o.s(a.$ms, 3, "0");
|
|
860
|
+
case "Z":
|
|
861
|
+
return y;
|
|
860
862
|
}
|
|
861
|
-
|
|
862
|
-
}
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
863
|
+
return null;
|
|
864
|
+
})(O) || y.replace(":", "");
|
|
865
|
+
}));
|
|
866
|
+
}, c.utcOffset = function() {
|
|
867
|
+
return 15 * -Math.round(this.$d.getTimezoneOffset() / 15);
|
|
868
|
+
}, c.diff = function(f, a, u) {
|
|
869
|
+
var h, y = this, p = o.p(a), _ = n(f), d = (_.utcOffset() - this.utcOffset()) * l, D = this - _, R = function() {
|
|
870
|
+
return o.m(y, _);
|
|
871
|
+
};
|
|
872
|
+
switch (p) {
|
|
873
|
+
case K:
|
|
874
|
+
h = R() / 12;
|
|
875
|
+
break;
|
|
876
|
+
case W:
|
|
877
|
+
h = R();
|
|
878
|
+
break;
|
|
879
|
+
case X:
|
|
880
|
+
h = R() / 3;
|
|
881
|
+
break;
|
|
882
|
+
case N:
|
|
883
|
+
h = (D - d) / 6048e5;
|
|
884
|
+
break;
|
|
885
|
+
case w:
|
|
886
|
+
h = (D - d) / 864e5;
|
|
887
|
+
break;
|
|
888
|
+
case Y:
|
|
889
|
+
h = D / x;
|
|
890
|
+
break;
|
|
891
|
+
case P:
|
|
892
|
+
h = D / l;
|
|
893
|
+
break;
|
|
894
|
+
case I:
|
|
895
|
+
h = D / i;
|
|
896
|
+
break;
|
|
897
|
+
default:
|
|
898
|
+
h = D;
|
|
867
899
|
}
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
900
|
+
return u ? h : o.a(h);
|
|
901
|
+
}, c.daysInMonth = function() {
|
|
902
|
+
return this.endOf(W).$D;
|
|
903
|
+
}, c.$locale = function() {
|
|
904
|
+
return H[this.$L];
|
|
905
|
+
}, c.locale = function(f, a) {
|
|
906
|
+
if (!f) return this.$L;
|
|
907
|
+
var u = this.clone(), h = t(f, a, !0);
|
|
908
|
+
return h && (u.$L = h), u;
|
|
909
|
+
}, c.clone = function() {
|
|
910
|
+
return o.w(this.$d, this);
|
|
911
|
+
}, c.toDate = function() {
|
|
912
|
+
return new Date(this.valueOf());
|
|
913
|
+
}, c.toJSON = function() {
|
|
914
|
+
return this.isValid() ? this.toISOString() : null;
|
|
915
|
+
}, c.toISOString = function() {
|
|
916
|
+
return this.$d.toISOString();
|
|
917
|
+
}, c.toString = function() {
|
|
918
|
+
return this.$d.toUTCString();
|
|
919
|
+
}, m;
|
|
920
|
+
})(), b = g.prototype;
|
|
921
|
+
return n.prototype = b, [["$ms", M], ["$s", I], ["$m", P], ["$H", Y], ["$W", w], ["$M", W], ["$y", K], ["$D", Q]].forEach((function(m) {
|
|
922
|
+
b[m[1]] = function(c) {
|
|
923
|
+
return this.$g(c, m[0], m[1]);
|
|
872
924
|
};
|
|
873
|
-
}
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
e.apply(t, arguments);
|
|
925
|
+
})), n.extend = function(m, c) {
|
|
926
|
+
return m.$i || (m(c, g, n), m.$i = !0), n;
|
|
927
|
+
}, n.locale = t, n.isDayjs = e, n.unix = function(m) {
|
|
928
|
+
return n(1e3 * m);
|
|
929
|
+
}, n.en = H[se], n.Ls = H, n.p = {}, n;
|
|
930
|
+
}));
|
|
931
|
+
})(ke)), ke.exports;
|
|
932
|
+
}
|
|
933
|
+
var qe = He();
|
|
934
|
+
const G = /* @__PURE__ */ Re(qe);
|
|
935
|
+
var be = { exports: {} }, Ke = be.exports, Me;
|
|
936
|
+
function Je() {
|
|
937
|
+
return Me || (Me = 1, (function(s, r) {
|
|
938
|
+
(function(i, l) {
|
|
939
|
+
s.exports = l();
|
|
940
|
+
})(Ke, (function() {
|
|
941
|
+
var i = { LTS: "h:mm:ss A", LT: "h:mm A", L: "MM/DD/YYYY", LL: "MMMM D, YYYY", LLL: "MMMM D, YYYY h:mm A", LLLL: "dddd, MMMM D, YYYY h:mm A" };
|
|
942
|
+
return function(l, x, M) {
|
|
943
|
+
var I = x.prototype, P = I.format;
|
|
944
|
+
M.en.formats = i, I.format = function(Y) {
|
|
945
|
+
Y === void 0 && (Y = "YYYY-MM-DDTHH:mm:ssZ");
|
|
946
|
+
var w = this.$locale().formats, N = (function(W, X) {
|
|
947
|
+
return W.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g, (function(K, Q, ee) {
|
|
948
|
+
var ie = ee && ee.toUpperCase();
|
|
949
|
+
return Q || X[ee] || i[ee] || X[ie].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g, (function(he, ge, oe) {
|
|
950
|
+
return ge || oe.slice(1);
|
|
951
|
+
}));
|
|
952
|
+
}));
|
|
953
|
+
})(Y, w === void 0 ? {} : w);
|
|
954
|
+
return P.call(this, N);
|
|
904
955
|
};
|
|
905
|
-
}
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
}
|
|
909
|
-
return w.parse = function(e, t) {
|
|
910
|
-
var n = (t = t || {}).dynamicTyping || !1;
|
|
911
|
-
if (R(n) && (t.dynamicTypingFunction = n, n = {}), t.dynamicTyping = n, t.transform = !!R(t.transform) && t.transform, !t.worker || !w.WORKERS_SUPPORTED) return n = null, w.NODE_STREAM_INPUT, typeof e == "string" ? (e = ((o) => o.charCodeAt(0) !== 65279 ? o : o.slice(1))(e), n = new (t.download ? W : K)(t)) : e.readable === !0 && R(e.read) && R(e.on) ? n = new Q(t) : (l.File && e instanceof File || e instanceof Object) && (n = new X(t)), n.stream(e);
|
|
912
|
-
(n = (() => {
|
|
913
|
-
var o;
|
|
914
|
-
return !!w.WORKERS_SUPPORTED && (o = (() => {
|
|
915
|
-
var g = l.URL || l.webkitURL || null, b = s.toString();
|
|
916
|
-
return w.BLOB_URL || (w.BLOB_URL = g.createObjectURL(new Blob(["var global = (function() { if (typeof self !== 'undefined') { return self; } if (typeof window !== 'undefined') { return window; } if (typeof global !== 'undefined') { return global; } return {}; })(); global.IS_PAPA_WORKER=true; ", "(", b, ")();"], { type: "text/javascript" })));
|
|
917
|
-
})(), (o = new l.Worker(o)).onmessage = le, o.id = q++, H[o.id] = o);
|
|
918
|
-
})()).userStep = t.step, n.userChunk = t.chunk, n.userComplete = t.complete, n.userError = t.error, t.step = R(t.step), t.chunk = R(t.chunk), t.complete = R(t.complete), t.error = R(t.error), delete t.worker, n.postMessage({ input: e, config: t, workerId: n.id });
|
|
919
|
-
}, w.unparse = function(e, t) {
|
|
920
|
-
var n = !1, o = !0, g = ",", b = `\r
|
|
921
|
-
`, m = '"', f = m + m, c = !1, a = null, u = !1, h = ((() => {
|
|
922
|
-
if (typeof t == "object") {
|
|
923
|
-
if (typeof t.delimiter != "string" || w.BAD_DELIMITERS.filter(function(_) {
|
|
924
|
-
return t.delimiter.indexOf(_) !== -1;
|
|
925
|
-
}).length || (g = t.delimiter), typeof t.quotes != "boolean" && typeof t.quotes != "function" && !Array.isArray(t.quotes) || (n = t.quotes), typeof t.skipEmptyLines != "boolean" && typeof t.skipEmptyLines != "string" || (c = t.skipEmptyLines), typeof t.newline == "string" && (b = t.newline), typeof t.quoteChar == "string" && (m = t.quoteChar), typeof t.header == "boolean" && (o = t.header), Array.isArray(t.columns)) {
|
|
926
|
-
if (t.columns.length === 0) throw new Error("Option columns is empty");
|
|
927
|
-
a = t.columns;
|
|
928
|
-
}
|
|
929
|
-
t.escapeChar !== void 0 && (f = t.escapeChar + m), t.escapeFormulae instanceof RegExp ? u = t.escapeFormulae : typeof t.escapeFormulae == "boolean" && t.escapeFormulae && (u = /^[=+\-@\t\r].*$/);
|
|
930
|
-
}
|
|
931
|
-
})(), new RegExp(ie(m), "g"));
|
|
932
|
-
if (typeof e == "string" && (e = JSON.parse(e)), Array.isArray(e)) {
|
|
933
|
-
if (!e.length || Array.isArray(e[0])) return y(null, e, c);
|
|
934
|
-
if (typeof e[0] == "object") return y(a || Object.keys(e[0]), e, c);
|
|
935
|
-
} else if (typeof e == "object") return typeof e.data == "string" && (e.data = JSON.parse(e.data)), Array.isArray(e.data) && (e.fields || (e.fields = e.meta && e.meta.fields || a), e.fields || (e.fields = Array.isArray(e.data[0]) ? e.fields : typeof e.data[0] == "object" ? Object.keys(e.data[0]) : []), Array.isArray(e.data[0]) || typeof e.data[0] == "object" || (e.data = [e.data])), y(e.fields || [], e.data || [], c);
|
|
936
|
-
throw new Error("Unable to serialize unrecognized input");
|
|
937
|
-
function y(_, d, x) {
|
|
938
|
-
var M = "", T = (typeof _ == "string" && (_ = JSON.parse(_)), typeof d == "string" && (d = JSON.parse(d)), Array.isArray(_) && 0 < _.length), B = !Array.isArray(d[0]);
|
|
939
|
-
if (T && o) {
|
|
940
|
-
for (var k = 0; k < _.length; k++) 0 < k && (M += g), M += p(_[k], k);
|
|
941
|
-
0 < d.length && (M += b);
|
|
942
|
-
}
|
|
943
|
-
for (var E = 0; E < d.length; E++) {
|
|
944
|
-
var O = (T ? _ : d[E]).length, v = !1, L = T ? Object.keys(d[E]).length === 0 : d[E].length === 0;
|
|
945
|
-
if (x && !T && (v = x === "greedy" ? d[E].join("").trim() === "" : d[E].length === 1 && d[E][0].length === 0), x === "greedy" && T) {
|
|
946
|
-
for (var F = [], A = 0; A < O; A++) {
|
|
947
|
-
var I = B ? _[A] : A;
|
|
948
|
-
F.push(d[E][I]);
|
|
949
|
-
}
|
|
950
|
-
v = F.join("").trim() === "";
|
|
951
|
-
}
|
|
952
|
-
if (!v) {
|
|
953
|
-
for (var D = 0; D < O; D++) {
|
|
954
|
-
0 < D && !L && (M += g);
|
|
955
|
-
var Z = T && B ? _[D] : D;
|
|
956
|
-
M += p(d[E][Z], D);
|
|
957
|
-
}
|
|
958
|
-
E < d.length - 1 && (!x || 0 < O && !L) && (M += b);
|
|
959
|
-
}
|
|
960
|
-
}
|
|
961
|
-
return M;
|
|
962
|
-
}
|
|
963
|
-
function p(_, d) {
|
|
964
|
-
var x, M;
|
|
965
|
-
return _ == null ? "" : _.constructor === Date ? JSON.stringify(_).slice(1, 25) : (M = !1, u && typeof _ == "string" && u.test(_) && (_ = "'" + _, M = !0), x = _.toString().replace(h, f), (M = M || n === !0 || typeof n == "function" && n(_, d) || Array.isArray(n) && n[d] || ((T, B) => {
|
|
966
|
-
for (var k = 0; k < B.length; k++) if (-1 < T.indexOf(B[k])) return !0;
|
|
967
|
-
return !1;
|
|
968
|
-
})(x, w.BAD_DELIMITERS) || -1 < x.indexOf(g) || x.charAt(0) === " " || x.charAt(x.length - 1) === " ") ? m + x + m : x);
|
|
969
|
-
}
|
|
970
|
-
}, w.RECORD_SEP = "", w.UNIT_SEP = "", w.BYTE_ORDER_MARK = "\uFEFF", w.BAD_DELIMITERS = ["\r", `
|
|
971
|
-
`, '"', w.BYTE_ORDER_MARK], w.WORKERS_SUPPORTED = !C && !!l.Worker, w.NODE_STREAM_INPUT = 1, w.LocalChunkSize = 10485760, w.RemoteChunkSize = 5242880, w.DefaultDelimiter = ",", w.Parser = he, w.ParserHandle = ee, w.NetworkStreamer = W, w.FileStreamer = X, w.StringStreamer = K, w.ReadableStreamStreamer = Q, l.jQuery && (($ = l.jQuery).fn.parse = function(e) {
|
|
972
|
-
var t = e.config || {}, n = [];
|
|
973
|
-
return this.each(function(b) {
|
|
974
|
-
if (!($(this).prop("tagName").toUpperCase() === "INPUT" && $(this).attr("type").toLowerCase() === "file" && l.FileReader) || !this.files || this.files.length === 0) return !0;
|
|
975
|
-
for (var m = 0; m < this.files.length; m++) n.push({ file: this.files[m], inputElem: this, instanceConfig: $.extend({}, t) });
|
|
976
|
-
}), o(), this;
|
|
977
|
-
function o() {
|
|
978
|
-
if (n.length === 0) R(e.complete) && e.complete();
|
|
979
|
-
else {
|
|
980
|
-
var b, m, f, c, a = n[0];
|
|
981
|
-
if (R(e.before)) {
|
|
982
|
-
var u = e.before(a.file, a.inputElem);
|
|
983
|
-
if (typeof u == "object") {
|
|
984
|
-
if (u.action === "abort") return b = "AbortError", m = a.file, f = a.inputElem, c = u.reason, void (R(e.error) && e.error({ name: b }, m, f, c));
|
|
985
|
-
if (u.action === "skip") return void g();
|
|
986
|
-
typeof u.config == "object" && (a.instanceConfig = $.extend(a.instanceConfig, u.config));
|
|
987
|
-
} else if (u === "skip") return void g();
|
|
988
|
-
}
|
|
989
|
-
var h = a.instanceConfig.complete;
|
|
990
|
-
a.instanceConfig.complete = function(y) {
|
|
991
|
-
R(h) && h(y, a.file, a.inputElem), g();
|
|
992
|
-
}, w.parse(a.file, a.instanceConfig);
|
|
993
|
-
}
|
|
994
|
-
}
|
|
995
|
-
function g() {
|
|
996
|
-
n.splice(0, 1), o();
|
|
997
|
-
}
|
|
998
|
-
}), j && (l.onmessage = function(e) {
|
|
999
|
-
e = e.data, w.WORKER_ID === void 0 && e && (w.WORKER_ID = e.workerId), typeof e.input == "string" ? l.postMessage({ workerId: w.WORKER_ID, results: w.parse(e.input, e.config), finished: !0 }) : (l.File && e.input instanceof File || e.input instanceof Object) && (e = w.parse(e.input, e.config)) && l.postMessage({ workerId: w.WORKER_ID, results: e, finished: !0 });
|
|
1000
|
-
}), (W.prototype = Object.create(P.prototype)).constructor = W, (X.prototype = Object.create(P.prototype)).constructor = X, (K.prototype = Object.create(K.prototype)).constructor = K, (Q.prototype = Object.create(P.prototype)).constructor = Q, w;
|
|
1001
|
-
});
|
|
1002
|
-
})(we)), we.exports;
|
|
956
|
+
};
|
|
957
|
+
}));
|
|
958
|
+
})(be)), be.exports;
|
|
1003
959
|
}
|
|
1004
|
-
var
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
960
|
+
var Qe = Je();
|
|
961
|
+
const Ve = /* @__PURE__ */ Re(Qe);
|
|
962
|
+
G.extend(Ve);
|
|
963
|
+
Date.prototype.isAfter = function(s, r) {
|
|
964
|
+
return G(this).isAfter(s, r);
|
|
965
|
+
};
|
|
966
|
+
Date.prototype.isBefore = function(s, r) {
|
|
967
|
+
return G(this).isBefore(s, r);
|
|
968
|
+
};
|
|
969
|
+
Date.prototype.format = function(s) {
|
|
970
|
+
return G(this).format(s);
|
|
971
|
+
};
|
|
972
|
+
Date.prototype.isValid = function() {
|
|
973
|
+
return G(this).isValid();
|
|
974
|
+
};
|
|
975
|
+
Date.prototype.add = function(s, r) {
|
|
976
|
+
return G(this).add(s, r).toDate();
|
|
977
|
+
};
|
|
978
|
+
Date.prototype.subtract = function(s, r) {
|
|
979
|
+
return G(this).subtract(s, r).toDate();
|
|
980
|
+
};
|
|
981
|
+
Date.prototype.firstDayOfMonth = function() {
|
|
982
|
+
return G(this).startOf("month").toDate();
|
|
983
|
+
};
|
|
984
|
+
Date.prototype.lastDayOfMonth = function() {
|
|
985
|
+
return G(this).endOf("month").toDate();
|
|
986
|
+
};
|
|
987
|
+
Date.prototype.set = function(s, r) {
|
|
988
|
+
return G(this).set(s, r).toDate();
|
|
989
|
+
};
|
|
990
|
+
Date.prototype.diff = function(s, r) {
|
|
991
|
+
return G(this).diff(s, r);
|
|
992
|
+
};
|
|
993
|
+
String.prototype.capitalize = function() {
|
|
994
|
+
return this.charAt(0).toUpperCase() + this.slice(1);
|
|
995
|
+
};
|
|
996
|
+
String.prototype.isNumber = function() {
|
|
997
|
+
return !isNaN(Number(this)) && this.trim() !== "";
|
|
998
|
+
};
|
|
999
|
+
String.prototype.isEmpty = function() {
|
|
1000
|
+
return this === void 0 || !this || this.length === 0;
|
|
1001
|
+
};
|
|
1002
|
+
var V = /* @__PURE__ */ ((s) => (s.opera = "opera", s.firefox = "firefox", s.safari = "safari", s.ie = "ie", s.edge = "edge", s.edg = "edg", s.electron = "electron", s.chrome = "chrome", s.iOsSafari = "iOsSafari", s.edgiOs = "edgiOs", s.headlessChrome = "headlessChrome", s))(V || {});
|
|
1003
|
+
const ce = {
|
|
1004
|
+
xs: 0,
|
|
1005
|
+
sm: 576,
|
|
1006
|
+
md: 768,
|
|
1007
|
+
lg: 992,
|
|
1008
|
+
xl: 1200,
|
|
1009
|
+
xxl: 1400,
|
|
1010
|
+
xxxl: 1600
|
|
1011
|
+
};
|
|
1012
|
+
class rt {
|
|
1013
|
+
screenWidth = 0;
|
|
1014
|
+
lastBreakpoint;
|
|
1015
|
+
resizeListener;
|
|
1016
|
+
breakpointChangeCallbacks = /* @__PURE__ */ new Set();
|
|
1017
|
+
// feuert nur bei Breakpoint-Änderung
|
|
1018
|
+
onResizeCallbacks = /* @__PURE__ */ new Set();
|
|
1019
|
+
// feuert bei jedem throttled Resize
|
|
1020
|
+
rafId = null;
|
|
1021
|
+
emitTimeoutId = null;
|
|
1022
|
+
// für debounce der onResizeCallbacks
|
|
1023
|
+
pendingWidth;
|
|
1024
|
+
pendingBreakpoint;
|
|
1025
|
+
duplicateThresholdMs = 60;
|
|
1026
|
+
constructor() {
|
|
1027
|
+
typeof window < "u" && (this.screenWidth = window.innerWidth, this.resizeListener = this.onResize.bind(this), window.addEventListener("resize", this.resizeListener, { passive: !0 }), this.lastBreakpoint = this.getBreakpointByScreenWidth(this.screenWidth));
|
|
1015
1028
|
}
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
return new Promise((l, $) => {
|
|
1019
|
-
s.onload = (C) => {
|
|
1020
|
-
l(C);
|
|
1021
|
-
}, s.onerror = (C) => {
|
|
1022
|
-
$(C);
|
|
1023
|
-
}, s.readAsBinaryString(r);
|
|
1024
|
-
});
|
|
1029
|
+
destroy() {
|
|
1030
|
+
typeof window < "u" && window.removeEventListener("resize", this.resizeListener), this.breakpointChangeCallbacks.clear(), this.onResizeCallbacks.clear(), this.rafId !== null && (cancelAnimationFrame(this.rafId), this.rafId = null);
|
|
1025
1031
|
}
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
}, s.onerror = (C) => $(C), s.readAsDataURL(r);
|
|
1032
|
-
});
|
|
1032
|
+
getCurrentBreakpoint() {
|
|
1033
|
+
return this.lastBreakpoint;
|
|
1034
|
+
}
|
|
1035
|
+
getCurrentScreenWidth() {
|
|
1036
|
+
return this.screenWidth;
|
|
1033
1037
|
}
|
|
1034
|
-
|
|
1035
|
-
|
|
1038
|
+
onBreakpointChange(r) {
|
|
1039
|
+
this.breakpointChangeCallbacks.add(r);
|
|
1036
1040
|
}
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
xe.parse(r, {
|
|
1040
|
-
header: !0,
|
|
1041
|
-
complete: ($) => s($),
|
|
1042
|
-
error: ($) => l($)
|
|
1043
|
-
});
|
|
1044
|
-
});
|
|
1041
|
+
offBreakpointChange(r) {
|
|
1042
|
+
this.breakpointChangeCallbacks.delete(r);
|
|
1045
1043
|
}
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
return /[.]/.exec(r) && (s = `.${/[^.]+$/.exec(r)?.[0]}`), s;
|
|
1044
|
+
onResizeChange(r) {
|
|
1045
|
+
this.onResizeCallbacks.add(r);
|
|
1049
1046
|
}
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
$e($, s);
|
|
1047
|
+
offResizeChange(r) {
|
|
1048
|
+
this.onResizeCallbacks.delete(r);
|
|
1053
1049
|
}
|
|
1054
|
-
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
|
|
1050
|
+
getCurrentBrowser() {
|
|
1051
|
+
const r = navigator.userAgent.toLowerCase();
|
|
1052
|
+
if (this.isOpera()) return V.opera;
|
|
1053
|
+
if (this.isFirefox()) return V.firefox;
|
|
1054
|
+
if (this.isSafari()) return V.safari;
|
|
1055
|
+
if (this.isIE()) return V.ie;
|
|
1056
|
+
if (this.isEdge()) return V.edge;
|
|
1057
|
+
if (this.isEdg()) return V.edg;
|
|
1058
|
+
if (this.isElectron(r)) return V.electron;
|
|
1059
|
+
if (this.isChrome()) return V.chrome;
|
|
1060
|
+
if (this.isIOsSafari(r)) return V.iOsSafari;
|
|
1061
|
+
if (this.isEdgiOs(r)) return V.edgiOs;
|
|
1062
|
+
if (this.isHeadlessChrome(r)) return V.headlessChrome;
|
|
1063
|
+
throw new Error("Browser could not be detected: " + r);
|
|
1058
1064
|
}
|
|
1059
|
-
|
|
1060
|
-
let
|
|
1061
|
-
const l
|
|
1062
|
-
|
|
1065
|
+
getBreakpointByScreenWidth(r = this.screenWidth) {
|
|
1066
|
+
let i = "xs";
|
|
1067
|
+
for (const l of Object.keys(ce))
|
|
1068
|
+
ce[l] <= r && (i = l);
|
|
1069
|
+
return { breakpoint: i, screenWidth: ce[i] };
|
|
1063
1070
|
}
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
return s && localStorage.removeItem(r), s;
|
|
1071
|
+
isScreenGreaterThan(r) {
|
|
1072
|
+
return this.screenWidth > ce[r];
|
|
1067
1073
|
}
|
|
1068
|
-
|
|
1069
|
-
|
|
1074
|
+
isScreenSmallerThan(r) {
|
|
1075
|
+
return this.screenWidth < ce[r];
|
|
1070
1076
|
}
|
|
1071
|
-
|
|
1072
|
-
return
|
|
1077
|
+
getBreakpoint(r) {
|
|
1078
|
+
return {
|
|
1079
|
+
breakpoint: r,
|
|
1080
|
+
screenWidth: ce[r]
|
|
1081
|
+
};
|
|
1073
1082
|
}
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
class et {
|
|
1077
|
-
logType = Me;
|
|
1078
|
-
log(...r) {
|
|
1079
|
-
this._doLog(this.logType.log, r.join(" "));
|
|
1083
|
+
isOpera() {
|
|
1084
|
+
return typeof window < "u" && (!!window.opr && !!window.opr.addons || !!window.opera || navigator.userAgent.includes("OPR/"));
|
|
1080
1085
|
}
|
|
1081
|
-
|
|
1082
|
-
|
|
1086
|
+
isFirefox() {
|
|
1087
|
+
return typeof globalThis.InstallTrigger < "u";
|
|
1083
1088
|
}
|
|
1084
|
-
|
|
1085
|
-
|
|
1089
|
+
isSafari() {
|
|
1090
|
+
return typeof window > "u" ? !1 : /constructor/i.test(window.HTMLElement) || ((r) => r.toString() === "[object SafariRemoteNotification]")(
|
|
1091
|
+
!window.safari || window.safari && window.safari.pushNotification
|
|
1092
|
+
);
|
|
1086
1093
|
}
|
|
1087
|
-
|
|
1088
|
-
|
|
1094
|
+
isIE() {
|
|
1095
|
+
return typeof document > "u" ? !1 : !!document.documentMode;
|
|
1089
1096
|
}
|
|
1090
|
-
|
|
1091
|
-
this.
|
|
1097
|
+
isEdge() {
|
|
1098
|
+
return typeof window > "u" ? !1 : !this.isIE() && !!window.StyleMedia;
|
|
1092
1099
|
}
|
|
1093
|
-
|
|
1094
|
-
|
|
1100
|
+
isEdg() {
|
|
1101
|
+
return typeof navigator > "u" ? !1 : navigator.userAgent.toLowerCase().includes("edg");
|
|
1095
1102
|
}
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
|
|
1103
|
+
isElectron(r) {
|
|
1104
|
+
return r.includes("electron");
|
|
1105
|
+
}
|
|
1106
|
+
isChrome() {
|
|
1107
|
+
return typeof window > "u" ? !1 : !!window.chrome && !this.isOpera() && !this.isEdge() && !this.isEdg() && !this.isFirefox() && !this.isSafari() && !this.isIE();
|
|
1100
1108
|
}
|
|
1101
|
-
|
|
1102
|
-
return
|
|
1109
|
+
isIOsSafari(r) {
|
|
1110
|
+
return r.includes("iphone") || r.includes("ipad") || r.includes("macintosh") && typeof document < "u" && "ontouchend" in document && r.includes("safari");
|
|
1103
1111
|
}
|
|
1104
|
-
|
|
1105
|
-
|
|
1112
|
+
isEdgiOs(r) {
|
|
1113
|
+
return r.includes("edgios");
|
|
1106
1114
|
}
|
|
1107
|
-
|
|
1108
|
-
|
|
1115
|
+
isHeadlessChrome(r) {
|
|
1116
|
+
return r.includes("headlesschrome");
|
|
1109
1117
|
}
|
|
1118
|
+
onResize = () => {
|
|
1119
|
+
if (typeof window > "u") return;
|
|
1120
|
+
const r = window.innerWidth, i = this.getBreakpointByScreenWidth(r);
|
|
1121
|
+
this.lastBreakpoint?.breakpoint !== i?.breakpoint && (this.lastBreakpoint = i, i && this.breakpointChangeCallbacks.forEach((l) => l(i))), this.pendingWidth = r, this.pendingBreakpoint = i, this.emitTimeoutId && clearTimeout(this.emitTimeoutId), this.emitTimeoutId = window.setTimeout(() => {
|
|
1122
|
+
this.pendingBreakpoint && this.onResizeCallbacks.forEach((l) => l(this.pendingWidth, this.pendingBreakpoint)), this.pendingWidth = void 0, this.pendingBreakpoint = void 0, this.emitTimeoutId = null;
|
|
1123
|
+
}, this.duplicateThresholdMs);
|
|
1124
|
+
};
|
|
1110
1125
|
}
|
|
1111
1126
|
export {
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
tt as
|
|
1120
|
-
|
|
1121
|
-
|
|
1127
|
+
rt as BrowserService,
|
|
1128
|
+
Ge as CsvHelper,
|
|
1129
|
+
Xe as EnumHelper,
|
|
1130
|
+
et as FileHelper,
|
|
1131
|
+
_e as LocalStorageHelper,
|
|
1132
|
+
pe as LoggerHelper,
|
|
1133
|
+
ce as ScreenBreakpoints,
|
|
1134
|
+
tt as TokenHelper,
|
|
1135
|
+
Ze as copyToClipboard,
|
|
1136
|
+
Le as saveAs,
|
|
1137
|
+
Ye as sortHelper
|
|
1122
1138
|
};
|