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