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