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