@oardi/ts-utils 0.0.47 → 0.0.52

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