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