@spscommerce/utils 6.13.1 → 7.0.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/lib/index.es.js
CHANGED
|
@@ -1,180 +1,109 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
if (k !== "default" && !(k in n)) {
|
|
21
|
-
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
22
|
-
Object.defineProperty(n, k, d.get ? d : {
|
|
23
|
-
enumerable: true,
|
|
24
|
-
get: function() {
|
|
25
|
-
return e[k];
|
|
26
|
-
}
|
|
27
|
-
});
|
|
28
|
-
}
|
|
29
|
-
});
|
|
30
|
-
});
|
|
31
|
-
return Object.freeze(n);
|
|
32
|
-
}
|
|
33
|
-
function flatten(arg) {
|
|
34
|
-
if (!Array.isArray(arg)) {
|
|
35
|
-
return arg;
|
|
36
|
-
}
|
|
37
|
-
return arg.reduce((acc, x) => acc.concat(flatten(x)), []);
|
|
38
|
-
}
|
|
39
|
-
function isSubset(candidate, array) {
|
|
40
|
-
const set = new Set(array);
|
|
41
|
-
for (const member of candidate) {
|
|
42
|
-
if (!set.has(member)) {
|
|
43
|
-
return false;
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
return true;
|
|
47
|
-
}
|
|
48
|
-
function resetDebouncedFn() {
|
|
49
|
-
this.pending = false;
|
|
50
|
-
if (typeof this.id === "number") {
|
|
51
|
-
clearTimeout(this.id);
|
|
52
|
-
delete this.id;
|
|
53
|
-
return true;
|
|
54
|
-
}
|
|
55
|
-
return false;
|
|
56
|
-
}
|
|
57
|
-
function debounce(functionToDebounce, milliseconds, thisArg) {
|
|
58
|
-
const debFn = function debouncedFn(...args) {
|
|
59
|
-
return new Promise((resolve, reject) => {
|
|
60
|
-
debFn.reset();
|
|
61
|
-
debFn.pending = true;
|
|
62
|
-
function executor() {
|
|
63
|
-
void (async () => {
|
|
1
|
+
function Me(e) {
|
|
2
|
+
return Array.isArray(e) ? e.reduce((t, n) => t.concat(Me(n)), []) : e;
|
|
3
|
+
}
|
|
4
|
+
function nt(e, t) {
|
|
5
|
+
const n = new Set(t);
|
|
6
|
+
for (const r of e)
|
|
7
|
+
if (!n.has(r))
|
|
8
|
+
return !1;
|
|
9
|
+
return !0;
|
|
10
|
+
}
|
|
11
|
+
function je() {
|
|
12
|
+
return this.pending = !1, typeof this.id < "u" ? (clearTimeout(this.id), delete this.id, !0) : !1;
|
|
13
|
+
}
|
|
14
|
+
function De(e, t, n) {
|
|
15
|
+
const r = function(...i) {
|
|
16
|
+
return new Promise((c, m) => {
|
|
17
|
+
r.reset(), r.pending = !0;
|
|
18
|
+
function h() {
|
|
19
|
+
(async () => {
|
|
64
20
|
try {
|
|
65
|
-
let
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
resolve(output);
|
|
70
|
-
} catch (err) {
|
|
71
|
-
reject(err);
|
|
21
|
+
let u = e.apply(n || this, i);
|
|
22
|
+
u instanceof Promise && (u = await u), c(u);
|
|
23
|
+
} catch (u) {
|
|
24
|
+
m(u);
|
|
72
25
|
} finally {
|
|
73
|
-
|
|
26
|
+
r.reset();
|
|
74
27
|
}
|
|
75
28
|
})();
|
|
76
29
|
}
|
|
77
|
-
|
|
30
|
+
r.id = window.setTimeout(h, t);
|
|
78
31
|
});
|
|
79
32
|
};
|
|
80
|
-
|
|
81
|
-
return debFn;
|
|
33
|
+
return r.reset = je.bind(r), r;
|
|
82
34
|
}
|
|
83
|
-
function
|
|
84
|
-
this.pending =
|
|
85
|
-
if (typeof this.id === "number") {
|
|
86
|
-
window.cancelAnimationFrame(this.id);
|
|
87
|
-
delete this.id;
|
|
88
|
-
return true;
|
|
89
|
-
}
|
|
90
|
-
return false;
|
|
35
|
+
function ke() {
|
|
36
|
+
return this.pending = !1, typeof this.id == "number" ? (window.cancelAnimationFrame(this.id), delete this.id, !0) : !1;
|
|
91
37
|
}
|
|
92
|
-
function
|
|
93
|
-
const
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
}
|
|
97
|
-
lockFn.id = window.requestAnimationFrame(() => {
|
|
98
|
-
if (functionToLock) {
|
|
99
|
-
functionToLock.apply(thisArg || this, args);
|
|
100
|
-
}
|
|
101
|
-
lockFn.reset();
|
|
102
|
-
});
|
|
103
|
-
lockFn.pending = true;
|
|
38
|
+
function Fe(e, t) {
|
|
39
|
+
const n = function(...o) {
|
|
40
|
+
n.pending && n.reset(), n.id = window.requestAnimationFrame(() => {
|
|
41
|
+
e && e.apply(t || this, o), n.reset();
|
|
42
|
+
}), n.pending = !0;
|
|
104
43
|
};
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
xor: (a, b) => (a || b) && !(a && b)
|
|
44
|
+
return n.pending = !1, n.reset = ke.bind(n), n;
|
|
45
|
+
}
|
|
46
|
+
function rt(e, t) {
|
|
47
|
+
const n = t ? e.bind(t) : e;
|
|
48
|
+
setTimeout(n, 0);
|
|
49
|
+
}
|
|
50
|
+
const W = {
|
|
51
|
+
// eslint-disable-next-line @typescript-eslint/restrict-plus-operands
|
|
52
|
+
add: (e, t) => e + t,
|
|
53
|
+
and: (e, t) => e && t,
|
|
54
|
+
band: (e, t) => e & t,
|
|
55
|
+
bor: (e, t) => e | t,
|
|
56
|
+
bxor: (e, t) => e ^ t,
|
|
57
|
+
bnot: (e) => ~e,
|
|
58
|
+
decr: (e) => e - 1,
|
|
59
|
+
div: (e, t) => e / t,
|
|
60
|
+
eq: (e, t) => e === t,
|
|
61
|
+
exp: (e, t) => e ** t,
|
|
62
|
+
gt: (e, t) => e > t,
|
|
63
|
+
gte: (e, t) => e >= t,
|
|
64
|
+
incr: (e) => e + 1,
|
|
65
|
+
lshift: (e, t) => e << t,
|
|
66
|
+
lt: (e, t) => e < t,
|
|
67
|
+
lte: (e, t) => e <= t,
|
|
68
|
+
mul: (e, t) => e * t,
|
|
69
|
+
neg: (e) => -e,
|
|
70
|
+
neq: (e, t) => e !== t,
|
|
71
|
+
not: (e) => !e,
|
|
72
|
+
or: (e, t) => e || t,
|
|
73
|
+
rem: (e, t) => e % t,
|
|
74
|
+
rshift: (e, t) => e >> t,
|
|
75
|
+
rshift_zf: (e, t) => e >>> t,
|
|
76
|
+
sub: (e, t) => e - t,
|
|
77
|
+
xor: (e, t) => (e || t) && !(e && t)
|
|
140
78
|
};
|
|
141
|
-
function
|
|
142
|
-
if (!Number.isInteger(
|
|
79
|
+
function at(e, t) {
|
|
80
|
+
if (!Number.isInteger(e))
|
|
143
81
|
throw new Error("start must be an integer");
|
|
144
|
-
|
|
145
|
-
if (!Number.isInteger(end)) {
|
|
82
|
+
if (!Number.isInteger(t))
|
|
146
83
|
throw new Error("end must be an integer");
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
for (const key of Object.keys(initDict)) {
|
|
159
|
-
if (key !== "bubbles" && key !== "cancelable") {
|
|
160
|
-
event[key] = initDict[key];
|
|
161
|
-
}
|
|
162
|
-
}
|
|
84
|
+
return new Array(Math.abs(t - e) + 1).fill(e).map(e > t ? W.sub : W.add);
|
|
85
|
+
}
|
|
86
|
+
class ot {
|
|
87
|
+
constructor(t, n = {}) {
|
|
88
|
+
let r;
|
|
89
|
+
if (typeof Event == "function")
|
|
90
|
+
r = new Event(t, n);
|
|
91
|
+
else {
|
|
92
|
+
r = document.createEvent("Event"), r.initEvent(t, n.bubbles, n.cancelable);
|
|
93
|
+
for (const i of Object.keys(n))
|
|
94
|
+
i !== "bubbles" && i !== "cancelable" && (r[i] = n[i]);
|
|
163
95
|
}
|
|
164
|
-
Object.setPrototypeOf(this,
|
|
165
|
-
const
|
|
166
|
-
for (const
|
|
167
|
-
const
|
|
168
|
-
for (const
|
|
169
|
-
|
|
170
|
-
descriptor[key] = descriptor[key].bind(event);
|
|
171
|
-
}
|
|
172
|
-
}
|
|
96
|
+
Object.setPrototypeOf(this, r);
|
|
97
|
+
const o = Object.getOwnPropertyDescriptors(Event.prototype);
|
|
98
|
+
for (const i of Object.keys(o)) {
|
|
99
|
+
const c = o[i];
|
|
100
|
+
for (const m of Object.keys(c))
|
|
101
|
+
typeof c[m] == "function" && (c[m] = c[m].bind(r));
|
|
173
102
|
}
|
|
174
|
-
Object.defineProperties(this,
|
|
103
|
+
Object.defineProperties(this, o);
|
|
175
104
|
}
|
|
176
105
|
}
|
|
177
|
-
const
|
|
106
|
+
const it = Object.freeze({
|
|
178
107
|
100: { name: "Insurance Plan Description" },
|
|
179
108
|
101: { name: "Name and Address Lists" },
|
|
180
109
|
104: { name: "Air Shipment Information" },
|
|
@@ -475,550 +404,452 @@ const EDI_DOCUMENT_TYPE = Object.freeze({
|
|
|
475
404
|
998: { name: "Set Cancellation" },
|
|
476
405
|
999: { name: "Implementation Acknowledgment" }
|
|
477
406
|
});
|
|
478
|
-
function
|
|
479
|
-
return (
|
|
480
|
-
const
|
|
481
|
-
Object.defineProperties(
|
|
482
|
-
[
|
|
483
|
-
enumerable:
|
|
484
|
-
configurable:
|
|
485
|
-
writable:
|
|
407
|
+
function ct() {
|
|
408
|
+
return (e, t) => {
|
|
409
|
+
const n = `_${String(t)}`;
|
|
410
|
+
Object.defineProperties(e, {
|
|
411
|
+
[n]: {
|
|
412
|
+
enumerable: !1,
|
|
413
|
+
configurable: !0,
|
|
414
|
+
writable: !0,
|
|
486
415
|
value: void 0
|
|
487
416
|
},
|
|
488
|
-
[
|
|
489
|
-
enumerable:
|
|
490
|
-
configurable:
|
|
417
|
+
[t]: {
|
|
418
|
+
enumerable: !0,
|
|
419
|
+
configurable: !0,
|
|
491
420
|
get() {
|
|
492
|
-
return this[
|
|
421
|
+
return this[n];
|
|
493
422
|
},
|
|
494
|
-
set(
|
|
495
|
-
this[
|
|
423
|
+
set(r) {
|
|
424
|
+
this[n] = Number(r);
|
|
496
425
|
}
|
|
497
426
|
}
|
|
498
427
|
});
|
|
499
428
|
};
|
|
500
429
|
}
|
|
501
|
-
function
|
|
502
|
-
return (
|
|
503
|
-
const
|
|
504
|
-
|
|
505
|
-
const
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
return newDescriptorWithDebounced.value;
|
|
509
|
-
};
|
|
510
|
-
originalDescriptorCopy.configurable = true;
|
|
511
|
-
delete originalDescriptorCopy.writable;
|
|
512
|
-
delete originalDescriptorCopy.value;
|
|
513
|
-
return originalDescriptorCopy;
|
|
514
|
-
};
|
|
515
|
-
}
|
|
516
|
-
function lockedToAnimationFrames(target, propertyKey, descriptor) {
|
|
517
|
-
const originalDescriptorCopy = __spreadValues({}, descriptor);
|
|
518
|
-
descriptor.get = function get() {
|
|
519
|
-
const newDescriptor = __spreadValues({}, originalDescriptorCopy);
|
|
520
|
-
newDescriptor.value = lockToAnimationFrames(originalDescriptorCopy.value, this);
|
|
521
|
-
Object.defineProperty(this, propertyKey, newDescriptor);
|
|
522
|
-
return newDescriptor.value;
|
|
430
|
+
function st(e) {
|
|
431
|
+
return (t, n, r) => {
|
|
432
|
+
const o = { ...r };
|
|
433
|
+
return o.get = function() {
|
|
434
|
+
const c = { ...o };
|
|
435
|
+
return c.value = De(o.value, e, this), Object.defineProperty(this, n, c), c.value;
|
|
436
|
+
}, o.configurable = !0, delete o.writable, delete o.value, o;
|
|
523
437
|
};
|
|
524
|
-
descriptor.configurable = true;
|
|
525
|
-
delete descriptor.writable;
|
|
526
|
-
delete descriptor.value;
|
|
527
|
-
return descriptor;
|
|
528
438
|
}
|
|
529
|
-
function
|
|
530
|
-
const
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
}
|
|
545
|
-
}
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
}
|
|
561
|
-
function
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
return range2[0];
|
|
578
|
-
}
|
|
579
|
-
if (n > range2[1]) {
|
|
580
|
-
return range2[1];
|
|
581
|
-
}
|
|
582
|
-
return n;
|
|
583
|
-
}
|
|
584
|
-
function decimalRound(num, decimalPlaces = 0) {
|
|
585
|
-
const integralAndFractionalSplit = String(num).split(".");
|
|
586
|
-
const allDecimalPlaces = integralAndFractionalSplit.length > 1 ? integralAndFractionalSplit[1].length : 0;
|
|
587
|
-
let roundedNum = num;
|
|
588
|
-
for (let i = allDecimalPlaces - 1; i >= decimalPlaces; i -= 1) {
|
|
589
|
-
roundedNum = Number(`${Math.round(Number(`${roundedNum}e${i}`))}e-${i}`);
|
|
590
|
-
}
|
|
591
|
-
return roundedNum;
|
|
592
|
-
}
|
|
593
|
-
function toFileSizeString(n, precision = 2) {
|
|
594
|
-
if (n > Number.MAX_SAFE_INTEGER) {
|
|
595
|
-
throw new Error("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.");
|
|
596
|
-
}
|
|
597
|
-
const magnitude = Math.min(Math.floor(Math.log(n) / Math.log(1024)), 5);
|
|
598
|
-
const unit = [
|
|
439
|
+
function mt(e, t, n) {
|
|
440
|
+
const r = { ...n };
|
|
441
|
+
return n.get = function() {
|
|
442
|
+
const i = { ...r };
|
|
443
|
+
return i.value = Fe(r.value, this), Object.defineProperty(this, t, i), i.value;
|
|
444
|
+
}, n.configurable = !0, delete n.writable, delete n.value, n;
|
|
445
|
+
}
|
|
446
|
+
function ut(e, t, n, r, o) {
|
|
447
|
+
const i = o || Object.getOwnPropertyDescriptor(n, r), c = i.get, { value: m } = i;
|
|
448
|
+
return i.get = function() {
|
|
449
|
+
const u = this, d = (m || c.call(this)).bind(this), b = { ...t, ...e };
|
|
450
|
+
for (const p of Object.keys(t))
|
|
451
|
+
typeof e[p] == "function" ? Object.defineProperty(d, p, {
|
|
452
|
+
get() {
|
|
453
|
+
return b[p](u);
|
|
454
|
+
}
|
|
455
|
+
}) : d[p] = b[p];
|
|
456
|
+
return Object.defineProperty(this, r, {
|
|
457
|
+
writable: !0,
|
|
458
|
+
configurable: !0,
|
|
459
|
+
enumerable: i.enumerable,
|
|
460
|
+
value: d
|
|
461
|
+
}), d;
|
|
462
|
+
}, delete i.value, delete i.writable, i;
|
|
463
|
+
}
|
|
464
|
+
function lt(e, t, n) {
|
|
465
|
+
const r = { ...n };
|
|
466
|
+
return r.get = function() {
|
|
467
|
+
const i = { ...r }, c = r.value.bind(this);
|
|
468
|
+
return i.value = () => setTimeout(c, 0), Object.defineProperty(this, t, i), i.value;
|
|
469
|
+
}, r.configurable = !0, delete r.writable, delete r.value, r;
|
|
470
|
+
}
|
|
471
|
+
function ft(e, t) {
|
|
472
|
+
return !e || e < t[0] ? t[0] : e > t[1] ? t[1] : e;
|
|
473
|
+
}
|
|
474
|
+
function Ne(e, t = 0) {
|
|
475
|
+
const n = String(e).split("."), r = n.length > 1 ? n[1].length : 0;
|
|
476
|
+
let o = e;
|
|
477
|
+
for (let i = r - 1; i >= t; i -= 1)
|
|
478
|
+
o = +`${Math.round(+`${o}e${i}`)}e-${i}`;
|
|
479
|
+
return o;
|
|
480
|
+
}
|
|
481
|
+
function dt(e, t = 2) {
|
|
482
|
+
if (e > Number.MAX_SAFE_INTEGER)
|
|
483
|
+
throw new Error(
|
|
484
|
+
"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
|
+
);
|
|
486
|
+
const n = Math.min(Math.floor(Math.log(e) / Math.log(1024)), 5), r = [
|
|
599
487
|
"B",
|
|
600
488
|
"KB",
|
|
601
489
|
"MB",
|
|
602
490
|
"GB",
|
|
603
491
|
"TB",
|
|
604
492
|
"PB"
|
|
605
|
-
][
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
493
|
+
][n], o = n ? t : 0;
|
|
494
|
+
return Ne(e / 1024 ** n, o).toFixed(o) + r;
|
|
495
|
+
}
|
|
496
|
+
function k(e) {
|
|
497
|
+
return typeof e == "string" ? e.match(/[^.[\]]+/g) || [] : [].concat(e);
|
|
498
|
+
}
|
|
499
|
+
function Le(e, t, n) {
|
|
500
|
+
Object.defineProperty(
|
|
501
|
+
n,
|
|
502
|
+
e,
|
|
503
|
+
Object.getOwnPropertyDescriptor(t, e)
|
|
504
|
+
);
|
|
505
|
+
}
|
|
506
|
+
var I = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
|
|
507
|
+
function F(e) {
|
|
508
|
+
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
509
|
+
}
|
|
510
|
+
var Be = "[object Object]";
|
|
511
|
+
function qe(e) {
|
|
512
|
+
var t = !1;
|
|
513
|
+
if (e != null && typeof e.toString != "function")
|
|
620
514
|
try {
|
|
621
|
-
|
|
622
|
-
} catch
|
|
515
|
+
t = !!(e + "");
|
|
516
|
+
} catch {
|
|
623
517
|
}
|
|
624
|
-
|
|
625
|
-
return result;
|
|
518
|
+
return t;
|
|
626
519
|
}
|
|
627
|
-
function
|
|
628
|
-
return function(
|
|
629
|
-
return
|
|
520
|
+
function xe(e, t) {
|
|
521
|
+
return function(n) {
|
|
522
|
+
return e(t(n));
|
|
630
523
|
};
|
|
631
524
|
}
|
|
632
|
-
var
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
525
|
+
var Ve = Function.prototype, J = Object.prototype, Q = Ve.toString, _e = J.hasOwnProperty, Ge = Q.call(Object), $e = J.toString, Ue = xe(Object.getPrototypeOf, Object);
|
|
526
|
+
function We(e) {
|
|
527
|
+
return !!e && typeof e == "object";
|
|
528
|
+
}
|
|
529
|
+
function ze(e) {
|
|
530
|
+
if (!We(e) || $e.call(e) != Be || qe(e))
|
|
531
|
+
return !1;
|
|
532
|
+
var t = Ue(e);
|
|
533
|
+
if (t === null)
|
|
534
|
+
return !0;
|
|
535
|
+
var n = _e.call(t, "constructor") && t.constructor;
|
|
536
|
+
return typeof n == "function" && n instanceof n && Q.call(n) == Ge;
|
|
537
|
+
}
|
|
538
|
+
var He = ze;
|
|
539
|
+
const f = /* @__PURE__ */ F(He);
|
|
540
|
+
function Ke(e) {
|
|
541
|
+
Object.freeze(e);
|
|
542
|
+
for (const t of Object.keys(e)) {
|
|
543
|
+
const n = e[t];
|
|
544
|
+
(f(n) || Array.isArray(n)) && Ke(n);
|
|
545
|
+
}
|
|
546
|
+
}
|
|
547
|
+
var Xe = /* @__PURE__ */ ((e) => (e[e.ADDITION = 0] = "ADDITION", e[e.DELETION = 1] = "DELETION", e[e.ALTERATION = 2] = "ALTERATION", e))(Xe || {});
|
|
548
|
+
function Je(e, t, n = []) {
|
|
549
|
+
let r = [];
|
|
550
|
+
for (const o of /* @__PURE__ */ new Set([...Object.keys(e), ...Object.keys(t)])) {
|
|
551
|
+
const i = Object.prototype.hasOwnProperty.call(e, o), c = Object.prototype.hasOwnProperty.call(t, o);
|
|
552
|
+
i && !c ? r.push({
|
|
553
|
+
type: 1,
|
|
554
|
+
key: o,
|
|
555
|
+
parentPath: n,
|
|
556
|
+
objects: [e, t]
|
|
557
|
+
}) : !i && c ? r.push({
|
|
558
|
+
type: 0,
|
|
559
|
+
key: o,
|
|
560
|
+
parentPath: n,
|
|
561
|
+
objects: [e, t]
|
|
562
|
+
}) : f(e[o]) && f(t[o]) || Array.isArray(e[o]) && Array.isArray(t[o]) ? r = r.concat(
|
|
563
|
+
Je(
|
|
564
|
+
e[o],
|
|
565
|
+
t[o],
|
|
566
|
+
[...n, o]
|
|
567
|
+
)
|
|
568
|
+
) : e[o] !== t[o] && r.push({
|
|
569
|
+
type: 2,
|
|
570
|
+
key: o,
|
|
571
|
+
parentPath: n,
|
|
572
|
+
objects: [e, t]
|
|
573
|
+
});
|
|
648
574
|
}
|
|
649
|
-
|
|
650
|
-
return typeof Ctor == "function" && Ctor instanceof Ctor && funcToString.call(Ctor) == objectCtorString;
|
|
575
|
+
return r;
|
|
651
576
|
}
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
const val = obj[key];
|
|
657
|
-
if (lodash_isplainobject(val) || Array.isArray(val)) {
|
|
658
|
-
deepFreeze(val);
|
|
659
|
-
}
|
|
577
|
+
function Qe(e, t) {
|
|
578
|
+
for (const n of Object.keys(e)) {
|
|
579
|
+
const r = e[n];
|
|
580
|
+
f(r) || Array.isArray(r) ? Qe(r, t) : t(n, r, e);
|
|
660
581
|
}
|
|
661
582
|
}
|
|
662
|
-
|
|
663
|
-
(
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
let d = [];
|
|
670
|
-
for (const key of new Set([...Object.keys(o1), ...Object.keys(o2)])) {
|
|
671
|
-
const o1HasKey = Object.prototype.hasOwnProperty.call(o1, key);
|
|
672
|
-
const o2HasKey = Object.prototype.hasOwnProperty.call(o2, key);
|
|
673
|
-
if (o1HasKey && !o2HasKey) {
|
|
674
|
-
d.push({
|
|
675
|
-
type: 1,
|
|
676
|
-
key,
|
|
677
|
-
parentPath,
|
|
678
|
-
objects: [o1, o2]
|
|
679
|
-
});
|
|
680
|
-
} else if (!o1HasKey && o2HasKey) {
|
|
681
|
-
d.push({
|
|
682
|
-
type: 0,
|
|
683
|
-
key,
|
|
684
|
-
parentPath,
|
|
685
|
-
objects: [o1, o2]
|
|
686
|
-
});
|
|
687
|
-
} else if (lodash_isplainobject(o1[key]) && lodash_isplainobject(o2[key]) || Array.isArray(o1[key]) && Array.isArray(o2[key])) {
|
|
688
|
-
d = d.concat(diff(o1[key], o2[key], [...parentPath, key]));
|
|
689
|
-
} else if (o1[key] !== o2[key]) {
|
|
690
|
-
d.push({
|
|
691
|
-
type: 2,
|
|
692
|
-
key,
|
|
693
|
-
parentPath,
|
|
694
|
-
objects: [o1, o2]
|
|
695
|
-
});
|
|
583
|
+
function Ye(e, t, n = []) {
|
|
584
|
+
t(n, e);
|
|
585
|
+
for (const r of Object.keys(e)) {
|
|
586
|
+
const o = e[r];
|
|
587
|
+
if (f(o) || Array.isArray(o)) {
|
|
588
|
+
const i = n.concat(r);
|
|
589
|
+
Ye(o, t, i);
|
|
696
590
|
}
|
|
697
591
|
}
|
|
698
|
-
return d;
|
|
699
592
|
}
|
|
700
|
-
function
|
|
701
|
-
|
|
702
|
-
const value = object[key];
|
|
703
|
-
if (lodash_isplainobject(value) || Array.isArray(value)) {
|
|
704
|
-
forEachEntryDeep(value, fn);
|
|
705
|
-
} else {
|
|
706
|
-
fn(key, value, object);
|
|
707
|
-
}
|
|
708
|
-
}
|
|
593
|
+
function Ze(e) {
|
|
594
|
+
return e == null;
|
|
709
595
|
}
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
596
|
+
var et = Ze;
|
|
597
|
+
const z = /* @__PURE__ */ F(et);
|
|
598
|
+
var A = { exports: {} };
|
|
599
|
+
A.exports;
|
|
600
|
+
(function(e, t) {
|
|
601
|
+
var n = 9007199254740991, r = "[object Arguments]", o = "[object Function]", i = "[object GeneratorFunction]", c = "[object Map]", m = "[object Object]", h = "[object Promise]", u = "[object Set]", O = "[object WeakMap]", d = "[object DataView]", b = /[\\^$.*+?()[\]{}|]/g, p = /^\[object .+?Constructor\]$/, ne = typeof I == "object" && I && I.Object === Object && I, re = typeof self == "object" && self && self.Object === Object && self, g = ne || re || Function("return this")(), N = t && !t.nodeType && t, L = N && !0 && e && !e.nodeType && e, ae = L && L.exports === N;
|
|
602
|
+
function oe(a, s) {
|
|
603
|
+
return a == null ? void 0 : a[s];
|
|
718
604
|
}
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
}
|
|
723
|
-
var lodash_isnil = isNil$1;
|
|
724
|
-
var isNilImport = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ _mergeNamespaces({
|
|
725
|
-
__proto__: null,
|
|
726
|
-
[Symbol.toStringTag]: "Module",
|
|
727
|
-
"default": lodash_isnil
|
|
728
|
-
}, [lodash_isnil]));
|
|
729
|
-
var lodash_isempty$1 = { exports: {} };
|
|
730
|
-
(function(module, exports) {
|
|
731
|
-
var MAX_SAFE_INTEGER = 9007199254740991;
|
|
732
|
-
var argsTag = "[object Arguments]", funcTag = "[object Function]", genTag = "[object GeneratorFunction]", mapTag = "[object Map]", objectTag2 = "[object Object]", promiseTag = "[object Promise]", setTag = "[object Set]", weakMapTag = "[object WeakMap]";
|
|
733
|
-
var dataViewTag = "[object DataView]";
|
|
734
|
-
var reRegExpChar = /[\\^$.*+?()[\]{}|]/g;
|
|
735
|
-
var reIsHostCtor = /^\[object .+?Constructor\]$/;
|
|
736
|
-
var freeGlobal = typeof commonjsGlobal == "object" && commonjsGlobal && commonjsGlobal.Object === Object && commonjsGlobal;
|
|
737
|
-
var freeSelf = typeof self == "object" && self && self.Object === Object && self;
|
|
738
|
-
var root = freeGlobal || freeSelf || Function("return this")();
|
|
739
|
-
var freeExports = exports && !exports.nodeType && exports;
|
|
740
|
-
var freeModule = freeExports && true && module && !module.nodeType && module;
|
|
741
|
-
var moduleExports = freeModule && freeModule.exports === freeExports;
|
|
742
|
-
function getValue(object, key) {
|
|
743
|
-
return object == null ? void 0 : object[key];
|
|
744
|
-
}
|
|
745
|
-
function isHostObject2(value) {
|
|
746
|
-
var result = false;
|
|
747
|
-
if (value != null && typeof value.toString != "function") {
|
|
605
|
+
function ie(a) {
|
|
606
|
+
var s = !1;
|
|
607
|
+
if (a != null && typeof a.toString != "function")
|
|
748
608
|
try {
|
|
749
|
-
|
|
750
|
-
} catch
|
|
609
|
+
s = !!(a + "");
|
|
610
|
+
} catch {
|
|
751
611
|
}
|
|
752
|
-
|
|
753
|
-
return result;
|
|
612
|
+
return s;
|
|
754
613
|
}
|
|
755
|
-
function
|
|
756
|
-
return function(
|
|
757
|
-
return
|
|
614
|
+
function ce(a, s) {
|
|
615
|
+
return function(l) {
|
|
616
|
+
return a(s(l));
|
|
758
617
|
};
|
|
759
618
|
}
|
|
760
|
-
var
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
}();
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
function
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
switch (ctorString) {
|
|
795
|
-
case dataViewCtorString:
|
|
796
|
-
return dataViewTag;
|
|
797
|
-
case mapCtorString:
|
|
798
|
-
return mapTag;
|
|
799
|
-
case promiseCtorString:
|
|
800
|
-
return promiseTag;
|
|
801
|
-
case setCtorString:
|
|
802
|
-
return setTag;
|
|
803
|
-
case weakMapCtorString:
|
|
804
|
-
return weakMapTag;
|
|
805
|
-
}
|
|
619
|
+
var se = Function.prototype, C = Object.prototype, P = g["__core-js_shared__"], B = function() {
|
|
620
|
+
var a = /[^.]+$/.exec(P && P.keys && P.keys.IE_PROTO || "");
|
|
621
|
+
return a ? "Symbol(src)_1." + a : "";
|
|
622
|
+
}(), q = se.toString, T = C.hasOwnProperty, v = C.toString, me = RegExp(
|
|
623
|
+
"^" + q.call(T).replace(b, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
|
|
624
|
+
), x = ae ? g.Buffer : void 0, V = C.propertyIsEnumerable, ue = x ? x.isBuffer : void 0, le = ce(Object.keys, Object), E = S(g, "DataView"), w = S(g, "Map"), M = S(g, "Promise"), j = S(g, "Set"), D = S(g, "WeakMap"), fe = !V.call({ valueOf: 1 }, "valueOf"), de = R(E), pe = R(w), ge = R(M), ye = R(j), Re = R(D);
|
|
625
|
+
function he(a) {
|
|
626
|
+
return v.call(a);
|
|
627
|
+
}
|
|
628
|
+
function Se(a) {
|
|
629
|
+
if (!$(a) || be(a))
|
|
630
|
+
return !1;
|
|
631
|
+
var s = G(a) || ie(a) ? me : p;
|
|
632
|
+
return s.test(R(a));
|
|
633
|
+
}
|
|
634
|
+
function S(a, s) {
|
|
635
|
+
var l = oe(a, s);
|
|
636
|
+
return Se(l) ? l : void 0;
|
|
637
|
+
}
|
|
638
|
+
var y = he;
|
|
639
|
+
(E && y(new E(new ArrayBuffer(1))) != d || w && y(new w()) != c || M && y(M.resolve()) != h || j && y(new j()) != u || D && y(new D()) != O) && (y = function(a) {
|
|
640
|
+
var s = v.call(a), l = s == m ? a.constructor : void 0, U = l ? R(l) : void 0;
|
|
641
|
+
if (U)
|
|
642
|
+
switch (U) {
|
|
643
|
+
case de:
|
|
644
|
+
return d;
|
|
645
|
+
case pe:
|
|
646
|
+
return c;
|
|
647
|
+
case ge:
|
|
648
|
+
return h;
|
|
649
|
+
case ye:
|
|
650
|
+
return u;
|
|
651
|
+
case Re:
|
|
652
|
+
return O;
|
|
806
653
|
}
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
return !!maskSrcKey && maskSrcKey in func;
|
|
654
|
+
return s;
|
|
655
|
+
});
|
|
656
|
+
function be(a) {
|
|
657
|
+
return !!B && B in a;
|
|
812
658
|
}
|
|
813
|
-
function
|
|
814
|
-
var
|
|
815
|
-
return
|
|
659
|
+
function Ce(a) {
|
|
660
|
+
var s = a && a.constructor, l = typeof s == "function" && s.prototype || C;
|
|
661
|
+
return a === l;
|
|
816
662
|
}
|
|
817
|
-
function
|
|
818
|
-
if (
|
|
663
|
+
function R(a) {
|
|
664
|
+
if (a != null) {
|
|
819
665
|
try {
|
|
820
|
-
return
|
|
821
|
-
} catch
|
|
666
|
+
return q.call(a);
|
|
667
|
+
} catch {
|
|
822
668
|
}
|
|
823
669
|
try {
|
|
824
|
-
return
|
|
825
|
-
} catch
|
|
670
|
+
return a + "";
|
|
671
|
+
} catch {
|
|
826
672
|
}
|
|
827
673
|
}
|
|
828
674
|
return "";
|
|
829
675
|
}
|
|
830
|
-
function
|
|
831
|
-
return
|
|
832
|
-
}
|
|
833
|
-
var
|
|
834
|
-
function
|
|
835
|
-
return
|
|
836
|
-
}
|
|
837
|
-
function
|
|
838
|
-
return
|
|
839
|
-
}
|
|
840
|
-
var
|
|
841
|
-
function
|
|
842
|
-
if (
|
|
843
|
-
return !
|
|
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
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
optional
|
|
899
|
-
] = /^([^?]+)(\?)?$/.exec(crumb);
|
|
900
|
-
}
|
|
901
|
-
value = value[key];
|
|
902
|
-
if (isNil(value) && (optional || allOptional)) {
|
|
903
|
-
return defaultValue;
|
|
904
|
-
}
|
|
905
|
-
}
|
|
906
|
-
return isNil(value) ? defaultValue : value;
|
|
907
|
-
}
|
|
908
|
-
function omit(obj, ...keys) {
|
|
909
|
-
const keySet = new Set(keys);
|
|
910
|
-
const result = {};
|
|
911
|
-
for (const k of Object.keys(obj)) {
|
|
912
|
-
if (!keySet.has(k)) {
|
|
913
|
-
result[k] = obj[k];
|
|
914
|
-
}
|
|
915
|
-
}
|
|
916
|
-
return result;
|
|
917
|
-
}
|
|
918
|
-
const isEmpty = lodash_isempty || isEmptyImport;
|
|
919
|
-
function setPath(object, path, newValue) {
|
|
920
|
-
if (typeof object !== "object") {
|
|
676
|
+
function ve(a) {
|
|
677
|
+
return Ae(a) && T.call(a, "callee") && (!V.call(a, "callee") || v.call(a) == r);
|
|
678
|
+
}
|
|
679
|
+
var Ie = Array.isArray;
|
|
680
|
+
function _(a) {
|
|
681
|
+
return a != null && Te(a.length) && !G(a);
|
|
682
|
+
}
|
|
683
|
+
function Ae(a) {
|
|
684
|
+
return Ee(a) && _(a);
|
|
685
|
+
}
|
|
686
|
+
var Oe = ue || we;
|
|
687
|
+
function Pe(a) {
|
|
688
|
+
if (_(a) && (Ie(a) || typeof a == "string" || typeof a.splice == "function" || Oe(a) || ve(a)))
|
|
689
|
+
return !a.length;
|
|
690
|
+
var s = y(a);
|
|
691
|
+
if (s == c || s == u)
|
|
692
|
+
return !a.size;
|
|
693
|
+
if (fe || Ce(a))
|
|
694
|
+
return !le(a).length;
|
|
695
|
+
for (var l in a)
|
|
696
|
+
if (T.call(a, l))
|
|
697
|
+
return !1;
|
|
698
|
+
return !0;
|
|
699
|
+
}
|
|
700
|
+
function G(a) {
|
|
701
|
+
var s = $(a) ? v.call(a) : "";
|
|
702
|
+
return s == o || s == i;
|
|
703
|
+
}
|
|
704
|
+
function Te(a) {
|
|
705
|
+
return typeof a == "number" && a > -1 && a % 1 == 0 && a <= n;
|
|
706
|
+
}
|
|
707
|
+
function $(a) {
|
|
708
|
+
var s = typeof a;
|
|
709
|
+
return !!a && (s == "object" || s == "function");
|
|
710
|
+
}
|
|
711
|
+
function Ee(a) {
|
|
712
|
+
return !!a && typeof a == "object";
|
|
713
|
+
}
|
|
714
|
+
function we() {
|
|
715
|
+
return !1;
|
|
716
|
+
}
|
|
717
|
+
e.exports = Pe;
|
|
718
|
+
})(A, A.exports);
|
|
719
|
+
var tt = A.exports;
|
|
720
|
+
const Y = /* @__PURE__ */ F(tt);
|
|
721
|
+
function H(e, t, n, r = !1) {
|
|
722
|
+
if (Y(t))
|
|
723
|
+
return e;
|
|
724
|
+
let o = e;
|
|
725
|
+
for (const i of k(t)) {
|
|
726
|
+
let c = i, m;
|
|
727
|
+
if (typeof i == "string" && ([
|
|
728
|
+
,
|
|
729
|
+
c,
|
|
730
|
+
m
|
|
731
|
+
] = /^([^?]+)(\?)?$/.exec(i)), o = o[c], z(o) && (m || r))
|
|
732
|
+
return n;
|
|
733
|
+
}
|
|
734
|
+
return z(o) ? n : o;
|
|
735
|
+
}
|
|
736
|
+
function pt(e, ...t) {
|
|
737
|
+
const n = new Set(t), r = {};
|
|
738
|
+
for (const o of Object.keys(e))
|
|
739
|
+
n.has(o) || (r[o] = e[o]);
|
|
740
|
+
return r;
|
|
741
|
+
}
|
|
742
|
+
function gt(e, t, n) {
|
|
743
|
+
if (typeof e != "object")
|
|
921
744
|
throw new Error("object is required");
|
|
922
|
-
|
|
923
|
-
if (isEmpty(path)) {
|
|
745
|
+
if (Y(t))
|
|
924
746
|
throw new Error("path is required");
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
for (const
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
}
|
|
945
|
-
function
|
|
946
|
-
const
|
|
947
|
-
for (const
|
|
948
|
-
for (const
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
}
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
}
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
}
|
|
975
|
-
function values(object) {
|
|
976
|
-
const vals = [];
|
|
977
|
-
for (const key of Object.keys(object)) {
|
|
978
|
-
vals.push(object[key]);
|
|
979
|
-
}
|
|
980
|
-
return vals;
|
|
981
|
-
}
|
|
982
|
-
function code(strings, ...interpolations) {
|
|
983
|
-
const s = strings.reduce((a, b, i) => `${a}${i <= interpolations.length ? String(interpolations[i - 1]) : ""}${b}`);
|
|
984
|
-
const leadingWhitespace = Math.min(...s.split(/[\r\n]/).filter((l) => l.trim()).map((l) => /^ */.exec(l)[0].length));
|
|
985
|
-
return s.replace(new RegExp(`^ {${leadingWhitespace}}`, "gm"), "").trim();
|
|
986
|
-
}
|
|
987
|
-
function parseFileSize(fileSize) {
|
|
988
|
-
const unitMatch = /[A-Z]?B$/.exec(fileSize);
|
|
989
|
-
if (!unitMatch) {
|
|
990
|
-
throw new Error(`Input to parseFileSize ("${fileSize}") doesn't seem like a file size; cannot identify a unit (e.g. KB, GB)`);
|
|
991
|
-
}
|
|
992
|
-
const [unit] = unitMatch;
|
|
993
|
-
const num = Number(fileSize.replace(unit, ""));
|
|
994
|
-
if (Number.isNaN(num)) {
|
|
995
|
-
throw new Error(`Could not parse a number out of input to parseFileSize ("${fileSize}")`);
|
|
996
|
-
}
|
|
997
|
-
const magnitude = [
|
|
747
|
+
const r = k(t), o = r.splice(r.length - 1, 1)[0];
|
|
748
|
+
let i = e;
|
|
749
|
+
for (const c of r)
|
|
750
|
+
if (i = i[c], typeof i != "object")
|
|
751
|
+
throw new Error(`Cannot set value at given path: Path deadends at ${String(c)}`);
|
|
752
|
+
i[o] = n;
|
|
753
|
+
}
|
|
754
|
+
function* yt(e, t) {
|
|
755
|
+
yield e;
|
|
756
|
+
let n = e;
|
|
757
|
+
for (const r of k(t))
|
|
758
|
+
n = n[r], yield n;
|
|
759
|
+
}
|
|
760
|
+
function K(...e) {
|
|
761
|
+
const t = {};
|
|
762
|
+
for (const n of e)
|
|
763
|
+
for (const r of Object.keys(n))
|
|
764
|
+
Object.prototype.hasOwnProperty.call(t, r) && Object.getOwnPropertyDescriptor(t, r).writable && f(t[r]) ? t[r] = K(t[r], n[r]) : f(n[r]) ? t[r] = K({}, n[r]) : t[r] = n[r];
|
|
765
|
+
return t;
|
|
766
|
+
}
|
|
767
|
+
function X(...e) {
|
|
768
|
+
const t = {};
|
|
769
|
+
for (const n of e)
|
|
770
|
+
for (const r of Object.keys(n))
|
|
771
|
+
Object.prototype.hasOwnProperty.call(t, r) && Object.getOwnPropertyDescriptor(t, r).writable && f(t[r]) ? t[r] = X(t[r], n[r]) : f(n[r]) ? t[r] = X({}, n[r]) : Le(r, n, t);
|
|
772
|
+
return t;
|
|
773
|
+
}
|
|
774
|
+
function Rt(e) {
|
|
775
|
+
const t = [];
|
|
776
|
+
for (const n of Object.keys(e))
|
|
777
|
+
t.push(e[n]);
|
|
778
|
+
return t;
|
|
779
|
+
}
|
|
780
|
+
function ht(e, ...t) {
|
|
781
|
+
const n = e.reduce((o, i, c) => `${o}${c <= t.length ? String(t[c - 1]) : ""}${i}`), r = Math.min(
|
|
782
|
+
...n.split(/[\r\n]/).filter((o) => o.trim()).map((o) => /^ */.exec(o)[0].length)
|
|
783
|
+
);
|
|
784
|
+
return n.replace(new RegExp(`^ {${r}}`, "gm"), "").trim();
|
|
785
|
+
}
|
|
786
|
+
function St(e) {
|
|
787
|
+
const t = /[A-Z]?B$/.exec(e);
|
|
788
|
+
if (!t)
|
|
789
|
+
throw new Error(
|
|
790
|
+
`Input to parseFileSize ("${e}") doesn't seem like a file size; cannot identify a unit (e.g. KB, GB)`
|
|
791
|
+
);
|
|
792
|
+
const [n] = t, r = Number(e.replace(n, ""));
|
|
793
|
+
if (Number.isNaN(r))
|
|
794
|
+
throw new Error(`Could not parse a number out of input to parseFileSize ("${e}")`);
|
|
795
|
+
const o = [
|
|
998
796
|
"B",
|
|
999
797
|
"KB",
|
|
1000
798
|
"MB",
|
|
1001
799
|
"GB",
|
|
1002
800
|
"TB",
|
|
1003
801
|
"PB"
|
|
1004
|
-
].indexOf(
|
|
1005
|
-
if (
|
|
802
|
+
].indexOf(n);
|
|
803
|
+
if (o === -1)
|
|
1006
804
|
throw new Error("parseFileSize does not support units above PB");
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
}
|
|
1010
|
-
|
|
1011
|
-
const
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
function
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
805
|
+
return Math.ceil(r * 1024 ** o);
|
|
806
|
+
}
|
|
807
|
+
const Z = /(<%=|{{)(.+?)(%>|}})/g, ee = /<%\?(.+?)%>(.+?)<\/%>/g, te = Symbol("sps.utils.templateSrc");
|
|
808
|
+
function bt(e) {
|
|
809
|
+
const t = (n) => e.replace(ee, (r, o, i) => H(n, o.trim()) ? i : "").replace(Z, (r, o, i) => H(n, i.trim(), ""));
|
|
810
|
+
return t[te] = e, t;
|
|
811
|
+
}
|
|
812
|
+
function Ct(e) {
|
|
813
|
+
return typeof e == "string" && (Z.test(e) || ee.test(e));
|
|
814
|
+
}
|
|
815
|
+
function vt(e) {
|
|
816
|
+
return typeof e == "function" && Object.prototype.hasOwnProperty.call(e, te);
|
|
817
|
+
}
|
|
818
|
+
export {
|
|
819
|
+
ot as CustomEvent,
|
|
820
|
+
Xe as DiffChange,
|
|
821
|
+
it as EDI_DOCUMENT_TYPE,
|
|
822
|
+
W as Op,
|
|
823
|
+
ct as castToNumber,
|
|
824
|
+
ht as code,
|
|
825
|
+
ft as constrain,
|
|
826
|
+
Le as copyProperty,
|
|
827
|
+
k as crumblePath,
|
|
828
|
+
De as debounce,
|
|
829
|
+
st as debounced,
|
|
830
|
+
Ne as decimalRound,
|
|
831
|
+
Ke as deepFreeze,
|
|
832
|
+
Je as diff,
|
|
833
|
+
Me as flatten,
|
|
834
|
+
Qe as forEachEntryDeep,
|
|
835
|
+
Ye as forEachNestedObject,
|
|
836
|
+
H as getPath,
|
|
837
|
+
nt as isSubset,
|
|
838
|
+
Ct as isTemplate,
|
|
839
|
+
vt as isTemplateFn,
|
|
840
|
+
Fe as lockToAnimationFrames,
|
|
841
|
+
mt as lockedToAnimationFrames,
|
|
842
|
+
K as mergeDeep,
|
|
843
|
+
X as mergePropertiesDeep,
|
|
844
|
+
pt as omit,
|
|
845
|
+
rt as onNextTick,
|
|
846
|
+
St as parseFileSize,
|
|
847
|
+
at as range,
|
|
848
|
+
gt as setPath,
|
|
849
|
+
ut as simpleMetadataDecoratorApplicator,
|
|
850
|
+
bt as template,
|
|
851
|
+
lt as tickDelay,
|
|
852
|
+
dt as toFileSizeString,
|
|
853
|
+
yt as traversePath,
|
|
854
|
+
Rt as values
|
|
855
|
+
};
|