@oardi/ts-utils 0.0.44 → 0.0.47

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