@ztimson/utils 0.14.12 → 0.15.0
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/dist/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +130 -122
- package/dist/index.mjs.map +1 -1
- package/dist/objects.d.ts +2 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
var
|
|
2
|
-
var F = (n, e, t) => e in n ?
|
|
1
|
+
var v = Object.defineProperty;
|
|
2
|
+
var F = (n, e, t) => e in n ? v(n, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[e] = t;
|
|
3
3
|
var a = (n, e, t) => (F(n, typeof e != "symbol" ? e + "" : e, t), t);
|
|
4
|
-
function
|
|
4
|
+
function W(n, e = !1) {
|
|
5
5
|
if (n == null)
|
|
6
6
|
throw new Error("Cannot clean a NULL value");
|
|
7
7
|
return Array.isArray(n) ? n = n.filter((t) => t != null) : Object.entries(n).forEach(([t, r]) => {
|
|
8
8
|
(e && r === void 0 || !e && r == null) && delete n[t];
|
|
9
9
|
}), n;
|
|
10
10
|
}
|
|
11
|
-
function
|
|
11
|
+
function ht(n) {
|
|
12
12
|
return JSON.parse(JSON.stringify(n));
|
|
13
13
|
}
|
|
14
|
-
function
|
|
14
|
+
function J(n, ...e) {
|
|
15
15
|
return e.forEach((t) => {
|
|
16
16
|
for (const r in t)
|
|
17
|
-
t[r] && typeof t[r] == "object" && !Array.isArray(t[r]) ? (n[r] || (n[r] = {}),
|
|
17
|
+
t[r] && typeof t[r] == "object" && !Array.isArray(t[r]) ? (n[r] || (n[r] = {}), J(n[r], t[r])) : n[r] = t[r];
|
|
18
18
|
}), n;
|
|
19
19
|
}
|
|
20
|
-
function
|
|
20
|
+
function S(n, e, t) {
|
|
21
21
|
if (!(n == null || !e))
|
|
22
22
|
return e.split(/[.[\]]/g).filter((r) => r.length).reduce((r, o, s, i) => {
|
|
23
23
|
if ((o[0] == '"' || o[0] == "'") && (o = o.slice(1, -1)), !(r != null && r.hasOwnProperty(o))) {
|
|
@@ -37,7 +37,7 @@ function z(n, e, t = {}) {
|
|
|
37
37
|
return t;
|
|
38
38
|
}
|
|
39
39
|
}
|
|
40
|
-
function
|
|
40
|
+
function ft(n) {
|
|
41
41
|
const e = new FormData();
|
|
42
42
|
return Object.entries(n).forEach(([t, r]) => e.append(t, r)), e;
|
|
43
43
|
}
|
|
@@ -53,7 +53,7 @@ function b(n, e) {
|
|
|
53
53
|
const t = typeof n, r = typeof e;
|
|
54
54
|
return t != "object" || n == null || r != "object" || e == null ? t == "function" && r == "function" ? n.toString() == e.toString() : n === e : Object.keys(n).length != Object.keys(e).length ? !1 : Object.keys(n).every((s) => b(n[s], e[s]));
|
|
55
55
|
}
|
|
56
|
-
function
|
|
56
|
+
function dt(n, e) {
|
|
57
57
|
e.forEach((t) => {
|
|
58
58
|
Object.getOwnPropertyNames(t.prototype).forEach((r) => {
|
|
59
59
|
Object.defineProperty(
|
|
@@ -64,7 +64,14 @@ function ft(n, e) {
|
|
|
64
64
|
});
|
|
65
65
|
});
|
|
66
66
|
}
|
|
67
|
-
function
|
|
67
|
+
function q(n) {
|
|
68
|
+
try {
|
|
69
|
+
return JSON.parse(n);
|
|
70
|
+
} catch {
|
|
71
|
+
return n;
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
function pt(n, e) {
|
|
68
75
|
let t = [];
|
|
69
76
|
return JSON.parse(JSON.stringify(n, (r, o) => {
|
|
70
77
|
if (typeof o == "object" && o !== null) {
|
|
@@ -75,44 +82,44 @@ function dt(n, e) {
|
|
|
75
82
|
return o;
|
|
76
83
|
}, e));
|
|
77
84
|
}
|
|
78
|
-
function
|
|
85
|
+
function yt(n) {
|
|
79
86
|
return Object.entries(n).map(
|
|
80
87
|
([e, t]) => encodeURIComponent(e) + "=" + encodeURIComponent(t)
|
|
81
88
|
).join("&");
|
|
82
89
|
}
|
|
83
|
-
function
|
|
90
|
+
function gt(n, e) {
|
|
84
91
|
return n.indexOf(e) === -1 && n.push(e), n;
|
|
85
92
|
}
|
|
86
|
-
function
|
|
87
|
-
return
|
|
93
|
+
function mt(n, e) {
|
|
94
|
+
return V([
|
|
88
95
|
...n.filter((t) => !e.includes((r) => b(t, r))),
|
|
89
96
|
...e.filter((t) => !n.includes((r) => b(t, r)))
|
|
90
97
|
]);
|
|
91
98
|
}
|
|
92
|
-
function
|
|
99
|
+
function Et(n) {
|
|
93
100
|
return function(e, t) {
|
|
94
|
-
const r =
|
|
101
|
+
const r = S(e, n), o = S(t, n);
|
|
95
102
|
return typeof r != "string" || typeof o != "string" ? 1 : r.toLowerCase().localeCompare(o.toLowerCase());
|
|
96
103
|
};
|
|
97
104
|
}
|
|
98
|
-
function
|
|
99
|
-
return n.forEach((t) => Array.isArray(t) ?
|
|
105
|
+
function K(n, e = []) {
|
|
106
|
+
return n.forEach((t) => Array.isArray(t) ? K(t, e) : e.push(t)), e;
|
|
100
107
|
}
|
|
101
|
-
function
|
|
108
|
+
function wt(n, e = !1) {
|
|
102
109
|
return function(t, r) {
|
|
103
|
-
const o =
|
|
110
|
+
const o = S(t, n), s = S(r, n);
|
|
104
111
|
return typeof o == "number" && typeof s == "number" ? (e ? -1 : 1) * (o - s) : o > s ? e ? -1 : 1 : o < s ? e ? 1 : -1 : 0;
|
|
105
112
|
};
|
|
106
113
|
}
|
|
107
|
-
function
|
|
114
|
+
function xt(n, e) {
|
|
108
115
|
return (t) => b(t[n], e);
|
|
109
116
|
}
|
|
110
|
-
function
|
|
117
|
+
function V(n) {
|
|
111
118
|
for (let e = n.length - 1; e >= 0; e--)
|
|
112
119
|
n.slice(0, e).find((t) => b(t, n[e])) && n.splice(e, 1);
|
|
113
120
|
return n;
|
|
114
121
|
}
|
|
115
|
-
function
|
|
122
|
+
function At(n) {
|
|
116
123
|
return Array.isArray(n) ? n : [n];
|
|
117
124
|
}
|
|
118
125
|
class B extends Array {
|
|
@@ -191,15 +198,15 @@ class E extends Promise {
|
|
|
191
198
|
return this.from(super.finally(t));
|
|
192
199
|
}
|
|
193
200
|
}
|
|
194
|
-
function
|
|
201
|
+
function Z(n, e) {
|
|
195
202
|
const t = document.createElement("a");
|
|
196
203
|
t.href = n, t.download = e, document.body.appendChild(t), t.click(), document.body.removeChild(t);
|
|
197
204
|
}
|
|
198
|
-
function
|
|
205
|
+
function Bt(n, e) {
|
|
199
206
|
const t = URL.createObjectURL(n);
|
|
200
|
-
|
|
207
|
+
Z(t, e), URL.revokeObjectURL(t);
|
|
201
208
|
}
|
|
202
|
-
function
|
|
209
|
+
function bt(n = {}) {
|
|
203
210
|
return new Promise((e) => {
|
|
204
211
|
const t = document.createElement("input");
|
|
205
212
|
t.type = "file", t.accept = n.accept || "*", t.style.display = "none", t.multiple = !!n.multiple, t.onblur = t.onchange = async () => {
|
|
@@ -207,13 +214,13 @@ function Bt(n = {}) {
|
|
|
207
214
|
}, document.body.appendChild(t), t.click();
|
|
208
215
|
});
|
|
209
216
|
}
|
|
210
|
-
function
|
|
217
|
+
function Rt(n) {
|
|
211
218
|
return new E((e, t, r) => {
|
|
212
219
|
const o = new XMLHttpRequest(), s = new FormData();
|
|
213
|
-
n.files.forEach((i) => s.append("file", i)), o.withCredentials = !!n.withCredentials, o.upload.addEventListener("progress", (i) => i.lengthComputable ? r(i.loaded / i.total) : null), o.
|
|
220
|
+
n.files.forEach((i) => s.append("file", i)), o.withCredentials = !!n.withCredentials, o.upload.addEventListener("progress", (i) => i.lengthComputable ? r(i.loaded / i.total) : null), o.addEventListener("loadend", () => e(q(o.responseText))), o.addEventListener("error", () => t(q(o.responseText))), o.addEventListener("timeout", () => t({ error: "Request timed out" })), o.open("POST", n.url), Object.entries(n.headers || {}).forEach(([i, p]) => o.setRequestHeader(i, p)), o.send(s);
|
|
214
221
|
});
|
|
215
222
|
}
|
|
216
|
-
class
|
|
223
|
+
class H {
|
|
217
224
|
constructor() {
|
|
218
225
|
a(this, "listeners", {});
|
|
219
226
|
}
|
|
@@ -254,7 +261,7 @@ class P {
|
|
|
254
261
|
});
|
|
255
262
|
}
|
|
256
263
|
}
|
|
257
|
-
a(
|
|
264
|
+
a(H, "listeners", {});
|
|
258
265
|
class w extends Error {
|
|
259
266
|
constructor(t, r) {
|
|
260
267
|
super(t);
|
|
@@ -283,7 +290,7 @@ class w extends Error {
|
|
|
283
290
|
}
|
|
284
291
|
}
|
|
285
292
|
a(w, "code", 500);
|
|
286
|
-
class
|
|
293
|
+
class X extends w {
|
|
287
294
|
constructor(e = "Bad Request") {
|
|
288
295
|
super(e);
|
|
289
296
|
}
|
|
@@ -291,8 +298,8 @@ class Z extends w {
|
|
|
291
298
|
return e.constructor.code == this.code;
|
|
292
299
|
}
|
|
293
300
|
}
|
|
294
|
-
a(
|
|
295
|
-
class
|
|
301
|
+
a(X, "code", 400);
|
|
302
|
+
class Q extends w {
|
|
296
303
|
constructor(e = "Unauthorized") {
|
|
297
304
|
super(e);
|
|
298
305
|
}
|
|
@@ -300,8 +307,8 @@ class X extends w {
|
|
|
300
307
|
return e.constructor.code == this.code;
|
|
301
308
|
}
|
|
302
309
|
}
|
|
303
|
-
a(
|
|
304
|
-
class
|
|
310
|
+
a(Q, "code", 401);
|
|
311
|
+
class _ extends w {
|
|
305
312
|
constructor(e = "Forbidden") {
|
|
306
313
|
super(e);
|
|
307
314
|
}
|
|
@@ -309,8 +316,8 @@ class Q extends w {
|
|
|
309
316
|
return e.constructor.code == this.code;
|
|
310
317
|
}
|
|
311
318
|
}
|
|
312
|
-
a(
|
|
313
|
-
class
|
|
319
|
+
a(_, "code", 403);
|
|
320
|
+
class tt extends w {
|
|
314
321
|
constructor(e = "Not Found") {
|
|
315
322
|
super(e);
|
|
316
323
|
}
|
|
@@ -318,8 +325,8 @@ class _ extends w {
|
|
|
318
325
|
return e.constructor.code == this.code;
|
|
319
326
|
}
|
|
320
327
|
}
|
|
321
|
-
a(
|
|
322
|
-
class
|
|
328
|
+
a(tt, "code", 404);
|
|
329
|
+
class et extends w {
|
|
323
330
|
constructor(e = "Internal Server Error") {
|
|
324
331
|
super(e);
|
|
325
332
|
}
|
|
@@ -327,7 +334,7 @@ class tt extends w {
|
|
|
327
334
|
return e.constructor.code == this.code;
|
|
328
335
|
}
|
|
329
336
|
}
|
|
330
|
-
a(
|
|
337
|
+
a(et, "code", 500);
|
|
331
338
|
const g = class g {
|
|
332
339
|
constructor(e = {}) {
|
|
333
340
|
a(this, "interceptors", {});
|
|
@@ -356,7 +363,7 @@ const g = class g {
|
|
|
356
363
|
const s = Array.isArray(e.query) ? e.query : Object.keys(e.query).map((i) => ({ key: i, value: e.query[i] }));
|
|
357
364
|
t += (t.includes("?") ? "&" : "?") + s.map((i) => `${i.key}=${i.value}`).join("&");
|
|
358
365
|
}
|
|
359
|
-
const r =
|
|
366
|
+
const r = W({
|
|
360
367
|
"Content-Type": e.body ? e.body instanceof FormData ? "multipart/form-data" : "application/json" : void 0,
|
|
361
368
|
...g.headers,
|
|
362
369
|
...this.headers,
|
|
@@ -368,24 +375,24 @@ const g = class g {
|
|
|
368
375
|
method: e.method || (e.body ? "POST" : "GET"),
|
|
369
376
|
body: e.body
|
|
370
377
|
}).then(async (c) => {
|
|
371
|
-
var
|
|
378
|
+
var j, G;
|
|
372
379
|
for (let u of [...Object.values(g.interceptors), ...Object.values(this.interceptors)])
|
|
373
380
|
await new Promise((O) => u(c, () => O()));
|
|
374
381
|
const R = c.headers.get("Content-Length"), N = R ? parseInt(R, 10) : 0;
|
|
375
|
-
let
|
|
376
|
-
const
|
|
382
|
+
let k = 0;
|
|
383
|
+
const T = (j = c.body) == null ? void 0 : j.getReader(), Y = new ReadableStream({
|
|
377
384
|
start(u) {
|
|
378
385
|
function O() {
|
|
379
|
-
|
|
386
|
+
T == null || T.read().then((x) => {
|
|
380
387
|
if (x.done)
|
|
381
388
|
return u.close();
|
|
382
|
-
|
|
389
|
+
k += x.value.byteLength, p(k / N), u.enqueue(x.value), O();
|
|
383
390
|
}).catch((x) => u.error(x));
|
|
384
391
|
}
|
|
385
392
|
O();
|
|
386
393
|
}
|
|
387
394
|
});
|
|
388
|
-
if (c.data = new Response(
|
|
395
|
+
if (c.data = new Response(Y), e.decode == null || e.decode) {
|
|
389
396
|
const u = (G = c.headers.get("Content-Type")) == null ? void 0 : G.toLowerCase();
|
|
390
397
|
u != null && u.includes("form") ? c.data = await c.data.formData() : u != null && u.includes("json") ? c.data = await c.data.json() : u != null && u.includes("text") ? c.data = await c.data.text() : u != null && u.includes("application") && (c.data = await c.data.blob());
|
|
391
398
|
}
|
|
@@ -421,7 +428,7 @@ const A = {
|
|
|
421
428
|
LIGHT_MAGENTA: "\x1B[95m",
|
|
422
429
|
LIGHT_CYAN: "\x1B[96m",
|
|
423
430
|
WHITE: "\x1B[97m"
|
|
424
|
-
},
|
|
431
|
+
}, Ot = {
|
|
425
432
|
BLACK: "\x1B[40m",
|
|
426
433
|
RED: "\x1B[41m",
|
|
427
434
|
GREEN: "\x1B[42m",
|
|
@@ -432,8 +439,8 @@ const A = {
|
|
|
432
439
|
WHITE: "\x1B[47m",
|
|
433
440
|
GREY: "\x1B[100m"
|
|
434
441
|
};
|
|
435
|
-
var
|
|
436
|
-
const y = class y extends
|
|
442
|
+
var nt = /* @__PURE__ */ ((n) => (n[n.ERROR = 0] = "ERROR", n[n.WARN = 1] = "WARN", n[n.INFO = 2] = "INFO", n[n.LOG = 3] = "LOG", n[n.DEBUG = 4] = "DEBUG", n))(nt || {});
|
|
443
|
+
const y = class y extends H {
|
|
437
444
|
constructor(e) {
|
|
438
445
|
super(), this.namespace = e;
|
|
439
446
|
}
|
|
@@ -480,8 +487,8 @@ const y = class y extends P {
|
|
|
480
487
|
}
|
|
481
488
|
};
|
|
482
489
|
a(y, "LOG_LEVEL", 4);
|
|
483
|
-
let
|
|
484
|
-
function
|
|
490
|
+
let P = y;
|
|
491
|
+
function Lt(n) {
|
|
485
492
|
const e = (p, c) => c < 1e-7 ? p : e(c, ~~(p % c)), t = n.toString().length - 2;
|
|
486
493
|
let r = Math.pow(10, t), o = n * r;
|
|
487
494
|
const s = e(o, r);
|
|
@@ -489,7 +496,7 @@ function Ot(n) {
|
|
|
489
496
|
const i = ~~(o / r);
|
|
490
497
|
return o -= i * r, `${i ? i + " " : ""}${~~o}/${~~r}`;
|
|
491
498
|
}
|
|
492
|
-
function
|
|
499
|
+
function St(n) {
|
|
493
500
|
let e = n.split(" ");
|
|
494
501
|
const t = e.length == 2 ? Number(e[0]) : 0;
|
|
495
502
|
return e = e.pop().split("/"), t + Number(e[0]) / Number(e[1]);
|
|
@@ -497,11 +504,11 @@ function Lt(n) {
|
|
|
497
504
|
function Ct(n, e) {
|
|
498
505
|
return n.length - n.replaceAll(e, "").length;
|
|
499
506
|
}
|
|
500
|
-
function
|
|
507
|
+
function Nt(n) {
|
|
501
508
|
return Array(n).fill(null).map(() => Math.round(Math.random() * 15).toString(16)).join("");
|
|
502
509
|
}
|
|
503
|
-
const
|
|
504
|
-
function
|
|
510
|
+
const I = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ", $ = "0123456789", D = "~`!@#$%^&*()_-+={[}]|\\:;\"'<,>.?/", rt = I + $ + D;
|
|
511
|
+
function Tt(n) {
|
|
505
512
|
const e = /(\+?1)?.*?(\d{3}).*?(\d{3}).*?(\d{4})/g.exec(n);
|
|
506
513
|
if (!e)
|
|
507
514
|
throw new Error(`Number cannot be parsed: ${n}`);
|
|
@@ -510,27 +517,27 @@ function Nt(n) {
|
|
|
510
517
|
function It(n, e, t) {
|
|
511
518
|
return `${n.slice(0, t)}${e}${n.slice(t + 1)}`;
|
|
512
519
|
}
|
|
513
|
-
function
|
|
520
|
+
function $t(n, e, t, r = !0) {
|
|
514
521
|
const o = n.toString(), s = e - o.length;
|
|
515
522
|
if (s <= 0)
|
|
516
523
|
return o;
|
|
517
524
|
const i = Array(~~(s / t.length)).fill(t).join("");
|
|
518
525
|
return r ? i + o : o + i;
|
|
519
526
|
}
|
|
520
|
-
function
|
|
527
|
+
function Dt(n, e = rt) {
|
|
521
528
|
return Array(n).fill(null).map(() => {
|
|
522
529
|
const t = ~~(Math.random() * e.length);
|
|
523
530
|
return e[t];
|
|
524
531
|
}).join("");
|
|
525
532
|
}
|
|
526
|
-
function
|
|
533
|
+
function kt(n, e = !1, t = !1, r = !1) {
|
|
527
534
|
if (!e && !t && !r)
|
|
528
535
|
throw new Error("Must enable at least one: letters, numbers, symbols");
|
|
529
536
|
return Array(n).fill(null).map(() => {
|
|
530
537
|
let o;
|
|
531
538
|
do {
|
|
532
539
|
const s = ~~(Math.random() * 3);
|
|
533
|
-
e && s == 0 ? o =
|
|
540
|
+
e && s == 0 ? o = I[~~(Math.random() * I.length)] : t && s == 1 ? o = $[~~(Math.random() * $.length)] : r && s == 2 && (o = D[~~(Math.random() * D.length)]);
|
|
534
541
|
} while (!o);
|
|
535
542
|
return o;
|
|
536
543
|
}).join("");
|
|
@@ -543,28 +550,28 @@ function jt(n, e) {
|
|
|
543
550
|
t.push(r);
|
|
544
551
|
return t;
|
|
545
552
|
}
|
|
546
|
-
function
|
|
547
|
-
var e =
|
|
553
|
+
function ot(n) {
|
|
554
|
+
var e = st(ct(ut(it(n), 8 * n.length)));
|
|
548
555
|
return e.toLowerCase();
|
|
549
556
|
}
|
|
550
|
-
function
|
|
557
|
+
function st(n) {
|
|
551
558
|
for (var e, t = "0123456789ABCDEF", r = "", o = 0; o < n.length; o++)
|
|
552
559
|
e = n.charCodeAt(o), r += t.charAt(e >>> 4 & 15) + t.charAt(15 & e);
|
|
553
560
|
return r;
|
|
554
561
|
}
|
|
555
|
-
function
|
|
562
|
+
function it(n) {
|
|
556
563
|
for (var e = Array(n.length >> 2), t = 0; t < e.length; t++)
|
|
557
564
|
e[t] = 0;
|
|
558
565
|
for (t = 0; t < 8 * n.length; t += 8)
|
|
559
566
|
e[t >> 5] |= (255 & n.charCodeAt(t / 8)) << t % 32;
|
|
560
567
|
return e;
|
|
561
568
|
}
|
|
562
|
-
function
|
|
569
|
+
function ct(n) {
|
|
563
570
|
for (var e = "", t = 0; t < 32 * n.length; t += 8)
|
|
564
571
|
e += String.fromCharCode(n[t >> 5] >>> t % 32 & 255);
|
|
565
572
|
return e;
|
|
566
573
|
}
|
|
567
|
-
function
|
|
574
|
+
function ut(n, e) {
|
|
568
575
|
n[e >> 5] |= 128 << e % 32, n[14 + (e + 64 >>> 9 << 4)] = e;
|
|
569
576
|
for (var t = 1732584193, r = -271733879, o = -1732584194, s = 271733878, i = 0; i < n.length; i += 16) {
|
|
570
577
|
var p = t, c = r, R = o, N = s;
|
|
@@ -572,35 +579,35 @@ function ct(n, e) {
|
|
|
572
579
|
}
|
|
573
580
|
return Array(t, r, o, s);
|
|
574
581
|
}
|
|
575
|
-
function
|
|
576
|
-
return m(
|
|
582
|
+
function C(n, e, t, r, o, s) {
|
|
583
|
+
return m(at(m(m(e, n), m(r, s)), o), t);
|
|
577
584
|
}
|
|
578
585
|
function l(n, e, t, r, o, s, i) {
|
|
579
|
-
return
|
|
586
|
+
return C(e & t | ~e & r, n, e, o, s, i);
|
|
580
587
|
}
|
|
581
588
|
function h(n, e, t, r, o, s, i) {
|
|
582
|
-
return
|
|
589
|
+
return C(e & r | t & ~r, n, e, o, s, i);
|
|
583
590
|
}
|
|
584
591
|
function f(n, e, t, r, o, s, i) {
|
|
585
|
-
return
|
|
592
|
+
return C(e ^ t ^ r, n, e, o, s, i);
|
|
586
593
|
}
|
|
587
594
|
function d(n, e, t, r, o, s, i) {
|
|
588
|
-
return
|
|
595
|
+
return C(t ^ (e | ~r), n, e, o, s, i);
|
|
589
596
|
}
|
|
590
597
|
function m(n, e) {
|
|
591
598
|
var t = (65535 & n) + (65535 & e);
|
|
592
599
|
return (n >> 16) + (e >> 16) + (t >> 16) << 16 | 65535 & t;
|
|
593
600
|
}
|
|
594
|
-
function
|
|
601
|
+
function at(n, e) {
|
|
595
602
|
return n << e | n >>> 32 - e;
|
|
596
603
|
}
|
|
597
|
-
function
|
|
604
|
+
function Gt(n) {
|
|
598
605
|
return /^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9-]+(?:\.[a-zA-Z0-9-]+)*$/.test(n);
|
|
599
606
|
}
|
|
600
|
-
function
|
|
601
|
-
return n ? `https://www.gravatar.com/avatar/${
|
|
607
|
+
function Ut(n, e = "mp") {
|
|
608
|
+
return n ? `https://www.gravatar.com/avatar/${ot(n)}?d=${e}` : "";
|
|
602
609
|
}
|
|
603
|
-
function
|
|
610
|
+
function qt(n) {
|
|
604
611
|
const e = new RegExp(
|
|
605
612
|
"(?:(?<protocol>[\\w\\d]+)\\:\\/\\/)?(?:(?<user>.+)\\@)?(?<host>(?<domain>[^:\\/\\?#@\\n]+)(?:\\:(?<port>\\d*))?)(?<path>\\/.*?)?(?:\\?(?<query>.*?))?(?:#(?<fragment>.*?))?$",
|
|
606
613
|
"gm"
|
|
@@ -617,10 +624,10 @@ function Ut(n) {
|
|
|
617
624
|
function Mt(n) {
|
|
618
625
|
return (n instanceof Date ? n.getTime() : n) - (/* @__PURE__ */ new Date()).getTime();
|
|
619
626
|
}
|
|
620
|
-
function
|
|
627
|
+
function Pt(n) {
|
|
621
628
|
return new Promise((e) => setTimeout(e, n));
|
|
622
629
|
}
|
|
623
|
-
function
|
|
630
|
+
function Ht(n) {
|
|
624
631
|
const e = n instanceof Date ? n : new Date(n);
|
|
625
632
|
return new Intl.DateTimeFormat("en-us", {
|
|
626
633
|
weekday: "long",
|
|
@@ -633,59 +640,60 @@ function Pt(n) {
|
|
|
633
640
|
}
|
|
634
641
|
export {
|
|
635
642
|
B as ASet,
|
|
636
|
-
|
|
637
|
-
|
|
643
|
+
X as BadRequestError,
|
|
644
|
+
Ot as CliBackground,
|
|
638
645
|
A as CliEffects,
|
|
639
646
|
L as CliForeground,
|
|
640
647
|
w as CustomError,
|
|
641
|
-
|
|
648
|
+
_ as ForbiddenError,
|
|
642
649
|
M as Http,
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
650
|
+
et as InternalServerError,
|
|
651
|
+
q as JSONAttemptParse,
|
|
652
|
+
pt as JSONSanitized,
|
|
653
|
+
nt as LOG_LEVEL,
|
|
654
|
+
P as Logger,
|
|
655
|
+
tt as NotFoundError,
|
|
647
656
|
E as PromiseProgress,
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
657
|
+
H as TypedEmitter,
|
|
658
|
+
Q as UnauthorizedError,
|
|
659
|
+
gt as addUnique,
|
|
660
|
+
mt as arrayDiff,
|
|
661
|
+
Et as caseInsensitiveSort,
|
|
662
|
+
W as clean,
|
|
654
663
|
Ct as countChars,
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
664
|
+
Nt as createHex,
|
|
665
|
+
Lt as dec2Frac,
|
|
666
|
+
ht as deepCopy,
|
|
667
|
+
J as deepMerge,
|
|
668
|
+
S as dotNotation,
|
|
669
|
+
Z as download,
|
|
670
|
+
Bt as downloadBlob,
|
|
671
|
+
bt as fileBrowser,
|
|
672
|
+
xt as findByProp,
|
|
673
|
+
K as flattenArr,
|
|
665
674
|
z as flattenObj,
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
675
|
+
ft as formData,
|
|
676
|
+
Ht as formatDate,
|
|
677
|
+
Tt as formatPhoneNumber,
|
|
678
|
+
St as fracToDec,
|
|
679
|
+
Ut as gravatar,
|
|
671
680
|
U as includes,
|
|
672
681
|
It as insertAt,
|
|
673
682
|
b as isEqual,
|
|
674
|
-
|
|
675
|
-
|
|
683
|
+
At as makeArray,
|
|
684
|
+
V as makeUnique,
|
|
676
685
|
jt as matchAll,
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
Et as sortByProp,
|
|
686
|
+
ot as md5,
|
|
687
|
+
dt as mixin,
|
|
688
|
+
$t as pad,
|
|
689
|
+
Dt as randomString,
|
|
690
|
+
kt as randomStringBuilder,
|
|
691
|
+
Pt as sleep,
|
|
692
|
+
wt as sortByProp,
|
|
685
693
|
Mt as timeUntil,
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
694
|
+
Rt as uploadWithProgress,
|
|
695
|
+
yt as urlEncode,
|
|
696
|
+
qt as urlParser,
|
|
697
|
+
Gt as validateEmail
|
|
690
698
|
};
|
|
691
699
|
//# sourceMappingURL=index.mjs.map
|