@spscommerce/utils 7.1.5 → 7.2.1
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/README.md +1 -4
- package/lib/array/flatten.d.ts +1 -1
- package/lib/array/is-subset.d.ts +1 -1
- package/lib/decorators/debounced.d.ts +1 -8
- package/lib/decorators/locked-to-animation-frames.d.ts +1 -1
- package/lib/decorators/simple-metadata-decorator-applicator.d.ts +3 -3
- package/lib/decorators/tick-delay.d.ts +2 -2
- package/lib/function/debounce.d.ts +1 -1
- package/lib/function/debounced-function.interface.d.ts +3 -3
- package/lib/function/delayed-function.interface.d.ts +1 -1
- package/lib/function/lock-to-animation-frames.d.ts +1 -1
- package/lib/function/on-next-tick.d.ts +1 -1
- package/lib/function/op.d.ts +18 -18
- package/lib/index.js +344 -449
- package/lib/index.umd.cjs +1 -1
- package/lib/object/copy-property.d.ts +1 -1
- package/lib/object/deep-freeze.d.ts +1 -1
- package/lib/object/for-each-entry-deep.d.ts +1 -1
- package/lib/object/for-each-nested-object.d.ts +1 -1
- package/lib/object/get-path.d.ts +1 -1
- package/lib/object/is-empty.d.ts +1 -0
- package/lib/object/is-nil.d.ts +1 -0
- package/lib/object/is-plain-object.d.ts +1 -0
- package/lib/object/merge-deep.d.ts +1 -1
- package/lib/object/merge-properties-deep.d.ts +1 -4
- package/lib/object/omit.d.ts +1 -1
- package/lib/object/set-path.d.ts +1 -1
- package/lib/object/traverse-path.d.ts +1 -1
- package/lib/object/values.d.ts +1 -1
- package/lib/string/template.d.ts +4 -4
- package/package.json +2 -5
package/lib/index.js
CHANGED
|
@@ -1,109 +1,116 @@
|
|
|
1
|
-
function
|
|
2
|
-
return Array.isArray(e) ? e.reduce((
|
|
1
|
+
function M(e) {
|
|
2
|
+
return Array.isArray(e) ? e.reduce((n, t) => n.concat(M(t)), []) : e;
|
|
3
3
|
}
|
|
4
|
-
function
|
|
5
|
-
const
|
|
6
|
-
for (const
|
|
7
|
-
if (!
|
|
4
|
+
function U(e, n) {
|
|
5
|
+
const t = new Set(n);
|
|
6
|
+
for (const a of e)
|
|
7
|
+
if (!t.has(a))
|
|
8
8
|
return !1;
|
|
9
9
|
return !0;
|
|
10
10
|
}
|
|
11
|
-
function
|
|
11
|
+
function w() {
|
|
12
12
|
return this.pending = !1, typeof this.id < "u" ? (clearTimeout(this.id), delete this.id, !0) : !1;
|
|
13
13
|
}
|
|
14
|
-
function
|
|
15
|
-
const
|
|
16
|
-
return new Promise((
|
|
17
|
-
|
|
18
|
-
|
|
14
|
+
function D(e, n, t) {
|
|
15
|
+
const a = function(...i) {
|
|
16
|
+
return new Promise((o, s) => {
|
|
17
|
+
a.reset && a.reset(), a.pending = !0;
|
|
18
|
+
const f = () => {
|
|
19
19
|
(async () => {
|
|
20
20
|
try {
|
|
21
|
-
let
|
|
22
|
-
|
|
23
|
-
} catch (
|
|
24
|
-
|
|
21
|
+
let c = e.apply(t || this, i);
|
|
22
|
+
c instanceof Promise && (c = await c), o(c);
|
|
23
|
+
} catch (c) {
|
|
24
|
+
s(c);
|
|
25
25
|
} finally {
|
|
26
|
-
|
|
26
|
+
a.reset && a.reset();
|
|
27
27
|
}
|
|
28
28
|
})();
|
|
29
|
-
}
|
|
30
|
-
|
|
29
|
+
};
|
|
30
|
+
a.id = window.setTimeout(f, n);
|
|
31
31
|
});
|
|
32
32
|
};
|
|
33
|
-
return
|
|
33
|
+
return a.reset = w.bind(a), a;
|
|
34
34
|
}
|
|
35
|
-
function
|
|
35
|
+
function F() {
|
|
36
36
|
return this.pending = !1, typeof this.id == "number" ? (window.cancelAnimationFrame(this.id), delete this.id, !0) : !1;
|
|
37
37
|
}
|
|
38
|
-
function
|
|
39
|
-
const
|
|
40
|
-
|
|
41
|
-
e
|
|
42
|
-
}),
|
|
38
|
+
function j(e, n) {
|
|
39
|
+
const t = function(...r) {
|
|
40
|
+
t.pending === !0 && t.reset && t.reset(), t.id = window.requestAnimationFrame(() => {
|
|
41
|
+
e.apply(!!n || this, r), t.reset && t.reset();
|
|
42
|
+
}), t.pending = !0;
|
|
43
43
|
};
|
|
44
|
-
return
|
|
44
|
+
return t.pending = !1, t.reset = F.bind(t), t;
|
|
45
45
|
}
|
|
46
|
-
function
|
|
47
|
-
const
|
|
48
|
-
setTimeout(
|
|
46
|
+
function G(e, n) {
|
|
47
|
+
const t = n ? e.bind(n) : e;
|
|
48
|
+
setTimeout(t, 0);
|
|
49
49
|
}
|
|
50
|
-
const
|
|
50
|
+
const S = {
|
|
51
51
|
// eslint-disable-next-line @typescript-eslint/restrict-plus-operands
|
|
52
|
-
add: (e,
|
|
53
|
-
and: (e,
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
52
|
+
add: (e, n) => e + n,
|
|
53
|
+
and: (e, n) => e && n,
|
|
54
|
+
// eslint-disable-next-line no-bitwise
|
|
55
|
+
band: (e, n) => e & n,
|
|
56
|
+
// eslint-disable-next-line no-bitwise
|
|
57
|
+
bor: (e, n) => e | n,
|
|
58
|
+
// eslint-disable-next-line no-bitwise
|
|
59
|
+
bxor: (e, n) => e ^ n,
|
|
60
|
+
// eslint-disable-next-line no-bitwise
|
|
57
61
|
bnot: (e) => ~e,
|
|
58
62
|
decr: (e) => e - 1,
|
|
59
|
-
div: (e,
|
|
60
|
-
eq: (e,
|
|
61
|
-
exp: (e,
|
|
62
|
-
gt: (e,
|
|
63
|
-
gte: (e,
|
|
63
|
+
div: (e, n) => e / n,
|
|
64
|
+
eq: (e, n) => e === n,
|
|
65
|
+
exp: (e, n) => e ** n,
|
|
66
|
+
gt: (e, n) => e > n,
|
|
67
|
+
gte: (e, n) => e >= n,
|
|
64
68
|
incr: (e) => e + 1,
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
+
// eslint-disable-next-line no-bitwise
|
|
70
|
+
lshift: (e, n) => e << n,
|
|
71
|
+
lt: (e, n) => e < n,
|
|
72
|
+
lte: (e, n) => e <= n,
|
|
73
|
+
mul: (e, n) => e * n,
|
|
69
74
|
neg: (e) => -e,
|
|
70
|
-
neq: (e,
|
|
75
|
+
neq: (e, n) => e !== n,
|
|
71
76
|
not: (e) => !e,
|
|
72
|
-
or: (e,
|
|
73
|
-
rem: (e,
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
77
|
+
or: (e, n) => e || n,
|
|
78
|
+
rem: (e, n) => e % n,
|
|
79
|
+
// eslint-disable-next-line no-bitwise
|
|
80
|
+
rshift: (e, n) => e >> n,
|
|
81
|
+
// eslint-disable-next-line no-bitwise
|
|
82
|
+
rshift_zf: (e, n) => e >>> n,
|
|
83
|
+
sub: (e, n) => e - n,
|
|
84
|
+
xor: (e, n) => !!((e || n) && !(e && n))
|
|
78
85
|
};
|
|
79
|
-
function
|
|
86
|
+
function W(e, n) {
|
|
80
87
|
if (!Number.isInteger(e))
|
|
81
88
|
throw new Error("start must be an integer");
|
|
82
|
-
if (!Number.isInteger(
|
|
89
|
+
if (!Number.isInteger(n))
|
|
83
90
|
throw new Error("end must be an integer");
|
|
84
|
-
return new Array(Math.abs(
|
|
91
|
+
return new Array(Math.abs(n - e) + 1).fill(e).map(e > n ? S.sub : S.add);
|
|
85
92
|
}
|
|
86
|
-
class
|
|
87
|
-
constructor(
|
|
88
|
-
let
|
|
93
|
+
class z {
|
|
94
|
+
constructor(n, t = {}) {
|
|
95
|
+
let a;
|
|
89
96
|
if (typeof Event == "function")
|
|
90
|
-
|
|
97
|
+
a = new Event(n, t);
|
|
91
98
|
else {
|
|
92
|
-
|
|
93
|
-
for (const i of Object.keys(
|
|
94
|
-
i !== "bubbles" && i !== "cancelable" && (
|
|
99
|
+
a = document.createEvent("Event"), a.initEvent(n, t.bubbles, t.cancelable);
|
|
100
|
+
for (const i of Object.keys(t))
|
|
101
|
+
i !== "bubbles" && i !== "cancelable" && (a[i] = t[i]);
|
|
95
102
|
}
|
|
96
|
-
Object.setPrototypeOf(this,
|
|
97
|
-
const
|
|
98
|
-
for (const i of Object.keys(
|
|
99
|
-
const
|
|
100
|
-
for (const
|
|
101
|
-
typeof
|
|
103
|
+
Object.setPrototypeOf(this, a);
|
|
104
|
+
const r = Object.getOwnPropertyDescriptors(Event.prototype);
|
|
105
|
+
for (const i of Object.keys(r)) {
|
|
106
|
+
const o = r[i];
|
|
107
|
+
for (const s of Object.keys(o))
|
|
108
|
+
typeof o[s] == "function" && (o[s] = o[s].bind(a));
|
|
102
109
|
}
|
|
103
|
-
Object.defineProperties(this,
|
|
110
|
+
Object.defineProperties(this, r);
|
|
104
111
|
}
|
|
105
112
|
}
|
|
106
|
-
const
|
|
113
|
+
const H = Object.freeze({
|
|
107
114
|
100: { name: "Insurance Plan Description" },
|
|
108
115
|
101: { name: "Name and Address Lists" },
|
|
109
116
|
104: { name: "Air Shipment Information" },
|
|
@@ -404,467 +411,355 @@ const tt = Object.freeze({
|
|
|
404
411
|
998: { name: "Set Cancellation" },
|
|
405
412
|
999: { name: "Implementation Acknowledgment" }
|
|
406
413
|
});
|
|
407
|
-
function
|
|
408
|
-
return (e,
|
|
409
|
-
const
|
|
414
|
+
function $() {
|
|
415
|
+
return (e, n) => {
|
|
416
|
+
const t = `_${String(n)}`;
|
|
410
417
|
Object.defineProperties(e, {
|
|
411
|
-
[
|
|
418
|
+
[t]: {
|
|
412
419
|
enumerable: !1,
|
|
413
420
|
configurable: !0,
|
|
414
421
|
writable: !0,
|
|
415
422
|
value: void 0
|
|
416
423
|
},
|
|
417
|
-
[
|
|
424
|
+
[n]: {
|
|
418
425
|
enumerable: !0,
|
|
419
426
|
configurable: !0,
|
|
420
427
|
get() {
|
|
421
|
-
return this[
|
|
428
|
+
return Number(this[t]);
|
|
422
429
|
},
|
|
423
|
-
set(
|
|
424
|
-
this[
|
|
430
|
+
set(a) {
|
|
431
|
+
this[t] = Number(a);
|
|
425
432
|
}
|
|
426
433
|
}
|
|
427
434
|
});
|
|
428
435
|
};
|
|
429
436
|
}
|
|
430
|
-
function
|
|
431
|
-
return (
|
|
432
|
-
const
|
|
433
|
-
return
|
|
434
|
-
const
|
|
435
|
-
return
|
|
436
|
-
|
|
437
|
+
function K(e) {
|
|
438
|
+
return (n, t, a) => {
|
|
439
|
+
const r = { ...a };
|
|
440
|
+
return r.get = function() {
|
|
441
|
+
const o = { ...r };
|
|
442
|
+
return o.value = D(
|
|
443
|
+
r.value,
|
|
444
|
+
e,
|
|
445
|
+
this
|
|
446
|
+
), Object.defineProperty(this, t, o), o.value;
|
|
447
|
+
}, r.configurable = !0, delete r.writable, delete r.value, r;
|
|
437
448
|
};
|
|
438
449
|
}
|
|
439
|
-
function
|
|
440
|
-
const
|
|
441
|
-
return
|
|
442
|
-
const i = { ...
|
|
443
|
-
return i.value =
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
450
|
+
function Q(e, n, t) {
|
|
451
|
+
const a = { ...t };
|
|
452
|
+
return t.get = function() {
|
|
453
|
+
const i = { ...a };
|
|
454
|
+
return i.value = j(
|
|
455
|
+
a.value,
|
|
456
|
+
this
|
|
457
|
+
), Object.defineProperty(this, n, i), i.value;
|
|
458
|
+
}, t.configurable = !0, delete t.writable, delete t.value, t;
|
|
459
|
+
}
|
|
460
|
+
function X(e, n, t, a, r) {
|
|
461
|
+
const i = r, o = i.get, { value: s } = i;
|
|
448
462
|
return i.get = function() {
|
|
449
|
-
const
|
|
450
|
-
|
|
451
|
-
|
|
463
|
+
const c = this, R = s ?? (typeof o < "u" && o.call(this));
|
|
464
|
+
let d;
|
|
465
|
+
if (typeof R == "function")
|
|
466
|
+
d = R.bind(this);
|
|
467
|
+
else
|
|
468
|
+
throw new Error("The value is not a function");
|
|
469
|
+
const y = { ...n, ...e };
|
|
470
|
+
for (const l of Object.keys(n))
|
|
471
|
+
typeof e[l] == "function" ? Object.defineProperty(d, l, {
|
|
452
472
|
get() {
|
|
453
|
-
|
|
473
|
+
const h = y[l];
|
|
474
|
+
if (typeof h == "function")
|
|
475
|
+
return h(c);
|
|
476
|
+
throw new Error(`Property ${l} is not a function`);
|
|
454
477
|
}
|
|
455
|
-
}) :
|
|
456
|
-
return Object.defineProperty(this,
|
|
478
|
+
}) : d[l] = y[l];
|
|
479
|
+
return Object.defineProperty(this, a, {
|
|
457
480
|
writable: !0,
|
|
458
481
|
configurable: !0,
|
|
459
482
|
enumerable: i.enumerable,
|
|
460
|
-
value:
|
|
461
|
-
}),
|
|
483
|
+
value: d
|
|
484
|
+
}), d;
|
|
462
485
|
}, delete i.value, delete i.writable, i;
|
|
463
486
|
}
|
|
464
|
-
function
|
|
465
|
-
const
|
|
466
|
-
return
|
|
467
|
-
const i = { ...
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
}
|
|
474
|
-
function
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
487
|
+
function Y(e, n, t) {
|
|
488
|
+
const a = { ...t };
|
|
489
|
+
return a.get = function() {
|
|
490
|
+
const i = { ...a };
|
|
491
|
+
if (!a.value)
|
|
492
|
+
return a.value;
|
|
493
|
+
const o = a.value.bind(this);
|
|
494
|
+
return i.value = () => setTimeout(o, 0), Object.defineProperty(this, n, i), i.value;
|
|
495
|
+
}, a.configurable = !0, delete a.writable, delete a.value, a;
|
|
496
|
+
}
|
|
497
|
+
function J(e, n) {
|
|
498
|
+
return !e || e < n[0] ? n[0] : e > n[1] ? n[1] : e;
|
|
499
|
+
}
|
|
500
|
+
function N(e, n = 0) {
|
|
501
|
+
const t = String(e).split("."), a = t.length > 1 ? t[1].length : 0;
|
|
502
|
+
let r = e;
|
|
503
|
+
for (let i = a - 1; i >= n; i -= 1)
|
|
504
|
+
r = +`${Math.round(+`${r}e${i}`)}e-${i}`;
|
|
505
|
+
return r;
|
|
480
506
|
}
|
|
481
|
-
|
|
507
|
+
const L = 5, C = 1024;
|
|
508
|
+
function Z(e, n = 2) {
|
|
482
509
|
if (e > Number.MAX_SAFE_INTEGER)
|
|
483
510
|
throw new Error(
|
|
484
511
|
"Number is greater than MAX_SAFE_INTEGER; toFileSizeString does not support orders of magnitude higher than petabytes for this reason until BigInt achieves broad browser support."
|
|
485
512
|
);
|
|
486
|
-
const
|
|
513
|
+
const t = Math.min(
|
|
514
|
+
Math.floor(Math.log(e) / Math.log(C)),
|
|
515
|
+
L
|
|
516
|
+
), a = [
|
|
487
517
|
"B",
|
|
488
518
|
"KB",
|
|
489
519
|
"MB",
|
|
490
520
|
"GB",
|
|
491
521
|
"TB",
|
|
492
522
|
"PB"
|
|
493
|
-
][
|
|
494
|
-
return
|
|
523
|
+
][t], r = t ? n : 0;
|
|
524
|
+
return N(e / C ** t, r).toFixed(
|
|
525
|
+
r
|
|
526
|
+
) + a;
|
|
495
527
|
}
|
|
496
|
-
function
|
|
497
|
-
return typeof e == "string" ? e.match(/[^.[\]]+/g)
|
|
528
|
+
function g(e) {
|
|
529
|
+
return typeof e == "string" ? e.match(/[^.[\]]+/g) ?? [] : Array.isArray(e) ? e : [e];
|
|
498
530
|
}
|
|
499
|
-
function
|
|
500
|
-
Object.
|
|
501
|
-
|
|
502
|
-
e,
|
|
503
|
-
Object.getOwnPropertyDescriptor(t, e)
|
|
504
|
-
);
|
|
531
|
+
function ee(e, n, t) {
|
|
532
|
+
const a = Object.getOwnPropertyDescriptor(n, e);
|
|
533
|
+
a && Object.defineProperty(t, e, a);
|
|
505
534
|
}
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
function xe() {
|
|
512
|
-
if (X) return F;
|
|
513
|
-
X = 1;
|
|
514
|
-
var e = "[object Object]";
|
|
515
|
-
function t(m) {
|
|
516
|
-
var u = !1;
|
|
517
|
-
if (m != null && typeof m.toString != "function")
|
|
518
|
-
try {
|
|
519
|
-
u = !!(m + "");
|
|
520
|
-
} catch {
|
|
521
|
-
}
|
|
522
|
-
return u;
|
|
523
|
-
}
|
|
524
|
-
function n(m, u) {
|
|
525
|
-
return function(g) {
|
|
526
|
-
return m(u(g));
|
|
527
|
-
};
|
|
528
|
-
}
|
|
529
|
-
var r = Function.prototype, o = Object.prototype, i = r.toString, c = o.hasOwnProperty, l = i.call(Object), h = o.toString, f = n(Object.getPrototypeOf, Object);
|
|
530
|
-
function C(m) {
|
|
531
|
-
return !!m && typeof m == "object";
|
|
532
|
-
}
|
|
533
|
-
function p(m) {
|
|
534
|
-
if (!C(m) || h.call(m) != e || t(m))
|
|
535
|
-
return !1;
|
|
536
|
-
var u = f(m);
|
|
537
|
-
if (u === null)
|
|
538
|
-
return !0;
|
|
539
|
-
var g = c.call(u, "constructor") && u.constructor;
|
|
540
|
-
return typeof g == "function" && g instanceof g && i.call(g) == l;
|
|
541
|
-
}
|
|
542
|
-
return F = p, F;
|
|
535
|
+
function u(e) {
|
|
536
|
+
if (typeof e != "object" || e === null)
|
|
537
|
+
return !1;
|
|
538
|
+
const n = Object.getPrototypeOf(e);
|
|
539
|
+
return (n === null || n === Object.prototype || Object.getPrototypeOf(n) === null) && !(Symbol.toStringTag in e) && !(Symbol.iterator in e);
|
|
543
540
|
}
|
|
544
|
-
|
|
545
|
-
const y = /* @__PURE__ */ B(Ve);
|
|
546
|
-
function Ge(e) {
|
|
541
|
+
function k(e) {
|
|
547
542
|
Object.freeze(e);
|
|
548
|
-
for (const
|
|
549
|
-
const
|
|
550
|
-
(
|
|
543
|
+
for (const n of Object.keys(e)) {
|
|
544
|
+
const t = e[n];
|
|
545
|
+
(u(t) || Array.isArray(t)) && k(t);
|
|
551
546
|
}
|
|
552
547
|
}
|
|
553
|
-
var
|
|
554
|
-
function
|
|
555
|
-
let
|
|
556
|
-
for (const
|
|
557
|
-
const i = Object.
|
|
558
|
-
i && !
|
|
548
|
+
var B = /* @__PURE__ */ ((e) => (e[e.ADDITION = 0] = "ADDITION", e[e.DELETION = 1] = "DELETION", e[e.ALTERATION = 2] = "ALTERATION", e))(B || {});
|
|
549
|
+
function q(e, n, t = []) {
|
|
550
|
+
let a = [];
|
|
551
|
+
for (const r of /* @__PURE__ */ new Set([...Object.keys(e), ...Object.keys(n)])) {
|
|
552
|
+
const i = Object.hasOwn(e, r), o = Object.hasOwn(n, r);
|
|
553
|
+
i && !o ? a.push({
|
|
559
554
|
type: 1,
|
|
560
|
-
key:
|
|
561
|
-
parentPath:
|
|
562
|
-
objects: [e,
|
|
563
|
-
}) : !i &&
|
|
555
|
+
key: r,
|
|
556
|
+
parentPath: t,
|
|
557
|
+
objects: [e, n]
|
|
558
|
+
}) : !i && o ? a.push({
|
|
564
559
|
type: 0,
|
|
565
|
-
key:
|
|
566
|
-
parentPath:
|
|
567
|
-
objects: [e,
|
|
568
|
-
}) :
|
|
569
|
-
|
|
570
|
-
e[
|
|
571
|
-
|
|
572
|
-
[...
|
|
560
|
+
key: r,
|
|
561
|
+
parentPath: t,
|
|
562
|
+
objects: [e, n]
|
|
563
|
+
}) : u(e[r]) && u(n[r]) || Array.isArray(e[r]) && Array.isArray(n[r]) ? a = a.concat(
|
|
564
|
+
q(
|
|
565
|
+
e[r],
|
|
566
|
+
n[r],
|
|
567
|
+
[...t, r]
|
|
573
568
|
)
|
|
574
|
-
) : e[
|
|
569
|
+
) : e[r] !== n[r] && a.push({
|
|
575
570
|
type: 2,
|
|
576
|
-
key:
|
|
577
|
-
parentPath:
|
|
578
|
-
objects: [e,
|
|
571
|
+
key: r,
|
|
572
|
+
parentPath: t,
|
|
573
|
+
objects: [e, n]
|
|
579
574
|
});
|
|
580
575
|
}
|
|
581
|
-
return
|
|
576
|
+
return a;
|
|
582
577
|
}
|
|
583
|
-
function
|
|
584
|
-
for (const
|
|
585
|
-
const
|
|
586
|
-
|
|
578
|
+
function V(e, n) {
|
|
579
|
+
for (const t of Object.keys(e)) {
|
|
580
|
+
const a = e[t];
|
|
581
|
+
u(a) || Array.isArray(a) ? V(a, n) : n(t, a, e);
|
|
587
582
|
}
|
|
588
583
|
}
|
|
589
|
-
function
|
|
590
|
-
t
|
|
591
|
-
for (const
|
|
592
|
-
const
|
|
593
|
-
if (
|
|
594
|
-
const i =
|
|
595
|
-
|
|
584
|
+
function _(e, n, t = []) {
|
|
585
|
+
n(t, e);
|
|
586
|
+
for (const a of Object.keys(e)) {
|
|
587
|
+
const r = e[a];
|
|
588
|
+
if (u(r) || Array.isArray(r)) {
|
|
589
|
+
const i = t.concat(a);
|
|
590
|
+
_(r, n, i);
|
|
596
591
|
}
|
|
597
592
|
}
|
|
598
593
|
}
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
if (J) return L;
|
|
602
|
-
J = 1;
|
|
603
|
-
function e(t) {
|
|
604
|
-
return t == null;
|
|
605
|
-
}
|
|
606
|
-
return L = e, L;
|
|
607
|
-
}
|
|
608
|
-
var Ke = He();
|
|
609
|
-
const Q = /* @__PURE__ */ B(Ke);
|
|
610
|
-
var I = { exports: {} };
|
|
611
|
-
I.exports;
|
|
612
|
-
var Y;
|
|
613
|
-
function Xe() {
|
|
614
|
-
return Y || (Y = 1, function(e, t) {
|
|
615
|
-
var n = 9007199254740991, r = "[object Arguments]", o = "[object Function]", i = "[object GeneratorFunction]", c = "[object Map]", l = "[object Object]", h = "[object Promise]", f = "[object Set]", C = "[object WeakMap]", p = "[object DataView]", m = /[\\^$.*+?()[\]{}|]/g, u = /^\[object .+?Constructor\]$/, g = typeof P == "object" && P && P.Object === Object && P, ie = typeof self == "object" && self && self.Object === Object && self, R = g || ie || Function("return this")(), q = t && !t.nodeType && t, _ = q && !0 && e && !e.nodeType && e, ce = _ && _.exports === q;
|
|
616
|
-
function se(a, s) {
|
|
617
|
-
return a == null ? void 0 : a[s];
|
|
618
|
-
}
|
|
619
|
-
function me(a) {
|
|
620
|
-
var s = !1;
|
|
621
|
-
if (a != null && typeof a.toString != "function")
|
|
622
|
-
try {
|
|
623
|
-
s = !!(a + "");
|
|
624
|
-
} catch {
|
|
625
|
-
}
|
|
626
|
-
return s;
|
|
627
|
-
}
|
|
628
|
-
function ue(a, s) {
|
|
629
|
-
return function(d) {
|
|
630
|
-
return a(s(d));
|
|
631
|
-
};
|
|
632
|
-
}
|
|
633
|
-
var le = Function.prototype, A = Object.prototype, T = R["__core-js_shared__"], x = function() {
|
|
634
|
-
var a = /[^.]+$/.exec(T && T.keys && T.keys.IE_PROTO || "");
|
|
635
|
-
return a ? "Symbol(src)_1." + a : "";
|
|
636
|
-
}(), V = le.toString, E = A.hasOwnProperty, O = A.toString, fe = RegExp(
|
|
637
|
-
"^" + V.call(E).replace(m, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
|
|
638
|
-
), G = ce ? R.Buffer : void 0, U = A.propertyIsEnumerable, de = G ? G.isBuffer : void 0, pe = ue(Object.keys, Object), w = v(R, "DataView"), j = v(R, "Map"), M = v(R, "Promise"), D = v(R, "Set"), k = v(R, "WeakMap"), ge = !U.call({ valueOf: 1 }, "valueOf"), ye = S(w), he = S(j), Re = S(M), be = S(D), Se = S(k);
|
|
639
|
-
function Ce(a) {
|
|
640
|
-
return O.call(a);
|
|
641
|
-
}
|
|
642
|
-
function ve(a) {
|
|
643
|
-
if (!z(a) || Ie(a))
|
|
644
|
-
return !1;
|
|
645
|
-
var s = W(a) || me(a) ? fe : u;
|
|
646
|
-
return s.test(S(a));
|
|
647
|
-
}
|
|
648
|
-
function v(a, s) {
|
|
649
|
-
var d = se(a, s);
|
|
650
|
-
return ve(d) ? d : void 0;
|
|
651
|
-
}
|
|
652
|
-
var b = Ce;
|
|
653
|
-
(w && b(new w(new ArrayBuffer(1))) != p || j && b(new j()) != c || M && b(M.resolve()) != h || D && b(new D()) != f || k && b(new k()) != C) && (b = function(a) {
|
|
654
|
-
var s = O.call(a), d = s == l ? a.constructor : void 0, H = d ? S(d) : void 0;
|
|
655
|
-
if (H)
|
|
656
|
-
switch (H) {
|
|
657
|
-
case ye:
|
|
658
|
-
return p;
|
|
659
|
-
case he:
|
|
660
|
-
return c;
|
|
661
|
-
case Re:
|
|
662
|
-
return h;
|
|
663
|
-
case be:
|
|
664
|
-
return f;
|
|
665
|
-
case Se:
|
|
666
|
-
return C;
|
|
667
|
-
}
|
|
668
|
-
return s;
|
|
669
|
-
});
|
|
670
|
-
function Ie(a) {
|
|
671
|
-
return !!x && x in a;
|
|
672
|
-
}
|
|
673
|
-
function Ae(a) {
|
|
674
|
-
var s = a && a.constructor, d = typeof s == "function" && s.prototype || A;
|
|
675
|
-
return a === d;
|
|
676
|
-
}
|
|
677
|
-
function S(a) {
|
|
678
|
-
if (a != null) {
|
|
679
|
-
try {
|
|
680
|
-
return V.call(a);
|
|
681
|
-
} catch {
|
|
682
|
-
}
|
|
683
|
-
try {
|
|
684
|
-
return a + "";
|
|
685
|
-
} catch {
|
|
686
|
-
}
|
|
687
|
-
}
|
|
688
|
-
return "";
|
|
689
|
-
}
|
|
690
|
-
function Oe(a) {
|
|
691
|
-
return Te(a) && E.call(a, "callee") && (!U.call(a, "callee") || O.call(a) == r);
|
|
692
|
-
}
|
|
693
|
-
var Pe = Array.isArray;
|
|
694
|
-
function $(a) {
|
|
695
|
-
return a != null && je(a.length) && !W(a);
|
|
696
|
-
}
|
|
697
|
-
function Te(a) {
|
|
698
|
-
return Me(a) && $(a);
|
|
699
|
-
}
|
|
700
|
-
var Ee = de || De;
|
|
701
|
-
function we(a) {
|
|
702
|
-
if ($(a) && (Pe(a) || typeof a == "string" || typeof a.splice == "function" || Ee(a) || Oe(a)))
|
|
703
|
-
return !a.length;
|
|
704
|
-
var s = b(a);
|
|
705
|
-
if (s == c || s == f)
|
|
706
|
-
return !a.size;
|
|
707
|
-
if (ge || Ae(a))
|
|
708
|
-
return !pe(a).length;
|
|
709
|
-
for (var d in a)
|
|
710
|
-
if (E.call(a, d))
|
|
711
|
-
return !1;
|
|
712
|
-
return !0;
|
|
713
|
-
}
|
|
714
|
-
function W(a) {
|
|
715
|
-
var s = z(a) ? O.call(a) : "";
|
|
716
|
-
return s == o || s == i;
|
|
717
|
-
}
|
|
718
|
-
function je(a) {
|
|
719
|
-
return typeof a == "number" && a > -1 && a % 1 == 0 && a <= n;
|
|
720
|
-
}
|
|
721
|
-
function z(a) {
|
|
722
|
-
var s = typeof a;
|
|
723
|
-
return !!a && (s == "object" || s == "function");
|
|
724
|
-
}
|
|
725
|
-
function Me(a) {
|
|
726
|
-
return !!a && typeof a == "object";
|
|
727
|
-
}
|
|
728
|
-
function De() {
|
|
729
|
-
return !1;
|
|
730
|
-
}
|
|
731
|
-
e.exports = we;
|
|
732
|
-
}(I, I.exports)), I.exports;
|
|
594
|
+
function v(e) {
|
|
595
|
+
return e == null ? !0 : typeof e == "object" ? Array.isArray(e) ? e.length === 0 : e instanceof Map || e instanceof Set ? e.size === 0 : Object.keys(e).length === 0 : !1;
|
|
733
596
|
}
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
597
|
+
function A(e) {
|
|
598
|
+
return e == null;
|
|
599
|
+
}
|
|
600
|
+
function I(e, n, t, a = !1) {
|
|
601
|
+
if (v(n))
|
|
738
602
|
return e;
|
|
739
|
-
let
|
|
740
|
-
for (const i of
|
|
741
|
-
let
|
|
742
|
-
if (typeof i == "string"
|
|
743
|
-
|
|
744
|
-
c
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
603
|
+
let r = e;
|
|
604
|
+
for (const i of g(n)) {
|
|
605
|
+
let o = i, s;
|
|
606
|
+
if (typeof i == "string") {
|
|
607
|
+
const c = /^([^?]+)(\?)?$/.exec(i);
|
|
608
|
+
c && ([
|
|
609
|
+
,
|
|
610
|
+
o,
|
|
611
|
+
s
|
|
612
|
+
] = c);
|
|
613
|
+
}
|
|
614
|
+
if (r = r[o], A(r) && (s || a))
|
|
615
|
+
return t;
|
|
748
616
|
}
|
|
749
|
-
return
|
|
617
|
+
return A(r) ? t : r;
|
|
750
618
|
}
|
|
751
|
-
function
|
|
752
|
-
const
|
|
753
|
-
for (const
|
|
754
|
-
|
|
755
|
-
return
|
|
619
|
+
function ne(e, ...n) {
|
|
620
|
+
const t = new Set(n), a = {};
|
|
621
|
+
for (const r of Object.keys(e))
|
|
622
|
+
t.has(r) || (a[r] = e[r]);
|
|
623
|
+
return a;
|
|
756
624
|
}
|
|
757
|
-
function
|
|
625
|
+
function te(e, n, t) {
|
|
758
626
|
if (typeof e != "object")
|
|
759
627
|
throw new Error("object is required");
|
|
760
|
-
if (
|
|
628
|
+
if (v(n))
|
|
761
629
|
throw new Error("path is required");
|
|
762
|
-
const
|
|
630
|
+
const a = g(n), r = a.splice(a.length - 1, 1)[0];
|
|
763
631
|
let i = e;
|
|
764
|
-
for (const
|
|
765
|
-
if (i = i[
|
|
766
|
-
throw new Error(`Cannot set value at given path: Path deadends at ${String(
|
|
767
|
-
i[
|
|
632
|
+
for (const o of a)
|
|
633
|
+
if (i = i[o], typeof i != "object")
|
|
634
|
+
throw new Error(`Cannot set value at given path: Path deadends at ${String(o)}`);
|
|
635
|
+
i[r] = t;
|
|
768
636
|
}
|
|
769
|
-
function*
|
|
637
|
+
function* ae(e, n) {
|
|
770
638
|
yield e;
|
|
771
|
-
let
|
|
772
|
-
for (const
|
|
773
|
-
|
|
774
|
-
}
|
|
775
|
-
function
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
639
|
+
let t = e;
|
|
640
|
+
for (const a of g(n))
|
|
641
|
+
t = t[a], yield t;
|
|
642
|
+
}
|
|
643
|
+
function b(...e) {
|
|
644
|
+
var t;
|
|
645
|
+
const n = {};
|
|
646
|
+
for (const a of e)
|
|
647
|
+
for (const r of Object.keys(a))
|
|
648
|
+
Object.hasOwn(n, r) && ((t = Object.getOwnPropertyDescriptor(n, r)) == null ? void 0 : t.writable) !== void 0 && u(n[r]) ? n[r] = b(
|
|
649
|
+
n[r],
|
|
650
|
+
a[r]
|
|
651
|
+
) : u(a[r]) ? n[r] = b({}, a[r]) : n[r] = a[r];
|
|
652
|
+
return n;
|
|
653
|
+
}
|
|
654
|
+
const O = (e) => {
|
|
655
|
+
if (typeof e == "object" && e !== null) {
|
|
656
|
+
if (typeof Object.getPrototypeOf == "function") {
|
|
657
|
+
const n = Object.getPrototypeOf(e);
|
|
658
|
+
return n === Object.prototype || n === null;
|
|
659
|
+
}
|
|
660
|
+
return Object.prototype.toString.call(e) === "[object Object]";
|
|
661
|
+
}
|
|
662
|
+
return !1;
|
|
663
|
+
}, m = (...e) => e.reduce((n, t) => {
|
|
664
|
+
if (Array.isArray(t))
|
|
665
|
+
throw new TypeError("Arguments provided to ts-deepmerge must be objects, not arrays.");
|
|
666
|
+
return Object.keys(t).forEach((a) => {
|
|
667
|
+
["__proto__", "constructor", "prototype"].includes(a) || (Array.isArray(n[a]) && Array.isArray(t[a]) ? n[a] = m.options.mergeArrays ? m.options.uniqueArrayItems ? Array.from(new Set(n[a].concat(t[a]))) : [...n[a], ...t[a]] : t[a] : O(n[a]) && O(t[a]) ? n[a] = m(n[a], t[a]) : n[a] = t[a] === void 0 ? m.options.allowUndefinedOverrides ? t[a] : n[a] : t[a]);
|
|
668
|
+
}), n;
|
|
669
|
+
}, {}), p = {
|
|
670
|
+
allowUndefinedOverrides: !0,
|
|
671
|
+
mergeArrays: !0,
|
|
672
|
+
uniqueArrayItems: !0
|
|
673
|
+
};
|
|
674
|
+
m.options = p;
|
|
675
|
+
m.withOptions = (e, ...n) => {
|
|
676
|
+
m.options = Object.assign(Object.assign({}, p), e);
|
|
677
|
+
const t = m(...n);
|
|
678
|
+
return m.options = p, t;
|
|
679
|
+
};
|
|
680
|
+
function re(e) {
|
|
681
|
+
const n = [];
|
|
682
|
+
for (const t of Object.keys(e))
|
|
683
|
+
n.push(e[t]);
|
|
684
|
+
return n;
|
|
685
|
+
}
|
|
686
|
+
function ie(e, ...n) {
|
|
687
|
+
const t = e.reduce((r, i, o) => `${r}${o <= n.length ? String(n[o - 1]) : ""}${i}`), a = Math.min(
|
|
688
|
+
...t.split(/[\r\n]/).filter((r) => !!r.trim()).map((r) => {
|
|
689
|
+
const i = /^ */.exec(r);
|
|
690
|
+
return i ? i[0].length : 0;
|
|
691
|
+
})
|
|
798
692
|
);
|
|
799
|
-
return
|
|
693
|
+
return t.replace(new RegExp(`^ {${a}}`, "gm"), "").trim();
|
|
800
694
|
}
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
695
|
+
const x = 1024;
|
|
696
|
+
function oe(e) {
|
|
697
|
+
const n = /[A-Z]?B$/.exec(e);
|
|
698
|
+
if (!n)
|
|
804
699
|
throw new Error(
|
|
805
700
|
`Input to parseFileSize ("${e}") doesn't seem like a file size; cannot identify a unit (e.g. KB, GB)`
|
|
806
701
|
);
|
|
807
|
-
const [
|
|
808
|
-
if (Number.isNaN(
|
|
702
|
+
const [t] = n, a = Number(e.replace(t, ""));
|
|
703
|
+
if (Number.isNaN(a))
|
|
809
704
|
throw new Error(`Could not parse a number out of input to parseFileSize ("${e}")`);
|
|
810
|
-
const
|
|
705
|
+
const r = [
|
|
811
706
|
"B",
|
|
812
707
|
"KB",
|
|
813
708
|
"MB",
|
|
814
709
|
"GB",
|
|
815
710
|
"TB",
|
|
816
711
|
"PB"
|
|
817
|
-
].indexOf(
|
|
818
|
-
if (
|
|
712
|
+
].indexOf(t);
|
|
713
|
+
if (r === -1)
|
|
819
714
|
throw new Error("parseFileSize does not support units above PB");
|
|
820
|
-
return Math.ceil(
|
|
715
|
+
return Math.ceil(a * x ** r);
|
|
821
716
|
}
|
|
822
|
-
const
|
|
823
|
-
function
|
|
824
|
-
const
|
|
825
|
-
return
|
|
717
|
+
const P = /(<%=|{{)(.+?)(%>|}})/g, E = /<%\?(.+?)%>(.+?)<\/%>/g, T = Symbol("sps.utils.templateSrc");
|
|
718
|
+
function se(e) {
|
|
719
|
+
const n = (t) => e.replace(E, (a, r, i) => I(t, r.trim()) ? i : "").replace(P, (a, r, i) => I(t, i.trim(), ""));
|
|
720
|
+
return n[T] = e, n;
|
|
826
721
|
}
|
|
827
|
-
function
|
|
828
|
-
return typeof e == "string" && (
|
|
722
|
+
function ce(e) {
|
|
723
|
+
return typeof e == "string" && (P.test(e) || E.test(e));
|
|
829
724
|
}
|
|
830
|
-
function
|
|
831
|
-
return typeof e == "function" && Object.
|
|
725
|
+
function me(e) {
|
|
726
|
+
return typeof e == "function" && Object.hasOwn(e, T);
|
|
832
727
|
}
|
|
833
728
|
export {
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
729
|
+
z as CustomEvent,
|
|
730
|
+
B as DiffChange,
|
|
731
|
+
H as EDI_DOCUMENT_TYPE,
|
|
732
|
+
S as Op,
|
|
733
|
+
$ as castToNumber,
|
|
734
|
+
ie as code,
|
|
735
|
+
J as constrain,
|
|
736
|
+
ee as copyProperty,
|
|
737
|
+
g as crumblePath,
|
|
738
|
+
D as debounce,
|
|
739
|
+
K as debounced,
|
|
740
|
+
N as decimalRound,
|
|
741
|
+
k as deepFreeze,
|
|
742
|
+
q as diff,
|
|
743
|
+
M as flatten,
|
|
744
|
+
V as forEachEntryDeep,
|
|
745
|
+
_ as forEachNestedObject,
|
|
746
|
+
I as getPath,
|
|
747
|
+
U as isSubset,
|
|
748
|
+
ce as isTemplate,
|
|
749
|
+
me as isTemplateFn,
|
|
750
|
+
j as lockToAnimationFrames,
|
|
751
|
+
Q as lockedToAnimationFrames,
|
|
752
|
+
b as mergeDeep,
|
|
753
|
+
m as mergePropertiesDeep,
|
|
754
|
+
ne as omit,
|
|
755
|
+
G as onNextTick,
|
|
756
|
+
oe as parseFileSize,
|
|
757
|
+
W as range,
|
|
758
|
+
te as setPath,
|
|
759
|
+
X as simpleMetadataDecoratorApplicator,
|
|
760
|
+
se as template,
|
|
761
|
+
Y as tickDelay,
|
|
762
|
+
Z as toFileSizeString,
|
|
763
|
+
ae as traversePath,
|
|
764
|
+
re as values
|
|
870
765
|
};
|