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