@flemist/simple-utils 1.0.3 → 1.0.6
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/build/browser/index.cjs +1 -1
- package/build/browser/index.mjs +32 -30
- package/build/common/index.cjs +1 -1
- package/build/common/index.mjs +32 -30
- package/build/common/object/index.d.ts +1 -0
- package/build/common/object/setFuncName.d.ts +2 -0
- package/build/common/string/format/formatAny.d.ts +4 -2
- package/build/common/string/format/index.d.ts +1 -0
- package/build/common/string/format/truncateString.d.ts +5 -0
- package/build/node/index.cjs +2 -2
- package/build/node/index.mjs +66 -64
- package/build/urlGet-DQwg0Ia9.js +11 -0
- package/build/{urlGet-CW30yZvt.mjs → urlGet-O09ZzKiX.mjs} +228 -216
- package/package.json +36 -33
- package/build/urlGet-Dr4stTPz.js +0 -11
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
import { AbortControllerFast as
|
|
2
|
-
import { isPromiseLike as
|
|
3
|
-
import { timeControllerDefault as
|
|
4
|
-
let
|
|
5
|
-
function
|
|
6
|
-
if (!
|
|
7
|
-
|
|
1
|
+
import { AbortControllerFast as et, toAbortSignal as ft, AbortError as ct } from "@flemist/abort-controller-fast";
|
|
2
|
+
import { isPromiseLike as X } from "@flemist/async-utils";
|
|
3
|
+
import { timeControllerDefault as ht } from "@flemist/time-controller";
|
|
4
|
+
let V = null;
|
|
5
|
+
function mt() {
|
|
6
|
+
if (!V) {
|
|
7
|
+
V = new Array(256);
|
|
8
8
|
for (let t = 0; t < 256; t++)
|
|
9
|
-
|
|
9
|
+
V[t] = t.toString(16).padStart(2, "0");
|
|
10
10
|
}
|
|
11
|
-
return
|
|
11
|
+
return V;
|
|
12
12
|
}
|
|
13
|
-
function
|
|
14
|
-
const e =
|
|
13
|
+
function pt(t) {
|
|
14
|
+
const e = mt(), r = new Uint8Array(t.buffer, t.byteOffset, t.byteLength);
|
|
15
15
|
let n = "";
|
|
16
16
|
for (let o = 0, s = r.length; o < s; o++)
|
|
17
17
|
n += e[r[o]];
|
|
18
18
|
return n;
|
|
19
19
|
}
|
|
20
|
-
let
|
|
21
|
-
function
|
|
22
|
-
|
|
20
|
+
let J = null, rt = null, B = null, nt = null;
|
|
21
|
+
function dt() {
|
|
22
|
+
J || (J = new Uint32Array([
|
|
23
23
|
1116352408,
|
|
24
24
|
1899447441,
|
|
25
25
|
3049323471,
|
|
@@ -84,17 +84,17 @@ function pt() {
|
|
|
84
84
|
2756734187,
|
|
85
85
|
3204031479,
|
|
86
86
|
3329325298
|
|
87
|
-
]),
|
|
87
|
+
]), rt = new Uint32Array(64), nt = new TextEncoder(), B = new Uint8Array(65536));
|
|
88
88
|
}
|
|
89
|
-
function
|
|
89
|
+
function yt(t) {
|
|
90
90
|
if (t == null)
|
|
91
91
|
return null;
|
|
92
|
-
|
|
93
|
-
const e =
|
|
94
|
-
let o =
|
|
92
|
+
dt();
|
|
93
|
+
const e = J, r = rt, n = nt;
|
|
94
|
+
let o = B, s;
|
|
95
95
|
if (typeof t == "string") {
|
|
96
|
-
const
|
|
97
|
-
o.length <
|
|
96
|
+
const c = t.length * 3;
|
|
97
|
+
o.length < c + 128 && (o = B = new Uint8Array(c + 128));
|
|
98
98
|
const f = n.encodeInto(t, o);
|
|
99
99
|
s = o.subarray(0, f.written);
|
|
100
100
|
} else if (t instanceof Uint8Array)
|
|
@@ -110,72 +110,72 @@ function dt(t) {
|
|
|
110
110
|
`[sha256Buffer] Unsupported content type: ${typeof t}`
|
|
111
111
|
);
|
|
112
112
|
const m = s.length, a = m + 72 >>> 6 << 6;
|
|
113
|
-
o.length < a && (o =
|
|
114
|
-
for (let
|
|
115
|
-
o[
|
|
116
|
-
const U = m * 8,
|
|
117
|
-
o[a - 8] =
|
|
118
|
-
let
|
|
119
|
-
for (let
|
|
120
|
-
for (let
|
|
121
|
-
const d =
|
|
122
|
-
r[
|
|
113
|
+
o.length < a && (o = B = new Uint8Array(a)), s !== o && o.set(s), o[m] = 128;
|
|
114
|
+
for (let c = m + 1; c < a; c++)
|
|
115
|
+
o[c] = 0;
|
|
116
|
+
const U = m * 8, O = U / 4294967296 | 0, C = U | 0;
|
|
117
|
+
o[a - 8] = O >>> 24, o[a - 7] = O >>> 16, o[a - 6] = O >>> 8, o[a - 5] = O, o[a - 4] = C >>> 24, o[a - 3] = C >>> 16, o[a - 2] = C >>> 8, o[a - 1] = C;
|
|
118
|
+
let T = 1779033703, $ = -1150833019, u = 1013904242, i = -1521486534, l = 1359893119, y = -1694144372, p = 528734635, w = 1541459225;
|
|
119
|
+
for (let c = 0; c < a; c += 64) {
|
|
120
|
+
for (let h = 0; h < 16; h++) {
|
|
121
|
+
const d = c + (h << 2);
|
|
122
|
+
r[h] = o[d] << 24 | o[d + 1] << 16 | o[d + 2] << 8 | o[d + 3];
|
|
123
123
|
}
|
|
124
|
-
for (let
|
|
125
|
-
const d = r[
|
|
126
|
-
r[
|
|
124
|
+
for (let h = 16; h < 64; h++) {
|
|
125
|
+
const d = r[h - 15], A = r[h - 2], H = (d >>> 7 | d << 25) ^ (d >>> 18 | d << 14) ^ d >>> 3, D = (A >>> 17 | A << 15) ^ (A >>> 19 | A << 13) ^ A >>> 10;
|
|
126
|
+
r[h] = r[h - 16] + H + r[h - 7] + D | 0;
|
|
127
127
|
}
|
|
128
|
-
let f = $,
|
|
129
|
-
for (let
|
|
128
|
+
let f = T, S = $, M = u, F = i, _ = l, P = y, k = p, q = w;
|
|
129
|
+
for (let h = 0; h < 64; h += 4)
|
|
130
130
|
for (let d = 0; d < 4; d++) {
|
|
131
|
-
const A =
|
|
132
|
-
q =
|
|
131
|
+
const A = h + d, H = (_ >>> 6 | _ << 26) ^ (_ >>> 11 | _ << 21) ^ (_ >>> 25 | _ << 7), D = q + H + (k ^ _ & (P ^ k)) + e[A] + r[A] | 0, at = ((f >>> 2 | f << 30) ^ (f >>> 13 | f << 19) ^ (f >>> 22 | f << 10)) + (f & S ^ M & (f ^ S)) | 0;
|
|
132
|
+
q = k, k = P, P = _, _ = F + D | 0, F = M, M = S, S = f, f = D + at | 0;
|
|
133
133
|
}
|
|
134
|
-
$ = $ +
|
|
134
|
+
T = T + f | 0, $ = $ + S | 0, u = u + M | 0, i = i + F | 0, l = l + _ | 0, y = y + P | 0, p = p + k | 0, w = w + q | 0;
|
|
135
135
|
}
|
|
136
|
-
const
|
|
137
|
-
for (let
|
|
138
|
-
const f =
|
|
139
|
-
S
|
|
136
|
+
const g = new Uint8Array(32), R = [T, $, u, i, l, y, p, w];
|
|
137
|
+
for (let c = 0; c < 8; c++) {
|
|
138
|
+
const f = R[c], S = c << 2;
|
|
139
|
+
g[S] = f >>> 24, g[S + 1] = f >>> 16 & 255, g[S + 2] = f >>> 8 & 255, g[S + 3] = f & 255;
|
|
140
140
|
}
|
|
141
|
-
return
|
|
141
|
+
return g;
|
|
142
142
|
}
|
|
143
|
-
function
|
|
144
|
-
const e =
|
|
145
|
-
return e ?
|
|
143
|
+
function Vt(t) {
|
|
144
|
+
const e = yt(t);
|
|
145
|
+
return e ? pt(e) : null;
|
|
146
146
|
}
|
|
147
|
-
function
|
|
147
|
+
function wt(t, e) {
|
|
148
148
|
return t == null ? e : e == null ? t : Math.min(t, e);
|
|
149
149
|
}
|
|
150
|
-
function
|
|
150
|
+
function gt(t, e) {
|
|
151
151
|
return t == null ? e : e == null ? t : Math.max(t, e);
|
|
152
152
|
}
|
|
153
153
|
function Lt(t, e, r) {
|
|
154
|
-
return wt(
|
|
154
|
+
return gt(wt(t, e), r);
|
|
155
155
|
}
|
|
156
|
-
function
|
|
156
|
+
function Bt(t, e) {
|
|
157
157
|
return (t % e + e) % e;
|
|
158
158
|
}
|
|
159
|
-
function
|
|
159
|
+
function St(t) {
|
|
160
160
|
return function() {
|
|
161
161
|
let r = t += 1831565813;
|
|
162
162
|
return r = Math.imul(r ^ r >>> 15, r | 1), r ^= r + Math.imul(r ^ r >>> 7, r | 61), (r ^ r >>> 14) / 4294967296 + 0.5;
|
|
163
163
|
};
|
|
164
164
|
}
|
|
165
|
-
function
|
|
165
|
+
function _t() {
|
|
166
166
|
return Math.random();
|
|
167
167
|
}
|
|
168
|
-
function
|
|
168
|
+
function zt() {
|
|
169
169
|
return Math.random() * 2 ** 32 >>> 0;
|
|
170
170
|
}
|
|
171
|
-
function
|
|
172
|
-
return t != null ?
|
|
171
|
+
function Ot(t) {
|
|
172
|
+
return t != null ? St(t) : _t;
|
|
173
173
|
}
|
|
174
|
-
class
|
|
174
|
+
class Y {
|
|
175
175
|
_seed;
|
|
176
176
|
_rnd;
|
|
177
177
|
constructor(e) {
|
|
178
|
-
this._seed = e, this._rnd =
|
|
178
|
+
this._seed = e, this._rnd = Ot(e);
|
|
179
179
|
}
|
|
180
180
|
get seed() {
|
|
181
181
|
return this._seed;
|
|
@@ -184,26 +184,26 @@ class J {
|
|
|
184
184
|
return this.next() * 2 ** 32 >>> 0;
|
|
185
185
|
}
|
|
186
186
|
nextRandom() {
|
|
187
|
-
return new
|
|
187
|
+
return new Y(this.nextSeed());
|
|
188
188
|
}
|
|
189
189
|
next() {
|
|
190
190
|
return this._rnd();
|
|
191
191
|
}
|
|
192
192
|
clone() {
|
|
193
|
-
return new
|
|
193
|
+
return new Y(this._seed);
|
|
194
194
|
}
|
|
195
195
|
}
|
|
196
|
-
function
|
|
196
|
+
function ot(t, e, r) {
|
|
197
197
|
if (r == null && (r = e, e = 0), r <= e)
|
|
198
198
|
throw new Error(
|
|
199
199
|
`[random][randomFloat] toExclusive (${r}) must be greater than from (${e})`
|
|
200
200
|
);
|
|
201
201
|
return t.next() * (r - e) + e;
|
|
202
202
|
}
|
|
203
|
-
function
|
|
204
|
-
return Math.floor(
|
|
203
|
+
function $t(t, e, r) {
|
|
204
|
+
return Math.floor(ot(t, e, r));
|
|
205
205
|
}
|
|
206
|
-
function
|
|
206
|
+
function Ft(t, e) {
|
|
207
207
|
return t.next() < (e ?? 0.5);
|
|
208
208
|
}
|
|
209
209
|
function qt(t, e, r) {
|
|
@@ -218,37 +218,37 @@ function qt(t, e, r) {
|
|
|
218
218
|
n += r(s);
|
|
219
219
|
if (n === 0)
|
|
220
220
|
return -1;
|
|
221
|
-
let o =
|
|
221
|
+
let o = ot(t, n);
|
|
222
222
|
for (let s = 0; s < e; s++)
|
|
223
223
|
if (o -= r(s), o < 0)
|
|
224
224
|
return s;
|
|
225
225
|
return e - 1;
|
|
226
226
|
}
|
|
227
|
-
function
|
|
227
|
+
function st(t, e) {
|
|
228
228
|
if (e.length === 0)
|
|
229
229
|
throw new Error("[random][randomItem] items is empty");
|
|
230
|
-
const r =
|
|
230
|
+
const r = $t(t, e.length);
|
|
231
231
|
return e[r];
|
|
232
232
|
}
|
|
233
|
-
function
|
|
233
|
+
function Ht(t, e, r) {
|
|
234
234
|
if (e.length === 0)
|
|
235
235
|
throw new Error("[random][randomItems] items is empty");
|
|
236
236
|
const n = [];
|
|
237
237
|
for (let o = 0; o < r; o++)
|
|
238
|
-
n.push(
|
|
238
|
+
n.push(st(t, e));
|
|
239
239
|
return n;
|
|
240
240
|
}
|
|
241
|
-
function
|
|
241
|
+
function Wt(t, e, r) {
|
|
242
242
|
let n = Object.values(e);
|
|
243
|
-
return r && (n = n.filter(r)),
|
|
243
|
+
return r && (n = n.filter(r)), st(t, n);
|
|
244
244
|
}
|
|
245
|
-
const
|
|
246
|
-
function
|
|
245
|
+
const it = 1073741789, W = (it >> 2) - 1;
|
|
246
|
+
function Gt(t = W, e) {
|
|
247
247
|
if (t <= 0)
|
|
248
248
|
throw new Error(`[random][PseudoRandom] count(${t}) must be > 0`);
|
|
249
|
-
if (t >
|
|
249
|
+
if (t > W)
|
|
250
250
|
throw new Error(
|
|
251
|
-
`[random][PseudoRandom] count(${t}) must be <= ${
|
|
251
|
+
`[random][PseudoRandom] count(${t}) must be <= ${W}`
|
|
252
252
|
);
|
|
253
253
|
if (e == null && (e = Math.floor(Math.random() * t)), e >= t)
|
|
254
254
|
throw new Error(
|
|
@@ -256,28 +256,28 @@ function Wt(t = H, e) {
|
|
|
256
256
|
);
|
|
257
257
|
let r = e;
|
|
258
258
|
return function() {
|
|
259
|
-
return r = (r +
|
|
259
|
+
return r = (r + it) % t, r;
|
|
260
260
|
};
|
|
261
261
|
}
|
|
262
|
-
let
|
|
263
|
-
function
|
|
262
|
+
let N = null;
|
|
263
|
+
function Jt() {
|
|
264
264
|
const t = Date.now();
|
|
265
|
-
return
|
|
265
|
+
return N == null || t > N ? (N = t, t) : (N++, N);
|
|
266
266
|
}
|
|
267
|
-
async function
|
|
267
|
+
async function Yt({
|
|
268
268
|
url: t,
|
|
269
269
|
timeout: e
|
|
270
270
|
} = {}) {
|
|
271
271
|
t || (t = typeof window < "u" ? "/" : "https://google.com");
|
|
272
272
|
let r;
|
|
273
273
|
try {
|
|
274
|
-
const n = new
|
|
274
|
+
const n = new et();
|
|
275
275
|
r = e ? setTimeout(() => {
|
|
276
276
|
n.abort();
|
|
277
277
|
}, e) : null;
|
|
278
278
|
const o = await fetch(t, {
|
|
279
279
|
method: "HEAD",
|
|
280
|
-
signal:
|
|
280
|
+
signal: ft(n.signal)
|
|
281
281
|
}), s = o.headers.get("date");
|
|
282
282
|
if (!s)
|
|
283
283
|
throw new Error(
|
|
@@ -288,7 +288,7 @@ async function Jt({
|
|
|
288
288
|
r && clearTimeout(r);
|
|
289
289
|
}
|
|
290
290
|
}
|
|
291
|
-
function
|
|
291
|
+
function ut(t, e, r) {
|
|
292
292
|
const n = e == null ? t : new Date(
|
|
293
293
|
t.toLocaleString("en-US", {
|
|
294
294
|
timeZone: e
|
|
@@ -302,75 +302,82 @@ function it(t, e, r) {
|
|
|
302
302
|
t.getTime() + o.getTime() - n.getTime()
|
|
303
303
|
);
|
|
304
304
|
}
|
|
305
|
-
function
|
|
306
|
-
t =
|
|
305
|
+
function At(t, e) {
|
|
306
|
+
t = ut(t, "UTC", e);
|
|
307
307
|
const r = t.getUTCFullYear().toString().padStart(4, "0"), n = (t.getUTCMonth() + 1).toString().padStart(2, "0"), o = t.getUTCDate().toString().padStart(2, "0"), s = t.getUTCHours().toString().padStart(2, "0"), m = t.getUTCMinutes().toString().padStart(2, "0"), a = t.getUTCSeconds().toString().padStart(2, "0");
|
|
308
308
|
return `${r}-${n}-${o} ${s}:${m}:${a}`;
|
|
309
309
|
}
|
|
310
|
-
let
|
|
311
|
-
const
|
|
312
|
-
function
|
|
313
|
-
if (
|
|
314
|
-
return
|
|
315
|
-
const e =
|
|
316
|
-
return
|
|
310
|
+
let Ut = 0;
|
|
311
|
+
const G = /* @__PURE__ */ new WeakMap();
|
|
312
|
+
function I(t) {
|
|
313
|
+
if (G.has(t))
|
|
314
|
+
return G.get(t);
|
|
315
|
+
const e = Ut++;
|
|
316
|
+
return G.set(t, e), e;
|
|
317
|
+
}
|
|
318
|
+
function L(t, e, r) {
|
|
319
|
+
return t == null ? t ?? null : e == null ? t : t.length > e ? e <= 0 ? "…" : r?.fromStart ? "…" + t.slice(t.length - e + 1) : t.slice(0, e - 1) + "…" : t;
|
|
317
320
|
}
|
|
318
|
-
function
|
|
321
|
+
function K(t, e) {
|
|
319
322
|
try {
|
|
320
323
|
return t[e];
|
|
321
324
|
} catch (r) {
|
|
322
325
|
return "Error: " + (r instanceof Error ? r.message : String(r));
|
|
323
326
|
}
|
|
324
327
|
}
|
|
325
|
-
function
|
|
328
|
+
function x(t, e, r, n) {
|
|
326
329
|
const {
|
|
327
330
|
pretty: o,
|
|
328
331
|
filter: s,
|
|
329
332
|
maxDepth: m,
|
|
330
333
|
maxItems: a,
|
|
331
|
-
|
|
334
|
+
maxStringLength: U,
|
|
335
|
+
showObjectId: O,
|
|
332
336
|
showArrayIndex: C,
|
|
333
337
|
customToString: T
|
|
334
|
-
} = e;
|
|
335
|
-
if (T) {
|
|
336
|
-
const u = T(t, (i) =>
|
|
338
|
+
} = e ?? {};
|
|
339
|
+
if (r == null && (r = []), n == null && (n = /* @__PURE__ */ new Set()), T) {
|
|
340
|
+
const u = T(t, (i) => x(i, e, r, n));
|
|
337
341
|
if (u != null)
|
|
338
|
-
return u;
|
|
342
|
+
return L(u, U);
|
|
339
343
|
}
|
|
340
344
|
const $ = r.length;
|
|
341
345
|
if (typeof t == "string")
|
|
342
|
-
return JSON.stringify(t);
|
|
346
|
+
return t = L(t, U), n.size > 0 && (t = JSON.stringify(t)), t;
|
|
343
347
|
if (t == null || typeof t != "object")
|
|
344
348
|
return String(t);
|
|
345
349
|
if (t instanceof ArrayBuffer || ArrayBuffer.isView(t))
|
|
346
|
-
return `${t.constructor?.name ?? ""}#${
|
|
350
|
+
return `${t.constructor?.name ?? ""}#${I(t)}[${t.byteLength}]`;
|
|
347
351
|
if (t instanceof RegExp)
|
|
348
|
-
return String(t);
|
|
352
|
+
return L(String(t), U);
|
|
349
353
|
if (t instanceof Date)
|
|
350
|
-
return
|
|
354
|
+
return At(t);
|
|
351
355
|
if (t instanceof Object) {
|
|
352
356
|
if (n.has(t) || m != null && $ >= m)
|
|
353
|
-
return `${t.constructor === Object ? "" : t.constructor?.name ?? ""}#${
|
|
357
|
+
return `${t.constructor === Object ? "" : t.constructor?.name ?? ""}#${I(t)}`;
|
|
354
358
|
n.add(t);
|
|
355
359
|
}
|
|
356
360
|
if (t instanceof Error)
|
|
357
|
-
return
|
|
361
|
+
return L(
|
|
362
|
+
t.stack || t.message || String(t),
|
|
363
|
+
U
|
|
364
|
+
);
|
|
358
365
|
if (Array.isArray(t)) {
|
|
359
366
|
const u = o ? " ".repeat($) : "";
|
|
360
367
|
let i = "";
|
|
361
|
-
|
|
368
|
+
O && (i += `#${I(t)} `), i += "[";
|
|
362
369
|
let l = 0, y = !1;
|
|
363
370
|
for (let p = 0; p < t.length; p++) {
|
|
364
371
|
if (a != null && l >= a) {
|
|
365
372
|
y = !0;
|
|
366
373
|
break;
|
|
367
374
|
}
|
|
368
|
-
const w = [...r, String(p)], g =
|
|
375
|
+
const w = [...r, String(p)], g = K(t, p);
|
|
369
376
|
if (s != null && !s(w, g))
|
|
370
377
|
continue;
|
|
371
|
-
const
|
|
378
|
+
const R = x(g, e, w, n);
|
|
372
379
|
l > 0 && (i += ","), o && (i += `
|
|
373
|
-
`), o && (i += `${u} `), C && (i += `${p}: `), i += `${
|
|
380
|
+
`), o && (i += `${u} `), C && (i += `${p}: `), i += `${R}`, l++;
|
|
374
381
|
}
|
|
375
382
|
return y ? (l > 0 && (i += ","), o ? (i += `
|
|
376
383
|
`, i += `${u} ...
|
|
@@ -379,28 +386,28 @@ ${u}`), i += "]"), i;
|
|
|
379
386
|
}
|
|
380
387
|
if (t instanceof Map) {
|
|
381
388
|
let u = "";
|
|
382
|
-
return
|
|
389
|
+
return O && (u += `#${I(t)} `), u += "Map", u += x(Array.from(t.entries()), e, r, n), u;
|
|
383
390
|
}
|
|
384
391
|
if (t instanceof Set) {
|
|
385
392
|
let u = "";
|
|
386
|
-
return
|
|
393
|
+
return O && (u += `#${I(t)} `), u += "Set", u += x(Array.from(t.values()), e, r, n), u;
|
|
387
394
|
}
|
|
388
395
|
{
|
|
389
396
|
const u = t.constructor === Object ? "" : t.constructor?.name ?? "", i = o ? " ".repeat($) : "";
|
|
390
397
|
let l = u ? `${u} ` : "";
|
|
391
|
-
|
|
398
|
+
O && (l += `#${I(t)} `), l += "{";
|
|
392
399
|
let y = 0, p = !1;
|
|
393
400
|
for (const w in t) {
|
|
394
401
|
if (a != null && y >= a) {
|
|
395
402
|
p = !0;
|
|
396
403
|
break;
|
|
397
404
|
}
|
|
398
|
-
const g = [...r, w],
|
|
399
|
-
if (s != null && !s(g,
|
|
405
|
+
const g = [...r, w], R = K(t, w);
|
|
406
|
+
if (s != null && !s(g, R))
|
|
400
407
|
continue;
|
|
401
|
-
const
|
|
408
|
+
const c = x(R, e, g, n);
|
|
402
409
|
y > 0 && (l += ","), o && (l += `
|
|
403
|
-
`), o && (l += `${i} `), l += `${w}: ${
|
|
410
|
+
`), o && (l += `${i} `), l += `${w}: ${c}`, y++;
|
|
404
411
|
}
|
|
405
412
|
return p && (y > 0 && (l += ","), o ? (l += `
|
|
406
413
|
`, l += `${i} ...
|
|
@@ -408,12 +415,12 @@ ${u}`), i += "]"), i;
|
|
|
408
415
|
${i}`), l += "}", l;
|
|
409
416
|
}
|
|
410
417
|
}
|
|
411
|
-
function
|
|
412
|
-
t =
|
|
418
|
+
function Xt(t, e) {
|
|
419
|
+
t = ut(t, "UTC", e);
|
|
413
420
|
const r = t.getUTCFullYear().toString().padStart(4, "0"), n = (t.getUTCMonth() + 1).toString().padStart(2, "0"), o = t.getUTCDate().toString().padStart(2, "0"), s = t.getUTCHours().toString().padStart(2, "0"), m = t.getUTCMinutes().toString().padStart(2, "0"), a = t.getUTCSeconds().toString().padStart(2, "0");
|
|
414
421
|
return `${r}-${n}-${o}_${s}-${m}-${a}`;
|
|
415
422
|
}
|
|
416
|
-
function
|
|
423
|
+
function bt(t) {
|
|
417
424
|
return t == null ? null : t.replace(/[&<>"']/g, (e) => {
|
|
418
425
|
switch (e) {
|
|
419
426
|
case "&":
|
|
@@ -429,16 +436,16 @@ function Xt(t) {
|
|
|
429
436
|
}
|
|
430
437
|
});
|
|
431
438
|
}
|
|
432
|
-
function
|
|
439
|
+
function Kt(t) {
|
|
433
440
|
return t == null ? null : t?.replace(/[/\\^$*+?.()|[\]{}]/g, "\\$&");
|
|
434
441
|
}
|
|
435
|
-
function
|
|
442
|
+
function Q(t) {
|
|
436
443
|
if (t == null)
|
|
437
444
|
return null;
|
|
438
445
|
if (Array.isArray(t)) {
|
|
439
446
|
const e = t.length, r = [];
|
|
440
447
|
for (let n = 0; n < e; n++)
|
|
441
|
-
r.push(
|
|
448
|
+
r.push(Q(t[n]));
|
|
442
449
|
return r;
|
|
443
450
|
}
|
|
444
451
|
if (typeof t == "object") {
|
|
@@ -446,12 +453,12 @@ function K(t) {
|
|
|
446
453
|
return t;
|
|
447
454
|
const e = {};
|
|
448
455
|
for (const r in t)
|
|
449
|
-
Object.prototype.hasOwnProperty.call(t, r) && (e[r] =
|
|
456
|
+
Object.prototype.hasOwnProperty.call(t, r) && (e[r] = Q(t[r]));
|
|
450
457
|
return e;
|
|
451
458
|
}
|
|
452
459
|
return t;
|
|
453
460
|
}
|
|
454
|
-
function
|
|
461
|
+
function z(t, e) {
|
|
455
462
|
if (t === e)
|
|
456
463
|
return !0;
|
|
457
464
|
if (t == null)
|
|
@@ -465,7 +472,7 @@ function V(t, e) {
|
|
|
465
472
|
if (r !== e.length)
|
|
466
473
|
return !1;
|
|
467
474
|
for (let n = 0; n < r; n++)
|
|
468
|
-
if (!
|
|
475
|
+
if (!z(t[n], e[n]))
|
|
469
476
|
return !1;
|
|
470
477
|
return !0;
|
|
471
478
|
}
|
|
@@ -473,29 +480,29 @@ function V(t, e) {
|
|
|
473
480
|
if (typeof e != "object" || t.constructor && t.constructor !== Object || e.constructor && e.constructor !== Object)
|
|
474
481
|
return !1;
|
|
475
482
|
for (const r in t)
|
|
476
|
-
if (Object.prototype.hasOwnProperty.call(t, r) && !
|
|
483
|
+
if (Object.prototype.hasOwnProperty.call(t, r) && !z(
|
|
477
484
|
t[r],
|
|
478
485
|
Object.prototype.hasOwnProperty.call(e, r) ? e[r] : null
|
|
479
486
|
))
|
|
480
487
|
return !1;
|
|
481
488
|
for (const r in e)
|
|
482
|
-
if (Object.prototype.hasOwnProperty.call(e, r) && !Object.prototype.hasOwnProperty.call(t, r) && !
|
|
489
|
+
if (Object.prototype.hasOwnProperty.call(e, r) && !Object.prototype.hasOwnProperty.call(t, r) && !z(e[r], null))
|
|
483
490
|
return !1;
|
|
484
491
|
return !0;
|
|
485
492
|
}
|
|
486
493
|
return !1;
|
|
487
494
|
}
|
|
488
|
-
function
|
|
495
|
+
function Qt(t, e) {
|
|
489
496
|
if (t == null || e == null)
|
|
490
497
|
return t == null == (e == null);
|
|
491
498
|
if (t.size !== e.size)
|
|
492
499
|
return !1;
|
|
493
500
|
for (const [r, n] of t)
|
|
494
|
-
if (!
|
|
501
|
+
if (!z(n, e.get(r)))
|
|
495
502
|
return !1;
|
|
496
503
|
return !0;
|
|
497
504
|
}
|
|
498
|
-
function
|
|
505
|
+
function Zt(t, e) {
|
|
499
506
|
const r = t.length;
|
|
500
507
|
if (r !== e.length)
|
|
501
508
|
return !1;
|
|
@@ -504,26 +511,29 @@ function Qt(t, e) {
|
|
|
504
511
|
return !1;
|
|
505
512
|
return !0;
|
|
506
513
|
}
|
|
507
|
-
function
|
|
508
|
-
return !t || typeof t != "object" ? t : Array.isArray(t) ? t.map(
|
|
509
|
-
const n =
|
|
514
|
+
function Z(t) {
|
|
515
|
+
return !t || typeof t != "object" ? t : Array.isArray(t) ? t.map(Z) : t && Object.keys(t).sort().reduce((e, r) => {
|
|
516
|
+
const n = Z(t[r]);
|
|
510
517
|
return n != null && (e[r] = n), e;
|
|
511
518
|
}, {});
|
|
512
519
|
}
|
|
513
|
-
function
|
|
520
|
+
function vt(t, e) {
|
|
521
|
+
return Object.defineProperty(t, "name", { value: e, configurable: !0 }), t;
|
|
522
|
+
}
|
|
523
|
+
function jt(t) {
|
|
514
524
|
const e = alert;
|
|
515
525
|
return window.alert = (r) => t(e, r), () => {
|
|
516
526
|
window.alert = e;
|
|
517
527
|
};
|
|
518
528
|
}
|
|
519
|
-
var
|
|
520
|
-
const
|
|
529
|
+
var lt = /* @__PURE__ */ ((t) => (t.log = "log", t.warn = "warn", t.error = "error", t.info = "info", t.debug = "debug", t.trace = "trace", t.assert = "assert", t))(lt || {});
|
|
530
|
+
const v = Object.values(lt);
|
|
521
531
|
function E(t) {
|
|
522
532
|
return function() {
|
|
523
533
|
t.apply(console, arguments);
|
|
524
534
|
};
|
|
525
535
|
}
|
|
526
|
-
const
|
|
536
|
+
const j = {
|
|
527
537
|
log: E(console.log),
|
|
528
538
|
warn: E(console.warn),
|
|
529
539
|
error: E(console.error),
|
|
@@ -532,23 +542,23 @@ const v = {
|
|
|
532
542
|
trace: E(console.trace),
|
|
533
543
|
assert: E(console.assert)
|
|
534
544
|
};
|
|
535
|
-
function
|
|
536
|
-
return
|
|
545
|
+
function Tt(t) {
|
|
546
|
+
return v.forEach((e) => {
|
|
537
547
|
console[e] = (...r) => {
|
|
538
|
-
t(
|
|
548
|
+
t(j, e, r);
|
|
539
549
|
};
|
|
540
550
|
}), () => {
|
|
541
|
-
|
|
542
|
-
console[e] =
|
|
551
|
+
v.forEach((e) => {
|
|
552
|
+
console[e] = j[e];
|
|
543
553
|
});
|
|
544
554
|
};
|
|
545
555
|
}
|
|
546
|
-
function
|
|
556
|
+
function te(t) {
|
|
547
557
|
return function(r) {
|
|
548
|
-
const n =
|
|
558
|
+
const n = Tt(t);
|
|
549
559
|
try {
|
|
550
560
|
const o = r();
|
|
551
|
-
return
|
|
561
|
+
return X(o) ? o.then(
|
|
552
562
|
(s) => (n(), s),
|
|
553
563
|
(s) => {
|
|
554
564
|
throw n(), s;
|
|
@@ -559,7 +569,7 @@ function vt(t) {
|
|
|
559
569
|
}
|
|
560
570
|
};
|
|
561
571
|
}
|
|
562
|
-
function
|
|
572
|
+
function Et() {
|
|
563
573
|
let t = new Error().stack;
|
|
564
574
|
if (t != null) {
|
|
565
575
|
const e = t.indexOf(`
|
|
@@ -568,9 +578,9 @@ function Tt() {
|
|
|
568
578
|
}
|
|
569
579
|
return t ?? "";
|
|
570
580
|
}
|
|
571
|
-
function
|
|
581
|
+
function ee(t) {
|
|
572
582
|
return function(...e) {
|
|
573
|
-
const r =
|
|
583
|
+
const r = Et();
|
|
574
584
|
try {
|
|
575
585
|
return t.apply(this, e);
|
|
576
586
|
} catch (n) {
|
|
@@ -579,14 +589,14 @@ function jt(t) {
|
|
|
579
589
|
}
|
|
580
590
|
};
|
|
581
591
|
}
|
|
582
|
-
function
|
|
592
|
+
function Ct(t) {
|
|
583
593
|
if (!t || t.timeout == null)
|
|
584
594
|
return null;
|
|
585
|
-
const e = new
|
|
595
|
+
const e = new et(), r = t.timeController ?? ht;
|
|
586
596
|
if (t.timeout) {
|
|
587
597
|
const n = r.setTimeout(() => {
|
|
588
598
|
e.abort(
|
|
589
|
-
new
|
|
599
|
+
new ct(
|
|
590
600
|
`[timeoutAbortController] Timeout error: ${t.timeout}ms`
|
|
591
601
|
)
|
|
592
602
|
);
|
|
@@ -599,15 +609,15 @@ function Et(t) {
|
|
|
599
609
|
e.abort(n);
|
|
600
610
|
}), e;
|
|
601
611
|
}
|
|
602
|
-
async function
|
|
603
|
-
const r =
|
|
612
|
+
async function re(t, e) {
|
|
613
|
+
const r = Ct(e);
|
|
604
614
|
try {
|
|
605
615
|
return await t(r?.signal ?? e?.abortSignal ?? null);
|
|
606
616
|
} finally {
|
|
607
617
|
r?.abort();
|
|
608
618
|
}
|
|
609
619
|
}
|
|
610
|
-
class
|
|
620
|
+
class ne {
|
|
611
621
|
_options;
|
|
612
622
|
_hasValue = !1;
|
|
613
623
|
_promiseOrValue = null;
|
|
@@ -620,7 +630,7 @@ class ee {
|
|
|
620
630
|
const r = (o) => (this._options.persist ? this._promiseOrValue = o : (this._promiseOrValue = null, this._hasValue = !1), o), n = (o) => {
|
|
621
631
|
throw this._options.persist || (this._promiseOrValue = null, this._hasValue = !1), o;
|
|
622
632
|
};
|
|
623
|
-
if (
|
|
633
|
+
if (X(e))
|
|
624
634
|
e = e.then(r, n);
|
|
625
635
|
else if (!this._options.persist)
|
|
626
636
|
return e;
|
|
@@ -634,7 +644,7 @@ class ee {
|
|
|
634
644
|
this._hasValue = !0, this._promiseOrValue = e;
|
|
635
645
|
}
|
|
636
646
|
}
|
|
637
|
-
class
|
|
647
|
+
class oe {
|
|
638
648
|
_options;
|
|
639
649
|
_promiseOrValues = /* @__PURE__ */ new Map();
|
|
640
650
|
constructor(e) {
|
|
@@ -647,7 +657,7 @@ class re {
|
|
|
647
657
|
const n = (s) => (this._options.persist ? this._promiseOrValues.set(e, s) : this._promiseOrValues.delete(e), s), o = (s) => {
|
|
648
658
|
throw this._options.persist || this._promiseOrValues.delete(e), s;
|
|
649
659
|
};
|
|
650
|
-
if (
|
|
660
|
+
if (X(r))
|
|
651
661
|
r = r.then(n, o);
|
|
652
662
|
else if (!this._options.persist)
|
|
653
663
|
return r;
|
|
@@ -661,94 +671,96 @@ class re {
|
|
|
661
671
|
this._promiseOrValues.set(e, r);
|
|
662
672
|
}
|
|
663
673
|
}
|
|
664
|
-
function
|
|
674
|
+
function tt(t) {
|
|
665
675
|
return t.replace(/\W/g, "").toLowerCase();
|
|
666
676
|
}
|
|
667
|
-
function
|
|
677
|
+
function Rt(t) {
|
|
668
678
|
return t instanceof URL ? t.searchParams : t instanceof URLSearchParams ? t : typeof t == "string" ? new URL(t).searchParams : typeof window < "u" ? new URL(window.location.href).searchParams : new URLSearchParams();
|
|
669
679
|
}
|
|
670
|
-
function
|
|
680
|
+
function It(t) {
|
|
671
681
|
return t == null ? null : (t = t.toLowerCase().trim(), t === "true" || t === "1" || t === "yes" ? !0 : t === "false" || t === "0" || t === "no" ? !1 : null);
|
|
672
682
|
}
|
|
673
|
-
function
|
|
683
|
+
function kt(t) {
|
|
674
684
|
if (t == null)
|
|
675
685
|
return null;
|
|
676
686
|
t = t.trim();
|
|
677
687
|
const e = parseInt(t, 10);
|
|
678
688
|
return isNaN(e) ? null : e;
|
|
679
689
|
}
|
|
680
|
-
function
|
|
690
|
+
function Nt(t) {
|
|
681
691
|
if (t == null)
|
|
682
692
|
return null;
|
|
683
693
|
t = t.trim();
|
|
684
694
|
const e = parseFloat(t);
|
|
685
695
|
return isNaN(e) ? null : e;
|
|
686
696
|
}
|
|
687
|
-
function
|
|
688
|
-
const r =
|
|
697
|
+
function b(t, e) {
|
|
698
|
+
const r = Rt(e), n = tt(t);
|
|
689
699
|
for (const [o, s] of r.entries())
|
|
690
|
-
if (
|
|
700
|
+
if (tt(o) === n)
|
|
691
701
|
return s;
|
|
692
702
|
return null;
|
|
693
703
|
}
|
|
694
|
-
function
|
|
695
|
-
return
|
|
704
|
+
function se(t, e) {
|
|
705
|
+
return It(b(t, e));
|
|
696
706
|
}
|
|
697
|
-
function
|
|
698
|
-
return
|
|
707
|
+
function ie(t, e) {
|
|
708
|
+
return kt(b(t, e));
|
|
699
709
|
}
|
|
700
|
-
function
|
|
701
|
-
return
|
|
710
|
+
function ue(t, e) {
|
|
711
|
+
return Nt(b(t, e));
|
|
702
712
|
}
|
|
703
713
|
export {
|
|
704
|
-
|
|
705
|
-
|
|
714
|
+
Q as A,
|
|
715
|
+
z as B,
|
|
706
716
|
Qt as C,
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
+
Zt as D,
|
|
718
|
+
Z as E,
|
|
719
|
+
vt as F,
|
|
720
|
+
jt as G,
|
|
721
|
+
lt as H,
|
|
722
|
+
Tt as I,
|
|
723
|
+
te as J,
|
|
724
|
+
ee as K,
|
|
725
|
+
Et as L,
|
|
726
|
+
Ct as M,
|
|
717
727
|
re as N,
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
728
|
+
ne as O,
|
|
729
|
+
oe as P,
|
|
730
|
+
Rt as Q,
|
|
731
|
+
Y as R,
|
|
732
|
+
It as S,
|
|
733
|
+
kt as T,
|
|
734
|
+
W as U,
|
|
735
|
+
Nt as V,
|
|
736
|
+
b as W,
|
|
727
737
|
se as X,
|
|
728
|
-
|
|
729
|
-
|
|
738
|
+
ie as Y,
|
|
739
|
+
ue as Z,
|
|
740
|
+
Vt as a,
|
|
741
|
+
gt as b,
|
|
730
742
|
Lt as c,
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
743
|
+
Ot as d,
|
|
744
|
+
$t as e,
|
|
745
|
+
Ft as f,
|
|
746
|
+
zt as g,
|
|
735
747
|
qt as h,
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
748
|
+
st as i,
|
|
749
|
+
Ht as j,
|
|
750
|
+
Wt as k,
|
|
751
|
+
Gt as l,
|
|
752
|
+
wt as m,
|
|
753
|
+
Bt as n,
|
|
754
|
+
Jt as o,
|
|
755
|
+
Yt as p,
|
|
756
|
+
ut as q,
|
|
757
|
+
ot as r,
|
|
758
|
+
yt as s,
|
|
759
|
+
pt as t,
|
|
760
|
+
x as u,
|
|
761
|
+
At as v,
|
|
762
|
+
Xt as w,
|
|
763
|
+
L as x,
|
|
764
|
+
bt as y,
|
|
765
|
+
Kt as z
|
|
754
766
|
};
|