@oardi/ts-utils 0.0.14 → 0.0.15

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