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