@spscommerce/utils 5.2.2-ie → 5.2.5
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.cjs.js +1 -2437
- package/lib/index.es.js +893 -2268
- package/package.json +5 -5
- package/vite.config.js +1 -1
- package/.pnpm-debug.log +0 -20
- package/dist/out-tsc/array/flatten.d.ts +0 -1
- package/dist/out-tsc/array/flatten.js +0 -7
- package/dist/out-tsc/array/flatten.js.map +0 -1
- package/dist/out-tsc/array/flatten.spec.d.ts +0 -1
- package/dist/out-tsc/array/flatten.spec.js +0 -10
- package/dist/out-tsc/array/flatten.spec.js.map +0 -1
- package/dist/out-tsc/array/index.d.ts +0 -3
- package/dist/out-tsc/array/index.js +0 -4
- package/dist/out-tsc/array/index.js.map +0 -1
- package/dist/out-tsc/array/is-subset.d.ts +0 -4
- package/dist/out-tsc/array/is-subset.js +0 -41
- package/dist/out-tsc/array/is-subset.js.map +0 -1
- package/dist/out-tsc/array/is-subset.spec.d.ts +0 -1
- package/dist/out-tsc/array/is-subset.spec.js +0 -41
- package/dist/out-tsc/array/is-subset.spec.js.map +0 -1
- package/dist/out-tsc/array/range.d.ts +0 -5
- package/dist/out-tsc/array/range.js +0 -16
- package/dist/out-tsc/array/range.js.map +0 -1
- package/dist/out-tsc/array/range.spec.d.ts +0 -1
- package/dist/out-tsc/array/range.spec.js +0 -26
- package/dist/out-tsc/array/range.spec.js.map +0 -1
- package/dist/out-tsc/classes/custom-event.d.ts +0 -4
- package/dist/out-tsc/classes/custom-event.js +0 -87
- package/dist/out-tsc/classes/custom-event.js.map +0 -1
- package/dist/out-tsc/classes/index.d.ts +0 -1
- package/dist/out-tsc/classes/index.js +0 -2
- package/dist/out-tsc/classes/index.js.map +0 -1
- package/dist/out-tsc/data/doctypes.d.ts +0 -4
- package/dist/out-tsc/data/doctypes.js +0 -302
- package/dist/out-tsc/data/doctypes.js.map +0 -1
- package/dist/out-tsc/data/index.d.ts +0 -1
- package/dist/out-tsc/data/index.js +0 -2
- package/dist/out-tsc/data/index.js.map +0 -1
- package/dist/out-tsc/decorators/cast-to-number.d.ts +0 -5
- package/dist/out-tsc/decorators/cast-to-number.js +0 -29
- package/dist/out-tsc/decorators/cast-to-number.js.map +0 -1
- package/dist/out-tsc/decorators/debounced.broken_spec.d.ts +0 -0
- package/dist/out-tsc/decorators/debounced.broken_spec.js +0 -38
- package/dist/out-tsc/decorators/debounced.broken_spec.js.map +0 -1
- package/dist/out-tsc/decorators/debounced.d.ts +0 -11
- package/dist/out-tsc/decorators/debounced.js +0 -35
- package/dist/out-tsc/decorators/debounced.js.map +0 -1
- package/dist/out-tsc/decorators/index.d.ts +0 -5
- package/dist/out-tsc/decorators/index.js +0 -6
- package/dist/out-tsc/decorators/index.js.map +0 -1
- package/dist/out-tsc/decorators/locked-to-animation-frames.d.ts +0 -4
- package/dist/out-tsc/decorators/locked-to-animation-frames.js +0 -34
- package/dist/out-tsc/decorators/locked-to-animation-frames.js.map +0 -1
- package/dist/out-tsc/decorators/locked-to-animation-frames.spec.d.ts +0 -0
- package/dist/out-tsc/decorators/locked-to-animation-frames.spec.js +0 -63
- package/dist/out-tsc/decorators/locked-to-animation-frames.spec.js.map +0 -1
- package/dist/out-tsc/decorators/simple-metadata-decorator-applicator.d.ts +0 -11
- package/dist/out-tsc/decorators/simple-metadata-decorator-applicator.js +0 -80
- package/dist/out-tsc/decorators/simple-metadata-decorator-applicator.js.map +0 -1
- package/dist/out-tsc/decorators/tick-delay.d.ts +0 -6
- package/dist/out-tsc/decorators/tick-delay.js +0 -31
- package/dist/out-tsc/decorators/tick-delay.js.map +0 -1
- package/dist/out-tsc/function/debounce.d.ts +0 -9
- package/dist/out-tsc/function/debounce.js +0 -102
- package/dist/out-tsc/function/debounce.js.map +0 -1
- package/dist/out-tsc/function/debounce.spec.d.ts +0 -1
- package/dist/out-tsc/function/debounce.spec.js +0 -150
- package/dist/out-tsc/function/debounce.spec.js.map +0 -1
- package/dist/out-tsc/function/debounced-function.interface.d.ts +0 -10
- package/dist/out-tsc/function/debounced-function.interface.js +0 -2
- package/dist/out-tsc/function/debounced-function.interface.js.map +0 -1
- package/dist/out-tsc/function/delayed-function.interface.d.ts +0 -10
- package/dist/out-tsc/function/delayed-function.interface.js +0 -2
- package/dist/out-tsc/function/delayed-function.interface.js.map +0 -1
- package/dist/out-tsc/function/index.d.ts +0 -6
- package/dist/out-tsc/function/index.js +0 -7
- package/dist/out-tsc/function/index.js.map +0 -1
- package/dist/out-tsc/function/lock-to-animation-frames.d.ts +0 -7
- package/dist/out-tsc/function/lock-to-animation-frames.js +0 -43
- package/dist/out-tsc/function/lock-to-animation-frames.js.map +0 -1
- package/dist/out-tsc/function/lock-to-animation-frames.spec.d.ts +0 -0
- package/dist/out-tsc/function/lock-to-animation-frames.spec.js +0 -53
- package/dist/out-tsc/function/lock-to-animation-frames.spec.js.map +0 -1
- package/dist/out-tsc/function/on-next-tick.d.ts +0 -8
- package/dist/out-tsc/function/on-next-tick.js +0 -12
- package/dist/out-tsc/function/on-next-tick.js.map +0 -1
- package/dist/out-tsc/function/on-next-tick.spec.d.ts +0 -1
- package/dist/out-tsc/function/on-next-tick.spec.js +0 -13
- package/dist/out-tsc/function/on-next-tick.spec.js.map +0 -1
- package/dist/out-tsc/function/op.d.ts +0 -32
- package/dist/out-tsc/function/op.js +0 -34
- package/dist/out-tsc/function/op.js.map +0 -1
- package/dist/out-tsc/function/op.spec.d.ts +0 -1
- package/dist/out-tsc/function/op.spec.js +0 -94
- package/dist/out-tsc/function/op.spec.js.map +0 -1
- package/dist/out-tsc/index.d.ts +0 -9
- package/dist/out-tsc/index.js +0 -10
- package/dist/out-tsc/index.js.map +0 -1
- package/dist/out-tsc/number/constrain.d.ts +0 -7
- package/dist/out-tsc/number/constrain.js +0 -16
- package/dist/out-tsc/number/constrain.js.map +0 -1
- package/dist/out-tsc/number/decimal-round.d.ts +0 -7
- package/dist/out-tsc/number/decimal-round.js +0 -19
- package/dist/out-tsc/number/decimal-round.js.map +0 -1
- package/dist/out-tsc/number/decimal-round.spec.d.ts +0 -1
- package/dist/out-tsc/number/decimal-round.spec.js +0 -10
- package/dist/out-tsc/number/decimal-round.spec.js.map +0 -1
- package/dist/out-tsc/number/index.d.ts +0 -3
- package/dist/out-tsc/number/index.js +0 -4
- package/dist/out-tsc/number/index.js.map +0 -1
- package/dist/out-tsc/number/to-file-size-string.d.ts +0 -5
- package/dist/out-tsc/number/to-file-size-string.js +0 -24
- package/dist/out-tsc/number/to-file-size-string.js.map +0 -1
- package/dist/out-tsc/object/copy-property.d.ts +0 -6
- package/dist/out-tsc/object/copy-property.js +0 -9
- package/dist/out-tsc/object/copy-property.js.map +0 -1
- package/dist/out-tsc/object/copy-property.spec.d.ts +0 -1
- package/dist/out-tsc/object/copy-property.spec.js +0 -16
- package/dist/out-tsc/object/copy-property.spec.js.map +0 -1
- package/dist/out-tsc/object/crumble-path.d.ts +0 -6
- package/dist/out-tsc/object/crumble-path.js +0 -9
- package/dist/out-tsc/object/crumble-path.js.map +0 -1
- package/dist/out-tsc/object/crumble-path.spec.d.ts +0 -1
- package/dist/out-tsc/object/crumble-path.spec.js +0 -24
- package/dist/out-tsc/object/crumble-path.spec.js.map +0 -1
- package/dist/out-tsc/object/deep-freeze.d.ts +0 -1
- package/dist/out-tsc/object/deep-freeze.js +0 -36
- package/dist/out-tsc/object/deep-freeze.js.map +0 -1
- package/dist/out-tsc/object/deep-freeze.spec.d.ts +0 -1
- package/dist/out-tsc/object/deep-freeze.spec.js +0 -14
- package/dist/out-tsc/object/deep-freeze.spec.js.map +0 -1
- package/dist/out-tsc/object/diff.d.ts +0 -12
- package/dist/out-tsc/object/diff.js +0 -92
- package/dist/out-tsc/object/diff.js.map +0 -1
- package/dist/out-tsc/object/diff.spec.d.ts +0 -1
- package/dist/out-tsc/object/diff.spec.js +0 -40
- package/dist/out-tsc/object/diff.spec.js.map +0 -1
- package/dist/out-tsc/object/for-each-entry-deep.d.ts +0 -4
- package/dist/out-tsc/object/for-each-entry-deep.js +0 -38
- package/dist/out-tsc/object/for-each-entry-deep.js.map +0 -1
- package/dist/out-tsc/object/for-each-entry-deep.spec.d.ts +0 -1
- package/dist/out-tsc/object/for-each-entry-deep.spec.js +0 -24
- package/dist/out-tsc/object/for-each-entry-deep.spec.js.map +0 -1
- package/dist/out-tsc/object/for-each-nested-object.d.ts +0 -4
- package/dist/out-tsc/object/for-each-nested-object.js +0 -38
- package/dist/out-tsc/object/for-each-nested-object.js.map +0 -1
- package/dist/out-tsc/object/for-each-nested-object.spec.d.ts +0 -1
- package/dist/out-tsc/object/for-each-nested-object.spec.js +0 -46
- package/dist/out-tsc/object/for-each-nested-object.spec.js.map +0 -1
- package/dist/out-tsc/object/get-path.d.ts +0 -5
- package/dist/out-tsc/object/get-path.js +0 -67
- package/dist/out-tsc/object/get-path.js.map +0 -1
- package/dist/out-tsc/object/get-path.spec.d.ts +0 -1
- package/dist/out-tsc/object/get-path.spec.js +0 -44
- package/dist/out-tsc/object/get-path.spec.js.map +0 -1
- package/dist/out-tsc/object/index.d.ts +0 -13
- package/dist/out-tsc/object/index.js +0 -14
- package/dist/out-tsc/object/index.js.map +0 -1
- package/dist/out-tsc/object/merge-deep.d.ts +0 -4
- package/dist/out-tsc/object/merge-deep.js +0 -60
- package/dist/out-tsc/object/merge-deep.js.map +0 -1
- package/dist/out-tsc/object/merge-deep.spec.d.ts +0 -1
- package/dist/out-tsc/object/merge-deep.spec.js +0 -16
- package/dist/out-tsc/object/merge-deep.spec.js.map +0 -1
- package/dist/out-tsc/object/merge-properties-deep.d.ts +0 -4
- package/dist/out-tsc/object/merge-properties-deep.js +0 -61
- package/dist/out-tsc/object/merge-properties-deep.js.map +0 -1
- package/dist/out-tsc/object/merge-properties-deep.spec.d.ts +0 -1
- package/dist/out-tsc/object/merge-properties-deep.spec.js +0 -24
- package/dist/out-tsc/object/merge-properties-deep.spec.js.map +0 -1
- package/dist/out-tsc/object/omit.d.ts +0 -1
- package/dist/out-tsc/object/omit.js +0 -40
- package/dist/out-tsc/object/omit.js.map +0 -1
- package/dist/out-tsc/object/omit.spec.d.ts +0 -1
- package/dist/out-tsc/object/omit.spec.js +0 -10
- package/dist/out-tsc/object/omit.spec.js.map +0 -1
- package/dist/out-tsc/object/set-path.d.ts +0 -2
- package/dist/out-tsc/object/set-path.js +0 -45
- package/dist/out-tsc/object/set-path.js.map +0 -1
- package/dist/out-tsc/object/set-path.spec.d.ts +0 -1
- package/dist/out-tsc/object/set-path.spec.js +0 -36
- package/dist/out-tsc/object/set-path.spec.js.map +0 -1
- package/dist/out-tsc/object/traverse-path.d.ts +0 -2
- package/dist/out-tsc/object/traverse-path.js +0 -81
- package/dist/out-tsc/object/traverse-path.js.map +0 -1
- package/dist/out-tsc/object/values.d.ts +0 -2
- package/dist/out-tsc/object/values.js +0 -31
- package/dist/out-tsc/object/values.js.map +0 -1
- package/dist/out-tsc/object/values.spec.d.ts +0 -1
- package/dist/out-tsc/object/values.spec.js +0 -7
- package/dist/out-tsc/object/values.spec.js.map +0 -1
- package/dist/out-tsc/string/code.template-tag.d.ts +0 -2
- package/dist/out-tsc/string/code.template-tag.js +0 -38
- package/dist/out-tsc/string/code.template-tag.js.map +0 -1
- package/dist/out-tsc/string/index.d.ts +0 -3
- package/dist/out-tsc/string/index.js +0 -4
- package/dist/out-tsc/string/index.js.map +0 -1
- package/dist/out-tsc/string/parse-file-size.d.ts +0 -5
- package/dist/out-tsc/string/parse-file-size.js +0 -43
- package/dist/out-tsc/string/parse-file-size.js.map +0 -1
- package/dist/out-tsc/string/template.d.ts +0 -15
- package/dist/out-tsc/string/template.js +0 -28
- package/dist/out-tsc/string/template.js.map +0 -1
- package/dist/out-tsc/string/template.spec.d.ts +0 -1
- package/dist/out-tsc/string/template.spec.js +0 -39
- package/dist/out-tsc/string/template.spec.js.map +0 -1
- package/dist/out-tsc/typings.d.ts +0 -1
- package/dist/out-tsc/typings.js +0 -2
- package/dist/out-tsc/typings.js.map +0 -1
- package/rollup.config.js +0 -22
- package/spscommerce-utils-4.36.3-ie.tgz +0 -0
- package/spscommerce-utils-5.0.2-ie.tgz +0 -0
package/lib/index.es.js
CHANGED
|
@@ -1,2399 +1,1024 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
3
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
4
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
5
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
6
|
+
var __spreadValues = (a, b) => {
|
|
7
|
+
for (var prop in b || (b = {}))
|
|
8
|
+
if (__hasOwnProp.call(b, prop))
|
|
9
|
+
__defNormalProp(a, prop, b[prop]);
|
|
10
|
+
if (__getOwnPropSymbols)
|
|
11
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
12
|
+
if (__propIsEnum.call(b, prop))
|
|
13
|
+
__defNormalProp(a, prop, b[prop]);
|
|
14
|
+
}
|
|
15
|
+
return a;
|
|
16
|
+
};
|
|
1
17
|
function _mergeNamespaces(n, m) {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
18
|
+
m.forEach(function(e) {
|
|
19
|
+
Object.keys(e).forEach(function(k) {
|
|
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
|
+
}
|
|
11
27
|
});
|
|
28
|
+
}
|
|
12
29
|
});
|
|
13
|
-
|
|
30
|
+
});
|
|
31
|
+
return Object.freeze(n);
|
|
14
32
|
}
|
|
15
|
-
|
|
16
33
|
function flatten(arg) {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
34
|
+
if (!Array.isArray(arg)) {
|
|
35
|
+
return arg;
|
|
36
|
+
}
|
|
37
|
+
return arg.reduce((acc, x) => acc.concat(flatten(x)), []);
|
|
21
38
|
}
|
|
22
|
-
|
|
23
|
-
var __values$d = (undefined && undefined.__values) || function(o) {
|
|
24
|
-
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
|
|
25
|
-
if (m) return m.call(o);
|
|
26
|
-
if (o && typeof o.length === "number") return {
|
|
27
|
-
next: function () {
|
|
28
|
-
if (o && i >= o.length) o = void 0;
|
|
29
|
-
return { value: o && o[i++], done: !o };
|
|
30
|
-
}
|
|
31
|
-
};
|
|
32
|
-
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
33
|
-
};
|
|
34
|
-
/**
|
|
35
|
-
* Tests if candidate is a subset of array
|
|
36
|
-
*/
|
|
37
39
|
function isSubset(candidate, array) {
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
* we can avoid n^2 complexity. (In WebKit, Sets are HashMaps
|
|
43
|
-
* internally, so has() is constant time)
|
|
44
|
-
*/
|
|
45
|
-
var set = new Set(array);
|
|
46
|
-
try {
|
|
47
|
-
for (var candidate_1 = __values$d(candidate), candidate_1_1 = candidate_1.next(); !candidate_1_1.done; candidate_1_1 = candidate_1.next()) {
|
|
48
|
-
var member = candidate_1_1.value;
|
|
49
|
-
if (!set.has(member)) {
|
|
50
|
-
return false;
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
55
|
-
finally {
|
|
56
|
-
try {
|
|
57
|
-
if (candidate_1_1 && !candidate_1_1.done && (_a = candidate_1.return)) _a.call(candidate_1);
|
|
58
|
-
}
|
|
59
|
-
finally { if (e_1) throw e_1.error; }
|
|
40
|
+
const set = new Set(array);
|
|
41
|
+
for (const member of candidate) {
|
|
42
|
+
if (!set.has(member)) {
|
|
43
|
+
return false;
|
|
60
44
|
}
|
|
61
|
-
|
|
45
|
+
}
|
|
46
|
+
return true;
|
|
62
47
|
}
|
|
63
|
-
|
|
64
|
-
var __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
65
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
66
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
67
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
68
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
69
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
70
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
71
|
-
});
|
|
72
|
-
};
|
|
73
|
-
var __generator$1 = (undefined && undefined.__generator) || function (thisArg, body) {
|
|
74
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
75
|
-
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
76
|
-
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
77
|
-
function step(op) {
|
|
78
|
-
if (f) throw new TypeError("Generator is already executing.");
|
|
79
|
-
while (_) try {
|
|
80
|
-
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
81
|
-
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
82
|
-
switch (op[0]) {
|
|
83
|
-
case 0: case 1: t = op; break;
|
|
84
|
-
case 4: _.label++; return { value: op[1], done: false };
|
|
85
|
-
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
86
|
-
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
87
|
-
default:
|
|
88
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
89
|
-
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
90
|
-
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
91
|
-
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
92
|
-
if (t[2]) _.ops.pop();
|
|
93
|
-
_.trys.pop(); continue;
|
|
94
|
-
}
|
|
95
|
-
op = body.call(thisArg, _);
|
|
96
|
-
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
97
|
-
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
98
|
-
}
|
|
99
|
-
};
|
|
100
|
-
/**
|
|
101
|
-
* If the function is set to be called, cancel the
|
|
102
|
-
* timeout that would call it. Reset id & pending to defaults.
|
|
103
|
-
*
|
|
104
|
-
* @returns - Whether an invocation was actually canceled or not.
|
|
105
|
-
*/
|
|
106
48
|
function resetDebouncedFn() {
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
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;
|
|
114
56
|
}
|
|
115
|
-
/**
|
|
116
|
-
* Takes in a function and returns a new function that debounces it.
|
|
117
|
-
* The returned function returns an observable that can be subscribed to
|
|
118
|
-
* if you need to have something happen when the debounced function
|
|
119
|
-
* finally gets called and returns a value.
|
|
120
|
-
*/
|
|
121
57
|
function debounce(functionToDebounce, milliseconds, thisArg) {
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
void (function () { return __awaiter(_this, void 0, void 0, function () {
|
|
133
|
-
var output, err_1;
|
|
134
|
-
return __generator$1(this, function (_a) {
|
|
135
|
-
switch (_a.label) {
|
|
136
|
-
case 0:
|
|
137
|
-
_a.trys.push([0, 3, 4, 5]);
|
|
138
|
-
output = functionToDebounce.apply(thisArg || this, args);
|
|
139
|
-
if (!(output instanceof Promise)) return [3 /*break*/, 2];
|
|
140
|
-
return [4 /*yield*/, output];
|
|
141
|
-
case 1:
|
|
142
|
-
output = _a.sent();
|
|
143
|
-
_a.label = 2;
|
|
144
|
-
case 2:
|
|
145
|
-
resolve(output);
|
|
146
|
-
return [3 /*break*/, 5];
|
|
147
|
-
case 3:
|
|
148
|
-
err_1 = _a.sent();
|
|
149
|
-
reject(err_1);
|
|
150
|
-
return [3 /*break*/, 5];
|
|
151
|
-
case 4:
|
|
152
|
-
debFn.reset();
|
|
153
|
-
return [7 /*endfinally*/];
|
|
154
|
-
case 5: return [2 /*return*/];
|
|
155
|
-
}
|
|
156
|
-
});
|
|
157
|
-
}); })();
|
|
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 () => {
|
|
64
|
+
try {
|
|
65
|
+
let output = functionToDebounce.apply(thisArg || this, args);
|
|
66
|
+
if (output instanceof Promise) {
|
|
67
|
+
output = await output;
|
|
158
68
|
}
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
69
|
+
resolve(output);
|
|
70
|
+
} catch (err) {
|
|
71
|
+
reject(err);
|
|
72
|
+
} finally {
|
|
73
|
+
debFn.reset();
|
|
74
|
+
}
|
|
75
|
+
})();
|
|
76
|
+
}
|
|
77
|
+
debFn.id = window.setTimeout(executor, milliseconds);
|
|
78
|
+
});
|
|
79
|
+
};
|
|
80
|
+
debFn.reset = resetDebouncedFn.bind(debFn);
|
|
81
|
+
return debFn;
|
|
164
82
|
}
|
|
165
|
-
|
|
166
|
-
/**
|
|
167
|
-
* If the function is set to be called, cancel the
|
|
168
|
-
* timeout that would call it. Reset id & pending to defaults.
|
|
169
|
-
*
|
|
170
|
-
* @returns - Whether an invocation was actually canceled or not.
|
|
171
|
-
*/
|
|
172
83
|
function resetLockedFn() {
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
84
|
+
this.pending = false;
|
|
85
|
+
if (typeof this.id === "number") {
|
|
86
|
+
window.cancelAnimationFrame(this.id);
|
|
87
|
+
delete this.id;
|
|
88
|
+
return true;
|
|
89
|
+
}
|
|
90
|
+
return false;
|
|
180
91
|
}
|
|
181
|
-
/**
|
|
182
|
-
* Return a new function to replace the passed in one which ensures that
|
|
183
|
-
* the given function will run only in `requestAnimationFrame()` and at
|
|
184
|
-
* most once per frame.
|
|
185
|
-
*/
|
|
186
92
|
function lockToAnimationFrames(functionToLock, thisArg) {
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
lockFn.pending = true;
|
|
203
|
-
};
|
|
204
|
-
lockFn.pending = false;
|
|
205
|
-
lockFn.reset = resetLockedFn.bind(lockFn);
|
|
206
|
-
return lockFn;
|
|
93
|
+
const lockFn = function lockedFn(...args) {
|
|
94
|
+
if (lockFn.pending) {
|
|
95
|
+
lockFn.reset();
|
|
96
|
+
}
|
|
97
|
+
lockFn.id = window.requestAnimationFrame(() => {
|
|
98
|
+
if (functionToLock) {
|
|
99
|
+
functionToLock.apply(thisArg || this, args);
|
|
100
|
+
}
|
|
101
|
+
lockFn.reset();
|
|
102
|
+
});
|
|
103
|
+
lockFn.pending = true;
|
|
104
|
+
};
|
|
105
|
+
lockFn.pending = false;
|
|
106
|
+
lockFn.reset = resetLockedFn.bind(lockFn);
|
|
107
|
+
return lockFn;
|
|
207
108
|
}
|
|
208
|
-
|
|
209
|
-
/**
|
|
210
|
-
* Enqueues the given function to run on the next "tick" of the JS event
|
|
211
|
-
* loop cycle. If you ever encounter the "value changed after it was
|
|
212
|
-
* checked" error in Angular when trying to assign a value of a
|
|
213
|
-
* component class, performing that assignment on the next tick, i.e. when
|
|
214
|
-
* all of Angular's current cycle is finished, will resolve that error.
|
|
215
|
-
*/
|
|
216
109
|
function onNextTick(fn, thisArg) {
|
|
217
|
-
|
|
218
|
-
|
|
110
|
+
const boundFn = thisArg ? fn.bind(thisArg) : fn;
|
|
111
|
+
setTimeout(boundFn, 0);
|
|
219
112
|
}
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
or: function (a, b) { return a || b; },
|
|
248
|
-
rem: function (a, b) { return a % b; },
|
|
249
|
-
rshift: function (a, b) { return a >> b; },
|
|
250
|
-
rshift_zf: function (a, b) { return a >>> b; },
|
|
251
|
-
sub: function (a, b) { return a - b; },
|
|
252
|
-
xor: function (a, b) { return (a || b) && !(a && b); },
|
|
113
|
+
const Op = {
|
|
114
|
+
add: (a, b) => a + b,
|
|
115
|
+
and: (a, b) => a && b,
|
|
116
|
+
band: (a, b) => a & b,
|
|
117
|
+
bor: (a, b) => a | b,
|
|
118
|
+
bxor: (a, b) => a ^ b,
|
|
119
|
+
bnot: (a) => ~a,
|
|
120
|
+
decr: (a) => a - 1,
|
|
121
|
+
div: (a, b) => a / b,
|
|
122
|
+
eq: (a, b) => a === b,
|
|
123
|
+
exp: (a, b) => a ** b,
|
|
124
|
+
gt: (a, b) => a > b,
|
|
125
|
+
gte: (a, b) => a >= b,
|
|
126
|
+
incr: (a) => a + 1,
|
|
127
|
+
lshift: (a, b) => a << b,
|
|
128
|
+
lt: (a, b) => a < b,
|
|
129
|
+
lte: (a, b) => a <= b,
|
|
130
|
+
mul: (a, b) => a * b,
|
|
131
|
+
neg: (a) => -a,
|
|
132
|
+
neq: (a, b) => a !== b,
|
|
133
|
+
not: (a) => !a,
|
|
134
|
+
or: (a, b) => a || b,
|
|
135
|
+
rem: (a, b) => a % b,
|
|
136
|
+
rshift: (a, b) => a >> b,
|
|
137
|
+
rshift_zf: (a, b) => a >>> b,
|
|
138
|
+
sub: (a, b) => a - b,
|
|
139
|
+
xor: (a, b) => (a || b) && !(a && b)
|
|
253
140
|
};
|
|
254
|
-
|
|
255
|
-
/**
|
|
256
|
-
* Unlike lodash range, includes the specified end number.
|
|
257
|
-
* So range(1, 10) gives you 1-10 instead of 1-9.
|
|
258
|
-
*/
|
|
259
141
|
function range(start, end) {
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
.map(start > end ? Op.sub : Op.add);
|
|
142
|
+
if (!Number.isInteger(start)) {
|
|
143
|
+
throw new Error("start must be an integer");
|
|
144
|
+
}
|
|
145
|
+
if (!Number.isInteger(end)) {
|
|
146
|
+
throw new Error("end must be an integer");
|
|
147
|
+
}
|
|
148
|
+
return new Array(Math.abs(end - start) + 1).fill(start).map(start > end ? Op.sub : Op.add);
|
|
268
149
|
}
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
150
|
+
class CustomEvent {
|
|
151
|
+
constructor(eventName, initDict = {}) {
|
|
152
|
+
let event;
|
|
153
|
+
if (typeof Event === "function") {
|
|
154
|
+
event = new Event(eventName, initDict);
|
|
155
|
+
} else {
|
|
156
|
+
event = document.createEvent("Event");
|
|
157
|
+
event.initEvent(eventName, initDict.bubbles, initDict.cancelable);
|
|
158
|
+
for (const key of Object.keys(initDict)) {
|
|
159
|
+
if (key !== "bubbles" && key !== "cancelable") {
|
|
160
|
+
event[key] = initDict[key];
|
|
279
161
|
}
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
function CustomEvent(eventName, initDict) {
|
|
290
|
-
var e_1, _a, e_2, _b, e_3, _c;
|
|
291
|
-
if (initDict === void 0) { initDict = {}; }
|
|
292
|
-
var event;
|
|
293
|
-
if (typeof Event === "function") {
|
|
294
|
-
event = new Event(eventName, initDict);
|
|
295
|
-
}
|
|
296
|
-
else {
|
|
297
|
-
// IE11
|
|
298
|
-
event = document.createEvent("Event");
|
|
299
|
-
event.initEvent(eventName, initDict.bubbles, initDict.cancelable);
|
|
300
|
-
try {
|
|
301
|
-
for (var _d = __values$c(Object.keys(initDict)), _e = _d.next(); !_e.done; _e = _d.next()) {
|
|
302
|
-
var key = _e.value;
|
|
303
|
-
if (key !== "bubbles" && key !== "cancelable") {
|
|
304
|
-
event[key] = initDict[key];
|
|
305
|
-
}
|
|
306
|
-
}
|
|
307
|
-
}
|
|
308
|
-
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
309
|
-
finally {
|
|
310
|
-
try {
|
|
311
|
-
if (_e && !_e.done && (_a = _d.return)) _a.call(_d);
|
|
312
|
-
}
|
|
313
|
-
finally { if (e_1) throw e_1.error; }
|
|
314
|
-
}
|
|
315
|
-
}
|
|
316
|
-
Object.setPrototypeOf(this, event);
|
|
317
|
-
/*
|
|
318
|
-
* Native functions like the getters, setters, and methods on Event.prototype
|
|
319
|
-
* cannot be called with "this" being a custom object. So what we're doing here
|
|
320
|
-
* works around that.
|
|
321
|
-
*/
|
|
322
|
-
var descriptors = Object.getOwnPropertyDescriptors(Event.prototype);
|
|
323
|
-
try {
|
|
324
|
-
for (var _f = __values$c(Object.keys(descriptors)), _g = _f.next(); !_g.done; _g = _f.next()) {
|
|
325
|
-
var propKey = _g.value;
|
|
326
|
-
var descriptor = descriptors[propKey];
|
|
327
|
-
try {
|
|
328
|
-
for (var _h = (e_3 = void 0, __values$c(Object.keys(descriptor))), _j = _h.next(); !_j.done; _j = _h.next()) {
|
|
329
|
-
var key = _j.value;
|
|
330
|
-
if (typeof descriptor[key] === "function") {
|
|
331
|
-
descriptor[key] = descriptor[key].bind(event);
|
|
332
|
-
}
|
|
333
|
-
}
|
|
334
|
-
}
|
|
335
|
-
catch (e_3_1) { e_3 = { error: e_3_1 }; }
|
|
336
|
-
finally {
|
|
337
|
-
try {
|
|
338
|
-
if (_j && !_j.done && (_c = _h.return)) _c.call(_h);
|
|
339
|
-
}
|
|
340
|
-
finally { if (e_3) throw e_3.error; }
|
|
341
|
-
}
|
|
342
|
-
}
|
|
343
|
-
}
|
|
344
|
-
catch (e_2_1) { e_2 = { error: e_2_1 }; }
|
|
345
|
-
finally {
|
|
346
|
-
try {
|
|
347
|
-
if (_g && !_g.done && (_b = _f.return)) _b.call(_f);
|
|
348
|
-
}
|
|
349
|
-
finally { if (e_2) throw e_2.error; }
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
Object.setPrototypeOf(this, event);
|
|
165
|
+
const descriptors = Object.getOwnPropertyDescriptors(Event.prototype);
|
|
166
|
+
for (const propKey of Object.keys(descriptors)) {
|
|
167
|
+
const descriptor = descriptors[propKey];
|
|
168
|
+
for (const key of Object.keys(descriptor)) {
|
|
169
|
+
if (typeof descriptor[key] === "function") {
|
|
170
|
+
descriptor[key] = descriptor[key].bind(event);
|
|
350
171
|
}
|
|
351
|
-
|
|
172
|
+
}
|
|
352
173
|
}
|
|
353
|
-
|
|
354
|
-
}
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
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
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
174
|
+
Object.defineProperties(this, descriptors);
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
const EDI_DOCUMENT_TYPE = Object.freeze({
|
|
178
|
+
100: { name: "Insurance Plan Description" },
|
|
179
|
+
101: { name: "Name and Address Lists" },
|
|
180
|
+
104: { name: "Air Shipment Information" },
|
|
181
|
+
106: { name: "Motor Carrier Rate Proposal" },
|
|
182
|
+
107: { name: "Request for Motor Carrier Rate Proposal" },
|
|
183
|
+
108: { name: "Response to a Motor Carrier Rate Proposal" },
|
|
184
|
+
109: { name: "Vessel Content Details" },
|
|
185
|
+
110: { name: "Air Freight Details and Invoice" },
|
|
186
|
+
112: { name: "Property Damage Report" },
|
|
187
|
+
120: { name: "Vehicle Shipping Order" },
|
|
188
|
+
121: { name: "Vehicle Service" },
|
|
189
|
+
124: { name: "Vehicle Damage" },
|
|
190
|
+
125: { name: "Multilevel Railcar Load Details" },
|
|
191
|
+
126: { name: "Vehicle Application Advice" },
|
|
192
|
+
127: { name: "Vehicle Baying Order" },
|
|
193
|
+
128: { name: "Dealer Information" },
|
|
194
|
+
129: { name: "Vehicle Carrier Rate Update" },
|
|
195
|
+
130: { name: "Student Educational Record (Transcript)" },
|
|
196
|
+
131: { name: "Student Educational Record (Transcript) Acknowledgment" },
|
|
197
|
+
135: { name: "Student Loan Application" },
|
|
198
|
+
138: { name: "Testing Results Request and Report" },
|
|
199
|
+
139: { name: "Student Loan Guarantee Result" },
|
|
200
|
+
140: { name: "Product Registration" },
|
|
201
|
+
141: { name: "Product Service Claim Response" },
|
|
202
|
+
142: { name: "Product Service Claim" },
|
|
203
|
+
143: { name: "Product Service Notification" },
|
|
204
|
+
144: { name: "Student Loan Transfer and Status Verification" },
|
|
205
|
+
146: { name: "Request for Student Educational Record (Transcript)" },
|
|
206
|
+
147: { name: "Response to Request for Student Educational Record (Transcript)" },
|
|
207
|
+
148: { name: "Report of Injury, Illness or Incident" },
|
|
208
|
+
149: { name: "Notice of Tax Adjustment or Assessment" },
|
|
209
|
+
150: { name: "Tax Rate Notification" },
|
|
210
|
+
151: { name: "Electronic Filing of Tax Return Data Acknowledgment" },
|
|
211
|
+
152: { name: "Statistical Government Information" },
|
|
212
|
+
153: { name: "Unemployment Insurance Tax Claim or Charge Information" },
|
|
213
|
+
154: { name: "Uniform Commercial Code Filing" },
|
|
214
|
+
155: { name: "Business Credit Report" },
|
|
215
|
+
157: { name: "Notice of Power of Attorney" },
|
|
216
|
+
159: { name: "Motion Picture Booking Confirmation" },
|
|
217
|
+
160: { name: "Transportation Automatic Equipment Identification" },
|
|
218
|
+
161: { name: "Train Sheet" },
|
|
219
|
+
169: { name: "Transportation Appointment Schedule Information" },
|
|
220
|
+
170: { name: "Revenue Receipts Statement" },
|
|
221
|
+
175: { name: "Court and Law Enforcement Notice" },
|
|
222
|
+
176: { name: "Court Submission TYPE" },
|
|
223
|
+
180: { name: "Return Merchandise Authorization and Notification" },
|
|
224
|
+
185: { name: "Royalty Regulatory Report" },
|
|
225
|
+
186: { name: "Insurance Underwriting Requirements Reporting" },
|
|
226
|
+
188: { name: "Educational Course Inventory" },
|
|
227
|
+
189: { name: "Application for Admission to Educational Institutions" },
|
|
228
|
+
190: { name: "Student Enrollment Verification" },
|
|
229
|
+
191: { name: "Student Loan Pre-Claims and Claims" },
|
|
230
|
+
194: { name: "Grant or Assistance Application" },
|
|
231
|
+
195: { name: "Federal Communications Commission (FCC) License Application" },
|
|
232
|
+
196: { name: "Contractor Cost Data Reporting" },
|
|
233
|
+
197: { name: "Real Estate Title Evidence" },
|
|
234
|
+
198: { name: "Loan Verification Information" },
|
|
235
|
+
199: { name: "Real Estate Settlement Information" },
|
|
236
|
+
200: { name: "Mortgage Credit Report" },
|
|
237
|
+
201: { name: "Residential Loan Application" },
|
|
238
|
+
202: { name: "Secondary Mortgage Market Loan Delivery" },
|
|
239
|
+
203: { name: "Secondary Mortgage Market Investor Report" },
|
|
240
|
+
204: { name: "Motor Carrier Load Tender" },
|
|
241
|
+
205: { name: "Mortgage Note" },
|
|
242
|
+
206: { name: "Real Estate Inspection" },
|
|
243
|
+
210: { name: "Motor Carrier Freight Details and Invoice" },
|
|
244
|
+
211: { name: "Motor Carrier Bill of Lading", edifactId: "IFTMCE" },
|
|
245
|
+
212: { name: "Motor Carrier Delivery Trailer Manifest" },
|
|
246
|
+
213: { name: "Motor Carrier Shipment Status Inquiry" },
|
|
247
|
+
214: { name: "Transportation Carrier Shipment Status Message" },
|
|
248
|
+
215: { name: "Motor Carrier Pick-up Manifest" },
|
|
249
|
+
216: { name: "Motor Carrier Shipment Pick-up Notification" },
|
|
250
|
+
217: { name: "Motor Carrier Loading and Route Guide" },
|
|
251
|
+
218: { name: "Motor Carrier Tariff Information" },
|
|
252
|
+
219: { name: "Logistics Service Request" },
|
|
253
|
+
220: { name: "Logistics Service Response" },
|
|
254
|
+
222: { name: "Cartage Work Assignment" },
|
|
255
|
+
223: { name: "Consolidators Freight Bill and Invoice" },
|
|
256
|
+
224: { name: "Motor Carrier Summary Freight Bill Manifest" },
|
|
257
|
+
225: { name: "Response to a Cartage Work Assignment" },
|
|
258
|
+
240: { name: "Motor Carrier Package Status" },
|
|
259
|
+
242: { name: "Data Status Tracking" },
|
|
260
|
+
244: { name: "Product Source Information" },
|
|
261
|
+
248: { name: "Account Assignment/Inquiry and Service/Status" },
|
|
262
|
+
249: { name: "Animal Toxicological Data" },
|
|
263
|
+
250: { name: "Purchase Order Shipment Management Document" },
|
|
264
|
+
251: { name: "Pricing Support" },
|
|
265
|
+
252: { name: "Insurance Producer Administration" },
|
|
266
|
+
255: { name: "Underwriting Information Services" },
|
|
267
|
+
256: { name: "Periodic Compensation" },
|
|
268
|
+
260: { name: "Application for Mortgage Insurance Benefits" },
|
|
269
|
+
261: { name: "Real Estate Information Request" },
|
|
270
|
+
262: { name: "Real Estate Information Report" },
|
|
271
|
+
263: { name: "Residential Mortgage Insurance Application Response" },
|
|
272
|
+
264: { name: "Mortgage Loan Default Status" },
|
|
273
|
+
265: { name: "Real Estate Title Insurance Services Order" },
|
|
274
|
+
266: { name: "Mortgage or Property Record Change Notification" },
|
|
275
|
+
267: { name: "Individual Life, Annuity and Disability Application" },
|
|
276
|
+
268: { name: "Annuity Activity" },
|
|
277
|
+
270: { name: "Eligibility, Coverage or Benefit Inquiry" },
|
|
278
|
+
271: { name: "Eligibility, Coverage or Benefit Information" },
|
|
279
|
+
272: { name: "Property and Casualty Loss Notification" },
|
|
280
|
+
273: { name: "Insurance/Annuity Application Status" },
|
|
281
|
+
274: { name: "Health Care Provider Information" },
|
|
282
|
+
275: { name: "Patient Information" },
|
|
283
|
+
276: { name: "Health Care Claim Status Request" },
|
|
284
|
+
277: { name: "Health Care Claim Status Notification" },
|
|
285
|
+
278: { name: "Health Care Services Insurance/Benefit Review Information" },
|
|
286
|
+
280: { name: "Voter Registration Information" },
|
|
287
|
+
285: { name: "Commercial Vehicle Safety and Credentials Information Exchange" },
|
|
288
|
+
286: { name: "Commercial Vehicle Credentials" },
|
|
289
|
+
288: { name: "Wage Determination" },
|
|
290
|
+
290: { name: "Cooperative Advertising Agreements" },
|
|
291
|
+
300: { name: "Reservation (Booking Request) (Ocean)" },
|
|
292
|
+
301: { name: "Confirmation (Ocean)", edifactId: "IFTMBC" },
|
|
293
|
+
303: { name: "Booking Cancellation (Ocean)" },
|
|
294
|
+
304: { name: "Shipping Instructions" },
|
|
295
|
+
309: { name: "U.S. Customs Manifest" },
|
|
296
|
+
310: { name: "Freight Receipt and Invoice (Ocean)" },
|
|
297
|
+
311: { name: "Canadian Customs Information" },
|
|
298
|
+
312: { name: "Arrival Notice (Ocean)" },
|
|
299
|
+
313: { name: "Shipment Status Inquiry (Ocean)" },
|
|
300
|
+
315: { name: "Status Details (Ocean)" },
|
|
301
|
+
317: { name: "Delivery/Pickup Order" },
|
|
302
|
+
319: { name: "Terminal Information" },
|
|
303
|
+
322: { name: "Terminal Operations and Intermodal Ramp Activity" },
|
|
304
|
+
323: { name: "Vessel Schedule and Itinerary (Ocean)" },
|
|
305
|
+
324: { name: "Vessel Stow Plan (Ocean)" },
|
|
306
|
+
325: { name: "Consolidation of Goods In Container" },
|
|
307
|
+
326: { name: "Consignment Summary List" },
|
|
308
|
+
350: { name: "U.S. Customs Status Information" },
|
|
309
|
+
352: { name: "U.S. Customs Carrier General Order Status" },
|
|
310
|
+
353: { name: "U.S. Customs Events Advisory Details" },
|
|
311
|
+
354: { name: "U.S. Customs Automated Manifest Archive Status" },
|
|
312
|
+
355: { name: "U.S. Customs Acceptance/Rejection" },
|
|
313
|
+
356: { name: "U.S. Customs Permit to Transfer Request" },
|
|
314
|
+
357: { name: "U.S. Customs In-Bond Information" },
|
|
315
|
+
358: { name: "U.S. Customs Consist Information" },
|
|
316
|
+
361: { name: "Carrier Interchange Agreement (Ocean)" },
|
|
317
|
+
362: { name: "Cargo Insurance Advice of Shipment" },
|
|
318
|
+
404: { name: "Rail Carrier Shipment Information" },
|
|
319
|
+
410: { name: "Rail Carrier Freight Details and Invoice" },
|
|
320
|
+
411: { name: "Rail Carrier Freight Details and Invoice Summary" },
|
|
321
|
+
412: { name: "Trailer or Container Repair Billing" },
|
|
322
|
+
414: { name: "Rail Carhire Settlements" },
|
|
323
|
+
417: { name: "Rail Carrier Waybill Interchange" },
|
|
324
|
+
418: { name: "Rail Advance Interchange Consist" },
|
|
325
|
+
419: { name: "Advance Car Disposition" },
|
|
326
|
+
420: { name: "Car Handling Information" },
|
|
327
|
+
421: { name: "Estimated Time of Arrival and Car Scheduling" },
|
|
328
|
+
422: { name: "Shipper's Car Order" },
|
|
329
|
+
423: { name: "Rail Industrial Switch List" },
|
|
330
|
+
424: { name: "Rail Carrier Services Settlement" },
|
|
331
|
+
425: { name: "Rail Waybill Request" },
|
|
332
|
+
426: { name: "Rail Revenue Waybill" },
|
|
333
|
+
427: { name: "Rail Waybill Response" },
|
|
334
|
+
429: { name: "Railroad Retirement Activity" },
|
|
335
|
+
431: { name: "Railroad Station Master File" },
|
|
336
|
+
432: { name: "Rail Deprescription" },
|
|
337
|
+
433: { name: "Railroad Reciprocal Switch File" },
|
|
338
|
+
434: { name: "Railroad Mark Register Update Activity" },
|
|
339
|
+
435: { name: "Standard Transportation Commodity Code (STCC) Master" },
|
|
340
|
+
436: { name: "Locomotive Information" },
|
|
341
|
+
437: { name: "Railroad Junctions and Interchanges Activity" },
|
|
342
|
+
440: { name: "Shipment Weights" },
|
|
343
|
+
451: { name: "Railroad Event Report" },
|
|
344
|
+
452: { name: "Railroad Problem Log Inquiry or Advice" },
|
|
345
|
+
453: { name: "Railroad Service Commitment Advice" },
|
|
346
|
+
455: { name: "Railroad Parameter Trace Registration" },
|
|
347
|
+
456: { name: "Railroad Equipment Inquiry or Advice" },
|
|
348
|
+
460: { name: "Railroad Price Distribution Request or Response" },
|
|
349
|
+
463: { name: "Rail Rate Reply" },
|
|
350
|
+
466: { name: "Rate Request" },
|
|
351
|
+
468: { name: "Rate Docket Journal Log" },
|
|
352
|
+
470: { name: "Railroad Clearance" },
|
|
353
|
+
475: { name: "Rail Route File Maintenance" },
|
|
354
|
+
485: { name: "Ratemaking Action" },
|
|
355
|
+
486: { name: "Rate Docket Expiration" },
|
|
356
|
+
490: { name: "Rate Group Definition" },
|
|
357
|
+
492: { name: "Miscellaneous Rates" },
|
|
358
|
+
494: { name: "Rail Scale Rates" },
|
|
359
|
+
500: { name: "Medical Event Reporting" },
|
|
360
|
+
501: { name: "Vendor Performance Review" },
|
|
361
|
+
503: { name: "Pricing History" },
|
|
362
|
+
504: { name: "Clauses and Provisions" },
|
|
363
|
+
511: { name: "Requisition" },
|
|
364
|
+
517: { name: "Material Obligation Validation" },
|
|
365
|
+
521: { name: "Income or Asset Offset" },
|
|
366
|
+
527: { name: "Material Due-In and Receipt" },
|
|
367
|
+
536: { name: "Logistics Reassignment" },
|
|
368
|
+
540: { name: "Notice of Employment Status" },
|
|
369
|
+
561: { name: "Contract Abstract" },
|
|
370
|
+
567: { name: "Contract Completion Status" },
|
|
371
|
+
568: { name: "Contract Payment Management Report" },
|
|
372
|
+
601: { name: "U.S. Customs Export Shipment Information" },
|
|
373
|
+
602: { name: "Transportation Services Tender" },
|
|
374
|
+
620: { name: "Excavation Communication" },
|
|
375
|
+
625: { name: "Well Information" },
|
|
376
|
+
650: { name: "Maintenance Service Order" },
|
|
377
|
+
715: { name: "Intermodal Group Loading Plan" },
|
|
378
|
+
805: { name: "Contract Pricing Proposal" },
|
|
379
|
+
806: { name: "Project Schedule Reporting" },
|
|
380
|
+
810: { name: "Invoice", edifactId: "INVOIC" },
|
|
381
|
+
811: { name: "Consolidated Service Invoice/Statement" },
|
|
382
|
+
812: { name: "Credit/Debit Adjustment" },
|
|
383
|
+
813: { name: "Electronic Filing of Tax Return Data" },
|
|
384
|
+
814: { name: "General Request, Response or Confirmation" },
|
|
385
|
+
815: { name: "Cryptographic Service Message" },
|
|
386
|
+
816: { name: "Organizational Relationships" },
|
|
387
|
+
818: { name: "Commission Sales Report" },
|
|
388
|
+
819: { name: "Operating Expense Statement" },
|
|
389
|
+
820: { name: "Payment Order/Remittance Advice", edifactId: "REMADV" },
|
|
390
|
+
821: { name: "Financial Information Reporting" },
|
|
391
|
+
822: { name: "Account Analysis" },
|
|
392
|
+
823: { name: "Lockbox" },
|
|
393
|
+
824: { name: "Application Advice", edifactId: "APERAK" },
|
|
394
|
+
826: { name: "Tax Information Exchange" },
|
|
395
|
+
827: { name: "Financial Return Notice" },
|
|
396
|
+
828: { name: "Debit Authorization" },
|
|
397
|
+
829: { name: "Payment Cancellation Request" },
|
|
398
|
+
830: { name: "Planning Schedule with Release Capability", edifactId: "DELFOR" },
|
|
399
|
+
831: { name: "Application Control Totals" },
|
|
400
|
+
832: { name: "Price/Sales Catalog", edifactId: "PRICAT" },
|
|
401
|
+
833: { name: "Mortgage Credit Report Order" },
|
|
402
|
+
834: { name: "Benefit Enrollment and Maintenance" },
|
|
403
|
+
835: { name: "Health Care Claim Payment/Advice" },
|
|
404
|
+
836: { name: "Procurement Notices" },
|
|
405
|
+
837: { name: "Health Care Claim" },
|
|
406
|
+
838: { name: "Trading Partner Profile" },
|
|
407
|
+
839: { name: "Project Cost Reporting" },
|
|
408
|
+
840: { name: "Request for Quotation", edifactId: "REQUOTE" },
|
|
409
|
+
841: { name: "Specifications/Technical Information" },
|
|
410
|
+
842: { name: "Nonconformance Report" },
|
|
411
|
+
843: { name: "Response to Request for Quotation", edifactId: "QUOTES" },
|
|
412
|
+
844: { name: "Product Transfer Account Adjustment", edifactId: "SSDCLM" },
|
|
413
|
+
845: { name: "Price Authorization Acknowledgment/Status", edifactId: "ATHSTS" },
|
|
414
|
+
846: { name: "Inventory Inquiry/Advice", edifactId: "INVRPT" },
|
|
415
|
+
847: { name: "Material Claim" },
|
|
416
|
+
848: { name: "Material Safety Data Sheet" },
|
|
417
|
+
849: { name: "Response to Product Transfer Account Adjustment" },
|
|
418
|
+
850: { name: "Purchase Order", edifactId: "ORDERS" },
|
|
419
|
+
851: { name: "Asset Schedule" },
|
|
420
|
+
852: { name: "Product Activity Data", edifactId: "SLSRPT" },
|
|
421
|
+
853: { name: "Routing and Carrier Instruction" },
|
|
422
|
+
854: { name: "Shipment Delivery Discrepancy Information" },
|
|
423
|
+
855: { name: "Purchase Order Acknowledgment", edifactId: "ORDRSP" },
|
|
424
|
+
856: { name: "Advance Ship Notice/Manifest", edifactId: "DESADV" },
|
|
425
|
+
857: { name: "Shipment and Billing Notice" },
|
|
426
|
+
858: { name: "Shipment Information" },
|
|
427
|
+
859: { name: "Freight Invoice" },
|
|
428
|
+
860: { name: "Purchase Order Change", edifactId: "ORDCHG" },
|
|
429
|
+
861: { name: "Receiving Advice/Acceptance Certificate", edifactId: "RECADV" },
|
|
430
|
+
862: { name: "Shipping Schedule", edifactId: "DELJIT" },
|
|
431
|
+
863: { name: "Report of Test Results" },
|
|
432
|
+
864: { name: "Text Message" },
|
|
433
|
+
865: { name: "Purchase Order Change", edifactId: "ORDRSP" },
|
|
434
|
+
866: { name: "Production Sequence" },
|
|
435
|
+
867: { name: "Product Transfer and Resale Report", edifactId: "SLSRPT" },
|
|
436
|
+
868: { name: "Electronic Form Structure" },
|
|
437
|
+
869: { name: "Order Status Inquiry", edifactId: "ORSSTA" },
|
|
438
|
+
870: { name: "Order Status Report", edifactId: "ORDREP" },
|
|
439
|
+
871: { name: "Component Parts Content" },
|
|
440
|
+
872: { name: "Residential Mortgage Insurance Application" },
|
|
441
|
+
875: { name: "Grocery Products Purchase Order" },
|
|
442
|
+
876: { name: "Grocery Products Purchase Order Change" },
|
|
443
|
+
877: { name: "Manufacturer Coupon Family Code Structure" },
|
|
444
|
+
878: { name: "Product Authorization/De-authorization" },
|
|
445
|
+
879: { name: "Price Information" },
|
|
446
|
+
880: { name: "Grocery Products Invoice" },
|
|
447
|
+
881: { name: "Manufacturer Coupon Redemption Detail" },
|
|
448
|
+
882: { name: "Direct Store Delivery Summary Information" },
|
|
449
|
+
883: { name: "Market Development Fund Allocation" },
|
|
450
|
+
884: { name: "Market Development Fund Settlement" },
|
|
451
|
+
885: { name: "Retail Account Characteristics" },
|
|
452
|
+
886: { name: "Customer Call Reporting" },
|
|
453
|
+
887: { name: "Coupon Notification" },
|
|
454
|
+
888: { name: "Item Maintenance" },
|
|
455
|
+
889: { name: "Promotion Announcement" },
|
|
456
|
+
891: { name: "Deduction Research Report" },
|
|
457
|
+
893: { name: "Item Information Request" },
|
|
458
|
+
894: { name: "Delivery/Return Base Record" },
|
|
459
|
+
895: { name: "Delivery/Return Acknowledgment or Adjustment" },
|
|
460
|
+
896: { name: "Product Dimension Maintenance" },
|
|
461
|
+
920: { name: "Loss or Damage Claim - General Commodities" },
|
|
462
|
+
924: { name: "Loss or Damage Claim - Motor Vehicle" },
|
|
463
|
+
925: { name: "Claim Tracer" },
|
|
464
|
+
926: { name: "Claim Status Report and Tracer Reply" },
|
|
465
|
+
928: { name: "Automotive Inspection Detail" },
|
|
466
|
+
940: { name: "Warehouse Shipping Order" },
|
|
467
|
+
943: { name: "Warehouse Stock Transfer Shipment Advice" },
|
|
468
|
+
944: { name: "Warehouse Stock Transfer Receipt Advice" },
|
|
469
|
+
945: { name: "Warehouse Shipping Advice" },
|
|
470
|
+
947: { name: "Warehouse Inventory Adjustment Advice" },
|
|
471
|
+
980: { name: "Functional Group Totals" },
|
|
472
|
+
990: { name: "Response to a Load Tender" },
|
|
473
|
+
996: { name: "File Transfer" },
|
|
474
|
+
997: { name: "Functional Acknowledgment", edifactId: "CONTROL" },
|
|
475
|
+
998: { name: "Set Cancellation" },
|
|
476
|
+
999: { name: "Implementation Acknowledgment" }
|
|
656
477
|
});
|
|
657
|
-
|
|
658
|
-
/**
|
|
659
|
-
* A property decorated with this will have any value assigned
|
|
660
|
-
* to it cast to a number with the unary `+` operator.
|
|
661
|
-
*/
|
|
662
478
|
function castToNumber() {
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
this[internalKey] = Number(newValue);
|
|
681
|
-
},
|
|
682
|
-
},
|
|
683
|
-
_a));
|
|
684
|
-
};
|
|
685
|
-
}
|
|
686
|
-
|
|
687
|
-
var __assign$3 = (undefined && undefined.__assign) || function () {
|
|
688
|
-
__assign$3 = Object.assign || function(t) {
|
|
689
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
690
|
-
s = arguments[i];
|
|
691
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
692
|
-
t[p] = s[p];
|
|
479
|
+
return (target, key) => {
|
|
480
|
+
const internalKey = `_${String(key)}`;
|
|
481
|
+
Object.defineProperties(target, {
|
|
482
|
+
[internalKey]: {
|
|
483
|
+
enumerable: false,
|
|
484
|
+
configurable: true,
|
|
485
|
+
writable: true,
|
|
486
|
+
value: void 0
|
|
487
|
+
},
|
|
488
|
+
[key]: {
|
|
489
|
+
enumerable: true,
|
|
490
|
+
configurable: true,
|
|
491
|
+
get() {
|
|
492
|
+
return this[internalKey];
|
|
493
|
+
},
|
|
494
|
+
set(newValue) {
|
|
495
|
+
this[internalKey] = Number(newValue);
|
|
693
496
|
}
|
|
694
|
-
|
|
695
|
-
};
|
|
696
|
-
|
|
697
|
-
}
|
|
698
|
-
/**
|
|
699
|
-
* Decorator that applies `debounce`
|
|
700
|
-
*/
|
|
497
|
+
}
|
|
498
|
+
});
|
|
499
|
+
};
|
|
500
|
+
}
|
|
701
501
|
function debounced(ms) {
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
var newDescriptorWithDebounced = __assign$3({}, originalDescriptorCopy);
|
|
710
|
-
newDescriptorWithDebounced.value = debounce(originalDescriptorCopy.value, ms, this);
|
|
711
|
-
Object.defineProperty(this, propertyKey, newDescriptorWithDebounced);
|
|
712
|
-
return newDescriptorWithDebounced.value;
|
|
713
|
-
};
|
|
714
|
-
originalDescriptorCopy.configurable = true;
|
|
715
|
-
delete originalDescriptorCopy.writable;
|
|
716
|
-
delete originalDescriptorCopy.value;
|
|
717
|
-
return originalDescriptorCopy;
|
|
502
|
+
return (target, propertyKey, descriptor) => {
|
|
503
|
+
const originalDescriptorCopy = __spreadValues({}, descriptor);
|
|
504
|
+
originalDescriptorCopy.get = function get() {
|
|
505
|
+
const newDescriptorWithDebounced = __spreadValues({}, originalDescriptorCopy);
|
|
506
|
+
newDescriptorWithDebounced.value = debounce(originalDescriptorCopy.value, ms, this);
|
|
507
|
+
Object.defineProperty(this, propertyKey, newDescriptorWithDebounced);
|
|
508
|
+
return newDescriptorWithDebounced.value;
|
|
718
509
|
};
|
|
510
|
+
originalDescriptorCopy.configurable = true;
|
|
511
|
+
delete originalDescriptorCopy.writable;
|
|
512
|
+
delete originalDescriptorCopy.value;
|
|
513
|
+
return originalDescriptorCopy;
|
|
514
|
+
};
|
|
719
515
|
}
|
|
720
|
-
|
|
721
|
-
var __assign$2 = (undefined && undefined.__assign) || function () {
|
|
722
|
-
__assign$2 = Object.assign || function(t) {
|
|
723
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
724
|
-
s = arguments[i];
|
|
725
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
726
|
-
t[p] = s[p];
|
|
727
|
-
}
|
|
728
|
-
return t;
|
|
729
|
-
};
|
|
730
|
-
return __assign$2.apply(this, arguments);
|
|
731
|
-
};
|
|
732
|
-
/**
|
|
733
|
-
* Decorator that applies `lockToAnimationFrames`
|
|
734
|
-
*/
|
|
735
516
|
function lockedToAnimationFrames(target, propertyKey, descriptor) {
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
descriptor.configurable = true;
|
|
748
|
-
delete descriptor.writable;
|
|
749
|
-
delete descriptor.value;
|
|
750
|
-
return 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;
|
|
523
|
+
};
|
|
524
|
+
descriptor.configurable = true;
|
|
525
|
+
delete descriptor.writable;
|
|
526
|
+
delete descriptor.value;
|
|
527
|
+
return descriptor;
|
|
751
528
|
}
|
|
752
|
-
|
|
753
|
-
var __assign$1 = (undefined && undefined.__assign) || function () {
|
|
754
|
-
__assign$1 = Object.assign || function(t) {
|
|
755
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
756
|
-
s = arguments[i];
|
|
757
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
758
|
-
t[p] = s[p];
|
|
759
|
-
}
|
|
760
|
-
return t;
|
|
761
|
-
};
|
|
762
|
-
return __assign$1.apply(this, arguments);
|
|
763
|
-
};
|
|
764
|
-
var __values$b = (undefined && undefined.__values) || function(o) {
|
|
765
|
-
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
|
|
766
|
-
if (m) return m.call(o);
|
|
767
|
-
if (o && typeof o.length === "number") return {
|
|
768
|
-
next: function () {
|
|
769
|
-
if (o && i >= o.length) o = void 0;
|
|
770
|
-
return { value: o && o[i++], done: !o };
|
|
771
|
-
}
|
|
772
|
-
};
|
|
773
|
-
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
774
|
-
};
|
|
775
|
-
/**
|
|
776
|
-
* This would be simpler to understand as a factory that returns a decorator function,
|
|
777
|
-
* but TypeScript AoT compliation doesn't allow that. This lets you create a decorator
|
|
778
|
-
* that takes in a metadata object as an argument and assigns its values along with
|
|
779
|
-
* default values to the decorated method. The decorator will look like a standard
|
|
780
|
-
* decorator but calling this method and returning the result is the only thing it
|
|
781
|
-
* needs to do.
|
|
782
|
-
*/
|
|
783
529
|
function simpleMetadataDecoratorApplicator(metadata, defaults, target, key, descriptor) {
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
get: function () {
|
|
799
|
-
return updatedMetadata[prop](self);
|
|
800
|
-
},
|
|
801
|
-
});
|
|
802
|
-
}
|
|
803
|
-
else {
|
|
804
|
-
boundFn[prop] = updatedMetadata[prop];
|
|
805
|
-
}
|
|
806
|
-
};
|
|
807
|
-
try {
|
|
808
|
-
for (var _b = __values$b(Object.keys(defaults)), _c = _b.next(); !_c.done; _c = _b.next()) {
|
|
809
|
-
var prop = _c.value;
|
|
810
|
-
_loop_1(prop);
|
|
811
|
-
}
|
|
812
|
-
}
|
|
813
|
-
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
814
|
-
finally {
|
|
815
|
-
try {
|
|
816
|
-
if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
|
|
817
|
-
}
|
|
818
|
-
finally { if (e_1) throw e_1.error; }
|
|
819
|
-
}
|
|
820
|
-
Object.defineProperty(this, key, {
|
|
821
|
-
writable: true,
|
|
822
|
-
configurable: true,
|
|
823
|
-
enumerable: updatedDescriptor.enumerable,
|
|
824
|
-
value: boundFn,
|
|
530
|
+
const updatedDescriptor = descriptor || Object.getOwnPropertyDescriptor(target, key);
|
|
531
|
+
const getter = updatedDescriptor.get;
|
|
532
|
+
const { value } = updatedDescriptor;
|
|
533
|
+
updatedDescriptor.get = function get() {
|
|
534
|
+
const self2 = this;
|
|
535
|
+
const fn = value || getter.call(this);
|
|
536
|
+
const boundFn = fn.bind(this);
|
|
537
|
+
const updatedMetadata = __spreadValues(__spreadValues({}, defaults), metadata);
|
|
538
|
+
for (const prop of Object.keys(defaults)) {
|
|
539
|
+
if (typeof metadata[prop] === "function") {
|
|
540
|
+
Object.defineProperty(boundFn, prop, {
|
|
541
|
+
get() {
|
|
542
|
+
return updatedMetadata[prop](self2);
|
|
543
|
+
}
|
|
825
544
|
});
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
545
|
+
} else {
|
|
546
|
+
boundFn[prop] = updatedMetadata[prop];
|
|
547
|
+
}
|
|
548
|
+
}
|
|
549
|
+
Object.defineProperty(this, key, {
|
|
550
|
+
writable: true,
|
|
551
|
+
configurable: true,
|
|
552
|
+
enumerable: updatedDescriptor.enumerable,
|
|
553
|
+
value: boundFn
|
|
554
|
+
});
|
|
555
|
+
return boundFn;
|
|
556
|
+
};
|
|
557
|
+
delete updatedDescriptor.value;
|
|
558
|
+
delete updatedDescriptor.writable;
|
|
559
|
+
return updatedDescriptor;
|
|
831
560
|
}
|
|
832
|
-
|
|
833
|
-
var __assign = (undefined && undefined.__assign) || function () {
|
|
834
|
-
__assign = Object.assign || function(t) {
|
|
835
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
836
|
-
s = arguments[i];
|
|
837
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
838
|
-
t[p] = s[p];
|
|
839
|
-
}
|
|
840
|
-
return t;
|
|
841
|
-
};
|
|
842
|
-
return __assign.apply(this, arguments);
|
|
843
|
-
};
|
|
844
|
-
/** Method decorator that configures the method to always run the tick after it's invoked */
|
|
845
561
|
function tickDelay(target, propertyKey, descriptor) {
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
originalDescriptorCopy.configurable = true;
|
|
859
|
-
delete originalDescriptorCopy.writable;
|
|
860
|
-
delete originalDescriptorCopy.value;
|
|
861
|
-
return originalDescriptorCopy;
|
|
562
|
+
const originalDescriptorCopy = __spreadValues({}, descriptor);
|
|
563
|
+
originalDescriptorCopy.get = function get() {
|
|
564
|
+
const newDescriptor = __spreadValues({}, originalDescriptorCopy);
|
|
565
|
+
const boundFn = originalDescriptorCopy.value.bind(this);
|
|
566
|
+
newDescriptor.value = () => setTimeout(boundFn, 0);
|
|
567
|
+
Object.defineProperty(this, propertyKey, newDescriptor);
|
|
568
|
+
return newDescriptor.value;
|
|
569
|
+
};
|
|
570
|
+
originalDescriptorCopy.configurable = true;
|
|
571
|
+
delete originalDescriptorCopy.writable;
|
|
572
|
+
delete originalDescriptorCopy.value;
|
|
573
|
+
return originalDescriptorCopy;
|
|
862
574
|
}
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
if (!n || n < range[0]) {
|
|
872
|
-
return range[0];
|
|
873
|
-
}
|
|
874
|
-
if (n > range[1]) {
|
|
875
|
-
return range[1];
|
|
876
|
-
}
|
|
877
|
-
return n;
|
|
575
|
+
function constrain(n, range2) {
|
|
576
|
+
if (!n || n < range2[0]) {
|
|
577
|
+
return range2[0];
|
|
578
|
+
}
|
|
579
|
+
if (n > range2[1]) {
|
|
580
|
+
return range2[1];
|
|
581
|
+
}
|
|
582
|
+
return n;
|
|
878
583
|
}
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
if (decimalPlaces === void 0) { decimalPlaces = 0; }
|
|
888
|
-
var integralAndFractionalSplit = String(num).split(".");
|
|
889
|
-
var allDecimalPlaces = integralAndFractionalSplit.length > 1
|
|
890
|
-
? integralAndFractionalSplit[1].length
|
|
891
|
-
: 0;
|
|
892
|
-
var roundedNum = num;
|
|
893
|
-
for (var i = allDecimalPlaces - 1; i >= decimalPlaces; i -= 1) {
|
|
894
|
-
roundedNum = Number(Math.round(Number(roundedNum + "e" + i)) + "e-" + i);
|
|
895
|
-
}
|
|
896
|
-
return roundedNum;
|
|
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;
|
|
897
592
|
}
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
"KB",
|
|
914
|
-
"MB",
|
|
915
|
-
"GB",
|
|
916
|
-
"TB",
|
|
917
|
-
"PB"][magnitude];
|
|
918
|
-
var decimalPlaces = magnitude ? precision : 0;
|
|
919
|
-
return decimalRound(n / (Math.pow(1024, magnitude)), decimalPlaces).toFixed(decimalPlaces) + unit;
|
|
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 = [
|
|
599
|
+
"B",
|
|
600
|
+
"KB",
|
|
601
|
+
"MB",
|
|
602
|
+
"GB",
|
|
603
|
+
"TB",
|
|
604
|
+
"PB"
|
|
605
|
+
][magnitude];
|
|
606
|
+
const decimalPlaces = magnitude ? precision : 0;
|
|
607
|
+
return decimalRound(n / 1024 ** magnitude, decimalPlaces).toFixed(decimalPlaces) + unit;
|
|
920
608
|
}
|
|
921
|
-
|
|
922
|
-
/**
|
|
923
|
-
* Converts a path to crumbs.
|
|
924
|
-
* For example:
|
|
925
|
-
* "a.b[0].c" -> ["a", "b", "0", "c"]
|
|
926
|
-
*/
|
|
927
609
|
function crumblePath(path) {
|
|
928
|
-
|
|
610
|
+
return typeof path === "string" ? path.match(/[^.[\]]+/g) || [] : [].concat(path);
|
|
929
611
|
}
|
|
930
|
-
|
|
931
|
-
/**
|
|
932
|
-
* Copy a property from one object to another using its property descriptor.
|
|
933
|
-
* In other words, if it's a getter/setter on `sourceObject` it'll be the same
|
|
934
|
-
* getter/setter on `destObject`. If it's just a value it'll be just a value.
|
|
935
|
-
*/
|
|
936
612
|
function copyProperty(propName, sourceObject, destObject) {
|
|
937
|
-
|
|
613
|
+
Object.defineProperty(destObject, propName, Object.getOwnPropertyDescriptor(sourceObject, propName));
|
|
938
614
|
}
|
|
939
|
-
|
|
940
|
-
var
|
|
941
|
-
|
|
942
|
-
/**
|
|
943
|
-
* lodash (Custom Build) <https://lodash.com/>
|
|
944
|
-
* Build: `lodash modularize exports="npm" -o ./`
|
|
945
|
-
* Copyright jQuery Foundation and other contributors <https://jquery.org/>
|
|
946
|
-
* Released under MIT license <https://lodash.com/license>
|
|
947
|
-
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
|
|
948
|
-
* Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
|
949
|
-
*/
|
|
950
|
-
|
|
951
|
-
/** `Object#toString` result references. */
|
|
952
|
-
var objectTag = '[object Object]';
|
|
953
|
-
|
|
954
|
-
/**
|
|
955
|
-
* Checks if `value` is a host object in IE < 9.
|
|
956
|
-
*
|
|
957
|
-
* @private
|
|
958
|
-
* @param {*} value The value to check.
|
|
959
|
-
* @returns {boolean} Returns `true` if `value` is a host object, else `false`.
|
|
960
|
-
*/
|
|
615
|
+
var commonjsGlobal = typeof globalThis !== "undefined" ? globalThis : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : {};
|
|
616
|
+
var objectTag = "[object Object]";
|
|
961
617
|
function isHostObject(value) {
|
|
962
|
-
// Many host objects are `Object` objects that can coerce to strings
|
|
963
|
-
// despite having improperly defined `toString` methods.
|
|
964
618
|
var result = false;
|
|
965
|
-
if (value != null && typeof value.toString !=
|
|
619
|
+
if (value != null && typeof value.toString != "function") {
|
|
966
620
|
try {
|
|
967
|
-
result = !!(value +
|
|
968
|
-
} catch (e) {
|
|
621
|
+
result = !!(value + "");
|
|
622
|
+
} catch (e) {
|
|
623
|
+
}
|
|
969
624
|
}
|
|
970
625
|
return result;
|
|
971
626
|
}
|
|
972
|
-
|
|
973
|
-
/**
|
|
974
|
-
* Creates a unary function that invokes `func` with its argument transformed.
|
|
975
|
-
*
|
|
976
|
-
* @private
|
|
977
|
-
* @param {Function} func The function to wrap.
|
|
978
|
-
* @param {Function} transform The argument transform.
|
|
979
|
-
* @returns {Function} Returns the new function.
|
|
980
|
-
*/
|
|
981
627
|
function overArg(func, transform) {
|
|
982
628
|
return function(arg) {
|
|
983
629
|
return func(transform(arg));
|
|
984
630
|
};
|
|
985
631
|
}
|
|
986
|
-
|
|
987
|
-
/** Used for built-in method references. */
|
|
988
|
-
var funcProto = Function.prototype,
|
|
989
|
-
objectProto = Object.prototype;
|
|
990
|
-
|
|
991
|
-
/** Used to resolve the decompiled source of functions. */
|
|
632
|
+
var funcProto = Function.prototype, objectProto = Object.prototype;
|
|
992
633
|
var funcToString = funcProto.toString;
|
|
993
|
-
|
|
994
|
-
/** Used to check objects for own properties. */
|
|
995
634
|
var hasOwnProperty = objectProto.hasOwnProperty;
|
|
996
|
-
|
|
997
|
-
/** Used to infer the `Object` constructor. */
|
|
998
635
|
var objectCtorString = funcToString.call(Object);
|
|
999
|
-
|
|
1000
|
-
/**
|
|
1001
|
-
* Used to resolve the
|
|
1002
|
-
* [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
|
|
1003
|
-
* of values.
|
|
1004
|
-
*/
|
|
1005
636
|
var objectToString = objectProto.toString;
|
|
1006
|
-
|
|
1007
|
-
/** Built-in value references. */
|
|
1008
637
|
var getPrototype = overArg(Object.getPrototypeOf, Object);
|
|
1009
|
-
|
|
1010
|
-
/**
|
|
1011
|
-
* Checks if `value` is object-like. A value is object-like if it's not `null`
|
|
1012
|
-
* and has a `typeof` result of "object".
|
|
1013
|
-
*
|
|
1014
|
-
* @static
|
|
1015
|
-
* @memberOf _
|
|
1016
|
-
* @since 4.0.0
|
|
1017
|
-
* @category Lang
|
|
1018
|
-
* @param {*} value The value to check.
|
|
1019
|
-
* @returns {boolean} Returns `true` if `value` is object-like, else `false`.
|
|
1020
|
-
* @example
|
|
1021
|
-
*
|
|
1022
|
-
* _.isObjectLike({});
|
|
1023
|
-
* // => true
|
|
1024
|
-
*
|
|
1025
|
-
* _.isObjectLike([1, 2, 3]);
|
|
1026
|
-
* // => true
|
|
1027
|
-
*
|
|
1028
|
-
* _.isObjectLike(_.noop);
|
|
1029
|
-
* // => false
|
|
1030
|
-
*
|
|
1031
|
-
* _.isObjectLike(null);
|
|
1032
|
-
* // => false
|
|
1033
|
-
*/
|
|
1034
638
|
function isObjectLike(value) {
|
|
1035
|
-
return !!value && typeof value ==
|
|
639
|
+
return !!value && typeof value == "object";
|
|
1036
640
|
}
|
|
1037
|
-
|
|
1038
|
-
/**
|
|
1039
|
-
* Checks if `value` is a plain object, that is, an object created by the
|
|
1040
|
-
* `Object` constructor or one with a `[[Prototype]]` of `null`.
|
|
1041
|
-
*
|
|
1042
|
-
* @static
|
|
1043
|
-
* @memberOf _
|
|
1044
|
-
* @since 0.8.0
|
|
1045
|
-
* @category Lang
|
|
1046
|
-
* @param {*} value The value to check.
|
|
1047
|
-
* @returns {boolean} Returns `true` if `value` is a plain object, else `false`.
|
|
1048
|
-
* @example
|
|
1049
|
-
*
|
|
1050
|
-
* function Foo() {
|
|
1051
|
-
* this.a = 1;
|
|
1052
|
-
* }
|
|
1053
|
-
*
|
|
1054
|
-
* _.isPlainObject(new Foo);
|
|
1055
|
-
* // => false
|
|
1056
|
-
*
|
|
1057
|
-
* _.isPlainObject([1, 2, 3]);
|
|
1058
|
-
* // => false
|
|
1059
|
-
*
|
|
1060
|
-
* _.isPlainObject({ 'x': 0, 'y': 0 });
|
|
1061
|
-
* // => true
|
|
1062
|
-
*
|
|
1063
|
-
* _.isPlainObject(Object.create(null));
|
|
1064
|
-
* // => true
|
|
1065
|
-
*/
|
|
1066
641
|
function isPlainObject(value) {
|
|
1067
|
-
if (!isObjectLike(value) ||
|
|
1068
|
-
objectToString.call(value) != objectTag || isHostObject(value)) {
|
|
642
|
+
if (!isObjectLike(value) || objectToString.call(value) != objectTag || isHostObject(value)) {
|
|
1069
643
|
return false;
|
|
1070
644
|
}
|
|
1071
645
|
var proto = getPrototype(value);
|
|
1072
646
|
if (proto === null) {
|
|
1073
647
|
return true;
|
|
1074
648
|
}
|
|
1075
|
-
var Ctor = hasOwnProperty.call(proto,
|
|
1076
|
-
return
|
|
1077
|
-
Ctor instanceof Ctor && funcToString.call(Ctor) == objectCtorString);
|
|
649
|
+
var Ctor = hasOwnProperty.call(proto, "constructor") && proto.constructor;
|
|
650
|
+
return typeof Ctor == "function" && Ctor instanceof Ctor && funcToString.call(Ctor) == objectCtorString;
|
|
1078
651
|
}
|
|
1079
|
-
|
|
1080
652
|
var lodash_isplainobject = isPlainObject;
|
|
1081
|
-
|
|
1082
|
-
var __values$a = (undefined && undefined.__values) || function(o) {
|
|
1083
|
-
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
|
|
1084
|
-
if (m) return m.call(o);
|
|
1085
|
-
if (o && typeof o.length === "number") return {
|
|
1086
|
-
next: function () {
|
|
1087
|
-
if (o && i >= o.length) o = void 0;
|
|
1088
|
-
return { value: o && o[i++], done: !o };
|
|
1089
|
-
}
|
|
1090
|
-
};
|
|
1091
|
-
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
1092
|
-
};
|
|
1093
|
-
/*
|
|
1094
|
-
* Recursive Object.freeze on plain objects and arrays
|
|
1095
|
-
*/
|
|
1096
653
|
function deepFreeze(obj) {
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
var val = obj[key];
|
|
1103
|
-
if (lodash_isplainobject(val) || Array.isArray(val)) {
|
|
1104
|
-
deepFreeze(val);
|
|
1105
|
-
}
|
|
1106
|
-
}
|
|
1107
|
-
}
|
|
1108
|
-
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
1109
|
-
finally {
|
|
1110
|
-
try {
|
|
1111
|
-
if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
|
|
1112
|
-
}
|
|
1113
|
-
finally { if (e_1) throw e_1.error; }
|
|
654
|
+
Object.freeze(obj);
|
|
655
|
+
for (const key of Object.keys(obj)) {
|
|
656
|
+
const val = obj[key];
|
|
657
|
+
if (lodash_isplainobject(val) || Array.isArray(val)) {
|
|
658
|
+
deepFreeze(val);
|
|
1114
659
|
}
|
|
660
|
+
}
|
|
1115
661
|
}
|
|
1116
|
-
|
|
1117
|
-
var __read$3 = (undefined && undefined.__read) || function (o, n) {
|
|
1118
|
-
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
1119
|
-
if (!m) return o;
|
|
1120
|
-
var i = m.call(o), r, ar = [], e;
|
|
1121
|
-
try {
|
|
1122
|
-
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
|
|
1123
|
-
}
|
|
1124
|
-
catch (error) { e = { error: error }; }
|
|
1125
|
-
finally {
|
|
1126
|
-
try {
|
|
1127
|
-
if (r && !r.done && (m = i["return"])) m.call(i);
|
|
1128
|
-
}
|
|
1129
|
-
finally { if (e) throw e.error; }
|
|
1130
|
-
}
|
|
1131
|
-
return ar;
|
|
1132
|
-
};
|
|
1133
|
-
var __spreadArray$1 = (undefined && undefined.__spreadArray) || function (to, from, pack) {
|
|
1134
|
-
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
1135
|
-
if (ar || !(i in from)) {
|
|
1136
|
-
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
1137
|
-
ar[i] = from[i];
|
|
1138
|
-
}
|
|
1139
|
-
}
|
|
1140
|
-
return to.concat(ar || Array.prototype.slice.call(from));
|
|
1141
|
-
};
|
|
1142
|
-
var __values$9 = (undefined && undefined.__values) || function(o) {
|
|
1143
|
-
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
|
|
1144
|
-
if (m) return m.call(o);
|
|
1145
|
-
if (o && typeof o.length === "number") return {
|
|
1146
|
-
next: function () {
|
|
1147
|
-
if (o && i >= o.length) o = void 0;
|
|
1148
|
-
return { value: o && o[i++], done: !o };
|
|
1149
|
-
}
|
|
1150
|
-
};
|
|
1151
|
-
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
1152
|
-
};
|
|
1153
662
|
var DiffChange;
|
|
1154
|
-
(function
|
|
1155
|
-
|
|
1156
|
-
|
|
1157
|
-
|
|
663
|
+
(function(DiffChange2) {
|
|
664
|
+
DiffChange2[DiffChange2["ADDITION"] = 0] = "ADDITION";
|
|
665
|
+
DiffChange2[DiffChange2["DELETION"] = 1] = "DELETION";
|
|
666
|
+
DiffChange2[DiffChange2["ALTERATION"] = 2] = "ALTERATION";
|
|
1158
667
|
})(DiffChange || (DiffChange = {}));
|
|
1159
|
-
function diff(o1, o2, parentPath) {
|
|
1160
|
-
|
|
1161
|
-
|
|
1162
|
-
|
|
1163
|
-
|
|
1164
|
-
|
|
1165
|
-
|
|
1166
|
-
|
|
1167
|
-
|
|
1168
|
-
|
|
1169
|
-
|
|
1170
|
-
|
|
1171
|
-
|
|
1172
|
-
|
|
1173
|
-
|
|
1174
|
-
|
|
1175
|
-
|
|
1176
|
-
|
|
1177
|
-
|
|
1178
|
-
|
|
1179
|
-
|
|
1180
|
-
|
|
1181
|
-
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
|
-
|
|
1185
|
-
|
|
1186
|
-
|
|
1187
|
-
}
|
|
1188
|
-
else if (o1[key] !== o2[key]) {
|
|
1189
|
-
d.push({
|
|
1190
|
-
type: DiffChange.ALTERATION,
|
|
1191
|
-
key: key,
|
|
1192
|
-
parentPath: parentPath,
|
|
1193
|
-
objects: [o1, o2],
|
|
1194
|
-
});
|
|
1195
|
-
}
|
|
1196
|
-
}
|
|
1197
|
-
}
|
|
1198
|
-
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
1199
|
-
finally {
|
|
1200
|
-
try {
|
|
1201
|
-
if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
|
|
1202
|
-
}
|
|
1203
|
-
finally { if (e_1) throw e_1.error; }
|
|
668
|
+
function diff(o1, o2, parentPath = []) {
|
|
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
|
+
});
|
|
1204
696
|
}
|
|
1205
|
-
|
|
697
|
+
}
|
|
698
|
+
return d;
|
|
1206
699
|
}
|
|
1207
|
-
|
|
1208
|
-
var __values$8 = (undefined && undefined.__values) || function(o) {
|
|
1209
|
-
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
|
|
1210
|
-
if (m) return m.call(o);
|
|
1211
|
-
if (o && typeof o.length === "number") return {
|
|
1212
|
-
next: function () {
|
|
1213
|
-
if (o && i >= o.length) o = void 0;
|
|
1214
|
-
return { value: o && o[i++], done: !o };
|
|
1215
|
-
}
|
|
1216
|
-
};
|
|
1217
|
-
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
1218
|
-
};
|
|
1219
|
-
/**
|
|
1220
|
-
* Recursively navigate a nested object & call `fn` for each key/value pair
|
|
1221
|
-
*/
|
|
1222
700
|
function forEachEntryDeep(object, fn) {
|
|
1223
|
-
|
|
1224
|
-
|
|
1225
|
-
|
|
1226
|
-
|
|
1227
|
-
|
|
1228
|
-
|
|
1229
|
-
forEachEntryDeep(value, fn);
|
|
1230
|
-
}
|
|
1231
|
-
else {
|
|
1232
|
-
fn(key, value, object);
|
|
1233
|
-
}
|
|
1234
|
-
}
|
|
1235
|
-
}
|
|
1236
|
-
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
1237
|
-
finally {
|
|
1238
|
-
try {
|
|
1239
|
-
if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
|
|
1240
|
-
}
|
|
1241
|
-
finally { if (e_1) throw e_1.error; }
|
|
701
|
+
for (const key of Object.keys(object)) {
|
|
702
|
+
const value = object[key];
|
|
703
|
+
if (lodash_isplainobject(value) || Array.isArray(value)) {
|
|
704
|
+
forEachEntryDeep(value, fn);
|
|
705
|
+
} else {
|
|
706
|
+
fn(key, value, object);
|
|
1242
707
|
}
|
|
708
|
+
}
|
|
1243
709
|
}
|
|
1244
|
-
|
|
1245
|
-
|
|
1246
|
-
|
|
1247
|
-
|
|
1248
|
-
if (
|
|
1249
|
-
|
|
1250
|
-
|
|
1251
|
-
return { value: o && o[i++], done: !o };
|
|
1252
|
-
}
|
|
1253
|
-
};
|
|
1254
|
-
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
1255
|
-
};
|
|
1256
|
-
/**
|
|
1257
|
-
* Recursively navigate a nested object & call `fn` for each subobject
|
|
1258
|
-
*/
|
|
1259
|
-
function forEachNestedObject(object, fn, path) {
|
|
1260
|
-
var e_1, _a;
|
|
1261
|
-
if (path === void 0) { path = []; }
|
|
1262
|
-
fn(path, object);
|
|
1263
|
-
try {
|
|
1264
|
-
for (var _b = __values$7(Object.keys(object)), _c = _b.next(); !_c.done; _c = _b.next()) {
|
|
1265
|
-
var key = _c.value;
|
|
1266
|
-
var value = object[key];
|
|
1267
|
-
if (lodash_isplainobject(value) || Array.isArray(value)) {
|
|
1268
|
-
var newPath = path.concat(key);
|
|
1269
|
-
forEachNestedObject(value, fn, newPath);
|
|
1270
|
-
}
|
|
1271
|
-
}
|
|
1272
|
-
}
|
|
1273
|
-
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
1274
|
-
finally {
|
|
1275
|
-
try {
|
|
1276
|
-
if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
|
|
1277
|
-
}
|
|
1278
|
-
finally { if (e_1) throw e_1.error; }
|
|
710
|
+
function forEachNestedObject(object, fn, path = []) {
|
|
711
|
+
fn(path, object);
|
|
712
|
+
for (const key of Object.keys(object)) {
|
|
713
|
+
const value = object[key];
|
|
714
|
+
if (lodash_isplainobject(value) || Array.isArray(value)) {
|
|
715
|
+
const newPath = path.concat(key);
|
|
716
|
+
forEachNestedObject(value, fn, newPath);
|
|
1279
717
|
}
|
|
718
|
+
}
|
|
1280
719
|
}
|
|
1281
|
-
|
|
1282
|
-
/**
|
|
1283
|
-
* lodash 4.0.0 (Custom Build) <https://lodash.com/>
|
|
1284
|
-
* Build: `lodash modularize exports="npm" -o ./`
|
|
1285
|
-
* Copyright 2012-2016 The Dojo Foundation <http://dojofoundation.org/>
|
|
1286
|
-
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
|
|
1287
|
-
* Copyright 2009-2016 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
|
1288
|
-
* Available under MIT license <https://lodash.com/license>
|
|
1289
|
-
*/
|
|
1290
|
-
|
|
1291
|
-
/**
|
|
1292
|
-
* Checks if `value` is `null` or `undefined`.
|
|
1293
|
-
*
|
|
1294
|
-
* @static
|
|
1295
|
-
* @memberOf _
|
|
1296
|
-
* @category Lang
|
|
1297
|
-
* @param {*} value The value to check.
|
|
1298
|
-
* @returns {boolean} Returns `true` if `value` is nullish, else `false`.
|
|
1299
|
-
* @example
|
|
1300
|
-
*
|
|
1301
|
-
* _.isNil(null);
|
|
1302
|
-
* // => true
|
|
1303
|
-
*
|
|
1304
|
-
* _.isNil(void 0);
|
|
1305
|
-
* // => true
|
|
1306
|
-
*
|
|
1307
|
-
* _.isNil(NaN);
|
|
1308
|
-
* // => false
|
|
1309
|
-
*/
|
|
1310
720
|
function isNil$1(value) {
|
|
1311
721
|
return value == null;
|
|
1312
722
|
}
|
|
1313
|
-
|
|
1314
723
|
var lodash_isnil = isNil$1;
|
|
1315
|
-
|
|
1316
|
-
|
|
1317
|
-
|
|
1318
|
-
|
|
724
|
+
var isNilImport = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ _mergeNamespaces({
|
|
725
|
+
__proto__: null,
|
|
726
|
+
[Symbol.toStringTag]: "Module",
|
|
727
|
+
"default": lodash_isnil
|
|
1319
728
|
}, [lodash_isnil]));
|
|
1320
|
-
|
|
1321
|
-
|
|
1322
|
-
|
|
1323
|
-
|
|
1324
|
-
|
|
1325
|
-
|
|
1326
|
-
|
|
1327
|
-
|
|
1328
|
-
|
|
1329
|
-
|
|
1330
|
-
|
|
1331
|
-
|
|
1332
|
-
|
|
1333
|
-
|
|
1334
|
-
|
|
1335
|
-
|
|
1336
|
-
/** `Object#toString` result references. */
|
|
1337
|
-
var argsTag = '[object Arguments]',
|
|
1338
|
-
funcTag = '[object Function]',
|
|
1339
|
-
genTag = '[object GeneratorFunction]',
|
|
1340
|
-
mapTag = '[object Map]',
|
|
1341
|
-
objectTag = '[object Object]',
|
|
1342
|
-
promiseTag = '[object Promise]',
|
|
1343
|
-
setTag = '[object Set]',
|
|
1344
|
-
weakMapTag = '[object WeakMap]';
|
|
1345
|
-
|
|
1346
|
-
var dataViewTag = '[object DataView]';
|
|
1347
|
-
|
|
1348
|
-
/**
|
|
1349
|
-
* Used to match `RegExp`
|
|
1350
|
-
* [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).
|
|
1351
|
-
*/
|
|
1352
|
-
var reRegExpChar = /[\\^$.*+?()[\]{}|]/g;
|
|
1353
|
-
|
|
1354
|
-
/** Used to detect host constructors (Safari). */
|
|
1355
|
-
var reIsHostCtor = /^\[object .+?Constructor\]$/;
|
|
1356
|
-
|
|
1357
|
-
/** Detect free variable `global` from Node.js. */
|
|
1358
|
-
var freeGlobal = typeof commonjsGlobal == 'object' && commonjsGlobal && commonjsGlobal.Object === Object && commonjsGlobal;
|
|
1359
|
-
|
|
1360
|
-
/** Detect free variable `self`. */
|
|
1361
|
-
var freeSelf = typeof self == 'object' && self && self.Object === Object && self;
|
|
1362
|
-
|
|
1363
|
-
/** Used as a reference to the global object. */
|
|
1364
|
-
var root = freeGlobal || freeSelf || Function('return this')();
|
|
1365
|
-
|
|
1366
|
-
/** Detect free variable `exports`. */
|
|
1367
|
-
var freeExports = exports && !exports.nodeType && exports;
|
|
1368
|
-
|
|
1369
|
-
/** Detect free variable `module`. */
|
|
1370
|
-
var freeModule = freeExports && 'object' == 'object' && module && !module.nodeType && module;
|
|
1371
|
-
|
|
1372
|
-
/** Detect the popular CommonJS extension `module.exports`. */
|
|
1373
|
-
var moduleExports = freeModule && freeModule.exports === freeExports;
|
|
1374
|
-
|
|
1375
|
-
/**
|
|
1376
|
-
* Gets the value at `key` of `object`.
|
|
1377
|
-
*
|
|
1378
|
-
* @private
|
|
1379
|
-
* @param {Object} [object] The object to query.
|
|
1380
|
-
* @param {string} key The key of the property to get.
|
|
1381
|
-
* @returns {*} Returns the property value.
|
|
1382
|
-
*/
|
|
1383
|
-
function getValue(object, key) {
|
|
1384
|
-
return object == null ? undefined : object[key];
|
|
1385
|
-
}
|
|
1386
|
-
|
|
1387
|
-
/**
|
|
1388
|
-
* Checks if `value` is a host object in IE < 9.
|
|
1389
|
-
*
|
|
1390
|
-
* @private
|
|
1391
|
-
* @param {*} value The value to check.
|
|
1392
|
-
* @returns {boolean} Returns `true` if `value` is a host object, else `false`.
|
|
1393
|
-
*/
|
|
1394
|
-
function isHostObject(value) {
|
|
1395
|
-
// Many host objects are `Object` objects that can coerce to strings
|
|
1396
|
-
// despite having improperly defined `toString` methods.
|
|
1397
|
-
var result = false;
|
|
1398
|
-
if (value != null && typeof value.toString != 'function') {
|
|
1399
|
-
try {
|
|
1400
|
-
result = !!(value + '');
|
|
1401
|
-
} catch (e) {}
|
|
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];
|
|
1402
744
|
}
|
|
1403
|
-
|
|
1404
|
-
|
|
1405
|
-
|
|
1406
|
-
|
|
1407
|
-
|
|
1408
|
-
|
|
1409
|
-
* @private
|
|
1410
|
-
* @param {Function} func The function to wrap.
|
|
1411
|
-
* @param {Function} transform The argument transform.
|
|
1412
|
-
* @returns {Function} Returns the new function.
|
|
1413
|
-
*/
|
|
1414
|
-
function overArg(func, transform) {
|
|
1415
|
-
return function(arg) {
|
|
1416
|
-
return func(transform(arg));
|
|
1417
|
-
};
|
|
1418
|
-
}
|
|
1419
|
-
|
|
1420
|
-
/** Used for built-in method references. */
|
|
1421
|
-
var funcProto = Function.prototype,
|
|
1422
|
-
objectProto = Object.prototype;
|
|
1423
|
-
|
|
1424
|
-
/** Used to detect overreaching core-js shims. */
|
|
1425
|
-
var coreJsData = root['__core-js_shared__'];
|
|
1426
|
-
|
|
1427
|
-
/** Used to detect methods masquerading as native. */
|
|
1428
|
-
var maskSrcKey = (function() {
|
|
1429
|
-
var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');
|
|
1430
|
-
return uid ? ('Symbol(src)_1.' + uid) : '';
|
|
1431
|
-
}());
|
|
1432
|
-
|
|
1433
|
-
/** Used to resolve the decompiled source of functions. */
|
|
1434
|
-
var funcToString = funcProto.toString;
|
|
1435
|
-
|
|
1436
|
-
/** Used to check objects for own properties. */
|
|
1437
|
-
var hasOwnProperty = objectProto.hasOwnProperty;
|
|
1438
|
-
|
|
1439
|
-
/**
|
|
1440
|
-
* Used to resolve the
|
|
1441
|
-
* [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
|
|
1442
|
-
* of values.
|
|
1443
|
-
*/
|
|
1444
|
-
var objectToString = objectProto.toString;
|
|
1445
|
-
|
|
1446
|
-
/** Used to detect if a method is native. */
|
|
1447
|
-
var reIsNative = RegExp('^' +
|
|
1448
|
-
funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\$&')
|
|
1449
|
-
.replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$'
|
|
1450
|
-
);
|
|
1451
|
-
|
|
1452
|
-
/** Built-in value references. */
|
|
1453
|
-
var Buffer = moduleExports ? root.Buffer : undefined,
|
|
1454
|
-
propertyIsEnumerable = objectProto.propertyIsEnumerable;
|
|
1455
|
-
|
|
1456
|
-
/* Built-in method references for those with the same name as other `lodash` methods. */
|
|
1457
|
-
var nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined,
|
|
1458
|
-
nativeKeys = overArg(Object.keys, Object);
|
|
1459
|
-
|
|
1460
|
-
/* Built-in method references that are verified to be native. */
|
|
1461
|
-
var DataView = getNative(root, 'DataView'),
|
|
1462
|
-
Map = getNative(root, 'Map'),
|
|
1463
|
-
Promise = getNative(root, 'Promise'),
|
|
1464
|
-
Set = getNative(root, 'Set'),
|
|
1465
|
-
WeakMap = getNative(root, 'WeakMap');
|
|
1466
|
-
|
|
1467
|
-
/** Detect if properties shadowing those on `Object.prototype` are non-enumerable. */
|
|
1468
|
-
var nonEnumShadows = !propertyIsEnumerable.call({ 'valueOf': 1 }, 'valueOf');
|
|
1469
|
-
|
|
1470
|
-
/** Used to detect maps, sets, and weakmaps. */
|
|
1471
|
-
var dataViewCtorString = toSource(DataView),
|
|
1472
|
-
mapCtorString = toSource(Map),
|
|
1473
|
-
promiseCtorString = toSource(Promise),
|
|
1474
|
-
setCtorString = toSource(Set),
|
|
1475
|
-
weakMapCtorString = toSource(WeakMap);
|
|
1476
|
-
|
|
1477
|
-
/**
|
|
1478
|
-
* The base implementation of `getTag`.
|
|
1479
|
-
*
|
|
1480
|
-
* @private
|
|
1481
|
-
* @param {*} value The value to query.
|
|
1482
|
-
* @returns {string} Returns the `toStringTag`.
|
|
1483
|
-
*/
|
|
1484
|
-
function baseGetTag(value) {
|
|
1485
|
-
return objectToString.call(value);
|
|
1486
|
-
}
|
|
1487
|
-
|
|
1488
|
-
/**
|
|
1489
|
-
* The base implementation of `_.isNative` without bad shim checks.
|
|
1490
|
-
*
|
|
1491
|
-
* @private
|
|
1492
|
-
* @param {*} value The value to check.
|
|
1493
|
-
* @returns {boolean} Returns `true` if `value` is a native function,
|
|
1494
|
-
* else `false`.
|
|
1495
|
-
*/
|
|
1496
|
-
function baseIsNative(value) {
|
|
1497
|
-
if (!isObject(value) || isMasked(value)) {
|
|
1498
|
-
return false;
|
|
1499
|
-
}
|
|
1500
|
-
var pattern = (isFunction(value) || isHostObject(value)) ? reIsNative : reIsHostCtor;
|
|
1501
|
-
return pattern.test(toSource(value));
|
|
1502
|
-
}
|
|
1503
|
-
|
|
1504
|
-
/**
|
|
1505
|
-
* Gets the native function at `key` of `object`.
|
|
1506
|
-
*
|
|
1507
|
-
* @private
|
|
1508
|
-
* @param {Object} object The object to query.
|
|
1509
|
-
* @param {string} key The key of the method to get.
|
|
1510
|
-
* @returns {*} Returns the function if it's native, else `undefined`.
|
|
1511
|
-
*/
|
|
1512
|
-
function getNative(object, key) {
|
|
1513
|
-
var value = getValue(object, key);
|
|
1514
|
-
return baseIsNative(value) ? value : undefined;
|
|
1515
|
-
}
|
|
1516
|
-
|
|
1517
|
-
/**
|
|
1518
|
-
* Gets the `toStringTag` of `value`.
|
|
1519
|
-
*
|
|
1520
|
-
* @private
|
|
1521
|
-
* @param {*} value The value to query.
|
|
1522
|
-
* @returns {string} Returns the `toStringTag`.
|
|
1523
|
-
*/
|
|
1524
|
-
var getTag = baseGetTag;
|
|
1525
|
-
|
|
1526
|
-
// Fallback for data views, maps, sets, and weak maps in IE 11,
|
|
1527
|
-
// for data views in Edge < 14, and promises in Node.js.
|
|
1528
|
-
if ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) ||
|
|
1529
|
-
(Map && getTag(new Map) != mapTag) ||
|
|
1530
|
-
(Promise && getTag(Promise.resolve()) != promiseTag) ||
|
|
1531
|
-
(Set && getTag(new Set) != setTag) ||
|
|
1532
|
-
(WeakMap && getTag(new WeakMap) != weakMapTag)) {
|
|
1533
|
-
getTag = function(value) {
|
|
1534
|
-
var result = objectToString.call(value),
|
|
1535
|
-
Ctor = result == objectTag ? value.constructor : undefined,
|
|
1536
|
-
ctorString = Ctor ? toSource(Ctor) : undefined;
|
|
1537
|
-
|
|
1538
|
-
if (ctorString) {
|
|
1539
|
-
switch (ctorString) {
|
|
1540
|
-
case dataViewCtorString: return dataViewTag;
|
|
1541
|
-
case mapCtorString: return mapTag;
|
|
1542
|
-
case promiseCtorString: return promiseTag;
|
|
1543
|
-
case setCtorString: return setTag;
|
|
1544
|
-
case weakMapCtorString: return weakMapTag;
|
|
745
|
+
function isHostObject2(value) {
|
|
746
|
+
var result = false;
|
|
747
|
+
if (value != null && typeof value.toString != "function") {
|
|
748
|
+
try {
|
|
749
|
+
result = !!(value + "");
|
|
750
|
+
} catch (e) {
|
|
1545
751
|
}
|
|
1546
752
|
}
|
|
1547
753
|
return result;
|
|
1548
|
-
};
|
|
1549
|
-
}
|
|
1550
|
-
|
|
1551
|
-
/**
|
|
1552
|
-
* Checks if `func` has its source masked.
|
|
1553
|
-
*
|
|
1554
|
-
* @private
|
|
1555
|
-
* @param {Function} func The function to check.
|
|
1556
|
-
* @returns {boolean} Returns `true` if `func` is masked, else `false`.
|
|
1557
|
-
*/
|
|
1558
|
-
function isMasked(func) {
|
|
1559
|
-
return !!maskSrcKey && (maskSrcKey in func);
|
|
1560
|
-
}
|
|
1561
|
-
|
|
1562
|
-
/**
|
|
1563
|
-
* Checks if `value` is likely a prototype object.
|
|
1564
|
-
*
|
|
1565
|
-
* @private
|
|
1566
|
-
* @param {*} value The value to check.
|
|
1567
|
-
* @returns {boolean} Returns `true` if `value` is a prototype, else `false`.
|
|
1568
|
-
*/
|
|
1569
|
-
function isPrototype(value) {
|
|
1570
|
-
var Ctor = value && value.constructor,
|
|
1571
|
-
proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto;
|
|
1572
|
-
|
|
1573
|
-
return value === proto;
|
|
1574
|
-
}
|
|
1575
|
-
|
|
1576
|
-
/**
|
|
1577
|
-
* Converts `func` to its source code.
|
|
1578
|
-
*
|
|
1579
|
-
* @private
|
|
1580
|
-
* @param {Function} func The function to process.
|
|
1581
|
-
* @returns {string} Returns the source code.
|
|
1582
|
-
*/
|
|
1583
|
-
function toSource(func) {
|
|
1584
|
-
if (func != null) {
|
|
1585
|
-
try {
|
|
1586
|
-
return funcToString.call(func);
|
|
1587
|
-
} catch (e) {}
|
|
1588
|
-
try {
|
|
1589
|
-
return (func + '');
|
|
1590
|
-
} catch (e) {}
|
|
1591
|
-
}
|
|
1592
|
-
return '';
|
|
1593
|
-
}
|
|
1594
|
-
|
|
1595
|
-
/**
|
|
1596
|
-
* Checks if `value` is likely an `arguments` object.
|
|
1597
|
-
*
|
|
1598
|
-
* @static
|
|
1599
|
-
* @memberOf _
|
|
1600
|
-
* @since 0.1.0
|
|
1601
|
-
* @category Lang
|
|
1602
|
-
* @param {*} value The value to check.
|
|
1603
|
-
* @returns {boolean} Returns `true` if `value` is an `arguments` object,
|
|
1604
|
-
* else `false`.
|
|
1605
|
-
* @example
|
|
1606
|
-
*
|
|
1607
|
-
* _.isArguments(function() { return arguments; }());
|
|
1608
|
-
* // => true
|
|
1609
|
-
*
|
|
1610
|
-
* _.isArguments([1, 2, 3]);
|
|
1611
|
-
* // => false
|
|
1612
|
-
*/
|
|
1613
|
-
function isArguments(value) {
|
|
1614
|
-
// Safari 8.1 makes `arguments.callee` enumerable in strict mode.
|
|
1615
|
-
return isArrayLikeObject(value) && hasOwnProperty.call(value, 'callee') &&
|
|
1616
|
-
(!propertyIsEnumerable.call(value, 'callee') || objectToString.call(value) == argsTag);
|
|
1617
|
-
}
|
|
1618
|
-
|
|
1619
|
-
/**
|
|
1620
|
-
* Checks if `value` is classified as an `Array` object.
|
|
1621
|
-
*
|
|
1622
|
-
* @static
|
|
1623
|
-
* @memberOf _
|
|
1624
|
-
* @since 0.1.0
|
|
1625
|
-
* @category Lang
|
|
1626
|
-
* @param {*} value The value to check.
|
|
1627
|
-
* @returns {boolean} Returns `true` if `value` is an array, else `false`.
|
|
1628
|
-
* @example
|
|
1629
|
-
*
|
|
1630
|
-
* _.isArray([1, 2, 3]);
|
|
1631
|
-
* // => true
|
|
1632
|
-
*
|
|
1633
|
-
* _.isArray(document.body.children);
|
|
1634
|
-
* // => false
|
|
1635
|
-
*
|
|
1636
|
-
* _.isArray('abc');
|
|
1637
|
-
* // => false
|
|
1638
|
-
*
|
|
1639
|
-
* _.isArray(_.noop);
|
|
1640
|
-
* // => false
|
|
1641
|
-
*/
|
|
1642
|
-
var isArray = Array.isArray;
|
|
1643
|
-
|
|
1644
|
-
/**
|
|
1645
|
-
* Checks if `value` is array-like. A value is considered array-like if it's
|
|
1646
|
-
* not a function and has a `value.length` that's an integer greater than or
|
|
1647
|
-
* equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.
|
|
1648
|
-
*
|
|
1649
|
-
* @static
|
|
1650
|
-
* @memberOf _
|
|
1651
|
-
* @since 4.0.0
|
|
1652
|
-
* @category Lang
|
|
1653
|
-
* @param {*} value The value to check.
|
|
1654
|
-
* @returns {boolean} Returns `true` if `value` is array-like, else `false`.
|
|
1655
|
-
* @example
|
|
1656
|
-
*
|
|
1657
|
-
* _.isArrayLike([1, 2, 3]);
|
|
1658
|
-
* // => true
|
|
1659
|
-
*
|
|
1660
|
-
* _.isArrayLike(document.body.children);
|
|
1661
|
-
* // => true
|
|
1662
|
-
*
|
|
1663
|
-
* _.isArrayLike('abc');
|
|
1664
|
-
* // => true
|
|
1665
|
-
*
|
|
1666
|
-
* _.isArrayLike(_.noop);
|
|
1667
|
-
* // => false
|
|
1668
|
-
*/
|
|
1669
|
-
function isArrayLike(value) {
|
|
1670
|
-
return value != null && isLength(value.length) && !isFunction(value);
|
|
1671
|
-
}
|
|
1672
|
-
|
|
1673
|
-
/**
|
|
1674
|
-
* This method is like `_.isArrayLike` except that it also checks if `value`
|
|
1675
|
-
* is an object.
|
|
1676
|
-
*
|
|
1677
|
-
* @static
|
|
1678
|
-
* @memberOf _
|
|
1679
|
-
* @since 4.0.0
|
|
1680
|
-
* @category Lang
|
|
1681
|
-
* @param {*} value The value to check.
|
|
1682
|
-
* @returns {boolean} Returns `true` if `value` is an array-like object,
|
|
1683
|
-
* else `false`.
|
|
1684
|
-
* @example
|
|
1685
|
-
*
|
|
1686
|
-
* _.isArrayLikeObject([1, 2, 3]);
|
|
1687
|
-
* // => true
|
|
1688
|
-
*
|
|
1689
|
-
* _.isArrayLikeObject(document.body.children);
|
|
1690
|
-
* // => true
|
|
1691
|
-
*
|
|
1692
|
-
* _.isArrayLikeObject('abc');
|
|
1693
|
-
* // => false
|
|
1694
|
-
*
|
|
1695
|
-
* _.isArrayLikeObject(_.noop);
|
|
1696
|
-
* // => false
|
|
1697
|
-
*/
|
|
1698
|
-
function isArrayLikeObject(value) {
|
|
1699
|
-
return isObjectLike(value) && isArrayLike(value);
|
|
1700
|
-
}
|
|
1701
|
-
|
|
1702
|
-
/**
|
|
1703
|
-
* Checks if `value` is a buffer.
|
|
1704
|
-
*
|
|
1705
|
-
* @static
|
|
1706
|
-
* @memberOf _
|
|
1707
|
-
* @since 4.3.0
|
|
1708
|
-
* @category Lang
|
|
1709
|
-
* @param {*} value The value to check.
|
|
1710
|
-
* @returns {boolean} Returns `true` if `value` is a buffer, else `false`.
|
|
1711
|
-
* @example
|
|
1712
|
-
*
|
|
1713
|
-
* _.isBuffer(new Buffer(2));
|
|
1714
|
-
* // => true
|
|
1715
|
-
*
|
|
1716
|
-
* _.isBuffer(new Uint8Array(2));
|
|
1717
|
-
* // => false
|
|
1718
|
-
*/
|
|
1719
|
-
var isBuffer = nativeIsBuffer || stubFalse;
|
|
1720
|
-
|
|
1721
|
-
/**
|
|
1722
|
-
* Checks if `value` is an empty object, collection, map, or set.
|
|
1723
|
-
*
|
|
1724
|
-
* Objects are considered empty if they have no own enumerable string keyed
|
|
1725
|
-
* properties.
|
|
1726
|
-
*
|
|
1727
|
-
* Array-like values such as `arguments` objects, arrays, buffers, strings, or
|
|
1728
|
-
* jQuery-like collections are considered empty if they have a `length` of `0`.
|
|
1729
|
-
* Similarly, maps and sets are considered empty if they have a `size` of `0`.
|
|
1730
|
-
*
|
|
1731
|
-
* @static
|
|
1732
|
-
* @memberOf _
|
|
1733
|
-
* @since 0.1.0
|
|
1734
|
-
* @category Lang
|
|
1735
|
-
* @param {*} value The value to check.
|
|
1736
|
-
* @returns {boolean} Returns `true` if `value` is empty, else `false`.
|
|
1737
|
-
* @example
|
|
1738
|
-
*
|
|
1739
|
-
* _.isEmpty(null);
|
|
1740
|
-
* // => true
|
|
1741
|
-
*
|
|
1742
|
-
* _.isEmpty(true);
|
|
1743
|
-
* // => true
|
|
1744
|
-
*
|
|
1745
|
-
* _.isEmpty(1);
|
|
1746
|
-
* // => true
|
|
1747
|
-
*
|
|
1748
|
-
* _.isEmpty([1, 2, 3]);
|
|
1749
|
-
* // => false
|
|
1750
|
-
*
|
|
1751
|
-
* _.isEmpty({ 'a': 1 });
|
|
1752
|
-
* // => false
|
|
1753
|
-
*/
|
|
1754
|
-
function isEmpty(value) {
|
|
1755
|
-
if (isArrayLike(value) &&
|
|
1756
|
-
(isArray(value) || typeof value == 'string' ||
|
|
1757
|
-
typeof value.splice == 'function' || isBuffer(value) || isArguments(value))) {
|
|
1758
|
-
return !value.length;
|
|
1759
754
|
}
|
|
1760
|
-
|
|
1761
|
-
|
|
1762
|
-
|
|
755
|
+
function overArg2(func, transform) {
|
|
756
|
+
return function(arg) {
|
|
757
|
+
return func(transform(arg));
|
|
758
|
+
};
|
|
1763
759
|
}
|
|
1764
|
-
|
|
1765
|
-
|
|
760
|
+
var funcProto2 = Function.prototype, objectProto2 = Object.prototype;
|
|
761
|
+
var coreJsData = root["__core-js_shared__"];
|
|
762
|
+
var maskSrcKey = function() {
|
|
763
|
+
var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || "");
|
|
764
|
+
return uid ? "Symbol(src)_1." + uid : "";
|
|
765
|
+
}();
|
|
766
|
+
var funcToString2 = funcProto2.toString;
|
|
767
|
+
var hasOwnProperty2 = objectProto2.hasOwnProperty;
|
|
768
|
+
var objectToString2 = objectProto2.toString;
|
|
769
|
+
var reIsNative = RegExp("^" + funcToString2.call(hasOwnProperty2).replace(reRegExpChar, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$");
|
|
770
|
+
var Buffer2 = moduleExports ? root.Buffer : void 0, propertyIsEnumerable = objectProto2.propertyIsEnumerable;
|
|
771
|
+
var nativeIsBuffer = Buffer2 ? Buffer2.isBuffer : void 0, nativeKeys = overArg2(Object.keys, Object);
|
|
772
|
+
var DataView = getNative(root, "DataView"), Map = getNative(root, "Map"), Promise2 = getNative(root, "Promise"), Set2 = getNative(root, "Set"), WeakMap = getNative(root, "WeakMap");
|
|
773
|
+
var nonEnumShadows = !propertyIsEnumerable.call({ "valueOf": 1 }, "valueOf");
|
|
774
|
+
var dataViewCtorString = toSource(DataView), mapCtorString = toSource(Map), promiseCtorString = toSource(Promise2), setCtorString = toSource(Set2), weakMapCtorString = toSource(WeakMap);
|
|
775
|
+
function baseGetTag(value) {
|
|
776
|
+
return objectToString2.call(value);
|
|
1766
777
|
}
|
|
1767
|
-
|
|
1768
|
-
if (
|
|
778
|
+
function baseIsNative(value) {
|
|
779
|
+
if (!isObject(value) || isMasked(value)) {
|
|
1769
780
|
return false;
|
|
1770
781
|
}
|
|
782
|
+
var pattern = isFunction(value) || isHostObject2(value) ? reIsNative : reIsHostCtor;
|
|
783
|
+
return pattern.test(toSource(value));
|
|
1771
784
|
}
|
|
1772
|
-
|
|
1773
|
-
|
|
1774
|
-
|
|
1775
|
-
|
|
1776
|
-
|
|
1777
|
-
|
|
1778
|
-
|
|
1779
|
-
|
|
1780
|
-
|
|
1781
|
-
|
|
1782
|
-
|
|
1783
|
-
|
|
1784
|
-
|
|
1785
|
-
|
|
1786
|
-
|
|
1787
|
-
|
|
1788
|
-
|
|
1789
|
-
|
|
1790
|
-
|
|
1791
|
-
|
|
1792
|
-
function isFunction(value) {
|
|
1793
|
-
// The use of `Object#toString` avoids issues with the `typeof` operator
|
|
1794
|
-
// in Safari 8-9 which returns 'object' for typed array and other constructors.
|
|
1795
|
-
var tag = isObject(value) ? objectToString.call(value) : '';
|
|
1796
|
-
return tag == funcTag || tag == genTag;
|
|
1797
|
-
}
|
|
1798
|
-
|
|
1799
|
-
/**
|
|
1800
|
-
* Checks if `value` is a valid array-like length.
|
|
1801
|
-
*
|
|
1802
|
-
* **Note:** This method is loosely based on
|
|
1803
|
-
* [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).
|
|
1804
|
-
*
|
|
1805
|
-
* @static
|
|
1806
|
-
* @memberOf _
|
|
1807
|
-
* @since 4.0.0
|
|
1808
|
-
* @category Lang
|
|
1809
|
-
* @param {*} value The value to check.
|
|
1810
|
-
* @returns {boolean} Returns `true` if `value` is a valid length, else `false`.
|
|
1811
|
-
* @example
|
|
1812
|
-
*
|
|
1813
|
-
* _.isLength(3);
|
|
1814
|
-
* // => true
|
|
1815
|
-
*
|
|
1816
|
-
* _.isLength(Number.MIN_VALUE);
|
|
1817
|
-
* // => false
|
|
1818
|
-
*
|
|
1819
|
-
* _.isLength(Infinity);
|
|
1820
|
-
* // => false
|
|
1821
|
-
*
|
|
1822
|
-
* _.isLength('3');
|
|
1823
|
-
* // => false
|
|
1824
|
-
*/
|
|
1825
|
-
function isLength(value) {
|
|
1826
|
-
return typeof value == 'number' &&
|
|
1827
|
-
value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
|
|
1828
|
-
}
|
|
1829
|
-
|
|
1830
|
-
/**
|
|
1831
|
-
* Checks if `value` is the
|
|
1832
|
-
* [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)
|
|
1833
|
-
* of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
|
|
1834
|
-
*
|
|
1835
|
-
* @static
|
|
1836
|
-
* @memberOf _
|
|
1837
|
-
* @since 0.1.0
|
|
1838
|
-
* @category Lang
|
|
1839
|
-
* @param {*} value The value to check.
|
|
1840
|
-
* @returns {boolean} Returns `true` if `value` is an object, else `false`.
|
|
1841
|
-
* @example
|
|
1842
|
-
*
|
|
1843
|
-
* _.isObject({});
|
|
1844
|
-
* // => true
|
|
1845
|
-
*
|
|
1846
|
-
* _.isObject([1, 2, 3]);
|
|
1847
|
-
* // => true
|
|
1848
|
-
*
|
|
1849
|
-
* _.isObject(_.noop);
|
|
1850
|
-
* // => true
|
|
1851
|
-
*
|
|
1852
|
-
* _.isObject(null);
|
|
1853
|
-
* // => false
|
|
1854
|
-
*/
|
|
1855
|
-
function isObject(value) {
|
|
1856
|
-
var type = typeof value;
|
|
1857
|
-
return !!value && (type == 'object' || type == 'function');
|
|
1858
|
-
}
|
|
1859
|
-
|
|
1860
|
-
/**
|
|
1861
|
-
* Checks if `value` is object-like. A value is object-like if it's not `null`
|
|
1862
|
-
* and has a `typeof` result of "object".
|
|
1863
|
-
*
|
|
1864
|
-
* @static
|
|
1865
|
-
* @memberOf _
|
|
1866
|
-
* @since 4.0.0
|
|
1867
|
-
* @category Lang
|
|
1868
|
-
* @param {*} value The value to check.
|
|
1869
|
-
* @returns {boolean} Returns `true` if `value` is object-like, else `false`.
|
|
1870
|
-
* @example
|
|
1871
|
-
*
|
|
1872
|
-
* _.isObjectLike({});
|
|
1873
|
-
* // => true
|
|
1874
|
-
*
|
|
1875
|
-
* _.isObjectLike([1, 2, 3]);
|
|
1876
|
-
* // => true
|
|
1877
|
-
*
|
|
1878
|
-
* _.isObjectLike(_.noop);
|
|
1879
|
-
* // => false
|
|
1880
|
-
*
|
|
1881
|
-
* _.isObjectLike(null);
|
|
1882
|
-
* // => false
|
|
1883
|
-
*/
|
|
1884
|
-
function isObjectLike(value) {
|
|
1885
|
-
return !!value && typeof value == 'object';
|
|
1886
|
-
}
|
|
1887
|
-
|
|
1888
|
-
/**
|
|
1889
|
-
* This method returns `false`.
|
|
1890
|
-
*
|
|
1891
|
-
* @static
|
|
1892
|
-
* @memberOf _
|
|
1893
|
-
* @since 4.13.0
|
|
1894
|
-
* @category Util
|
|
1895
|
-
* @returns {boolean} Returns `false`.
|
|
1896
|
-
* @example
|
|
1897
|
-
*
|
|
1898
|
-
* _.times(2, _.stubFalse);
|
|
1899
|
-
* // => [false, false]
|
|
1900
|
-
*/
|
|
1901
|
-
function stubFalse() {
|
|
1902
|
-
return false;
|
|
1903
|
-
}
|
|
1904
|
-
|
|
1905
|
-
module.exports = isEmpty;
|
|
1906
|
-
}(lodash_isempty$1, lodash_isempty$1.exports));
|
|
1907
|
-
|
|
1908
|
-
var lodash_isempty = lodash_isempty$1.exports;
|
|
1909
|
-
|
|
1910
|
-
var isEmptyImport = /*#__PURE__*/Object.freeze(/*#__PURE__*/_mergeNamespaces({
|
|
1911
|
-
__proto__: null,
|
|
1912
|
-
'default': lodash_isempty
|
|
1913
|
-
}, [lodash_isempty$1.exports]));
|
|
1914
|
-
|
|
1915
|
-
var __values$6 = (undefined && undefined.__values) || function(o) {
|
|
1916
|
-
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
|
|
1917
|
-
if (m) return m.call(o);
|
|
1918
|
-
if (o && typeof o.length === "number") return {
|
|
1919
|
-
next: function () {
|
|
1920
|
-
if (o && i >= o.length) o = void 0;
|
|
1921
|
-
return { value: o && o[i++], done: !o };
|
|
785
|
+
function getNative(object, key) {
|
|
786
|
+
var value = getValue(object, key);
|
|
787
|
+
return baseIsNative(value) ? value : void 0;
|
|
788
|
+
}
|
|
789
|
+
var getTag = baseGetTag;
|
|
790
|
+
if (DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag || Map && getTag(new Map()) != mapTag || Promise2 && getTag(Promise2.resolve()) != promiseTag || Set2 && getTag(new Set2()) != setTag || WeakMap && getTag(new WeakMap()) != weakMapTag) {
|
|
791
|
+
getTag = function(value) {
|
|
792
|
+
var result = objectToString2.call(value), Ctor = result == objectTag2 ? value.constructor : void 0, ctorString = Ctor ? toSource(Ctor) : void 0;
|
|
793
|
+
if (ctorString) {
|
|
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;
|
|
1922
805
|
}
|
|
806
|
+
}
|
|
807
|
+
return result;
|
|
1923
808
|
};
|
|
1924
|
-
|
|
1925
|
-
|
|
1926
|
-
|
|
1927
|
-
|
|
1928
|
-
|
|
1929
|
-
var
|
|
1930
|
-
|
|
1931
|
-
|
|
809
|
+
}
|
|
810
|
+
function isMasked(func) {
|
|
811
|
+
return !!maskSrcKey && maskSrcKey in func;
|
|
812
|
+
}
|
|
813
|
+
function isPrototype(value) {
|
|
814
|
+
var Ctor = value && value.constructor, proto = typeof Ctor == "function" && Ctor.prototype || objectProto2;
|
|
815
|
+
return value === proto;
|
|
816
|
+
}
|
|
817
|
+
function toSource(func) {
|
|
818
|
+
if (func != null) {
|
|
819
|
+
try {
|
|
820
|
+
return funcToString2.call(func);
|
|
821
|
+
} catch (e) {
|
|
822
|
+
}
|
|
823
|
+
try {
|
|
824
|
+
return func + "";
|
|
825
|
+
} catch (e) {
|
|
826
|
+
}
|
|
1932
827
|
}
|
|
1933
|
-
|
|
1934
|
-
|
|
1935
|
-
|
|
1936
|
-
|
|
1937
|
-
|
|
1938
|
-
|
|
828
|
+
return "";
|
|
829
|
+
}
|
|
830
|
+
function isArguments(value) {
|
|
831
|
+
return isArrayLikeObject(value) && hasOwnProperty2.call(value, "callee") && (!propertyIsEnumerable.call(value, "callee") || objectToString2.call(value) == argsTag);
|
|
832
|
+
}
|
|
833
|
+
var isArray = Array.isArray;
|
|
834
|
+
function isArrayLike(value) {
|
|
835
|
+
return value != null && isLength(value.length) && !isFunction(value);
|
|
836
|
+
}
|
|
837
|
+
function isArrayLikeObject(value) {
|
|
838
|
+
return isObjectLike2(value) && isArrayLike(value);
|
|
839
|
+
}
|
|
840
|
+
var isBuffer = nativeIsBuffer || stubFalse;
|
|
841
|
+
function isEmpty2(value) {
|
|
842
|
+
if (isArrayLike(value) && (isArray(value) || typeof value == "string" || typeof value.splice == "function" || isBuffer(value) || isArguments(value))) {
|
|
843
|
+
return !value.length;
|
|
1939
844
|
}
|
|
1940
|
-
|
|
1941
|
-
|
|
1942
|
-
|
|
1943
|
-
var isEmpty$1 = lodash_isempty || isEmptyImport;
|
|
1944
|
-
/**
|
|
1945
|
-
* Get the value at `path` starting from `object`.
|
|
1946
|
-
* Allows optional chaining, e.g. `get(obj, 'a.b?.c')`
|
|
1947
|
-
*/
|
|
1948
|
-
function getPath(object, path, defaultValue, allOptional) {
|
|
1949
|
-
var e_1, _a, _b;
|
|
1950
|
-
if (allOptional === void 0) { allOptional = false; }
|
|
1951
|
-
if (isEmpty$1(path)) {
|
|
1952
|
-
return object;
|
|
845
|
+
var tag = getTag(value);
|
|
846
|
+
if (tag == mapTag || tag == setTag) {
|
|
847
|
+
return !value.size;
|
|
1953
848
|
}
|
|
1954
|
-
|
|
1955
|
-
|
|
1956
|
-
for (var _c = __values$6(crumblePath(path)), _d = _c.next(); !_d.done; _d = _c.next()) {
|
|
1957
|
-
var crumb = _d.value;
|
|
1958
|
-
var key = crumb;
|
|
1959
|
-
var optional = void 0;
|
|
1960
|
-
if (typeof crumb === "string") {
|
|
1961
|
-
_b = __read$2(/^([^?]+)(\?)?$/.exec(crumb), 3), key = _b[1], optional = _b[2];
|
|
1962
|
-
}
|
|
1963
|
-
value = value[key];
|
|
1964
|
-
if (isNil(value) && (optional || allOptional)) {
|
|
1965
|
-
return defaultValue;
|
|
1966
|
-
}
|
|
1967
|
-
}
|
|
849
|
+
if (nonEnumShadows || isPrototype(value)) {
|
|
850
|
+
return !nativeKeys(value).length;
|
|
1968
851
|
}
|
|
1969
|
-
|
|
1970
|
-
|
|
1971
|
-
|
|
1972
|
-
|
|
1973
|
-
}
|
|
1974
|
-
finally { if (e_1) throw e_1.error; }
|
|
852
|
+
for (var key in value) {
|
|
853
|
+
if (hasOwnProperty2.call(value, key)) {
|
|
854
|
+
return false;
|
|
855
|
+
}
|
|
1975
856
|
}
|
|
1976
|
-
return
|
|
1977
|
-
}
|
|
1978
|
-
|
|
1979
|
-
var
|
|
1980
|
-
|
|
1981
|
-
|
|
1982
|
-
|
|
1983
|
-
|
|
1984
|
-
|
|
1985
|
-
|
|
1986
|
-
|
|
1987
|
-
|
|
1988
|
-
|
|
1989
|
-
|
|
1990
|
-
|
|
1991
|
-
|
|
1992
|
-
|
|
1993
|
-
|
|
1994
|
-
|
|
1995
|
-
|
|
1996
|
-
|
|
1997
|
-
|
|
857
|
+
return true;
|
|
858
|
+
}
|
|
859
|
+
function isFunction(value) {
|
|
860
|
+
var tag = isObject(value) ? objectToString2.call(value) : "";
|
|
861
|
+
return tag == funcTag || tag == genTag;
|
|
862
|
+
}
|
|
863
|
+
function isLength(value) {
|
|
864
|
+
return typeof value == "number" && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
|
|
865
|
+
}
|
|
866
|
+
function isObject(value) {
|
|
867
|
+
var type = typeof value;
|
|
868
|
+
return !!value && (type == "object" || type == "function");
|
|
869
|
+
}
|
|
870
|
+
function isObjectLike2(value) {
|
|
871
|
+
return !!value && typeof value == "object";
|
|
872
|
+
}
|
|
873
|
+
function stubFalse() {
|
|
874
|
+
return false;
|
|
875
|
+
}
|
|
876
|
+
module.exports = isEmpty2;
|
|
877
|
+
})(lodash_isempty$1, lodash_isempty$1.exports);
|
|
878
|
+
var lodash_isempty = lodash_isempty$1.exports;
|
|
879
|
+
var isEmptyImport = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ _mergeNamespaces({
|
|
880
|
+
__proto__: null,
|
|
881
|
+
[Symbol.toStringTag]: "Module",
|
|
882
|
+
"default": lodash_isempty
|
|
883
|
+
}, [lodash_isempty$1.exports]));
|
|
884
|
+
const isNil = lodash_isnil || isNilImport;
|
|
885
|
+
const isEmpty$1 = lodash_isempty || isEmptyImport;
|
|
886
|
+
function getPath(object, path, defaultValue, allOptional = false) {
|
|
887
|
+
if (isEmpty$1(path)) {
|
|
888
|
+
return object;
|
|
889
|
+
}
|
|
890
|
+
let value = object;
|
|
891
|
+
for (const crumb of crumblePath(path)) {
|
|
892
|
+
let key = crumb;
|
|
893
|
+
let optional;
|
|
894
|
+
if (typeof crumb === "string") {
|
|
895
|
+
[
|
|
896
|
+
,
|
|
897
|
+
key,
|
|
898
|
+
optional
|
|
899
|
+
] = /^([^?]+)(\?)?$/.exec(crumb);
|
|
1998
900
|
}
|
|
1999
|
-
|
|
2000
|
-
|
|
2001
|
-
|
|
2002
|
-
for (var _b = __values$5(Object.keys(obj)), _c = _b.next(); !_c.done; _c = _b.next()) {
|
|
2003
|
-
var k = _c.value;
|
|
2004
|
-
if (!keySet.has(k)) {
|
|
2005
|
-
result[k] = obj[k];
|
|
2006
|
-
}
|
|
2007
|
-
}
|
|
901
|
+
value = value[key];
|
|
902
|
+
if (isNil(value) && (optional || allOptional)) {
|
|
903
|
+
return defaultValue;
|
|
2008
904
|
}
|
|
2009
|
-
|
|
2010
|
-
|
|
2011
|
-
|
|
2012
|
-
|
|
2013
|
-
|
|
2014
|
-
|
|
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];
|
|
2015
914
|
}
|
|
2016
|
-
|
|
915
|
+
}
|
|
916
|
+
return result;
|
|
2017
917
|
}
|
|
2018
|
-
|
|
2019
|
-
var __values$4 = (undefined && undefined.__values) || function(o) {
|
|
2020
|
-
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
|
|
2021
|
-
if (m) return m.call(o);
|
|
2022
|
-
if (o && typeof o.length === "number") return {
|
|
2023
|
-
next: function () {
|
|
2024
|
-
if (o && i >= o.length) o = void 0;
|
|
2025
|
-
return { value: o && o[i++], done: !o };
|
|
2026
|
-
}
|
|
2027
|
-
};
|
|
2028
|
-
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
2029
|
-
};
|
|
2030
|
-
var isEmpty = lodash_isempty || isEmptyImport;
|
|
2031
|
-
/** Set the value at `path` on `object`. */
|
|
918
|
+
const isEmpty = lodash_isempty || isEmptyImport;
|
|
2032
919
|
function setPath(object, path, newValue) {
|
|
2033
|
-
|
|
2034
|
-
|
|
2035
|
-
|
|
2036
|
-
|
|
2037
|
-
|
|
2038
|
-
|
|
2039
|
-
|
|
2040
|
-
|
|
2041
|
-
|
|
2042
|
-
|
|
2043
|
-
|
|
2044
|
-
|
|
2045
|
-
|
|
2046
|
-
current = current[crumb];
|
|
2047
|
-
if (typeof current !== "object") {
|
|
2048
|
-
throw new Error("Cannot set value at given path: Path deadends at " + String(crumb));
|
|
2049
|
-
}
|
|
2050
|
-
}
|
|
2051
|
-
}
|
|
2052
|
-
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
2053
|
-
finally {
|
|
2054
|
-
try {
|
|
2055
|
-
if (crumbs_1_1 && !crumbs_1_1.done && (_a = crumbs_1.return)) _a.call(crumbs_1);
|
|
2056
|
-
}
|
|
2057
|
-
finally { if (e_1) throw e_1.error; }
|
|
920
|
+
if (typeof object !== "object") {
|
|
921
|
+
throw new Error("object is required");
|
|
922
|
+
}
|
|
923
|
+
if (isEmpty(path)) {
|
|
924
|
+
throw new Error("path is required");
|
|
925
|
+
}
|
|
926
|
+
const crumbs = crumblePath(path);
|
|
927
|
+
const finalCrumb = crumbs.splice(crumbs.length - 1, 1)[0];
|
|
928
|
+
let current = object;
|
|
929
|
+
for (const crumb of crumbs) {
|
|
930
|
+
current = current[crumb];
|
|
931
|
+
if (typeof current !== "object") {
|
|
932
|
+
throw new Error(`Cannot set value at given path: Path deadends at ${String(crumb)}`);
|
|
2058
933
|
}
|
|
2059
|
-
|
|
934
|
+
}
|
|
935
|
+
current[finalCrumb] = newValue;
|
|
2060
936
|
}
|
|
2061
|
-
|
|
2062
|
-
|
|
2063
|
-
|
|
2064
|
-
|
|
2065
|
-
|
|
2066
|
-
|
|
2067
|
-
|
|
2068
|
-
while (_) try {
|
|
2069
|
-
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
2070
|
-
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
2071
|
-
switch (op[0]) {
|
|
2072
|
-
case 0: case 1: t = op; break;
|
|
2073
|
-
case 4: _.label++; return { value: op[1], done: false };
|
|
2074
|
-
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
2075
|
-
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
2076
|
-
default:
|
|
2077
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
2078
|
-
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
2079
|
-
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
2080
|
-
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
2081
|
-
if (t[2]) _.ops.pop();
|
|
2082
|
-
_.trys.pop(); continue;
|
|
2083
|
-
}
|
|
2084
|
-
op = body.call(thisArg, _);
|
|
2085
|
-
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
2086
|
-
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
2087
|
-
}
|
|
2088
|
-
};
|
|
2089
|
-
var __values$3 = (undefined && undefined.__values) || function(o) {
|
|
2090
|
-
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
|
|
2091
|
-
if (m) return m.call(o);
|
|
2092
|
-
if (o && typeof o.length === "number") return {
|
|
2093
|
-
next: function () {
|
|
2094
|
-
if (o && i >= o.length) o = void 0;
|
|
2095
|
-
return { value: o && o[i++], done: !o };
|
|
2096
|
-
}
|
|
2097
|
-
};
|
|
2098
|
-
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
2099
|
-
};
|
|
2100
|
-
/** Generator for iterating down a path on an object. */
|
|
2101
|
-
function traversePath(object, path) {
|
|
2102
|
-
var obj, _a, _b, crumb, e_1_1;
|
|
2103
|
-
var e_1, _c;
|
|
2104
|
-
return __generator(this, function (_d) {
|
|
2105
|
-
switch (_d.label) {
|
|
2106
|
-
case 0: return [4 /*yield*/, object];
|
|
2107
|
-
case 1:
|
|
2108
|
-
_d.sent();
|
|
2109
|
-
obj = object;
|
|
2110
|
-
_d.label = 2;
|
|
2111
|
-
case 2:
|
|
2112
|
-
_d.trys.push([2, 7, 8, 9]);
|
|
2113
|
-
_a = __values$3(crumblePath(path)), _b = _a.next();
|
|
2114
|
-
_d.label = 3;
|
|
2115
|
-
case 3:
|
|
2116
|
-
if (!!_b.done) return [3 /*break*/, 6];
|
|
2117
|
-
crumb = _b.value;
|
|
2118
|
-
obj = obj[crumb];
|
|
2119
|
-
return [4 /*yield*/, obj];
|
|
2120
|
-
case 4:
|
|
2121
|
-
_d.sent();
|
|
2122
|
-
_d.label = 5;
|
|
2123
|
-
case 5:
|
|
2124
|
-
_b = _a.next();
|
|
2125
|
-
return [3 /*break*/, 3];
|
|
2126
|
-
case 6: return [3 /*break*/, 9];
|
|
2127
|
-
case 7:
|
|
2128
|
-
e_1_1 = _d.sent();
|
|
2129
|
-
e_1 = { error: e_1_1 };
|
|
2130
|
-
return [3 /*break*/, 9];
|
|
2131
|
-
case 8:
|
|
2132
|
-
try {
|
|
2133
|
-
if (_b && !_b.done && (_c = _a.return)) _c.call(_a);
|
|
2134
|
-
}
|
|
2135
|
-
finally { if (e_1) throw e_1.error; }
|
|
2136
|
-
return [7 /*endfinally*/];
|
|
2137
|
-
case 9: return [2 /*return*/];
|
|
2138
|
-
}
|
|
2139
|
-
});
|
|
937
|
+
function* traversePath(object, path) {
|
|
938
|
+
yield object;
|
|
939
|
+
let obj = object;
|
|
940
|
+
for (const crumb of crumblePath(path)) {
|
|
941
|
+
obj = obj[crumb];
|
|
942
|
+
yield obj;
|
|
943
|
+
}
|
|
2140
944
|
}
|
|
2141
|
-
|
|
2142
|
-
|
|
2143
|
-
|
|
2144
|
-
|
|
2145
|
-
|
|
2146
|
-
|
|
2147
|
-
|
|
2148
|
-
|
|
2149
|
-
|
|
2150
|
-
|
|
2151
|
-
|
|
2152
|
-
};
|
|
2153
|
-
/**
|
|
2154
|
-
* Recursive merge of any number of objects
|
|
2155
|
-
*/
|
|
2156
|
-
function mergeDeep() {
|
|
2157
|
-
var e_1, _a, e_2, _b;
|
|
2158
|
-
var objectsToMerge = [];
|
|
2159
|
-
for (var _i = 0; _i < arguments.length; _i++) {
|
|
2160
|
-
objectsToMerge[_i] = arguments[_i];
|
|
2161
|
-
}
|
|
2162
|
-
var result = {};
|
|
2163
|
-
try {
|
|
2164
|
-
for (var objectsToMerge_1 = __values$2(objectsToMerge), objectsToMerge_1_1 = objectsToMerge_1.next(); !objectsToMerge_1_1.done; objectsToMerge_1_1 = objectsToMerge_1.next()) {
|
|
2165
|
-
var mergee = objectsToMerge_1_1.value;
|
|
2166
|
-
try {
|
|
2167
|
-
for (var _c = (e_2 = void 0, __values$2(Object.keys(mergee))), _d = _c.next(); !_d.done; _d = _c.next()) {
|
|
2168
|
-
var key = _d.value;
|
|
2169
|
-
if (Object.prototype.hasOwnProperty.call(result, key)
|
|
2170
|
-
&& Object.getOwnPropertyDescriptor(result, key).writable
|
|
2171
|
-
&& lodash_isplainobject(result[key])) {
|
|
2172
|
-
result[key] = mergeDeep(result[key], mergee[key]);
|
|
2173
|
-
}
|
|
2174
|
-
else if (lodash_isplainobject(mergee[key])) {
|
|
2175
|
-
result[key] = mergeDeep({}, mergee[key]);
|
|
2176
|
-
}
|
|
2177
|
-
else {
|
|
2178
|
-
result[key] = mergee[key];
|
|
2179
|
-
}
|
|
2180
|
-
}
|
|
2181
|
-
}
|
|
2182
|
-
catch (e_2_1) { e_2 = { error: e_2_1 }; }
|
|
2183
|
-
finally {
|
|
2184
|
-
try {
|
|
2185
|
-
if (_d && !_d.done && (_b = _c.return)) _b.call(_c);
|
|
2186
|
-
}
|
|
2187
|
-
finally { if (e_2) throw e_2.error; }
|
|
2188
|
-
}
|
|
2189
|
-
}
|
|
2190
|
-
}
|
|
2191
|
-
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
2192
|
-
finally {
|
|
2193
|
-
try {
|
|
2194
|
-
if (objectsToMerge_1_1 && !objectsToMerge_1_1.done && (_a = objectsToMerge_1.return)) _a.call(objectsToMerge_1);
|
|
2195
|
-
}
|
|
2196
|
-
finally { if (e_1) throw e_1.error; }
|
|
945
|
+
function mergeDeep(...objectsToMerge) {
|
|
946
|
+
const result = {};
|
|
947
|
+
for (const mergee of objectsToMerge) {
|
|
948
|
+
for (const key of Object.keys(mergee)) {
|
|
949
|
+
if (Object.prototype.hasOwnProperty.call(result, key) && Object.getOwnPropertyDescriptor(result, key).writable && lodash_isplainobject(result[key])) {
|
|
950
|
+
result[key] = mergeDeep(result[key], mergee[key]);
|
|
951
|
+
} else if (lodash_isplainobject(mergee[key])) {
|
|
952
|
+
result[key] = mergeDeep({}, mergee[key]);
|
|
953
|
+
} else {
|
|
954
|
+
result[key] = mergee[key];
|
|
955
|
+
}
|
|
2197
956
|
}
|
|
2198
|
-
|
|
957
|
+
}
|
|
958
|
+
return result;
|
|
2199
959
|
}
|
|
2200
|
-
|
|
2201
|
-
|
|
2202
|
-
|
|
2203
|
-
|
|
2204
|
-
|
|
2205
|
-
|
|
2206
|
-
|
|
2207
|
-
|
|
2208
|
-
|
|
2209
|
-
|
|
2210
|
-
|
|
2211
|
-
};
|
|
2212
|
-
/**
|
|
2213
|
-
* Recursive merge of any number of objects using `copyProperty()` rather than assignment
|
|
2214
|
-
*/
|
|
2215
|
-
function mergePropertiesDeep() {
|
|
2216
|
-
var e_1, _a, e_2, _b;
|
|
2217
|
-
var objectsToMerge = [];
|
|
2218
|
-
for (var _i = 0; _i < arguments.length; _i++) {
|
|
2219
|
-
objectsToMerge[_i] = arguments[_i];
|
|
2220
|
-
}
|
|
2221
|
-
var result = {};
|
|
2222
|
-
try {
|
|
2223
|
-
for (var objectsToMerge_1 = __values$1(objectsToMerge), objectsToMerge_1_1 = objectsToMerge_1.next(); !objectsToMerge_1_1.done; objectsToMerge_1_1 = objectsToMerge_1.next()) {
|
|
2224
|
-
var mergee = objectsToMerge_1_1.value;
|
|
2225
|
-
try {
|
|
2226
|
-
for (var _c = (e_2 = void 0, __values$1(Object.keys(mergee))), _d = _c.next(); !_d.done; _d = _c.next()) {
|
|
2227
|
-
var key = _d.value;
|
|
2228
|
-
if (Object.prototype.hasOwnProperty.call(result, key)
|
|
2229
|
-
&& Object.getOwnPropertyDescriptor(result, key).writable
|
|
2230
|
-
&& lodash_isplainobject(result[key])) {
|
|
2231
|
-
result[key] = mergePropertiesDeep(result[key], mergee[key]);
|
|
2232
|
-
}
|
|
2233
|
-
else if (lodash_isplainobject(mergee[key])) {
|
|
2234
|
-
result[key] = mergePropertiesDeep({}, mergee[key]);
|
|
2235
|
-
}
|
|
2236
|
-
else {
|
|
2237
|
-
copyProperty(key, mergee, result);
|
|
2238
|
-
}
|
|
2239
|
-
}
|
|
2240
|
-
}
|
|
2241
|
-
catch (e_2_1) { e_2 = { error: e_2_1 }; }
|
|
2242
|
-
finally {
|
|
2243
|
-
try {
|
|
2244
|
-
if (_d && !_d.done && (_b = _c.return)) _b.call(_c);
|
|
2245
|
-
}
|
|
2246
|
-
finally { if (e_2) throw e_2.error; }
|
|
2247
|
-
}
|
|
2248
|
-
}
|
|
2249
|
-
}
|
|
2250
|
-
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
2251
|
-
finally {
|
|
2252
|
-
try {
|
|
2253
|
-
if (objectsToMerge_1_1 && !objectsToMerge_1_1.done && (_a = objectsToMerge_1.return)) _a.call(objectsToMerge_1);
|
|
2254
|
-
}
|
|
2255
|
-
finally { if (e_1) throw e_1.error; }
|
|
960
|
+
function mergePropertiesDeep(...objectsToMerge) {
|
|
961
|
+
const result = {};
|
|
962
|
+
for (const mergee of objectsToMerge) {
|
|
963
|
+
for (const key of Object.keys(mergee)) {
|
|
964
|
+
if (Object.prototype.hasOwnProperty.call(result, key) && Object.getOwnPropertyDescriptor(result, key).writable && lodash_isplainobject(result[key])) {
|
|
965
|
+
result[key] = mergePropertiesDeep(result[key], mergee[key]);
|
|
966
|
+
} else if (lodash_isplainobject(mergee[key])) {
|
|
967
|
+
result[key] = mergePropertiesDeep({}, mergee[key]);
|
|
968
|
+
} else {
|
|
969
|
+
copyProperty(key, mergee, result);
|
|
970
|
+
}
|
|
2256
971
|
}
|
|
2257
|
-
|
|
972
|
+
}
|
|
973
|
+
return result;
|
|
2258
974
|
}
|
|
2259
|
-
|
|
2260
|
-
var __values = (undefined && undefined.__values) || function(o) {
|
|
2261
|
-
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
|
|
2262
|
-
if (m) return m.call(o);
|
|
2263
|
-
if (o && typeof o.length === "number") return {
|
|
2264
|
-
next: function () {
|
|
2265
|
-
if (o && i >= o.length) o = void 0;
|
|
2266
|
-
return { value: o && o[i++], done: !o };
|
|
2267
|
-
}
|
|
2268
|
-
};
|
|
2269
|
-
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
2270
|
-
};
|
|
2271
|
-
/** Returns the values of an object. */
|
|
2272
975
|
function values(object) {
|
|
2273
|
-
|
|
2274
|
-
|
|
2275
|
-
|
|
2276
|
-
|
|
2277
|
-
|
|
2278
|
-
vals.push(object[key]);
|
|
2279
|
-
}
|
|
2280
|
-
}
|
|
2281
|
-
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
2282
|
-
finally {
|
|
2283
|
-
try {
|
|
2284
|
-
if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
|
|
2285
|
-
}
|
|
2286
|
-
finally { if (e_1) throw e_1.error; }
|
|
2287
|
-
}
|
|
2288
|
-
return vals;
|
|
976
|
+
const vals = [];
|
|
977
|
+
for (const key of Object.keys(object)) {
|
|
978
|
+
vals.push(object[key]);
|
|
979
|
+
}
|
|
980
|
+
return vals;
|
|
2289
981
|
}
|
|
2290
|
-
|
|
2291
|
-
|
|
2292
|
-
|
|
2293
|
-
|
|
2294
|
-
var i = m.call(o), r, ar = [], e;
|
|
2295
|
-
try {
|
|
2296
|
-
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
|
|
2297
|
-
}
|
|
2298
|
-
catch (error) { e = { error: error }; }
|
|
2299
|
-
finally {
|
|
2300
|
-
try {
|
|
2301
|
-
if (r && !r.done && (m = i["return"])) m.call(i);
|
|
2302
|
-
}
|
|
2303
|
-
finally { if (e) throw e.error; }
|
|
2304
|
-
}
|
|
2305
|
-
return ar;
|
|
2306
|
-
};
|
|
2307
|
-
var __spreadArray = (undefined && undefined.__spreadArray) || function (to, from, pack) {
|
|
2308
|
-
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
2309
|
-
if (ar || !(i in from)) {
|
|
2310
|
-
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
2311
|
-
ar[i] = from[i];
|
|
2312
|
-
}
|
|
2313
|
-
}
|
|
2314
|
-
return to.concat(ar || Array.prototype.slice.call(from));
|
|
2315
|
-
};
|
|
2316
|
-
/** Template tag function for making strings containing code blocks easier to deal with. */
|
|
2317
|
-
function code(strings) {
|
|
2318
|
-
var interpolations = [];
|
|
2319
|
-
for (var _i = 1; _i < arguments.length; _i++) {
|
|
2320
|
-
interpolations[_i - 1] = arguments[_i];
|
|
2321
|
-
}
|
|
2322
|
-
var s = strings.reduce(function (a, b, i) { return "" + a + (i <= interpolations.length ? String(interpolations[i - 1]) : "") + b; });
|
|
2323
|
-
var leadingWhitespace = Math.min.apply(Math, __spreadArray([], __read$1(s.split(/[\r\n]/)
|
|
2324
|
-
.filter(function (l) { return l.trim(); })
|
|
2325
|
-
.map(function (l) { return (/^ */.exec(l))[0].length; })), false));
|
|
2326
|
-
return s.replace(new RegExp("^ {" + leadingWhitespace + "}", "gm"), "").trim();
|
|
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();
|
|
2327
986
|
}
|
|
2328
|
-
|
|
2329
|
-
var __read = (undefined && undefined.__read) || function (o, n) {
|
|
2330
|
-
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
2331
|
-
if (!m) return o;
|
|
2332
|
-
var i = m.call(o), r, ar = [], e;
|
|
2333
|
-
try {
|
|
2334
|
-
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
|
|
2335
|
-
}
|
|
2336
|
-
catch (error) { e = { error: error }; }
|
|
2337
|
-
finally {
|
|
2338
|
-
try {
|
|
2339
|
-
if (r && !r.done && (m = i["return"])) m.call(i);
|
|
2340
|
-
}
|
|
2341
|
-
finally { if (e) throw e.error; }
|
|
2342
|
-
}
|
|
2343
|
-
return ar;
|
|
2344
|
-
};
|
|
2345
|
-
/**
|
|
2346
|
-
* Parses a string as a file size and returns the size in bytes. For example,
|
|
2347
|
-
* `parseFileSize("2KB")` will return `2048`.
|
|
2348
|
-
*/
|
|
2349
987
|
function parseFileSize(fileSize) {
|
|
2350
|
-
|
|
2351
|
-
|
|
2352
|
-
|
|
2353
|
-
|
|
2354
|
-
|
|
2355
|
-
|
|
2356
|
-
|
|
2357
|
-
|
|
2358
|
-
|
|
2359
|
-
|
|
2360
|
-
|
|
2361
|
-
|
|
2362
|
-
|
|
2363
|
-
|
|
2364
|
-
|
|
2365
|
-
|
|
2366
|
-
|
|
2367
|
-
|
|
2368
|
-
|
|
2369
|
-
|
|
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 = [
|
|
998
|
+
"B",
|
|
999
|
+
"KB",
|
|
1000
|
+
"MB",
|
|
1001
|
+
"GB",
|
|
1002
|
+
"TB",
|
|
1003
|
+
"PB"
|
|
1004
|
+
].indexOf(unit);
|
|
1005
|
+
if (magnitude === -1) {
|
|
1006
|
+
throw new Error("parseFileSize does not support units above PB");
|
|
1007
|
+
}
|
|
1008
|
+
return Math.ceil(num * 1024 ** magnitude);
|
|
2370
1009
|
}
|
|
2371
|
-
|
|
2372
|
-
|
|
2373
|
-
|
|
2374
|
-
var SYMBOL_TEMPLATE_SOURCE = Symbol("sps.utils.templateSrc");
|
|
2375
|
-
/**
|
|
2376
|
-
* Every string templating thing out there whether lodash, doT, handlebars, etc
|
|
2377
|
-
* is extremely complicated to cover a variety of use cases. This just has two
|
|
2378
|
-
* very simple features and great caution should be exercised in making it any more
|
|
2379
|
-
* complex than that. A value can be interpolated like so:
|
|
2380
|
-
* `<%= foo.bar %>`
|
|
2381
|
-
* And a basic "if" conditional can be used like so:
|
|
2382
|
-
* `<%? a?.b?.c %>This part will only appear if a.b.c is truthy!</%>`
|
|
2383
|
-
* You can put interpolations inside a conditional, as you'd expect. That's it.
|
|
2384
|
-
*/
|
|
1010
|
+
const REGEX_REPLACEMENT = /(<%=|{{)(.+?)(%>|}})/g;
|
|
1011
|
+
const REGEX_IF = /<%\?(.+?)%>(.+?)<\/%>/g;
|
|
1012
|
+
const SYMBOL_TEMPLATE_SOURCE = Symbol("sps.utils.templateSrc");
|
|
2385
1013
|
function template(string) {
|
|
2386
|
-
|
|
2387
|
-
|
|
2388
|
-
|
|
2389
|
-
fn[SYMBOL_TEMPLATE_SOURCE] = string;
|
|
2390
|
-
return fn;
|
|
1014
|
+
const fn = (data) => string.replace(REGEX_IF, (match, pathToCheck, content) => getPath(data, pathToCheck.trim()) ? content : "").replace(REGEX_REPLACEMENT, (match, _, pathToInterpolate) => getPath(data, pathToInterpolate.trim(), ""));
|
|
1015
|
+
fn[SYMBOL_TEMPLATE_SOURCE] = string;
|
|
1016
|
+
return fn;
|
|
2391
1017
|
}
|
|
2392
1018
|
function isTemplate(x) {
|
|
2393
|
-
|
|
1019
|
+
return typeof x === "string" && (REGEX_REPLACEMENT.test(x) || REGEX_IF.test(x));
|
|
2394
1020
|
}
|
|
2395
1021
|
function isTemplateFn(x) {
|
|
2396
|
-
|
|
1022
|
+
return typeof x === "function" && Object.prototype.hasOwnProperty.call(x, SYMBOL_TEMPLATE_SOURCE);
|
|
2397
1023
|
}
|
|
2398
|
-
|
|
2399
1024
|
export { CustomEvent, DiffChange, EDI_DOCUMENT_TYPE, Op, castToNumber, code, constrain, copyProperty, crumblePath, debounce, debounced, decimalRound, deepFreeze, diff, flatten, forEachEntryDeep, forEachNestedObject, getPath, isSubset, isTemplate, isTemplateFn, lockToAnimationFrames, lockedToAnimationFrames, mergeDeep, mergePropertiesDeep, omit, onNextTick, parseFileSize, range, setPath, simpleMetadataDecoratorApplicator, template, tickDelay, toFileSizeString, traversePath, values };
|