@oardi/ts-utils 0.0.32 → 0.0.33
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/extensions/array-extensions.d.ts +12 -0
- package/extensions/array-extensions.d.ts.map +1 -0
- package/extensions/date-extensions.d.ts +19 -0
- package/extensions/date-extensions.d.ts.map +1 -0
- package/extensions/index.d.ts +5 -2
- package/extensions/index.d.ts.map +1 -1
- package/extensions/string-extensions.d.ts +6 -6
- package/extensions/string-extensions.d.ts.map +1 -1
- package/helpers/browser/browser-type.enum.d.ts +4 -5
- package/helpers/browser/browser-type.enum.d.ts.map +1 -1
- package/helpers/browser/browser.helper.d.ts +12 -11
- package/helpers/browser/browser.helper.d.ts.map +1 -1
- package/index.cjs.js +7 -7
- package/index.es.js +306 -315
- package/index.umd.js +5 -5
- package/package.json +1 -1
- package/readme.md +5 -1
- package/extensions/array-extension.d.ts +0 -12
- package/extensions/array-extension.d.ts.map +0 -1
- package/extensions/date-extension.d.ts +0 -18
- package/extensions/date-extension.d.ts.map +0 -1
package/index.es.js
CHANGED
|
@@ -1,37 +1,37 @@
|
|
|
1
|
-
function
|
|
1
|
+
function Gt(s) {
|
|
2
2
|
return navigator.clipboard.writeText(s);
|
|
3
3
|
}
|
|
4
|
-
function
|
|
4
|
+
function kt(s) {
|
|
5
5
|
return s && s.__esModule && Object.prototype.hasOwnProperty.call(s, "default") ? s.default : s;
|
|
6
6
|
}
|
|
7
|
-
var
|
|
7
|
+
var _t = { exports: {} };
|
|
8
8
|
/* @license
|
|
9
9
|
Papa Parse
|
|
10
10
|
v5.5.3
|
|
11
11
|
https://github.com/mholt/PapaParse
|
|
12
12
|
License: MIT
|
|
13
13
|
*/
|
|
14
|
-
var $
|
|
15
|
-
function
|
|
16
|
-
return
|
|
14
|
+
var $t = _t.exports, Et;
|
|
15
|
+
function Rt() {
|
|
16
|
+
return Et || (Et = 1, (function(s, r) {
|
|
17
17
|
((i, f) => {
|
|
18
18
|
s.exports = f();
|
|
19
|
-
})($
|
|
19
|
+
})($t, function i() {
|
|
20
20
|
var f = typeof self < "u" ? self : typeof window < "u" ? window : f !== void 0 ? f : {}, b, $ = !f.document && !!f.postMessage, L = f.IS_PAPA_WORKER || !1, Y = {}, N = 0, w = {};
|
|
21
|
-
function q(
|
|
22
|
-
this._handle = null, this._finished = !1, this._completed = !1, this._halted = !1, this._input = null, this._baseIndex = 0, this._partialLine = "", this._rowCount = 0, this._start = 0, this._nextChunk = null, this.isFirstChunk = !0, this._completeResults = { data: [], errors: [], meta: {} }, (function(
|
|
23
|
-
var n =
|
|
24
|
-
n.chunkSize = parseInt(n.chunkSize),
|
|
25
|
-
}).call(this,
|
|
21
|
+
function q(t) {
|
|
22
|
+
this._handle = null, this._finished = !1, this._completed = !1, this._halted = !1, this._input = null, this._baseIndex = 0, this._partialLine = "", this._rowCount = 0, this._start = 0, this._nextChunk = null, this.isFirstChunk = !0, this._completeResults = { data: [], errors: [], meta: {} }, (function(e) {
|
|
23
|
+
var n = st(e);
|
|
24
|
+
n.chunkSize = parseInt(n.chunkSize), e.step || e.chunk || (n.chunkSize = null), this._handle = new tt(n), (this._handle.streamer = this)._config = n;
|
|
25
|
+
}).call(this, t), this.parseChunk = function(e, n) {
|
|
26
26
|
var o = parseInt(this._config.skipFirstNLines) || 0;
|
|
27
27
|
if (this.isFirstChunk && 0 < o) {
|
|
28
28
|
let S = this._config.newline;
|
|
29
|
-
S || (g = this._config.quoteChar || '"', S = this._handle.guessLineEndings(
|
|
29
|
+
S || (g = this._config.quoteChar || '"', S = this._handle.guessLineEndings(e, g)), e = [...e.split(S).slice(o)].join(S);
|
|
30
30
|
}
|
|
31
|
-
this.isFirstChunk && C(this._config.beforeFirstChunk) && (g = this._config.beforeFirstChunk(
|
|
32
|
-
var o = this._partialLine +
|
|
31
|
+
this.isFirstChunk && C(this._config.beforeFirstChunk) && (g = this._config.beforeFirstChunk(e)) !== void 0 && (e = g), this.isFirstChunk = !1, this._halted = !1;
|
|
32
|
+
var o = this._partialLine + e, g = (this._partialLine = "", this._handle.parse(o, this._baseIndex, !this._finished));
|
|
33
33
|
if (!this._handle.paused() && !this._handle.aborted()) {
|
|
34
|
-
if (
|
|
34
|
+
if (e = g.meta.cursor, o = (this._finished || (this._partialLine = o.substring(e - this._baseIndex), this._baseIndex = e), g && g.data && (this._rowCount += g.data.length), this._finished || this._config.preview && this._rowCount >= this._config.preview), L) f.postMessage({ results: g, workerId: w.WORKER_ID, finished: o });
|
|
35
35
|
else if (C(this._config.chunk) && !n) {
|
|
36
36
|
if (this._config.chunk(g, this._handle), this._handle.paused() || this._handle.aborted()) return void (this._halted = !0);
|
|
37
37
|
this._completeResults = g = void 0;
|
|
@@ -39,13 +39,13 @@ function Re() {
|
|
|
39
39
|
return this._config.step || this._config.chunk || (this._completeResults.data = this._completeResults.data.concat(g.data), this._completeResults.errors = this._completeResults.errors.concat(g.errors), this._completeResults.meta = g.meta), this._completed || !o || !C(this._config.complete) || g && g.meta.aborted || (this._config.complete(this._completeResults, this._input), this._completed = !0), o || g && g.meta.paused || this._nextChunk(), g;
|
|
40
40
|
}
|
|
41
41
|
this._halted = !0;
|
|
42
|
-
}, this._sendError = function(
|
|
43
|
-
C(this._config.error) ? this._config.error(
|
|
42
|
+
}, this._sendError = function(e) {
|
|
43
|
+
C(this._config.error) ? this._config.error(e) : L && this._config.error && f.postMessage({ workerId: w.WORKER_ID, error: e, finished: !1 });
|
|
44
44
|
};
|
|
45
45
|
}
|
|
46
|
-
function B(
|
|
47
|
-
var
|
|
48
|
-
(
|
|
46
|
+
function B(t) {
|
|
47
|
+
var e;
|
|
48
|
+
(t = t || {}).chunkSize || (t.chunkSize = w.RemoteChunkSize), q.call(this, t), this._nextChunk = $ ? function() {
|
|
49
49
|
this._readChunk(), this._chunkLoaded();
|
|
50
50
|
} : function() {
|
|
51
51
|
this._readChunk();
|
|
@@ -54,53 +54,53 @@ function Re() {
|
|
|
54
54
|
}, this._readChunk = function() {
|
|
55
55
|
if (this._finished) this._chunkLoaded();
|
|
56
56
|
else {
|
|
57
|
-
if (
|
|
57
|
+
if (e = new XMLHttpRequest(), this._config.withCredentials && (e.withCredentials = this._config.withCredentials), $ || (e.onload = W(this._chunkLoaded, this), e.onerror = W(this._chunkError, this)), e.open(this._config.downloadRequestBody ? "POST" : "GET", this._input, !$), this._config.downloadRequestHeaders) {
|
|
58
58
|
var n, o = this._config.downloadRequestHeaders;
|
|
59
|
-
for (n in o)
|
|
59
|
+
for (n in o) e.setRequestHeader(n, o[n]);
|
|
60
60
|
}
|
|
61
61
|
var g;
|
|
62
|
-
this._config.chunkSize && (g = this._start + this._config.chunkSize - 1,
|
|
62
|
+
this._config.chunkSize && (g = this._start + this._config.chunkSize - 1, e.setRequestHeader("Range", "bytes=" + this._start + "-" + g));
|
|
63
63
|
try {
|
|
64
|
-
|
|
64
|
+
e.send(this._config.downloadRequestBody);
|
|
65
65
|
} catch (S) {
|
|
66
66
|
this._chunkError(S.message);
|
|
67
67
|
}
|
|
68
|
-
$ &&
|
|
68
|
+
$ && e.status === 0 && this._chunkError();
|
|
69
69
|
}
|
|
70
70
|
}, this._chunkLoaded = function() {
|
|
71
|
-
|
|
71
|
+
e.readyState === 4 && (e.status < 200 || 400 <= e.status ? this._chunkError() : (this._start += this._config.chunkSize || e.responseText.length, this._finished = !this._config.chunkSize || this._start >= ((n) => (n = n.getResponseHeader("Content-Range")) !== null ? parseInt(n.substring(n.lastIndexOf("/") + 1)) : -1)(e), this.parseChunk(e.responseText)));
|
|
72
72
|
}, this._chunkError = function(n) {
|
|
73
|
-
n =
|
|
73
|
+
n = e.statusText || n, this._sendError(new Error(n));
|
|
74
74
|
};
|
|
75
75
|
}
|
|
76
|
-
function X(
|
|
77
|
-
(
|
|
78
|
-
var
|
|
76
|
+
function X(t) {
|
|
77
|
+
(t = t || {}).chunkSize || (t.chunkSize = w.LocalChunkSize), q.call(this, t);
|
|
78
|
+
var e, n, o = typeof FileReader < "u";
|
|
79
79
|
this.stream = function(g) {
|
|
80
|
-
this._input = g, n = g.slice || g.webkitSlice || g.mozSlice, o ? ((
|
|
80
|
+
this._input = g, n = g.slice || g.webkitSlice || g.mozSlice, o ? ((e = new FileReader()).onload = W(this._chunkLoaded, this), e.onerror = W(this._chunkError, this)) : e = new FileReaderSync(), this._nextChunk();
|
|
81
81
|
}, this._nextChunk = function() {
|
|
82
82
|
this._finished || this._config.preview && !(this._rowCount < this._config.preview) || this._readChunk();
|
|
83
83
|
}, this._readChunk = function() {
|
|
84
|
-
var g = this._input, S = (this._config.chunkSize && (S = Math.min(this._start + this._config.chunkSize, this._input.size), g = n.call(g, this._start, S)),
|
|
84
|
+
var g = this._input, S = (this._config.chunkSize && (S = Math.min(this._start + this._config.chunkSize, this._input.size), g = n.call(g, this._start, S)), e.readAsText(g, this._config.encoding));
|
|
85
85
|
o || this._chunkLoaded({ target: { result: S } });
|
|
86
86
|
}, this._chunkLoaded = function(g) {
|
|
87
87
|
this._start += this._config.chunkSize, this._finished = !this._config.chunkSize || this._start >= this._input.size, this.parseChunk(g.target.result);
|
|
88
88
|
}, this._chunkError = function() {
|
|
89
|
-
this._sendError(
|
|
89
|
+
this._sendError(e.error);
|
|
90
90
|
};
|
|
91
91
|
}
|
|
92
|
-
function K(
|
|
93
|
-
var
|
|
94
|
-
q.call(this,
|
|
95
|
-
return
|
|
92
|
+
function K(t) {
|
|
93
|
+
var e;
|
|
94
|
+
q.call(this, t = t || {}), this.stream = function(n) {
|
|
95
|
+
return e = n, this._nextChunk();
|
|
96
96
|
}, this._nextChunk = function() {
|
|
97
97
|
var n, o;
|
|
98
|
-
if (!this._finished) return n = this._config.chunkSize,
|
|
98
|
+
if (!this._finished) return n = this._config.chunkSize, e = n ? (o = e.substring(0, n), e.substring(n)) : (o = e, ""), this._finished = !e, this.parseChunk(o);
|
|
99
99
|
};
|
|
100
100
|
}
|
|
101
|
-
function V(
|
|
102
|
-
q.call(this,
|
|
103
|
-
var
|
|
101
|
+
function V(t) {
|
|
102
|
+
q.call(this, t = t || {});
|
|
103
|
+
var e = [], n = !0, o = !1;
|
|
104
104
|
this.pause = function() {
|
|
105
105
|
q.prototype.pause.apply(this, arguments), this._input.pause();
|
|
106
106
|
}, this.resume = function() {
|
|
@@ -108,12 +108,12 @@ function Re() {
|
|
|
108
108
|
}, this.stream = function(g) {
|
|
109
109
|
this._input = g, this._input.on("data", this._streamData), this._input.on("end", this._streamEnd), this._input.on("error", this._streamError);
|
|
110
110
|
}, this._checkIsFinished = function() {
|
|
111
|
-
o &&
|
|
111
|
+
o && e.length === 1 && (this._finished = !0);
|
|
112
112
|
}, this._nextChunk = function() {
|
|
113
|
-
this._checkIsFinished(),
|
|
113
|
+
this._checkIsFinished(), e.length ? this.parseChunk(e.shift()) : n = !0;
|
|
114
114
|
}, this._streamData = W(function(g) {
|
|
115
115
|
try {
|
|
116
|
-
|
|
116
|
+
e.push(typeof g == "string" ? g : g.toString(this._config.encoding)), n && (n = !1, this._checkIsFinished(), this.parseChunk(e.shift()));
|
|
117
117
|
} catch (S) {
|
|
118
118
|
this._streamError(S);
|
|
119
119
|
}
|
|
@@ -125,17 +125,17 @@ function Re() {
|
|
|
125
125
|
this._input.removeListener("data", this._streamData), this._input.removeListener("end", this._streamEnd), this._input.removeListener("error", this._streamError);
|
|
126
126
|
}, this);
|
|
127
127
|
}
|
|
128
|
-
function
|
|
129
|
-
var
|
|
128
|
+
function tt(t) {
|
|
129
|
+
var e, n, o, g, S = Math.pow(2, 53), m = -S, h = /^\s*-?(\d+\.?|\.\d+|\d+\.\d+)([eE][-+]?\d+)?\s*$/, l = /^((\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d\.\d+([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z)))$/, a = this, u = 0, c = 0, y = !1, p = !1, _ = [], d = { data: [], errors: [], meta: {} };
|
|
130
130
|
function O(k) {
|
|
131
|
-
return
|
|
131
|
+
return t.skipEmptyLines === "greedy" ? k.join("").trim() === "" : k.length === 1 && k[0].length === 0;
|
|
132
132
|
}
|
|
133
133
|
function R() {
|
|
134
|
-
if (d && o && (U("Delimiter", "UndetectableDelimiter", "Unable to auto-detect delimiting character; defaulted to '" + w.DefaultDelimiter + "'"), o = !1),
|
|
134
|
+
if (d && o && (U("Delimiter", "UndetectableDelimiter", "Unable to auto-detect delimiting character; defaulted to '" + w.DefaultDelimiter + "'"), o = !1), t.skipEmptyLines && (d.data = d.data.filter(function(v) {
|
|
135
135
|
return !O(v);
|
|
136
136
|
})), F()) {
|
|
137
137
|
let v = function(A, z) {
|
|
138
|
-
C(
|
|
138
|
+
C(t.transformHeader) && (A = t.transformHeader(A, z)), _.push(A);
|
|
139
139
|
};
|
|
140
140
|
if (d) if (Array.isArray(d.data[0])) {
|
|
141
141
|
for (var k = 0; F() && k < d.data.length; k++) d.data[k].forEach(v);
|
|
@@ -143,50 +143,50 @@ function Re() {
|
|
|
143
143
|
} else d.data.forEach(v);
|
|
144
144
|
}
|
|
145
145
|
function E(v, A) {
|
|
146
|
-
for (var z =
|
|
147
|
-
var I = T, M = v[T], M = ((G, D) => ((j) => (
|
|
146
|
+
for (var z = t.header ? {} : [], T = 0; T < v.length; T++) {
|
|
147
|
+
var I = T, M = v[T], M = ((G, D) => ((j) => (t.dynamicTypingFunction && t.dynamicTyping[j] === void 0 && (t.dynamicTyping[j] = t.dynamicTypingFunction(j)), (t.dynamicTyping[j] || t.dynamicTyping) === !0))(G) ? D === "true" || D === "TRUE" || D !== "false" && D !== "FALSE" && (((j) => {
|
|
148
148
|
if (h.test(j) && (j = parseFloat(j), m < j && j < S))
|
|
149
149
|
return 1;
|
|
150
|
-
})(D) ? parseFloat(D) : l.test(D) ? new Date(D) : D === "" ? null : D) : D)(I =
|
|
150
|
+
})(D) ? parseFloat(D) : l.test(D) ? new Date(D) : D === "" ? null : D) : D)(I = t.header ? T >= _.length ? "__parsed_extra" : _[T] : I, M = t.transform ? t.transform(M, I) : M);
|
|
151
151
|
I === "__parsed_extra" ? (z[I] = z[I] || [], z[I].push(M)) : z[I] = M;
|
|
152
152
|
}
|
|
153
|
-
return
|
|
153
|
+
return t.header && (T > _.length ? U("FieldMismatch", "TooManyFields", "Too many fields: expected " + _.length + " fields but parsed " + T, c + A) : T < _.length && U("FieldMismatch", "TooFewFields", "Too few fields: expected " + _.length + " fields but parsed " + T, c + A)), z;
|
|
154
154
|
}
|
|
155
155
|
var x;
|
|
156
|
-
d && (
|
|
156
|
+
d && (t.header || t.dynamicTyping || t.transform) && (x = 1, !d.data.length || Array.isArray(d.data[0]) ? (d.data = d.data.map(E), x = d.data.length) : d.data = E(d.data, 0), t.header && d.meta && (d.meta.fields = _), c += x);
|
|
157
157
|
}
|
|
158
158
|
function F() {
|
|
159
|
-
return
|
|
159
|
+
return t.header && _.length === 0;
|
|
160
160
|
}
|
|
161
161
|
function U(k, E, x, v) {
|
|
162
162
|
k = { type: k, code: E, message: x }, v !== void 0 && (k.row = v), d.errors.push(k);
|
|
163
163
|
}
|
|
164
|
-
C(
|
|
165
|
-
d = k, F() ? R() : (R(), d.data.length !== 0 && (u += k.data.length,
|
|
164
|
+
C(t.step) && (g = t.step, t.step = function(k) {
|
|
165
|
+
d = k, F() ? R() : (R(), d.data.length !== 0 && (u += k.data.length, t.preview && u > t.preview ? n.abort() : (d.data = d.data[0], g(d, a))));
|
|
166
166
|
}), this.parse = function(k, E, x) {
|
|
167
|
-
var v =
|
|
168
|
-
var G, D, j,
|
|
167
|
+
var v = t.quoteChar || '"', v = (t.newline || (t.newline = this.guessLineEndings(k, v)), o = !1, t.delimiter ? C(t.delimiter) && (t.delimiter = t.delimiter(k), d.meta.delimiter = t.delimiter) : ((v = ((A, z, T, I, M) => {
|
|
168
|
+
var G, D, j, ut;
|
|
169
169
|
M = M || [",", " ", "|", ";", w.RECORD_SEP, w.UNIT_SEP];
|
|
170
|
-
for (var
|
|
171
|
-
for (var
|
|
172
|
-
0 < Q.data.length && (
|
|
170
|
+
for (var lt = 0; lt < M.length; lt++) {
|
|
171
|
+
for (var et, pt = M[lt], H = 0, rt = 0, P = 0, Q = (j = void 0, new ct({ comments: I, delimiter: pt, newline: z, preview: 10 }).parse(A)), at = 0; at < Q.data.length; at++) T && O(Q.data[at]) ? P++ : (et = Q.data[at].length, rt += et, j === void 0 ? j = et : 0 < et && (H += Math.abs(et - j), j = et));
|
|
172
|
+
0 < Q.data.length && (rt /= Q.data.length - P), (D === void 0 || H <= D) && (ut === void 0 || ut < rt) && 1.99 < rt && (D = H, G = pt, ut = rt);
|
|
173
173
|
}
|
|
174
|
-
return { successful: !!(
|
|
175
|
-
})(k,
|
|
176
|
-
return
|
|
174
|
+
return { successful: !!(t.delimiter = G), bestDelimiter: G };
|
|
175
|
+
})(k, t.newline, t.skipEmptyLines, t.comments, t.delimitersToGuess)).successful ? t.delimiter = v.bestDelimiter : (o = !0, t.delimiter = w.DefaultDelimiter), d.meta.delimiter = t.delimiter), st(t));
|
|
176
|
+
return t.preview && t.header && v.preview++, e = k, n = new ct(v), d = n.parse(e, E, x), R(), y ? { meta: { paused: !0 } } : d || { meta: { paused: !1 } };
|
|
177
177
|
}, this.paused = function() {
|
|
178
178
|
return y;
|
|
179
179
|
}, this.pause = function() {
|
|
180
|
-
y = !0, n.abort(),
|
|
180
|
+
y = !0, n.abort(), e = C(t.chunk) ? "" : e.substring(n.getCharIndex());
|
|
181
181
|
}, this.resume = function() {
|
|
182
|
-
a.streamer._halted ? (y = !1, a.streamer.parseChunk(
|
|
182
|
+
a.streamer._halted ? (y = !1, a.streamer.parseChunk(e, !0)) : setTimeout(a.resume, 3);
|
|
183
183
|
}, this.aborted = function() {
|
|
184
184
|
return p;
|
|
185
185
|
}, this.abort = function() {
|
|
186
|
-
p = !0, n.abort(), d.meta.aborted = !0, C(
|
|
186
|
+
p = !0, n.abort(), d.meta.aborted = !0, C(t.complete) && t.complete(d), e = "";
|
|
187
187
|
}, this.guessLineEndings = function(A, v) {
|
|
188
188
|
A = A.substring(0, 1048576);
|
|
189
|
-
var v = new RegExp(
|
|
189
|
+
var v = new RegExp(it(v) + "([^]*?)" + it(v), "gm"), x = (A = A.replace(v, "")).split("\r"), v = A.split(`
|
|
190
190
|
`), A = 1 < v.length && v[0].length < x[0].length;
|
|
191
191
|
if (x.length === 1 || A) return `
|
|
192
192
|
`;
|
|
@@ -196,12 +196,12 @@ function Re() {
|
|
|
196
196
|
` : "\r";
|
|
197
197
|
};
|
|
198
198
|
}
|
|
199
|
-
function
|
|
200
|
-
return
|
|
199
|
+
function it(t) {
|
|
200
|
+
return t.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
201
201
|
}
|
|
202
|
-
function
|
|
203
|
-
var
|
|
204
|
-
if (
|
|
202
|
+
function ct(t) {
|
|
203
|
+
var e = (t = t || {}).delimiter, n = t.newline, o = t.comments, g = t.step, S = t.preview, m = t.fastMode, h = null, l = !1, a = t.quoteChar == null ? '"' : t.quoteChar, u = a;
|
|
204
|
+
if (t.escapeChar !== void 0 && (u = t.escapeChar), (typeof e != "string" || -1 < w.BAD_DELIMITERS.indexOf(e)) && (e = ","), o === e) throw new Error("Comment character same as delimiter");
|
|
205
205
|
o === !0 ? o = "#" : (typeof o != "string" || -1 < w.BAD_DELIMITERS.indexOf(o)) && (o = !1), n !== `
|
|
206
206
|
` && n !== "\r" && n !== `\r
|
|
207
207
|
` && (n = `
|
|
@@ -209,7 +209,7 @@ function Re() {
|
|
|
209
209
|
var c = 0, y = !1;
|
|
210
210
|
this.parse = function(p, _, d) {
|
|
211
211
|
if (typeof p != "string") throw new Error("Input must be a string");
|
|
212
|
-
var O = p.length, R =
|
|
212
|
+
var O = p.length, R = e.length, F = n.length, U = o.length, k = C(g), E = [], x = [], v = [], A = c = 0;
|
|
213
213
|
if (!p) return H();
|
|
214
214
|
if (m || m !== !1 && p.indexOf(a) === -1) {
|
|
215
215
|
for (var z = p.split(n), T = 0; T < z.length; T++) {
|
|
@@ -217,26 +217,26 @@ function Re() {
|
|
|
217
217
|
else if (d) return H();
|
|
218
218
|
if (!o || v.substring(0, U) !== o) {
|
|
219
219
|
if (k) {
|
|
220
|
-
if (E = [],
|
|
221
|
-
} else
|
|
220
|
+
if (E = [], ut(v.split(e)), rt(), y) return H();
|
|
221
|
+
} else ut(v.split(e));
|
|
222
222
|
if (S && S <= T) return E = E.slice(0, S), H(!0);
|
|
223
223
|
}
|
|
224
224
|
}
|
|
225
225
|
return H();
|
|
226
226
|
}
|
|
227
|
-
for (var I = p.indexOf(
|
|
228
|
-
if ((D = p.indexOf(a, D + 1)) === -1) return d || x.push({ type: "Quotes", code: "MissingQuotes", message: "Quoted field unterminated", row: E.length, index: c }),
|
|
229
|
-
if (D === O - 1) return
|
|
227
|
+
for (var I = p.indexOf(e, c), M = p.indexOf(n, c), G = new RegExp(it(u) + it(a), "g"), D = p.indexOf(a, c); ; ) if (p[c] === a) for (D = c, c++; ; ) {
|
|
228
|
+
if ((D = p.indexOf(a, D + 1)) === -1) return d || x.push({ type: "Quotes", code: "MissingQuotes", message: "Quoted field unterminated", row: E.length, index: c }), et();
|
|
229
|
+
if (D === O - 1) return et(p.substring(c, D).replace(G, a));
|
|
230
230
|
if (a === u && p[D + 1] === u) D++;
|
|
231
231
|
else if (a === u || D === 0 || p[D - 1] !== u) {
|
|
232
|
-
I !== -1 && I < D + 1 && (I = p.indexOf(
|
|
233
|
-
var j =
|
|
234
|
-
if (p.substr(D + 1 + j, R) ===
|
|
235
|
-
v.push(p.substring(c, D).replace(G, a)), p[c = D + 1 + j + R] !== a && (D = p.indexOf(a, c)), I = p.indexOf(
|
|
232
|
+
I !== -1 && I < D + 1 && (I = p.indexOf(e, D + 1));
|
|
233
|
+
var j = lt((M = M !== -1 && M < D + 1 ? p.indexOf(n, D + 1) : M) === -1 ? I : Math.min(I, M));
|
|
234
|
+
if (p.substr(D + 1 + j, R) === e) {
|
|
235
|
+
v.push(p.substring(c, D).replace(G, a)), p[c = D + 1 + j + R] !== a && (D = p.indexOf(a, c)), I = p.indexOf(e, c), M = p.indexOf(n, c);
|
|
236
236
|
break;
|
|
237
237
|
}
|
|
238
|
-
if (j =
|
|
239
|
-
if (v.push(p.substring(c, D).replace(G, a)),
|
|
238
|
+
if (j = lt(M), p.substring(D + 1 + j, D + 1 + j + F) === n) {
|
|
239
|
+
if (v.push(p.substring(c, D).replace(G, a)), pt(D + 1 + j + F), I = p.indexOf(e, c), D = p.indexOf(a, c), k && (rt(), y)) return H();
|
|
240
240
|
if (S && E.length >= S) return H(!0);
|
|
241
241
|
break;
|
|
242
242
|
}
|
|
@@ -245,45 +245,45 @@ function Re() {
|
|
|
245
245
|
}
|
|
246
246
|
else if (o && v.length === 0 && p.substring(c, c + U) === o) {
|
|
247
247
|
if (M === -1) return H();
|
|
248
|
-
c = M + F, M = p.indexOf(n, c), I = p.indexOf(
|
|
249
|
-
} else if (I !== -1 && (I < M || M === -1)) v.push(p.substring(c, I)), c = I + R, I = p.indexOf(
|
|
248
|
+
c = M + F, M = p.indexOf(n, c), I = p.indexOf(e, c);
|
|
249
|
+
} else if (I !== -1 && (I < M || M === -1)) v.push(p.substring(c, I)), c = I + R, I = p.indexOf(e, c);
|
|
250
250
|
else {
|
|
251
251
|
if (M === -1) break;
|
|
252
|
-
if (v.push(p.substring(c, M)),
|
|
252
|
+
if (v.push(p.substring(c, M)), pt(M + F), k && (rt(), y)) return H();
|
|
253
253
|
if (S && E.length >= S) return H(!0);
|
|
254
254
|
}
|
|
255
|
-
return
|
|
256
|
-
function
|
|
255
|
+
return et();
|
|
256
|
+
function ut(P) {
|
|
257
257
|
E.push(P), A = c;
|
|
258
258
|
}
|
|
259
|
-
function
|
|
259
|
+
function lt(P) {
|
|
260
260
|
var Q = 0;
|
|
261
261
|
return Q = P !== -1 && (P = p.substring(D + 1, P)) && P.trim() === "" ? P.length : Q;
|
|
262
262
|
}
|
|
263
|
-
function
|
|
264
|
-
return d || (P === void 0 && (P = p.substring(c)), v.push(P), c = O,
|
|
263
|
+
function et(P) {
|
|
264
|
+
return d || (P === void 0 && (P = p.substring(c)), v.push(P), c = O, ut(v), k && rt()), H();
|
|
265
265
|
}
|
|
266
|
-
function
|
|
267
|
-
c = P,
|
|
266
|
+
function pt(P) {
|
|
267
|
+
c = P, ut(v), v = [], M = p.indexOf(n, c);
|
|
268
268
|
}
|
|
269
269
|
function H(P) {
|
|
270
|
-
if (
|
|
271
|
-
var Q = E[0],
|
|
272
|
-
let
|
|
273
|
-
for (let
|
|
274
|
-
let
|
|
275
|
-
if (
|
|
276
|
-
let
|
|
277
|
-
for (;
|
|
278
|
-
|
|
279
|
-
} else
|
|
280
|
-
|
|
270
|
+
if (t.header && !_ && E.length && !l) {
|
|
271
|
+
var Q = E[0], at = /* @__PURE__ */ Object.create(null), bt = new Set(Q);
|
|
272
|
+
let St = !1;
|
|
273
|
+
for (let ft = 0; ft < Q.length; ft++) {
|
|
274
|
+
let nt = Q[ft];
|
|
275
|
+
if (at[nt = C(t.transformHeader) ? t.transformHeader(nt, ft) : nt]) {
|
|
276
|
+
let gt, Dt = at[nt];
|
|
277
|
+
for (; gt = nt + "_" + Dt, Dt++, bt.has(gt); ) ;
|
|
278
|
+
bt.add(gt), Q[ft] = gt, at[nt]++, St = !0, (h = h === null ? {} : h)[gt] = nt;
|
|
279
|
+
} else at[nt] = 1, Q[ft] = nt;
|
|
280
|
+
bt.add(nt);
|
|
281
281
|
}
|
|
282
|
-
|
|
282
|
+
St && console.warn("Duplicate headers found and renamed."), l = !0;
|
|
283
283
|
}
|
|
284
|
-
return { data: E, errors: x, meta: { delimiter:
|
|
284
|
+
return { data: E, errors: x, meta: { delimiter: e, linebreak: n, aborted: y, truncated: !!P, cursor: A + (_ || 0), renamedHeaders: h } };
|
|
285
285
|
}
|
|
286
|
-
function
|
|
286
|
+
function rt() {
|
|
287
287
|
g(H()), E = [], x = [];
|
|
288
288
|
}
|
|
289
289
|
}, this.abort = function() {
|
|
@@ -292,68 +292,68 @@ function Re() {
|
|
|
292
292
|
return c;
|
|
293
293
|
};
|
|
294
294
|
}
|
|
295
|
-
function
|
|
296
|
-
var
|
|
297
|
-
if (
|
|
298
|
-
else if (
|
|
295
|
+
function dt(t) {
|
|
296
|
+
var e = t.data, n = Y[e.workerId], o = !1;
|
|
297
|
+
if (e.error) n.userError(e.error, e.file);
|
|
298
|
+
else if (e.results && e.results.data) {
|
|
299
299
|
var g = { abort: function() {
|
|
300
|
-
o = !0,
|
|
301
|
-
}, pause:
|
|
300
|
+
o = !0, ot(e.workerId, { data: [], errors: [], meta: { aborted: !0 } });
|
|
301
|
+
}, pause: yt, resume: yt };
|
|
302
302
|
if (C(n.userStep)) {
|
|
303
|
-
for (var S = 0; S <
|
|
304
|
-
delete
|
|
305
|
-
} else C(n.userChunk) && (n.userChunk(
|
|
303
|
+
for (var S = 0; S < e.results.data.length && (n.userStep({ data: e.results.data[S], errors: e.results.errors, meta: e.results.meta }, g), !o); S++) ;
|
|
304
|
+
delete e.results;
|
|
305
|
+
} else C(n.userChunk) && (n.userChunk(e.results, g, e.file), delete e.results);
|
|
306
306
|
}
|
|
307
|
-
|
|
307
|
+
e.finished && !o && ot(e.workerId, e.results);
|
|
308
308
|
}
|
|
309
|
-
function
|
|
310
|
-
var n = Y[
|
|
311
|
-
C(n.userComplete) && n.userComplete(
|
|
309
|
+
function ot(t, e) {
|
|
310
|
+
var n = Y[t];
|
|
311
|
+
C(n.userComplete) && n.userComplete(e), n.terminate(), delete Y[t];
|
|
312
312
|
}
|
|
313
|
-
function
|
|
313
|
+
function yt() {
|
|
314
314
|
throw new Error("Not implemented.");
|
|
315
315
|
}
|
|
316
|
-
function
|
|
317
|
-
if (typeof
|
|
318
|
-
var
|
|
319
|
-
for (
|
|
316
|
+
function st(t) {
|
|
317
|
+
if (typeof t != "object" || t === null) return t;
|
|
318
|
+
var e, n = Array.isArray(t) ? [] : {};
|
|
319
|
+
for (e in t) n[e] = st(t[e]);
|
|
320
320
|
return n;
|
|
321
321
|
}
|
|
322
|
-
function W(
|
|
322
|
+
function W(t, e) {
|
|
323
323
|
return function() {
|
|
324
|
-
|
|
324
|
+
t.apply(e, arguments);
|
|
325
325
|
};
|
|
326
326
|
}
|
|
327
|
-
function C(
|
|
328
|
-
return typeof
|
|
327
|
+
function C(t) {
|
|
328
|
+
return typeof t == "function";
|
|
329
329
|
}
|
|
330
|
-
return w.parse = function(
|
|
331
|
-
var n = (
|
|
332
|
-
if (C(n) && (
|
|
330
|
+
return w.parse = function(t, e) {
|
|
331
|
+
var n = (e = e || {}).dynamicTyping || !1;
|
|
332
|
+
if (C(n) && (e.dynamicTypingFunction = n, n = {}), e.dynamicTyping = n, e.transform = !!C(e.transform) && e.transform, !e.worker || !w.WORKERS_SUPPORTED) return n = null, w.NODE_STREAM_INPUT, typeof t == "string" ? (t = ((o) => o.charCodeAt(0) !== 65279 ? o : o.slice(1))(t), n = new (e.download ? B : K)(e)) : t.readable === !0 && C(t.read) && C(t.on) ? n = new V(e) : (f.File && t instanceof File || t instanceof Object) && (n = new X(e)), n.stream(t);
|
|
333
333
|
(n = (() => {
|
|
334
334
|
var o;
|
|
335
335
|
return !!w.WORKERS_SUPPORTED && (o = (() => {
|
|
336
336
|
var g = f.URL || f.webkitURL || null, S = i.toString();
|
|
337
337
|
return w.BLOB_URL || (w.BLOB_URL = g.createObjectURL(new Blob(["var global = (function() { if (typeof self !== 'undefined') { return self; } if (typeof window !== 'undefined') { return window; } if (typeof global !== 'undefined') { return global; } return {}; })(); global.IS_PAPA_WORKER=true; ", "(", S, ")();"], { type: "text/javascript" })));
|
|
338
|
-
})(), (o = new f.Worker(o)).onmessage =
|
|
339
|
-
})()).userStep =
|
|
340
|
-
}, w.unparse = function(
|
|
338
|
+
})(), (o = new f.Worker(o)).onmessage = dt, o.id = N++, Y[o.id] = o);
|
|
339
|
+
})()).userStep = e.step, n.userChunk = e.chunk, n.userComplete = e.complete, n.userError = e.error, e.step = C(e.step), e.chunk = C(e.chunk), e.complete = C(e.complete), e.error = C(e.error), delete e.worker, n.postMessage({ input: t, config: e, workerId: n.id });
|
|
340
|
+
}, w.unparse = function(t, e) {
|
|
341
341
|
var n = !1, o = !0, g = ",", S = `\r
|
|
342
342
|
`, m = '"', h = m + m, l = !1, a = null, u = !1, c = ((() => {
|
|
343
|
-
if (typeof
|
|
344
|
-
if (typeof
|
|
345
|
-
return
|
|
346
|
-
}).length || (g =
|
|
347
|
-
if (
|
|
348
|
-
a =
|
|
343
|
+
if (typeof e == "object") {
|
|
344
|
+
if (typeof e.delimiter != "string" || w.BAD_DELIMITERS.filter(function(_) {
|
|
345
|
+
return e.delimiter.indexOf(_) !== -1;
|
|
346
|
+
}).length || (g = e.delimiter), typeof e.quotes != "boolean" && typeof e.quotes != "function" && !Array.isArray(e.quotes) || (n = e.quotes), typeof e.skipEmptyLines != "boolean" && typeof e.skipEmptyLines != "string" || (l = e.skipEmptyLines), typeof e.newline == "string" && (S = e.newline), typeof e.quoteChar == "string" && (m = e.quoteChar), typeof e.header == "boolean" && (o = e.header), Array.isArray(e.columns)) {
|
|
347
|
+
if (e.columns.length === 0) throw new Error("Option columns is empty");
|
|
348
|
+
a = e.columns;
|
|
349
349
|
}
|
|
350
|
-
|
|
350
|
+
e.escapeChar !== void 0 && (h = e.escapeChar + m), e.escapeFormulae instanceof RegExp ? u = e.escapeFormulae : typeof e.escapeFormulae == "boolean" && e.escapeFormulae && (u = /^[=+\-@\t\r].*$/);
|
|
351
351
|
}
|
|
352
|
-
})(), new RegExp(
|
|
353
|
-
if (typeof
|
|
354
|
-
if (!
|
|
355
|
-
if (typeof
|
|
356
|
-
} else if (typeof
|
|
352
|
+
})(), new RegExp(it(m), "g"));
|
|
353
|
+
if (typeof t == "string" && (t = JSON.parse(t)), Array.isArray(t)) {
|
|
354
|
+
if (!t.length || Array.isArray(t[0])) return y(null, t, l);
|
|
355
|
+
if (typeof t[0] == "object") return y(a || Object.keys(t[0]), t, l);
|
|
356
|
+
} else if (typeof t == "object") return typeof t.data == "string" && (t.data = JSON.parse(t.data)), Array.isArray(t.data) && (t.fields || (t.fields = t.meta && t.meta.fields || a), t.fields || (t.fields = Array.isArray(t.data[0]) ? t.fields : typeof t.data[0] == "object" ? Object.keys(t.data[0]) : []), Array.isArray(t.data[0]) || typeof t.data[0] == "object" || (t.data = [t.data])), y(t.fields || [], t.data || [], l);
|
|
357
357
|
throw new Error("Unable to serialize unrecognized input");
|
|
358
358
|
function y(_, d, O) {
|
|
359
359
|
var R = "", F = (typeof _ == "string" && (_ = JSON.parse(_)), typeof d == "string" && (d = JSON.parse(d)), Array.isArray(_) && 0 < _.length), U = !Array.isArray(d[0]);
|
|
@@ -389,20 +389,20 @@ function Re() {
|
|
|
389
389
|
})(O, w.BAD_DELIMITERS) || -1 < O.indexOf(g) || O.charAt(0) === " " || O.charAt(O.length - 1) === " ") ? m + O + m : O);
|
|
390
390
|
}
|
|
391
391
|
}, w.RECORD_SEP = "", w.UNIT_SEP = "", w.BYTE_ORDER_MARK = "\uFEFF", w.BAD_DELIMITERS = ["\r", `
|
|
392
|
-
`, '"', w.BYTE_ORDER_MARK], w.WORKERS_SUPPORTED = !$ && !!f.Worker, w.NODE_STREAM_INPUT = 1, w.LocalChunkSize = 10485760, w.RemoteChunkSize = 5242880, w.DefaultDelimiter = ",", w.Parser =
|
|
393
|
-
var
|
|
392
|
+
`, '"', w.BYTE_ORDER_MARK], w.WORKERS_SUPPORTED = !$ && !!f.Worker, w.NODE_STREAM_INPUT = 1, w.LocalChunkSize = 10485760, w.RemoteChunkSize = 5242880, w.DefaultDelimiter = ",", w.Parser = ct, w.ParserHandle = tt, w.NetworkStreamer = B, w.FileStreamer = X, w.StringStreamer = K, w.ReadableStreamStreamer = V, f.jQuery && ((b = f.jQuery).fn.parse = function(t) {
|
|
393
|
+
var e = t.config || {}, n = [];
|
|
394
394
|
return this.each(function(S) {
|
|
395
395
|
if (!(b(this).prop("tagName").toUpperCase() === "INPUT" && b(this).attr("type").toLowerCase() === "file" && f.FileReader) || !this.files || this.files.length === 0) return !0;
|
|
396
|
-
for (var m = 0; m < this.files.length; m++) n.push({ file: this.files[m], inputElem: this, instanceConfig: b.extend({},
|
|
396
|
+
for (var m = 0; m < this.files.length; m++) n.push({ file: this.files[m], inputElem: this, instanceConfig: b.extend({}, e) });
|
|
397
397
|
}), o(), this;
|
|
398
398
|
function o() {
|
|
399
|
-
if (n.length === 0) C(
|
|
399
|
+
if (n.length === 0) C(t.complete) && t.complete();
|
|
400
400
|
else {
|
|
401
401
|
var S, m, h, l, a = n[0];
|
|
402
|
-
if (C(
|
|
403
|
-
var u =
|
|
402
|
+
if (C(t.before)) {
|
|
403
|
+
var u = t.before(a.file, a.inputElem);
|
|
404
404
|
if (typeof u == "object") {
|
|
405
|
-
if (u.action === "abort") return S = "AbortError", m = a.file, h = a.inputElem, l = u.reason, void (C(
|
|
405
|
+
if (u.action === "abort") return S = "AbortError", m = a.file, h = a.inputElem, l = u.reason, void (C(t.error) && t.error({ name: S }, m, h, l));
|
|
406
406
|
if (u.action === "skip") return void g();
|
|
407
407
|
typeof u.config == "object" && (a.instanceConfig = b.extend(a.instanceConfig, u.config));
|
|
408
408
|
} else if (u === "skip") return void g();
|
|
@@ -416,21 +416,21 @@ function Re() {
|
|
|
416
416
|
function g() {
|
|
417
417
|
n.splice(0, 1), o();
|
|
418
418
|
}
|
|
419
|
-
}), L && (f.onmessage = function(
|
|
420
|
-
|
|
419
|
+
}), L && (f.onmessage = function(t) {
|
|
420
|
+
t = t.data, w.WORKER_ID === void 0 && t && (w.WORKER_ID = t.workerId), typeof t.input == "string" ? f.postMessage({ workerId: w.WORKER_ID, results: w.parse(t.input, t.config), finished: !0 }) : (f.File && t.input instanceof File || t.input instanceof Object) && (t = w.parse(t.input, t.config)) && f.postMessage({ workerId: w.WORKER_ID, results: t, finished: !0 });
|
|
421
421
|
}), (B.prototype = Object.create(q.prototype)).constructor = B, (X.prototype = Object.create(q.prototype)).constructor = X, (K.prototype = Object.create(K.prototype)).constructor = K, (V.prototype = Object.create(q.prototype)).constructor = V, w;
|
|
422
422
|
});
|
|
423
|
-
})(
|
|
423
|
+
})(_t)), _t.exports;
|
|
424
424
|
}
|
|
425
|
-
var
|
|
426
|
-
const
|
|
427
|
-
class
|
|
425
|
+
var Ct = Rt();
|
|
426
|
+
const At = /* @__PURE__ */ kt(Ct), { parse: Tt, unparse: It } = At;
|
|
427
|
+
class Xt {
|
|
428
428
|
static unparse(r, i) {
|
|
429
|
-
return
|
|
429
|
+
return It(r, i);
|
|
430
430
|
}
|
|
431
431
|
static parse(r) {
|
|
432
432
|
return new Promise((i, f) => {
|
|
433
|
-
|
|
433
|
+
Tt(r, {
|
|
434
434
|
header: !0,
|
|
435
435
|
complete: (b) => i(b),
|
|
436
436
|
error: (b) => f(b)
|
|
@@ -438,24 +438,24 @@ class Xe {
|
|
|
438
438
|
});
|
|
439
439
|
}
|
|
440
440
|
}
|
|
441
|
-
async function
|
|
442
|
-
const f = i?.mimeType ??
|
|
441
|
+
async function Lt(s, r, i) {
|
|
442
|
+
const f = i?.mimeType ?? zt(r), b = Ft(s, f);
|
|
443
443
|
if ("showSaveFilePicker" in window && i?.showSaveFilePicker)
|
|
444
444
|
try {
|
|
445
445
|
const N = await (await window.showSaveFilePicker({
|
|
446
446
|
suggestedName: r,
|
|
447
|
-
types: [{ description: "Datei", accept: { [f]: [`.${
|
|
447
|
+
types: [{ description: "Datei", accept: { [f]: [`.${Mt(r)}`] } }]
|
|
448
448
|
})).createWritable();
|
|
449
449
|
await N.write(b), await N.close();
|
|
450
450
|
return;
|
|
451
451
|
} catch {
|
|
452
452
|
}
|
|
453
453
|
const $ = URL.createObjectURL(b), L = document.createElement("a");
|
|
454
|
-
L.href = $, L.download = r, L.rel = "noopener", L.style.display = "none", document.body.appendChild(L),
|
|
454
|
+
L.href = $, L.download = r, L.rel = "noopener", L.style.display = "none", document.body.appendChild(L), jt(L), window.setTimeout(() => {
|
|
455
455
|
document.body.removeChild(L), URL.revokeObjectURL($);
|
|
456
|
-
}, 0),
|
|
456
|
+
}, 0), Ut() && window.open($, "_blank", "noopener,noreferrer");
|
|
457
457
|
}
|
|
458
|
-
function
|
|
458
|
+
function Ft(s, r) {
|
|
459
459
|
if (s instanceof Blob)
|
|
460
460
|
return s.type ? s : new Blob([s], { type: r });
|
|
461
461
|
if (s instanceof ArrayBuffer || s instanceof Uint8Array) {
|
|
@@ -464,8 +464,8 @@ function Fe(s, r) {
|
|
|
464
464
|
}
|
|
465
465
|
return new Blob([s], { type: r || "text/plain;charset=utf-8" });
|
|
466
466
|
}
|
|
467
|
-
function
|
|
468
|
-
switch (
|
|
467
|
+
function zt(s) {
|
|
468
|
+
switch (Mt(s).toLowerCase()) {
|
|
469
469
|
case "txt":
|
|
470
470
|
return "text/plain;charset=utf-8";
|
|
471
471
|
case "csv":
|
|
@@ -487,19 +487,19 @@ function ze(s) {
|
|
|
487
487
|
return "application/octet-stream";
|
|
488
488
|
}
|
|
489
489
|
}
|
|
490
|
-
function
|
|
490
|
+
function Mt(s) {
|
|
491
491
|
const r = s.lastIndexOf(".");
|
|
492
492
|
return r >= 0 && r < s.length - 1 ? s.slice(r + 1) : "";
|
|
493
493
|
}
|
|
494
|
-
function
|
|
494
|
+
function jt(s) {
|
|
495
495
|
const r = document.createEvent("MouseEvents");
|
|
496
496
|
r.initMouseEvent("click", !0, !0, window, 0, 0, 0, 0, 0, !1, !1, !1, !1, 0, null), s.dispatchEvent(r);
|
|
497
497
|
}
|
|
498
|
-
function
|
|
498
|
+
function Ut() {
|
|
499
499
|
const s = navigator.userAgent, r = /iPad|iPhone|iPod/.test(s), i = /^((?!chrome|android).)*safari/i.test(s);
|
|
500
500
|
return r || i;
|
|
501
501
|
}
|
|
502
|
-
class
|
|
502
|
+
class te {
|
|
503
503
|
static getEnumValue(r, i) {
|
|
504
504
|
if (i in r)
|
|
505
505
|
return r[i];
|
|
@@ -512,7 +512,7 @@ class et {
|
|
|
512
512
|
}));
|
|
513
513
|
}
|
|
514
514
|
}
|
|
515
|
-
class
|
|
515
|
+
class ee {
|
|
516
516
|
static getFileExtension(r) {
|
|
517
517
|
let i = "";
|
|
518
518
|
const f = r.lastIndexOf(".");
|
|
@@ -566,10 +566,10 @@ class tt {
|
|
|
566
566
|
}
|
|
567
567
|
static save(r, i, f) {
|
|
568
568
|
const b = new Blob([r], { type: f });
|
|
569
|
-
|
|
569
|
+
Lt(b, i);
|
|
570
570
|
}
|
|
571
571
|
}
|
|
572
|
-
class
|
|
572
|
+
class mt {
|
|
573
573
|
static set(r, i) {
|
|
574
574
|
localStorage.setItem(r, JSON.stringify(i));
|
|
575
575
|
}
|
|
@@ -579,7 +579,7 @@ class me {
|
|
|
579
579
|
return f && (i = JSON.parse(f)), i;
|
|
580
580
|
}
|
|
581
581
|
static remove(r) {
|
|
582
|
-
let i = !!
|
|
582
|
+
let i = !!mt.get(r);
|
|
583
583
|
return i && localStorage.removeItem(r), i;
|
|
584
584
|
}
|
|
585
585
|
static removeAll() {
|
|
@@ -589,24 +589,24 @@ class me {
|
|
|
589
589
|
return Object.keys(localStorage).filter((i) => i.startsWith(r));
|
|
590
590
|
}
|
|
591
591
|
}
|
|
592
|
-
var
|
|
592
|
+
var ht = /* @__PURE__ */ ((s) => (s.log = "log", s.info = "info", s.warn = "warn", s.debug = "debug", s.error = "error", s))(ht || {});
|
|
593
593
|
class J {
|
|
594
594
|
static listeners = /* @__PURE__ */ new Set();
|
|
595
595
|
static enabled = !0;
|
|
596
596
|
static log(...r) {
|
|
597
|
-
J.doLog(
|
|
597
|
+
J.doLog(ht.log, r);
|
|
598
598
|
}
|
|
599
599
|
static info(...r) {
|
|
600
|
-
J.doLog(
|
|
600
|
+
J.doLog(ht.info, r);
|
|
601
601
|
}
|
|
602
602
|
static warn(...r) {
|
|
603
|
-
J.doLog(
|
|
603
|
+
J.doLog(ht.warn, r);
|
|
604
604
|
}
|
|
605
605
|
static debug(...r) {
|
|
606
|
-
J.doLog(
|
|
606
|
+
J.doLog(ht.debug, r);
|
|
607
607
|
}
|
|
608
608
|
static error(...r) {
|
|
609
|
-
J.doLog(
|
|
609
|
+
J.doLog(ht.error, r);
|
|
610
610
|
}
|
|
611
611
|
static clearListeners() {
|
|
612
612
|
J.listeners.clear();
|
|
@@ -643,7 +643,7 @@ class J {
|
|
|
643
643
|
return J.listeners.add(r), () => J.listeners.delete(r);
|
|
644
644
|
}
|
|
645
645
|
}
|
|
646
|
-
class
|
|
646
|
+
class re {
|
|
647
647
|
static getScreenWidth() {
|
|
648
648
|
return window.innerWidth;
|
|
649
649
|
}
|
|
@@ -652,60 +652,57 @@ class rt {
|
|
|
652
652
|
}
|
|
653
653
|
// isScreenSmallerThan
|
|
654
654
|
}
|
|
655
|
-
const
|
|
655
|
+
const Bt = (s, r, i) => s.localeCompare(r) * (i ? 1 : -1), Pt = (s, r) => s < r ? -1 : s === r ? 0 : 1, Yt = (s, r, i) => Pt(s, r) * (i ? 1 : -1), Nt = (s, r, i) => {
|
|
656
656
|
let f = 0;
|
|
657
|
-
return typeof s == "string" && typeof r == "string" ? f =
|
|
658
|
-
},
|
|
657
|
+
return typeof s == "string" && typeof r == "string" ? f = Bt(s, r, i) : f = Yt(s, r, i), f;
|
|
658
|
+
}, qt = (s, r, i, f) => {
|
|
659
659
|
const b = i(s), $ = i(r);
|
|
660
|
-
return
|
|
660
|
+
return Nt(b, $, f);
|
|
661
661
|
};
|
|
662
|
-
class
|
|
662
|
+
class ne {
|
|
663
663
|
static get(r) {
|
|
664
|
-
return
|
|
664
|
+
return mt.get(r);
|
|
665
665
|
}
|
|
666
666
|
static set(r, i) {
|
|
667
|
-
|
|
667
|
+
mt.set(r, i);
|
|
668
668
|
}
|
|
669
669
|
static remove(r) {
|
|
670
|
-
|
|
670
|
+
mt.remove(r);
|
|
671
671
|
}
|
|
672
672
|
}
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
Array.prototype.filterBy = function(s) {
|
|
677
|
-
|
|
678
|
-
}
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
}
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
}
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
var we = { exports: {} }, We = we.exports, xe;
|
|
695
|
-
function He() {
|
|
696
|
-
return xe || (xe = 1, (function(s, r) {
|
|
673
|
+
function ie() {
|
|
674
|
+
Array.prototype.distinct = function(s) {
|
|
675
|
+
return s ? this.filter((i, f, b) => b.findIndex(($) => s($, i)) === f) : this.filter((i, f, b) => b.indexOf(i) === f);
|
|
676
|
+
}, Array.prototype.filterBy = function(s) {
|
|
677
|
+
return this.filter((r) => s(r));
|
|
678
|
+
}, Array.prototype.first = function() {
|
|
679
|
+
return this.length > 0 ? this[0] : null;
|
|
680
|
+
}, Array.prototype.groupBy = function(s) {
|
|
681
|
+
return this.reduce((r, i) => {
|
|
682
|
+
const f = s(i);
|
|
683
|
+
return r[f] || (r[f] = []), r[f].push(i), r;
|
|
684
|
+
}, {});
|
|
685
|
+
}, Array.prototype.orderBy = function(s, r = !0) {
|
|
686
|
+
return this?.sort((i, f) => qt(i, f, s, r)), this;
|
|
687
|
+
}, Array.prototype.removeBy = function(s, r) {
|
|
688
|
+
return this.filter((i) => s(i) !== r);
|
|
689
|
+
};
|
|
690
|
+
}
|
|
691
|
+
var wt = { exports: {} }, Wt = wt.exports, xt;
|
|
692
|
+
function Ht() {
|
|
693
|
+
return xt || (xt = 1, (function(s, r) {
|
|
697
694
|
(function(i, f) {
|
|
698
695
|
s.exports = f();
|
|
699
|
-
})(
|
|
700
|
-
var i = 1e3, f = 6e4, b = 36e5, $ = "millisecond", L = "second", Y = "minute", N = "hour", w = "day", q = "week", B = "month", X = "quarter", K = "year", V = "date",
|
|
696
|
+
})(Wt, (function() {
|
|
697
|
+
var i = 1e3, f = 6e4, b = 36e5, $ = "millisecond", L = "second", Y = "minute", N = "hour", w = "day", q = "week", B = "month", X = "quarter", K = "year", V = "date", tt = "Invalid Date", it = /^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/, ct = /\[([^\]]+)]|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, dt = { name: "en", weekdays: "Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"), months: "January_February_March_April_May_June_July_August_September_October_November_December".split("_"), ordinal: function(m) {
|
|
701
698
|
var h = ["th", "st", "nd", "rd"], l = m % 100;
|
|
702
699
|
return "[" + m + (h[(l - 20) % 10] || h[l] || h[0]) + "]";
|
|
703
|
-
} },
|
|
700
|
+
} }, ot = function(m, h, l) {
|
|
704
701
|
var a = String(m);
|
|
705
702
|
return !a || a.length >= h ? m : "" + Array(h + 1 - a.length).join(l) + m;
|
|
706
|
-
},
|
|
703
|
+
}, yt = { s: ot, z: function(m) {
|
|
707
704
|
var h = -m.utcOffset(), l = Math.abs(h), a = Math.floor(l / 60), u = l % 60;
|
|
708
|
-
return (h <= 0 ? "+" : "-") +
|
|
705
|
+
return (h <= 0 ? "+" : "-") + ot(a, 2, "0") + ":" + ot(u, 2, "0");
|
|
709
706
|
}, m: function m(h, l) {
|
|
710
707
|
if (h.date() < l.date()) return -m(l, h);
|
|
711
708
|
var a = 12 * (l.year() - h.year()) + (l.month() - h.month()), u = h.clone().add(a, B), c = l - u < 0, y = h.clone().add(a + (c ? -1 : 1), B);
|
|
@@ -716,13 +713,13 @@ function He() {
|
|
|
716
713
|
return { M: B, y: K, w: q, d: w, D: V, h: N, m: Y, s: L, ms: $, Q: X }[m] || String(m || "").toLowerCase().replace(/s$/, "");
|
|
717
714
|
}, u: function(m) {
|
|
718
715
|
return m === void 0;
|
|
719
|
-
} },
|
|
720
|
-
W[
|
|
721
|
-
var C = "$isDayjsObject",
|
|
716
|
+
} }, st = "en", W = {};
|
|
717
|
+
W[st] = dt;
|
|
718
|
+
var C = "$isDayjsObject", t = function(m) {
|
|
722
719
|
return m instanceof g || !(!m || !m[C]);
|
|
723
|
-
},
|
|
720
|
+
}, e = function m(h, l, a) {
|
|
724
721
|
var u;
|
|
725
|
-
if (!h) return
|
|
722
|
+
if (!h) return st;
|
|
726
723
|
if (typeof h == "string") {
|
|
727
724
|
var c = h.toLowerCase();
|
|
728
725
|
W[c] && (u = c), l && (W[c] = l, u = c);
|
|
@@ -732,18 +729,18 @@ function He() {
|
|
|
732
729
|
var p = h.name;
|
|
733
730
|
W[p] = h, u = p;
|
|
734
731
|
}
|
|
735
|
-
return !a && u && (
|
|
732
|
+
return !a && u && (st = u), u || !a && st;
|
|
736
733
|
}, n = function(m, h) {
|
|
737
|
-
if (
|
|
734
|
+
if (t(m)) return m.clone();
|
|
738
735
|
var l = typeof h == "object" ? h : {};
|
|
739
736
|
return l.date = m, l.args = arguments, new g(l);
|
|
740
|
-
}, o =
|
|
741
|
-
o.l =
|
|
737
|
+
}, o = yt;
|
|
738
|
+
o.l = e, o.i = t, o.w = function(m, h) {
|
|
742
739
|
return n(m, { locale: h.$L, utc: h.$u, x: h.$x, $offset: h.$offset });
|
|
743
740
|
};
|
|
744
741
|
var g = (function() {
|
|
745
742
|
function m(l) {
|
|
746
|
-
this.$L =
|
|
743
|
+
this.$L = e(l.locale, null, !0), this.parse(l), this.$x = this.$x || l.x || {}, this[C] = !0;
|
|
747
744
|
}
|
|
748
745
|
var h = m.prototype;
|
|
749
746
|
return h.parse = function(l) {
|
|
@@ -753,7 +750,7 @@ function He() {
|
|
|
753
750
|
if (o.u(u)) return /* @__PURE__ */ new Date();
|
|
754
751
|
if (u instanceof Date) return new Date(u);
|
|
755
752
|
if (typeof u == "string" && !/Z$/i.test(u)) {
|
|
756
|
-
var y = u.match(
|
|
753
|
+
var y = u.match(it);
|
|
757
754
|
if (y) {
|
|
758
755
|
var p = y[2] - 1 || 0, _ = (y[7] || "0").substring(0, 3);
|
|
759
756
|
return c ? new Date(Date.UTC(y[1], p, y[3] || 1, y[4] || 0, y[5] || 0, y[6] || 0, _)) : new Date(y[1], p, y[3] || 1, y[4] || 0, y[5] || 0, y[6] || 0, _);
|
|
@@ -767,7 +764,7 @@ function He() {
|
|
|
767
764
|
}, h.$utils = function() {
|
|
768
765
|
return o;
|
|
769
766
|
}, h.isValid = function() {
|
|
770
|
-
return this.$d.toString() !==
|
|
767
|
+
return this.$d.toString() !== tt;
|
|
771
768
|
}, h.isSame = function(l, a) {
|
|
772
769
|
var u = n(l);
|
|
773
770
|
return this.startOf(a) <= u && u <= this.endOf(a);
|
|
@@ -838,7 +835,7 @@ function He() {
|
|
|
838
835
|
return this.add(-1 * l, a);
|
|
839
836
|
}, h.format = function(l) {
|
|
840
837
|
var a = this, u = this.$locale();
|
|
841
|
-
if (!this.isValid()) return u.invalidDate ||
|
|
838
|
+
if (!this.isValid()) return u.invalidDate || tt;
|
|
842
839
|
var c = l || "YYYY-MM-DDTHH:mm:ssZ", y = o.z(this), p = this.$H, _ = this.$m, d = this.$M, O = u.weekdays, R = u.months, F = u.meridiem, U = function(x, v, A, z) {
|
|
843
840
|
return x && (x[v] || x(a, c)) || A[v].slice(0, z);
|
|
844
841
|
}, k = function(x) {
|
|
@@ -847,7 +844,7 @@ function He() {
|
|
|
847
844
|
var z = x < 12 ? "AM" : "PM";
|
|
848
845
|
return A ? z.toLowerCase() : z;
|
|
849
846
|
};
|
|
850
|
-
return c.replace(
|
|
847
|
+
return c.replace(ct, (function(x, v) {
|
|
851
848
|
return v || (function(A) {
|
|
852
849
|
switch (A) {
|
|
853
850
|
case "YY":
|
|
@@ -943,7 +940,7 @@ function He() {
|
|
|
943
940
|
return W[this.$L];
|
|
944
941
|
}, h.locale = function(l, a) {
|
|
945
942
|
if (!l) return this.$L;
|
|
946
|
-
var u = this.clone(), c =
|
|
943
|
+
var u = this.clone(), c = e(l, a, !0);
|
|
947
944
|
return c && (u.$L = c), u;
|
|
948
945
|
}, h.clone = function() {
|
|
949
946
|
return o.w(this.$d, this);
|
|
@@ -963,30 +960,30 @@ function He() {
|
|
|
963
960
|
};
|
|
964
961
|
})), n.extend = function(m, h) {
|
|
965
962
|
return m.$i || (m(h, g, n), m.$i = !0), n;
|
|
966
|
-
}, n.locale =
|
|
963
|
+
}, n.locale = e, n.isDayjs = t, n.unix = function(m) {
|
|
967
964
|
return n(1e3 * m);
|
|
968
|
-
}, n.en = W[
|
|
965
|
+
}, n.en = W[st], n.Ls = W, n.p = {}, n;
|
|
969
966
|
}));
|
|
970
|
-
})(
|
|
967
|
+
})(wt)), wt.exports;
|
|
971
968
|
}
|
|
972
|
-
var
|
|
973
|
-
const Z = /* @__PURE__ */
|
|
974
|
-
var
|
|
975
|
-
function
|
|
976
|
-
return
|
|
969
|
+
var Kt = Ht();
|
|
970
|
+
const Z = /* @__PURE__ */ kt(Kt);
|
|
971
|
+
var vt = { exports: {} }, Jt = vt.exports, Ot;
|
|
972
|
+
function Qt() {
|
|
973
|
+
return Ot || (Ot = 1, (function(s, r) {
|
|
977
974
|
(function(i, f) {
|
|
978
975
|
s.exports = f();
|
|
979
|
-
})(
|
|
976
|
+
})(Jt, (function() {
|
|
980
977
|
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" };
|
|
981
978
|
return function(f, b, $) {
|
|
982
979
|
var L = b.prototype, Y = L.format;
|
|
983
980
|
$.en.formats = i, L.format = function(N) {
|
|
984
981
|
N === void 0 && (N = "YYYY-MM-DDTHH:mm:ssZ");
|
|
985
982
|
var w = this.$locale().formats, q = (function(B, X) {
|
|
986
|
-
return B.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g, (function(K, V,
|
|
987
|
-
var
|
|
988
|
-
return V || X[
|
|
989
|
-
return
|
|
983
|
+
return B.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g, (function(K, V, tt) {
|
|
984
|
+
var it = tt && tt.toUpperCase();
|
|
985
|
+
return V || X[tt] || i[tt] || X[it].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g, (function(ct, dt, ot) {
|
|
986
|
+
return dt || ot.slice(1);
|
|
990
987
|
}));
|
|
991
988
|
}));
|
|
992
989
|
})(N, w === void 0 ? {} : w);
|
|
@@ -994,57 +991,48 @@ function Qe() {
|
|
|
994
991
|
};
|
|
995
992
|
};
|
|
996
993
|
}));
|
|
997
|
-
})(
|
|
994
|
+
})(vt)), vt.exports;
|
|
998
995
|
}
|
|
999
|
-
var
|
|
1000
|
-
const
|
|
1001
|
-
Z.extend(
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
Date.prototype.diff = function(s, r) {
|
|
1006
|
-
|
|
1007
|
-
}
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
Date.prototype.
|
|
1012
|
-
|
|
1013
|
-
}
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
Date.prototype.
|
|
1018
|
-
|
|
1019
|
-
}
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
Date.prototype.
|
|
1024
|
-
|
|
1025
|
-
}
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
}
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
}
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
}
|
|
1038
|
-
|
|
1039
|
-
return this.charAt(0).toUpperCase() + this.slice(1);
|
|
1040
|
-
};
|
|
1041
|
-
String.prototype.isNumber = function() {
|
|
1042
|
-
return !isNaN(Number(this)) && this.trim() !== "";
|
|
1043
|
-
};
|
|
1044
|
-
String.prototype.isEmpty = function() {
|
|
1045
|
-
return this === void 0 || !this || this.length === 0;
|
|
1046
|
-
};
|
|
1047
|
-
class it {
|
|
996
|
+
var Vt = Qt();
|
|
997
|
+
const Zt = /* @__PURE__ */ kt(Vt);
|
|
998
|
+
Z.extend(Zt);
|
|
999
|
+
function se() {
|
|
1000
|
+
Date.prototype.add = function(s, r) {
|
|
1001
|
+
return Z(this).add(s, r).toDate();
|
|
1002
|
+
}, Date.prototype.diff = function(s, r) {
|
|
1003
|
+
return Z(this).diff(s, r);
|
|
1004
|
+
}, Date.prototype.endOf = function(s) {
|
|
1005
|
+
return Z(this).endOf(s).toDate();
|
|
1006
|
+
}, Date.prototype.firstDayOfMonth = function() {
|
|
1007
|
+
return Z(this).startOf("month").toDate();
|
|
1008
|
+
}, Date.prototype.isAfter = function(s, r) {
|
|
1009
|
+
return Z(this).isAfter(s, r);
|
|
1010
|
+
}, Date.prototype.isBefore = function(s, r) {
|
|
1011
|
+
return Z(this).isBefore(s, r);
|
|
1012
|
+
}, Date.prototype.format = function(s) {
|
|
1013
|
+
return Z(this).format(s);
|
|
1014
|
+
}, Date.prototype.isValid = function() {
|
|
1015
|
+
return Z(this).isValid();
|
|
1016
|
+
}, Date.prototype.subtract = function(s, r) {
|
|
1017
|
+
return Z(this).subtract(s, r).toDate();
|
|
1018
|
+
}, Date.prototype.lastDayOfMonth = function() {
|
|
1019
|
+
return Z(this).endOf("month").toDate();
|
|
1020
|
+
}, Date.prototype.set = function(s, r) {
|
|
1021
|
+
return Z(this).set(s, r).toDate();
|
|
1022
|
+
}, Date.prototype.startOf = function(s) {
|
|
1023
|
+
return Z(this).startOf(s).toDate();
|
|
1024
|
+
};
|
|
1025
|
+
}
|
|
1026
|
+
function ae() {
|
|
1027
|
+
String.prototype.capitalize = function() {
|
|
1028
|
+
return this.charAt(0).toUpperCase() + this.slice(1);
|
|
1029
|
+
}, String.prototype.isNumber = function() {
|
|
1030
|
+
return !isNaN(Number(this)) && this.trim() !== "";
|
|
1031
|
+
}, String.prototype.isEmpty = function() {
|
|
1032
|
+
return this === void 0 || !this || this.length === 0;
|
|
1033
|
+
};
|
|
1034
|
+
}
|
|
1035
|
+
class oe {
|
|
1048
1036
|
resizeListener;
|
|
1049
1037
|
onResizeCallbacks = /* @__PURE__ */ new Set();
|
|
1050
1038
|
// feuert bei jedem throttled Resize
|
|
@@ -1071,16 +1059,19 @@ class it {
|
|
|
1071
1059
|
};
|
|
1072
1060
|
}
|
|
1073
1061
|
export {
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1062
|
+
oe as BrowserService,
|
|
1063
|
+
Xt as CsvHelper,
|
|
1064
|
+
te as EnumHelper,
|
|
1065
|
+
ee as FileHelper,
|
|
1066
|
+
mt as LocalStorageHelper,
|
|
1079
1067
|
J as LoggerHelper,
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
|
|
1068
|
+
ht as LoggerType,
|
|
1069
|
+
re as ScreenHelper,
|
|
1070
|
+
ne as TokenHelper,
|
|
1071
|
+
Gt as copyToClipboard,
|
|
1072
|
+
ie as initArrayExtensions,
|
|
1073
|
+
se as initDateExtensions,
|
|
1074
|
+
ae as initStringExtensions,
|
|
1075
|
+
Lt as saveAs,
|
|
1076
|
+
qt as sortHelper
|
|
1086
1077
|
};
|