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